1 line
37 KiB
Plaintext
1 line
37 KiB
Plaintext
{"version":3,"file":"modal.mjs","names":["pkg.version"],"sources":["../../../src/strings/dataBsToggle.ts","../../../src/strings/dataBsDismiss.ts","../../../src/strings/fadeClass.ts","../../../src/strings/showClass.ts","../../../src/strings/modalString.ts","../../../src/strings/modalComponent.ts","../../../src/strings/offcanvasComponent.ts","../../../src/strings/dataBsTarget.ts","../../../src/strings/dataBsParent.ts","../../../src/strings/dataBsContainer.ts","../../../src/util/getTargetElement.ts","../../../src/strings/fixedTopClass.ts","../../../src/strings/fixedBottomClass.ts","../../../src/strings/stickyTopClass.ts","../../../src/strings/positionStickyClass.ts","../../../src/util/scrollbar.ts","../../../src/strings/offcanvasString.ts","../../../src/util/popupContainer.ts","../../../src/util/backdrop.ts","../../../src/util/isVisible.ts","../../../src/util/isDisabled.ts","../../../package.json","../../../src/version.ts","../../../src/components/base-component.ts","../../../src/components/modal.ts"],"sourcesContent":["/**\n * Global namespace for most components `toggle` option.\n */\nconst dataBsToggle = \"data-bs-toggle\";\nexport default dataBsToggle;\n","/**\n * Global namespace for most components `dismiss` option.\n */\nconst dataBsDismiss = \"data-bs-dismiss\";\nexport default dataBsDismiss;\n","/**\n * Global namespace for most components `fade` class.\n */\nconst fadeClass = \"fade\";\nexport default fadeClass;\n","/**\n * Global namespace for most components `show` class.\n */\nconst showClass = \"show\";\nexport default showClass;\n","/** @type {string} */\nconst modalString = \"modal\";\nexport default modalString;\n","/** @type {string} */\nconst modalComponent = \"Modal\";\nexport default modalComponent;\n","/** @type {string} */\nconst offcanvasComponent = \"Offcanvas\";\nexport default offcanvasComponent;\n","/**\n * Global namespace for most components `target` option.\n */\nconst dataBsTarget = \"data-bs-target\";\nexport default dataBsTarget;\n","/**\n * Global namespace for most components `parent` option.\n */\nconst dataBsParent = \"data-bs-parent\";\nexport default dataBsParent;\n","/**\n * Global namespace for most components `container` option.\n */\nconst dataBsContainer = \"data-bs-container\";\nexport default dataBsContainer;\n","import {\n closest,\n getAttribute,\n getDocument,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport dataBsTarget from \"../strings/dataBsTarget\";\nimport dataBsParent from \"../strings/dataBsParent\";\nimport dataBsContainer from \"../strings/dataBsContainer\";\n\n/**\n * Returns the `Element` that THIS one targets\n * via `data-bs-target`, `href`, `data-bs-parent` or `data-bs-container`.\n *\n * @param element the target element\n * @returns the query result\n */\nconst getTargetElement = <T extends Element = HTMLElement>(element: T) => {\n const targetAttr = [dataBsTarget, dataBsParent, dataBsContainer, \"href\"];\n const doc = getDocument(element);\n\n return targetAttr\n .map((att) => {\n const attValue = getAttribute(element, att);\n if (attValue) {\n // istanbul ignore next @preserve\n return att === dataBsParent\n ? closest<T>(element, attValue)\n : querySelector<T>(attValue, doc);\n }\n return null;\n })\n .filter((x) => x)[0];\n};\n\nexport default getTargetElement;\n","/**\n * Global namespace for components `fixed-top` class.\n */\nconst fixedTopClass = \"fixed-top\";\nexport default fixedTopClass;\n","/**\n * Global namespace for components `fixed-bottom` class.\n */\nconst fixedBottomClass = \"fixed-bottom\";\nexport default fixedBottomClass;\n","/**\n * Global namespace for components `sticky-top` class.\n */\nconst stickyTopClass = \"sticky-top\";\nexport default stickyTopClass;\n","/**\n * Global namespace for components `position-sticky` class.\n */\nconst positionStickyClass = \"position-sticky\";\nexport default positionStickyClass;\n","import {\n getDocumentBody,\n getDocumentElement,\n getElementsByClassName,\n getElementStyle,\n getWindow,\n hasClass,\n setElementStyle,\n} from \"@thednp/shorty\";\n\nimport fixedTopClass from \"../strings/fixedTopClass\";\nimport fixedBottomClass from \"../strings/fixedBottomClass\";\nimport stickyTopClass from \"../strings/stickyTopClass\";\nimport positionStickyClass from \"../strings/positionStickyClass\";\n\nconst getFixedItems = (parent?: ParentNode) => [\n ...getElementsByClassName<HTMLElement>(fixedTopClass, parent),\n ...getElementsByClassName<HTMLElement>(fixedBottomClass, parent),\n ...getElementsByClassName<HTMLElement>(stickyTopClass, parent),\n ...getElementsByClassName<HTMLElement>(positionStickyClass, parent),\n ...getElementsByClassName<HTMLElement>(\"is-fixed\", parent),\n];\n\n/**\n * Removes *padding* and *overflow* from the `<body>`\n * and all spacing from fixed items.\n *\n * @param element the target modal/offcanvas\n */\nexport const resetScrollbar = (element?: Element) => {\n const bd = getDocumentBody(element);\n setElementStyle(bd, {\n paddingRight: \"\",\n overflow: \"\",\n });\n\n const fixedItems = getFixedItems(bd);\n\n // istanbul ignore else @preserve\n if (fixedItems.length) {\n fixedItems.forEach((fixed) => {\n setElementStyle(fixed, {\n paddingRight: \"\",\n marginRight: \"\",\n });\n });\n }\n};\n\n/**\n * Returns the scrollbar width if the body does overflow\n * the window.\n *\n * @param element target element\n * @returns the scrollbar width value\n */\nexport const measureScrollbar = (element: Element) => {\n const { clientWidth } = getDocumentElement(element);\n const { innerWidth } = getWindow(element);\n return Math.abs(innerWidth - clientWidth);\n};\n\n/**\n * Sets the `<body>` and fixed items style when modal / offcanvas\n * is shown to the user.\n *\n * @param element the target modal/offcanvas\n * @param overflow body does overflow or not\n */\nexport const setScrollbar = (element: Element, overflow?: boolean) => {\n const bd = getDocumentBody(element);\n const bodyPad = parseInt(getElementStyle(bd, \"paddingRight\"), 10);\n const isOpen = getElementStyle(bd, \"overflow\") === \"hidden\";\n // istanbul ignore next @preserve\n const sbWidth = isOpen && bodyPad ? 0 : measureScrollbar(element);\n const fixedItems = getFixedItems(bd);\n\n // istanbul ignore if @preserve\n if (!overflow) return;\n\n setElementStyle(bd, {\n overflow: \"hidden\",\n paddingRight: `${bodyPad + sbWidth}px`,\n });\n\n // istanbul ignore if @preserve\n if (!fixedItems.length) return;\n\n fixedItems.forEach((fixed) => {\n const itemPadValue = getElementStyle(fixed, \"paddingRight\");\n fixed.style.paddingRight = `${parseInt(itemPadValue, 10) + sbWidth}px`;\n // istanbul ignore else @preserve\n if (\n [stickyTopClass, positionStickyClass].some((c) => hasClass(fixed, c))\n ) {\n const itemMValue = getElementStyle(fixed, \"marginRight\");\n fixed.style.marginRight = `${parseInt(itemMValue, 10) - sbWidth}px`;\n }\n });\n};\n","/** @type {string} */\nconst offcanvasString = \"offcanvas\";\nexport default offcanvasString;\n","import { createElement, getDocumentBody, isNode } from \"@thednp/shorty\";\n\n// the default container for Modal, Offcanvas, Popover and Tooltip\nconst popupContainer = createElement({\n tagName: \"div\",\n className: \"popup-container\",\n}) as HTMLElement;\n\nconst appendPopup = (target: Element, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n const BODY = containerIsBody ? customContainer : getDocumentBody(target);\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n if (lookup === popupContainer) {\n BODY.append(popupContainer);\n }\n lookup.append(target);\n }\n};\n\nconst removePopup = (target: Element, customContainer?: ParentNode) => {\n const containerIsBody = isNode(customContainer) &&\n customContainer.nodeName === \"BODY\";\n const lookup = isNode(customContainer) && !containerIsBody\n ? customContainer\n : popupContainer;\n\n // istanbul ignore else @preserve\n if (isNode(target)) {\n target.remove();\n\n if (lookup === popupContainer && !popupContainer.children.length) {\n popupContainer.remove();\n }\n }\n};\n\nconst hasPopup = (target: Element, customContainer?: ParentNode) => {\n const lookup = isNode(customContainer) && customContainer.nodeName !== \"BODY\"\n ? customContainer\n : popupContainer;\n return isNode(target) && lookup.contains(target);\n};\n\nexport { appendPopup, hasPopup, popupContainer, removePopup };\n","import {\n addClass,\n createElement,\n getDocument,\n getDocumentBody,\n hasClass,\n querySelector,\n reflow,\n removeClass,\n} from \"@thednp/shorty\";\n\nimport fadeClass from \"../strings/fadeClass\";\nimport showClass from \"../strings/showClass\";\nimport modalString from \"../strings/modalString\";\nimport offcanvasString from \"../strings/offcanvasString\";\nimport { resetScrollbar } from \"./scrollbar\";\nimport { appendPopup, removePopup } from \"./popupContainer\";\n\nconst backdropString = \"backdrop\";\nconst modalBackdropClass = `${modalString}-${backdropString}`;\nconst offcanvasBackdropClass = `${offcanvasString}-${backdropString}`;\nconst modalActiveSelector = `.${modalString}.${showClass}`;\nconst offcanvasActiveSelector = `.${offcanvasString}.${showClass}`;\n\n// any document would suffice\nconst overlay = createElement(\"div\") as HTMLElement;\n\n/**\n * Returns the current active modal / offcancas element.\n *\n * @param element the context element\n * @returns the requested element\n */\nconst getCurrentOpen = (element?: Element) => {\n return querySelector(\n `${modalActiveSelector},${offcanvasActiveSelector}`,\n getDocument(element),\n );\n};\n\n/**\n * Toogles from a Modal overlay to an Offcanvas, or vice-versa.\n *\n * @param isModal\n */\nconst toggleOverlayType = (isModal?: boolean) => {\n const targetClass = isModal ? modalBackdropClass : offcanvasBackdropClass;\n [modalBackdropClass, offcanvasBackdropClass].forEach((c) => {\n removeClass(overlay, c);\n });\n addClass(overlay, targetClass);\n};\n\n/**\n * Append the overlay to DOM.\n *\n * @param element\n * @param hasFade\n * @param isModal\n */\nconst appendOverlay = (\n element: Element,\n hasFade: boolean,\n isModal?: boolean,\n) => {\n toggleOverlayType(isModal);\n appendPopup(overlay, getDocumentBody(element));\n if (hasFade) addClass(overlay, fadeClass);\n};\n\n/**\n * Shows the overlay to the user.\n */\nconst showOverlay = () => {\n if (!hasClass(overlay, showClass)) {\n addClass(overlay, showClass);\n reflow(overlay);\n }\n};\n\n/**\n * Hides the overlay from the user.\n */\nconst hideOverlay = () => {\n removeClass(overlay, showClass);\n};\n\n/**\n * Removes the overlay from DOM.\n *\n * @param element\n */\nconst removeOverlay = (element?: Element): void => {\n if (!getCurrentOpen(element)) {\n removeClass(overlay, fadeClass);\n removePopup(overlay, getDocumentBody(element));\n resetScrollbar(element);\n }\n};\n\nexport {\n appendOverlay,\n getCurrentOpen,\n hideOverlay,\n modalActiveSelector,\n modalBackdropClass,\n offcanvasActiveSelector,\n offcanvasBackdropClass,\n overlay,\n removeOverlay,\n showOverlay,\n toggleOverlayType,\n};\n","import { getElementStyle, isHTMLElement } from \"@thednp/shorty\";\n\n/**\n * @param element target\n * @returns the check result\n */\nconst isVisible = (element: HTMLElement) => {\n return isHTMLElement(element) &&\n getElementStyle(element, \"visibility\") !== \"hidden\" &&\n element.offsetParent !== null;\n};\nexport default isVisible;\n","import { getAttribute, hasClass } from \"@thednp/shorty\";\n\n/**\n * Check if interactive element is disabled.\n * @param target either a `<button>` or an `<a>`\n * @returns whether the target is disabled\n */\nconst isDisabled = (target: Element) => {\n return hasClass(target, \"disabled\") ||\n getAttribute(target, \"disabled\") === \"true\";\n};\n\nexport default isDisabled;\n","","import pkg from \"../package.json\" with { type: \"json\" };\n\nconst Version = pkg.version;\n\nexport default Version;\n","/* Native JavaScript for Bootstrap 5 | Base Component\n----------------------------------------------------- */\nimport {\n Data,\n isElement,\n isString,\n normalizeOptions,\n ObjectKeys,\n querySelector,\n} from \"@thednp/shorty\";\n\nimport type { BaseOptions } from \"~/interface/baseComponent\";\nimport Version from \"~/version\";\n\n/** Returns a new `BaseComponent` instance. */\nexport default class BaseComponent {\n declare element: Element;\n declare options?: BaseOptions;\n\n /**\n * @param target `Element` or selector string\n * @param config component instance options\n */\n constructor(target: Element | string, config?: BaseOptions) {\n let element: Element | null;\n\n try {\n if (isElement(target)) {\n element = target as Element;\n } else if (isString(target)) {\n element = querySelector(target);\n // istanbul ignore else @preserve\n if (!element) throw Error(`\"${target}\" is not a valid selector.`);\n } else {\n throw Error(`your target is not an instance of HTMLElement.`);\n }\n } catch (e) {\n throw Error(`${this.name} Error: ${(e as Error).message}`);\n }\n\n const prevInstance = Data.get<typeof this>(element, this.name);\n /* istanbul ignore else @preserve */\n if (prevInstance) {\n // remove previously attached event listeners\n // to avoid memory leaks\n prevInstance._toggleEventListeners();\n }\n\n this.element = element;\n this.options = this.defaults && ObjectKeys(this.defaults).length\n ? normalizeOptions(element, this.defaults, config || {}, \"bs\")\n : /* istanbul ignore next @preserve */ {};\n\n Data.set(element, this.name, this);\n }\n\n // istanbul ignore next @preserve\n get version() {\n return Version;\n }\n\n // istanbul ignore next @preserve\n get name() {\n return \"BaseComponent\";\n }\n\n // istanbul ignore next @preserve\n get defaults() {\n return {};\n }\n\n /** just to have something to extend from */\n // istanbul ignore next @preserve coverage wise this isn't important\n _toggleEventListeners = () => {\n // do something to please linters\n };\n\n /** Removes component from target element. */\n dispose() {\n Data.remove<typeof this>(this.element, this.name);\n ObjectKeys(this).forEach((prop) => {\n delete this[prop];\n });\n }\n}\n","/* Native JavaScript for Bootstrap 5 | Modal\n-------------------------------------------- */\nimport {\n addClass,\n ariaHidden,\n ariaModal,\n closest,\n createCustomEvent,\n CSS4Declaration,\n dispatchEvent,\n emulateTransitionEnd,\n focus,\n getDocument,\n getDocumentBody,\n getDocumentElement,\n getElementTransitionDuration,\n getInstance,\n hasClass,\n isRTL,\n KeyboardEvent,\n keydownEvent,\n keyEscape,\n mouseclickEvent,\n MouseEvent,\n querySelector,\n querySelectorAll,\n removeAttribute,\n removeClass,\n setAttribute,\n setElementStyle,\n Timer,\n toggleFocusTrap,\n} from \"@thednp/shorty\";\n\nimport { addListener, removeListener } from \"@thednp/event-listener\";\n\nimport dataBsToggle from \"~/strings/dataBsToggle\";\nimport dataBsDismiss from \"~/strings/dataBsDismiss\";\nimport fadeClass from \"~/strings/fadeClass\";\nimport showClass from \"~/strings/showClass\";\nimport modalString from \"~/strings/modalString\";\nimport modalComponent from \"~/strings/modalComponent\";\nimport offcanvasComponent from \"~/strings/offcanvasComponent\";\nimport getTargetElement from \"~/util/getTargetElement\";\nimport { measureScrollbar, setScrollbar } from \"~/util/scrollbar\";\nimport {\n appendOverlay,\n getCurrentOpen,\n hideOverlay,\n modalActiveSelector,\n overlay,\n removeOverlay,\n showOverlay,\n toggleOverlayType,\n} from \"~/util/backdrop\";\nimport isVisible from \"~/util/isVisible\";\nimport { hasPopup } from \"~/util/popupContainer\";\nimport isDisabled from \"~/util/isDisabled\";\nimport BaseComponent from \"./base-component\";\nimport { ModalEvent, ModalOptions } from \"~/interface/modal\";\n\n// MODAL PRIVATE GC\n// ================\nconst modalSelector = `.${modalString}`;\nconst modalToggleSelector = `[${dataBsToggle}=\"${modalString}\"]`;\nconst modalDismissSelector = `[${dataBsDismiss}=\"${modalString}\"]`;\nconst modalStaticClass = `${modalString}-static`;\n\nconst modalDefaults = {\n backdrop: true,\n keyboard: true,\n};\n\ntype ModalEventProps = {\n relatedTarget: Element & EventTarget | null;\n};\n\n/**\n * Static method which returns an existing `Modal` instance associated\n * to a target `Element`.\n */\nconst getModalInstance = (element: Element) =>\n getInstance<Modal>(element, modalComponent);\n\n/**\n * A `Modal` initialization callback.\n */\nconst modalInitCallback = (element: Element) => new Modal(element);\n\n// MODAL CUSTOM EVENTS\n// ===================\nconst showModalEvent = createCustomEvent<ModalEventProps, ModalEvent>(\n `show.bs.${modalString}`,\n);\nconst shownModalEvent = createCustomEvent<ModalEventProps, ModalEvent>(\n `shown.bs.${modalString}`,\n);\nconst hideModalEvent = createCustomEvent<ModalEventProps, ModalEvent>(\n `hide.bs.${modalString}`,\n);\nconst hiddenModalEvent = createCustomEvent<ModalEventProps, ModalEvent>(\n `hidden.bs.${modalString}`,\n);\n\n// MODAL PRIVATE METHODS\n// =====================\n/**\n * Applies special style for the `<body>` and fixed elements\n * when a modal instance is shown to the user.\n *\n * @param self the `Modal` instance\n */\nconst setModalScrollbar = (self: Modal) => {\n const { element } = self;\n const scrollbarWidth = measureScrollbar(element);\n const { clientHeight, scrollHeight } = getDocumentElement(element);\n const { clientHeight: modalHeight, scrollHeight: modalScrollHeight } =\n element;\n const modalOverflow = modalHeight !== modalScrollHeight;\n\n // istanbul ignore next @preserve: impossible to test?\n if (!modalOverflow && scrollbarWidth) {\n const pad = !isRTL(element)\n ? \"paddingRight\"\n // istanbul ignore next @preserve\n : \"paddingLeft\";\n const padStyle = { [pad]: `${scrollbarWidth}px` } as Partial<\n CSS4Declaration\n >;\n setElementStyle(element, padStyle);\n }\n setScrollbar(element, modalOverflow || clientHeight !== scrollHeight);\n};\n\n/**\n * Toggles on/off the listeners of events that close the modal.\n *\n * @param self the `Modal` instance\n * @param add when `true`, event listeners are added\n */\nconst toggleModalDismiss = (self: Modal, add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { element } = self;\n action(element, mouseclickEvent, modalDismissHandler);\n action(getDocument(element), keydownEvent, modalKeyHandler);\n\n if (add) self._observer.observe(element);\n else self._observer.disconnect();\n};\n\n/**\n * Executes after a modal is hidden to the user.\n *\n * @param self the `Modal` instance\n */\nconst afterModalHide = (self: Modal) => {\n const { triggers, element, relatedTarget } = self;\n removeOverlay(element);\n setElementStyle(element, { paddingRight: \"\", display: \"\" });\n toggleModalDismiss(self);\n\n const focusElement = showModalEvent.relatedTarget || triggers.find(isVisible);\n // istanbul ignore else @preserve\n if (focusElement) focus(focusElement);\n\n hiddenModalEvent.relatedTarget = relatedTarget || undefined;\n dispatchEvent(element, hiddenModalEvent);\n toggleFocusTrap(element);\n};\n\n/**\n * Executes after a modal is shown to the user.\n *\n * @param self the `Modal` instance\n */\nconst afterModalShow = (self: Modal) => {\n const { element, relatedTarget } = self;\n focus(element as HTMLElement);\n toggleModalDismiss(self, true);\n\n shownModalEvent.relatedTarget = relatedTarget || undefined;\n dispatchEvent(element, shownModalEvent);\n toggleFocusTrap(element);\n};\n\n/**\n * Executes before a modal is shown to the user.\n *\n * @param self the `Modal` instance\n */\nconst beforeModalShow = (self: Modal) => {\n const { element, hasFade } = self;\n setElementStyle(element, { display: \"block\" });\n setModalScrollbar(self);\n // istanbul ignore else @preserve\n if (!getCurrentOpen(element)) {\n setElementStyle(getDocumentBody(element), { overflow: \"hidden\" });\n }\n\n addClass(element, showClass);\n removeAttribute(element, ariaHidden);\n setAttribute(element, ariaModal, \"true\");\n\n if (hasFade) emulateTransitionEnd(element, () => afterModalShow(self));\n else afterModalShow(self);\n};\n\n/**\n * Executes before a modal is hidden to the user.\n *\n * @param self the `Modal` instance\n */\nconst beforeModalHide = (self: Modal) => {\n const { element, options, hasFade } = self;\n\n // callback can also be the transitionEvent object, we wanna make sure it's not\n // call is not forced and overlay is visible\n if (\n options.backdrop && hasFade && hasClass(overlay, showClass) &&\n !getCurrentOpen(element)\n ) {\n // AND no modal is visible\n hideOverlay();\n emulateTransitionEnd(overlay, () => afterModalHide(self));\n } else {\n afterModalHide(self);\n }\n};\n\n// MODAL EVENT HANDLERS\n// ====================\n/**\n * Handles the `click` event listener for modal.\n *\n * @param e the `Event` object\n */\nfunction modalClickHandler(this: HTMLElement, e: MouseEvent<HTMLElement>) {\n const element = getTargetElement(this);\n const self = element && getModalInstance(element);\n\n // istanbul ignore if @preserve\n if (isDisabled(this)) return;\n\n // istanbul ignore if @preserve\n if (!self) return;\n\n // istanbul ignore else @preserve\n if (this.tagName === \"A\") e.preventDefault();\n self.relatedTarget = this;\n self.toggle();\n}\n\n/**\n * Handles the `keydown` event listener for modal\n * to hide the modal when user type the `ESC` key.\n *\n * @param e the `Event` object\n */\nconst modalKeyHandler = ({ code, target }: KeyboardEvent<Element>) => {\n const element = querySelector(modalActiveSelector, getDocument(target));\n const self = element && getModalInstance(element);\n\n // istanbul ignore if @preserve\n if (!self) return;\n\n const { options } = self;\n // istanbul ignore else @preserve\n if (\n options.keyboard &&\n code === keyEscape && // the keyboard option is enabled and the key is 27\n hasClass(element, showClass)\n ) {\n // the modal is not visible\n self.relatedTarget = null;\n self.hide();\n }\n};\n\n/**\n * Handles the `click` event listeners that hide the modal.\n *\n * @param e the `Event` object\n */\nconst modalDismissHandler = (e: MouseEvent<HTMLElement>) => {\n const { currentTarget } = e;\n const self = currentTarget && getModalInstance(currentTarget);\n\n // the timer is needed\n // istanbul ignore if @preserve\n if (!self || !currentTarget || Timer.get(currentTarget)) return;\n\n const { options, isStatic, modalDialog } = self;\n const { backdrop } = options;\n const { target } = e;\n\n const selectedText = getDocument(currentTarget)?.getSelection()?.toString()\n .length;\n const targetInsideDialog = modalDialog.contains(target);\n const dismiss = target && closest(target, modalDismissSelector);\n\n // istanbul ignore else @preserve\n if (isStatic && !targetInsideDialog) {\n Timer.set(\n currentTarget,\n () => {\n addClass(currentTarget, modalStaticClass);\n emulateTransitionEnd(modalDialog, () => staticTransitionEnd(self));\n },\n 17,\n );\n } else if (\n dismiss || (!selectedText && !isStatic && !targetInsideDialog && backdrop)\n ) {\n self.relatedTarget = dismiss || null;\n self.hide();\n e.preventDefault();\n }\n};\n\n/**\n * Handles the `transitionend` event listeners for `Modal`.\n *\n * @param self the `Modal` instance\n */\nconst staticTransitionEnd = (self: Modal) => {\n const { element, modalDialog } = self;\n const duration = (getElementTransitionDuration(modalDialog) || 0) + 17;\n removeClass(element, modalStaticClass);\n // user must wait for zoom out transition\n Timer.set(element, () => Timer.clear(element), duration);\n};\n\n// MODAL DEFINITION\n// ================\n/** Returns a new `Modal` instance. */\nexport default class Modal extends BaseComponent {\n static selector = modalSelector;\n static init = modalInitCallback;\n static getInstance = getModalInstance;\n declare element: HTMLElement;\n declare options: ModalOptions;\n declare modalDialog: HTMLElement;\n declare triggers: HTMLElement[];\n declare isStatic: boolean;\n declare hasFade: boolean;\n declare relatedTarget: EventTarget & HTMLElement | null;\n declare _observer: ResizeObserver;\n\n /**\n * @param target usually the `.modal` element\n * @param config instance options\n */\n constructor(target: Element | string, config?: Partial<ModalOptions>) {\n super(target, config);\n\n // the modal\n const { element } = this;\n\n // the modal-dialog\n const modalDialog = querySelector<HTMLElement>(\n `.${modalString}-dialog`,\n element,\n );\n\n // istanbul ignore if @preserve\n if (!modalDialog) return;\n\n this.modalDialog = modalDialog;\n // modal can have multiple triggering elements\n this.triggers = [\n ...querySelectorAll<HTMLElement>(\n modalToggleSelector,\n getDocument(element),\n ),\n ].filter(\n (btn) => getTargetElement(btn) === element,\n );\n\n // additional internals\n this.isStatic = this.options.backdrop === \"static\";\n this.hasFade = hasClass(element, fadeClass);\n this.relatedTarget = null;\n this._observer = new ResizeObserver(() => this.update());\n\n // attach event listeners\n this._toggleEventListeners(true);\n }\n\n /**\n * Returns component name string.\n */\n get name() {\n return modalComponent;\n }\n /**\n * Returns component default options.\n */\n get defaults() {\n return modalDefaults;\n }\n\n // MODAL PUBLIC METHODS\n // ====================\n /** Toggles the visibility of the modal. */\n toggle() {\n if (hasClass(this.element, showClass)) this.hide();\n else this.show();\n }\n\n /** Shows the modal to the user. */\n show() {\n const { element, options, hasFade, relatedTarget } = this;\n const { backdrop } = options;\n let overlayDelay = 0;\n\n // istanbul ignore if @preserve\n if (hasClass(element, showClass)) return;\n\n showModalEvent.relatedTarget = relatedTarget || undefined;\n dispatchEvent(element, showModalEvent);\n\n // allow the event to be prevented\n // istanbul ignore else @preserve\n if (showModalEvent.defaultPrevented) return;\n\n // we elegantly hide any opened modal/offcanvas\n const currentOpen = getCurrentOpen(element);\n\n // istanbul ignore else @preserve\n if (currentOpen && currentOpen !== element) {\n // istanbul ignore next @preserve\n const that = getModalInstance(currentOpen) ||\n getInstance<typeof BaseComponent & { hide: () => void }>(\n currentOpen,\n offcanvasComponent,\n );\n // istanbul ignore else @preserve\n if (that) that.hide();\n }\n if (backdrop) {\n if (!hasPopup(overlay)) {\n appendOverlay(element, hasFade, true);\n } else {\n toggleOverlayType(true);\n }\n\n overlayDelay = getElementTransitionDuration(overlay);\n showOverlay();\n\n setTimeout(() => beforeModalShow(this), overlayDelay);\n } else {\n beforeModalShow(this);\n // istanbul ignore else @preserve\n if (currentOpen && hasClass(overlay, showClass)) {\n hideOverlay();\n }\n }\n }\n\n /** Hide the modal from the user. */\n hide() {\n const { element, hasFade, relatedTarget } = this;\n\n // istanbul ignore if @preserve\n if (!hasClass(element, showClass)) return;\n\n hideModalEvent.relatedTarget = relatedTarget || undefined;\n dispatchEvent(element, hideModalEvent);\n\n // istanbul ignore if @preserve\n if (hideModalEvent.defaultPrevented) return;\n\n removeClass(element, showClass);\n setAttribute(element, ariaHidden, \"true\");\n removeAttribute(element, ariaModal);\n\n if (hasFade) emulateTransitionEnd(element, () => beforeModalHide(this));\n else beforeModalHide(this);\n }\n\n /**\n * Updates the modal layout.\n */\n update = () => {\n // istanbul ignore else @preserve\n if (hasClass(this.element, showClass)) setModalScrollbar(this);\n };\n\n /**\n * Toggles on/off the `click` event listener of the `Modal` instance.\n *\n * @param add when `true`, event listener(s) is/are added\n */\n _toggleEventListeners = (add?: boolean) => {\n const action = add ? addListener : removeListener;\n const { triggers } = this;\n\n // istanbul ignore if @preserve\n if (!triggers.length) return;\n\n triggers.forEach((btn) => {\n // istanbul ignore else @preserve\n action(btn, mouseclickEvent, modalClickHandler);\n });\n };\n\n /** Removes the `Modal` component from target element. */\n dispose() {\n const clone = { ...this };\n const { modalDialog, hasFade } = clone;\n const callback = () => setTimeout(() => super.dispose(), 17);\n\n this.hide();\n this._toggleEventListeners();\n\n if (hasFade) {\n // use transitionend callback\n emulateTransitionEnd(modalDialog, callback);\n } else {\n callback();\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAGA,MAAM,eAAe;;;;;;ACArB,MAAM,gBAAgB;;;;;;ACAtB,MAAM,YAAY;;;;;;ACAlB,MAAM,YAAY;;;;ACFlB,MAAM,cAAc;;;;ACApB,MAAM,iBAAiB;;;;;;AEEvB,MAAM,eAAe;;;;;;ACArB,MAAM,eAAe;;;;;;ACArB,MAAM,kBAAkB;;;;;;;;;;ACexB,MAAM,oBAAqD,YAAe;CACxE,MAAM,aAAa;EAAC;EAAc;EAAc;EAAiB;EAAO;CACxE,MAAM,MAAM,YAAY,QAAQ;AAEhC,QAAO,WACJ,KAAK,QAAQ;EACZ,MAAM,WAAW,aAAa,SAAS,IAAI;AAC3C,MAAI,SAEF,QAAO,QAAA,mBACH,QAAW,SAAS,SAAQ,GAC5B,cAAiB,UAAU,IAAI;AAErC,SAAO;GACR,CACA,QAAQ,MAAM,EAAE,CAAC;;;;;;;AC9BtB,MAAM,gBAAgB;;;;;;ACAtB,MAAM,mBAAmB;;;;;;ACAzB,MAAM,iBAAiB;;;;;;ACAvB,MAAM,sBAAsB;;;ACY5B,MAAM,iBAAiB,WAAwB;CAC7C,GAAG,uBAAoC,eAAe,OAAO;CAC7D,GAAG,uBAAoC,kBAAkB,OAAO;CAChE,GAAG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