1 |
- {"ast":null,"code":"import _asyncToGenerator from \"F:/workspace/202226701027/huinongbao-app/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\n/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';\nimport { g as getTimeGivenProgression } from './cubic-bezier.js';\nimport { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays.js';\nimport { G as GESTURE_CONTROLLER } from './gesture-controller.js';\nimport { shouldUseCloseWatcher } from './hardware-back-button.js';\nimport { m as isEndSide, i as inheritAriaAttributes, n as assert, k as clamp } from './helpers.js';\nimport { m as menuController } from './index4.js';\nimport { h as hostContext } from './theme.js';\nimport { c as config, b as getIonMode } from './ionic-global.js';\nimport { d as defineCustomElement$2 } from './backdrop.js';\nconst menuIosCss = \":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){-ms-flex:0 1 auto;flex:0 1 auto;width:var(--side-width, var(--width));min-width:var(--side-min-width, var(--min-width));max-width:var(--side-max-width, var(--max-width))}:host(.menu-pane-visible.split-pane-side){left:0;right:0;top:0;bottom:0;position:relative;-webkit-box-shadow:none;box-shadow:none;z-index:0}:host(.menu-pane-visible.split-pane-side.menu-enabled){display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}:host(.menu-pane-visible.split-pane-side){-ms-flex-order:-1;order:-1}:host(.menu-pane-visible.split-pane-side[side=end]){-ms-flex-order:1;order:1}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-pane-visible.split-pane-side){-webkit-border-start:0;border-inline-start:0;-webkit-border-end:var(--border);border-inline-end:var(--border);border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-pane-visible.split-pane-side[side=end]){-webkit-border-start:var(--border);border-inline-start:var(--border);-webkit-border-end:0;border-inline-end:0;border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}\";\nconst IonMenuIosStyle0 = menuIosCss;\nconst menuMdCss = \":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){-ms-flex:0 1 auto;flex:0 1 auto;width:var(--side-width, var(--width));min-width:var(--side-min-width, var(--min-width));max-width:var(--side-max-width, var(--max-width))}:host(.menu-pane-visible.split-pane-side){left:0;right:0;top:0;bottom:0;position:relative;-webkit-box-shadow:none;box-shadow:none;z-index:0}:host(.menu-pane-visible.split-pane-side.menu-enabled){display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}:host(.menu-pane-visible.split-pane-side){-ms-flex-order:-1;order:-1}:host(.menu-pane-visible.split-pane-side[side=end]){-ms-flex-order:1;order:1}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-pane-visible.split-pane-side){-webkit-border-start:0;border-inline-start:0;-webkit-border-end:var(--border);border-inline-end:var(--border);border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-pane-visible.split-pane-side[side=end]){-webkit-border-start:var(--border);border-inline-start:var(--border);-webkit-border-end:0;border-inline-end:0;border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-type-overlay) .menu-inner{-webkit-box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18);box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}\";\nconst IonMenuMdStyle0 = menuMdCss;\nconst iosEasing = 'cubic-bezier(0.32,0.72,0,1)';\nconst mdEasing = 'cubic-bezier(0.0,0.0,0.2,1)';\nconst iosEasingReverse = 'cubic-bezier(1, 0, 0.68, 0.28)';\nconst mdEasingReverse = 'cubic-bezier(0.4, 0, 0.6, 1)';\nconst Menu = /*@__PURE__*/proxyCustomElement(class Menu extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.ionWillOpen = createEvent(this, \"ionWillOpen\", 7);\n this.ionWillClose = createEvent(this, \"ionWillClose\", 7);\n this.ionDidOpen = createEvent(this, \"ionDidOpen\", 7);\n this.ionDidClose = createEvent(this, \"ionDidClose\", 7);\n this.ionMenuChange = createEvent(this, \"ionMenuChange\", 7);\n this.lastOnEnd = 0;\n this.blocker = GESTURE_CONTROLLER.createBlocker({\n disableScroll: true\n });\n this.didLoad = false;\n /**\n * Flag used to determine if an open/close\n * operation was cancelled. For example, if\n * an app calls \"menu.open\" then disables the menu\n * part way through the animation, then this would\n * be considered a cancelled operation.\n */\n this.operationCancelled = false;\n this.isAnimating = false;\n this._isOpen = false;\n this.inheritedAttributes = {};\n this.handleFocus = ev => {\n /**\n * Overlays have their own focus trapping listener\n * so we do not want the two listeners to conflict\n * with each other. If the top-most overlay that is\n * open does not contain this ion-menu, then ion-menu's\n * focus trapping should not run.\n */\n const lastOverlay = getPresentedOverlay(document);\n if (lastOverlay && !lastOverlay.contains(this.el)) {\n return;\n }\n this.trapKeyboardFocus(ev, document);\n };\n this.isPaneVisible = false;\n this.isEndSide = false;\n this.contentId = undefined;\n this.menuId = undefined;\n this.type = undefined;\n this.disabled = false;\n this.side = 'start';\n this.swipeGesture = true;\n this.maxEdgeStart = 50;\n }\n typeChanged(type, oldType) {\n const contentEl = this.contentEl;\n if (contentEl) {\n if (oldType !== undefined) {\n contentEl.classList.remove(`menu-content-${oldType}`);\n }\n contentEl.classList.add(`menu-content-${type}`);\n contentEl.removeAttribute('style');\n }\n if (this.menuInnerEl) {\n // Remove effects of previous animations\n this.menuInnerEl.removeAttribute('style');\n }\n this.animation = undefined;\n }\n disabledChanged() {\n this.updateState();\n this.ionMenuChange.emit({\n disabled: this.disabled,\n open: this._isOpen\n });\n }\n sideChanged() {\n this.isEndSide = isEndSide(this.side);\n /**\n * Menu direction animation is calculated based on the document direction.\n * If the document direction changes, we need to create a new animation.\n */\n this.animation = undefined;\n }\n swipeGestureChanged() {\n this.updateState();\n }\n connectedCallback() {\n var _this = this;\n return _asyncToGenerator(function* () {\n // TODO: connectedCallback is fired in CE build\n // before WC is defined. This needs to be fixed in Stencil.\n if (typeof customElements !== 'undefined' && customElements != null) {\n yield customElements.whenDefined('ion-menu');\n }\n if (_this.type === undefined) {\n _this.type = config.get('menuType', 'overlay');\n }\n if (!Build.isBrowser) {\n return;\n }\n const content = _this.contentId !== undefined ? document.getElementById(_this.contentId) : null;\n if (content === null) {\n console.error('Menu: must have a \"content\" element to listen for drag events on.');\n return;\n }\n if (_this.el.contains(content)) {\n console.error(`Menu: \"contentId\" should refer to the main view's ion-content, not the ion-content inside of the ion-menu.`);\n }\n _this.contentEl = content;\n // add menu's content classes\n content.classList.add('menu-content');\n _this.typeChanged(_this.type, undefined);\n _this.sideChanged();\n // register this menu with the app's menu controller\n menuController._register(_this);\n _this.menuChanged();\n _this.gesture = (yield import('./index3.js')).createGesture({\n el: document,\n gestureName: 'menu-swipe',\n gesturePriority: 30,\n threshold: 10,\n blurOnStart: true,\n canStart: ev => _this.canStart(ev),\n onWillStart: () => _this.onWillStart(),\n onStart: () => _this.onStart(),\n onMove: ev => _this.onMove(ev),\n onEnd: ev => _this.onEnd(ev)\n });\n _this.updateState();\n })();\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAriaAttributes(this.el);\n }\n componentDidLoad() {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n _this2.didLoad = true;\n /**\n * A menu inside of a split pane is assumed\n * to be a side pane.\n *\n * When the menu is loaded it needs to\n * see if it should be considered visible inside\n * of the split pane. If the split pane is\n * hidden then the menu should be too.\n */\n const splitPane = _this2.el.closest('ion-split-pane');\n if (splitPane !== null) {\n _this2.isPaneVisible = yield splitPane.isVisible();\n }\n _this2.menuChanged();\n _this2.updateState();\n })();\n }\n menuChanged() {\n /**\n * Inform dependent components such as ion-menu-button\n * that the menu is ready. Note that we only want to do this\n * once the menu has been rendered which is why we check for didLoad.\n */\n if (this.didLoad) {\n this.ionMenuChange.emit({\n disabled: this.disabled,\n open: this._isOpen\n });\n }\n }\n disconnectedCallback() {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n /**\n * The menu should be closed when it is\n * unmounted from the DOM.\n * This is an async call, so we need to wait for\n * this to finish otherwise contentEl\n * will not have MENU_CONTENT_OPEN removed.\n */\n yield _this3.close(false);\n _this3.blocker.destroy();\n menuController._unregister(_this3);\n if (_this3.animation) {\n _this3.animation.destroy();\n }\n if (_this3.gesture) {\n _this3.gesture.destroy();\n _this3.gesture = undefined;\n }\n _this3.animation = undefined;\n _this3.contentEl = undefined;\n })();\n }\n onSplitPaneChanged(ev) {\n const closestSplitPane = this.el.closest('ion-split-pane');\n if (closestSplitPane !== null && closestSplitPane === ev.target) {\n this.isPaneVisible = ev.detail.visible;\n this.updateState();\n }\n }\n onBackdropClick(ev) {\n // TODO(FW-2832): type (CustomEvent triggers errors which should be sorted)\n if (this._isOpen && this.lastOnEnd < ev.timeStamp - 100) {\n const shouldClose = ev.composedPath ? !ev.composedPath().includes(this.menuInnerEl) : false;\n if (shouldClose) {\n ev.preventDefault();\n ev.stopPropagation();\n this.close(undefined, BACKDROP);\n }\n }\n }\n onKeydown(ev) {\n if (ev.key === 'Escape') {\n this.close(undefined, BACKDROP);\n }\n }\n /**\n * Returns `true` is the menu is open.\n */\n isOpen() {\n return Promise.resolve(this._isOpen);\n }\n /**\n * Returns `true` is the menu is active.\n *\n * A menu is active when it can be opened or closed, meaning it's enabled\n * and it's not part of a `ion-split-pane`.\n */\n isActive() {\n return Promise.resolve(this._isActive());\n }\n /**\n * Opens the menu. If the menu is already open or it can't be opened,\n * it returns `false`.\n */\n open(animated = true) {\n return this.setOpen(true, animated);\n }\n /**\n * Closes the menu. If the menu is already closed or it can't be closed,\n * it returns `false`.\n */\n close(animated = true, role) {\n return this.setOpen(false, animated, role);\n }\n /**\n * Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.\n * If the operation can't be completed successfully, it returns `false`.\n */\n toggle(animated = true) {\n return this.setOpen(!this._isOpen, animated);\n }\n /**\n * Opens or closes the button.\n * If the operation can't be completed successfully, it returns `false`.\n */\n setOpen(shouldOpen, animated = true, role) {\n return menuController._setOpen(this, shouldOpen, animated, role);\n }\n trapKeyboardFocus(ev, doc) {\n const target = ev.target;\n if (!target) {\n return;\n }\n /**\n * If the target is inside the menu contents, let the browser\n * focus as normal and keep a log of the last focused element.\n */\n if (this.el.contains(target)) {\n this.lastFocus = target;\n } else {\n /**\n * Otherwise, we are about to have focus go out of the menu.\n * Wrap the focus to either the first or last element.\n */\n const {\n el\n } = this;\n /**\n * Once we call `focusFirstDescendant`, another focus event\n * will fire, which will cause `lastFocus` to be updated\n * before we can run the code after that. We cache the value\n * here to avoid that.\n */\n focusFirstDescendant(el);\n /**\n * If the cached last focused element is the same as the now-\n * active element, that means the user was on the first element\n * already and pressed Shift + Tab, so we need to wrap to the\n * last descendant.\n */\n if (this.lastFocus === doc.activeElement) {\n focusLastDescendant(el);\n }\n }\n }\n _setOpen(shouldOpen, animated = true, role) {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n // If the menu is disabled or it is currently being animated, let's do nothing\n if (!_this4._isActive() || _this4.isAnimating || shouldOpen === _this4._isOpen) {\n return false;\n }\n _this4.beforeAnimation(shouldOpen, role);\n yield _this4.loadAnimation();\n yield _this4.startAnimation(shouldOpen, animated);\n /**\n * If the animation was cancelled then\n * return false because the operation\n * did not succeed.\n */\n if (_this4.operationCancelled) {\n _this4.operationCancelled = false;\n return false;\n }\n _this4.afterAnimation(shouldOpen, role);\n return true;\n })();\n }\n loadAnimation() {\n var _this5 = this;\n return _asyncToGenerator(function* () {\n // Menu swipe animation takes the menu's inner width as parameter,\n // If `offsetWidth` changes, we need to create a new animation.\n const width = _this5.menuInnerEl.offsetWidth;\n /**\n * Menu direction animation is calculated based on the document direction.\n * If the document direction changes, we need to create a new animation.\n */\n const isEndSide$1 = isEndSide(_this5.side);\n if (width === _this5.width && _this5.animation !== undefined && isEndSide$1 === _this5.isEndSide) {\n return;\n }\n _this5.width = width;\n _this5.isEndSide = isEndSide$1;\n // Destroy existing animation\n if (_this5.animation) {\n _this5.animation.destroy();\n _this5.animation = undefined;\n }\n // Create new animation\n const animation = _this5.animation = yield menuController._createAnimation(_this5.type, _this5);\n if (!config.getBoolean('animated', true)) {\n animation.duration(0);\n }\n animation.fill('both');\n })();\n }\n startAnimation(shouldOpen, animated) {\n var _this6 = this;\n return _asyncToGenerator(function* () {\n const isReversed = !shouldOpen;\n const mode = getIonMode(_this6);\n const easing = mode === 'ios' ? iosEasing : mdEasing;\n const easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;\n const ani = _this6.animation.direction(isReversed ? 'reverse' : 'normal').easing(isReversed ? easingReverse : easing);\n if (animated) {\n yield ani.play();\n } else {\n ani.play({\n sync: true\n });\n }\n /**\n * We run this after the play invocation\n * instead of using ani.onFinish so that\n * multiple onFinish callbacks do not get\n * run if an animation is played, stopped,\n * and then played again.\n */\n if (ani.getDirection() === 'reverse') {\n ani.direction('normal');\n }\n })();\n }\n _isActive() {\n return !this.disabled && !this.isPaneVisible;\n }\n canSwipe() {\n return this.swipeGesture && !this.isAnimating && this._isActive();\n }\n canStart(detail) {\n // Do not allow swipe gesture if a modal is open\n const isModalPresented = !!document.querySelector('ion-modal.show-modal');\n if (isModalPresented || !this.canSwipe()) {\n return false;\n }\n if (this._isOpen) {\n return true;\n } else if (menuController._getOpenSync()) {\n return false;\n }\n return checkEdgeSide(window, detail.currentX, this.isEndSide, this.maxEdgeStart);\n }\n onWillStart() {\n this.beforeAnimation(!this._isOpen, GESTURE);\n return this.loadAnimation();\n }\n onStart() {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n // the cloned animation should not use an easing curve during seek\n this.animation.progressStart(true, this._isOpen ? 1 : 0);\n }\n onMove(detail) {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n const delta = computeDelta(detail.deltaX, this._isOpen, this.isEndSide);\n const stepValue = delta / this.width;\n this.animation.progressStep(this._isOpen ? 1 - stepValue : stepValue);\n }\n onEnd(detail) {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n const isOpen = this._isOpen;\n const isEndSide = this.isEndSide;\n const delta = computeDelta(detail.deltaX, isOpen, isEndSide);\n const width = this.width;\n const stepValue = delta / width;\n const velocity = detail.velocityX;\n const z = width / 2.0;\n const shouldCompleteRight = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);\n const shouldCompleteLeft = velocity <= 0 && (velocity < -0.2 || detail.deltaX < -z);\n const shouldComplete = isOpen ? isEndSide ? shouldCompleteRight : shouldCompleteLeft : isEndSide ? shouldCompleteLeft : shouldCompleteRight;\n let shouldOpen = !isOpen && shouldComplete;\n if (isOpen && !shouldComplete) {\n shouldOpen = true;\n }\n this.lastOnEnd = detail.currentTime;\n // Account for rounding errors in JS\n let newStepValue = shouldComplete ? 0.001 : -0.001;\n /**\n * stepValue can sometimes return a negative\n * value, but you can't have a negative time value\n * for the cubic bezier curve (at least with web animations)\n */\n const adjustedStepValue = stepValue < 0 ? 0.01 : stepValue;\n /**\n * Animation will be reversed here, so need to\n * reverse the easing curve as well\n *\n * Additionally, we need to account for the time relative\n * to the new easing curve, as `stepValue` is going to be given\n * in terms of a linear curve.\n */\n newStepValue += getTimeGivenProgression([0, 0], [0.4, 0], [0.6, 1], [1, 1], clamp(0, adjustedStepValue, 0.9999))[0] || 0;\n const playTo = this._isOpen ? !shouldComplete : shouldComplete;\n this.animation.easing('cubic-bezier(0.4, 0.0, 0.6, 1)').onFinish(() => this.afterAnimation(shouldOpen, GESTURE), {\n oneTimeCallback: true\n }).progressEnd(playTo ? 1 : 0, this._isOpen ? 1 - newStepValue : newStepValue, 300);\n }\n beforeAnimation(shouldOpen, role) {\n assert(!this.isAnimating, '_before() should not be called while animating');\n // this places the menu into the correct location before it animates in\n // this css class doesn't actually kick off any animations\n this.el.classList.add(SHOW_MENU);\n /**\n * We add a tabindex here so that focus trapping\n * still works even if the menu does not have\n * any focusable elements slotted inside. The\n * focus trapping utility will fallback to focusing\n * the menu so focus does not leave when the menu\n * is open.\n */\n this.el.setAttribute('tabindex', '0');\n if (this.backdropEl) {\n this.backdropEl.classList.add(SHOW_BACKDROP);\n }\n // add css class and hide content behind menu from screen readers\n if (this.contentEl) {\n this.contentEl.classList.add(MENU_CONTENT_OPEN);\n /**\n * When the menu is open and overlaying the main\n * content, the main content should not be announced\n * by the screenreader as the menu is the main\n * focus. This is useful with screenreaders that have\n * \"read from top\" gestures that read the entire\n * page from top to bottom when activated.\n * This should be done before the animation starts\n * so that users cannot accidentally scroll\n * the content while dragging a menu open.\n */\n this.contentEl.setAttribute('aria-hidden', 'true');\n }\n this.blocker.block();\n this.isAnimating = true;\n if (shouldOpen) {\n this.ionWillOpen.emit();\n } else {\n this.ionWillClose.emit({\n role\n });\n }\n }\n afterAnimation(isOpen, role) {\n var _a;\n // keep opening/closing the menu disabled for a touch more yet\n // only add listeners/css if it's enabled and isOpen\n // and only remove listeners/css if it's not open\n // emit opened/closed events\n this._isOpen = isOpen;\n this.isAnimating = false;\n if (!this._isOpen) {\n this.blocker.unblock();\n }\n if (isOpen) {\n // emit open event\n this.ionDidOpen.emit();\n /**\n * Move focus to the menu to prepare focus trapping, as long as\n * it isn't already focused. Use the host element instead of the\n * first descendant to avoid the scroll position jumping around.\n */\n const focusedMenu = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest('ion-menu');\n if (focusedMenu !== this.el) {\n this.el.focus();\n }\n // start focus trapping\n document.addEventListener('focus', this.handleFocus, true);\n } else {\n // remove css classes and unhide content from screen readers\n this.el.classList.remove(SHOW_MENU);\n /**\n * Remove tabindex from the menu component\n * so that is cannot be tabbed to.\n */\n this.el.removeAttribute('tabindex');\n if (this.contentEl) {\n this.contentEl.classList.remove(MENU_CONTENT_OPEN);\n /**\n * Remove aria-hidden so screen readers\n * can announce the main content again\n * now that the menu is not the main focus.\n */\n this.contentEl.removeAttribute('aria-hidden');\n }\n if (this.backdropEl) {\n this.backdropEl.classList.remove(SHOW_BACKDROP);\n }\n if (this.animation) {\n this.animation.stop();\n }\n // emit close event\n this.ionDidClose.emit({\n role\n });\n // undo focus trapping so multiple menus don't collide\n document.removeEventListener('focus', this.handleFocus, true);\n }\n }\n updateState() {\n const isActive = this._isActive();\n if (this.gesture) {\n this.gesture.enable(isActive && this.swipeGesture);\n }\n /**\n * If the menu is disabled but it is still open\n * then we should close the menu immediately.\n * Additionally, if the menu is in the process\n * of animating {open, close} and the menu is disabled\n * then it should still be closed immediately.\n */\n if (!isActive) {\n /**\n * It is possible to disable the menu while\n * it is mid-animation. When this happens, we\n * need to set the operationCancelled flag\n * so that this._setOpen knows to return false\n * and not run the \"afterAnimation\" callback.\n */\n if (this.isAnimating) {\n this.operationCancelled = true;\n }\n /**\n * If the menu is disabled then we should\n * forcibly close the menu even if it is open.\n */\n this.afterAnimation(false, GESTURE);\n }\n }\n render() {\n const {\n type,\n disabled,\n el,\n isPaneVisible,\n inheritedAttributes,\n side\n } = this;\n const mode = getIonMode(this);\n /**\n * If the Close Watcher is enabled then\n * the ionBackButton listener in the menu controller\n * will handle closing the menu when Escape is pressed.\n */\n return h(Host, {\n key: '5aaea91873d0885b97304372223b2a6ed16ca28b',\n onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown,\n role: \"navigation\",\n \"aria-label\": inheritedAttributes['aria-label'] || 'menu',\n class: {\n [mode]: true,\n [`menu-type-${type}`]: true,\n 'menu-enabled': !disabled,\n [`menu-side-${side}`]: true,\n 'menu-pane-visible': isPaneVisible,\n 'split-pane-side': hostContext('ion-split-pane', el)\n }\n }, h(\"div\", {\n key: '3ba822411ad11eff52c518fecf1b2a5b47e0b678',\n class: \"menu-inner\",\n part: \"container\",\n ref: el => this.menuInnerEl = el\n }, h(\"slot\", {\n key: 'd28a78e98493b21d43ea8b19e96b21547adf1916'\n })), h(\"ion-backdrop\", {\n key: '0468c15d111737f5cb646918dcfacedadf907a8f',\n ref: el => this.backdropEl = el,\n class: \"menu-backdrop\",\n tappable: false,\n stopPropagation: false,\n part: \"backdrop\"\n }));\n }\n get el() {\n return this;\n }\n static get watchers() {\n return {\n \"type\": [\"typeChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"side\": [\"sideChanged\"],\n \"swipeGesture\": [\"swipeGestureChanged\"]\n };\n }\n static get style() {\n return {\n ios: IonMenuIosStyle0,\n md: IonMenuMdStyle0\n };\n }\n}, [33, \"ion-menu\", {\n \"contentId\": [513, \"content-id\"],\n \"menuId\": [513, \"menu-id\"],\n \"type\": [1025],\n \"disabled\": [1028],\n \"side\": [513],\n \"swipeGesture\": [4, \"swipe-gesture\"],\n \"maxEdgeStart\": [2, \"max-edge-start\"],\n \"isPaneVisible\": [32],\n \"isEndSide\": [32],\n \"isOpen\": [64],\n \"isActive\": [64],\n \"open\": [64],\n \"close\": [64],\n \"toggle\": [64],\n \"setOpen\": [64]\n}, [[16, \"ionSplitPaneVisible\", \"onSplitPaneChanged\"], [2, \"click\", \"onBackdropClick\"]], {\n \"type\": [\"typeChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"side\": [\"sideChanged\"],\n \"swipeGesture\": [\"swipeGestureChanged\"]\n}]);\nconst computeDelta = (deltaX, isOpen, isEndSide) => {\n return Math.max(0, isOpen !== isEndSide ? -deltaX : deltaX);\n};\nconst checkEdgeSide = (win, posX, isEndSide, maxEdgeStart) => {\n if (isEndSide) {\n return posX >= win.innerWidth - maxEdgeStart;\n } else {\n return posX <= maxEdgeStart;\n }\n};\nconst SHOW_MENU = 'show-menu';\nconst SHOW_BACKDROP = 'show-backdrop';\nconst MENU_CONTENT_OPEN = 'menu-content-open';\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-menu\", \"ion-backdrop\"];\n components.forEach(tagName => {\n switch (tagName) {\n case \"ion-menu\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Menu);\n }\n break;\n case \"ion-backdrop\":\n if (!customElements.get(tagName)) {\n defineCustomElement$2();\n }\n break;\n }\n });\n}\nconst IonMenu = Menu;\nconst defineCustomElement = defineCustomElement$1;\nexport { IonMenu, defineCustomElement };","map":{"version":3,"names":["proxyCustomElement","HTMLElement","createEvent","Build","h","Host","g","getTimeGivenProgression","o","getPresentedOverlay","B","BACKDROP","n","focusFirstDescendant","q","focusLastDescendant","G","GESTURE","GESTURE_CONTROLLER","shouldUseCloseWatcher","m","isEndSide","i","inheritAriaAttributes","assert","k","clamp","menuController","hostContext","c","config","b","getIonMode","d","defineCustomElement$2","menuIosCss","IonMenuIosStyle0","menuMdCss","IonMenuMdStyle0","iosEasing","mdEasing","iosEasingReverse","mdEasingReverse","Menu","constructor","__registerHost","__attachShadow","ionWillOpen","ionWillClose","ionDidOpen","ionDidClose","ionMenuChange","lastOnEnd","blocker","createBlocker","disableScroll","didLoad","operationCancelled","isAnimating","_isOpen","inheritedAttributes","handleFocus","ev","lastOverlay","document","contains","el","trapKeyboardFocus","isPaneVisible","contentId","undefined","menuId","type","disabled","side","swipeGesture","maxEdgeStart","typeChanged","oldType","contentEl","classList","remove","add","removeAttribute","menuInnerEl","animation","disabledChanged","updateState","emit","open","sideChanged","swipeGestureChanged","connectedCallback","_this","_asyncToGenerator","customElements","whenDefined","get","isBrowser","content","getElementById","console","error","_register","menuChanged","gesture","createGesture","gestureName","gesturePriority","threshold","blurOnStart","canStart","onWillStart","onStart","onMove","onEnd","componentWillLoad","componentDidLoad","_this2","splitPane","closest","isVisible","disconnectedCallback","_this3","close","destroy","_unregister","onSplitPaneChanged","closestSplitPane","target","detail","visible","onBackdropClick","timeStamp","shouldClose","composedPath","includes","preventDefault","stopPropagation","onKeydown","key","isOpen","Promise","resolve","isActive","_isActive","animated","setOpen","role","toggle","shouldOpen","_setOpen","doc","lastFocus","activeElement","_this4","beforeAnimation","loadAnimation","startAnimation","afterAnimation","_this5","width","offsetWidth","isEndSide$1","_createAnimation","getBoolean","duration","fill","_this6","isReversed","mode","easing","easingReverse","ani","direction","play","sync","getDirection","canSwipe","isModalPresented","querySelector","_getOpenSync","checkEdgeSide","window","currentX","progressStart","delta","computeDelta","deltaX","stepValue","progressStep","velocity","velocityX","z","shouldCompleteRight","shouldCompleteLeft","shouldComplete","currentTime","newStepValue","adjustedStepValue","playTo","onFinish","oneTimeCallback","progressEnd","SHOW_MENU","setAttribute","backdropEl","SHOW_BACKDROP","MENU_CONTENT_OPEN","block","_a","unblock","focusedMenu","focus","addEventListener","stop","removeEventListener","enable","render","onKeyDown","class","part","ref","tappable","watchers","style","ios","md","Math","max","win","posX","innerWidth","defineCustomElement$1","components","forEach","tagName","define","IonMenu","defineCustomElement"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@ionic/core/components/ion-menu.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, createEvent, Build, h, Host } from '@stencil/core/internal/client';\nimport { g as getTimeGivenProgression } from './cubic-bezier.js';\nimport { o as getPresentedOverlay, B as BACKDROP, n as focusFirstDescendant, q as focusLastDescendant, G as GESTURE } from './overlays.js';\nimport { G as GESTURE_CONTROLLER } from './gesture-controller.js';\nimport { shouldUseCloseWatcher } from './hardware-back-button.js';\nimport { m as isEndSide, i as inheritAriaAttributes, n as assert, k as clamp } from './helpers.js';\nimport { m as menuController } from './index4.js';\nimport { h as hostContext } from './theme.js';\nimport { c as config, b as getIonMode } from './ionic-global.js';\nimport { d as defineCustomElement$2 } from './backdrop.js';\n\nconst menuIosCss = \":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){-ms-flex:0 1 auto;flex:0 1 auto;width:var(--side-width, var(--width));min-width:var(--side-min-width, var(--min-width));max-width:var(--side-max-width, var(--max-width))}:host(.menu-pane-visible.split-pane-side){left:0;right:0;top:0;bottom:0;position:relative;-webkit-box-shadow:none;box-shadow:none;z-index:0}:host(.menu-pane-visible.split-pane-side.menu-enabled){display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}:host(.menu-pane-visible.split-pane-side){-ms-flex-order:-1;order:-1}:host(.menu-pane-visible.split-pane-side[side=end]){-ms-flex-order:1;order:1}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-pane-visible.split-pane-side){-webkit-border-start:0;border-inline-start:0;-webkit-border-end:var(--border);border-inline-end:var(--border);border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-pane-visible.split-pane-side[side=end]){-webkit-border-start:var(--border);border-inline-start:var(--border);-webkit-border-end:0;border-inline-end:0;border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-type-push){z-index:1000}:host(.menu-type-push) .show-backdrop{display:block}\";\nconst IonMenuIosStyle0 = menuIosCss;\n\nconst menuMdCss = \":host{--width:304px;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--background:var(--ion-background-color, #fff);left:0;right:0;top:0;bottom:0;display:none;position:absolute;contain:strict}:host(.show-menu){display:block}.menu-inner{-webkit-transform:translateX(-9999px);transform:translateX(-9999px);display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);contain:strict}:host(.menu-side-start) .menu-inner{--ion-safe-area-right:0px;top:0;bottom:0}:host(.menu-side-start) .menu-inner{inset-inline-start:0;inset-inline-end:auto}:host-context([dir=rtl]):host(.menu-side-start) .menu-inner,:host-context([dir=rtl]).menu-side-start .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}@supports selector(:dir(rtl)){:host(.menu-side-start:dir(rtl)) .menu-inner{--ion-safe-area-right:unset;--ion-safe-area-left:0px}}:host(.menu-side-end) .menu-inner{--ion-safe-area-left:0px;top:0;bottom:0}:host(.menu-side-end) .menu-inner{inset-inline-start:auto;inset-inline-end:0}:host-context([dir=rtl]):host(.menu-side-end) .menu-inner,:host-context([dir=rtl]).menu-side-end .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}@supports selector(:dir(rtl)){:host(.menu-side-end:dir(rtl)) .menu-inner{--ion-safe-area-left:unset;--ion-safe-area-right:0px}}ion-backdrop{display:none;opacity:0.01;z-index:-1}@media (max-width: 340px){.menu-inner{--width:264px}}:host(.menu-type-reveal){z-index:0}:host(.menu-type-reveal.show-menu) .menu-inner{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}:host(.menu-type-overlay){z-index:1000}:host(.menu-type-overlay) .show-backdrop{display:block;cursor:pointer}:host(.menu-pane-visible){-ms-flex:0 1 auto;flex:0 1 auto;width:var(--side-width, var(--width));min-width:var(--side-min-width, var(--min-width));max-width:var(--side-max-width, var(--max-width))}:host(.menu-pane-visible.split-pane-side){left:0;right:0;top:0;bottom:0;position:relative;-webkit-box-shadow:none;box-shadow:none;z-index:0}:host(.menu-pane-visible.split-pane-side.menu-enabled){display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0}:host(.menu-pane-visible.split-pane-side){-ms-flex-order:-1;order:-1}:host(.menu-pane-visible.split-pane-side[side=end]){-ms-flex-order:1;order:1}:host(.menu-pane-visible) .menu-inner{left:0;right:0;width:auto;-webkit-transform:none;transform:none;-webkit-box-shadow:none;box-shadow:none}:host(.menu-pane-visible) ion-backdrop{display:hidden !important}:host(.menu-pane-visible.split-pane-side){-webkit-border-start:0;border-inline-start:0;-webkit-border-end:var(--border);border-inline-end:var(--border);border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-pane-visible.split-pane-side[side=end]){-webkit-border-start:var(--border);border-inline-start:var(--border);-webkit-border-end:0;border-inline-end:0;border-top:0;border-bottom:0;min-width:var(--side-min-width);max-width:var(--side-max-width)}:host(.menu-type-overlay) .menu-inner{-webkit-box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18);box-shadow:4px 0px 16px rgba(0, 0, 0, 0.18)}\";\nconst IonMenuMdStyle0 = menuMdCss;\n\nconst iosEasing = 'cubic-bezier(0.32,0.72,0,1)';\nconst mdEasing = 'cubic-bezier(0.0,0.0,0.2,1)';\nconst iosEasingReverse = 'cubic-bezier(1, 0, 0.68, 0.28)';\nconst mdEasingReverse = 'cubic-bezier(0.4, 0, 0.6, 1)';\nconst Menu = /*@__PURE__*/ proxyCustomElement(class Menu extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.ionWillOpen = createEvent(this, \"ionWillOpen\", 7);\n this.ionWillClose = createEvent(this, \"ionWillClose\", 7);\n this.ionDidOpen = createEvent(this, \"ionDidOpen\", 7);\n this.ionDidClose = createEvent(this, \"ionDidClose\", 7);\n this.ionMenuChange = createEvent(this, \"ionMenuChange\", 7);\n this.lastOnEnd = 0;\n this.blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });\n this.didLoad = false;\n /**\n * Flag used to determine if an open/close\n * operation was cancelled. For example, if\n * an app calls \"menu.open\" then disables the menu\n * part way through the animation, then this would\n * be considered a cancelled operation.\n */\n this.operationCancelled = false;\n this.isAnimating = false;\n this._isOpen = false;\n this.inheritedAttributes = {};\n this.handleFocus = (ev) => {\n /**\n * Overlays have their own focus trapping listener\n * so we do not want the two listeners to conflict\n * with each other. If the top-most overlay that is\n * open does not contain this ion-menu, then ion-menu's\n * focus trapping should not run.\n */\n const lastOverlay = getPresentedOverlay(document);\n if (lastOverlay && !lastOverlay.contains(this.el)) {\n return;\n }\n this.trapKeyboardFocus(ev, document);\n };\n this.isPaneVisible = false;\n this.isEndSide = false;\n this.contentId = undefined;\n this.menuId = undefined;\n this.type = undefined;\n this.disabled = false;\n this.side = 'start';\n this.swipeGesture = true;\n this.maxEdgeStart = 50;\n }\n typeChanged(type, oldType) {\n const contentEl = this.contentEl;\n if (contentEl) {\n if (oldType !== undefined) {\n contentEl.classList.remove(`menu-content-${oldType}`);\n }\n contentEl.classList.add(`menu-content-${type}`);\n contentEl.removeAttribute('style');\n }\n if (this.menuInnerEl) {\n // Remove effects of previous animations\n this.menuInnerEl.removeAttribute('style');\n }\n this.animation = undefined;\n }\n disabledChanged() {\n this.updateState();\n this.ionMenuChange.emit({\n disabled: this.disabled,\n open: this._isOpen,\n });\n }\n sideChanged() {\n this.isEndSide = isEndSide(this.side);\n /**\n * Menu direction animation is calculated based on the document direction.\n * If the document direction changes, we need to create a new animation.\n */\n this.animation = undefined;\n }\n swipeGestureChanged() {\n this.updateState();\n }\n async connectedCallback() {\n // TODO: connectedCallback is fired in CE build\n // before WC is defined. This needs to be fixed in Stencil.\n if (typeof customElements !== 'undefined' && customElements != null) {\n await customElements.whenDefined('ion-menu');\n }\n if (this.type === undefined) {\n this.type = config.get('menuType', 'overlay');\n }\n if (!Build.isBrowser) {\n return;\n }\n const content = this.contentId !== undefined ? document.getElementById(this.contentId) : null;\n if (content === null) {\n console.error('Menu: must have a \"content\" element to listen for drag events on.');\n return;\n }\n if (this.el.contains(content)) {\n console.error(`Menu: \"contentId\" should refer to the main view's ion-content, not the ion-content inside of the ion-menu.`);\n }\n this.contentEl = content;\n // add menu's content classes\n content.classList.add('menu-content');\n this.typeChanged(this.type, undefined);\n this.sideChanged();\n // register this menu with the app's menu controller\n menuController._register(this);\n this.menuChanged();\n this.gesture = (await import('./index3.js')).createGesture({\n el: document,\n gestureName: 'menu-swipe',\n gesturePriority: 30,\n threshold: 10,\n blurOnStart: true,\n canStart: (ev) => this.canStart(ev),\n onWillStart: () => this.onWillStart(),\n onStart: () => this.onStart(),\n onMove: (ev) => this.onMove(ev),\n onEnd: (ev) => this.onEnd(ev),\n });\n this.updateState();\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAriaAttributes(this.el);\n }\n async componentDidLoad() {\n this.didLoad = true;\n /**\n * A menu inside of a split pane is assumed\n * to be a side pane.\n *\n * When the menu is loaded it needs to\n * see if it should be considered visible inside\n * of the split pane. If the split pane is\n * hidden then the menu should be too.\n */\n const splitPane = this.el.closest('ion-split-pane');\n if (splitPane !== null) {\n this.isPaneVisible = await splitPane.isVisible();\n }\n this.menuChanged();\n this.updateState();\n }\n menuChanged() {\n /**\n * Inform dependent components such as ion-menu-button\n * that the menu is ready. Note that we only want to do this\n * once the menu has been rendered which is why we check for didLoad.\n */\n if (this.didLoad) {\n this.ionMenuChange.emit({ disabled: this.disabled, open: this._isOpen });\n }\n }\n async disconnectedCallback() {\n /**\n * The menu should be closed when it is\n * unmounted from the DOM.\n * This is an async call, so we need to wait for\n * this to finish otherwise contentEl\n * will not have MENU_CONTENT_OPEN removed.\n */\n await this.close(false);\n this.blocker.destroy();\n menuController._unregister(this);\n if (this.animation) {\n this.animation.destroy();\n }\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n this.animation = undefined;\n this.contentEl = undefined;\n }\n onSplitPaneChanged(ev) {\n const closestSplitPane = this.el.closest('ion-split-pane');\n if (closestSplitPane !== null && closestSplitPane === ev.target) {\n this.isPaneVisible = ev.detail.visible;\n this.updateState();\n }\n }\n onBackdropClick(ev) {\n // TODO(FW-2832): type (CustomEvent triggers errors which should be sorted)\n if (this._isOpen && this.lastOnEnd < ev.timeStamp - 100) {\n const shouldClose = ev.composedPath ? !ev.composedPath().includes(this.menuInnerEl) : false;\n if (shouldClose) {\n ev.preventDefault();\n ev.stopPropagation();\n this.close(undefined, BACKDROP);\n }\n }\n }\n onKeydown(ev) {\n if (ev.key === 'Escape') {\n this.close(undefined, BACKDROP);\n }\n }\n /**\n * Returns `true` is the menu is open.\n */\n isOpen() {\n return Promise.resolve(this._isOpen);\n }\n /**\n * Returns `true` is the menu is active.\n *\n * A menu is active when it can be opened or closed, meaning it's enabled\n * and it's not part of a `ion-split-pane`.\n */\n isActive() {\n return Promise.resolve(this._isActive());\n }\n /**\n * Opens the menu. If the menu is already open or it can't be opened,\n * it returns `false`.\n */\n open(animated = true) {\n return this.setOpen(true, animated);\n }\n /**\n * Closes the menu. If the menu is already closed or it can't be closed,\n * it returns `false`.\n */\n close(animated = true, role) {\n return this.setOpen(false, animated, role);\n }\n /**\n * Toggles the menu. If the menu is already open, it will try to close, otherwise it will try to open it.\n * If the operation can't be completed successfully, it returns `false`.\n */\n toggle(animated = true) {\n return this.setOpen(!this._isOpen, animated);\n }\n /**\n * Opens or closes the button.\n * If the operation can't be completed successfully, it returns `false`.\n */\n setOpen(shouldOpen, animated = true, role) {\n return menuController._setOpen(this, shouldOpen, animated, role);\n }\n trapKeyboardFocus(ev, doc) {\n const target = ev.target;\n if (!target) {\n return;\n }\n /**\n * If the target is inside the menu contents, let the browser\n * focus as normal and keep a log of the last focused element.\n */\n if (this.el.contains(target)) {\n this.lastFocus = target;\n }\n else {\n /**\n * Otherwise, we are about to have focus go out of the menu.\n * Wrap the focus to either the first or last element.\n */\n const { el } = this;\n /**\n * Once we call `focusFirstDescendant`, another focus event\n * will fire, which will cause `lastFocus` to be updated\n * before we can run the code after that. We cache the value\n * here to avoid that.\n */\n focusFirstDescendant(el);\n /**\n * If the cached last focused element is the same as the now-\n * active element, that means the user was on the first element\n * already and pressed Shift + Tab, so we need to wrap to the\n * last descendant.\n */\n if (this.lastFocus === doc.activeElement) {\n focusLastDescendant(el);\n }\n }\n }\n async _setOpen(shouldOpen, animated = true, role) {\n // If the menu is disabled or it is currently being animated, let's do nothing\n if (!this._isActive() || this.isAnimating || shouldOpen === this._isOpen) {\n return false;\n }\n this.beforeAnimation(shouldOpen, role);\n await this.loadAnimation();\n await this.startAnimation(shouldOpen, animated);\n /**\n * If the animation was cancelled then\n * return false because the operation\n * did not succeed.\n */\n if (this.operationCancelled) {\n this.operationCancelled = false;\n return false;\n }\n this.afterAnimation(shouldOpen, role);\n return true;\n }\n async loadAnimation() {\n // Menu swipe animation takes the menu's inner width as parameter,\n // If `offsetWidth` changes, we need to create a new animation.\n const width = this.menuInnerEl.offsetWidth;\n /**\n * Menu direction animation is calculated based on the document direction.\n * If the document direction changes, we need to create a new animation.\n */\n const isEndSide$1 = isEndSide(this.side);\n if (width === this.width && this.animation !== undefined && isEndSide$1 === this.isEndSide) {\n return;\n }\n this.width = width;\n this.isEndSide = isEndSide$1;\n // Destroy existing animation\n if (this.animation) {\n this.animation.destroy();\n this.animation = undefined;\n }\n // Create new animation\n const animation = (this.animation = await menuController._createAnimation(this.type, this));\n if (!config.getBoolean('animated', true)) {\n animation.duration(0);\n }\n animation.fill('both');\n }\n async startAnimation(shouldOpen, animated) {\n const isReversed = !shouldOpen;\n const mode = getIonMode(this);\n const easing = mode === 'ios' ? iosEasing : mdEasing;\n const easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;\n const ani = this.animation\n .direction(isReversed ? 'reverse' : 'normal')\n .easing(isReversed ? easingReverse : easing);\n if (animated) {\n await ani.play();\n }\n else {\n ani.play({ sync: true });\n }\n /**\n * We run this after the play invocation\n * instead of using ani.onFinish so that\n * multiple onFinish callbacks do not get\n * run if an animation is played, stopped,\n * and then played again.\n */\n if (ani.getDirection() === 'reverse') {\n ani.direction('normal');\n }\n }\n _isActive() {\n return !this.disabled && !this.isPaneVisible;\n }\n canSwipe() {\n return this.swipeGesture && !this.isAnimating && this._isActive();\n }\n canStart(detail) {\n // Do not allow swipe gesture if a modal is open\n const isModalPresented = !!document.querySelector('ion-modal.show-modal');\n if (isModalPresented || !this.canSwipe()) {\n return false;\n }\n if (this._isOpen) {\n return true;\n }\n else if (menuController._getOpenSync()) {\n return false;\n }\n return checkEdgeSide(window, detail.currentX, this.isEndSide, this.maxEdgeStart);\n }\n onWillStart() {\n this.beforeAnimation(!this._isOpen, GESTURE);\n return this.loadAnimation();\n }\n onStart() {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n // the cloned animation should not use an easing curve during seek\n this.animation.progressStart(true, this._isOpen ? 1 : 0);\n }\n onMove(detail) {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n const delta = computeDelta(detail.deltaX, this._isOpen, this.isEndSide);\n const stepValue = delta / this.width;\n this.animation.progressStep(this._isOpen ? 1 - stepValue : stepValue);\n }\n onEnd(detail) {\n if (!this.isAnimating || !this.animation) {\n assert(false, 'isAnimating has to be true');\n return;\n }\n const isOpen = this._isOpen;\n const isEndSide = this.isEndSide;\n const delta = computeDelta(detail.deltaX, isOpen, isEndSide);\n const width = this.width;\n const stepValue = delta / width;\n const velocity = detail.velocityX;\n const z = width / 2.0;\n const shouldCompleteRight = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);\n const shouldCompleteLeft = velocity <= 0 && (velocity < -0.2 || detail.deltaX < -z);\n const shouldComplete = isOpen\n ? isEndSide\n ? shouldCompleteRight\n : shouldCompleteLeft\n : isEndSide\n ? shouldCompleteLeft\n : shouldCompleteRight;\n let shouldOpen = !isOpen && shouldComplete;\n if (isOpen && !shouldComplete) {\n shouldOpen = true;\n }\n this.lastOnEnd = detail.currentTime;\n // Account for rounding errors in JS\n let newStepValue = shouldComplete ? 0.001 : -0.001;\n /**\n * stepValue can sometimes return a negative\n * value, but you can't have a negative time value\n * for the cubic bezier curve (at least with web animations)\n */\n const adjustedStepValue = stepValue < 0 ? 0.01 : stepValue;\n /**\n * Animation will be reversed here, so need to\n * reverse the easing curve as well\n *\n * Additionally, we need to account for the time relative\n * to the new easing curve, as `stepValue` is going to be given\n * in terms of a linear curve.\n */\n newStepValue +=\n getTimeGivenProgression([0, 0], [0.4, 0], [0.6, 1], [1, 1], clamp(0, adjustedStepValue, 0.9999))[0] || 0;\n const playTo = this._isOpen ? !shouldComplete : shouldComplete;\n this.animation\n .easing('cubic-bezier(0.4, 0.0, 0.6, 1)')\n .onFinish(() => this.afterAnimation(shouldOpen, GESTURE), { oneTimeCallback: true })\n .progressEnd(playTo ? 1 : 0, this._isOpen ? 1 - newStepValue : newStepValue, 300);\n }\n beforeAnimation(shouldOpen, role) {\n assert(!this.isAnimating, '_before() should not be called while animating');\n // this places the menu into the correct location before it animates in\n // this css class doesn't actually kick off any animations\n this.el.classList.add(SHOW_MENU);\n /**\n * We add a tabindex here so that focus trapping\n * still works even if the menu does not have\n * any focusable elements slotted inside. The\n * focus trapping utility will fallback to focusing\n * the menu so focus does not leave when the menu\n * is open.\n */\n this.el.setAttribute('tabindex', '0');\n if (this.backdropEl) {\n this.backdropEl.classList.add(SHOW_BACKDROP);\n }\n // add css class and hide content behind menu from screen readers\n if (this.contentEl) {\n this.contentEl.classList.add(MENU_CONTENT_OPEN);\n /**\n * When the menu is open and overlaying the main\n * content, the main content should not be announced\n * by the screenreader as the menu is the main\n * focus. This is useful with screenreaders that have\n * \"read from top\" gestures that read the entire\n * page from top to bottom when activated.\n * This should be done before the animation starts\n * so that users cannot accidentally scroll\n * the content while dragging a menu open.\n */\n this.contentEl.setAttribute('aria-hidden', 'true');\n }\n this.blocker.block();\n this.isAnimating = true;\n if (shouldOpen) {\n this.ionWillOpen.emit();\n }\n else {\n this.ionWillClose.emit({ role });\n }\n }\n afterAnimation(isOpen, role) {\n var _a;\n // keep opening/closing the menu disabled for a touch more yet\n // only add listeners/css if it's enabled and isOpen\n // and only remove listeners/css if it's not open\n // emit opened/closed events\n this._isOpen = isOpen;\n this.isAnimating = false;\n if (!this._isOpen) {\n this.blocker.unblock();\n }\n if (isOpen) {\n // emit open event\n this.ionDidOpen.emit();\n /**\n * Move focus to the menu to prepare focus trapping, as long as\n * it isn't already focused. Use the host element instead of the\n * first descendant to avoid the scroll position jumping around.\n */\n const focusedMenu = (_a = document.activeElement) === null || _a === void 0 ? void 0 : _a.closest('ion-menu');\n if (focusedMenu !== this.el) {\n this.el.focus();\n }\n // start focus trapping\n document.addEventListener('focus', this.handleFocus, true);\n }\n else {\n // remove css classes and unhide content from screen readers\n this.el.classList.remove(SHOW_MENU);\n /**\n * Remove tabindex from the menu component\n * so that is cannot be tabbed to.\n */\n this.el.removeAttribute('tabindex');\n if (this.contentEl) {\n this.contentEl.classList.remove(MENU_CONTENT_OPEN);\n /**\n * Remove aria-hidden so screen readers\n * can announce the main content again\n * now that the menu is not the main focus.\n */\n this.contentEl.removeAttribute('aria-hidden');\n }\n if (this.backdropEl) {\n this.backdropEl.classList.remove(SHOW_BACKDROP);\n }\n if (this.animation) {\n this.animation.stop();\n }\n // emit close event\n this.ionDidClose.emit({ role });\n // undo focus trapping so multiple menus don't collide\n document.removeEventListener('focus', this.handleFocus, true);\n }\n }\n updateState() {\n const isActive = this._isActive();\n if (this.gesture) {\n this.gesture.enable(isActive && this.swipeGesture);\n }\n /**\n * If the menu is disabled but it is still open\n * then we should close the menu immediately.\n * Additionally, if the menu is in the process\n * of animating {open, close} and the menu is disabled\n * then it should still be closed immediately.\n */\n if (!isActive) {\n /**\n * It is possible to disable the menu while\n * it is mid-animation. When this happens, we\n * need to set the operationCancelled flag\n * so that this._setOpen knows to return false\n * and not run the \"afterAnimation\" callback.\n */\n if (this.isAnimating) {\n this.operationCancelled = true;\n }\n /**\n * If the menu is disabled then we should\n * forcibly close the menu even if it is open.\n */\n this.afterAnimation(false, GESTURE);\n }\n }\n render() {\n const { type, disabled, el, isPaneVisible, inheritedAttributes, side } = this;\n const mode = getIonMode(this);\n /**\n * If the Close Watcher is enabled then\n * the ionBackButton listener in the menu controller\n * will handle closing the menu when Escape is pressed.\n */\n return (h(Host, { key: '5aaea91873d0885b97304372223b2a6ed16ca28b', onKeyDown: shouldUseCloseWatcher() ? null : this.onKeydown, role: \"navigation\", \"aria-label\": inheritedAttributes['aria-label'] || 'menu', class: {\n [mode]: true,\n [`menu-type-${type}`]: true,\n 'menu-enabled': !disabled,\n [`menu-side-${side}`]: true,\n 'menu-pane-visible': isPaneVisible,\n 'split-pane-side': hostContext('ion-split-pane', el),\n } }, h(\"div\", { key: '3ba822411ad11eff52c518fecf1b2a5b47e0b678', class: \"menu-inner\", part: \"container\", ref: (el) => (this.menuInnerEl = el) }, h(\"slot\", { key: 'd28a78e98493b21d43ea8b19e96b21547adf1916' })), h(\"ion-backdrop\", { key: '0468c15d111737f5cb646918dcfacedadf907a8f', ref: (el) => (this.backdropEl = el), class: \"menu-backdrop\", tappable: false, stopPropagation: false, part: \"backdrop\" })));\n }\n get el() { return this; }\n static get watchers() { return {\n \"type\": [\"typeChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"side\": [\"sideChanged\"],\n \"swipeGesture\": [\"swipeGestureChanged\"]\n }; }\n static get style() { return {\n ios: IonMenuIosStyle0,\n md: IonMenuMdStyle0\n }; }\n}, [33, \"ion-menu\", {\n \"contentId\": [513, \"content-id\"],\n \"menuId\": [513, \"menu-id\"],\n \"type\": [1025],\n \"disabled\": [1028],\n \"side\": [513],\n \"swipeGesture\": [4, \"swipe-gesture\"],\n \"maxEdgeStart\": [2, \"max-edge-start\"],\n \"isPaneVisible\": [32],\n \"isEndSide\": [32],\n \"isOpen\": [64],\n \"isActive\": [64],\n \"open\": [64],\n \"close\": [64],\n \"toggle\": [64],\n \"setOpen\": [64]\n }, [[16, \"ionSplitPaneVisible\", \"onSplitPaneChanged\"], [2, \"click\", \"onBackdropClick\"]], {\n \"type\": [\"typeChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"side\": [\"sideChanged\"],\n \"swipeGesture\": [\"swipeGestureChanged\"]\n }]);\nconst computeDelta = (deltaX, isOpen, isEndSide) => {\n return Math.max(0, isOpen !== isEndSide ? -deltaX : deltaX);\n};\nconst checkEdgeSide = (win, posX, isEndSide, maxEdgeStart) => {\n if (isEndSide) {\n return posX >= win.innerWidth - maxEdgeStart;\n }\n else {\n return posX <= maxEdgeStart;\n }\n};\nconst SHOW_MENU = 'show-menu';\nconst SHOW_BACKDROP = 'show-backdrop';\nconst MENU_CONTENT_OPEN = 'menu-content-open';\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-menu\", \"ion-backdrop\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-menu\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Menu);\n }\n break;\n case \"ion-backdrop\":\n if (!customElements.get(tagName)) {\n defineCustomElement$2();\n }\n break;\n } });\n}\n\nconst IonMenu = Menu;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { IonMenu, defineCustomElement };\n"],"mappings":";AAAA;AACA;AACA;AACA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