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,QAAAuG,KADArI,GAAAA,CAAAA,EAAA0H,EAAA1H,SAAA,EACAQ,EAAA,EAAA6H,EAAA,EAAAC,CAAAA,CAAA,CAAAD,EAAA,CAAAX,EAAAlH,iBAAA,CAAA6H,EAAA,CACA,CAEA,OADA7H,EAAAD,KAAA,EAAAP,EACA,CACAA,UAAAA,EACAC,iBAAA,IACA0H,EACA,CACAnH,kBAAAA,CACA,CACA","sources":["webpack://_N_E/./node_modules/.pnpm/@nextui-org+shared-utils@2.0.5/node_modules/@nextui-org/shared-utils/dist/chunk-CAFRINWI.mjs","webpack://_N_E/./node_modules/.pnpm/@react-aria+form@3.0.5_react@18.3.1/node_modules/@react-aria/form/dist/useFormValidation.mjs","webpack://_N_E/./node_modules/.pnpm/@react-aria+utils@3.24.1_react@18.3.1/node_modules/@react-aria/utils/dist/useFormReset.mjs","webpack://_N_E/./node_modules/.pnpm/@react-aria+visually-hidden@3.8.12_react@18.3.1/node_modules/@react-aria/visually-hidden/dist/VisuallyHidden.mjs","webpack://_N_E/./node_modules/.pnpm/@react-stately+form@3.0.3_react@18.3.1/node_modules/@react-stately/form/dist/useFormValidationState.mjs"],"sourcesContent":["// src/text.ts\nvar safeText = (text) => {\n if ((text == null ? void 0 : text.length) <= 4)\n return text;\n return text == null ? void 0 : text.slice(0, 3);\n};\nvar safeAriaLabel = (...texts) => {\n let ariaLabel = \" \";\n for (const text of texts) {\n if (typeof text === \"string\" && text.length > 0) {\n ariaLabel = text;\n break;\n }\n }\n return ariaLabel;\n};\n\nexport {\n safeText,\n safeAriaLabel\n};\n","import {useEffect as $9Gacy$useEffect} from \"react\";\nimport {setInteractionModality as $9Gacy$setInteractionModality} from \"@react-aria/interactions\";\nimport {useLayoutEffect as $9Gacy$useLayoutEffect, useEffectEvent as $9Gacy$useEffectEvent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nfunction $e93e671b31057976$export$b8473d3665f3a75a(props, state, ref) {\n let { validationBehavior: validationBehavior, focus: focus } = props;\n // This is a useLayoutEffect so that it runs before the useEffect in useFormValidationState, which commits the validation change.\n (0, $9Gacy$useLayoutEffect)(()=>{\n if (validationBehavior === 'native' && (ref === null || ref === void 0 ? void 0 : ref.current)) {\n let errorMessage = state.realtimeValidation.isInvalid ? state.realtimeValidation.validationErrors.join(' ') || 'Invalid value.' : '';\n ref.current.setCustomValidity(errorMessage);\n // Prevent default tooltip for validation message.\n // https://bugzilla.mozilla.org/show_bug.cgi?id=605277\n if (!ref.current.hasAttribute('title')) ref.current.title = '';\n if (!state.realtimeValidation.isInvalid) state.updateValidation($e93e671b31057976$var$getNativeValidity(ref.current));\n }\n });\n let onReset = (0, $9Gacy$useEffectEvent)(()=>{\n state.resetValidation();\n });\n let onInvalid = (0, $9Gacy$useEffectEvent)((e)=>{\n var _ref_current;\n // Only commit validation if we are not already displaying one.\n // This avoids clearing server errors that the user didn't actually fix.\n if (!state.displayValidation.isInvalid) state.commitValidation();\n // Auto focus the first invalid input in a form, unless the error already had its default prevented.\n let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;\n if (!e.defaultPrevented && ref && form && $e93e671b31057976$var$getFirstInvalidInput(form) === ref.current) {\n var _ref_current1;\n if (focus) focus();\n else (_ref_current1 = ref.current) === null || _ref_current1 === void 0 ? void 0 : _ref_current1.focus();\n // Always show focus ring.\n (0, $9Gacy$setInteractionModality)('keyboard');\n }\n // Prevent default browser error UI from appearing.\n e.preventDefault();\n });\n let onChange = (0, $9Gacy$useEffectEvent)(()=>{\n state.commitValidation();\n });\n (0, $9Gacy$useEffect)(()=>{\n let input = ref === null || ref === void 0 ? void 0 : ref.current;\n if (!input) return;\n let form = input.form;\n input.addEventListener('invalid', onInvalid);\n input.addEventListener('change', onChange);\n form === null || form === void 0 ? void 0 : form.addEventListener('reset', onReset);\n return ()=>{\n input.removeEventListener('invalid', onInvalid);\n input.removeEventListener('change', onChange);\n form === null || form === void 0 ? void 0 : form.removeEventListener('reset', onReset);\n };\n }, [\n ref,\n onInvalid,\n onChange,\n onReset,\n validationBehavior\n ]);\n}\nfunction $e93e671b31057976$var$getValidity(input) {\n // The native ValidityState object is live, meaning each property is a getter that returns the current state.\n // We need to create a snapshot of the validity state at the time this function is called to avoid unpredictable React renders.\n let validity = input.validity;\n return {\n badInput: validity.badInput,\n customError: validity.customError,\n patternMismatch: validity.patternMismatch,\n rangeOverflow: validity.rangeOverflow,\n rangeUnderflow: validity.rangeUnderflow,\n stepMismatch: validity.stepMismatch,\n tooLong: validity.tooLong,\n tooShort: validity.tooShort,\n typeMismatch: validity.typeMismatch,\n valueMissing: validity.valueMissing,\n valid: validity.valid\n };\n}\nfunction $e93e671b31057976$var$getNativeValidity(input) {\n return {\n isInvalid: !input.validity.valid,\n validationDetails: $e93e671b31057976$var$getValidity(input),\n validationErrors: input.validationMessage ? [\n input.validationMessage\n ] : []\n };\n}\nfunction $e93e671b31057976$var$getFirstInvalidInput(form) {\n for(let i = 0; i < form.elements.length; i++){\n let element = form.elements[i];\n if (!element.validity.valid) return element;\n }\n return null;\n}\n\n\nexport {$e93e671b31057976$export$b8473d3665f3a75a as useFormValidation};\n//# sourceMappingURL=useFormValidation.module.js.map\n","import {useEffectEvent as $8ae05eaa5c114e9c$export$7f54fc3180508a52} from \"./useEffectEvent.mjs\";\nimport {useRef as $8rM3G$useRef, useEffect as $8rM3G$useEffect} from \"react\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $99facab73266f662$export$5add1d006293d136(ref, initialValue, onReset) {\n let resetValue = (0, $8rM3G$useRef)(initialValue);\n let handleReset = (0, $8ae05eaa5c114e9c$export$7f54fc3180508a52)(()=>{\n if (onReset) onReset(resetValue.current);\n });\n (0, $8rM3G$useEffect)(()=>{\n var _ref_current;\n let form = ref === null || ref === void 0 ? void 0 : (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.form;\n form === null || form === void 0 ? void 0 : form.addEventListener('reset', handleReset);\n return ()=>{\n form === null || form === void 0 ? void 0 : form.removeEventListener('reset', handleReset);\n };\n }, [\n ref,\n handleReset\n ]);\n}\n\n\nexport {$99facab73266f662$export$5add1d006293d136 as useFormReset};\n//# sourceMappingURL=useFormReset.module.js.map\n","import {mergeProps as $7JYt2$mergeProps} from \"@react-aria/utils\";\nimport $7JYt2$react, {useState as $7JYt2$useState, useMemo as $7JYt2$useMemo} from \"react\";\nimport {useFocusWithin as $7JYt2$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $5c3e21d68f1c4674$var$styles = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n clipPath: 'inset(50%)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n width: '1px',\n whiteSpace: 'nowrap'\n};\nfunction $5c3e21d68f1c4674$export$a966af930f325cab(props = {}) {\n let { style: style, isFocusable: isFocusable } = props;\n let [isFocused, setFocused] = (0, $7JYt2$useState)(false);\n let { focusWithinProps: focusWithinProps } = (0, $7JYt2$useFocusWithin)({\n isDisabled: !isFocusable,\n onFocusWithinChange: (val)=>setFocused(val)\n });\n // If focused, don't hide the element.\n let combinedStyles = (0, $7JYt2$useMemo)(()=>{\n if (isFocused) return style;\n else if (style) return {\n ...$5c3e21d68f1c4674$var$styles,\n ...style\n };\n else return $5c3e21d68f1c4674$var$styles;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n isFocused\n ]);\n return {\n visuallyHiddenProps: {\n ...focusWithinProps,\n style: combinedStyles\n }\n };\n}\nfunction $5c3e21d68f1c4674$export$439d29a4e110a164(props) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n let { children: children, elementType: Element = 'div', isFocusable: isFocusable, style: style, ...otherProps } = props;\n let { visuallyHiddenProps: visuallyHiddenProps } = $5c3e21d68f1c4674$export$a966af930f325cab(props);\n return /*#__PURE__*/ (0, $7JYt2$react).createElement(Element, (0, $7JYt2$mergeProps)(otherProps, visuallyHiddenProps), children);\n}\n\n\nexport {$5c3e21d68f1c4674$export$a966af930f325cab as useVisuallyHidden, $5c3e21d68f1c4674$export$439d29a4e110a164 as VisuallyHidden};\n//# sourceMappingURL=VisuallyHidden.module.js.map\n","import {createContext as $69F46$createContext, useMemo as $69F46$useMemo, useContext as $69F46$useContext, useState as $69F46$useState, useRef as $69F46$useRef, useEffect as $69F46$useEffect} from \"react\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $e5be200c675c3b3a$export$aca958c65c314e6c = {\n badInput: false,\n customError: false,\n patternMismatch: false,\n rangeOverflow: false,\n rangeUnderflow: false,\n stepMismatch: false,\n tooLong: false,\n tooShort: false,\n typeMismatch: false,\n valueMissing: false,\n valid: true\n};\nconst $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE = {\n ...$e5be200c675c3b3a$export$aca958c65c314e6c,\n customError: true,\n valid: false\n};\nconst $e5be200c675c3b3a$export$dad6ae84456c676a = {\n isInvalid: false,\n validationDetails: $e5be200c675c3b3a$export$aca958c65c314e6c,\n validationErrors: []\n};\nconst $e5be200c675c3b3a$export$571b5131b7e65c11 = (0, $69F46$createContext)({});\nconst $e5be200c675c3b3a$export$a763b9476acd3eb = '__formValidationState' + Date.now();\nfunction $e5be200c675c3b3a$export$fc1a364ae1f3ff10(props) {\n // Private prop for parent components to pass state to children.\n if (props[$e5be200c675c3b3a$export$a763b9476acd3eb]) {\n let { realtimeValidation: realtimeValidation, displayValidation: displayValidation, updateValidation: updateValidation, resetValidation: resetValidation, commitValidation: commitValidation } = props[$e5be200c675c3b3a$export$a763b9476acd3eb];\n return {\n realtimeValidation: realtimeValidation,\n displayValidation: displayValidation,\n updateValidation: updateValidation,\n resetValidation: resetValidation,\n commitValidation: commitValidation\n };\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return $e5be200c675c3b3a$var$useFormValidationStateImpl(props);\n}\nfunction $e5be200c675c3b3a$var$useFormValidationStateImpl(props) {\n let { isInvalid: isInvalid, validationState: validationState, name: name, value: value, builtinValidation: builtinValidation, validate: validate, validationBehavior: validationBehavior = 'aria' } = props;\n // backward compatibility.\n if (validationState) isInvalid || (isInvalid = validationState === 'invalid');\n // If the isInvalid prop is controlled, update validation result in realtime.\n let controlledError = isInvalid !== undefined ? {\n isInvalid: isInvalid,\n validationErrors: [],\n validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE\n } : null;\n // Perform custom client side validation.\n let clientError = (0, $69F46$useMemo)(()=>$e5be200c675c3b3a$var$getValidationResult($e5be200c675c3b3a$var$runValidate(validate, value)), [\n validate,\n value\n ]);\n if (builtinValidation === null || builtinValidation === void 0 ? void 0 : builtinValidation.validationDetails.valid) builtinValidation = null;\n // Get relevant server errors from the form.\n let serverErrors = (0, $69F46$useContext)($e5be200c675c3b3a$export$571b5131b7e65c11);\n let serverErrorMessages = (0, $69F46$useMemo)(()=>{\n if (name) return Array.isArray(name) ? name.flatMap((name)=>$e5be200c675c3b3a$var$asArray(serverErrors[name])) : $e5be200c675c3b3a$var$asArray(serverErrors[name]);\n return [];\n }, [\n serverErrors,\n name\n ]);\n // Show server errors when the form gets a new value, and clear when the user changes the value.\n let [lastServerErrors, setLastServerErrors] = (0, $69F46$useState)(serverErrors);\n let [isServerErrorCleared, setServerErrorCleared] = (0, $69F46$useState)(false);\n if (serverErrors !== lastServerErrors) {\n setLastServerErrors(serverErrors);\n setServerErrorCleared(false);\n }\n let serverError = (0, $69F46$useMemo)(()=>$e5be200c675c3b3a$var$getValidationResult(isServerErrorCleared ? [] : serverErrorMessages), [\n isServerErrorCleared,\n serverErrorMessages\n ]);\n // Track the next validation state in a ref until commitValidation is called.\n let nextValidation = (0, $69F46$useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let [currentValidity, setCurrentValidity] = (0, $69F46$useState)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let lastError = (0, $69F46$useRef)($e5be200c675c3b3a$export$dad6ae84456c676a);\n let commitValidation = ()=>{\n if (!commitQueued) return;\n setCommitQueued(false);\n let error = clientError || builtinValidation || nextValidation.current;\n if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {\n lastError.current = error;\n setCurrentValidity(error);\n }\n };\n let [commitQueued, setCommitQueued] = (0, $69F46$useState)(false);\n (0, $69F46$useEffect)(commitValidation);\n // realtimeValidation is used to update the native input element's state based on custom validation logic.\n // displayValidation is the currently displayed validation state that the user sees (e.g. on input change/form submit).\n // With validationBehavior=\"aria\", all errors are displayed in realtime rather than on submit.\n let realtimeValidation = controlledError || serverError || clientError || builtinValidation || $e5be200c675c3b3a$export$dad6ae84456c676a;\n let displayValidation = validationBehavior === 'native' ? controlledError || serverError || currentValidity : controlledError || serverError || clientError || builtinValidation || currentValidity;\n return {\n realtimeValidation: realtimeValidation,\n displayValidation: displayValidation,\n updateValidation (value) {\n // If validationBehavior is 'aria', update in realtime. Otherwise, store in a ref until commit.\n if (validationBehavior === 'aria' && !$e5be200c675c3b3a$var$isEqualValidation(currentValidity, value)) setCurrentValidity(value);\n else nextValidation.current = value;\n },\n resetValidation () {\n // Update the currently displayed validation state to valid on form reset,\n // even if the native validity says it isn't. It'll show again on the next form submit.\n let error = $e5be200c675c3b3a$export$dad6ae84456c676a;\n if (!$e5be200c675c3b3a$var$isEqualValidation(error, lastError.current)) {\n lastError.current = error;\n setCurrentValidity(error);\n }\n // Do not commit validation after the next render. This avoids a condition where\n // useSelect calls commitValidation inside an onReset handler.\n if (validationBehavior === 'native') setCommitQueued(false);\n setServerErrorCleared(true);\n },\n commitValidation () {\n // Commit validation state so the user sees it on blur/change/submit. Also clear any server errors.\n // Wait until after the next render to commit so that the latest value has been validated.\n if (validationBehavior === 'native') setCommitQueued(true);\n setServerErrorCleared(true);\n }\n };\n}\nfunction $e5be200c675c3b3a$var$asArray(v) {\n if (!v) return [];\n return Array.isArray(v) ? v : [\n v\n ];\n}\nfunction $e5be200c675c3b3a$var$runValidate(validate, value) {\n if (typeof validate === 'function') {\n let e = validate(value);\n if (e && typeof e !== 'boolean') return $e5be200c675c3b3a$var$asArray(e);\n }\n return [];\n}\nfunction $e5be200c675c3b3a$var$getValidationResult(errors) {\n return errors.length ? {\n isInvalid: true,\n validationErrors: errors,\n validationDetails: $e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE\n } : null;\n}\nfunction $e5be200c675c3b3a$var$isEqualValidation(a, b) {\n if (a === b) return true;\n return a && b && a.isInvalid === b.isInvalid && a.validationErrors.length === b.validationErrors.length && a.validationErrors.every((a, i)=>a === b.validationErrors[i]) && Object.entries(a.validationDetails).every(([k, v])=>b.validationDetails[k] === v);\n}\nfunction $e5be200c675c3b3a$export$75ee7c75d68f5b0e(...results) {\n let errors = new Set();\n let isInvalid = false;\n let validationDetails = {\n ...$e5be200c675c3b3a$export$aca958c65c314e6c\n };\n for (let v of results){\n var _validationDetails, _key;\n for (let e of v.validationErrors)errors.add(e);\n // Only these properties apply for checkboxes.\n isInvalid || (isInvalid = v.isInvalid);\n for(let key in validationDetails)(_validationDetails = validationDetails)[_key = key] || (_validationDetails[_key] = v.validationDetails[key]);\n }\n validationDetails.valid = !isInvalid;\n return {\n isInvalid: isInvalid,\n validationErrors: [\n ...errors\n ],\n validationDetails: validationDetails\n };\n}\n\n\nexport {$e5be200c675c3b3a$export$aca958c65c314e6c as VALID_VALIDITY_STATE, $e5be200c675c3b3a$export$dad6ae84456c676a as DEFAULT_VALIDATION_RESULT, $e5be200c675c3b3a$export$571b5131b7e65c11 as FormValidationContext, $e5be200c675c3b3a$export$a763b9476acd3eb as privateValidationStateProp, $e5be200c675c3b3a$export$fc1a364ae1f3ff10 as useFormValidationState, $e5be200c675c3b3a$export$75ee7c75d68f5b0e as mergeValidation};\n//# sourceMappingURL=useFormValidationState.module.js.map\n"],"names":["safeText","text","length","slice","safeAriaLabel","texts","ariaLabel","$e93e671b31057976$export$b8473d3665f3a75a","props","state","ref","validationBehavior","focus","_react_aria_utils__WEBPACK_IMPORTED_MODULE_1__","b","current","input","validity","errorMessage","realtimeValidation","isInvalid","validationErrors","join","setCustomValidity","hasAttribute","title","updateValidation","valid","validationDetails","badInput","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing","validationMessage","onReset","_react_aria_utils__WEBPACK_IMPORTED_MODULE_2__","i","resetValidation","onInvalid","_ref_current","_ref_current1","displayValidation","commitValidation","form","e","defaultPrevented","$e93e671b31057976$var$getFirstInvalidInput","elements","element","_react_aria_interactions__WEBPACK_IMPORTED_MODULE_3__","_w","preventDefault","onChange","react__WEBPACK_IMPORTED_MODULE_0__","useEffect","addEventListener","removeEventListener","$99facab73266f662$export$5add1d006293d136","initialValue","resetValue","useRef","handleReset","_useEffectEvent_mjs__WEBPACK_IMPORTED_MODULE_1__","$5c3e21d68f1c4674$var$styles","border","clip","clipPath","height","margin","overflow","padding","position","width","whiteSpace","$5c3e21d68f1c4674$export$a966af930f325cab","style","isFocusable","isFocused","setFocused","useState","focusWithinProps","_react_aria_interactions__WEBPACK_IMPORTED_MODULE_1__","L","isDisabled","onFocusWithinChange","val","combinedStyles","useMemo","visuallyHiddenProps","$5c3e21d68f1c4674$export$439d29a4e110a164","children","elementType","Element","otherProps","createElement","d","$e5be200c675c3b3a$export$aca958c65c314e6c","$e5be200c675c3b3a$var$CUSTOM_VALIDITY_STATE","$e5be200c675c3b3a$export$dad6ae84456c676a","$e5be200c675c3b3a$export$571b5131b7e65c11","createContext","$e5be200c675c3b3a$export$a763b9476acd3eb","Date","now","$e5be200c675c3b3a$export$fc1a364ae1f3ff10","$e5be200c675c3b3a$var$useFormValidationStateImpl","validationState","name","value","builtinValidation","validate","controlledError","undefined","clientError","$e5be200c675c3b3a$var$getValidationResult","$e5be200c675c3b3a$var$runValidate","$e5be200c675c3b3a$var$asArray","serverErrors","useContext","serverErrorMessages","Array","isArray","flatMap","lastServerErrors","setLastServerErrors","isServerErrorCleared","setServerErrorCleared","serverError","nextValidation","currentValidity","setCurrentValidity","lastError","commitQueued","setCommitQueued","error","$e5be200c675c3b3a$var$isEqualValidation","v","errors","a","every","Object","entries","k","$e5be200c675c3b3a$export$75ee7c75d68f5b0e","results","Set","add","key","_validationDetails"],"sourceRoot":""}