1 line
69 KiB
JSON
1 line
69 KiB
JSON
{"ast":null,"code":"'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"BackdropProps\"],\n _excluded2 = [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"allowSwipeInChildren\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"];\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport NoSsr from '../NoSsr';\nimport { useDefaultProps } from '../DefaultPropsProvider';\nimport Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';\nimport useForkRef from '../utils/useForkRef';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useEventCallback from '../utils/useEventCallback';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps } from '../transitions/utils';\nimport SwipeArea from './SwipeArea';\n\n// This value is closed to what browsers are using internally to\n// trigger a native scroll.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst UNCERTAINTY_THRESHOLD = 3; // px\n\n// This is the part of the drawer displayed on touch start.\nconst DRAG_STARTED_SIGNAL = 20; // px\n\n// We can only have one instance at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\nlet claimedSwipeInstance = null;\n\n// Exported for test purposes.\nexport function reset() {\n claimedSwipeInstance = null;\n}\nfunction calculateCurrentX(anchor, touches, doc) {\n return anchor === 'right' ? doc.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\nfunction calculateCurrentY(anchor, touches, containerWindow) {\n return anchor === 'bottom' ? containerWindow.innerHeight - touches[0].clientY : touches[0].clientY;\n}\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\n/**\n * @param {Element | null} element\n * @param {Element} rootNode\n */\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n const domTreeShapes = [];\n while (element && element !== rootNode.parentElement) {\n const style = ownerWindow(rootNode).getComputedStyle(element);\n if (\n // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' ||\n // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n // noop\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n element = element.parentElement;\n }\n return domTreeShapes;\n}\n\n/**\n * @param {object} param0\n * @param {ReturnType<getDomTreeShapes>} param0.domTreeShapes\n */\nfunction computeHasNativeHandler({\n domTreeShapes,\n start,\n current,\n anchor\n}) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n const axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(shape => {\n // Determine if we are going backward or forward.\n let goingForward = current >= start;\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n const axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n const scrollPosition = Math.round(shape[axisProperties.scrollPosition[axis]]);\n const areNotAtStart = scrollPosition > 0;\n const areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return true;\n }\n return false;\n });\n}\nconst iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nconst SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiSwipeableDrawer',\n props: inProps\n });\n const theme = useTheme();\n const transitionDurationDefault = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n anchor = 'left',\n disableBackdropTransition = false,\n disableDiscovery = false,\n disableSwipeToOpen = iOS,\n hideBackdrop,\n hysteresis = 0.52,\n allowSwipeInChildren = false,\n minFlingVelocity = 450,\n ModalProps: {\n BackdropProps\n } = {},\n onClose,\n onOpen,\n open = false,\n PaperProps = {},\n SwipeAreaProps,\n swipeAreaWidth = 20,\n transitionDuration = transitionDurationDefault,\n variant = 'temporary' // Mobile first.\n } = props,\n ModalPropsProp = _objectWithoutPropertiesLoose(props.ModalProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const [maybeSwiping, setMaybeSwiping] = React.useState(false);\n const swipeInstance = React.useRef({\n isSwiping: null\n });\n const swipeAreaRef = React.useRef();\n const backdropRef = React.useRef();\n const paperRef = React.useRef();\n const handleRef = useForkRef(PaperProps.ref, paperRef);\n const touchDetected = React.useRef(false);\n\n // Ref for transition duration based on / to match swipe speed\n const calculatedDurationRef = React.useRef();\n\n // Use a ref so the open value used is always up to date inside useCallback.\n useEnhancedEffect(() => {\n calculatedDurationRef.current = null;\n }, [open]);\n const setPosition = React.useCallback((translate, options = {}) => {\n const {\n mode = null,\n changeTransition = true\n } = options;\n const anchorRtl = getAnchor(theme, anchor);\n const rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n const horizontalSwipe = isHorizontal(anchor);\n const transform = horizontalSwipe ? `translate(${rtlTranslateMultiplier * translate}px, 0)` : `translate(0, ${rtlTranslateMultiplier * translate}px)`;\n const drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n let transition = '';\n if (mode) {\n transition = theme.transitions.create('all', getTransitionProps({\n easing: undefined,\n style: undefined,\n timeout: transitionDuration\n }, {\n mode\n }));\n }\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n if (!disableBackdropTransition && !hideBackdrop) {\n const backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n const handleBodyTouchEnd = useEventCallback(nativeEvent => {\n if (!touchDetected.current) {\n return;\n }\n claimedSwipeInstance = null;\n touchDetected.current = false;\n ReactDOM.flushSync(() => {\n setMaybeSwiping(false);\n });\n\n // The swipe wasn't started.\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n swipeInstance.current.isSwiping = null;\n const anchorRtl = getAnchor(theme, anchor);\n const horizontal = isHorizontal(anchor);\n let current;\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, nativeEvent.changedTouches, ownerDocument(nativeEvent.currentTarget));\n } else {\n current = calculateCurrentY(anchorRtl, nativeEvent.changedTouches, ownerWindow(nativeEvent.currentTarget));\n }\n const startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n const maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n const currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n const translateRatio = currentTranslate / maxTranslate;\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n return;\n }\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n const startMaybeSwiping = (force = false) => {\n if (!maybeSwiping) {\n // on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.\n // this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.\n // so do this change on first touchmove instead of touchstart\n if (force || !(disableDiscovery && allowSwipeInChildren)) {\n ReactDOM.flushSync(() => {\n setMaybeSwiping(true);\n });\n }\n const horizontalSwipe = isHorizontal(anchor);\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {\n changeTransition: false\n });\n }\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n }\n };\n const handleBodyTouchMove = useEventCallback(nativeEvent => {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n }\n\n // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {\n return;\n }\n startMaybeSwiping(true);\n const anchorRtl = getAnchor(theme, anchor);\n const horizontalSwipe = isHorizontal(anchor);\n const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));\n const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));\n if (open && paperRef.current.contains(nativeEvent.target) && claimedSwipeInstance === null) {\n const domTreeShapes = getDomTreeShapes(nativeEvent.target, paperRef.current);\n const hasNativeHandler = computeHasNativeHandler({\n domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor\n });\n if (hasNativeHandler) {\n claimedSwipeInstance = true;\n return;\n }\n claimedSwipeInstance = swipeInstance.current;\n }\n\n // We don't know yet.\n if (swipeInstance.current.isSwiping == null) {\n const dx = Math.abs(currentX - swipeInstance.current.startX);\n const dy = Math.abs(currentY - swipeInstance.current.startY);\n const definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n if (definitelySwiping && nativeEvent.cancelable) {\n nativeEvent.preventDefault();\n }\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n if (!definitelySwiping) {\n handleBodyTouchEnd(nativeEvent);\n return;\n }\n\n // Shift the starting point.\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n\n // Compensate for the part of the drawer displayed on touch start.\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= DRAG_STARTED_SIGNAL;\n } else {\n swipeInstance.current.startY -= DRAG_STARTED_SIGNAL;\n }\n }\n }\n }\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n const maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n let startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n const translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n if (open) {\n if (!swipeInstance.current.paperHit) {\n const paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n const velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3;\n\n // Low Pass filter.\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now();\n\n // We are swiping, let's prevent the scroll event on iOS.\n if (nativeEvent.cancelable) {\n nativeEvent.preventDefault();\n }\n setPosition(translate);\n });\n const handleBodyTouchStart = useEventCallback(nativeEvent => {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (nativeEvent.defaultPrevented) {\n return;\n }\n\n // We can only have one node at the time claiming ownership for handling the swipe.\n if (nativeEvent.defaultMuiPrevented) {\n return;\n }\n\n // At least one element clogs the drawer interaction zone.\n if (open && (hideBackdrop || !backdropRef.current.contains(nativeEvent.target)) && !paperRef.current.contains(nativeEvent.target)) {\n return;\n }\n const anchorRtl = getAnchor(theme, anchor);\n const horizontalSwipe = isHorizontal(anchor);\n const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));\n const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));\n if (!open) {\n var _paperRef$current;\n // logic for if swipe should be ignored:\n // if disableSwipeToOpen\n // if target != swipeArea, and target is not a child of paper ref\n // if is a child of paper ref, and `allowSwipeInChildren` does not allow it\n if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || (_paperRef$current = paperRef.current) != null && _paperRef$current.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {\n return;\n }\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n nativeEvent.defaultMuiPrevented = true;\n claimedSwipeInstance = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n startMaybeSwiping();\n });\n React.useEffect(() => {\n if (variant === 'temporary') {\n const doc = ownerDocument(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n // A blocking listener prevents Firefox's navbar to auto-hide on scroll.\n // It only needs to prevent scrolling on the drawer's content when open.\n // When closed, the overlay prevents scrolling.\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: !open\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return () => {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: !open\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n return undefined;\n }, [variant, open, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n React.useEffect(() => () => {\n // We need to release the lock.\n if (claimedSwipeInstance === swipeInstance.current) {\n claimedSwipeInstance = null;\n }\n }, []);\n React.useEffect(() => {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(Drawer, _extends({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: _extends({\n BackdropProps: _extends({}, BackdropProps, {\n ref: backdropRef\n })\n }, variant === 'temporary' && {\n keepMounted: true\n }, ModalPropsProp),\n hideBackdrop: hideBackdrop,\n PaperProps: _extends({}, PaperProps, {\n style: _extends({\n pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''\n }, PaperProps.style),\n ref: handleRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/_jsx(NoSsr, {\n children: /*#__PURE__*/_jsx(SwipeArea, _extends({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeableDrawer.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.\n * This can be useful in scenarios where the drawer is partially visible.\n * You can customize it further with a callback that determines which children the user can drag over to open the drawer\n * (for example, to ignore other elements that handle touch move events, like sliders).\n *\n * @param {TouchEvent} event The 'touchstart' event\n * @param {HTMLDivElement} swipeArea The swipe area element\n * @param {HTMLDivElement} paper The drawer's paper element\n *\n * @default false\n */\n allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n /**\n * @ignore\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n * @default false\n */\n disableBackdropTransition: PropTypes.bool,\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n * @default false\n */\n disableDiscovery: PropTypes.bool,\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n * @default typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent)\n */\n disableSwipeToOpen: PropTypes.bool,\n /**\n * @ignore\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Affects how far the drawer must be opened/closed to change its state.\n * Specified as percent (0-1) of the width of the drawer\n * @default 0.52\n */\n hysteresis: PropTypes.number,\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n * @default 450\n */\n minFlingVelocity: PropTypes.number,\n /**\n * @ignore\n */\n ModalProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n BackdropProps: PropTypes.shape({\n component: elementTypeAcceptingRef\n })\n }),\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent<{}>} event The event source of the callback.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {React.SyntheticEvent<{}>} event The event source of the callback.\n */\n onOpen: PropTypes.func.isRequired,\n /**\n * If `true`, the component is shown.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * @ignore\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef,\n style: PropTypes.object\n }),\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: PropTypes.object,\n /**\n * The width of the left most (or right most) area in `px` that\n * the drawer can be swiped open from.\n * @default 20\n */\n swipeAreaWidth: PropTypes.number,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * @ignore\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default SwipeableDrawer;","map":{"version":3,"names":["_extends","_objectWithoutPropertiesLoose","_excluded","_excluded2","React","ReactDOM","PropTypes","elementTypeAcceptingRef","NoSsr","useDefaultProps","Drawer","getAnchor","isHorizontal","useForkRef","ownerDocument","ownerWindow","useEventCallback","useEnhancedEffect","useTheme","getTransitionProps","SwipeArea","jsx","_jsx","jsxs","_jsxs","UNCERTAINTY_THRESHOLD","DRAG_STARTED_SIGNAL","claimedSwipeInstance","reset","calculateCurrentX","anchor","touches","doc","body","offsetWidth","pageX","calculateCurrentY","containerWindow","innerHeight","clientY","getMaxTranslate","horizontalSwipe","paperInstance","clientWidth","clientHeight","getTranslate","currentTranslate","startLocation","open","maxTranslate","Math","min","max","getDomTreeShapes","element","rootNode","domTreeShapes","parentElement","style","getComputedStyle","getPropertyValue","scrollWidth","scrollHeight","push","computeHasNativeHandler","start","current","axisProperties","scrollPosition","x","y","scrollLength","clientLength","some","shape","goingForward","axis","round","areNotAtStart","areNotAtEnd","iOS","navigator","test","userAgent","SwipeableDrawer","forwardRef","inProps","ref","props","name","theme","transitionDurationDefault","enter","transitions","duration","enteringScreen","exit","leavingScreen","disableBackdropTransition","disableDiscovery","disableSwipeToOpen","hideBackdrop","hysteresis","allowSwipeInChildren","minFlingVelocity","ModalProps","BackdropProps","onClose","onOpen","PaperProps","SwipeAreaProps","swipeAreaWidth","transitionDuration","variant","ModalPropsProp","other","maybeSwiping","setMaybeSwiping","useState","swipeInstance","useRef","isSwiping","swipeAreaRef","backdropRef","paperRef","handleRef","touchDetected","calculatedDurationRef","setPosition","useCallback","translate","options","mode","changeTransition","anchorRtl","rtlTranslateMultiplier","indexOf","transform","drawerStyle","webkitTransform","transition","create","easing","undefined","timeout","webkitTransition","backdropStyle","opacity","handleBodyTouchEnd","nativeEvent","flushSync","horizontal","changedTouches","currentTarget","startX","startY","translateRatio","abs","velocity","startMaybeSwiping","force","lastTime","lastTranslate","paperHit","handleBodyTouchMove","currentX","currentY","contains","target","hasNativeHandler","dx","dy","definitelySwiping","cancelable","preventDefault","performance","now","handleBodyTouchStart","defaultPrevented","defaultMuiPrevented","_paperRef$current","useEffect","addEventListener","passive","removeEventListener","Fragment","children","keepMounted","pointerEvents","width","process","env","NODE_ENV","propTypes","oneOfType","func","bool","oneOf","node","number","component","isRequired","object","appear"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/material/SwipeableDrawer/SwipeableDrawer.js"],"sourcesContent":["'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"BackdropProps\"],\n _excluded2 = [\"anchor\", \"disableBackdropTransition\", \"disableDiscovery\", \"disableSwipeToOpen\", \"hideBackdrop\", \"hysteresis\", \"allowSwipeInChildren\", \"minFlingVelocity\", \"ModalProps\", \"onClose\", \"onOpen\", \"open\", \"PaperProps\", \"SwipeAreaProps\", \"swipeAreaWidth\", \"transitionDuration\", \"variant\"];\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport NoSsr from '../NoSsr';\nimport { useDefaultProps } from '../DefaultPropsProvider';\nimport Drawer, { getAnchor, isHorizontal } from '../Drawer/Drawer';\nimport useForkRef from '../utils/useForkRef';\nimport ownerDocument from '../utils/ownerDocument';\nimport ownerWindow from '../utils/ownerWindow';\nimport useEventCallback from '../utils/useEventCallback';\nimport useEnhancedEffect from '../utils/useEnhancedEffect';\nimport useTheme from '../styles/useTheme';\nimport { getTransitionProps } from '../transitions/utils';\nimport SwipeArea from './SwipeArea';\n\n// This value is closed to what browsers are using internally to\n// trigger a native scroll.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst UNCERTAINTY_THRESHOLD = 3; // px\n\n// This is the part of the drawer displayed on touch start.\nconst DRAG_STARTED_SIGNAL = 20; // px\n\n// We can only have one instance at the time claiming ownership for handling the swipe.\n// Otherwise, the UX would be confusing.\n// That's why we use a singleton here.\nlet claimedSwipeInstance = null;\n\n// Exported for test purposes.\nexport function reset() {\n claimedSwipeInstance = null;\n}\nfunction calculateCurrentX(anchor, touches, doc) {\n return anchor === 'right' ? doc.body.offsetWidth - touches[0].pageX : touches[0].pageX;\n}\nfunction calculateCurrentY(anchor, touches, containerWindow) {\n return anchor === 'bottom' ? containerWindow.innerHeight - touches[0].clientY : touches[0].clientY;\n}\nfunction getMaxTranslate(horizontalSwipe, paperInstance) {\n return horizontalSwipe ? paperInstance.clientWidth : paperInstance.clientHeight;\n}\nfunction getTranslate(currentTranslate, startLocation, open, maxTranslate) {\n return Math.min(Math.max(open ? startLocation - currentTranslate : maxTranslate + startLocation - currentTranslate, 0), maxTranslate);\n}\n\n/**\n * @param {Element | null} element\n * @param {Element} rootNode\n */\nfunction getDomTreeShapes(element, rootNode) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L129\n const domTreeShapes = [];\n while (element && element !== rootNode.parentElement) {\n const style = ownerWindow(rootNode).getComputedStyle(element);\n if (\n // Ignore the scroll children if the element is absolute positioned.\n style.getPropertyValue('position') === 'absolute' ||\n // Ignore the scroll children if the element has an overflowX hidden\n style.getPropertyValue('overflow-x') === 'hidden') {\n // noop\n } else if (element.clientWidth > 0 && element.scrollWidth > element.clientWidth || element.clientHeight > 0 && element.scrollHeight > element.clientHeight) {\n // Ignore the nodes that have no width.\n // Keep elements with a scroll\n domTreeShapes.push(element);\n }\n element = element.parentElement;\n }\n return domTreeShapes;\n}\n\n/**\n * @param {object} param0\n * @param {ReturnType<getDomTreeShapes>} param0.domTreeShapes\n */\nfunction computeHasNativeHandler({\n domTreeShapes,\n start,\n current,\n anchor\n}) {\n // Adapted from https://github.com/oliviertassinari/react-swipeable-views/blob/7666de1dba253b896911adf2790ce51467670856/packages/react-swipeable-views/src/SwipeableViews.js#L175\n const axisProperties = {\n scrollPosition: {\n x: 'scrollLeft',\n y: 'scrollTop'\n },\n scrollLength: {\n x: 'scrollWidth',\n y: 'scrollHeight'\n },\n clientLength: {\n x: 'clientWidth',\n y: 'clientHeight'\n }\n };\n return domTreeShapes.some(shape => {\n // Determine if we are going backward or forward.\n let goingForward = current >= start;\n if (anchor === 'top' || anchor === 'left') {\n goingForward = !goingForward;\n }\n const axis = anchor === 'left' || anchor === 'right' ? 'x' : 'y';\n const scrollPosition = Math.round(shape[axisProperties.scrollPosition[axis]]);\n const areNotAtStart = scrollPosition > 0;\n const areNotAtEnd = scrollPosition + shape[axisProperties.clientLength[axis]] < shape[axisProperties.scrollLength[axis]];\n if (goingForward && areNotAtEnd || !goingForward && areNotAtStart) {\n return true;\n }\n return false;\n });\n}\nconst iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);\nconst SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiSwipeableDrawer',\n props: inProps\n });\n const theme = useTheme();\n const transitionDurationDefault = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n anchor = 'left',\n disableBackdropTransition = false,\n disableDiscovery = false,\n disableSwipeToOpen = iOS,\n hideBackdrop,\n hysteresis = 0.52,\n allowSwipeInChildren = false,\n minFlingVelocity = 450,\n ModalProps: {\n BackdropProps\n } = {},\n onClose,\n onOpen,\n open = false,\n PaperProps = {},\n SwipeAreaProps,\n swipeAreaWidth = 20,\n transitionDuration = transitionDurationDefault,\n variant = 'temporary' // Mobile first.\n } = props,\n ModalPropsProp = _objectWithoutPropertiesLoose(props.ModalProps, _excluded),\n other = _objectWithoutPropertiesLoose(props, _excluded2);\n const [maybeSwiping, setMaybeSwiping] = React.useState(false);\n const swipeInstance = React.useRef({\n isSwiping: null\n });\n const swipeAreaRef = React.useRef();\n const backdropRef = React.useRef();\n const paperRef = React.useRef();\n const handleRef = useForkRef(PaperProps.ref, paperRef);\n const touchDetected = React.useRef(false);\n\n // Ref for transition duration based on / to match swipe speed\n const calculatedDurationRef = React.useRef();\n\n // Use a ref so the open value used is always up to date inside useCallback.\n useEnhancedEffect(() => {\n calculatedDurationRef.current = null;\n }, [open]);\n const setPosition = React.useCallback((translate, options = {}) => {\n const {\n mode = null,\n changeTransition = true\n } = options;\n const anchorRtl = getAnchor(theme, anchor);\n const rtlTranslateMultiplier = ['right', 'bottom'].indexOf(anchorRtl) !== -1 ? 1 : -1;\n const horizontalSwipe = isHorizontal(anchor);\n const transform = horizontalSwipe ? `translate(${rtlTranslateMultiplier * translate}px, 0)` : `translate(0, ${rtlTranslateMultiplier * translate}px)`;\n const drawerStyle = paperRef.current.style;\n drawerStyle.webkitTransform = transform;\n drawerStyle.transform = transform;\n let transition = '';\n if (mode) {\n transition = theme.transitions.create('all', getTransitionProps({\n easing: undefined,\n style: undefined,\n timeout: transitionDuration\n }, {\n mode\n }));\n }\n if (changeTransition) {\n drawerStyle.webkitTransition = transition;\n drawerStyle.transition = transition;\n }\n if (!disableBackdropTransition && !hideBackdrop) {\n const backdropStyle = backdropRef.current.style;\n backdropStyle.opacity = 1 - translate / getMaxTranslate(horizontalSwipe, paperRef.current);\n if (changeTransition) {\n backdropStyle.webkitTransition = transition;\n backdropStyle.transition = transition;\n }\n }\n }, [anchor, disableBackdropTransition, hideBackdrop, theme, transitionDuration]);\n const handleBodyTouchEnd = useEventCallback(nativeEvent => {\n if (!touchDetected.current) {\n return;\n }\n claimedSwipeInstance = null;\n touchDetected.current = false;\n ReactDOM.flushSync(() => {\n setMaybeSwiping(false);\n });\n\n // The swipe wasn't started.\n if (!swipeInstance.current.isSwiping) {\n swipeInstance.current.isSwiping = null;\n return;\n }\n swipeInstance.current.isSwiping = null;\n const anchorRtl = getAnchor(theme, anchor);\n const horizontal = isHorizontal(anchor);\n let current;\n if (horizontal) {\n current = calculateCurrentX(anchorRtl, nativeEvent.changedTouches, ownerDocument(nativeEvent.currentTarget));\n } else {\n current = calculateCurrentY(anchorRtl, nativeEvent.changedTouches, ownerWindow(nativeEvent.currentTarget));\n }\n const startLocation = horizontal ? swipeInstance.current.startX : swipeInstance.current.startY;\n const maxTranslate = getMaxTranslate(horizontal, paperRef.current);\n const currentTranslate = getTranslate(current, startLocation, open, maxTranslate);\n const translateRatio = currentTranslate / maxTranslate;\n if (Math.abs(swipeInstance.current.velocity) > minFlingVelocity) {\n // Calculate transition duration to match swipe speed\n calculatedDurationRef.current = Math.abs((maxTranslate - currentTranslate) / swipeInstance.current.velocity) * 1000;\n }\n if (open) {\n if (swipeInstance.current.velocity > minFlingVelocity || translateRatio > hysteresis) {\n onClose();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(0, {\n mode: 'exit'\n });\n }\n return;\n }\n if (swipeInstance.current.velocity < -minFlingVelocity || 1 - translateRatio > hysteresis) {\n onOpen();\n } else {\n // Reset the position, the swipe was aborted.\n setPosition(getMaxTranslate(horizontal, paperRef.current), {\n mode: 'enter'\n });\n }\n });\n const startMaybeSwiping = (force = false) => {\n if (!maybeSwiping) {\n // on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.\n // this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.\n // so do this change on first touchmove instead of touchstart\n if (force || !(disableDiscovery && allowSwipeInChildren)) {\n ReactDOM.flushSync(() => {\n setMaybeSwiping(true);\n });\n }\n const horizontalSwipe = isHorizontal(anchor);\n if (!open && paperRef.current) {\n // The ref may be null when a parent component updates while swiping.\n setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {\n changeTransition: false\n });\n }\n swipeInstance.current.velocity = 0;\n swipeInstance.current.lastTime = null;\n swipeInstance.current.lastTranslate = null;\n swipeInstance.current.paperHit = false;\n touchDetected.current = true;\n }\n };\n const handleBodyTouchMove = useEventCallback(nativeEvent => {\n // the ref may be null when a parent component updates while swiping\n if (!paperRef.current || !touchDetected.current) {\n return;\n }\n\n // We are not supposed to handle this touch move because the swipe was started in a scrollable container in the drawer\n if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {\n return;\n }\n startMaybeSwiping(true);\n const anchorRtl = getAnchor(theme, anchor);\n const horizontalSwipe = isHorizontal(anchor);\n const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));\n const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));\n if (open && paperRef.current.contains(nativeEvent.target) && claimedSwipeInstance === null) {\n const domTreeShapes = getDomTreeShapes(nativeEvent.target, paperRef.current);\n const hasNativeHandler = computeHasNativeHandler({\n domTreeShapes,\n start: horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY,\n current: horizontalSwipe ? currentX : currentY,\n anchor\n });\n if (hasNativeHandler) {\n claimedSwipeInstance = true;\n return;\n }\n claimedSwipeInstance = swipeInstance.current;\n }\n\n // We don't know yet.\n if (swipeInstance.current.isSwiping == null) {\n const dx = Math.abs(currentX - swipeInstance.current.startX);\n const dy = Math.abs(currentY - swipeInstance.current.startY);\n const definitelySwiping = horizontalSwipe ? dx > dy && dx > UNCERTAINTY_THRESHOLD : dy > dx && dy > UNCERTAINTY_THRESHOLD;\n if (definitelySwiping && nativeEvent.cancelable) {\n nativeEvent.preventDefault();\n }\n if (definitelySwiping === true || (horizontalSwipe ? dy > UNCERTAINTY_THRESHOLD : dx > UNCERTAINTY_THRESHOLD)) {\n swipeInstance.current.isSwiping = definitelySwiping;\n if (!definitelySwiping) {\n handleBodyTouchEnd(nativeEvent);\n return;\n }\n\n // Shift the starting point.\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n\n // Compensate for the part of the drawer displayed on touch start.\n if (!disableDiscovery && !open) {\n if (horizontalSwipe) {\n swipeInstance.current.startX -= DRAG_STARTED_SIGNAL;\n } else {\n swipeInstance.current.startY -= DRAG_STARTED_SIGNAL;\n }\n }\n }\n }\n if (!swipeInstance.current.isSwiping) {\n return;\n }\n const maxTranslate = getMaxTranslate(horizontalSwipe, paperRef.current);\n let startLocation = horizontalSwipe ? swipeInstance.current.startX : swipeInstance.current.startY;\n if (open && !swipeInstance.current.paperHit) {\n startLocation = Math.min(startLocation, maxTranslate);\n }\n const translate = getTranslate(horizontalSwipe ? currentX : currentY, startLocation, open, maxTranslate);\n if (open) {\n if (!swipeInstance.current.paperHit) {\n const paperHit = horizontalSwipe ? currentX < maxTranslate : currentY < maxTranslate;\n if (paperHit) {\n swipeInstance.current.paperHit = true;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n } else {\n return;\n }\n } else if (translate === 0) {\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n }\n }\n if (swipeInstance.current.lastTranslate === null) {\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now() + 1;\n }\n const velocity = (translate - swipeInstance.current.lastTranslate) / (performance.now() - swipeInstance.current.lastTime) * 1e3;\n\n // Low Pass filter.\n swipeInstance.current.velocity = swipeInstance.current.velocity * 0.4 + velocity * 0.6;\n swipeInstance.current.lastTranslate = translate;\n swipeInstance.current.lastTime = performance.now();\n\n // We are swiping, let's prevent the scroll event on iOS.\n if (nativeEvent.cancelable) {\n nativeEvent.preventDefault();\n }\n setPosition(translate);\n });\n const handleBodyTouchStart = useEventCallback(nativeEvent => {\n // We are not supposed to handle this touch move.\n // Example of use case: ignore the event if there is a Slider.\n if (nativeEvent.defaultPrevented) {\n return;\n }\n\n // We can only have one node at the time claiming ownership for handling the swipe.\n if (nativeEvent.defaultMuiPrevented) {\n return;\n }\n\n // At least one element clogs the drawer interaction zone.\n if (open && (hideBackdrop || !backdropRef.current.contains(nativeEvent.target)) && !paperRef.current.contains(nativeEvent.target)) {\n return;\n }\n const anchorRtl = getAnchor(theme, anchor);\n const horizontalSwipe = isHorizontal(anchor);\n const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));\n const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));\n if (!open) {\n var _paperRef$current;\n // logic for if swipe should be ignored:\n // if disableSwipeToOpen\n // if target != swipeArea, and target is not a child of paper ref\n // if is a child of paper ref, and `allowSwipeInChildren` does not allow it\n if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || (_paperRef$current = paperRef.current) != null && _paperRef$current.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {\n return;\n }\n if (horizontalSwipe) {\n if (currentX > swipeAreaWidth) {\n return;\n }\n } else if (currentY > swipeAreaWidth) {\n return;\n }\n }\n nativeEvent.defaultMuiPrevented = true;\n claimedSwipeInstance = null;\n swipeInstance.current.startX = currentX;\n swipeInstance.current.startY = currentY;\n startMaybeSwiping();\n });\n React.useEffect(() => {\n if (variant === 'temporary') {\n const doc = ownerDocument(paperRef.current);\n doc.addEventListener('touchstart', handleBodyTouchStart);\n // A blocking listener prevents Firefox's navbar to auto-hide on scroll.\n // It only needs to prevent scrolling on the drawer's content when open.\n // When closed, the overlay prevents scrolling.\n doc.addEventListener('touchmove', handleBodyTouchMove, {\n passive: !open\n });\n doc.addEventListener('touchend', handleBodyTouchEnd);\n return () => {\n doc.removeEventListener('touchstart', handleBodyTouchStart);\n doc.removeEventListener('touchmove', handleBodyTouchMove, {\n passive: !open\n });\n doc.removeEventListener('touchend', handleBodyTouchEnd);\n };\n }\n return undefined;\n }, [variant, open, handleBodyTouchStart, handleBodyTouchMove, handleBodyTouchEnd]);\n React.useEffect(() => () => {\n // We need to release the lock.\n if (claimedSwipeInstance === swipeInstance.current) {\n claimedSwipeInstance = null;\n }\n }, []);\n React.useEffect(() => {\n if (!open) {\n setMaybeSwiping(false);\n }\n }, [open]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(Drawer, _extends({\n open: variant === 'temporary' && maybeSwiping ? true : open,\n variant: variant,\n ModalProps: _extends({\n BackdropProps: _extends({}, BackdropProps, {\n ref: backdropRef\n })\n }, variant === 'temporary' && {\n keepMounted: true\n }, ModalPropsProp),\n hideBackdrop: hideBackdrop,\n PaperProps: _extends({}, PaperProps, {\n style: _extends({\n pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''\n }, PaperProps.style),\n ref: handleRef\n }),\n anchor: anchor,\n transitionDuration: calculatedDurationRef.current || transitionDuration,\n onClose: onClose,\n ref: ref\n }, other)), !disableSwipeToOpen && variant === 'temporary' && /*#__PURE__*/_jsx(NoSsr, {\n children: /*#__PURE__*/_jsx(SwipeArea, _extends({\n anchor: anchor,\n ref: swipeAreaRef,\n width: swipeAreaWidth\n }, SwipeAreaProps))\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SwipeableDrawer.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.\n * This can be useful in scenarios where the drawer is partially visible.\n * You can customize it further with a callback that determines which children the user can drag over to open the drawer\n * (for example, to ignore other elements that handle touch move events, like sliders).\n *\n * @param {TouchEvent} event The 'touchstart' event\n * @param {HTMLDivElement} swipeArea The swipe area element\n * @param {HTMLDivElement} paper The drawer's paper element\n *\n * @default false\n */\n allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),\n /**\n * @ignore\n */\n anchor: PropTypes.oneOf(['bottom', 'left', 'right', 'top']),\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Disable the backdrop transition.\n * This can improve the FPS on low-end devices.\n * @default false\n */\n disableBackdropTransition: PropTypes.bool,\n /**\n * If `true`, touching the screen near the edge of the drawer will not slide in the drawer a bit\n * to promote accidental discovery of the swipe gesture.\n * @default false\n */\n disableDiscovery: PropTypes.bool,\n /**\n * If `true`, swipe to open is disabled. This is useful in browsers where swiping triggers\n * navigation actions. Swipe to open is disabled on iOS browsers by default.\n * @default typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent)\n */\n disableSwipeToOpen: PropTypes.bool,\n /**\n * @ignore\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Affects how far the drawer must be opened/closed to change its state.\n * Specified as percent (0-1) of the width of the drawer\n * @default 0.52\n */\n hysteresis: PropTypes.number,\n /**\n * Defines, from which (average) velocity on, the swipe is\n * defined as complete although hysteresis isn't reached.\n * Good threshold is between 250 - 1000 px/s\n * @default 450\n */\n minFlingVelocity: PropTypes.number,\n /**\n * @ignore\n */\n ModalProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n BackdropProps: PropTypes.shape({\n component: elementTypeAcceptingRef\n })\n }),\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent<{}>} event The event source of the callback.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Callback fired when the component requests to be opened.\n *\n * @param {React.SyntheticEvent<{}>} event The event source of the callback.\n */\n onOpen: PropTypes.func.isRequired,\n /**\n * If `true`, the component is shown.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * @ignore\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef,\n style: PropTypes.object\n }),\n /**\n * The element is used to intercept the touch events on the edge.\n */\n SwipeAreaProps: PropTypes.object,\n /**\n * The width of the left most (or right most) area in `px` that\n * the drawer can be swiped open from.\n * @default 20\n */\n swipeAreaWidth: PropTypes.number,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * @ignore\n */\n variant: PropTypes.oneOf(['permanent', 'persistent', 'temporary'])\n} : void 0;\nexport default SwipeableDrawer;"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAOC,6BAA6B,MAAM,yDAAyD;AACnG,MAAMC,SAAS,GAAG,CAAC,eAAe,CAAC;EACjCC,UAAU,GAAG,CAAC,QAAQ,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,cAAc,EAAE,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,SAAS,CAAC;AACxS,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,QAAQ,MAAM,WAAW;AACrC,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,uBAAuB,MAAM,oCAAoC;AACxE,OAAOC,KAAK,MAAM,UAAU;AAC5B,SAASC,eAAe,QAAQ,yBAAyB;AACzD,OAAOC,MAAM,IAAIC,SAAS,EAAEC,YAAY,QAAQ,kBAAkB;AAClE,OAAOC,UAAU,MAAM,qBAAqB;AAC5C,OAAOC,aAAa,MAAM,wBAAwB;AAClD,OAAOC,WAAW,MAAM,sBAAsB;AAC9C,OAAOC,gBAAgB,MAAM,2BAA2B;AACxD,OAAOC,iBAAiB,MAAM,4BAA4B;AAC1D,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,SAASC,kBAAkB,QAAQ,sBAAsB;AACzD,OAAOC,SAAS,MAAM,aAAa;;AAEnC;AACA;AACA,SAASC,GAAG,IAAIC,IAAI,QAAQ,mBAAmB;AAC/C,SAASC,IAAI,IAA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,MAAM;EAC5B;AACF;AACA;AACA;AACA;AACA;EACE/F,gBAAgB,EAAElG,SAAS,CAACiM,MAAM;EAClC;AACF;AACA;EACE9F,UAAU,EAAEnG,SAAS,CAAC,sCAAsCoE,KAAK,CAAC;IAChEgC,aAAa,EAAEpG,SAAS,CAACoE,KAAK,CAAC;MAC7B8H,SAAS,EAAEjM;IACb,CAAC;EACH,CAAC,CAAC;EACF;AACF;AACA;AACA;AACA;EACEoG,OAAO,EAAErG,SAAS,CAAC6L,IAAI,CAACM,UAAU;EAClC;AACF;AACA;AACA;AACA;EACE7F,MAAM,EAAEtG,SAAS,CAAC6L,IAAI,CAACM,UAAU;EACjC;AACF;AACA;AACA;EACEzJ,IAAI,EAAE1C,SAAS,CAAC8L,IAAI;EACpB;AACF;AACA;EACEvF,UAAU,EAAEvG,SAAS,CAAC,sCAAsCoE,KAAK,CAAC;IAChE8H,SAAS,EAAEjM,uBAAuB;IAClCmD,KAAK,EAAEpD,SAAS,CAACoM;EACnB,CAAC,CAAC;EACF;AACF;AACA;EACE5F,cAAc,EAAExG,SAAS,CAACoM,MAAM;EAChC;AACF;AACA;AACA;AACA;EACE3F,cAAc,EAAEzG,SAAS,CAACiM,MAAM;EAChC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEvF,kBAAkB,EAAE1G,SAAS,CAAC4L,SAAS,CAAC,CAAC5L,SAAS,CAACiM,MAAM,EAAEjM,SAAS,CAACoE,KAAK,CAAC;IACzEiI,MAAM,EAAErM,SAAS,CAACiM,MAAM;IACxB3G,KAAK,EAAEtF,SAAS,CAACiM,MAAM;IACvBvG,IAAI,EAAE1F,SAAS,CAACiM;EAClB,CAAC,CAAC,CAAC,CAAC;EACJ;AACF;AACA;EACEtF,OAAO,EAAE3G,SAAS,CAAC+L,KAAK,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,WAAW,CAAC;AACnE,CAAC,GAAG,KAAK,CAAC;AACV,eAAejH,eAAe","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |