Files
ETB/ETB-FrontEnd/node_modules/.cache/babel-loader/98eac2347d1b1952e46c7c95db727f9385ba3a79b6c566aee89a491b55bc8663.json
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

1 line
66 KiB
JSON

{"ast":null,"code":"'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useControlled as useControlled, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible, visuallyHidden, clamp } from '@mui/utils';\nimport { areArraysEqual, extractEventHandlers } from '../utils';\nconst INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\nfunction asc(a, b) {\n return a - b;\n}\nfunction findClosest(values, currentValue) {\n var _values$reduce;\n const {\n index: closestIndex\n } = (_values$reduce = values.reduce((acc, value, index) => {\n const distance = Math.abs(currentValue - value);\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance,\n index\n };\n }\n return acc;\n }, null)) != null ? _values$reduce : {};\n return closestIndex;\n}\nfunction trackFinger(event, touchId) {\n // The event is TouchEvent\n if (touchId.current !== undefined && event.changedTouches) {\n const touchEvent = event;\n for (let i = 0; i < touchEvent.changedTouches.length; i += 1) {\n const touch = touchEvent.changedTouches[i];\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n\n // The event is MouseEvent\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nexport function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n const parts = num.toExponential().split('e-');\n const matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n const decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\nfunction roundValueToStep(value, step, min) {\n const nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\nfunction setValueIndex({\n values,\n newValue,\n index\n}) {\n const output = values.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\nfunction focusThumb({\n sliderRef,\n activeIndex,\n setActive\n}) {\n var _sliderRef$current, _doc$activeElement;\n const doc = ownerDocument(sliderRef.current);\n if (!((_sliderRef$current = sliderRef.current) != null && _sliderRef$current.contains(doc.activeElement)) || Number(doc == null || (_doc$activeElement = doc.activeElement) == null ? void 0 : _doc$activeElement.getAttribute('data-index')) !== activeIndex) {\n var _sliderRef$current2;\n (_sliderRef$current2 = sliderRef.current) == null || _sliderRef$current2.querySelector(`[type=\"range\"][data-index=\"${activeIndex}\"]`).focus();\n }\n if (setActive) {\n setActive(activeIndex);\n }\n}\nfunction areValuesEqual(newValue, oldValue) {\n if (typeof newValue === 'number' && typeof oldValue === 'number') {\n return newValue === oldValue;\n }\n if (typeof newValue === 'object' && typeof oldValue === 'object') {\n return areArraysEqual(newValue, oldValue);\n }\n return false;\n}\nconst axisProps = {\n horizontal: {\n offset: percent => ({\n left: `${percent}%`\n }),\n leap: percent => ({\n width: `${percent}%`\n })\n },\n 'horizontal-reverse': {\n offset: percent => ({\n right: `${percent}%`\n }),\n leap: percent => ({\n width: `${percent}%`\n })\n },\n vertical: {\n offset: percent => ({\n bottom: `${percent}%`\n }),\n leap: percent => ({\n height: `${percent}%`\n })\n }\n};\nexport const Identity = x => x;\n\n// TODO: remove support for Safari < 13.\n// https://caniuse.com/#search=touch-action\n//\n// Safari, on iOS, supports touch action since v13.\n// Over 80% of the iOS phones are compatible\n// in August 2020.\n// Utilizing the CSS.supports method to check if touch-action is supported.\n// Since CSS.supports is supported on all but Edge@12 and IE and touch-action\n// is supported on both Edge@12 and IE if CSS.supports is not available that means that\n// touch-action will be supported\nlet cachedSupportsTouchActionNone;\nfunction doesSupportTouchActionNone() {\n if (cachedSupportsTouchActionNone === undefined) {\n if (typeof CSS !== 'undefined' && typeof CSS.supports === 'function') {\n cachedSupportsTouchActionNone = CSS.supports('touch-action', 'none');\n } else {\n cachedSupportsTouchActionNone = true;\n }\n }\n return cachedSupportsTouchActionNone;\n}\n/**\n *\n * Demos:\n *\n * - [Slider](https://mui.com/base-ui/react-slider/#hook)\n *\n * API:\n *\n * - [useSlider API](https://mui.com/base-ui/react-slider/hooks-api/#use-slider)\n */\nexport function useSlider(parameters) {\n const {\n 'aria-labelledby': ariaLabelledby,\n defaultValue,\n disabled = false,\n disableSwap = false,\n isRtl = false,\n marks: marksProp = false,\n max = 100,\n min = 0,\n name,\n onChange,\n onChangeCommitted,\n orientation = 'horizontal',\n rootRef: ref,\n scale = Identity,\n step = 1,\n shiftStep = 10,\n tabIndex,\n value: valueProp\n } = parameters;\n const touchId = React.useRef();\n // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transferred when inversing a range slider.\n const [active, setActive] = React.useState(-1);\n const [open, setOpen] = React.useState(-1);\n const [dragging, setDragging] = React.useState(false);\n const moveCount = React.useRef(0);\n const [valueDerived, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue != null ? defaultValue : min,\n name: 'Slider'\n });\n const handleChange = onChange && ((event, value, thumbIndex) => {\n // Redefine target to allow name and value to be read.\n // This allows seamless integration with the most popular form libraries.\n // https://github.com/mui/material-ui/issues/13485#issuecomment-676048492\n // Clone the event to not override `target` of the original event.\n const nativeEvent = event.nativeEvent || event;\n // @ts-ignore The nativeEvent is function, not object\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: {\n value,\n name\n }\n });\n onChange(clonedEvent, value, thumbIndex);\n });\n const range = Array.isArray(valueDerived);\n let values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(value => value == null ? min : clamp(value, min, max));\n const marks = marksProp === true && step !== null ? [...Array(Math.floor((max - min) / step) + 1)].map((_, index) => ({\n value: min + step * index\n })) : marksProp || [];\n const marksValues = marks.map(mark => mark.value);\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);\n const sliderRef = React.useRef();\n const handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n const handleRef = useForkRef(ref, handleFocusRef);\n const createHandleHiddenInputFocus = otherHandlers => event => {\n var _otherHandlers$onFocu;\n const index = Number(event.currentTarget.getAttribute('data-index'));\n handleFocusVisible(event);\n if (isFocusVisibleRef.current === true) {\n setFocusedThumbIndex(index);\n }\n setOpen(index);\n otherHandlers == null || (_otherHandlers$onFocu = otherHandlers.onFocus) == null || _otherHandlers$onFocu.call(otherHandlers, event);\n };\n const createHandleHiddenInputBlur = otherHandlers => event => {\n var _otherHandlers$onBlur;\n handleBlurVisible(event);\n if (isFocusVisibleRef.current === false) {\n setFocusedThumbIndex(-1);\n }\n setOpen(-1);\n otherHandlers == null || (_otherHandlers$onBlur = otherHandlers.onBlur) == null || _otherHandlers$onBlur.call(otherHandlers, event);\n };\n const changeValue = (event, valueInput) => {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n const value = values[index];\n const marksIndex = marksValues.indexOf(value);\n let newValue = valueInput;\n if (marks && step == null) {\n const maxMarksValue = marksValues[marksValues.length - 1];\n if (newValue > maxMarksValue) {\n newValue = maxMarksValue;\n } else if (newValue < marksValues[0]) {\n newValue = marksValues[0];\n } else {\n newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];\n }\n }\n newValue = clamp(newValue, min, max);\n if (range) {\n // Bound the new value to the thumb's neighbours.\n if (disableSwap) {\n newValue = clamp(newValue, values[index - 1] || -Infinity, values[index + 1] || Infinity);\n }\n const previousValue = newValue;\n newValue = setValueIndex({\n values,\n newValue,\n index\n });\n let activeIndex = index;\n\n // Potentially swap the index if needed.\n if (!disableSwap) {\n activeIndex = newValue.indexOf(previousValue);\n }\n focusThumb({\n sliderRef,\n activeIndex\n });\n }\n setValueState(newValue);\n setFocusedThumbIndex(index);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(event, newValue, index);\n }\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n };\n const createHandleHiddenInputKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n // The Shift + Up/Down keyboard shortcuts for moving the slider makes sense to be supported\n // only if the step is defined. If the step is null, this means tha the marks are used for specifying the valid values.\n if (step !== null) {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n const value = values[index];\n let newValue = null;\n if ((event.key === 'ArrowLeft' || event.key === 'ArrowDown') && event.shiftKey || event.key === 'PageDown') {\n newValue = Math.max(value - shiftStep, min);\n } else if ((event.key === 'ArrowRight' || event.key === 'ArrowUp') && event.shiftKey || event.key === 'PageUp') {\n newValue = Math.min(value + shiftStep, max);\n }\n if (newValue !== null) {\n changeValue(event, newValue);\n event.preventDefault();\n }\n }\n otherHandlers == null || (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n };\n useEnhancedEffect(() => {\n if (disabled && sliderRef.current.contains(document.activeElement)) {\n var _document$activeEleme;\n // This is necessary because Firefox and Safari will keep focus\n // on a disabled element:\n // https://codesandbox.io/p/sandbox/mui-pr-22247-forked-h151h?file=/src/App.js\n // @ts-ignore\n (_document$activeEleme = document.activeElement) == null || _document$activeEleme.blur();\n }\n }, [disabled]);\n if (disabled && active !== -1) {\n setActive(-1);\n }\n if (disabled && focusedThumbIndex !== -1) {\n setFocusedThumbIndex(-1);\n }\n const createHandleHiddenInputChange = otherHandlers => event => {\n var _otherHandlers$onChan;\n (_otherHandlers$onChan = otherHandlers.onChange) == null || _otherHandlers$onChan.call(otherHandlers, event);\n // @ts-ignore\n changeValue(event, event.target.valueAsNumber);\n };\n const previousIndex = React.useRef();\n let axis = orientation;\n if (isRtl && orientation === 'horizontal') {\n axis += '-reverse';\n }\n const getFingerNewValue = ({\n finger,\n move = false\n }) => {\n const {\n current: slider\n } = sliderRef;\n const {\n width,\n height,\n bottom,\n left\n } = slider.getBoundingClientRect();\n let percent;\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n let newValue;\n newValue = percentToValue(percent, min, max);\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n const closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n newValue = clamp(newValue, min, max);\n let activeIndex = 0;\n if (range) {\n if (!move) {\n activeIndex = findClosest(values, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n // Bound the new value to the thumb's neighbours.\n if (disableSwap) {\n newValue = clamp(newValue, values[activeIndex - 1] || -Infinity, values[activeIndex + 1] || Infinity);\n }\n const previousValue = newValue;\n newValue = setValueIndex({\n values,\n newValue,\n index: activeIndex\n });\n\n // Potentially swap the index if needed.\n if (!(disableSwap && move)) {\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n }\n return {\n newValue,\n activeIndex\n };\n };\n const handleTouchMove = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId);\n if (!finger) {\n return;\n }\n moveCount.current += 1;\n\n // Cancel move in case some other element consumed a mouseup event and it was not fired.\n // @ts-ignore buttons doesn't not exists on touch event\n if (nativeEvent.type === 'mousemove' && nativeEvent.buttons === 0) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n handleTouchEnd(nativeEvent);\n return;\n }\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger,\n move: true\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n setDragging(true);\n }\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(nativeEvent, newValue, activeIndex);\n }\n });\n const handleTouchEnd = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId);\n setDragging(false);\n if (!finger) {\n return;\n }\n const {\n newValue\n } = getFingerNewValue({\n finger,\n move: true\n });\n setActive(-1);\n if (nativeEvent.type === 'touchend') {\n setOpen(-1);\n }\n if (onChangeCommitted) {\n onChangeCommitted(nativeEvent, newValue);\n }\n touchId.current = undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n stopListening();\n });\n const handleTouchStart = useEventCallback(nativeEvent => {\n if (disabled) {\n return;\n }\n // If touch-action: none; is not supported we need to prevent the scroll manually.\n if (!doesSupportTouchActionNone()) {\n nativeEvent.preventDefault();\n }\n const touch = nativeEvent.changedTouches[0];\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n const finger = trackFinger(nativeEvent, touchId);\n if (finger !== false) {\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(nativeEvent, newValue, activeIndex);\n }\n }\n moveCount.current = 0;\n const doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove, {\n passive: true\n });\n doc.addEventListener('touchend', handleTouchEnd, {\n passive: true\n });\n });\n const stopListening = React.useCallback(() => {\n const doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n }, [handleTouchEnd, handleTouchMove]);\n React.useEffect(() => {\n const {\n current: slider\n } = sliderRef;\n slider.addEventListener('touchstart', handleTouchStart, {\n passive: doesSupportTouchActionNone()\n });\n return () => {\n slider.removeEventListener('touchstart', handleTouchStart);\n stopListening();\n };\n }, [stopListening, handleTouchStart]);\n React.useEffect(() => {\n if (disabled) {\n stopListening();\n }\n }, [disabled, stopListening]);\n const createHandleMouseDown = otherHandlers => event => {\n var _otherHandlers$onMous;\n (_otherHandlers$onMous = otherHandlers.onMouseDown) == null || _otherHandlers$onMous.call(otherHandlers, event);\n if (disabled) {\n return;\n }\n if (event.defaultPrevented) {\n return;\n }\n\n // Only handle left clicks\n if (event.button !== 0) {\n return;\n }\n\n // Avoid text selection\n event.preventDefault();\n const finger = trackFinger(event, touchId);\n if (finger !== false) {\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(event, newValue, activeIndex);\n }\n }\n moveCount.current = 0;\n const doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove, {\n passive: true\n });\n doc.addEventListener('mouseup', handleTouchEnd);\n };\n const trackOffset = valueToPercent(range ? values[0] : min, min, max);\n const trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n const getRootProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onMouseDown: createHandleMouseDown(externalHandlers || {})\n };\n const mergedEventHandlers = _extends({}, externalHandlers, ownEventHandlers);\n return _extends({}, externalProps, {\n ref: handleRef\n }, mergedEventHandlers);\n };\n const createHandleMouseOver = otherHandlers => event => {\n var _otherHandlers$onMous2;\n (_otherHandlers$onMous2 = otherHandlers.onMouseOver) == null || _otherHandlers$onMous2.call(otherHandlers, event);\n const index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n };\n const createHandleMouseLeave = otherHandlers => event => {\n var _otherHandlers$onMous3;\n (_otherHandlers$onMous3 = otherHandlers.onMouseLeave) == null || _otherHandlers$onMous3.call(otherHandlers, event);\n setOpen(-1);\n };\n const getThumbProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onMouseOver: createHandleMouseOver(externalHandlers || {}),\n onMouseLeave: createHandleMouseLeave(externalHandlers || {})\n };\n return _extends({}, externalProps, externalHandlers, ownEventHandlers);\n };\n const getThumbStyle = index => {\n return {\n // So the non active thumb doesn't show its label on hover.\n pointerEvents: active !== -1 && active !== index ? 'none' : undefined\n };\n };\n const getHiddenInputProps = (externalProps = {}) => {\n var _parameters$step;\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onChange: createHandleHiddenInputChange(externalHandlers || {}),\n onFocus: createHandleHiddenInputFocus(externalHandlers || {}),\n onBlur: createHandleHiddenInputBlur(externalHandlers || {}),\n onKeyDown: createHandleHiddenInputKeyDown(externalHandlers || {})\n };\n const mergedEventHandlers = _extends({}, externalHandlers, ownEventHandlers);\n return _extends({\n tabIndex,\n 'aria-labelledby': ariaLabelledby,\n 'aria-orientation': orientation,\n 'aria-valuemax': scale(max),\n 'aria-valuemin': scale(min),\n name,\n type: 'range',\n min: parameters.min,\n max: parameters.max,\n step: parameters.step === null && parameters.marks ? 'any' : (_parameters$step = parameters.step) != null ? _parameters$step : undefined,\n disabled\n }, externalProps, mergedEventHandlers, {\n style: _extends({}, visuallyHidden, {\n direction: isRtl ? 'rtl' : 'ltr',\n // So that VoiceOver's focus indicator matches the thumb's dimensions\n width: '100%',\n height: '100%'\n })\n });\n };\n return {\n active,\n axis: axis,\n axisProps,\n dragging,\n focusedThumbIndex,\n getHiddenInputProps,\n getRootProps,\n getThumbProps,\n marks: marks,\n open,\n range,\n rootRef: handleRef,\n trackLeap,\n trackOffset,\n values,\n getThumbStyle\n };\n}","map":{"version":3,"names":["_extends","React","unstable_ownerDocument","ownerDocument","unstable_useControlled","useControlled","unstable_useEnhancedEffect","useEnhancedEffect","unstable_useEventCallback","useEventCallback","unstable_useForkRef","useForkRef","unstable_useIsFocusVisible","useIsFocusVisible","visuallyHidden","clamp","areArraysEqual","extractEventHandlers","INTENTIONAL_DRAG_COUNT_THRESHOLD","asc","a","b","findClosest","values","currentValue","_values$reduce","index","closestIndex","reduce","acc","value","distance","Math","abs","trackFinger","event","touchId","current","undefined","changedTouches","touchEvent","i","length","touch","identifier","x","clientX","y","clientY","valueToPercent","min","max","percentToValue","percent","getDecimalPrecision","num","parts","toExponential","split","matissaDecimalPart","parseInt","decimalPart","toString","roundValueToStep","step","nearest","round","Number","toFixed","setValueIndex","newValue","output","slice","sort","focusThumb","sliderRef","activeIndex","setActive","_sliderRef$current","_doc$activeElement","doc","contains","activeElement","getAttribute","_sliderRef$current2","querySelector","focus","areValuesEqual","oldValue","axisProps","horizontal","offset","left","leap","width","right","vertical","bottom","height","Identity","cachedSupportsTouchActionNone","doesSupportTouchActionNone","CSS","supports","useSlider","parameters","ariaLabelledby","defaultValue","disabled","disableSwap","isRtl","marks","marksProp","name","onChange","onChangeCommitted","orientation","rootRef","ref","scale","shiftStep","tabIndex","valueProp","useRef","active","useState","open","setOpen","dragging","setDragging","moveCount","valueDerived","setValueState","controlled","default","handleChange","thumbIndex","nativeEvent","clonedEvent","constructor","type","Object","defineProperty","writable","range","Array","isArray","map","floor","_","marksValues","mark","isFocusVisibleRef","onBlur","handleBlurVisible","onFocus","handleFocusVisible","focusVisibleRef","focusedThumbIndex","setFocusedThumbIndex","handleFocusRef","handleRef","createHandleHiddenInputFocus","otherHandlers","_otherHandlers$onFocu","currentTarget","call","createHandleHiddenInputBlur","_otherHandlers$onBlur","changeValue","valueInput","marksIndex","indexOf","maxMarksValue","Infinity","previousValue","createHandleHiddenInputKeyDown","_otherHandlers$onKeyD","key","shiftKey","preventDefault","onKeyDown","document","_document$activeEleme","blur","createHandleHiddenInputChange","_otherHandlers$onChan","target","valueAsNumber","previousIndex","axis","getFingerNewValue","finger","move","slider","getBoundingClientRect","handleTouchMove","buttons","handleTouchEnd","stopListening","handleTouchStart","addEventListener","passive","useCallback","removeEventListener","useEffect","createHandleMouseDown","_otherHandlers$onMous","onMouseDown","defaultPrevented","button","trackOffset","trackLeap","getRootProps","externalProps","externalHandlers","ownEventHandlers","mergedEventHandlers","createHandleMouseOver","_otherHandlers$onMous2","onMouseOver","createHandleMouseLeave","_otherHandlers$onMous3","onMouseLeave","getThumbProps","getThumbStyle","pointerEvents","getHiddenInputProps","_parameters$step","style","direction"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/base/useSlider/useSlider.js"],"sourcesContent":["'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useControlled as useControlled, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_useIsFocusVisible as useIsFocusVisible, visuallyHidden, clamp } from '@mui/utils';\nimport { areArraysEqual, extractEventHandlers } from '../utils';\nconst INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\nfunction asc(a, b) {\n return a - b;\n}\nfunction findClosest(values, currentValue) {\n var _values$reduce;\n const {\n index: closestIndex\n } = (_values$reduce = values.reduce((acc, value, index) => {\n const distance = Math.abs(currentValue - value);\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance,\n index\n };\n }\n return acc;\n }, null)) != null ? _values$reduce : {};\n return closestIndex;\n}\nfunction trackFinger(event, touchId) {\n // The event is TouchEvent\n if (touchId.current !== undefined && event.changedTouches) {\n const touchEvent = event;\n for (let i = 0; i < touchEvent.changedTouches.length; i += 1) {\n const touch = touchEvent.changedTouches[i];\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n\n // The event is MouseEvent\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nexport function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n const parts = num.toExponential().split('e-');\n const matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n const decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\nfunction roundValueToStep(value, step, min) {\n const nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\nfunction setValueIndex({\n values,\n newValue,\n index\n}) {\n const output = values.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\nfunction focusThumb({\n sliderRef,\n activeIndex,\n setActive\n}) {\n var _sliderRef$current, _doc$activeElement;\n const doc = ownerDocument(sliderRef.current);\n if (!((_sliderRef$current = sliderRef.current) != null && _sliderRef$current.contains(doc.activeElement)) || Number(doc == null || (_doc$activeElement = doc.activeElement) == null ? void 0 : _doc$activeElement.getAttribute('data-index')) !== activeIndex) {\n var _sliderRef$current2;\n (_sliderRef$current2 = sliderRef.current) == null || _sliderRef$current2.querySelector(`[type=\"range\"][data-index=\"${activeIndex}\"]`).focus();\n }\n if (setActive) {\n setActive(activeIndex);\n }\n}\nfunction areValuesEqual(newValue, oldValue) {\n if (typeof newValue === 'number' && typeof oldValue === 'number') {\n return newValue === oldValue;\n }\n if (typeof newValue === 'object' && typeof oldValue === 'object') {\n return areArraysEqual(newValue, oldValue);\n }\n return false;\n}\nconst axisProps = {\n horizontal: {\n offset: percent => ({\n left: `${percent}%`\n }),\n leap: percent => ({\n width: `${percent}%`\n })\n },\n 'horizontal-reverse': {\n offset: percent => ({\n right: `${percent}%`\n }),\n leap: percent => ({\n width: `${percent}%`\n })\n },\n vertical: {\n offset: percent => ({\n bottom: `${percent}%`\n }),\n leap: percent => ({\n height: `${percent}%`\n })\n }\n};\nexport const Identity = x => x;\n\n// TODO: remove support for Safari < 13.\n// https://caniuse.com/#search=touch-action\n//\n// Safari, on iOS, supports touch action since v13.\n// Over 80% of the iOS phones are compatible\n// in August 2020.\n// Utilizing the CSS.supports method to check if touch-action is supported.\n// Since CSS.supports is supported on all but Edge@12 and IE and touch-action\n// is supported on both Edge@12 and IE if CSS.supports is not available that means that\n// touch-action will be supported\nlet cachedSupportsTouchActionNone;\nfunction doesSupportTouchActionNone() {\n if (cachedSupportsTouchActionNone === undefined) {\n if (typeof CSS !== 'undefined' && typeof CSS.supports === 'function') {\n cachedSupportsTouchActionNone = CSS.supports('touch-action', 'none');\n } else {\n cachedSupportsTouchActionNone = true;\n }\n }\n return cachedSupportsTouchActionNone;\n}\n/**\n *\n * Demos:\n *\n * - [Slider](https://mui.com/base-ui/react-slider/#hook)\n *\n * API:\n *\n * - [useSlider API](https://mui.com/base-ui/react-slider/hooks-api/#use-slider)\n */\nexport function useSlider(parameters) {\n const {\n 'aria-labelledby': ariaLabelledby,\n defaultValue,\n disabled = false,\n disableSwap = false,\n isRtl = false,\n marks: marksProp = false,\n max = 100,\n min = 0,\n name,\n onChange,\n onChangeCommitted,\n orientation = 'horizontal',\n rootRef: ref,\n scale = Identity,\n step = 1,\n shiftStep = 10,\n tabIndex,\n value: valueProp\n } = parameters;\n const touchId = React.useRef();\n // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transferred when inversing a range slider.\n const [active, setActive] = React.useState(-1);\n const [open, setOpen] = React.useState(-1);\n const [dragging, setDragging] = React.useState(false);\n const moveCount = React.useRef(0);\n const [valueDerived, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue != null ? defaultValue : min,\n name: 'Slider'\n });\n const handleChange = onChange && ((event, value, thumbIndex) => {\n // Redefine target to allow name and value to be read.\n // This allows seamless integration with the most popular form libraries.\n // https://github.com/mui/material-ui/issues/13485#issuecomment-676048492\n // Clone the event to not override `target` of the original event.\n const nativeEvent = event.nativeEvent || event;\n // @ts-ignore The nativeEvent is function, not object\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: {\n value,\n name\n }\n });\n onChange(clonedEvent, value, thumbIndex);\n });\n const range = Array.isArray(valueDerived);\n let values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(value => value == null ? min : clamp(value, min, max));\n const marks = marksProp === true && step !== null ? [...Array(Math.floor((max - min) / step) + 1)].map((_, index) => ({\n value: min + step * index\n })) : marksProp || [];\n const marksValues = marks.map(mark => mark.value);\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = useIsFocusVisible();\n const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);\n const sliderRef = React.useRef();\n const handleFocusRef = useForkRef(focusVisibleRef, sliderRef);\n const handleRef = useForkRef(ref, handleFocusRef);\n const createHandleHiddenInputFocus = otherHandlers => event => {\n var _otherHandlers$onFocu;\n const index = Number(event.currentTarget.getAttribute('data-index'));\n handleFocusVisible(event);\n if (isFocusVisibleRef.current === true) {\n setFocusedThumbIndex(index);\n }\n setOpen(index);\n otherHandlers == null || (_otherHandlers$onFocu = otherHandlers.onFocus) == null || _otherHandlers$onFocu.call(otherHandlers, event);\n };\n const createHandleHiddenInputBlur = otherHandlers => event => {\n var _otherHandlers$onBlur;\n handleBlurVisible(event);\n if (isFocusVisibleRef.current === false) {\n setFocusedThumbIndex(-1);\n }\n setOpen(-1);\n otherHandlers == null || (_otherHandlers$onBlur = otherHandlers.onBlur) == null || _otherHandlers$onBlur.call(otherHandlers, event);\n };\n const changeValue = (event, valueInput) => {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n const value = values[index];\n const marksIndex = marksValues.indexOf(value);\n let newValue = valueInput;\n if (marks && step == null) {\n const maxMarksValue = marksValues[marksValues.length - 1];\n if (newValue > maxMarksValue) {\n newValue = maxMarksValue;\n } else if (newValue < marksValues[0]) {\n newValue = marksValues[0];\n } else {\n newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];\n }\n }\n newValue = clamp(newValue, min, max);\n if (range) {\n // Bound the new value to the thumb's neighbours.\n if (disableSwap) {\n newValue = clamp(newValue, values[index - 1] || -Infinity, values[index + 1] || Infinity);\n }\n const previousValue = newValue;\n newValue = setValueIndex({\n values,\n newValue,\n index\n });\n let activeIndex = index;\n\n // Potentially swap the index if needed.\n if (!disableSwap) {\n activeIndex = newValue.indexOf(previousValue);\n }\n focusThumb({\n sliderRef,\n activeIndex\n });\n }\n setValueState(newValue);\n setFocusedThumbIndex(index);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(event, newValue, index);\n }\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n };\n const createHandleHiddenInputKeyDown = otherHandlers => event => {\n var _otherHandlers$onKeyD;\n // The Shift + Up/Down keyboard shortcuts for moving the slider makes sense to be supported\n // only if the step is defined. If the step is null, this means tha the marks are used for specifying the valid values.\n if (step !== null) {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n const value = values[index];\n let newValue = null;\n if ((event.key === 'ArrowLeft' || event.key === 'ArrowDown') && event.shiftKey || event.key === 'PageDown') {\n newValue = Math.max(value - shiftStep, min);\n } else if ((event.key === 'ArrowRight' || event.key === 'ArrowUp') && event.shiftKey || event.key === 'PageUp') {\n newValue = Math.min(value + shiftStep, max);\n }\n if (newValue !== null) {\n changeValue(event, newValue);\n event.preventDefault();\n }\n }\n otherHandlers == null || (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);\n };\n useEnhancedEffect(() => {\n if (disabled && sliderRef.current.contains(document.activeElement)) {\n var _document$activeEleme;\n // This is necessary because Firefox and Safari will keep focus\n // on a disabled element:\n // https://codesandbox.io/p/sandbox/mui-pr-22247-forked-h151h?file=/src/App.js\n // @ts-ignore\n (_document$activeEleme = document.activeElement) == null || _document$activeEleme.blur();\n }\n }, [disabled]);\n if (disabled && active !== -1) {\n setActive(-1);\n }\n if (disabled && focusedThumbIndex !== -1) {\n setFocusedThumbIndex(-1);\n }\n const createHandleHiddenInputChange = otherHandlers => event => {\n var _otherHandlers$onChan;\n (_otherHandlers$onChan = otherHandlers.onChange) == null || _otherHandlers$onChan.call(otherHandlers, event);\n // @ts-ignore\n changeValue(event, event.target.valueAsNumber);\n };\n const previousIndex = React.useRef();\n let axis = orientation;\n if (isRtl && orientation === 'horizontal') {\n axis += '-reverse';\n }\n const getFingerNewValue = ({\n finger,\n move = false\n }) => {\n const {\n current: slider\n } = sliderRef;\n const {\n width,\n height,\n bottom,\n left\n } = slider.getBoundingClientRect();\n let percent;\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n let newValue;\n newValue = percentToValue(percent, min, max);\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n const closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n newValue = clamp(newValue, min, max);\n let activeIndex = 0;\n if (range) {\n if (!move) {\n activeIndex = findClosest(values, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n // Bound the new value to the thumb's neighbours.\n if (disableSwap) {\n newValue = clamp(newValue, values[activeIndex - 1] || -Infinity, values[activeIndex + 1] || Infinity);\n }\n const previousValue = newValue;\n newValue = setValueIndex({\n values,\n newValue,\n index: activeIndex\n });\n\n // Potentially swap the index if needed.\n if (!(disableSwap && move)) {\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n }\n return {\n newValue,\n activeIndex\n };\n };\n const handleTouchMove = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId);\n if (!finger) {\n return;\n }\n moveCount.current += 1;\n\n // Cancel move in case some other element consumed a mouseup event and it was not fired.\n // @ts-ignore buttons doesn't not exists on touch event\n if (nativeEvent.type === 'mousemove' && nativeEvent.buttons === 0) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n handleTouchEnd(nativeEvent);\n return;\n }\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger,\n move: true\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n setDragging(true);\n }\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(nativeEvent, newValue, activeIndex);\n }\n });\n const handleTouchEnd = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId);\n setDragging(false);\n if (!finger) {\n return;\n }\n const {\n newValue\n } = getFingerNewValue({\n finger,\n move: true\n });\n setActive(-1);\n if (nativeEvent.type === 'touchend') {\n setOpen(-1);\n }\n if (onChangeCommitted) {\n onChangeCommitted(nativeEvent, newValue);\n }\n touchId.current = undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n stopListening();\n });\n const handleTouchStart = useEventCallback(nativeEvent => {\n if (disabled) {\n return;\n }\n // If touch-action: none; is not supported we need to prevent the scroll manually.\n if (!doesSupportTouchActionNone()) {\n nativeEvent.preventDefault();\n }\n const touch = nativeEvent.changedTouches[0];\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n const finger = trackFinger(nativeEvent, touchId);\n if (finger !== false) {\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(nativeEvent, newValue, activeIndex);\n }\n }\n moveCount.current = 0;\n const doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove, {\n passive: true\n });\n doc.addEventListener('touchend', handleTouchEnd, {\n passive: true\n });\n });\n const stopListening = React.useCallback(() => {\n const doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n }, [handleTouchEnd, handleTouchMove]);\n React.useEffect(() => {\n const {\n current: slider\n } = sliderRef;\n slider.addEventListener('touchstart', handleTouchStart, {\n passive: doesSupportTouchActionNone()\n });\n return () => {\n slider.removeEventListener('touchstart', handleTouchStart);\n stopListening();\n };\n }, [stopListening, handleTouchStart]);\n React.useEffect(() => {\n if (disabled) {\n stopListening();\n }\n }, [disabled, stopListening]);\n const createHandleMouseDown = otherHandlers => event => {\n var _otherHandlers$onMous;\n (_otherHandlers$onMous = otherHandlers.onMouseDown) == null || _otherHandlers$onMous.call(otherHandlers, event);\n if (disabled) {\n return;\n }\n if (event.defaultPrevented) {\n return;\n }\n\n // Only handle left clicks\n if (event.button !== 0) {\n return;\n }\n\n // Avoid text selection\n event.preventDefault();\n const finger = trackFinger(event, touchId);\n if (finger !== false) {\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(event, newValue, activeIndex);\n }\n }\n moveCount.current = 0;\n const doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove, {\n passive: true\n });\n doc.addEventListener('mouseup', handleTouchEnd);\n };\n const trackOffset = valueToPercent(range ? values[0] : min, min, max);\n const trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n const getRootProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onMouseDown: createHandleMouseDown(externalHandlers || {})\n };\n const mergedEventHandlers = _extends({}, externalHandlers, ownEventHandlers);\n return _extends({}, externalProps, {\n ref: handleRef\n }, mergedEventHandlers);\n };\n const createHandleMouseOver = otherHandlers => event => {\n var _otherHandlers$onMous2;\n (_otherHandlers$onMous2 = otherHandlers.onMouseOver) == null || _otherHandlers$onMous2.call(otherHandlers, event);\n const index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n };\n const createHandleMouseLeave = otherHandlers => event => {\n var _otherHandlers$onMous3;\n (_otherHandlers$onMous3 = otherHandlers.onMouseLeave) == null || _otherHandlers$onMous3.call(otherHandlers, event);\n setOpen(-1);\n };\n const getThumbProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onMouseOver: createHandleMouseOver(externalHandlers || {}),\n onMouseLeave: createHandleMouseLeave(externalHandlers || {})\n };\n return _extends({}, externalProps, externalHandlers, ownEventHandlers);\n };\n const getThumbStyle = index => {\n return {\n // So the non active thumb doesn't show its label on hover.\n pointerEvents: active !== -1 && active !== index ? 'none' : undefined\n };\n };\n const getHiddenInputProps = (externalProps = {}) => {\n var _parameters$step;\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onChange: createHandleHiddenInputChange(externalHandlers || {}),\n onFocus: createHandleHiddenInputFocus(externalHandlers || {}),\n onBlur: createHandleHiddenInputBlur(externalHandlers || {}),\n onKeyDown: createHandleHiddenInputKeyDown(externalHandlers || {})\n };\n const mergedEventHandlers = _extends({}, externalHandlers, ownEventHandlers);\n return _extends({\n tabIndex,\n 'aria-labelledby': ariaLabelledby,\n 'aria-orientation': orientation,\n 'aria-valuemax': scale(max),\n 'aria-valuemin': scale(min),\n name,\n type: 'range',\n min: parameters.min,\n max: parameters.max,\n step: parameters.step === null && parameters.marks ? 'any' : (_parameters$step = parameters.step) != null ? _parameters$step : undefined,\n disabled\n }, externalProps, mergedEventHandlers, {\n style: _extends({}, visuallyHidden, {\n direction: isRtl ? 'rtl' : 'ltr',\n // So that VoiceOver's focus indicator matches the thumb's dimensions\n width: '100%',\n height: '100%'\n })\n });\n };\n return {\n active,\n axis: axis,\n axisProps,\n dragging,\n focusedThumbIndex,\n getHiddenInputProps,\n getRootProps,\n getThumbProps,\n marks: marks,\n open,\n range,\n rootRef: handleRef,\n trackLeap,\n trackOffset,\n values,\n getThumbStyle\n };\n}"],"mappings":"AAAA,YAAY;;AAEZ,OAAOA,QAAQ,MAAM,oCAAoC;AACzD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,sBAAsB,IAAIC,aAAa,EAAEC,sBAAsB,IAAIC,aAAa,EAAEC,0BAA0B,IAAIC,iBAAiB,EAAEC,yBAAyB,IAAIC,gBAAgB,EAAEC,mBAAmB,IAAIC,UAAU,EAAEC,0BAA0B,IAAIC,iBAAiB,EAAEC,cAAc,EAAEC,KAAK,QAAQ,YAAY;AACxT,SAASC,cAAc,EAAEC,oBAAoB,QAAQ,UAAU;AAC/D,MAAMC,gCAAgC,GAAG,CAAC;AAC1C,SAASC,GAAGA,CAACC,CAAC,EAAEC,CAAC,EAAE;EACjB,OAAOD,CAAC,GAAGC,CAAC;AACd;AACA,SAASC,WAAWA,CAACC,MAAM,EAAEC,YAAY,EAAE;EACzC,IAAIC,cAAc;EAClB,MAAM;IACJC,KAAK,EAAEC;EACT,CAAC,GAAG,CAACF,cAAc,GAAGF,MAAM,CAACK,MAAM,CAAC,CAACC,GAAG,EAAEC,KAAK,EAAEJ,KAAK,KAAK;IACzD,MAAMK,QAAQ,GAAGC,IAAI,CAACC,GAAG,CAACT,YAAY,GAAGM,KAAK,CAAC;IAC/C,IAAID,GAAG,KAAK,IAAI,IAAIE,QAAQ,GAAGF,GAAG,CAACE,QAAQ,IAAIA,QAAQ,KAAKF,GAAG,CAACE,QAAQ,EAAE;MACxE,OAAO;QACLA,QAAQ;QACRL;MACF,CAAC;IACH;IACA,OAAOG,GAAG;EACZ,CAAC,EAAE,IAAI,CAAC,KAAK,IAAI,GAAGJ,cAAc,GAAG,CAAC,CAAC;EACvC,OAAOE,YAAY;AACrB;AACA,SAASO,WAAW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