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K,QACH,CACE,GAA4B,UAAxBgB,EAAQsC,YACV,OAAO7E,EAAM6F,OAAO7F,EAAMoW,SAASpW,EAAM+N,OAAQlD,OAAOtI,EAAQE,OAAS,GAAI,SAE/E,MAAMqV,EAAa9X,EAAM4S,MAAMrQ,EAAQE,MAAOF,EAAQsD,QACtD,OAAOiS,EAAa9X,EAAM6F,OAAOiS,EAAY,cAAWnR,CAC1D,CACF,IAAK,MACH,MAA+B,UAAxBpE,EAAQsC,YAA0B7E,EAAM6F,OAAO7F,EAAMoR,QAAQpR,EAAMkT,YAAYlT,EAAM+N,QAASlD,OAAOtI,EAAQE,QAAS,kBAAoBF,EAAQE,MAI3J,QACE,OACJ,EAEWsV,EAAqB,CAACxV,EAASvC,KAC1C,GAAKuC,EAAQE,MAGb,OAAQF,EAAQhB,MACd,IAAK,UAED,GAA4B,WAAxBgB,EAAQsC,YAEV,OAEF,OAAOgG,OAAOtI,EAAQE,OAE1B,IAAK,WACH,CACE,MAAMqV,EAAa9X,EAAM4S,MAAM,SAASrQ,EAAQE,QAAS,GAAGzC,EAAMgY,QAAQC,YAAYjY,EAAMgY,QAAQ/C,WAAW1S,EAAQsD,UACvH,OAAIiS,EACK9X,EAAMgV,SAAS8C,IAAe,GAAK,EAAI,OAEhD,CACF,CACF,IAAK,MACH,MAA+B,sBAAxBvV,EAAQsC,YAAsCiC,SAASvE,EAAQE,MAAO,IAAMoI,OAAOtI,EAAQE,OACpG,IAAK,QACH,CACE,GAA4B,UAAxBF,EAAQsC,YACV,OAAOgG,OAAOtI,EAAQE,OAExB,MAAMqV,EAAa9X,EAAM4S,MAAMrQ,EAAQE,MAAOF,EAAQsD,QACtD,OAAOiS,EAAa9X,EAAMuU,SAASuD,GAAc,OAAInR,CACvD,CACF,QACE,MAA+B,WAAxBpE,EAAQsC,YAA2BgG,OAAOtI,EAAQE,YAASkE,EACtE,C","sources":["webpack://netopia-payments/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldV7TextField.js","webpack://netopia-payments/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldV6TextField.js","webpack://netopia-payments/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.js","webpack://netopia-payments/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils.js"],"sourcesContent":["import * as React from 'react';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useId from '@mui/utils/useId';\nimport { getSectionValueNow, getSectionValueText, parseSelectedSections } from \"./useField.utils.js\";\nimport { getActiveElement } from \"../../utils/utils.js\";\nimport { usePickersTranslations } from \"../../../hooks/usePickersTranslations.js\";\nimport { useUtils } from \"../useUtils.js\";\nexport const useFieldV7TextField = params => {\n const {\n internalProps: {\n disabled,\n readOnly = false\n },\n forwardedProps: {\n sectionListRef: inSectionListRef,\n onBlur,\n onClick,\n onFocus,\n onInput,\n onPaste,\n focused: focusedProp,\n autoFocus = false\n },\n fieldValueManager,\n applyCharacterEditing,\n resetCharacterQuery,\n setSelectedSections,\n parsedSelectedSections,\n state,\n clearActiveSection,\n clearValue,\n updateSectionValue,\n updateValueFromValueStr,\n sectionOrder,\n areAllSectionsEmpty,\n sectionsValueBoundaries\n } = params;\n const sectionListRef = React.useRef(null);\n const handleSectionListRef = useForkRef(inSectionListRef, sectionListRef);\n const translations = usePickersTranslations();\n const utils = useUtils();\n const id = useId();\n const [focused, setFocused] = React.useState(false);\n const interactions = React.useMemo(() => ({\n syncSelectionToDOM: () => {\n if (!sectionListRef.current) {\n return;\n }\n const selection = document.getSelection();\n if (!selection) {\n return;\n }\n if (parsedSelectedSections == null) {\n // If the selection contains an element inside the field, we reset it.\n if (selection.rangeCount > 0 && sectionListRef.current.getRoot().contains(selection.getRangeAt(0).startContainer)) {\n selection.removeAllRanges();\n }\n if (focused) {\n sectionListRef.current.getRoot().blur();\n }\n return;\n }\n\n // On multi input range pickers we want to update selection range only for the active input\n if (!sectionListRef.current.getRoot().contains(getActiveElement(document))) {\n return;\n }\n const range = new window.Range();\n let target;\n if (parsedSelectedSections === 'all') {\n target = sectionListRef.current.getRoot();\n } else {\n const section = state.sections[parsedSelectedSections];\n if (section.type === 'empty') {\n target = sectionListRef.current.getSectionContainer(parsedSelectedSections);\n } else {\n target = sectionListRef.current.getSectionContent(parsedSelectedSections);\n }\n }\n range.selectNodeContents(target);\n target.focus();\n selection.removeAllRanges();\n selection.addRange(range);\n },\n getActiveSectionIndexFromDOM: () => {\n const activeElement = getActiveElement(document);\n if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {\n return null;\n }\n return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);\n },\n focusField: (newSelectedSections = 0) => {\n if (!sectionListRef.current ||\n // if the field is already focused, we don't need to focus it again\n interactions.getActiveSectionIndexFromDOM() != null) {\n return;\n }\n const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);\n setFocused(true);\n sectionListRef.current.getSectionContent(newParsedSelectedSections).focus();\n },\n setSelectedSections: newSelectedSections => {\n if (!sectionListRef.current) {\n return;\n }\n const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);\n const newActiveSectionIndex = newParsedSelectedSections === 'all' ? 0 : newParsedSelectedSections;\n setFocused(newActiveSectionIndex !== null);\n setSelectedSections(newSelectedSections);\n },\n isFieldFocused: () => {\n const activeElement = getActiveElement(document);\n return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);\n }\n }), [parsedSelectedSections, setSelectedSections, state.sections, focused]);\n\n /**\n * If a section content has been updated with a value we don't want to keep,\n * Then we need to imperatively revert it (we can't let React do it because the value did not change in his internal representation).\n */\n const revertDOMSectionChange = useEventCallback(sectionIndex => {\n if (!sectionListRef.current) {\n return;\n }\n const section = state.sections[sectionIndex];\n sectionListRef.current.getSectionContent(sectionIndex).innerHTML = section.value || section.placeholder;\n interactions.syncSelectionToDOM();\n });\n const handleContainerClick = useEventCallback((event, ...args) => {\n // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.\n // We avoid this by checking if the call of `handleContainerClick` is actually intended, or a side effect.\n if (event.isDefaultPrevented() || !sectionListRef.current) {\n return;\n }\n setFocused(true);\n onClick?.(event, ...args);\n if (parsedSelectedSections === 'all') {\n setTimeout(() => {\n const cursorPosition = document.getSelection().getRangeAt(0).startOffset;\n if (cursorPosition === 0) {\n setSelectedSections(sectionOrder.startIndex);\n return;\n }\n let sectionIndex = 0;\n let cursorOnStartOfSection = 0;\n while (cursorOnStartOfSection < cursorPosition && sectionIndex < state.sections.length) {\n const section = state.sections[sectionIndex];\n sectionIndex += 1;\n cursorOnStartOfSection += `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`.length;\n }\n setSelectedSections(sectionIndex - 1);\n });\n } else if (!focused) {\n setFocused(true);\n setSelectedSections(sectionOrder.startIndex);\n } else {\n const hasClickedOnASection = sectionListRef.current.getRoot().contains(event.target);\n if (!hasClickedOnASection) {\n setSelectedSections(sectionOrder.startIndex);\n }\n }\n });\n const handleContainerInput = useEventCallback(event => {\n onInput?.(event);\n if (!sectionListRef.current || parsedSelectedSections !== 'all') {\n return;\n }\n const target = event.target;\n const keyPressed = target.textContent ?? '';\n sectionListRef.current.getRoot().innerHTML = state.sections.map(section => `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`).join('');\n interactions.syncSelectionToDOM();\n if (keyPressed.length === 0 || keyPressed.charCodeAt(0) === 10) {\n resetCharacterQuery();\n clearValue();\n setSelectedSections('all');\n } else if (keyPressed.length > 1) {\n updateValueFromValueStr(keyPressed);\n } else {\n if (parsedSelectedSections === 'all') {\n setSelectedSections(0);\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex: 0\n });\n }\n });\n const handleContainerPaste = useEventCallback(event => {\n onPaste?.(event);\n if (readOnly || parsedSelectedSections !== 'all') {\n event.preventDefault();\n return;\n }\n const pastedValue = event.clipboardData.getData('text');\n event.preventDefault();\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n });\n const handleContainerFocus = useEventCallback((...args) => {\n onFocus?.(...args);\n if (focused || !sectionListRef.current) {\n return;\n }\n setFocused(true);\n const isFocusInsideASection = sectionListRef.current.getSectionIndexFromDOMElement(getActiveElement(document)) != null;\n if (!isFocusInsideASection) {\n setSelectedSections(sectionOrder.startIndex);\n }\n });\n const handleContainerBlur = useEventCallback((...args) => {\n onBlur?.(...args);\n setTimeout(() => {\n if (!sectionListRef.current) {\n return;\n }\n const activeElement = getActiveElement(document);\n const shouldBlur = !sectionListRef.current.getRoot().contains(activeElement);\n if (shouldBlur) {\n setFocused(false);\n setSelectedSections(null);\n }\n });\n });\n const getInputContainerClickHandler = useEventCallback(sectionIndex => event => {\n // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.\n // We avoid this by checking if the call to this function is actually intended, or a side effect.\n if (event.isDefaultPrevented()) {\n return;\n }\n setSelectedSections(sectionIndex);\n });\n const handleInputContentMouseUp = useEventCallback(event => {\n // Without this, the browser will remove the selected when clicking inside an already-selected section.\n event.preventDefault();\n });\n const getInputContentFocusHandler = useEventCallback(sectionIndex => () => {\n setSelectedSections(sectionIndex);\n });\n const handleInputContentPaste = useEventCallback(event => {\n // prevent default to avoid the input `onInput` handler being called\n event.preventDefault();\n if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {\n return;\n }\n const activeSection = state.sections[parsedSelectedSections];\n const pastedValue = event.clipboardData.getData('text');\n const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);\n const digitsOnly = /^[0-9]+$/.test(pastedValue);\n const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);\n const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;\n if (isValidPastedValue) {\n resetCharacterQuery();\n updateSectionValue({\n activeSection,\n newSectionValue: pastedValue,\n shouldGoToNextSection: true\n });\n }\n // If the pasted value corresponds to a single section, but not the expected type, we skip the modification\n else if (!lettersOnly && !digitsOnly) {\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n }\n });\n const handleInputContentDragOver = useEventCallback(event => {\n event.preventDefault();\n event.dataTransfer.dropEffect = 'none';\n });\n const handleInputContentInput = useEventCallback(event => {\n if (!sectionListRef.current) {\n return;\n }\n const target = event.target;\n const keyPressed = target.textContent ?? '';\n const sectionIndex = sectionListRef.current.getSectionIndexFromDOMElement(target);\n const section = state.sections[sectionIndex];\n if (readOnly || !sectionListRef.current) {\n revertDOMSectionChange(sectionIndex);\n return;\n }\n if (keyPressed.length === 0) {\n if (section.value === '') {\n revertDOMSectionChange(sectionIndex);\n return;\n }\n const inputType = event.nativeEvent.inputType;\n if (inputType === 'insertParagraph' || inputType === 'insertLineBreak') {\n revertDOMSectionChange(sectionIndex);\n return;\n }\n resetCharacterQuery();\n clearActiveSection();\n return;\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex\n });\n\n // The DOM value needs to remain the one React is expecting.\n revertDOMSectionChange(sectionIndex);\n });\n useEnhancedEffect(() => {\n if (!focused || !sectionListRef.current) {\n return;\n }\n if (parsedSelectedSections === 'all') {\n sectionListRef.current.getRoot().focus();\n } else if (typeof parsedSelectedSections === 'number') {\n const domElement = sectionListRef.current.getSectionContent(parsedSelectedSections);\n if (domElement) {\n domElement.focus();\n }\n }\n }, [parsedSelectedSections, focused]);\n const sectionBoundaries = React.useMemo(() => {\n return state.sections.reduce((acc, next) => {\n acc[next.type] = sectionsValueBoundaries[next.type]({\n currentDate: null,\n contentType: next.contentType,\n format: next.format\n });\n return acc;\n }, {});\n }, [sectionsValueBoundaries, state.sections]);\n const isContainerEditable = parsedSelectedSections === 'all';\n const elements = React.useMemo(() => {\n return state.sections.map((section, index) => {\n const isEditable = !isContainerEditable && !disabled && !readOnly;\n return {\n container: {\n 'data-sectionindex': index,\n onClick: getInputContainerClickHandler(index)\n },\n content: {\n tabIndex: isContainerEditable || index > 0 ? -1 : 0,\n contentEditable: !isContainerEditable && !disabled && !readOnly,\n role: 'spinbutton',\n id: `${id}-${section.type}`,\n 'aria-labelledby': `${id}-${section.type}`,\n 'aria-readonly': readOnly,\n 'aria-valuenow': getSectionValueNow(section, utils),\n 'aria-valuemin': sectionBoundaries[section.type].minimum,\n 'aria-valuemax': sectionBoundaries[section.type].maximum,\n 'aria-valuetext': section.value ? getSectionValueText(section, utils) : translations.empty,\n 'aria-label': translations[section.type],\n 'aria-disabled': disabled,\n spellCheck: isEditable ? false : undefined,\n autoCapitalize: isEditable ? 'off' : undefined,\n autoCorrect: isEditable ? 'off' : undefined,\n [parseInt(React.version, 10) >= 17 ? 'enterKeyHint' : 'enterkeyhint']: isEditable ? 'next' : undefined,\n children: section.value || section.placeholder,\n onInput: handleInputContentInput,\n onPaste: handleInputContentPaste,\n onFocus: getInputContentFocusHandler(index),\n onDragOver: handleInputContentDragOver,\n onMouseUp: handleInputContentMouseUp,\n inputMode: section.contentType === 'letter' ? 'text' : 'numeric'\n },\n before: {\n children: section.startSeparator\n },\n after: {\n children: section.endSeparator\n }\n };\n });\n }, [state.sections, getInputContentFocusHandler, handleInputContentPaste, handleInputContentDragOver, handleInputContentInput, getInputContainerClickHandler, handleInputContentMouseUp, disabled, readOnly, isContainerEditable, translations, utils, sectionBoundaries, id]);\n const handleValueStrChange = useEventCallback(event => {\n updateValueFromValueStr(event.target.value);\n });\n const valueStr = React.useMemo(() => areAllSectionsEmpty ? '' : fieldValueManager.getV7HiddenInputValueFromSections(state.sections), [areAllSectionsEmpty, state.sections, fieldValueManager]);\n React.useEffect(() => {\n if (sectionListRef.current == null) {\n throw new Error(['MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`', 'You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.', '', 'If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:', '', '', '', 'Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element'].join('\\n'));\n }\n if (autoFocus && sectionListRef.current) {\n sectionListRef.current.getSectionContent(sectionOrder.startIndex).focus();\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n interactions,\n returnedValue: {\n // Forwarded\n autoFocus,\n readOnly,\n focused: focusedProp ?? focused,\n sectionListRef: handleSectionListRef,\n onBlur: handleContainerBlur,\n onClick: handleContainerClick,\n onFocus: handleContainerFocus,\n onInput: handleContainerInput,\n onPaste: handleContainerPaste,\n // Additional\n enableAccessibleFieldDOMStructure: true,\n elements,\n // TODO v7: Try to set to undefined when there is a section selected.\n tabIndex: parsedSelectedSections === 0 ? -1 : 0,\n contentEditable: isContainerEditable,\n value: valueStr,\n onChange: handleValueStrChange,\n areAllSectionsEmpty\n }\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { getActiveElement } from \"../../utils/utils.js\";\nimport { getSectionVisibleValue, isAndroid } from \"./useField.utils.js\";\nconst cleanString = dirtyString => dirtyString.replace(/[\\u2066\\u2067\\u2068\\u2069]/g, '');\nexport const addPositionPropertiesToSections = (sections, localizedDigits, isRtl) => {\n let position = 0;\n let positionInInput = isRtl ? 1 : 0;\n const newSections = [];\n for (let i = 0; i < sections.length; i += 1) {\n const section = sections[i];\n const renderedValue = getSectionVisibleValue(section, isRtl ? 'input-rtl' : 'input-ltr', localizedDigits);\n const sectionStr = `${section.startSeparator}${renderedValue}${section.endSeparator}`;\n const sectionLength = cleanString(sectionStr).length;\n const sectionLengthInInput = sectionStr.length;\n\n // The ...InInput values consider the unicode characters but do include them in their indexes\n const cleanedValue = cleanString(renderedValue);\n const startInInput = positionInInput + (cleanedValue === '' ? 0 : renderedValue.indexOf(cleanedValue[0])) + section.startSeparator.length;\n const endInInput = startInInput + cleanedValue.length;\n newSections.push(_extends({}, section, {\n start: position,\n end: position + sectionLength,\n startInInput,\n endInInput\n }));\n position += sectionLength;\n // Move position to the end of string associated to the current section\n positionInInput += sectionLengthInInput;\n }\n return newSections;\n};\nexport const useFieldV6TextField = params => {\n const isRtl = useRtl();\n const focusTimeoutRef = React.useRef(undefined);\n const selectionSyncTimeoutRef = React.useRef(undefined);\n const {\n forwardedProps: {\n onFocus,\n onClick,\n onPaste,\n onBlur,\n inputRef: inputRefProp,\n placeholder: inPlaceholder\n },\n internalProps: {\n readOnly = false,\n disabled = false\n },\n parsedSelectedSections,\n activeSectionIndex,\n state,\n fieldValueManager,\n valueManager,\n applyCharacterEditing,\n resetCharacterQuery,\n updateSectionValue,\n updateValueFromValueStr,\n clearActiveSection,\n clearValue,\n setTempAndroidValueStr,\n setSelectedSections,\n getSectionsFromValue,\n areAllSectionsEmpty,\n localizedDigits\n } = params;\n const inputRef = React.useRef(null);\n const handleRef = useForkRef(inputRefProp, inputRef);\n const sections = React.useMemo(() => addPositionPropertiesToSections(state.sections, localizedDigits, isRtl), [state.sections, localizedDigits, isRtl]);\n const interactions = React.useMemo(() => ({\n syncSelectionToDOM: () => {\n if (!inputRef.current) {\n return;\n }\n if (parsedSelectedSections == null) {\n if (inputRef.current.scrollLeft) {\n // Ensure that input content is not marked as selected.\n // setting selection range to 0 causes issues in Safari.\n // https://bugs.webkit.org/show_bug.cgi?id=224425\n inputRef.current.scrollLeft = 0;\n }\n return;\n }\n\n // On multi input range pickers we want to update selection range only for the active input\n // This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003\n // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425\n if (inputRef.current !== getActiveElement(document)) {\n return;\n }\n\n // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321\n const currentScrollTop = inputRef.current.scrollTop;\n if (parsedSelectedSections === 'all') {\n inputRef.current.select();\n } else {\n const selectedSection = sections[parsedSelectedSections];\n const selectionStart = selectedSection.type === 'empty' ? selectedSection.startInInput - selectedSection.startSeparator.length : selectedSection.startInInput;\n const selectionEnd = selectedSection.type === 'empty' ? selectedSection.endInInput + selectedSection.endSeparator.length : selectedSection.endInInput;\n if (selectionStart !== inputRef.current.selectionStart || selectionEnd !== inputRef.current.selectionEnd) {\n if (inputRef.current === getActiveElement(document)) {\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n clearTimeout(selectionSyncTimeoutRef.current);\n selectionSyncTimeoutRef.current = setTimeout(() => {\n // handle case when the selection is not updated correctly\n // could happen on Android\n if (inputRef.current && inputRef.current === getActiveElement(document) &&\n // The section might loose all selection, where `selectionStart === selectionEnd`\n // https://github.com/mui/mui-x/pull/13652\n inputRef.current.selectionStart === inputRef.current.selectionEnd && (inputRef.current.selectionStart !== selectionStart || inputRef.current.selectionEnd !== selectionEnd)) {\n interactions.syncSelectionToDOM();\n }\n });\n }\n\n // Even reading this variable seems to do the trick, but also setting it just to make use of it\n inputRef.current.scrollTop = currentScrollTop;\n },\n getActiveSectionIndexFromDOM: () => {\n const browserStartIndex = inputRef.current.selectionStart ?? 0;\n const browserEndIndex = inputRef.current.selectionEnd ?? 0;\n if (browserStartIndex === 0 && browserEndIndex === 0) {\n return null;\n }\n const nextSectionIndex = browserStartIndex <= sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.\n : sections.findIndex(section => section.startInInput - section.startSeparator.length > browserStartIndex);\n return nextSectionIndex === -1 ? sections.length - 1 : nextSectionIndex - 1;\n },\n focusField: (newSelectedSection = 0) => {\n if (getActiveElement(document) === inputRef.current) {\n return;\n }\n inputRef.current?.focus();\n setSelectedSections(newSelectedSection);\n },\n setSelectedSections: newSelectedSections => setSelectedSections(newSelectedSections),\n isFieldFocused: () => inputRef.current === getActiveElement(document)\n }), [inputRef, parsedSelectedSections, sections, setSelectedSections]);\n const syncSelectionFromDOM = () => {\n const browserStartIndex = inputRef.current.selectionStart ?? 0;\n let nextSectionIndex;\n if (browserStartIndex <= sections[0].startInInput) {\n // Special case if browser index is in invisible characters at the beginning\n nextSectionIndex = 1;\n } else if (browserStartIndex >= sections[sections.length - 1].endInInput) {\n // If the click is after the last character of the input, then we want to select the 1st section.\n nextSectionIndex = 1;\n } else {\n nextSectionIndex = sections.findIndex(section => section.startInInput - section.startSeparator.length > browserStartIndex);\n }\n const sectionIndex = nextSectionIndex === -1 ? sections.length - 1 : nextSectionIndex - 1;\n setSelectedSections(sectionIndex);\n };\n const handleInputFocus = useEventCallback((...args) => {\n onFocus?.(...args);\n // The ref is guaranteed to be resolved at this point.\n const input = inputRef.current;\n clearTimeout(focusTimeoutRef.current);\n focusTimeoutRef.current = setTimeout(() => {\n // The ref changed, the component got remounted, the focus event is no longer relevant.\n if (!input || input !== inputRef.current) {\n return;\n }\n if (activeSectionIndex != null) {\n return;\n }\n if (\n // avoid selecting all sections when focusing empty field without value\n input.value.length && Number(input.selectionEnd) - Number(input.selectionStart) === input.value.length) {\n setSelectedSections('all');\n } else {\n syncSelectionFromDOM();\n }\n });\n });\n const handleInputClick = useEventCallback((event, ...args) => {\n // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.\n // We avoid this by checking if the call of `handleInputClick` is actually intended, or a side effect.\n if (event.isDefaultPrevented()) {\n return;\n }\n onClick?.(event, ...args);\n syncSelectionFromDOM();\n });\n const handleInputPaste = useEventCallback(event => {\n onPaste?.(event);\n\n // prevent default to avoid the input `onChange` handler being called\n event.preventDefault();\n if (readOnly || disabled) {\n return;\n }\n const pastedValue = event.clipboardData.getData('text');\n if (typeof parsedSelectedSections === 'number') {\n const activeSection = state.sections[parsedSelectedSections];\n const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);\n const digitsOnly = /^[0-9]+$/.test(pastedValue);\n const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);\n const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;\n if (isValidPastedValue) {\n resetCharacterQuery();\n updateSectionValue({\n activeSection,\n newSectionValue: pastedValue,\n shouldGoToNextSection: true\n });\n return;\n }\n if (lettersOnly || digitsOnly) {\n // The pasted value corresponds to a single section, but not the expected type,\n // skip the modification\n return;\n }\n }\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n });\n const handleContainerBlur = useEventCallback((...args) => {\n onBlur?.(...args);\n setSelectedSections(null);\n });\n const handleInputChange = useEventCallback(event => {\n if (readOnly) {\n return;\n }\n const targetValue = event.target.value;\n if (targetValue === '') {\n resetCharacterQuery();\n clearValue();\n return;\n }\n const eventData = event.nativeEvent.data;\n // Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`\n // usual changes have only the currently typed character in the `event.nativeEvent.data`\n const shouldUseEventData = eventData && eventData.length > 1;\n const valueStr = shouldUseEventData ? eventData : targetValue;\n const cleanValueStr = cleanString(valueStr);\n if (parsedSelectedSections === 'all') {\n setSelectedSections(activeSectionIndex);\n }\n\n // If no section is selected or eventData should be used, we just try to parse the new value\n // This line is mostly triggered by imperative code / application tests.\n if (activeSectionIndex == null || shouldUseEventData) {\n updateValueFromValueStr(shouldUseEventData ? eventData : cleanValueStr);\n return;\n }\n let keyPressed;\n if (parsedSelectedSections === 'all' && cleanValueStr.length === 1) {\n keyPressed = cleanValueStr;\n } else {\n const prevValueStr = cleanString(fieldValueManager.getV6InputValueFromSections(sections, localizedDigits, isRtl));\n let startOfDiffIndex = -1;\n let endOfDiffIndex = -1;\n for (let i = 0; i < prevValueStr.length; i += 1) {\n if (startOfDiffIndex === -1 && prevValueStr[i] !== cleanValueStr[i]) {\n startOfDiffIndex = i;\n }\n if (endOfDiffIndex === -1 && prevValueStr[prevValueStr.length - i - 1] !== cleanValueStr[cleanValueStr.length - i - 1]) {\n endOfDiffIndex = i;\n }\n }\n const activeSection = sections[activeSectionIndex];\n const hasDiffOutsideOfActiveSection = startOfDiffIndex < activeSection.start || prevValueStr.length - endOfDiffIndex - 1 > activeSection.end;\n if (hasDiffOutsideOfActiveSection) {\n // TODO: Support if the new date is valid\n return;\n }\n\n // The active section being selected, the browser has replaced its value with the key pressed by the user.\n const activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;\n keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);\n }\n if (keyPressed.length === 0) {\n if (isAndroid()) {\n setTempAndroidValueStr(valueStr);\n }\n resetCharacterQuery();\n clearActiveSection();\n return;\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex: activeSectionIndex\n });\n });\n const placeholder = React.useMemo(() => {\n if (inPlaceholder !== undefined) {\n return inPlaceholder;\n }\n return fieldValueManager.getV6InputValueFromSections(getSectionsFromValue(valueManager.emptyValue), localizedDigits, isRtl);\n }, [inPlaceholder, fieldValueManager, getSectionsFromValue, valueManager.emptyValue, localizedDigits, isRtl]);\n const valueStr = React.useMemo(() => state.tempValueStrAndroid ?? fieldValueManager.getV6InputValueFromSections(state.sections, localizedDigits, isRtl), [state.sections, fieldValueManager, state.tempValueStrAndroid, localizedDigits, isRtl]);\n React.useEffect(() => {\n // Select all the sections when focused on mount (`autoFocus = true` on the input)\n if (inputRef.current && inputRef.current === getActiveElement(document)) {\n setSelectedSections('all');\n }\n return () => {\n clearTimeout(focusTimeoutRef.current);\n clearTimeout(selectionSyncTimeoutRef.current);\n };\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const inputMode = React.useMemo(() => {\n if (activeSectionIndex == null) {\n return 'text';\n }\n if (state.sections[activeSectionIndex].contentType === 'letter') {\n return 'text';\n }\n return 'numeric';\n }, [activeSectionIndex, state.sections]);\n const inputHasFocus = inputRef.current && inputRef.current === getActiveElement(document);\n const shouldShowPlaceholder = !inputHasFocus && areAllSectionsEmpty;\n return {\n interactions,\n returnedValue: {\n // Forwarded\n readOnly,\n onBlur: handleContainerBlur,\n onClick: handleInputClick,\n onFocus: handleInputFocus,\n onPaste: handleInputPaste,\n inputRef: handleRef,\n // Additional\n enableAccessibleFieldDOMStructure: false,\n placeholder,\n inputMode,\n autoComplete: 'off',\n value: shouldShowPlaceholder ? '' : valueStr,\n onChange: handleInputChange\n }\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { useValidation } from \"../../../validation/index.js\";\nimport { useUtils } from \"../useUtils.js\";\nimport { adjustSectionValue, getSectionOrder } from \"./useField.utils.js\";\nimport { useFieldState } from \"./useFieldState.js\";\nimport { useFieldCharacterEditing } from \"./useFieldCharacterEditing.js\";\nimport { useFieldV7TextField } from \"./useFieldV7TextField.js\";\nimport { useFieldV6TextField } from \"./useFieldV6TextField.js\";\nexport const useField = params => {\n const utils = useUtils();\n const {\n internalProps,\n internalProps: {\n unstableFieldRef,\n minutesStep,\n enableAccessibleFieldDOMStructure = false,\n disabled = false,\n readOnly = false\n },\n forwardedProps: {\n onKeyDown,\n error,\n clearable,\n onClear\n },\n fieldValueManager,\n valueManager,\n validator\n } = params;\n const isRtl = useRtl();\n const stateResponse = useFieldState(params);\n const {\n state,\n activeSectionIndex,\n parsedSelectedSections,\n setSelectedSections,\n clearValue,\n clearActiveSection,\n updateSectionValue,\n setTempAndroidValueStr,\n sectionsValueBoundaries,\n localizedDigits,\n timezone\n } = stateResponse;\n const characterEditingResponse = useFieldCharacterEditing({\n sections: state.sections,\n updateSectionValue,\n sectionsValueBoundaries,\n localizedDigits,\n setTempAndroidValueStr,\n timezone\n });\n const {\n resetCharacterQuery\n } = characterEditingResponse;\n const areAllSectionsEmpty = valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue);\n const useFieldTextField = enableAccessibleFieldDOMStructure ? useFieldV7TextField : useFieldV6TextField;\n const sectionOrder = React.useMemo(() => getSectionOrder(state.sections, isRtl && !enableAccessibleFieldDOMStructure), [state.sections, isRtl, enableAccessibleFieldDOMStructure]);\n const {\n returnedValue,\n interactions\n } = useFieldTextField(_extends({}, params, stateResponse, characterEditingResponse, {\n areAllSectionsEmpty,\n sectionOrder\n }));\n const handleContainerKeyDown = useEventCallback(event => {\n onKeyDown?.(event);\n if (disabled) {\n return;\n }\n // eslint-disable-next-line default-case\n switch (true) {\n // Select all\n case (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'A' && !event.shiftKey && !event.altKey:\n {\n // prevent default to make sure that the next line \"select all\" while updating\n // the internal state at the same time.\n event.preventDefault();\n setSelectedSections('all');\n break;\n }\n\n // Move selection to next section\n case event.key === 'ArrowRight':\n {\n event.preventDefault();\n if (parsedSelectedSections == null) {\n setSelectedSections(sectionOrder.startIndex);\n } else if (parsedSelectedSections === 'all') {\n setSelectedSections(sectionOrder.endIndex);\n } else {\n const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].rightIndex;\n if (nextSectionIndex !== null) {\n setSelectedSections(nextSectionIndex);\n }\n }\n break;\n }\n\n // Move selection to previous section\n case event.key === 'ArrowLeft':\n {\n event.preventDefault();\n if (parsedSelectedSections == null) {\n setSelectedSections(sectionOrder.endIndex);\n } else if (parsedSelectedSections === 'all') {\n setSelectedSections(sectionOrder.startIndex);\n } else {\n const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].leftIndex;\n if (nextSectionIndex !== null) {\n setSelectedSections(nextSectionIndex);\n }\n }\n break;\n }\n\n // Reset the value of the selected section\n case event.key === 'Delete':\n {\n event.preventDefault();\n if (readOnly) {\n break;\n }\n if (parsedSelectedSections == null || parsedSelectedSections === 'all') {\n clearValue();\n } else {\n clearActiveSection();\n }\n resetCharacterQuery();\n break;\n }\n\n // Increment / decrement the selected section value\n case ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(event.key):\n {\n event.preventDefault();\n if (readOnly || activeSectionIndex == null) {\n break;\n }\n\n // if all sections are selected, mark the currently editing one as selected\n if (parsedSelectedSections === 'all') {\n setSelectedSections(activeSectionIndex);\n }\n const activeSection = state.sections[activeSectionIndex];\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const newSectionValue = adjustSectionValue(utils, timezone, activeSection, event.key, sectionsValueBoundaries, localizedDigits, activeDateManager.date, {\n minutesStep\n });\n updateSectionValue({\n activeSection,\n newSectionValue,\n shouldGoToNextSection: false\n });\n break;\n }\n }\n });\n useEnhancedEffect(() => {\n interactions.syncSelectionToDOM();\n });\n const {\n hasValidationError\n } = useValidation({\n props: internalProps,\n validator,\n timezone,\n value: state.value,\n onError: internalProps.onError\n });\n const inputError = React.useMemo(() => {\n // only override when `error` is undefined.\n // in case of multi input fields, the `error` value is provided externally and will always be defined.\n if (error !== undefined) {\n return error;\n }\n return hasValidationError;\n }, [hasValidationError, error]);\n React.useEffect(() => {\n if (!inputError && activeSectionIndex == null) {\n resetCharacterQuery();\n }\n }, [state.referenceValue, activeSectionIndex, inputError]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // If `tempValueStrAndroid` is still defined for some section when running `useEffect`,\n // Then `onChange` has only been called once, which means the user pressed `Backspace` to reset the section.\n // This causes a small flickering on Android,\n // But we can't use `useEnhancedEffect` which is always called before the second `onChange` call and then would cause false positives.\n React.useEffect(() => {\n if (state.tempValueStrAndroid != null && activeSectionIndex != null) {\n resetCharacterQuery();\n clearActiveSection();\n }\n }, [state.sections]); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useImperativeHandle(unstableFieldRef, () => ({\n getSections: () => state.sections,\n getActiveSectionIndex: interactions.getActiveSectionIndexFromDOM,\n setSelectedSections: interactions.setSelectedSections,\n focusField: interactions.focusField,\n isFieldFocused: interactions.isFieldFocused\n }));\n const handleClearValue = useEventCallback((event, ...args) => {\n event.preventDefault();\n onClear?.(event, ...args);\n clearValue();\n if (!interactions.isFieldFocused()) {\n // setSelectedSections is called internally\n interactions.focusField(0);\n } else {\n setSelectedSections(sectionOrder.startIndex);\n }\n });\n const commonForwardedProps = {\n onKeyDown: handleContainerKeyDown,\n onClear: handleClearValue,\n error: inputError,\n clearable: Boolean(clearable && !areAllSectionsEmpty && !readOnly && !disabled)\n };\n const commonAdditionalProps = {\n disabled,\n readOnly\n };\n return _extends({}, params.forwardedProps, commonForwardedProps, commonAdditionalProps, returnedValue);\n};","import { getMonthsInYear } from \"../../utils/date-utils.js\";\nexport const getDateSectionConfigFromFormatToken = (utils, formatToken) => {\n const config = utils.formatTokenMap[formatToken];\n if (config == null) {\n throw new Error([`MUI X: The token \"${formatToken}\" is not supported by the Date and Time Pickers.`, 'Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.'].join('\\n'));\n }\n if (typeof config === 'string') {\n return {\n type: config,\n contentType: config === 'meridiem' ? 'letter' : 'digit',\n maxLength: undefined\n };\n }\n return {\n type: config.sectionType,\n contentType: config.contentType,\n maxLength: config.maxLength\n };\n};\nconst getDeltaFromKeyCode = keyCode => {\n switch (keyCode) {\n case 'ArrowUp':\n return 1;\n case 'ArrowDown':\n return -1;\n case 'PageUp':\n return 5;\n case 'PageDown':\n return -5;\n default:\n return 0;\n }\n};\nexport const getDaysInWeekStr = (utils, format) => {\n const elements = [];\n const now = utils.date(undefined, 'default');\n const startDate = utils.startOfWeek(now);\n const endDate = utils.endOfWeek(now);\n let current = startDate;\n while (utils.isBefore(current, endDate)) {\n elements.push(current);\n current = utils.addDays(current, 1);\n }\n return elements.map(weekDay => utils.formatByString(weekDay, format));\n};\nexport const getLetterEditingOptions = (utils, timezone, sectionType, format) => {\n switch (sectionType) {\n case 'month':\n {\n return getMonthsInYear(utils, utils.date(undefined, timezone)).map(month => utils.formatByString(month, format));\n }\n case 'weekDay':\n {\n return getDaysInWeekStr(utils, format);\n }\n case 'meridiem':\n {\n const now = utils.date(undefined, timezone);\n return [utils.startOfDay(now), utils.endOfDay(now)].map(date => utils.formatByString(date, format));\n }\n default:\n {\n return [];\n }\n }\n};\n\n// This format should be the same on all the adapters\n// If some adapter does not respect this convention, then we will need to hardcode the format on each adapter.\nexport const FORMAT_SECONDS_NO_LEADING_ZEROS = 's';\nconst NON_LOCALIZED_DIGITS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\nexport const getLocalizedDigits = utils => {\n const today = utils.date(undefined);\n const formattedZero = utils.formatByString(utils.setSeconds(today, 0), FORMAT_SECONDS_NO_LEADING_ZEROS);\n if (formattedZero === '0') {\n return NON_LOCALIZED_DIGITS;\n }\n return Array.from({\n length: 10\n }).map((_, index) => utils.formatByString(utils.setSeconds(today, index), FORMAT_SECONDS_NO_LEADING_ZEROS));\n};\nexport const removeLocalizedDigits = (valueStr, localizedDigits) => {\n if (localizedDigits[0] === '0') {\n return valueStr;\n }\n const digits = [];\n let currentFormattedDigit = '';\n for (let i = 0; i < valueStr.length; i += 1) {\n currentFormattedDigit += valueStr[i];\n const matchingDigitIndex = localizedDigits.indexOf(currentFormattedDigit);\n if (matchingDigitIndex > -1) {\n digits.push(matchingDigitIndex.toString());\n currentFormattedDigit = '';\n }\n }\n return digits.join('');\n};\nexport const applyLocalizedDigits = (valueStr, localizedDigits) => {\n if (localizedDigits[0] === '0') {\n return valueStr;\n }\n return valueStr.split('').map(char => localizedDigits[Number(char)]).join('');\n};\nexport const isStringNumber = (valueStr, localizedDigits) => {\n const nonLocalizedValueStr = removeLocalizedDigits(valueStr, localizedDigits);\n // `Number(' ')` returns `0` even if ' ' is not a valid number.\n return nonLocalizedValueStr !== ' ' && !Number.isNaN(Number(nonLocalizedValueStr));\n};\n\n/**\n * Remove the leading zeroes to a digit section value.\n * E.g.: `03` => `3`\n * Warning: Should only be called with non-localized digits. Call `removeLocalizedDigits` with your value if needed.\n */\nexport const cleanLeadingZeros = (valueStr, size) => {\n let cleanValueStr = valueStr;\n\n // Remove the leading zeros\n cleanValueStr = Number(cleanValueStr).toString();\n\n // Add enough leading zeros to fill the section\n while (cleanValueStr.length < size) {\n cleanValueStr = `0${cleanValueStr}`;\n }\n return cleanValueStr;\n};\nexport const cleanDigitSectionValue = (utils, value, sectionBoundaries, localizedDigits, section) => {\n if (process.env.NODE_ENV !== 'production') {\n if (section.type !== 'day' && section.contentType === 'digit-with-letter') {\n throw new Error([`MUI X: The token \"${section.format}\" is a digit format with letter in it.'\n This type of format is only supported for 'day' sections`].join('\\n'));\n }\n }\n if (section.type === 'day' && section.contentType === 'digit-with-letter') {\n const date = utils.setDate(sectionBoundaries.longestMonth, value);\n return utils.formatByString(date, section.format);\n }\n\n // queryValue without leading `0` (`01` => `1`)\n let valueStr = value.toString();\n if (section.hasLeadingZerosInInput) {\n valueStr = cleanLeadingZeros(valueStr, section.maxLength);\n }\n return applyLocalizedDigits(valueStr, localizedDigits);\n};\nexport const adjustSectionValue = (utils, timezone, section, keyCode, sectionsValueBoundaries, localizedDigits, activeDate, stepsAttributes) => {\n const delta = getDeltaFromKeyCode(keyCode);\n const isStart = keyCode === 'Home';\n const isEnd = keyCode === 'End';\n const shouldSetAbsolute = section.value === '' || isStart || isEnd;\n const adjustDigitSection = () => {\n const sectionBoundaries = sectionsValueBoundaries[section.type]({\n currentDate: activeDate,\n format: section.format,\n contentType: section.contentType\n });\n const getCleanValue = value => cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section);\n const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;\n let newSectionValueNumber;\n if (shouldSetAbsolute) {\n if (section.type === 'year' && !isEnd && !isStart) {\n return utils.formatByString(utils.date(undefined, timezone), section.format);\n }\n if (delta > 0 || isStart) {\n newSectionValueNumber = sectionBoundaries.minimum;\n } else {\n newSectionValueNumber = sectionBoundaries.maximum;\n }\n } else {\n const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);\n newSectionValueNumber = currentSectionValue + delta * step;\n }\n if (newSectionValueNumber % step !== 0) {\n if (delta < 0 || isStart) {\n newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)\n }\n if (delta > 0 || isEnd) {\n newSectionValueNumber -= newSectionValueNumber % step;\n }\n }\n if (newSectionValueNumber > sectionBoundaries.maximum) {\n return getCleanValue(sectionBoundaries.minimum + (newSectionValueNumber - sectionBoundaries.maximum - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));\n }\n if (newSectionValueNumber < sectionBoundaries.minimum) {\n return getCleanValue(sectionBoundaries.maximum - (sectionBoundaries.minimum - newSectionValueNumber - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));\n }\n return getCleanValue(newSectionValueNumber);\n };\n const adjustLetterSection = () => {\n const options = getLetterEditingOptions(utils, timezone, section.type, section.format);\n if (options.length === 0) {\n return section.value;\n }\n if (shouldSetAbsolute) {\n if (delta > 0 || isStart) {\n return options[0];\n }\n return options[options.length - 1];\n }\n const currentOptionIndex = options.indexOf(section.value);\n const newOptionIndex = (currentOptionIndex + delta) % options.length;\n const clampedIndex = (newOptionIndex + options.length) % options.length;\n return options[clampedIndex];\n };\n if (section.contentType === 'digit' || section.contentType === 'digit-with-letter') {\n return adjustDigitSection();\n }\n return adjustLetterSection();\n};\nexport const getSectionVisibleValue = (section, target, localizedDigits) => {\n let value = section.value || section.placeholder;\n const hasLeadingZeros = target === 'non-input' ? section.hasLeadingZerosInFormat : section.hasLeadingZerosInInput;\n if (target === 'non-input' && section.hasLeadingZerosInInput && !section.hasLeadingZerosInFormat) {\n value = Number(removeLocalizedDigits(value, localizedDigits)).toString();\n }\n\n // In the input, we add an empty character at the end of each section without leading zeros.\n // This makes sure that `onChange` will always be fired.\n // Otherwise, when your input value equals `1/dd/yyyy` (format `M/DD/YYYY` on DayJs),\n // If you press `1`, on the first section, the new value is also `1/dd/yyyy`,\n // So the browser will not fire the input `onChange`.\n const shouldAddInvisibleSpace = ['input-rtl', 'input-ltr'].includes(target) && section.contentType === 'digit' && !hasLeadingZeros && value.length === 1;\n if (shouldAddInvisibleSpace) {\n value = `${value}\\u200e`;\n }\n if (target === 'input-rtl') {\n value = `\\u2068${value}\\u2069`;\n }\n return value;\n};\nexport const changeSectionValueFormat = (utils, valueStr, currentFormat, newFormat) => {\n if (process.env.NODE_ENV !== 'production') {\n if (getDateSectionConfigFromFormatToken(utils, currentFormat).type === 'weekDay') {\n throw new Error(\"changeSectionValueFormat doesn't support week day formats\");\n }\n }\n return utils.formatByString(utils.parse(valueStr, currentFormat), newFormat);\n};\nconst isFourDigitYearFormat = (utils, format) => utils.formatByString(utils.date(undefined, 'system'), format).length === 4;\nexport const doesSectionFormatHaveLeadingZeros = (utils, contentType, sectionType, format) => {\n if (contentType !== 'digit') {\n return false;\n }\n const now = utils.date(undefined, 'default');\n switch (sectionType) {\n // We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.\n case 'year':\n {\n // Remove once https://github.com/iamkun/dayjs/pull/2847 is merged and bump dayjs version\n if (utils.lib === 'dayjs' && format === 'YY') {\n return true;\n }\n return utils.formatByString(utils.setYear(now, 1), format).startsWith('0');\n }\n case 'month':\n {\n return utils.formatByString(utils.startOfYear(now), format).length > 1;\n }\n case 'day':\n {\n return utils.formatByString(utils.startOfMonth(now), format).length > 1;\n }\n case 'weekDay':\n {\n return utils.formatByString(utils.startOfWeek(now), format).length > 1;\n }\n case 'hours':\n {\n return utils.formatByString(utils.setHours(now, 1), format).length > 1;\n }\n case 'minutes':\n {\n return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;\n }\n case 'seconds':\n {\n return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;\n }\n default:\n {\n throw new Error('Invalid section type');\n }\n }\n};\n\n/**\n * Some date libraries like `dayjs` don't support parsing from date with escaped characters.\n * To make sure that the parsing works, we are building a format and a date without any separator.\n */\nexport const getDateFromDateSections = (utils, sections, localizedDigits) => {\n // If we have both a day and a weekDay section,\n // Then we skip the weekDay in the parsing because libraries like dayjs can't parse complicated formats containing a weekDay.\n // dayjs(dayjs().format('dddd MMMM D YYYY'), 'dddd MMMM D YYYY')) // returns `Invalid Date` even if the format is valid.\n const shouldSkipWeekDays = sections.some(section => section.type === 'day');\n const sectionFormats = [];\n const sectionValues = [];\n for (let i = 0; i < sections.length; i += 1) {\n const section = sections[i];\n const shouldSkip = shouldSkipWeekDays && section.type === 'weekDay';\n if (!shouldSkip) {\n sectionFormats.push(section.format);\n sectionValues.push(getSectionVisibleValue(section, 'non-input', localizedDigits));\n }\n }\n const formatWithoutSeparator = sectionFormats.join(' ');\n const dateWithoutSeparatorStr = sectionValues.join(' ');\n return utils.parse(dateWithoutSeparatorStr, formatWithoutSeparator);\n};\nexport const createDateStrForV7HiddenInputFromSections = sections => sections.map(section => {\n return `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`;\n}).join('');\nexport const createDateStrForV6InputFromSections = (sections, localizedDigits, isRtl) => {\n const formattedSections = sections.map(section => {\n const dateValue = getSectionVisibleValue(section, isRtl ? 'input-rtl' : 'input-ltr', localizedDigits);\n return `${section.startSeparator}${dateValue}${section.endSeparator}`;\n });\n const dateStr = formattedSections.join('');\n if (!isRtl) {\n return dateStr;\n }\n\n // \\u2066: start left-to-right isolation\n // \\u2067: start right-to-left isolation\n // \\u2068: start first strong character isolation\n // \\u2069: pop isolation\n // wrap into an isolated group such that separators can split the string in smaller ones by adding \\u2069\\u2068\n return `\\u2066${dateStr}\\u2069`;\n};\nexport const getSectionsBoundaries = (utils, localizedDigits, timezone) => {\n const today = utils.date(undefined, timezone);\n const endOfYear = utils.endOfYear(today);\n const endOfDay = utils.endOfDay(today);\n const {\n maxDaysInMonth,\n longestMonth\n } = getMonthsInYear(utils, today).reduce((acc, month) => {\n const daysInMonth = utils.getDaysInMonth(month);\n if (daysInMonth > acc.maxDaysInMonth) {\n return {\n maxDaysInMonth: daysInMonth,\n longestMonth: month\n };\n }\n return acc;\n }, {\n maxDaysInMonth: 0,\n longestMonth: null\n });\n return {\n year: ({\n format\n }) => ({\n minimum: 0,\n maximum: isFourDigitYearFormat(utils, format) ? 9999 : 99\n }),\n month: () => ({\n minimum: 1,\n // Assumption: All years have the same amount of months\n maximum: utils.getMonth(endOfYear) + 1\n }),\n day: ({\n currentDate\n }) => ({\n minimum: 1,\n maximum: currentDate != null && utils.isValid(currentDate) ? utils.getDaysInMonth(currentDate) : maxDaysInMonth,\n longestMonth: longestMonth\n }),\n weekDay: ({\n format,\n contentType\n }) => {\n if (contentType === 'digit') {\n const daysInWeek = getDaysInWeekStr(utils, format).map(Number);\n return {\n minimum: Math.min(...daysInWeek),\n maximum: Math.max(...daysInWeek)\n };\n }\n return {\n minimum: 1,\n maximum: 7\n };\n },\n hours: ({\n format\n }) => {\n const lastHourInDay = utils.getHours(endOfDay);\n const hasMeridiem = removeLocalizedDigits(utils.formatByString(utils.endOfDay(today), format), localizedDigits) !== lastHourInDay.toString();\n if (hasMeridiem) {\n return {\n minimum: 1,\n maximum: Number(removeLocalizedDigits(utils.formatByString(utils.startOfDay(today), format), localizedDigits))\n };\n }\n return {\n minimum: 0,\n maximum: lastHourInDay\n };\n },\n minutes: () => ({\n minimum: 0,\n // Assumption: All years have the same amount of minutes\n maximum: utils.getMinutes(endOfDay)\n }),\n seconds: () => ({\n minimum: 0,\n // Assumption: All years have the same amount of seconds\n maximum: utils.getSeconds(endOfDay)\n }),\n meridiem: () => ({\n minimum: 0,\n maximum: 1\n }),\n empty: () => ({\n minimum: 0,\n maximum: 0\n })\n };\n};\nlet warnedOnceInvalidSection = false;\nexport const validateSections = (sections, valueType) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceInvalidSection) {\n const supportedSections = ['empty'];\n if (['date', 'date-time'].includes(valueType)) {\n supportedSections.push('weekDay', 'day', 'month', 'year');\n }\n if (['time', 'date-time'].includes(valueType)) {\n supportedSections.push('hours', 'minutes', 'seconds', 'meridiem');\n }\n const invalidSection = sections.find(section => !supportedSections.includes(section.type));\n if (invalidSection) {\n console.warn(`MUI X: The field component you are using is not compatible with the \"${invalidSection.type}\" date section.`, `The supported date sections are [\"${supportedSections.join('\", \"')}\"]\\`.`);\n warnedOnceInvalidSection = true;\n }\n }\n }\n};\nconst transferDateSectionValue = (utils, section, dateToTransferFrom, dateToTransferTo) => {\n switch (section.type) {\n case 'year':\n {\n return utils.setYear(dateToTransferTo, utils.getYear(dateToTransferFrom));\n }\n case 'month':\n {\n return utils.setMonth(dateToTransferTo, utils.getMonth(dateToTransferFrom));\n }\n case 'weekDay':\n {\n const formattedDaysInWeek = getDaysInWeekStr(utils, section.format);\n const dayInWeekStrOfActiveDate = utils.formatByString(dateToTransferFrom, section.format);\n const dayInWeekOfActiveDate = formattedDaysInWeek.indexOf(dayInWeekStrOfActiveDate);\n const dayInWeekOfNewSectionValue = formattedDaysInWeek.indexOf(section.value);\n const diff = dayInWeekOfNewSectionValue - dayInWeekOfActiveDate;\n return utils.addDays(dateToTransferFrom, diff);\n }\n case 'day':\n {\n return utils.setDate(dateToTransferTo, utils.getDate(dateToTransferFrom));\n }\n case 'meridiem':\n {\n const isAM = utils.getHours(dateToTransferFrom) < 12;\n const mergedDateHours = utils.getHours(dateToTransferTo);\n if (isAM && mergedDateHours >= 12) {\n return utils.addHours(dateToTransferTo, -12);\n }\n if (!isAM && mergedDateHours < 12) {\n return utils.addHours(dateToTransferTo, 12);\n }\n return dateToTransferTo;\n }\n case 'hours':\n {\n return utils.setHours(dateToTransferTo, utils.getHours(dateToTransferFrom));\n }\n case 'minutes':\n {\n return utils.setMinutes(dateToTransferTo, utils.getMinutes(dateToTransferFrom));\n }\n case 'seconds':\n {\n return utils.setSeconds(dateToTransferTo, utils.getSeconds(dateToTransferFrom));\n }\n default:\n {\n return dateToTransferTo;\n }\n }\n};\nconst reliableSectionModificationOrder = {\n year: 1,\n month: 2,\n day: 3,\n weekDay: 4,\n hours: 5,\n minutes: 6,\n seconds: 7,\n meridiem: 8,\n empty: 9\n};\nexport const mergeDateIntoReferenceDate = (utils, dateToTransferFrom, sections, referenceDate, shouldLimitToEditedSections) =>\n// cloning sections before sort to avoid mutating it\n[...sections].sort((a, b) => reliableSectionModificationOrder[a.type] - reliableSectionModificationOrder[b.type]).reduce((mergedDate, section) => {\n if (!shouldLimitToEditedSections || section.modified) {\n return transferDateSectionValue(utils, section, dateToTransferFrom, mergedDate);\n }\n return mergedDate;\n}, referenceDate);\nexport const isAndroid = () => navigator.userAgent.toLowerCase().includes('android');\n\n// TODO v8: Remove if we drop the v6 TextField approach.\nexport const getSectionOrder = (sections, shouldApplyRTL) => {\n const neighbors = {};\n if (!shouldApplyRTL) {\n sections.forEach((_, index) => {\n const leftIndex = index === 0 ? null : index - 1;\n const rightIndex = index === sections.length - 1 ? null : index + 1;\n neighbors[index] = {\n leftIndex,\n rightIndex\n };\n });\n return {\n neighbors,\n startIndex: 0,\n endIndex: sections.length - 1\n };\n }\n const rtl2ltr = {};\n const ltr2rtl = {};\n let groupedSectionsStart = 0;\n let groupedSectionsEnd = 0;\n let RTLIndex = sections.length - 1;\n while (RTLIndex >= 0) {\n groupedSectionsEnd = sections.findIndex(\n // eslint-disable-next-line @typescript-eslint/no-loop-func\n (section, index) => index >= groupedSectionsStart && section.endSeparator?.includes(' ') &&\n // Special case where the spaces were not there in the initial input\n section.endSeparator !== ' / ');\n if (groupedSectionsEnd === -1) {\n groupedSectionsEnd = sections.length - 1;\n }\n for (let i = groupedSectionsEnd; i >= groupedSectionsStart; i -= 1) {\n ltr2rtl[i] = RTLIndex;\n rtl2ltr[RTLIndex] = i;\n RTLIndex -= 1;\n }\n groupedSectionsStart = groupedSectionsEnd + 1;\n }\n sections.forEach((_, index) => {\n const rtlIndex = ltr2rtl[index];\n const leftIndex = rtlIndex === 0 ? null : rtl2ltr[rtlIndex - 1];\n const rightIndex = rtlIndex === sections.length - 1 ? null : rtl2ltr[rtlIndex + 1];\n neighbors[index] = {\n leftIndex,\n rightIndex\n };\n });\n return {\n neighbors,\n startIndex: rtl2ltr[0],\n endIndex: rtl2ltr[sections.length - 1]\n };\n};\nexport const parseSelectedSections = (selectedSections, sections) => {\n if (selectedSections == null) {\n return null;\n }\n if (selectedSections === 'all') {\n return 'all';\n }\n if (typeof selectedSections === 'string') {\n const index = sections.findIndex(section => section.type === selectedSections);\n return index === -1 ? null : index;\n }\n return selectedSections;\n};\nexport const getSectionValueText = (section, utils) => {\n if (!section.value) {\n return undefined;\n }\n switch (section.type) {\n case 'month':\n {\n if (section.contentType === 'digit') {\n return utils.format(utils.setMonth(utils.date(), Number(section.value) - 1), 'month');\n }\n const parsedDate = utils.parse(section.value, section.format);\n return parsedDate ? utils.format(parsedDate, 'month') : undefined;\n }\n case 'day':\n return section.contentType === 'digit' ? utils.format(utils.setDate(utils.startOfYear(utils.date()), Number(section.value)), 'dayOfMonthFull') : section.value;\n case 'weekDay':\n // TODO: improve by providing the label of the week day\n return undefined;\n default:\n return undefined;\n }\n};\nexport const getSectionValueNow = (section, utils) => {\n if (!section.value) {\n return undefined;\n }\n switch (section.type) {\n case 'weekDay':\n {\n if (section.contentType === 'letter') {\n // TODO: improve by resolving the week day number from a letter week day\n return undefined;\n }\n return Number(section.value);\n }\n case 'meridiem':\n {\n const parsedDate = utils.parse(`01:00 ${section.value}`, `${utils.formats.hours12h}:${utils.formats.minutes} ${section.format}`);\n if (parsedDate) {\n return utils.getHours(parsedDate) >= 12 ? 1 : 0;\n }\n return undefined;\n }\n case 'day':\n return section.contentType === 'digit-with-letter' ? parseInt(section.value, 10) : Number(section.value);\n case 'month':\n {\n if (section.contentType === 'digit') {\n return Number(section.value);\n }\n const parsedDate = utils.parse(section.value, section.format);\n return parsedDate ? utils.getMonth(parsedDate) + 1 : undefined;\n }\n default:\n return section.contentType !== 'letter' ? Number(section.value) : undefined;\n }\n};"],"names":["useFieldV7TextField","params","internalProps","disabled","readOnly","forwardedProps","sectionListRef","inSectionListRef","onBlur","onClick","onFocus","onInput","onPaste","focused","focusedProp","autoFocus","fieldValueManager","applyCharacterEditing","resetCharacterQuery","setSelectedSections","parsedSelectedSections","state","clearActiveSection","clearValue","updateSectionValue","updateValueFromValueStr","sectionOrder","areAllSectionsEmpty","sectionsValueBoundaries","handleSectionListRef","useForkRef","translations","usePickersTranslations","utils","useUtils","id","useId","setFocused","interactions","syncSelectionToDOM","current","selection","document","getSelection","rangeCount","getRoot","contains","getRangeAt","startContainer","removeAllRanges","blur","range","window","Range","target","sections","type","getSectionContainer","getSectionContent","selectNodeContents","focus","addRange","getActiveSectionIndexFromDOM","activeElement","getSectionIndexFromDOMElement","focusField","newSelectedSections","newParsedSelectedSections","isFieldFocused","revertDOMSectionChange","useEventCallback","sectionIndex","section","innerHTML","value","placeholder","handleContainerClick","event","args","isDefaultPrevented","setTimeout","cursorPosition","startOffset","startIndex","cursorOnStartOfSection","length","startSeparator","endSeparator","handleContainerInput","keyPressed","textContent","map","join","charCodeAt","handleContainerPaste","preventDefault","pastedValue","clipboardData","getData","handleContainerFocus","handleContainerBlur","getInputContainerClickHandler","handleInputContentMouseUp","getInputContentFocusHandler","handleInputContentPaste","activeSection","lettersOnly","test","digitsOnly","digitsAndLetterOnly","contentType","newSectionValue","shouldGoToNextSection","handleInputContentDragOver","dataTransfer","dropEffect","handleInputContentInput","inputType","nativeEvent","useEnhancedEffect","domElement","sectionBoundaries","reduce","acc","next","currentDate","format","isContainerEditable","elements","index","isEditable","container","content","tabIndex","contentEditable","role","minimum","maximum","empty","spellCheck","undefined","autoCapitalize","autoCorrect","parseInt","children","onDragOver","onMouseUp","inputMode","before","after","handleValueStrChange","valueStr","getV7HiddenInputValueFromSections","Error","returnedValue","enableAccessibleFieldDOMStructure","onChange","cleanString","dirtyString","replace","useFieldV6TextField","isRtl","focusTimeoutRef","selectionSyncTimeoutRef","inputRef","inputRefProp","inPlaceholder","activeSectionIndex","valueManager","setTempAndroidValueStr","getSectionsFromValue","localizedDigits","handleRef","position","positionInInput","newSections","i","renderedValue","sectionStr","sectionLength","sectionLengthInInput","cleanedValue","startInInput","indexOf","endInInput","push","start","end","addPositionPropertiesToSections","scrollLeft","currentScrollTop","scrollTop","select","selectedSection","selectionStart","selectionEnd","setSelectionRange","clearTimeout","browserStartIndex","browserEndIndex","nextSectionIndex","findIndex","newSelectedSection","syncSelectionFromDOM","handleInputFocus","input","Number","handleInputClick","handleInputPaste","handleInputChange","targetValue","eventData","data","shouldUseEventData","cleanValueStr","prevValueStr","getV6InputValueFromSections","startOfDiffIndex","endOfDiffIndex","activeSectionEndRelativeToNewValue","slice","emptyValue","tempValueStrAndroid","inputHasFocus","autoComplete","useField","unstableFieldRef","minutesStep","onKeyDown","error","clearable","onClear","validator","stateResponse","useFieldState","timezone","characterEditingResponse","useFieldCharacterEditing","areValuesEqual","useFieldTextField","handleContainerKeyDown","ctrlKey","metaKey","String","fromCharCode","keyCode","shiftKey","altKey","key","endIndex","neighbors","rightIndex","leftIndex","includes","activeDateManager","getActiveDateManager","date","hasValidationError","useValidation","props","onError","inputError","referenceValue","getSections","getActiveSectionIndex","commonForwardedProps","Boolean","commonAdditionalProps","getDateSectionConfigFromFormatToken","formatToken","config","formatTokenMap","maxLength","sectionType","getDaysInWeekStr","now","startDate","startOfWeek","endDate","endOfWeek","isBefore","addDays","weekDay","formatByString","getLetterEditingOptions","month","startOfDay","endOfDay","NON_LOCALIZED_DIGITS","getLocalizedDigits","today","setSeconds","Array","from","_","removeLocalizedDigits","digits","currentFormattedDigit","matchingDigitIndex","toString","applyLocalizedDigits","split","char","isStringNumber","nonLocalizedValueStr","isNaN","cleanLeadingZeros","size","cleanDigitSectionValue","setDate","longestMonth","hasLeadingZerosInInput","adjustSectionValue","activeDate","stepsAttributes","delta","getDeltaFromKeyCode","isStart","isEnd","shouldSetAbsolute","getCleanValue","step","newSectionValueNumber","adjustDigitSection","options","currentOptionIndex","adjustLetterSection","getSectionVisibleValue","hasLeadingZeros","hasLeadingZerosInFormat","changeSectionValueFormat","currentFormat","newFormat","parse","isFourDigitYearFormat","doesSectionFormatHaveLeadingZeros","lib","setYear","startsWith","startOfYear","startOfMonth","setHours","setMinutes","getDateFromDateSections","shouldSkipWeekDays","some","sectionFormats","sectionValues","formatWithoutSeparator","dateWithoutSeparatorStr","createDateStrForV7HiddenInputFromSections","createDateStrForV6InputFromSections","dateStr","dateValue","getSectionsBoundaries","endOfYear","maxDaysInMonth","daysInMonth","getDaysInMonth","year","getMonth","day","isValid","daysInWeek","Math","min","max","hours","lastHourInDay","getHours","minutes","getMinutes","seconds","getSeconds","meridiem","validateSections","valueType","reliableSectionModificationOrder","mergeDateIntoReferenceDate","dateToTransferFrom","referenceDate","shouldLimitToEditedSections","sort","a","b","mergedDate","modified","dateToTransferTo","getYear","setMonth","formattedDaysInWeek","dayInWeekStrOfActiveDate","dayInWeekOfActiveDate","diff","getDate","isAM","mergedDateHours","addHours","transferDateSectionValue","isAndroid","navigator","userAgent","toLowerCase","getSectionOrder","shouldApplyRTL","forEach","rtl2ltr","ltr2rtl","groupedSectionsStart","groupedSectionsEnd","RTLIndex","rtlIndex","parseSelectedSections","selectedSections","getSectionValueText","parsedDate","getSectionValueNow","formats","hours12h"],"sourceRoot":""}