mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
1 line
118 KiB
JSON
1 line
118 KiB
JSON
{"ast":null,"code":"import _asyncToGenerator from \"C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js\";\nimport { c as writeTask, r as registerInstance, e as createEvent, f as readTask, h, i as getElement, H as Host } from './index-7a8b7a1c.js';\nimport { a as isPlatform, b as getIonMode, c as config } from './ionic-global-63a97a32.js';\nimport { g as getTimeGivenProgression } from './cubic-bezier-eea9a7a9.js';\nimport { c as componentOnReady, k as clamp, g as getElementRoot, r as raf } from './helpers-1457892a.js';\nimport { d as hapticImpact } from './haptic-27b3f981.js';\nimport { c as createAnimation } from './animation-822d986b.js';\nimport { s as sanitizeDOMString } from './index-9e3fe806.js';\nimport { S as SPINNERS } from './spinner-configs-cd7845af.js';\nconst getRefresherAnimationType = contentEl => {\n const previousSibling = contentEl.previousElementSibling;\n const hasHeader = previousSibling !== null && previousSibling.tagName === 'ION-HEADER';\n return hasHeader ? 'translate' : 'scale';\n};\nconst createPullingAnimation = (type, pullingSpinner, refresherEl) => {\n return type === 'scale' ? createScaleAnimation(pullingSpinner, refresherEl) : createTranslateAnimation(pullingSpinner, refresherEl);\n};\nconst createBaseAnimation = pullingRefresherIcon => {\n const spinner = pullingRefresherIcon.querySelector('ion-spinner');\n const circle = spinner.shadowRoot.querySelector('circle');\n const spinnerArrowContainer = pullingRefresherIcon.querySelector('.spinner-arrow-container');\n const arrowContainer = pullingRefresherIcon.querySelector('.arrow-container');\n const arrow = arrowContainer ? arrowContainer.querySelector('ion-icon') : null;\n const baseAnimation = createAnimation().duration(1000).easing('ease-out');\n const spinnerArrowContainerAnimation = createAnimation().addElement(spinnerArrowContainer).keyframes([{\n offset: 0,\n opacity: '0.3'\n }, {\n offset: 0.45,\n opacity: '0.3'\n }, {\n offset: 0.55,\n opacity: '1'\n }, {\n offset: 1,\n opacity: '1'\n }]);\n const circleInnerAnimation = createAnimation().addElement(circle).keyframes([{\n offset: 0,\n strokeDasharray: '1px, 200px'\n }, {\n offset: 0.20,\n strokeDasharray: '1px, 200px'\n }, {\n offset: 0.55,\n strokeDasharray: '100px, 200px'\n }, {\n offset: 1,\n strokeDasharray: '100px, 200px'\n }]);\n const circleOuterAnimation = createAnimation().addElement(spinner).keyframes([{\n offset: 0,\n transform: 'rotate(-90deg)'\n }, {\n offset: 1,\n transform: 'rotate(210deg)'\n }]);\n /**\n * Only add arrow animation if present\n * this allows users to customize the spinners\n * without errors being thrown\n */\n if (arrowContainer && arrow) {\n const arrowContainerAnimation = createAnimation().addElement(arrowContainer).keyframes([{\n offset: 0,\n transform: 'rotate(0deg)'\n }, {\n offset: 0.30,\n transform: 'rotate(0deg)'\n }, {\n offset: 0.55,\n transform: 'rotate(280deg)'\n }, {\n offset: 1,\n transform: 'rotate(400deg)'\n }]);\n const arrowAnimation = createAnimation().addElement(arrow).keyframes([{\n offset: 0,\n transform: 'translateX(2px) scale(0)'\n }, {\n offset: 0.30,\n transform: 'translateX(2px) scale(0)'\n }, {\n offset: 0.55,\n transform: 'translateX(-1.5px) scale(1)'\n }, {\n offset: 1,\n transform: 'translateX(-1.5px) scale(1)'\n }]);\n baseAnimation.addAnimation([arrowContainerAnimation, arrowAnimation]);\n }\n return baseAnimation.addAnimation([spinnerArrowContainerAnimation, circleInnerAnimation, circleOuterAnimation]);\n};\nconst createScaleAnimation = (pullingRefresherIcon, refresherEl) => {\n /**\n * Do not take the height of the refresher icon\n * because at this point the DOM has not updated,\n * so the refresher icon is still hidden with\n * display: none.\n * The `ion-refresher` container height\n * is roughly the amount we need to offset\n * the icon by when pulling down.\n */\n const height = refresherEl.clientHeight;\n const spinnerAnimation = createAnimation().addElement(pullingRefresherIcon).keyframes([{\n offset: 0,\n transform: `scale(0) translateY(-${height}px)`\n }, {\n offset: 1,\n transform: 'scale(1) translateY(100px)'\n }]);\n return createBaseAnimation(pullingRefresherIcon).addAnimation([spinnerAnimation]);\n};\nconst createTranslateAnimation = (pullingRefresherIcon, refresherEl) => {\n /**\n * Do not take the height of the refresher icon\n * because at this point the DOM has not updated,\n * so the refresher icon is still hidden with\n * display: none.\n * The `ion-refresher` container height\n * is roughly the amount we need to offset\n * the icon by when pulling down.\n */\n const height = refresherEl.clientHeight;\n const spinnerAnimation = createAnimation().addElement(pullingRefresherIcon).keyframes([{\n offset: 0,\n transform: `translateY(-${height}px)`\n }, {\n offset: 1,\n transform: 'translateY(100px)'\n }]);\n return createBaseAnimation(pullingRefresherIcon).addAnimation([spinnerAnimation]);\n};\nconst createSnapBackAnimation = pullingRefresherIcon => {\n return createAnimation().duration(125).addElement(pullingRefresherIcon).fromTo('transform', 'translateY(var(--ion-pulling-refresher-translate, 100px))', 'translateY(0px)');\n};\n// iOS Native Refresher\n// -----------------------------\nconst setSpinnerOpacity = (spinner, opacity) => {\n spinner.style.setProperty('opacity', opacity.toString());\n};\nconst handleScrollWhilePulling = (spinner, ticks, opacity, currentTickToShow) => {\n writeTask(() => {\n setSpinnerOpacity(spinner, opacity);\n ticks.forEach((el, i) => el.style.setProperty('opacity', i <= currentTickToShow ? '0.99' : '0'));\n });\n};\nconst handleScrollWhileRefreshing = (spinner, lastVelocityY) => {\n writeTask(() => {\n // If user pulls down quickly, the spinner should spin faster\n spinner.style.setProperty('--refreshing-rotation-duration', lastVelocityY >= 1.0 ? '0.5s' : '2s');\n spinner.style.setProperty('opacity', '1');\n });\n};\nconst translateElement = (el, value) => {\n if (!el) {\n return Promise.resolve();\n }\n const trans = transitionEndAsync(el, 200);\n writeTask(() => {\n el.style.setProperty('transition', '0.2s all ease-out');\n if (value === undefined) {\n el.style.removeProperty('transform');\n } else {\n el.style.setProperty('transform', `translate3d(0px, ${value}, 0px)`);\n }\n });\n return trans;\n};\n// Utils\n// -----------------------------\nconst shouldUseNativeRefresher = /*#__PURE__*/function () {\n var _ref = _asyncToGenerator(function* (referenceEl, mode) {\n const refresherContent = referenceEl.querySelector('ion-refresher-content');\n if (!refresherContent) {\n return Promise.resolve(false);\n }\n yield new Promise(resolve => componentOnReady(refresherContent, resolve));\n const pullingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-pulling ion-spinner');\n const refreshingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');\n return pullingSpinner !== null && refreshingSpinner !== null && (mode === 'ios' && isPlatform('mobile') && referenceEl.style.webkitOverflowScrolling !== undefined || mode === 'md');\n });\n return function shouldUseNativeRefresher(_x, _x2) {\n return _ref.apply(this, arguments);\n };\n}();\nconst transitionEndAsync = (el, expectedDuration = 0) => {\n return new Promise(resolve => {\n transitionEnd(el, expectedDuration, resolve);\n });\n};\nconst transitionEnd = (el, expectedDuration = 0, callback) => {\n let unRegTrans;\n let animationTimeout;\n const opts = {\n passive: true\n };\n const ANIMATION_FALLBACK_TIMEOUT = 500;\n const unregister = () => {\n if (unRegTrans) {\n unRegTrans();\n }\n };\n const onTransitionEnd = ev => {\n if (ev === undefined || el === ev.target) {\n unregister();\n callback(ev);\n }\n };\n if (el) {\n el.addEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.addEventListener('transitionend', onTransitionEnd, opts);\n animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT);\n unRegTrans = () => {\n if (animationTimeout) {\n clearTimeout(animationTimeout);\n animationTimeout = undefined;\n }\n el.removeEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.removeEventListener('transitionend', onTransitionEnd, opts);\n };\n }\n return unregister;\n};\nconst refresherIosCss = \"ion-refresher{left:0;top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}[dir=rtl] ion-refresher,:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}[dir=rtl] .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native ion-spinner{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}\";\nconst refresherMdCss = \"ion-refresher{left:0;top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}[dir=rtl] ion-refresher,:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}[dir=rtl] .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #3880ff)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native ion-spinner{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #3880ff);font-size:12px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native .arrow-container ion-icon{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;border-radius:100%;padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, #ececec);background:var(--ion-color-step-250, #ffffff);-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}\";\nconst Refresher = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionRefresh = createEvent(this, \"ionRefresh\", 7);\n this.ionPull = createEvent(this, \"ionPull\", 7);\n this.ionStart = createEvent(this, \"ionStart\", 7);\n this.appliedStyles = false;\n this.didStart = false;\n this.progress = 0;\n this.pointerDown = false;\n this.needsCompletion = false;\n this.didRefresh = false;\n this.lastVelocityY = 0;\n this.animations = [];\n this.nativeRefresher = false;\n /**\n * The current state which the refresher is in. The refresher's states include:\n *\n * - `inactive` - The refresher is not being pulled down or refreshing and is currently hidden.\n * - `pulling` - The user is actively pulling down the refresher, but has not reached the point yet that if the user lets go, it'll refresh.\n * - `cancelling` - The user pulled down the refresher and let go, but did not pull down far enough to kick off the `refreshing` state. After letting go, the refresher is in the `cancelling` state while it is closing, and will go back to the `inactive` state once closed.\n * - `ready` - The user has pulled down the refresher far enough that if they let go, it'll begin the `refreshing` state.\n * - `refreshing` - The refresher is actively waiting on the async operation to end. Once the refresh handler calls `complete()` it will begin the `completing` state.\n * - `completing` - The `refreshing` state has finished and the refresher is in the way of closing itself. Once closed, the refresher will go back to the `inactive` state.\n */\n this.state = 1 /* Inactive */;\n /**\n * The minimum distance the user must pull down until the\n * refresher will go into the `refreshing` state.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.pullMin = 60;\n /**\n * The maximum distance of the pull until the refresher\n * will automatically go into the `refreshing` state.\n * Defaults to the result of `pullMin + 60`.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.pullMax = this.pullMin + 60;\n /**\n * Time it takes to close the refresher.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.closeDuration = '280ms';\n /**\n * Time it takes the refresher to snap back to the `refreshing` state.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.snapbackDuration = '280ms';\n /**\n * How much to multiply the pull speed by. To slow the pull animation down,\n * pass a number less than `1`. To speed up the pull, pass a number greater\n * than `1`. The default value is `1` which is equal to the speed of the cursor.\n * If a negative value is passed in, the factor will be `1` instead.\n *\n * For example: If the value passed is `1.2` and the content is dragged by\n * `10` pixels, instead of `10` pixels the content will be pulled by `12` pixels\n * (an increase of 20 percent). If the value passed is `0.8`, the dragged amount\n * will be `8` pixels, less than the amount the cursor has moved.\n *\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.pullFactor = 1;\n /**\n * If `true`, the refresher will be hidden.\n */\n this.disabled = false;\n }\n disabledChanged() {\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n }\n checkNativeRefresher() {\n var _this = this;\n return _asyncToGenerator(function* () {\n const useNativeRefresher = yield shouldUseNativeRefresher(_this.el, getIonMode(_this));\n if (useNativeRefresher && !_this.nativeRefresher) {\n const contentEl = _this.el.closest('ion-content');\n _this.setupNativeRefresher(contentEl);\n } else if (!useNativeRefresher) {\n _this.destroyNativeRefresher();\n }\n })();\n }\n destroyNativeRefresher() {\n if (this.scrollEl && this.scrollListenerCallback) {\n this.scrollEl.removeEventListener('scroll', this.scrollListenerCallback);\n this.scrollListenerCallback = undefined;\n }\n this.nativeRefresher = false;\n }\n resetNativeRefresher(el, state) {\n var _this2 = this;\n return _asyncToGenerator(function* () {\n _this2.state = state;\n if (getIonMode(_this2) === 'ios') {\n yield translateElement(el, undefined);\n } else {\n yield transitionEndAsync(_this2.el.querySelector('.refresher-refreshing-icon'), 200);\n }\n _this2.didRefresh = false;\n _this2.needsCompletion = false;\n _this2.pointerDown = false;\n _this2.animations.forEach(ani => ani.destroy());\n _this2.animations = [];\n _this2.progress = 0;\n _this2.state = 1 /* Inactive */;\n })();\n }\n\n setupiOSNativeRefresher(pullingSpinner, refreshingSpinner) {\n var _this3 = this;\n return _asyncToGenerator(function* () {\n _this3.elementToTransform = _this3.scrollEl;\n const ticks = pullingSpinner.shadowRoot.querySelectorAll('svg');\n let MAX_PULL = _this3.scrollEl.clientHeight * 0.16;\n const NUM_TICKS = ticks.length;\n writeTask(() => ticks.forEach(el => el.style.setProperty('animation', 'none')));\n _this3.scrollListenerCallback = () => {\n // If pointer is not on screen or refresher is not active, ignore scroll\n if (!_this3.pointerDown && _this3.state === 1 /* Inactive */) {\n return;\n }\n readTask(() => {\n // PTR should only be active when overflow scrolling at the top\n const scrollTop = _this3.scrollEl.scrollTop;\n const refresherHeight = _this3.el.clientHeight;\n if (scrollTop > 0) {\n /**\n * If refresher is refreshing and user tries to scroll\n * progressively fade refresher out/in\n */\n if (_this3.state === 8 /* Refreshing */) {\n const ratio = clamp(0, scrollTop / (refresherHeight * 0.5), 1);\n writeTask(() => setSpinnerOpacity(refreshingSpinner, 1 - ratio));\n return;\n }\n writeTask(() => setSpinnerOpacity(pullingSpinner, 0));\n return;\n }\n if (_this3.pointerDown) {\n if (!_this3.didStart) {\n _this3.didStart = true;\n _this3.ionStart.emit();\n }\n // emit \"pulling\" on every move\n if (_this3.pointerDown) {\n _this3.ionPull.emit();\n }\n }\n // delay showing the next tick marks until user has pulled 30px\n const opacity = clamp(0, Math.abs(scrollTop) / refresherHeight, 0.99);\n const pullAmount = _this3.progress = clamp(0, (Math.abs(scrollTop) - 30) / MAX_PULL, 1);\n const currentTickToShow = clamp(0, Math.floor(pullAmount * NUM_TICKS), NUM_TICKS - 1);\n const shouldShowRefreshingSpinner = _this3.state === 8 /* Refreshing */ || currentTickToShow === NUM_TICKS - 1;\n if (shouldShowRefreshingSpinner) {\n if (_this3.pointerDown) {\n handleScrollWhileRefreshing(refreshingSpinner, _this3.lastVelocityY);\n }\n if (!_this3.didRefresh) {\n _this3.beginRefresh();\n _this3.didRefresh = true;\n hapticImpact({\n style: 'light'\n });\n /**\n * Translate the content element otherwise when pointer is removed\n * from screen the scroll content will bounce back over the refresher\n */\n if (!_this3.pointerDown) {\n translateElement(_this3.elementToTransform, `${refresherHeight}px`);\n }\n }\n } else {\n _this3.state = 2 /* Pulling */;\n handleScrollWhilePulling(pullingSpinner, ticks, opacity, currentTickToShow);\n }\n });\n };\n _this3.scrollEl.addEventListener('scroll', _this3.scrollListenerCallback);\n _this3.gesture = (yield import('./index-34cb2743.js')).createGesture({\n el: _this3.scrollEl,\n gestureName: 'refresher',\n gesturePriority: 31,\n direction: 'y',\n threshold: 5,\n onStart: () => {\n _this3.pointerDown = true;\n if (!_this3.didRefresh) {\n translateElement(_this3.elementToTransform, '0px');\n }\n /**\n * If the content had `display: none` when\n * the refresher was initialized, its clientHeight\n * will be 0. When the gesture starts, the content\n * will be visible, so try to get the correct\n * client height again. This is most common when\n * using the refresher in an ion-menu.\n */\n if (MAX_PULL === 0) {\n MAX_PULL = _this3.scrollEl.clientHeight * 0.16;\n }\n },\n onMove: ev => {\n _this3.lastVelocityY = ev.velocityY;\n },\n onEnd: () => {\n _this3.pointerDown = false;\n _this3.didStart = false;\n if (_this3.needsCompletion) {\n _this3.resetNativeRefresher(_this3.elementToTransform, 32 /* Completing */);\n _this3.needsCompletion = false;\n } else if (_this3.didRefresh) {\n readTask(() => translateElement(_this3.elementToTransform, `${_this3.el.clientHeight}px`));\n }\n }\n });\n _this3.disabledChanged();\n })();\n }\n setupMDNativeRefresher(contentEl, pullingSpinner, refreshingSpinner) {\n var _this4 = this;\n return _asyncToGenerator(function* () {\n const circle = getElementRoot(pullingSpinner).querySelector('circle');\n const pullingRefresherIcon = _this4.el.querySelector('ion-refresher-content .refresher-pulling-icon');\n const refreshingCircle = getElementRoot(refreshingSpinner).querySelector('circle');\n if (circle !== null && refreshingCircle !== null) {\n writeTask(() => {\n circle.style.setProperty('animation', 'none');\n // This lines up the animation on the refreshing spinner with the pulling spinner\n refreshingSpinner.style.setProperty('animation-delay', '-655ms');\n refreshingCircle.style.setProperty('animation-delay', '-655ms');\n });\n }\n _this4.gesture = (yield import('./index-34cb2743.js')).createGesture({\n el: _this4.scrollEl,\n gestureName: 'refresher',\n gesturePriority: 31,\n direction: 'y',\n threshold: 5,\n canStart: () => _this4.state !== 8 /* Refreshing */ && _this4.state !== 32 /* Completing */ && _this4.scrollEl.scrollTop === 0,\n onStart: ev => {\n ev.data = {\n animation: undefined,\n didStart: false,\n cancelled: false\n };\n },\n onMove: ev => {\n if (ev.velocityY < 0 && _this4.progress === 0 && !ev.data.didStart || ev.data.cancelled) {\n ev.data.cancelled = true;\n return;\n }\n if (!ev.data.didStart) {\n ev.data.didStart = true;\n _this4.state = 2 /* Pulling */;\n writeTask(() => _this4.scrollEl.style.setProperty('--overflow', 'hidden'));\n const animationType = getRefresherAnimationType(contentEl);\n const animation = createPullingAnimation(animationType, pullingRefresherIcon, _this4.el);\n ev.data.animation = animation;\n animation.progressStart(false, 0);\n _this4.ionStart.emit();\n _this4.animations.push(animation);\n return;\n }\n // Since we are using an easing curve, slow the gesture tracking down a bit\n _this4.progress = clamp(0, ev.deltaY / 180 * 0.5, 1);\n ev.data.animation.progressStep(_this4.progress);\n _this4.ionPull.emit();\n },\n onEnd: ev => {\n if (!ev.data.didStart) {\n return;\n }\n writeTask(() => _this4.scrollEl.style.removeProperty('--overflow'));\n if (_this4.progress <= 0.4) {\n _this4.gesture.enable(false);\n ev.data.animation.progressEnd(0, _this4.progress, 500).onFinish(() => {\n _this4.animations.forEach(ani => ani.destroy());\n _this4.animations = [];\n _this4.gesture.enable(true);\n _this4.state = 1 /* Inactive */;\n });\n\n return;\n }\n const progress = getTimeGivenProgression([0, 0], [0, 0], [1, 1], [1, 1], _this4.progress)[0];\n const snapBackAnimation = createSnapBackAnimation(pullingRefresherIcon);\n _this4.animations.push(snapBackAnimation);\n writeTask( /*#__PURE__*/_asyncToGenerator(function* () {\n pullingRefresherIcon.style.setProperty('--ion-pulling-refresher-translate', `${progress * 100}px`);\n ev.data.animation.progressEnd();\n yield snapBackAnimation.play();\n _this4.beginRefresh();\n ev.data.animation.destroy();\n }));\n }\n });\n _this4.disabledChanged();\n })();\n }\n setupNativeRefresher(contentEl) {\n var _this5 = this;\n return _asyncToGenerator(function* () {\n if (_this5.scrollListenerCallback || !contentEl || _this5.nativeRefresher || !_this5.scrollEl) {\n return;\n }\n /**\n * If using non-native refresher before make sure\n * we clean up any old CSS. This can happen when\n * a user manually calls the refresh method in a\n * component create callback before the native\n * refresher is setup.\n */\n _this5.setCss(0, '', false, '');\n _this5.nativeRefresher = true;\n const pullingSpinner = _this5.el.querySelector('ion-refresher-content .refresher-pulling ion-spinner');\n const refreshingSpinner = _this5.el.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');\n if (getIonMode(_this5) === 'ios') {\n _this5.setupiOSNativeRefresher(pullingSpinner, refreshingSpinner);\n } else {\n _this5.setupMDNativeRefresher(contentEl, pullingSpinner, refreshingSpinner);\n }\n })();\n }\n componentDidUpdate() {\n this.checkNativeRefresher();\n }\n connectedCallback() {\n var _this6 = this;\n return _asyncToGenerator(function* () {\n if (_this6.el.getAttribute('slot') !== 'fixed') {\n console.error('Make sure you use: <ion-refresher slot=\"fixed\">');\n return;\n }\n const contentEl = _this6.el.closest('ion-content');\n if (!contentEl) {\n console.error('<ion-refresher> must be used inside an <ion-content>');\n return;\n }\n yield new Promise(resolve => componentOnReady(contentEl, resolve));\n _this6.scrollEl = yield contentEl.getScrollElement();\n _this6.backgroundContentEl = getElementRoot(contentEl).querySelector('#background-content');\n if (yield shouldUseNativeRefresher(_this6.el, getIonMode(_this6))) {\n _this6.setupNativeRefresher(contentEl);\n } else {\n _this6.gesture = (yield import('./index-34cb2743.js')).createGesture({\n el: contentEl,\n gestureName: 'refresher',\n gesturePriority: 31,\n direction: 'y',\n threshold: 20,\n passive: false,\n canStart: () => _this6.canStart(),\n onStart: () => _this6.onStart(),\n onMove: ev => _this6.onMove(ev),\n onEnd: () => _this6.onEnd()\n });\n _this6.disabledChanged();\n }\n })();\n }\n disconnectedCallback() {\n this.destroyNativeRefresher();\n this.scrollEl = undefined;\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n /**\n * Call `complete()` when your async operation has completed.\n * For example, the `refreshing` state is while the app is performing\n * an asynchronous operation, such as receiving more data from an\n * AJAX request. Once the data has been received, you then call this\n * method to signify that the refreshing has completed and to close\n * the refresher. This method also changes the refresher's state from\n * `refreshing` to `completing`.\n */\n complete() {\n var _this7 = this;\n return _asyncToGenerator(function* () {\n if (_this7.nativeRefresher) {\n _this7.needsCompletion = true;\n // Do not reset scroll el until user removes pointer from screen\n if (!_this7.pointerDown) {\n raf(() => raf(() => _this7.resetNativeRefresher(_this7.elementToTransform, 32 /* Completing */)));\n }\n } else {\n _this7.close(32 /* Completing */, '120ms');\n }\n })();\n }\n /**\n * Changes the refresher's state from `refreshing` to `cancelling`.\n */\n cancel() {\n var _this8 = this;\n return _asyncToGenerator(function* () {\n if (_this8.nativeRefresher) {\n // Do not reset scroll el until user removes pointer from screen\n if (!_this8.pointerDown) {\n raf(() => raf(() => _this8.resetNativeRefresher(_this8.elementToTransform, 16 /* Cancelling */)));\n }\n } else {\n _this8.close(16 /* Cancelling */, '');\n }\n })();\n }\n /**\n * A number representing how far down the user has pulled.\n * The number `0` represents the user hasn't pulled down at all. The\n * number `1`, and anything greater than `1`, represents that the user\n * has pulled far enough down that when they let go then the refresh will\n * happen. If they let go and the number is less than `1`, then the\n * refresh will not happen, and the content will return to it's original\n * position.\n */\n getProgress() {\n return Promise.resolve(this.progress);\n }\n canStart() {\n if (!this.scrollEl) {\n return false;\n }\n if (this.state !== 1 /* Inactive */) {\n return false;\n }\n // if the scrollTop is greater than zero then it's\n // not possible to pull the content down yet\n if (this.scrollEl.scrollTop > 0) {\n return false;\n }\n return true;\n }\n onStart() {\n this.progress = 0;\n this.state = 1 /* Inactive */;\n }\n\n onMove(detail) {\n if (!this.scrollEl) {\n return;\n }\n // this method can get called like a bazillion times per second,\n // so it's built to be as efficient as possible, and does its\n // best to do any DOM read/writes only when absolutely necessary\n // if multi-touch then get out immediately\n const ev = detail.event;\n if (ev.touches && ev.touches.length > 1) {\n return;\n }\n // do nothing if it's actively refreshing\n // or it's in the way of closing\n // or this was never a startY\n if ((this.state & 56 /* _BUSY_ */) !== 0) {\n return;\n }\n const pullFactor = Number.isNaN(this.pullFactor) || this.pullFactor < 0 ? 1 : this.pullFactor;\n const deltaY = detail.deltaY * pullFactor;\n // don't bother if they're scrolling up\n // and have not already started dragging\n if (deltaY <= 0) {\n // the current Y is higher than the starting Y\n // so they scrolled up enough to be ignored\n this.progress = 0;\n this.state = 1 /* Inactive */;\n if (this.appliedStyles) {\n // reset the styles only if they were applied\n this.setCss(0, '', false, '');\n return;\n }\n return;\n }\n if (this.state === 1 /* Inactive */) {\n // this refresh is not already actively pulling down\n // get the content's scrollTop\n const scrollHostScrollTop = this.scrollEl.scrollTop;\n // if the scrollTop is greater than zero then it's\n // not possible to pull the content down yet\n if (scrollHostScrollTop > 0) {\n this.progress = 0;\n return;\n }\n // content scrolled all the way to the top, and dragging down\n this.state = 2 /* Pulling */;\n }\n // prevent native scroll events\n if (ev.cancelable) {\n ev.preventDefault();\n }\n // the refresher is actively pulling at this point\n // move the scroll element within the content element\n this.setCss(deltaY, '0ms', true, '');\n if (deltaY === 0) {\n // don't continue if there's no delta yet\n this.progress = 0;\n return;\n }\n const pullMin = this.pullMin;\n // set pull progress\n this.progress = deltaY / pullMin;\n // emit \"start\" if it hasn't started yet\n if (!this.didStart) {\n this.didStart = true;\n this.ionStart.emit();\n }\n // emit \"pulling\" on every move\n this.ionPull.emit();\n // do nothing if the delta is less than the pull threshold\n if (deltaY < pullMin) {\n // ensure it stays in the pulling state, cuz its not ready yet\n this.state = 2 /* Pulling */;\n return;\n }\n if (deltaY > this.pullMax) {\n // they pulled farther than the max, so kick off the refresh\n this.beginRefresh();\n return;\n }\n // pulled farther than the pull min!!\n // it is now in the `ready` state!!\n // if they let go then it'll refresh, kerpow!!\n this.state = 4 /* Ready */;\n return;\n }\n onEnd() {\n // only run in a zone when absolutely necessary\n if (this.state === 4 /* Ready */) {\n // they pulled down far enough, so it's ready to refresh\n this.beginRefresh();\n } else if (this.state === 2 /* Pulling */) {\n // they were pulling down, but didn't pull down far enough\n // set the content back to it's original location\n // and close the refresher\n // set that the refresh is actively cancelling\n this.cancel();\n }\n }\n beginRefresh() {\n // assumes we're already back in a zone\n // they pulled down far enough, so it's ready to refresh\n this.state = 8 /* Refreshing */;\n // place the content in a hangout position while it thinks\n this.setCss(this.pullMin, this.snapbackDuration, true, '');\n // emit \"refresh\" because it was pulled down far enough\n // and they let go to begin refreshing\n this.ionRefresh.emit({\n complete: this.complete.bind(this)\n });\n }\n close(state, delay) {\n // create fallback timer incase something goes wrong with transitionEnd event\n setTimeout(() => {\n this.state = 1 /* Inactive */;\n this.progress = 0;\n this.didStart = false;\n this.setCss(0, '0ms', false, '');\n }, 600);\n // reset set the styles on the scroll element\n // set that the refresh is actively cancelling/completing\n this.state = state;\n this.setCss(0, this.closeDuration, true, delay);\n // TODO: stop gesture\n }\n\n setCss(y, duration, overflowVisible, delay) {\n if (this.nativeRefresher) {\n return;\n }\n this.appliedStyles = y > 0;\n writeTask(() => {\n if (this.scrollEl && this.backgroundContentEl) {\n const scrollStyle = this.scrollEl.style;\n const backgroundStyle = this.backgroundContentEl.style;\n scrollStyle.transform = backgroundStyle.transform = y > 0 ? `translateY(${y}px) translateZ(0px)` : '';\n scrollStyle.transitionDuration = backgroundStyle.transitionDuration = duration;\n scrollStyle.transitionDelay = backgroundStyle.transitionDelay = delay;\n scrollStyle.overflow = overflowVisible ? 'hidden' : '';\n }\n });\n }\n render() {\n const mode = getIonMode(this);\n return h(Host, {\n slot: \"fixed\",\n class: {\n [mode]: true,\n // Used internally for styling\n [`refresher-${mode}`]: true,\n 'refresher-native': this.nativeRefresher,\n 'refresher-active': this.state !== 1 /* Inactive */,\n 'refresher-pulling': this.state === 2 /* Pulling */,\n 'refresher-ready': this.state === 4 /* Ready */,\n 'refresher-refreshing': this.state === 8 /* Refreshing */,\n 'refresher-cancelling': this.state === 16 /* Cancelling */,\n 'refresher-completing': this.state === 32 /* Completing */\n }\n });\n }\n\n get el() {\n return getElement(this);\n }\n static get watchers() {\n return {\n \"disabled\": [\"disabledChanged\"]\n };\n }\n};\nRefresher.style = {\n ios: refresherIosCss,\n md: refresherMdCss\n};\nconst RefresherContent = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n }\n componentWillLoad() {\n if (this.pullingIcon === undefined) {\n const mode = getIonMode(this);\n const overflowRefresher = this.el.style.webkitOverflowScrolling !== undefined ? 'lines' : 'arrow-down';\n this.pullingIcon = config.get('refreshingIcon', mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular');\n }\n if (this.refreshingSpinner === undefined) {\n const mode = getIonMode(this);\n this.refreshingSpinner = config.get('refreshingSpinner', config.get('spinner', mode === 'ios' ? 'lines' : 'circular'));\n }\n }\n render() {\n const pullingIcon = this.pullingIcon;\n const hasSpinner = pullingIcon != null && SPINNERS[pullingIcon] !== undefined;\n const mode = getIonMode(this);\n return h(Host, {\n class: mode\n }, h(\"div\", {\n class: \"refresher-pulling\"\n }, this.pullingIcon && hasSpinner && h(\"div\", {\n class: \"refresher-pulling-icon\"\n }, h(\"div\", {\n class: \"spinner-arrow-container\"\n }, h(\"ion-spinner\", {\n name: this.pullingIcon,\n paused: true\n }), mode === 'md' && this.pullingIcon === 'circular' && h(\"div\", {\n class: \"arrow-container\"\n }, h(\"ion-icon\", {\n name: \"caret-back-sharp\"\n })))), this.pullingIcon && !hasSpinner && h(\"div\", {\n class: \"refresher-pulling-icon\"\n }, h(\"ion-icon\", {\n icon: this.pullingIcon,\n lazy: false\n })), this.pullingText && h(\"div\", {\n class: \"refresher-pulling-text\",\n innerHTML: sanitizeDOMString(this.pullingText)\n })), h(\"div\", {\n class: \"refresher-refreshing\"\n }, this.refreshingSpinner && h(\"div\", {\n class: \"refresher-refreshing-icon\"\n }, h(\"ion-spinner\", {\n name: this.refreshingSpinner\n })), this.refreshingText && h(\"div\", {\n class: \"refresher-refreshing-text\",\n innerHTML: sanitizeDOMString(this.refreshingText)\n })));\n }\n get el() {\n return getElement(this);\n }\n};\nexport { Refresher as ion_refresher, RefresherContent as ion_refresher_content };","map":{"version":3,"names":["c","writeTask","r","registerInstance","e","createEvent","f","readTask","h","i","getElement","H","Host","a","isPlatform","b","getIonMode","config","g","getTimeGivenProgression","componentOnReady","k","clamp","getElementRoot","raf","d","hapticImpact","createAnimation","s","sanitizeDOMString","S","SPINNERS","getRefresherAnimationType","contentEl","previousSibling","previousElementSibling","hasHeader","tagName","createPullingAnimation","type","pullingSpinner","refresherEl","createScaleAnimation","createTranslateAnimation","createBaseAnimation","pullingRefresherIcon","spinner","querySelector","circle","shadowRoot","spinnerArrowContainer","arrowContainer","arrow","baseAnimation","duration","easing","spinnerArrowContainerAnimation","addElement","keyframes","offset","opacity","circleInnerAnimation","strokeDasharray","circleOuterAnimation","transform","arrowContainerAnimation","arrowAnimation","addAnimation","height","clientHeight","spinnerAnimation","createSnapBackAnimation","fromTo","setSpinnerOpacity","style","setProperty","toString","handleScrollWhilePulling","ticks","currentTickToShow","forEach","el","handleScrollWhileRefreshing","lastVelocityY","translateElement","value","Promise","resolve","trans","transitionEndAsync","undefined","removeProperty","shouldUseNativeRefresher","_ref","_asyncToGenerator","referenceEl","mode","refresherContent","refreshingSpinner","webkitOverflowScrolling","_x","_x2","apply","arguments","expectedDuration","transitionEnd","callback","unRegTrans","animationTimeout","opts","passive","ANIMATION_FALLBACK_TIMEOUT","unregister","onTransitionEnd","ev","target","addEventListener","setTimeout","clearTimeout","removeEventListener","refresherIosCss","refresherMdCss","Refresher","constructor","hostRef","ionRefresh","ionPull","ionStart","appliedStyles","didStart","progress","pointerDown","needsCompletion","didRefresh","animations","nativeRefresher","state","pullMin","pullMax","closeDuration","snapbackDuration","pullFactor","disabled","disabledChanged","gesture","enable","checkNativeRefresher","_this","useNativeRefresher","closest","setupNativeRefresher","destroyNativeRefresher","scrollEl","scrollListenerCallback","resetNativeRefresher","_this2","ani","destroy","setupiOSNativeRefresher","_this3","elementToTransform","querySelectorAll","MAX_PULL","NUM_TICKS","length","scrollTop","refresherHeight","ratio","emit","Math","abs","pullAmount","floor","shouldShowRefreshingSpinner","beginRefresh","createGesture","gestureName","gesturePriority","direction","threshold","onStart","onMove","velocityY","onEnd","setupMDNativeRefresher","_this4","refreshingCircle","canStart","data","animation","cancelled","animationType","progressStart","push","deltaY","progressStep","progressEnd","onFinish","snapBackAnimation","play","_this5","setCss","componentDidUpdate","connectedCallback","_this6","getAttribute","console","error","getScrollElement","backgroundContentEl","disconnectedCallback","complete","_this7","close","cancel","_this8","getProgress","detail","event","touches","Number","isNaN","scrollHostScrollTop","cancelable","preventDefault","bind","delay","y","overflowVisible","scrollStyle","backgroundStyle","transitionDuration","transitionDelay","overflow","render","slot","class","watchers","ios","md","RefresherContent","componentWillLoad","pullingIcon","overflowRefresher","get","hasSpinner","name","paused","icon","lazy","pullingText","innerHTML","refreshingText","ion_refresher","ion_refresher_content"],"sources":["C:/Users/eudes.inacio/GabineteDigital/gabinete-digital-fo/node_modules/@ionic/core/dist/esm/ion-refresher_2.entry.js"],"sourcesContent":["import { c as writeTask, r as registerInstance, e as createEvent, f as readTask, h, i as getElement, H as Host } from './index-7a8b7a1c.js';\nimport { a as isPlatform, b as getIonMode, c as config } from './ionic-global-63a97a32.js';\nimport { g as getTimeGivenProgression } from './cubic-bezier-eea9a7a9.js';\nimport { c as componentOnReady, k as clamp, g as getElementRoot, r as raf } from './helpers-1457892a.js';\nimport { d as hapticImpact } from './haptic-27b3f981.js';\nimport { c as createAnimation } from './animation-822d986b.js';\nimport { s as sanitizeDOMString } from './index-9e3fe806.js';\nimport { S as SPINNERS } from './spinner-configs-cd7845af.js';\n\nconst getRefresherAnimationType = (contentEl) => {\n const previousSibling = contentEl.previousElementSibling;\n const hasHeader = previousSibling !== null && previousSibling.tagName === 'ION-HEADER';\n return hasHeader ? 'translate' : 'scale';\n};\nconst createPullingAnimation = (type, pullingSpinner, refresherEl) => {\n return type === 'scale' ? createScaleAnimation(pullingSpinner, refresherEl) : createTranslateAnimation(pullingSpinner, refresherEl);\n};\nconst createBaseAnimation = (pullingRefresherIcon) => {\n const spinner = pullingRefresherIcon.querySelector('ion-spinner');\n const circle = spinner.shadowRoot.querySelector('circle');\n const spinnerArrowContainer = pullingRefresherIcon.querySelector('.spinner-arrow-container');\n const arrowContainer = pullingRefresherIcon.querySelector('.arrow-container');\n const arrow = (arrowContainer) ? arrowContainer.querySelector('ion-icon') : null;\n const baseAnimation = createAnimation()\n .duration(1000)\n .easing('ease-out');\n const spinnerArrowContainerAnimation = createAnimation()\n .addElement(spinnerArrowContainer)\n .keyframes([\n { offset: 0, opacity: '0.3' },\n { offset: 0.45, opacity: '0.3' },\n { offset: 0.55, opacity: '1' },\n { offset: 1, opacity: '1' }\n ]);\n const circleInnerAnimation = createAnimation()\n .addElement(circle)\n .keyframes([\n { offset: 0, strokeDasharray: '1px, 200px' },\n { offset: 0.20, strokeDasharray: '1px, 200px' },\n { offset: 0.55, strokeDasharray: '100px, 200px' },\n { offset: 1, strokeDasharray: '100px, 200px' }\n ]);\n const circleOuterAnimation = createAnimation()\n .addElement(spinner)\n .keyframes([\n { offset: 0, transform: 'rotate(-90deg)' },\n { offset: 1, transform: 'rotate(210deg)' }\n ]);\n /**\n * Only add arrow animation if present\n * this allows users to customize the spinners\n * without errors being thrown\n */\n if (arrowContainer && arrow) {\n const arrowContainerAnimation = createAnimation()\n .addElement(arrowContainer)\n .keyframes([\n { offset: 0, transform: 'rotate(0deg)' },\n { offset: 0.30, transform: 'rotate(0deg)' },\n { offset: 0.55, transform: 'rotate(280deg)' },\n { offset: 1, transform: 'rotate(400deg)' }\n ]);\n const arrowAnimation = createAnimation()\n .addElement(arrow)\n .keyframes([\n { offset: 0, transform: 'translateX(2px) scale(0)' },\n { offset: 0.30, transform: 'translateX(2px) scale(0)' },\n { offset: 0.55, transform: 'translateX(-1.5px) scale(1)' },\n { offset: 1, transform: 'translateX(-1.5px) scale(1)' }\n ]);\n baseAnimation.addAnimation([arrowContainerAnimation, arrowAnimation]);\n }\n return baseAnimation.addAnimation([spinnerArrowContainerAnimation, circleInnerAnimation, circleOuterAnimation]);\n};\nconst createScaleAnimation = (pullingRefresherIcon, refresherEl) => {\n /**\n * Do not take the height of the refresher icon\n * because at this point the DOM has not updated,\n * so the refresher icon is still hidden with\n * display: none.\n * The `ion-refresher` container height\n * is roughly the amount we need to offset\n * the icon by when pulling down.\n */\n const height = refresherEl.clientHeight;\n const spinnerAnimation = createAnimation()\n .addElement(pullingRefresherIcon)\n .keyframes([\n { offset: 0, transform: `scale(0) translateY(-${height}px)` },\n { offset: 1, transform: 'scale(1) translateY(100px)' }\n ]);\n return createBaseAnimation(pullingRefresherIcon).addAnimation([spinnerAnimation]);\n};\nconst createTranslateAnimation = (pullingRefresherIcon, refresherEl) => {\n /**\n * Do not take the height of the refresher icon\n * because at this point the DOM has not updated,\n * so the refresher icon is still hidden with\n * display: none.\n * The `ion-refresher` container height\n * is roughly the amount we need to offset\n * the icon by when pulling down.\n */\n const height = refresherEl.clientHeight;\n const spinnerAnimation = createAnimation()\n .addElement(pullingRefresherIcon)\n .keyframes([\n { offset: 0, transform: `translateY(-${height}px)` },\n { offset: 1, transform: 'translateY(100px)' }\n ]);\n return createBaseAnimation(pullingRefresherIcon).addAnimation([spinnerAnimation]);\n};\nconst createSnapBackAnimation = (pullingRefresherIcon) => {\n return createAnimation()\n .duration(125)\n .addElement(pullingRefresherIcon)\n .fromTo('transform', 'translateY(var(--ion-pulling-refresher-translate, 100px))', 'translateY(0px)');\n};\n// iOS Native Refresher\n// -----------------------------\nconst setSpinnerOpacity = (spinner, opacity) => {\n spinner.style.setProperty('opacity', opacity.toString());\n};\nconst handleScrollWhilePulling = (spinner, ticks, opacity, currentTickToShow) => {\n writeTask(() => {\n setSpinnerOpacity(spinner, opacity);\n ticks.forEach((el, i) => el.style.setProperty('opacity', (i <= currentTickToShow) ? '0.99' : '0'));\n });\n};\nconst handleScrollWhileRefreshing = (spinner, lastVelocityY) => {\n writeTask(() => {\n // If user pulls down quickly, the spinner should spin faster\n spinner.style.setProperty('--refreshing-rotation-duration', (lastVelocityY >= 1.0) ? '0.5s' : '2s');\n spinner.style.setProperty('opacity', '1');\n });\n};\nconst translateElement = (el, value) => {\n if (!el) {\n return Promise.resolve();\n }\n const trans = transitionEndAsync(el, 200);\n writeTask(() => {\n el.style.setProperty('transition', '0.2s all ease-out');\n if (value === undefined) {\n el.style.removeProperty('transform');\n }\n else {\n el.style.setProperty('transform', `translate3d(0px, ${value}, 0px)`);\n }\n });\n return trans;\n};\n// Utils\n// -----------------------------\nconst shouldUseNativeRefresher = async (referenceEl, mode) => {\n const refresherContent = referenceEl.querySelector('ion-refresher-content');\n if (!refresherContent) {\n return Promise.resolve(false);\n }\n await new Promise(resolve => componentOnReady(refresherContent, resolve));\n const pullingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-pulling ion-spinner');\n const refreshingSpinner = referenceEl.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');\n return (pullingSpinner !== null &&\n refreshingSpinner !== null &&\n ((mode === 'ios' && isPlatform('mobile') && referenceEl.style.webkitOverflowScrolling !== undefined) ||\n mode === 'md'));\n};\nconst transitionEndAsync = (el, expectedDuration = 0) => {\n return new Promise(resolve => {\n transitionEnd(el, expectedDuration, resolve);\n });\n};\nconst transitionEnd = (el, expectedDuration = 0, callback) => {\n let unRegTrans;\n let animationTimeout;\n const opts = { passive: true };\n const ANIMATION_FALLBACK_TIMEOUT = 500;\n const unregister = () => {\n if (unRegTrans) {\n unRegTrans();\n }\n };\n const onTransitionEnd = (ev) => {\n if (ev === undefined || el === ev.target) {\n unregister();\n callback(ev);\n }\n };\n if (el) {\n el.addEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.addEventListener('transitionend', onTransitionEnd, opts);\n animationTimeout = setTimeout(onTransitionEnd, expectedDuration + ANIMATION_FALLBACK_TIMEOUT);\n unRegTrans = () => {\n if (animationTimeout) {\n clearTimeout(animationTimeout);\n animationTimeout = undefined;\n }\n el.removeEventListener('webkitTransitionEnd', onTransitionEnd, opts);\n el.removeEventListener('transitionend', onTransitionEnd, opts);\n };\n }\n return unregister;\n};\n\nconst refresherIosCss = \"ion-refresher{left:0;top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}[dir=rtl] ion-refresher,:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}[dir=rtl] .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-ios .refresher-pulling-icon,.refresher-ios .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-ios .refresher-pulling-text,.refresher-ios .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-lines-ios line,.refresher-ios .refresher-refreshing .spinner-lines-small-ios line,.refresher-ios .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-ios .refresher-refreshing .spinner-bubbles circle,.refresher-ios .refresher-refreshing .spinner-circles circle,.refresher-ios .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native ion-spinner{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.refresher-native .refresher-refreshing ion-spinner{--refreshing-rotation-duration:2s;display:none;-webkit-animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards;animation:var(--refreshing-rotation-duration) ease-out refresher-rotate forwards}.refresher-native .refresher-refreshing{display:none;-webkit-animation:250ms linear refresher-pop forwards;animation:250ms linear refresher-pop forwards}.refresher-native.refresher-refreshing .refresher-pulling ion-spinner,.refresher-native.refresher-completing .refresher-pulling ion-spinner{display:none}.refresher-native.refresher-refreshing .refresher-refreshing ion-spinner,.refresher-native.refresher-completing .refresher-refreshing ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-pulling ion-spinner{display:block}.refresher-native.refresher-pulling .refresher-refreshing ion-spinner{display:none}@-webkit-keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes refresher-pop{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}50%{-webkit-transform:scale(1.2);transform:scale(1.2);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}@keyframes refresher-rotate{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(180deg);transform:rotate(180deg)}}\";\n\nconst refresherMdCss = \"ion-refresher{left:0;top:0;display:none;position:absolute;width:100%;height:60px;pointer-events:none;z-index:-1}[dir=rtl] ion-refresher,:host-context([dir=rtl]) ion-refresher{left:unset;right:unset;right:0}ion-refresher.refresher-active{display:block}ion-refresher-content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.refresher-pulling,.refresher-refreshing{display:none;width:100%}.refresher-pulling-icon,.refresher-refreshing-icon{-webkit-transform-origin:center;transform-origin:center;-webkit-transition:200ms;transition:200ms;font-size:30px;text-align:center}[dir=rtl] .refresher-pulling-icon,:host-context([dir=rtl]) .refresher-pulling-icon,[dir=rtl] .refresher-refreshing-icon,:host-context([dir=rtl]) .refresher-refreshing-icon{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}.refresher-pulling-text,.refresher-refreshing-text{font-size:16px;text-align:center}ion-refresher-content .arrow-container{display:none}.refresher-pulling ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling{display:block}.refresher-ready ion-refresher-content .refresher-pulling-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.refresher-refreshing ion-refresher-content .refresher-refreshing{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling{display:block}.refresher-cancelling ion-refresher-content .refresher-pulling-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-completing ion-refresher-content .refresher-refreshing{display:block}.refresher-completing ion-refresher-content .refresher-refreshing-icon{-webkit-transform:scale(0);transform:scale(0)}.refresher-native .refresher-pulling-text,.refresher-native .refresher-refreshing-text{display:none}.refresher-md .refresher-pulling-icon,.refresher-md .refresher-refreshing-icon{color:var(--ion-text-color, #000)}.refresher-md .refresher-pulling-text,.refresher-md .refresher-refreshing-text{color:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-lines-md line,.refresher-md .refresher-refreshing .spinner-lines-small-md line,.refresher-md .refresher-refreshing .spinner-crescent circle{stroke:var(--ion-text-color, #000)}.refresher-md .refresher-refreshing .spinner-bubbles circle,.refresher-md .refresher-refreshing .spinner-circles circle,.refresher-md .refresher-refreshing .spinner-dots circle{fill:var(--ion-text-color, #000)}ion-refresher.refresher-native{display:block;z-index:1}ion-refresher.refresher-native ion-spinner{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;width:24px;height:24px;color:var(--ion-color-primary, #3880ff)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native ion-spinner{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}ion-refresher.refresher-native .spinner-arrow-container{display:inherit}ion-refresher.refresher-native .arrow-container{display:block;position:absolute;width:24px;height:24px}ion-refresher.refresher-native .arrow-container ion-icon{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;left:0;right:0;bottom:-4px;position:absolute;color:var(--ion-color-primary, #3880ff);font-size:12px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native .arrow-container ion-icon{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}ion-refresher.refresher-native.refresher-pulling ion-refresher-content .refresher-pulling,ion-refresher.refresher-native.refresher-ready ion-refresher-content .refresher-pulling{display:-ms-flexbox;display:flex}ion-refresher.refresher-native.refresher-refreshing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-completing ion-refresher-content .refresher-refreshing,ion-refresher.refresher-native.refresher-cancelling ion-refresher-content .refresher-refreshing{display:-ms-flexbox;display:flex}ion-refresher.refresher-native .refresher-pulling-icon{-webkit-transform:translateY(calc(-100% - 10px));transform:translateY(calc(-100% - 10px))}ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;border-radius:100%;padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;display:-ms-flexbox;display:flex;border:1px solid var(--ion-color-step-200, #ececec);background:var(--ion-color-step-250, #ffffff);-webkit-box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1);box-shadow:0px 1px 6px rgba(0, 0, 0, 0.1)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){ion-refresher.refresher-native .refresher-pulling-icon,ion-refresher.refresher-native .refresher-refreshing-icon{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}\";\n\nconst Refresher = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionRefresh = createEvent(this, \"ionRefresh\", 7);\n this.ionPull = createEvent(this, \"ionPull\", 7);\n this.ionStart = createEvent(this, \"ionStart\", 7);\n this.appliedStyles = false;\n this.didStart = false;\n this.progress = 0;\n this.pointerDown = false;\n this.needsCompletion = false;\n this.didRefresh = false;\n this.lastVelocityY = 0;\n this.animations = [];\n this.nativeRefresher = false;\n /**\n * The current state which the refresher is in. The refresher's states include:\n *\n * - `inactive` - The refresher is not being pulled down or refreshing and is currently hidden.\n * - `pulling` - The user is actively pulling down the refresher, but has not reached the point yet that if the user lets go, it'll refresh.\n * - `cancelling` - The user pulled down the refresher and let go, but did not pull down far enough to kick off the `refreshing` state. After letting go, the refresher is in the `cancelling` state while it is closing, and will go back to the `inactive` state once closed.\n * - `ready` - The user has pulled down the refresher far enough that if they let go, it'll begin the `refreshing` state.\n * - `refreshing` - The refresher is actively waiting on the async operation to end. Once the refresh handler calls `complete()` it will begin the `completing` state.\n * - `completing` - The `refreshing` state has finished and the refresher is in the way of closing itself. Once closed, the refresher will go back to the `inactive` state.\n */\n this.state = 1 /* Inactive */;\n /**\n * The minimum distance the user must pull down until the\n * refresher will go into the `refreshing` state.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.pullMin = 60;\n /**\n * The maximum distance of the pull until the refresher\n * will automatically go into the `refreshing` state.\n * Defaults to the result of `pullMin + 60`.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.pullMax = this.pullMin + 60;\n /**\n * Time it takes to close the refresher.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.closeDuration = '280ms';\n /**\n * Time it takes the refresher to snap back to the `refreshing` state.\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.snapbackDuration = '280ms';\n /**\n * How much to multiply the pull speed by. To slow the pull animation down,\n * pass a number less than `1`. To speed up the pull, pass a number greater\n * than `1`. The default value is `1` which is equal to the speed of the cursor.\n * If a negative value is passed in, the factor will be `1` instead.\n *\n * For example: If the value passed is `1.2` and the content is dragged by\n * `10` pixels, instead of `10` pixels the content will be pulled by `12` pixels\n * (an increase of 20 percent). If the value passed is `0.8`, the dragged amount\n * will be `8` pixels, less than the amount the cursor has moved.\n *\n * Does not apply when the refresher content uses a spinner,\n * enabling the native refresher.\n */\n this.pullFactor = 1;\n /**\n * If `true`, the refresher will be hidden.\n */\n this.disabled = false;\n }\n disabledChanged() {\n if (this.gesture) {\n this.gesture.enable(!this.disabled);\n }\n }\n async checkNativeRefresher() {\n const useNativeRefresher = await shouldUseNativeRefresher(this.el, getIonMode(this));\n if (useNativeRefresher && !this.nativeRefresher) {\n const contentEl = this.el.closest('ion-content');\n this.setupNativeRefresher(contentEl);\n }\n else if (!useNativeRefresher) {\n this.destroyNativeRefresher();\n }\n }\n destroyNativeRefresher() {\n if (this.scrollEl && this.scrollListenerCallback) {\n this.scrollEl.removeEventListener('scroll', this.scrollListenerCallback);\n this.scrollListenerCallback = undefined;\n }\n this.nativeRefresher = false;\n }\n async resetNativeRefresher(el, state) {\n this.state = state;\n if (getIonMode(this) === 'ios') {\n await translateElement(el, undefined);\n }\n else {\n await transitionEndAsync(this.el.querySelector('.refresher-refreshing-icon'), 200);\n }\n this.didRefresh = false;\n this.needsCompletion = false;\n this.pointerDown = false;\n this.animations.forEach(ani => ani.destroy());\n this.animations = [];\n this.progress = 0;\n this.state = 1 /* Inactive */;\n }\n async setupiOSNativeRefresher(pullingSpinner, refreshingSpinner) {\n this.elementToTransform = this.scrollEl;\n const ticks = pullingSpinner.shadowRoot.querySelectorAll('svg');\n let MAX_PULL = this.scrollEl.clientHeight * 0.16;\n const NUM_TICKS = ticks.length;\n writeTask(() => ticks.forEach(el => el.style.setProperty('animation', 'none')));\n this.scrollListenerCallback = () => {\n // If pointer is not on screen or refresher is not active, ignore scroll\n if (!this.pointerDown && this.state === 1 /* Inactive */) {\n return;\n }\n readTask(() => {\n // PTR should only be active when overflow scrolling at the top\n const scrollTop = this.scrollEl.scrollTop;\n const refresherHeight = this.el.clientHeight;\n if (scrollTop > 0) {\n /**\n * If refresher is refreshing and user tries to scroll\n * progressively fade refresher out/in\n */\n if (this.state === 8 /* Refreshing */) {\n const ratio = clamp(0, scrollTop / (refresherHeight * 0.5), 1);\n writeTask(() => setSpinnerOpacity(refreshingSpinner, 1 - ratio));\n return;\n }\n writeTask(() => setSpinnerOpacity(pullingSpinner, 0));\n return;\n }\n if (this.pointerDown) {\n if (!this.didStart) {\n this.didStart = true;\n this.ionStart.emit();\n }\n // emit \"pulling\" on every move\n if (this.pointerDown) {\n this.ionPull.emit();\n }\n }\n // delay showing the next tick marks until user has pulled 30px\n const opacity = clamp(0, Math.abs(scrollTop) / refresherHeight, 0.99);\n const pullAmount = this.progress = clamp(0, (Math.abs(scrollTop) - 30) / MAX_PULL, 1);\n const currentTickToShow = clamp(0, Math.floor(pullAmount * NUM_TICKS), NUM_TICKS - 1);\n const shouldShowRefreshingSpinner = this.state === 8 /* Refreshing */ || currentTickToShow === NUM_TICKS - 1;\n if (shouldShowRefreshingSpinner) {\n if (this.pointerDown) {\n handleScrollWhileRefreshing(refreshingSpinner, this.lastVelocityY);\n }\n if (!this.didRefresh) {\n this.beginRefresh();\n this.didRefresh = true;\n hapticImpact({ style: 'light' });\n /**\n * Translate the content element otherwise when pointer is removed\n * from screen the scroll content will bounce back over the refresher\n */\n if (!this.pointerDown) {\n translateElement(this.elementToTransform, `${refresherHeight}px`);\n }\n }\n }\n else {\n this.state = 2 /* Pulling */;\n handleScrollWhilePulling(pullingSpinner, ticks, opacity, currentTickToShow);\n }\n });\n };\n this.scrollEl.addEventListener('scroll', this.scrollListenerCallback);\n this.gesture = (await import('./index-34cb2743.js')).createGesture({\n el: this.scrollEl,\n gestureName: 'refresher',\n gesturePriority: 31,\n direction: 'y',\n threshold: 5,\n onStart: () => {\n this.pointerDown = true;\n if (!this.didRefresh) {\n translateElement(this.elementToTransform, '0px');\n }\n /**\n * If the content had `display: none` when\n * the refresher was initialized, its clientHeight\n * will be 0. When the gesture starts, the content\n * will be visible, so try to get the correct\n * client height again. This is most common when\n * using the refresher in an ion-menu.\n */\n if (MAX_PULL === 0) {\n MAX_PULL = this.scrollEl.clientHeight * 0.16;\n }\n },\n onMove: ev => {\n this.lastVelocityY = ev.velocityY;\n },\n onEnd: () => {\n this.pointerDown = false;\n this.didStart = false;\n if (this.needsCompletion) {\n this.resetNativeRefresher(this.elementToTransform, 32 /* Completing */);\n this.needsCompletion = false;\n }\n else if (this.didRefresh) {\n readTask(() => translateElement(this.elementToTransform, `${this.el.clientHeight}px`));\n }\n },\n });\n this.disabledChanged();\n }\n async setupMDNativeRefresher(contentEl, pullingSpinner, refreshingSpinner) {\n const circle = getElementRoot(pullingSpinner).querySelector('circle');\n const pullingRefresherIcon = this.el.querySelector('ion-refresher-content .refresher-pulling-icon');\n const refreshingCircle = getElementRoot(refreshingSpinner).querySelector('circle');\n if (circle !== null && refreshingCircle !== null) {\n writeTask(() => {\n circle.style.setProperty('animation', 'none');\n // This lines up the animation on the refreshing spinner with the pulling spinner\n refreshingSpinner.style.setProperty('animation-delay', '-655ms');\n refreshingCircle.style.setProperty('animation-delay', '-655ms');\n });\n }\n this.gesture = (await import('./index-34cb2743.js')).createGesture({\n el: this.scrollEl,\n gestureName: 'refresher',\n gesturePriority: 31,\n direction: 'y',\n threshold: 5,\n canStart: () => this.state !== 8 /* Refreshing */ && this.state !== 32 /* Completing */ && this.scrollEl.scrollTop === 0,\n onStart: (ev) => {\n ev.data = { animation: undefined, didStart: false, cancelled: false };\n },\n onMove: (ev) => {\n if ((ev.velocityY < 0 && this.progress === 0 && !ev.data.didStart) || ev.data.cancelled) {\n ev.data.cancelled = true;\n return;\n }\n if (!ev.data.didStart) {\n ev.data.didStart = true;\n this.state = 2 /* Pulling */;\n writeTask(() => this.scrollEl.style.setProperty('--overflow', 'hidden'));\n const animationType = getRefresherAnimationType(contentEl);\n const animation = createPullingAnimation(animationType, pullingRefresherIcon, this.el);\n ev.data.animation = animation;\n animation.progressStart(false, 0);\n this.ionStart.emit();\n this.animations.push(animation);\n return;\n }\n // Since we are using an easing curve, slow the gesture tracking down a bit\n this.progress = clamp(0, (ev.deltaY / 180) * 0.5, 1);\n ev.data.animation.progressStep(this.progress);\n this.ionPull.emit();\n },\n onEnd: (ev) => {\n if (!ev.data.didStart) {\n return;\n }\n writeTask(() => this.scrollEl.style.removeProperty('--overflow'));\n if (this.progress <= 0.4) {\n this.gesture.enable(false);\n ev.data.animation\n .progressEnd(0, this.progress, 500)\n .onFinish(() => {\n this.animations.forEach(ani => ani.destroy());\n this.animations = [];\n this.gesture.enable(true);\n this.state = 1 /* Inactive */;\n });\n return;\n }\n const progress = getTimeGivenProgression([0, 0], [0, 0], [1, 1], [1, 1], this.progress)[0];\n const snapBackAnimation = createSnapBackAnimation(pullingRefresherIcon);\n this.animations.push(snapBackAnimation);\n writeTask(async () => {\n pullingRefresherIcon.style.setProperty('--ion-pulling-refresher-translate', `${(progress * 100)}px`);\n ev.data.animation.progressEnd();\n await snapBackAnimation.play();\n this.beginRefresh();\n ev.data.animation.destroy();\n });\n }\n });\n this.disabledChanged();\n }\n async setupNativeRefresher(contentEl) {\n if (this.scrollListenerCallback || !contentEl || this.nativeRefresher || !this.scrollEl) {\n return;\n }\n /**\n * If using non-native refresher before make sure\n * we clean up any old CSS. This can happen when\n * a user manually calls the refresh method in a\n * component create callback before the native\n * refresher is setup.\n */\n this.setCss(0, '', false, '');\n this.nativeRefresher = true;\n const pullingSpinner = this.el.querySelector('ion-refresher-content .refresher-pulling ion-spinner');\n const refreshingSpinner = this.el.querySelector('ion-refresher-content .refresher-refreshing ion-spinner');\n if (getIonMode(this) === 'ios') {\n this.setupiOSNativeRefresher(pullingSpinner, refreshingSpinner);\n }\n else {\n this.setupMDNativeRefresher(contentEl, pullingSpinner, refreshingSpinner);\n }\n }\n componentDidUpdate() {\n this.checkNativeRefresher();\n }\n async connectedCallback() {\n if (this.el.getAttribute('slot') !== 'fixed') {\n console.error('Make sure you use: <ion-refresher slot=\"fixed\">');\n return;\n }\n const contentEl = this.el.closest('ion-content');\n if (!contentEl) {\n console.error('<ion-refresher> must be used inside an <ion-content>');\n return;\n }\n await new Promise(resolve => componentOnReady(contentEl, resolve));\n this.scrollEl = await contentEl.getScrollElement();\n this.backgroundContentEl = getElementRoot(contentEl).querySelector('#background-content');\n if (await shouldUseNativeRefresher(this.el, getIonMode(this))) {\n this.setupNativeRefresher(contentEl);\n }\n else {\n this.gesture = (await import('./index-34cb2743.js')).createGesture({\n el: contentEl,\n gestureName: 'refresher',\n gesturePriority: 31,\n direction: 'y',\n threshold: 20,\n passive: false,\n canStart: () => this.canStart(),\n onStart: () => this.onStart(),\n onMove: ev => this.onMove(ev),\n onEnd: () => this.onEnd(),\n });\n this.disabledChanged();\n }\n }\n disconnectedCallback() {\n this.destroyNativeRefresher();\n this.scrollEl = undefined;\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n }\n /**\n * Call `complete()` when your async operation has completed.\n * For example, the `refreshing` state is while the app is performing\n * an asynchronous operation, such as receiving more data from an\n * AJAX request. Once the data has been received, you then call this\n * method to signify that the refreshing has completed and to close\n * the refresher. This method also changes the refresher's state from\n * `refreshing` to `completing`.\n */\n async complete() {\n if (this.nativeRefresher) {\n this.needsCompletion = true;\n // Do not reset scroll el until user removes pointer from screen\n if (!this.pointerDown) {\n raf(() => raf(() => this.resetNativeRefresher(this.elementToTransform, 32 /* Completing */)));\n }\n }\n else {\n this.close(32 /* Completing */, '120ms');\n }\n }\n /**\n * Changes the refresher's state from `refreshing` to `cancelling`.\n */\n async cancel() {\n if (this.nativeRefresher) {\n // Do not reset scroll el until user removes pointer from screen\n if (!this.pointerDown) {\n raf(() => raf(() => this.resetNativeRefresher(this.elementToTransform, 16 /* Cancelling */)));\n }\n }\n else {\n this.close(16 /* Cancelling */, '');\n }\n }\n /**\n * A number representing how far down the user has pulled.\n * The number `0` represents the user hasn't pulled down at all. The\n * number `1`, and anything greater than `1`, represents that the user\n * has pulled far enough down that when they let go then the refresh will\n * happen. If they let go and the number is less than `1`, then the\n * refresh will not happen, and the content will return to it's original\n * position.\n */\n getProgress() {\n return Promise.resolve(this.progress);\n }\n canStart() {\n if (!this.scrollEl) {\n return false;\n }\n if (this.state !== 1 /* Inactive */) {\n return false;\n }\n // if the scrollTop is greater than zero then it's\n // not possible to pull the content down yet\n if (this.scrollEl.scrollTop > 0) {\n return false;\n }\n return true;\n }\n onStart() {\n this.progress = 0;\n this.state = 1 /* Inactive */;\n }\n onMove(detail) {\n if (!this.scrollEl) {\n return;\n }\n // this method can get called like a bazillion times per second,\n // so it's built to be as efficient as possible, and does its\n // best to do any DOM read/writes only when absolutely necessary\n // if multi-touch then get out immediately\n const ev = detail.event;\n if (ev.touches && ev.touches.length > 1) {\n return;\n }\n // do nothing if it's actively refreshing\n // or it's in the way of closing\n // or this was never a startY\n if ((this.state & 56 /* _BUSY_ */) !== 0) {\n return;\n }\n const pullFactor = (Number.isNaN(this.pullFactor) || this.pullFactor < 0) ? 1 : this.pullFactor;\n const deltaY = detail.deltaY * pullFactor;\n // don't bother if they're scrolling up\n // and have not already started dragging\n if (deltaY <= 0) {\n // the current Y is higher than the starting Y\n // so they scrolled up enough to be ignored\n this.progress = 0;\n this.state = 1 /* Inactive */;\n if (this.appliedStyles) {\n // reset the styles only if they were applied\n this.setCss(0, '', false, '');\n return;\n }\n return;\n }\n if (this.state === 1 /* Inactive */) {\n // this refresh is not already actively pulling down\n // get the content's scrollTop\n const scrollHostScrollTop = this.scrollEl.scrollTop;\n // if the scrollTop is greater than zero then it's\n // not possible to pull the content down yet\n if (scrollHostScrollTop > 0) {\n this.progress = 0;\n return;\n }\n // content scrolled all the way to the top, and dragging down\n this.state = 2 /* Pulling */;\n }\n // prevent native scroll events\n if (ev.cancelable) {\n ev.preventDefault();\n }\n // the refresher is actively pulling at this point\n // move the scroll element within the content element\n this.setCss(deltaY, '0ms', true, '');\n if (deltaY === 0) {\n // don't continue if there's no delta yet\n this.progress = 0;\n return;\n }\n const pullMin = this.pullMin;\n // set pull progress\n this.progress = deltaY / pullMin;\n // emit \"start\" if it hasn't started yet\n if (!this.didStart) {\n this.didStart = true;\n this.ionStart.emit();\n }\n // emit \"pulling\" on every move\n this.ionPull.emit();\n // do nothing if the delta is less than the pull threshold\n if (deltaY < pullMin) {\n // ensure it stays in the pulling state, cuz its not ready yet\n this.state = 2 /* Pulling */;\n return;\n }\n if (deltaY > this.pullMax) {\n // they pulled farther than the max, so kick off the refresh\n this.beginRefresh();\n return;\n }\n // pulled farther than the pull min!!\n // it is now in the `ready` state!!\n // if they let go then it'll refresh, kerpow!!\n this.state = 4 /* Ready */;\n return;\n }\n onEnd() {\n // only run in a zone when absolutely necessary\n if (this.state === 4 /* Ready */) {\n // they pulled down far enough, so it's ready to refresh\n this.beginRefresh();\n }\n else if (this.state === 2 /* Pulling */) {\n // they were pulling down, but didn't pull down far enough\n // set the content back to it's original location\n // and close the refresher\n // set that the refresh is actively cancelling\n this.cancel();\n }\n }\n beginRefresh() {\n // assumes we're already back in a zone\n // they pulled down far enough, so it's ready to refresh\n this.state = 8 /* Refreshing */;\n // place the content in a hangout position while it thinks\n this.setCss(this.pullMin, this.snapbackDuration, true, '');\n // emit \"refresh\" because it was pulled down far enough\n // and they let go to begin refreshing\n this.ionRefresh.emit({\n complete: this.complete.bind(this)\n });\n }\n close(state, delay) {\n // create fallback timer incase something goes wrong with transitionEnd event\n setTimeout(() => {\n this.state = 1 /* Inactive */;\n this.progress = 0;\n this.didStart = false;\n this.setCss(0, '0ms', false, '');\n }, 600);\n // reset set the styles on the scroll element\n // set that the refresh is actively cancelling/completing\n this.state = state;\n this.setCss(0, this.closeDuration, true, delay);\n // TODO: stop gesture\n }\n setCss(y, duration, overflowVisible, delay) {\n if (this.nativeRefresher) {\n return;\n }\n this.appliedStyles = (y > 0);\n writeTask(() => {\n if (this.scrollEl && this.backgroundContentEl) {\n const scrollStyle = this.scrollEl.style;\n const backgroundStyle = this.backgroundContentEl.style;\n scrollStyle.transform = backgroundStyle.transform = ((y > 0) ? `translateY(${y}px) translateZ(0px)` : '');\n scrollStyle.transitionDuration = backgroundStyle.transitionDuration = duration;\n scrollStyle.transitionDelay = backgroundStyle.transitionDelay = delay;\n scrollStyle.overflow = (overflowVisible ? 'hidden' : '');\n }\n });\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { slot: \"fixed\", class: {\n [mode]: true,\n // Used internally for styling\n [`refresher-${mode}`]: true,\n 'refresher-native': this.nativeRefresher,\n 'refresher-active': this.state !== 1 /* Inactive */,\n 'refresher-pulling': this.state === 2 /* Pulling */,\n 'refresher-ready': this.state === 4 /* Ready */,\n 'refresher-refreshing': this.state === 8 /* Refreshing */,\n 'refresher-cancelling': this.state === 16 /* Cancelling */,\n 'refresher-completing': this.state === 32 /* Completing */,\n } }));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"]\n }; }\n};\nRefresher.style = {\n ios: refresherIosCss,\n md: refresherMdCss\n};\n\nconst RefresherContent = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n }\n componentWillLoad() {\n if (this.pullingIcon === undefined) {\n const mode = getIonMode(this);\n const overflowRefresher = this.el.style.webkitOverflowScrolling !== undefined ? 'lines' : 'arrow-down';\n this.pullingIcon = config.get('refreshingIcon', mode === 'ios' && isPlatform('mobile') ? config.get('spinner', overflowRefresher) : 'circular');\n }\n if (this.refreshingSpinner === undefined) {\n const mode = getIonMode(this);\n this.refreshingSpinner = config.get('refreshingSpinner', config.get('spinner', mode === 'ios' ? 'lines' : 'circular'));\n }\n }\n render() {\n const pullingIcon = this.pullingIcon;\n const hasSpinner = pullingIcon != null && SPINNERS[pullingIcon] !== undefined;\n const mode = getIonMode(this);\n return (h(Host, { class: mode }, h(\"div\", { class: \"refresher-pulling\" }, this.pullingIcon && hasSpinner &&\n h(\"div\", { class: \"refresher-pulling-icon\" }, h(\"div\", { class: \"spinner-arrow-container\" }, h(\"ion-spinner\", { name: this.pullingIcon, paused: true }), mode === 'md' && this.pullingIcon === 'circular' &&\n h(\"div\", { class: \"arrow-container\" }, h(\"ion-icon\", { name: \"caret-back-sharp\" })))), this.pullingIcon && !hasSpinner &&\n h(\"div\", { class: \"refresher-pulling-icon\" }, h(\"ion-icon\", { icon: this.pullingIcon, lazy: false })), this.pullingText &&\n h(\"div\", { class: \"refresher-pulling-text\", innerHTML: sanitizeDOMString(this.pullingText) })), h(\"div\", { class: \"refresher-refreshing\" }, this.refreshingSpinner &&\n h(\"div\", { class: \"refresher-refreshing-icon\" }, h(\"ion-spinner\", { name: this.refreshingSpinner })), this.refreshingText &&\n h(\"div\", { class: \"refresher-refreshing-text\", innerHTML: sanitizeDOMString(this.refreshingText) }))));\n }\n get el() { return getElement(this); }\n};\n\nexport { Refresher as ion_refresher, RefresherContent as ion_refresher_content };\n"],"mappings":";AAAA,SAASA,CAAC,IAAIC,SAAS,EAAEC,CAAC,IAAIC,gBAAgB,EAAEC,CAAC,IAAIC,WAAW,EAAEC,CAAC,IAAIC,QAAQ,EAAEC,CAAC,EAAEC,CAAC,IAAIC,UAAU,EAAEC,CAAC,IAAIC,IAAI,QAAQ,qBAAqB;AAC3I,SAASC,CAAC,IAAIC,UAAU,EAAEC,CAAC,IAAIC,UAAU,EAAEhB,CAAC,IAAIiB,MAAM,QAAQ,4BAA4B;AAC1F,SAASC,CAAC,IAAIC,uBAAuB,QAAQ,4BAA4B;AACzE,SAASnB,CAAC,IAAIoB,gBAAgB,EAAEC,CAAC,IAAIC,KAAK,EAAEJ,CAAC,IAAIK,cAAc,EAAErB,CAAC,IAAIsB,GAAG,QAAQ,uBAAuB;AACxG,SAASC,CAAC,IAAIC,YAAY,QAAQ,sBAAsB;AACxD,SAAS1B,CAAC,IAAI2B,eAAe,QAAQ,yBAAyB;AAC9D,SAASC,CAAC,IAAIC,iBAAiB,QAAQ,qBAA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