mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
1 line
66 KiB
JSON
1 line
66 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 { r as registerInstance, e as createEvent, c as writeTask, h, H as Host, i as getElement } from './index-7a8b7a1c.js';\nimport { b as getIonMode, c as config } from './ionic-global-63a97a32.js';\nimport { a as attachComponent, d as detachComponent } from './framework-delegate-94e770cc.js';\nimport { B as BACKDROP, e as prepareOverlay, d as present, h as activeAnimations, f as dismiss, g as eventMethod } from './overlays-a62f858b.js';\nimport { g as getClassMap } from './theme-ff3fc52f.js';\nimport { e as deepReady } from './index-a7711c1e.js';\nimport { c as createAnimation } from './animation-822d986b.js';\nimport { g as getTimeGivenProgression } from './cubic-bezier-eea9a7a9.js';\nimport { createGesture } from './index-34cb2743.js';\nimport { k as clamp } from './helpers-1457892a.js';\nimport './hardware-back-button-4a6b37fb.js';\nimport './gesture-controller-31cb6bb9.js';\n\n// Defaults for the card swipe animation\nconst SwipeToCloseDefaults = {\n MIN_PRESENTING_SCALE: 0.93\n};\nconst createSwipeToCloseGesture = (el, animation, onDismiss) => {\n const height = el.offsetHeight;\n let isOpen = false;\n const canStart = detail => {\n const target = detail.event.target;\n if (target === null || !target.closest) {\n return true;\n }\n const contentOrFooter = target.closest('ion-content, ion-footer');\n if (contentOrFooter === null) {\n return true;\n }\n // Target is in the content or the footer so do not start the gesture.\n // We could be more nuanced here and allow it for content that\n // does not need to scroll.\n return false;\n };\n const onStart = () => {\n animation.progressStart(true, isOpen ? 1 : 0);\n };\n const onMove = detail => {\n const step = clamp(0.0001, detail.deltaY / height, 0.9999);\n animation.progressStep(step);\n };\n const onEnd = detail => {\n const velocity = detail.velocityY;\n const step = clamp(0.0001, detail.deltaY / height, 0.9999);\n const threshold = (detail.deltaY + velocity * 1000) / height;\n const shouldComplete = threshold >= 0.5;\n let newStepValue = shouldComplete ? -0.001 : 0.001;\n if (!shouldComplete) {\n animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');\n newStepValue += getTimeGivenProgression([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];\n } else {\n animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');\n newStepValue += getTimeGivenProgression([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];\n }\n const duration = shouldComplete ? computeDuration(step * height, velocity) : computeDuration((1 - step) * height, velocity);\n isOpen = shouldComplete;\n gesture.enable(false);\n animation.onFinish(() => {\n if (!shouldComplete) {\n gesture.enable(true);\n }\n }).progressEnd(shouldComplete ? 1 : 0, newStepValue, duration);\n if (shouldComplete) {\n onDismiss();\n }\n };\n const gesture = createGesture({\n el,\n gestureName: 'modalSwipeToClose',\n gesturePriority: 40,\n direction: 'y',\n threshold: 10,\n canStart,\n onStart,\n onMove,\n onEnd\n });\n return gesture;\n};\nconst computeDuration = (remaining, velocity) => {\n return clamp(400, remaining / Math.abs(velocity * 1.1), 500);\n};\n\n/**\n * iOS Modal Enter Animation for the Card presentation style\n */\nconst iosEnterAnimation = (baseEl, presentingEl) => {\n const backdropAnimation = createAnimation().addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({\n 'pointer-events': 'none'\n }).afterClearStyles(['pointer-events']);\n const wrapperAnimation = createAnimation().addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow')).beforeStyles({\n 'opacity': 1\n }).fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');\n const baseAnimation = createAnimation().addElement(baseEl).easing('c
|