From 9b4818cfbd4ce9e31722927117ac4e60252107f6 Mon Sep 17 00:00:00 2001 From: Roland Geider Date: Thu, 14 Nov 2024 19:19:52 +0100 Subject: [PATCH] Replace broken bmi calculator --- package.json | 1 - wger/core/forms.py | 2 + .../static/react/locales/en/translation.json | 10 + .../static/react/locales/ta/translation.json | 436 +++++++++--------- wger/core/static/react/main.js | 288 ++++++------ wger/nutrition/static/js/nutrition.js | 156 +------ wger/nutrition/templates/bmi/form.html | 122 ----- wger/nutrition/urls.py | 13 +- wger/nutrition/views/bmi.py | 159 ------- yarn.lock | 287 ------------ 10 files changed, 384 insertions(+), 1090 deletions(-) delete mode 100644 wger/nutrition/templates/bmi/form.html delete mode 100644 wger/nutrition/views/bmi.py diff --git a/package.json b/package.json index 366f9bdc0..c273bc834 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "dependencies": { "bootstrap": "5.3.3", "components-font-awesome": "5.9.0", - "d3": "^7.9.0", "datatables.net-bs5": "^2.1.8", "devbridge-autocomplete": "^1.4.11", "jquery": "^3.7.1", diff --git a/wger/core/forms.py b/wger/core/forms.py index 8deebfbb5..aa423b675 100644 --- a/wger/core/forms.py +++ b/wger/core/forms.py @@ -137,6 +137,7 @@ class UserPreferencesForm(forms.ModelForm): 'ro_access', 'num_days_weight_reminder', 'birthdate', + 'height', ) def __init__(self, *args, **kwargs): @@ -153,6 +154,7 @@ class UserPreferencesForm(forms.ModelForm): css_class='form-row', ), 'birthdate', + 'height', HTML('
'), ), Fieldset( diff --git a/wger/core/static/react/locales/en/translation.json b/wger/core/static/react/locales/en/translation.json index 5adbf3cce..26f79350e 100644 --- a/wger/core/static/react/locales/en/translation.json +++ b/wger/core/static/react/locales/en/translation.json @@ -1,5 +1,7 @@ { "weight": "Weight", + "height": "Height", + "cm": "cm", "date": "Date", "timeOfDay": "Time of day", "submit": "Submit", @@ -140,6 +142,14 @@ "valueRemaining": "remaining", "valueTooMany": "too many" }, + "bmi": { + "calculator": "BMI calculator", + "overweight": "Overweight", + "obese": "Obese", + "normal": "Normal weight", + "underweight": "Underweight", + "result": "Your BMI is {{value}}" + }, "downloadAsPdf": "Download as PDF", "total": "Total", "description": "Description", diff --git a/wger/core/static/react/locales/ta/translation.json b/wger/core/static/react/locales/ta/translation.json index fb3fea4b8..470109ed2 100644 --- a/wger/core/static/react/locales/ta/translation.json +++ b/wger/core/static/react/locales/ta/translation.json @@ -1,222 +1,222 @@ { - "weight": "எடை", - "date": "திகதி", - "add": "சேர்", - "days": "நாட்கள்", - "currentWeight": "தற்போதைய எடை", - "workout": "பயிற்சி", - "submit": "சமர்ப்பி", - "delete": "அழி", - "deleteConfirmation": "\"{{name}}\" ஐ நிச்சயமாக நீக்க விரும்புகிறீர்களா?", - "nutritionalPlan": "ஊட்டச்சத்து திட்டம்", - "edit": "தொகு", - "exercises": { - "replacementsInfoText": "விருப்பமாக, இதை மாற்ற வேண்டிய ஒரு பயிற்சியையும் நீங்கள் தேர்ந்தெடுக்கலாம் (எ.கா. இது இரண்டு முறை சமர்ப்பிக்கப்பட்டது அல்லது அதற்கு ஒத்ததாக இருந்தது). இது நடைமுறைகள் மற்றும் பயிற்சி பதிவுகளை நீக்குவதற்கு பதிலாக, நடைமுறைகள் மற்றும் பயிற்சி பதிவுகளை மாற்றும். இந்த மாற்றங்கள் இதிலிருந்து பயிற்சிகளை ஒத்திசைக்கும் எந்த நிகழ்விற்கும் பிரச்சாரம் செய்யும்.", - "replacementsSearch": "ஒரு உடற்பயிற்சியைத் தேடுங்கள் அல்லது அறியப்பட்ட ஐடியை புலத்தில் நகலெடுத்து ஒட்டவும், \"சுமை\" பொத்தானைக் சொடுக்கு செய்யவும்.", - "noReplacementSelected": " மாற்றுவதற்கு எந்த உடற்பயிற்சியும் தேர்ந்தெடுக்கப்படவில்லை", - "notEnoughRightsHeader": "நீங்கள் பயிற்சிகளை பங்களிக்க முடியாது", - "notEnoughRights": "உங்கள் கணக்கு {{நாட்கள்}} நாட்களை விட பழையதாக இருந்தால் மட்டுமே நீங்கள் பயிற்சிகளை பங்களிக்க முடியும், மேலும் உங்கள் மின்னஞ்சலை சரிபார்த்துள்ளீர்கள்", - "muscles": "தசைகள்", - "secondaryMuscles": "இரண்டாம் நிலை தசைகள்", - "whatVariationsExist": "இந்த பயிற்சியின் எந்த மாறுபாடுகள் உள்ளன, ஏதேனும் இருந்தால்?", - "identicalExercise": "நகல் பயிற்சிகளைத் தவிர்க்கவும்", - "identicalExercisePleaseDiscard": "நீங்கள் சேர்ப்பதற்கு ஒத்த ஒரு பயிற்சியை நீங்கள் கவனித்தால், தயவுசெய்து உங்கள் வரைவை நிராகரித்து, அதற்கு பதிலாக அந்த பயிற்சியைத் திருத்தவும்.", - "equipment": "உபகரணங்கள்", - "cacheWarning": "கேச்சிங் காரணமாக விண்ணப்பம் முழுவதும் மாற்றங்கள் தெரியும் வரை சிறிது நேரம் ஆகலாம்.", - "successfullyUpdated": "உடற்பயிற்சி வெற்றிகரமாக புதுப்பிக்கப்பட்டது. கேச்சிங் காரணமாக விண்ணப்பம் முழுவதும் மாற்றங்கள் தெரியும் வரை சிறிது நேரம் ஆகலாம்.", - "deleteTranslation": "மொழிபெயர்ப்பை நீக்கு", - "deleteExerciseFull": "முழு உடற்பயிற்சியை நீக்கு", - "missingExerciseDescription": "சமூகத்தை பங்களிப்பதன் மூலம் உதவுங்கள்!", - "searchExerciseName": "உடற்பயிற்சி பெயரால் தேடுங்கள்", - "imageStylePhoto": "புகைப்படம்", - "imageStyle3D": "ZD", - "imageStyleLine": "வரி", - "imageStyleLowPoly": "குறைந்த பாலி", - "imageStyleOther": "மற்றொன்று", - "imageDetails": "பட விவரங்கள்", - "replacements": "மாற்றீடுகள்", - "description": "விவரம்", - "primaryMuscles": "முதன்மை தசைகள்", - "deleteExerciseReplace": "நீக்கவும் மாற்றவும்", - "alternativeNames": "மாற்று பெயர்கள்", - "exercises": "பயிற்சிகள்", - "changeExerciseLanguage": "இந்த உடற்பயிற்சியின் மொழியை மாற்றவும்", - "noEquipment": "உபகரணங்கள் இல்லை", - "missingExercise": "ஒரு குறிப்பிட்ட உடற்பயிற்சியைக் காணவில்லையா?", - "notesHelpText": "குறிப்புகள் \"உங்கள் உடலை நேராக வைத்திருங்கள்\" போன்ற பயிற்சியை எவ்வாறு செய்வது என்பது குறித்த குறுகிய கருத்துகள்", - "contributeExercise": "ஒரு உடற்பயிற்சியை பங்களிக்கவும்", - "step1HeaderBasics": "ஆங்கிலத்தில் அடிப்படைகள்", - "variations": "மாறுபாடுகள்", - "checkInformationBeforeSubmitting": "பயிற்சியைச் சமர்ப்பிப்பதற்கு முன் நீங்கள் உள்ளிட்ட செய்தி சரியானதா என்பதை சரிபார்க்கவும்", - "submitExercise": "உடற்பயிற்சியை சமர்ப்பிக்கவும்", - "basics": "அடிப்படைகள்", - "exerciseNotTranslatedBody": "இந்த பயிற்சி தற்போது தேர்ந்தெடுக்கப்பட்ட மொழியில் கிடைக்கவில்லை. மொழிபெயர்ப்பை பங்களிக்க விரும்புகிறீர்களா?", - "newNote": "புதிய குறிப்பு", - "filterVariations": "வடிகட்டி மாறுபாடுகளுக்கு உடற்பயிற்சி பெயரை உள்ளிடவும்", - "compatibleImagesCC": "எச்.ஏ. உரிமம் மூலம் சி.சி உடன் படங்கள் இணக்கமாக இருக்க வேண்டும். ஐயம் இருந்தால், நீங்கள் எடுத்த புகைப்படங்களை மட்டுமே பதிவேற்றவும்.", - "exerciseNotTranslated": "மொழிபெயர்ப்பு எதுவும் கிடைக்கவில்லை", - "alsoKnownAs": "மேலும் அழைக்கப்படுகிறது:", - "deleteExerciseBody": "\"{{பெயர்}}\" என்ற பயிற்சியை நீக்க விரும்புகிறீர்களா? நீங்கள் தற்போதைய {{மொழி}} மொழிபெயர்ப்பை அல்லது அனைத்து மொழிபெயர்ப்புகள், படங்கள் போன்றவற்றைக் கொண்ட முழுமையான உடற்பயிற்சியை நீக்கலாம்.", - "translateExerciseNow": "இந்த பயிற்சியை இப்போது மொழிபெயர்க்கவும்", - "notes": "குறிப்புகள்" - }, - "nutrition": { - "plans": "ஊட்டச்சத்து திட்டங்கள்", - "onlyLoggingHelpText": "கலோரிகளை மட்டுமே கண்காணிக்கவும். உங்கள் கலோரிகளை மட்டுமே உள்நுழைய விரும்பினால், குறிப்பிட்ட உணவுடன் விரிவான ஊட்டச்சத்து திட்டத்தை அமைக்க விரும்பவில்லை என்றால் பெட்டியை சரிபார்க்கவும்", - "useGoalsHelpText": "இந்த திட்டத்தில் இலக்குகளைச் சேர்க்கவும்", - "useGoalsHelpTextLong": "திட்டத்திற்கான ஆற்றல், புரதம், கார்போஐட்ரேட்டுகள் அல்லது கொழுப்புக்கான பொதுவான இலக்குகளை நிர்ணயிக்க இது உங்களை அனுமதிக்கிறது. நீங்கள் ஒரு விரிவான உணவுத் திட்டத்தை அமைத்தால், இந்த மதிப்புகள் முன்னுரிமை பெறும் என்பதை நினைவில் கொள்க.", - "goalCarbohydrates": "கார்போஐட்ரேட் இலக்கு", - "kcal": "கிலோகலோரி", - "valueEnergyKcalKj": "{{kcal}} kcal / {{kj}} kj", - "searchIngredientName": "மூலப்பொருள் பெயரால் தேடுங்கள்", - "macronutrient": "மேக்ரோனூட்ரியண்ட்", - "percentEnergy": "ஆற்றலின் விழுக்காடு", - "logged": "உள்நுழைந்த", - "loggedToday": "இன்று உள்நுழைந்துள்ளது", - "difference": "வேறுபாடு", - "7dayAvg": "7 நாள் சராசரி", - "protein": "புரதம்", - "pseudoMealTitle": "பிற பதிவுகள்", - "others": "மற்றவர்கள்", - "sodium": "உவர்மம்", - "mealDeleteInfo": "இந்த உணவுக்கான ஊட்டச்சத்து டைரி உள்ளீடுகள் நீக்கப்படாது, மேலும் \"பிற பதிவுகள்\" இன் கீழ் தோன்றும்", - "logThisMeal": "இந்த உணவை ஊட்டச்சத்து நாட்குறிப்புக்கு பதிவுசெய்க", - "logThisMealItem": "இந்த மூலப்பொருளை ஊட்டச்சத்து நாட்குறிப்புக்கு பதிவுசெய்க", - "valueRemaining": "மீதமுள்ள", - "meal": "உணவு", - "addMeal": "உணவு சேர்க்கவும்", - "copyPlan": "இந்த திட்டத்தின் நகலை உருவாக்கவும்", - "goalProtein": "புரத இலக்கு", - "addMealItem": "உணவுக்கு மூலப்பொருள் சேர்க்கவும்", - "nutritionalDiary": "ஊட்டச்சத்து நாட்குறிப்பு", - "gramShort": "g", - "valueEnergyKcal": "{{மதிப்பு}} கிலோகலோரி", - "planDeleteInfo": "இது அனைத்து ஊட்டச்சத்து டைரி உள்ளீடுகளையும் நீக்கிவிடும்", - "goalFiber": "ஃபைபர் இலக்கு", - "today": "இன்று", - "energy": "ஆற்றல்", - "plan": "ஊட்டச்சத்து திட்டம்", - "goalsTitle": "இலக்குகள்", - "goalEnergy": "ஆற்றல் இலக்கு", - "goalFat": "கொழுப்பு இலக்கு", - "addNutritionalDiary": "ஊட்டச்சத்து டைரி நுழைவு சேர்க்கவும்", - "gPerBodyKg": "g க்கு g-kg", - "planned": "திட்டமிடப்பட்டது", - "carbohydrates": "கார்போஐட்ரேட்டுகள்", - "sugar": "சர்க்கரை", - "ofWhichSugars": "அதில் சர்க்கரைகள்", - "fat": "கொழுப்பு", - "ofWhichSaturated": "அதில் நிறைவுற்றது", - "saturatedFat": "பூரிதக் கொழுப்பு", - "fibres": "இழைகள்", - "diaryEntrySaved": "டைரி நுழைவு வெற்றிகரமாக சேமிக்கப்பட்டது", - "valueTooMany": "பல" - }, + "weight": "எடை", + "date": "தேதி", + "add": "சேர்", + "days": "நாட்கள்", + "currentWeight": "தற்போதைய எடை", + "workout": "பயிற்சி", + "submit": "சமர்ப்பி", + "delete": "நீக்கு", + "deleteConfirmation": "\"{{name}}\" ஐ நிச்சயமாக நீக்க விரும்புகிறீர்களா?", + "nutritionalPlan": "ஊட்டச்சத்து திட்டம்", + "edit": "தொகு", + "exercises": { + "replacementsInfoText": "விருப்பமாக, இதை மாற்ற வேண்டிய ஒரு பயிற்சியையும் நீங்கள் தேர்ந்தெடுக்கலாம் (எ.கா. இது இரண்டு முறை சமர்ப்பிக்கப்பட்டது அல்லது அதற்கு ஒத்ததாக இருந்தது). இது நடைமுறைகள் மற்றும் பயிற்சி பதிவுகளை நீக்குவதற்கு பதிலாக, நடைமுறைகள் மற்றும் பயிற்சி பதிவுகளை மாற்றும். இந்த மாற்றங்கள் இதிலிருந்து பயிற்சிகளை ஒத்திசைக்கும் எந்த நிகழ்விற்கும் பிரச்சாரம் செய்யும்.", + "replacementsSearch": "ஒரு உடற்பயிற்சியைத் தேடுங்கள் அல்லது அறியப்பட்ட ஐடியை புலத்தில் நகலெடுத்து ஒட்டவும், \"சுமை\" பொத்தானைக் சொடுக்கு செய்யவும்.", + "noReplacementSelected": " மாற்றுவதற்கு எந்த உடற்பயிற்சியும் தேர்ந்தெடுக்கப்படவில்லை", + "notEnoughRightsHeader": "நீங்கள் பயிற்சிகளை பங்களிக்க முடியாது", + "notEnoughRights": "உங்கள் கணக்கு {{days}} நாட்களை விட பழையதாக இருந்தால் மட்டுமே நீங்கள் பயிற்சிகளை பங்களிக்க முடியும், மேலும் உங்கள் மின்னஞ்சலை சரிபார்த்துள்ளீர்கள்", + "muscles": "தசைகள்", + "secondaryMuscles": "இரண்டாம் நிலை தசைகள்", + "whatVariationsExist": "இந்த பயிற்சியின் எந்த மாறுபாடுகள் உள்ளன, ஏதேனும் இருந்தால்?", + "identicalExercise": "நகல் பயிற்சிகளைத் தவிர்க்கவும்", + "identicalExercisePleaseDiscard": "நீங்கள் சேர்ப்பதற்கு ஒத்த ஒரு பயிற்சியை நீங்கள் கவனித்தால், தயவுசெய்து உங்கள் வரைவை நிராகரித்து, அதற்கு பதிலாக அந்த பயிற்சியைத் திருத்தவும்.", + "equipment": "உபகரணங்கள்", + "cacheWarning": "கேச்சிங் காரணமாக விண்ணப்பம் முழுவதும் மாற்றங்கள் தெரியும் வரை சிறிது நேரம் ஆகலாம்.", + "successfullyUpdated": "உடற்பயிற்சி வெற்றிகரமாக புதுப்பிக்கப்பட்டது. கேச்சிங் காரணமாக விண்ணப்பம் முழுவதும் மாற்றங்கள் தெரியும் வரை சிறிது நேரம் ஆகலாம்.", + "deleteTranslation": "மொழிபெயர்ப்பை நீக்கு", + "deleteExerciseFull": "முழு உடற்பயிற்சியை நீக்கு", + "missingExerciseDescription": "சமூகத்தை பங்களிப்பதன் மூலம் உதவுங்கள்!", + "searchExerciseName": "உடற்பயிற்சி பெயரால் தேடுங்கள்", + "imageStylePhoto": "புகைப்படம்", + "imageStyle3D": "ZD", + "imageStyleLine": "வரி", + "imageStyleLowPoly": "குறைந்த பாலி", + "imageStyleOther": "மற்றொன்று", + "imageDetails": "பட விவரங்கள்", + "replacements": "மாற்றீடுகள்", "description": "விவரம்", - "forms": { - "maxLength": "தயவுசெய்து {{எழுத்துக்கள்}} எழுத்துக்களை விட குறைவாக உள்ளிடவும்", - "minLength": "தயவுசெய்து {{எழுத்துக்கள்}} எழுத்துக்களை விட அதிகமாக உள்ளிடவும்", - "supportedImageFormats": "20MB க்குக் கீழே உள்ள JPEG, PNG மற்றும் WEBP கோப்புகள் மட்டுமே ஆதரிக்கப்படுகின்றன", - "valueTooShort": "மதிப்பு மிகக் குறைவு", - "minValue": "இந்த புலத்திற்கான மதிப்பு {{மதிப்பு}} ஐ விட அதிகமாக இருக்க வேண்டும்", - "valueTooLong": "மதிப்பு மிக நீளமானது", - "fieldRequired": "இந்த புலம் தேவை", - "maxValue": "இந்த புலத்திற்கான மதிப்பு {{மதிப்பு} than ஐ விட குறைவாக இருக்க வேண்டும்" - }, - "category": "வகை", - "success": "வெற்றி!", - "noResultsDescription": "இந்த வினவலுக்கு எந்த முடிவுகளும் கிடைக்கவில்லை, வடிப்பான்களின் எண்ணிக்கையைக் குறைப்பதைக் கவனியுங்கள்.", - "routines": { - "addWeightLog": "பயிற்சி பதிவைச் சேர்க்கவும்", - "logsFilterNote": "KG அல்லது LB இன் எடை அலகு கொண்ட உள்ளீடுகள் மற்றும் மறுபடியும் மறுபடியும் பட்டியலிடப்பட்டுள்ளன என்பதை நினைவில் கொள்க, நேரம் போன்ற பிற சேர்க்கைகள் அல்லது தோல்வி வரை இங்கே புறக்கணிக்கப்படும்", - "rir": "ஆர்.ஐ.ஆர்", - "routine": "வழக்கமான", - "routines": "நடைமுறைகள்", - "addDay": "பயிற்சி நாள் சேர்க்கவும்", - "logsHeader": "வொர்க்அவுட்டுக்கான பயிற்சி பதிவு", - "addLogToDay": "இன்றுவரை பதிவைச் சேர்க்கவும்" - }, - "server": { - "incline_bench": "சாய்வு பெஞ்ச்", - "kettlebell": "கெட்டில் பெல்", - "miles": "மைல்கள்", - "miles_per_hour": "ஒரு மணி நேரத்திற்கு மைல்கள்", - "minutes": "நிமிடங்கள்", - "quads": "குவாட்ச்", - "repetitions": "மறுபடியும் மறுபடியும்", - "triceps": "ட்ரைசெப்ச்", - "kg": "கிலோ", - "kilometers": "கிலோமீட்டர்", - "lats": "லாட்ச்", - "legs": "கால்கள்", - "max_reps": "அதிகபட்ச பிரதிநிதிகள்", - "none__bodyweight_exercise_": "எதுவுமில்லை (உடல் எடை உடற்பயிற்சி)", - "abs": "ஏபிஎச்", - "arms": "ஆயுதங்கள்", - "glutes": "க்ளூட்டுகள்", - "gym_mat": "சிம் பாய்", - "sz_bar": "Szar", - "seconds": "நொடிகள்", - "lb": "எல்.பி.", - "back": "பின்", - "barbell": "பார்பெல்", - "bench": "பென்ச்", - "biceps": "கயிறுகள்", - "body_weight": "உடல் எடை", - "calves": "கன்றுகள்", - "cardio": "கார்டியோ", - "chest": "மார்பு", - "dumbbell": "டம்பல்", - "hamstrings": "தொடை எலும்புகள்", - "kilometers_per_hour": "ஒரு மணி நேரத்திற்கு கிலோமீட்டர்", - "plates": "தட்டுகள்", - "pull_up_bar": "பட்டியை இழுக்கவும்", - "shoulders": "தோள்கள்", - "swiss_ball": "சுவிச் பந்து", - "until_failure": "தோல்வி வரை" - }, - "licenses": { - "authors": "ஆசிரியர் (கள்)", - "authorProfile": "கிடைத்தால், ஆசிரியர் வலைத்தளம் அல்லது சுயவிவரத்திற்கான இணைப்பு", - "derivativeSourceUrl": "அசல் மூலத்துடன் இணைக்கவும், இது ஒரு வழித்தோன்றல் வேலை என்றால்", - "derivativeSourceUrlHelper": "ஒரு வழித்தோன்றல் வேலை என்பது முந்தைய படைப்பை அடிப்படையாகக் கொண்ட ஒன்றாகும், ஆனால் அதன் சொந்த பதிப்புரிமைக்கு உரிமை பெற போதுமான புதிய, ஆக்கபூர்வமான உள்ளடக்கத்தையும் கொண்டுள்ளது என்பதை நினைவில் கொள்க.", - "originalObjectUrl": "கிடைத்தால், மூல வலைத்தளத்துடன் இணைக்கவும்", - "originalTitle": "தலைப்பு" - }, - "seeDetails": "விவரங்களைக் காண்க", - "actions": "செயல்கள்", - "notes": "குறிப்புகள்", - "unit": "அலகு", - "alsoSearchEnglish": "ஆங்கிலத்தில் பெயர்களையும் தேடுங்கள்", - "copyToClipboard": "கிளிப்போர்டுக்கு நகலெடுக்கவும்", - "images": "படங்கள்", - "overview": "கண்ணோட்டம்", - "goBack": "பின்", - "language": "மொழி", - "save": "சேமி", - "filters": "வடிப்பான்கள்", - "videos": "வீடியோக்கள்", - "noResults": "முடிவுகள் இல்லை", - "translation": "மொழிபெயர்ப்பு", - "English": "ஆங்கிலம்", - "timeOfDay": "நாள் நேரம்", - "close": "மூடு", + "primaryMuscles": "முதன்மை தசைகள்", + "deleteExerciseReplace": "நீக்கவும் மாற்றவும்", + "alternativeNames": "மாற்று பெயர்கள்", + "exercises": "பயிற்சிகள்", + "changeExerciseLanguage": "இந்த உடற்பயிற்சியின் மொழியை மாற்றவும்", + "noEquipment": "உபகரணங்கள் இல்லை", + "missingExercise": "ஒரு குறிப்பிட்ட உடற்பயிற்சியைக் காணவில்லையா?", + "notesHelpText": "குறிப்புகள் \"உங்கள் உடலை நேராக வைத்திருங்கள்\" போன்ற பயிற்சியை எவ்வாறு செய்வது என்பது குறித்த குறுகிய கருத்துகள்", + "contributeExercise": "ஒரு உடற்பயிற்சியை பங்களிக்கவும்", + "step1HeaderBasics": "ஆங்கிலத்தில் அடிப்படைகள்", + "variations": "மாறுபாடுகள்", + "checkInformationBeforeSubmitting": "பயிற்சியைச் சமர்ப்பிப்பதற்கு முன் நீங்கள் உள்ளிட்ட செய்தி சரியானதா என்பதை சரிபார்க்கவும்", + "submitExercise": "உடற்பயிற்சியை சமர்ப்பிக்கவும்", + "basics": "அடிப்படைகள்", + "exerciseNotTranslatedBody": "இந்த பயிற்சி தற்போது தேர்ந்தெடுக்கப்பட்ட மொழியில் கிடைக்கவில்லை. மொழிபெயர்ப்பை பங்களிக்க விரும்புகிறீர்களா?", + "newNote": "புதிய குறிப்பு", + "filterVariations": "வடிகட்டி மாறுபாடுகளுக்கு உடற்பயிற்சி பெயரை உள்ளிடவும்", + "compatibleImagesCC": "எச்.ஏ. உரிமம் மூலம் சி.சி உடன் படங்கள் இணக்கமாக இருக்க வேண்டும். ஐயம் இருந்தால், நீங்கள் எடுத்த புகைப்படங்களை மட்டுமே பதிவேற்றவும்.", + "exerciseNotTranslated": "மொழிபெயர்ப்பு எதுவும் கிடைக்கவில்லை", + "alsoKnownAs": "மேலும் அழைக்கப்படுகிறது:", + "deleteExerciseBody": "\"{{name}}\" என்ற பயிற்சியை நீக்க விரும்புகிறீர்களா? நீங்கள் தற்போதைய {{language}} மொழிபெயர்ப்பை அல்லது அனைத்து மொழிபெயர்ப்புகள், படங்கள் போன்றவற்றைக் கொண்ட முழுமையான உடற்பயிற்சியை நீக்கலாம்.", + "translateExerciseNow": "இந்த பயிற்சியை இப்போது மொழிபெயர்க்கவும்", + "notes": "குறிப்புகள்" + }, + "nutrition": { + "plans": "ஊட்டச்சத்து திட்டங்கள்", + "onlyLoggingHelpText": "கலோரிகளை மட்டுமே கண்காணிக்கவும். உங்கள் கலோரிகளை மட்டுமே உள்நுழைய விரும்பினால், குறிப்பிட்ட உணவுடன் விரிவான ஊட்டச்சத்து திட்டத்தை அமைக்க விரும்பவில்லை என்றால் பெட்டியை சரிபார்க்கவும்", + "useGoalsHelpText": "இந்த திட்டத்தில் இலக்குகளைச் சேர்க்கவும்", + "useGoalsHelpTextLong": "திட்டத்திற்கான ஆற்றல், புரதம், கார்போஐட்ரேட்டுகள் அல்லது கொழுப்புக்கான பொதுவான இலக்குகளை நிர்ணயிக்க இது உங்களை அனுமதிக்கிறது. நீங்கள் ஒரு விரிவான உணவுத் திட்டத்தை அமைத்தால், இந்த மதிப்புகள் முன்னுரிமை பெறும் என்பதை நினைவில் கொள்க.", + "goalCarbohydrates": "கார்போஐட்ரேட் இலக்கு", + "kcal": "கிலோகலோரி", + "valueEnergyKcalKj": "{{kcal}} kcal / {{kj}} kj", + "searchIngredientName": "மூலப்பொருள் பெயரால் தேடுங்கள்", + "macronutrient": "மேக்ரோனூட்ரியண்ட்", + "percentEnergy": "ஆற்றலின் விழுக்காடு", + "logged": "உள்நுழைந்த", + "loggedToday": "இன்று உள்நுழைந்துள்ளது", "difference": "வேறுபாடு", - "loading": "ஏற்றுகிறது ...", - "addEntry": "உள்ளீட்டைச் சேர்க்கவும்", - "value": "மதிப்பு", - "downloadAsPdf": "PDF ஆக பதிவிறக்கவும்", - "total": "மொத்தம்", - "preferences": "விருப்பத்தேர்வுகள்", - "continue": "தொடரவும்", - "name": "பெயர்", - "cannotBeUndone": "இந்த செயலை செயல்தவிர்க்க முடியாது.", - "cancel": "ரத்துசெய்", - "measurements": { - "measurements": "அளவீடுகள்", - "unitFormHelpText": "சி.எம் அல்லது % போன்ற வகை அளவிடப்படும் அலகு", - "deleteInfo": "இது வகையையும் அதன் அனைத்து உள்ளீடுகளையும் நீக்கும்" - }, - "nothingHereYet": "இன்னும் இங்கே எதுவும் இல்லை ...", - "nothingHereYetAction": "தொடங்க செயல் பொத்தானை அழுத்தவும்" + "7dayAvg": "7 நாள் சராசரி", + "protein": "புரதம்", + "pseudoMealTitle": "பிற பதிவுகள்", + "others": "மற்றவர்கள்", + "sodium": "உவர்மம்", + "mealDeleteInfo": "இந்த உணவுக்கான ஊட்டச்சத்து டைரி உள்ளீடுகள் நீக்கப்படாது, மேலும் \"பிற பதிவுகள்\" இன் கீழ் தோன்றும்", + "logThisMeal": "இந்த உணவை ஊட்டச்சத்து நாட்குறிப்புக்கு பதிவுசெய்க", + "logThisMealItem": "இந்த மூலப்பொருளை ஊட்டச்சத்து நாட்குறிப்புக்கு பதிவுசெய்க", + "valueRemaining": "மீதமுள்ள", + "meal": "உணவு", + "addMeal": "உணவு சேர்க்கவும்", + "copyPlan": "இந்த திட்டத்தின் நகலை உருவாக்கவும்", + "goalProtein": "புரத இலக்கு", + "addMealItem": "உணவுக்கு மூலப்பொருள் சேர்க்கவும்", + "nutritionalDiary": "ஊட்டச்சத்து நாட்குறிப்பு", + "gramShort": "g", + "valueEnergyKcal": "{{value}} கிலோகலோரி", + "planDeleteInfo": "இது அனைத்து ஊட்டச்சத்து டைரி உள்ளீடுகளையும் நீக்கிவிடும்", + "goalFiber": "ஃபைபர் இலக்கு", + "today": "இன்று", + "energy": "ஆற்றல்", + "plan": "ஊட்டச்சத்து திட்டம்", + "goalsTitle": "இலக்குகள்", + "goalEnergy": "ஆற்றல் இலக்கு", + "goalFat": "கொழுப்பு இலக்கு", + "addNutritionalDiary": "ஊட்டச்சத்து டைரி நுழைவு சேர்க்கவும்", + "gPerBodyKg": "g க்கு g-kg", + "planned": "திட்டமிடப்பட்டது", + "carbohydrates": "கார்போஐட்ரேட்டுகள்", + "sugar": "சர்க்கரை", + "ofWhichSugars": "அதில் சர்க்கரைகள்", + "fat": "கொழுப்பு", + "ofWhichSaturated": "அதில் நிறைவுற்றது", + "saturatedFat": "பூரிதக் கொழுப்பு", + "fibres": "இழைகள்", + "diaryEntrySaved": "டைரி நுழைவு வெற்றிகரமாக சேமிக்கப்பட்டது", + "valueTooMany": "பல" + }, + "description": "விவரம்", + "forms": { + "maxLength": "தயவுசெய்து {{chars}} எழுத்துக்களை விட குறைவாக உள்ளிடவும்", + "minLength": "தயவுசெய்து {{chars}} எழுத்துக்களை விட அதிகமாக உள்ளிடவும்", + "supportedImageFormats": "20MB க்குக் கீழே உள்ள JPEG, PNG மற்றும் WEBP கோப்புகள் மட்டுமே ஆதரிக்கப்படுகின்றன", + "valueTooShort": "மதிப்பு மிகக் குறைவு", + "minValue": "இந்த புலத்திற்கான மதிப்பு {{value}} ஐ விட அதிகமாக இருக்க வேண்டும்", + "valueTooLong": "மதிப்பு மிக நீளமானது", + "fieldRequired": "இந்த புலம் தேவை", + "maxValue": "இந்த புலத்திற்கான மதிப்பு {{value}} than ஐ விட குறைவாக இருக்க வேண்டும்" + }, + "category": "வகை", + "success": "வெற்றி!", + "noResultsDescription": "இந்த வினவலுக்கு எந்த முடிவுகளும் கிடைக்கவில்லை, வடிப்பான்களின் எண்ணிக்கையைக் குறைப்பதைக் கவனியுங்கள்.", + "routines": { + "addWeightLog": "பயிற்சி பதிவைச் சேர்க்கவும்", + "logsFilterNote": "KG அல்லது LB இன் எடை அலகு கொண்ட உள்ளீடுகள் மற்றும் மறுபடியும் மறுபடியும் பட்டியலிடப்பட்டுள்ளன என்பதை நினைவில் கொள்க, நேரம் போன்ற பிற சேர்க்கைகள் அல்லது தோல்வி வரை இங்கே புறக்கணிக்கப்படும்", + "rir": "ஆர்.ஐ.ஆர்", + "routine": "வழக்கமான", + "routines": "நடைமுறைகள்", + "addDay": "பயிற்சி நாள் சேர்க்கவும்", + "logsHeader": "வொர்க்அவுட்டுக்கான பயிற்சி பதிவு", + "addLogToDay": "இன்றுவரை பதிவைச் சேர்க்கவும்" + }, + "server": { + "incline_bench": "சாய்வு பெஞ்ச்", + "kettlebell": "கெட்டில் பெல்", + "miles": "மைல்கள்", + "miles_per_hour": "ஒரு மணி நேரத்திற்கு மைல்கள்", + "minutes": "நிமிடங்கள்", + "quads": "குவாட்ச்", + "repetitions": "மறுபடியும் மறுபடியும்", + "triceps": "ட்ரைசெப்ச்", + "kg": "கிலோ", + "kilometers": "கிலோமீட்டர்", + "lats": "லாட்ச்", + "legs": "கால்கள்", + "max_reps": "அதிகபட்ச பிரதிநிதிகள்", + "none__bodyweight_exercise_": "எதுவுமில்லை (உடல் எடை உடற்பயிற்சி)", + "abs": "ஏபிஎச்", + "arms": "ஆயுதங்கள்", + "glutes": "க்ளூட்டுகள்", + "gym_mat": "சிம் பாய்", + "sz_bar": "Szar", + "seconds": "நொடிகள்", + "lb": "எல்.பி.", + "back": "பின்", + "barbell": "பார்பெல்", + "bench": "பென்ச்", + "biceps": "கயிறுகள்", + "body_weight": "உடல் எடை", + "calves": "கன்றுகள்", + "cardio": "கார்டியோ", + "chest": "மார்பு", + "dumbbell": "டம்பல்", + "hamstrings": "தொடை எலும்புகள்", + "kilometers_per_hour": "ஒரு மணி நேரத்திற்கு கிலோமீட்டர்", + "plates": "தட்டுகள்", + "pull_up_bar": "பட்டியை இழுக்கவும்", + "shoulders": "தோள்கள்", + "swiss_ball": "சுவிச் பந்து", + "until_failure": "தோல்வி வரை" + }, + "licenses": { + "authors": "ஆசிரியர் (கள்)", + "authorProfile": "கிடைத்தால், ஆசிரியர் வலைத்தளம் அல்லது சுயவிவரத்திற்கான இணைப்பு", + "derivativeSourceUrl": "அசல் மூலத்துடன் இணைக்கவும், இது ஒரு வழித்தோன்றல் வேலை என்றால்", + "derivativeSourceUrlHelper": "ஒரு வழித்தோன்றல் வேலை என்பது முந்தைய படைப்பை அடிப்படையாகக் கொண்ட ஒன்றாகும், ஆனால் அதன் சொந்த பதிப்புரிமைக்கு உரிமை பெற போதுமான புதிய, ஆக்கபூர்வமான உள்ளடக்கத்தையும் கொண்டுள்ளது என்பதை நினைவில் கொள்க.", + "originalObjectUrl": "கிடைத்தால், மூல வலைத்தளத்துடன் இணைக்கவும்", + "originalTitle": "தலைப்பு" + }, + "seeDetails": "விவரங்களைக் காண்க", + "actions": "செயல்கள்", + "notes": "குறிப்புகள்", + "unit": "அலகு", + "alsoSearchEnglish": "ஆங்கிலத்தில் பெயர்களையும் தேடுங்கள்", + "copyToClipboard": "கிளிப்போர்டுக்கு நகலெடுக்கவும்", + "images": "படங்கள்", + "overview": "கண்ணோட்டம்", + "goBack": "பின்", + "language": "மொழி", + "save": "சேமி", + "filters": "வடிப்பான்கள்", + "videos": "வீடியோக்கள்", + "noResults": "முடிவுகள் இல்லை", + "translation": "மொழிபெயர்ப்பு", + "English": "ஆங்கிலம்", + "timeOfDay": "நாள் நேரம்", + "close": "மூடு", + "difference": "வேறுபாடு", + "loading": "ஏற்றுகிறது ...", + "addEntry": "உள்ளீட்டைச் சேர்க்கவும்", + "value": "மதிப்பு", + "downloadAsPdf": "PDF ஆக பதிவிறக்கவும்", + "total": "மொத்தம்", + "preferences": "விருப்பத்தேர்வுகள்", + "continue": "தொடரவும்", + "name": "பெயர்", + "cannotBeUndone": "இந்த செயலை செயல்தவிர்க்க முடியாது.", + "cancel": "ரத்துசெய்", + "measurements": { + "measurements": "அளவீடுகள்", + "unitFormHelpText": "சி.எம் அல்லது % போன்ற வகை அளவிடப்படும் அலகு", + "deleteInfo": "இது வகையையும் அதன் அனைத்து உள்ளீடுகளையும் நீக்கும்" + }, + "nothingHereYet": "இன்னும் இங்கே எதுவும் இல்லை ...", + "nothingHereYetAction": "தொடங்க செயல் பொத்தானை அழுத்தவும்" } diff --git a/wger/core/static/react/main.js b/wger/core/static/react/main.js index d04969b5e..ec8968222 100644 --- a/wger/core/static/react/main.js +++ b/wger/core/static/react/main.js @@ -1,4 +1,4 @@ -var Jge=Object.defineProperty;var yH=e=>{throw TypeError(e)};var Zge=(e,t,n)=>t in e?Jge(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var eye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var sn=(e,t,n)=>Zge(e,typeof t!="symbol"?t+"":t,n),EA=(e,t,n)=>t.has(e)||yH("Cannot "+n);var be=(e,t,n)=>(EA(e,t,"read from private field"),n?n.call(e):t.get(e)),Ft=(e,t,n)=>t.has(e)?yH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),vt=(e,t,n,r)=>(EA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),dn=(e,t,n)=>(EA(e,t,"access private method"),n);var J1=(e,t,n,r)=>({set _(o){vt(e,t,o,n)},get _(){return be(e,t,r)}});var pRt=eye((Ka,Ya)=>{function tY(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nY={exports:{}},vO={},rY={exports:{}},En={};/** +var hye=Object.defineProperty;var EH=e=>{throw TypeError(e)};var mye=(e,t,n)=>t in e?hye(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var nn=(e,t,n)=>mye(e,typeof t!="symbol"?t+"":t,n),NA=(e,t,n)=>t.has(e)||EH("Cannot "+n);var be=(e,t,n)=>(NA(e,t,"read from private field"),n?n.call(e):t.get(e)),Ft=(e,t,n)=>t.has(e)?EH("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),vt=(e,t,n,r)=>(NA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fn=(e,t,n)=>(NA(e,t,"access private method"),n);var lC=(e,t,n,r)=>({set _(o){vt(e,t,o,n)},get _(){return be(e,t,r)}});var jRt=gye((Ya,Xa)=>{function fY(e,t){for(var n=0;nr[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pY={exports:{}},MO={},hY={exports:{}},En={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Jge=Object.defineProperty;var yH=e=>{throw TypeError(e)};var Zge=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var nS=Symbol.for("react.element"),tye=Symbol.for("react.portal"),nye=Symbol.for("react.fragment"),rye=Symbol.for("react.strict_mode"),oye=Symbol.for("react.profiler"),iye=Symbol.for("react.provider"),aye=Symbol.for("react.context"),sye=Symbol.for("react.forward_ref"),lye=Symbol.for("react.suspense"),cye=Symbol.for("react.memo"),uye=Symbol.for("react.lazy"),vH=Symbol.iterator;function dye(e){return e===null||typeof e!="object"?null:(e=vH&&e[vH]||e["@@iterator"],typeof e=="function"?e:null)}var oY={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},iY=Object.assign,aY={};function wv(e,t,n){this.props=e,this.context=t,this.refs=aY,this.updater=n||oY}wv.prototype.isReactComponent={};wv.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};wv.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function sY(){}sY.prototype=wv.prototype;function rL(e,t,n){this.props=e,this.context=t,this.refs=aY,this.updater=n||oY}var oL=rL.prototype=new sY;oL.constructor=rL;iY(oL,wv.prototype);oL.isPureReactComponent=!0;var bH=Array.isArray,lY=Object.prototype.hasOwnProperty,iL={current:null},cY={key:!0,ref:!0,__self:!0,__source:!0};function uY(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)lY.call(t,r)&&!cY.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1{throw TypeError(e)};var Zge=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var gye=y,yye=Symbol.for("react.element"),vye=Symbol.for("react.fragment"),bye=Object.prototype.hasOwnProperty,wye=gye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xye={key:!0,ref:!0,__self:!0,__source:!0};function fY(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)bye.call(t,r)&&!xye.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:yye,type:e,key:i,ref:a,props:o,_owner:wye.current}}vO.Fragment=vye;vO.jsx=fY;vO.jsxs=fY;nY.exports=vO;var $=nY.exports,Sye=!1;function Cye(e){if(e.sheet)return e.sheet;for(var t=0;t0?ni(xv,--Pa):0,xy--,ho===10&&(xy=1,wO--),ho}function Xa(){return ho=Pa2||Ew(ho)>3?"":" "}function Nye(e,t){for(;--t&&Xa()&&!(ho<48||ho>102||ho>57&&ho<65||ho>70&&ho<97););return rS(e,fP()+(t<6&&Ec()==32&&Xa()==32))}function jR(e){for(;Xa();)switch(ho){case e:return Pa;case 34:case 39:e!==34&&e!==39&&jR(ho);break;case 40:e===41&&jR(e);break;case 92:Xa();break}return Pa}function Lye(e,t){for(;Xa()&&e+ho!==57;)if(e+ho===84&&Ec()===47)break;return"/*"+rS(t,Pa-1)+"*"+bO(e===47?e:Xa())}function Fye(e){for(;!Ew(Ec());)Xa();return rS(e,Pa)}function jye(e){return vY(hP("",null,null,null,[""],e=yY(e),0,[0],e))}function hP(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,m=0,g=1,v=1,w=1,x=0,S="",P=o,T=i,E=r,O=S;v;)switch(m=x,x=Xa()){case 40:if(m!=108&&ni(O,d-1)==58){FR(O+=Yn(pP(x),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:O+=pP(x);break;case 9:case 10:case 13:case 32:O+=Dye(m);break;case 92:O+=Nye(fP()-1,7);continue;case 47:switch(Ec()){case 42:case 47:eC(Bye(Lye(Xa(),fP()),t,n),l);break;default:O+="/"}break;case 123*g:s[c++]=bc(O)*w;case 125*g:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+u:w==-1&&(O=Yn(O,/\f/g,"")),h>0&&bc(O)-d&&eC(h>32?SH(O+";",r,n,d-1):SH(Yn(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(eC(E=xH(O,t,n,c,u,o,s,S,P=[],T=[],d),i),x===123)if(u===0)hP(O,t,E,E,P,i,d,s,T);else switch(f===99&&ni(O,3)===110?100:f){case 100:case 108:case 109:case 115:hP(e,E,E,r&&eC(xH(e,E,E,0,0,o,s,S,o,P=[],d),T),o,T,d,s,r?P:T);break;default:hP(O,E,E,E,[""],T,0,s,T)}}c=u=h=0,g=w=1,S=O="",d=a;break;case 58:d=1+bc(O),h=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&_ye()==125)continue}switch(O+=bO(x),x*g){case 38:w=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(bc(O)-1)*w,w=1;break;case 64:Ec()===45&&(O+=pP(Xa())),f=Ec(),u=d=bc(S=O+=Fye(fP())),x++;break;case 45:m===45&&bc(O)==2&&(g=0)}}return i}function xH(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=o===0?i:[""],h=cL(f),m=0,g=0,v=0;m0?f[w]+" "+x:Yn(x,/&\f/g,f[w])))&&(l[v++]=S);return xO(e,t,n,o===0?sL:s,l,c,u)}function Bye(e,t,n){return xO(e,t,n,pY,bO(Rye()),Tw(e,2,-2),0)}function SH(e,t,n,r){return xO(e,t,n,lL,Tw(e,0,r),Tw(e,r+1,-1),r)}function Ng(e,t){for(var n="",r=cL(e),o=0;o6)switch(ni(e,t+1)){case 109:if(ni(e,t+4)!==45)break;case 102:return Yn(e,/(.+:)(.+)-([^]+)/,"$1"+Kn+"$2-$3$1"+GP+(ni(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~FR(e,"stretch")?wY(Yn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ni(e,t+1)!==115)break;case 6444:switch(ni(e,bc(e)-3-(~FR(e,"!important")&&10))){case 107:return Yn(e,":",":"+Kn)+e;case 101:return Yn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Kn+(ni(e,14)===45?"inline-":"")+"box$3$1"+Kn+"$2$3$1"+hi+"$2box$3")+e}break;case 5936:switch(ni(e,t+11)){case 114:return Kn+e+hi+Yn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Kn+e+hi+Yn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Kn+e+hi+Yn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Kn+e+hi+e+e}return e}var Yye=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case lL:t.return=wY(t.value,t.length);break;case hY:return Ng([jb(t,{value:Yn(t.value,"@","@"+Kn)})],o);case sL:if(t.length)return $ye(t.props,function(i){switch(Aye(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ng([jb(t,{props:[Yn(i,/:(read-\w+)/,":"+GP+"$1")]})],o);case"::placeholder":return Ng([jb(t,{props:[Yn(i,/:(plac\w+)/,":"+Kn+"input-$1")]}),jb(t,{props:[Yn(i,/:(plac\w+)/,":"+GP+"$1")]}),jb(t,{props:[Yn(i,/:(plac\w+)/,hi+"input-$1")]})],o)}return""})}},Xye=[Yye],xY=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||Xye,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),w=1;w0?ri($v,--Pa):0,My--,mo===10&&(My=1,$O--),mo}function Qa(){return mo=Pa2||Dw(mo)>3?"":" "}function Jye(e,t){for(;--t&&Qa()&&!(mo<48||mo>102||mo>57&&mo<65||mo>70&&mo<97););return dS(e,CP()+(t<6&&Mc()==32&&Qa()==32))}function YR(e){for(;Qa();)switch(mo){case e:return Pa;case 34:case 39:e!==34&&e!==39&&YR(mo);break;case 40:e===41&&YR(e);break;case 92:Qa();break}return Pa}function Zye(e,t){for(;Qa()&&e+mo!==57;)if(e+mo===84&&Mc()===47)break;return"/*"+dS(t,Pa-1)+"*"+AO(e===47?e:Qa())}function eve(e){for(;!Dw(Mc());)Qa();return dS(e,Pa)}function tve(e){return kY(TP("",null,null,null,[""],e=IY(e),0,[0],e))}function TP(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,g=1,v=1,w=1,x=0,S="",P=o,T=i,E=r,O=S;v;)switch(m=x,x=Qa()){case 40:if(m!=108&&ri(O,d-1)==58){KR(O+=Xn(PP(x),"&","&\f"),"&\f")!=-1&&(w=-1);break}case 34:case 39:case 91:O+=PP(x);break;case 9:case 10:case 13:case 32:O+=Qye(m);break;case 92:O+=Jye(CP()-1,7);continue;case 47:switch(Mc()){case 42:case 47:uC(nve(Zye(Qa(),CP()),t,n),l);break;default:O+="/"}break;case 123*g:s[c++]=Sc(O)*w;case 125*g:case 59:case 0:switch(x){case 0:case 125:v=0;case 59+u:w==-1&&(O=Xn(O,/\f/g,"")),p>0&&Sc(O)-d&&uC(p>32?AH(O+";",r,n,d-1):AH(Xn(O," ","")+";",r,n,d-2),l);break;case 59:O+=";";default:if(uC(E=MH(O,t,n,c,u,o,s,S,P=[],T=[],d),i),x===123)if(u===0)TP(O,t,E,E,P,i,d,s,T);else switch(f===99&&ri(O,3)===110?100:f){case 100:case 108:case 109:case 115:TP(e,E,E,r&&uC(MH(e,E,E,0,0,o,s,S,o,P=[],d),T),o,T,d,s,r?P:T);break;default:TP(O,E,E,E,[""],T,0,s,T)}}c=u=p=0,g=w=1,S=O="",d=a;break;case 58:d=1+Sc(O),p=m;default:if(g<1){if(x==123)--g;else if(x==125&&g++==0&&Xye()==125)continue}switch(O+=AO(x),x*g){case 38:w=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(Sc(O)-1)*w,w=1;break;case 64:Mc()===45&&(O+=PP(Qa())),f=Mc(),u=d=Sc(S=O+=eve(CP())),x++;break;case 45:m===45&&Sc(O)==2&&(g=0)}}return i}function MH(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=o===0?i:[""],p=wL(f),m=0,g=0,v=0;m0?f[w]+" "+x:Xn(x,/&\f/g,f[w])))&&(l[v++]=S);return RO(e,t,n,o===0?vL:s,l,c,u)}function nve(e,t,n){return RO(e,t,n,PY,AO(Yye()),_w(e,2,-2),0)}function AH(e,t,n,r){return RO(e,t,n,bL,_w(e,0,r),_w(e,r+1,-1),r)}function Wg(e,t){for(var n="",r=wL(e),o=0;o6)switch(ri(e,t+1)){case 109:if(ri(e,t+4)!==45)break;case 102:return Xn(e,/(.+:)(.+)-([^]+)/,"$1"+Yn+"$2-$3$1"+oT+(ri(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~KR(e,"stretch")?AY(Xn(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(ri(e,t+1)!==115)break;case 6444:switch(ri(e,Sc(e)-3-(~KR(e,"!important")&&10))){case 107:return Xn(e,":",":"+Yn)+e;case 101:return Xn(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Yn+(ri(e,14)===45?"inline-":"")+"box$3$1"+Yn+"$2$3$1"+hi+"$2box$3")+e}break;case 5936:switch(ri(e,t+11)){case 114:return Yn+e+hi+Xn(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Yn+e+hi+Xn(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Yn+e+hi+Xn(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Yn+e+hi+e+e}return e}var dve=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case bL:t.return=AY(t.value,t.length);break;case TY:return Wg([Kb(t,{value:Xn(t.value,"@","@"+Yn)})],o);case vL:if(t.length)return Kye(t.props,function(i){switch(qye(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Wg([Kb(t,{props:[Xn(i,/:(read-\w+)/,":"+oT+"$1")]})],o);case"::placeholder":return Wg([Kb(t,{props:[Xn(i,/:(plac\w+)/,":"+Yn+"input-$1")]}),Kb(t,{props:[Xn(i,/:(plac\w+)/,":"+oT+"$1")]}),Kb(t,{props:[Xn(i,/:(plac\w+)/,hi+"input-$1")]})],o)}return""})}},fve=[dve],$Y=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var o=t.stylisPlugins||fve,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),w=1;w=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var IY={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ave=!1,sve=/[A-Z]|^ms/g,lve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,kY=function(t){return t.charCodeAt(1)===45},PH=function(t){return t!=null&&typeof t!="boolean"},IA=bY(function(e){return kY(e)?e:e.replace(sve,"-$&").toLowerCase()}),TH=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(lve,function(r,o,i){return wc={name:o,styles:i,next:wc},o})}return IY[t]!==1&&!kY(t)&&typeof n=="number"&&n!==0?n+"px":n},cve="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Ow(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return wc={name:o.name,styles:o.styles,next:wc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)wc={name:a.name,styles:a.styles,next:wc},a=a.next;var s=i.styles+";";return s}return uve(e,t,n)}case"function":{if(e!==void 0){var l=wc,c=n(e);return wc=l,Ow(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function uve(e,t,n){var r="";if(Array.isArray(n))for(var o=0;on.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Ul="$$material";function yve(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var vve=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,bve=yve(function(e){return vve.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),wve=bve,xve=function(t){return t!=="theme"},IH=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?wve:xve},kH=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},Sve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return pL(n,r,o),AY(function(){return hL(n,r,o)}),null},Cve=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=kH(t,n,r),l=s||IH(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,h=1;ht(Nve(o)?n:o):t;return $.jsx(gve,{styles:r})}/** + */var Ko=typeof Symbol=="function"&&Symbol.for,xL=Ko?Symbol.for("react.element"):60103,SL=Ko?Symbol.for("react.portal"):60106,_O=Ko?Symbol.for("react.fragment"):60107,DO=Ko?Symbol.for("react.strict_mode"):60108,NO=Ko?Symbol.for("react.profiler"):60114,LO=Ko?Symbol.for("react.provider"):60109,FO=Ko?Symbol.for("react.context"):60110,CL=Ko?Symbol.for("react.async_mode"):60111,jO=Ko?Symbol.for("react.concurrent_mode"):60111,BO=Ko?Symbol.for("react.forward_ref"):60112,zO=Ko?Symbol.for("react.suspense"):60113,pve=Ko?Symbol.for("react.suspense_list"):60120,VO=Ko?Symbol.for("react.memo"):60115,HO=Ko?Symbol.for("react.lazy"):60116,hve=Ko?Symbol.for("react.block"):60121,mve=Ko?Symbol.for("react.fundamental"):60117,gve=Ko?Symbol.for("react.responder"):60118,yve=Ko?Symbol.for("react.scope"):60119;function us(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xL:switch(e=e.type,e){case CL:case jO:case _O:case NO:case DO:case zO:return e;default:switch(e=e&&e.$$typeof,e){case FO:case BO:case HO:case VO:case LO:return e;default:return t}}case SL:return t}}}function _Y(e){return us(e)===jO}ir.AsyncMode=CL;ir.ConcurrentMode=jO;ir.ContextConsumer=FO;ir.ContextProvider=LO;ir.Element=xL;ir.ForwardRef=BO;ir.Fragment=_O;ir.Lazy=HO;ir.Memo=VO;ir.Portal=SL;ir.Profiler=NO;ir.StrictMode=DO;ir.Suspense=zO;ir.isAsyncMode=function(e){return _Y(e)||us(e)===CL};ir.isConcurrentMode=_Y;ir.isContextConsumer=function(e){return us(e)===FO};ir.isContextProvider=function(e){return us(e)===LO};ir.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xL};ir.isForwardRef=function(e){return us(e)===BO};ir.isFragment=function(e){return us(e)===_O};ir.isLazy=function(e){return us(e)===HO};ir.isMemo=function(e){return us(e)===VO};ir.isPortal=function(e){return us(e)===SL};ir.isProfiler=function(e){return us(e)===NO};ir.isStrictMode=function(e){return us(e)===DO};ir.isSuspense=function(e){return us(e)===zO};ir.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===_O||e===jO||e===NO||e===DO||e===zO||e===pve||typeof e=="object"&&e!==null&&(e.$$typeof===HO||e.$$typeof===VO||e.$$typeof===LO||e.$$typeof===FO||e.$$typeof===BO||e.$$typeof===mve||e.$$typeof===gve||e.$$typeof===yve||e.$$typeof===hve)};ir.typeOf=us;RY.exports=ir;var vve=RY.exports,DY=vve,bve={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},wve={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},NY={};NY[DY.ForwardRef]=bve;NY[DY.Memo]=wve;var xve=!0;function LY(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var PL=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||xve===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},TL=function(t,n,r){PL(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function FY(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var jY={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Sve=!1,Cve=/[A-Z]|^ms/g,Pve=/_EMO_([^_]+?)_([^]*?)_EMO_/g,BY=function(t){return t.charCodeAt(1)===45},RH=function(t){return t!=null&&typeof t!="boolean"},FA=MY(function(e){return BY(e)?e:e.replace(Cve,"-$&").toLowerCase()}),_H=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Pve,function(r,o,i){return Cc={name:o,styles:i,next:Cc},o})}return jY[t]!==1&&!BY(t)&&typeof n=="number"&&n!==0?n+"px":n},Tve="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Nw(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Cc={name:o.name,styles:o.styles,next:Cc},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Cc={name:a.name,styles:a.styles,next:Cc},a=a.next;var s=i.styles+";";return s}return Eve(e,t,n)}case"function":{if(e!==void 0){var l=Cc,c=n(e);return Cc=l,Nw(e,t,c)}break}}var u=n;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function Eve(e,t,n){var r="";if(Array.isArray(n))for(var o=0;on.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const Kl="$$material";function Rve(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var _ve=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Dve=Rve(function(e){return _ve.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Nve=Dve,Lve=function(t){return t!=="theme"},LH=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Nve:Lve},FH=function(t,n,r){var o;if(n){var i=n.shouldForwardProp;o=t.__emotion_forwardProp&&i?function(a){return t.__emotion_forwardProp(a)&&i(a)}:i}return typeof o!="function"&&r&&(o=t.__emotion_forwardProp),o},Fve=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;return PL(n,r,o),VY(function(){return TL(n,r,o)}),null},jve=function e(t,n){var r=t.__emotion_real===t,o=r&&t.__emotion_base||t,i,a;n!==void 0&&(i=n.label,a=n.target);var s=FH(t,n,r),l=s||LH(o),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(i!==void 0&&d.push("label:"+i+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;pt(Jve(o)?n:o):t;return $.jsx($ve,{styles:r})}/** * @mui/styled-engine v6.1.6 * * @license MIT * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */function jY(e,t){return zR(e,t)}function Lve(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const RH=[];function _H(e){return RH[0]=e,Mve(RH)}function xc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function BY(e){if(!xc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=BY(e[n])}),t}function vo(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return xc(e)&&xc(t)&&Object.keys(t).forEach(o=>{xc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&xc(e[o])?r[o]=vo(e[o],t[o],n):n.clone?r[o]=xc(t[o])?BY(t[o]):t[o]:r[o]=t[o]}),r}const Fve=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function jve(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=Fve(t),a=Object.keys(i);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,h){const m=a.indexOf(h);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:h)-r/100}${n})`}function u(f){return a.indexOf(f)+1r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function zve(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function Vve(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function Hve(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const Uve={borderRadius:4};function G0(e,t){return t?vo(e,t,{clone:!1}):e}const RO={xs:0,sm:600,md:900,lg:1200,xl:1536},DH={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${RO[e]}px)`},Wve={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:RO[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function Jl(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||DH;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||DH;return Object.keys(t).reduce((a,s)=>{if(zve(i.keys,s)){const l=Vve(r.containerQueries?r:Wve,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||RO).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function zY(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function VY(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function Gve(e,...t){const n=zY(e),r=[n,...t].reduce((o,i)=>vo(o,i),{});return VY(Object.keys(n),r)}function qve(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function MA({values:e,breakpoints:t,base:n}){const r=n||qve(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Ce(e){if(typeof e!="string")throw new Error(Fu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function _O(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function KP(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=_O(e,n)||r,t&&(o=t(o,r,e)),o}function so(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=_O(l,r)||{};return Jl(a,s,d=>{let f=KP(c,o,d);return d===f&&typeof d=="string"&&(f=KP(c,o,`${t}${d==="default"?"":Ce(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function Kve(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const Yve={m:"margin",p:"padding"},Xve={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},NH={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},Qve=Kve(e=>{if(e.length>2)if(NH[e])e=NH[e];else return[e];const[t,n]=e.split(""),r=Yve[t],o=Xve[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),vL=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],bL=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...vL,...bL];function aS(e,t,n,r){const o=_O(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function DO(e){return aS(e,"spacing",8)}function uh(e,t){return typeof t=="string"||t==null?t:e(t)}function Jve(e,t){return n=>e.reduce((r,o)=>(r[o]=uh(t,n),r),{})}function Zve(e,t,n,r){if(!t.includes(n))return null;const o=Qve(n),i=Jve(o,r),a=e[n];return Jl(e,a,i)}function HY(e,t){const n=DO(e.theme);return Object.keys(e).map(r=>Zve(e,t,r,n)).reduce(G0,{})}function Xr(e){return HY(e,vL)}Xr.propTypes={};Xr.filterProps=vL;function Qr(e){return HY(e,bL)}Qr.propTypes={};Qr.filterProps=bL;function UY(e=8,t=DO({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function NO(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?G0(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Vs(e){return typeof e!="number"?e:`${e}px solid`}function cl(e,t){return so({prop:e,themeKey:"borders",transform:t})}const ebe=cl("border",Vs),tbe=cl("borderTop",Vs),nbe=cl("borderRight",Vs),rbe=cl("borderBottom",Vs),obe=cl("borderLeft",Vs),ibe=cl("borderColor"),abe=cl("borderTopColor"),sbe=cl("borderRightColor"),lbe=cl("borderBottomColor"),cbe=cl("borderLeftColor"),ube=cl("outline",Vs),dbe=cl("outlineColor"),LO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=aS(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:uh(t,r)});return Jl(e,e.borderRadius,n)}return null};LO.propTypes={};LO.filterProps=["borderRadius"];NO(ebe,tbe,nbe,rbe,obe,ibe,abe,sbe,lbe,cbe,LO,ube,dbe);const FO=e=>{if(e.gap!==void 0&&e.gap!==null){const t=aS(e.theme,"spacing",8),n=r=>({gap:uh(t,r)});return Jl(e,e.gap,n)}return null};FO.propTypes={};FO.filterProps=["gap"];const jO=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=aS(e.theme,"spacing",8),n=r=>({columnGap:uh(t,r)});return Jl(e,e.columnGap,n)}return null};jO.propTypes={};jO.filterProps=["columnGap"];const BO=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=aS(e.theme,"spacing",8),n=r=>({rowGap:uh(t,r)});return Jl(e,e.rowGap,n)}return null};BO.propTypes={};BO.filterProps=["rowGap"];const fbe=so({prop:"gridColumn"}),pbe=so({prop:"gridRow"}),hbe=so({prop:"gridAutoFlow"}),mbe=so({prop:"gridAutoColumns"}),gbe=so({prop:"gridAutoRows"}),ybe=so({prop:"gridTemplateColumns"}),vbe=so({prop:"gridTemplateRows"}),bbe=so({prop:"gridTemplateAreas"}),wbe=so({prop:"gridArea"});NO(FO,jO,BO,fbe,pbe,hbe,mbe,gbe,ybe,vbe,bbe,wbe);function Lg(e,t){return t==="grey"?t:e}const xbe=so({prop:"color",themeKey:"palette",transform:Lg}),Sbe=so({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Lg}),Cbe=so({prop:"backgroundColor",themeKey:"palette",transform:Lg});NO(xbe,Sbe,Cbe);function Ua(e){return e<=1&&e!==0?`${e*100}%`:e}const Pbe=so({prop:"width",transform:Ua}),wL=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||RO[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Ua(n)}};return Jl(e,e.maxWidth,t)}return null};wL.filterProps=["maxWidth"];const Tbe=so({prop:"minWidth",transform:Ua}),Ebe=so({prop:"height",transform:Ua}),Obe=so({prop:"maxHeight",transform:Ua}),Ibe=so({prop:"minHeight",transform:Ua});so({prop:"size",cssProperty:"width",transform:Ua});so({prop:"size",cssProperty:"height",transform:Ua});const kbe=so({prop:"boxSizing"});NO(Pbe,wL,Tbe,Ebe,Obe,Ibe,kbe);const sS={border:{themeKey:"borders",transform:Vs},borderTop:{themeKey:"borders",transform:Vs},borderRight:{themeKey:"borders",transform:Vs},borderBottom:{themeKey:"borders",transform:Vs},borderLeft:{themeKey:"borders",transform:Vs},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vs},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:LO},color:{themeKey:"palette",transform:Lg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Lg},backgroundColor:{themeKey:"palette",transform:Lg},p:{style:Qr},pt:{style:Qr},pr:{style:Qr},pb:{style:Qr},pl:{style:Qr},px:{style:Qr},py:{style:Qr},padding:{style:Qr},paddingTop:{style:Qr},paddingRight:{style:Qr},paddingBottom:{style:Qr},paddingLeft:{style:Qr},paddingX:{style:Qr},paddingY:{style:Qr},paddingInline:{style:Qr},paddingInlineStart:{style:Qr},paddingInlineEnd:{style:Qr},paddingBlock:{style:Qr},paddingBlockStart:{style:Qr},paddingBlockEnd:{style:Qr},m:{style:Xr},mt:{style:Xr},mr:{style:Xr},mb:{style:Xr},ml:{style:Xr},mx:{style:Xr},my:{style:Xr},margin:{style:Xr},marginTop:{style:Xr},marginRight:{style:Xr},marginBottom:{style:Xr},marginLeft:{style:Xr},marginX:{style:Xr},marginY:{style:Xr},marginInline:{style:Xr},marginInlineStart:{style:Xr},marginInlineEnd:{style:Xr},marginBlock:{style:Xr},marginBlockStart:{style:Xr},marginBlockEnd:{style:Xr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:FO},rowGap:{style:BO},columnGap:{style:jO},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Ua},maxWidth:{style:wL},minWidth:{transform:Ua},height:{transform:Ua},maxHeight:{transform:Ua},minHeight:{transform:Ua},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Mbe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function Abe(e,t){return typeof e=="function"?e(t):e}function $be(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=_O(o,c)||{};return d?d(a):Jl(a,r,m=>{let g=KP(f,u,m);return m===g&&typeof m=="string"&&(g=KP(f,u,`${n}${m==="default"?"":Ce(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??sS;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=zY(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(f=>{const h=Abe(l[f],o);if(h!=null)if(typeof h=="object")if(i[f])d=G0(d,e(f,h,o,i));else{const m=Jl({theme:o},h,g=>({[f]:g}));Mbe(m,h)?d[f]=t({sx:h,theme:o}):d=G0(d,m)}else d=G0(d,e(f,h,o,i))}),Bve(o,VY(u,d))}return Array.isArray(r)?r.map(a):a(r)}return t}const xf=$be();xf.filterProps=["sx"];function Rbe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function Sv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=jve(n),l=UY(o);let c=vo({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...Uve,...i}},a);return c=Hve(c),c.applyStyles=Rbe,c=t.reduce((u,d)=>vo(u,d),c),c.unstable_sxConfig={...sS,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return xf({sx:d,theme:this})},c}function _be(e){return Object.keys(e).length===0}function xL(e=null){const t=y.useContext(oS);return!t||_be(t)?e:t}const Dbe=Sv();function lS(e=Dbe){return xL(e)}function Nbe({styles:e,themeId:t,defaultTheme:n={}}){const r=lS(n),o=typeof e=="function"?e(t&&r[t]||r):e;return $.jsx(FY,{styles:o})}const Lbe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??sS;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function zO(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=Lbe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return xc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const LH=e=>e,Fbe=()=>{let e=LH;return{configure(t){e=t},generate(t){return e(t)},reset(){e=LH}}},WY=Fbe();function GY(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(xf);return y.forwardRef(function(l,c){const u=lS(n),{className:d,component:f="div",...h}=zO(l);return $.jsx(i,{as:f,ref:c,className:fe(d,o?o(r):r),theme:t&&u[t]||u,...h})})}const Bbe={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function tt(e,t,n="Mui"){const r=Bbe[t];return r?`${n}-${r}`:`${WY.generate(e)}-${t}`}function ot(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=tt(e,o,n)}),r}var qY={exports:{}},ar={};/** + */function XY(e,t){return QR(e,t)}function Zve(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const VH=[];function HH(e){return VH[0]=e,Gve(VH)}function Pc(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function QY(e){if(!Pc(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=QY(e[n])}),t}function bo(e,t,n={clone:!0}){const r=n.clone?{...e}:e;return Pc(e)&&Pc(t)&&Object.keys(t).forEach(o=>{Pc(t[o])&&Object.prototype.hasOwnProperty.call(e,o)&&Pc(e[o])?r[o]=bo(e[o],t[o],n):n.clone?r[o]=Pc(t[o])?QY(t[o]):t[o]:r[o]=t[o]}),r}const ebe=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>({...n,[r.key]:r.val}),{})};function tbe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=ebe(t),a=Object.keys(i);function s(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function l(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function c(f,p){const m=a.indexOf(p);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(m!==-1&&typeof t[a[m]]=="number"?t[a[m]]:p)-r/100}${n})`}function u(f){return a.indexOf(f)+1r.startsWith("@container")).sort((r,o)=>{var a,s;const i=/min-width:\s*([0-9.]+)/;return+(((a=r.match(i))==null?void 0:a[1])||0)-+(((s=o.match(i))==null?void 0:s[1])||0)});return n.length?n.reduce((r,o)=>{const i=t[o];return delete r[o],r[o]=i,r},{...t}):t}function rbe(e,t){return t==="@"||t.startsWith("@")&&(e.some(n=>t.startsWith(`@${n}`))||!!t.match(/^@\d/))}function obe(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function ibe(e){const t=(i,a)=>i.replace("@media",a?`@container ${a}`:"@container");function n(i,a){i.up=(...s)=>t(e.breakpoints.up(...s),a),i.down=(...s)=>t(e.breakpoints.down(...s),a),i.between=(...s)=>t(e.breakpoints.between(...s),a),i.only=(...s)=>t(e.breakpoints.only(...s),a),i.not=(...s)=>{const l=t(e.breakpoints.not(...s),a);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const r={},o=i=>(n(r,i),r);return n(o),{...e,containerQueries:o}}const abe={borderRadius:4};function tw(e,t){return t?bo(e,t,{clone:!1}):e}const WO={xs:0,sm:600,md:900,lg:1200,xl:1536},UH={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${WO[e]}px)`},sbe={containerQueries:e=>({up:t=>{let n=typeof t=="number"?t:WO[t]||t;return typeof n=="number"&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function nc(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||UH;return t.reduce((a,s,l)=>(a[i.up(i.keys[l])]=n(t[l]),a),{})}if(typeof t=="object"){const i=r.breakpoints||UH;return Object.keys(t).reduce((a,s)=>{if(rbe(i.keys,s)){const l=obe(r.containerQueries?r:sbe,s);l&&(a[l]=n(t[s],s))}else if(Object.keys(i.values||WO).includes(s)){const l=i.up(s);a[l]=n(t[s],s)}else{const l=s;a[l]=t[l]}return a},{})}return n(t)}function JY(e={}){var n;return((n=e.keys)==null?void 0:n.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function ZY(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function lbe(e,...t){const n=JY(e),r=[n,...t].reduce((o,i)=>bo(o,i),{});return ZY(Object.keys(n),r)}function cbe(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i{e[o]!=null&&(n[o]=!0)}),n}function BA({values:e,breakpoints:t,base:n}){const r=n||cbe(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,s,l)=>(Array.isArray(e)?(a[s]=e[l]!=null?e[l]:e[i],i=l):typeof e=="object"?(a[s]=e[s]!=null?e[s]:e[i],i=s):a[s]=e,a),{})}function Ce(e){if(typeof e!="string")throw new Error(Bu(7));return e.charAt(0).toUpperCase()+e.slice(1)}function GO(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function aT(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=GO(e,n)||r,t&&(o=t(o,r,e)),o}function lo(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const s=a[t],l=a.theme,c=GO(l,r)||{};return nc(a,s,d=>{let f=aT(c,o,d);return d===f&&typeof d=="string"&&(f=aT(c,o,`${t}${d==="default"?"":Ce(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function ube(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const dbe={m:"margin",p:"padding"},fbe={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},WH={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},pbe=ube(e=>{if(e.length>2)if(WH[e])e=WH[e];else return[e];const[t,n]=e.split(""),r=dbe[t],o=fbe[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),kL=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],ML=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...kL,...ML];function hS(e,t,n,r){const o=GO(e,t,!0)??n;return typeof o=="number"||typeof o=="string"?i=>typeof i=="string"?i:typeof o=="string"?`calc(${i} * ${o})`:o*i:Array.isArray(o)?i=>{if(typeof i=="string")return i;const a=Math.abs(i),s=o[a];return i>=0?s:typeof s=="number"?-s:`-${s}`}:typeof o=="function"?o:()=>{}}function qO(e){return hS(e,"spacing",8)}function bh(e,t){return typeof t=="string"||t==null?t:e(t)}function hbe(e,t){return n=>e.reduce((r,o)=>(r[o]=bh(t,n),r),{})}function mbe(e,t,n,r){if(!t.includes(n))return null;const o=pbe(n),i=hbe(o,r),a=e[n];return nc(e,a,i)}function eX(e,t){const n=qO(e.theme);return Object.keys(e).map(r=>mbe(e,t,r,n)).reduce(tw,{})}function Qr(e){return eX(e,kL)}Qr.propTypes={};Qr.filterProps=kL;function Jr(e){return eX(e,ML)}Jr.propTypes={};Jr.filterProps=ML;function tX(e=8,t=qO({spacing:e})){if(e.mui)return e;const n=(...r)=>(r.length===0?[1]:r).map(i=>{const a=t(i);return typeof a=="number"?`${a}px`:a}).join(" ");return n.mui=!0,n}function KO(...e){const t=e.reduce((r,o)=>(o.filterProps.forEach(i=>{r[i]=o}),r),{}),n=r=>Object.keys(r).reduce((o,i)=>t[i]?tw(o,t[i](r)):o,{});return n.propTypes={},n.filterProps=e.reduce((r,o)=>r.concat(o.filterProps),[]),n}function Vs(e){return typeof e!="number"?e:`${e}px solid`}function dl(e,t){return lo({prop:e,themeKey:"borders",transform:t})}const gbe=dl("border",Vs),ybe=dl("borderTop",Vs),vbe=dl("borderRight",Vs),bbe=dl("borderBottom",Vs),wbe=dl("borderLeft",Vs),xbe=dl("borderColor"),Sbe=dl("borderTopColor"),Cbe=dl("borderRightColor"),Pbe=dl("borderBottomColor"),Tbe=dl("borderLeftColor"),Ebe=dl("outline",Vs),Obe=dl("outlineColor"),YO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=hS(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:bh(t,r)});return nc(e,e.borderRadius,n)}return null};YO.propTypes={};YO.filterProps=["borderRadius"];KO(gbe,ybe,vbe,bbe,wbe,xbe,Sbe,Cbe,Pbe,Tbe,YO,Ebe,Obe);const XO=e=>{if(e.gap!==void 0&&e.gap!==null){const t=hS(e.theme,"spacing",8),n=r=>({gap:bh(t,r)});return nc(e,e.gap,n)}return null};XO.propTypes={};XO.filterProps=["gap"];const QO=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=hS(e.theme,"spacing",8),n=r=>({columnGap:bh(t,r)});return nc(e,e.columnGap,n)}return null};QO.propTypes={};QO.filterProps=["columnGap"];const JO=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=hS(e.theme,"spacing",8),n=r=>({rowGap:bh(t,r)});return nc(e,e.rowGap,n)}return null};JO.propTypes={};JO.filterProps=["rowGap"];const Ibe=lo({prop:"gridColumn"}),kbe=lo({prop:"gridRow"}),Mbe=lo({prop:"gridAutoFlow"}),Abe=lo({prop:"gridAutoColumns"}),$be=lo({prop:"gridAutoRows"}),Rbe=lo({prop:"gridTemplateColumns"}),_be=lo({prop:"gridTemplateRows"}),Dbe=lo({prop:"gridTemplateAreas"}),Nbe=lo({prop:"gridArea"});KO(XO,QO,JO,Ibe,kbe,Mbe,Abe,$be,Rbe,_be,Dbe,Nbe);function Gg(e,t){return t==="grey"?t:e}const Lbe=lo({prop:"color",themeKey:"palette",transform:Gg}),Fbe=lo({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Gg}),jbe=lo({prop:"backgroundColor",themeKey:"palette",transform:Gg});KO(Lbe,Fbe,jbe);function Wa(e){return e<=1&&e!==0?`${e*100}%`:e}const Bbe=lo({prop:"width",transform:Wa}),AL=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var o,i,a,s,l;const r=((a=(i=(o=e.theme)==null?void 0:o.breakpoints)==null?void 0:i.values)==null?void 0:a[n])||WO[n];return r?((l=(s=e.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Wa(n)}};return nc(e,e.maxWidth,t)}return null};AL.filterProps=["maxWidth"];const zbe=lo({prop:"minWidth",transform:Wa}),Vbe=lo({prop:"height",transform:Wa}),Hbe=lo({prop:"maxHeight",transform:Wa}),Ube=lo({prop:"minHeight",transform:Wa});lo({prop:"size",cssProperty:"width",transform:Wa});lo({prop:"size",cssProperty:"height",transform:Wa});const Wbe=lo({prop:"boxSizing"});KO(Bbe,AL,zbe,Vbe,Hbe,Ube,Wbe);const mS={border:{themeKey:"borders",transform:Vs},borderTop:{themeKey:"borders",transform:Vs},borderRight:{themeKey:"borders",transform:Vs},borderBottom:{themeKey:"borders",transform:Vs},borderLeft:{themeKey:"borders",transform:Vs},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Vs},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:YO},color:{themeKey:"palette",transform:Gg},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Gg},backgroundColor:{themeKey:"palette",transform:Gg},p:{style:Jr},pt:{style:Jr},pr:{style:Jr},pb:{style:Jr},pl:{style:Jr},px:{style:Jr},py:{style:Jr},padding:{style:Jr},paddingTop:{style:Jr},paddingRight:{style:Jr},paddingBottom:{style:Jr},paddingLeft:{style:Jr},paddingX:{style:Jr},paddingY:{style:Jr},paddingInline:{style:Jr},paddingInlineStart:{style:Jr},paddingInlineEnd:{style:Jr},paddingBlock:{style:Jr},paddingBlockStart:{style:Jr},paddingBlockEnd:{style:Jr},m:{style:Qr},mt:{style:Qr},mr:{style:Qr},mb:{style:Qr},ml:{style:Qr},mx:{style:Qr},my:{style:Qr},margin:{style:Qr},marginTop:{style:Qr},marginRight:{style:Qr},marginBottom:{style:Qr},marginLeft:{style:Qr},marginX:{style:Qr},marginY:{style:Qr},marginInline:{style:Qr},marginInlineStart:{style:Qr},marginInlineEnd:{style:Qr},marginBlock:{style:Qr},marginBlockStart:{style:Qr},marginBlockEnd:{style:Qr},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:XO},rowGap:{style:JO},columnGap:{style:QO},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Wa},maxWidth:{style:AL},minWidth:{transform:Wa},height:{transform:Wa},maxHeight:{transform:Wa},minHeight:{transform:Wa},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function Gbe(...e){const t=e.reduce((r,o)=>r.concat(Object.keys(o)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function qbe(e,t){return typeof e=="function"?e(t):e}function Kbe(){function e(n,r,o,i){const a={[n]:r,theme:o},s=i[n];if(!s)return{[n]:r};const{cssProperty:l=n,themeKey:c,transform:u,style:d}=s;if(r==null)return null;if(c==="typography"&&r==="inherit")return{[n]:r};const f=GO(o,c)||{};return d?d(a):nc(a,r,m=>{let g=aT(f,u,m);return m===g&&typeof m=="string"&&(g=aT(f,u,`${n}${m==="default"?"":Ce(m)}`,m)),l===!1?g:{[l]:g}})}function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??mS;function a(s){let l=s;if(typeof s=="function")l=s(o);else if(typeof s!="object")return s;if(!l)return null;const c=JY(o.breakpoints),u=Object.keys(c);let d=c;return Object.keys(l).forEach(f=>{const p=qbe(l[f],o);if(p!=null)if(typeof p=="object")if(i[f])d=tw(d,e(f,p,o,i));else{const m=nc({theme:o},p,g=>({[f]:g}));Gbe(m,p)?d[f]=t({sx:p,theme:o}):d=tw(d,m)}else d=tw(d,e(f,p,o,i))}),nbe(o,ZY(u,d))}return Array.isArray(r)?r.map(a):a(r)}return t}const Tf=Kbe();Tf.filterProps=["sx"];function Ybe(e,t){var r;const n=this;if(n.vars){if(!((r=n.colorSchemes)!=null&&r[e])||typeof n.getColorSchemeSelector!="function")return{};let o=n.getColorSchemeSelector(e);return o==="&"?t:((o.includes("data-")||o.includes("."))&&(o=`*:where(${o.replace(/\s*&$/,"")}) &`),{[o]:t})}return n.palette.mode===e?t:{}}function Rv(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e,s=tbe(n),l=tX(o);let c=bo({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...r},spacing:l,shape:{...abe,...i}},a);return c=ibe(c),c.applyStyles=Ybe,c=t.reduce((u,d)=>bo(u,d),c),c.unstable_sxConfig={...mS,...a==null?void 0:a.unstable_sxConfig},c.unstable_sx=function(d){return Tf({sx:d,theme:this})},c}function Xbe(e){return Object.keys(e).length===0}function $L(e=null){const t=y.useContext(fS);return!t||Xbe(t)?e:t}const Qbe=Rv();function gS(e=Qbe){return $L(e)}function Jbe({styles:e,themeId:t,defaultTheme:n={}}){const r=gS(n),o=typeof e=="function"?e(t&&r[t]||r):e;return $.jsx(YY,{styles:o})}const Zbe=e=>{var r;const t={systemProps:{},otherProps:{}},n=((r=e==null?void 0:e.theme)==null?void 0:r.unstable_sxConfig)??mS;return Object.keys(e).forEach(o=>{n[o]?t.systemProps[o]=e[o]:t.otherProps[o]=e[o]}),t};function ZO(e){const{sx:t,...n}=e,{systemProps:r,otherProps:o}=Zbe(n);let i;return Array.isArray(t)?i=[r,...t]:typeof t=="function"?i=(...a)=>{const s=t(...a);return Pc(s)?{...r,...s}:r}:i={...r,...t},{...o,sx:i}}const GH=e=>e,e0e=()=>{let e=GH;return{configure(t){e=t},generate(t){return e(t)},reset(){e=GH}}},nX=e0e();function rX(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;ts!=="theme"&&s!=="sx"&&s!=="as"})(Tf);return y.forwardRef(function(l,c){const u=gS(n),{className:d,component:f="div",...p}=ZO(l);return $.jsx(i,{as:f,ref:c,className:de(d,o?o(r):r),theme:t&&u[t]||u,...p})})}const n0e={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function tt(e,t,n="Mui"){const r=n0e[t];return r?`${n}-${r}`:`${nX.generate(e)}-${t}`}function ot(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=tt(e,o,n)}),r}var oX={exports:{}},ar={};/** * @license React * react-is.production.min.js * @@ -35,10 +35,10 @@ var Jge=Object.defineProperty;var yH=e=>{throw TypeError(e)};var Zge=(e,t,n)=>t * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var SL=Symbol.for("react.element"),CL=Symbol.for("react.portal"),VO=Symbol.for("react.fragment"),HO=Symbol.for("react.strict_mode"),UO=Symbol.for("react.profiler"),WO=Symbol.for("react.provider"),GO=Symbol.for("react.context"),zbe=Symbol.for("react.server_context"),qO=Symbol.for("react.forward_ref"),KO=Symbol.for("react.suspense"),YO=Symbol.for("react.suspense_list"),XO=Symbol.for("react.memo"),QO=Symbol.for("react.lazy"),Vbe=Symbol.for("react.offscreen"),KY;KY=Symbol.for("react.module.reference");function ul(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case SL:switch(e=e.type,e){case VO:case UO:case HO:case KO:case YO:return e;default:switch(e=e&&e.$$typeof,e){case zbe:case GO:case qO:case QO:case XO:case WO:return e;default:return t}}case CL:return t}}}ar.ContextConsumer=GO;ar.ContextProvider=WO;ar.Element=SL;ar.ForwardRef=qO;ar.Fragment=VO;ar.Lazy=QO;ar.Memo=XO;ar.Portal=CL;ar.Profiler=UO;ar.StrictMode=HO;ar.Suspense=KO;ar.SuspenseList=YO;ar.isAsyncMode=function(){return!1};ar.isConcurrentMode=function(){return!1};ar.isContextConsumer=function(e){return ul(e)===GO};ar.isContextProvider=function(e){return ul(e)===WO};ar.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===SL};ar.isForwardRef=function(e){return ul(e)===qO};ar.isFragment=function(e){return ul(e)===VO};ar.isLazy=function(e){return ul(e)===QO};ar.isMemo=function(e){return ul(e)===XO};ar.isPortal=function(e){return ul(e)===CL};ar.isProfiler=function(e){return ul(e)===UO};ar.isStrictMode=function(e){return ul(e)===HO};ar.isSuspense=function(e){return ul(e)===KO};ar.isSuspenseList=function(e){return ul(e)===YO};ar.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===VO||e===UO||e===HO||e===KO||e===YO||e===Vbe||typeof e=="object"&&e!==null&&(e.$$typeof===QO||e.$$typeof===XO||e.$$typeof===WO||e.$$typeof===GO||e.$$typeof===qO||e.$$typeof===KY||e.getModuleId!==void 0)};ar.typeOf=ul;qY.exports=ar;var Hbe=qY.exports;function YY(e){const{variants:t,...n}=e,r={variants:t,style:_H(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=_H(o.style))}),r}const Ube=Sv();function mP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Wbe(e){return e?(t,n)=>n[e]:null}function Gbe(e,t,n){e.theme=Kbe(e.theme)?n:e.theme[t]||e.theme}function gP(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>gP(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return XY(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function XY(e,t,n=[]){var o;let r;e:for(let i=0;i{Lve(s,T=>T.filter(E=>E!==xf));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:h=Wbe(Xbe(u)),...m}=l,g=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,v=f||!1;let w=mP;u==="Root"||u==="root"?w=r:u?w=o:Ybe(s)&&(w=void 0);const x=jY(s,{shouldForwardProp:w,label:qbe(),...m}),S=T=>{if(typeof T=="function"&&T.__emotion_real!==T)return function(O){return gP(O,T)};if(xc(T)){const E=YY(T);return E.variants?function(k){return gP(k,E)}:E.style}return T},P=(...T)=>{const E=[],O=T.map(S),k=[];if(E.push(i),c&&h&&k.push(function(N){var D,z;const B=(z=(D=N.theme.components)==null?void 0:D[c])==null?void 0:z.styleOverrides;if(!B)return null;const _={};for(const F in B)_[F]=gP(N,B[F]);return h(N,_)}),c&&!g&&k.push(function(N){var _,D;const L=N.theme,B=(D=(_=L==null?void 0:L.components)==null?void 0:_[c])==null?void 0:D.variants;return B?XY(N,B):null}),v||k.push(xf),Array.isArray(O[0])){const R=O.shift(),N=new Array(E.length).fill(""),L=new Array(k.length).fill("");let B;B=[...N,...R,...L],B.raw=[...N,...R.raw,...L],E.unshift(B)}const A=[...E,...O,...k],I=x(...A);return s.muiName&&(I.muiName=s.muiName),I};return x.withConfig&&(P.withConfig=x.withConfig),P}}function qbe(e,t){return void 0}function Kbe(e){for(const t in e)return!1;return!0}function Ybe(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Xbe(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Xn=QY();function Sy(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=Sy(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function JY(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Sy(t.components[n].defaultProps,r)}function JO({props:e,name:t,defaultTheme:n,themeId:r}){let o=lS(n);return r&&(o=o[r]||o),JY({theme:o,name:t,props:e})}const ns=typeof window<"u"?y.useLayoutEffect:y.useEffect;function Qbe(e,t,n,r,o){const[i,a]=y.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return ns(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const Jbe={...ch},ZY=Jbe.useSyncExternalStore;function Zbe(e,t,n,r,o){const i=y.useCallback(()=>t,[t]),a=y.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=y.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addEventListener("change",d),()=>{u.removeEventListener("change",d)})]},[i,n,e]);return ZY(l,s,a)}function cS(e,t={}){const n=xL(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=r?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:s=!1}=JY({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(ZY!==void 0?Zbe:Qbe)(l,o,i,a,s)}function e0e(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function PL(e,t=0,n=1){return e0e(e,t,n)}function t0e(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function Nc(e){if(e.type)return e;if(e.charAt(0)==="#")return Nc(t0e(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Fu(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Fu(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const n0e=e=>{const t=Nc(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},E0=(e,t)=>{try{return n0e(e)}catch{return e}};function uS(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function eX(e){e=Nc(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),uS({type:s,values:l})}function VR(e){e=Nc(e);let t=e.type==="hsl"||e.type==="hsla"?Nc(eX(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function r0e(e,t){const n=VR(e),r=VR(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function mt(e,t){return e=Nc(e),t=PL(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,uS(e)}function tC(e,t,n){try{return mt(e,t)}catch{return e}}function ju(e,t){if(e=Nc(e),t=PL(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return uS(e)}function fr(e,t,n){try{return ju(e,t)}catch{return e}}function Bu(e,t){if(e=Nc(e),t=PL(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return uS(e)}function pr(e,t,n){try{return Bu(e,t)}catch{return e}}function tX(e,t=.15){return VR(e)>.5?ju(e,t):Bu(e,t)}function nC(e,t,n){try{return tX(e,t)}catch{return e}}function FH(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function dS(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function Fg(e,t){var n,r,o;return y.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function ii(e){return e&&e.ownerDocument||document}function rs(e){return ii(e).defaultView||window}function YP(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let jH=0;function o0e(e){const[t,n]=y.useState(e),r=e||t;return y.useEffect(()=>{t==null&&(jH+=1,n(`mui-${jH}`))},[t]),r}const i0e={...ch},BH=i0e.useId;function dh(e){if(BH!==void 0){const t=BH();return e??t}return o0e(e)}function Ou({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=y.useRef(e!==void 0),[i,a]=y.useState(t),s=o?e:i,l=y.useCallback(c=>{o||a(c)},[]);return[s,l]}function Wo(e){const t=y.useRef(e);return ns(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function Cr(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{YP(n,t)})},e)}const zH={};function nX(e,t){const n=y.useRef(zH);return n.current===zH&&(n.current=e(t)),n}const a0e=[];function s0e(e){y.useEffect(e,a0e)}let rX=class oX{constructor(){sn(this,"currentId",null);sn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});sn(this,"disposeEffect",()=>this.clear)}static create(){return new oX}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}};function Zd(){const e=nX(rX.create).current;return s0e(e.disposeEffect),e}function XP(e){try{return e.matches(":focus-visible")}catch{}return!1}function iX(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const TL=e=>{const t=y.useRef({});return y.useEffect(()=>{t.current=e}),t.current};function aX(e){return y.Children.toArray(e).filter(t=>y.isValidElement(t))}function rt(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;lr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function VH(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function sX(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=fe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=QP({...o,...r}),s=VH(r),l=VH(o),c=t(a),u=fe(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function lX(e,t,n){return typeof e=="function"?e(t,n):e}function Lc(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:lX(n,r),{props:s,internalRef:l}=sX({...i,externalSlotProps:a}),c=Cr(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return ug(t,{...s,ref:c},r)}function $f(e){var t;return parseInt(y.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const cX=y.createContext(null);function ZO(){return y.useContext(cX)}const c0e=typeof Symbol=="function"&&Symbol.for,uX=c0e?Symbol.for("mui.nested"):"__THEME_NESTED__";function u0e(e,t){return typeof t=="function"?t(e):{...e,...t}}function d0e(e){const{children:t,theme:n}=e,r=ZO(),o=y.useMemo(()=>{const i=r===null?{...n}:u0e(r,n);return i!=null&&(i[uX]=r!==null),i},[n,r]);return $.jsx(cX.Provider,{value:o,children:t})}const dX=y.createContext();function f0e({value:e,...t}){return $.jsx(dX.Provider,{value:e??!0,...t})}const nr=()=>y.useContext(dX)??!1,fX=y.createContext(void 0);function p0e({value:e,children:t}){return $.jsx(fX.Provider,{value:e,children:t})}function h0e(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Sy(o.defaultProps,r):!o.styleOverrides&&!o.variants?Sy(o,r):r}function m0e({props:e,name:t}){const n=y.useContext(fX);return h0e({props:e,name:t,theme:{components:n}})}const HH={};function UH(e,t,n,r=!1){return y.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function pX(e){const{children:t,theme:n,themeId:r}=e,o=xL(HH),i=ZO()||HH,a=UH(r,o,n),s=UH(r,i,n,!0),l=a.direction==="rtl";return $.jsx(d0e,{theme:s,children:$.jsx(oS.Provider,{value:a,children:$.jsx(f0e,{value:l,children:$.jsx(p0e,{value:a==null?void 0:a.components,children:t})})})})}const WH={theme:void 0};function g0e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(WH.theme=o.theme,i=YY(e(WH)),t=i,n=o.theme),i}}const EL="mode",OL="color-scheme",y0e="data-color-scheme";function v0e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=EL,colorSchemeStorageKey:i=OL,attribute:a=y0e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const f=u.substring(1);c+=`${s}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark)); - ${s}.classList.add('${f}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[f,h]=d[1].split("=");h||(c+=`${s}.removeAttribute('${f}'.replace('%s', light)); + */var RL=Symbol.for("react.element"),_L=Symbol.for("react.portal"),eI=Symbol.for("react.fragment"),tI=Symbol.for("react.strict_mode"),nI=Symbol.for("react.profiler"),rI=Symbol.for("react.provider"),oI=Symbol.for("react.context"),r0e=Symbol.for("react.server_context"),iI=Symbol.for("react.forward_ref"),aI=Symbol.for("react.suspense"),sI=Symbol.for("react.suspense_list"),lI=Symbol.for("react.memo"),cI=Symbol.for("react.lazy"),o0e=Symbol.for("react.offscreen"),iX;iX=Symbol.for("react.module.reference");function fl(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case RL:switch(e=e.type,e){case eI:case nI:case tI:case aI:case sI:return e;default:switch(e=e&&e.$$typeof,e){case r0e:case oI:case iI:case cI:case lI:case rI:return e;default:return t}}case _L:return t}}}ar.ContextConsumer=oI;ar.ContextProvider=rI;ar.Element=RL;ar.ForwardRef=iI;ar.Fragment=eI;ar.Lazy=cI;ar.Memo=lI;ar.Portal=_L;ar.Profiler=nI;ar.StrictMode=tI;ar.Suspense=aI;ar.SuspenseList=sI;ar.isAsyncMode=function(){return!1};ar.isConcurrentMode=function(){return!1};ar.isContextConsumer=function(e){return fl(e)===oI};ar.isContextProvider=function(e){return fl(e)===rI};ar.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===RL};ar.isForwardRef=function(e){return fl(e)===iI};ar.isFragment=function(e){return fl(e)===eI};ar.isLazy=function(e){return fl(e)===cI};ar.isMemo=function(e){return fl(e)===lI};ar.isPortal=function(e){return fl(e)===_L};ar.isProfiler=function(e){return fl(e)===nI};ar.isStrictMode=function(e){return fl(e)===tI};ar.isSuspense=function(e){return fl(e)===aI};ar.isSuspenseList=function(e){return fl(e)===sI};ar.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===eI||e===nI||e===tI||e===aI||e===sI||e===o0e||typeof e=="object"&&e!==null&&(e.$$typeof===cI||e.$$typeof===lI||e.$$typeof===rI||e.$$typeof===oI||e.$$typeof===iI||e.$$typeof===iX||e.getModuleId!==void 0)};ar.typeOf=fl;oX.exports=ar;var i0e=oX.exports;function aX(e){const{variants:t,...n}=e,r={variants:t,style:HH(n),isProcessed:!0};return r.style===n||t&&t.forEach(o=>{typeof o.style!="function"&&(o.style=HH(o.style))}),r}const a0e=Rv();function EP(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function s0e(e){return e?(t,n)=>n[e]:null}function l0e(e,t,n){e.theme=u0e(e.theme)?n:e.theme[t]||e.theme}function OP(e,t){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(r=>OP(e,r));if(Array.isArray(n==null?void 0:n.variants)){let r;if(n.isProcessed)r=n.style;else{const{variants:o,...i}=n;r=i}return sX(e,n.variants,[r])}return n!=null&&n.isProcessed?n.style:n}function sX(e,t,n=[]){var o;let r;e:for(let i=0;i{Zve(s,T=>T.filter(E=>E!==Tf));const{name:c,slot:u,skipVariantsResolver:d,skipSx:f,overridesResolver:p=s0e(f0e(u)),...m}=l,g=d!==void 0?d:u&&u!=="Root"&&u!=="root"||!1,v=f||!1;let w=EP;u==="Root"||u==="root"?w=r:u?w=o:d0e(s)&&(w=void 0);const x=XY(s,{shouldForwardProp:w,label:c0e(),...m}),S=T=>{if(typeof T=="function"&&T.__emotion_real!==T)return function(O){return OP(O,T)};if(Pc(T)){const E=aX(T);return E.variants?function(k){return OP(k,E)}:E.style}return T},P=(...T)=>{const E=[],O=T.map(S),k=[];if(E.push(i),c&&p&&k.push(function(N){var D,z;const j=(z=(D=N.theme.components)==null?void 0:D[c])==null?void 0:z.styleOverrides;if(!j)return null;const _={};for(const F in j)_[F]=OP(N,j[F]);return p(N,_)}),c&&!g&&k.push(function(N){var _,D;const L=N.theme,j=(D=(_=L==null?void 0:L.components)==null?void 0:_[c])==null?void 0:D.variants;return j?sX(N,j):null}),v||k.push(Tf),Array.isArray(O[0])){const R=O.shift(),N=new Array(E.length).fill(""),L=new Array(k.length).fill("");let j;j=[...N,...R,...L],j.raw=[...N,...R.raw,...L],E.unshift(j)}const A=[...E,...O,...k],I=x(...A);return s.muiName&&(I.muiName=s.muiName),I};return x.withConfig&&(P.withConfig=x.withConfig),P}}function c0e(e,t){return void 0}function u0e(e){for(const t in e)return!1;return!0}function d0e(e){return typeof e=="string"&&e.charCodeAt(0)>96}function f0e(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}const Qn=lX();function Ay(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=Ay(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}function cX(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Ay(t.components[n].defaultProps,r)}function uI({props:e,name:t,defaultTheme:n,themeId:r}){let o=gS(n);return r&&(o=o[r]||o),cX({theme:o,name:t,props:e})}const rs=typeof window<"u"?y.useLayoutEffect:y.useEffect;function p0e(e,t,n,r,o){const[i,a]=y.useState(()=>o&&n?n(e).matches:r?r(e).matches:t);return rs(()=>{if(!n)return;const s=n(e),l=()=>{a(s.matches)};return l(),s.addEventListener("change",l),()=>{s.removeEventListener("change",l)}},[e,n]),i}const h0e={...vh},uX=h0e.useSyncExternalStore;function m0e(e,t,n,r,o){const i=y.useCallback(()=>t,[t]),a=y.useMemo(()=>{if(o&&n)return()=>n(e).matches;if(r!==null){const{matches:u}=r(e);return()=>u}return i},[i,e,r,o,n]),[s,l]=y.useMemo(()=>{if(n===null)return[i,()=>()=>{}];const u=n(e);return[()=>u.matches,d=>(u.addEventListener("change",d),()=>{u.removeEventListener("change",d)})]},[i,n,e]);return uX(l,s,a)}function yS(e,t={}){const n=$L(),r=typeof window<"u"&&typeof window.matchMedia<"u",{defaultMatches:o=!1,matchMedia:i=r?window.matchMedia:null,ssrMatchMedia:a=null,noSsr:s=!1}=cX({name:"MuiUseMediaQuery",props:t,theme:n});let l=typeof e=="function"?e(n):e;return l=l.replace(/^@media( ?)/m,""),(uX!==void 0?m0e:p0e)(l,o,i,a,s)}function g0e(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}function DL(e,t=0,n=1){return g0e(e,t,n)}function y0e(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,o)=>o<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function jc(e){if(e.type)return e;if(e.charAt(0)==="#")return jc(y0e(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error(Bu(9,e));let r=e.substring(t+1,e.length-1),o;if(n==="color"){if(r=r.split(" "),o=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error(Bu(10,o))}else r=r.split(",");return r=r.map(i=>parseFloat(i)),{type:n,values:r,colorSpace:o}}const v0e=e=>{const t=jc(e);return t.values.slice(0,3).map((n,r)=>t.type.includes("hsl")&&r!==0?`${n}%`:n).join(" ")},D0=(e,t)=>{try{return v0e(e)}catch{return e}};function vS(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map((o,i)=>i<3?parseInt(o,10):o):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.includes("color")?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function dX(e){e=jc(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(c,u=(c+n/30)%12)=>o-i*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(a(0)*255),Math.round(a(8)*255),Math.round(a(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),vS({type:s,values:l})}function JR(e){e=jc(e);let t=e.type==="hsl"||e.type==="hsla"?jc(dX(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function b0e(e,t){const n=JR(e),r=JR(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function mt(e,t){return e=jc(e),t=DL(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,vS(e)}function dC(e,t,n){try{return mt(e,t)}catch{return e}}function zu(e,t){if(e=jc(e),t=DL(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return vS(e)}function fr(e,t,n){try{return zu(e,t)}catch{return e}}function Vu(e,t){if(e=jc(e),t=DL(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return vS(e)}function pr(e,t,n){try{return Vu(e,t)}catch{return e}}function fX(e,t=.15){return JR(e)>.5?zu(e,t):Vu(e,t)}function fC(e,t,n){try{return fX(e,t)}catch{return e}}function qH(...e){return e.reduce((t,n)=>n==null?t:function(...o){t.apply(this,o),n.apply(this,o)},()=>{})}function bS(e,t=166){let n;function r(...o){const i=()=>{e.apply(this,o)};clearTimeout(n),n=setTimeout(i,t)}return r.clear=()=>{clearTimeout(n)},r}function qg(e,t){var n,r,o;return y.isValidElement(e)&&t.indexOf(e.type.muiName??((o=(r=(n=e.type)==null?void 0:n._payload)==null?void 0:r.value)==null?void 0:o.muiName))!==-1}function ii(e){return e&&e.ownerDocument||document}function os(e){return ii(e).defaultView||window}function sT(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let KH=0;function w0e(e){const[t,n]=y.useState(e),r=e||t;return y.useEffect(()=>{t==null&&(KH+=1,n(`mui-${KH}`))},[t]),r}const x0e={...vh},YH=x0e.useId;function wh(e){if(YH!==void 0){const t=YH();return e??t}return w0e(e)}function ku({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=y.useRef(e!==void 0),[i,a]=y.useState(t),s=o?e:i,l=y.useCallback(c=>{o||a(c)},[]);return[s,l]}function Go(e){const t=y.useRef(e);return rs(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function Cr(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{sT(n,t)})},e)}const XH={};function pX(e,t){const n=y.useRef(XH);return n.current===XH&&(n.current=e(t)),n}const S0e=[];function C0e(e){y.useEffect(e,S0e)}let hX=class mX{constructor(){nn(this,"currentId",null);nn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});nn(this,"disposeEffect",()=>this.clear)}static create(){return new mX}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}};function tf(){const e=pX(hX.create).current;return C0e(e.disposeEffect),e}function lT(e){try{return e.matches(":focus-visible")}catch{}return!1}function gX(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}const NL=e=>{const t=y.useRef({});return y.useEffect(()=>{t.current=e}),t.current};function yX(e){return y.Children.toArray(e).filter(t=>y.isValidElement(t))}function rt(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;lr.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function QH(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function vX(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=cT({...o,...r}),s=QH(r),l=QH(o),c=t(a),u=de(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function bX(e,t,n){return typeof e=="function"?e(t,n):e}function Bc(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:bX(n,r),{props:s,internalRef:l}=vX({...i,externalSlotProps:a}),c=Cr(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return bg(t,{...s,ref:c},r)}function Lf(e){var t;return parseInt(y.version,10)>=19?((t=e==null?void 0:e.props)==null?void 0:t.ref)||null:(e==null?void 0:e.ref)||null}const wX=y.createContext(null);function dI(){return y.useContext(wX)}const T0e=typeof Symbol=="function"&&Symbol.for,xX=T0e?Symbol.for("mui.nested"):"__THEME_NESTED__";function E0e(e,t){return typeof t=="function"?t(e):{...e,...t}}function O0e(e){const{children:t,theme:n}=e,r=dI(),o=y.useMemo(()=>{const i=r===null?{...n}:E0e(r,n);return i!=null&&(i[xX]=r!==null),i},[n,r]);return $.jsx(wX.Provider,{value:o,children:t})}const SX=y.createContext();function I0e({value:e,...t}){return $.jsx(SX.Provider,{value:e??!0,...t})}const nr=()=>y.useContext(SX)??!1,CX=y.createContext(void 0);function k0e({value:e,children:t}){return $.jsx(CX.Provider,{value:e,children:t})}function M0e(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?Ay(o.defaultProps,r):!o.styleOverrides&&!o.variants?Ay(o,r):r}function A0e({props:e,name:t}){const n=y.useContext(CX);return M0e({props:e,name:t,theme:{components:n}})}const JH={};function ZH(e,t,n,r=!1){return y.useMemo(()=>{const o=e&&t[e]||t;if(typeof n=="function"){const i=n(o),a=e?{...t,[e]:i}:i;return r?()=>a:a}return e?{...t,[e]:n}:{...t,...n}},[e,t,n,r])}function PX(e){const{children:t,theme:n,themeId:r}=e,o=$L(JH),i=dI()||JH,a=ZH(r,o,n),s=ZH(r,i,n,!0),l=a.direction==="rtl";return $.jsx(O0e,{theme:s,children:$.jsx(fS.Provider,{value:a,children:$.jsx(I0e,{value:l,children:$.jsx(k0e,{value:a==null?void 0:a.components,children:t})})})})}const e4={theme:void 0};function $0e(e){let t,n;return function(o){let i=t;return(i===void 0||o.theme!==n)&&(e4.theme=o.theme,i=aX(e(e4)),t=i,n=o.theme),i}}const LL="mode",FL="color-scheme",R0e="data-color-scheme";function _0e(e){const{defaultMode:t="system",defaultLightColorScheme:n="light",defaultDarkColorScheme:r="dark",modeStorageKey:o=LL,colorSchemeStorageKey:i=FL,attribute:a=R0e,colorSchemeNode:s="document.documentElement",nonce:l}=e||{};let c="",u=a;if(a==="class"&&(u=".%s"),a==="data"&&(u="[data-%s]"),u.startsWith(".")){const f=u.substring(1);c+=`${s}.classList.remove('${f}'.replace('%s', light), '${f}'.replace('%s', dark)); + ${s}.classList.add('${f}'.replace('%s', colorScheme));`}const d=u.match(/\[([^\]]+)\]/);if(d){const[f,p]=d[1].split("=");p||(c+=`${s}.removeAttribute('${f}'.replace('%s', light)); ${s}.removeAttribute('${f}'.replace('%s', dark));`),c+=` - ${s}.setAttribute('${f}'.replace('%s', colorScheme), ${h?`${h}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return $.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() { + ${s}.setAttribute('${f}'.replace('%s', colorScheme), ${p?`${p}.replace('%s', colorScheme)`:'""'});`}else c+=`${s}.setAttribute('${u}', colorScheme);`;return $.jsx("script",{suppressHydrationWarning:!0,nonce:typeof window>"u"?l:"",dangerouslySetInnerHTML:{__html:`(function() { try { let colorScheme = ''; const mode = localStorage.getItem('${o}') || '${t}'; @@ -62,15 +62,15 @@ try { if (colorScheme) { ${c} } -} catch(e){}})();`}},"mui-color-scheme-init")}function GH(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function hX(e,t){if(e.mode==="light"||e.mode==="system"&&e.systemMode==="light")return t("light");if(e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark")return t("dark")}function b0e(e){return hX(e,t=>{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function AA(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function w0e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=EL,colorSchemeStorageKey:a=OL,storageWindow:s=typeof window>"u"?void 0:window}=e,l=o.join(","),c=o.length>1,[u,d]=y.useState(()=>{const S=AA(i,t),P=AA(`${a}-light`,n),T=AA(`${a}-dark`,r);return{mode:S,systemMode:GH(S),lightColorScheme:P,darkColorScheme:T}}),[,f]=y.useState(!1),h=y.useRef(!1);y.useEffect(()=>{c&&f(!0),h.current=!0},[c]);const m=b0e(u),g=y.useCallback(S=>{d(P=>{if(S===P.mode)return P;const T=S??t;try{localStorage.setItem(i,T)}catch{}return{...P,mode:T,systemMode:GH(T)}})},[i,t]),v=y.useCallback(S=>{S?typeof S=="string"?S&&!l.includes(S)?console.error(`\`${S}\` does not exist in \`theme.colorSchemes\`.`):d(P=>{const T={...P};return hX(P,E=>{try{localStorage.setItem(`${a}-${E}`,S)}catch{}E==="light"&&(T.lightColorScheme=S),E==="dark"&&(T.darkColorScheme=S)}),T}):d(P=>{const T={...P},E=S.light===null?n:S.light,O=S.dark===null?r:S.dark;if(E)if(!l.includes(E))console.error(`\`${E}\` does not exist in \`theme.colorSchemes\`.`);else{T.lightColorScheme=E;try{localStorage.setItem(`${a}-light`,E)}catch{}}if(O)if(!l.includes(O))console.error(`\`${O}\` does not exist in \`theme.colorSchemes\`.`);else{T.darkColorScheme=O;try{localStorage.setItem(`${a}-dark`,O)}catch{}}return T}):d(P=>{try{localStorage.setItem(`${a}-light`,n),localStorage.setItem(`${a}-dark`,r)}catch{}return{...P,lightColorScheme:n,darkColorScheme:r}})},[l,a,n,r]),w=y.useCallback(S=>{u.mode==="system"&&d(P=>{const T=S!=null&&S.matches?"dark":"light";return P.systemMode===T?P:{...P,systemMode:T}})},[u.mode]),x=y.useRef(w);return x.current=w,y.useEffect(()=>{if(typeof window.matchMedia!="function"||!c)return;const S=(...T)=>x.current(...T),P=window.matchMedia("(prefers-color-scheme: dark)");return P.addListener(S),S(P),()=>{P.removeListener(S)}},[c]),y.useEffect(()=>{if(s&&c){const S=P=>{const T=P.newValue;typeof P.key=="string"&&P.key.startsWith(a)&&(!T||l.match(T))&&(P.key.endsWith("light")&&v({light:T}),P.key.endsWith("dark")&&v({dark:T})),P.key===i&&(!T||["light","dark","system"].includes(T))&&g(T||t)};return s.addEventListener("storage",S),()=>{s.removeEventListener("storage",S)}}},[v,g,i,a,l,t,s,c]),{...u,mode:h.current||!c?u.mode:void 0,systemMode:h.current||!c?u.systemMode:void 0,colorScheme:h.current||!c?m:void 0,setMode:g,setColorScheme:v}}const x0e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function S0e(e){const{themeId:t,theme:n={},modeStorageKey:r=EL,colorSchemeStorageKey:o=OL,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=y.createContext(void 0),u=()=>y.useContext(c)||l;function d(g){var ye,Te,Oe,Me,Ue;const{children:v,theme:w,modeStorageKey:x=r,colorSchemeStorageKey:S=o,disableTransitionOnChange:P=i,storageWindow:T=typeof window>"u"?void 0:window,documentNode:E=typeof document>"u"?void 0:document,colorSchemeNode:O=typeof document>"u"?void 0:document.documentElement,disableNestedContext:k=!1,disableStyleSheetGeneration:A=!1,defaultMode:I="system"}=g,R=y.useRef(!1),N=ZO(),L=y.useContext(c),B=!!L&&!k,_=y.useMemo(()=>w||(typeof n=="function"?n():n),[w]),D=_[t],{colorSchemes:z={},components:F={},cssVarPrefix:H,...U}=D||_,q=Object.keys(z).filter(ze=>!!z[ze]).join(","),Y=y.useMemo(()=>q.split(","),[q]),ae=typeof a=="string"?a:a.light,Z=typeof a=="string"?a:a.dark,K=z[ae]&&z[Z]?I:((Te=(ye=z[U.defaultColorScheme])==null?void 0:ye.palette)==null?void 0:Te.mode)||((Oe=U.palette)==null?void 0:Oe.mode),{mode:te,setMode:pe,systemMode:ie,lightColorScheme:le,darkColorScheme:re,colorScheme:de,setColorScheme:ee}=w0e({supportedColorSchemes:Y,defaultLightColorScheme:ae,defaultDarkColorScheme:Z,modeStorageKey:x,colorSchemeStorageKey:S,defaultMode:K,storageWindow:T});let ce=te,me=de;B&&(ce=L.mode,me=L.colorScheme);const we=me||U.defaultColorScheme,ge=((Me=U.generateThemeVars)==null?void 0:Me.call(U))||U.vars,Se={...U,components:F,colorSchemes:z,cssVarPrefix:H,vars:ge};if(typeof Se.generateSpacing=="function"&&(Se.spacing=Se.generateSpacing()),we){const ze=z[we];ze&&typeof ze=="object"&&Object.keys(ze).forEach(Qe=>{ze[Qe]&&typeof ze[Qe]=="object"?Se[Qe]={...Se[Qe],...ze[Qe]}:Se[Qe]=ze[Qe]})}const xe=U.colorSchemeSelector;y.useEffect(()=>{if(me&&O&&xe&&xe!=="media"){const ze=xe;let Qe=xe;if(ze==="class"&&(Qe=".%s"),ze==="data"&&(Qe="[data-%s]"),ze!=null&&ze.startsWith("data-")&&!ze.includes("%s")&&(Qe=`[${ze}="%s"]`),Qe.startsWith("."))O.classList.remove(...Y.map(ct=>Qe.substring(1).replace("%s",ct))),O.classList.add(Qe.substring(1).replace("%s",me));else{const ct=Qe.replace("%s",me).match(/\[([^\]]+)\]/);if(ct){const[nt,et]=ct[1].split("=");et||Y.forEach(yt=>{O.removeAttribute(nt.replace(me,yt))}),O.setAttribute(nt,et?et.replace(/"|'/g,""):"")}else O.setAttribute(Qe,me)}}},[me,xe,O,Y]),y.useEffect(()=>{let ze;if(P&&R.current&&E){const Qe=E.createElement("style");Qe.appendChild(E.createTextNode(x0e)),E.head.appendChild(Qe),window.getComputedStyle(E.body),ze=setTimeout(()=>{E.head.removeChild(Qe)},1)}return()=>{clearTimeout(ze)}},[me,P,E]),y.useEffect(()=>(R.current=!0,()=>{R.current=!1}),[]);const Ie=y.useMemo(()=>({allColorSchemes:Y,colorScheme:me,darkColorScheme:re,lightColorScheme:le,mode:ce,setColorScheme:ee,setMode:pe,systemMode:ie}),[Y,me,re,le,ce,ee,pe,ie]);let Re=!0;(A||U.cssVariables===!1||B&&(N==null?void 0:N.cssVarPrefix)===H)&&(Re=!1);const _e=$.jsxs(y.Fragment,{children:[$.jsx(pX,{themeId:D?t:void 0,theme:s?s(Se):Se,children:v}),Re&&$.jsx(FY,{styles:((Ue=Se.generateStyleSheets)==null?void 0:Ue.call(Se))||[]})]});return B?_e:$.jsx(c.Provider,{value:Ie,children:_e})}const f=typeof a=="string"?a:a.light,h=typeof a=="string"?a:a.dark;return{CssVarsProvider:d,useColorScheme:u,getInitColorSchemeScript:g=>v0e({colorSchemeStorageKey:o,defaultLightColorScheme:f,defaultDarkColorScheme:h,modeStorageKey:r,...g})}}function C0e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const qH=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},P0e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},T0e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function $A(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return P0e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=T0e(s,l);Object.assign(o,{[u]:d}),qH(i,s,`var(${u})`,c),qH(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function E0e(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=$A(l,t);let f=d;const h={},{[s]:m,...g}=i;if(Object.entries(g||{}).forEach(([S,P])=>{const{vars:T,css:E,varsWithDefaults:O}=$A(P,t);f=vo(f,O),h[S]={css:E,vars:T}}),m){const{css:S,vars:P,varsWithDefaults:T}=$A(m,t);f=vo(f,T),h[s]={css:S,vars:P}}function v(S,P){var E,O;let T=o;if(o==="class"&&(T=".%s"),o==="data"&&(T="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(T=`[${o}="%s"]`),S){if(T==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((O=(E=i[S])==null?void 0:E.palette)==null?void 0:O.mode)||S})`]:{":root":P}};if(T)return e.defaultColorScheme===S?`:root, ${T.replace("%s",String(S))}`:T.replace("%s",String(S))}return":root"}return{vars:f,generateThemeVars:()=>{let S={...c};return Object.entries(h).forEach(([,{vars:P}])=>{S=vo(S,P)}),S},generateStyleSheets:()=>{var k,A;const S=[],P=e.defaultColorScheme||"light";function T(I,R){Object.keys(R).length&&S.push(typeof I=="string"?{[I]:{...R}}:I)}T(n(void 0,{...u}),u);const{[P]:E,...O}=h;if(E){const{css:I}=E,R=(A=(k=i[P])==null?void 0:k.palette)==null?void 0:A.mode,N=!r&&R?{colorScheme:R,...I}:{...I};T(n(P,{...N}),N)}return Object.entries(O).forEach(([I,{css:R}])=>{var B,_;const N=(_=(B=i[I])==null?void 0:B.palette)==null?void 0:_.mode,L=!r&&N?{colorScheme:N,...R}:{...R};T(n(I,{...L}),L)}),S}}}function O0e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const I0e=Sv(),k0e=Xn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),M0e=e=>JO({props:e,name:"MuiContainer",defaultTheme:I0e}),A0e=(e,t)=>{const n=l=>tt(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Ce(String(a))}`,o&&"fixed",i&&"disableGutters"]};return rt(s,n,r)};function $0e(e={}){const{createStyledComponent:t=k0e,useThemeProps:n=M0e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,d=a.breakpoints.values[u];return d!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${d}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return y.forwardRef(function(s,l){const c=n(s),{className:u,component:d="div",disableGutters:f=!1,fixed:h=!1,maxWidth:m="lg",classes:g,...v}=c,w={...c,component:d,disableGutters:f,fixed:h,maxWidth:m},x=A0e(w,r);return $.jsx(o,{as:d,ownerState:w,className:fe(x.root,u),ref:l,...v})})}const R0e=(e,t)=>e.filter(n=>t.includes(n)),Cv=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:R0e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function JP(e){return`--Grid-${e}Spacing`}function eI(e){return`--Grid-parent-${e}Spacing`}const KH="--Grid-columns",jg="--Grid-parent-columns",_0e=({theme:e,ownerState:t})=>{const n={};return Cv(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${jg}) - (var(${jg}) - ${o}) * (var(${eI("column")}) / var(${jg})))`}),r(n,i)}),n},D0e=({theme:e,ownerState:t})=>{const n={};return Cv(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${jg}) + var(${eI("column")}) * ${o} / var(${jg}))`}),r(n,i)}),n},N0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[KH]:12};return Cv(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[KH]:i,"> *":{[jg]:i}})}),n},L0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Cv(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[JP("row")]:i,"> *":{[eI("row")]:i}})}),n},F0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Cv(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[JP("column")]:i,"> *":{[eI("column")]:i}})}),n},j0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return Cv(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},B0e=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${JP("row")}) var(${JP("column")})`}}),z0e=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},V0e=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},H0e=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],U0e=Sv(),W0e=Xn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function G0e(e){return JO({props:e,name:"MuiGrid",defaultTheme:U0e})}function q0e(e={}){const{createStyledComponent:t=W0e,useThemeProps:n=G0e,componentName:r="MuiGrid"}=e,o=(l,c)=>{const{container:u,direction:d,spacing:f,wrap:h,size:m}=l,g={root:["root",u&&"container",h!=="wrap"&&`wrap-xs-${String(h)}`,...H0e(d),...z0e(m),...u?V0e(f,c.breakpoints.keys[0]):[]]};return rt(g,v=>tt(r,v),{})};function i(l,c,u=()=>!0){const d={};return l===null||(Array.isArray(l)?l.forEach((f,h)=>{f!==null&&u(f)&&c.keys[h]&&(d[c.keys[h]]=f)}):typeof l=="object"?Object.keys(l).forEach(f=>{const h=l[f];h!=null&&u(h)&&(d[f]=h)}):d[c.keys[0]]=l),d}const a=t(N0e,F0e,L0e,_0e,j0e,B0e,D0e),s=y.forwardRef(function(c,u){const d=lS(),f=n(c),h=zO(f),{className:m,children:g,columns:v=12,container:w=!1,component:x="div",direction:S="row",wrap:P="wrap",size:T={},offset:E={},spacing:O=0,rowSpacing:k=O,columnSpacing:A=O,unstable_level:I=0,...R}=h,N=i(T,d.breakpoints,U=>U!==!1),L=i(E,d.breakpoints),B=c.columns??(I?void 0:v),_=c.spacing??(I?void 0:O),D=c.rowSpacing??c.spacing??(I?void 0:k),z=c.columnSpacing??c.spacing??(I?void 0:A),F={...h,level:I,columns:B,container:w,direction:S,wrap:P,spacing:_,rowSpacing:D,columnSpacing:z,size:N,offset:L},H=o(F,d);return $.jsx(a,{ref:u,as:x,ownerState:F,className:fe(H.root,m),...R,children:y.Children.map(g,U=>{var q;return y.isValidElement(U)&&Fg(U,["Grid"])&&w&&U.props.container?y.cloneElement(U,{unstable_level:((q=U.props)==null?void 0:q.unstable_level)??I+1}):U})})});return s.muiName="Grid",s}const K0e=Sv(),Y0e=Xn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function X0e(e){return JO({props:e,name:"MuiStack",defaultTheme:K0e})}function Q0e(e,t){const n=y.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],Z0e=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...Jl({theme:t},MA({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=DO(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=MA({values:e.direction,base:o}),a=MA({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=vo(n,Jl({theme:t},a,(l,c)=>e.useFlexGap?{gap:uh(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${J0e(c?i[c]:e.direction)}`]:uh(r,l)}}))}return n=Gve(t.breakpoints,n),n};function ewe(e={}){const{createStyledComponent:t=Y0e,useThemeProps:n=X0e,componentName:r="MuiStack"}=e,o=()=>rt({root:["root"]},l=>tt(r,l),{}),i=t(Z0e);return y.forwardRef(function(l,c){const u=n(l),d=zO(u),{component:f="div",direction:h="column",spacing:m=0,divider:g,children:v,className:w,useFlexGap:x=!1,...S}=d,P={direction:h,spacing:m,useFlexGap:x},T=o();return $.jsx(i,{as:f,ownerState:P,ref:c,className:fe(T.root,w),...S,children:g?Q0e(v,g):v})})}const Iw={black:"#000",white:"#fff"},twe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Im={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},km={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Bb={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},Mm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Am={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},$m={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function mX(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Iw.white,default:Iw.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const nwe=mX();function gX(){return{text:{primary:Iw.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Iw.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const YH=gX();function XH(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Bu(e.main,o):t==="dark"&&(e.dark=ju(e.main,i)))}function rwe(e="light"){return e==="dark"?{main:Mm[200],light:Mm[50],dark:Mm[400]}:{main:Mm[700],light:Mm[400],dark:Mm[800]}}function owe(e="light"){return e==="dark"?{main:Im[200],light:Im[50],dark:Im[400]}:{main:Im[500],light:Im[300],dark:Im[700]}}function iwe(e="light"){return e==="dark"?{main:km[500],light:km[300],dark:km[700]}:{main:km[700],light:km[400],dark:km[800]}}function awe(e="light"){return e==="dark"?{main:Am[400],light:Am[300],dark:Am[700]}:{main:Am[700],light:Am[500],dark:Am[900]}}function swe(e="light"){return e==="dark"?{main:$m[400],light:$m[300],dark:$m[700]}:{main:$m[800],light:$m[500],dark:$m[900]}}function lwe(e="light"){return e==="dark"?{main:Bb[400],light:Bb[300],dark:Bb[700]}:{main:"#ed6c02",light:Bb[500],dark:Bb[900]}}function IL(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||rwe(t),a=e.secondary||owe(t),s=e.error||iwe(t),l=e.info||awe(t),c=e.success||swe(t),u=e.warning||lwe(t);function d(g){return r0e(g,YH.text.primary)>=n?YH.text.primary:nwe.text.primary}const f=({color:g,name:v,mainShade:w=500,lightShade:x=300,darkShade:S=700})=>{if(g={...g},!g.main&&g[w]&&(g.main=g[w]),!g.hasOwnProperty("main"))throw new Error(Fu(11,v?` (${v})`:"",w));if(typeof g.main!="string")throw new Error(Fu(12,v?` (${v})`:"",JSON.stringify(g.main)));return XH(g,"light",x,r),XH(g,"dark",S,r),g.contrastText||(g.contrastText=d(g.main)),g};let h;return t==="light"?h=mX():t==="dark"&&(h=gX()),vo({common:{...Iw},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:twe,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...h},o)}function cwe(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function uwe(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function dwe(e){return Math.round(e*1e5)/1e5}const QH={textTransform:"uppercase"},JH='"Roboto", "Helvetica", "Arial", sans-serif';function yX(e,t){const{fontFamily:n=JH,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=r/14,h=u||(v=>`${v/l*f}rem`),m=(v,w,x,S,P)=>({fontFamily:n,fontWeight:v,fontSize:h(w),lineHeight:x,...n===JH?{letterSpacing:`${dwe(S/w)}em`}:{},...P,...c}),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(a,14,1.75,.4,QH),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,QH),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return vo({htmlFontSize:l,pxToRem:h,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...g},d,{clone:!1})}const fwe=.2,pwe=.14,hwe=.12;function _r(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${fwe})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${pwe})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${hwe})`].join(",")}const mwe=["none",_r(0,2,1,-1,0,1,1,0,0,1,3,0),_r(0,3,1,-2,0,2,2,0,0,1,5,0),_r(0,3,3,-2,0,3,4,0,0,1,8,0),_r(0,2,4,-1,0,4,5,0,0,1,10,0),_r(0,3,5,-1,0,5,8,0,0,1,14,0),_r(0,3,5,-1,0,6,10,0,0,1,18,0),_r(0,4,5,-2,0,7,10,1,0,2,16,1),_r(0,5,5,-3,0,8,10,1,0,3,14,2),_r(0,5,6,-3,0,9,12,1,0,3,16,2),_r(0,6,6,-3,0,10,14,1,0,4,18,3),_r(0,6,7,-4,0,11,15,1,0,4,20,3),_r(0,7,8,-4,0,12,17,2,0,5,22,4),_r(0,7,8,-4,0,13,19,2,0,5,24,4),_r(0,7,9,-4,0,14,21,2,0,5,26,4),_r(0,8,9,-5,0,15,22,2,0,6,28,5),_r(0,8,10,-5,0,16,24,2,0,6,30,5),_r(0,8,11,-5,0,17,26,2,0,6,32,5),_r(0,9,11,-5,0,18,28,2,0,7,34,6),_r(0,9,12,-6,0,19,29,2,0,7,36,6),_r(0,10,13,-6,0,20,31,3,0,8,38,7),_r(0,10,13,-6,0,21,33,3,0,8,40,7),_r(0,10,14,-6,0,22,35,3,0,8,42,7),_r(0,11,14,-7,0,23,36,3,0,9,44,8),_r(0,11,15,-7,0,24,38,3,0,9,46,8)],gwe={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},vX={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function ZH(e){return`${Math.round(e)}ms`}function ywe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function vwe(e){const t={...gwe,...e.easing},n={...vX,...e.duration};return{getAutoHeightDuration:ywe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:ZH(a)} ${s} ${typeof l=="string"?l:ZH(l)}`).join(",")},...e,easing:t,duration:n}}const bwe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function wwe(e){return xc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function bX(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;i{if(t==="light")return e.lightColorScheme;if(t==="dark")return e.darkColorScheme})}function zA(e,t){if(typeof window>"u")return;let n;try{n=localStorage.getItem(e)||void 0,n||localStorage.setItem(e,t)}catch{}return n||t}function N0e(e){const{defaultMode:t="light",defaultLightColorScheme:n,defaultDarkColorScheme:r,supportedColorSchemes:o=[],modeStorageKey:i=LL,colorSchemeStorageKey:a=FL,storageWindow:s=typeof window>"u"?void 0:window}=e,l=o.join(","),c=o.length>1,[u,d]=y.useState(()=>{const S=zA(i,t),P=zA(`${a}-light`,n),T=zA(`${a}-dark`,r);return{mode:S,systemMode:t4(S),lightColorScheme:P,darkColorScheme:T}}),[,f]=y.useState(!1),p=y.useRef(!1);y.useEffect(()=>{c&&f(!0),p.current=!0},[c]);const m=D0e(u),g=y.useCallback(S=>{d(P=>{if(S===P.mode)return P;const T=S??t;try{localStorage.setItem(i,T)}catch{}return{...P,mode:T,systemMode:t4(T)}})},[i,t]),v=y.useCallback(S=>{S?typeof S=="string"?S&&!l.includes(S)?console.error(`\`${S}\` does not exist in \`theme.colorSchemes\`.`):d(P=>{const T={...P};return TX(P,E=>{try{localStorage.setItem(`${a}-${E}`,S)}catch{}E==="light"&&(T.lightColorScheme=S),E==="dark"&&(T.darkColorScheme=S)}),T}):d(P=>{const T={...P},E=S.light===null?n:S.light,O=S.dark===null?r:S.dark;if(E)if(!l.includes(E))console.error(`\`${E}\` does not exist in \`theme.colorSchemes\`.`);else{T.lightColorScheme=E;try{localStorage.setItem(`${a}-light`,E)}catch{}}if(O)if(!l.includes(O))console.error(`\`${O}\` does not exist in \`theme.colorSchemes\`.`);else{T.darkColorScheme=O;try{localStorage.setItem(`${a}-dark`,O)}catch{}}return T}):d(P=>{try{localStorage.setItem(`${a}-light`,n),localStorage.setItem(`${a}-dark`,r)}catch{}return{...P,lightColorScheme:n,darkColorScheme:r}})},[l,a,n,r]),w=y.useCallback(S=>{u.mode==="system"&&d(P=>{const T=S!=null&&S.matches?"dark":"light";return P.systemMode===T?P:{...P,systemMode:T}})},[u.mode]),x=y.useRef(w);return x.current=w,y.useEffect(()=>{if(typeof window.matchMedia!="function"||!c)return;const S=(...T)=>x.current(...T),P=window.matchMedia("(prefers-color-scheme: dark)");return P.addListener(S),S(P),()=>{P.removeListener(S)}},[c]),y.useEffect(()=>{if(s&&c){const S=P=>{const T=P.newValue;typeof P.key=="string"&&P.key.startsWith(a)&&(!T||l.match(T))&&(P.key.endsWith("light")&&v({light:T}),P.key.endsWith("dark")&&v({dark:T})),P.key===i&&(!T||["light","dark","system"].includes(T))&&g(T||t)};return s.addEventListener("storage",S),()=>{s.removeEventListener("storage",S)}}},[v,g,i,a,l,t,s,c]),{...u,mode:p.current||!c?u.mode:void 0,systemMode:p.current||!c?u.systemMode:void 0,colorScheme:p.current||!c?m:void 0,setMode:g,setColorScheme:v}}const L0e="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function F0e(e){const{themeId:t,theme:n={},modeStorageKey:r=LL,colorSchemeStorageKey:o=FL,disableTransitionOnChange:i=!1,defaultColorScheme:a,resolveTheme:s}=e,l={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},c=y.createContext(void 0),u=()=>y.useContext(c)||l;function d(g){var ye,Te,Oe,Me,We;const{children:v,theme:w,modeStorageKey:x=r,colorSchemeStorageKey:S=o,disableTransitionOnChange:P=i,storageWindow:T=typeof window>"u"?void 0:window,documentNode:E=typeof document>"u"?void 0:document,colorSchemeNode:O=typeof document>"u"?void 0:document.documentElement,disableNestedContext:k=!1,disableStyleSheetGeneration:A=!1,defaultMode:I="system"}=g,R=y.useRef(!1),N=dI(),L=y.useContext(c),j=!!L&&!k,_=y.useMemo(()=>w||(typeof n=="function"?n():n),[w]),D=_[t],{colorSchemes:z={},components:F={},cssVarPrefix:H,...U}=D||_,q=Object.keys(z).filter(Ve=>!!z[Ve]).join(","),X=y.useMemo(()=>q.split(","),[q]),ae=typeof a=="string"?a:a.light,Z=typeof a=="string"?a:a.dark,K=z[ae]&&z[Z]?I:((Te=(ye=z[U.defaultColorScheme])==null?void 0:ye.palette)==null?void 0:Te.mode)||((Oe=U.palette)==null?void 0:Oe.mode),{mode:te,setMode:pe,systemMode:ie,lightColorScheme:le,darkColorScheme:re,colorScheme:fe,setColorScheme:ee}=N0e({supportedColorSchemes:X,defaultLightColorScheme:ae,defaultDarkColorScheme:Z,modeStorageKey:x,colorSchemeStorageKey:S,defaultMode:K,storageWindow:T});let ce=te,me=fe;j&&(ce=L.mode,me=L.colorScheme);const we=me||U.defaultColorScheme,ge=((Me=U.generateThemeVars)==null?void 0:Me.call(U))||U.vars,Se={...U,components:F,colorSchemes:z,cssVarPrefix:H,vars:ge};if(typeof Se.generateSpacing=="function"&&(Se.spacing=Se.generateSpacing()),we){const Ve=z[we];Ve&&typeof Ve=="object"&&Object.keys(Ve).forEach(Qe=>{Ve[Qe]&&typeof Ve[Qe]=="object"?Se[Qe]={...Se[Qe],...Ve[Qe]}:Se[Qe]=Ve[Qe]})}const xe=U.colorSchemeSelector;y.useEffect(()=>{if(me&&O&&xe&&xe!=="media"){const Ve=xe;let Qe=xe;if(Ve==="class"&&(Qe=".%s"),Ve==="data"&&(Qe="[data-%s]"),Ve!=null&&Ve.startsWith("data-")&&!Ve.includes("%s")&&(Qe=`[${Ve}="%s"]`),Qe.startsWith("."))O.classList.remove(...X.map(ut=>Qe.substring(1).replace("%s",ut))),O.classList.add(Qe.substring(1).replace("%s",me));else{const ut=Qe.replace("%s",me).match(/\[([^\]]+)\]/);if(ut){const[nt,et]=ut[1].split("=");et||X.forEach(yt=>{O.removeAttribute(nt.replace(me,yt))}),O.setAttribute(nt,et?et.replace(/"|'/g,""):"")}else O.setAttribute(Qe,me)}}},[me,xe,O,X]),y.useEffect(()=>{let Ve;if(P&&R.current&&E){const Qe=E.createElement("style");Qe.appendChild(E.createTextNode(L0e)),E.head.appendChild(Qe),window.getComputedStyle(E.body),Ve=setTimeout(()=>{E.head.removeChild(Qe)},1)}return()=>{clearTimeout(Ve)}},[me,P,E]),y.useEffect(()=>(R.current=!0,()=>{R.current=!1}),[]);const Ie=y.useMemo(()=>({allColorSchemes:X,colorScheme:me,darkColorScheme:re,lightColorScheme:le,mode:ce,setColorScheme:ee,setMode:pe,systemMode:ie}),[X,me,re,le,ce,ee,pe,ie]);let Re=!0;(A||U.cssVariables===!1||j&&(N==null?void 0:N.cssVarPrefix)===H)&&(Re=!1);const _e=$.jsxs(y.Fragment,{children:[$.jsx(PX,{themeId:D?t:void 0,theme:s?s(Se):Se,children:v}),Re&&$.jsx(YY,{styles:((We=Se.generateStyleSheets)==null?void 0:We.call(Se))||[]})]});return j?_e:$.jsx(c.Provider,{value:Ie,children:_e})}const f=typeof a=="string"?a:a.light,p=typeof a=="string"?a:a.dark;return{CssVarsProvider:d,useColorScheme:u,getInitColorSchemeScript:g=>_0e({colorSchemeStorageKey:o,defaultLightColorScheme:f,defaultDarkColorScheme:p,modeStorageKey:r,...g})}}function j0e(e=""){function t(...r){if(!r.length)return"";const o=r[0];return typeof o=="string"&&!o.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${o}${t(...r.slice(1))})`:`, ${o}`}return(r,...o)=>`var(--${e?`${e}-`:""}${r}${t(...o)})`}const n4=(e,t,n,r=[])=>{let o=e;t.forEach((i,a)=>{a===t.length-1?Array.isArray(o)?o[Number(i)]=n:o&&typeof o=="object"&&(o[i]=n):o&&typeof o=="object"&&(o[i]||(o[i]=r.includes(i)?[]:{}),o=o[i])})},B0e=(e,t,n)=>{function r(o,i=[],a=[]){Object.entries(o).forEach(([s,l])=>{(!n||n&&!n([...i,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?r(l,[...i,s],Array.isArray(l)?[...a,s]:a):t([...i,s],l,a))})}r(e)},z0e=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(r=>e.includes(r))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function VA(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};return B0e(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!r||!r(s,l))){const u=`--${n?`${n}-`:""}${s.join("-")}`,d=z0e(s,l);Object.assign(o,{[u]:d}),n4(i,s,`var(${u})`,c),n4(a,s,`var(${u}, ${d})`,c)}},s=>s[0]==="vars"),{css:o,vars:i,varsWithDefaults:a}}function V0e(e,t={}){const{getSelector:n=v,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=VA(l,t);let f=d;const p={},{[s]:m,...g}=i;if(Object.entries(g||{}).forEach(([S,P])=>{const{vars:T,css:E,varsWithDefaults:O}=VA(P,t);f=bo(f,O),p[S]={css:E,vars:T}}),m){const{css:S,vars:P,varsWithDefaults:T}=VA(m,t);f=bo(f,T),p[s]={css:S,vars:P}}function v(S,P){var E,O;let T=o;if(o==="class"&&(T=".%s"),o==="data"&&(T="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(T=`[${o}="%s"]`),S){if(T==="media")return e.defaultColorScheme===S?":root":{[`@media (prefers-color-scheme: ${((O=(E=i[S])==null?void 0:E.palette)==null?void 0:O.mode)||S})`]:{":root":P}};if(T)return e.defaultColorScheme===S?`:root, ${T.replace("%s",String(S))}`:T.replace("%s",String(S))}return":root"}return{vars:f,generateThemeVars:()=>{let S={...c};return Object.entries(p).forEach(([,{vars:P}])=>{S=bo(S,P)}),S},generateStyleSheets:()=>{var k,A;const S=[],P=e.defaultColorScheme||"light";function T(I,R){Object.keys(R).length&&S.push(typeof I=="string"?{[I]:{...R}}:I)}T(n(void 0,{...u}),u);const{[P]:E,...O}=p;if(E){const{css:I}=E,R=(A=(k=i[P])==null?void 0:k.palette)==null?void 0:A.mode,N=!r&&R?{colorScheme:R,...I}:{...I};T(n(P,{...N}),N)}return Object.entries(O).forEach(([I,{css:R}])=>{var j,_;const N=(_=(j=i[I])==null?void 0:j.palette)==null?void 0:_.mode,L=!r&&N?{colorScheme:N,...R}:{...R};T(n(I,{...L}),L)}),S}}}function H0e(e){return function(n){return e==="media"?`@media (prefers-color-scheme: ${n})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${n}"] &`:e==="class"?`.${n} &`:e==="data"?`[data-${n}] &`:`${e.replace("%s",n)} &`:"&"}}const U0e=Rv(),W0e=Qn("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),G0e=e=>uI({props:e,name:"MuiContainer",defaultTheme:U0e}),q0e=(e,t)=>{const n=l=>tt(t,l),{classes:r,fixed:o,disableGutters:i,maxWidth:a}=e,s={root:["root",a&&`maxWidth${Ce(String(a))}`,o&&"fixed",i&&"disableGutters"]};return rt(s,n,r)};function K0e(e={}){const{createStyledComponent:t=W0e,useThemeProps:n=G0e,componentName:r="MuiContainer"}=e,o=t(({theme:a,ownerState:s})=>({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",...!s.disableGutters&&{paddingLeft:a.spacing(2),paddingRight:a.spacing(2),[a.breakpoints.up("sm")]:{paddingLeft:a.spacing(3),paddingRight:a.spacing(3)}}}),({theme:a,ownerState:s})=>s.fixed&&Object.keys(a.breakpoints.values).reduce((l,c)=>{const u=c,d=a.breakpoints.values[u];return d!==0&&(l[a.breakpoints.up(u)]={maxWidth:`${d}${a.breakpoints.unit}`}),l},{}),({theme:a,ownerState:s})=>({...s.maxWidth==="xs"&&{[a.breakpoints.up("xs")]:{maxWidth:Math.max(a.breakpoints.values.xs,444)}},...s.maxWidth&&s.maxWidth!=="xs"&&{[a.breakpoints.up(s.maxWidth)]:{maxWidth:`${a.breakpoints.values[s.maxWidth]}${a.breakpoints.unit}`}}}));return y.forwardRef(function(s,l){const c=n(s),{className:u,component:d="div",disableGutters:f=!1,fixed:p=!1,maxWidth:m="lg",classes:g,...v}=c,w={...c,component:d,disableGutters:f,fixed:p,maxWidth:m},x=q0e(w,r);return $.jsx(o,{as:d,ownerState:w,className:de(x.root,u),ref:l,...v})})}const Y0e=(e,t)=>e.filter(n=>t.includes(n)),_v=(e,t,n)=>{const r=e.keys[0];Array.isArray(t)?t.forEach((o,i)=>{n((a,s)=>{i<=e.keys.length-1&&(i===0?Object.assign(a,s):a[e.up(e.keys[i])]=s)},o)}):t&&typeof t=="object"?(Object.keys(t).length>e.keys.length?e.keys:Y0e(e.keys,Object.keys(t))).forEach(i=>{if(e.keys.includes(i)){const a=t[i];a!==void 0&&n((s,l)=>{r===i?Object.assign(s,l):s[e.up(i)]=l},a)}}):(typeof t=="number"||typeof t=="string")&&n((o,i)=>{Object.assign(o,i)},t)};function uT(e){return`--Grid-${e}Spacing`}function fI(e){return`--Grid-parent-${e}Spacing`}const r4="--Grid-columns",Kg="--Grid-parent-columns",X0e=({theme:e,ownerState:t})=>{const n={};return _v(e.breakpoints,t.size,(r,o)=>{let i={};o==="grow"&&(i={flexBasis:0,flexGrow:1,maxWidth:"100%"}),o==="auto"&&(i={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"}),typeof o=="number"&&(i={flexGrow:0,flexBasis:"auto",width:`calc(100% * ${o} / var(${Kg}) - (var(${Kg}) - ${o}) * (var(${fI("column")}) / var(${Kg})))`}),r(n,i)}),n},Q0e=({theme:e,ownerState:t})=>{const n={};return _v(e.breakpoints,t.offset,(r,o)=>{let i={};o==="auto"&&(i={marginLeft:"auto"}),typeof o=="number"&&(i={marginLeft:o===0?"0px":`calc(100% * ${o} / var(${Kg}) + var(${fI("column")}) * ${o} / var(${Kg}))`}),r(n,i)}),n},J0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={[r4]:12};return _v(e.breakpoints,t.columns,(r,o)=>{const i=o??12;r(n,{[r4]:i,"> *":{[Kg]:i}})}),n},Z0e=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return _v(e.breakpoints,t.rowSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[uT("row")]:i,"> *":{[fI("row")]:i}})}),n},ewe=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return _v(e.breakpoints,t.columnSpacing,(r,o)=>{var a;const i=typeof o=="string"?o:(a=e.spacing)==null?void 0:a.call(e,o);r(n,{[uT("column")]:i,"> *":{[fI("column")]:i}})}),n},twe=({theme:e,ownerState:t})=>{if(!t.container)return{};const n={};return _v(e.breakpoints,t.direction,(r,o)=>{r(n,{flexDirection:o})}),n},nwe=({ownerState:e})=>({minWidth:0,boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",...e.wrap&&e.wrap!=="wrap"&&{flexWrap:e.wrap},gap:`var(${uT("row")}) var(${uT("column")})`}}),rwe=e=>{const t=[];return Object.entries(e).forEach(([n,r])=>{r!==!1&&r!==void 0&&t.push(`grid-${n}-${String(r)}`)}),t},owe=(e,t="xs")=>{function n(r){return r===void 0?!1:typeof r=="string"&&!Number.isNaN(Number(r))||typeof r=="number"&&r>0}if(n(e))return[`spacing-${t}-${String(e)}`];if(typeof e=="object"&&!Array.isArray(e)){const r=[];return Object.entries(e).forEach(([o,i])=>{n(i)&&r.push(`spacing-${o}-${String(i)}`)}),r}return[]},iwe=e=>e===void 0?[]:typeof e=="object"?Object.entries(e).map(([t,n])=>`direction-${t}-${n}`):[`direction-xs-${String(e)}`],awe=Rv(),swe=Qn("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>t.root});function lwe(e){return uI({props:e,name:"MuiGrid",defaultTheme:awe})}function cwe(e={}){const{createStyledComponent:t=swe,useThemeProps:n=lwe,componentName:r="MuiGrid"}=e,o=(l,c)=>{const{container:u,direction:d,spacing:f,wrap:p,size:m}=l,g={root:["root",u&&"container",p!=="wrap"&&`wrap-xs-${String(p)}`,...iwe(d),...rwe(m),...u?owe(f,c.breakpoints.keys[0]):[]]};return rt(g,v=>tt(r,v),{})};function i(l,c,u=()=>!0){const d={};return l===null||(Array.isArray(l)?l.forEach((f,p)=>{f!==null&&u(f)&&c.keys[p]&&(d[c.keys[p]]=f)}):typeof l=="object"?Object.keys(l).forEach(f=>{const p=l[f];p!=null&&u(p)&&(d[f]=p)}):d[c.keys[0]]=l),d}const a=t(J0e,ewe,Z0e,X0e,twe,nwe,Q0e),s=y.forwardRef(function(c,u){const d=gS(),f=n(c),p=ZO(f),{className:m,children:g,columns:v=12,container:w=!1,component:x="div",direction:S="row",wrap:P="wrap",size:T={},offset:E={},spacing:O=0,rowSpacing:k=O,columnSpacing:A=O,unstable_level:I=0,...R}=p,N=i(T,d.breakpoints,U=>U!==!1),L=i(E,d.breakpoints),j=c.columns??(I?void 0:v),_=c.spacing??(I?void 0:O),D=c.rowSpacing??c.spacing??(I?void 0:k),z=c.columnSpacing??c.spacing??(I?void 0:A),F={...p,level:I,columns:j,container:w,direction:S,wrap:P,spacing:_,rowSpacing:D,columnSpacing:z,size:N,offset:L},H=o(F,d);return $.jsx(a,{ref:u,as:x,ownerState:F,className:de(H.root,m),...R,children:y.Children.map(g,U=>{var q;return y.isValidElement(U)&&qg(U,["Grid"])&&w&&U.props.container?y.cloneElement(U,{unstable_level:((q=U.props)==null?void 0:q.unstable_level)??I+1}):U})})});return s.muiName="Grid",s}const uwe=Rv(),dwe=Qn("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function fwe(e){return uI({props:e,name:"MuiStack",defaultTheme:uwe})}function pwe(e,t){const n=y.Children.toArray(e).filter(Boolean);return n.reduce((r,o,i)=>(r.push(o),i({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[e],mwe=({ownerState:e,theme:t})=>{let n={display:"flex",flexDirection:"column",...nc({theme:t},BA({values:e.direction,breakpoints:t.breakpoints.values}),r=>({flexDirection:r}))};if(e.spacing){const r=qO(t),o=Object.keys(t.breakpoints.values).reduce((l,c)=>((typeof e.spacing=="object"&&e.spacing[c]!=null||typeof e.direction=="object"&&e.direction[c]!=null)&&(l[c]=!0),l),{}),i=BA({values:e.direction,base:o}),a=BA({values:e.spacing,base:o});typeof i=="object"&&Object.keys(i).forEach((l,c,u)=>{if(!i[l]){const f=c>0?i[u[c-1]]:"column";i[l]=f}}),n=bo(n,nc({theme:t},a,(l,c)=>e.useFlexGap?{gap:bh(r,l)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${hwe(c?i[c]:e.direction)}`]:bh(r,l)}}))}return n=lbe(t.breakpoints,n),n};function gwe(e={}){const{createStyledComponent:t=dwe,useThemeProps:n=fwe,componentName:r="MuiStack"}=e,o=()=>rt({root:["root"]},l=>tt(r,l),{}),i=t(mwe);return y.forwardRef(function(l,c){const u=n(l),d=ZO(u),{component:f="div",direction:p="column",spacing:m=0,divider:g,children:v,className:w,useFlexGap:x=!1,...S}=d,P={direction:p,spacing:m,useFlexGap:x},T=o();return $.jsx(i,{as:f,ownerState:P,ref:c,className:de(T.root,w),...S,children:g?pwe(v,g):v})})}const Lw={black:"#000",white:"#fff"},ywe={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},Lm={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},Fm={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},Yb={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},jm={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},Bm={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},zm={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function EX(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Lw.white,default:Lw.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const vwe=EX();function OX(){return{text:{primary:Lw.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Lw.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const o4=OX();function i4(e,t,n,r){const o=r.light||r,i=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Vu(e.main,o):t==="dark"&&(e.dark=zu(e.main,i)))}function bwe(e="light"){return e==="dark"?{main:jm[200],light:jm[50],dark:jm[400]}:{main:jm[700],light:jm[400],dark:jm[800]}}function wwe(e="light"){return e==="dark"?{main:Lm[200],light:Lm[50],dark:Lm[400]}:{main:Lm[500],light:Lm[300],dark:Lm[700]}}function xwe(e="light"){return e==="dark"?{main:Fm[500],light:Fm[300],dark:Fm[700]}:{main:Fm[700],light:Fm[400],dark:Fm[800]}}function Swe(e="light"){return e==="dark"?{main:Bm[400],light:Bm[300],dark:Bm[700]}:{main:Bm[700],light:Bm[500],dark:Bm[900]}}function Cwe(e="light"){return e==="dark"?{main:zm[400],light:zm[300],dark:zm[700]}:{main:zm[800],light:zm[500],dark:zm[900]}}function Pwe(e="light"){return e==="dark"?{main:Yb[400],light:Yb[300],dark:Yb[700]}:{main:"#ed6c02",light:Yb[500],dark:Yb[900]}}function jL(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||bwe(t),a=e.secondary||wwe(t),s=e.error||xwe(t),l=e.info||Swe(t),c=e.success||Cwe(t),u=e.warning||Pwe(t);function d(g){return b0e(g,o4.text.primary)>=n?o4.text.primary:vwe.text.primary}const f=({color:g,name:v,mainShade:w=500,lightShade:x=300,darkShade:S=700})=>{if(g={...g},!g.main&&g[w]&&(g.main=g[w]),!g.hasOwnProperty("main"))throw new Error(Bu(11,v?` (${v})`:"",w));if(typeof g.main!="string")throw new Error(Bu(12,v?` (${v})`:"",JSON.stringify(g.main)));return i4(g,"light",x,r),i4(g,"dark",S,r),g.contrastText||(g.contrastText=d(g.main)),g};let p;return t==="light"?p=EX():t==="dark"&&(p=OX()),bo({common:{...Lw},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:ywe,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function Twe(e){const t={};return Object.entries(e).forEach(r=>{const[o,i]=r;typeof i=="object"&&(t[o]=`${i.fontStyle?`${i.fontStyle} `:""}${i.fontVariant?`${i.fontVariant} `:""}${i.fontWeight?`${i.fontWeight} `:""}${i.fontStretch?`${i.fontStretch} `:""}${i.fontSize||""}${i.lineHeight?`/${i.lineHeight} `:""}${i.fontFamily||""}`)}),t}function Ewe(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function Owe(e){return Math.round(e*1e5)/1e5}const a4={textTransform:"uppercase"},s4='"Roboto", "Helvetica", "Arial", sans-serif';function IX(e,t){const{fontFamily:n=s4,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}=typeof t=="function"?t(e):t,f=r/14,p=u||(v=>`${v/l*f}rem`),m=(v,w,x,S,P)=>({fontFamily:n,fontWeight:v,fontSize:p(w),lineHeight:x,...n===s4?{letterSpacing:`${Owe(S/w)}em`}:{},...P,...c}),g={h1:m(o,96,1.167,-1.5),h2:m(o,60,1.2,-.5),h3:m(i,48,1.167,0),h4:m(i,34,1.235,.25),h5:m(i,24,1.334,0),h6:m(a,20,1.6,.15),subtitle1:m(i,16,1.75,.15),subtitle2:m(a,14,1.57,.1),body1:m(i,16,1.5,.15),body2:m(i,14,1.43,.15),button:m(a,14,1.75,.4,a4),caption:m(i,12,1.66,.4),overline:m(i,12,2.66,1,a4),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return bo({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...g},d,{clone:!1})}const Iwe=.2,kwe=.14,Mwe=.12;function Dr(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Iwe})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${kwe})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Mwe})`].join(",")}const Awe=["none",Dr(0,2,1,-1,0,1,1,0,0,1,3,0),Dr(0,3,1,-2,0,2,2,0,0,1,5,0),Dr(0,3,3,-2,0,3,4,0,0,1,8,0),Dr(0,2,4,-1,0,4,5,0,0,1,10,0),Dr(0,3,5,-1,0,5,8,0,0,1,14,0),Dr(0,3,5,-1,0,6,10,0,0,1,18,0),Dr(0,4,5,-2,0,7,10,1,0,2,16,1),Dr(0,5,5,-3,0,8,10,1,0,3,14,2),Dr(0,5,6,-3,0,9,12,1,0,3,16,2),Dr(0,6,6,-3,0,10,14,1,0,4,18,3),Dr(0,6,7,-4,0,11,15,1,0,4,20,3),Dr(0,7,8,-4,0,12,17,2,0,5,22,4),Dr(0,7,8,-4,0,13,19,2,0,5,24,4),Dr(0,7,9,-4,0,14,21,2,0,5,26,4),Dr(0,8,9,-5,0,15,22,2,0,6,28,5),Dr(0,8,10,-5,0,16,24,2,0,6,30,5),Dr(0,8,11,-5,0,17,26,2,0,6,32,5),Dr(0,9,11,-5,0,18,28,2,0,7,34,6),Dr(0,9,12,-6,0,19,29,2,0,7,36,6),Dr(0,10,13,-6,0,20,31,3,0,8,38,7),Dr(0,10,13,-6,0,21,33,3,0,8,40,7),Dr(0,10,14,-6,0,22,35,3,0,8,42,7),Dr(0,11,14,-7,0,23,36,3,0,9,44,8),Dr(0,11,15,-7,0,24,38,3,0,9,46,8)],$we={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},kX={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function l4(e){return`${Math.round(e)}ms`}function Rwe(e){if(!e)return 0;const t=e/36;return Math.min(Math.round((4+15*t**.25+t/5)*10),3e3)}function _we(e){const t={...$we,...e.easing},n={...kX,...e.duration};return{getAutoHeightDuration:Rwe,create:(o=["all"],i={})=>{const{duration:a=n.standard,easing:s=t.easeInOut,delay:l=0,...c}=i;return(Array.isArray(o)?o:[o]).map(u=>`${u} ${typeof a=="string"?a:l4(a)} ${s} ${typeof l=="string"?l:l4(l)}`).join(",")},...e,easing:t,duration:n}}const Dwe={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Nwe(e){return Pc(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function MX(e={}){const t={...e};function n(r){const o=Object.entries(r);for(let i=0;ivo(h,m),f),f.unstable_sxConfig={...sS,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(m){return xf({sx:m,theme:this})},f.toRuntimeSource=bX,f}function UR(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const xwe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=UR(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function wX(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function xX(e){return e==="dark"?xwe:[]}function Swe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=IL(t);return{palette:i,opacity:{...wX(i.mode),...n},overlays:r||xX(i.mode),...o}}function Cwe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Pwe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],Twe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Pwe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function Ewe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Le(e,t,n){!e[t]&&n&&(e[t]=n)}function O0(e){return!e||!e.startsWith("hsl")?e:eX(e)}function uu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=E0(O0(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). -To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Owe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const dc=e=>{try{return e()}catch{}},Iwe=(e="mui")=>C0e(e);function RA(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=Swe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=HR({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...wX(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||xX(o)},a}function kwe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=Cwe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=Iwe(i),{[d]:h,light:m,dark:g,...v}=n,w={...v};let x=h;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(x=!0),!x)throw new Error(Fu(21,d));const S=RA(w,x,c,d);m&&!w.light&&RA(w,m,void 0,"light"),g&&!w.dark&&RA(w,g,void 0,"dark");let P={defaultColorScheme:d,...S,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:w,font:{...cwe(S.typography),...S.font},spacing:Owe(c.spacing)};Object.keys(P.colorSchemes).forEach(A=>{const I=P.colorSchemes[A].palette,R=N=>{const L=N.split("-"),B=L[1],_=L[2];return f(N,I[B][_])};if(I.mode==="light"&&(Le(I.common,"background","#fff"),Le(I.common,"onBackground","#000")),I.mode==="dark"&&(Le(I.common,"background","#000"),Le(I.common,"onBackground","#fff")),Ewe(I,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),I.mode==="light"){Le(I.Alert,"errorColor",fr(I.error.light,.6)),Le(I.Alert,"infoColor",fr(I.info.light,.6)),Le(I.Alert,"successColor",fr(I.success.light,.6)),Le(I.Alert,"warningColor",fr(I.warning.light,.6)),Le(I.Alert,"errorFilledBg",R("palette-error-main")),Le(I.Alert,"infoFilledBg",R("palette-info-main")),Le(I.Alert,"successFilledBg",R("palette-success-main")),Le(I.Alert,"warningFilledBg",R("palette-warning-main")),Le(I.Alert,"errorFilledColor",dc(()=>I.getContrastText(I.error.main))),Le(I.Alert,"infoFilledColor",dc(()=>I.getContrastText(I.info.main))),Le(I.Alert,"successFilledColor",dc(()=>I.getContrastText(I.success.main))),Le(I.Alert,"warningFilledColor",dc(()=>I.getContrastText(I.warning.main))),Le(I.Alert,"errorStandardBg",pr(I.error.light,.9)),Le(I.Alert,"infoStandardBg",pr(I.info.light,.9)),Le(I.Alert,"successStandardBg",pr(I.success.light,.9)),Le(I.Alert,"warningStandardBg",pr(I.warning.light,.9)),Le(I.Alert,"errorIconColor",R("palette-error-main")),Le(I.Alert,"infoIconColor",R("palette-info-main")),Le(I.Alert,"successIconColor",R("palette-success-main")),Le(I.Alert,"warningIconColor",R("palette-warning-main")),Le(I.AppBar,"defaultBg",R("palette-grey-100")),Le(I.Avatar,"defaultBg",R("palette-grey-400")),Le(I.Button,"inheritContainedBg",R("palette-grey-300")),Le(I.Button,"inheritContainedHoverBg",R("palette-grey-A100")),Le(I.Chip,"defaultBorder",R("palette-grey-400")),Le(I.Chip,"defaultAvatarColor",R("palette-grey-700")),Le(I.Chip,"defaultIconColor",R("palette-grey-700")),Le(I.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Le(I.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Le(I.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Le(I.LinearProgress,"primaryBg",pr(I.primary.main,.62)),Le(I.LinearProgress,"secondaryBg",pr(I.secondary.main,.62)),Le(I.LinearProgress,"errorBg",pr(I.error.main,.62)),Le(I.LinearProgress,"infoBg",pr(I.info.main,.62)),Le(I.LinearProgress,"successBg",pr(I.success.main,.62)),Le(I.LinearProgress,"warningBg",pr(I.warning.main,.62)),Le(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),Le(I.Slider,"primaryTrack",pr(I.primary.main,.62)),Le(I.Slider,"secondaryTrack",pr(I.secondary.main,.62)),Le(I.Slider,"errorTrack",pr(I.error.main,.62)),Le(I.Slider,"infoTrack",pr(I.info.main,.62)),Le(I.Slider,"successTrack",pr(I.success.main,.62)),Le(I.Slider,"warningTrack",pr(I.warning.main,.62));const N=nC(I.background.default,.8);Le(I.SnackbarContent,"bg",N),Le(I.SnackbarContent,"color",dc(()=>I.getContrastText(N))),Le(I.SpeedDialAction,"fabHoverBg",nC(I.background.paper,.15)),Le(I.StepConnector,"border",R("palette-grey-400")),Le(I.StepContent,"border",R("palette-grey-400")),Le(I.Switch,"defaultColor",R("palette-common-white")),Le(I.Switch,"defaultDisabledColor",R("palette-grey-100")),Le(I.Switch,"primaryDisabledColor",pr(I.primary.main,.62)),Le(I.Switch,"secondaryDisabledColor",pr(I.secondary.main,.62)),Le(I.Switch,"errorDisabledColor",pr(I.error.main,.62)),Le(I.Switch,"infoDisabledColor",pr(I.info.main,.62)),Le(I.Switch,"successDisabledColor",pr(I.success.main,.62)),Le(I.Switch,"warningDisabledColor",pr(I.warning.main,.62)),Le(I.TableCell,"border",pr(tC(I.divider,1),.88)),Le(I.Tooltip,"bg",tC(I.grey[700],.92))}if(I.mode==="dark"){Le(I.Alert,"errorColor",pr(I.error.light,.6)),Le(I.Alert,"infoColor",pr(I.info.light,.6)),Le(I.Alert,"successColor",pr(I.success.light,.6)),Le(I.Alert,"warningColor",pr(I.warning.light,.6)),Le(I.Alert,"errorFilledBg",R("palette-error-dark")),Le(I.Alert,"infoFilledBg",R("palette-info-dark")),Le(I.Alert,"successFilledBg",R("palette-success-dark")),Le(I.Alert,"warningFilledBg",R("palette-warning-dark")),Le(I.Alert,"errorFilledColor",dc(()=>I.getContrastText(I.error.dark))),Le(I.Alert,"infoFilledColor",dc(()=>I.getContrastText(I.info.dark))),Le(I.Alert,"successFilledColor",dc(()=>I.getContrastText(I.success.dark))),Le(I.Alert,"warningFilledColor",dc(()=>I.getContrastText(I.warning.dark))),Le(I.Alert,"errorStandardBg",fr(I.error.light,.9)),Le(I.Alert,"infoStandardBg",fr(I.info.light,.9)),Le(I.Alert,"successStandardBg",fr(I.success.light,.9)),Le(I.Alert,"warningStandardBg",fr(I.warning.light,.9)),Le(I.Alert,"errorIconColor",R("palette-error-main")),Le(I.Alert,"infoIconColor",R("palette-info-main")),Le(I.Alert,"successIconColor",R("palette-success-main")),Le(I.Alert,"warningIconColor",R("palette-warning-main")),Le(I.AppBar,"defaultBg",R("palette-grey-900")),Le(I.AppBar,"darkBg",R("palette-background-paper")),Le(I.AppBar,"darkColor",R("palette-text-primary")),Le(I.Avatar,"defaultBg",R("palette-grey-600")),Le(I.Button,"inheritContainedBg",R("palette-grey-800")),Le(I.Button,"inheritContainedHoverBg",R("palette-grey-700")),Le(I.Chip,"defaultBorder",R("palette-grey-700")),Le(I.Chip,"defaultAvatarColor",R("palette-grey-300")),Le(I.Chip,"defaultIconColor",R("palette-grey-300")),Le(I.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Le(I.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Le(I.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Le(I.LinearProgress,"primaryBg",fr(I.primary.main,.5)),Le(I.LinearProgress,"secondaryBg",fr(I.secondary.main,.5)),Le(I.LinearProgress,"errorBg",fr(I.error.main,.5)),Le(I.LinearProgress,"infoBg",fr(I.info.main,.5)),Le(I.LinearProgress,"successBg",fr(I.success.main,.5)),Le(I.LinearProgress,"warningBg",fr(I.warning.main,.5)),Le(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),Le(I.Slider,"primaryTrack",fr(I.primary.main,.5)),Le(I.Slider,"secondaryTrack",fr(I.secondary.main,.5)),Le(I.Slider,"errorTrack",fr(I.error.main,.5)),Le(I.Slider,"infoTrack",fr(I.info.main,.5)),Le(I.Slider,"successTrack",fr(I.success.main,.5)),Le(I.Slider,"warningTrack",fr(I.warning.main,.5));const N=nC(I.background.default,.98);Le(I.SnackbarContent,"bg",N),Le(I.SnackbarContent,"color",dc(()=>I.getContrastText(N))),Le(I.SpeedDialAction,"fabHoverBg",nC(I.background.paper,.15)),Le(I.StepConnector,"border",R("palette-grey-600")),Le(I.StepContent,"border",R("palette-grey-600")),Le(I.Switch,"defaultColor",R("palette-grey-300")),Le(I.Switch,"defaultDisabledColor",R("palette-grey-600")),Le(I.Switch,"primaryDisabledColor",fr(I.primary.main,.55)),Le(I.Switch,"secondaryDisabledColor",fr(I.secondary.main,.55)),Le(I.Switch,"errorDisabledColor",fr(I.error.main,.55)),Le(I.Switch,"infoDisabledColor",fr(I.info.main,.55)),Le(I.Switch,"successDisabledColor",fr(I.success.main,.55)),Le(I.Switch,"warningDisabledColor",fr(I.warning.main,.55)),Le(I.TableCell,"border",fr(tC(I.divider,1),.68)),Le(I.Tooltip,"bg",tC(I.grey[700],.92))}uu(I.background,"default"),uu(I.background,"paper"),uu(I.common,"background"),uu(I.common,"onBackground"),uu(I,"divider"),Object.keys(I).forEach(N=>{const L=I[N];L&&typeof L=="object"&&(L.main&&Le(I[N],"mainChannel",E0(O0(L.main))),L.light&&Le(I[N],"lightChannel",E0(O0(L.light))),L.dark&&Le(I[N],"darkChannel",E0(O0(L.dark))),L.contrastText&&Le(I[N],"contrastTextChannel",E0(O0(L.contrastText))),N==="text"&&(uu(I[N],"primary"),uu(I[N],"secondary")),N==="action"&&(L.active&&uu(I[N],"active"),L.selected&&uu(I[N],"selected")))})}),P=t.reduce((A,I)=>vo(A,I),P);const T={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:Twe(P)},{vars:E,generateThemeVars:O,generateStyleSheets:k}=E0e(P,T);return P.vars=E,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([A,I])=>{P[A]=I}),P.generateThemeVars=O,P.generateStyleSheets=k,P.generateSpacing=function(){return UY(c.spacing,DO(this))},P.getColorSchemeSelector=O0e(s),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=a,P.unstable_sxConfig={...sS,...c==null?void 0:c.unstable_sxConfig},P.unstable_sx=function(I){return xf({sx:I,theme:this})},P.toRuntimeSource=bX,P}function e4(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:IL({...n===!0?{}:n.palette,mode:t})})}function fS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return HR(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=HR({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},e4(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},e4(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),kwe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function Mwe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function Awe(e){return parseFloat(e)}const tI=fS();function Ei(){const e=lS(tI);return e[Ul]||e}function Zt({props:e,name:t}){return JO({props:e,name:t,defaultTheme:tI,themeId:Ul})}function SX(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ci=e=>SX(e)&&e!=="classes",oe=QY({themeId:Ul,defaultTheme:tI,rootShouldForwardProp:ci});function t4({theme:e,...t}){const n=Ul in e?e[Ul]:void 0;return $.jsx(pX,{...t,themeId:n?Ul:void 0,theme:n||e})}const rC={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:$we,useColorScheme:mRt,getInitColorSchemeScript:gRt}=S0e({themeId:Ul,theme:()=>fS({cssVariables:!0}),colorSchemeStorageKey:rC.colorSchemeStorageKey,modeStorageKey:rC.modeStorageKey,defaultColorScheme:{light:rC.defaultLightColorScheme,dark:rC.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:yX(e.palette,e.typography)};return t.unstable_sx=function(r){return xf({sx:r,theme:this})},t}}),Rwe=$we;function Rf({theme:e,...t}){return typeof e=="function"?$.jsx(t4,{theme:e,...t}):"colorSchemes"in(Ul in e?e[Ul]:e)?$.jsx(Rwe,{theme:e,...t}):$.jsx(t4,{theme:e,...t})}var Pv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},fh=typeof window>"u"||"Deno"in globalThis;function Ls(){}function _we(e,t){return typeof e=="function"?e(t):e}function WR(e){return typeof e=="number"&&e>=0&&e!==1/0}function CX(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Bg(e,t){return typeof e=="function"?e(t):e}function Nl(e,t){return typeof e=="function"?e(t):e}function n4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==kL(a,t.options))return!1}else if(!kw(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function r4(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ph(t.options.mutationKey)!==ph(i))return!1}else if(!kw(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function kL(e,t){return((t==null?void 0:t.queryKeyHashFn)||ph)(e)}function ph(e){return JSON.stringify(e,(t,n)=>GR(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function kw(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!kw(e[n],t[n])):!1}function PX(e,t){if(e===t)return e;const n=o4(e)&&o4(t);if(n||GR(e)&&GR(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function qR(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?PX(e,t):t}function Nwe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Lwe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ML=Symbol();function TX(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ML?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Up,Hd,ly,WK,Fwe=(WK=class extends Pv{constructor(){super();Ft(this,Up);Ft(this,Hd);Ft(this,ly);vt(this,ly,t=>{if(!fh&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){be(this,Hd)||this.setEventListener(be(this,ly))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,Hd))==null||t.call(this),vt(this,Hd,void 0))}setEventListener(t){var n;vt(this,ly,t),(n=be(this,Hd))==null||n.call(this),vt(this,Hd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){be(this,Up)!==t&&(vt(this,Up,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof be(this,Up)=="boolean"?be(this,Up):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Up=new WeakMap,Hd=new WeakMap,ly=new WeakMap,WK),AL=new Fwe,cy,Ud,uy,GK,jwe=(GK=class extends Pv{constructor(){super();Ft(this,cy,!0);Ft(this,Ud);Ft(this,uy);vt(this,uy,t=>{if(!fh&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){be(this,Ud)||this.setEventListener(be(this,uy))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,Ud))==null||t.call(this),vt(this,Ud,void 0))}setEventListener(t){var n;vt(this,uy,t),(n=be(this,Ud))==null||n.call(this),vt(this,Ud,t(this.setOnline.bind(this)))}setOnline(t){be(this,cy)!==t&&(vt(this,cy,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return be(this,cy)}},cy=new WeakMap,Ud=new WeakMap,uy=new WeakMap,GK),eT=new jwe;function KR(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function Bwe(e){return Math.min(1e3*2**e,3e4)}function EX(e){return(e??"online")==="online"?eT.isOnline():!0}var OX=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _A(e){return e instanceof OX}function IX(e){let t=!1,n=0,r=!1,o;const i=KR(),a=g=>{var v;r||(f(new OX(g)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>AL.isFocused()&&(e.networkMode==="always"||eT.isOnline())&&e.canRun(),u=()=>EX(e.networkMode)&&e.canRun(),d=g=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,g),o==null||o(),i.resolve(g))},f=g=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,g),o==null||o(),i.reject(g))},h=()=>new Promise(g=>{var v;o=w=>{(r||c())&&g(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(r)return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(d).catch(w=>{var E;if(r)return;const x=e.retry??(fh?0:3),S=e.retryDelay??Bwe,P=typeof S=="function"?S(n,w):S,T=x===!0||typeof x=="number"&&nc()?void 0:h()).then(()=>{t?f(w):m()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?m():h().then(m),i)}}function zwe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=s=>setTimeout(s,0);const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var ko=zwe(),Wp,qK,kX=(qK=class{constructor(){Ft(this,Wp)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),WR(this.gcTime)&&vt(this,Wp,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(fh?1/0:5*60*1e3))}clearGcTimeout(){be(this,Wp)&&(clearTimeout(be(this,Wp)),vt(this,Wp,void 0))}},Wp=new WeakMap,qK),dy,fy,Ns,mi,Jx,Gp,Al,pu,KK,Vwe=(KK=class extends kX{constructor(t){super();Ft(this,Al);Ft(this,dy);Ft(this,fy);Ft(this,Ns);Ft(this,mi);Ft(this,Jx);Ft(this,Gp);vt(this,Gp,!1),vt(this,Jx,t.defaultOptions),this.setOptions(t.options),this.observers=[],vt(this,Ns,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,vt(this,dy,Hwe(this.options)),this.state=t.state??be(this,dy),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=be(this,mi))==null?void 0:t.promise}setOptions(t){this.options={...be(this,Jx),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&be(this,Ns).remove(this)}setData(t,n){const r=qR(this.state.data,t,this.options);return dn(this,Al,pu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){dn(this,Al,pu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=be(this,mi))==null?void 0:r.promise;return(o=be(this,mi))==null||o.cancel(t),n?n.then(Ls).catch(Ls):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(be(this,dy))}isActive(){return this.observers.some(t=>Nl(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ML||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!CX(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,mi))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,mi))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),be(this,Ns).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(be(this,mi)&&(be(this,Gp)?be(this,mi).cancel({revert:!0}):be(this,mi).cancelRetry()),this.scheduleGc()),be(this,Ns).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||dn(this,Al,pu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(be(this,mi))return be(this,mi).continueRetry(),be(this,mi).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(vt(this,Gp,!0),r.signal)})},i=()=>{const d=TX(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),vt(this,Gp,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),vt(this,fy,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&dn(this,Al,pu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=d=>{var f,h,m,g;_A(d)&&d.silent||dn(this,Al,pu).call(this,{type:"error",error:d}),_A(d)||((h=(f=be(this,Ns).config).onError)==null||h.call(f,d,this),(g=(m=be(this,Ns).config).onSettled)==null||g.call(m,this.state.data,d,this)),this.scheduleGc()};return vt(this,mi,IX({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,m,g;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){s(v);return}(h=(f=be(this,Ns).config).onSuccess)==null||h.call(f,d,this),(g=(m=be(this,Ns).config).onSettled)==null||g.call(m,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,f)=>{dn(this,Al,pu).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{dn(this,Al,pu).call(this,{type:"pause"})},onContinue:()=>{dn(this,Al,pu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),be(this,mi).start()}},dy=new WeakMap,fy=new WeakMap,Ns=new WeakMap,mi=new WeakMap,Jx=new WeakMap,Gp=new WeakMap,Al=new WeakSet,pu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...MX(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return _A(o)&&o.revert&&be(this,fy)?{...be(this,fy),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ko.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),be(this,Ns).notify({query:this,type:"updated",action:t})})},KK);function MX(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:EX(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Hwe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var mc,YK,Uwe=(YK=class extends Pv{constructor(t={}){super();Ft(this,mc);this.config=t,vt(this,mc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??kL(o,n);let a=this.get(i);return a||(a=new Vwe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){be(this,mc).has(t.queryHash)||(be(this,mc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=be(this,mc).get(t.queryHash);n&&(t.destroy(),n===t&&be(this,mc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ko.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return be(this,mc).get(t)}getAll(){return[...be(this,mc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>n4(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>n4(t,r)):n}notify(t){ko.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ko.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ko.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},mc=new WeakMap,YK),gc,Di,qp,yc,Id,XK,Wwe=(XK=class extends kX{constructor(t){super();Ft(this,yc);Ft(this,gc);Ft(this,Di);Ft(this,qp);this.mutationId=t.mutationId,vt(this,Di,t.mutationCache),vt(this,gc,[]),this.state=t.state||AX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){be(this,gc).includes(t)||(be(this,gc).push(t),this.clearGcTimeout(),be(this,Di).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){vt(this,gc,be(this,gc).filter(n=>n!==t)),this.scheduleGc(),be(this,Di).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){be(this,gc).length||(this.state.status==="pending"?this.scheduleGc():be(this,Di).remove(this))}continue(){var t;return((t=be(this,qp))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,d,f,h,m,g,v,w,x,S,P,T,E,O;vt(this,qp,IX({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,A)=>{dn(this,yc,Id).call(this,{type:"failed",failureCount:k,error:A})},onPause:()=>{dn(this,yc,Id).call(this,{type:"pause"})},onContinue:()=>{dn(this,yc,Id).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>be(this,Di).canRun(this)}));const n=this.state.status==="pending",r=!be(this,qp).canStart();try{if(!n){dn(this,yc,Id).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=be(this,Di).config).onMutate)==null?void 0:i.call(o,t,this));const A=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));A!==this.state.context&&dn(this,yc,Id).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const k=await be(this,qp).start();return await((c=(l=be(this,Di).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((h=(f=be(this,Di).config).onSettled)==null?void 0:h.call(f,k,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,k,null,t,this.state.context)),dn(this,yc,Id).call(this,{type:"success",data:k}),k}catch(k){try{throw await((w=(v=be(this,Di).config).onError)==null?void 0:w.call(v,k,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,k,t,this.state.context)),await((T=(P=be(this,Di).config).onSettled)==null?void 0:T.call(P,void 0,k,this.state.variables,this.state.context,this)),await((O=(E=this.options).onSettled)==null?void 0:O.call(E,void 0,k,t,this.state.context)),k}finally{dn(this,yc,Id).call(this,{type:"error",error:k})}}finally{be(this,Di).runNext(this)}}},gc=new WeakMap,Di=new WeakMap,qp=new WeakMap,yc=new WeakSet,Id=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ko.batch(()=>{be(this,gc).forEach(r=>{r.onMutationUpdate(t)}),be(this,Di).notify({mutation:this,type:"updated",action:t})})},XK);function AX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var La,Zx,QK,Gwe=(QK=class extends Pv{constructor(t={}){super();Ft(this,La);Ft(this,Zx);this.config=t,vt(this,La,new Map),vt(this,Zx,Date.now())}build(t,n,r){const o=new Wwe({mutationCache:this,mutationId:++J1(this,Zx)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=oC(t),r=be(this,La).get(n)??[];r.push(t),be(this,La).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=oC(t);if(be(this,La).has(n)){const o=(r=be(this,La).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?be(this,La).delete(n):be(this,La).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=be(this,La).get(oC(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=be(this,La).get(oC(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ko.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...be(this,La).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>r4(n,r))}findAll(t={}){return this.getAll().filter(n=>r4(t,n))}notify(t){ko.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ko.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ls))))}},La=new WeakMap,Zx=new WeakMap,QK);function oC(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function a4(e){return{onFetch:(t,n)=>{var u,d,f,h,m;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const v=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},w=TX(t.options,t.fetchOptions),x=async(S,P,T)=>{if(g)return Promise.reject();if(P==null&&S.pages.length)return Promise.resolve(S);const E={queryKey:t.queryKey,pageParam:P,direction:T?"backward":"forward",meta:t.options.meta};v(E);const O=await w(E),{maxPages:k}=t.options,A=T?Lwe:Nwe;return{pages:A(S.pages,O,k),pageParams:A(S.pageParams,P,k)}};if(o&&i.length){const S=o==="backward",P=S?qwe:s4,T={pages:i,pageParams:a},E=P(r,T);s=await x(T,E,S)}else{const S=e??i.length;do{const P=l===0?a[0]??r.initialPageParam:s4(r,s);if(l>0&&P==null)break;s=await x(s,P),l++}while(l{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function s4(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qwe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Jr,Wd,Gd,py,hy,qd,my,gy,JK,Kwe=(JK=class{constructor(e={}){Ft(this,Jr);Ft(this,Wd);Ft(this,Gd);Ft(this,py);Ft(this,hy);Ft(this,qd);Ft(this,my);Ft(this,gy);vt(this,Jr,e.queryCache||new Uwe),vt(this,Wd,e.mutationCache||new Gwe),vt(this,Gd,e.defaultOptions||{}),vt(this,py,new Map),vt(this,hy,new Map),vt(this,qd,0)}mount(){J1(this,qd)._++,be(this,qd)===1&&(vt(this,my,AL.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,Jr).onFocus())})),vt(this,gy,eT.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,Jr).onOnline())})))}unmount(){var e,t;J1(this,qd)._--,be(this,qd)===0&&((e=be(this,my))==null||e.call(this),vt(this,my,void 0),(t=be(this,gy))==null||t.call(this),vt(this,gy,void 0))}isFetching(e){return be(this,Jr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return be(this,Wd).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,Jr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=be(this,Jr).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Bg(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return be(this,Jr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=be(this,Jr).get(r.queryHash),i=o==null?void 0:o.state.data,a=_we(t,i);if(a!==void 0)return be(this,Jr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ko.batch(()=>be(this,Jr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,Jr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=be(this,Jr);ko.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=be(this,Jr),r={type:"active",...e};return ko.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=ko.batch(()=>be(this,Jr).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Ls).catch(Ls)}invalidateQueries(e={},t={}){return ko.batch(()=>{if(be(this,Jr).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=ko.batch(()=>be(this,Jr).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ls)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ls)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=be(this,Jr).build(this,t);return n.isStaleByTime(Bg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ls).catch(Ls)}fetchInfiniteQuery(e){return e.behavior=a4(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ls).catch(Ls)}ensureInfiniteQueryData(e){return e.behavior=a4(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return eT.isOnline()?be(this,Wd).resumePausedMutations():Promise.resolve()}getQueryCache(){return be(this,Jr)}getMutationCache(){return be(this,Wd)}getDefaultOptions(){return be(this,Gd)}setDefaultOptions(e){vt(this,Gd,e)}setQueryDefaults(e,t){be(this,py).set(ph(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...be(this,py).values()];let n={};return t.forEach(r=>{kw(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){be(this,hy).set(ph(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...be(this,hy).values()];let n={};return t.forEach(r=>{kw(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...be(this,Gd).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=kL(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===ML&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...be(this,Gd).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){be(this,Jr).clear(),be(this,Wd).clear()}},Jr=new WeakMap,Wd=new WeakMap,Gd=new WeakMap,py=new WeakMap,hy=new WeakMap,qd=new WeakMap,my=new WeakMap,gy=new WeakMap,JK),sa,An,eS,Ni,Kp,yy,Kd,vc,tS,vy,by,Yp,Xp,Yd,wy,tr,I0,YR,XR,QR,JR,ZR,e2,t2,$X,ZK,Ywe=(ZK=class extends Pv{constructor(t,n){super();Ft(this,tr);Ft(this,sa);Ft(this,An);Ft(this,eS);Ft(this,Ni);Ft(this,Kp);Ft(this,yy);Ft(this,Kd);Ft(this,vc);Ft(this,tS);Ft(this,vy);Ft(this,by);Ft(this,Yp);Ft(this,Xp);Ft(this,Yd);Ft(this,wy,new Set);this.options=n,vt(this,sa,t),vt(this,vc,null),vt(this,Kd,KR()),this.options.experimental_prefetchInRender||be(this,Kd).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(be(this,An).addObserver(this),l4(be(this,An),this.options)?dn(this,tr,I0).call(this):this.updateResult(),dn(this,tr,JR).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return n2(be(this,An),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return n2(be(this,An),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,dn(this,tr,ZR).call(this),dn(this,tr,e2).call(this),be(this,An).removeObserver(this)}setOptions(t,n){const r=this.options,o=be(this,An);if(this.options=be(this,sa).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Nl(this.options.enabled,be(this,An))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");dn(this,tr,t2).call(this),be(this,An).setOptions(this.options),r._defaulted&&!ZP(this.options,r)&&be(this,sa).getQueryCache().notify({type:"observerOptionsUpdated",query:be(this,An),observer:this});const i=this.hasListeners();i&&c4(be(this,An),o,this.options,r)&&dn(this,tr,I0).call(this),this.updateResult(n),i&&(be(this,An)!==o||Nl(this.options.enabled,be(this,An))!==Nl(r.enabled,be(this,An))||Bg(this.options.staleTime,be(this,An))!==Bg(r.staleTime,be(this,An)))&&dn(this,tr,YR).call(this);const a=dn(this,tr,XR).call(this);i&&(be(this,An)!==o||Nl(this.options.enabled,be(this,An))!==Nl(r.enabled,be(this,An))||a!==be(this,Yd))&&dn(this,tr,QR).call(this,a)}getOptimisticResult(t){const n=be(this,sa).getQueryCache().build(be(this,sa),t),r=this.createResult(n,t);return Qwe(this,r)&&(vt(this,Ni,r),vt(this,yy,this.options),vt(this,Kp,be(this,An).state)),r}getCurrentResult(){return be(this,Ni)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){be(this,wy).add(t)}getCurrentQuery(){return be(this,An)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=be(this,sa).defaultQueryOptions(t),r=be(this,sa).getQueryCache().build(be(this,sa),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return dn(this,tr,I0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),be(this,Ni)))}createResult(t,n){var k;const r=be(this,An),o=this.options,i=be(this,Ni),a=be(this,Kp),s=be(this,yy),c=t!==r?t.state:be(this,eS),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const A=this.hasListeners(),I=!A&&l4(t,n),R=A&&c4(t,r,n,o);(I||R)&&(d={...d,...MX(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(a==null?void 0:a.data)&&n.select===be(this,tS))h=be(this,vy);else try{vt(this,tS,n.select),h=n.select(d.data),h=qR(i==null?void 0:i.data,h,n),vt(this,vy,h),vt(this,vc,null)}catch(A){vt(this,vc,A)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&v==="pending"){let A;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=i.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((k=be(this,by))==null?void 0:k.state.data,be(this,by)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),vt(this,vc,null)}catch(I){vt(this,vc,I)}A!==void 0&&(v="success",h=qR(i==null?void 0:i.data,A,n),f=!0)}be(this,vc)&&(m=be(this,vc),h=be(this,vy),g=Date.now(),v="error");const w=d.fetchStatus==="fetching",x=v==="pending",S=v==="error",P=x&&w,T=h!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:x,isSuccess:v==="success",isError:S,isInitialLoading:P,isLoading:P,data:h,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:S&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&T,isStale:$L(t,n),refetch:this.refetch,promise:be(this,Kd)};if(this.options.experimental_prefetchInRender){const A=N=>{O.status==="error"?N.reject(O.error):O.data!==void 0&&N.resolve(O.data)},I=()=>{const N=vt(this,Kd,O.promise=KR());A(N)},R=be(this,Kd);switch(R.status){case"pending":t.queryHash===r.queryHash&&A(R);break;case"fulfilled":(O.status==="error"||O.data!==R.value)&&I();break;case"rejected":(O.status!=="error"||O.error!==R.reason)&&I();break}}return O}updateResult(t){const n=be(this,Ni),r=this.createResult(be(this,An),this.options);if(vt(this,Kp,be(this,An).state),vt(this,yy,this.options),be(this,Kp).data!==void 0&&vt(this,by,be(this,An)),ZP(r,n))return;vt(this,Ni,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!be(this,wy).size)return!0;const l=new Set(s??be(this,wy));return this.options.throwOnError&&l.add("error"),Object.keys(be(this,Ni)).some(c=>{const u=c;return be(this,Ni)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),dn(this,tr,$X).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&dn(this,tr,JR).call(this)}},sa=new WeakMap,An=new WeakMap,eS=new WeakMap,Ni=new WeakMap,Kp=new WeakMap,yy=new WeakMap,Kd=new WeakMap,vc=new WeakMap,tS=new WeakMap,vy=new WeakMap,by=new WeakMap,Yp=new WeakMap,Xp=new WeakMap,Yd=new WeakMap,wy=new WeakMap,tr=new WeakSet,I0=function(t){dn(this,tr,t2).call(this);let n=be(this,An).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ls)),n},YR=function(){dn(this,tr,ZR).call(this);const t=Bg(this.options.staleTime,be(this,An));if(fh||be(this,Ni).isStale||!WR(t))return;const r=CX(be(this,Ni).dataUpdatedAt,t)+1;vt(this,Yp,setTimeout(()=>{be(this,Ni).isStale||this.updateResult()},r))},XR=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(be(this,An)):this.options.refetchInterval)??!1},QR=function(t){dn(this,tr,e2).call(this),vt(this,Yd,t),!(fh||Nl(this.options.enabled,be(this,An))===!1||!WR(be(this,Yd))||be(this,Yd)===0)&&vt(this,Xp,setInterval(()=>{(this.options.refetchIntervalInBackground||AL.isFocused())&&dn(this,tr,I0).call(this)},be(this,Yd)))},JR=function(){dn(this,tr,YR).call(this),dn(this,tr,QR).call(this,dn(this,tr,XR).call(this))},ZR=function(){be(this,Yp)&&(clearTimeout(be(this,Yp)),vt(this,Yp,void 0))},e2=function(){be(this,Xp)&&(clearInterval(be(this,Xp)),vt(this,Xp,void 0))},t2=function(){const t=be(this,sa).getQueryCache().build(be(this,sa),this.options);if(t===be(this,An))return;const n=be(this,An);vt(this,An,t),vt(this,eS,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},$X=function(t){ko.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(be(this,Ni))}),be(this,sa).getQueryCache().notify({query:be(this,An),type:"observerResultsUpdated"})})},ZK);function Xwe(e,t){return Nl(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function l4(e,t){return Xwe(e,t)||e.state.data!==void 0&&n2(e,t,t.refetchOnMount)}function n2(e,t,n){if(Nl(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&$L(e,t)}return!1}function c4(e,t,n,r){return(e!==t||Nl(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&$L(e,n)}function $L(e,t){return Nl(t.enabled,e)!==!1&&e.isStaleByTime(Bg(t.staleTime,e))}function Qwe(e,t){return!ZP(e.getCurrentResult(),t)}var Xd,Qd,la,xu,Lu,yP,r2,eY,Jwe=(eY=class extends Pv{constructor(n,r){super();Ft(this,Lu);Ft(this,Xd);Ft(this,Qd);Ft(this,la);Ft(this,xu);vt(this,Xd,n),this.setOptions(r),this.bindMethods(),dn(this,Lu,yP).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=be(this,Xd).defaultMutationOptions(n),ZP(this.options,r)||be(this,Xd).getMutationCache().notify({type:"observerOptionsUpdated",mutation:be(this,la),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ph(r.mutationKey)!==ph(this.options.mutationKey)?this.reset():((o=be(this,la))==null?void 0:o.state.status)==="pending"&&be(this,la).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=be(this,la))==null||n.removeObserver(this)}onMutationUpdate(n){dn(this,Lu,yP).call(this),dn(this,Lu,r2).call(this,n)}getCurrentResult(){return be(this,Qd)}reset(){var n;(n=be(this,la))==null||n.removeObserver(this),vt(this,la,void 0),dn(this,Lu,yP).call(this),dn(this,Lu,r2).call(this)}mutate(n,r){var o;return vt(this,xu,r),(o=be(this,la))==null||o.removeObserver(this),vt(this,la,be(this,Xd).getMutationCache().build(be(this,Xd),this.options)),be(this,la).addObserver(this),be(this,la).execute(n)}},Xd=new WeakMap,Qd=new WeakMap,la=new WeakMap,xu=new WeakMap,Lu=new WeakSet,yP=function(){var r;const n=((r=be(this,la))==null?void 0:r.state)??AX();vt(this,Qd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},r2=function(n){ko.batch(()=>{var r,o,i,a,s,l,c,u;if(be(this,xu)&&this.hasListeners()){const d=be(this,Qd).variables,f=be(this,Qd).context;(n==null?void 0:n.type)==="success"?((o=(r=be(this,xu)).onSuccess)==null||o.call(r,n.data,d,f),(a=(i=be(this,xu)).onSettled)==null||a.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=be(this,xu)).onError)==null||l.call(s,n.error,d,f),(u=(c=be(this,xu)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(be(this,Qd))})})},eY),RX=y.createContext(void 0),Gr=e=>{const t=y.useContext(RX);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_h=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(RX.Provider,{value:e,children:t})),_X=y.createContext(!1),Zwe=()=>y.useContext(_X);_X.Provider;function exe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var txe=y.createContext(exe()),nxe=()=>y.useContext(txe);function DX(e,t){return typeof e=="function"?e(...t):!!e}function NX(){}var rxe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},oxe=e=>{y.useEffect(()=>{e.clearReset()},[e])},ixe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&DX(n,[e.error,r]),axe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},sxe=(e,t)=>e.isLoading&&e.isFetching&&!t,lxe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,u4=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function cxe(e,t,n){var u,d,f,h,m;const r=Gr(),o=Zwe(),i=nxe(),a=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,a),a._optimisticResults=o?"isRestoring":"optimistic",axe(a),rxe(a,i),oxe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=y.useState(()=>new t(r,a)),c=l.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(g=>{const v=o?()=>{}:l.subscribe(ko.batchCalls(g));return l.updateResult(),v},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),lxe(a,c))throw u4(a,l,i);if(ixe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw c.error;if((h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||h.call(f,a,c),a.experimental_prefetchInRender&&!fh&&sxe(c,o)){const g=s?u4(a,l,i):(m=r.getQueryCache().get(a.queryHash))==null?void 0:m.promise;g==null||g.catch(NX).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function So(e,t){return cxe(e,Ywe)}function lo(e,t){const n=Gr(),[r]=y.useState(()=>new Jwe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const o=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(ko.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=y.useCallback((a,s)=>{r.mutate(a,s).catch(NX)},[r]);if(o.error&&DX(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}var uxe=function(){return null};function dxe(e){return $.jsx(Nbe,{...e,defaultTheme:tI,themeId:Ul})}function fxe(e){return function(n){return $.jsx(dxe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function pxe(){return zO}const Ze=g0e;function it(e){return m0e(e)}function hxe(e){return tt("MuiSvgIcon",e)}ot("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const mxe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ce(t)}`,`fontSize${Ce(n)}`]};return rt(o,hxe,r)},gxe=oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ce(n.color)}`],t[`fontSize${Ce(n.fontSize)}`]]}})(Ze(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,d,f,h,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var v,w;return{props:{color:g},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[g])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(m=(h=(e.vars??e).palette)==null?void 0:h.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),Mw=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...h}=r,m=y.isValidElement(o)&&o.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},v={};u||(v.viewBox=f);const w=mxe(g);return $.jsxs(gxe,{as:s,className:fe(w.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...h,...m&&o.props,ownerState:g,children:[m?o.props.children:o,d?$.jsx("title",{children:d}):null]})});Mw&&(Mw.muiName="SvgIcon");function st(e,t){function n(r,o){return $.jsx(Mw,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=Mw.muiName,y.memo(y.forwardRef(n))}function nI(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function o2(e,t){return o2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},o2(e,t)}function pS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o2(e,t)}function yxe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function vxe(e,t){e.classList?e.classList.add(t):yxe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function d4(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function bxe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=d4(e.className,t):e.setAttribute("class",d4(e.className&&e.className.baseVal||"",t))}var LX={exports:{}},us={},FX={exports:{}},jX={};/** +export default theme;`}function ZR(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars)throw new Error(Bu(20));const u=jL(i),d=Rv(e);let f=bo(d,{mixins:Ewe(d.breakpoints,r),palette:u,shadows:Awe.slice(),typography:IX(u,s),transitions:_we(a),zIndex:{...Dwe}});return f=bo(f,c),f=t.reduce((p,m)=>bo(p,m),f),f.unstable_sxConfig={...mS,...c==null?void 0:c.unstable_sxConfig},f.unstable_sx=function(m){return Tf({sx:m,theme:this})},f.toRuntimeSource=MX,f}function e2(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const Lwe=[...Array(25)].map((e,t)=>{if(t===0)return"none";const n=e2(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`});function AX(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function $X(e){return e==="dark"?Lwe:[]}function Fwe(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=jL(t);return{palette:i,opacity:{...AX(i.mode),...n},overlays:r||$X(i.mode),...o}}function jwe(e){var t;return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!((t=e[1])!=null&&t.match(/(mode|contrastThreshold|tonalOffset)/))}const Bwe=e=>[...[...Array(25)].map((t,n)=>`--${e?`${e}-`:""}overlays-${n}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],zwe=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if(o==="class"&&(i=".%s"),o==="data"&&(i="[data-%s]"),o!=null&&o.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const a={};return Bwe(e.cssVarPrefix).forEach(s=>{a[s]=n[s],delete n[s]}),i==="media"?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:a}}:i?{[i.replace("%s",t)]:a,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...a}}}if(i&&i!=="media")return`${r}, ${i.replace("%s",String(t))}`}else if(t){if(i==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}return r};function Vwe(e,t){t.forEach(n=>{e[n]||(e[n]={})})}function Le(e,t,n){!e[t]&&n&&(e[t]=n)}function N0(e){return!e||!e.startsWith("hsl")?e:dX(e)}function fu(e,t){`${t}Channel`in e||(e[`${t}Channel`]=D0(N0(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color(). +To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function Hwe(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const hc=e=>{try{return e()}catch{}},Uwe=(e="mui")=>j0e(e);function HA(e,t,n,r){if(!t)return;t=t===!0?{}:t;const o=r==="dark"?"dark":"light";if(!n){e[r]=Fwe({...t,palette:{mode:o,...t==null?void 0:t.palette}});return}const{palette:i,...a}=ZR({...n,palette:{mode:o,...t==null?void 0:t.palette}});return e[r]={...t,palette:i,opacity:{...AX(o),...t==null?void 0:t.opacity},overlays:(t==null?void 0:t.overlays)||$X(o)},a}function Wwe(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=jwe,colorSchemeSelector:s=n.light&&n.dark?"media":void 0,rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&u!=="light"?"light":u),f=Uwe(i),{[d]:p,light:m,dark:g,...v}=n,w={...v};let x=p;if((d==="dark"&&!("dark"in n)||d==="light"&&!("light"in n))&&(x=!0),!x)throw new Error(Bu(21,d));const S=HA(w,x,c,d);m&&!w.light&&HA(w,m,void 0,"light"),g&&!w.dark&&HA(w,g,void 0,"dark");let P={defaultColorScheme:d,...S,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:w,font:{...Twe(S.typography),...S.font},spacing:Hwe(c.spacing)};Object.keys(P.colorSchemes).forEach(A=>{const I=P.colorSchemes[A].palette,R=N=>{const L=N.split("-"),j=L[1],_=L[2];return f(N,I[j][_])};if(I.mode==="light"&&(Le(I.common,"background","#fff"),Le(I.common,"onBackground","#000")),I.mode==="dark"&&(Le(I.common,"background","#000"),Le(I.common,"onBackground","#fff")),Vwe(I,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),I.mode==="light"){Le(I.Alert,"errorColor",fr(I.error.light,.6)),Le(I.Alert,"infoColor",fr(I.info.light,.6)),Le(I.Alert,"successColor",fr(I.success.light,.6)),Le(I.Alert,"warningColor",fr(I.warning.light,.6)),Le(I.Alert,"errorFilledBg",R("palette-error-main")),Le(I.Alert,"infoFilledBg",R("palette-info-main")),Le(I.Alert,"successFilledBg",R("palette-success-main")),Le(I.Alert,"warningFilledBg",R("palette-warning-main")),Le(I.Alert,"errorFilledColor",hc(()=>I.getContrastText(I.error.main))),Le(I.Alert,"infoFilledColor",hc(()=>I.getContrastText(I.info.main))),Le(I.Alert,"successFilledColor",hc(()=>I.getContrastText(I.success.main))),Le(I.Alert,"warningFilledColor",hc(()=>I.getContrastText(I.warning.main))),Le(I.Alert,"errorStandardBg",pr(I.error.light,.9)),Le(I.Alert,"infoStandardBg",pr(I.info.light,.9)),Le(I.Alert,"successStandardBg",pr(I.success.light,.9)),Le(I.Alert,"warningStandardBg",pr(I.warning.light,.9)),Le(I.Alert,"errorIconColor",R("palette-error-main")),Le(I.Alert,"infoIconColor",R("palette-info-main")),Le(I.Alert,"successIconColor",R("palette-success-main")),Le(I.Alert,"warningIconColor",R("palette-warning-main")),Le(I.AppBar,"defaultBg",R("palette-grey-100")),Le(I.Avatar,"defaultBg",R("palette-grey-400")),Le(I.Button,"inheritContainedBg",R("palette-grey-300")),Le(I.Button,"inheritContainedHoverBg",R("palette-grey-A100")),Le(I.Chip,"defaultBorder",R("palette-grey-400")),Le(I.Chip,"defaultAvatarColor",R("palette-grey-700")),Le(I.Chip,"defaultIconColor",R("palette-grey-700")),Le(I.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),Le(I.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),Le(I.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),Le(I.LinearProgress,"primaryBg",pr(I.primary.main,.62)),Le(I.LinearProgress,"secondaryBg",pr(I.secondary.main,.62)),Le(I.LinearProgress,"errorBg",pr(I.error.main,.62)),Le(I.LinearProgress,"infoBg",pr(I.info.main,.62)),Le(I.LinearProgress,"successBg",pr(I.success.main,.62)),Le(I.LinearProgress,"warningBg",pr(I.warning.main,.62)),Le(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.11)`),Le(I.Slider,"primaryTrack",pr(I.primary.main,.62)),Le(I.Slider,"secondaryTrack",pr(I.secondary.main,.62)),Le(I.Slider,"errorTrack",pr(I.error.main,.62)),Le(I.Slider,"infoTrack",pr(I.info.main,.62)),Le(I.Slider,"successTrack",pr(I.success.main,.62)),Le(I.Slider,"warningTrack",pr(I.warning.main,.62));const N=fC(I.background.default,.8);Le(I.SnackbarContent,"bg",N),Le(I.SnackbarContent,"color",hc(()=>I.getContrastText(N))),Le(I.SpeedDialAction,"fabHoverBg",fC(I.background.paper,.15)),Le(I.StepConnector,"border",R("palette-grey-400")),Le(I.StepContent,"border",R("palette-grey-400")),Le(I.Switch,"defaultColor",R("palette-common-white")),Le(I.Switch,"defaultDisabledColor",R("palette-grey-100")),Le(I.Switch,"primaryDisabledColor",pr(I.primary.main,.62)),Le(I.Switch,"secondaryDisabledColor",pr(I.secondary.main,.62)),Le(I.Switch,"errorDisabledColor",pr(I.error.main,.62)),Le(I.Switch,"infoDisabledColor",pr(I.info.main,.62)),Le(I.Switch,"successDisabledColor",pr(I.success.main,.62)),Le(I.Switch,"warningDisabledColor",pr(I.warning.main,.62)),Le(I.TableCell,"border",pr(dC(I.divider,1),.88)),Le(I.Tooltip,"bg",dC(I.grey[700],.92))}if(I.mode==="dark"){Le(I.Alert,"errorColor",pr(I.error.light,.6)),Le(I.Alert,"infoColor",pr(I.info.light,.6)),Le(I.Alert,"successColor",pr(I.success.light,.6)),Le(I.Alert,"warningColor",pr(I.warning.light,.6)),Le(I.Alert,"errorFilledBg",R("palette-error-dark")),Le(I.Alert,"infoFilledBg",R("palette-info-dark")),Le(I.Alert,"successFilledBg",R("palette-success-dark")),Le(I.Alert,"warningFilledBg",R("palette-warning-dark")),Le(I.Alert,"errorFilledColor",hc(()=>I.getContrastText(I.error.dark))),Le(I.Alert,"infoFilledColor",hc(()=>I.getContrastText(I.info.dark))),Le(I.Alert,"successFilledColor",hc(()=>I.getContrastText(I.success.dark))),Le(I.Alert,"warningFilledColor",hc(()=>I.getContrastText(I.warning.dark))),Le(I.Alert,"errorStandardBg",fr(I.error.light,.9)),Le(I.Alert,"infoStandardBg",fr(I.info.light,.9)),Le(I.Alert,"successStandardBg",fr(I.success.light,.9)),Le(I.Alert,"warningStandardBg",fr(I.warning.light,.9)),Le(I.Alert,"errorIconColor",R("palette-error-main")),Le(I.Alert,"infoIconColor",R("palette-info-main")),Le(I.Alert,"successIconColor",R("palette-success-main")),Le(I.Alert,"warningIconColor",R("palette-warning-main")),Le(I.AppBar,"defaultBg",R("palette-grey-900")),Le(I.AppBar,"darkBg",R("palette-background-paper")),Le(I.AppBar,"darkColor",R("palette-text-primary")),Le(I.Avatar,"defaultBg",R("palette-grey-600")),Le(I.Button,"inheritContainedBg",R("palette-grey-800")),Le(I.Button,"inheritContainedHoverBg",R("palette-grey-700")),Le(I.Chip,"defaultBorder",R("palette-grey-700")),Le(I.Chip,"defaultAvatarColor",R("palette-grey-300")),Le(I.Chip,"defaultIconColor",R("palette-grey-300")),Le(I.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),Le(I.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),Le(I.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),Le(I.LinearProgress,"primaryBg",fr(I.primary.main,.5)),Le(I.LinearProgress,"secondaryBg",fr(I.secondary.main,.5)),Le(I.LinearProgress,"errorBg",fr(I.error.main,.5)),Le(I.LinearProgress,"infoBg",fr(I.info.main,.5)),Le(I.LinearProgress,"successBg",fr(I.success.main,.5)),Le(I.LinearProgress,"warningBg",fr(I.warning.main,.5)),Le(I.Skeleton,"bg",`rgba(${R("palette-text-primaryChannel")} / 0.13)`),Le(I.Slider,"primaryTrack",fr(I.primary.main,.5)),Le(I.Slider,"secondaryTrack",fr(I.secondary.main,.5)),Le(I.Slider,"errorTrack",fr(I.error.main,.5)),Le(I.Slider,"infoTrack",fr(I.info.main,.5)),Le(I.Slider,"successTrack",fr(I.success.main,.5)),Le(I.Slider,"warningTrack",fr(I.warning.main,.5));const N=fC(I.background.default,.98);Le(I.SnackbarContent,"bg",N),Le(I.SnackbarContent,"color",hc(()=>I.getContrastText(N))),Le(I.SpeedDialAction,"fabHoverBg",fC(I.background.paper,.15)),Le(I.StepConnector,"border",R("palette-grey-600")),Le(I.StepContent,"border",R("palette-grey-600")),Le(I.Switch,"defaultColor",R("palette-grey-300")),Le(I.Switch,"defaultDisabledColor",R("palette-grey-600")),Le(I.Switch,"primaryDisabledColor",fr(I.primary.main,.55)),Le(I.Switch,"secondaryDisabledColor",fr(I.secondary.main,.55)),Le(I.Switch,"errorDisabledColor",fr(I.error.main,.55)),Le(I.Switch,"infoDisabledColor",fr(I.info.main,.55)),Le(I.Switch,"successDisabledColor",fr(I.success.main,.55)),Le(I.Switch,"warningDisabledColor",fr(I.warning.main,.55)),Le(I.TableCell,"border",fr(dC(I.divider,1),.68)),Le(I.Tooltip,"bg",dC(I.grey[700],.92))}fu(I.background,"default"),fu(I.background,"paper"),fu(I.common,"background"),fu(I.common,"onBackground"),fu(I,"divider"),Object.keys(I).forEach(N=>{const L=I[N];L&&typeof L=="object"&&(L.main&&Le(I[N],"mainChannel",D0(N0(L.main))),L.light&&Le(I[N],"lightChannel",D0(N0(L.light))),L.dark&&Le(I[N],"darkChannel",D0(N0(L.dark))),L.contrastText&&Le(I[N],"contrastTextChannel",D0(N0(L.contrastText))),N==="text"&&(fu(I[N],"primary"),fu(I[N],"secondary")),N==="action"&&(L.active&&fu(I[N],"active"),L.selected&&fu(I[N],"selected")))})}),P=t.reduce((A,I)=>bo(A,I),P);const T={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:zwe(P)},{vars:E,generateThemeVars:O,generateStyleSheets:k}=V0e(P,T);return P.vars=E,Object.entries(P.colorSchemes[P.defaultColorScheme]).forEach(([A,I])=>{P[A]=I}),P.generateThemeVars=O,P.generateStyleSheets=k,P.generateSpacing=function(){return tX(c.spacing,qO(this))},P.getColorSchemeSelector=H0e(s),P.spacing=P.generateSpacing(),P.shouldSkipGeneratingVar=a,P.unstable_sxConfig={...mS,...c==null?void 0:c.unstable_sxConfig},P.unstable_sx=function(I){return Tf({sx:I,theme:this})},P.toRuntimeSource=MX,P}function c4(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...n!==!0&&n,palette:jL({...n===!0?{}:n.palette,mode:t})})}function wS(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=n?void 0:{light:!0},defaultColorScheme:i=n==null?void 0:n.mode,...a}=e,s=i||"light",l=o==null?void 0:o[s],c={...o,...n?{[s]:{...typeof l!="boolean"&&l,palette:n}}:void 0};if(r===!1){if(!("colorSchemes"in e))return ZR(e,...t);let u=n;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const d=ZR({...e,palette:u},...t);return d.defaultColorScheme=s,d.colorSchemes=c,d.palette.mode==="light"&&(d.colorSchemes.light={...c.light!==!0&&c.light,palette:d.palette},c4(d,"dark",c.dark)),d.palette.mode==="dark"&&(d.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:d.palette},c4(d,"light",c.light)),d}return!n&&!("light"in c)&&s==="light"&&(c.light=!0),Wwe({...a,colorSchemes:c,defaultColorScheme:s,...typeof r!="boolean"&&r},...t)}function Gwe(e){return String(e).match(/[\d.\-+]*\s*(.*)/)[1]||""}function qwe(e){return parseFloat(e)}const pI=wS();function Ei(){const e=gS(pI);return e[Kl]||e}function Zt({props:e,name:t}){return uI({props:e,name:t,defaultTheme:pI,themeId:Kl})}function RX(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const ci=e=>RX(e)&&e!=="classes",oe=lX({themeId:Kl,defaultTheme:pI,rootShouldForwardProp:ci});function u4({theme:e,...t}){const n=Kl in e?e[Kl]:void 0;return $.jsx(PX,{...t,themeId:n?Kl:void 0,theme:n||e})}const pC={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:Kwe,useColorScheme:zRt,getInitColorSchemeScript:VRt}=F0e({themeId:Kl,theme:()=>wS({cssVariables:!0}),colorSchemeStorageKey:pC.colorSchemeStorageKey,modeStorageKey:pC.modeStorageKey,defaultColorScheme:{light:pC.defaultLightColorScheme,dark:pC.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:IX(e.palette,e.typography)};return t.unstable_sx=function(r){return Tf({sx:r,theme:this})},t}}),Ywe=Kwe;function Ff({theme:e,...t}){return typeof e=="function"?$.jsx(u4,{theme:e,...t}):"colorSchemes"in(Kl in e?e[Kl]:e)?$.jsx(Ywe,{theme:e,...t}):$.jsx(u4,{theme:e,...t})}var Dv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},xh=typeof window>"u"||"Deno"in globalThis;function Fs(){}function Xwe(e,t){return typeof e=="function"?e(t):e}function t2(e){return typeof e=="number"&&e>=0&&e!==1/0}function _X(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yg(e,t){return typeof e=="function"?e(t):e}function Bl(e,t){return typeof e=="function"?e(t):e}function d4(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==BL(a,t.options))return!1}else if(!Fw(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||o&&o!==t.state.fetchStatus||i&&!i(t))}function f4(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Sh(t.options.mutationKey)!==Sh(i))return!1}else if(!Fw(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function BL(e,t){return((t==null?void 0:t.queryKeyHashFn)||Sh)(e)}function Sh(e){return JSON.stringify(e,(t,n)=>n2(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Fw(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Fw(e[n],t[n])):!1}function DX(e,t){if(e===t)return e;const n=p4(e)&&p4(t);if(n||n2(e)&&n2(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),a=i.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function r2(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?DX(e,t):t}function Jwe(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Zwe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zL=Symbol();function NX(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===zL?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Zp,Wd,yy,nY,exe=(nY=class extends Dv{constructor(){super();Ft(this,Zp);Ft(this,Wd);Ft(this,yy);vt(this,yy,t=>{if(!xh&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){be(this,Wd)||this.setEventListener(be(this,yy))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,Wd))==null||t.call(this),vt(this,Wd,void 0))}setEventListener(t){var n;vt(this,yy,t),(n=be(this,Wd))==null||n.call(this),vt(this,Wd,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){be(this,Zp)!==t&&(vt(this,Zp,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof be(this,Zp)=="boolean"?be(this,Zp):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Zp=new WeakMap,Wd=new WeakMap,yy=new WeakMap,nY),VL=new exe,vy,Gd,by,rY,txe=(rY=class extends Dv{constructor(){super();Ft(this,vy,!0);Ft(this,Gd);Ft(this,by);vt(this,by,t=>{if(!xh&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){be(this,Gd)||this.setEventListener(be(this,by))}onUnsubscribe(){var t;this.hasListeners()||((t=be(this,Gd))==null||t.call(this),vt(this,Gd,void 0))}setEventListener(t){var n;vt(this,by,t),(n=be(this,Gd))==null||n.call(this),vt(this,Gd,t(this.setOnline.bind(this)))}setOnline(t){be(this,vy)!==t&&(vt(this,vy,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return be(this,vy)}},vy=new WeakMap,Gd=new WeakMap,by=new WeakMap,rY),fT=new txe;function o2(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function nxe(e){return Math.min(1e3*2**e,3e4)}function LX(e){return(e??"online")==="online"?fT.isOnline():!0}var FX=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function UA(e){return e instanceof FX}function jX(e){let t=!1,n=0,r=!1,o;const i=o2(),a=g=>{var v;r||(f(new FX(g)),(v=e.abort)==null||v.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>VL.isFocused()&&(e.networkMode==="always"||fT.isOnline())&&e.canRun(),u=()=>LX(e.networkMode)&&e.canRun(),d=g=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,g),o==null||o(),i.resolve(g))},f=g=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,g),o==null||o(),i.reject(g))},p=()=>new Promise(g=>{var v;o=w=>{(r||c())&&g(w)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),m=()=>{if(r)return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(d).catch(w=>{var E;if(r)return;const x=e.retry??(xh?0:3),S=e.retryDelay??nxe,P=typeof S=="function"?S(n,w):S,T=x===!0||typeof x=="number"&&nc()?void 0:p()).then(()=>{t?f(w):m()})})};return{promise:i,cancel:a,continue:()=>(o==null||o(),i),cancelRetry:s,continueRetry:l,canStart:u,start:()=>(u()?m():p().then(m),i)}}function rxe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},o=s=>setTimeout(s,0);const i=s=>{t?e.push(s):o(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&o(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{i(()=>{s(...l)})},schedule:i,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{o=s}}}var Ao=rxe(),eh,oY,BX=(oY=class{constructor(){Ft(this,eh)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),t2(this.gcTime)&&vt(this,eh,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(xh?1/0:5*60*1e3))}clearGcTimeout(){be(this,eh)&&(clearTimeout(be(this,eh)),vt(this,eh,void 0))}},eh=new WeakMap,oY),wy,xy,Ls,mi,aS,th,Dl,mu,iY,oxe=(iY=class extends BX{constructor(t){super();Ft(this,Dl);Ft(this,wy);Ft(this,xy);Ft(this,Ls);Ft(this,mi);Ft(this,aS);Ft(this,th);vt(this,th,!1),vt(this,aS,t.defaultOptions),this.setOptions(t.options),this.observers=[],vt(this,Ls,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,vt(this,wy,ixe(this.options)),this.state=t.state??be(this,wy),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=be(this,mi))==null?void 0:t.promise}setOptions(t){this.options={...be(this,aS),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&be(this,Ls).remove(this)}setData(t,n){const r=r2(this.state.data,t,this.options);return fn(this,Dl,mu).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){fn(this,Dl,mu).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=be(this,mi))==null?void 0:r.promise;return(o=be(this,mi))==null||o.cancel(t),n?n.then(Fs).catch(Fs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(be(this,wy))}isActive(){return this.observers.some(t=>Bl(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===zL||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!_X(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,mi))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=be(this,mi))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),be(this,Ls).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(be(this,mi)&&(be(this,th)?be(this,mi).cancel({revert:!0}):be(this,mi).cancelRetry()),this.scheduleGc()),be(this,Ls).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||fn(this,Dl,mu).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(be(this,mi))return be(this,mi).continueRetry(),be(this,mi).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(vt(this,th,!0),r.signal)})},i=()=>{const d=NX(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return o(f),vt(this,th,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};o(a),(l=this.options.behavior)==null||l.onFetch(a,this),vt(this,xy,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&fn(this,Dl,mu).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const s=d=>{var f,p,m,g;UA(d)&&d.silent||fn(this,Dl,mu).call(this,{type:"error",error:d}),UA(d)||((p=(f=be(this,Ls).config).onError)==null||p.call(f,d,this),(g=(m=be(this,Ls).config).onSettled)==null||g.call(m,this.state.data,d,this)),this.scheduleGc()};return vt(this,mi,jX({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,p,m,g;if(d===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){s(v);return}(p=(f=be(this,Ls).config).onSuccess)==null||p.call(f,d,this),(g=(m=be(this,Ls).config).onSettled)==null||g.call(m,d,this.state.error,this),this.scheduleGc()},onError:s,onFail:(d,f)=>{fn(this,Dl,mu).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{fn(this,Dl,mu).call(this,{type:"pause"})},onContinue:()=>{fn(this,Dl,mu).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),be(this,mi).start()}},wy=new WeakMap,xy=new WeakMap,Ls=new WeakMap,mi=new WeakMap,aS=new WeakMap,th=new WeakMap,Dl=new WeakSet,mu=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...zX(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return UA(o)&&o.revert&&be(this,xy)?{...be(this,xy),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ao.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),be(this,Ls).notify({query:this,type:"updated",action:t})})},iY);function zX(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:LX(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function ixe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var vc,aY,axe=(aY=class extends Dv{constructor(t={}){super();Ft(this,vc);this.config=t,vt(this,vc,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??BL(o,n);let a=this.get(i);return a||(a=new oxe({cache:this,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(a)),a}add(t){be(this,vc).has(t.queryHash)||(be(this,vc).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=be(this,vc).get(t.queryHash);n&&(t.destroy(),n===t&&be(this,vc).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ao.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return be(this,vc).get(t)}getAll(){return[...be(this,vc).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>d4(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>d4(t,r)):n}notify(t){Ao.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ao.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ao.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},vc=new WeakMap,aY),bc,Di,nh,wc,kd,sY,sxe=(sY=class extends BX{constructor(t){super();Ft(this,wc);Ft(this,bc);Ft(this,Di);Ft(this,nh);this.mutationId=t.mutationId,vt(this,Di,t.mutationCache),vt(this,bc,[]),this.state=t.state||VX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){be(this,bc).includes(t)||(be(this,bc).push(t),this.clearGcTimeout(),be(this,Di).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){vt(this,bc,be(this,bc).filter(n=>n!==t)),this.scheduleGc(),be(this,Di).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){be(this,bc).length||(this.state.status==="pending"?this.scheduleGc():be(this,Di).remove(this))}continue(){var t;return((t=be(this,nh))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,a,s,l,c,u,d,f,p,m,g,v,w,x,S,P,T,E,O;vt(this,nh,jX({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(k,A)=>{fn(this,wc,kd).call(this,{type:"failed",failureCount:k,error:A})},onPause:()=>{fn(this,wc,kd).call(this,{type:"pause"})},onContinue:()=>{fn(this,wc,kd).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>be(this,Di).canRun(this)}));const n=this.state.status==="pending",r=!be(this,nh).canStart();try{if(!n){fn(this,wc,kd).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=be(this,Di).config).onMutate)==null?void 0:i.call(o,t,this));const A=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));A!==this.state.context&&fn(this,wc,kd).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const k=await be(this,nh).start();return await((c=(l=be(this,Di).config).onSuccess)==null?void 0:c.call(l,k,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,k,t,this.state.context)),await((p=(f=be(this,Di).config).onSettled)==null?void 0:p.call(f,k,null,this.state.variables,this.state.context,this)),await((g=(m=this.options).onSettled)==null?void 0:g.call(m,k,null,t,this.state.context)),fn(this,wc,kd).call(this,{type:"success",data:k}),k}catch(k){try{throw await((w=(v=be(this,Di).config).onError)==null?void 0:w.call(v,k,t,this.state.context,this)),await((S=(x=this.options).onError)==null?void 0:S.call(x,k,t,this.state.context)),await((T=(P=be(this,Di).config).onSettled)==null?void 0:T.call(P,void 0,k,this.state.variables,this.state.context,this)),await((O=(E=this.options).onSettled)==null?void 0:O.call(E,void 0,k,t,this.state.context)),k}finally{fn(this,wc,kd).call(this,{type:"error",error:k})}}finally{be(this,Di).runNext(this)}}},bc=new WeakMap,Di=new WeakMap,nh=new WeakMap,wc=new WeakSet,kd=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ao.batch(()=>{be(this,bc).forEach(r=>{r.onMutationUpdate(t)}),be(this,Di).notify({mutation:this,type:"updated",action:t})})},sY);function VX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var La,sS,lY,lxe=(lY=class extends Dv{constructor(t={}){super();Ft(this,La);Ft(this,sS);this.config=t,vt(this,La,new Map),vt(this,sS,Date.now())}build(t,n,r){const o=new sxe({mutationCache:this,mutationId:++lC(this,sS)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){const n=hC(t),r=be(this,La).get(n)??[];r.push(t),be(this,La).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=hC(t);if(be(this,La).has(n)){const o=(r=be(this,La).get(n))==null?void 0:r.filter(i=>i!==t);o&&(o.length===0?be(this,La).delete(n):be(this,La).set(n,o))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=be(this,La).get(hC(t)))==null?void 0:r.find(o=>o.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=be(this,La).get(hC(t)))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Ao.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...be(this,La).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>f4(n,r))}findAll(t={}){return this.getAll().filter(n=>f4(t,n))}notify(t){Ao.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Ao.batch(()=>Promise.all(t.map(n=>n.continue().catch(Fs))))}},La=new WeakMap,sS=new WeakMap,lY);function hC(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function m4(e){return{onFetch:(t,n)=>{var u,d,f,p,m;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((p=t.state.data)==null?void 0:p.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const v=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},w=NX(t.options,t.fetchOptions),x=async(S,P,T)=>{if(g)return Promise.reject();if(P==null&&S.pages.length)return Promise.resolve(S);const E={queryKey:t.queryKey,pageParam:P,direction:T?"backward":"forward",meta:t.options.meta};v(E);const O=await w(E),{maxPages:k}=t.options,A=T?Zwe:Jwe;return{pages:A(S.pages,O,k),pageParams:A(S.pageParams,P,k)}};if(o&&i.length){const S=o==="backward",P=S?cxe:g4,T={pages:i,pageParams:a},E=P(r,T);s=await x(T,E,S)}else{const S=e??i.length;do{const P=l===0?a[0]??r.initialPageParam:g4(r,s);if(l>0&&P==null)break;s=await x(s,P),l++}while(l{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function g4(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function cxe(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Zr,qd,Kd,Sy,Cy,Yd,Py,Ty,cY,uxe=(cY=class{constructor(e={}){Ft(this,Zr);Ft(this,qd);Ft(this,Kd);Ft(this,Sy);Ft(this,Cy);Ft(this,Yd);Ft(this,Py);Ft(this,Ty);vt(this,Zr,e.queryCache||new axe),vt(this,qd,e.mutationCache||new lxe),vt(this,Kd,e.defaultOptions||{}),vt(this,Sy,new Map),vt(this,Cy,new Map),vt(this,Yd,0)}mount(){lC(this,Yd)._++,be(this,Yd)===1&&(vt(this,Py,VL.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,Zr).onFocus())})),vt(this,Ty,fT.subscribe(async e=>{e&&(await this.resumePausedMutations(),be(this,Zr).onOnline())})))}unmount(){var e,t;lC(this,Yd)._--,be(this,Yd)===0&&((e=be(this,Py))==null||e.call(this),vt(this,Py,void 0),(t=be(this,Ty))==null||t.call(this),vt(this,Ty,void 0))}isFetching(e){return be(this,Zr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return be(this,qd).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,Zr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=be(this,Zr).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Yg(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return be(this,Zr).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=be(this,Zr).get(r.queryHash),i=o==null?void 0:o.state.data,a=Xwe(t,i);if(a!==void 0)return be(this,Zr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ao.batch(()=>be(this,Zr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=be(this,Zr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=be(this,Zr);Ao.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=be(this,Zr),r={type:"active",...e};return Ao.batch(()=>(n.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ao.batch(()=>be(this,Zr).findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(Fs).catch(Fs)}invalidateQueries(e={},t={}){return Ao.batch(()=>{if(be(this,Zr).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ao.batch(()=>be(this,Zr).findAll(e).filter(o=>!o.isDisabled()).map(o=>{let i=o.fetch(void 0,n);return n.throwOnError||(i=i.catch(Fs)),o.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Fs)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=be(this,Zr).build(this,t);return n.isStaleByTime(Yg(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Fs).catch(Fs)}fetchInfiniteQuery(e){return e.behavior=m4(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Fs).catch(Fs)}ensureInfiniteQueryData(e){return e.behavior=m4(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fT.isOnline()?be(this,qd).resumePausedMutations():Promise.resolve()}getQueryCache(){return be(this,Zr)}getMutationCache(){return be(this,qd)}getDefaultOptions(){return be(this,Kd)}setDefaultOptions(e){vt(this,Kd,e)}setQueryDefaults(e,t){be(this,Sy).set(Sh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...be(this,Sy).values()];let n={};return t.forEach(r=>{Fw(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){be(this,Cy).set(Sh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...be(this,Cy).values()];let n={};return t.forEach(r=>{Fw(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...be(this,Kd).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=BL(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===zL&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...be(this,Kd).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){be(this,Zr).clear(),be(this,qd).clear()}},Zr=new WeakMap,qd=new WeakMap,Kd=new WeakMap,Sy=new WeakMap,Cy=new WeakMap,Yd=new WeakMap,Py=new WeakMap,Ty=new WeakMap,cY),sa,An,lS,Ni,rh,Ey,Xd,xc,cS,Oy,Iy,oh,ih,Qd,ky,tr,L0,i2,a2,s2,l2,c2,u2,d2,HX,uY,dxe=(uY=class extends Dv{constructor(t,n){super();Ft(this,tr);Ft(this,sa);Ft(this,An);Ft(this,lS);Ft(this,Ni);Ft(this,rh);Ft(this,Ey);Ft(this,Xd);Ft(this,xc);Ft(this,cS);Ft(this,Oy);Ft(this,Iy);Ft(this,oh);Ft(this,ih);Ft(this,Qd);Ft(this,ky,new Set);this.options=n,vt(this,sa,t),vt(this,xc,null),vt(this,Xd,o2()),this.options.experimental_prefetchInRender||be(this,Xd).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(be(this,An).addObserver(this),y4(be(this,An),this.options)?fn(this,tr,L0).call(this):this.updateResult(),fn(this,tr,l2).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return f2(be(this,An),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f2(be(this,An),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,fn(this,tr,c2).call(this),fn(this,tr,u2).call(this),be(this,An).removeObserver(this)}setOptions(t,n){const r=this.options,o=be(this,An);if(this.options=be(this,sa).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Bl(this.options.enabled,be(this,An))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");fn(this,tr,d2).call(this),be(this,An).setOptions(this.options),r._defaulted&&!dT(this.options,r)&&be(this,sa).getQueryCache().notify({type:"observerOptionsUpdated",query:be(this,An),observer:this});const i=this.hasListeners();i&&v4(be(this,An),o,this.options,r)&&fn(this,tr,L0).call(this),this.updateResult(n),i&&(be(this,An)!==o||Bl(this.options.enabled,be(this,An))!==Bl(r.enabled,be(this,An))||Yg(this.options.staleTime,be(this,An))!==Yg(r.staleTime,be(this,An)))&&fn(this,tr,i2).call(this);const a=fn(this,tr,a2).call(this);i&&(be(this,An)!==o||Bl(this.options.enabled,be(this,An))!==Bl(r.enabled,be(this,An))||a!==be(this,Qd))&&fn(this,tr,s2).call(this,a)}getOptimisticResult(t){const n=be(this,sa).getQueryCache().build(be(this,sa),t),r=this.createResult(n,t);return pxe(this,r)&&(vt(this,Ni,r),vt(this,Ey,this.options),vt(this,rh,be(this,An).state)),r}getCurrentResult(){return be(this,Ni)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){be(this,ky).add(t)}getCurrentQuery(){return be(this,An)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=be(this,sa).defaultQueryOptions(t),r=be(this,sa).getQueryCache().build(be(this,sa),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return fn(this,tr,L0).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),be(this,Ni)))}createResult(t,n){var k;const r=be(this,An),o=this.options,i=be(this,Ni),a=be(this,rh),s=be(this,Ey),c=t!==r?t.state:be(this,lS),{state:u}=t;let d={...u},f=!1,p;if(n._optimisticResults){const A=this.hasListeners(),I=!A&&y4(t,n),R=A&&v4(t,r,n,o);(I||R)&&(d={...d,...zX(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(a==null?void 0:a.data)&&n.select===be(this,cS))p=be(this,Oy);else try{vt(this,cS,n.select),p=n.select(d.data),p=r2(i==null?void 0:i.data,p,n),vt(this,Oy,p),vt(this,xc,null)}catch(A){vt(this,xc,A)}else p=d.data;if(n.placeholderData!==void 0&&p===void 0&&v==="pending"){let A;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=i.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((k=be(this,Iy))==null?void 0:k.state.data,be(this,Iy)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),vt(this,xc,null)}catch(I){vt(this,xc,I)}A!==void 0&&(v="success",p=r2(i==null?void 0:i.data,A,n),f=!0)}be(this,xc)&&(m=be(this,xc),p=be(this,Oy),g=Date.now(),v="error");const w=d.fetchStatus==="fetching",x=v==="pending",S=v==="error",P=x&&w,T=p!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:x,isSuccess:v==="success",isError:S,isInitialLoading:P,isLoading:P,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:S&&!T,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:S&&T,isStale:HL(t,n),refetch:this.refetch,promise:be(this,Xd)};if(this.options.experimental_prefetchInRender){const A=N=>{O.status==="error"?N.reject(O.error):O.data!==void 0&&N.resolve(O.data)},I=()=>{const N=vt(this,Xd,O.promise=o2());A(N)},R=be(this,Xd);switch(R.status){case"pending":t.queryHash===r.queryHash&&A(R);break;case"fulfilled":(O.status==="error"||O.data!==R.value)&&I();break;case"rejected":(O.status!=="error"||O.error!==R.reason)&&I();break}}return O}updateResult(t){const n=be(this,Ni),r=this.createResult(be(this,An),this.options);if(vt(this,rh,be(this,An).state),vt(this,Ey,this.options),be(this,rh).data!==void 0&&vt(this,Iy,be(this,An)),dT(r,n))return;vt(this,Ni,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!be(this,ky).size)return!0;const l=new Set(s??be(this,ky));return this.options.throwOnError&&l.add("error"),Object.keys(be(this,Ni)).some(c=>{const u=c;return be(this,Ni)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),fn(this,tr,HX).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&fn(this,tr,l2).call(this)}},sa=new WeakMap,An=new WeakMap,lS=new WeakMap,Ni=new WeakMap,rh=new WeakMap,Ey=new WeakMap,Xd=new WeakMap,xc=new WeakMap,cS=new WeakMap,Oy=new WeakMap,Iy=new WeakMap,oh=new WeakMap,ih=new WeakMap,Qd=new WeakMap,ky=new WeakMap,tr=new WeakSet,L0=function(t){fn(this,tr,d2).call(this);let n=be(this,An).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Fs)),n},i2=function(){fn(this,tr,c2).call(this);const t=Yg(this.options.staleTime,be(this,An));if(xh||be(this,Ni).isStale||!t2(t))return;const r=_X(be(this,Ni).dataUpdatedAt,t)+1;vt(this,oh,setTimeout(()=>{be(this,Ni).isStale||this.updateResult()},r))},a2=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(be(this,An)):this.options.refetchInterval)??!1},s2=function(t){fn(this,tr,u2).call(this),vt(this,Qd,t),!(xh||Bl(this.options.enabled,be(this,An))===!1||!t2(be(this,Qd))||be(this,Qd)===0)&&vt(this,ih,setInterval(()=>{(this.options.refetchIntervalInBackground||VL.isFocused())&&fn(this,tr,L0).call(this)},be(this,Qd)))},l2=function(){fn(this,tr,i2).call(this),fn(this,tr,s2).call(this,fn(this,tr,a2).call(this))},c2=function(){be(this,oh)&&(clearTimeout(be(this,oh)),vt(this,oh,void 0))},u2=function(){be(this,ih)&&(clearInterval(be(this,ih)),vt(this,ih,void 0))},d2=function(){const t=be(this,sa).getQueryCache().build(be(this,sa),this.options);if(t===be(this,An))return;const n=be(this,An);vt(this,An,t),vt(this,lS,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},HX=function(t){Ao.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(be(this,Ni))}),be(this,sa).getQueryCache().notify({query:be(this,An),type:"observerResultsUpdated"})})},uY);function fxe(e,t){return Bl(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function y4(e,t){return fxe(e,t)||e.state.data!==void 0&&f2(e,t,t.refetchOnMount)}function f2(e,t,n){if(Bl(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&HL(e,t)}return!1}function v4(e,t,n,r){return(e!==t||Bl(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&HL(e,n)}function HL(e,t){return Bl(t.enabled,e)!==!1&&e.isStaleByTime(Yg(t.staleTime,e))}function pxe(e,t){return!dT(e.getCurrentResult(),t)}var Jd,Zd,la,Cu,ju,IP,p2,dY,hxe=(dY=class extends Dv{constructor(n,r){super();Ft(this,ju);Ft(this,Jd);Ft(this,Zd);Ft(this,la);Ft(this,Cu);vt(this,Jd,n),this.setOptions(r),this.bindMethods(),fn(this,ju,IP).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var o;const r=this.options;this.options=be(this,Jd).defaultMutationOptions(n),dT(this.options,r)||be(this,Jd).getMutationCache().notify({type:"observerOptionsUpdated",mutation:be(this,la),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Sh(r.mutationKey)!==Sh(this.options.mutationKey)?this.reset():((o=be(this,la))==null?void 0:o.state.status)==="pending"&&be(this,la).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=be(this,la))==null||n.removeObserver(this)}onMutationUpdate(n){fn(this,ju,IP).call(this),fn(this,ju,p2).call(this,n)}getCurrentResult(){return be(this,Zd)}reset(){var n;(n=be(this,la))==null||n.removeObserver(this),vt(this,la,void 0),fn(this,ju,IP).call(this),fn(this,ju,p2).call(this)}mutate(n,r){var o;return vt(this,Cu,r),(o=be(this,la))==null||o.removeObserver(this),vt(this,la,be(this,Jd).getMutationCache().build(be(this,Jd),this.options)),be(this,la).addObserver(this),be(this,la).execute(n)}},Jd=new WeakMap,Zd=new WeakMap,la=new WeakMap,Cu=new WeakMap,ju=new WeakSet,IP=function(){var r;const n=((r=be(this,la))==null?void 0:r.state)??VX();vt(this,Zd,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},p2=function(n){Ao.batch(()=>{var r,o,i,a,s,l,c,u;if(be(this,Cu)&&this.hasListeners()){const d=be(this,Zd).variables,f=be(this,Zd).context;(n==null?void 0:n.type)==="success"?((o=(r=be(this,Cu)).onSuccess)==null||o.call(r,n.data,d,f),(a=(i=be(this,Cu)).onSettled)==null||a.call(i,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(s=be(this,Cu)).onError)==null||l.call(s,n.error,d,f),(u=(c=be(this,Cu)).onSettled)==null||u.call(c,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(be(this,Zd))})})},dY),UX=y.createContext(void 0),qr=e=>{const t=y.useContext(UX);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Hh=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),$.jsx(UX.Provider,{value:e,children:t})),WX=y.createContext(!1),mxe=()=>y.useContext(WX);WX.Provider;function gxe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var yxe=y.createContext(gxe()),vxe=()=>y.useContext(yxe);function GX(e,t){return typeof e=="function"?e(...t):!!e}function qX(){}var bxe=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},wxe=e=>{y.useEffect(()=>{e.clearReset()},[e])},xxe=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&GX(n,[e.error,r]),Sxe=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Cxe=(e,t)=>e.isLoading&&e.isFetching&&!t,Pxe=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,b4=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Txe(e,t,n){var u,d,f,p,m;const r=qr(),o=mxe(),i=vxe(),a=r.defaultQueryOptions(e);(d=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||d.call(u,a),a._optimisticResults=o?"isRestoring":"optimistic",Sxe(a),bxe(a,i),wxe(i);const s=!r.getQueryCache().get(a.queryHash),[l]=y.useState(()=>new t(r,a)),c=l.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(g=>{const v=o?()=>{}:l.subscribe(Ao.batchCalls(g));return l.updateResult(),v},[l,o]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),y.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),Pxe(a,c))throw b4(a,l,i);if(xxe({result:c,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw c.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,a,c),a.experimental_prefetchInRender&&!xh&&Cxe(c,o)){const g=s?b4(a,l,i):(m=r.getQueryCache().get(a.queryHash))==null?void 0:m.promise;g==null||g.catch(qX).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?c:l.trackResult(c)}function Co(e,t){return Txe(e,dxe)}function co(e,t){const n=qr(),[r]=y.useState(()=>new hxe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const o=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ao.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=y.useCallback((a,s)=>{r.mutate(a,s).catch(qX)},[r]);if(o.error&&GX(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:i,mutateAsync:o.mutate}}var Exe=function(){return null};function Oxe(e){return $.jsx(Jbe,{...e,defaultTheme:pI,themeId:Kl})}function Ixe(e){return function(n){return $.jsx(Oxe,{styles:typeof e=="function"?r=>e({theme:r,...n}):e})}}function kxe(){return ZO}const Ze=$0e;function it(e){return A0e(e)}function Mxe(e){return tt("MuiSvgIcon",e)}ot("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const Axe=e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root",t!=="inherit"&&`color${Ce(t)}`,`fontSize${Ce(n)}`]};return rt(o,Mxe,r)},$xe=oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Ce(n.color)}`],t[`fontSize${Ce(n.fontSize)}`]]}})(Ze(({theme:e})=>{var t,n,r,o,i,a,s,l,c,u,d,f,p,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:(o=(t=e.transitions)==null?void 0:t.create)==null?void 0:o.call(t,"fill",{duration:(r=(n=(e.vars??e).transitions)==null?void 0:n.duration)==null?void 0:r.shorter}),variants:[{props:g=>!g.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:((a=(i=e.typography)==null?void 0:i.pxToRem)==null?void 0:a.call(i,20))||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:((l=(s=e.typography)==null?void 0:s.pxToRem)==null?void 0:l.call(s,24))||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:((u=(c=e.typography)==null?void 0:c.pxToRem)==null?void 0:u.call(c,35))||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,g])=>g&&g.main).map(([g])=>{var v,w;return{props:{color:g},style:{color:(w=(v=(e.vars??e).palette)==null?void 0:v[g])==null?void 0:w.main}}}),{props:{color:"action"},style:{color:(f=(d=(e.vars??e).palette)==null?void 0:d.action)==null?void 0:f.active}},{props:{color:"disabled"},style:{color:(m=(p=(e.vars??e).palette)==null?void 0:p.action)==null?void 0:m.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}})),jw=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,m=y.isValidElement(o)&&o.type==="svg",g={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:m},v={};u||(v.viewBox=f);const w=Axe(g);return $.jsxs($xe,{as:s,className:de(w.root,i),focusable:"false",color:c,"aria-hidden":d?void 0:!0,role:d?"img":void 0,ref:n,...v,...p,...m&&o.props,ownerState:g,children:[m?o.props.children:o,d?$.jsx("title",{children:d}):null]})});jw&&(jw.muiName="SvgIcon");function lt(e,t){function n(r,o){return $.jsx(jw,{"data-testid":`${t}Icon`,ref:o,...r,children:e})}return n.muiName=jw.muiName,y.memo(y.forwardRef(n))}function hI(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function h2(e,t){return h2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},h2(e,t)}function xS(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,h2(e,t)}function Rxe(e,t){return e.classList?!!t&&e.classList.contains(t):(" "+(e.className.baseVal||e.className)+" ").indexOf(" "+t+" ")!==-1}function _xe(e,t){e.classList?e.classList.add(t):Rxe(e,t)||(typeof e.className=="string"?e.className=e.className+" "+t:e.setAttribute("class",(e.className&&e.className.baseVal||"")+" "+t))}function w4(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Dxe(e,t){e.classList?e.classList.remove(t):typeof e.className=="string"?e.className=w4(e.className,t):e.setAttribute("class",w4(e.className&&e.className.baseVal||"",t))}var KX={exports:{}},ds={},YX={exports:{}},XX={};/** * @license React * scheduler.production.min.js * @@ -78,7 +78,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(F,H){var U=F.length;F.push(H);e:for(;0>>1,Y=F[q];if(0>>1;qo(K,U))teo(pe,K)?(F[q]=pe,F[te]=U,q=te):(F[q]=K,F[Z]=U,q=Z);else if(teo(pe,U))F[q]=pe,F[te]=U,q=te;else break e}}return H}function o(F,H){var U=F.sortIndex-H.sortIndex;return U!==0?U:F.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,h=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(F){for(var H=n(c);H!==null;){if(H.callback===null)r(c);else if(H.startTime<=F)r(c),H.sortIndex=H.expirationTime,t(l,H);else break;H=n(c)}}function P(F){if(g=!1,S(F),!m)if(n(l)!==null)m=!0,D(T);else{var H=n(c);H!==null&&z(P,H.startTime-F)}}function T(F,H){m=!1,g&&(g=!1,w(k),k=-1),h=!0;var U=f;try{for(S(H),d=n(l);d!==null&&(!(d.expirationTime>H)||F&&!R());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var Y=q(d.expirationTime<=H);H=e.unstable_now(),typeof Y=="function"?d.callback=Y:d===n(l)&&r(l),S(H)}else r(l);d=n(l)}if(d!==null)var ae=!0;else{var Z=n(c);Z!==null&&z(P,Z.startTime-H),ae=!1}return ae}finally{d=null,f=U,h=!1}}var E=!1,O=null,k=-1,A=5,I=-1;function R(){return!(e.unstable_now()-IF||125q?(F.sortIndex=U,t(c,F),n(l)===null&&F===n(c)&&(g?(w(k),k=-1):g=!0,z(P,U-q))):(F.sortIndex=Y,t(l,F),m||h||(m=!0,D(T))),F},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(F){var H=f;return function(){var U=f;f=H;try{return F.apply(this,arguments)}finally{f=U}}}})(jX);FX.exports=jX;var wxe=FX.exports;/** + */(function(e){function t(F,H){var U=F.length;F.push(H);e:for(;0>>1,X=F[q];if(0>>1;qo(K,U))teo(pe,K)?(F[q]=pe,F[te]=U,q=te):(F[q]=K,F[Z]=U,q=Z);else if(teo(pe,U))F[q]=pe,F[te]=U,q=te;else break e}}return H}function o(F,H){var U=F.sortIndex-H.sortIndex;return U!==0?U:F.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,m=!1,g=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(F){for(var H=n(c);H!==null;){if(H.callback===null)r(c);else if(H.startTime<=F)r(c),H.sortIndex=H.expirationTime,t(l,H);else break;H=n(c)}}function P(F){if(g=!1,S(F),!m)if(n(l)!==null)m=!0,D(T);else{var H=n(c);H!==null&&z(P,H.startTime-F)}}function T(F,H){m=!1,g&&(g=!1,w(k),k=-1),p=!0;var U=f;try{for(S(H),d=n(l);d!==null&&(!(d.expirationTime>H)||F&&!R());){var q=d.callback;if(typeof q=="function"){d.callback=null,f=d.priorityLevel;var X=q(d.expirationTime<=H);H=e.unstable_now(),typeof X=="function"?d.callback=X:d===n(l)&&r(l),S(H)}else r(l);d=n(l)}if(d!==null)var ae=!0;else{var Z=n(c);Z!==null&&z(P,Z.startTime-H),ae=!1}return ae}finally{d=null,f=U,p=!1}}var E=!1,O=null,k=-1,A=5,I=-1;function R(){return!(e.unstable_now()-IF||125q?(F.sortIndex=U,t(c,F),n(l)===null&&F===n(c)&&(g?(w(k),k=-1):g=!0,z(P,U-q))):(F.sortIndex=X,t(l,F),m||p||(m=!0,D(T))),F},e.unstable_shouldYield=R,e.unstable_wrapCallback=function(F){var H=f;return function(){var U=f;f=H;try{return F.apply(this,arguments)}finally{f=U}}}})(XX);YX.exports=XX;var Nxe=YX.exports;/** * @license React * react-dom.production.min.js * @@ -86,14 +86,14 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xxe=y,os=wxe;function at(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),i2=Object.prototype.hasOwnProperty,Sxe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f4={},p4={};function Cxe(e){return i2.call(p4,e)?!0:i2.call(f4,e)?!1:Sxe.test(e)?p4[e]=!0:(f4[e]=!0,!1)}function Pxe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Txe(e,t,n,r){if(t===null||typeof t>"u"||Pxe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ea(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var si={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){si[e]=new ea(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];si[t]=new ea(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){si[e]=new ea(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){si[e]=new ea(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){si[e]=new ea(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){si[e]=new ea(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){si[e]=new ea(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){si[e]=new ea(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){si[e]=new ea(e,5,!1,e.toLowerCase(),null,!1,!1)});var RL=/[\-:]([a-z])/g;function _L(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(RL,_L);si[t]=new ea(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(RL,_L);si[t]=new ea(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(RL,_L);si[t]=new ea(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){si[e]=new ea(e,1,!1,e.toLowerCase(),null,!1,!1)});si.xlinkHref=new ea("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){si[e]=new ea(e,1,!1,e.toLowerCase(),null,!0,!0)});function DL(e,t,n,r){var o=si.hasOwnProperty(t)?si[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m2=Object.prototype.hasOwnProperty,Fxe=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,x4={},S4={};function jxe(e){return m2.call(S4,e)?!0:m2.call(x4,e)?!1:Fxe.test(e)?S4[e]=!0:(x4[e]=!0,!1)}function Bxe(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function zxe(e,t,n,r){if(t===null||typeof t>"u"||Bxe(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function ea(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var si={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){si[e]=new ea(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];si[t]=new ea(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){si[e]=new ea(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){si[e]=new ea(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){si[e]=new ea(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){si[e]=new ea(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){si[e]=new ea(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){si[e]=new ea(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){si[e]=new ea(e,5,!1,e.toLowerCase(),null,!1,!1)});var UL=/[\-:]([a-z])/g;function WL(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(UL,WL);si[t]=new ea(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(UL,WL);si[t]=new ea(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(UL,WL);si[t]=new ea(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){si[e]=new ea(e,1,!1,e.toLowerCase(),null,!1,!1)});si.xlinkHref=new ea("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){si[e]=new ea(e,1,!1,e.toLowerCase(),null,!0,!0)});function GL(e,t,n,r){var o=si.hasOwnProperty(t)?si[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=` -`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{NA=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?k0(e):""}function Exe(e){switch(e.tag){case 5:return k0(e.type);case 16:return k0("Lazy");case 13:return k0("Suspense");case 19:return k0("SuspenseList");case 0:case 2:case 15:return e=LA(e.type,!1),e;case 11:return e=LA(e.type.render,!1),e;case 1:return e=LA(e.type,!0),e;default:return""}}function c2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case fg:return"Fragment";case dg:return"Portal";case a2:return"Profiler";case NL:return"StrictMode";case s2:return"Suspense";case l2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case VX:return(e.displayName||"Context")+".Consumer";case zX:return(e._context.displayName||"Context")+".Provider";case LL:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case FL:return t=e.displayName||null,t!==null?t:c2(e.type)||"Memo";case $d:t=e._payload,e=e._init;try{return c2(e(t))}catch{}}return null}function Oxe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return c2(t);case 8:return t===NL?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Sf(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UX(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ixe(e){var t=UX(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function aC(e){e._valueTracker||(e._valueTracker=Ixe(e))}function WX(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=UX(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function tT(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function u2(e,t){var n=t.checked;return Wr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function m4(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Sf(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function GX(e,t){t=t.checked,t!=null&&DL(e,"checked",t,!1)}function d2(e,t){GX(e,t);var n=Sf(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?f2(e,t.type,n):t.hasOwnProperty("defaultValue")&&f2(e,t.type,Sf(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function g4(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function f2(e,t,n){(t!=="number"||tT(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var M0=Array.isArray;function zg(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=sC.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function $w(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var q0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kxe=["Webkit","ms","Moz","O"];Object.keys(q0).forEach(function(e){kxe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),q0[t]=q0[e]})});function XX(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||q0.hasOwnProperty(e)&&q0[e]?(""+t).trim():t+"px"}function QX(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=XX(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Mxe=Wr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function m2(e,t){if(t){if(Mxe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(at(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(at(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(at(61))}if(t.style!=null&&typeof t.style!="object")throw Error(at(62))}}function g2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var y2=null;function jL(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var v2=null,Vg=null,Hg=null;function b4(e){if(e=gS(e)){if(typeof v2!="function")throw Error(at(280));var t=e.stateNode;t&&(t=sI(t),v2(e.stateNode,e.type,t))}}function JX(e){Vg?Hg?Hg.push(e):Hg=[e]:Vg=e}function ZX(){if(Vg){var e=Vg,t=Hg;if(Hg=Vg=null,b4(e),t)for(e=0;e>>=0,e===0?32:31-(zxe(e)/Vxe|0)|0}var lC=64,cC=4194304;function A0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function iT(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=A0(s):(i&=a,i!==0&&(r=A0(i)))}else a=n&~o,a!==0?r=A0(a):i!==0&&(r=A0(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function hS(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Wl(t),e[t]=n}function Gxe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Y0),I4=" ",k4=!1;function bQ(e,t){switch(e){case"keyup":return wSe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wQ(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pg=!1;function SSe(e,t){switch(e){case"compositionend":return wQ(t);case"keypress":return t.which!==32?null:(k4=!0,I4);case"textInput":return e=t.data,e===I4&&k4?null:e;default:return null}}function CSe(e,t){if(pg)return e==="compositionend"||!qL&&bQ(e,t)?(e=yQ(),bP=UL=ef=null,pg=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=R4(n)}}function PQ(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?PQ(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function TQ(){for(var e=window,t=tT();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=tT(e.document)}return t}function KL(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $Se(e){var t=TQ(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&PQ(n.ownerDocument.documentElement,n)){if(r!==null&&KL(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=_4(n,i);var a=_4(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,hg=null,P2=null,Q0=null,T2=!1;function D4(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;T2||hg==null||hg!==tT(r)||(r=hg,"selectionStart"in r&&KL(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Q0&&Fw(Q0,r)||(Q0=r,r=lT(P2,"onSelect"),0yg||(e.current=A2[yg],A2[yg]=null,yg--)}function xr(e,t){yg++,A2[yg]=e.current,e.current=t}var Cf={},Pi=Df(Cf),ga=Df(!1),hh=Cf;function Py(e,t){var n=e.type.contextTypes;if(!n)return Cf;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ya(e){return e=e.childContextTypes,e!=null}function uT(){Mr(ga),Mr(Pi)}function V4(e,t,n){if(Pi.current!==Cf)throw Error(at(168));xr(Pi,t),xr(ga,n)}function _Q(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(at(108,Oxe(e)||"Unknown",o));return Wr({},n,r)}function dT(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Cf,hh=Pi.current,xr(Pi,e),xr(ga,ga.current),!0}function H4(e,t,n){var r=e.stateNode;if(!r)throw Error(at(169));n?(e=_Q(e,t,hh),r.__reactInternalMemoizedMergedChildContext=e,Mr(ga),Mr(Pi),xr(Pi,e)):Mr(ga),xr(ga,n)}var vu=null,lI=!1,QA=!1;function DQ(e){vu===null?vu=[e]:vu.push(e)}function USe(e){lI=!0,DQ(e)}function Nf(){if(!QA&&vu!==null){QA=!0;var e=0,t=or;try{var n=vu;for(or=1;e>=a,o-=a,Su=1<<32-Wl(t)+o|n<k?(A=O,O=null):A=O.sibling;var I=f(w,O,S[k],P);if(I===null){O===null&&(O=A);break}e&&O&&I.alternate===null&&t(w,O),x=i(I,x,k),E===null?T=I:E.sibling=I,E=I,O=A}if(k===S.length)return n(w,O),Dr&&Cp(w,k),T;if(O===null){for(;kk?(A=O,O=null):A=O.sibling;var R=f(w,O,I.value,P);if(R===null){O===null&&(O=A);break}e&&O&&R.alternate===null&&t(w,O),x=i(R,x,k),E===null?T=R:E.sibling=R,E=R,O=A}if(I.done)return n(w,O),Dr&&Cp(w,k),T;if(O===null){for(;!I.done;k++,I=S.next())I=d(w,I.value,P),I!==null&&(x=i(I,x,k),E===null?T=I:E.sibling=I,E=I);return Dr&&Cp(w,k),T}for(O=r(w,O);!I.done;k++,I=S.next())I=h(O,w,k,I.value,P),I!==null&&(e&&I.alternate!==null&&O.delete(I.key===null?k:I.key),x=i(I,x,k),E===null?T=I:E.sibling=I,E=I);return e&&O.forEach(function(N){return t(w,N)}),Dr&&Cp(w,k),T}function v(w,x,S,P){if(typeof S=="object"&&S!==null&&S.type===fg&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case iC:e:{for(var T=S.key,E=x;E!==null;){if(E.key===T){if(T=S.type,T===fg){if(E.tag===7){n(w,E.sibling),x=o(E,S.props.children),x.return=w,w=x;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===$d&&G4(T)===E.type){n(w,E.sibling),x=o(E,S.props),x.ref=Gb(w,E,S),x.return=w,w=x;break e}n(w,E);break}else t(w,E);E=E.sibling}S.type===fg?(x=Jp(S.props.children,w.mode,P,S.key),x.return=w,w=x):(P=OP(S.type,S.key,S.props,null,w.mode,P),P.ref=Gb(w,x,S),P.return=w,w=P)}return a(w);case dg:e:{for(E=S.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=o(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=i$(S,w.mode,P),x.return=w,w=x}return a(w);case $d:return E=S._init,v(w,x,E(S._payload),P)}if(M0(S))return m(w,x,S,P);if(zb(S))return g(w,x,S,P);gC(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=o(x,S),x.return=w,w=x):(n(w,x),x=o$(S,w.mode,P),x.return=w,w=x),a(w)):n(w,x)}return v}var Ey=jQ(!0),BQ=jQ(!1),hT=Df(null),mT=null,wg=null,JL=null;function ZL(){JL=wg=mT=null}function eF(e){var t=hT.current;Mr(hT),e._currentValue=t}function _2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Wg(e,t){mT=e,JL=wg=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ha=!0),e.firstContext=null)}function ol(e){var t=e._currentValue;if(JL!==e)if(e={context:e,memoizedValue:t,next:null},wg===null){if(mT===null)throw Error(at(308));wg=e,mT.dependencies={lanes:0,firstContext:e}}else wg=wg.next=e;return t}var _p=null;function tF(e){_p===null?_p=[e]:_p.push(e)}function zQ(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,tF(t)):(n.next=o.next,o.next=n),t.interleaved=n,Hu(e,r)}function Hu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Rd=!1;function nF(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function VQ(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Iu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ff(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Nn&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Hu(e,n)}return o=r.interleaved,o===null?(t.next=t,tF(r)):(t.next=o.next,o.next=t),r.interleaved=t,Hu(e,n)}function xP(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zL(e,n)}}function q4(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function gT(e,t,n,r){var o=e.updateQueue;Rd=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,h=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,h=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(h,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(h,d,f):m,f==null)break e;d=Wr({},d,f);break e;case 2:Rd=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else h={eventTime:h,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);yh|=a,e.lanes=a,e.memoizedState=d}}function K4(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=ZA.transition;ZA.transition={};try{e(!1),t()}finally{or=n,ZA.transition=r}}function iJ(){return il().memoizedState}function KSe(e,t,n){var r=hf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},aJ(e))sJ(t,n);else if(n=zQ(e,t,n,r),n!==null){var o=Wi();Gl(n,e,r,o),lJ(n,t,r)}}function YSe(e,t,n){var r=hf(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(aJ(e))sJ(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,Zl(s,a)){var l=t.interleaved;l===null?(o.next=o,tF(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=zQ(e,t,o,r),n!==null&&(o=Wi(),Gl(n,e,r,o),lJ(n,t,r))}}function aJ(e){var t=e.alternate;return e===Ur||t!==null&&t===Ur}function sJ(e,t){J0=vT=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lJ(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,zL(e,n)}}var bT={readContext:ol,useCallback:fi,useContext:fi,useEffect:fi,useImperativeHandle:fi,useInsertionEffect:fi,useLayoutEffect:fi,useMemo:fi,useReducer:fi,useRef:fi,useState:fi,useDebugValue:fi,useDeferredValue:fi,useTransition:fi,useMutableSource:fi,useSyncExternalStore:fi,useId:fi,unstable_isNewReconciler:!1},XSe={readContext:ol,useCallback:function(e,t){return pc().memoizedState=[e,t===void 0?null:t],e},useContext:ol,useEffect:X4,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,CP(4194308,4,eJ.bind(null,t,e),n)},useLayoutEffect:function(e,t){return CP(4194308,4,e,t)},useInsertionEffect:function(e,t){return CP(4,2,e,t)},useMemo:function(e,t){var n=pc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=KSe.bind(null,Ur,e),[r.memoizedState,e]},useRef:function(e){var t=pc();return e={current:e},t.memoizedState=e},useState:Y4,useDebugValue:uF,useDeferredValue:function(e){return pc().memoizedState=e},useTransition:function(){var e=Y4(!1),t=e[0];return e=qSe.bind(null,e[1]),pc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ur,o=pc();if(Dr){if(n===void 0)throw Error(at(407));n=n()}else{if(n=t(),Go===null)throw Error(at(349));gh&30||GQ(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,X4(KQ.bind(null,r,i,e),[e]),r.flags|=2048,Gw(9,qQ.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=pc(),t=Go.identifierPrefix;if(Dr){var n=Cu,r=Su;n=(r&~(1<<32-Wl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Uw++,0")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{GA=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?F0(e):""}function Vxe(e){switch(e.tag){case 5:return F0(e.type);case 16:return F0("Lazy");case 13:return F0("Suspense");case 19:return F0("SuspenseList");case 0:case 2:case 15:return e=qA(e.type,!1),e;case 11:return e=qA(e.type.render,!1),e;case 1:return e=qA(e.type,!0),e;default:return""}}function b2(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xg:return"Fragment";case wg:return"Portal";case g2:return"Profiler";case qL:return"StrictMode";case y2:return"Suspense";case v2:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ZX:return(e.displayName||"Context")+".Consumer";case JX:return(e._context.displayName||"Context")+".Provider";case KL:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case YL:return t=e.displayName||null,t!==null?t:b2(e.type)||"Memo";case _d:t=e._payload,e=e._init;try{return b2(e(t))}catch{}}return null}function Hxe(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return b2(t);case 8:return t===qL?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ef(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tQ(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uxe(e){var t=tQ(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gC(e){e._valueTracker||(e._valueTracker=Uxe(e))}function nQ(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=tQ(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pT(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function w2(e,t){var n=t.checked;return Gr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function P4(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ef(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function rQ(e,t){t=t.checked,t!=null&&GL(e,"checked",t,!1)}function x2(e,t){rQ(e,t);var n=Ef(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?S2(e,t.type,n):t.hasOwnProperty("defaultValue")&&S2(e,t.type,Ef(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function T4(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function S2(e,t,n){(t!=="number"||pT(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var j0=Array.isArray;function Xg(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=yC.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function zw(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var nw={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Wxe=["Webkit","ms","Moz","O"];Object.keys(nw).forEach(function(e){Wxe.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),nw[t]=nw[e]})});function sQ(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||nw.hasOwnProperty(e)&&nw[e]?(""+t).trim():t+"px"}function lQ(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=sQ(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Gxe=Gr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function T2(e,t){if(t){if(Gxe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(at(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(at(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(at(61))}if(t.style!=null&&typeof t.style!="object")throw Error(at(62))}}function E2(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var O2=null;function XL(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var I2=null,Qg=null,Jg=null;function I4(e){if(e=PS(e)){if(typeof I2!="function")throw Error(at(280));var t=e.stateNode;t&&(t=bI(t),I2(e.stateNode,e.type,t))}}function cQ(e){Qg?Jg?Jg.push(e):Jg=[e]:Qg=e}function uQ(){if(Qg){var e=Qg,t=Jg;if(Jg=Qg=null,I4(e),t)for(e=0;e>>=0,e===0?32:31-(rSe(e)/oSe|0)|0}var vC=64,bC=4194304;function B0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yT(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=B0(s):(i&=a,i!==0&&(r=B0(i)))}else a=n&~o,a!==0?r=B0(a):i!==0&&(r=B0(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function SS(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Yl(t),e[t]=n}function lSe(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=ow),L4=" ",F4=!1;function MQ(e,t){switch(e){case"keyup":return NSe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AQ(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sg=!1;function FSe(e,t){switch(e){case"compositionend":return AQ(t);case"keypress":return t.which!==32?null:(F4=!0,L4);case"textInput":return e=t.data,e===L4&&F4?null:e;default:return null}}function jSe(e,t){if(Sg)return e==="compositionend"||!oF&&MQ(e,t)?(e=IQ(),MP=tF=nf=null,Sg=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=V4(n)}}function DQ(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?DQ(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function NQ(){for(var e=window,t=pT();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pT(e.document)}return t}function iF(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function KSe(e){var t=NQ(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&DQ(n.ownerDocument.documentElement,n)){if(r!==null&&iF(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=H4(n,i);var a=H4(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Cg=null,_2=null,aw=null,D2=!1;function U4(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;D2||Cg==null||Cg!==pT(r)||(r=Cg,"selectionStart"in r&&iF(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),aw&&qw(aw,r)||(aw=r,r=wT(_2,"onSelect"),0Eg||(e.current=z2[Eg],z2[Eg]=null,Eg--)}function xr(e,t){Eg++,z2[Eg]=e.current,e.current=t}var Of={},Pi=Bf(Of),ga=Bf(!1),Ch=Of;function Ry(e,t){var n=e.type.contextTypes;if(!n)return Of;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ya(e){return e=e.childContextTypes,e!=null}function ST(){Ar(ga),Ar(Pi)}function Q4(e,t,n){if(Pi.current!==Of)throw Error(at(168));xr(Pi,t),xr(ga,n)}function WQ(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(at(108,Hxe(e)||"Unknown",o));return Gr({},n,r)}function CT(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Of,Ch=Pi.current,xr(Pi,e),xr(ga,ga.current),!0}function J4(e,t,n){var r=e.stateNode;if(!r)throw Error(at(169));n?(e=WQ(e,t,Ch),r.__reactInternalMemoizedMergedChildContext=e,Ar(ga),Ar(Pi),xr(Pi,e)):Ar(ga),xr(ga,n)}var wu=null,wI=!1,s$=!1;function GQ(e){wu===null?wu=[e]:wu.push(e)}function a1e(e){wI=!0,GQ(e)}function zf(){if(!s$&&wu!==null){s$=!0;var e=0,t=or;try{var n=wu;for(or=1;e>=a,o-=a,Pu=1<<32-Yl(t)+o|n<k?(A=O,O=null):A=O.sibling;var I=f(w,O,S[k],P);if(I===null){O===null&&(O=A);break}e&&O&&I.alternate===null&&t(w,O),x=i(I,x,k),E===null?T=I:E.sibling=I,E=I,O=A}if(k===S.length)return n(w,O),Nr&&Ap(w,k),T;if(O===null){for(;kk?(A=O,O=null):A=O.sibling;var R=f(w,O,I.value,P);if(R===null){O===null&&(O=A);break}e&&O&&R.alternate===null&&t(w,O),x=i(R,x,k),E===null?T=R:E.sibling=R,E=R,O=A}if(I.done)return n(w,O),Nr&&Ap(w,k),T;if(O===null){for(;!I.done;k++,I=S.next())I=d(w,I.value,P),I!==null&&(x=i(I,x,k),E===null?T=I:E.sibling=I,E=I);return Nr&&Ap(w,k),T}for(O=r(w,O);!I.done;k++,I=S.next())I=p(O,w,k,I.value,P),I!==null&&(e&&I.alternate!==null&&O.delete(I.key===null?k:I.key),x=i(I,x,k),E===null?T=I:E.sibling=I,E=I);return e&&O.forEach(function(N){return t(w,N)}),Nr&&Ap(w,k),T}function v(w,x,S,P){if(typeof S=="object"&&S!==null&&S.type===xg&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case mC:e:{for(var T=S.key,E=x;E!==null;){if(E.key===T){if(T=S.type,T===xg){if(E.tag===7){n(w,E.sibling),x=o(E,S.props.children),x.return=w,w=x;break e}}else if(E.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===_d&&t3(T)===E.type){n(w,E.sibling),x=o(E,S.props),x.ref=t0(w,E,S),x.return=w,w=x;break e}n(w,E);break}else t(w,E);E=E.sibling}S.type===xg?(x=sh(S.props.children,w.mode,P,S.key),x.return=w,w=x):(P=FP(S.type,S.key,S.props,null,w.mode,P),P.ref=t0(w,x,S),P.return=w,w=P)}return a(w);case wg:e:{for(E=S.key;x!==null;){if(x.key===E)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=o(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=m$(S,w.mode,P),x.return=w,w=x}return a(w);case _d:return E=S._init,v(w,x,E(S._payload),P)}if(j0(S))return m(w,x,S,P);if(Xb(S))return g(w,x,S,P);EC(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=o(x,S),x.return=w,w=x):(n(w,x),x=h$(S,w.mode,P),x.return=w,w=x),a(w)):n(w,x)}return v}var Dy=XQ(!0),QQ=XQ(!1),ET=Bf(null),OT=null,kg=null,cF=null;function uF(){cF=kg=OT=null}function dF(e){var t=ET.current;Ar(ET),e._currentValue=t}function U2(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function ey(e,t){OT=e,cF=kg=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ha=!0),e.firstContext=null)}function il(e){var t=e._currentValue;if(cF!==e)if(e={context:e,memoizedValue:t,next:null},kg===null){if(OT===null)throw Error(at(308));kg=e,OT.dependencies={lanes:0,firstContext:e}}else kg=kg.next=e;return t}var Vp=null;function fF(e){Vp===null?Vp=[e]:Vp.push(e)}function JQ(e,t,n,r){var o=t.interleaved;return o===null?(n.next=n,fF(t)):(n.next=o.next,o.next=n),t.interleaved=n,Wu(e,r)}function Wu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Dd=!1;function pF(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZQ(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Mu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mf(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ln&2){var o=r.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),r.pending=t,Wu(e,n)}return o=r.interleaved,o===null?(t.next=t,fF(r)):(t.next=o.next,o.next=t),r.interleaved=t,Wu(e,n)}function $P(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,JL(e,n)}}function n3(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var o=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?o=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?o=i=t:i=i.next=t}else o=i=t;n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function IT(e,t,n,r){var o=e.updateQueue;Dd=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=o.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Gr({},d,f);break e;case 2:Dd=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=o.effects,f===null?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,a|=f;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;f=s,s=f.next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}while(!0);if(u===null&&(l=d),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);Eh|=a,e.lanes=a,e.memoizedState=d}}function r3(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=c$.transition;c$.transition={};try{e(!1),t()}finally{or=n,c$.transition=r}}function gJ(){return al().memoizedState}function u1e(e,t,n){var r=yf(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yJ(e))vJ(t,n);else if(n=JQ(e,t,n,r),n!==null){var o=Wi();Xl(n,e,r,o),bJ(n,t,r)}}function d1e(e,t,n){var r=yf(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yJ(e))vJ(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,rc(s,a)){var l=t.interleaved;l===null?(o.next=o,fF(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=JQ(e,t,o,r),n!==null&&(o=Wi(),Xl(n,e,r,o),bJ(n,t,r))}}function yJ(e){var t=e.alternate;return e===Wr||t!==null&&t===Wr}function vJ(e,t){sw=MT=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function bJ(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,JL(e,n)}}var AT={readContext:il,useCallback:fi,useContext:fi,useEffect:fi,useImperativeHandle:fi,useInsertionEffect:fi,useLayoutEffect:fi,useMemo:fi,useReducer:fi,useRef:fi,useState:fi,useDebugValue:fi,useDeferredValue:fi,useTransition:fi,useMutableSource:fi,useSyncExternalStore:fi,useId:fi,unstable_isNewReconciler:!1},f1e={readContext:il,useCallback:function(e,t){return gc().memoizedState=[e,t===void 0?null:t],e},useContext:il,useEffect:i3,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,_P(4194308,4,dJ.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _P(4194308,4,e,t)},useInsertionEffect:function(e,t){return _P(4,2,e,t)},useMemo:function(e,t){var n=gc();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=gc();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=u1e.bind(null,Wr,e),[r.memoizedState,e]},useRef:function(e){var t=gc();return e={current:e},t.memoizedState=e},useState:o3,useDebugValue:xF,useDeferredValue:function(e){return gc().memoizedState=e},useTransition:function(){var e=o3(!1),t=e[0];return e=c1e.bind(null,e[1]),gc().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Wr,o=gc();if(Nr){if(n===void 0)throw Error(at(407));n=n()}else{if(n=t(),qo===null)throw Error(at(349));Th&30||rJ(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,i3(iJ.bind(null,r,i,e),[e]),r.flags|=2048,tx(9,oJ.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=gc(),t=qo.identifierPrefix;if(Nr){var n=Tu,r=Pu;n=(r&~(1<<32-Yl(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Zw++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Sc]=t,e[zw]=r,vJ(e,t,!1,!1),t.stateNode=e;e:{switch(a=g2(n,r),n){case"dialog":Er("cancel",e),Er("close",e),o=r;break;case"iframe":case"object":case"embed":Er("load",e),o=r;break;case"video":case"audio":for(o=0;o<$0.length;o++)Er($0[o],e);o=r;break;case"source":Er("error",e),o=r;break;case"img":case"image":case"link":Er("error",e),Er("load",e),o=r;break;case"details":Er("toggle",e),o=r;break;case"input":m4(e,r),o=u2(e,r),Er("invalid",e);break;case"option":o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=Wr({},r,{value:void 0}),Er("invalid",e);break;case"textarea":y4(e,r),o=p2(e,r),Er("invalid",e);break;default:o=r}m2(n,o),s=o;for(i in s)if(s.hasOwnProperty(i)){var l=s[i];i==="style"?QX(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&YX(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&$w(e,l):typeof l=="number"&&$w(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Aw.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Er("scroll",e):l!=null&&DL(e,i,l,a))}switch(n){case"input":aC(e),g4(e,r,!1);break;case"textarea":aC(e),v4(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Sf(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?zg(e,!!r.multiple,i,!1):r.defaultValue!=null&&zg(e,!!r.multiple,r.defaultValue,!0);break;default:typeof o.onClick=="function"&&(e.onclick=cT)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return pi(t),null;case 6:if(e&&t.stateNode!=null)wJ(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(at(166));if(n=Dp(Hw.current),Dp(Ic.current),mC(t)){if(r=t.stateNode,n=t.memoizedProps,r[Sc]=t,(i=r.nodeValue!==n)&&(e=Qa,e!==null))switch(e.tag){case 3:hC(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&hC(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Sc]=t,t.stateNode=r}return pi(t),null;case 13:if(Mr(Vr),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Dr&&qa!==null&&t.mode&1&&!(t.flags&128))FQ(),Ty(),t.flags|=98560,i=!1;else if(i=mC(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(at(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(at(317));i[Sc]=t}else Ty(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;pi(t),i=!1}else Ll!==null&&(X2(Ll),Ll=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Vr.current&1?Mo===0&&(Mo=3):yF())),t.updateQueue!==null&&(t.flags|=4),pi(t),null);case 4:return Oy(),V2(e,t),e===null&&jw(t.stateNode.containerInfo),pi(t),null;case 10:return eF(t.type._context),pi(t),null;case 17:return ya(t.type)&&uT(),pi(t),null;case 19:if(Mr(Vr),i=t.memoizedState,i===null)return pi(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)qb(i,!1);else{if(Mo!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=yT(e),a!==null){for(t.flags|=128,qb(i,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,a=i.alternate,a===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return xr(Vr,Vr.current&1|2),t.child}e=e.sibling}i.tail!==null&&ao()>ky&&(t.flags|=128,r=!0,qb(i,!1),t.lanes=4194304)}else{if(!r)if(e=yT(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),qb(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Dr)return pi(t),null}else 2*ao()-i.renderingStartTime>ky&&n!==1073741824&&(t.flags|=128,r=!0,qb(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ao(),t.sibling=null,n=Vr.current,xr(Vr,r?n&1|2:n&1),t):(pi(t),null);case 22:case 23:return gF(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ja&1073741824&&(pi(t),t.subtreeFlags&6&&(t.flags|=8192)):pi(t),null;case 24:return null;case 25:return null}throw Error(at(156,t.tag))}function o1e(e,t){switch(XL(t),t.tag){case 1:return ya(t.type)&&uT(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oy(),Mr(ga),Mr(Pi),iF(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return oF(t),null;case 13:if(Mr(Vr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(at(340));Ty()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Mr(Vr),null;case 4:return Oy(),null;case 10:return eF(t.type._context),null;case 22:case 23:return gF(),null;case 24:return null;default:return null}}var vC=!1,vi=!1,i1e=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function xg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){eo(e,t,r)}else n.current=null}function H2(e,t,n){try{n()}catch(r){eo(e,t,r)}}var sU=!1;function a1e(e,t){if(E2=aT,e=TQ(),KL(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var h;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(O2={focusedElem:e,selectionRange:n},aT=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){t=Tt;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?g:kl(t.type,g),v);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(at(163))}}catch(P){eo(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Tt=e;break}Tt=t.return}return m=sU,sU=!1,m}function Z0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&H2(t,n,i)}o=o.next}while(o!==r)}}function dI(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function U2(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function xJ(e){var t=e.alternate;t!==null&&(e.alternate=null,xJ(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Sc],delete t[zw],delete t[M2],delete t[VSe],delete t[HSe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function SJ(e){return e.tag===5||e.tag===3||e.tag===4}function lU(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||SJ(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function W2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=cT));else if(r!==4&&(e=e.child,e!==null))for(W2(e,t,n),e=e.sibling;e!==null;)W2(e,t,n),e=e.sibling}function G2(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(G2(e,t,n),e=e.sibling;e!==null;)G2(e,t,n),e=e.sibling}var Zo=null,$l=!1;function Sd(e,t,n){for(n=n.child;n!==null;)CJ(e,t,n),n=n.sibling}function CJ(e,t,n){if(Oc&&typeof Oc.onCommitFiberUnmount=="function")try{Oc.onCommitFiberUnmount(rI,n)}catch{}switch(n.tag){case 5:vi||xg(n,t);case 6:var r=Zo,o=$l;Zo=null,Sd(e,t,n),Zo=r,$l=o,Zo!==null&&($l?(e=Zo,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Zo.removeChild(n.stateNode));break;case 18:Zo!==null&&($l?(e=Zo,n=n.stateNode,e.nodeType===8?XA(e.parentNode,n):e.nodeType===1&&XA(e,n),Nw(e)):XA(Zo,n.stateNode));break;case 4:r=Zo,o=$l,Zo=n.stateNode.containerInfo,$l=!0,Sd(e,t,n),Zo=r,$l=o;break;case 0:case 11:case 14:case 15:if(!vi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&H2(n,t,a),o=o.next}while(o!==r)}Sd(e,t,n);break;case 1:if(!vi&&(xg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){eo(n,t,s)}Sd(e,t,n);break;case 21:Sd(e,t,n);break;case 22:n.mode&1?(vi=(r=vi)||n.memoizedState!==null,Sd(e,t,n),vi=r):Sd(e,t,n);break;default:Sd(e,t,n)}}function cU(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new i1e),t.forEach(function(r){var o=m1e.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=ao()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*l1e(r/1960))-r,10e?16:e,tf===null)var r=!1;else{if(e=tf,tf=null,ST=0,Nn&6)throw Error(at(331));var o=Nn;for(Nn|=4,Tt=e.current;Tt!==null;){var i=Tt,a=i.child;if(Tt.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lao()-hF?Qp(e,0):pF|=n),va(e,t)}function AJ(e,t){t===0&&(e.mode&1?(t=cC,cC<<=1,!(cC&130023424)&&(cC=4194304)):t=1);var n=Wi();e=Hu(e,t),e!==null&&(hS(e,t,n),va(e,n))}function h1e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),AJ(e,n)}function m1e(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(at(314))}r!==null&&r.delete(t),AJ(e,n)}var $J;$J=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ga.current)ha=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ha=!1,n1e(e,t,n);ha=!!(e.flags&131072)}else ha=!1,Dr&&t.flags&1048576&&NQ(t,pT,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;PP(e,t),e=t.pendingProps;var o=Py(t,Pi.current);Wg(t,n),o=sF(null,t,r,e,o,n);var i=lF();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ya(r)?(i=!0,dT(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,nF(t),o.updater=uI,t.stateNode=o,o._reactInternals=t,N2(t,r,e,n),t=j2(null,t,r,!0,i,n)):(t.tag=0,Dr&&i&&YL(t),Li(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(PP(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=y1e(r),e=kl(r,e),o){case 0:t=F2(null,t,r,e,n);break e;case 1:t=oU(null,t,r,e,n);break e;case 11:t=nU(null,t,r,e,n);break e;case 14:t=rU(null,t,r,kl(r.type,e),n);break e}throw Error(at(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kl(r,o),F2(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kl(r,o),oU(e,t,r,o,n);case 3:e:{if(mJ(t),e===null)throw Error(at(387));r=t.pendingProps,i=t.memoizedState,o=i.element,VQ(e,t),gT(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Iy(Error(at(423)),t),t=iU(e,t,r,n,o);break e}else if(r!==o){o=Iy(Error(at(424)),t),t=iU(e,t,r,n,o);break e}else for(qa=df(t.stateNode.containerInfo.firstChild),Qa=t,Dr=!0,Ll=null,n=BQ(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ty(),r===o){t=Uu(e,t,n);break e}Li(e,t,r,n)}t=t.child}return t;case 5:return HQ(t),e===null&&R2(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,I2(r,o)?a=null:i!==null&&I2(r,i)&&(t.flags|=32),hJ(e,t),Li(e,t,a,n),t.child;case 6:return e===null&&R2(t),null;case 13:return gJ(e,t,n);case 4:return rF(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ey(t,null,r,n):Li(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kl(r,o),nU(e,t,r,o,n);case 7:return Li(e,t,t.pendingProps,n),t.child;case 8:return Li(e,t,t.pendingProps.children,n),t.child;case 12:return Li(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,xr(hT,r._currentValue),r._currentValue=a,i!==null)if(Zl(i.value,a)){if(i.children===o.children&&!ga.current){t=Uu(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Iu(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),_2(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(at(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),_2(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Li(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Wg(t,n),o=ol(o),r=r(o),t.flags|=1,Li(e,t,r,n),t.child;case 14:return r=t.type,o=kl(r,t.pendingProps),o=kl(r.type,o),rU(e,t,r,o,n);case 15:return fJ(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:kl(r,o),PP(e,t),t.tag=1,ya(r)?(e=!0,dT(t)):e=!1,Wg(t,n),cJ(t,r,o),N2(t,r,o,n),j2(null,t,r,!0,e,n);case 19:return yJ(e,t,n);case 22:return pJ(e,t,n)}throw Error(at(156,t.tag))};function RJ(e,t){return aQ(e,t)}function g1e(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qs(e,t,n,r){return new g1e(e,t,n,r)}function vF(e){return e=e.prototype,!(!e||!e.isReactComponent)}function y1e(e){if(typeof e=="function")return vF(e)?1:0;if(e!=null){if(e=e.$$typeof,e===LL)return 11;if(e===FL)return 14}return 2}function mf(e,t){var n=e.alternate;return n===null?(n=qs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function OP(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")vF(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case fg:return Jp(n.children,o,i,t);case NL:a=8,o|=8;break;case a2:return e=qs(12,n,t,o|2),e.elementType=a2,e.lanes=i,e;case s2:return e=qs(13,n,t,o),e.elementType=s2,e.lanes=i,e;case l2:return e=qs(19,n,t,o),e.elementType=l2,e.lanes=i,e;case HX:return pI(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case zX:a=10;break e;case VX:a=9;break e;case LL:a=11;break e;case FL:a=14;break e;case $d:a=16,r=null;break e}throw Error(at(130,e==null?e:typeof e,""))}return t=qs(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function Jp(e,t,n,r){return e=qs(7,e,r,t),e.lanes=n,e}function pI(e,t,n,r){return e=qs(22,e,r,t),e.elementType=HX,e.lanes=n,e.stateNode={isHidden:!1},e}function o$(e,t,n){return e=qs(6,e,null,t),e.lanes=n,e}function i$(e,t,n){return t=qs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v1e(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jA(0),this.expirationTimes=jA(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jA(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function bF(e,t,n,r,o,i,a,s,l){return e=new v1e(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=qs(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},nF(i),e}function b1e(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(LJ)}catch(e){console.error(e)}}LJ(),LX.exports=us;var vI=LX.exports;const xC=Rn(vI),yU={disabled:!1},TT=J.createContext(null);var FJ=function(t){return t.scrollTop},R0="unmounted",Tp="exited",Ep="entering",ng="entered",Q2="exiting",fs=function(e){pS(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Tp,i.appearStatus=Ep):l=ng:r.unmountOnExit||r.mountOnEnter?l=R0:l=Tp,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===R0?{status:Tp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==Ep&&a!==ng&&(i=Ep):(a===Ep||a===ng)&&(i=Q2)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===Ep){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:xC.findDOMNode(this);a&&FJ(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Tp&&this.setState({status:R0})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[xC.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||yU.disabled){this.safeSetState({status:ng},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Ep},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:ng},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:xC.findDOMNode(this);if(!i||yU.disabled){this.safeSetState({status:Tp},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:Q2},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Tp},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:xC.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===R0)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=nI(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return J.createElement(TT.Provider,{value:null},typeof a=="function"?a(o,s):J.cloneElement(J.Children.only(a),s))},t}(J.Component);fs.contextType=TT;fs.propTypes={};function _m(){}fs.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:_m,onEntering:_m,onEntered:_m,onExit:_m,onExiting:_m,onExited:_m};fs.UNMOUNTED=R0;fs.EXITED=Tp;fs.ENTERING=Ep;fs.ENTERED=ng;fs.EXITING=Q2;var P1e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return vxe(t,r)})},a$=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return bxe(t,r)})},CF=function(e){pS(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;ae.scrollTop;function Pf(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function M1e(e){return tt("MuiCollapse",e)}ot("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const A1e=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return rt(r,M1e,n)},$1e=oe("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Ze(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),R1e=oe("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),_1e=oe("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Zs=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:h,onExit:m,onExited:g,onExiting:v,orientation:w="vertical",style:x,timeout:S=vX.standard,TransitionComponent:P=fs,...T}=r,E={...r,orientation:w,collapsedSize:s},O=A1e(E),k=Ei(),A=Zd(),I=y.useRef(null),R=y.useRef(),N=typeof s=="number"?`${s}px`:s,L=w==="horizontal",B=L?"width":"height",_=y.useRef(null),D=Cr(n,_),z=te=>pe=>{if(te){const ie=_.current;pe===void 0?te(ie):te(ie,pe)}},F=()=>I.current?I.current[L?"clientWidth":"clientHeight"]:0,H=z((te,pe)=>{I.current&&L&&(I.current.style.position="absolute"),te.style[B]=N,d&&d(te,pe)}),U=z((te,pe)=>{const ie=F();I.current&&L&&(I.current.style.position="");const{duration:le,easing:re}=Pf({style:x,timeout:S,easing:c},{mode:"enter"});if(S==="auto"){const de=k.transitions.getAutoHeightDuration(ie);te.style.transitionDuration=`${de}ms`,R.current=de}else te.style.transitionDuration=typeof le=="string"?le:`${le}ms`;te.style[B]=`${ie}px`,te.style.transitionTimingFunction=re,h&&h(te,pe)}),q=z((te,pe)=>{te.style[B]="auto",f&&f(te,pe)}),Y=z(te=>{te.style[B]=`${F()}px`,m&&m(te)}),ae=z(g),Z=z(te=>{const pe=F(),{duration:ie,easing:le}=Pf({style:x,timeout:S,easing:c},{mode:"exit"});if(S==="auto"){const re=k.transitions.getAutoHeightDuration(pe);te.style.transitionDuration=`${re}ms`,R.current=re}else te.style.transitionDuration=typeof ie=="string"?ie:`${ie}ms`;te.style[B]=N,te.style.transitionTimingFunction=le,v&&v(te)}),K=te=>{S==="auto"&&A.start(R.current||0,te),o&&o(_.current,te)};return $.jsx(P,{in:u,onEnter:H,onEntered:q,onEntering:U,onExit:Y,onExited:ae,onExiting:Z,addEndListener:K,nodeRef:_,timeout:S==="auto"?null:S,...T,children:(te,pe)=>$.jsx($1e,{as:l,className:fe(O.root,a,{entered:O.entered,exited:!u&&N==="0px"&&O.hidden}[te]),style:{[L?"minWidth":"minHeight"]:N,...x},ref:D,...pe,ownerState:{...E,state:te},children:$.jsx(R1e,{ownerState:{...E,state:te},className:O.wrapper,ref:I,children:$.jsx(_1e,{ownerState:{...E,state:te},className:O.wrapperInner,children:i})})})})});Zs&&(Zs.muiSupportAuto=!0);function D1e(e){return tt("MuiPaper",e)}ot("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const N1e=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return rt(i,D1e,o)},L1e=oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),co=y.forwardRef(function(t,n){var h;const r=it({props:t,name:"MuiPaper"}),o=Ei(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=N1e(d);return $.jsx(L1e,{as:a,ownerState:d,className:fe(f.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(h=o.vars.overlays)==null?void 0:h[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${mt("#fff",UR(s))}, ${mt("#fff",UR(s))})`}},...u.style}})}),jJ=y.createContext({});function hr(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,h=u[e]||r,m=lX(d[e],o),{props:{component:g,...v},internalRef:w}=sX({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m}),x=Cr(w,m==null?void 0:m.ref,t.ref),S=a?a(v):{},P={...o,...S},T=e==="root"?g||c:g,E=ug(h,{...e==="root"&&!c&&!u[e]&&s,...e!=="root"&&!u[e]&&s,...v,...T&&{as:T},ref:x},P);return Object.keys(S).forEach(O=>{delete E[O]}),[h,E]}function F1e(e){return tt("MuiAccordion",e)}const SC=ot("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),j1e=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return rt({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},F1e,t)},B1e=oe(co,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${SC.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Ze(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${SC.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${SC.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Ze(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${SC.expanded}`]:{margin:"16px 0"}}}]}))),z1e=oe("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),EF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:h={},TransitionComponent:m,TransitionProps:g,...v}=r,[w,x]=Ou({controlled:c,default:a,name:"Accordion",state:"expanded"}),S=y.useCallback(D=>{x(!w),u&&u(D,!w)},[w,u,x]),[P,...T]=y.Children.toArray(o),E=y.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:S}),[w,s,l,S]),O={...r,square:d,disabled:s,disableGutters:l,expanded:w},k=j1e(O),A={transition:m,...f},I={transition:g,...h},R={slots:A,slotProps:I},[N,L]=hr("heading",{elementType:z1e,externalForwardedProps:R,className:k.heading,ownerState:O}),[B,_]=hr("transition",{elementType:Zs,externalForwardedProps:R,ownerState:O});return $.jsxs(B1e,{className:fe(k.root,i),ref:n,ownerState:O,square:d,...v,children:[$.jsx(N,{...L,children:$.jsx(jJ.Provider,{value:E,children:P})}),$.jsx(B,{in:w,timeout:"auto",..._,children:$.jsx("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region",className:k.region,children:T})})]})});function V1e(e){return tt("MuiAccordionDetails",e)}ot("MuiAccordionDetails",["root"]);const H1e=e=>{const{classes:t}=e;return rt({root:["root"]},V1e,t)},U1e=oe("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({padding:e.spacing(1,2,2)}))),OF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=H1e(a);return $.jsx(U1e,{className:fe(s.root,o),ref:n,ownerState:a,...i})});class ET{constructor(){sn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new ET}static use(){const t=nX(ET.create).current,[n,r]=y.useState(!1);return t.shouldMount=n,t.setShouldMount=r,y.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=G1e(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function W1e(){return ET.use()}function G1e(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function q1e(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=y.useState(!1),f=fe(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),h={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},m=fe(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),y.useEffect(()=>{if(!s&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,s,c]),$.jsx("span",{className:f,style:h,children:$.jsx("span",{className:m})})}const Bs=ot("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Z2=550,K1e=80,Y1e=Uc` +`+i.stack}return{value:e,source:t,stack:o,digest:null}}function f$(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function q2(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var m1e=typeof WeakMap=="function"?WeakMap:Map;function xJ(e,t,n){n=Mu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){RT||(RT=!0,r_=r),q2(e,t)},n}function SJ(e,t,n){n=Mu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){q2(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){q2(e,t),typeof r!="function"&&(gf===null?gf=new Set([this]):gf.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function l3(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new m1e;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=k1e.bind(null,e,t,n),t.then(e,e))}function c3(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function u3(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Mu(-1,1),t.tag=2,mf(n,t,1))),n.lanes|=1),e)}var g1e=rd.ReactCurrentOwner,ha=!1;function Li(e,t,n,r){t.child=e===null?QQ(t,null,n,r):Dy(t,e.child,n,r)}function d3(e,t,n,r,o){n=n.render;var i=t.ref;return ey(t,o),r=vF(e,t,n,r,i,o),n=bF(),e!==null&&!ha?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gu(e,t,o)):(Nr&&n&&aF(t),t.flags|=1,Li(e,t,r,o),t.child)}function f3(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!kF(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,CJ(e,t,i,r,o)):(e=FP(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:qw,n(a,r)&&e.ref===t.ref)return Gu(e,t,o)}return t.flags|=1,e=vf(i,r),e.ref=t.ref,e.return=t,t.child=e}function CJ(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(qw(i,r)&&e.ref===t.ref)if(ha=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(ha=!0);else return t.lanes=e.lanes,Gu(e,t,o)}return K2(e,t,n,r,o)}function PJ(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},xr(Ag,ja),ja|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,xr(Ag,ja),ja|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,xr(Ag,ja),ja|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,xr(Ag,ja),ja|=r;return Li(e,t,o,n),t.child}function TJ(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function K2(e,t,n,r,o){var i=ya(n)?Ch:Pi.current;return i=Ry(t,i),ey(t,o),n=vF(e,t,n,r,i,o),r=bF(),e!==null&&!ha?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Gu(e,t,o)):(Nr&&r&&aF(t),t.flags|=1,Li(e,t,n,o),t.child)}function p3(e,t,n,r,o){if(ya(n)){var i=!0;CT(t)}else i=!1;if(ey(t,o),t.stateNode===null)DP(e,t),wJ(t,n,r),G2(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=il(c):(c=ya(n)?Ch:Pi.current,c=Ry(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==c)&&s3(t,a,r,c),Dd=!1;var f=t.memoizedState;a.state=f,IT(t,r,a,o),l=t.memoizedState,s!==r||f!==l||ga.current||Dd?(typeof u=="function"&&(W2(t,n,u,r),l=t.memoizedState),(s=Dd||a3(t,n,s,r,f,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,ZQ(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:Rl(t.type,s),a.props=c,d=t.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=il(l):(l=ya(n)?Ch:Pi.current,l=Ry(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==l)&&s3(t,a,r,l),Dd=!1,f=t.memoizedState,a.state=f,IT(t,r,a,o);var m=t.memoizedState;s!==d||f!==m||ga.current||Dd?(typeof p=="function"&&(W2(t,n,p,r),m=t.memoizedState),(c=Dd||a3(t,n,c,r,f,m,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Y2(e,t,n,r,i,o)}function Y2(e,t,n,r,o,i){TJ(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return o&&J4(t,n,!1),Gu(e,t,i);r=t.stateNode,g1e.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Dy(t,e.child,null,i),t.child=Dy(t,null,s,i)):Li(e,t,s,i),t.memoizedState=r.state,o&&J4(t,n,!0),t.child}function EJ(e){var t=e.stateNode;t.pendingContext?Q4(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Q4(e,t.context,!1),hF(e,t.containerInfo)}function h3(e,t,n,r,o){return _y(),lF(o),t.flags|=256,Li(e,t,n,r),t.child}var X2={dehydrated:null,treeContext:null,retryLane:0};function Q2(e){return{baseLanes:e,cachePool:null,transitions:null}}function OJ(e,t,n){var r=t.pendingProps,o=Hr.current,i=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(o&2)!==0),s?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(o|=1),xr(Hr,o&1),e===null)return H2(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=TI(a,r,0,null),e=sh(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Q2(n),t.memoizedState=X2,e):SF(t,a));if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null))return y1e(e,t,a,r,s,o,n);if(i){i=r.fallback,a=t.mode,o=e.child,s=o.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==o?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=vf(o,l),r.subtreeFlags=o.subtreeFlags&14680064),s!==null?i=vf(s,i):(i=sh(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?Q2(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=X2,r}return i=e.child,e=i.sibling,r=vf(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function SF(e,t){return t=TI({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function OC(e,t,n,r){return r!==null&&lF(r),Dy(t,e.child,null,n),e=SF(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function y1e(e,t,n,r,o,i,a){if(n)return t.flags&256?(t.flags&=-257,r=f$(Error(at(422))),OC(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,o=t.mode,r=TI({mode:"visible",children:r.children},o,0,null),i=sh(i,o,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Dy(t,e.child,null,a),t.child.memoizedState=Q2(a),t.memoizedState=X2,i);if(!(t.mode&1))return OC(e,t,a,null);if(o.data==="$!"){if(r=o.nextSibling&&o.nextSibling.dataset,r)var s=r.dgst;return r=s,i=Error(at(419)),r=f$(i,r,void 0),OC(e,t,a,r)}if(s=(a&e.childLanes)!==0,ha||s){if(r=qo,r!==null){switch(a&-a){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}o=o&(r.suspendedLanes|a)?0:o,o!==0&&o!==i.retryLane&&(i.retryLane=o,Wu(e,o),Xl(r,e,o,-1))}return IF(),r=f$(Error(at(421))),OC(e,t,a,r)}return o.data==="$?"?(t.flags|=128,t.child=e.child,t=M1e.bind(null,e),o._reactRetry=t,null):(e=i.treeContext,Ka=hf(o.nextSibling),Ja=t,Nr=!0,zl=null,e!==null&&(Hs[Us++]=Pu,Hs[Us++]=Tu,Hs[Us++]=Ph,Pu=e.id,Tu=e.overflow,Ph=t),t=SF(t,r.children),t.flags|=4096,t)}function m3(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),U2(e.return,t,n)}function p$(e,t,n,r,o){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function IJ(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Li(e,t,r.children,n),r=Hr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&m3(e,n,t);else if(e.tag===19)m3(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(xr(Hr,r),!(t.mode&1))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&kT(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),p$(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&kT(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}p$(t,!0,n,null,i);break;case"together":p$(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function DP(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Eh|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(at(153));if(t.child!==null){for(e=t.child,n=vf(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=vf(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function v1e(e,t,n){switch(t.tag){case 3:EJ(t),_y();break;case 5:eJ(t);break;case 1:ya(t.type)&&CT(t);break;case 4:hF(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;xr(ET,r._currentValue),r._currentValue=o;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(xr(Hr,Hr.current&1),t.flags|=128,null):n&t.child.childLanes?OJ(e,t,n):(xr(Hr,Hr.current&1),e=Gu(e,t,n),e!==null?e.sibling:null);xr(Hr,Hr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return IJ(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),xr(Hr,Hr.current),r)break;return null;case 22:case 23:return t.lanes=0,PJ(e,t,n)}return Gu(e,t,n)}var kJ,J2,MJ,AJ;kJ=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};J2=function(){};MJ=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Hp($c.current);var i=null;switch(n){case"input":o=w2(e,o),r=w2(e,r),i=[];break;case"select":o=Gr({},o,{value:void 0}),r=Gr({},r,{value:void 0}),i=[];break;case"textarea":o=C2(e,o),r=C2(e,r),i=[];break;default:typeof o.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=xT)}T2(n,r);var a;n=null;for(c in o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&o[c]!=null)if(c==="style"){var s=o[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Bw.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(s=o!=null?o[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Bw.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Er("scroll",e),i||s===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};AJ=function(e,t,n,r){n!==r&&(t.flags|=4)};function n0(e,t){if(!Nr)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function pi(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags&14680064,r|=o.flags&14680064,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function b1e(e,t,n){var r=t.pendingProps;switch(sF(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pi(t),null;case 1:return ya(t.type)&&ST(),pi(t),null;case 3:return r=t.stateNode,Ny(),Ar(ga),Ar(Pi),gF(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(TC(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zl!==null&&(a_(zl),zl=null))),J2(e,t),pi(t),null;case 5:mF(t);var o=Hp(Jw.current);if(n=t.type,e!==null&&t.stateNode!=null)MJ(e,t,n,r,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(at(166));return pi(t),null}if(e=Hp($c.current),TC(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Tc]=t,r[Xw]=i,e=(t.mode&1)!==0,n){case"dialog":Er("cancel",r),Er("close",r);break;case"iframe":case"object":case"embed":Er("load",r);break;case"video":case"audio":for(o=0;o<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Tc]=t,e[Xw]=r,kJ(e,t,!1,!1),t.stateNode=e;e:{switch(a=E2(n,r),n){case"dialog":Er("cancel",e),Er("close",e),o=r;break;case"iframe":case"object":case"embed":Er("load",e),o=r;break;case"video":case"audio":for(o=0;oFy&&(t.flags|=128,r=!0,n0(i,!1),t.lanes=4194304)}else{if(!r)if(e=kT(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),n0(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Nr)return pi(t),null}else 2*so()-i.renderingStartTime>Fy&&n!==1073741824&&(t.flags|=128,r=!0,n0(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=so(),t.sibling=null,n=Hr.current,xr(Hr,r?n&1|2:n&1),t):(pi(t),null);case 22:case 23:return OF(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ja&1073741824&&(pi(t),t.subtreeFlags&6&&(t.flags|=8192)):pi(t),null;case 24:return null;case 25:return null}throw Error(at(156,t.tag))}function w1e(e,t){switch(sF(t),t.tag){case 1:return ya(t.type)&&ST(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ny(),Ar(ga),Ar(Pi),gF(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mF(t),null;case 13:if(Ar(Hr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(at(340));_y()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ar(Hr),null;case 4:return Ny(),null;case 10:return dF(t.type._context),null;case 22:case 23:return OF(),null;case 24:return null;default:return null}}var IC=!1,vi=!1,x1e=typeof WeakSet=="function"?WeakSet:Set,Tt=null;function Mg(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){to(e,t,r)}else n.current=null}function Z2(e,t,n){try{n()}catch(r){to(e,t,r)}}var g3=!1;function S1e(e,t){if(N2=vT,e=NQ(),iF(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===o&&(s=a),f===i&&++u===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(L2={focusedElem:e,selectionRange:n},vT=!1,Tt=t;Tt!==null;)if(t=Tt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Tt=e;else for(;Tt!==null;){t=Tt;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,v=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?g:Rl(t.type,g),v);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(at(163))}}catch(P){to(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Tt=e;break}Tt=t.return}return m=g3,g3=!1,m}function lw(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Z2(t,n,i)}o=o.next}while(o!==r)}}function CI(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function e_(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function $J(e){var t=e.alternate;t!==null&&(e.alternate=null,$J(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Tc],delete t[Xw],delete t[B2],delete t[o1e],delete t[i1e])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function RJ(e){return e.tag===5||e.tag===3||e.tag===4}function y3(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||RJ(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function t_(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=xT));else if(r!==4&&(e=e.child,e!==null))for(t_(e,t,n),e=e.sibling;e!==null;)t_(e,t,n),e=e.sibling}function n_(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(n_(e,t,n),e=e.sibling;e!==null;)n_(e,t,n),e=e.sibling}var ei=null,Nl=!1;function Cd(e,t,n){for(n=n.child;n!==null;)_J(e,t,n),n=n.sibling}function _J(e,t,n){if(Ac&&typeof Ac.onCommitFiberUnmount=="function")try{Ac.onCommitFiberUnmount(mI,n)}catch{}switch(n.tag){case 5:vi||Mg(n,t);case 6:var r=ei,o=Nl;ei=null,Cd(e,t,n),ei=r,Nl=o,ei!==null&&(Nl?(e=ei,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ei.removeChild(n.stateNode));break;case 18:ei!==null&&(Nl?(e=ei,n=n.stateNode,e.nodeType===8?a$(e.parentNode,n):e.nodeType===1&&a$(e,n),Ww(e)):a$(ei,n.stateNode));break;case 4:r=ei,o=Nl,ei=n.stateNode.containerInfo,Nl=!0,Cd(e,t,n),ei=r,Nl=o;break;case 0:case 11:case 14:case 15:if(!vi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&Z2(n,t,a),o=o.next}while(o!==r)}Cd(e,t,n);break;case 1:if(!vi&&(Mg(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){to(n,t,s)}Cd(e,t,n);break;case 21:Cd(e,t,n);break;case 22:n.mode&1?(vi=(r=vi)||n.memoizedState!==null,Cd(e,t,n),vi=r):Cd(e,t,n);break;default:Cd(e,t,n)}}function v3(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new x1e),t.forEach(function(r){var o=A1e.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Ol(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=so()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*P1e(r/1960))-r,10e?16:e,rf===null)var r=!1;else{if(e=rf,rf=null,_T=0,Ln&6)throw Error(at(331));var o=Ln;for(Ln|=4,Tt=e.current;Tt!==null;){var i=Tt,a=i.child;if(Tt.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lso()-TF?ah(e,0):PF|=n),va(e,t)}function VJ(e,t){t===0&&(e.mode&1?(t=bC,bC<<=1,!(bC&130023424)&&(bC=4194304)):t=1);var n=Wi();e=Wu(e,t),e!==null&&(SS(e,t,n),va(e,n))}function M1e(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),VJ(e,n)}function A1e(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(at(314))}r!==null&&r.delete(t),VJ(e,n)}var HJ;HJ=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ga.current)ha=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ha=!1,v1e(e,t,n);ha=!!(e.flags&131072)}else ha=!1,Nr&&t.flags&1048576&&qQ(t,TT,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;DP(e,t),e=t.pendingProps;var o=Ry(t,Pi.current);ey(t,n),o=vF(null,t,r,e,o,n);var i=bF();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ya(r)?(i=!0,CT(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,pF(t),o.updater=SI,t.stateNode=o,o._reactInternals=t,G2(t,r,e,n),t=Y2(null,t,r,!0,i,n)):(t.tag=0,Nr&&i&&aF(t),Li(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(DP(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=R1e(r),e=Rl(r,e),o){case 0:t=K2(null,t,r,e,n);break e;case 1:t=p3(null,t,r,e,n);break e;case 11:t=d3(null,t,r,e,n);break e;case 14:t=f3(null,t,r,Rl(r.type,e),n);break e}throw Error(at(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rl(r,o),K2(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rl(r,o),p3(e,t,r,o,n);case 3:e:{if(EJ(t),e===null)throw Error(at(387));r=t.pendingProps,i=t.memoizedState,o=i.element,ZQ(e,t),IT(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Ly(Error(at(423)),t),t=h3(e,t,r,n,o);break e}else if(r!==o){o=Ly(Error(at(424)),t),t=h3(e,t,r,n,o);break e}else for(Ka=hf(t.stateNode.containerInfo.firstChild),Ja=t,Nr=!0,zl=null,n=QQ(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_y(),r===o){t=Gu(e,t,n);break e}Li(e,t,r,n)}t=t.child}return t;case 5:return eJ(t),e===null&&H2(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,F2(r,o)?a=null:i!==null&&F2(r,i)&&(t.flags|=32),TJ(e,t),Li(e,t,a,n),t.child;case 6:return e===null&&H2(t),null;case 13:return OJ(e,t,n);case 4:return hF(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Dy(t,null,r,n):Li(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rl(r,o),d3(e,t,r,o,n);case 7:return Li(e,t,t.pendingProps,n),t.child;case 8:return Li(e,t,t.pendingProps.children,n),t.child;case 12:return Li(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,xr(ET,r._currentValue),r._currentValue=a,i!==null)if(rc(i.value,a)){if(i.children===o.children&&!ga.current){t=Gu(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Mu(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),U2(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(at(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),U2(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Li(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ey(t,n),o=il(o),r=r(o),t.flags|=1,Li(e,t,r,n),t.child;case 14:return r=t.type,o=Rl(r,t.pendingProps),o=Rl(r.type,o),f3(e,t,r,o,n);case 15:return CJ(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Rl(r,o),DP(e,t),t.tag=1,ya(r)?(e=!0,CT(t)):e=!1,ey(t,n),wJ(t,r,o),G2(t,r,o,n),Y2(null,t,r,!0,e,n);case 19:return IJ(e,t,n);case 22:return PJ(e,t,n)}throw Error(at(156,t.tag))};function UJ(e,t){return yQ(e,t)}function $1e(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qs(e,t,n,r){return new $1e(e,t,n,r)}function kF(e){return e=e.prototype,!(!e||!e.isReactComponent)}function R1e(e){if(typeof e=="function")return kF(e)?1:0;if(e!=null){if(e=e.$$typeof,e===KL)return 11;if(e===YL)return 14}return 2}function vf(e,t){var n=e.alternate;return n===null?(n=qs(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function FP(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")kF(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case xg:return sh(n.children,o,i,t);case qL:a=8,o|=8;break;case g2:return e=qs(12,n,t,o|2),e.elementType=g2,e.lanes=i,e;case y2:return e=qs(13,n,t,o),e.elementType=y2,e.lanes=i,e;case v2:return e=qs(19,n,t,o),e.elementType=v2,e.lanes=i,e;case eQ:return TI(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case JX:a=10;break e;case ZX:a=9;break e;case KL:a=11;break e;case YL:a=14;break e;case _d:a=16,r=null;break e}throw Error(at(130,e==null?e:typeof e,""))}return t=qs(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function sh(e,t,n,r){return e=qs(7,e,r,t),e.lanes=n,e}function TI(e,t,n,r){return e=qs(22,e,r,t),e.elementType=eQ,e.lanes=n,e.stateNode={isHidden:!1},e}function h$(e,t,n){return e=qs(6,e,null,t),e.lanes=n,e}function m$(e,t,n){return t=qs(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _1e(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=YA(0),this.expirationTimes=YA(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=YA(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function MF(e,t,n,r,o,i,a,s,l){return e=new _1e(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=qs(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pF(i),e}function D1e(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(KJ)}catch(e){console.error(e)}}KJ(),KX.exports=ds;var MI=KX.exports;const AC=_n(MI),E3={disabled:!1},LT=Y.createContext(null);var YJ=function(t){return t.scrollTop},V0="unmounted",Rp="exited",_p="entering",dg="entered",s_="exiting",ps=function(e){xS(t,e);function t(r,o){var i;i=e.call(this,r,o)||this;var a=o,s=a&&!a.isMounting?r.enter:r.appear,l;return i.appearStatus=null,r.in?s?(l=Rp,i.appearStatus=_p):l=dg:r.unmountOnExit||r.mountOnEnter?l=V0:l=Rp,i.state={status:l},i.nextCallback=null,i}t.getDerivedStateFromProps=function(o,i){var a=o.in;return a&&i.status===V0?{status:Rp}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(o){var i=null;if(o!==this.props){var a=this.state.status;this.props.in?a!==_p&&a!==dg&&(i=_p):(a===_p||a===dg)&&(i=s_)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var o=this.props.timeout,i,a,s;return i=a=s=o,o!=null&&typeof o!="number"&&(i=o.exit,a=o.enter,s=o.appear!==void 0?o.appear:a),{exit:i,enter:a,appear:s}},n.updateStatus=function(o,i){if(o===void 0&&(o=!1),i!==null)if(this.cancelNextCallback(),i===_p){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:AC.findDOMNode(this);a&&YJ(a)}this.performEnter(o)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Rp&&this.setState({status:V0})},n.performEnter=function(o){var i=this,a=this.props.enter,s=this.context?this.context.isMounting:o,l=this.props.nodeRef?[s]:[AC.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!o&&!a||E3.disabled){this.safeSetState({status:dg},function(){i.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:_p},function(){i.props.onEntering(c,u),i.onTransitionEnd(f,function(){i.safeSetState({status:dg},function(){i.props.onEntered(c,u)})})})},n.performExit=function(){var o=this,i=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:AC.findDOMNode(this);if(!i||E3.disabled){this.safeSetState({status:Rp},function(){o.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:s_},function(){o.props.onExiting(s),o.onTransitionEnd(a.exit,function(){o.safeSetState({status:Rp},function(){o.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(o,i){i=this.setNextCallback(i),this.setState(o,i)},n.setNextCallback=function(o){var i=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,i.nextCallback=null,o(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(o,i){this.setNextCallback(i);var a=this.props.nodeRef?this.props.nodeRef.current:AC.findDOMNode(this),s=o==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}o!=null&&setTimeout(this.nextCallback,o)},n.render=function(){var o=this.state.status;if(o===V0)return null;var i=this.props,a=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=hI(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Y.createElement(LT.Provider,{value:null},typeof a=="function"?a(o,s):Y.cloneElement(Y.Children.only(a),s))},t}(Y.Component);ps.contextType=LT;ps.propTypes={};function Hm(){}ps.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Hm,onEntering:Hm,onEntered:Hm,onExit:Hm,onExiting:Hm,onExited:Hm};ps.UNMOUNTED=V0;ps.EXITED=Rp;ps.ENTERING=_p;ps.ENTERED=dg;ps.EXITING=s_;var B1e=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return _xe(t,r)})},g$=function(t,n){return t&&n&&n.split(" ").forEach(function(r){return Dxe(t,r)})},_F=function(e){xS(t,e);function t(){for(var r,o=arguments.length,i=new Array(o),a=0;ae.scrollTop;function If(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:o.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:o.transitionDelay}}function G1e(e){return tt("MuiCollapse",e)}ot("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const q1e=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return rt(r,G1e,n)},K1e=oe("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Ze(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),Y1e=oe("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),X1e=oe("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),Zs=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCollapse"}),{addEndListener:o,children:i,className:a,collapsedSize:s="0px",component:l,easing:c,in:u,onEnter:d,onEntered:f,onEntering:p,onExit:m,onExited:g,onExiting:v,orientation:w="vertical",style:x,timeout:S=kX.standard,TransitionComponent:P=ps,...T}=r,E={...r,orientation:w,collapsedSize:s},O=q1e(E),k=Ei(),A=tf(),I=y.useRef(null),R=y.useRef(),N=typeof s=="number"?`${s}px`:s,L=w==="horizontal",j=L?"width":"height",_=y.useRef(null),D=Cr(n,_),z=te=>pe=>{if(te){const ie=_.current;pe===void 0?te(ie):te(ie,pe)}},F=()=>I.current?I.current[L?"clientWidth":"clientHeight"]:0,H=z((te,pe)=>{I.current&&L&&(I.current.style.position="absolute"),te.style[j]=N,d&&d(te,pe)}),U=z((te,pe)=>{const ie=F();I.current&&L&&(I.current.style.position="");const{duration:le,easing:re}=If({style:x,timeout:S,easing:c},{mode:"enter"});if(S==="auto"){const fe=k.transitions.getAutoHeightDuration(ie);te.style.transitionDuration=`${fe}ms`,R.current=fe}else te.style.transitionDuration=typeof le=="string"?le:`${le}ms`;te.style[j]=`${ie}px`,te.style.transitionTimingFunction=re,p&&p(te,pe)}),q=z((te,pe)=>{te.style[j]="auto",f&&f(te,pe)}),X=z(te=>{te.style[j]=`${F()}px`,m&&m(te)}),ae=z(g),Z=z(te=>{const pe=F(),{duration:ie,easing:le}=If({style:x,timeout:S,easing:c},{mode:"exit"});if(S==="auto"){const re=k.transitions.getAutoHeightDuration(pe);te.style.transitionDuration=`${re}ms`,R.current=re}else te.style.transitionDuration=typeof ie=="string"?ie:`${ie}ms`;te.style[j]=N,te.style.transitionTimingFunction=le,v&&v(te)}),K=te=>{S==="auto"&&A.start(R.current||0,te),o&&o(_.current,te)};return $.jsx(P,{in:u,onEnter:H,onEntered:q,onEntering:U,onExit:X,onExited:ae,onExiting:Z,addEndListener:K,nodeRef:_,timeout:S==="auto"?null:S,...T,children:(te,pe)=>$.jsx(K1e,{as:l,className:de(O.root,a,{entered:O.entered,exited:!u&&N==="0px"&&O.hidden}[te]),style:{[L?"minWidth":"minHeight"]:N,...x},ref:D,...pe,ownerState:{...E,state:te},children:$.jsx(Y1e,{ownerState:{...E,state:te},className:O.wrapper,ref:I,children:$.jsx(X1e,{ownerState:{...E,state:te},className:O.wrapperInner,children:i})})})})});Zs&&(Zs.muiSupportAuto=!0);function Q1e(e){return tt("MuiPaper",e)}ot("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const J1e=e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return rt(i,Q1e,o)},Z1e=oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),uo=y.forwardRef(function(t,n){var p;const r=it({props:t,name:"MuiPaper"}),o=Ei(),{className:i,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=J1e(d);return $.jsx(Z1e,{as:a,ownerState:d,className:de(f.root,i),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(o.vars||o).shadows[s],...o.vars&&{"--Paper-overlay":(p=o.vars.overlays)==null?void 0:p[s]},...!o.vars&&o.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${mt("#fff",e2(s))}, ${mt("#fff",e2(s))})`}},...u.style}})}),XJ=y.createContext({});function hr(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,getSlotOwnerState:a,internalForwardedProps:s,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,m=bX(d[e],o),{props:{component:g,...v},internalRef:w}=vX({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m}),x=Cr(w,m==null?void 0:m.ref,t.ref),S=a?a(v):{},P={...o,...S},T=e==="root"?g||c:g,E=bg(p,{...e==="root"&&!c&&!u[e]&&s,...e!=="root"&&!u[e]&&s,...v,...T&&{as:T},ref:x},P);return Object.keys(S).forEach(O=>{delete E[O]}),[p,E]}function eCe(e){return tt("MuiAccordion",e)}const $C=ot("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),tCe=e=>{const{classes:t,square:n,expanded:r,disabled:o,disableGutters:i}=e;return rt({root:["root",!n&&"rounded",r&&"expanded",o&&"disabled",!i&&"gutters"],heading:["heading"],region:["region"]},eCe,t)},nCe=oe(uo,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${$C.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Ze(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${$C.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${$C.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Ze(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${$C.expanded}`]:{margin:"16px 0"}}}]}))),rCe=oe("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),LF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAccordion"}),{children:o,className:i,defaultExpanded:a=!1,disabled:s=!1,disableGutters:l=!1,expanded:c,onChange:u,square:d=!1,slots:f={},slotProps:p={},TransitionComponent:m,TransitionProps:g,...v}=r,[w,x]=ku({controlled:c,default:a,name:"Accordion",state:"expanded"}),S=y.useCallback(D=>{x(!w),u&&u(D,!w)},[w,u,x]),[P,...T]=y.Children.toArray(o),E=y.useMemo(()=>({expanded:w,disabled:s,disableGutters:l,toggle:S}),[w,s,l,S]),O={...r,square:d,disabled:s,disableGutters:l,expanded:w},k=tCe(O),A={transition:m,...f},I={transition:g,...p},R={slots:A,slotProps:I},[N,L]=hr("heading",{elementType:rCe,externalForwardedProps:R,className:k.heading,ownerState:O}),[j,_]=hr("transition",{elementType:Zs,externalForwardedProps:R,ownerState:O});return $.jsxs(nCe,{className:de(k.root,i),ref:n,ownerState:O,square:d,...v,children:[$.jsx(N,{...L,children:$.jsx(XJ.Provider,{value:E,children:P})}),$.jsx(j,{in:w,timeout:"auto",..._,children:$.jsx("div",{"aria-labelledby":P.props.id,id:P.props["aria-controls"],role:"region",className:k.region,children:T})})]})});function oCe(e){return tt("MuiAccordionDetails",e)}ot("MuiAccordionDetails",["root"]);const iCe=e=>{const{classes:t}=e;return rt({root:["root"]},oCe,t)},aCe=oe("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({padding:e.spacing(1,2,2)}))),FF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAccordionDetails"}),{className:o,...i}=r,a=r,s=iCe(a);return $.jsx(aCe,{className:de(s.root,o),ref:n,ownerState:a,...i})});class FT{constructor(){nn(this,"mountEffect",()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())});this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}static create(){return new FT}static use(){const t=pX(FT.create).current,[n,r]=y.useState(!1);return t.shouldMount=n,t.setShouldMount=r,y.useEffect(t.mountEffect,[n]),t}mount(){return this.mounted||(this.mounted=lCe(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}start(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.start(...t)})}stop(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.stop(...t)})}pulsate(...t){this.mount().then(()=>{var n;return(n=this.ref.current)==null?void 0:n.pulsate(...t)})}}function sCe(){return FT.use()}function lCe(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function cCe(e){const{className:t,classes:n,pulsate:r=!1,rippleX:o,rippleY:i,rippleSize:a,in:s,onExited:l,timeout:c}=e,[u,d]=y.useState(!1),f=de(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),p={width:a,height:a,top:-(a/2)+i,left:-(a/2)+o},m=de(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),y.useEffect(()=>{if(!s&&l!=null){const g=setTimeout(l,c);return()=>{clearTimeout(g)}}},[l,s,c]),$.jsx("span",{className:f,style:p,children:$.jsx("span",{className:m})})}const zs=ot("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),c_=550,uCe=80,dCe=qc` 0% { transform: scale(0); opacity: 0.1; @@ -103,7 +103,7 @@ Error generating stack: `+i.message+` transform: scale(1); opacity: 0.3; } -`,X1e=Uc` +`,fCe=qc` 0% { opacity: 1; } @@ -111,7 +111,7 @@ Error generating stack: `+i.message+` 100% { opacity: 0; } -`,Q1e=Uc` +`,pCe=qc` 0% { transform: scale(1); } @@ -123,23 +123,23 @@ Error generating stack: `+i.message+` 100% { transform: scale(1); } -`,J1e=oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Z1e=oe(q1e,{name:"MuiTouchRipple",slot:"Ripple"})` +`,hCe=oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),mCe=oe(cCe,{name:"MuiTouchRipple",slot:"Ripple"})` opacity: 0; position: absolute; - &.${Bs.rippleVisible} { + &.${zs.rippleVisible} { opacity: 0.3; transform: scale(1); - animation-name: ${Y1e}; - animation-duration: ${Z2}ms; + animation-name: ${dCe}; + animation-duration: ${c_}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } - &.${Bs.ripplePulsate} { + &.${zs.ripplePulsate} { animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms; } - & .${Bs.child} { + & .${zs.child} { opacity: 1; display: block; width: 100%; @@ -148,26 +148,26 @@ Error generating stack: `+i.message+` background-color: currentColor; } - & .${Bs.childLeaving} { + & .${zs.childLeaving} { opacity: 0; - animation-name: ${X1e}; - animation-duration: ${Z2}ms; + animation-name: ${fCe}; + animation-duration: ${c_}ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; } - & .${Bs.childPulsate} { + & .${zs.childPulsate} { position: absolute; /* @noflip */ left: 0px; top: 0; - animation-name: ${Q1e}; + animation-name: ${pCe}; animation-duration: 2500ms; animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut}; animation-iteration-count: infinite; animation-delay: 200ms; } -`,eCe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=y.useState([]),u=y.useRef(0),d=y.useRef(null);y.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=y.useRef(!1),h=Zd(),m=y.useRef(null),g=y.useRef(null),v=y.useCallback(P=>{const{pulsate:T,rippleX:E,rippleY:O,rippleSize:k,cb:A}=P;c(I=>[...I,$.jsx(Z1e,{classes:{ripple:fe(i.ripple,Bs.ripple),rippleVisible:fe(i.rippleVisible,Bs.rippleVisible),ripplePulsate:fe(i.ripplePulsate,Bs.ripplePulsate),child:fe(i.child,Bs.child),childLeaving:fe(i.childLeaving,Bs.childLeaving),childPulsate:fe(i.childPulsate,Bs.childPulsate)},timeout:Z2,pulsate:T,rippleX:E,rippleY:O,rippleSize:k},u.current)]),u.current+=1,d.current=A},[i]),w=y.useCallback((P={},T={},E=()=>{})=>{const{pulsate:O=!1,center:k=o||T.pulsate,fakeElement:A=!1}=T;if((P==null?void 0:P.type)==="mousedown"&&f.current){f.current=!1;return}(P==null?void 0:P.type)==="touchstart"&&(f.current=!0);const I=A?null:g.current,R=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,L,B;if(k||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)N=Math.round(R.width/2),L=Math.round(R.height/2);else{const{clientX:_,clientY:D}=P.touches&&P.touches.length>0?P.touches[0]:P;N=Math.round(_-R.left),L=Math.round(D-R.top)}if(k)B=Math.sqrt((2*R.width**2+R.height**2)/3),B%2===0&&(B+=1);else{const _=Math.max(Math.abs((I?I.clientWidth:0)-N),N)*2+2,D=Math.max(Math.abs((I?I.clientHeight:0)-L),L)*2+2;B=Math.sqrt(_**2+D**2)}P!=null&&P.touches?m.current===null&&(m.current=()=>{v({pulsate:O,rippleX:N,rippleY:L,rippleSize:B,cb:E})},h.start(K1e,()=>{m.current&&(m.current(),m.current=null)})):v({pulsate:O,rippleX:N,rippleY:L,rippleSize:B,cb:E})},[o,v,h]),x=y.useCallback(()=>{w({},{pulsate:!0})},[w]),S=y.useCallback((P,T)=>{if(h.clear(),(P==null?void 0:P.type)==="touchend"&&m.current){m.current(),m.current=null,h.start(0,()=>{S(P,T)});return}m.current=null,c(E=>E.length>0?E.slice(1):E),d.current=T},[h]);return y.useImperativeHandle(n,()=>({pulsate:x,start:w,stop:S}),[x,w,S]),$.jsx(J1e,{className:fe(Bs.root,i.root,a),ref:g,...s,children:$.jsx(vS,{component:null,exit:!0,children:l})})});function tCe(e){return tt("MuiButtonBase",e)}const nCe=ot("MuiButtonBase",["root","disabled","focusVisible"]),rCe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=rt({root:["root",t&&"disabled",n&&"focusVisible"]},tCe,o);return n&&r&&(a.root+=` ${r}`),a},oCe=oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${nCe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ki=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:h,LinkComponent:m="a",onBlur:g,onClick:v,onContextMenu:w,onDragLeave:x,onFocus:S,onFocusVisible:P,onKeyDown:T,onKeyUp:E,onMouseDown:O,onMouseLeave:k,onMouseUp:A,onTouchEnd:I,onTouchMove:R,onTouchStart:N,tabIndex:L=0,TouchRippleProps:B,touchRippleRef:_,type:D,...z}=r,F=y.useRef(null),H=W1e(),U=Cr(H.ref,_),[q,Y]=y.useState(!1);c&&q&&Y(!1),y.useImperativeHandle(o,()=>({focusVisible:()=>{Y(!0),F.current.focus()}}),[]);const ae=H.shouldMount&&!u&&!c;y.useEffect(()=>{q&&f&&!u&&H.pulsate()},[u,f,q,H]);function Z(Te,Oe,Me=d){return Wo(Ue=>(Oe&&Oe(Ue),Me||H[Te](Ue),!0))}const K=Z("start",O),te=Z("stop",w),pe=Z("stop",x),ie=Z("stop",A),le=Z("stop",Te=>{q&&Te.preventDefault(),k&&k(Te)}),re=Z("start",N),de=Z("stop",I),ee=Z("stop",R),ce=Z("stop",Te=>{XP(Te.target)||Y(!1),g&&g(Te)},!1),me=Wo(Te=>{F.current||(F.current=Te.currentTarget),XP(Te.target)&&(Y(!0),P&&P(Te)),S&&S(Te)}),we=()=>{const Te=F.current;return l&&l!=="button"&&!(Te.tagName==="A"&&Te.href)},ge=Wo(Te=>{f&&!Te.repeat&&q&&Te.key===" "&&H.stop(Te,()=>{H.start(Te)}),Te.target===Te.currentTarget&&we()&&Te.key===" "&&Te.preventDefault(),T&&T(Te),Te.target===Te.currentTarget&&we()&&Te.key==="Enter"&&!c&&(Te.preventDefault(),v&&v(Te))}),Se=Wo(Te=>{f&&Te.key===" "&&q&&!Te.defaultPrevented&&H.stop(Te,()=>{H.pulsate(Te)}),E&&E(Te),v&&Te.target===Te.currentTarget&&we()&&Te.key===" "&&!Te.defaultPrevented&&v(Te)});let xe=l;xe==="button"&&(z.href||z.to)&&(xe=m);const Ie={};xe==="button"?(Ie.type=D===void 0?"button":D,Ie.disabled=c):(!z.href&&!z.to&&(Ie.role="button"),c&&(Ie["aria-disabled"]=c));const Re=Cr(n,F),_e={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:L,focusVisible:q},ye=rCe(_e);return $.jsxs(oCe,{as:xe,className:fe(ye.root,s),ownerState:_e,onBlur:ce,onClick:v,onContextMenu:te,onFocus:me,onKeyDown:ge,onKeyUp:Se,onMouseDown:K,onMouseLeave:le,onMouseUp:ie,onDragLeave:pe,onTouchEnd:de,onTouchMove:ee,onTouchStart:re,ref:Re,tabIndex:c?-1:L,type:D,...Ie,...z,children:[a,ae?$.jsx(eCe,{ref:U,center:i,...B}):null]})});function iCe(e){return tt("MuiAccordionSummary",e)}const Cg=ot("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),aCe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return rt({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},iCe,t)},sCe=oe(Ki,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${Cg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Cg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${Cg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${Cg.expanded}`]:{minHeight:64}}}]}})),lCe=oe("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(Ze(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${Cg.expanded}`]:{margin:"20px 0"}}}]}))),cCe=oe("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(Ze(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${Cg.expanded}`]:{transform:"rotate(180deg)"}}))),IF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,...c}=r,{disabled:u=!1,disableGutters:d,expanded:f,toggle:h}=y.useContext(jJ),m=w=>{h&&h(w),l&&l(w)},g={...r,expanded:f,disabled:u,disableGutters:d},v=aCe(g);return $.jsxs(sCe,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:fe(v.root,i),focusVisibleClassName:fe(v.focusVisible,s),onClick:m,ref:n,ownerState:g,...c,children:[$.jsx(lCe,{className:v.content,ownerState:g,children:o}),a&&$.jsx(cCe,{className:v.expandIconWrapper,ownerState:g,children:a})]})});function uCe(e){return typeof e.main=="string"}function dCe(e,t=[]){if(!uCe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function Bn(e=[]){return([,t])=>t&&dCe(t,e)}function fCe(e){return tt("MuiAlert",e)}const vU=ot("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function pCe(e){return tt("MuiIconButton",e)}const hCe=ot("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),mCe=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Ce(r)}`,o&&`edge${Ce(o)}`,`size${Ce(i)}`]};return rt(a,pCe,t)},gCe=oe(Ki,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})(Ze(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ze(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${hCe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}}))),kn=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",...d}=r,f={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,size:u},h=mCe(f);return $.jsx(gCe,{className:fe(h.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n,...d,ownerState:f,children:i})}),yCe=st($.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),vCe=st($.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),bCe=st($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),wCe=st($.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),BJ=st($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),xCe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Ce(n||r)}`,`${t}${Ce(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return rt(i,fCe,o)},SCe=oe(co,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color||n.severity)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?ju:Bu,n=e.palette.mode==="light"?Bu:ju;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(Bn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${vU.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Bn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${vU.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(Bn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),CCe=oe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),PCe=oe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),bU=oe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),wU={success:$.jsx(yCe,{fontSize:"inherit"}),warning:$.jsx(vCe,{fontSize:"inherit"}),error:$.jsx(bCe,{fontSize:"inherit"}),info:$.jsx(wCe,{fontSize:"inherit"})},Wu=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=wU,onClose:h,role:m="alert",severity:g="success",slotProps:v={},slots:w={},variant:x="standard",...S}=r,P={...r,color:l,severity:g,variant:x,colorSeverity:l||g},T=xCe(P),E={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...v}},[O,k]=hr("closeButton",{elementType:kn,externalForwardedProps:E,ownerState:P}),[A,I]=hr("closeIcon",{elementType:BJ,externalForwardedProps:E,ownerState:P});return $.jsxs(SCe,{role:m,elevation:0,ownerState:P,className:fe(T.root,a),ref:n,...S,children:[d!==!1?$.jsx(CCe,{ownerState:P,className:T.icon,children:d||f[g]||wU[g]}):null,$.jsx(PCe,{ownerState:P,className:T.message,children:i}),o!=null?$.jsx(bU,{ownerState:P,className:T.action,children:o}):null,o==null&&h?$.jsx(bU,{ownerState:P,className:T.action,children:$.jsx(O,{size:"small","aria-label":s,title:s,color:"inherit",onClick:h,...k,children:$.jsx(A,{fontSize:"small",...I})})}):null]})});function TCe(e){return tt("MuiTypography",e)}const OT=ot("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),ECe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},OCe=pxe(),ICe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Ce(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return rt(s,TCe,a)},kCe=oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ze(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(Bn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Ce(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),xU={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},dt=y.forwardRef(function(t,n){const{color:r,...o}=it({props:t,name:"MuiTypography"}),i=!ECe[r],a=OCe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:h="body1",variantMapping:m=xU,...g}=a,v={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:h,variantMapping:m},w=c||(f?"p":m[h]||xU[h])||"span",x=ICe(v);return $.jsx(kCe,{as:w,ref:n,className:fe(x.root,l),...g,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function MCe(e){return tt("MuiAlertTitle",e)}ot("MuiAlertTitle",["root"]);const ACe=e=>{const{classes:t}=e;return rt({root:["root"]},MCe,t)},$Ce=oe(dt,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),IT=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=ACe(a);return $.jsx($Ce,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:fe(s.root,o),...i})});function RCe(e){return tt("MuiAppBar",e)}ot("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const _Ce=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Ce(t)}`,`position${Ce(n)}`]};return rt(o,RCe,r)},SU=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,DCe=oe(co,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?SU(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?SU(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),NCe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=_Ce(c);return $.jsx(DCe,{square:!0,component:"header",ownerState:c,elevation:4,className:fe(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function CU(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function zJ(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=CU(u));const d=u?s.filter(f=>{let h=(i||c)(f);return n&&(h=h.toLowerCase()),t&&(h=CU(h)),o==="start"?h.startsWith(u):h.includes(u)}):s;return typeof r=="number"?d.slice(0,r):d}}const LCe=zJ(),PU=5,FCe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},jCe=[];function BCe(e){const{unstable_isActiveElementInListbox:t=FCe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?jCe:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:h,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=LCe,filterSelectedOptions:w=!1,freeSolo:x=!1,getOptionDisabled:S,getOptionKey:P,getOptionLabel:T=Ve=>Ve.label??Ve,groupBy:E,handleHomeEndKeys:O=!e.freeSolo,id:k,includeInputInList:A=!1,inputValue:I,isOptionEqualToValue:R=(Ve,Ne)=>Ve===Ne,multiple:N=!1,onChange:L,onClose:B,onHighlightChange:_,onInputChange:D,onOpen:z,open:F,openOnFocus:H=!1,options:U,readOnly:q=!1,selectOnFocus:Y=!e.freeSolo,value:ae}=e,Z=dh(k);let K=T;K=Ve=>{const Ne=T(Ve);return typeof Ne!="string"?String(Ne):Ne};const te=y.useRef(!1),pe=y.useRef(!0),ie=y.useRef(null),le=y.useRef(null),[re,de]=y.useState(null),[ee,ce]=y.useState(-1),me=o?0:-1,we=y.useRef(me),[ge,Se]=Ou({controlled:ae,default:u,name:c}),[xe,Ie]=Ou({controlled:I,default:"",name:c,state:"inputValue"}),[Re,_e]=y.useState(!1),ye=y.useCallback((Ve,Ne,wt)=>{if(!(N?ge.length!(w&&(N?ge:[ge]).some(Ne=>Ne!==null&&R(Ve,Ne)))),{inputValue:ze&&Me?"":xe,getOptionLabel:K}):[],nt=TL({filteredOptions:ct,value:ge,inputValue:xe});y.useEffect(()=>{const Ve=ge!==nt.value;Re&&!Ve||x&&!Ve||ye(null,ge,"reset")},[ge,ye,Re,nt.value,x]);const et=Te&&ct.length>0&&!q,yt=Wo(Ve=>{Ve===-1?ie.current.focus():re.querySelector(`[data-tag-index="${Ve}"]`).focus()});y.useEffect(()=>{N&&ee>ge.length-1&&(ce(-1),yt(-1))},[ge,N,ee,yt]);function vn(Ve,Ne){if(!le.current||Ve<0||Ve>=ct.length)return-1;let wt=Ve;for(;;){const en=le.current.querySelector(`[data-option-index="${wt}"]`),on=m?!1:!en||en.disabled||en.getAttribute("aria-disabled")==="true";if(en&&en.hasAttribute("tabindex")&&!on)return wt;if(Ne==="next"?wt=(wt+1)%ct.length:wt=(wt-1+ct.length)%ct.length,wt===Ve)return-1}}const Ke=Wo(({event:Ve,index:Ne,reason:wt="auto"})=>{if(we.current=Ne,Ne===-1?ie.current.removeAttribute("aria-activedescendant"):ie.current.setAttribute("aria-activedescendant",`${Z}-option-${Ne}`),_&&_(Ve,Ne===-1?null:ct[Ne],wt),!le.current)return;const en=le.current.querySelector(`[role="option"].${n}-focused`);en&&(en.classList.remove(`${n}-focused`),en.classList.remove(`${n}-focusVisible`));let on=le.current;if(le.current.getAttribute("role")!=="listbox"&&(on=le.current.parentElement.querySelector('[role="listbox"]')),!on)return;if(Ne===-1){on.scrollTop=0;return}const $r=le.current.querySelector(`[data-option-index="${Ne}"]`);if($r&&($r.classList.add(`${n}-focused`),wt==="keyboard"&&$r.classList.add(`${n}-focusVisible`),on.scrollHeight>on.clientHeight&&wt!=="mouse"&&wt!=="touch")){const Wn=$r,Oa=on.clientHeight+on.scrollTop,eu=Wn.offsetTop+Wn.offsetHeight;eu>Oa?on.scrollTop=eu-on.clientHeight:Wn.offsetTop-Wn.offsetHeight*(E?1.3:0){if(!Qe)return;const $r=vn((()=>{const Wn=ct.length-1;if(Ne==="reset")return me;if(Ne==="start")return 0;if(Ne==="end")return Wn;const Oa=we.current+Ne;return Oa<0?Oa===-1&&A?-1:g&&we.current!==-1||Math.abs(Ne)>1?0:Wn:Oa>Wn?Oa===Wn+1&&A?-1:g||Math.abs(Ne)>1?Wn:0:Oa})(),wt);if(Ke({index:$r,reason:en,event:Ve}),r&&Ne!=="reset")if($r===-1)ie.current.value=xe;else{const Wn=K(ct[$r]);ie.current.value=Wn,Wn.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&ie.current.setSelectionRange(xe.length,Wn.length)}}),Xe=()=>{const Ve=(Ne,wt)=>{const en=Ne?K(Ne):"",on=wt?K(wt):"";return en===on};if(we.current!==-1&&nt.filteredOptions&&nt.filteredOptions.length!==ct.length&&nt.inputValue===xe&&(N?ge.length===nt.value.length&&nt.value.every((Ne,wt)=>K(ge[wt])===K(Ne)):Ve(nt.value,ge))){const Ne=nt.filteredOptions[we.current];if(Ne)return ct.findIndex(wt=>K(wt)===K(Ne))}return-1},bt=y.useCallback(()=>{if(!Qe)return;const Ve=Xe();if(Ve!==-1){we.current=Ve;return}const Ne=N?ge[0]:ge;if(ct.length===0||Ne==null){$e({diff:"reset"});return}if(le.current){if(Ne!=null){const wt=ct[we.current];if(N&&wt&&ge.findIndex(on=>R(wt,on))!==-1)return;const en=ct.findIndex(on=>R(on,Ne));en===-1?$e({diff:"reset"}):Ke({index:en});return}if(we.current>=ct.length-1){Ke({index:ct.length-1});return}Ke({index:we.current})}},[ct.length,N?!1:ge,w,$e,Ke,Qe,xe,N]),zt=Wo(Ve=>{YP(le,Ve),Ve&&bt()});y.useEffect(()=>{bt()},[bt]);const Ot=Ve=>{Te||(Oe(!0),Ue(!0),z&&z(Ve))},cn=(Ve,Ne)=>{Te&&(Oe(!1),B&&B(Ve,Ne))},Fn=(Ve,Ne,wt,en)=>{if(N){if(ge.length===Ne.length&&ge.every((on,$r)=>on===Ne[$r]))return}else if(ge===Ne)return;L&&L(Ve,Ne,wt,en),Se(Ne)},Un=y.useRef(!1),Po=(Ve,Ne,wt="selectOption",en="options")=>{let on=wt,$r=Ne;if(N){$r=Array.isArray(ge)?ge.slice():[];const Wn=$r.findIndex(Oa=>R(Ne,Oa));Wn===-1?$r.push(Ne):en!=="freeSolo"&&($r.splice(Wn,1),on="removeOption")}ye(Ve,$r,on),Fn(Ve,$r,on,{option:Ne}),!f&&(!Ve||!Ve.ctrlKey&&!Ve.metaKey)&&cn(Ve,on),(a===!0||a==="touch"&&Un.current||a==="mouse"&&!Un.current)&&ie.current.blur()};function qr(Ve,Ne){if(Ve===-1)return-1;let wt=Ve;for(;;){if(Ne==="next"&&wt===ge.length||Ne==="previous"&&wt===-1)return-1;const en=re.querySelector(`[data-tag-index="${wt}"]`);if(!en||!en.hasAttribute("tabindex")||en.disabled||en.getAttribute("aria-disabled")==="true")wt+=Ne==="next"?1:-1;else return wt}}const Ii=(Ve,Ne)=>{if(!N)return;xe===""&&cn(Ve,"toggleInput");let wt=ee;ee===-1?xe===""&&Ne==="previous"&&(wt=ge.length-1):(wt+=Ne==="next"?1:-1,wt<0&&(wt=0),wt===ge.length&&(wt=-1)),wt=qr(wt,Ne),ce(wt),yt(wt)},gs=Ve=>{te.current=!0,Ie(""),D&&D(Ve,"","clear"),Fn(Ve,N?[]:null,"clear")},Ut=Ve=>Ne=>{if(Ve.onKeyDown&&Ve.onKeyDown(Ne),!Ne.defaultMuiPrevented&&(ee!==-1&&!["ArrowLeft","ArrowRight"].includes(Ne.key)&&(ce(-1),yt(-1)),Ne.which!==229))switch(Ne.key){case"Home":Qe&&O&&(Ne.preventDefault(),$e({diff:"start",direction:"next",reason:"keyboard",event:Ne}));break;case"End":Qe&&O&&(Ne.preventDefault(),$e({diff:"end",direction:"previous",reason:"keyboard",event:Ne}));break;case"PageUp":Ne.preventDefault(),$e({diff:-PU,direction:"previous",reason:"keyboard",event:Ne}),Ot(Ne);break;case"PageDown":Ne.preventDefault(),$e({diff:PU,direction:"next",reason:"keyboard",event:Ne}),Ot(Ne);break;case"ArrowDown":Ne.preventDefault(),$e({diff:1,direction:"next",reason:"keyboard",event:Ne}),Ot(Ne);break;case"ArrowUp":Ne.preventDefault(),$e({diff:-1,direction:"previous",reason:"keyboard",event:Ne}),Ot(Ne);break;case"ArrowLeft":Ii(Ne,"previous");break;case"ArrowRight":Ii(Ne,"next");break;case"Enter":if(we.current!==-1&&Qe){const wt=ct[we.current],en=S?S(wt):!1;if(Ne.preventDefault(),en)return;Po(Ne,wt,"selectOption"),r&&ie.current.setSelectionRange(ie.current.value.length,ie.current.value.length)}else x&&xe!==""&&ze===!1&&(N&&Ne.preventDefault(),Po(Ne,xe,"createOption","freeSolo"));break;case"Escape":Qe?(Ne.preventDefault(),Ne.stopPropagation(),cn(Ne,"escape")):l&&(xe!==""||N&&ge.length>0)&&(Ne.preventDefault(),Ne.stopPropagation(),gs(Ne));break;case"Backspace":if(N&&!q&&xe===""&&ge.length>0){const wt=ee===-1?ge.length-1:ee,en=ge.slice();en.splice(wt,1),Fn(Ne,en,"removeOption",{option:ge[wt]})}break;case"Delete":if(N&&!q&&xe===""&&ge.length>0&&ee!==-1){const wt=ee,en=ge.slice();en.splice(wt,1),Fn(Ne,en,"removeOption",{option:ge[wt]})}break}},Yo=Ve=>{_e(!0),H&&!te.current&&Ot(Ve)},lm=Ve=>{if(t(le)){ie.current.focus();return}_e(!1),pe.current=!0,te.current=!1,i&&we.current!==-1&&Qe?Po(Ve,ct[we.current],"blur"):i&&x&&xe!==""?Po(Ve,xe,"blur","freeSolo"):s&&ye(Ve,ge,"blur"),cn(Ve,"blur")},fd=Ve=>{const Ne=Ve.target.value;xe!==Ne&&(Ie(Ne),Ue(!1),D&&D(Ve,Ne,"input")),Ne===""?!d&&!N&&Fn(Ve,null,"clear"):Ot(Ve)},Zc=Ve=>{const Ne=Number(Ve.currentTarget.getAttribute("data-option-index"));we.current!==Ne&&Ke({event:Ve,index:Ne,reason:"mouse"})},ep=Ve=>{Ke({event:Ve,index:Number(Ve.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Un.current=!0},tp=Ve=>{const Ne=Number(Ve.currentTarget.getAttribute("data-option-index"));Po(Ve,ct[Ne],"selectOption"),Un.current=!1},Cb=Ve=>Ne=>{const wt=ge.slice();wt.splice(Ve,1),Fn(Ne,wt,"removeOption",{option:ge[Ve]})},cm=Ve=>{Te?cn(Ve,"toggleInput"):Ot(Ve)},u1=Ve=>{Ve.currentTarget.contains(Ve.target)&&Ve.target.getAttribute("id")!==Z&&Ve.preventDefault()},np=Ve=>{Ve.currentTarget.contains(Ve.target)&&(ie.current.focus(),Y&&pe.current&&ie.current.selectionEnd-ie.current.selectionStart===0&&ie.current.select(),pe.current=!1)},Lo=Ve=>{!h&&(xe===""||!Te)&&cm(Ve)};let Kr=x&&xe.length>0;Kr=Kr||(N?ge.length>0:ge!==null);let vl=ct;return E&&(vl=ct.reduce((Ve,Ne,wt)=>{const en=E(Ne);return Ve.length>0&&Ve[Ve.length-1].group===en?Ve[Ve.length-1].options.push(Ne):Ve.push({key:wt,index:wt,group:en,options:[Ne]}),Ve},[])),h&&Re&&lm(),{getRootProps:(Ve={})=>({"aria-owns":et?`${Z}-listbox`:null,...Ve,onKeyDown:Ut(Ve),onMouseDown:u1,onClick:np}),getInputLabelProps:()=>({id:`${Z}-label`,htmlFor:Z}),getInputProps:()=>({id:Z,value:xe,onBlur:lm,onFocus:Yo,onChange:fd,onMouseDown:Lo,"aria-activedescendant":Qe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":et?`${Z}-listbox`:void 0,"aria-expanded":et,autoComplete:"off",ref:ie,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:h}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:gs}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:cm}),getTagProps:({index:Ve})=>({key:Ve,"data-tag-index":Ve,tabIndex:-1,...!q&&{onDelete:Cb(Ve)}}),getListboxProps:()=>({role:"listbox",id:`${Z}-listbox`,"aria-labelledby":`${Z}-label`,ref:zt,onMouseDown:Ve=>{Ve.preventDefault()}}),getOptionProps:({index:Ve,option:Ne})=>{const wt=(N?ge:[ge]).some(on=>on!=null&&R(Ne,on)),en=S?S(Ne):!1;return{key:(P==null?void 0:P(Ne))??K(Ne),tabIndex:-1,role:"option",id:`${Z}-option-${Ve}`,onMouseMove:Zc,onClick:tp,onTouchStart:ep,"data-option-index":Ve,"aria-disabled":en,"aria-selected":wt}},id:Z,inputValue:xe,value:ge,dirty:Kr,expanded:Qe&&re,popupOpen:Qe,focused:Re||ee!==-1,anchorEl:re,setAnchorEl:de,focusedTag:ee,groupedOptions:vl}}var ba="top",al="bottom",sl="right",wa="left",kF="auto",bS=[ba,al,sl,wa],My="start",Kw="end",zCe="clippingParents",VJ="viewport",Yb="popper",VCe="reference",TU=bS.reduce(function(e,t){return e.concat([t+"-"+My,t+"-"+Kw])},[]),HJ=[].concat(bS,[kF]).reduce(function(e,t){return e.concat([t,t+"-"+My,t+"-"+Kw])},[]),HCe="beforeRead",UCe="read",WCe="afterRead",GCe="beforeMain",qCe="main",KCe="afterMain",YCe="beforeWrite",XCe="write",QCe="afterWrite",JCe=[HCe,UCe,WCe,GCe,qCe,KCe,YCe,XCe,QCe];function Fc(e){return e?(e.nodeName||"").toLowerCase():null}function is(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function bh(e){var t=is(e).Element;return e instanceof t||e instanceof Element}function el(e){var t=is(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function MF(e){if(typeof ShadowRoot>"u")return!1;var t=is(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function ZCe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!el(i)||!Fc(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function ePe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!el(o)||!Fc(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const tPe={name:"applyStyles",enabled:!0,phase:"write",fn:ZCe,effect:ePe,requires:["computeStyles"]};function kc(e){return e.split("-")[0]}var Zp=Math.max,kT=Math.min,Ay=Math.round;function e_(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function UJ(){return!/^((?!chrome|android).)*safari/i.test(e_())}function $y(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&el(e)&&(o=e.offsetWidth>0&&Ay(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&Ay(r.height)/e.offsetHeight||1);var a=bh(e)?is(e):window,s=a.visualViewport,l=!UJ()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function AF(e){var t=$y(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function WJ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&MF(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Gu(e){return is(e).getComputedStyle(e)}function nPe(e){return["table","td","th"].indexOf(Fc(e))>=0}function Lf(e){return((bh(e)?e.ownerDocument:e.document)||window.document).documentElement}function bI(e){return Fc(e)==="html"?e:e.assignedSlot||e.parentNode||(MF(e)?e.host:null)||Lf(e)}function EU(e){return!el(e)||Gu(e).position==="fixed"?null:e.offsetParent}function rPe(e){var t=/firefox/i.test(e_()),n=/Trident/i.test(e_());if(n&&el(e)){var r=Gu(e);if(r.position==="fixed")return null}var o=bI(e);for(MF(o)&&(o=o.host);el(o)&&["html","body"].indexOf(Fc(o))<0;){var i=Gu(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function wS(e){for(var t=is(e),n=EU(e);n&&nPe(n)&&Gu(n).position==="static";)n=EU(n);return n&&(Fc(n)==="html"||Fc(n)==="body"&&Gu(n).position==="static")?t:n||rPe(e)||t}function $F(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function nw(e,t,n){return Zp(e,kT(t,n))}function oPe(e,t,n){var r=nw(e,t,n);return r>n?n:r}function GJ(){return{top:0,right:0,bottom:0,left:0}}function qJ(e){return Object.assign({},GJ(),e)}function KJ(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var iPe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,qJ(typeof t!="number"?t:KJ(t,bS))};function aPe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=kc(n.placement),l=$F(s),c=[wa,sl].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=iPe(o.padding,n),f=AF(i),h=l==="y"?ba:wa,m=l==="y"?al:sl,g=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],w=wS(i),x=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,S=g/2-v/2,P=d[h],T=x-f[u]-d[m],E=x/2-f[u]/2+S,O=nw(P,E,T),k=l;n.modifiersData[r]=(t={},t[k]=O,t.centerOffset=O-E,t)}}function sPe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||WJ(t.elements.popper,o)&&(t.elements.arrow=o))}const lPe={name:"arrow",enabled:!0,phase:"main",fn:aPe,effect:sPe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ry(e){return e.split("-")[1]}var cPe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function uPe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:Ay(n*o)/o||0,y:Ay(r*o)/o||0}}function OU(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:h,y:g}):{x:h,y:g};h=v.x,g=v.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),S=wa,P=ba,T=window;if(c){var E=wS(n),O="clientHeight",k="clientWidth";if(E===is(n)&&(E=Lf(n),Gu(E).position!=="static"&&s==="absolute"&&(O="scrollHeight",k="scrollWidth")),E=E,o===ba||(o===wa||o===sl)&&i===Kw){P=al;var A=d&&E===T&&T.visualViewport?T.visualViewport.height:E[O];g-=A-r.height,g*=l?1:-1}if(o===wa||(o===ba||o===al)&&i===Kw){S=sl;var I=d&&E===T&&T.visualViewport?T.visualViewport.width:E[k];h-=I-r.width,h*=l?1:-1}}var R=Object.assign({position:s},c&&cPe),N=u===!0?uPe({x:h,y:g},is(n)):{x:h,y:g};if(h=N.x,g=N.y,l){var L;return Object.assign({},R,(L={},L[P]=x?"0":"",L[S]=w?"0":"",L.transform=(T.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",L))}return Object.assign({},R,(t={},t[P]=x?g+"px":"",t[S]=w?h+"px":"",t.transform="",t))}function dPe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:kc(t.placement),variation:Ry(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,OU(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,OU(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const fPe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:dPe,data:{}};var CC={passive:!0};function pPe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=is(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,CC)}),s&&l.addEventListener("resize",n.update,CC),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,CC)}),s&&l.removeEventListener("resize",n.update,CC)}}const hPe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:pPe,data:{}};var mPe={left:"right",right:"left",bottom:"top",top:"bottom"};function IP(e){return e.replace(/left|right|bottom|top/g,function(t){return mPe[t]})}var gPe={start:"end",end:"start"};function IU(e){return e.replace(/start|end/g,function(t){return gPe[t]})}function RF(e){var t=is(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function _F(e){return $y(Lf(e)).left+RF(e).scrollLeft}function yPe(e,t){var n=is(e),r=Lf(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=UJ();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+_F(e),y:l}}function vPe(e){var t,n=Lf(e),r=RF(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=Zp(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=Zp(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+_F(e),l=-r.scrollTop;return Gu(o||n).direction==="rtl"&&(s+=Zp(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function DF(e){var t=Gu(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function YJ(e){return["html","body","#document"].indexOf(Fc(e))>=0?e.ownerDocument.body:el(e)&&DF(e)?e:YJ(bI(e))}function rw(e,t){var n;t===void 0&&(t=[]);var r=YJ(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=is(r),a=o?[i].concat(i.visualViewport||[],DF(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(rw(bI(a)))}function t_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function bPe(e,t){var n=$y(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function kU(e,t,n){return t===VJ?t_(yPe(e,n)):bh(t)?bPe(t,n):t_(vPe(Lf(e)))}function wPe(e){var t=rw(bI(e)),n=["absolute","fixed"].indexOf(Gu(e).position)>=0,r=n&&el(e)?wS(e):e;return bh(r)?t.filter(function(o){return bh(o)&&WJ(o,r)&&Fc(o)!=="body"}):[]}function xPe(e,t,n,r){var o=t==="clippingParents"?wPe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=kU(e,c,r);return l.top=Zp(u.top,l.top),l.right=kT(u.right,l.right),l.bottom=kT(u.bottom,l.bottom),l.left=Zp(u.left,l.left),l},kU(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function XJ(e){var t=e.reference,n=e.element,r=e.placement,o=r?kc(r):null,i=r?Ry(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case ba:l={x:a,y:t.y-n.height};break;case al:l={x:a,y:t.y+t.height};break;case sl:l={x:t.x+t.width,y:s};break;case wa:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?$F(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case My:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Kw:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Yw(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?zCe:s,c=n.rootBoundary,u=c===void 0?VJ:c,d=n.elementContext,f=d===void 0?Yb:d,h=n.altBoundary,m=h===void 0?!1:h,g=n.padding,v=g===void 0?0:g,w=qJ(typeof v!="number"?v:KJ(v,bS)),x=f===Yb?VCe:Yb,S=e.rects.popper,P=e.elements[m?x:f],T=xPe(bh(P)?P:P.contextElement||Lf(e.elements.popper),l,u,a),E=$y(e.elements.reference),O=XJ({reference:E,element:S,strategy:"absolute",placement:o}),k=t_(Object.assign({},S,O)),A=f===Yb?k:E,I={top:T.top-A.top+w.top,bottom:A.bottom-T.bottom+w.bottom,left:T.left-A.left+w.left,right:A.right-T.right+w.right},R=e.modifiersData.offset;if(f===Yb&&R){var N=R[o];Object.keys(I).forEach(function(L){var B=[sl,al].indexOf(L)>=0?1:-1,_=[ba,al].indexOf(L)>=0?"y":"x";I[L]+=N[_]*B})}return I}function SPe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?HJ:l,u=Ry(r),d=u?s?TU:TU.filter(function(m){return Ry(m)===u}):bS,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var h=f.reduce(function(m,g){return m[g]=Yw(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[kc(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function CPe(e){if(kc(e)===kF)return[];var t=IP(e);return[IU(e),t,IU(t)]}function PPe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,h=n.flipVariations,m=h===void 0?!0:h,g=n.allowedAutoPlacements,v=t.options.placement,w=kc(v),x=w===v,S=l||(x||!m?[IP(v)]:CPe(v)),P=[v].concat(S).reduce(function(Z,K){return Z.concat(kc(K)===kF?SPe(t,{placement:K,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):K)},[]),T=t.rects.reference,E=t.rects.popper,O=new Map,k=!0,A=P[0],I=0;I=0,_=B?"width":"height",D=Yw(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),z=B?L?sl:wa:L?al:ba;T[_]>E[_]&&(z=IP(z));var F=IP(z),H=[];if(i&&H.push(D[N]<=0),s&&H.push(D[z]<=0,D[F]<=0),H.every(function(Z){return Z})){A=R,k=!1;break}O.set(R,H)}if(k)for(var U=m?3:1,q=function(K){var te=P.find(function(pe){var ie=O.get(pe);if(ie)return ie.slice(0,K).every(function(le){return le})});if(te)return A=te,"break"},Y=U;Y>0;Y--){var ae=q(Y);if(ae==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const TPe={name:"flip",enabled:!0,phase:"main",fn:PPe,requiresIfExists:["offset"],data:{_skip:!1}};function MU(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function AU(e){return[ba,sl,al,wa].some(function(t){return e[t]>=0})}function EPe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=Yw(t,{elementContext:"reference"}),s=Yw(t,{altBoundary:!0}),l=MU(a,r),c=MU(s,o,i),u=AU(l),d=AU(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const OPe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:EPe};function IPe(e,t,n){var r=kc(e),o=[wa,ba].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[wa,sl].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function kPe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=HJ.reduce(function(u,d){return u[d]=IPe(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const MPe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:kPe};function APe(e){var t=e.state,n=e.name;t.modifiersData[n]=XJ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const $Pe={name:"popperOffsets",enabled:!0,phase:"read",fn:APe,data:{}};function RPe(e){return e==="x"?"y":"x"}function _Pe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,h=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,v=Yw(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=kc(t.placement),x=Ry(t.placement),S=!x,P=$F(w),T=RPe(P),E=t.modifiersData.popperOffsets,O=t.rects.reference,k=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,I=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(E){if(i){var L,B=P==="y"?ba:wa,_=P==="y"?al:sl,D=P==="y"?"height":"width",z=E[P],F=z+v[B],H=z-v[_],U=h?-k[D]/2:0,q=x===My?O[D]:k[D],Y=x===My?-k[D]:-O[D],ae=t.elements.arrow,Z=h&&ae?AF(ae):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:GJ(),te=K[B],pe=K[_],ie=nw(0,O[D],Z[D]),le=S?O[D]/2-U-ie-te-I.mainAxis:q-ie-te-I.mainAxis,re=S?-O[D]/2+U+ie+pe+I.mainAxis:Y+ie+pe+I.mainAxis,de=t.elements.arrow&&wS(t.elements.arrow),ee=de?P==="y"?de.clientTop||0:de.clientLeft||0:0,ce=(L=R==null?void 0:R[P])!=null?L:0,me=z+le-ce-ee,we=z+re-ce,ge=nw(h?kT(F,me):F,z,h?Zp(H,we):H);E[P]=ge,N[P]=ge-z}if(s){var Se,xe=P==="x"?ba:wa,Ie=P==="x"?al:sl,Re=E[T],_e=T==="y"?"height":"width",ye=Re+v[xe],Te=Re-v[Ie],Oe=[ba,wa].indexOf(w)!==-1,Me=(Se=R==null?void 0:R[T])!=null?Se:0,Ue=Oe?ye:Re-O[_e]-k[_e]-Me+I.altAxis,ze=Oe?Re+O[_e]+k[_e]-Me-I.altAxis:Te,Qe=h&&Oe?oPe(Ue,Re,ze):nw(h?Ue:ye,Re,h?ze:Te);E[T]=Qe,N[T]=Qe-Re}t.modifiersData[r]=N}}const DPe={name:"preventOverflow",enabled:!0,phase:"main",fn:_Pe,requiresIfExists:["offset"]};function NPe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function LPe(e){return e===is(e)||!el(e)?RF(e):NPe(e)}function FPe(e){var t=e.getBoundingClientRect(),n=Ay(t.width)/e.offsetWidth||1,r=Ay(t.height)/e.offsetHeight||1;return n!==1||r!==1}function jPe(e,t,n){n===void 0&&(n=!1);var r=el(t),o=el(t)&&FPe(t),i=Lf(t),a=$y(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Fc(t)!=="body"||DF(i))&&(s=LPe(t)),el(t)?(l=$y(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=_F(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function BPe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function zPe(e){var t=BPe(e);return JCe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function VPe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function HPe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var $U={placement:"bottom",modifiers:[],strategy:"absolute"};function RU(){for(var e=arguments.length,t=new Array(e),n=0;n{i||s(qPe(o)||document.body)},[o,i]),ns(()=>{if(a&&!i)return YP(n,a),()=>{YP(n,null)}},[n,a,i]),i){if(y.isValidElement(r)){const c={ref:l};return y.cloneElement(r,c)}return $.jsx(y.Fragment,{children:r})}return $.jsx(y.Fragment,{children:a&&vI.createPortal(r,a)})});function KPe(e){return tt("MuiPopper",e)}ot("MuiPopper",["root"]);function YPe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function n_(e){return typeof e=="function"?e():e}function XPe(e){return e.nodeType!==void 0}const QPe=e=>{const{classes:t}=e;return rt({root:["root"]},KPe,t)},JPe={},ZPe=y.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:h={},TransitionProps:m,ownerState:g,...v}=t,w=y.useRef(null),x=Cr(w,n),S=y.useRef(null),P=Cr(S,d),T=y.useRef(P);ns(()=>{T.current=P},[P]),y.useImperativeHandle(d,()=>S.current,[]);const E=YPe(c,i),[O,k]=y.useState(E),[A,I]=y.useState(n_(r));y.useEffect(()=>{S.current&&S.current.forceUpdate()}),y.useEffect(()=>{r&&I(n_(r))},[r]),ns(()=>{if(!A||!l)return;const _=F=>{k(F.placement)};let D=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:F})=>{_(F)}}];s!=null&&(D=D.concat(s)),u&&u.modifiers!=null&&(D=D.concat(u.modifiers));const z=GPe(A,w.current,{placement:E,...u,modifiers:D});return T.current(z),()=>{z.destroy(),T.current(null)}},[A,a,s,l,u,E]);const R={placement:O};m!==null&&(R.TransitionProps=m);const N=QPe(t),L=h.root??"div",B=Lc({elementType:L,externalSlotProps:f.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:N.root});return $.jsx(L,{...B,children:typeof o=="function"?o(R):o})}),eTe=y.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=JPe,popperRef:h,style:m,transition:g=!1,slotProps:v={},slots:w={},...x}=t,[S,P]=y.useState(!0),T=()=>{P(!1)},E=()=>{P(!0)};if(!l&&!u&&(!g||S))return null;let O;if(i)O=i;else if(r){const I=n_(r);O=I&&XPe(I)?ii(I).body:ii(null).body}const k=!u&&l&&(!g||S)?"none":void 0,A=g?{in:u,onEnter:T,onExited:E}:void 0;return $.jsx(QJ,{disablePortal:s,container:O,children:$.jsx(ZPe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:g?!S:u,placement:d,popperOptions:f,popperRef:h,slotProps:v,slots:w,...x,style:{position:"fixed",top:0,left:0,display:k,...m},TransitionProps:A,children:o})})}),tTe=oe(eTe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ff=y.forwardRef(function(t,n){const r=nr(),o=it({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:h,placement:m,popperOptions:g,popperRef:v,transition:w,slots:x,slotProps:S,...P}=o,T=(x==null?void 0:x.root)??(s==null?void 0:s.Root),E={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:h,placement:m,popperOptions:g,popperRef:v,transition:w,...P};return $.jsx(tTe,{as:a,direction:r?"rtl":"ltr",slots:{root:T},slotProps:S??l,...E,ref:n})});function nTe(e){return tt("MuiListSubheader",e)}ot("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const rTe=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Ce(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return rt(a,nTe,t)},oTe=oe("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Ze(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),r_=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},f=rTe(d);return $.jsx(oTe,{as:a,className:fe(f.root,o),ref:n,ownerState:d,...u})});r_&&(r_.muiSkipListHighlight=!0);const iTe=st($.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function aTe(e){return tt("MuiChip",e)}const Sn=ot("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),sTe=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Ce(r)}`,`color${Ce(o)}`,s&&"clickable",s&&`clickableColor${Ce(o)}`,a&&"deletable",a&&`deletableColor${Ce(o)}`,`${l}${Ce(o)}`],label:["label",`label${Ce(r)}`],avatar:["avatar",`avatar${Ce(r)}`,`avatarColor${Ce(o)}`],icon:["icon",`icon${Ce(r)}`,`iconColor${Ce(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Ce(r)}`,`deleteIconColor${Ce(o)}`,`deleteIcon${Ce(l)}Color${Ce(o)}`]};return rt(c,aTe,t)},lTe=oe("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Sn.avatar}`]:t.avatar},{[`& .${Sn.avatar}`]:t[`avatar${Ce(s)}`]},{[`& .${Sn.avatar}`]:t[`avatarColor${Ce(r)}`]},{[`& .${Sn.icon}`]:t.icon},{[`& .${Sn.icon}`]:t[`icon${Ce(s)}`]},{[`& .${Sn.icon}`]:t[`iconColor${Ce(o)}`]},{[`& .${Sn.deleteIcon}`]:t.deleteIcon},{[`& .${Sn.deleteIcon}`]:t[`deleteIcon${Ce(s)}`]},{[`& .${Sn.deleteIcon}`]:t[`deleteIconColor${Ce(r)}`]},{[`& .${Sn.deleteIcon}`]:t[`deleteIcon${Ce(l)}Color${Ce(r)}`]},t.root,t[`size${Ce(s)}`],t[`color${Ce(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Ce(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Ce(r)}`],t[l],t[`${l}${Ce(r)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Sn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Sn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Sn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Sn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Sn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Sn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Sn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:mt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:mt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Sn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Sn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Sn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:mt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Sn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Sn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Sn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Bn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Sn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Sn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Bn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Sn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Sn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Sn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Sn.avatar}`]:{marginLeft:4},[`& .${Sn.avatarSmall}`]:{marginLeft:2},[`& .${Sn.icon}`]:{marginLeft:4},[`& .${Sn.iconSmall}`]:{marginLeft:2},[`& .${Sn.deleteIcon}`]:{marginRight:5},[`& .${Sn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Bn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:mt(e.palette[n].main,.7)}`,[`&.${Sn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Sn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Sn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:mt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),cTe=oe("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Ce(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function _U(e){return e.key==="Backspace"||e.key==="Delete"}const wh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:h,onDelete:m,onKeyDown:g,onKeyUp:v,size:w="medium",variant:x="filled",tabIndex:S,skipFocusWhenDisabled:P=!1,...T}=r,E=y.useRef(null),O=Cr(E,n),k=H=>{H.stopPropagation(),m&&m(H)},A=H=>{H.currentTarget===H.target&&_U(H)&&H.preventDefault(),g&&g(H)},I=H=>{H.currentTarget===H.target&&m&&_U(H)&&m(H),v&&v(H)},R=a!==!1&&h?!0:a,N=R||m?Ki:l||"div",L={...r,component:N,disabled:u,size:w,color:s,iconColor:y.isValidElement(d)&&d.props.color||s,onDelete:!!m,clickable:R,variant:x},B=sTe(L),_=N===Ki?{component:l||"div",focusVisibleClassName:B.focusVisible,...m&&{disableRipple:!0}}:{};let D=null;m&&(D=c&&y.isValidElement(c)?y.cloneElement(c,{className:fe(c.props.className,B.deleteIcon),onClick:k}):$.jsx(iTe,{className:fe(B.deleteIcon),onClick:k}));let z=null;o&&y.isValidElement(o)&&(z=y.cloneElement(o,{className:fe(B.avatar,o.props.className)}));let F=null;return d&&y.isValidElement(d)&&(F=y.cloneElement(d,{className:fe(B.icon,d.props.className)})),$.jsxs(lTe,{as:N,className:fe(B.root,i),disabled:R&&u?!0:void 0,onClick:h,onKeyDown:A,onKeyUp:I,ref:O,tabIndex:P&&u?-1:S,ownerState:L,..._,...T,children:[z||F,$.jsx(cTe,{className:fe(B.label),ownerState:L,children:f}),D]})});function PC(e){return parseInt(e,10)||0}const uTe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function dTe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const fTe=y.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=y.useRef(s!=null),u=y.useRef(null),d=Cr(n,u),f=y.useRef(null),h=y.useRef(null),m=y.useCallback(()=>{const w=u.current,S=rs(w).getComputedStyle(w);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};const P=h.current;P.style.width=S.width,P.value=w.value||t.placeholder||"x",P.value.slice(-1)===` -`&&(P.value+=" ");const T=S.boxSizing,E=PC(S.paddingBottom)+PC(S.paddingTop),O=PC(S.borderBottomWidth)+PC(S.borderTopWidth),k=P.scrollHeight;P.value="x";const A=P.scrollHeight;let I=k;i&&(I=Math.max(Number(i)*A,I)),o&&(I=Math.min(Number(o)*A,I)),I=Math.max(I,A);const R=I+(T==="border-box"?E+O:0),N=Math.abs(I-k)<=1;return{outerHeightStyle:R,overflowing:N}},[o,i,t.placeholder]),g=y.useCallback(()=>{const w=m();if(dTe(w))return;const x=w.outerHeightStyle,S=u.current;f.current!==x&&(f.current=x,S.style.height=`${x}px`),S.style.overflow=w.overflowing?"hidden":""},[m]);ns(()=>{const w=()=>{g()};let x;const S=dS(w),P=u.current,T=rs(P);T.addEventListener("resize",S);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(w),E.observe(P)),()=>{S.clear(),cancelAnimationFrame(x),T.removeEventListener("resize",S),E&&E.disconnect()}},[m,g]),ns(()=>{g()});const v=w=>{c||g(),r&&r(w)};return $.jsxs(y.Fragment,{children:[$.jsx("textarea",{value:s,onChange:v,ref:d,rows:i,style:a,...l}),$.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:h,tabIndex:-1,style:{...uTe.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function _y(e){return typeof e=="string"}function jf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const wI=y.createContext(void 0);function Ta(){return y.useContext(wI)}function DU(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function MT(e,t=!1){return e&&(DU(e.value)&&e.value!==""||t&&DU(e.defaultValue)&&e.defaultValue!=="")}function pTe(e){return e.startAdornment}function hTe(e){return tt("MuiInputBase",e)}const Va=ot("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var NU;const xI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Ce(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},SI=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},mTe=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:h,type:m}=e,g={root:["root",`color${Ce(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${Ce(f)}`,u&&"multiline",h&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",h&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return rt(g,hTe,t)},CI=oe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:xI})(Ze(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Va.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),PI=oe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:SI})(Ze(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Va.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Va.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),LU=fxe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Ov=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:h,endAdornment:m,error:g,fullWidth:v=!1,id:w,inputComponent:x="input",inputProps:S={},inputRef:P,margin:T,maxRows:E,minRows:O,multiline:k=!1,name:A,onBlur:I,onChange:R,onClick:N,onFocus:L,onKeyDown:B,onKeyUp:_,placeholder:D,readOnly:z,renderSuffix:F,rows:H,size:U,slotProps:q={},slots:Y={},startAdornment:ae,type:Z="text",value:K,...te}=r,pe=S.value!=null?S.value:K,{current:ie}=y.useRef(pe!=null),le=y.useRef(),re=y.useCallback(et=>{},[]),de=Cr(le,P,S.ref,re),[ee,ce]=y.useState(!1),me=Ta(),we=jf({props:r,muiFormControl:me,states:["color","disabled","error","hiddenLabel","size","required","filled"]});we.focused=me?me.focused:ee,y.useEffect(()=>{!me&&f&&ee&&(ce(!1),I&&I())},[me,f,ee,I]);const ge=me&&me.onFilled,Se=me&&me.onEmpty,xe=y.useCallback(et=>{MT(et)?ge&&ge():Se&&Se()},[ge,Se]);ns(()=>{ie&&xe({value:pe})},[pe,xe,ie]);const Ie=et=>{L&&L(et),S.onFocus&&S.onFocus(et),me&&me.onFocus?me.onFocus(et):ce(!0)},Re=et=>{I&&I(et),S.onBlur&&S.onBlur(et),me&&me.onBlur?me.onBlur(et):ce(!1)},_e=(et,...yt)=>{if(!ie){const vn=et.target||le.current;if(vn==null)throw new Error(Fu(1));xe({value:vn.value})}S.onChange&&S.onChange(et,...yt),R&&R(et,...yt)};y.useEffect(()=>{xe(le.current)},[]);const ye=et=>{le.current&&et.currentTarget===et.target&&le.current.focus(),N&&N(et)};let Te=x,Oe=S;k&&Te==="input"&&(H?Oe={type:void 0,minRows:H,maxRows:H,...Oe}:Oe={type:void 0,maxRows:E,minRows:O,...Oe},Te=fTe);const Me=et=>{xe(et.animationName==="mui-auto-fill-cancel"?le.current:{value:"x"})};y.useEffect(()=>{me&&me.setAdornedStart(!!ae)},[me,ae]);const Ue={...r,color:we.color||"primary",disabled:we.disabled,endAdornment:m,error:we.error,focused:we.focused,formControl:me,fullWidth:v,hiddenLabel:we.hiddenLabel,multiline:k,size:we.size,startAdornment:ae,type:Z},ze=mTe(Ue),Qe=Y.root||c.Root||CI,ct=q.root||u.root||{},nt=Y.input||c.Input||PI;return Oe={...Oe,...q.input??u.input},$.jsxs(y.Fragment,{children:[!h&&typeof LU=="function"&&(NU||(NU=$.jsx(LU,{}))),$.jsxs(Qe,{...ct,ref:n,onClick:ye,...te,...!_y(Qe)&&{ownerState:{...Ue,...ct.ownerState}},className:fe(ze.root,ct.className,s,z&&"MuiInputBase-readOnly"),children:[ae,$.jsx(wI.Provider,{value:null,children:$.jsx(nt,{"aria-invalid":we.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:we.disabled,id:w,onAnimationStart:Me,name:A,placeholder:D,readOnly:z,required:we.required,rows:H,value:pe,onKeyDown:B,onKeyUp:_,type:Z,...Oe,...!_y(nt)&&{as:Te,ownerState:{...Ue,...Oe.ownerState}},ref:de,className:fe(ze.input,Oe.className,z&&"MuiInputBase-readOnly"),onBlur:Re,onChange:_e,onFocus:Ie})}),m,F?F({...we,startAdornment:ae}):null]})]})});function gTe(e){return tt("MuiInput",e)}const Bd={...Va,...ot("MuiInput",["root","underline","input"])};function yTe(e){return tt("MuiOutlinedInput",e)}const Rs={...Va,...ot("MuiOutlinedInput",["root","notchedOutline","input"])};function vTe(e){return tt("MuiFilledInput",e)}const Ha={...Va,...ot("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},JJ=st($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function bTe(e){return tt("MuiAutocomplete",e)}const fn=ot("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var FU,jU;const wTe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Ce(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return rt(d,bTe,t)},xTe=oe("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${fn.tag}`]:t.tag},{[`& .${fn.tag}`]:t[`tagSize${Ce(s)}`]},{[`& .${fn.inputRoot}`]:t.inputRoot},{[`& .${fn.input}`]:t.input},{[`& .${fn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${fn.focused} .${fn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${fn.clearIndicator}`]:{visibility:"visible"}},[`& .${fn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${fn.inputRoot}`]:{[`.${fn.hasPopupIcon}&, .${fn.hasClearIcon}&`]:{paddingRight:30},[`.${fn.hasPopupIcon}.${fn.hasClearIcon}&`]:{paddingRight:56},[`& .${fn.input}`]:{width:0,minWidth:30}},[`& .${Bd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Bd.root}.${Va.sizeSmall}`]:{[`& .${Bd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${Rs.root}`]:{padding:9,[`.${fn.hasPopupIcon}&, .${fn.hasClearIcon}&`]:{paddingRight:39},[`.${fn.hasPopupIcon}.${fn.hasClearIcon}&`]:{paddingRight:65},[`& .${fn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${fn.endAdornment}`]:{right:9}},[`& .${Rs.root}.${Va.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${fn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Ha.root}`]:{paddingTop:19,paddingLeft:8,[`.${fn.hasPopupIcon}&, .${fn.hasClearIcon}&`]:{paddingRight:39},[`.${fn.hasPopupIcon}.${fn.hasClearIcon}&`]:{paddingRight:65},[`& .${Ha.input}`]:{padding:"7px 4px"},[`& .${fn.endAdornment}`]:{right:9}},[`& .${Ha.root}.${Va.sizeSmall}`]:{paddingBottom:1,[`& .${Ha.input}`]:{padding:"2.5px 4px"}},[`& .${Va.hiddenLabel}`]:{paddingTop:8},[`& .${Ha.root}.${Va.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${fn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Ha.root}.${Va.hiddenLabel}.${Va.sizeSmall}`]:{[`& .${fn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${fn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${fn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${fn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${fn.inputRoot}`]:{flexWrap:"wrap"}}}]}),STe=oe("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),CTe=oe(kn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),PTe=oe(kn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),TTe=oe(Ff,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${fn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),ETe=oe(co,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(Ze(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),OTe=oe("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),ITe=oe("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),kTe=oe("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(Ze(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${fn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${fn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${fn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${fn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${fn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),MTe=oe(r_,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(Ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),ATe=oe("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${fn.option}`]:{paddingLeft:24}}),ec=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=FU||(FU=$.jsx(BJ,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:f=!1,clearText:h="Clear",closeText:m="Close",componentsProps:g,defaultValue:v=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:x=!1,disabled:S=!1,disabledItemsFocusable:P=!1,disableListWrap:T=!1,disablePortal:E=!1,filterOptions:O,filterSelectedOptions:k=!1,forcePopupIcon:A="auto",freeSolo:I=!1,fullWidth:R=!1,getLimitTagsText:N=On=>`+${On}`,getOptionDisabled:L,getOptionKey:B,getOptionLabel:_,isOptionEqualToValue:D,groupBy:z,handleHomeEndKeys:F=!r.freeSolo,id:H,includeInputInList:U=!1,inputValue:q,limitTags:Y=-1,ListboxComponent:ae,ListboxProps:Z,loading:K=!1,loadingText:te="Loading…",multiple:pe=!1,noOptionsText:ie="No options",onChange:le,onClose:re,onHighlightChange:de,onInputChange:ee,onOpen:ce,open:me,openOnFocus:we=!1,openText:ge="Open",options:Se,PaperComponent:xe,PopperComponent:Ie,popupIcon:Re=jU||(jU=$.jsx(JJ,{})),readOnly:_e=!1,renderGroup:ye,renderInput:Te,renderOption:Oe,renderTags:Me,selectOnFocus:Ue=!r.freeSolo,size:ze="medium",slots:Qe={},slotProps:ct={},value:nt,...et}=r,{getRootProps:yt,getInputProps:vn,getInputLabelProps:Ke,getPopupIndicatorProps:$e,getClearProps:Xe,getTagProps:bt,getListboxProps:zt,getOptionProps:Ot,value:cn,dirty:Fn,expanded:Un,id:Po,popupOpen:qr,focused:Ii,focusedTag:gs,anchorEl:Ut,setAnchorEl:Yo,inputValue:lm,groupedOptions:fd}=BCe({...r,componentName:"Autocomplete"}),Zc=!w&&!S&&Fn&&!_e,ep=(!I||A===!0)&&A!==!1,{onMouseDown:tp}=vn(),{ref:Cb,...cm}=zt(),np=_||(On=>On.label??On),Lo={...r,disablePortal:E,expanded:Un,focused:Ii,fullWidth:R,getOptionLabel:np,hasClearIcon:Zc,hasPopupIcon:ep,inputFocused:gs===-1,popupOpen:qr,size:ze},Kr=wTe(Lo),vl={slots:{paper:xe,popper:Ie,...Qe},slotProps:{chip:l,listbox:Z,...g,...ct}},[Ve,Ne]=hr("listbox",{elementType:kTe,externalForwardedProps:vl,ownerState:Lo,className:Kr.listbox,additionalProps:cm,ref:Cb}),[wt,en]=hr("paper",{elementType:co,externalForwardedProps:vl,ownerState:Lo,className:Kr.paper}),[on,$r]=hr("popper",{elementType:Ff,externalForwardedProps:vl,ownerState:Lo,className:Kr.popper,additionalProps:{disablePortal:E,style:{width:Ut?Ut.clientWidth:null},role:"presentation",anchorEl:Ut,open:qr}});let Wn;if(pe&&cn.length>0){const On=ys=>({className:Kr.tag,disabled:S,...bt(ys)});Me?Wn=Me(cn,On,Lo):Wn=cn.map((ys,sc)=>{const{key:op,...mM}=On({index:sc});return $.jsx(wh,{label:np(ys),size:ze,...mM,...vl.slotProps.chip},op)})}if(Y>-1&&Array.isArray(Wn)){const On=Wn.length-Y;!Ii&&On>0&&(Wn=Wn.splice(0,Y),Wn.push($.jsx("span",{className:Kr.tag,children:N(On)},Wn.length)))}const eu=ye||(On=>$.jsxs("li",{children:[$.jsx(MTe,{className:Kr.groupLabel,ownerState:Lo,component:"div",children:On.group}),$.jsx(ATe,{className:Kr.groupUl,ownerState:Lo,children:On.children})]},On.key)),um=Oe||((On,ys)=>{const{key:sc,...op}=On;return $.jsx("li",{...op,children:np(ys)},sc)}),d1=(On,ys)=>{const sc=Ot({option:On,index:ys});return um({...sc,className:Kr.option},On,{selected:sc["aria-selected"],index:ys,inputValue:lm},Lo)},dm=vl.slotProps.clearIndicator,fm=vl.slotProps.popupIndicator,pm=On=>$.jsx(TTe,{as:on,...$r,children:$.jsx(ETe,{as:wt,...en,children:On})});let rp=null;return fd.length>0?rp=pm($.jsx(Ve,{as:ae,...Ne,children:fd.map((On,ys)=>z?eu({key:On.key,group:On.group,children:On.options.map((sc,op)=>d1(sc,On.index+op))}):d1(On,ys))})):K&&fd.length===0?rp=pm($.jsx(OTe,{className:Kr.loading,ownerState:Lo,children:te})):fd.length===0&&!I&&!K&&(rp=pm($.jsx(ITe,{className:Kr.noOptions,ownerState:Lo,role:"presentation",onMouseDown:On=>{On.preventDefault()},children:ie}))),$.jsxs(y.Fragment,{children:[$.jsx(xTe,{ref:n,className:fe(Kr.root,c),ownerState:Lo,...yt(et),children:Te({id:Po,disabled:S,fullWidth:!0,size:ze==="small"?"small":void 0,InputLabelProps:Ke(),InputProps:{ref:Yo,className:Kr.inputRoot,startAdornment:Wn,onMouseDown:On=>{On.target===On.currentTarget&&tp(On)},...(Zc||ep)&&{endAdornment:$.jsxs(STe,{className:Kr.endAdornment,ownerState:Lo,children:[Zc?$.jsx(CTe,{...Xe(),"aria-label":h,title:h,ownerState:Lo,...dm,className:fe(Kr.clearIndicator,dm==null?void 0:dm.className),children:u}):null,ep?$.jsx(PTe,{...$e(),disabled:S,"aria-label":qr?m:ge,title:qr?m:ge,ownerState:Lo,...fm,className:fe(Kr.popupIndicator,fm==null?void 0:fm.className),children:Re}):null]})}},inputProps:{className:Kr.input,disabled:S,readOnly:_e,...vn()}})}),Ut?rp:null]})}),$Te=st($.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function RTe(e){return tt("MuiAvatar",e)}const _Te=ot("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),DTe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return rt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},RTe,t)},NTe=oe("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Ze(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),LTe=oe("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),FTe=oe($Te,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function jTe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=y.useState(!1);return y.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const tc=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:h,variant:m="circular",...g}=r;let v=null;const w=jTe({...u,src:f,srcSet:h}),x=f||h,S=x&&w!=="error",P={...r,colorDefault:!S,component:s,variant:m};delete P.ownerState;const T=DTe(P),[E,O]=hr("img",{className:T.img,elementType:LTe,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:f,srcSet:h,sizes:d},ownerState:P});return S?v=$.jsx(E,{...O}):i||i===0?v=i:x&&o?v=o[0]:v=$.jsx(FTe,{ownerState:P,className:T.fallback}),$.jsx(NTe,{as:s,className:fe(T.root,a),ref:n,...g,ownerState:P,children:v})});function BTe(e){return tt("MuiAvatarGroup",e)}const zTe=ot("MuiAvatarGroup",["root","avatar"]),BU={small:-16,medium:-8},VTe=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"]},BTe,t)},HTe=oe("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>({[`& .${zTe.avatar}`]:t.avatar,...t.root})})(Ze(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${_Te.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),UTe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:d={},spacing:f="medium",total:h,variant:m="circular",...g}=r;let v=l<2?2:l;const w={...r,max:l,spacing:f,component:a,variant:m},x=VTe(w),S=y.Children.toArray(o).filter(N=>y.isValidElement(N)),P=h||S.length;P===v&&(v+=1),v=Math.min(P+1,v);const T=Math.min(S.length,v-1),E=Math.max(P-v,P-T,0),O=c?c(E):`+${E}`,k=w.spacing&&BU[w.spacing]!==void 0?BU[w.spacing]:-w.spacing||-8,A={slots:d,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[I,R]=hr("surplus",{elementType:tc,externalForwardedProps:A,className:x.avatar,ownerState:w,additionalProps:{variant:m}});return $.jsxs(HTe,{as:a,ownerState:w,className:fe(x.root,i),ref:n,...g,style:{"--AvatarGroup-spacing":k?`${k}px`:void 0,...g.style},children:[E?$.jsx(I,{...R,children:O}):null,S.slice(0,T).reverse().map(N=>y.cloneElement(N,{className:fe(N.props.className,x.avatar),variant:N.props.variant||m}))]})}),WTe={entering:{opacity:1},entered:{opacity:1}},Iv=y.forwardRef(function(t,n){const r=Ei(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:h,onExited:m,onExiting:g,style:v,timeout:w=o,TransitionComponent:x=fs,...S}=t,P=y.useRef(null),T=Cr(P,$f(s),n),E=B=>_=>{if(B){const D=P.current;_===void 0?B(D):B(D,_)}},O=E(f),k=E((B,_)=>{TF(B);const D=Pf({style:v,timeout:w,easing:l},{mode:"enter"});B.style.webkitTransition=r.transitions.create("opacity",D),B.style.transition=r.transitions.create("opacity",D),u&&u(B,_)}),A=E(d),I=E(g),R=E(B=>{const _=Pf({style:v,timeout:w,easing:l},{mode:"exit"});B.style.webkitTransition=r.transitions.create("opacity",_),B.style.transition=r.transitions.create("opacity",_),h&&h(B)}),N=E(m),L=B=>{i&&i(P.current,B)};return $.jsx(x,{appear:a,in:c,nodeRef:P,onEnter:k,onEntered:A,onEntering:O,onExit:R,onExited:N,onExiting:I,addEndListener:L,timeout:w,...S,children:(B,_)=>y.cloneElement(s,{style:{opacity:0,visibility:B==="exited"&&!c?"hidden":void 0,...WTe[B],...v,...s.props.style},ref:T,..._})})});function GTe(e){return tt("MuiBackdrop",e)}ot("MuiBackdrop",["root","invisible"]);const qTe=e=>{const{ownerState:t,...n}=e;return n},KTe=e=>{const{classes:t,invisible:n}=e;return rt({root:["root",n&&"invisible"]},GTe,t)},YTe=oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),ZJ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:h,transitionDuration:m,...g}=r,v={...r,component:a,invisible:s},w=KTe(v),x={transition:h,root:c.Root,...f},S={...u,...d},P={slots:x,slotProps:S},[T,E]=hr("root",{elementType:YTe,externalForwardedProps:P,className:fe(w.root,i),ownerState:v}),[O,k]=hr("transition",{elementType:Iv,externalForwardedProps:P,ownerState:v}),A=qTe(k);return $.jsx(O,{in:l,timeout:m,...g,...A,children:$.jsx(T,{"aria-hidden":!0,...E,classes:w,ref:n,children:o})})});function XTe(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=TL({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function QTe(e){return tt("MuiBadge",e)}const Cd=ot("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),s$=10,l$=4,JTe=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`,`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}${Ce(o)}`,`overlap${Ce(o)}`,t!=="default"&&`color${Ce(t)}`]};return rt(s,QTe,a)},ZTe=oe("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),eEe=oe("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}${Ce(n.overlap)}`],n.color!=="default"&&t[`color${Ce(n.color)}`],n.invisible&&t.invisible]}})(Ze(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:s$*2,lineHeight:1,padding:"0 6px",height:s$*2,borderRadius:s$,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(Bn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:l$,height:l$*2,minWidth:l$*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Cd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function zU(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const tEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:h=!1,max:m=99,badgeContent:g,slots:v,slotProps:w,showZero:x=!1,variant:S="standard",...P}=r,{badgeContent:T,invisible:E,max:O,displayValue:k}=XTe({max:m,invisible:h,badgeContent:g,showZero:x}),A=TL({anchorOrigin:zU(o),color:f,overlap:d,variant:S,badgeContent:g}),I=E||T==null&&S!=="dot",{color:R=f,overlap:N=d,anchorOrigin:L,variant:B=S}=I?A:r,_=zU(L),D=B!=="dot"?k:void 0,z={...r,badgeContent:T,invisible:I,max:O,displayValue:D,showZero:x,anchorOrigin:_,color:R,overlap:N,variant:B},F=JTe(z),H=(v==null?void 0:v.root)??l.Root??ZTe,U=(v==null?void 0:v.badge)??l.Badge??eEe,q=(w==null?void 0:w.root)??c.root,Y=(w==null?void 0:w.badge)??c.badge,ae=Lc({elementType:H,externalSlotProps:q,externalForwardedProps:P,additionalProps:{ref:n,as:s},ownerState:z,className:fe(q==null?void 0:q.className,F.root,i)}),Z=Lc({elementType:U,externalSlotProps:Y,ownerState:z,className:fe(F.badge,Y==null?void 0:Y.className)});return $.jsxs(H,{...ae,children:[u,$.jsx(U,{...Z,children:D})]})}),nEe=ot("MuiBox",["root"]),rEe=fS(),er=jbe({themeId:Ul,defaultTheme:rEe,defaultClassName:nEe.root,generateClassName:WY.generate});function oEe(e){return tt("MuiButton",e)}const Dm=ot("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),eZ=y.createContext({}),tZ=y.createContext(void 0),iEe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Ce(t)}`,`size${Ce(o)}`,`${i}Size${Ce(o)}`,`color${Ce(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Ce(o)}`],endIcon:["icon","endIcon",`iconSize${Ce(o)}`]},l=rt(s,oEe,a);return{...a,...l}},nZ=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],aEe=oe(Ki,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color)}`],t[`size${Ce(n.size)}`],t[`${n.variant}Size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Dm.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Dm.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Dm.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Dm.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(Bn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:mt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Dm.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Dm.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),sEe=oe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...nZ]}),lEe=oe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...nZ]}),gt=y.forwardRef(function(t,n){const r=y.useContext(eZ),o=y.useContext(tZ),i=Sy(r,t),a=it({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:h=!1,endIcon:m,focusVisibleClassName:g,fullWidth:v=!1,size:w="medium",startIcon:x,type:S,variant:P="text",...T}=a,E={...a,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:h,fullWidth:v,size:w,type:S,variant:P},O=iEe(E),k=x&&$.jsx(sEe,{className:O.startIcon,ownerState:E,children:x}),A=m&&$.jsx(lEe,{className:O.endIcon,ownerState:E,children:m}),I=o||"";return $.jsxs(aEe,{ownerState:E,className:fe(r.className,O.root,u,I),component:c,disabled:d,focusRipple:!h,focusVisibleClassName:fe(O.focusVisible,g),ref:n,type:S,...T,classes:O,children:[k,s,A]})});function cEe(e){return tt("MuiButtonGroup",e)}const ln=ot("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),uEe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${ln.grouped}`]:t.grouped},{[`& .${ln.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${ln.grouped}`]:t[`grouped${Ce(n.variant)}`]},{[`& .${ln.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.orientation)}`]},{[`& .${ln.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.color)}`]},{[`& .${ln.firstButton}`]:t.firstButton},{[`& .${ln.lastButton}`]:t.lastButton},{[`& .${ln.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},dEe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Ce(n)}`],grouped:["grouped",`grouped${Ce(a)}`,`grouped${Ce(s)}`,`grouped${Ce(s)}${Ce(a)}`,`grouped${Ce(s)}${Ce(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(l,cEe,t)},fEe=oe("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:uEe})(Ze(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${ln.lastButton},& .${ln.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${ln.lastButton},& .${ln.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ln.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${ln.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Bn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:mt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${ln.lastButton},& .${ln.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${ln.lastButton},& .${ln.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ln.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${ln.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(Bn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${ln.firstButton},& .${ln.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${ln.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),pEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:h="horizontal",size:m="medium",variant:g="outlined",...v}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:h,size:m,variant:g},x=dEe(w),S=y.useMemo(()=>({className:x.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:m,variant:g}),[a,l,c,u,d,f,m,g,x.grouped]),P=aX(o),T=P.length,E=O=>{const k=O===0,A=O===T-1;return k&&A?"":k?x.firstButton:A?x.lastButton:x.middleButton};return $.jsx(fEe,{as:s,role:"group",className:fe(x.root,i),ref:n,ownerState:w,...v,children:$.jsx(eZ.Provider,{value:S,children:P.map((O,k)=>$.jsx(tZ.Provider,{value:E(k),children:O},k))})})});function hEe(e){return tt("MuiCard",e)}ot("MuiCard",["root"]);const mEe=e=>{const{classes:t}=e;return rt({root:["root"]},hEe,t)},gEe=oe(co,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),Ro=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=mEe(s);return $.jsx(gEe,{className:fe(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function yEe(e){return tt("MuiCardActionArea",e)}const c$=ot("MuiCardActionArea",["root","focusVisible","focusHighlight"]),vEe=e=>{const{classes:t}=e;return rt({root:["root"],focusHighlight:["focusHighlight"]},yEe,t)},bEe=oe(Ki,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${c$.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${c$.focusVisible} .${c$.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),wEe=oe("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(Ze(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),xEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=vEe(l);return $.jsxs(bEe,{className:fe(c.root,i),focusVisibleClassName:fe(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,$.jsx(wEe,{className:c.focusHighlight,ownerState:l})]})});function SEe(e){return tt("MuiCardActions",e)}ot("MuiCardActions",["root","spacing"]);const CEe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},SEe,t)},PEe=oe("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),ps=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=CEe(s);return $.jsx(PEe,{className:fe(l.root,i),ownerState:s,ref:n,...a})});function TEe(e){return tt("MuiCardContent",e)}ot("MuiCardContent",["root"]);const EEe=e=>{const{classes:t}=e;return rt({root:["root"]},TEe,t)},OEe=oe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),xa=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=EEe(s);return $.jsx(OEe,{as:i,className:fe(l.root,o),ownerState:s,ref:n,...a})});function IEe(e){return tt("MuiCardHeader",e)}const AT=ot("MuiCardHeader",["root","avatar","action","content","title","subheader"]),kEe=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},IEe,t)},MEe=oe("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>({[`& .${AT.title}`]:t.title,[`& .${AT.subheader}`]:t.subheader,...t.root})})({display:"flex",alignItems:"center",padding:16}),AEe=oe("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),$Ee=oe("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),REe=oe("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${OT.root}:where(& .${AT.title})`]:{display:"block"},[`.${OT.root}:where(& .${AT.subheader})`]:{display:"block"}}),nd=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:s="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:u,title:d,titleTypographyProps:f,...h}=r,m={...r,component:s,disableTypography:l},g=kEe(m);let v=d;v!=null&&v.type!==dt&&!l&&(v=$.jsx(dt,{variant:i?"body2":"h5",className:g.title,component:"span",...f,children:v}));let w=c;return w!=null&&w.type!==dt&&!l&&(w=$.jsx(dt,{variant:i?"body2":"body1",className:g.subheader,color:"textSecondary",component:"span",...u,children:w})),$.jsxs(MEe,{className:fe(g.root,a),as:s,ref:n,ownerState:m,...h,children:[i&&$.jsx(AEe,{className:g.avatar,ownerState:m,children:i}),$.jsxs(REe,{className:g.content,ownerState:m,children:[v,w]}),o&&$.jsx($Ee,{className:g.action,ownerState:m,children:o})]})});function _Ee(e){return tt("MuiCardMedia",e)}ot("MuiCardMedia",["root","media","img"]);const DEe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return rt({root:["root",n&&"media",r&&"img"]},_Ee,t)},NEe=oe("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),LEe=["video","audio","picture","iframe","img"],FEe=["picture","img"],jc=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,d=LEe.includes(a),f=!d&&s?{backgroundImage:`url("${s}")`,...c}:c,h={...r,component:a,isMediaComponent:d,isImageComponent:FEe.includes(a)},m=DEe(h);return $.jsx(NEe,{className:fe(m.root,i),as:a,role:!d&&s?"img":void 0,ref:n,style:f,ownerState:h,src:d?s||l:void 0,...u,children:o})});function jEe(e){return tt("PrivateSwitchBase",e)}ot("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const BEe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Ce(o)}`],input:["input"]};return rt(i,jEe,t)},zEe=oe(Ki)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),VEe=oe("input",{shouldForwardProp:ci})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),rZ=y.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:h,inputRef:m,name:g,onBlur:v,onChange:w,onFocus:x,readOnly:S,required:P=!1,tabIndex:T,type:E,value:O,...k}=t,[A,I]=Ou({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),R=Ta(),N=H=>{x&&x(H),R&&R.onFocus&&R.onFocus(H)},L=H=>{v&&v(H),R&&R.onBlur&&R.onBlur(H)},B=H=>{if(H.nativeEvent.defaultPrevented)return;const U=H.target.checked;I(U),w&&w(H,U)};let _=l;R&&typeof _>"u"&&(_=R.disabled);const D=E==="checkbox"||E==="radio",z={...t,checked:A,disabled:_,disableFocusRipple:c,edge:u},F=BEe(z);return $.jsxs(zEe,{component:"span",className:fe(F.root,a),centerRipple:!0,focusRipple:!c,disabled:_,tabIndex:null,role:void 0,onFocus:N,onBlur:L,ownerState:z,ref:n,...k,children:[$.jsx(VEe,{autoFocus:r,checked:o,defaultChecked:s,className:F.input,disabled:_,id:D?f:void 0,name:g,onChange:B,readOnly:S,ref:m,required:P,ownerState:z,tabIndex:T,type:E,...E==="checkbox"&&O===void 0?{}:{value:O},...h}),A?i:d]})}),HEe=st($.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),UEe=st($.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),WEe=st($.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function GEe(e){return tt("MuiCheckbox",e)}const u$=ot("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),qEe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Ce(r)}`,`size${Ce(o)}`]},a=rt(i,GEe,t);return{...t,...a}},KEe=oe(rZ,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ce(n.size)}`],n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{[`&.${u$.checked}, &.${u$.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${u$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),YEe=$.jsx(UEe,{}),XEe=$.jsx(HEe,{}),QEe=$.jsx(WEe,{}),JEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCheckbox"}),{checkedIcon:o=YEe,color:i="primary",icon:a=XEe,indeterminate:s=!1,indeterminateIcon:l=QEe,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,...h}=r,m=s?l:a,g=s?l:o,v={...r,disableRipple:d,color:i,indeterminate:s,size:u},w=qEe(v);return $.jsx(KEe,{type:"checkbox",inputProps:{"data-indeterminate":s,...c},icon:y.cloneElement(m,{fontSize:m.props.fontSize??u}),checkedIcon:y.cloneElement(g,{fontSize:g.props.fontSize??u}),ownerState:v,ref:n,className:fe(w.root,f),disableRipple:d,...h,classes:w})});function ZEe(e){return tt("MuiCircularProgress",e)}ot("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Pd=44,o_=Uc` +`,gCe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=y.useState([]),u=y.useRef(0),d=y.useRef(null);y.useEffect(()=>{d.current&&(d.current(),d.current=null)},[l]);const f=y.useRef(!1),p=tf(),m=y.useRef(null),g=y.useRef(null),v=y.useCallback(P=>{const{pulsate:T,rippleX:E,rippleY:O,rippleSize:k,cb:A}=P;c(I=>[...I,$.jsx(mCe,{classes:{ripple:de(i.ripple,zs.ripple),rippleVisible:de(i.rippleVisible,zs.rippleVisible),ripplePulsate:de(i.ripplePulsate,zs.ripplePulsate),child:de(i.child,zs.child),childLeaving:de(i.childLeaving,zs.childLeaving),childPulsate:de(i.childPulsate,zs.childPulsate)},timeout:c_,pulsate:T,rippleX:E,rippleY:O,rippleSize:k},u.current)]),u.current+=1,d.current=A},[i]),w=y.useCallback((P={},T={},E=()=>{})=>{const{pulsate:O=!1,center:k=o||T.pulsate,fakeElement:A=!1}=T;if((P==null?void 0:P.type)==="mousedown"&&f.current){f.current=!1;return}(P==null?void 0:P.type)==="touchstart"&&(f.current=!0);const I=A?null:g.current,R=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let N,L,j;if(k||P===void 0||P.clientX===0&&P.clientY===0||!P.clientX&&!P.touches)N=Math.round(R.width/2),L=Math.round(R.height/2);else{const{clientX:_,clientY:D}=P.touches&&P.touches.length>0?P.touches[0]:P;N=Math.round(_-R.left),L=Math.round(D-R.top)}if(k)j=Math.sqrt((2*R.width**2+R.height**2)/3),j%2===0&&(j+=1);else{const _=Math.max(Math.abs((I?I.clientWidth:0)-N),N)*2+2,D=Math.max(Math.abs((I?I.clientHeight:0)-L),L)*2+2;j=Math.sqrt(_**2+D**2)}P!=null&&P.touches?m.current===null&&(m.current=()=>{v({pulsate:O,rippleX:N,rippleY:L,rippleSize:j,cb:E})},p.start(uCe,()=>{m.current&&(m.current(),m.current=null)})):v({pulsate:O,rippleX:N,rippleY:L,rippleSize:j,cb:E})},[o,v,p]),x=y.useCallback(()=>{w({},{pulsate:!0})},[w]),S=y.useCallback((P,T)=>{if(p.clear(),(P==null?void 0:P.type)==="touchend"&&m.current){m.current(),m.current=null,p.start(0,()=>{S(P,T)});return}m.current=null,c(E=>E.length>0?E.slice(1):E),d.current=T},[p]);return y.useImperativeHandle(n,()=>({pulsate:x,start:w,stop:S}),[x,w,S]),$.jsx(hCe,{className:de(zs.root,i.root,a),ref:g,...s,children:$.jsx(ES,{component:null,exit:!0,children:l})})});function yCe(e){return tt("MuiButtonBase",e)}const vCe=ot("MuiButtonBase",["root","disabled","focusVisible"]),bCe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=rt({root:["root",t&&"disabled",n&&"focusVisible"]},yCe,o);return n&&r&&(a.root+=` ${r}`),a},wCe=oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${vCe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),Ki=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:m="a",onBlur:g,onClick:v,onContextMenu:w,onDragLeave:x,onFocus:S,onFocusVisible:P,onKeyDown:T,onKeyUp:E,onMouseDown:O,onMouseLeave:k,onMouseUp:A,onTouchEnd:I,onTouchMove:R,onTouchStart:N,tabIndex:L=0,TouchRippleProps:j,touchRippleRef:_,type:D,...z}=r,F=y.useRef(null),H=sCe(),U=Cr(H.ref,_),[q,X]=y.useState(!1);c&&q&&X(!1),y.useImperativeHandle(o,()=>({focusVisible:()=>{X(!0),F.current.focus()}}),[]);const ae=H.shouldMount&&!u&&!c;y.useEffect(()=>{q&&f&&!u&&H.pulsate()},[u,f,q,H]);function Z(Te,Oe,Me=d){return Go(We=>(Oe&&Oe(We),Me||H[Te](We),!0))}const K=Z("start",O),te=Z("stop",w),pe=Z("stop",x),ie=Z("stop",A),le=Z("stop",Te=>{q&&Te.preventDefault(),k&&k(Te)}),re=Z("start",N),fe=Z("stop",I),ee=Z("stop",R),ce=Z("stop",Te=>{lT(Te.target)||X(!1),g&&g(Te)},!1),me=Go(Te=>{F.current||(F.current=Te.currentTarget),lT(Te.target)&&(X(!0),P&&P(Te)),S&&S(Te)}),we=()=>{const Te=F.current;return l&&l!=="button"&&!(Te.tagName==="A"&&Te.href)},ge=Go(Te=>{f&&!Te.repeat&&q&&Te.key===" "&&H.stop(Te,()=>{H.start(Te)}),Te.target===Te.currentTarget&&we()&&Te.key===" "&&Te.preventDefault(),T&&T(Te),Te.target===Te.currentTarget&&we()&&Te.key==="Enter"&&!c&&(Te.preventDefault(),v&&v(Te))}),Se=Go(Te=>{f&&Te.key===" "&&q&&!Te.defaultPrevented&&H.stop(Te,()=>{H.pulsate(Te)}),E&&E(Te),v&&Te.target===Te.currentTarget&&we()&&Te.key===" "&&!Te.defaultPrevented&&v(Te)});let xe=l;xe==="button"&&(z.href||z.to)&&(xe=m);const Ie={};xe==="button"?(Ie.type=D===void 0?"button":D,Ie.disabled=c):(!z.href&&!z.to&&(Ie.role="button"),c&&(Ie["aria-disabled"]=c));const Re=Cr(n,F),_e={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:L,focusVisible:q},ye=bCe(_e);return $.jsxs(wCe,{as:xe,className:de(ye.root,s),ownerState:_e,onBlur:ce,onClick:v,onContextMenu:te,onFocus:me,onKeyDown:ge,onKeyUp:Se,onMouseDown:K,onMouseLeave:le,onMouseUp:ie,onDragLeave:pe,onTouchEnd:fe,onTouchMove:ee,onTouchStart:re,ref:Re,tabIndex:c?-1:L,type:D,...Ie,...z,children:[a,ae?$.jsx(gCe,{ref:U,center:i,...j}):null]})});function xCe(e){return tt("MuiAccordionSummary",e)}const $g=ot("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),SCe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:o}=e;return rt({root:["root",n&&"expanded",r&&"disabled",!o&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!o&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},xCe,t)},CCe=oe(Ki,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${$g.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${$g.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${$g.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${$g.expanded}`]:{minHeight:64}}}]}})),PCe=oe("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(Ze(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${$g.expanded}`]:{margin:"20px 0"}}}]}))),TCe=oe("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(Ze(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${$g.expanded}`]:{transform:"rotate(180deg)"}}))),jF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAccordionSummary"}),{children:o,className:i,expandIcon:a,focusVisibleClassName:s,onClick:l,...c}=r,{disabled:u=!1,disableGutters:d,expanded:f,toggle:p}=y.useContext(XJ),m=w=>{p&&p(w),l&&l(w)},g={...r,expanded:f,disabled:u,disableGutters:d},v=SCe(g);return $.jsxs(CCe,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":f,className:de(v.root,i),focusVisibleClassName:de(v.focusVisible,s),onClick:m,ref:n,ownerState:g,...c,children:[$.jsx(PCe,{className:v.content,ownerState:g,children:o}),a&&$.jsx(TCe,{className:v.expandIconWrapper,ownerState:g,children:a})]})});function ECe(e){return typeof e.main=="string"}function OCe(e,t=[]){if(!ECe(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function zn(e=[]){return([,t])=>t&&OCe(t,e)}function ICe(e){return tt("MuiAlert",e)}const O3=ot("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);function kCe(e){return tt("MuiIconButton",e)}const MCe=ot("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]),ACe=e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,a={root:["root",n&&"disabled",r!=="default"&&`color${Ce(r)}`,o&&`edge${Ce(o)}`,`size${Ce(i)}`]};return rt(a,kCe,t)},$Ce=oe(Ki,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})(Ze(({theme:e})=>({textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:8,borderRadius:"50%",color:(e.vars||e).palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),variants:[{props:t=>!t.disableRipple,style:{"--IconButton-hoverBg":e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity),"&:hover":{backgroundColor:"var(--IconButton-hoverBg)","@media (hover: none)":{backgroundColor:"transparent"}}}},{props:{edge:"start"},style:{marginLeft:-12}},{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:{edge:"end"},style:{marginRight:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}}]})),Ze(({theme:e})=>({variants:[{props:{color:"inherit"},style:{color:"inherit"}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{"--IconButton-hoverBg":e.vars?`rgba(${(e.vars||e).palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt((e.vars||e).palette[t].main,e.palette.action.hoverOpacity)}})),{props:{size:"small"},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${MCe.disabled}`]:{backgroundColor:"transparent",color:(e.vars||e).palette.action.disabled}}))),kn=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiIconButton"}),{edge:o=!1,children:i,className:a,color:s="default",disabled:l=!1,disableFocusRipple:c=!1,size:u="medium",...d}=r,f={...r,edge:o,color:s,disabled:l,disableFocusRipple:c,size:u},p=ACe(f);return $.jsx($Ce,{className:de(p.root,a),centerRipple:!0,focusRipple:!c,disabled:l,ref:n,...d,ownerState:f,children:i})}),RCe=lt($.jsx("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),_Ce=lt($.jsx("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),DCe=lt($.jsx("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),NCe=lt($.jsx("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),QJ=lt($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),LCe=e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root",`color${Ce(n||r)}`,`${t}${Ce(n||r)}`,`${t}`],icon:["icon"],message:["message"],action:["action"]};return rt(i,ICe,o)},FCe=oe(uo,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color||n.severity)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?zu:Vu,n=e.palette.mode==="light"?Vu:zu;return{...e.typography.body2,backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(e.palette).filter(zn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"standard"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),backgroundColor:e.vars?e.vars.palette.Alert[`${r}StandardBg`]:n(e.palette[r].light,.9),[`& .${O3.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(zn(["light"])).map(([r])=>({props:{colorSeverity:r,variant:"outlined"},style:{color:e.vars?e.vars.palette.Alert[`${r}Color`]:t(e.palette[r].light,.6),border:`1px solid ${(e.vars||e).palette[r].light}`,[`& .${O3.icon}`]:e.vars?{color:e.vars.palette.Alert[`${r}IconColor`]}:{color:e.palette[r].main}}})),...Object.entries(e.palette).filter(zn(["dark"])).map(([r])=>({props:{colorSeverity:r,variant:"filled"},style:{fontWeight:e.typography.fontWeightMedium,...e.vars?{color:e.vars.palette.Alert[`${r}FilledColor`],backgroundColor:e.vars.palette.Alert[`${r}FilledBg`]}:{backgroundColor:e.palette.mode==="dark"?e.palette[r].dark:e.palette[r].main,color:e.palette.getContrastText(e.palette[r].main)}}}))]}})),jCe=oe("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),BCe=oe("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),I3=oe("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),k3={success:$.jsx(RCe,{fontSize:"inherit"}),warning:$.jsx(_Ce,{fontSize:"inherit"}),error:$.jsx(DCe,{fontSize:"inherit"}),info:$.jsx(NCe,{fontSize:"inherit"})},qu=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlert"}),{action:o,children:i,className:a,closeText:s="Close",color:l,components:c={},componentsProps:u={},icon:d,iconMapping:f=k3,onClose:p,role:m="alert",severity:g="success",slotProps:v={},slots:w={},variant:x="standard",...S}=r,P={...r,color:l,severity:g,variant:x,colorSeverity:l||g},T=LCe(P),E={slots:{closeButton:c.CloseButton,closeIcon:c.CloseIcon,...w},slotProps:{...u,...v}},[O,k]=hr("closeButton",{elementType:kn,externalForwardedProps:E,ownerState:P}),[A,I]=hr("closeIcon",{elementType:QJ,externalForwardedProps:E,ownerState:P});return $.jsxs(FCe,{role:m,elevation:0,ownerState:P,className:de(T.root,a),ref:n,...S,children:[d!==!1?$.jsx(jCe,{ownerState:P,className:T.icon,children:d||f[g]||k3[g]}):null,$.jsx(BCe,{ownerState:P,className:T.message,children:i}),o!=null?$.jsx(I3,{ownerState:P,className:T.action,children:o}):null,o==null&&p?$.jsx(I3,{ownerState:P,className:T.action,children:$.jsx(O,{size:"small","aria-label":s,title:s,color:"inherit",onClick:p,...k,children:$.jsx(A,{fontSize:"small",...I})})}):null]})});function zCe(e){return tt("MuiTypography",e)}const jT=ot("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]),VCe={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},HCe=kxe(),UCe=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:a}=e,s={root:["root",i,e.align!=="inherit"&&`align${Ce(t)}`,n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return rt(s,zCe,a)},WCe=oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(Ze(({theme:e})=>{var t;return{margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([n,r])=>n!=="inherit"&&r&&typeof r=="object").map(([n,r])=>({props:{variant:n},style:r})),...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),...Object.entries(((t=e.palette)==null?void 0:t.text)||{}).filter(([,n])=>typeof n=="string").map(([n])=>({props:{color:`text${Ce(n)}`},style:{color:(e.vars||e).palette.text[n]}})),{props:({ownerState:n})=>n.align!=="inherit",style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:n})=>n.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:n})=>n.gutterBottom,style:{marginBottom:"0.35em"}},{props:({ownerState:n})=>n.paragraph,style:{marginBottom:16}}]}})),M3={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},ct=y.forwardRef(function(t,n){const{color:r,...o}=it({props:t,name:"MuiTypography"}),i=!VCe[r],a=HCe({...o,...i&&{color:r}}),{align:s="inherit",className:l,component:c,gutterBottom:u=!1,noWrap:d=!1,paragraph:f=!1,variant:p="body1",variantMapping:m=M3,...g}=a,v={...a,align:s,color:r,className:l,component:c,gutterBottom:u,noWrap:d,paragraph:f,variant:p,variantMapping:m},w=c||(f?"p":m[p]||M3[p])||"span",x=UCe(v);return $.jsx(WCe,{as:w,ref:n,className:de(x.root,l),...g,ownerState:v,style:{...s!=="inherit"&&{"--Typography-textAlign":s},...g.style}})});function GCe(e){return tt("MuiAlertTitle",e)}ot("MuiAlertTitle",["root"]);const qCe=e=>{const{classes:t}=e;return rt({root:["root"]},GCe,t)},KCe=oe(ct,{name:"MuiAlertTitle",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({fontWeight:e.typography.fontWeightMedium,marginTop:-2}))),BT=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAlertTitle"}),{className:o,...i}=r,a=r,s=qCe(a);return $.jsx(KCe,{gutterBottom:!0,component:"div",ownerState:a,ref:n,className:de(s.root,o),...i})});function YCe(e){return tt("MuiAppBar",e)}ot("MuiAppBar",["root","positionFixed","positionAbsolute","positionSticky","positionStatic","positionRelative","colorDefault","colorPrimary","colorSecondary","colorInherit","colorTransparent","colorError","colorInfo","colorSuccess","colorWarning"]);const XCe=e=>{const{color:t,position:n,classes:r}=e,o={root:["root",`color${Ce(t)}`,`position${Ce(n)}`]};return rt(o,YCe,r)},A3=(e,t)=>e?`${e==null?void 0:e.replace(")","")}, ${t})`:t,QCe=oe(uo,{name:"MuiAppBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({display:"flex",flexDirection:"column",width:"100%",boxSizing:"border-box",flexShrink:0,variants:[{props:{position:"fixed"},style:{position:"fixed",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0,"@media print":{position:"absolute"}}},{props:{position:"absolute"},style:{position:"absolute",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"sticky"},style:{position:"sticky",zIndex:(e.vars||e).zIndex.appBar,top:0,left:"auto",right:0}},{props:{position:"static"},style:{position:"static"}},{props:{position:"relative"},style:{position:"relative"}},{props:{color:"inherit"},style:{"--AppBar-color":"inherit"}},{props:{color:"default"},style:{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[100],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[100]),...e.applyStyles("dark",{"--AppBar-background":e.vars?e.vars.palette.AppBar.defaultBg:e.palette.grey[900],"--AppBar-color":e.vars?e.vars.palette.text.primary:e.palette.getContrastText(e.palette.grey[900])})}},...Object.entries(e.palette).filter(zn(["contrastText"])).map(([t])=>({props:{color:t},style:{"--AppBar-background":(e.vars??e).palette[t].main,"--AppBar-color":(e.vars??e).palette[t].contrastText}})),{props:t=>t.enableColorOnDark===!0&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)"}},{props:t=>t.enableColorOnDark===!1&&!["inherit","transparent"].includes(t.color),style:{backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundColor:e.vars?A3(e.vars.palette.AppBar.darkBg,"var(--AppBar-background)"):null,color:e.vars?A3(e.vars.palette.AppBar.darkColor,"var(--AppBar-color)"):null})}},{props:{color:"transparent"},style:{"--AppBar-background":"transparent","--AppBar-color":"inherit",backgroundColor:"var(--AppBar-background)",color:"var(--AppBar-color)",...e.applyStyles("dark",{backgroundImage:"none"})}}]}))),JCe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAppBar"}),{className:o,color:i="primary",enableColorOnDark:a=!1,position:s="fixed",...l}=r,c={...r,color:i,position:s,enableColorOnDark:a},u=XCe(c);return $.jsx(QCe,{square:!0,component:"header",ownerState:c,elevation:4,className:de(u.root,o,s==="fixed"&&"mui-fixed"),ref:n,...l})});function $3(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function JJ(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(s,{inputValue:l,getOptionLabel:c})=>{let u=a?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=$3(u));const d=u?s.filter(f=>{let p=(i||c)(f);return n&&(p=p.toLowerCase()),t&&(p=$3(p)),o==="start"?p.startsWith(u):p.includes(u)}):s;return typeof r=="number"?d.slice(0,r):d}}const ZCe=JJ(),R3=5,ePe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},tPe=[];function nPe(e){const{unstable_isActiveElementInListbox:t=ePe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:s=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?tPe:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:p,disabledItemsFocusable:m=!1,disableListWrap:g=!1,filterOptions:v=ZCe,filterSelectedOptions:w=!1,freeSolo:x=!1,getOptionDisabled:S,getOptionKey:P,getOptionLabel:T=He=>He.label??He,groupBy:E,handleHomeEndKeys:O=!e.freeSolo,id:k,includeInputInList:A=!1,inputValue:I,isOptionEqualToValue:R=(He,Ne)=>He===Ne,multiple:N=!1,onChange:L,onClose:j,onHighlightChange:_,onInputChange:D,onOpen:z,open:F,openOnFocus:H=!1,options:U,readOnly:q=!1,selectOnFocus:X=!e.freeSolo,value:ae}=e,Z=wh(k);let K=T;K=He=>{const Ne=T(He);return typeof Ne!="string"?String(Ne):Ne};const te=y.useRef(!1),pe=y.useRef(!0),ie=y.useRef(null),le=y.useRef(null),[re,fe]=y.useState(null),[ee,ce]=y.useState(-1),me=o?0:-1,we=y.useRef(me),[ge,Se]=ku({controlled:ae,default:u,name:c}),[xe,Ie]=ku({controlled:I,default:"",name:c,state:"inputValue"}),[Re,_e]=y.useState(!1),ye=y.useCallback((He,Ne,wt)=>{if(!(N?ge.length!(w&&(N?ge:[ge]).some(Ne=>Ne!==null&&R(He,Ne)))),{inputValue:Ve&&Me?"":xe,getOptionLabel:K}):[],nt=NL({filteredOptions:ut,value:ge,inputValue:xe});y.useEffect(()=>{const He=ge!==nt.value;Re&&!He||x&&!He||ye(null,ge,"reset")},[ge,ye,Re,nt.value,x]);const et=Te&&ut.length>0&&!q,yt=Go(He=>{He===-1?ie.current.focus():re.querySelector(`[data-tag-index="${He}"]`).focus()});y.useEffect(()=>{N&&ee>ge.length-1&&(ce(-1),yt(-1))},[ge,N,ee,yt]);function wn(He,Ne){if(!le.current||He<0||He>=ut.length)return-1;let wt=He;for(;;){const en=le.current.querySelector(`[data-option-index="${wt}"]`),sn=m?!1:!en||en.disabled||en.getAttribute("aria-disabled")==="true";if(en&&en.hasAttribute("tabindex")&&!sn)return wt;if(Ne==="next"?wt=(wt+1)%ut.length:wt=(wt-1+ut.length)%ut.length,wt===He)return-1}}const Ke=Go(({event:He,index:Ne,reason:wt="auto"})=>{if(we.current=Ne,Ne===-1?ie.current.removeAttribute("aria-activedescendant"):ie.current.setAttribute("aria-activedescendant",`${Z}-option-${Ne}`),_&&_(He,Ne===-1?null:ut[Ne],wt),!le.current)return;const en=le.current.querySelector(`[role="option"].${n}-focused`);en&&(en.classList.remove(`${n}-focused`),en.classList.remove(`${n}-focusVisible`));let sn=le.current;if(le.current.getAttribute("role")!=="listbox"&&(sn=le.current.parentElement.querySelector('[role="listbox"]')),!sn)return;if(Ne===-1){sn.scrollTop=0;return}const Rr=le.current.querySelector(`[data-option-index="${Ne}"]`);if(Rr&&(Rr.classList.add(`${n}-focused`),wt==="keyboard"&&Rr.classList.add(`${n}-focusVisible`),sn.scrollHeight>sn.clientHeight&&wt!=="mouse"&&wt!=="touch")){const Gn=Rr,Oa=sn.clientHeight+sn.scrollTop,nu=Gn.offsetTop+Gn.offsetHeight;nu>Oa?sn.scrollTop=nu-sn.clientHeight:Gn.offsetTop-Gn.offsetHeight*(E?1.3:0){if(!Qe)return;const Rr=wn((()=>{const Gn=ut.length-1;if(Ne==="reset")return me;if(Ne==="start")return 0;if(Ne==="end")return Gn;const Oa=we.current+Ne;return Oa<0?Oa===-1&&A?-1:g&&we.current!==-1||Math.abs(Ne)>1?0:Gn:Oa>Gn?Oa===Gn+1&&A?-1:g||Math.abs(Ne)>1?Gn:0:Oa})(),wt);if(Ke({index:Rr,reason:en,event:He}),r&&Ne!=="reset")if(Rr===-1)ie.current.value=xe;else{const Gn=K(ut[Rr]);ie.current.value=Gn,Gn.toLowerCase().indexOf(xe.toLowerCase())===0&&xe.length>0&&ie.current.setSelectionRange(xe.length,Gn.length)}}),Xe=()=>{const He=(Ne,wt)=>{const en=Ne?K(Ne):"",sn=wt?K(wt):"";return en===sn};if(we.current!==-1&&nt.filteredOptions&&nt.filteredOptions.length!==ut.length&&nt.inputValue===xe&&(N?ge.length===nt.value.length&&nt.value.every((Ne,wt)=>K(ge[wt])===K(Ne)):He(nt.value,ge))){const Ne=nt.filteredOptions[we.current];if(Ne)return ut.findIndex(wt=>K(wt)===K(Ne))}return-1},bt=y.useCallback(()=>{if(!Qe)return;const He=Xe();if(He!==-1){we.current=He;return}const Ne=N?ge[0]:ge;if(ut.length===0||Ne==null){$e({diff:"reset"});return}if(le.current){if(Ne!=null){const wt=ut[we.current];if(N&&wt&&ge.findIndex(sn=>R(wt,sn))!==-1)return;const en=ut.findIndex(sn=>R(sn,Ne));en===-1?$e({diff:"reset"}):Ke({index:en});return}if(we.current>=ut.length-1){Ke({index:ut.length-1});return}Ke({index:we.current})}},[ut.length,N?!1:ge,w,$e,Ke,Qe,xe,N]),Vt=Go(He=>{sT(le,He),He&&bt()});y.useEffect(()=>{bt()},[bt]);const Ot=He=>{Te||(Oe(!0),We(!0),z&&z(He))},un=(He,Ne)=>{Te&&(Oe(!1),j&&j(He,Ne))},jn=(He,Ne,wt,en)=>{if(N){if(ge.length===Ne.length&&ge.every((sn,Rr)=>sn===Ne[Rr]))return}else if(ge===Ne)return;L&&L(He,Ne,wt,en),Se(Ne)},Wn=y.useRef(!1),Eo=(He,Ne,wt="selectOption",en="options")=>{let sn=wt,Rr=Ne;if(N){Rr=Array.isArray(ge)?ge.slice():[];const Gn=Rr.findIndex(Oa=>R(Ne,Oa));Gn===-1?Rr.push(Ne):en!=="freeSolo"&&(Rr.splice(Gn,1),sn="removeOption")}ye(He,Rr,sn),jn(He,Rr,sn,{option:Ne}),!f&&(!He||!He.ctrlKey&&!He.metaKey)&&un(He,sn),(a===!0||a==="touch"&&Wn.current||a==="mouse"&&!Wn.current)&&ie.current.blur()};function Kr(He,Ne){if(He===-1)return-1;let wt=He;for(;;){if(Ne==="next"&&wt===ge.length||Ne==="previous"&&wt===-1)return-1;const en=re.querySelector(`[data-tag-index="${wt}"]`);if(!en||!en.hasAttribute("tabindex")||en.disabled||en.getAttribute("aria-disabled")==="true")wt+=Ne==="next"?1:-1;else return wt}}const Ii=(He,Ne)=>{if(!N)return;xe===""&&un(He,"toggleInput");let wt=ee;ee===-1?xe===""&&Ne==="previous"&&(wt=ge.length-1):(wt+=Ne==="next"?1:-1,wt<0&&(wt=0),wt===ge.length&&(wt=-1)),wt=Kr(wt,Ne),ce(wt),yt(wt)},ys=He=>{te.current=!0,Ie(""),D&&D(He,"","clear"),jn(He,N?[]:null,"clear")},Wt=He=>Ne=>{if(He.onKeyDown&&He.onKeyDown(Ne),!Ne.defaultMuiPrevented&&(ee!==-1&&!["ArrowLeft","ArrowRight"].includes(Ne.key)&&(ce(-1),yt(-1)),Ne.which!==229))switch(Ne.key){case"Home":Qe&&O&&(Ne.preventDefault(),$e({diff:"start",direction:"next",reason:"keyboard",event:Ne}));break;case"End":Qe&&O&&(Ne.preventDefault(),$e({diff:"end",direction:"previous",reason:"keyboard",event:Ne}));break;case"PageUp":Ne.preventDefault(),$e({diff:-R3,direction:"previous",reason:"keyboard",event:Ne}),Ot(Ne);break;case"PageDown":Ne.preventDefault(),$e({diff:R3,direction:"next",reason:"keyboard",event:Ne}),Ot(Ne);break;case"ArrowDown":Ne.preventDefault(),$e({diff:1,direction:"next",reason:"keyboard",event:Ne}),Ot(Ne);break;case"ArrowUp":Ne.preventDefault(),$e({diff:-1,direction:"previous",reason:"keyboard",event:Ne}),Ot(Ne);break;case"ArrowLeft":Ii(Ne,"previous");break;case"ArrowRight":Ii(Ne,"next");break;case"Enter":if(we.current!==-1&&Qe){const wt=ut[we.current],en=S?S(wt):!1;if(Ne.preventDefault(),en)return;Eo(Ne,wt,"selectOption"),r&&ie.current.setSelectionRange(ie.current.value.length,ie.current.value.length)}else x&&xe!==""&&Ve===!1&&(N&&Ne.preventDefault(),Eo(Ne,xe,"createOption","freeSolo"));break;case"Escape":Qe?(Ne.preventDefault(),Ne.stopPropagation(),un(Ne,"escape")):l&&(xe!==""||N&&ge.length>0)&&(Ne.preventDefault(),Ne.stopPropagation(),ys(Ne));break;case"Backspace":if(N&&!q&&xe===""&&ge.length>0){const wt=ee===-1?ge.length-1:ee,en=ge.slice();en.splice(wt,1),jn(Ne,en,"removeOption",{option:ge[wt]})}break;case"Delete":if(N&&!q&&xe===""&&ge.length>0&&ee!==-1){const wt=ee,en=ge.slice();en.splice(wt,1),jn(Ne,en,"removeOption",{option:ge[wt]})}break}},Xo=He=>{_e(!0),H&&!te.current&&Ot(He)},ym=He=>{if(t(le)){ie.current.focus();return}_e(!1),pe.current=!0,te.current=!1,i&&we.current!==-1&&Qe?Eo(He,ut[we.current],"blur"):i&&x&&xe!==""?Eo(He,xe,"blur","freeSolo"):s&&ye(He,ge,"blur"),un(He,"blur")},pd=He=>{const Ne=He.target.value;xe!==Ne&&(Ie(Ne),We(!1),D&&D(He,Ne,"input")),Ne===""?!d&&!N&&jn(He,null,"clear"):Ot(He)},tu=He=>{const Ne=Number(He.currentTarget.getAttribute("data-option-index"));we.current!==Ne&&Ke({event:He,index:Ne,reason:"mouse"})},lp=He=>{Ke({event:He,index:Number(He.currentTarget.getAttribute("data-option-index")),reason:"touch"}),Wn.current=!0},cp=He=>{const Ne=Number(He.currentTarget.getAttribute("data-option-index"));Eo(He,ut[Ne],"selectOption"),Wn.current=!1},$b=He=>Ne=>{const wt=ge.slice();wt.splice(He,1),jn(Ne,wt,"removeOption",{option:ge[He]})},vm=He=>{Te?un(He,"toggleInput"):Ot(He)},w1=He=>{He.currentTarget.contains(He.target)&&He.target.getAttribute("id")!==Z&&He.preventDefault()},up=He=>{He.currentTarget.contains(He.target)&&(ie.current.focus(),X&&pe.current&&ie.current.selectionEnd-ie.current.selectionStart===0&&ie.current.select(),pe.current=!1)},Fo=He=>{!p&&(xe===""||!Te)&&vm(He)};let Yr=x&&xe.length>0;Yr=Yr||(N?ge.length>0:ge!==null);let Sl=ut;return E&&(Sl=ut.reduce((He,Ne,wt)=>{const en=E(Ne);return He.length>0&&He[He.length-1].group===en?He[He.length-1].options.push(Ne):He.push({key:wt,index:wt,group:en,options:[Ne]}),He},[])),p&&Re&&ym(),{getRootProps:(He={})=>({"aria-owns":et?`${Z}-listbox`:null,...He,onKeyDown:Wt(He),onMouseDown:w1,onClick:up}),getInputLabelProps:()=>({id:`${Z}-label`,htmlFor:Z}),getInputProps:()=>({id:Z,value:xe,onBlur:ym,onFocus:Xo,onChange:pd,onMouseDown:Fo,"aria-activedescendant":Qe?"":null,"aria-autocomplete":r?"both":"list","aria-controls":et?`${Z}-listbox`:void 0,"aria-expanded":et,autoComplete:"off",ref:ie,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:p}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:ys}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:vm}),getTagProps:({index:He})=>({key:He,"data-tag-index":He,tabIndex:-1,...!q&&{onDelete:$b(He)}}),getListboxProps:()=>({role:"listbox",id:`${Z}-listbox`,"aria-labelledby":`${Z}-label`,ref:Vt,onMouseDown:He=>{He.preventDefault()}}),getOptionProps:({index:He,option:Ne})=>{const wt=(N?ge:[ge]).some(sn=>sn!=null&&R(Ne,sn)),en=S?S(Ne):!1;return{key:(P==null?void 0:P(Ne))??K(Ne),tabIndex:-1,role:"option",id:`${Z}-option-${He}`,onMouseMove:tu,onClick:cp,onTouchStart:lp,"data-option-index":He,"aria-disabled":en,"aria-selected":wt}},id:Z,inputValue:xe,value:ge,dirty:Yr,expanded:Qe&&re,popupOpen:Qe,focused:Re||ee!==-1,anchorEl:re,setAnchorEl:fe,focusedTag:ee,groupedOptions:Sl}}var ba="top",sl="bottom",ll="right",wa="left",BF="auto",OS=[ba,sl,ll,wa],jy="start",rx="end",rPe="clippingParents",ZJ="viewport",o0="popper",oPe="reference",_3=OS.reduce(function(e,t){return e.concat([t+"-"+jy,t+"-"+rx])},[]),eZ=[].concat(OS,[BF]).reduce(function(e,t){return e.concat([t,t+"-"+jy,t+"-"+rx])},[]),iPe="beforeRead",aPe="read",sPe="afterRead",lPe="beforeMain",cPe="main",uPe="afterMain",dPe="beforeWrite",fPe="write",pPe="afterWrite",hPe=[iPe,aPe,sPe,lPe,cPe,uPe,dPe,fPe,pPe];function zc(e){return e?(e.nodeName||"").toLowerCase():null}function as(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ih(e){var t=as(e).Element;return e instanceof t||e instanceof Element}function el(e){var t=as(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function zF(e){if(typeof ShadowRoot>"u")return!1;var t=as(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function mPe(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},o=t.attributes[n]||{},i=t.elements[n];!el(i)||!zc(i)||(Object.assign(i.style,r),Object.keys(o).forEach(function(a){var s=o[a];s===!1?i.removeAttribute(a):i.setAttribute(a,s===!0?"":s)}))})}function gPe(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var o=t.elements[r],i=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!el(o)||!zc(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(l){o.removeAttribute(l)}))})}}const yPe={name:"applyStyles",enabled:!0,phase:"write",fn:mPe,effect:gPe,requires:["computeStyles"]};function Rc(e){return e.split("-")[0]}var lh=Math.max,zT=Math.min,By=Math.round;function u_(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function tZ(){return!/^((?!chrome|android).)*safari/i.test(u_())}function zy(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&el(e)&&(o=e.offsetWidth>0&&By(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&By(r.height)/e.offsetHeight||1);var a=Ih(e)?as(e):window,s=a.visualViewport,l=!tZ()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/o,u=(r.top+(l&&s?s.offsetTop:0))/i,d=r.width/o,f=r.height/i;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function VF(e){var t=zy(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nZ(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&zF(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Ku(e){return as(e).getComputedStyle(e)}function vPe(e){return["table","td","th"].indexOf(zc(e))>=0}function Vf(e){return((Ih(e)?e.ownerDocument:e.document)||window.document).documentElement}function AI(e){return zc(e)==="html"?e:e.assignedSlot||e.parentNode||(zF(e)?e.host:null)||Vf(e)}function D3(e){return!el(e)||Ku(e).position==="fixed"?null:e.offsetParent}function bPe(e){var t=/firefox/i.test(u_()),n=/Trident/i.test(u_());if(n&&el(e)){var r=Ku(e);if(r.position==="fixed")return null}var o=AI(e);for(zF(o)&&(o=o.host);el(o)&&["html","body"].indexOf(zc(o))<0;){var i=Ku(o);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return o;o=o.parentNode}return null}function IS(e){for(var t=as(e),n=D3(e);n&&vPe(n)&&Ku(n).position==="static";)n=D3(n);return n&&(zc(n)==="html"||zc(n)==="body"&&Ku(n).position==="static")?t:n||bPe(e)||t}function HF(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function dw(e,t,n){return lh(e,zT(t,n))}function wPe(e,t,n){var r=dw(e,t,n);return r>n?n:r}function rZ(){return{top:0,right:0,bottom:0,left:0}}function oZ(e){return Object.assign({},rZ(),e)}function iZ(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var xPe=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,oZ(typeof t!="number"?t:iZ(t,OS))};function SPe(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Rc(n.placement),l=HF(s),c=[wa,ll].indexOf(s)>=0,u=c?"height":"width";if(!(!i||!a)){var d=xPe(o.padding,n),f=VF(i),p=l==="y"?ba:wa,m=l==="y"?sl:ll,g=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],v=a[l]-n.rects.reference[l],w=IS(i),x=w?l==="y"?w.clientHeight||0:w.clientWidth||0:0,S=g/2-v/2,P=d[p],T=x-f[u]-d[m],E=x/2-f[u]/2+S,O=dw(P,E,T),k=l;n.modifiersData[r]=(t={},t[k]=O,t.centerOffset=O-E,t)}}function CPe(e){var t=e.state,n=e.options,r=n.element,o=r===void 0?"[data-popper-arrow]":r;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||nZ(t.elements.popper,o)&&(t.elements.arrow=o))}const PPe={name:"arrow",enabled:!0,phase:"main",fn:SPe,effect:CPe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Vy(e){return e.split("-")[1]}var TPe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function EPe(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:By(n*o)/o||0,y:By(r*o)/o||0}}function N3(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,g=m===void 0?0:m,v=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=v.x,g=v.y;var w=a.hasOwnProperty("x"),x=a.hasOwnProperty("y"),S=wa,P=ba,T=window;if(c){var E=IS(n),O="clientHeight",k="clientWidth";if(E===as(n)&&(E=Vf(n),Ku(E).position!=="static"&&s==="absolute"&&(O="scrollHeight",k="scrollWidth")),E=E,o===ba||(o===wa||o===ll)&&i===rx){P=sl;var A=d&&E===T&&T.visualViewport?T.visualViewport.height:E[O];g-=A-r.height,g*=l?1:-1}if(o===wa||(o===ba||o===sl)&&i===rx){S=ll;var I=d&&E===T&&T.visualViewport?T.visualViewport.width:E[k];p-=I-r.width,p*=l?1:-1}}var R=Object.assign({position:s},c&&TPe),N=u===!0?EPe({x:p,y:g},as(n)):{x:p,y:g};if(p=N.x,g=N.y,l){var L;return Object.assign({},R,(L={},L[P]=x?"0":"",L[S]=w?"0":"",L.transform=(T.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",L))}return Object.assign({},R,(t={},t[P]=x?g+"px":"",t[S]=w?p+"px":"",t.transform="",t))}function OPe(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=r===void 0?!0:r,i=n.adaptive,a=i===void 0?!0:i,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:Rc(t.placement),variation:Vy(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,N3(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,N3(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const IPe={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:OPe,data:{}};var RC={passive:!0};function kPe(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=o===void 0?!0:o,a=r.resize,s=a===void 0?!0:a,l=as(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach(function(u){u.addEventListener("scroll",n.update,RC)}),s&&l.addEventListener("resize",n.update,RC),function(){i&&c.forEach(function(u){u.removeEventListener("scroll",n.update,RC)}),s&&l.removeEventListener("resize",n.update,RC)}}const MPe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kPe,data:{}};var APe={left:"right",right:"left",bottom:"top",top:"bottom"};function jP(e){return e.replace(/left|right|bottom|top/g,function(t){return APe[t]})}var $Pe={start:"end",end:"start"};function L3(e){return e.replace(/start|end/g,function(t){return $Pe[t]})}function UF(e){var t=as(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function WF(e){return zy(Vf(e)).left+UF(e).scrollLeft}function RPe(e,t){var n=as(e),r=Vf(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;var c=tZ();(c||!c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s+WF(e),y:l}}function _Pe(e){var t,n=Vf(e),r=UF(e),o=(t=e.ownerDocument)==null?void 0:t.body,i=lh(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=lh(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-r.scrollLeft+WF(e),l=-r.scrollTop;return Ku(o||n).direction==="rtl"&&(s+=lh(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:l}}function GF(e){var t=Ku(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function aZ(e){return["html","body","#document"].indexOf(zc(e))>=0?e.ownerDocument.body:el(e)&&GF(e)?e:aZ(AI(e))}function fw(e,t){var n;t===void 0&&(t=[]);var r=aZ(e),o=r===((n=e.ownerDocument)==null?void 0:n.body),i=as(r),a=o?[i].concat(i.visualViewport||[],GF(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(fw(AI(a)))}function d_(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function DPe(e,t){var n=zy(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function F3(e,t,n){return t===ZJ?d_(RPe(e,n)):Ih(t)?DPe(t,n):d_(_Pe(Vf(e)))}function NPe(e){var t=fw(AI(e)),n=["absolute","fixed"].indexOf(Ku(e).position)>=0,r=n&&el(e)?IS(e):e;return Ih(r)?t.filter(function(o){return Ih(o)&&nZ(o,r)&&zc(o)!=="body"}):[]}function LPe(e,t,n,r){var o=t==="clippingParents"?NPe(e):[].concat(t),i=[].concat(o,[n]),a=i[0],s=i.reduce(function(l,c){var u=F3(e,c,r);return l.top=lh(u.top,l.top),l.right=zT(u.right,l.right),l.bottom=zT(u.bottom,l.bottom),l.left=lh(u.left,l.left),l},F3(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sZ(e){var t=e.reference,n=e.element,r=e.placement,o=r?Rc(r):null,i=r?Vy(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(o){case ba:l={x:a,y:t.y-n.height};break;case sl:l={x:a,y:t.y+t.height};break;case ll:l={x:t.x+t.width,y:s};break;case wa:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=o?HF(o):null;if(c!=null){var u=c==="y"?"height":"width";switch(i){case jy:l[c]=l[c]-(t[u]/2-n[u]/2);break;case rx:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function ox(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=r===void 0?e.placement:r,i=n.strategy,a=i===void 0?e.strategy:i,s=n.boundary,l=s===void 0?rPe:s,c=n.rootBoundary,u=c===void 0?ZJ:c,d=n.elementContext,f=d===void 0?o0:d,p=n.altBoundary,m=p===void 0?!1:p,g=n.padding,v=g===void 0?0:g,w=oZ(typeof v!="number"?v:iZ(v,OS)),x=f===o0?oPe:o0,S=e.rects.popper,P=e.elements[m?x:f],T=LPe(Ih(P)?P:P.contextElement||Vf(e.elements.popper),l,u,a),E=zy(e.elements.reference),O=sZ({reference:E,element:S,strategy:"absolute",placement:o}),k=d_(Object.assign({},S,O)),A=f===o0?k:E,I={top:T.top-A.top+w.top,bottom:A.bottom-T.bottom+w.bottom,left:T.left-A.left+w.left,right:A.right-T.right+w.right},R=e.modifiersData.offset;if(f===o0&&R){var N=R[o];Object.keys(I).forEach(function(L){var j=[ll,sl].indexOf(L)>=0?1:-1,_=[ba,sl].indexOf(L)>=0?"y":"x";I[L]+=N[_]*j})}return I}function FPe(e,t){t===void 0&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?eZ:l,u=Vy(r),d=u?s?_3:_3.filter(function(m){return Vy(m)===u}):OS,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,g){return m[g]=ox(e,{placement:g,boundary:o,rootBoundary:i,padding:a})[Rc(g)],m},{});return Object.keys(p).sort(function(m,g){return p[m]-p[g]})}function jPe(e){if(Rc(e)===BF)return[];var t=jP(e);return[L3(e),t,L3(t)]}function BPe(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,g=n.allowedAutoPlacements,v=t.options.placement,w=Rc(v),x=w===v,S=l||(x||!m?[jP(v)]:jPe(v)),P=[v].concat(S).reduce(function(Z,K){return Z.concat(Rc(K)===BF?FPe(t,{placement:K,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:g}):K)},[]),T=t.rects.reference,E=t.rects.popper,O=new Map,k=!0,A=P[0],I=0;I=0,_=j?"width":"height",D=ox(t,{placement:R,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),z=j?L?ll:wa:L?sl:ba;T[_]>E[_]&&(z=jP(z));var F=jP(z),H=[];if(i&&H.push(D[N]<=0),s&&H.push(D[z]<=0,D[F]<=0),H.every(function(Z){return Z})){A=R,k=!1;break}O.set(R,H)}if(k)for(var U=m?3:1,q=function(K){var te=P.find(function(pe){var ie=O.get(pe);if(ie)return ie.slice(0,K).every(function(le){return le})});if(te)return A=te,"break"},X=U;X>0;X--){var ae=q(X);if(ae==="break")break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}}const zPe={name:"flip",enabled:!0,phase:"main",fn:BPe,requiresIfExists:["offset"],data:{_skip:!1}};function j3(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function B3(e){return[ba,ll,sl,wa].some(function(t){return e[t]>=0})}function VPe(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=ox(t,{elementContext:"reference"}),s=ox(t,{altBoundary:!0}),l=j3(a,r),c=j3(s,o,i),u=B3(l),d=B3(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const HPe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:VPe};function UPe(e,t,n){var r=Rc(e),o=[wa,ba].indexOf(r)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=i[0],s=i[1];return a=a||0,s=(s||0)*o,[wa,ll].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function WPe(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=o===void 0?[0,0]:o,a=eZ.reduce(function(u,d){return u[d]=UPe(d,t.rects,i),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const GPe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:WPe};function qPe(e){var t=e.state,n=e.name;t.modifiersData[n]=sZ({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const KPe={name:"popperOffsets",enabled:!0,phase:"read",fn:qPe,data:{}};function YPe(e){return e==="x"?"y":"x"}function XPe(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=o===void 0?!0:o,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,g=m===void 0?0:m,v=ox(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),w=Rc(t.placement),x=Vy(t.placement),S=!x,P=HF(w),T=YPe(P),E=t.modifiersData.popperOffsets,O=t.rects.reference,k=t.rects.popper,A=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,I=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),R=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(E){if(i){var L,j=P==="y"?ba:wa,_=P==="y"?sl:ll,D=P==="y"?"height":"width",z=E[P],F=z+v[j],H=z-v[_],U=p?-k[D]/2:0,q=x===jy?O[D]:k[D],X=x===jy?-k[D]:-O[D],ae=t.elements.arrow,Z=p&&ae?VF(ae):{width:0,height:0},K=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rZ(),te=K[j],pe=K[_],ie=dw(0,O[D],Z[D]),le=S?O[D]/2-U-ie-te-I.mainAxis:q-ie-te-I.mainAxis,re=S?-O[D]/2+U+ie+pe+I.mainAxis:X+ie+pe+I.mainAxis,fe=t.elements.arrow&&IS(t.elements.arrow),ee=fe?P==="y"?fe.clientTop||0:fe.clientLeft||0:0,ce=(L=R==null?void 0:R[P])!=null?L:0,me=z+le-ce-ee,we=z+re-ce,ge=dw(p?zT(F,me):F,z,p?lh(H,we):H);E[P]=ge,N[P]=ge-z}if(s){var Se,xe=P==="x"?ba:wa,Ie=P==="x"?sl:ll,Re=E[T],_e=T==="y"?"height":"width",ye=Re+v[xe],Te=Re-v[Ie],Oe=[ba,wa].indexOf(w)!==-1,Me=(Se=R==null?void 0:R[T])!=null?Se:0,We=Oe?ye:Re-O[_e]-k[_e]-Me+I.altAxis,Ve=Oe?Re+O[_e]+k[_e]-Me-I.altAxis:Te,Qe=p&&Oe?wPe(We,Re,Ve):dw(p?We:ye,Re,p?Ve:Te);E[T]=Qe,N[T]=Qe-Re}t.modifiersData[r]=N}}const QPe={name:"preventOverflow",enabled:!0,phase:"main",fn:XPe,requiresIfExists:["offset"]};function JPe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ZPe(e){return e===as(e)||!el(e)?UF(e):JPe(e)}function eTe(e){var t=e.getBoundingClientRect(),n=By(t.width)/e.offsetWidth||1,r=By(t.height)/e.offsetHeight||1;return n!==1||r!==1}function tTe(e,t,n){n===void 0&&(n=!1);var r=el(t),o=el(t)&&eTe(t),i=Vf(t),a=zy(e,o,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((zc(t)!=="body"||GF(i))&&(s=ZPe(t)),el(t)?(l=zy(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=WF(i))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function nTe(e){var t=new Map,n=new Set,r=[];e.forEach(function(i){t.set(i.name,i)});function o(i){n.add(i.name);var a=[].concat(i.requires||[],i.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&o(l)}}),r.push(i)}return e.forEach(function(i){n.has(i.name)||o(i)}),r}function rTe(e){var t=nTe(e);return hPe.reduce(function(n,r){return n.concat(t.filter(function(o){return o.phase===r}))},[])}function oTe(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function iTe(e){var t=e.reduce(function(n,r){var o=n[r.name];return n[r.name]=o?Object.assign({},o,r,{options:Object.assign({},o.options,r.options),data:Object.assign({},o.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var z3={placement:"bottom",modifiers:[],strategy:"absolute"};function V3(){for(var e=arguments.length,t=new Array(e),n=0;n{i||s(cTe(o)||document.body)},[o,i]),rs(()=>{if(a&&!i)return sT(n,a),()=>{sT(n,null)}},[n,a,i]),i){if(y.isValidElement(r)){const c={ref:l};return y.cloneElement(r,c)}return $.jsx(y.Fragment,{children:r})}return $.jsx(y.Fragment,{children:a&&MI.createPortal(r,a)})});function uTe(e){return tt("MuiPopper",e)}ot("MuiPopper",["root"]);function dTe(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function f_(e){return typeof e=="function"?e():e}function fTe(e){return e.nodeType!==void 0}const pTe=e=>{const{classes:t}=e;return rt({root:["root"]},uTe,t)},hTe={},mTe=y.forwardRef(function(t,n){const{anchorEl:r,children:o,direction:i,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:g,...v}=t,w=y.useRef(null),x=Cr(w,n),S=y.useRef(null),P=Cr(S,d),T=y.useRef(P);rs(()=>{T.current=P},[P]),y.useImperativeHandle(d,()=>S.current,[]);const E=dTe(c,i),[O,k]=y.useState(E),[A,I]=y.useState(f_(r));y.useEffect(()=>{S.current&&S.current.forceUpdate()}),y.useEffect(()=>{r&&I(f_(r))},[r]),rs(()=>{if(!A||!l)return;const _=F=>{k(F.placement)};let D=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:F})=>{_(F)}}];s!=null&&(D=D.concat(s)),u&&u.modifiers!=null&&(D=D.concat(u.modifiers));const z=lTe(A,w.current,{placement:E,...u,modifiers:D});return T.current(z),()=>{z.destroy(),T.current(null)}},[A,a,s,l,u,E]);const R={placement:O};m!==null&&(R.TransitionProps=m);const N=pTe(t),L=p.root??"div",j=Bc({elementType:L,externalSlotProps:f.root,externalForwardedProps:v,additionalProps:{role:"tooltip",ref:x},ownerState:t,className:N.root});return $.jsx(L,{...j,children:typeof o=="function"?o(R):o})}),gTe=y.forwardRef(function(t,n){const{anchorEl:r,children:o,container:i,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=hTe,popperRef:p,style:m,transition:g=!1,slotProps:v={},slots:w={},...x}=t,[S,P]=y.useState(!0),T=()=>{P(!1)},E=()=>{P(!0)};if(!l&&!u&&(!g||S))return null;let O;if(i)O=i;else if(r){const I=f_(r);O=I&&fTe(I)?ii(I).body:ii(null).body}const k=!u&&l&&(!g||S)?"none":void 0,A=g?{in:u,onEnter:T,onExited:E}:void 0;return $.jsx(lZ,{disablePortal:s,container:O,children:$.jsx(mTe,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:g?!S:u,placement:d,popperOptions:f,popperRef:p,slotProps:v,slots:w,...x,style:{position:"fixed",top:0,left:0,display:k,...m},TransitionProps:A,children:o})})}),yTe=oe(gTe,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Hf=y.forwardRef(function(t,n){const r=nr(),o=it({props:t,name:"MuiPopper"}),{anchorEl:i,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:v,transition:w,slots:x,slotProps:S,...P}=o,T=(x==null?void 0:x.root)??(s==null?void 0:s.Root),E={anchorEl:i,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:g,popperRef:v,transition:w,...P};return $.jsx(yTe,{as:a,direction:r?"rtl":"ltr",slots:{root:T},slotProps:S??l,...E,ref:n})});function vTe(e){return tt("MuiListSubheader",e)}ot("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const bTe=e=>{const{classes:t,color:n,disableGutters:r,inset:o,disableSticky:i}=e,a={root:["root",n!=="default"&&`color${Ce(n)}`,!r&&"gutters",o&&"inset",!i&&"sticky"]};return rt(a,vTe,t)},wTe=oe("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${Ce(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Ze(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),p_=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListSubheader"}),{className:o,color:i="default",component:a="li",disableGutters:s=!1,disableSticky:l=!1,inset:c=!1,...u}=r,d={...r,color:i,component:a,disableGutters:s,disableSticky:l,inset:c},f=bTe(d);return $.jsx(wTe,{as:a,className:de(f.root,o),ref:n,ownerState:d,...u})});p_&&(p_.muiSkipListHighlight=!0);const xTe=lt($.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function STe(e){return tt("MuiChip",e)}const Pn=ot("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),CTe=e=>{const{classes:t,disabled:n,size:r,color:o,iconColor:i,onDelete:a,clickable:s,variant:l}=e,c={root:["root",l,n&&"disabled",`size${Ce(r)}`,`color${Ce(o)}`,s&&"clickable",s&&`clickableColor${Ce(o)}`,a&&"deletable",a&&`deletableColor${Ce(o)}`,`${l}${Ce(o)}`],label:["label",`label${Ce(r)}`],avatar:["avatar",`avatar${Ce(r)}`,`avatarColor${Ce(o)}`],icon:["icon",`icon${Ce(r)}`,`iconColor${Ce(i)}`],deleteIcon:["deleteIcon",`deleteIcon${Ce(r)}`,`deleteIconColor${Ce(o)}`,`deleteIcon${Ce(l)}Color${Ce(o)}`]};return rt(c,STe,t)},PTe=oe("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:o,clickable:i,onDelete:a,size:s,variant:l}=n;return[{[`& .${Pn.avatar}`]:t.avatar},{[`& .${Pn.avatar}`]:t[`avatar${Ce(s)}`]},{[`& .${Pn.avatar}`]:t[`avatarColor${Ce(r)}`]},{[`& .${Pn.icon}`]:t.icon},{[`& .${Pn.icon}`]:t[`icon${Ce(s)}`]},{[`& .${Pn.icon}`]:t[`iconColor${Ce(o)}`]},{[`& .${Pn.deleteIcon}`]:t.deleteIcon},{[`& .${Pn.deleteIcon}`]:t[`deleteIcon${Ce(s)}`]},{[`& .${Pn.deleteIcon}`]:t[`deleteIconColor${Ce(r)}`]},{[`& .${Pn.deleteIcon}`]:t[`deleteIcon${Ce(l)}Color${Ce(r)}`]},t.root,t[`size${Ce(s)}`],t[`color${Ce(r)}`],i&&t.clickable,i&&r!=="default"&&t[`clickableColor${Ce(r)})`],a&&t.deletable,a&&r!=="default"&&t[`deletableColor${Ce(r)}`],t[l],t[`${l}${Ce(r)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Pn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Pn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Pn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Pn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Pn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Pn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Pn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:mt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:mt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Pn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Pn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(zn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Pn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:mt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Pn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Pn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Pn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Pn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Pn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Pn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Pn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Pn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Pn.avatar}`]:{marginLeft:4},[`& .${Pn.avatarSmall}`]:{marginLeft:2},[`& .${Pn.icon}`]:{marginLeft:4},[`& .${Pn.iconSmall}`]:{marginLeft:2},[`& .${Pn.deleteIcon}`]:{marginRight:5},[`& .${Pn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:mt(e.palette[n].main,.7)}`,[`&.${Pn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Pn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Pn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:mt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),TTe=oe("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${Ce(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function H3(e){return e.key==="Backspace"||e.key==="Delete"}const kh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiChip"}),{avatar:o,className:i,clickable:a,color:s="default",component:l,deleteIcon:c,disabled:u=!1,icon:d,label:f,onClick:p,onDelete:m,onKeyDown:g,onKeyUp:v,size:w="medium",variant:x="filled",tabIndex:S,skipFocusWhenDisabled:P=!1,...T}=r,E=y.useRef(null),O=Cr(E,n),k=H=>{H.stopPropagation(),m&&m(H)},A=H=>{H.currentTarget===H.target&&H3(H)&&H.preventDefault(),g&&g(H)},I=H=>{H.currentTarget===H.target&&m&&H3(H)&&m(H),v&&v(H)},R=a!==!1&&p?!0:a,N=R||m?Ki:l||"div",L={...r,component:N,disabled:u,size:w,color:s,iconColor:y.isValidElement(d)&&d.props.color||s,onDelete:!!m,clickable:R,variant:x},j=CTe(L),_=N===Ki?{component:l||"div",focusVisibleClassName:j.focusVisible,...m&&{disableRipple:!0}}:{};let D=null;m&&(D=c&&y.isValidElement(c)?y.cloneElement(c,{className:de(c.props.className,j.deleteIcon),onClick:k}):$.jsx(xTe,{className:de(j.deleteIcon),onClick:k}));let z=null;o&&y.isValidElement(o)&&(z=y.cloneElement(o,{className:de(j.avatar,o.props.className)}));let F=null;return d&&y.isValidElement(d)&&(F=y.cloneElement(d,{className:de(j.icon,d.props.className)})),$.jsxs(PTe,{as:N,className:de(j.root,i),disabled:R&&u?!0:void 0,onClick:p,onKeyDown:A,onKeyUp:I,ref:O,tabIndex:P&&u?-1:S,ownerState:L,..._,...T,children:[z||F,$.jsx(TTe,{className:de(j.label),ownerState:L,children:f}),D]})});function _C(e){return parseInt(e,10)||0}const ETe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function OTe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const ITe=y.forwardRef(function(t,n){const{onChange:r,maxRows:o,minRows:i=1,style:a,value:s,...l}=t,{current:c}=y.useRef(s!=null),u=y.useRef(null),d=Cr(n,u),f=y.useRef(null),p=y.useRef(null),m=y.useCallback(()=>{const w=u.current,S=os(w).getComputedStyle(w);if(S.width==="0px")return{outerHeightStyle:0,overflowing:!1};const P=p.current;P.style.width=S.width,P.value=w.value||t.placeholder||"x",P.value.slice(-1)===` +`&&(P.value+=" ");const T=S.boxSizing,E=_C(S.paddingBottom)+_C(S.paddingTop),O=_C(S.borderBottomWidth)+_C(S.borderTopWidth),k=P.scrollHeight;P.value="x";const A=P.scrollHeight;let I=k;i&&(I=Math.max(Number(i)*A,I)),o&&(I=Math.min(Number(o)*A,I)),I=Math.max(I,A);const R=I+(T==="border-box"?E+O:0),N=Math.abs(I-k)<=1;return{outerHeightStyle:R,overflowing:N}},[o,i,t.placeholder]),g=y.useCallback(()=>{const w=m();if(OTe(w))return;const x=w.outerHeightStyle,S=u.current;f.current!==x&&(f.current=x,S.style.height=`${x}px`),S.style.overflow=w.overflowing?"hidden":""},[m]);rs(()=>{const w=()=>{g()};let x;const S=bS(w),P=u.current,T=os(P);T.addEventListener("resize",S);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(w),E.observe(P)),()=>{S.clear(),cancelAnimationFrame(x),T.removeEventListener("resize",S),E&&E.disconnect()}},[m,g]),rs(()=>{g()});const v=w=>{c||g(),r&&r(w)};return $.jsxs(y.Fragment,{children:[$.jsx("textarea",{value:s,onChange:v,ref:d,rows:i,style:a,...l}),$.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...ETe.shadow,...a,paddingTop:0,paddingBottom:0}})]})});function Hy(e){return typeof e=="string"}function Uf({props:e,states:t,muiFormControl:n}){return t.reduce((r,o)=>(r[o]=e[o],n&&typeof e[o]>"u"&&(r[o]=n[o]),r),{})}const $I=y.createContext(void 0);function Ta(){return y.useContext($I)}function U3(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function VT(e,t=!1){return e&&(U3(e.value)&&e.value!==""||t&&U3(e.defaultValue)&&e.defaultValue!=="")}function kTe(e){return e.startAdornment}function MTe(e){return tt("MuiInputBase",e)}const Va=ot("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var W3;const RI=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${Ce(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},_I=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},ATe=e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,g={root:["root",`color${Ce(n)}`,r&&"disabled",o&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${Ce(f)}`,u&&"multiline",p&&"adornedStart",i&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return rt(g,MTe,t)},DI=oe("div",{name:"MuiInputBase",slot:"Root",overridesResolver:RI})(Ze(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Va.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),NI=oe("input",{name:"MuiInputBase",slot:"Input",overridesResolver:_I})(Ze(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Va.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${Va.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:i})=>!i.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:i})=>i.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),G3=Ixe({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Fv=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiInputBase"}),{"aria-describedby":o,autoComplete:i,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:g,fullWidth:v=!1,id:w,inputComponent:x="input",inputProps:S={},inputRef:P,margin:T,maxRows:E,minRows:O,multiline:k=!1,name:A,onBlur:I,onChange:R,onClick:N,onFocus:L,onKeyDown:j,onKeyUp:_,placeholder:D,readOnly:z,renderSuffix:F,rows:H,size:U,slotProps:q={},slots:X={},startAdornment:ae,type:Z="text",value:K,...te}=r,pe=S.value!=null?S.value:K,{current:ie}=y.useRef(pe!=null),le=y.useRef(),re=y.useCallback(et=>{},[]),fe=Cr(le,P,S.ref,re),[ee,ce]=y.useState(!1),me=Ta(),we=Uf({props:r,muiFormControl:me,states:["color","disabled","error","hiddenLabel","size","required","filled"]});we.focused=me?me.focused:ee,y.useEffect(()=>{!me&&f&&ee&&(ce(!1),I&&I())},[me,f,ee,I]);const ge=me&&me.onFilled,Se=me&&me.onEmpty,xe=y.useCallback(et=>{VT(et)?ge&&ge():Se&&Se()},[ge,Se]);rs(()=>{ie&&xe({value:pe})},[pe,xe,ie]);const Ie=et=>{L&&L(et),S.onFocus&&S.onFocus(et),me&&me.onFocus?me.onFocus(et):ce(!0)},Re=et=>{I&&I(et),S.onBlur&&S.onBlur(et),me&&me.onBlur?me.onBlur(et):ce(!1)},_e=(et,...yt)=>{if(!ie){const wn=et.target||le.current;if(wn==null)throw new Error(Bu(1));xe({value:wn.value})}S.onChange&&S.onChange(et,...yt),R&&R(et,...yt)};y.useEffect(()=>{xe(le.current)},[]);const ye=et=>{le.current&&et.currentTarget===et.target&&le.current.focus(),N&&N(et)};let Te=x,Oe=S;k&&Te==="input"&&(H?Oe={type:void 0,minRows:H,maxRows:H,...Oe}:Oe={type:void 0,maxRows:E,minRows:O,...Oe},Te=ITe);const Me=et=>{xe(et.animationName==="mui-auto-fill-cancel"?le.current:{value:"x"})};y.useEffect(()=>{me&&me.setAdornedStart(!!ae)},[me,ae]);const We={...r,color:we.color||"primary",disabled:we.disabled,endAdornment:m,error:we.error,focused:we.focused,formControl:me,fullWidth:v,hiddenLabel:we.hiddenLabel,multiline:k,size:we.size,startAdornment:ae,type:Z},Ve=ATe(We),Qe=X.root||c.Root||DI,ut=q.root||u.root||{},nt=X.input||c.Input||NI;return Oe={...Oe,...q.input??u.input},$.jsxs(y.Fragment,{children:[!p&&typeof G3=="function"&&(W3||(W3=$.jsx(G3,{}))),$.jsxs(Qe,{...ut,ref:n,onClick:ye,...te,...!Hy(Qe)&&{ownerState:{...We,...ut.ownerState}},className:de(Ve.root,ut.className,s,z&&"MuiInputBase-readOnly"),children:[ae,$.jsx($I.Provider,{value:null,children:$.jsx(nt,{"aria-invalid":we.error,"aria-describedby":o,autoComplete:i,autoFocus:a,defaultValue:d,disabled:we.disabled,id:w,onAnimationStart:Me,name:A,placeholder:D,readOnly:z,required:we.required,rows:H,value:pe,onKeyDown:j,onKeyUp:_,type:Z,...Oe,...!Hy(nt)&&{as:Te,ownerState:{...We,...Oe.ownerState}},ref:fe,className:de(Ve.input,Oe.className,z&&"MuiInputBase-readOnly"),onBlur:Re,onChange:_e,onFocus:Ie})}),m,F?F({...we,startAdornment:ae}):null]})]})});function $Te(e){return tt("MuiInput",e)}const Vd={...Va,...ot("MuiInput",["root","underline","input"])};function RTe(e){return tt("MuiOutlinedInput",e)}const _s={...Va,...ot("MuiOutlinedInput",["root","notchedOutline","input"])};function _Te(e){return tt("MuiFilledInput",e)}const Ha={...Va,...ot("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},cZ=lt($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function DTe(e){return tt("MuiAutocomplete",e)}const pn=ot("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var q3,K3;const NTe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:o,fullWidth:i,hasClearIcon:a,hasPopupIcon:s,inputFocused:l,popupOpen:c,size:u}=e,d={root:["root",r&&"expanded",o&&"focused",i&&"fullWidth",a&&"hasClearIcon",s&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${Ce(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return rt(d,DTe,t)},LTe=oe("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:o,hasPopupIcon:i,inputFocused:a,size:s}=n;return[{[`& .${pn.tag}`]:t.tag},{[`& .${pn.tag}`]:t[`tagSize${Ce(s)}`]},{[`& .${pn.inputRoot}`]:t.inputRoot},{[`& .${pn.input}`]:t.input},{[`& .${pn.input}`]:a&&t.inputFocused},t.root,r&&t.fullWidth,i&&t.hasPopupIcon,o&&t.hasClearIcon]}})({[`&.${pn.focused} .${pn.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${pn.clearIndicator}`]:{visibility:"visible"}},[`& .${pn.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${pn.inputRoot}`]:{[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:30},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:56},[`& .${pn.input}`]:{width:0,minWidth:30}},[`& .${Vd.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${Vd.root}.${Va.sizeSmall}`]:{[`& .${Vd.input}`]:{padding:"2px 4px 3px 0"}},[`& .${_s.root}`]:{padding:9,[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:39},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:65},[`& .${pn.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${pn.endAdornment}`]:{right:9}},[`& .${_s.root}.${Va.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${pn.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${Ha.root}`]:{paddingTop:19,paddingLeft:8,[`.${pn.hasPopupIcon}&, .${pn.hasClearIcon}&`]:{paddingRight:39},[`.${pn.hasPopupIcon}.${pn.hasClearIcon}&`]:{paddingRight:65},[`& .${Ha.input}`]:{padding:"7px 4px"},[`& .${pn.endAdornment}`]:{right:9}},[`& .${Ha.root}.${Va.sizeSmall}`]:{paddingBottom:1,[`& .${Ha.input}`]:{padding:"2.5px 4px"}},[`& .${Va.hiddenLabel}`]:{paddingTop:8},[`& .${Ha.root}.${Va.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${pn.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${Ha.root}.${Va.hiddenLabel}.${Va.sizeSmall}`]:{[`& .${pn.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${pn.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${pn.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${pn.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${pn.inputRoot}`]:{flexWrap:"wrap"}}}]}),FTe=oe("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),jTe=oe(kn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),BTe=oe(kn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),zTe=oe(Hf,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${pn.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),VTe=oe(uo,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(Ze(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),HTe=oe("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),UTe=oe("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),WTe=oe("div",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(Ze(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${pn.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${pn.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${pn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${pn.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${pn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),GTe=oe(p_,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(Ze(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),qTe=oe("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${pn.option}`]:{paddingLeft:24}}),oc=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAutocomplete"}),{autoComplete:o=!1,autoHighlight:i=!1,autoSelect:a=!1,blurOnSelect:s=!1,ChipProps:l,className:c,clearIcon:u=q3||(q3=$.jsx(QJ,{fontSize:"small"})),clearOnBlur:d=!r.freeSolo,clearOnEscape:f=!1,clearText:p="Clear",closeText:m="Close",componentsProps:g,defaultValue:v=r.multiple?[]:null,disableClearable:w=!1,disableCloseOnSelect:x=!1,disabled:S=!1,disabledItemsFocusable:P=!1,disableListWrap:T=!1,disablePortal:E=!1,filterOptions:O,filterSelectedOptions:k=!1,forcePopupIcon:A="auto",freeSolo:I=!1,fullWidth:R=!1,getLimitTagsText:N=On=>`+${On}`,getOptionDisabled:L,getOptionKey:j,getOptionLabel:_,isOptionEqualToValue:D,groupBy:z,handleHomeEndKeys:F=!r.freeSolo,id:H,includeInputInList:U=!1,inputValue:q,limitTags:X=-1,ListboxComponent:ae,ListboxProps:Z,loading:K=!1,loadingText:te="Loading…",multiple:pe=!1,noOptionsText:ie="No options",onChange:le,onClose:re,onHighlightChange:fe,onInputChange:ee,onOpen:ce,open:me,openOnFocus:we=!1,openText:ge="Open",options:Se,PaperComponent:xe,PopperComponent:Ie,popupIcon:Re=K3||(K3=$.jsx(cZ,{})),readOnly:_e=!1,renderGroup:ye,renderInput:Te,renderOption:Oe,renderTags:Me,selectOnFocus:We=!r.freeSolo,size:Ve="medium",slots:Qe={},slotProps:ut={},value:nt,...et}=r,{getRootProps:yt,getInputProps:wn,getInputLabelProps:Ke,getPopupIndicatorProps:$e,getClearProps:Xe,getTagProps:bt,getListboxProps:Vt,getOptionProps:Ot,value:un,dirty:jn,expanded:Wn,id:Eo,popupOpen:Kr,focused:Ii,focusedTag:ys,anchorEl:Wt,setAnchorEl:Xo,inputValue:ym,groupedOptions:pd}=nPe({...r,componentName:"Autocomplete"}),tu=!w&&!S&&jn&&!_e,lp=(!I||A===!0)&&A!==!1,{onMouseDown:cp}=wn(),{ref:$b,...vm}=Vt(),up=_||(On=>On.label??On),Fo={...r,disablePortal:E,expanded:Wn,focused:Ii,fullWidth:R,getOptionLabel:up,hasClearIcon:tu,hasPopupIcon:lp,inputFocused:ys===-1,popupOpen:Kr,size:Ve},Yr=NTe(Fo),Sl={slots:{paper:xe,popper:Ie,...Qe},slotProps:{chip:l,listbox:Z,...g,...ut}},[He,Ne]=hr("listbox",{elementType:WTe,externalForwardedProps:Sl,ownerState:Fo,className:Yr.listbox,additionalProps:vm,ref:$b}),[wt,en]=hr("paper",{elementType:uo,externalForwardedProps:Sl,ownerState:Fo,className:Yr.paper}),[sn,Rr]=hr("popper",{elementType:Hf,externalForwardedProps:Sl,ownerState:Fo,className:Yr.popper,additionalProps:{disablePortal:E,style:{width:Wt?Wt.clientWidth:null},role:"presentation",anchorEl:Wt,open:Kr}});let Gn;if(pe&&un.length>0){const On=vs=>({className:Yr.tag,disabled:S,...bt(vs)});Me?Gn=Me(un,On,Fo):Gn=un.map((vs,uc)=>{const{key:fp,...TM}=On({index:uc});return $.jsx(kh,{label:up(vs),size:Ve,...TM,...Sl.slotProps.chip},fp)})}if(X>-1&&Array.isArray(Gn)){const On=Gn.length-X;!Ii&&On>0&&(Gn=Gn.splice(0,X),Gn.push($.jsx("span",{className:Yr.tag,children:N(On)},Gn.length)))}const nu=ye||(On=>$.jsxs("li",{children:[$.jsx(GTe,{className:Yr.groupLabel,ownerState:Fo,component:"div",children:On.group}),$.jsx(qTe,{className:Yr.groupUl,ownerState:Fo,children:On.children})]},On.key)),bm=Oe||((On,vs)=>{const{key:uc,...fp}=On;return $.jsx("li",{...fp,children:up(vs)},uc)}),x1=(On,vs)=>{const uc=Ot({option:On,index:vs});return bm({...uc,className:Yr.option},On,{selected:uc["aria-selected"],index:vs,inputValue:ym},Fo)},wm=Sl.slotProps.clearIndicator,xm=Sl.slotProps.popupIndicator,Sm=On=>$.jsx(zTe,{as:sn,...Rr,children:$.jsx(VTe,{as:wt,...en,children:On})});let dp=null;return pd.length>0?dp=Sm($.jsx(He,{as:ae,...Ne,children:pd.map((On,vs)=>z?nu({key:On.key,group:On.group,children:On.options.map((uc,fp)=>x1(uc,On.index+fp))}):x1(On,vs))})):K&&pd.length===0?dp=Sm($.jsx(HTe,{className:Yr.loading,ownerState:Fo,children:te})):pd.length===0&&!I&&!K&&(dp=Sm($.jsx(UTe,{className:Yr.noOptions,ownerState:Fo,role:"presentation",onMouseDown:On=>{On.preventDefault()},children:ie}))),$.jsxs(y.Fragment,{children:[$.jsx(LTe,{ref:n,className:de(Yr.root,c),ownerState:Fo,...yt(et),children:Te({id:Eo,disabled:S,fullWidth:!0,size:Ve==="small"?"small":void 0,InputLabelProps:Ke(),InputProps:{ref:Xo,className:Yr.inputRoot,startAdornment:Gn,onMouseDown:On=>{On.target===On.currentTarget&&cp(On)},...(tu||lp)&&{endAdornment:$.jsxs(FTe,{className:Yr.endAdornment,ownerState:Fo,children:[tu?$.jsx(jTe,{...Xe(),"aria-label":p,title:p,ownerState:Fo,...wm,className:de(Yr.clearIndicator,wm==null?void 0:wm.className),children:u}):null,lp?$.jsx(BTe,{...$e(),disabled:S,"aria-label":Kr?m:ge,title:Kr?m:ge,ownerState:Fo,...xm,className:de(Yr.popupIndicator,xm==null?void 0:xm.className),children:Re}):null]})}},inputProps:{className:Yr.input,disabled:S,readOnly:_e,...wn()}})}),Wt?dp:null]})}),KTe=lt($.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"Person");function YTe(e){return tt("MuiAvatar",e)}const XTe=ot("MuiAvatar",["root","colorDefault","circular","rounded","square","img","fallback"]),QTe=e=>{const{classes:t,variant:n,colorDefault:r}=e;return rt({root:["root",n,r&&"colorDefault"],img:["img"],fallback:["fallback"]},YTe,t)},JTe=oe("div",{name:"MuiAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.colorDefault&&t.colorDefault]}})(Ze(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,width:40,height:40,fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(20),lineHeight:1,borderRadius:"50%",overflow:"hidden",userSelect:"none",variants:[{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"square"},style:{borderRadius:0}},{props:{colorDefault:!0},style:{color:(e.vars||e).palette.background.default,...e.vars?{backgroundColor:e.vars.palette.Avatar.defaultBg}:{backgroundColor:e.palette.grey[400],...e.applyStyles("dark",{backgroundColor:e.palette.grey[600]})}}}]}))),ZTe=oe("img",{name:"MuiAvatar",slot:"Img",overridesResolver:(e,t)=>t.img})({width:"100%",height:"100%",textAlign:"center",objectFit:"cover",color:"transparent",textIndent:1e4}),eEe=oe(KTe,{name:"MuiAvatar",slot:"Fallback",overridesResolver:(e,t)=>t.fallback})({width:"75%",height:"75%"});function tEe({crossOrigin:e,referrerPolicy:t,src:n,srcSet:r}){const[o,i]=y.useState(!1);return y.useEffect(()=>{if(!n&&!r)return;i(!1);let a=!0;const s=new Image;return s.onload=()=>{a&&i("loaded")},s.onerror=()=>{a&&i("error")},s.crossOrigin=e,s.referrerPolicy=t,s.src=n,r&&(s.srcset=r),()=>{a=!1}},[e,t,n,r]),o}const ic=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAvatar"}),{alt:o,children:i,className:a,component:s="div",slots:l={},slotProps:c={},imgProps:u,sizes:d,src:f,srcSet:p,variant:m="circular",...g}=r;let v=null;const w=tEe({...u,src:f,srcSet:p}),x=f||p,S=x&&w!=="error",P={...r,colorDefault:!S,component:s,variant:m};delete P.ownerState;const T=QTe(P),[E,O]=hr("img",{className:T.img,elementType:ZTe,externalForwardedProps:{slots:l,slotProps:{img:{...u,...c.img}}},additionalProps:{alt:o,src:f,srcSet:p,sizes:d},ownerState:P});return S?v=$.jsx(E,{...O}):i||i===0?v=i:x&&o?v=o[0]:v=$.jsx(eEe,{ownerState:P,className:T.fallback}),$.jsx(JTe,{as:s,className:de(T.root,a),ref:n,...g,ownerState:P,children:v})});function nEe(e){return tt("MuiAvatarGroup",e)}const rEe=ot("MuiAvatarGroup",["root","avatar"]),Y3={small:-16,medium:-8},oEe=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"]},nEe,t)},iEe=oe("div",{name:"MuiAvatarGroup",slot:"Root",overridesResolver:(e,t)=>({[`& .${rEe.avatar}`]:t.avatar,...t.root})})(Ze(({theme:e})=>({display:"flex",flexDirection:"row-reverse",[`& .${XTe.root}`]:{border:`2px solid ${(e.vars||e).palette.background.default}`,boxSizing:"content-box",marginLeft:"var(--AvatarGroup-spacing, -8px)","&:last-child":{marginLeft:0}}}))),aEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiAvatarGroup"}),{children:o,className:i,component:a="div",componentsProps:s,max:l=5,renderSurplus:c,slotProps:u={},slots:d={},spacing:f="medium",total:p,variant:m="circular",...g}=r;let v=l<2?2:l;const w={...r,max:l,spacing:f,component:a,variant:m},x=oEe(w),S=y.Children.toArray(o).filter(N=>y.isValidElement(N)),P=p||S.length;P===v&&(v+=1),v=Math.min(P+1,v);const T=Math.min(S.length,v-1),E=Math.max(P-v,P-T,0),O=c?c(E):`+${E}`,k=w.spacing&&Y3[w.spacing]!==void 0?Y3[w.spacing]:-w.spacing||-8,A={slots:d,slotProps:{surplus:u.additionalAvatar??(s==null?void 0:s.additionalAvatar),...s,...u}},[I,R]=hr("surplus",{elementType:ic,externalForwardedProps:A,className:x.avatar,ownerState:w,additionalProps:{variant:m}});return $.jsxs(iEe,{as:a,ownerState:w,className:de(x.root,i),ref:n,...g,style:{"--AvatarGroup-spacing":k?`${k}px`:void 0,...g.style},children:[E?$.jsx(I,{...R,children:O}):null,S.slice(0,T).reverse().map(N=>y.cloneElement(N,{className:de(N.props.className,x.avatar),variant:N.props.variant||m}))]})}),sEe={entering:{opacity:1},entered:{opacity:1}},jv=y.forwardRef(function(t,n){const r=Ei(),o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:i,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:g,style:v,timeout:w=o,TransitionComponent:x=ps,...S}=t,P=y.useRef(null),T=Cr(P,Lf(s),n),E=j=>_=>{if(j){const D=P.current;_===void 0?j(D):j(D,_)}},O=E(f),k=E((j,_)=>{NF(j);const D=If({style:v,timeout:w,easing:l},{mode:"enter"});j.style.webkitTransition=r.transitions.create("opacity",D),j.style.transition=r.transitions.create("opacity",D),u&&u(j,_)}),A=E(d),I=E(g),R=E(j=>{const _=If({style:v,timeout:w,easing:l},{mode:"exit"});j.style.webkitTransition=r.transitions.create("opacity",_),j.style.transition=r.transitions.create("opacity",_),p&&p(j)}),N=E(m),L=j=>{i&&i(P.current,j)};return $.jsx(x,{appear:a,in:c,nodeRef:P,onEnter:k,onEntered:A,onEntering:O,onExit:R,onExited:N,onExiting:I,addEndListener:L,timeout:w,...S,children:(j,_)=>y.cloneElement(s,{style:{opacity:0,visibility:j==="exited"&&!c?"hidden":void 0,...sEe[j],...v,...s.props.style},ref:T,..._})})});function lEe(e){return tt("MuiBackdrop",e)}ot("MuiBackdrop",["root","invisible"]);const cEe=e=>{const{ownerState:t,...n}=e;return n},uEe=e=>{const{classes:t,invisible:n}=e;return rt({root:["root",n&&"invisible"]},lEe,t)},dEe=oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),uZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiBackdrop"}),{children:o,className:i,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...g}=r,v={...r,component:a,invisible:s},w=uEe(v),x={transition:p,root:c.Root,...f},S={...u,...d},P={slots:x,slotProps:S},[T,E]=hr("root",{elementType:dEe,externalForwardedProps:P,className:de(w.root,i),ownerState:v}),[O,k]=hr("transition",{elementType:jv,externalForwardedProps:P,ownerState:v}),A=cEe(k);return $.jsx(O,{in:l,timeout:m,...g,...A,children:$.jsx(T,{"aria-hidden":!0,...E,classes:w,ref:n,children:o})})});function fEe(e){const{badgeContent:t,invisible:n=!1,max:r=99,showZero:o=!1}=e,i=NL({badgeContent:t,max:r});let a=n;n===!1&&t===0&&!o&&(a=!0);const{badgeContent:s,max:l=r}=a?i:e,c=s&&Number(s)>l?`${l}+`:s;return{badgeContent:s,invisible:a,max:l,displayValue:c}}function pEe(e){return tt("MuiBadge",e)}const Pd=ot("MuiBadge",["root","badge","dot","standard","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft","invisible","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","overlapRectangular","overlapCircular","anchorOriginTopLeftCircular","anchorOriginTopLeftRectangular","anchorOriginTopRightCircular","anchorOriginTopRightRectangular","anchorOriginBottomLeftCircular","anchorOriginBottomLeftRectangular","anchorOriginBottomRightCircular","anchorOriginBottomRightRectangular"]),y$=10,v$=4,hEe=e=>{const{color:t,anchorOrigin:n,invisible:r,overlap:o,variant:i,classes:a={}}=e,s={root:["root"],badge:["badge",i,r&&"invisible",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`,`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}${Ce(o)}`,`overlap${Ce(o)}`,t!=="default"&&`color${Ce(t)}`]};return rt(s,pEe,a)},mEe=oe("span",{name:"MuiBadge",slot:"Root",overridesResolver:(e,t)=>t.root})({position:"relative",display:"inline-flex",verticalAlign:"middle",flexShrink:0}),gEe=oe("span",{name:"MuiBadge",slot:"Badge",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.badge,t[n.variant],t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}${Ce(n.overlap)}`],n.color!=="default"&&t[`color${Ce(n.color)}`],n.invisible&&t.invisible]}})(Ze(({theme:e})=>({display:"flex",flexDirection:"row",flexWrap:"wrap",justifyContent:"center",alignContent:"center",alignItems:"center",position:"absolute",boxSizing:"border-box",fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(12),minWidth:y$*2,lineHeight:1,padding:"0 6px",height:y$*2,borderRadius:y$,zIndex:1,transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.enteringScreen}),variants:[...Object.entries(e.palette).filter(zn(["contrastText"])).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main,color:(e.vars||e).palette[t].contrastText}})),{props:{variant:"dot"},style:{borderRadius:v$,height:v$*2,minWidth:v$*2,padding:0}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{top:0,right:0,transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="rectangular",style:{bottom:0,right:0,transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{top:0,left:0,transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="rectangular",style:{bottom:0,left:0,transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{top:"14%",right:"14%",transform:"scale(1) translate(50%, -50%)",transformOrigin:"100% 0%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="right"&&t.overlap==="circular",style:{bottom:"14%",right:"14%",transform:"scale(1) translate(50%, 50%)",transformOrigin:"100% 100%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(50%, 50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="top"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{top:"14%",left:"14%",transform:"scale(1) translate(-50%, -50%)",transformOrigin:"0% 0%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(-50%, -50%)"}}},{props:({ownerState:t})=>t.anchorOrigin.vertical==="bottom"&&t.anchorOrigin.horizontal==="left"&&t.overlap==="circular",style:{bottom:"14%",left:"14%",transform:"scale(1) translate(-50%, 50%)",transformOrigin:"0% 100%",[`&.${Pd.invisible}`]:{transform:"scale(0) translate(-50%, 50%)"}}},{props:{invisible:!0},style:{transition:e.transitions.create("transform",{easing:e.transitions.easing.easeInOut,duration:e.transitions.duration.leavingScreen})}}]})));function X3(e){return{vertical:(e==null?void 0:e.vertical)??"top",horizontal:(e==null?void 0:e.horizontal)??"right"}}const yEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiBadge"}),{anchorOrigin:o,className:i,classes:a,component:s,components:l={},componentsProps:c={},children:u,overlap:d="rectangular",color:f="default",invisible:p=!1,max:m=99,badgeContent:g,slots:v,slotProps:w,showZero:x=!1,variant:S="standard",...P}=r,{badgeContent:T,invisible:E,max:O,displayValue:k}=fEe({max:m,invisible:p,badgeContent:g,showZero:x}),A=NL({anchorOrigin:X3(o),color:f,overlap:d,variant:S,badgeContent:g}),I=E||T==null&&S!=="dot",{color:R=f,overlap:N=d,anchorOrigin:L,variant:j=S}=I?A:r,_=X3(L),D=j!=="dot"?k:void 0,z={...r,badgeContent:T,invisible:I,max:O,displayValue:D,showZero:x,anchorOrigin:_,color:R,overlap:N,variant:j},F=hEe(z),H=(v==null?void 0:v.root)??l.Root??mEe,U=(v==null?void 0:v.badge)??l.Badge??gEe,q=(w==null?void 0:w.root)??c.root,X=(w==null?void 0:w.badge)??c.badge,ae=Bc({elementType:H,externalSlotProps:q,externalForwardedProps:P,additionalProps:{ref:n,as:s},ownerState:z,className:de(q==null?void 0:q.className,F.root,i)}),Z=Bc({elementType:U,externalSlotProps:X,ownerState:z,className:de(F.badge,X==null?void 0:X.className)});return $.jsxs(H,{...ae,children:[u,$.jsx(U,{...Z,children:D})]})}),vEe=ot("MuiBox",["root"]),bEe=wS(),Rn=t0e({themeId:Kl,defaultTheme:bEe,defaultClassName:vEe.root,generateClassName:nX.generate});function wEe(e){return tt("MuiButton",e)}const Um=ot("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]),dZ=y.createContext({}),fZ=y.createContext(void 0),xEe=e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:a}=e,s={root:["root",i,`${i}${Ce(t)}`,`size${Ce(o)}`,`${i}Size${Ce(o)}`,`color${Ce(t)}`,n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon",`iconSize${Ce(o)}`],endIcon:["icon","endIcon",`iconSize${Ce(o)}`]},l=rt(s,wEe,a);return{...a,...l}},pZ=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],SEe=oe(Ki,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${Ce(n.color)}`],t[`size${Ce(n.size)}`],t[`${n.variant}Size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode==="light"?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Um.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Um.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Um.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Um.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(zn()).map(([r])=>({props:{color:r},style:{"--variant-textColor":(e.vars||e).palette[r].main,"--variant-outlinedColor":(e.vars||e).palette[r].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[r].mainChannel} / 0.5)`:mt(e.palette[r].main,.5),"--variant-containedColor":(e.vars||e).palette[r].contrastText,"--variant-containedBg":(e.vars||e).palette[r].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[r].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[r].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[r].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[r].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[r].main,e.palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Um.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Um.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}}]}})),CEe=oe("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},...pZ]}),PEe=oe("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t[`iconSize${Ce(n.size)}`]]}})({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},...pZ]}),gt=y.forwardRef(function(t,n){const r=y.useContext(dZ),o=y.useContext(fZ),i=Ay(r,t),a=it({props:i,name:"MuiButton"}),{children:s,color:l="primary",component:c="button",className:u,disabled:d=!1,disableElevation:f=!1,disableFocusRipple:p=!1,endIcon:m,focusVisibleClassName:g,fullWidth:v=!1,size:w="medium",startIcon:x,type:S,variant:P="text",...T}=a,E={...a,color:l,component:c,disabled:d,disableElevation:f,disableFocusRipple:p,fullWidth:v,size:w,type:S,variant:P},O=xEe(E),k=x&&$.jsx(CEe,{className:O.startIcon,ownerState:E,children:x}),A=m&&$.jsx(PEe,{className:O.endIcon,ownerState:E,children:m}),I=o||"";return $.jsxs(SEe,{ownerState:E,className:de(r.className,O.root,u,I),component:c,disabled:d,focusRipple:!p,focusVisibleClassName:de(O.focusVisible,g),ref:n,type:S,...T,classes:O,children:[k,s,A]})});function TEe(e){return tt("MuiButtonGroup",e)}const cn=ot("MuiButtonGroup",["root","contained","outlined","text","disableElevation","disabled","firstButton","fullWidth","horizontal","vertical","colorPrimary","colorSecondary","grouped","groupedHorizontal","groupedVertical","groupedText","groupedTextHorizontal","groupedTextVertical","groupedTextPrimary","groupedTextSecondary","groupedOutlined","groupedOutlinedHorizontal","groupedOutlinedVertical","groupedOutlinedPrimary","groupedOutlinedSecondary","groupedContained","groupedContainedHorizontal","groupedContainedVertical","groupedContainedPrimary","groupedContainedSecondary","lastButton","middleButton"]),EEe=(e,t)=>{const{ownerState:n}=e;return[{[`& .${cn.grouped}`]:t.grouped},{[`& .${cn.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${cn.grouped}`]:t[`grouped${Ce(n.variant)}`]},{[`& .${cn.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.orientation)}`]},{[`& .${cn.grouped}`]:t[`grouped${Ce(n.variant)}${Ce(n.color)}`]},{[`& .${cn.firstButton}`]:t.firstButton},{[`& .${cn.lastButton}`]:t.lastButton},{[`& .${cn.middleButton}`]:t.middleButton},t.root,t[n.variant],n.disableElevation===!0&&t.disableElevation,n.fullWidth&&t.fullWidth,n.orientation==="vertical"&&t.vertical]},OEe=e=>{const{classes:t,color:n,disabled:r,disableElevation:o,fullWidth:i,orientation:a,variant:s}=e,l={root:["root",s,a,i&&"fullWidth",o&&"disableElevation",`color${Ce(n)}`],grouped:["grouped",`grouped${Ce(a)}`,`grouped${Ce(s)}`,`grouped${Ce(s)}${Ce(a)}`,`grouped${Ce(s)}${Ce(n)}`,r&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(l,TEe,t)},IEe=oe("div",{name:"MuiButtonGroup",slot:"Root",overridesResolver:EEe})(Ze(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{variant:"contained"},style:{boxShadow:(e.vars||e).shadows[2]}},{props:{disableElevation:!0},style:{boxShadow:"none"}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${cn.lastButton},& .${cn.middleButton}`]:{borderTopRightRadius:0,borderTopLeftRadius:0},[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottomRightRadius:0,borderBottomLeftRadius:0}}},{props:{orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${cn.lastButton},& .${cn.middleButton}`]:{borderTopLeftRadius:0,borderBottomLeftRadius:0}}},{props:{variant:"text",orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderRight:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${cn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"text",orientation:"vertical"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottom:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${cn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(zn()).flatMap(([t])=>[{props:{variant:"text",color:t},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:mt(e.palette[t].main,.5)}}}]),{props:{variant:"outlined",orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderRightColor:"transparent","&:hover":{borderRightColor:"currentColor"}},[`& .${cn.lastButton},& .${cn.middleButton}`]:{marginLeft:-1}}},{props:{variant:"outlined",orientation:"vertical"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottomColor:"transparent","&:hover":{borderBottomColor:"currentColor"}},[`& .${cn.lastButton},& .${cn.middleButton}`]:{marginTop:-1}}},{props:{variant:"contained",orientation:"horizontal"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderRight:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${cn.disabled}`]:{borderRight:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},{props:{variant:"contained",orientation:"vertical"},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderBottom:`1px solid ${(e.vars||e).palette.grey[400]}`,[`&.${cn.disabled}`]:{borderBottom:`1px solid ${(e.vars||e).palette.action.disabled}`}}}},...Object.entries(e.palette).filter(zn(["dark"])).map(([t])=>({props:{variant:"contained",color:t},style:{[`& .${cn.firstButton},& .${cn.middleButton}`]:{borderColor:(e.vars||e).palette[t].dark}}}))],[`& .${cn.grouped}`]:{minWidth:40,boxShadow:"none",props:{variant:"contained"},style:{"&:hover":{boxShadow:"none"}}}}))),kEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiButtonGroup"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,disableElevation:c=!1,disableFocusRipple:u=!1,disableRipple:d=!1,fullWidth:f=!1,orientation:p="horizontal",size:m="medium",variant:g="outlined",...v}=r,w={...r,color:a,component:s,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,orientation:p,size:m,variant:g},x=OEe(w),S=y.useMemo(()=>({className:x.grouped,color:a,disabled:l,disableElevation:c,disableFocusRipple:u,disableRipple:d,fullWidth:f,size:m,variant:g}),[a,l,c,u,d,f,m,g,x.grouped]),P=yX(o),T=P.length,E=O=>{const k=O===0,A=O===T-1;return k&&A?"":k?x.firstButton:A?x.lastButton:x.middleButton};return $.jsx(IEe,{as:s,role:"group",className:de(x.root,i),ref:n,ownerState:w,...v,children:$.jsx(dZ.Provider,{value:S,children:P.map((O,k)=>$.jsx(fZ.Provider,{value:E(k),children:O},k))})})});function MEe(e){return tt("MuiCard",e)}ot("MuiCard",["root"]);const AEe=e=>{const{classes:t}=e;return rt({root:["root"]},MEe,t)},$Ee=oe(uo,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),Do=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCard"}),{className:o,raised:i=!1,...a}=r,s={...r,raised:i},l=AEe(s);return $.jsx($Ee,{className:de(l.root,o),elevation:i?8:void 0,ref:n,ownerState:s,...a})});function REe(e){return tt("MuiCardActionArea",e)}const b$=ot("MuiCardActionArea",["root","focusVisible","focusHighlight"]),_Ee=e=>{const{classes:t}=e;return rt({root:["root"],focusHighlight:["focusHighlight"]},REe,t)},DEe=oe(Ki,{name:"MuiCardActionArea",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({display:"block",textAlign:"inherit",borderRadius:"inherit",width:"100%",[`&:hover .${b$.focusHighlight}`]:{opacity:(e.vars||e).palette.action.hoverOpacity,"@media (hover: none)":{opacity:0}},[`&.${b$.focusVisible} .${b$.focusHighlight}`]:{opacity:(e.vars||e).palette.action.focusOpacity}}))),NEe=oe("span",{name:"MuiCardActionArea",slot:"FocusHighlight",overridesResolver:(e,t)=>t.focusHighlight})(Ze(({theme:e})=>({overflow:"hidden",pointerEvents:"none",position:"absolute",top:0,right:0,bottom:0,left:0,borderRadius:"inherit",opacity:0,backgroundColor:"currentcolor",transition:e.transitions.create("opacity",{duration:e.transitions.duration.short})}))),LEe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardActionArea"}),{children:o,className:i,focusVisibleClassName:a,...s}=r,l=r,c=_Ee(l);return $.jsxs(DEe,{className:de(c.root,i),focusVisibleClassName:de(a,c.focusVisible),ref:n,ownerState:l,...s,children:[o,$.jsx(NEe,{className:c.focusHighlight,ownerState:l})]})});function FEe(e){return tt("MuiCardActions",e)}ot("MuiCardActions",["root","spacing"]);const jEe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},FEe,t)},BEe=oe("div",{name:"MuiCardActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,variants:[{props:{disableSpacing:!1},style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),hs=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardActions"}),{disableSpacing:o=!1,className:i,...a}=r,s={...r,disableSpacing:o},l=jEe(s);return $.jsx(BEe,{className:de(l.root,i),ownerState:s,ref:n,...a})});function zEe(e){return tt("MuiCardContent",e)}ot("MuiCardContent",["root"]);const VEe=e=>{const{classes:t}=e;return rt({root:["root"]},zEe,t)},HEe=oe("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),xa=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardContent"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=VEe(s);return $.jsx(HEe,{as:i,className:de(l.root,o),ownerState:s,ref:n,...a})});function UEe(e){return tt("MuiCardHeader",e)}const HT=ot("MuiCardHeader",["root","avatar","action","content","title","subheader"]),WEe=e=>{const{classes:t}=e;return rt({root:["root"],avatar:["avatar"],action:["action"],content:["content"],title:["title"],subheader:["subheader"]},UEe,t)},GEe=oe("div",{name:"MuiCardHeader",slot:"Root",overridesResolver:(e,t)=>({[`& .${HT.title}`]:t.title,[`& .${HT.subheader}`]:t.subheader,...t.root})})({display:"flex",alignItems:"center",padding:16}),qEe=oe("div",{name:"MuiCardHeader",slot:"Avatar",overridesResolver:(e,t)=>t.avatar})({display:"flex",flex:"0 0 auto",marginRight:16}),KEe=oe("div",{name:"MuiCardHeader",slot:"Action",overridesResolver:(e,t)=>t.action})({flex:"0 0 auto",alignSelf:"flex-start",marginTop:-4,marginRight:-8,marginBottom:-4}),YEe=oe("div",{name:"MuiCardHeader",slot:"Content",overridesResolver:(e,t)=>t.content})({flex:"1 1 auto",[`.${jT.root}:where(& .${HT.title})`]:{display:"block"},[`.${jT.root}:where(& .${HT.subheader})`]:{display:"block"}}),od=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardHeader"}),{action:o,avatar:i,className:a,component:s="div",disableTypography:l=!1,subheader:c,subheaderTypographyProps:u,title:d,titleTypographyProps:f,...p}=r,m={...r,component:s,disableTypography:l},g=WEe(m);let v=d;v!=null&&v.type!==ct&&!l&&(v=$.jsx(ct,{variant:i?"body2":"h5",className:g.title,component:"span",...f,children:v}));let w=c;return w!=null&&w.type!==ct&&!l&&(w=$.jsx(ct,{variant:i?"body2":"body1",className:g.subheader,color:"textSecondary",component:"span",...u,children:w})),$.jsxs(GEe,{className:de(g.root,a),as:s,ref:n,ownerState:m,...p,children:[i&&$.jsx(qEe,{className:g.avatar,ownerState:m,children:i}),$.jsxs(YEe,{className:g.content,ownerState:m,children:[v,w]}),o&&$.jsx(KEe,{className:g.action,ownerState:m,children:o})]})});function XEe(e){return tt("MuiCardMedia",e)}ot("MuiCardMedia",["root","media","img"]);const QEe=e=>{const{classes:t,isMediaComponent:n,isImageComponent:r}=e;return rt({root:["root",n&&"media",r&&"img"]},XEe,t)},JEe=oe("div",{name:"MuiCardMedia",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{isMediaComponent:r,isImageComponent:o}=n;return[t.root,r&&t.media,o&&t.img]}})({display:"block",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center",variants:[{props:{isMediaComponent:!0},style:{width:"100%"}},{props:{isImageComponent:!0},style:{objectFit:"cover"}}]}),ZEe=["video","audio","picture","iframe","img"],eOe=["picture","img"],Vc=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCardMedia"}),{children:o,className:i,component:a="div",image:s,src:l,style:c,...u}=r,d=ZEe.includes(a),f=!d&&s?{backgroundImage:`url("${s}")`,...c}:c,p={...r,component:a,isMediaComponent:d,isImageComponent:eOe.includes(a)},m=QEe(p);return $.jsx(JEe,{className:de(m.root,i),as:a,role:!d&&s?"img":void 0,ref:n,style:f,ownerState:p,src:d?s||l:void 0,...u,children:o})});function tOe(e){return tt("PrivateSwitchBase",e)}ot("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const nOe=e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&`edge${Ce(o)}`],input:["input"]};return rt(i,tOe,t)},rOe=oe(Ki)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),oOe=oe("input",{shouldForwardProp:ci})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),hZ=y.forwardRef(function(t,n){const{autoFocus:r,checked:o,checkedIcon:i,className:a,defaultChecked:s,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:d,id:f,inputProps:p,inputRef:m,name:g,onBlur:v,onChange:w,onFocus:x,readOnly:S,required:P=!1,tabIndex:T,type:E,value:O,...k}=t,[A,I]=ku({controlled:o,default:!!s,name:"SwitchBase",state:"checked"}),R=Ta(),N=H=>{x&&x(H),R&&R.onFocus&&R.onFocus(H)},L=H=>{v&&v(H),R&&R.onBlur&&R.onBlur(H)},j=H=>{if(H.nativeEvent.defaultPrevented)return;const U=H.target.checked;I(U),w&&w(H,U)};let _=l;R&&typeof _>"u"&&(_=R.disabled);const D=E==="checkbox"||E==="radio",z={...t,checked:A,disabled:_,disableFocusRipple:c,edge:u},F=nOe(z);return $.jsxs(rOe,{component:"span",className:de(F.root,a),centerRipple:!0,focusRipple:!c,disabled:_,tabIndex:null,role:void 0,onFocus:N,onBlur:L,ownerState:z,ref:n,...k,children:[$.jsx(oOe,{autoFocus:r,checked:o,defaultChecked:s,className:F.input,disabled:_,id:D?f:void 0,name:g,onChange:j,readOnly:S,ref:m,required:P,ownerState:z,tabIndex:T,type:E,...E==="checkbox"&&O===void 0?{}:{value:O},...p}),A?i:d]})}),iOe=lt($.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),aOe=lt($.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),sOe=lt($.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function lOe(e){return tt("MuiCheckbox",e)}const w$=ot("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),cOe=e=>{const{classes:t,indeterminate:n,color:r,size:o}=e,i={root:["root",n&&"indeterminate",`color${Ce(r)}`,`size${Ce(o)}`]},a=rt(i,lOe,t);return{...t,...a}},uOe=oe(hZ,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${Ce(n.size)}`],n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{[`&.${w$.checked}, &.${w$.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${w$.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),dOe=$.jsx(aOe,{}),fOe=$.jsx(iOe,{}),pOe=$.jsx(sOe,{}),hOe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCheckbox"}),{checkedIcon:o=dOe,color:i="primary",icon:a=fOe,indeterminate:s=!1,indeterminateIcon:l=pOe,inputProps:c,size:u="medium",disableRipple:d=!1,className:f,...p}=r,m=s?l:a,g=s?l:o,v={...r,disableRipple:d,color:i,indeterminate:s,size:u},w=cOe(v);return $.jsx(uOe,{type:"checkbox",inputProps:{"data-indeterminate":s,...c},icon:y.cloneElement(m,{fontSize:m.props.fontSize??u}),checkedIcon:y.cloneElement(g,{fontSize:g.props.fontSize??u}),ownerState:v,ref:n,className:de(w.root,f),disableRipple:d,...p,classes:w})});function mOe(e){return tt("MuiCircularProgress",e)}ot("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);const Td=44,h_=qc` 0% { transform: rotate(0deg); } @@ -175,7 +175,7 @@ Error generating stack: `+i.message+` 100% { transform: rotate(360deg); } -`,i_=Uc` +`,m_=qc` 0% { stroke-dasharray: 1px, 200px; stroke-dashoffset: 0; @@ -190,11 +190,11 @@ Error generating stack: `+i.message+` stroke-dasharray: 100px, 200px; stroke-dashoffset: -125px; } -`,eOe=typeof o_!="string"?Af` - animation: ${o_} 1.4s linear infinite; - `:null,tOe=typeof i_!="string"?Af` - animation: ${i_} 1.4s ease-in-out infinite; - `:null,nOe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Ce(r)}`],svg:["svg"],circle:["circle",`circle${Ce(n)}`,o&&"circleDisableShrink"]};return rt(i,ZEe,t)},rOe=oe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:eOe||{animation:`${o_} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),oOe=oe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),iOe=oe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ce(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ze(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:tOe||{animation:`${i_} 1.4s ease-in-out infinite`}}]}))),oZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=r,h={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:d},m=nOe(h),g={},v={},w={};if(d==="determinate"){const x=2*Math.PI*((Pd-c)/2);g.strokeDasharray=x.toFixed(3),w["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*x).toFixed(3)}px`,v.transform="rotate(-90deg)"}return $.jsx(rOe,{className:fe(m.root,o),style:{width:s,height:s,...v,...l},ownerState:h,ref:n,role:"progressbar",...w,...f,children:$.jsx(oOe,{className:m.svg,ownerState:h,viewBox:`${Pd/2} ${Pd/2} ${Pd} ${Pd}`,children:$.jsx(iOe,{className:m.circle,style:g,ownerState:h,cx:Pd,cy:Pd,r:(Pd-c)/2,fill:"none",strokeWidth:c})})})});function VU(e){return e.substring(2).toLowerCase()}function aOe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Cr($f(t),s),d=Wo(m=>{const g=c.current;c.current=!1;const v=ii(s.current);if(!l.current||!s.current||"clientX"in m&&aOe(m,v))return;if(a.current){a.current=!1;return}let w;m.composedPath?w=m.composedPath().includes(s.current):w=!v.documentElement.contains(m.target)||s.current.contains(m.target),!w&&(n||!g)&&o(m)}),f=m=>g=>{c.current=!0;const v=t.props[m];v&&v(g)},h={ref:u};return i!==!1&&(h[i]=f(i)),y.useEffect(()=>{if(i!==!1){const m=VU(i),g=ii(s.current),v=()=>{a.current=!0};return g.addEventListener(m,d),g.addEventListener("touchmove",v),()=>{g.removeEventListener(m,d),g.removeEventListener("touchmove",v)}}},[d,i]),r!==!1&&(h[r]=f(r)),y.useEffect(()=>{if(r!==!1){const m=VU(r),g=ii(s.current);return g.addEventListener(m,d),()=>{g.removeEventListener(m,d)}}},[d,r]),$.jsx(y.Fragment,{children:y.cloneElement(t,h)})}const qu=$0e({createStyledComponent:oe("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function sOe(e){const t=ii(e);return t.body===e?rs(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ow(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function HU(e){return parseInt(rs(e).getComputedStyle(e).paddingRight,10)||0}function lOe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function UU(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!lOe(a);s&&l&&ow(a,o)})}function d$(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function cOe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(sOe(r)){const a=iX(rs(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${HU(r)+a}px`;const s=ii(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${HU(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=ii(r).body;else{const a=r.parentElement,s=rs(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function uOe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class dOe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&ow(t.modalRef,!1);const o=uOe(n);UU(n,t.mount,t.modalRef,o,!0);const i=d$(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=d$(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=cOe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=d$(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&ow(t.modalRef,n),UU(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&ow(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const fOe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function pOe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function hOe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function mOe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||hOe(e))}function gOe(e){const t=[],n=[];return Array.from(e.querySelectorAll(fOe)).forEach((r,o)=>{const i=pOe(r);i===-1||!mOe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function yOe(){return!0}function LF(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=gOe,isEnabled:a=yOe,open:s}=e,l=y.useRef(!1),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),h=y.useRef(!1),m=y.useRef(null),g=Cr($f(t),m),v=y.useRef(null);y.useEffect(()=>{!s||!m.current||(h.current=!n)},[n,s]),y.useEffect(()=>{if(!s||!m.current)return;const S=ii(m.current);return m.current.contains(S.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),h.current&&m.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),y.useEffect(()=>{if(!s||!m.current)return;const S=ii(m.current),P=O=>{v.current=O,!(r||!a()||O.key!=="Tab")&&S.activeElement===m.current&&O.shiftKey&&(l.current=!0,u.current&&u.current.focus())},T=()=>{var A,I;const O=m.current;if(O===null)return;if(!S.hasFocus()||!a()||l.current){l.current=!1;return}if(O.contains(S.activeElement)||r&&S.activeElement!==c.current&&S.activeElement!==u.current)return;if(S.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!h.current)return;let k=[];if((S.activeElement===c.current||S.activeElement===u.current)&&(k=i(m.current)),k.length>0){const R=!!((A=v.current)!=null&&A.shiftKey&&((I=v.current)==null?void 0:I.key)==="Tab"),N=k[0],L=k[k.length-1];typeof N!="string"&&typeof L!="string"&&(R?L.focus():N.focus())}else O.focus()};S.addEventListener("focusin",T),S.addEventListener("keydown",P,!0);const E=setInterval(()=>{S.activeElement&&S.activeElement.tagName==="BODY"&&T()},50);return()=>{clearInterval(E),S.removeEventListener("focusin",T),S.removeEventListener("keydown",P,!0)}},[n,r,o,a,s,i]);const w=S=>{d.current===null&&(d.current=S.relatedTarget),h.current=!0,f.current=S.target;const P=t.props.onFocus;P&&P(S)},x=S=>{d.current===null&&(d.current=S.relatedTarget),h.current=!0};return $.jsxs(y.Fragment,{children:[$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),y.cloneElement(t,{ref:g,onFocus:w}),$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function vOe(e){return typeof e=="function"?e():e}function bOe(e){return e?e.props.hasOwnProperty("in"):!1}const TC=new dOe;function wOe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=y.useRef({}),f=y.useRef(null),h=y.useRef(null),m=Cr(h,u),[g,v]=y.useState(!c),w=bOe(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>ii(f.current),P=()=>(d.current.modalRef=h.current,d.current.mount=f.current,d.current),T=()=>{TC.mount(P(),{disableScrollLock:r}),h.current&&(h.current.scrollTop=0)},E=Wo(()=>{const _=vOe(t)||S().body;TC.add(P(),_),h.current&&T()}),O=()=>TC.isTopModal(P()),k=Wo(_=>{f.current=_,_&&(c&&O()?T():h.current&&ow(h.current,x))}),A=y.useCallback(()=>{TC.remove(P(),x)},[x]);y.useEffect(()=>()=>{A()},[A]),y.useEffect(()=>{c?E():(!w||!o)&&A()},[c,A,w,o,E]);const I=_=>D=>{var z;(z=_.onKeyDown)==null||z.call(_,D),!(D.key!=="Escape"||D.which===229||!O())&&(n||(D.stopPropagation(),l&&l(D,"escapeKeyDown")))},R=_=>D=>{var z;(z=_.onClick)==null||z.call(_,D),D.target===D.currentTarget&&l&&l(D,"backdropClick")};return{getRootProps:(_={})=>{const D=QP(e);delete D.onTransitionEnter,delete D.onTransitionExited;const z={...D,..._};return{role:"presentation",...z,onKeyDown:I(z),ref:m}},getBackdropProps:(_={})=>{const D=_;return{"aria-hidden":!0,...D,onClick:R(D),open:c}},getTransitionProps:()=>{const _=()=>{v(!1),i&&i()},D=()=>{v(!0),a&&a(),o&&A()};return{onEnter:FH(_,s==null?void 0:s.props.onEnter),onExited:FH(D,s==null?void 0:s.props.onExited)}},rootRef:m,portalRef:k,isTopModal:O,exited:g,hasTransition:w}}function xOe(e){return tt("MuiModal",e)}ot("MuiModal",["root","hidden","backdrop"]);const SOe=e=>{const{open:t,exited:n,classes:r}=e;return rt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},xOe,r)},COe=oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ze(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),POe=oe(ZJ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),kv=y.forwardRef(function(t,n){const r=it({name:"MuiModal",props:t}),{BackdropComponent:o=POe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:h={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:w=!1,disableRestoreFocus:x=!1,disableScrollLock:S=!1,hideBackdrop:P=!1,keepMounted:T=!1,onBackdropClick:E,onClose:O,onTransitionEnter:k,onTransitionExited:A,open:I,slotProps:R={},slots:N={},theme:L,...B}=r,_={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:w,disableRestoreFocus:x,disableScrollLock:S,hideBackdrop:P,keepMounted:T},{getRootProps:D,getBackdropProps:z,getTransitionProps:F,portalRef:H,isTopModal:U,exited:q,hasTransition:Y}=wOe({..._,rootRef:n}),ae={..._,exited:q},Z=SOe(ae),K={};if(c.props.tabIndex===void 0&&(K.tabIndex="-1"),Y){const{onEnter:ee,onExited:ce}=F();K.onEnter=ee,K.onExited=ce}const te={...B,slots:{root:f.Root,backdrop:f.Backdrop,...N},slotProps:{...h,...R}},[pe,ie]=hr("root",{elementType:COe,externalForwardedProps:te,getSlotProps:D,additionalProps:{ref:n,as:d},ownerState:ae,className:fe(s,Z==null?void 0:Z.root,!ae.open&&ae.exited&&(Z==null?void 0:Z.hidden))}),[le,re]=hr("backdrop",{elementType:o,externalForwardedProps:te,additionalProps:i,getSlotProps:ee=>z({...ee,onClick:ce=>{E&&E(ce),ee!=null&&ee.onClick&&ee.onClick(ce)}}),className:fe(i==null?void 0:i.className,Z==null?void 0:Z.backdrop),ownerState:ae}),de=Cr(i==null?void 0:i.ref,re.ref);return!T&&!I&&(!Y||q)?null:$.jsx(QJ,{ref:H,container:u,disablePortal:w,children:$.jsxs(pe,{...ie,children:[!P&&o?$.jsx(le,{...re,ref:de}):null,$.jsx(LF,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:x,isEnabled:U,open:I,children:y.cloneElement(c,K)})]})})});function TOe(e){return tt("MuiDialog",e)}const iw=ot("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),iZ=y.createContext({}),EOe=oe(ZJ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),OOe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Ce(n)}`],paper:["paper",`paperScroll${Ce(n)}`,`paperWidth${Ce(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return rt(a,TOe,t)},IOe=oe(kv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),kOe=oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ce(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),MOe=oe(co,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ce(n.scroll)}`],t[`paperWidth${Ce(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Ze(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${iw.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${iw.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${iw.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),aZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialog"}),o=Ei(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:h=!1,fullScreen:m=!1,fullWidth:g=!1,maxWidth:v="sm",onBackdropClick:w,onClick:x,onClose:S,open:P,PaperComponent:T=co,PaperProps:E={},scroll:O="paper",TransitionComponent:k=Iv,transitionDuration:A=i,TransitionProps:I,...R}=r,N={...r,disableEscapeKeyDown:h,fullScreen:m,fullWidth:g,maxWidth:v,scroll:O},L=OOe(N),B=y.useRef(),_=H=>{B.current=H.target===H.currentTarget},D=H=>{x&&x(H),B.current&&(B.current=null,w&&w(H),S&&S(H,"backdropClick"))},z=dh(s),F=y.useMemo(()=>({titleId:z}),[z]);return $.jsx(IOe,{className:fe(L.root,f),closeAfterTransition:!0,components:{Backdrop:EOe},componentsProps:{backdrop:{transitionDuration:A,as:c,...u}},disableEscapeKeyDown:h,onClose:S,open:P,ref:n,onClick:D,ownerState:N,...R,children:$.jsx(k,{appear:!0,in:P,timeout:A,role:"presentation",...I,children:$.jsx(kOe,{className:fe(L.container),onMouseDown:_,ownerState:N,children:$.jsx(MOe,{as:T,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":z,"aria-modal":l,...E,className:fe(L.paper,E.className),ownerState:N,children:$.jsx(iZ.Provider,{value:F,children:d})})})})})});function AOe(e){return tt("MuiDialogActions",e)}ot("MuiDialogActions",["root","spacing"]);const $Oe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},AOe,t)},ROe=oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),sZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=$Oe(s);return $.jsx(ROe,{className:fe(l.root,o),ownerState:s,ref:n,...a})});function _Oe(e){return tt("MuiDialogContent",e)}ot("MuiDialogContent",["root","dividers"]);function DOe(e){return tt("MuiDialogTitle",e)}const NOe=ot("MuiDialogTitle",["root"]),LOe=e=>{const{classes:t,dividers:n}=e;return rt({root:["root",n&&"dividers"]},_Oe,t)},FOe=oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Ze(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${NOe.root} + &`]:{paddingTop:0}}}]}))),lZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=LOe(s);return $.jsx(FOe,{className:fe(l.root,o),ownerState:s,ref:n,...a})}),jOe=e=>{const{classes:t}=e;return rt({root:["root"]},DOe,t)},BOe=oe(dt,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),zOe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=jOe(s),{titleId:c=i}=y.useContext(iZ);return $.jsx(BOe,{component:"h2",className:fe(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function VOe(e){return tt("MuiDivider",e)}const WU=ot("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),HOe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return rt({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},VOe,r)},UOe=oe("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Ze(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:mt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),WOe=oe("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Ze(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),as=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:h="fullWidth",...m}=r,g={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:f,variant:h},v=HOe(g);return $.jsx(UOe,{as:l,className:fe(v.root,a),role:d,ref:n,ownerState:g,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...m,children:i?$.jsx(WOe,{className:v.wrapper,ownerState:g,children:i}):null})});as&&(as.muiSkipListHighlight=!0);function GOe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=rs(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function qOe(e){return typeof e=="function"?e():e}function EC(e,t,n){const r=qOe(n),o=GOe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const KOe=y.forwardRef(function(t,n){const r=Ei(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:f,onEnter:h,onEntered:m,onEntering:g,onExit:v,onExited:w,onExiting:x,style:S,timeout:P=i,TransitionComponent:T=fs,...E}=t,O=y.useRef(null),k=Cr($f(l),O,n),A=F=>H=>{F&&(H===void 0?F(O.current):F(O.current,H))},I=A((F,H)=>{EC(u,F,c),TF(F),h&&h(F,H)}),R=A((F,H)=>{const U=Pf({timeout:P,style:S,easing:d},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",{...U}),F.style.transition=r.transitions.create("transform",{...U}),F.style.webkitTransform="none",F.style.transform="none",g&&g(F,H)}),N=A(m),L=A(x),B=A(F=>{const H=Pf({timeout:P,style:S,easing:d},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",H),F.style.transition=r.transitions.create("transform",H),EC(u,F,c),v&&v(F)}),_=A(F=>{F.style.webkitTransition="",F.style.transition="",w&&w(F)}),D=F=>{a&&a(O.current,F)},z=y.useCallback(()=>{O.current&&EC(u,O.current,c)},[u,c]);return y.useEffect(()=>{if(f||u==="down"||u==="right")return;const F=dS(()=>{O.current&&EC(u,O.current,c)}),H=rs(O.current);return H.addEventListener("resize",F),()=>{F.clear(),H.removeEventListener("resize",F)}},[u,f,c]),y.useEffect(()=>{f||z()},[f,z]),$.jsx(T,{nodeRef:O,onEnter:I,onEntered:N,onEntering:R,onExit:B,onExited:_,onExiting:L,addEndListener:D,appear:s,in:f,timeout:P,...E,children:(F,H)=>y.cloneElement(l,{ref:k,style:{visibility:F==="exited"&&!f?"hidden":void 0,...S,...l.props.style},...H})})});function YOe(e){return tt("MuiDrawer",e)}ot("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const cZ=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},XOe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Ce(n)}`,r!=="temporary"&&`paperAnchorDocked${Ce(n)}`]};return rt(o,YOe,t)},QOe=oe(kv,{name:"MuiDrawer",slot:"Root",overridesResolver:cZ})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),GU=oe("div",{shouldForwardProp:ci,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:cZ})({flex:"0 0 auto"}),JOe=oe(co,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Ce(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Ce(n.anchor)}`]]}})(Ze(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),uZ={left:"right",right:"left",top:"down",bottom:"up"};function ZOe(e){return["left","right"].includes(e)}function eIe({direction:e},t){return e==="rtl"&&ZOe(t)?uZ[t]:t}const tIe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),o=Ei(),i=nr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:h,...m}={},onClose:g,open:v=!1,PaperProps:w={},SlideProps:x,TransitionComponent:S=KOe,transitionDuration:P=a,variant:T="temporary",...E}=r,O=y.useRef(!1);y.useEffect(()=>{O.current=!0},[]);const k=eIe({direction:i?"rtl":"ltr"},s),I={...r,anchor:s,elevation:d,open:v,variant:T,...E},R=XOe(I),N=$.jsx(JOe,{elevation:T==="temporary"?d:0,square:!0,...w,className:fe(R.paper,w.className),ownerState:I,children:c});if(T==="permanent")return $.jsx(GU,{className:fe(R.root,R.docked,u),ownerState:I,ref:n,...E,children:N});const L=$.jsx(S,{in:v,direction:uZ[k],timeout:P,appear:O.current,...x,children:N});return T==="persistent"?$.jsx(GU,{className:fe(R.root,R.docked,u),ownerState:I,ref:n,...E,children:L}):$.jsx(QOe,{BackdropProps:{...l,...h,transitionDuration:P},className:fe(R.root,R.modal,u),open:v,ownerState:I,onClose:g,hideBackdrop:f,ref:n,...E,...m,children:L})});function nIe(e){return tt("MuiFab",e)}const qU=ot("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),rIe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Ce(o)}`,t==="inherit"?"colorInherit":t]},a=rt(i,nIe,r);return{...r,...a}},oIe=oe(Ki,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ci(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Ce(n.size)],t[n.color]]}})(Ze(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${qU.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),Ze(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Bn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Ze(({theme:e})=>({[`&.${qU.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Lh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular",...h}=r,m={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:d,variant:f},g=rIe(m);return $.jsx(oIe,{className:fe(g.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:fe(g.focusVisible,u),ownerState:m,ref:n,...h,classes:g,children:o})}),iIe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Ce(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=rt(l,vTe,t);return{...t,...c}},aIe=oe(CI,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...xI(e,t),!n.disableUnderline&&t.underline]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ha.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ha.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ha.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ha.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ha.disabled}, .${Ha.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ha.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Bn()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),sIe=oe(PI,{name:"MuiFilledInput",slot:"Input",overridesResolver:SI})(Ze(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),$T=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:h="text",...m}=r,g={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:h},v=iIe(r),w={root:{ownerState:g},input:{ownerState:g}},x=d??a?vo(w,d??a):w,S=f.root??i.Root??aIe,P=f.input??i.Input??sIe;return $.jsx(Ov,{slots:{root:S,input:P},componentsProps:x,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:h,...m,classes:v})});$T&&($T.muiName="Input");function lIe(e){return tt("MuiFormControl",e)}ot("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const cIe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Ce(n)}`,r&&"fullWidth"]};return rt(o,lIe,t)},uIe=oe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${Ce(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Fh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:h="none",required:m=!1,size:g="medium",variant:v="outlined",...w}=r,x={...r,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:h,required:m,size:g,variant:v},S=cIe(x),[P,T]=y.useState(()=>{let L=!1;return o&&y.Children.forEach(o,B=>{if(!Fg(B,["Input","Select"]))return;const _=Fg(B,["Select"])?B.props.input:B;_&&pTe(_.props)&&(L=!0)}),L}),[E,O]=y.useState(()=>{let L=!1;return o&&y.Children.forEach(o,B=>{Fg(B,["Input","Select"])&&(MT(B.props,!0)||MT(B.props.inputProps,!0))&&(L=!0)}),L}),[k,A]=y.useState(!1);l&&k&&A(!1);const I=u!==void 0&&!l?u:k;let R;y.useRef(!1);const N=y.useMemo(()=>({adornedStart:P,setAdornedStart:T,color:a,disabled:l,error:c,filled:E,focused:I,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{A(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{A(!0)},registerEffect:R,required:m,variant:v}),[P,a,l,c,E,I,d,f,R,m,g,v]);return $.jsx(wI.Provider,{value:N,children:$.jsx(uIe,{as:s,ownerState:x,className:fe(S.root,i),ref:n,...w,children:o})})});function dIe(e){return tt("MuiFormControlLabel",e)}const _0=ot("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),fIe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Ce(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return rt(a,dIe,t)},pIe=oe("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${_0.label}`]:t.label},t.root,t[`labelPlacement${Ce(n.labelPlacement)}`]]}})(Ze(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${_0.disabled}`]:{cursor:"default"},[`& .${_0.label}`]:{[`&.${_0.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),hIe=oe("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Ze(({theme:e})=>({[`&.${_0.error}`]:{color:(e.vars||e).palette.error.main}}))),Dy=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:h,onChange:m,required:g,slots:v={},slotProps:w={},value:x,...S}=r,P=Ta(),T=l??s.props.disabled??(P==null?void 0:P.disabled),E=g??s.props.required,O={disabled:T,required:E};["checked","name","onChange","value","inputRef"].forEach(_=>{typeof s.props[_]>"u"&&typeof r[_]<"u"&&(O[_]=r[_])});const k=jf({props:r,muiFormControl:P,states:["error"]}),A={...r,disabled:T,labelPlacement:f,required:E,error:k.error},I=fIe(A),R={slots:v,slotProps:{...a,...w}},[N,L]=hr("typography",{elementType:dt,externalForwardedProps:R,ownerState:A});let B=d;return B!=null&&B.type!==dt&&!c&&(B=$.jsx(N,{component:"span",...L,className:fe(I.label,L==null?void 0:L.className),children:B})),$.jsxs(pIe,{className:fe(I.root,i),ownerState:A,ref:n,...S,children:[y.cloneElement(s,O),E?$.jsxs("div",{children:[B,$.jsxs(hIe,{ownerState:A,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):B]})});function mIe(e){return tt("MuiFormGroup",e)}ot("MuiFormGroup",["root","row","error"]);const gIe=e=>{const{classes:t,row:n,error:r}=e;return rt({root:["root",n&&"row",r&&"error"]},mIe,t)},yIe=oe("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),TI=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=Ta(),l=jf({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=gIe(c);return $.jsx(yIe,{className:fe(u.root,o),ownerState:c,ref:n,...a})});function vIe(e){return tt("MuiFormHelperText",e)}const KU=ot("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var YU;const bIe=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Ce(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return rt(c,vIe,t)},wIe=oe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Ce(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${KU.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${KU.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),EI=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:h,...m}=r,g=Ta(),v=jf({props:r,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete w.ownerState;const x=bIe(w);return $.jsx(wIe,{as:a,className:fe(x.root,i),ref:n,...m,ownerState:w,children:o===" "?YU||(YU=$.jsx("span",{className:"notranslate",children:"​"})):o})});function xIe(e){return tt("MuiFormLabel",e)}const aw=ot("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),SIe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Ce(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return rt(l,xIe,t)},CIe=oe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{[`&.${aw.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${aw.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${aw.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),PIe=oe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Ze(({theme:e})=>({[`&.${aw.error}`]:{color:(e.vars||e).palette.error.main}}))),TIe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...h}=r,m=Ta(),g=jf({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),v={...r,color:g.color||"primary",component:s,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},w=SIe(v);return $.jsxs(CIe,{as:s,ownerState:v,className:fe(w.root,i),ref:n,...h,children:[o,g.required&&$.jsxs(PIe,{ownerState:v,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),He=q0e({createStyledComponent:oe("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>it({props:e,name:"MuiGrid2"})});function a_(e){return`scale(${e}, ${e**2})`}const EIe={entering:{opacity:1,transform:a_(1)},entered:{opacity:1,transform:"none"}},f$=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Tf=y.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:h,style:m,timeout:g="auto",TransitionComponent:v=fs,...w}=t,x=Zd(),S=y.useRef(),P=Ei(),T=y.useRef(null),E=Cr(T,$f(i),n),O=_=>D=>{if(_){const z=T.current;D===void 0?_(z):_(z,D)}},k=O(u),A=O((_,D)=>{TF(_);const{duration:z,delay:F,easing:H}=Pf({style:m,timeout:g,easing:a},{mode:"enter"});let U;g==="auto"?(U=P.transitions.getAutoHeightDuration(_.clientHeight),S.current=U):U=z,_.style.transition=[P.transitions.create("opacity",{duration:U,delay:F}),P.transitions.create("transform",{duration:f$?U:U*.666,delay:F,easing:H})].join(","),l&&l(_,D)}),I=O(c),R=O(h),N=O(_=>{const{duration:D,delay:z,easing:F}=Pf({style:m,timeout:g,easing:a},{mode:"exit"});let H;g==="auto"?(H=P.transitions.getAutoHeightDuration(_.clientHeight),S.current=H):H=D,_.style.transition=[P.transitions.create("opacity",{duration:H,delay:z}),P.transitions.create("transform",{duration:f$?H:H*.666,delay:f$?z:z||H*.333,easing:F})].join(","),_.style.opacity=0,_.style.transform=a_(.75),d&&d(_)}),L=O(f),B=_=>{g==="auto"&&x.start(S.current||0,_),r&&r(T.current,_)};return $.jsx(v,{appear:o,in:s,nodeRef:T,onEnter:A,onEntered:I,onEntering:k,onExit:N,onExited:L,onExiting:R,addEndListener:B,timeout:g==="auto"?null:g,...w,children:(_,D)=>y.cloneElement(i,{style:{opacity:0,transform:a_(.75),visibility:_==="exited"&&!s?"hidden":void 0,...EIe[_],...m,...i.props.style},ref:E,...D})})});Tf&&(Tf.muiSupportAuto=!0);function OIe(e){return tt("MuiImageList",e)}ot("MuiImageList",["root","masonry","quilted","standard","woven"]);const dZ=y.createContext({}),IIe=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n]},OIe,t)},kIe=oe("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),fZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:d="standard",...f}=r,h=y.useMemo(()=>({rowHeight:l,gap:c,variant:d}),[l,c,d]),m=d==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},g={...r,component:s,gap:c,rowHeight:l,variant:d},v=IIe(g);return $.jsx(kIe,{as:s,className:fe(v.root,v[d],i),ref:n,style:m,ownerState:g,...f,children:$.jsx(dZ.Provider,{value:h,children:o})})});function MIe(e){return tt("MuiImageListItem",e)}const p$=ot("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),AIe=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],img:["img"]},MIe,t)},$Ie=oe("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${p$.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${p$.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${p$.img}`]:{height:"auto",flexGrow:1}}}]}),pZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:d="auto",gap:f,variant:h}=y.useContext(dZ);let m="auto";h==="woven"?m=void 0:d!=="auto"&&(m=d*l+f*(l-1));const g={...r,cols:a,component:s,gap:f,rowHeight:d,rows:l,variant:h},v=AIe(g);return $.jsx($Ie,{as:s,className:fe(v.root,v[h],i),ref:n,style:{height:m,gridColumnEnd:h!=="masonry"?`span ${a}`:void 0,gridRowEnd:h!=="masonry"?`span ${l}`:void 0,marginBottom:h==="masonry"?f:void 0,breakInside:h==="masonry"?"avoid":void 0,...c},ownerState:g,...u,children:y.Children.map(o,w=>y.isValidElement(w)?w.type==="img"||Fg(w,["Image"])?y.cloneElement(w,{className:fe(v.img,w.props.className)}):w:null)})});function RIe(e){return tt("MuiImageListItemBar",e)}ot("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const _Ie=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Ce(n)}`,`actionPosition${Ce(o)}`],titleWrap:["titleWrap",`titleWrap${Ce(n)}`,r&&`titleWrapActionPos${Ce(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Ce(o)}`]};return rt(i,RIe,t)},DIe=oe("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`]]}})(Ze(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),NIe=oe("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Ce(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Ce(n.actionPosition)}`]]}})(Ze(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),LIe=oe("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(Ze(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),FIe=oe("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(Ze(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),jIe=oe("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Ce(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),BIe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,d={...r,position:c,actionPosition:i},f=_Ie(d);return $.jsxs(DIe,{ownerState:d,className:fe(f.root,a),ref:n,...u,children:[$.jsxs(NIe,{ownerState:d,className:f.titleWrap,children:[$.jsx(LIe,{className:f.title,children:l}),s?$.jsx(FIe,{className:f.subtitle,children:s}):null]}),o?$.jsx(jIe,{ownerState:d,className:f.actionIcon,children:o}):null]})}),zIe=e=>{const{classes:t,disableUnderline:n}=e,o=rt({root:["root",!n&&"underline"],input:["input"]},gTe,t);return{...t,...o}},VIe=oe(CI,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...xI(e,t),!n.disableUnderline&&t.underline]}})(Ze(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Bd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Bd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Bd.disabled}, .${Bd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Bd.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Bn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),HIe=oe(PI,{name:"MuiInput",slot:"Input",overridesResolver:SI})({}),RT=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...h}=r,m=zIe(r),v={root:{ownerState:{disableUnderline:o}}},w=u??a?vo(u??a,v):v,x=d.root??i.Root??VIe,S=d.input??i.Input??HIe;return $.jsx(Ov,{slots:{root:x,input:S},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...h,classes:m})});RT&&(RT.muiName="Input");function UIe(e){return tt("MuiInputAdornment",e)}const XU=ot("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var QU;const WIe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},GIe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Ce(o)}`,a,r&&"hiddenLabel",i&&`size${Ce(i)}`]};return rt(s,UIe,t)},qIe=oe("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:WIe})(Ze(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${XU.positionStart}&:not(.${XU.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),fo=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=r,f=Ta()||{};let h=u;u&&f.variant,f&&!h&&(h=f.variant);const m={...r,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:h},g=GIe(m);return $.jsx(wI.Provider,{value:null,children:$.jsx(qIe,{as:a,ownerState:m,className:fe(g.root,i),ref:n,...d,children:typeof o=="string"&&!l?$.jsx(dt,{color:"textSecondary",children:o}):$.jsxs(y.Fragment,{children:[c==="start"?QU||(QU=$.jsx("span",{className:"notranslate",children:"​"})):null,o]})})})});function KIe(e){return tt("MuiInputLabel",e)}ot("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const YIe=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Ce(r)}`,a],asterisk:[s&&"asterisk"]},c=rt(l,KIe,t);return{...t,...c}},XIe=oe(TIe,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${aw.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ze(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),jh=y.forwardRef(function(t,n){const r=it({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=Ta();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=jf({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),h={...r,disableAnimation:o,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},m=YIe(h);return $.jsx(XIe,{"data-shrink":d,ref:n,className:fe(m.root,l),...c,ownerState:h,classes:m})});function QIe(e){return tt("MuiLinearProgress",e)}ot("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const s_=4,l_=Uc` +`,gOe=typeof h_!="string"?Nf` + animation: ${h_} 1.4s linear infinite; + `:null,yOe=typeof m_!="string"?Nf` + animation: ${m_} 1.4s ease-in-out infinite; + `:null,vOe=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${Ce(r)}`],svg:["svg"],circle:["circle",`circle${Ce(n)}`,o&&"circleDisableShrink"]};return rt(i,mOe,t)},bOe=oe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:gOe||{animation:`${h_} 1.4s linear infinite`}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),wOe=oe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),xOe=oe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${Ce(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Ze(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:yOe||{animation:`${m_} 1.4s ease-in-out infinite`}}]}))),mZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:s=40,style:l,thickness:c=3.6,value:u=0,variant:d="indeterminate",...f}=r,p={...r,color:i,disableShrink:a,size:s,thickness:c,value:u,variant:d},m=vOe(p),g={},v={},w={};if(d==="determinate"){const x=2*Math.PI*((Td-c)/2);g.strokeDasharray=x.toFixed(3),w["aria-valuenow"]=Math.round(u),g.strokeDashoffset=`${((100-u)/100*x).toFixed(3)}px`,v.transform="rotate(-90deg)"}return $.jsx(bOe,{className:de(m.root,o),style:{width:s,height:s,...v,...l},ownerState:p,ref:n,role:"progressbar",...w,...f,children:$.jsx(wOe,{className:m.svg,ownerState:p,viewBox:`${Td/2} ${Td/2} ${Td} ${Td}`,children:$.jsx(xOe,{className:m.circle,style:g,ownerState:p,cx:Td,cy:Td,r:(Td-c)/2,fill:"none",strokeWidth:c})})})});function Q3(e){return e.substring(2).toLowerCase()}function SOe(e,t){return t.documentElement.clientWidth(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=Cr(Lf(t),s),d=Go(m=>{const g=c.current;c.current=!1;const v=ii(s.current);if(!l.current||!s.current||"clientX"in m&&SOe(m,v))return;if(a.current){a.current=!1;return}let w;m.composedPath?w=m.composedPath().includes(s.current):w=!v.documentElement.contains(m.target)||s.current.contains(m.target),!w&&(n||!g)&&o(m)}),f=m=>g=>{c.current=!0;const v=t.props[m];v&&v(g)},p={ref:u};return i!==!1&&(p[i]=f(i)),y.useEffect(()=>{if(i!==!1){const m=Q3(i),g=ii(s.current),v=()=>{a.current=!0};return g.addEventListener(m,d),g.addEventListener("touchmove",v),()=>{g.removeEventListener(m,d),g.removeEventListener("touchmove",v)}}},[d,i]),r!==!1&&(p[r]=f(r)),y.useEffect(()=>{if(r!==!1){const m=Q3(r),g=ii(s.current);return g.addEventListener(m,d),()=>{g.removeEventListener(m,d)}}},[d,r]),$.jsx(y.Fragment,{children:y.cloneElement(t,p)})}const Yu=K0e({createStyledComponent:oe("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${Ce(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>it({props:e,name:"MuiContainer"})});function COe(e){const t=ii(e);return t.body===e?os(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function pw(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function J3(e){return parseInt(os(e).getComputedStyle(e).paddingRight,10)||0}function POe(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function Z3(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,a=>{const s=!i.includes(a),l=!POe(a);s&&l&&pw(a,o)})}function x$(e,t){let n=-1;return e.some((r,o)=>t(r)?(n=o,!0):!1),n}function TOe(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(COe(r)){const a=gX(os(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${J3(r)+a}px`;const s=ii(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${J3(l)+a}px`})}let i;if(r.parentNode instanceof DocumentFragment)i=ii(r).body;else{const a=r.parentElement,s=os(r);i=(a==null?void 0:a.nodeName)==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:i.style.overflow,property:"overflow",el:i},{value:i.style.overflowX,property:"overflow-x",el:i},{value:i.style.overflowY,property:"overflow-y",el:i}),i.style.overflow="hidden"}return()=>{n.forEach(({value:i,el:a,property:s})=>{i?a.style.setProperty(s,i):a.style.removeProperty(s)})}}function EOe(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class OOe{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&pw(t.modalRef,!1);const o=EOe(n);Z3(n,t.mount,t.modalRef,o,!0);const i=x$(this.containers,a=>a.container===n);return i!==-1?(this.containers[i].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:o}),r)}mount(t,n){const r=x$(this.containers,i=>i.modals.includes(t)),o=this.containers[r];o.restore||(o.restore=TOe(o,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const o=x$(this.containers,a=>a.modals.includes(t)),i=this.containers[o];if(i.modals.splice(i.modals.indexOf(t),1),this.modals.splice(r,1),i.modals.length===0)i.restore&&i.restore(),t.modalRef&&pw(t.modalRef,n),Z3(i.container,t.mount,t.modalRef,i.hiddenSiblings,!1),this.containers.splice(o,1);else{const a=i.modals[i.modals.length-1];a.modalRef&&pw(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const IOe=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function kOe(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function MOe(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function AOe(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||MOe(e))}function $Oe(e){const t=[],n=[];return Array.from(e.querySelectorAll(IOe)).forEach((r,o)=>{const i=kOe(r);i===-1||!AOe(r)||(i===0?t.push(r):n.push({documentOrder:o,tabIndex:i,node:r}))}),n.sort((r,o)=>r.tabIndex===o.tabIndex?r.documentOrder-o.documentOrder:r.tabIndex-o.tabIndex).map(r=>r.node).concat(t)}function ROe(){return!0}function KF(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:i=$Oe,isEnabled:a=ROe,open:s}=e,l=y.useRef(!1),c=y.useRef(null),u=y.useRef(null),d=y.useRef(null),f=y.useRef(null),p=y.useRef(!1),m=y.useRef(null),g=Cr(Lf(t),m),v=y.useRef(null);y.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),y.useEffect(()=>{if(!s||!m.current)return;const S=ii(m.current);return m.current.contains(S.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),p.current&&m.current.focus()),()=>{o||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),y.useEffect(()=>{if(!s||!m.current)return;const S=ii(m.current),P=O=>{v.current=O,!(r||!a()||O.key!=="Tab")&&S.activeElement===m.current&&O.shiftKey&&(l.current=!0,u.current&&u.current.focus())},T=()=>{var A,I;const O=m.current;if(O===null)return;if(!S.hasFocus()||!a()||l.current){l.current=!1;return}if(O.contains(S.activeElement)||r&&S.activeElement!==c.current&&S.activeElement!==u.current)return;if(S.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let k=[];if((S.activeElement===c.current||S.activeElement===u.current)&&(k=i(m.current)),k.length>0){const R=!!((A=v.current)!=null&&A.shiftKey&&((I=v.current)==null?void 0:I.key)==="Tab"),N=k[0],L=k[k.length-1];typeof N!="string"&&typeof L!="string"&&(R?L.focus():N.focus())}else O.focus()};S.addEventListener("focusin",T),S.addEventListener("keydown",P,!0);const E=setInterval(()=>{S.activeElement&&S.activeElement.tagName==="BODY"&&T()},50);return()=>{clearInterval(E),S.removeEventListener("focusin",T),S.removeEventListener("keydown",P,!0)}},[n,r,o,a,s,i]);const w=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0,f.current=S.target;const P=t.props.onFocus;P&&P(S)},x=S=>{d.current===null&&(d.current=S.relatedTarget),p.current=!0};return $.jsxs(y.Fragment,{children:[$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:c,"data-testid":"sentinelStart"}),y.cloneElement(t,{ref:g,onFocus:w}),$.jsx("div",{tabIndex:s?0:-1,onFocus:x,ref:u,"data-testid":"sentinelEnd"})]})}function _Oe(e){return typeof e=="function"?e():e}function DOe(e){return e?e.props.hasOwnProperty("in"):!1}const DC=new OOe;function NOe(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:o=!1,onTransitionEnter:i,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=y.useRef({}),f=y.useRef(null),p=y.useRef(null),m=Cr(p,u),[g,v]=y.useState(!c),w=DOe(s);let x=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(x=!1);const S=()=>ii(f.current),P=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),T=()=>{DC.mount(P(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},E=Go(()=>{const _=_Oe(t)||S().body;DC.add(P(),_),p.current&&T()}),O=()=>DC.isTopModal(P()),k=Go(_=>{f.current=_,_&&(c&&O()?T():p.current&&pw(p.current,x))}),A=y.useCallback(()=>{DC.remove(P(),x)},[x]);y.useEffect(()=>()=>{A()},[A]),y.useEffect(()=>{c?E():(!w||!o)&&A()},[c,A,w,o,E]);const I=_=>D=>{var z;(z=_.onKeyDown)==null||z.call(_,D),!(D.key!=="Escape"||D.which===229||!O())&&(n||(D.stopPropagation(),l&&l(D,"escapeKeyDown")))},R=_=>D=>{var z;(z=_.onClick)==null||z.call(_,D),D.target===D.currentTarget&&l&&l(D,"backdropClick")};return{getRootProps:(_={})=>{const D=cT(e);delete D.onTransitionEnter,delete D.onTransitionExited;const z={...D,..._};return{role:"presentation",...z,onKeyDown:I(z),ref:m}},getBackdropProps:(_={})=>{const D=_;return{"aria-hidden":!0,...D,onClick:R(D),open:c}},getTransitionProps:()=>{const _=()=>{v(!1),i&&i()},D=()=>{v(!0),a&&a(),o&&A()};return{onEnter:qH(_,s==null?void 0:s.props.onEnter),onExited:qH(D,s==null?void 0:s.props.onExited)}},rootRef:m,portalRef:k,isTopModal:O,exited:g,hasTransition:w}}function LOe(e){return tt("MuiModal",e)}ot("MuiModal",["root","hidden","backdrop"]);const FOe=e=>{const{open:t,exited:n,classes:r}=e;return rt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},LOe,r)},jOe=oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Ze(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),BOe=oe(uZ,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),Bv=y.forwardRef(function(t,n){const r=it({name:"MuiModal",props:t}),{BackdropComponent:o=BOe,BackdropProps:i,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:g=!1,disableEscapeKeyDown:v=!1,disablePortal:w=!1,disableRestoreFocus:x=!1,disableScrollLock:S=!1,hideBackdrop:P=!1,keepMounted:T=!1,onBackdropClick:E,onClose:O,onTransitionEnter:k,onTransitionExited:A,open:I,slotProps:R={},slots:N={},theme:L,...j}=r,_={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:g,disableEscapeKeyDown:v,disablePortal:w,disableRestoreFocus:x,disableScrollLock:S,hideBackdrop:P,keepMounted:T},{getRootProps:D,getBackdropProps:z,getTransitionProps:F,portalRef:H,isTopModal:U,exited:q,hasTransition:X}=NOe({..._,rootRef:n}),ae={..._,exited:q},Z=FOe(ae),K={};if(c.props.tabIndex===void 0&&(K.tabIndex="-1"),X){const{onEnter:ee,onExited:ce}=F();K.onEnter=ee,K.onExited=ce}const te={...j,slots:{root:f.Root,backdrop:f.Backdrop,...N},slotProps:{...p,...R}},[pe,ie]=hr("root",{elementType:jOe,externalForwardedProps:te,getSlotProps:D,additionalProps:{ref:n,as:d},ownerState:ae,className:de(s,Z==null?void 0:Z.root,!ae.open&&ae.exited&&(Z==null?void 0:Z.hidden))}),[le,re]=hr("backdrop",{elementType:o,externalForwardedProps:te,additionalProps:i,getSlotProps:ee=>z({...ee,onClick:ce=>{E&&E(ce),ee!=null&&ee.onClick&&ee.onClick(ce)}}),className:de(i==null?void 0:i.className,Z==null?void 0:Z.backdrop),ownerState:ae}),fe=Cr(i==null?void 0:i.ref,re.ref);return!T&&!I&&(!X||q)?null:$.jsx(lZ,{ref:H,container:u,disablePortal:w,children:$.jsxs(pe,{...ie,children:[!P&&o?$.jsx(le,{...re,ref:fe}):null,$.jsx(KF,{disableEnforceFocus:g,disableAutoFocus:m,disableRestoreFocus:x,isEnabled:U,open:I,children:y.cloneElement(c,K)})]})})});function zOe(e){return tt("MuiDialog",e)}const hw=ot("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),gZ=y.createContext({}),VOe=oe(uZ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),HOe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:o,fullScreen:i}=e,a={root:["root"],container:["container",`scroll${Ce(n)}`],paper:["paper",`paperScroll${Ce(n)}`,`paperWidth${Ce(String(r))}`,o&&"paperFullWidth",i&&"paperFullScreen"]};return rt(a,zOe,t)},UOe=oe(Bv,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),WOe=oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Ce(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),GOe=oe(uo,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Ce(n.scroll)}`],t[`paperWidth${Ce(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Ze(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${hw.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${hw.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${hw.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),yZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialog"}),o=Ei(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{"aria-describedby":a,"aria-labelledby":s,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:d,className:f,disableEscapeKeyDown:p=!1,fullScreen:m=!1,fullWidth:g=!1,maxWidth:v="sm",onBackdropClick:w,onClick:x,onClose:S,open:P,PaperComponent:T=uo,PaperProps:E={},scroll:O="paper",TransitionComponent:k=jv,transitionDuration:A=i,TransitionProps:I,...R}=r,N={...r,disableEscapeKeyDown:p,fullScreen:m,fullWidth:g,maxWidth:v,scroll:O},L=HOe(N),j=y.useRef(),_=H=>{j.current=H.target===H.currentTarget},D=H=>{x&&x(H),j.current&&(j.current=null,w&&w(H),S&&S(H,"backdropClick"))},z=wh(s),F=y.useMemo(()=>({titleId:z}),[z]);return $.jsx(UOe,{className:de(L.root,f),closeAfterTransition:!0,components:{Backdrop:VOe},componentsProps:{backdrop:{transitionDuration:A,as:c,...u}},disableEscapeKeyDown:p,onClose:S,open:P,ref:n,onClick:D,ownerState:N,...R,children:$.jsx(k,{appear:!0,in:P,timeout:A,role:"presentation",...I,children:$.jsx(WOe,{className:de(L.container),onMouseDown:_,ownerState:N,children:$.jsx(GOe,{as:T,elevation:24,role:"dialog","aria-describedby":a,"aria-labelledby":z,"aria-modal":l,...E,className:de(L.paper,E.className),ownerState:N,children:$.jsx(gZ.Provider,{value:F,children:d})})})})})});function qOe(e){return tt("MuiDialogActions",e)}ot("MuiDialogActions",["root","spacing"]);const KOe=e=>{const{classes:t,disableSpacing:n}=e;return rt({root:["root",!n&&"spacing"]},qOe,t)},YOe=oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),vZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogActions"}),{className:o,disableSpacing:i=!1,...a}=r,s={...r,disableSpacing:i},l=KOe(s);return $.jsx(YOe,{className:de(l.root,o),ownerState:s,ref:n,...a})});function XOe(e){return tt("MuiDialogContent",e)}ot("MuiDialogContent",["root","dividers"]);function QOe(e){return tt("MuiDialogTitle",e)}const JOe=ot("MuiDialogTitle",["root"]),ZOe=e=>{const{classes:t,dividers:n}=e;return rt({root:["root",n&&"dividers"]},XOe,t)},eIe=oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Ze(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${JOe.root} + &`]:{paddingTop:0}}}]}))),bZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogContent"}),{className:o,dividers:i=!1,...a}=r,s={...r,dividers:i},l=ZOe(s);return $.jsx(eIe,{className:de(l.root,o),ownerState:s,ref:n,...a})}),tIe=e=>{const{classes:t}=e;return rt({root:["root"]},QOe,t)},nIe=oe(ct,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),rIe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDialogTitle"}),{className:o,id:i,...a}=r,s=r,l=tIe(s),{titleId:c=i}=y.useContext(gZ);return $.jsx(nIe,{component:"h2",className:de(l.root,o),ownerState:s,ref:n,variant:"h6",id:i??c,...a})});function oIe(e){return tt("MuiDivider",e)}const eU=ot("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),iIe=e=>{const{absolute:t,children:n,classes:r,flexItem:o,light:i,orientation:a,textAlign:s,variant:l}=e;return rt({root:["root",t&&"absolute",l,i&&"light",a==="vertical"&&"vertical",o&&"flexItem",n&&"withChildren",n&&a==="vertical"&&"withChildrenVertical",s==="right"&&a!=="vertical"&&"textAlignRight",s==="left"&&a!=="vertical"&&"textAlignLeft"],wrapper:["wrapper",a==="vertical"&&"wrapperVertical"]},oIe,r)},aIe=oe("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.absolute&&t.absolute,t[n.variant],n.light&&t.light,n.orientation==="vertical"&&t.vertical,n.flexItem&&t.flexItem,n.children&&t.withChildren,n.children&&n.orientation==="vertical"&&t.withChildrenVertical,n.textAlign==="right"&&n.orientation!=="vertical"&&t.textAlignRight,n.textAlign==="left"&&n.orientation!=="vertical"&&t.textAlignLeft]}})(Ze(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{light:!0},style:{borderColor:e.vars?`rgba(${e.vars.palette.dividerChannel} / 0.08)`:mt(e.palette.divider,.08)}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:t})=>!!t.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:t})=>t.children&&t.orientation!=="vertical",style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:t})=>t.orientation==="vertical"&&t.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:t})=>t.textAlign==="right"&&t.orientation!=="vertical",style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:t})=>t.textAlign==="left"&&t.orientation!=="vertical",style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),sIe=oe("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.wrapper,n.orientation==="vertical"&&t.wrapperVertical]}})(Ze(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),ss=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDivider"}),{absolute:o=!1,children:i,className:a,orientation:s="horizontal",component:l=i||s==="vertical"?"div":"hr",flexItem:c=!1,light:u=!1,role:d=l!=="hr"?"separator":void 0,textAlign:f="center",variant:p="fullWidth",...m}=r,g={...r,absolute:o,component:l,flexItem:c,light:u,orientation:s,role:d,textAlign:f,variant:p},v=iIe(g);return $.jsx(aIe,{as:l,className:de(v.root,a),role:d,ref:n,ownerState:g,"aria-orientation":d==="separator"&&(l!=="hr"||s==="vertical")?s:void 0,...m,children:i?$.jsx(sIe,{className:v.wrapper,ownerState:g,children:i}):null})});ss&&(ss.muiSkipListHighlight=!0);function lIe(e,t,n){const r=t.getBoundingClientRect(),o=n&&n.getBoundingClientRect(),i=os(t);let a;if(t.fakeTransform)a=t.fakeTransform;else{const c=i.getComputedStyle(t);a=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let s=0,l=0;if(a&&a!=="none"&&typeof a=="string"){const c=a.split("(")[1].split(")")[0].split(",");s=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?o?`translateX(${o.right+s-r.left}px)`:`translateX(${i.innerWidth+s-r.left}px)`:e==="right"?o?`translateX(-${r.right-o.left-s}px)`:`translateX(-${r.left+r.width-s}px)`:e==="up"?o?`translateY(${o.bottom+l-r.top}px)`:`translateY(${i.innerHeight+l-r.top}px)`:o?`translateY(-${r.top-o.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function cIe(e){return typeof e=="function"?e():e}function NC(e,t,n){const r=cIe(n),o=lIe(e,t,r);o&&(t.style.webkitTransform=o,t.style.transform=o)}const uIe=y.forwardRef(function(t,n){const r=Ei(),o={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:a,appear:s=!0,children:l,container:c,direction:u="down",easing:d=o,in:f,onEnter:p,onEntered:m,onEntering:g,onExit:v,onExited:w,onExiting:x,style:S,timeout:P=i,TransitionComponent:T=ps,...E}=t,O=y.useRef(null),k=Cr(Lf(l),O,n),A=F=>H=>{F&&(H===void 0?F(O.current):F(O.current,H))},I=A((F,H)=>{NC(u,F,c),NF(F),p&&p(F,H)}),R=A((F,H)=>{const U=If({timeout:P,style:S,easing:d},{mode:"enter"});F.style.webkitTransition=r.transitions.create("-webkit-transform",{...U}),F.style.transition=r.transitions.create("transform",{...U}),F.style.webkitTransform="none",F.style.transform="none",g&&g(F,H)}),N=A(m),L=A(x),j=A(F=>{const H=If({timeout:P,style:S,easing:d},{mode:"exit"});F.style.webkitTransition=r.transitions.create("-webkit-transform",H),F.style.transition=r.transitions.create("transform",H),NC(u,F,c),v&&v(F)}),_=A(F=>{F.style.webkitTransition="",F.style.transition="",w&&w(F)}),D=F=>{a&&a(O.current,F)},z=y.useCallback(()=>{O.current&&NC(u,O.current,c)},[u,c]);return y.useEffect(()=>{if(f||u==="down"||u==="right")return;const F=bS(()=>{O.current&&NC(u,O.current,c)}),H=os(O.current);return H.addEventListener("resize",F),()=>{F.clear(),H.removeEventListener("resize",F)}},[u,f,c]),y.useEffect(()=>{f||z()},[f,z]),$.jsx(T,{nodeRef:O,onEnter:I,onEntered:N,onEntering:R,onExit:j,onExited:_,onExiting:L,addEndListener:D,appear:s,in:f,timeout:P,...E,children:(F,H)=>y.cloneElement(l,{ref:k,style:{visibility:F==="exited"&&!f?"hidden":void 0,...S,...l.props.style},...H})})});function dIe(e){return tt("MuiDrawer",e)}ot("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const wZ=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},fIe=e=>{const{classes:t,anchor:n,variant:r}=e,o={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${Ce(n)}`,r!=="temporary"&&`paperAnchorDocked${Ce(n)}`]};return rt(o,dIe,t)},pIe=oe(Bv,{name:"MuiDrawer",slot:"Root",overridesResolver:wZ})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),tU=oe("div",{shouldForwardProp:ci,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:wZ})({flex:"0 0 auto"}),hIe=oe(uo,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${Ce(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${Ce(n.anchor)}`]]}})(Ze(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),xZ={left:"right",right:"left",top:"down",bottom:"up"};function mIe(e){return["left","right"].includes(e)}function gIe({direction:e},t){return e==="rtl"&&mIe(t)?xZ[t]:t}const yIe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiDrawer"}),o=Ei(),i=nr(),a={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{anchor:s="left",BackdropProps:l,children:c,className:u,elevation:d=16,hideBackdrop:f=!1,ModalProps:{BackdropProps:p,...m}={},onClose:g,open:v=!1,PaperProps:w={},SlideProps:x,TransitionComponent:S=uIe,transitionDuration:P=a,variant:T="temporary",...E}=r,O=y.useRef(!1);y.useEffect(()=>{O.current=!0},[]);const k=gIe({direction:i?"rtl":"ltr"},s),I={...r,anchor:s,elevation:d,open:v,variant:T,...E},R=fIe(I),N=$.jsx(hIe,{elevation:T==="temporary"?d:0,square:!0,...w,className:de(R.paper,w.className),ownerState:I,children:c});if(T==="permanent")return $.jsx(tU,{className:de(R.root,R.docked,u),ownerState:I,ref:n,...E,children:N});const L=$.jsx(S,{in:v,direction:xZ[k],timeout:P,appear:O.current,...x,children:N});return T==="persistent"?$.jsx(tU,{className:de(R.root,R.docked,u),ownerState:I,ref:n,...E,children:L}):$.jsx(pIe,{BackdropProps:{...l,...p,transitionDuration:P},className:de(R.root,R.modal,u),open:v,ownerState:I,onClose:g,hideBackdrop:f,ref:n,...E,...m,children:L})});function vIe(e){return tt("MuiFab",e)}const nU=ot("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),bIe=e=>{const{color:t,variant:n,classes:r,size:o}=e,i={root:["root",n,`size${Ce(o)}`,t==="inherit"?"colorInherit":t]},a=rt(i,vIe,r);return{...r,...a}},wIe=oe(Ki,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>ci(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.color==="inherit"&&t.colorInherit,t[Ce(n.size)],t[n.color]]}})(Ze(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${nU.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),Ze(({theme:e})=>({variants:[...Object.entries(e.palette).filter(zn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Ze(({theme:e})=>({[`&.${nU.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),Gh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFab"}),{children:o,className:i,color:a="default",component:s="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:d="large",variant:f="circular",...p}=r,m={...r,color:a,component:s,disabled:l,disableFocusRipple:c,size:d,variant:f},g=bIe(m);return $.jsx(wIe,{className:de(g.root,i),component:s,disabled:l,focusRipple:!c,focusVisibleClassName:de(g.focusVisible,u),ownerState:m,ref:n,...p,classes:g,children:o})}),xIe=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:i,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd",i==="small"&&`size${Ce(i)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=rt(l,_Te,t);return{...t,...c}},SIe=oe(DI,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...RI(e,t),!n.disableUnderline&&t.underline]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ha.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ha.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ha.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ha.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ha.disabled}, .${Ha.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ha.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(zn()).map(([a])=>{var s;return{props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),CIe=oe(NI,{name:"MuiFilledInput",slot:"Input",overridesResolver:_I})(Ze(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),UT=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFilledInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,g={...r,disableUnderline:o,fullWidth:s,inputComponent:c,multiline:u,type:p},v=xIe(r),w={root:{ownerState:g},input:{ownerState:g}},x=d??a?bo(w,d??a):w,S=f.root??i.Root??SIe,P=f.input??i.Input??CIe;return $.jsx(Fv,{slots:{root:S,input:P},componentsProps:x,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:v})});UT&&(UT.muiName="Input");function PIe(e){return tt("MuiFormControl",e)}ot("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const TIe=e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root",n!=="none"&&`margin${Ce(n)}`,r&&"fullWidth"]};return rt(o,PIe,t)},EIe=oe("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${Ce(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),qh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormControl"}),{children:o,className:i,color:a="primary",component:s="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:d=!1,hiddenLabel:f=!1,margin:p="none",required:m=!1,size:g="medium",variant:v="outlined",...w}=r,x={...r,color:a,component:s,disabled:l,error:c,fullWidth:d,hiddenLabel:f,margin:p,required:m,size:g,variant:v},S=TIe(x),[P,T]=y.useState(()=>{let L=!1;return o&&y.Children.forEach(o,j=>{if(!qg(j,["Input","Select"]))return;const _=qg(j,["Select"])?j.props.input:j;_&&kTe(_.props)&&(L=!0)}),L}),[E,O]=y.useState(()=>{let L=!1;return o&&y.Children.forEach(o,j=>{qg(j,["Input","Select"])&&(VT(j.props,!0)||VT(j.props.inputProps,!0))&&(L=!0)}),L}),[k,A]=y.useState(!1);l&&k&&A(!1);const I=u!==void 0&&!l?u:k;let R;y.useRef(!1);const N=y.useMemo(()=>({adornedStart:P,setAdornedStart:T,color:a,disabled:l,error:c,filled:E,focused:I,fullWidth:d,hiddenLabel:f,size:g,onBlur:()=>{A(!1)},onEmpty:()=>{O(!1)},onFilled:()=>{O(!0)},onFocus:()=>{A(!0)},registerEffect:R,required:m,variant:v}),[P,a,l,c,E,I,d,f,R,m,g,v]);return $.jsx($I.Provider,{value:N,children:$.jsx(EIe,{as:s,ownerState:x,className:de(S.root,i),ref:n,...w,children:o})})});function OIe(e){return tt("MuiFormControlLabel",e)}const H0=ot("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),IIe=e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,a={root:["root",n&&"disabled",`labelPlacement${Ce(r)}`,o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return rt(a,OIe,t)},kIe=oe("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${H0.label}`]:t.label},t.root,t[`labelPlacement${Ce(n.labelPlacement)}`]]}})(Ze(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${H0.disabled}`]:{cursor:"default"},[`& .${H0.label}`]:{[`&.${H0.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),MIe=oe("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Ze(({theme:e})=>({[`&.${H0.error}`]:{color:(e.vars||e).palette.error.main}}))),Uy=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormControlLabel"}),{checked:o,className:i,componentsProps:a={},control:s,disabled:l,disableTypography:c,inputRef:u,label:d,labelPlacement:f="end",name:p,onChange:m,required:g,slots:v={},slotProps:w={},value:x,...S}=r,P=Ta(),T=l??s.props.disabled??(P==null?void 0:P.disabled),E=g??s.props.required,O={disabled:T,required:E};["checked","name","onChange","value","inputRef"].forEach(_=>{typeof s.props[_]>"u"&&typeof r[_]<"u"&&(O[_]=r[_])});const k=Uf({props:r,muiFormControl:P,states:["error"]}),A={...r,disabled:T,labelPlacement:f,required:E,error:k.error},I=IIe(A),R={slots:v,slotProps:{...a,...w}},[N,L]=hr("typography",{elementType:ct,externalForwardedProps:R,ownerState:A});let j=d;return j!=null&&j.type!==ct&&!c&&(j=$.jsx(N,{component:"span",...L,className:de(I.label,L==null?void 0:L.className),children:j})),$.jsxs(kIe,{className:de(I.root,i),ownerState:A,ref:n,...S,children:[y.cloneElement(s,O),E?$.jsxs("div",{children:[j,$.jsxs(MIe,{ownerState:A,"aria-hidden":!0,className:I.asterisk,children:[" ","*"]})]}):j]})});function AIe(e){return tt("MuiFormGroup",e)}ot("MuiFormGroup",["root","row","error"]);const $Ie=e=>{const{classes:t,row:n,error:r}=e;return rt({root:["root",n&&"row",r&&"error"]},AIe,t)},RIe=oe("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),LI=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormGroup"}),{className:o,row:i=!1,...a}=r,s=Ta(),l=Uf({props:r,muiFormControl:s,states:["error"]}),c={...r,row:i,error:l.error},u=$Ie(c);return $.jsx(RIe,{className:de(u.root,o),ownerState:c,ref:n,...a})});function _Ie(e){return tt("MuiFormHelperText",e)}const rU=ot("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var oU;const DIe=e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:a,focused:s,required:l}=e,c={root:["root",o&&"disabled",i&&"error",r&&`size${Ce(r)}`,n&&"contained",s&&"focused",a&&"filled",l&&"required"]};return rt(c,_Ie,t)},NIe=oe("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${Ce(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${rU.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${rU.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),FI=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormHelperText"}),{children:o,className:i,component:a="p",disabled:s,error:l,filled:c,focused:u,margin:d,required:f,variant:p,...m}=r,g=Ta(),v=Uf({props:r,muiFormControl:g,states:["variant","size","disabled","error","filled","focused","required"]}),w={...r,component:a,contained:v.variant==="filled"||v.variant==="outlined",variant:v.variant,size:v.size,disabled:v.disabled,error:v.error,filled:v.filled,focused:v.focused,required:v.required};delete w.ownerState;const x=DIe(w);return $.jsx(NIe,{as:a,className:de(x.root,i),ref:n,...m,ownerState:w,children:o===" "?oU||(oU=$.jsx("span",{className:"notranslate",children:"​"})):o})});function LIe(e){return tt("MuiFormLabel",e)}const mw=ot("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),FIe=e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:a,required:s}=e,l={root:["root",`color${Ce(n)}`,o&&"disabled",i&&"error",a&&"filled",r&&"focused",s&&"required"],asterisk:["asterisk",i&&"error"]};return rt(l,LIe,t)},jIe=oe("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(Ze(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{[`&.${mw.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${mw.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${mw.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),BIe=oe("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Ze(({theme:e})=>({[`&.${mw.error}`]:{color:(e.vars||e).palette.error.main}}))),zIe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiFormLabel"}),{children:o,className:i,color:a,component:s="label",disabled:l,error:c,filled:u,focused:d,required:f,...p}=r,m=Ta(),g=Uf({props:r,muiFormControl:m,states:["color","required","focused","disabled","error","filled"]}),v={...r,color:g.color||"primary",component:s,disabled:g.disabled,error:g.error,filled:g.filled,focused:g.focused,required:g.required},w=FIe(v);return $.jsxs(jIe,{as:s,ownerState:v,className:de(w.root,i),ref:n,...p,children:[o,g.required&&$.jsxs(BIe,{ownerState:v,"aria-hidden":!0,className:w.asterisk,children:[" ","*"]})]})}),Be=cwe({createStyledComponent:oe("div",{name:"MuiGrid2",slot:"Root",overridesResolver:(e,t)=>t.root}),componentName:"MuiGrid2",useThemeProps:e=>it({props:e,name:"MuiGrid2"})});function g_(e){return`scale(${e}, ${e**2})`}const VIe={entering:{opacity:1,transform:g_(1)},entered:{opacity:1,transform:"none"}},S$=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),kf=y.forwardRef(function(t,n){const{addEndListener:r,appear:o=!0,children:i,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:g="auto",TransitionComponent:v=ps,...w}=t,x=tf(),S=y.useRef(),P=Ei(),T=y.useRef(null),E=Cr(T,Lf(i),n),O=_=>D=>{if(_){const z=T.current;D===void 0?_(z):_(z,D)}},k=O(u),A=O((_,D)=>{NF(_);const{duration:z,delay:F,easing:H}=If({style:m,timeout:g,easing:a},{mode:"enter"});let U;g==="auto"?(U=P.transitions.getAutoHeightDuration(_.clientHeight),S.current=U):U=z,_.style.transition=[P.transitions.create("opacity",{duration:U,delay:F}),P.transitions.create("transform",{duration:S$?U:U*.666,delay:F,easing:H})].join(","),l&&l(_,D)}),I=O(c),R=O(p),N=O(_=>{const{duration:D,delay:z,easing:F}=If({style:m,timeout:g,easing:a},{mode:"exit"});let H;g==="auto"?(H=P.transitions.getAutoHeightDuration(_.clientHeight),S.current=H):H=D,_.style.transition=[P.transitions.create("opacity",{duration:H,delay:z}),P.transitions.create("transform",{duration:S$?H:H*.666,delay:S$?z:z||H*.333,easing:F})].join(","),_.style.opacity=0,_.style.transform=g_(.75),d&&d(_)}),L=O(f),j=_=>{g==="auto"&&x.start(S.current||0,_),r&&r(T.current,_)};return $.jsx(v,{appear:o,in:s,nodeRef:T,onEnter:A,onEntered:I,onEntering:k,onExit:N,onExited:L,onExiting:R,addEndListener:j,timeout:g==="auto"?null:g,...w,children:(_,D)=>y.cloneElement(i,{style:{opacity:0,transform:g_(.75),visibility:_==="exited"&&!s?"hidden":void 0,...VIe[_],...m,...i.props.style},ref:E,...D})})});kf&&(kf.muiSupportAuto=!0);function HIe(e){return tt("MuiImageList",e)}ot("MuiImageList",["root","masonry","quilted","standard","woven"]);const SZ=y.createContext({}),UIe=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n]},HIe,t)},WIe=oe("ul",{name:"MuiImageList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({display:"grid",overflowY:"auto",listStyle:"none",padding:0,WebkitOverflowScrolling:"touch",variants:[{props:{variant:"masonry"},style:{display:"block"}}]}),CZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiImageList"}),{children:o,className:i,cols:a=2,component:s="ul",rowHeight:l="auto",gap:c=4,style:u,variant:d="standard",...f}=r,p=y.useMemo(()=>({rowHeight:l,gap:c,variant:d}),[l,c,d]),m=d==="masonry"?{columnCount:a,columnGap:c,...u}:{gridTemplateColumns:`repeat(${a}, 1fr)`,gap:c,...u},g={...r,component:s,gap:c,rowHeight:l,variant:d},v=UIe(g);return $.jsx(WIe,{as:s,className:de(v.root,v[d],i),ref:n,style:m,ownerState:g,...f,children:$.jsx(SZ.Provider,{value:p,children:o})})});function GIe(e){return tt("MuiImageListItem",e)}const C$=ot("MuiImageListItem",["root","img","standard","woven","masonry","quilted"]),qIe=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],img:["img"]},GIe,t)},KIe=oe("li",{name:"MuiImageListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${C$.img}`]:t.img},t.root,t[n.variant]]}})({display:"block",position:"relative",[`& .${C$.img}`]:{objectFit:"cover",width:"100%",height:"100%",display:"block"},variants:[{props:{variant:"standard"},style:{display:"flex",flexDirection:"column"}},{props:{variant:"woven"},style:{height:"100%",alignSelf:"center","&:nth-of-type(even)":{height:"70%"}}},{props:{variant:"standard"},style:{[`& .${C$.img}`]:{height:"auto",flexGrow:1}}}]}),PZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiImageListItem"}),{children:o,className:i,cols:a=1,component:s="li",rows:l=1,style:c,...u}=r,{rowHeight:d="auto",gap:f,variant:p}=y.useContext(SZ);let m="auto";p==="woven"?m=void 0:d!=="auto"&&(m=d*l+f*(l-1));const g={...r,cols:a,component:s,gap:f,rowHeight:d,rows:l,variant:p},v=qIe(g);return $.jsx(KIe,{as:s,className:de(v.root,v[p],i),ref:n,style:{height:m,gridColumnEnd:p!=="masonry"?`span ${a}`:void 0,gridRowEnd:p!=="masonry"?`span ${l}`:void 0,marginBottom:p==="masonry"?f:void 0,breakInside:p==="masonry"?"avoid":void 0,...c},ownerState:g,...u,children:y.Children.map(o,w=>y.isValidElement(w)?w.type==="img"||qg(w,["Image"])?y.cloneElement(w,{className:de(v.img,w.props.className)}):w:null)})});function YIe(e){return tt("MuiImageListItemBar",e)}ot("MuiImageListItemBar",["root","positionBottom","positionTop","positionBelow","actionPositionLeft","actionPositionRight","titleWrap","titleWrapBottom","titleWrapTop","titleWrapBelow","titleWrapActionPosLeft","titleWrapActionPosRight","title","subtitle","actionIcon","actionIconActionPosLeft","actionIconActionPosRight"]);const XIe=e=>{const{classes:t,position:n,actionIcon:r,actionPosition:o}=e,i={root:["root",`position${Ce(n)}`,`actionPosition${Ce(o)}`],titleWrap:["titleWrap",`titleWrap${Ce(n)}`,r&&`titleWrapActionPos${Ce(o)}`],title:["title"],subtitle:["subtitle"],actionIcon:["actionIcon",`actionIconActionPos${Ce(o)}`]};return rt(i,YIe,t)},QIe=oe("div",{name:"MuiImageListItemBar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`]]}})(Ze(({theme:e})=>({position:"absolute",left:0,right:0,background:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",fontFamily:e.typography.fontFamily,variants:[{props:{position:"bottom"},style:{bottom:0}},{props:{position:"top"},style:{top:0}},{props:{position:"below"},style:{position:"relative",background:"transparent",alignItems:"normal"}}]}))),JIe=oe("div",{name:"MuiImageListItemBar",slot:"TitleWrap",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.titleWrap,t[`titleWrap${Ce(n.position)}`],n.actionIcon&&t[`titleWrapActionPos${Ce(n.actionPosition)}`]]}})(Ze(({theme:e})=>({flexGrow:1,padding:"12px 16px",color:(e.vars||e).palette.common.white,overflow:"hidden",variants:[{props:{position:"below"},style:{padding:"6px 0 12px",color:"inherit"}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="left",style:{paddingLeft:0}},{props:({ownerState:t})=>t.actionIcon&&t.actionPosition==="right",style:{paddingRight:0}}]}))),ZIe=oe("div",{name:"MuiImageListItemBar",slot:"Title",overridesResolver:(e,t)=>t.title})(Ze(({theme:e})=>({fontSize:e.typography.pxToRem(16),lineHeight:"24px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),eke=oe("div",{name:"MuiImageListItemBar",slot:"Subtitle",overridesResolver:(e,t)=>t.subtitle})(Ze(({theme:e})=>({fontSize:e.typography.pxToRem(12),lineHeight:1,textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"}))),tke=oe("div",{name:"MuiImageListItemBar",slot:"ActionIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.actionIcon,t[`actionIconActionPos${Ce(n.actionPosition)}`]]}})({variants:[{props:{actionPosition:"left"},style:{order:-1}}]}),nke=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiImageListItemBar"}),{actionIcon:o,actionPosition:i="right",className:a,subtitle:s,title:l,position:c="bottom",...u}=r,d={...r,position:c,actionPosition:i},f=XIe(d);return $.jsxs(QIe,{ownerState:d,className:de(f.root,a),ref:n,...u,children:[$.jsxs(JIe,{ownerState:d,className:f.titleWrap,children:[$.jsx(ZIe,{className:f.title,children:l}),s?$.jsx(eke,{className:f.subtitle,children:s}):null]}),o?$.jsx(tke,{ownerState:d,className:f.actionIcon,children:o}):null]})}),rke=e=>{const{classes:t,disableUnderline:n}=e,o=rt({root:["root",!n&&"underline"],input:["input"]},$Te,t);return{...t,...o}},oke=oe(DI,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...RI(e,t),!n.disableUnderline&&t.underline]}})(Ze(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Vd.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Vd.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Vd.disabled}, .${Vd.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Vd.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(zn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),ike=oe(NI,{name:"MuiInput",slot:"Input",overridesResolver:_I})({}),WT=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiInput"}),{disableUnderline:o=!1,components:i={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=rke(r),v={root:{ownerState:{disableUnderline:o}}},w=u??a?bo(u??a,v):v,x=d.root??i.Root??oke,S=d.input??i.Input??ike;return $.jsx(Fv,{slots:{root:x,input:S},slotProps:w,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});WT&&(WT.muiName="Input");function ake(e){return tt("MuiInputAdornment",e)}const iU=ot("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var aU;const ske=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${Ce(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},lke=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:o,size:i,variant:a}=e,s={root:["root",n&&"disablePointerEvents",o&&`position${Ce(o)}`,a,r&&"hiddenLabel",i&&`size${Ce(i)}`]};return rt(s,ake,t)},cke=oe("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:ske})(Ze(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${iU.positionStart}&:not(.${iU.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),po=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiInputAdornment"}),{children:o,className:i,component:a="div",disablePointerEvents:s=!1,disableTypography:l=!1,position:c,variant:u,...d}=r,f=Ta()||{};let p=u;u&&f.variant,f&&!p&&(p=f.variant);const m={...r,hiddenLabel:f.hiddenLabel,size:f.size,disablePointerEvents:s,position:c,variant:p},g=lke(m);return $.jsx($I.Provider,{value:null,children:$.jsx(cke,{as:a,ownerState:m,className:de(g.root,i),ref:n,...d,children:typeof o=="string"&&!l?$.jsx(ct,{color:"textSecondary",children:o}):$.jsxs(y.Fragment,{children:[c==="start"?aU||(aU=$.jsx("span",{className:"notranslate",children:"​"})):null,o]})})})});function uke(e){return tt("MuiInputLabel",e)}ot("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const dke=e=>{const{classes:t,formControl:n,size:r,shrink:o,disableAnimation:i,variant:a,required:s}=e,l={root:["root",n&&"formControl",!i&&"animated",o&&"shrink",r&&r!=="normal"&&`size${Ce(r)}`,a],asterisk:[s&&"asterisk"]},c=rt(l,uke,t);return{...t,...c}},fke=oe(zIe,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${mw.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Ze(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),Kh=y.forwardRef(function(t,n){const r=it({name:"MuiInputLabel",props:t}),{disableAnimation:o=!1,margin:i,shrink:a,variant:s,className:l,...c}=r,u=Ta();let d=a;typeof d>"u"&&u&&(d=u.filled||u.focused||u.adornedStart);const f=Uf({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),p={...r,disableAnimation:o,formControl:u,shrink:d,size:f.size,variant:f.variant,required:f.required,focused:f.focused},m=dke(p);return $.jsx(fke,{"data-shrink":d,ref:n,className:de(m.root,l),...c,ownerState:p,classes:m})});function pke(e){return tt("MuiLinearProgress",e)}ot("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]);const y_=4,v_=qc` 0% { left: -35%; right: 100%; @@ -209,9 +209,9 @@ Error generating stack: `+i.message+` left: 100%; right: -90%; } -`,JIe=typeof l_!="string"?Af` - animation: ${l_} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; - `:null,c_=Uc` +`,hke=typeof v_!="string"?Nf` + animation: ${v_} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite; + `:null,b_=qc` 0% { left: -200%; right: 100%; @@ -226,9 +226,9 @@ Error generating stack: `+i.message+` left: 107%; right: -8%; } -`,ZIe=typeof c_!="string"?Af` - animation: ${c_} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; - `:null,u_=Uc` +`,mke=typeof b_!="string"?Nf` + animation: ${b_} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite; + `:null,w_=qc` 0% { opacity: 1; background-position: 0 -23px; @@ -243,9 +243,9 @@ Error generating stack: `+i.message+` opacity: 1; background-position: -200px -23px; } -`,eke=typeof u_!="string"?Af` - animation: ${u_} 3s infinite linear; - `:null,tke=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Ce(r)}`,n],dashed:["dashed",`dashedColor${Ce(r)}`],bar1:["bar",`barColor${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Ce(r)}`,n==="buffer"&&`color${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return rt(o,QIe,t)},FF=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Bu(e.palette[t].main,.62):ju(e.palette[t].main,.5),nke=oe("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ce(n.color)}`],t[n.variant]]}})(Ze(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{backgroundColor:FF(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),rke=oe("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Ce(n.color)}`]]}})(Ze(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(Bn()).map(([t])=>{const n=FF(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),eke||{animation:`${u_} 3s infinite linear`}),oke=oe("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(Ze(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${s_}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${s_}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:JIe||{animation:`${l_} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),ike=oe("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(Ze(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:FF(e,t),transition:`transform .${s_}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:ZIe||{animation:`${c_} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),hZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},d=tke(u),f=nr(),h={},m={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){h["aria-valuenow"]=Math.round(a),h["aria-valuemin"]=0,h["aria-valuemax"]=100;let g=a-100;f&&(g=-g),m.bar1.transform=`translateX(${g}%)`}if(l==="buffer"&&s!==void 0){let g=(s||0)-100;f&&(g=-g),m.bar2.transform=`translateX(${g}%)`}return $.jsxs(nke,{className:fe(d.root,o),ownerState:u,role:"progressbar",...h,ref:n,...c,children:[l==="buffer"?$.jsx(rke,{className:d.dashed,ownerState:u}):null,$.jsx(oke,{className:d.bar1,ownerState:u,style:m.bar1}),l==="determinate"?null:$.jsx(ike,{className:d.bar2,ownerState:u,style:m.bar2})]})}),tl=y.createContext({});function ake(e){return tt("MuiList",e)}ot("MuiList",["root","padding","dense","subheader"]);const ske=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return rt({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},ake,t)},lke=oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),dl=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=y.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},h=ske(f);return $.jsx(tl.Provider,{value:d,children:$.jsxs(lke,{as:a,className:fe(h.root,i),ref:n,ownerState:f,...u,children:[c,o]})})});function cke(e){return tt("MuiListItem",e)}ot("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function uke(e){return tt("MuiListItemButton",e)}const rg=ot("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),dke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},fke=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=rt({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},uke,n);return{...n,...c}},pke=oe(Ki,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:dke})(Ze(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${rg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${rg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${rg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${rg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${rg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Bf=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:h,...m}=r,g=y.useContext(tl),v=y.useMemo(()=>({dense:l||g.dense||!1,alignItems:o,disableGutters:c}),[o,g.dense,l,c]),w=y.useRef(null);ns(()=>{i&&w.current&&w.current.focus()},[i]);const x={...r,alignItems:o,dense:v.dense,disableGutters:c,divider:u,selected:f},S=fke(x),P=Cr(w,n);return $.jsx(tl.Provider,{value:v,children:$.jsx(pke,{ref:P,href:m.href||m.to,component:(m.href||m.to)&&a==="div"?"button":a,focusVisibleClassName:fe(S.focusVisible,d),ownerState:x,className:fe(S.root,h),...m,classes:S,children:s})})});function hke(e){return tt("MuiListItemSecondaryAction",e)}ot("MuiListItemSecondaryAction",["root","disableGutters"]);const mke=e=>{const{disableGutters:t,classes:n}=e;return rt({root:["root",t&&"disableGutters"]},hke,n)},gke=oe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),mZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=y.useContext(tl),s={...r,disableGutters:a.disableGutters},l=mke(s);return $.jsx(gke,{className:fe(l.root,o),ownerState:s,ref:n,...i})});mZ.muiName="ListItemSecondaryAction";const yke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},vke=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return rt({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},cke,n)},bke=oe("div",{name:"MuiListItem",slot:"Root",overridesResolver:yke})(Ze(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${rg.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),wke=oe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),ss=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...f}={},dense:h=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,secondaryAction:w,slotProps:x={},slots:S={},...P}=r,T=y.useContext(tl),E=y.useMemo(()=>({dense:h||T.dense||!1,alignItems:o,disableGutters:m}),[o,T.dense,h,m]),O=y.useRef(null),k=y.Children.toArray(i),A=k.length&&Fg(k[k.length-1],["ListItemSecondaryAction"]),I={...r,alignItems:o,dense:E.dense,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:A},R=vke(I),N=Cr(O,n),L=S.root||l.Root||bke,B=x.root||c.root||{},_={className:fe(R.root,B.className,a),...P};let D=s||"li";return A?(D=!_.component&&!s?"div":D,u==="li"&&(D==="li"?D="div":_.component==="li"&&(_.component="div")),$.jsx(tl.Provider,{value:E,children:$.jsxs(wke,{as:u,className:fe(R.container,d),ref:N,ownerState:I,...f,children:[$.jsx(L,{...B,...!_y(L)&&{as:D,ownerState:{...I,...B.ownerState}},..._,children:k}),k.pop()]})})):$.jsx(tl.Provider,{value:E,children:$.jsxs(L,{...B,as:D,ref:N,...!_y(L)&&{ownerState:{...I,...B.ownerState}},..._,children:[k,w&&$.jsx(mZ,{children:w})]})})});function xke(e){return tt("MuiListItemAvatar",e)}ot("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Ske=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},xke,n)},Cke=oe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),jF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=y.useContext(tl),s={...r,alignItems:a.alignItems},l=Ske(s);return $.jsx(Cke,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function Pke(e){return tt("MuiListItemIcon",e)}const JU=ot("MuiListItemIcon",["root","alignItemsFlexStart"]),Tke=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Pke,n)},Eke=oe("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Ze(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Gi=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=y.useContext(tl),s={...r,alignItems:a.alignItems},l=Tke(s);return $.jsx(Eke,{className:fe(l.root,o),ownerState:s,ref:n,...i})});function Oke(e){return tt("MuiListItemText",e)}const Pg=ot("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Ike=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return rt({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Oke,t)},kke=oe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Pg.primary}`]:t.primary},{[`& .${Pg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${OT.root}:where(& .${Pg.primary})`]:{display:"block"},[`.${OT.root}:where(& .${Pg.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),bo=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,...f}=r,{dense:h}=y.useContext(tl);let m=l??o,g=u;const v={...r,disableTypography:a,inset:s,primary:!!m,secondary:!!g,dense:h},w=Ike(v);return m!=null&&m.type!==dt&&!a&&(m=$.jsx(dt,{variant:h?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",...c,children:m})),g!=null&&g.type!==dt&&!a&&(g=$.jsx(dt,{variant:"body2",className:w.secondary,color:"textSecondary",...d,children:g})),$.jsxs(kke,{className:fe(w.root,i),ownerState:v,ref:n,...f,children:[m,g]})});function h$(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function ZU(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function gZ(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Xb(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!gZ(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const xS=y.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,h=y.useRef(null),m=y.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});ns(()=>{o&&h.current.focus()},[o]),y.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:P})=>{const T=!h.current.style.width;if(S.clientHeight{const P=h.current,T=S.key;if(S.ctrlKey||S.metaKey||S.altKey){u&&u(S);return}const O=ii(P).activeElement;if(T==="ArrowDown")S.preventDefault(),Xb(P,O,c,l,h$);else if(T==="ArrowUp")S.preventDefault(),Xb(P,O,c,l,ZU);else if(T==="Home")S.preventDefault(),Xb(P,null,c,l,h$);else if(T==="End")S.preventDefault(),Xb(P,null,c,l,ZU);else if(T.length===1){const k=m.current,A=T.toLowerCase(),I=performance.now();k.keys.length>0&&(I-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&A!==k.keys[0]&&(k.repeating=!1)),k.lastTime=I,k.keys.push(A);const R=O&&!k.repeating&&gZ(O,k);k.previousKeyMatched&&(R||Xb(P,O,!1,l,h$,k))?S.preventDefault():k.previousKeyMatched=!1}u&&u(S)},v=Cr(h,n);let w=-1;y.Children.forEach(a,(S,P)=>{if(!y.isValidElement(S)){w===P&&(w+=1,w>=a.length&&(w=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||w===-1)&&(w=P),w===P&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const x=y.Children.map(a,(S,P)=>{if(P===w){const T={};return i&&(T.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(T.tabIndex=0),y.cloneElement(S,T)}return S});return $.jsx(dl,{role:"menu",ref:v,className:s,onKeyDown:g,tabIndex:o?0:-1,...f,children:x})});function Mke(e){return tt("MuiPopover",e)}ot("MuiPopover",["root","paper"]);function e3(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function t3(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function n3(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function m$(e){return typeof e=="function"?e():e}const Ake=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"]},Mke,t)},$ke=oe(kv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yZ=oe(co,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Rke=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:h=16,open:m,PaperProps:g={},slots:v={},slotProps:w={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=Tf,transitionDuration:P="auto",TransitionProps:{onEntering:T,...E}={},disableScrollLock:O=!1,...k}=r,A=(w==null?void 0:w.paper)??g,I=y.useRef(),R={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:h,externalPaperSlotProps:A,transformOrigin:x,TransitionComponent:S,transitionDuration:P,TransitionProps:E},N=Ake(R),L=y.useCallback(()=>{if(l==="anchorPosition")return s;const re=m$(i),ee=(re&&re.nodeType===1?re:ii(I.current).body).getBoundingClientRect();return{top:ee.top+e3(ee,a.vertical),left:ee.left+t3(ee,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),B=y.useCallback(re=>({vertical:e3(re,x.vertical),horizontal:t3(re,x.horizontal)}),[x.horizontal,x.vertical]),_=y.useCallback(re=>{const de={width:re.offsetWidth,height:re.offsetHeight},ee=B(de);if(l==="none")return{top:null,left:null,transformOrigin:n3(ee)};const ce=L();let me=ce.top-ee.vertical,we=ce.left-ee.horizontal;const ge=me+de.height,Se=we+de.width,xe=rs(m$(i)),Ie=xe.innerHeight-h,Re=xe.innerWidth-h;if(h!==null&&meIe){const _e=ge-Ie;me-=_e,ee.vertical+=_e}if(h!==null&&weRe){const _e=Se-Re;we-=_e,ee.horizontal+=_e}return{top:`${Math.round(me)}px`,left:`${Math.round(we)}px`,transformOrigin:n3(ee)}},[i,l,L,B,h]),[D,z]=y.useState(m),F=y.useCallback(()=>{const re=I.current;if(!re)return;const de=_(re);de.top!==null&&re.style.setProperty("top",de.top),de.left!==null&&(re.style.left=de.left),re.style.transformOrigin=de.transformOrigin,z(!0)},[_]);y.useEffect(()=>(O&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,O,F]);const H=(re,de)=>{T&&T(re,de),F()},U=()=>{z(!1)};y.useEffect(()=>{m&&F()}),y.useImperativeHandle(o,()=>m?{updatePosition:()=>{F()}}:null,[m,F]),y.useEffect(()=>{if(!m)return;const re=dS(()=>{F()}),de=rs(i);return de.addEventListener("resize",re),()=>{re.clear(),de.removeEventListener("resize",re)}},[i,m,F]);let q=P;P==="auto"&&!S.muiSupportAuto&&(q=void 0);const Y=d||(i?ii(m$(i)).body:void 0),ae={slots:v,slotProps:{...w,paper:A}},[Z,K]=hr("paper",{elementType:yZ,externalForwardedProps:ae,additionalProps:{elevation:f,className:fe(N.paper,A==null?void 0:A.className),style:D?A.style:{...A.style,opacity:0}},ownerState:R}),[te,{slotProps:pe,...ie}]=hr("root",{elementType:$ke,externalForwardedProps:ae,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:Y,open:m},ownerState:R,className:fe(N.root,u)}),le=Cr(I,K.ref);return $.jsx(te,{...ie,...!_y(te)&&{slotProps:pe,disableScrollLock:O},...k,ref:n,children:$.jsx(S,{appear:!0,in:m,onEntering:H,onExited:U,timeout:q,...E,children:$.jsx(Z,{...K,ref:le,children:c})})})});function _ke(e){return tt("MuiMenu",e)}ot("MuiMenu",["root","paper","list"]);const Dke={vertical:"top",horizontal:"right"},Nke={vertical:"top",horizontal:"left"},Lke=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"],list:["list"]},_ke,t)},Fke=oe(Rke,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jke=oe(yZ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Bke=oe(xS,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),hs=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:h="auto",TransitionProps:{onEntering:m,...g}={},variant:v="selectedMenu",slots:w={},slotProps:x={},...S}=r,P=nr(),T={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:h,TransitionProps:g,variant:v},E=Lke(T),O=o&&!s&&u,k=y.useRef(null),A=(D,z)=>{k.current&&k.current.adjustStyleForScrollbar(D,{direction:P?"rtl":"ltr"}),m&&m(D,z)},I=D=>{D.key==="Tab"&&(D.preventDefault(),c&&c(D,"tabKeyDown"))};let R=-1;y.Children.map(i,(D,z)=>{y.isValidElement(D)&&(D.props.disabled||(v==="selectedMenu"&&D.props.selected||R===-1)&&(R=z))});const N=w.paper??jke,L=x.paper??d,B=Lc({elementType:w.root,externalSlotProps:x.root,ownerState:T,className:[E.root,a]}),_=Lc({elementType:N,externalSlotProps:L,ownerState:T,className:E.paper});return $.jsx(Fke,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?Dke:Nke,slots:{paper:N,root:w.root},slotProps:{root:B,paper:_},open:u,ref:n,transitionDuration:h,TransitionProps:{onEntering:A,...g},ownerState:T,...S,classes:f,children:$.jsx(Bke,{onKeyDown:I,actions:k,autoFocus:o&&(R===-1||s),autoFocusItem:O,variant:v,...l,className:fe(E.list,l.className),children:i})})});function zke(e){return tt("MuiMenuItem",e)}const Qb=ot("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),Vke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Hke=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=rt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},zke,a);return{...a,...l}},Uke=oe(Ki,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:Vke})(Ze(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Qb.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Qb.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Qb.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${Qb.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Qb.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${WU.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${WU.inset}`]:{marginLeft:52},[`& .${Pg.root}`]:{marginTop:0,marginBottom:0},[`& .${Pg.inset}`]:{paddingLeft:36},[`& .${JU.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${JU.root} svg`]:{fontSize:"1.25rem"}}}]}))),Yt=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f,...h}=r,m=y.useContext(tl),g=y.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),v=y.useRef(null);ns(()=>{o&&v.current&&v.current.focus()},[o]);const w={...r,dense:g.dense,divider:s,disableGutters:l},x=Hke(r),S=Cr(v,n);let P;return r.disabled||(P=d!==void 0?d:-1),$.jsx(tl.Provider,{value:g,children:$.jsx(Uke,{ref:S,role:u,tabIndex:P,component:i,focusVisibleClassName:fe(x.focusVisible,c),className:fe(x.root,f),...h,ownerState:w,classes:x})})});function Wke(e){return tt("MuiNativeSelect",e)}const BF=ot("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Gke=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"]};return rt(s,Wke,t)},vZ=oe("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${BF.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),qke=oe(vZ,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ci,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${BF.multiple}`]:t.multiple}]}})({}),bZ=oe("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${BF.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Kke=oe(bZ,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),Yke=y.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},d=Gke(u);return $.jsxs(y.Fragment,{children:[$.jsx(qke,{ownerState:u,className:fe(d.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:$.jsx(Kke,{as:a,ownerState:u,className:d.icon})]})});var r3;const Xke=oe("fieldset",{shouldForwardProp:ci})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Qke=oe("legend",{shouldForwardProp:ci})(Ze(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Jke(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return $.jsx(Xke,{"aria-hidden":!0,className:r,ownerState:l,...a,children:$.jsx(Qke,{ownerState:l,children:s?$.jsx("span",{children:o}):r3||(r3=$.jsx("span",{className:"notranslate",children:"​"}))})})}const Zke=e=>{const{classes:t}=e,r=rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},yTe,t);return{...t,...r}},eMe=oe(CI,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:xI})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Rs.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Rs.focused} .${Rs.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Bn()).map(([n])=>({props:{color:n},style:{[`&.${Rs.focused} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${Rs.error} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${Rs.disabled} .${Rs.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),tMe=oe(Jke,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),nMe=oe(PI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:SI})(Ze(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),_T=y.forwardRef(function(t,n){var r;const o=it({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},type:f="text",...h}=o,m=Zke(o),g=Ta(),v=jf({props:o,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:g,fullWidth:a,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:f},x=d.root??i.Root??eMe,S=d.input??i.Input??nMe;return $.jsx(Ov,{slots:{root:x,input:S},renderSuffix:P=>$.jsx(tMe,{ownerState:w,className:m.notchedOutline,label:l!=null&&l!==""&&v.required?r||(r=$.jsxs(y.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:f,...h,classes:{...m,notchedOutline:null}})});_T&&(_T.muiName="Input");function rMe(e){return tt("MuiPagination",e)}ot("MuiPagination",["root","ul","outlined","text"]);function oMe(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...h}=e,[m,g]=Ou({controlled:c,default:o,name:n,state:"page"}),v=(A,I)=>{c||g(I),l&&l(A,I)},w=(A,I)=>{const R=I-A+1;return Array.from({length:R},(N,L)=>A+L)},x=w(1,Math.min(t,r)),S=w(Math.max(r-t+1,t+1),r),P=Math.max(Math.min(m-f,r-t-f*2-1),t+2),T=Math.min(Math.max(m+f,t+f*2+2),r-t-1),E=[...u?["first"]:[],...s?[]:["previous"],...x,...P>t+2?["start-ellipsis"]:t+1t?[r-t]:[],...S,...a?[]:["next"],...d?["last"]:[]],O=A=>{switch(A){case"first":return 1;case"previous":return m-1;case"next":return m+1;case"last":return r;default:return null}};return{items:E.map(A=>typeof A=="number"?{onClick:I=>{v(I,A)},type:"page",page:A,selected:A===m,disabled:i,"aria-current":A===m?"true":void 0}:{onClick:I=>{v(I,O(A))},type:A,page:O(A),selected:!1,disabled:i||!A.includes("ellipsis")&&(A==="next"||A==="last"?m>=r:m<=1)}),...h}}function iMe(e){return tt("MuiPaginationItem",e)}const Ri=ot("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),wZ=st($.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),xZ=st($.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),aMe=st($.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),sMe=st($.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),SZ=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.variant==="text"&&t[`text${Ce(n.color)}`],n.variant==="outlined"&&t[`outlined${Ce(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},lMe=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Ce(i)}`,l,a,n!=="standard"&&`color${Ce(n)}`,n!=="standard"&&`${l}${Ce(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return rt(c,iMe,t)},cMe=oe("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:SZ})(Ze(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Ri.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),uMe=oe(Ki,{name:"MuiPaginationItem",slot:"Root",overridesResolver:SZ})(Ze(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Ri.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ri.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ri.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Ri.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Ri.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Ri.selected}`]:{[`&.${Ri.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Ri.selected}`]:{[`&.${Ri.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(Bn(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Ri.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Ri.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Ri.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(Bn(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Ri.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:mt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:mt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ri.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),dMe=oe("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(Ze(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),fMe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:f="medium",slots:h={},slotProps:m={},type:g="page",variant:v="text",...w}=r,x={...r,color:i,disabled:l,selected:u,shape:d,size:f,type:g,variant:v},S=nr(),P=lMe(x),T={slots:{previous:h.previous??s.previous,next:h.next??s.next,first:h.first??s.first,last:h.last??s.last},slotProps:m},[E,O]=hr("previous",{elementType:aMe,externalForwardedProps:T,ownerState:x}),[k,A]=hr("next",{elementType:sMe,externalForwardedProps:T,ownerState:x}),[I,R]=hr("first",{elementType:wZ,externalForwardedProps:T,ownerState:x}),[N,L]=hr("last",{elementType:xZ,externalForwardedProps:T,ownerState:x}),B=S?{previous:"next",next:"previous",first:"last",last:"first"}[g]:g,_={previous:E,next:k,first:I,last:N}[B],D={previous:O,next:A,first:R,last:L}[B];return g==="start-ellipsis"||g==="end-ellipsis"?$.jsx(cMe,{ref:n,ownerState:x,className:fe(P.root,o),children:"…"}):$.jsxs(uMe,{ref:n,ownerState:x,component:a,disabled:l,className:fe(P.root,o),...w,children:[g==="page"&&c,_?$.jsx(dMe,{...D,className:P.icon,as:_}):null]})}),pMe=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],ul:["ul"]},rMe,t)},hMe=oe("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),mMe=oe("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function gMe(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const yMe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=gMe,hideNextButton:d=!1,hidePrevButton:f=!1,onChange:h,page:m,renderItem:g=I=>$.jsx(fMe,{...I}),shape:v="circular",showFirstButton:w=!1,showLastButton:x=!1,siblingCount:S=1,size:P="medium",variant:T="text",...E}=r,{items:O}=oMe({...r,componentName:"Pagination"}),k={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:d,hidePrevButton:f,renderItem:g,shape:v,showFirstButton:w,showLastButton:x,siblingCount:S,size:P,variant:T},A=pMe(k);return $.jsx(hMe,{"aria-label":"pagination navigation",className:fe(A.root,i),ownerState:k,ref:n,...E,children:$.jsx(mMe,{className:A.ul,ownerState:k,children:O.map((I,R)=>$.jsx("li",{children:g({...I,color:a,"aria-label":u(I.type,I.page,I.selected),shape:v,size:P,variant:T})},R))})})});function vMe(e){return tt("MuiSelect",e)}const Jb=ot("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var o3;const bMe=oe(vZ,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Jb.select}`]:t.select},{[`&.${Jb.select}`]:t[n.variant]},{[`&.${Jb.error}`]:t.error},{[`&.${Jb.multiple}`]:t.multiple}]}})({[`&.${Jb.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),wMe=oe(bZ,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),xMe=oe("input",{shouldForwardProp:e=>SX(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function i3(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function SMe(e){return e==null||typeof e=="string"&&!e.trim()}const CMe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return rt(s,vMe,t)},PMe=y.forwardRef(function(t,n){var vn;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:h=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:w={},multiple:x,name:S,onBlur:P,onChange:T,onClose:E,onFocus:O,onOpen:k,open:A,readOnly:I,renderValue:R,SelectDisplayProps:N={},tabIndex:L,type:B,value:_,variant:D="standard",...z}=t,[F,H]=Ou({controlled:_,default:u,name:"Select"}),[U,q]=Ou({controlled:A,default:c,name:"Select"}),Y=y.useRef(null),ae=y.useRef(null),[Z,K]=y.useState(null),{current:te}=y.useRef(A!=null),[pe,ie]=y.useState(),le=Cr(n,g),re=y.useCallback(Ke=>{ae.current=Ke,Ke&&K(Ke)},[]),de=Z==null?void 0:Z.parentNode;y.useImperativeHandle(le,()=>({focus:()=>{ae.current.focus()},node:Y.current,value:F}),[F]),y.useEffect(()=>{c&&U&&Z&&!te&&(ie(a?null:de.clientWidth),ae.current.focus())},[Z,a]),y.useEffect(()=>{i&&ae.current.focus()},[i]),y.useEffect(()=>{if(!v)return;const Ke=ii(ae.current).getElementById(v);if(Ke){const $e=()=>{getSelection().isCollapsed&&ae.current.focus()};return Ke.addEventListener("click",$e),()=>{Ke.removeEventListener("click",$e)}}},[v]);const ee=(Ke,$e)=>{Ke?k&&k($e):E&&E($e),te||(ie(a?null:de.clientWidth),q(Ke))},ce=Ke=>{Ke.button===0&&(Ke.preventDefault(),ae.current.focus(),ee(!0,Ke))},me=Ke=>{ee(!1,Ke)},we=y.Children.toArray(s),ge=Ke=>{const $e=we.find(Xe=>Xe.props.value===Ke.target.value);$e!==void 0&&(H($e.props.value),T&&T(Ke,$e))},Se=Ke=>$e=>{let Xe;if($e.currentTarget.hasAttribute("tabindex")){if(x){Xe=Array.isArray(F)?F.slice():[];const bt=F.indexOf(Ke.props.value);bt===-1?Xe.push(Ke.props.value):Xe.splice(bt,1)}else Xe=Ke.props.value;if(Ke.props.onClick&&Ke.props.onClick($e),F!==Xe&&(H(Xe),T)){const bt=$e.nativeEvent||$e,zt=new bt.constructor(bt.type,bt);Object.defineProperty(zt,"target",{writable:!0,value:{value:Xe,name:S}}),T(zt,Ke)}x||ee(!1,$e)}},xe=Ke=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(Ke.key)&&(Ke.preventDefault(),ee(!0,Ke))},Ie=Z!==null&&U,Re=Ke=>{!Ie&&P&&(Object.defineProperty(Ke,"target",{writable:!0,value:{value:F,name:S}}),P(Ke))};delete z["aria-invalid"];let _e,ye;const Te=[];let Oe=!1;(MT({value:F})||f)&&(R?_e=R(F):Oe=!0);const Me=we.map(Ke=>{if(!y.isValidElement(Ke))return null;let $e;if(x){if(!Array.isArray(F))throw new Error(Fu(2));$e=F.some(Xe=>i3(Xe,Ke.props.value)),$e&&Oe&&Te.push(Ke.props.children)}else $e=i3(F,Ke.props.value),$e&&Oe&&(ye=Ke.props.children);return y.cloneElement(Ke,{"aria-selected":$e?"true":"false",onClick:Se(Ke),onKeyUp:Xe=>{Xe.key===" "&&Xe.preventDefault(),Ke.props.onKeyUp&&Ke.props.onKeyUp(Xe)},role:"option",selected:$e,value:void 0,"data-value":Ke.props.value})});Oe&&(x?Te.length===0?_e=null:_e=Te.reduce((Ke,$e,Xe)=>(Ke.push($e),Xe{const{classes:t}=e;return t},zF={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ci(e)&&e!=="variant",slot:"Root"},EMe=oe(RT,zF)(""),OMe=oe(_T,zF)(""),IMe=oe($T,zF)(""),zf=y.forwardRef(function(t,n){const r=it({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=JJ,id:d,input:f,inputProps:h,label:m,labelId:g,MenuProps:v,multiple:w=!1,native:x=!1,onClose:S,onOpen:P,open:T,renderValue:E,SelectDisplayProps:O,variant:k="outlined",...A}=r,I=x?Yke:PMe,R=Ta(),N=jf({props:r,muiFormControl:R,states:["variant","error"]}),L=N.variant||k,B={...r,variant:L,classes:a},_=TMe(B),{root:D,...z}=_,F=f||{standard:$.jsx(EMe,{ownerState:B}),outlined:$.jsx(OMe,{label:m,ownerState:B}),filled:$.jsx(IMe,{ownerState:B})}[L],H=Cr(n,$f(F));return $.jsx(y.Fragment,{children:y.cloneElement(F,{inputComponent:I,inputProps:{children:i,error:N.error,IconComponent:u,variant:L,type:void 0,multiple:w,...x?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:S,onOpen:P,open:T,renderValue:E,SelectDisplayProps:{id:d,...O}},...h,classes:h?vo(z,h.classes):z,...f?f.props.inputProps:{}},...(w&&x||c)&&L==="outlined"?{notched:!0}:{},ref:H,className:fe(F.props.className,s,_.root),...!f&&{variant:L},...A})})});zf.muiName="Select";function kMe(e){return tt("MuiSkeleton",e)}ot("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const MMe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return rt({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},kMe,t)},d_=Uc` +`,gke=typeof w_!="string"?Nf` + animation: ${w_} 3s infinite linear; + `:null,yke=e=>{const{classes:t,variant:n,color:r}=e,o={root:["root",`color${Ce(r)}`,n],dashed:["dashed",`dashedColor${Ce(r)}`],bar1:["bar",`barColor${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar1Indeterminate",n==="determinate"&&"bar1Determinate",n==="buffer"&&"bar1Buffer"],bar2:["bar",n!=="buffer"&&`barColor${Ce(r)}`,n==="buffer"&&`color${Ce(r)}`,(n==="indeterminate"||n==="query")&&"bar2Indeterminate",n==="buffer"&&"bar2Buffer"]};return rt(o,pke,t)},YF=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:e.palette.mode==="light"?Vu(e.palette[t].main,.62):zu(e.palette[t].main,.5),vke=oe("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Ce(n.color)}`],t[n.variant]]}})(Ze(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{backgroundColor:YF(e,t)}})),{props:({ownerState:t})=>t.color==="inherit"&&t.variant!=="buffer",style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),bke=oe("span",{name:"MuiLinearProgress",slot:"Dashed",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.dashed,t[`dashedColor${Ce(n.color)}`]]}})(Ze(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(zn()).map(([t])=>{const n=YF(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${n} 0%, ${n} 16%, transparent 42%)`}}})]})),gke||{animation:`${w_} 3s infinite linear`}),wke=oe("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar1Indeterminate,n.variant==="determinate"&&t.bar1Determinate,n.variant==="buffer"&&t.bar1Buffer]}})(Ze(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${y_}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${y_}s linear`}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:hke||{animation:`${v_} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),xke=oe("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.bar,t[`barColor${Ce(n.color)}`],(n.variant==="indeterminate"||n.variant==="query")&&t.bar2Indeterminate,n.variant==="buffer"&&t.bar2Buffer]}})(Ze(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:t})=>t.variant!=="buffer"&&t.color!=="inherit",style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:t})=>t.variant!=="buffer"&&t.color==="inherit",style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:YF(e,t),transition:`transform .${y_}s linear`}})),{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:{width:"auto"}},{props:({ownerState:t})=>t.variant==="indeterminate"||t.variant==="query",style:mke||{animation:`${b_} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),TZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiLinearProgress"}),{className:o,color:i="primary",value:a,valueBuffer:s,variant:l="indeterminate",...c}=r,u={...r,color:i,variant:l},d=yke(u),f=nr(),p={},m={bar1:{},bar2:{}};if((l==="determinate"||l==="buffer")&&a!==void 0){p["aria-valuenow"]=Math.round(a),p["aria-valuemin"]=0,p["aria-valuemax"]=100;let g=a-100;f&&(g=-g),m.bar1.transform=`translateX(${g}%)`}if(l==="buffer"&&s!==void 0){let g=(s||0)-100;f&&(g=-g),m.bar2.transform=`translateX(${g}%)`}return $.jsxs(vke,{className:de(d.root,o),ownerState:u,role:"progressbar",...p,ref:n,...c,children:[l==="buffer"?$.jsx(bke,{className:d.dashed,ownerState:u}):null,$.jsx(wke,{className:d.bar1,ownerState:u,style:m.bar1}),l==="determinate"?null:$.jsx(xke,{className:d.bar2,ownerState:u,style:m.bar2})]})}),tl=y.createContext({});function Ske(e){return tt("MuiList",e)}ot("MuiList",["root","padding","dense","subheader"]);const Cke=e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e;return rt({root:["root",!n&&"padding",r&&"dense",o&&"subheader"]},Ske,t)},Pke=oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),pl=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiList"}),{children:o,className:i,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=y.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=Cke(f);return $.jsx(tl.Provider,{value:d,children:$.jsxs(Pke,{as:a,className:de(p.root,i),ref:n,ownerState:f,...u,children:[c,o]})})});function Tke(e){return tt("MuiListItem",e)}ot("MuiListItem",["root","container","dense","alignItemsFlexStart","divider","gutters","padding","secondaryAction"]);function Eke(e){return tt("MuiListItemButton",e)}const fg=ot("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]),Oke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]},Ike=e=>{const{alignItems:t,classes:n,dense:r,disabled:o,disableGutters:i,divider:a,selected:s}=e,c=rt({root:["root",r&&"dense",!i&&"gutters",a&&"divider",o&&"disabled",t==="flex-start"&&"alignItemsFlexStart",s&&"selected"]},Eke,n);return{...n,...c}},kke=oe(Ki,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiListItemButton",slot:"Root",overridesResolver:Oke})(Ze(({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${fg.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${fg.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${fg.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${fg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${fg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.dense,style:{paddingTop:4,paddingBottom:4}}]}))),Wf=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemButton"}),{alignItems:o="center",autoFocus:i=!1,component:a="div",children:s,dense:l=!1,disableGutters:c=!1,divider:u=!1,focusVisibleClassName:d,selected:f=!1,className:p,...m}=r,g=y.useContext(tl),v=y.useMemo(()=>({dense:l||g.dense||!1,alignItems:o,disableGutters:c}),[o,g.dense,l,c]),w=y.useRef(null);rs(()=>{i&&w.current&&w.current.focus()},[i]);const x={...r,alignItems:o,dense:v.dense,disableGutters:c,divider:u,selected:f},S=Ike(x),P=Cr(w,n);return $.jsx(tl.Provider,{value:v,children:$.jsx(kke,{ref:P,href:m.href||m.to,component:(m.href||m.to)&&a==="div"?"button":a,focusVisibleClassName:de(S.focusVisible,d),ownerState:x,className:de(S.root,p),...m,classes:S,children:s})})});function Mke(e){return tt("MuiListItemSecondaryAction",e)}ot("MuiListItemSecondaryAction",["root","disableGutters"]);const Ake=e=>{const{disableGutters:t,classes:n}=e;return rt({root:["root",t&&"disableGutters"]},Mke,n)},$ke=oe("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)",variants:[{props:({ownerState:e})=>e.disableGutters,style:{right:0}}]}),EZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemSecondaryAction"}),{className:o,...i}=r,a=y.useContext(tl),s={...r,disableGutters:a.disableGutters},l=Ake(s);return $.jsx($ke,{className:de(l.root,o),ownerState:s,ref:n,...i})});EZ.muiName="ListItemSecondaryAction";const Rke=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.alignItems==="flex-start"&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.hasSecondaryAction&&t.secondaryAction]},_ke=e=>{const{alignItems:t,classes:n,dense:r,disableGutters:o,disablePadding:i,divider:a,hasSecondaryAction:s}=e;return rt({root:["root",r&&"dense",!o&&"gutters",!i&&"padding",a&&"divider",t==="flex-start"&&"alignItemsFlexStart",s&&"secondaryAction"],container:["container"]},Tke,n)},Dke=oe("div",{name:"MuiListItem",slot:"Root",overridesResolver:Rke})(Ze(({theme:e})=>({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left",variants:[{props:({ownerState:t})=>!t.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:t})=>!t.disablePadding&&t.dense,style:{paddingTop:4,paddingBottom:4}},{props:({ownerState:t})=>!t.disablePadding&&!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>!t.disablePadding&&!!t.secondaryAction,style:{paddingRight:48}},{props:({ownerState:t})=>!!t.secondaryAction,style:{[`& > .${fg.root}`]:{paddingRight:48}}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>t.button,style:{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}}}},{props:({ownerState:t})=>t.hasSecondaryAction,style:{paddingRight:48}}]}))),Nke=oe("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"}),ls=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItem"}),{alignItems:o="center",children:i,className:a,component:s,components:l={},componentsProps:c={},ContainerComponent:u="li",ContainerProps:{className:d,...f}={},dense:p=!1,disableGutters:m=!1,disablePadding:g=!1,divider:v=!1,secondaryAction:w,slotProps:x={},slots:S={},...P}=r,T=y.useContext(tl),E=y.useMemo(()=>({dense:p||T.dense||!1,alignItems:o,disableGutters:m}),[o,T.dense,p,m]),O=y.useRef(null),k=y.Children.toArray(i),A=k.length&&qg(k[k.length-1],["ListItemSecondaryAction"]),I={...r,alignItems:o,dense:E.dense,disableGutters:m,disablePadding:g,divider:v,hasSecondaryAction:A},R=_ke(I),N=Cr(O,n),L=S.root||l.Root||Dke,j=x.root||c.root||{},_={className:de(R.root,j.className,a),...P};let D=s||"li";return A?(D=!_.component&&!s?"div":D,u==="li"&&(D==="li"?D="div":_.component==="li"&&(_.component="div")),$.jsx(tl.Provider,{value:E,children:$.jsxs(Nke,{as:u,className:de(R.container,d),ref:N,ownerState:I,...f,children:[$.jsx(L,{...j,...!Hy(L)&&{as:D,ownerState:{...I,...j.ownerState}},..._,children:k}),k.pop()]})})):$.jsx(tl.Provider,{value:E,children:$.jsxs(L,{...j,as:D,ref:N,...!Hy(L)&&{ownerState:{...I,...j.ownerState}},..._,children:[k,w&&$.jsx(EZ,{children:w})]})})});function Lke(e){return tt("MuiListItemAvatar",e)}ot("MuiListItemAvatar",["root","alignItemsFlexStart"]);const Fke=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Lke,n)},jke=oe("div",{name:"MuiListItemAvatar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})({minWidth:56,flexShrink:0,variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}),XF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemAvatar"}),{className:o,...i}=r,a=y.useContext(tl),s={...r,alignItems:a.alignItems},l=Fke(s);return $.jsx(jke,{className:de(l.root,o),ownerState:s,ref:n,...i})});function Bke(e){return tt("MuiListItemIcon",e)}const sU=ot("MuiListItemIcon",["root","alignItemsFlexStart"]),zke=e=>{const{alignItems:t,classes:n}=e;return rt({root:["root",t==="flex-start"&&"alignItemsFlexStart"]},Bke,n)},Vke=oe("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.alignItems==="flex-start"&&t.alignItemsFlexStart]}})(Ze(({theme:e})=>({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex",variants:[{props:{alignItems:"flex-start"},style:{marginTop:8}}]}))),Gi=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemIcon"}),{className:o,...i}=r,a=y.useContext(tl),s={...r,alignItems:a.alignItems},l=zke(s);return $.jsx(Vke,{className:de(l.root,o),ownerState:s,ref:n,...i})});function Hke(e){return tt("MuiListItemText",e)}const Rg=ot("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),Uke=e=>{const{classes:t,inset:n,primary:r,secondary:o,dense:i}=e;return rt({root:["root",n&&"inset",i&&"dense",r&&o&&"multiline"],primary:["primary"],secondary:["secondary"]},Hke,t)},Wke=oe("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Rg.primary}`]:t.primary},{[`& .${Rg.secondary}`]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4,[`.${jT.root}:where(& .${Rg.primary})`]:{display:"block"},[`.${jT.root}:where(& .${Rg.secondary})`]:{display:"block"},variants:[{props:({ownerState:e})=>e.primary&&e.secondary,style:{marginTop:6,marginBottom:6}},{props:({ownerState:e})=>e.inset,style:{paddingLeft:56}}]}),wo=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiListItemText"}),{children:o,className:i,disableTypography:a=!1,inset:s=!1,primary:l,primaryTypographyProps:c,secondary:u,secondaryTypographyProps:d,...f}=r,{dense:p}=y.useContext(tl);let m=l??o,g=u;const v={...r,disableTypography:a,inset:s,primary:!!m,secondary:!!g,dense:p},w=Uke(v);return m!=null&&m.type!==ct&&!a&&(m=$.jsx(ct,{variant:p?"body2":"body1",className:w.primary,component:c!=null&&c.variant?void 0:"span",...c,children:m})),g!=null&&g.type!==ct&&!a&&(g=$.jsx(ct,{variant:"body2",className:w.secondary,color:"textSecondary",...d,children:g})),$.jsxs(Wke,{className:de(w.root,i),ownerState:v,ref:n,...f,children:[m,g]})});function P$(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function lU(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function OZ(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function i0(e,t,n,r,o,i){let a=!1,s=o(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!OZ(s,i)||l)s=o(e,s,n);else return s.focus(),!0}return!1}const kS=y.forwardRef(function(t,n){const{actions:r,autoFocus:o=!1,autoFocusItem:i=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=y.useRef(null),m=y.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});rs(()=>{o&&p.current.focus()},[o]),y.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(S,{direction:P})=>{const T=!p.current.style.width;if(S.clientHeight{const P=p.current,T=S.key;if(S.ctrlKey||S.metaKey||S.altKey){u&&u(S);return}const O=ii(P).activeElement;if(T==="ArrowDown")S.preventDefault(),i0(P,O,c,l,P$);else if(T==="ArrowUp")S.preventDefault(),i0(P,O,c,l,lU);else if(T==="Home")S.preventDefault(),i0(P,null,c,l,P$);else if(T==="End")S.preventDefault(),i0(P,null,c,l,lU);else if(T.length===1){const k=m.current,A=T.toLowerCase(),I=performance.now();k.keys.length>0&&(I-k.lastTime>500?(k.keys=[],k.repeating=!0,k.previousKeyMatched=!0):k.repeating&&A!==k.keys[0]&&(k.repeating=!1)),k.lastTime=I,k.keys.push(A);const R=O&&!k.repeating&&OZ(O,k);k.previousKeyMatched&&(R||i0(P,O,!1,l,P$,k))?S.preventDefault():k.previousKeyMatched=!1}u&&u(S)},v=Cr(p,n);let w=-1;y.Children.forEach(a,(S,P)=>{if(!y.isValidElement(S)){w===P&&(w+=1,w>=a.length&&(w=-1));return}S.props.disabled||(d==="selectedMenu"&&S.props.selected||w===-1)&&(w=P),w===P&&(S.props.disabled||S.props.muiSkipListHighlight||S.type.muiSkipListHighlight)&&(w+=1,w>=a.length&&(w=-1))});const x=y.Children.map(a,(S,P)=>{if(P===w){const T={};return i&&(T.autoFocus=!0),S.props.tabIndex===void 0&&d==="selectedMenu"&&(T.tabIndex=0),y.cloneElement(S,T)}return S});return $.jsx(pl,{role:"menu",ref:v,className:s,onKeyDown:g,tabIndex:o?0:-1,...f,children:x})});function Gke(e){return tt("MuiPopover",e)}ot("MuiPopover",["root","paper"]);function cU(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function uU(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function dU(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function T$(e){return typeof e=="function"?e():e}const qke=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"]},Gke,t)},Kke=oe(Bv,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),IZ=oe(uo,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Yke=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiPopover"}),{action:o,anchorEl:i,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:m,PaperProps:g={},slots:v={},slotProps:w={},transformOrigin:x={vertical:"top",horizontal:"left"},TransitionComponent:S=kf,transitionDuration:P="auto",TransitionProps:{onEntering:T,...E}={},disableScrollLock:O=!1,...k}=r,A=(w==null?void 0:w.paper)??g,I=y.useRef(),R={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,externalPaperSlotProps:A,transformOrigin:x,TransitionComponent:S,transitionDuration:P,TransitionProps:E},N=qke(R),L=y.useCallback(()=>{if(l==="anchorPosition")return s;const re=T$(i),ee=(re&&re.nodeType===1?re:ii(I.current).body).getBoundingClientRect();return{top:ee.top+cU(ee,a.vertical),left:ee.left+uU(ee,a.horizontal)}},[i,a.horizontal,a.vertical,s,l]),j=y.useCallback(re=>({vertical:cU(re,x.vertical),horizontal:uU(re,x.horizontal)}),[x.horizontal,x.vertical]),_=y.useCallback(re=>{const fe={width:re.offsetWidth,height:re.offsetHeight},ee=j(fe);if(l==="none")return{top:null,left:null,transformOrigin:dU(ee)};const ce=L();let me=ce.top-ee.vertical,we=ce.left-ee.horizontal;const ge=me+fe.height,Se=we+fe.width,xe=os(T$(i)),Ie=xe.innerHeight-p,Re=xe.innerWidth-p;if(p!==null&&meIe){const _e=ge-Ie;me-=_e,ee.vertical+=_e}if(p!==null&&weRe){const _e=Se-Re;we-=_e,ee.horizontal+=_e}return{top:`${Math.round(me)}px`,left:`${Math.round(we)}px`,transformOrigin:dU(ee)}},[i,l,L,j,p]),[D,z]=y.useState(m),F=y.useCallback(()=>{const re=I.current;if(!re)return;const fe=_(re);fe.top!==null&&re.style.setProperty("top",fe.top),fe.left!==null&&(re.style.left=fe.left),re.style.transformOrigin=fe.transformOrigin,z(!0)},[_]);y.useEffect(()=>(O&&window.addEventListener("scroll",F),()=>window.removeEventListener("scroll",F)),[i,O,F]);const H=(re,fe)=>{T&&T(re,fe),F()},U=()=>{z(!1)};y.useEffect(()=>{m&&F()}),y.useImperativeHandle(o,()=>m?{updatePosition:()=>{F()}}:null,[m,F]),y.useEffect(()=>{if(!m)return;const re=bS(()=>{F()}),fe=os(i);return fe.addEventListener("resize",re),()=>{re.clear(),fe.removeEventListener("resize",re)}},[i,m,F]);let q=P;P==="auto"&&!S.muiSupportAuto&&(q=void 0);const X=d||(i?ii(T$(i)).body:void 0),ae={slots:v,slotProps:{...w,paper:A}},[Z,K]=hr("paper",{elementType:IZ,externalForwardedProps:ae,additionalProps:{elevation:f,className:de(N.paper,A==null?void 0:A.className),style:D?A.style:{...A.style,opacity:0}},ownerState:R}),[te,{slotProps:pe,...ie}]=hr("root",{elementType:Kke,externalForwardedProps:ae,additionalProps:{slotProps:{backdrop:{invisible:!0}},container:X,open:m},ownerState:R,className:de(N.root,u)}),le=Cr(I,K.ref);return $.jsx(te,{...ie,...!Hy(te)&&{slotProps:pe,disableScrollLock:O},...k,ref:n,children:$.jsx(S,{appear:!0,in:m,onEntering:H,onExited:U,timeout:q,...E,children:$.jsx(Z,{...K,ref:le,children:c})})})});function Xke(e){return tt("MuiMenu",e)}ot("MuiMenu",["root","paper","list"]);const Qke={vertical:"top",horizontal:"right"},Jke={vertical:"top",horizontal:"left"},Zke=e=>{const{classes:t}=e;return rt({root:["root"],paper:["paper"],list:["list"]},Xke,t)},eMe=oe(Yke,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),tMe=oe(IZ,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),nMe=oe(kS,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),ms=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:i,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:m,...g}={},variant:v="selectedMenu",slots:w={},slotProps:x={},...S}=r,P=nr(),T={...r,autoFocus:o,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:p,TransitionProps:g,variant:v},E=Zke(T),O=o&&!s&&u,k=y.useRef(null),A=(D,z)=>{k.current&&k.current.adjustStyleForScrollbar(D,{direction:P?"rtl":"ltr"}),m&&m(D,z)},I=D=>{D.key==="Tab"&&(D.preventDefault(),c&&c(D,"tabKeyDown"))};let R=-1;y.Children.map(i,(D,z)=>{y.isValidElement(D)&&(D.props.disabled||(v==="selectedMenu"&&D.props.selected||R===-1)&&(R=z))});const N=w.paper??tMe,L=x.paper??d,j=Bc({elementType:w.root,externalSlotProps:x.root,ownerState:T,className:[E.root,a]}),_=Bc({elementType:N,externalSlotProps:L,ownerState:T,className:E.paper});return $.jsx(eMe,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:P?"right":"left"},transformOrigin:P?Qke:Jke,slots:{paper:N,root:w.root},slotProps:{root:j,paper:_},open:u,ref:n,transitionDuration:p,TransitionProps:{onEntering:A,...g},ownerState:T,...S,classes:f,children:$.jsx(nMe,{onKeyDown:I,actions:k,autoFocus:o&&(R===-1||s),autoFocusItem:O,variant:v,...l,className:de(E.list,l.className),children:i})})});function rMe(e){return tt("MuiMenuItem",e)}const a0=ot("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),oMe=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},iMe=e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:a}=e,l=rt({root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},rMe,a);return{...a,...l}},aMe=oe(Ki,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:oMe})(Ze(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${a0.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${a0.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${a0.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${a0.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${a0.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${eU.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${eU.inset}`]:{marginLeft:52},[`& .${Rg.root}`]:{marginTop:0,marginBottom:0},[`& .${Rg.inset}`]:{paddingLeft:36},[`& .${sU.root}`]:{minWidth:36},variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:t})=>!t.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:t})=>t.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${sU.root} svg`]:{fontSize:"1.25rem"}}}]}))),Yt=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:a=!1,divider:s=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:f,...p}=r,m=y.useContext(tl),g=y.useMemo(()=>({dense:a||m.dense||!1,disableGutters:l}),[m.dense,a,l]),v=y.useRef(null);rs(()=>{o&&v.current&&v.current.focus()},[o]);const w={...r,dense:g.dense,divider:s,disableGutters:l},x=iMe(r),S=Cr(v,n);let P;return r.disabled||(P=d!==void 0?d:-1),$.jsx(tl.Provider,{value:g,children:$.jsx(aMe,{ref:S,role:u,tabIndex:P,component:i,focusVisibleClassName:de(x.focusVisible,c),className:de(x.root,f),...p,ownerState:w,classes:x})})});function sMe(e){return tt("MuiNativeSelect",e)}const QF=ot("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),lMe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"]};return rt(s,sMe,t)},kZ=oe("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${QF.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),cMe=oe(kZ,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:ci,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${QF.multiple}`]:t.multiple}]}})({}),MZ=oe("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${QF.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),uMe=oe(MZ,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),dMe=y.forwardRef(function(t,n){const{className:r,disabled:o,error:i,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:o,variant:l,error:i},d=lMe(u);return $.jsxs(y.Fragment,{children:[$.jsx(cMe,{ownerState:u,className:de(d.select,r),disabled:o,ref:s||n,...c}),t.multiple?null:$.jsx(uMe,{as:a,ownerState:u,className:d.icon})]})});var fU;const fMe=oe("fieldset",{shouldForwardProp:ci})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),pMe=oe("legend",{shouldForwardProp:ci})(Ze(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function hMe(e){const{children:t,classes:n,className:r,label:o,notched:i,...a}=e,s=o!=null&&o!=="",l={...e,notched:i,withLabel:s};return $.jsx(fMe,{"aria-hidden":!0,className:r,ownerState:l,...a,children:$.jsx(pMe,{ownerState:l,children:s?$.jsx("span",{children:o}):fU||(fU=$.jsx("span",{className:"notranslate",children:"​"}))})})}const mMe=e=>{const{classes:t}=e,r=rt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},RTe,t);return{...t,...r}},gMe=oe(DI,{shouldForwardProp:e=>ci(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:RI})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${_s.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${_s.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${_s.focused} .${_s.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(zn()).map(([n])=>({props:{color:n},style:{[`&.${_s.focused} .${_s.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${_s.error} .${_s.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${_s.disabled} .${_s.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),yMe=oe(hMe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),vMe=oe(NI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:_I})(Ze(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),GT=y.forwardRef(function(t,n){var r;const o=it({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:a=!1,inputComponent:s="input",label:l,multiline:c=!1,notched:u,slots:d={},type:f="text",...p}=o,m=mMe(o),g=Ta(),v=Uf({props:o,muiFormControl:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),w={...o,color:v.color||"primary",disabled:v.disabled,error:v.error,focused:v.focused,formControl:g,fullWidth:a,hiddenLabel:v.hiddenLabel,multiline:c,size:v.size,type:f},x=d.root??i.Root??gMe,S=d.input??i.Input??vMe;return $.jsx(Fv,{slots:{root:x,input:S},renderSuffix:P=>$.jsx(yMe,{ownerState:w,className:m.notchedOutline,label:l!=null&&l!==""&&v.required?r||(r=$.jsxs(y.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(P.startAdornment||P.filled||P.focused)}),fullWidth:a,inputComponent:s,multiline:c,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});GT&&(GT.muiName="Input");function bMe(e){return tt("MuiPagination",e)}ot("MuiPagination",["root","ul","outlined","text"]);function wMe(e={}){const{boundaryCount:t=1,componentName:n="usePagination",count:r=1,defaultPage:o=1,disabled:i=!1,hideNextButton:a=!1,hidePrevButton:s=!1,onChange:l,page:c,showFirstButton:u=!1,showLastButton:d=!1,siblingCount:f=1,...p}=e,[m,g]=ku({controlled:c,default:o,name:n,state:"page"}),v=(A,I)=>{c||g(I),l&&l(A,I)},w=(A,I)=>{const R=I-A+1;return Array.from({length:R},(N,L)=>A+L)},x=w(1,Math.min(t,r)),S=w(Math.max(r-t+1,t+1),r),P=Math.max(Math.min(m-f,r-t-f*2-1),t+2),T=Math.min(Math.max(m+f,t+f*2+2),r-t-1),E=[...u?["first"]:[],...s?[]:["previous"],...x,...P>t+2?["start-ellipsis"]:t+1t?[r-t]:[],...S,...a?[]:["next"],...d?["last"]:[]],O=A=>{switch(A){case"first":return 1;case"previous":return m-1;case"next":return m+1;case"last":return r;default:return null}};return{items:E.map(A=>typeof A=="number"?{onClick:I=>{v(I,A)},type:"page",page:A,selected:A===m,disabled:i,"aria-current":A===m?"true":void 0}:{onClick:I=>{v(I,O(A))},type:A,page:O(A),selected:!1,disabled:i||!A.includes("ellipsis")&&(A==="next"||A==="last"?m>=r:m<=1)}),...p}}function xMe(e){return tt("MuiPaginationItem",e)}const Ri=ot("MuiPaginationItem",["root","page","sizeSmall","sizeLarge","text","textPrimary","textSecondary","outlined","outlinedPrimary","outlinedSecondary","rounded","ellipsis","firstLast","previousNext","focusVisible","disabled","selected","icon","colorPrimary","colorSecondary"]),AZ=lt($.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),$Z=lt($.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),SMe=lt($.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"}),"NavigateBefore"),CMe=lt($.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),RZ=(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.variant==="text"&&t[`text${Ce(n.color)}`],n.variant==="outlined"&&t[`outlined${Ce(n.color)}`],n.shape==="rounded"&&t.rounded,n.type==="page"&&t.page,(n.type==="start-ellipsis"||n.type==="end-ellipsis")&&t.ellipsis,(n.type==="previous"||n.type==="next")&&t.previousNext,(n.type==="first"||n.type==="last")&&t.firstLast]},PMe=e=>{const{classes:t,color:n,disabled:r,selected:o,size:i,shape:a,type:s,variant:l}=e,c={root:["root",`size${Ce(i)}`,l,a,n!=="standard"&&`color${Ce(n)}`,n!=="standard"&&`${l}${Ce(n)}`,r&&"disabled",o&&"selected",{page:"page",first:"firstLast",last:"firstLast","start-ellipsis":"ellipsis","end-ellipsis":"ellipsis",previous:"previousNext",next:"previousNext"}[s]],icon:["icon"]};return rt(c,xMe,t)},TMe=oe("div",{name:"MuiPaginationItem",slot:"Root",overridesResolver:RZ})(Ze(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,height:"auto",[`&.${Ri.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:{size:"small"},style:{minWidth:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}}]}))),EMe=oe(Ki,{name:"MuiPaginationItem",slot:"Root",overridesResolver:RZ})(Ze(({theme:e})=>({...e.typography.body2,borderRadius:32/2,textAlign:"center",boxSizing:"border-box",minWidth:32,height:32,padding:"0 6px",margin:"0 3px",color:(e.vars||e).palette.text.primary,[`&.${Ri.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${Ri.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},transition:e.transitions.create(["color","background-color"],{duration:e.transitions.duration.short}),"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ri.selected}`]:{backgroundColor:(e.vars||e).palette.action.selected,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Ri.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},[`&.${Ri.disabled}`]:{opacity:1,color:(e.vars||e).palette.action.disabled,backgroundColor:(e.vars||e).palette.action.selected}},variants:[{props:{size:"small"},style:{minWidth:26,height:26,borderRadius:26/2,margin:"0 1px",padding:"0 4px"}},{props:{size:"large"},style:{minWidth:40,height:40,borderRadius:40/2,padding:"0 10px",fontSize:e.typography.pxToRem(15)}},{props:{shape:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:{variant:"outlined"},style:{border:e.vars?`1px solid rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:`1px solid ${e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)"}`,[`&.${Ri.selected}`]:{[`&.${Ri.disabled}`]:{borderColor:(e.vars||e).palette.action.disabledBackground,color:(e.vars||e).palette.action.disabled}}}},{props:{variant:"text"},style:{[`&.${Ri.selected}`]:{[`&.${Ri.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}},...Object.entries(e.palette).filter(zn(["dark","contrastText"])).map(([t])=>({props:{variant:"text",color:t},style:{[`&.${Ri.selected}`]:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}},[`&.${Ri.focusVisible}`]:{backgroundColor:(e.vars||e).palette[t].dark},[`&.${Ri.disabled}`]:{color:(e.vars||e).palette.action.disabled}}}})),...Object.entries(e.palette).filter(zn(["light"])).map(([t])=>({props:{variant:"outlined",color:t},style:{[`&.${Ri.selected}`]:{color:(e.vars||e).palette[t].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:mt(e.palette[t].main,.5)}`,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.activatedOpacity})`:mt(e.palette[t].main,e.palette.action.activatedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Ri.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.activatedOpacity} + ${e.vars.palette.action.focusOpacity}))`:mt(e.palette[t].main,e.palette.action.activatedOpacity+e.palette.action.focusOpacity)}}}}))]}))),OMe=oe("div",{name:"MuiPaginationItem",slot:"Icon",overridesResolver:(e,t)=>t.icon})(Ze(({theme:e})=>({fontSize:e.typography.pxToRem(20),margin:"0 -8px",variants:[{props:{size:"small"},style:{fontSize:e.typography.pxToRem(18)}},{props:{size:"large"},style:{fontSize:e.typography.pxToRem(22)}}]}))),IMe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiPaginationItem"}),{className:o,color:i="standard",component:a,components:s={},disabled:l=!1,page:c,selected:u=!1,shape:d="circular",size:f="medium",slots:p={},slotProps:m={},type:g="page",variant:v="text",...w}=r,x={...r,color:i,disabled:l,selected:u,shape:d,size:f,type:g,variant:v},S=nr(),P=PMe(x),T={slots:{previous:p.previous??s.previous,next:p.next??s.next,first:p.first??s.first,last:p.last??s.last},slotProps:m},[E,O]=hr("previous",{elementType:SMe,externalForwardedProps:T,ownerState:x}),[k,A]=hr("next",{elementType:CMe,externalForwardedProps:T,ownerState:x}),[I,R]=hr("first",{elementType:AZ,externalForwardedProps:T,ownerState:x}),[N,L]=hr("last",{elementType:$Z,externalForwardedProps:T,ownerState:x}),j=S?{previous:"next",next:"previous",first:"last",last:"first"}[g]:g,_={previous:E,next:k,first:I,last:N}[j],D={previous:O,next:A,first:R,last:L}[j];return g==="start-ellipsis"||g==="end-ellipsis"?$.jsx(TMe,{ref:n,ownerState:x,className:de(P.root,o),children:"…"}):$.jsxs(EMe,{ref:n,ownerState:x,component:a,disabled:l,className:de(P.root,o),...w,children:[g==="page"&&c,_?$.jsx(OMe,{...D,className:P.icon,as:_}):null]})}),kMe=e=>{const{classes:t,variant:n}=e;return rt({root:["root",n],ul:["ul"]},bMe,t)},MMe=oe("nav",{name:"MuiPagination",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant]]}})({}),AMe=oe("ul",{name:"MuiPagination",slot:"Ul",overridesResolver:(e,t)=>t.ul})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"});function $Me(e,t,n){return e==="page"?`${n?"":"Go to "}page ${t}`:`Go to ${e} page`}const RMe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiPagination"}),{boundaryCount:o=1,className:i,color:a="standard",count:s=1,defaultPage:l=1,disabled:c=!1,getItemAriaLabel:u=$Me,hideNextButton:d=!1,hidePrevButton:f=!1,onChange:p,page:m,renderItem:g=I=>$.jsx(IMe,{...I}),shape:v="circular",showFirstButton:w=!1,showLastButton:x=!1,siblingCount:S=1,size:P="medium",variant:T="text",...E}=r,{items:O}=wMe({...r,componentName:"Pagination"}),k={...r,boundaryCount:o,color:a,count:s,defaultPage:l,disabled:c,getItemAriaLabel:u,hideNextButton:d,hidePrevButton:f,renderItem:g,shape:v,showFirstButton:w,showLastButton:x,siblingCount:S,size:P,variant:T},A=kMe(k);return $.jsx(MMe,{"aria-label":"pagination navigation",className:de(A.root,i),ownerState:k,ref:n,...E,children:$.jsx(AMe,{className:A.ul,ownerState:k,children:O.map((I,R)=>$.jsx("li",{children:g({...I,color:a,"aria-label":u(I.type,I.page,I.selected),shape:v,size:P,variant:T})},R))})})});function _Me(e){return tt("MuiSelect",e)}const s0=ot("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var pU;const DMe=oe(kZ,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${s0.select}`]:t.select},{[`&.${s0.select}`]:t[n.variant]},{[`&.${s0.error}`]:t.error},{[`&.${s0.multiple}`]:t.multiple}]}})({[`&.${s0.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),NMe=oe(MZ,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${Ce(n.variant)}`],n.open&&t.iconOpen]}})({}),LMe=oe("input",{shouldForwardProp:e=>RX(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function hU(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function FMe(e){return e==null||typeof e=="string"&&!e.trim()}const jMe=e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,s={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${Ce(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return rt(s,_Me,t)},BMe=y.forwardRef(function(t,n){var wn;const{"aria-describedby":r,"aria-label":o,autoFocus:i,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:g,labelId:v,MenuProps:w={},multiple:x,name:S,onBlur:P,onChange:T,onClose:E,onFocus:O,onOpen:k,open:A,readOnly:I,renderValue:R,SelectDisplayProps:N={},tabIndex:L,type:j,value:_,variant:D="standard",...z}=t,[F,H]=ku({controlled:_,default:u,name:"Select"}),[U,q]=ku({controlled:A,default:c,name:"Select"}),X=y.useRef(null),ae=y.useRef(null),[Z,K]=y.useState(null),{current:te}=y.useRef(A!=null),[pe,ie]=y.useState(),le=Cr(n,g),re=y.useCallback(Ke=>{ae.current=Ke,Ke&&K(Ke)},[]),fe=Z==null?void 0:Z.parentNode;y.useImperativeHandle(le,()=>({focus:()=>{ae.current.focus()},node:X.current,value:F}),[F]),y.useEffect(()=>{c&&U&&Z&&!te&&(ie(a?null:fe.clientWidth),ae.current.focus())},[Z,a]),y.useEffect(()=>{i&&ae.current.focus()},[i]),y.useEffect(()=>{if(!v)return;const Ke=ii(ae.current).getElementById(v);if(Ke){const $e=()=>{getSelection().isCollapsed&&ae.current.focus()};return Ke.addEventListener("click",$e),()=>{Ke.removeEventListener("click",$e)}}},[v]);const ee=(Ke,$e)=>{Ke?k&&k($e):E&&E($e),te||(ie(a?null:fe.clientWidth),q(Ke))},ce=Ke=>{Ke.button===0&&(Ke.preventDefault(),ae.current.focus(),ee(!0,Ke))},me=Ke=>{ee(!1,Ke)},we=y.Children.toArray(s),ge=Ke=>{const $e=we.find(Xe=>Xe.props.value===Ke.target.value);$e!==void 0&&(H($e.props.value),T&&T(Ke,$e))},Se=Ke=>$e=>{let Xe;if($e.currentTarget.hasAttribute("tabindex")){if(x){Xe=Array.isArray(F)?F.slice():[];const bt=F.indexOf(Ke.props.value);bt===-1?Xe.push(Ke.props.value):Xe.splice(bt,1)}else Xe=Ke.props.value;if(Ke.props.onClick&&Ke.props.onClick($e),F!==Xe&&(H(Xe),T)){const bt=$e.nativeEvent||$e,Vt=new bt.constructor(bt.type,bt);Object.defineProperty(Vt,"target",{writable:!0,value:{value:Xe,name:S}}),T(Vt,Ke)}x||ee(!1,$e)}},xe=Ke=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(Ke.key)&&(Ke.preventDefault(),ee(!0,Ke))},Ie=Z!==null&&U,Re=Ke=>{!Ie&&P&&(Object.defineProperty(Ke,"target",{writable:!0,value:{value:F,name:S}}),P(Ke))};delete z["aria-invalid"];let _e,ye;const Te=[];let Oe=!1;(VT({value:F})||f)&&(R?_e=R(F):Oe=!0);const Me=we.map(Ke=>{if(!y.isValidElement(Ke))return null;let $e;if(x){if(!Array.isArray(F))throw new Error(Bu(2));$e=F.some(Xe=>hU(Xe,Ke.props.value)),$e&&Oe&&Te.push(Ke.props.children)}else $e=hU(F,Ke.props.value),$e&&Oe&&(ye=Ke.props.children);return y.cloneElement(Ke,{"aria-selected":$e?"true":"false",onClick:Se(Ke),onKeyUp:Xe=>{Xe.key===" "&&Xe.preventDefault(),Ke.props.onKeyUp&&Ke.props.onKeyUp(Xe)},role:"option",selected:$e,value:void 0,"data-value":Ke.props.value})});Oe&&(x?Te.length===0?_e=null:_e=Te.reduce((Ke,$e,Xe)=>(Ke.push($e),Xe{const{classes:t}=e;return t},JF={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>ci(e)&&e!=="variant",slot:"Root"},VMe=oe(WT,JF)(""),HMe=oe(GT,JF)(""),UMe=oe(UT,JF)(""),Gf=y.forwardRef(function(t,n){const r=it({name:"MuiSelect",props:t}),{autoWidth:o=!1,children:i,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=cZ,id:d,input:f,inputProps:p,label:m,labelId:g,MenuProps:v,multiple:w=!1,native:x=!1,onClose:S,onOpen:P,open:T,renderValue:E,SelectDisplayProps:O,variant:k="outlined",...A}=r,I=x?dMe:BMe,R=Ta(),N=Uf({props:r,muiFormControl:R,states:["variant","error"]}),L=N.variant||k,j={...r,variant:L,classes:a},_=zMe(j),{root:D,...z}=_,F=f||{standard:$.jsx(VMe,{ownerState:j}),outlined:$.jsx(HMe,{label:m,ownerState:j}),filled:$.jsx(UMe,{ownerState:j})}[L],H=Cr(n,Lf(F));return $.jsx(y.Fragment,{children:y.cloneElement(F,{inputComponent:I,inputProps:{children:i,error:N.error,IconComponent:u,variant:L,type:void 0,multiple:w,...x?{id:d}:{autoWidth:o,defaultOpen:l,displayEmpty:c,labelId:g,MenuProps:v,onClose:S,onOpen:P,open:T,renderValue:E,SelectDisplayProps:{id:d,...O}},...p,classes:p?bo(z,p.classes):z,...f?f.props.inputProps:{}},...(w&&x||c)&&L==="outlined"?{notched:!0}:{},ref:H,className:de(F.props.className,s,_.root),...!f&&{variant:L},...A})})});Gf.muiName="Select";function WMe(e){return tt("MuiSkeleton",e)}ot("MuiSkeleton",["root","text","rectangular","rounded","circular","pulse","wave","withChildren","fitContent","heightAuto"]);const GMe=e=>{const{classes:t,variant:n,animation:r,hasChildren:o,width:i,height:a}=e;return rt({root:["root",n,r,o&&"withChildren",o&&!i&&"fitContent",o&&!a&&"heightAuto"]},WMe,t)},x_=qc` 0% { opacity: 1; } @@ -257,7 +257,7 @@ Error generating stack: `+i.message+` 100% { opacity: 1; } -`,f_=Uc` +`,S_=qc` 0% { transform: translateX(-100%); } @@ -270,69 +270,69 @@ Error generating stack: `+i.message+` 100% { transform: translateX(100%); } -`,AMe=typeof d_!="string"?Af` - animation: ${d_} 2s ease-in-out 0.5s infinite; - `:null,$Me=typeof f_!="string"?Af` +`,qMe=typeof x_!="string"?Nf` + animation: ${x_} 2s ease-in-out 0.5s infinite; + `:null,KMe=typeof S_!="string"?Nf` &::after { - animation: ${f_} 2s linear 0.5s infinite; + animation: ${S_} 2s linear 0.5s infinite; } - `:null,RMe=oe("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(Ze(({theme:e})=>{const t=Mwe(e.shape.borderRadius)||"px",n=Awe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:mt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:AMe||{animation:`${d_} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( + `:null,YMe=oe("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(Ze(({theme:e})=>{const t=Gwe(e.shape.borderRadius)||"px",n=qwe(e.shape.borderRadius);return{display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:mt(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em",variants:[{props:{variant:"text"},style:{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${n}${t}/${Math.round(n/.6*10)/10}${t}`,"&:empty:before":{content:'"\\00a0"'}}},{props:{variant:"circular"},style:{borderRadius:"50%"}},{props:{variant:"rounded"},style:{borderRadius:(e.vars||e).shape.borderRadius}},{props:({ownerState:r})=>r.hasChildren,style:{"& > *":{visibility:"hidden"}}},{props:({ownerState:r})=>r.hasChildren&&!r.width,style:{maxWidth:"fit-content"}},{props:({ownerState:r})=>r.hasChildren&&!r.height,style:{height:"auto"}},{props:{animation:"pulse"},style:qMe||{animation:`${x_} 2s ease-in-out 0.5s infinite`}},{props:{animation:"wave"},style:{position:"relative",overflow:"hidden",WebkitMaskImage:"-webkit-radial-gradient(white, black)","&::after":{background:`linear-gradient( 90deg, transparent, ${(e.vars||e).palette.action.hover}, transparent - )`,content:'""',position:"absolute",transform:"translateX(-100%)",bottom:0,left:0,right:0,top:0}}},{props:{animation:"wave"},style:$Me||{"&::after":{animation:`${f_} 2s linear 0.5s infinite`}}}]}})),kP=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:s,style:l,variant:c="text",width:u,...d}=r,f={...r,animation:o,component:a,variant:c,hasChildren:!!d.children},h=MMe(f);return $.jsx(RMe,{as:a,ref:n,className:fe(h.root,i),ownerState:f,...d,style:{width:u,height:s,...l}})});function _Me(e={}){const{autoHideDuration:t=null,disableWindowBlurListener:n=!1,onClose:r,open:o,resumeHideDuration:i}=e,a=Zd();y.useEffect(()=>{if(!o)return;function w(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=Wo((w,x)=>{r==null||r(w,x)}),l=Wo(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});y.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,d=y.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=w=>x=>{const S=w.onBlur;S==null||S(x),d()},h=w=>x=>{const S=w.onFocus;S==null||S(x),u()},m=w=>x=>{const S=w.onMouseEnter;S==null||S(x),u()},g=w=>x=>{const S=w.onMouseLeave;S==null||S(x),d()};return y.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,o,d,u]),{getRootProps:(w={})=>{const x={...QP(e),...QP(w)};return{role:"presentation",...w,...x,onBlur:f(x),onFocus:h(x),onMouseEnter:m(x),onMouseLeave:g(x)}},onClickAway:c}}function DMe(e){return tt("MuiSnackbarContent",e)}ot("MuiSnackbarContent",["root","message","action"]);const NMe=e=>{const{classes:t}=e;return rt({root:["root"],action:["action"],message:["message"]},DMe,t)},LMe=oe(co,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=tX(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),FMe=oe("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),jMe=oe("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),BMe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=NMe(c);return $.jsxs(LMe,{role:s,square:!0,elevation:6,className:fe(u.root,i),ownerState:c,ref:n,...l,children:[$.jsx(FMe,{className:u.message,ownerState:c,children:a}),o?$.jsx(jMe,{className:u.action,ownerState:c,children:o}):null]})});function zMe(e){return tt("MuiSnackbar",e)}ot("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const VMe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`]};return rt(r,zMe,t)},a3=oe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}`]]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),CZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbar"}),o=Ei(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:h,disableWindowBlurListener:m=!1,message:g,onBlur:v,onClose:w,onFocus:x,onMouseEnter:S,onMouseLeave:P,open:T,resumeHideDuration:E,TransitionComponent:O=Tf,transitionDuration:k=i,TransitionProps:{onEnter:A,onExited:I,...R}={},...N}=r,L={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:m,TransitionComponent:O,transitionDuration:k},B=VMe(L),{getRootProps:_,onClickAway:D}=_Me({...L}),[z,F]=y.useState(!0),H=Lc({elementType:a3,getSlotProps:_,externalForwardedProps:N,ownerState:L,additionalProps:{ref:n},className:[B.root,d]}),U=Y=>{F(!0),I&&I(Y)},q=(Y,ae)=>{F(!1),A&&A(Y,ae)};return!T&&z?null:$.jsx(NF,{onClickAway:D,...f,children:$.jsx(a3,{...H,children:$.jsx(O,{appear:!0,in:T,timeout:k,direction:s==="top"?"down":"up",onEnter:q,onExited:U,...R,children:u||$.jsx(BMe,{message:g,action:a,...h})})})})});function HMe(e){return tt("MuiTooltip",e)}const Br=ot("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function UMe(e){return Math.round(e*1e5)/1e5}const WMe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ce(i.split("-")[0])}`],arrow:["arrow"]};return rt(a,HMe,t)},GMe=oe(Ff,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${Br.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${Br.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${Br.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${Br.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Br.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${Br.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Br.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${Br.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),qMe=oe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ce(n.placement.split("-")[0])}`]]}})(Ze(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:mt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${Br.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${Br.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${Br.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${Br.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${UMe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${Br.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${Br.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${Br.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${Br.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${Br.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${Br.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${Br.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${Br.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Br.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${Br.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),KMe=oe("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Ze(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:mt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let OC=!1;const s3=new rX;let Zb={x:0,y:0};function IC(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const nc=y.forwardRef(function(t,n){var qr,Ii,gs;const r=it({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:h=!1,enterDelay:m=100,enterNextDelay:g=0,enterTouchDelay:v=700,followCursor:w=!1,id:x,leaveDelay:S=0,leaveTouchDelay:P=1500,onClose:T,onOpen:E,open:O,placement:k="bottom",PopperComponent:A,PopperProps:I={},slotProps:R={},slots:N={},title:L,TransitionComponent:B=Tf,TransitionProps:_,...D}=r,z=y.isValidElement(i)?i:$.jsx("span",{children:i}),F=Ei(),H=nr(),[U,q]=y.useState(),[Y,ae]=y.useState(null),Z=y.useRef(!1),K=f||w,te=Zd(),pe=Zd(),ie=Zd(),le=Zd(),[re,de]=Ou({controlled:O,default:!1,name:"Tooltip",state:"open"});let ee=re;const ce=dh(x),me=y.useRef(),we=Wo(()=>{me.current!==void 0&&(document.body.style.WebkitUserSelect=me.current,me.current=void 0),le.clear()});y.useEffect(()=>we,[we]);const ge=Ut=>{s3.clear(),OC=!0,de(!0),E&&!ee&&E(Ut)},Se=Wo(Ut=>{s3.start(800+S,()=>{OC=!1}),de(!1),T&&ee&&T(Ut),te.start(F.transitions.duration.shortest,()=>{Z.current=!1})}),xe=Ut=>{Z.current&&Ut.type!=="touchstart"||(U&&U.removeAttribute("title"),pe.clear(),ie.clear(),m||OC&&g?pe.start(OC?g:m,()=>{ge(Ut)}):ge(Ut))},Ie=Ut=>{pe.clear(),ie.start(S,()=>{Se(Ut)})},[,Re]=y.useState(!1),_e=Ut=>{XP(Ut.target)||(Re(!1),Ie(Ut))},ye=Ut=>{U||q(Ut.currentTarget),XP(Ut.target)&&(Re(!0),xe(Ut))},Te=Ut=>{Z.current=!0;const Yo=z.props;Yo.onTouchStart&&Yo.onTouchStart(Ut)},Oe=Ut=>{Te(Ut),ie.clear(),te.clear(),we(),me.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",le.start(v,()=>{document.body.style.WebkitUserSelect=me.current,xe(Ut)})},Me=Ut=>{z.props.onTouchEnd&&z.props.onTouchEnd(Ut),we(),ie.start(P,()=>{Se(Ut)})};y.useEffect(()=>{if(!ee)return;function Ut(Yo){Yo.key==="Escape"&&Se(Yo)}return document.addEventListener("keydown",Ut),()=>{document.removeEventListener("keydown",Ut)}},[Se,ee]);const Ue=Cr($f(z),q,n);!L&&L!==0&&(ee=!1);const ze=y.useRef(),Qe=Ut=>{const Yo=z.props;Yo.onMouseMove&&Yo.onMouseMove(Ut),Zb={x:Ut.clientX,y:Ut.clientY},ze.current&&ze.current.update()},ct={},nt=typeof L=="string";c?(ct.title=!ee&&nt&&!d?L:null,ct["aria-describedby"]=ee?ce:null):(ct["aria-label"]=nt?L:null,ct["aria-labelledby"]=ee&&!nt?ce:null);const et={...ct,...D,...z.props,className:fe(D.className,z.props.className),onTouchStart:Te,ref:Ue,...w?{onMouseMove:Qe}:{}},yt={};h||(et.onTouchStart=Oe,et.onTouchEnd=Me),d||(et.onMouseOver=IC(xe,et.onMouseOver),et.onMouseLeave=IC(Ie,et.onMouseLeave),K||(yt.onMouseOver=xe,yt.onMouseLeave=Ie)),u||(et.onFocus=IC(ye,et.onFocus),et.onBlur=IC(_e,et.onBlur),K||(yt.onFocus=ye,yt.onBlur=_e));const vn=y.useMemo(()=>{var Yo;let Ut=[{name:"arrow",enabled:!!Y,options:{element:Y,padding:4}}];return(Yo=I.popperOptions)!=null&&Yo.modifiers&&(Ut=Ut.concat(I.popperOptions.modifiers)),{...I.popperOptions,modifiers:Ut}},[Y,I]),Ke={...r,isRtl:H,arrow:o,disableInteractive:K,placement:k,PopperComponentProp:A,touch:Z.current},$e=WMe(Ke),Xe=N.popper??s.Popper??GMe,bt=N.transition??s.Transition??B??Tf,zt=N.tooltip??s.Tooltip??qMe,Ot=N.arrow??s.Arrow??KMe,cn=ug(Xe,{...I,...R.popper??l.popper,className:fe($e.popper,I==null?void 0:I.className,(qr=R.popper??l.popper)==null?void 0:qr.className)},Ke),Fn=ug(bt,{..._,...R.transition??l.transition},Ke),Un=ug(zt,{...R.tooltip??l.tooltip,className:fe($e.tooltip,(Ii=R.tooltip??l.tooltip)==null?void 0:Ii.className)},Ke),Po=ug(Ot,{...R.arrow??l.arrow,className:fe($e.arrow,(gs=R.arrow??l.arrow)==null?void 0:gs.className)},Ke);return $.jsxs(y.Fragment,{children:[y.cloneElement(z,et),$.jsx(Xe,{as:A??Ff,placement:k,anchorEl:w?{getBoundingClientRect:()=>({top:Zb.y,left:Zb.x,right:Zb.x,bottom:Zb.y,width:0,height:0})}:U,popperRef:ze,open:U?ee:!1,id:ce,transition:!0,...yt,...cn,popperOptions:vn,children:({TransitionProps:Ut})=>$.jsx(bt,{timeout:F.transitions.duration.shorter,...Ut,...Fn,children:$.jsxs(zt,{...Un,children:[L,o?$.jsx(Ot,{...Po,ref:ae}):null]})})})]})}),Kt=ewe({createStyledComponent:oe("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>it({props:e,name:"MuiStack"})}),SS=y.createContext({}),OI=y.createContext({});function YMe(e){return tt("MuiStep",e)}ot("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const XMe=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return rt({root:["root",n,r&&"alternativeLabel",o&&"completed"]},YMe,t)},QMe=oe("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Nm=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:f,...h}=r,{activeStep:m,connector:g,alternativeLabel:v,orientation:w,nonLinear:x}=y.useContext(SS);let[S=!1,P=!1,T=!1]=[o,l,c];m===d?S=o!==void 0?o:!0:!x&&m>d?P=l!==void 0?l:!0:!x&&m({index:d,last:f,expanded:u,icon:d+1,active:S,completed:P,disabled:T}),[d,f,u,S,P,T]),O={...r,active:S,orientation:w,alternativeLabel:v,completed:P,disabled:T,expanded:u,component:s},k=XMe(O),A=$.jsxs(QMe,{as:s,className:fe(k.root,a),ref:n,ownerState:O,...h,children:[g&&v&&d!==0?g:null,i]});return $.jsx(OI.Provider,{value:E,children:g&&!v&&d!==0?$.jsxs(y.Fragment,{children:[g,A]}):A})}),JMe=st($.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),ZMe=st($.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function eAe(e){return tt("MuiStepIcon",e)}const g$=ot("MuiStepIcon",["root","active","completed","error","text"]);var l3;const tAe=e=>{const{classes:t,active:n,completed:r,error:o}=e;return rt({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},eAe,t)},y$=oe(Mw,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${g$.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${g$.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${g$.error}`]:{color:(e.vars||e).palette.error.main}}))),nAe=oe("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(Ze(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),rAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},d=tAe(u);if(typeof l=="number"||typeof l=="string"){const f=fe(i,d.root);return s?$.jsx(y$,{as:ZMe,className:f,ref:n,ownerState:u,...c}):a?$.jsx(y$,{as:JMe,className:f,ref:n,ownerState:u,...c}):$.jsxs(y$,{className:f,ref:n,ownerState:u,...c,children:[l3||(l3=$.jsx("circle",{cx:"12",cy:"12",r:"12"})),$.jsx(nAe,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function oAe(e){return tt("MuiStepLabel",e)}const nf=ot("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),iAe=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return rt({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},oAe,t)},aAe=oe("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${nf.alternativeLabel}`]:{flexDirection:"column"},[`&.${nf.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),sAe=oe("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(Ze(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${nf.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${nf.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${nf.alternativeLabel}`]:{marginTop:16},[`&.${nf.error}`]:{color:(e.vars||e).palette.error.main}}))),lAe=oe("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${nf.alternativeLabel}`]:{paddingRight:0}}),cAe=oe("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(Ze(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${nf.alternativeLabel}`]:{textAlign:"center"}}))),_d=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:d={},StepIconComponent:f,StepIconProps:h,...m}=r,{alternativeLabel:g,orientation:v}=y.useContext(SS),{active:w,disabled:x,completed:S,icon:P}=y.useContext(OI),T=l||P;let E=f;T&&!E&&(E=rAe);const O={...r,active:w,alternativeLabel:g,completed:S,disabled:x,error:s,orientation:v},k=iAe(O),A={slots:u,slotProps:{stepIcon:h,...a,...d}},[I,R]=hr("label",{elementType:sAe,externalForwardedProps:A,ownerState:O}),[N,L]=hr("stepIcon",{elementType:E,externalForwardedProps:A,ownerState:O});return $.jsxs(aAe,{className:fe(k.root,i),ref:n,ownerState:O,...m,children:[T||N?$.jsx(lAe,{className:k.iconContainer,ownerState:O,children:$.jsx(N,{completed:S,active:w,error:s,icon:T,...L})}):null,$.jsxs(cAe,{className:k.labelContainer,ownerState:O,children:[o?$.jsx(I,{...R,className:fe(k.label,R==null?void 0:R.className),children:o}):null,c]})]})});_d&&(_d.muiName="StepLabel");function uAe(e){return tt("MuiStepConnector",e)}ot("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const dAe=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Ce(n)}`]};return rt(s,uAe,t)},fAe=oe("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),pAe=oe("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Ce(n.orientation)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),hAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=y.useContext(SS),{active:l,disabled:c,completed:u}=y.useContext(OI),d={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},f=dAe(d);return $.jsx(fAe,{className:fe(f.root,o),ref:n,ownerState:d,...i,children:$.jsx(pAe,{className:f.line,ownerState:d})})});function mAe(e){return tt("MuiStepContent",e)}ot("MuiStepContent",["root","last","transition"]);const gAe=e=>{const{classes:t,last:n}=e;return rt({root:["root",n&&"last"],transition:["transition"]},mAe,t)},yAe=oe("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(Ze(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),vAe=oe(Zs,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Lm=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=Zs,transitionDuration:s="auto",TransitionProps:l,...c}=r;y.useContext(SS);const{active:u,last:d,expanded:f}=y.useContext(OI),h={...r,last:d},m=gAe(h);let g=s;return s==="auto"&&!a.muiSupportAuto&&(g=void 0),$.jsx(yAe,{className:fe(m.root,i),ref:n,ownerState:h,...c,children:$.jsx(vAe,{as:a,in:u||f,className:m.transition,ownerState:h,timeout:g,unmountOnExit:!0,...l,children:o})})});function bAe(e){return tt("MuiStepper",e)}ot("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const wAe=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return rt({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},bAe,o)},xAe=oe("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),SAe=$.jsx(hAe,{}),CAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=SAe,nonLinear:u=!1,orientation:d="horizontal",...f}=r,h={...r,nonLinear:u,alternativeLabel:i,orientation:d,component:l},m=wAe(h),g=y.Children.toArray(a).filter(Boolean),v=g.map((x,S)=>y.cloneElement(x,{index:S,last:S+1===g.length,...x.props})),w=y.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:d}),[o,i,c,u,d]);return $.jsx(SS.Provider,{value:w,children:$.jsx(xAe,{as:l,ownerState:h,className:fe(m.root,s),ref:n,...f,children:v})})});function PAe(e){return tt("MuiSwitch",e)}const _i=ot("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),TAe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Ce(n)}`,`size${Ce(r)}`],switchBase:["switchBase",`color${Ce(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=rt(s,PAe,t);return{...t,...l}},EAe=oe("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${_i.thumb}`]:{width:16,height:16},[`& .${_i.switchBase}`]:{padding:4,[`&.${_i.checked}`]:{transform:"translateX(16px)"}}}}]}),OAe=oe(rZ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${_i.input}`]:t.input},n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${_i.checked}`]:{transform:"translateX(20px)"},[`&.${_i.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${_i.checked} + .${_i.track}`]:{opacity:.5},[`&.${_i.disabled} + .${_i.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${_i.input}`]:{left:"-100%",width:"300%"}})),Ze(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(Bn(["light"])).map(([t])=>({props:{color:t},style:{[`&.${_i.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_i.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Bu(e.palette[t].main,.62):ju(e.palette[t].main,.55)}`}},[`&.${_i.checked} + .${_i.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),IAe=oe("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(Ze(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),kAe=oe("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(Ze(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),Vf=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,...c}=r,u={...r,color:i,edge:a,size:s},d=TAe(u),f=$.jsx(kAe,{className:d.thumb,ownerState:u});return $.jsxs(EAe,{className:fe(d.root,o),sx:l,ownerState:u,children:[$.jsx(OAe,{type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u,...c,classes:{...d,root:d.switchBase}}),$.jsx(IAe,{className:d.track,ownerState:u})]})});function MAe(e){return tt("MuiTab",e)}const Es=ot("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),AAe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Ce(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return rt(c,MAe,t)},$Ae=oe(Ki,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ce(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Es.iconWrapper}`]:t.iconWrapper},{[`& .${Es.icon}`]:t.icon}]}})(Ze(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Es.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Es.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Es.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Es.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Es.selected}`]:{opacity:1},[`&.${Es.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Es.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Es.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Es.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Es.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),c3=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:f,onClick:h,onFocus:m,selected:g,selectionFollowsFocus:v,textColor:w="inherit",value:x,wrapped:S=!1,...P}=r,T={...r,disabled:i,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:w,wrapped:S},E=AAe(T),O=l&&d&&y.isValidElement(l)?y.cloneElement(l,{className:fe(E.icon,l.props.className)}):l,k=I=>{!g&&f&&f(I,x),h&&h(I)},A=I=>{v&&!g&&f&&f(I,x),m&&m(I)};return $.jsxs($Ae,{focusRipple:!a,className:fe(E.root,o),ref:n,role:"tab","aria-selected":g,disabled:i,onClick:k,onFocus:A,ownerState:T,tabIndex:g?0:-1,...P,children:[c==="top"||c==="start"?$.jsxs(y.Fragment,{children:[O,d]}):$.jsxs(y.Fragment,{children:[d,O]}),u]})}),PZ=y.createContext();function RAe(e){return tt("MuiTable",e)}ot("MuiTable",["root","stickyHeader"]);const _Ae=e=>{const{classes:t,stickyHeader:n}=e;return rt({root:["root",n&&"stickyHeader"]},RAe,t)},DAe=oe("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Ze(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),u3="table",Ku=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTable"}),{className:o,component:i=u3,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=_Ae(u),f=y.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return $.jsx(PZ.Provider,{value:f,children:$.jsx(DAe,{as:i,role:i===u3?null:"table",ref:n,className:fe(d.root,o),ownerState:u,...c})})}),II=y.createContext();function NAe(e){return tt("MuiTableBody",e)}ot("MuiTableBody",["root"]);const LAe=e=>{const{classes:t}=e;return rt({root:["root"]},NAe,t)},FAe=oe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),jAe={variant:"body"},d3="tbody",Yu=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableBody"}),{className:o,component:i=d3,...a}=r,s={...r,component:i},l=LAe(s);return $.jsx(II.Provider,{value:jAe,children:$.jsx(FAe,{className:fe(l.root,o),as:i,ref:n,role:i===d3?null:"rowgroup",ownerState:s,...a})})});function BAe(e){return tt("MuiTableCell",e)}const zAe=ot("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),VAe=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Ce(r)}`,o!=="normal"&&`padding${Ce(o)}`,`size${Ce(i)}`]};return rt(s,BAe,t)},HAe=oe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.padding!=="normal"&&t[`padding${Ce(n.padding)}`],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Ze(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid - ${e.palette.mode==="light"?Bu(mt(e.palette.divider,1),.88):ju(mt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${zAe.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),ke=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,h=y.useContext(PZ),m=y.useContext(II),g=m&&m.variant==="head";let v;a?v=a:v=g?"th":"td";let w=l;v==="td"?w=void 0:!w&&g&&(w="col");const x=d||m&&m.variant,S={...r,align:o,component:v,padding:s||(h&&h.padding?h.padding:"normal"),size:c||(h&&h.size?h.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&h&&h.stickyHeader,variant:x},P=VAe(S);let T=null;return u&&(T=u==="asc"?"ascending":"descending"),$.jsx(HAe,{as:v,ref:n,className:fe(P.root,i),"aria-sort":T,scope:w,ownerState:S,...f})});function UAe(e){return tt("MuiTableContainer",e)}ot("MuiTableContainer",["root"]);const WAe=e=>{const{classes:t}=e;return rt({root:["root"]},UAe,t)},GAe=oe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Xu=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=WAe(s);return $.jsx(GAe,{ref:n,as:i,className:fe(l.root,o),ownerState:s,...a})});function qAe(e){return tt("MuiTableHead",e)}ot("MuiTableHead",["root"]);const KAe=e=>{const{classes:t}=e;return rt({root:["root"]},qAe,t)},YAe=oe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),XAe={variant:"head"},f3="thead",Bh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableHead"}),{className:o,component:i=f3,...a}=r,s={...r,component:i},l=KAe(s);return $.jsx(II.Provider,{value:XAe,children:$.jsx(YAe,{as:i,className:fe(l.root,o),ref:n,role:i===f3?null:"rowgroup",ownerState:s,...a})})});function QAe(e){return tt("MuiToolbar",e)}ot("MuiToolbar",["root","gutters","regular","dense"]);const JAe=e=>{const{classes:t,disableGutters:n,variant:r}=e;return rt({root:["root",!n&&"gutters",r]},QAe,t)},ZAe=oe("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ze(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),TZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=JAe(c);return $.jsx(ZAe,{as:i,className:fe(u.root,o),ref:n,ownerState:c,...l})}),EZ=st($.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),OZ=st($.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),e$e=y.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:d,showLastButton:f,slots:h={},slotProps:m={},...g}=t,v=nr(),w=q=>{l(q,0)},x=q=>{l(q,c-1)},S=q=>{l(q,c+1)},P=q=>{l(q,Math.max(0,Math.ceil(o/u)-1))},T=h.firstButton??kn,E=h.lastButton??kn,O=h.nextButton??kn,k=h.previousButton??kn,A=h.firstButtonIcon??wZ,I=h.lastButtonIcon??xZ,R=h.nextButtonIcon??OZ,N=h.previousButtonIcon??EZ,L=v?E:T,B=v?O:k,_=v?k:O,D=v?T:E,z=v?m.lastButton:m.firstButton,F=v?m.nextButton:m.previousButton,H=v?m.previousButton:m.nextButton,U=v?m.firstButton:m.lastButton;return $.jsxs("div",{ref:n,...g,children:[d&&$.jsx(L,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...z,children:v?$.jsx(I,{...m.lastButtonIcon}):$.jsx(A,{...m.firstButtonIcon})}),$.jsx(B,{onClick:x,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...F??r,children:v?$.jsx(R,{...m.nextButtonIcon}):$.jsx(N,{...m.previousButtonIcon})}),$.jsx(_,{onClick:S,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...H??s,children:v?$.jsx(N,{...m.previousButtonIcon}):$.jsx(R,{...m.nextButtonIcon})}),f&&$.jsx(D,{onClick:P,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...U,children:v?$.jsx(A,{...m.firstButtonIcon}):$.jsx(I,{...m.lastButtonIcon})})]})});function t$e(e){return tt("MuiTablePagination",e)}const eh=ot("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var p3;const n$e=oe(ke,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),r$e=oe(TZ,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${eh.actions}`]:t.actions,...t.toolbar})})(Ze(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${eh.actions}`]:{flexShrink:0,marginLeft:20}}))),o$e=oe("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),i$e=oe("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(Ze(({theme:e})=>({...e.typography.body2,flexShrink:0}))),a$e=oe(zf,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${eh.selectIcon}`]:t.selectIcon,[`& .${eh.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${eh.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),s$e=oe(Yt,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),l$e=oe("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(Ze(({theme:e})=>({...e.typography.body2,flexShrink:0})));function c$e({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function u$e(e){return`Go to ${e} page`}const d$e=e=>{const{classes:t}=e;return rt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},t$e,t)},VF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=e$e,backIconButtonProps:i,className:a,colSpan:s,component:l=ke,count:c,disabled:u=!1,getItemAriaLabel:d=u$e,labelDisplayedRows:f=c$e,labelRowsPerPage:h="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:v,page:w,rowsPerPage:x,rowsPerPageOptions:S=[10,25,50,100],SelectProps:P={},showFirstButton:T=!1,showLastButton:E=!1,slotProps:O={},slots:k={},...A}=r,I=r,R=d$e(I),N=(O==null?void 0:O.select)??P,L=N.native?"option":s$e;let B;(l===ke||l==="td")&&(B=s||1e3);const _=dh(N.id),D=dh(N.labelId),z=()=>c===-1?(w+1)*x:x===-1?c:Math.min(c,(w+1)*x);return $.jsx(n$e,{colSpan:B,ref:n,as:l,ownerState:I,className:fe(R.root,a),...A,children:$.jsxs(r$e,{className:R.toolbar,children:[$.jsx(o$e,{className:R.spacer}),S.length>1&&$.jsx(i$e,{className:R.selectLabel,id:D,children:h}),S.length>1&&$.jsx(a$e,{variant:"standard",...!N.variant&&{input:p3||(p3=$.jsx(Ov,{}))},value:x,onChange:v,id:_,labelId:D,...N,classes:{...N.classes,root:fe(R.input,R.selectRoot,(N.classes||{}).root),select:fe(R.select,(N.classes||{}).select),icon:fe(R.selectIcon,(N.classes||{}).icon)},disabled:u,children:S.map(F=>y.createElement(L,{...!_y(L)&&{ownerState:I},className:R.menuItem,key:F.label?F.label:F,value:F.value?F.value:F},F.label?F.label:F))}),$.jsx(l$e,{className:R.displayedRows,children:f({from:c===0?0:w*x+1,to:z(),count:c===-1?-1:c,page:w})}),$.jsx(o,{className:R.actions,backIconButtonProps:i,count:c,nextIconButtonProps:m,onPageChange:g,page:w,rowsPerPage:x,showFirstButton:T,showLastButton:E,slotProps:O.actions,slots:k.actions,getItemAriaLabel:d,disabled:u})]})})});function f$e(e){return tt("MuiTableRow",e)}const h3=ot("MuiTableRow",["root","selected","hover","head","footer"]),p$e=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return rt({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},f$e,t)},h$e=oe("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Ze(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${h3.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${h3.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),m3="tr",Qt=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableRow"}),{className:o,component:i=m3,hover:a=!1,selected:s=!1,...l}=r,c=y.useContext(II),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},d=p$e(u);return $.jsx(h$e,{as:i,ref:n,className:fe(d.root,o),role:i===m3?null:"row",ownerState:u,...l})});function m$e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function g$e(e,t,n,r={},o=()=>{}){const{ease:i=m$e,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=f=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=f);const h=Math.min(1,(f-s)/a);if(t[e]=i(h)*(n-l)+l,h>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const y$e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function v$e(e){const{onChange:t,...n}=e,r=y.useRef(),o=y.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return ns(()=>{const a=dS(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=rs(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),y.useEffect(()=>{i(),t(r.current)},[t]),$.jsx("div",{style:y$e,ref:o,...n})}function b$e(e){return tt("MuiTabScrollButton",e)}const w$e=ot("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),x$e=e=>{const{classes:t,orientation:n,disabled:r}=e;return rt({root:["root",n,r&&"disabled"]},b$e,t)},S$e=oe(Ki,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${w$e.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),C$e=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,d=nr(),f={isRtl:d,...r},h=x$e(f),m=i.StartScrollButtonIcon??EZ,g=i.EndScrollButtonIcon??OZ,v=Lc({elementType:m,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),w=Lc({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return $.jsx(S$e,{component:"div",className:fe(h.root,o),ref:n,role:null,ownerState:f,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:s==="left"?$.jsx(m,{...v}):$.jsx(g,{...w})})});function P$e(e){return tt("MuiTabs",e)}const MP=ot("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),g3=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,y3=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,kC=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},T$e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return rt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},P$e,l)},E$e=oe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${MP.scrollButtons}`]:t.scrollButtons},{[`& .${MP.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Ze(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${MP.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),O$e=oe("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),I$e=oe("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),k$e=oe("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(Ze(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),M$e=oe(v$e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),v3={},A$e=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTabs"}),o=Ei(),i=nr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:h=!1,indicatorColor:m="primary",onChange:g,orientation:v="horizontal",ScrollButtonComponent:w=C$e,scrollButtons:x="auto",selectionFollowsFocus:S,slots:P={},slotProps:T={},TabIndicatorProps:E={},TabScrollButtonProps:O={},textColor:k="primary",value:A,variant:I="standard",visibleScrollbar:R=!1,...N}=r,L=I==="scrollable",B=v==="vertical",_=B?"scrollTop":"scrollLeft",D=B?"top":"left",z=B?"bottom":"right",F=B?"clientHeight":"clientWidth",H=B?"height":"width",U={...r,component:f,allowScrollButtonsMobile:h,indicatorColor:m,orientation:v,vertical:B,scrollButtons:x,textColor:k,variant:I,visibleScrollbar:R,fixed:!L,hideScrollbar:L&&!R,scrollableX:L&&!B,scrollableY:L&&B,centered:c&&!L,scrollButtonsHideMobile:!h},q=T$e(U),Y=Lc({elementType:P.StartScrollButtonIcon,externalSlotProps:T.startScrollButtonIcon,ownerState:U}),ae=Lc({elementType:P.EndScrollButtonIcon,externalSlotProps:T.endScrollButtonIcon,ownerState:U}),[Z,K]=y.useState(!1),[te,pe]=y.useState(v3),[ie,le]=y.useState(!1),[re,de]=y.useState(!1),[ee,ce]=y.useState(!1),[me,we]=y.useState({overflow:"hidden",scrollbarWidth:0}),ge=new Map,Se=y.useRef(null),xe=y.useRef(null),Ie=()=>{const $e=Se.current;let Xe;if($e){const zt=$e.getBoundingClientRect();Xe={clientWidth:$e.clientWidth,scrollLeft:$e.scrollLeft,scrollTop:$e.scrollTop,scrollWidth:$e.scrollWidth,top:zt.top,bottom:zt.bottom,left:zt.left,right:zt.right}}let bt;if($e&&A!==!1){const zt=xe.current.children;if(zt.length>0){const Ot=zt[ge.get(A)];bt=Ot?Ot.getBoundingClientRect():null}}return{tabsMeta:Xe,tabMeta:bt}},Re=Wo(()=>{const{tabsMeta:$e,tabMeta:Xe}=Ie();let bt=0,zt;B?(zt="top",Xe&&$e&&(bt=Xe.top-$e.top+$e.scrollTop)):(zt=i?"right":"left",Xe&&$e&&(bt=(i?-1:1)*(Xe[zt]-$e[zt]+$e.scrollLeft)));const Ot={[zt]:bt,[H]:Xe?Xe[H]:0};if(typeof te[zt]!="number"||typeof te[H]!="number")pe(Ot);else{const cn=Math.abs(te[zt]-Ot[zt]),Fn=Math.abs(te[H]-Ot[H]);(cn>=1||Fn>=1)&&pe(Ot)}}),_e=($e,{animation:Xe=!0}={})=>{Xe?g$e(_,Se.current,$e,{duration:o.transitions.duration.standard}):Se.current[_]=$e},ye=$e=>{let Xe=Se.current[_];B?Xe+=$e:Xe+=$e*(i?-1:1),_e(Xe)},Te=()=>{const $e=Se.current[F];let Xe=0;const bt=Array.from(xe.current.children);for(let zt=0;zt$e){zt===0&&(Xe=$e);break}Xe+=Ot[F]}return Xe},Oe=()=>{ye(-1*Te())},Me=()=>{ye(Te())},Ue=y.useCallback($e=>{we({overflow:null,scrollbarWidth:$e})},[]),ze=()=>{const $e={};$e.scrollbarSizeListener=L?$.jsx(M$e,{onChange:Ue,className:fe(q.scrollableX,q.hideScrollbar)}):null;const bt=L&&(x==="auto"&&(ie||re)||x===!0);return $e.scrollButtonStart=bt?$.jsx(w,{slots:{StartScrollButtonIcon:P.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:Y},orientation:v,direction:i?"right":"left",onClick:Oe,disabled:!ie,...O,className:fe(q.scrollButtons,O.className)}):null,$e.scrollButtonEnd=bt?$.jsx(w,{slots:{EndScrollButtonIcon:P.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ae},orientation:v,direction:i?"left":"right",onClick:Me,disabled:!re,...O,className:fe(q.scrollButtons,O.className)}):null,$e},Qe=Wo($e=>{const{tabsMeta:Xe,tabMeta:bt}=Ie();if(!(!bt||!Xe)){if(bt[D]Xe[z]){const zt=Xe[_]+(bt[z]-Xe[z]);_e(zt,{animation:$e})}}}),ct=Wo(()=>{L&&x!==!1&&ce(!ee)});y.useEffect(()=>{const $e=dS(()=>{Se.current&&Re()});let Xe;const bt=cn=>{cn.forEach(Fn=>{Fn.removedNodes.forEach(Un=>{Xe==null||Xe.unobserve(Un)}),Fn.addedNodes.forEach(Un=>{Xe==null||Xe.observe(Un)})}),$e(),ct()},zt=rs(Se.current);zt.addEventListener("resize",$e);let Ot;return typeof ResizeObserver<"u"&&(Xe=new ResizeObserver($e),Array.from(xe.current.children).forEach(cn=>{Xe.observe(cn)})),typeof MutationObserver<"u"&&(Ot=new MutationObserver(bt),Ot.observe(xe.current,{childList:!0})),()=>{$e.clear(),zt.removeEventListener("resize",$e),Ot==null||Ot.disconnect(),Xe==null||Xe.disconnect()}},[Re,ct]),y.useEffect(()=>{const $e=Array.from(xe.current.children),Xe=$e.length;if(typeof IntersectionObserver<"u"&&Xe>0&&L&&x!==!1){const bt=$e[0],zt=$e[Xe-1],Ot={root:Se.current,threshold:.99},cn=qr=>{le(!qr[0].isIntersecting)},Fn=new IntersectionObserver(cn,Ot);Fn.observe(bt);const Un=qr=>{de(!qr[0].isIntersecting)},Po=new IntersectionObserver(Un,Ot);return Po.observe(zt),()=>{Fn.disconnect(),Po.disconnect()}}},[L,x,ee,u==null?void 0:u.length]),y.useEffect(()=>{K(!0)},[]),y.useEffect(()=>{Re()}),y.useEffect(()=>{Qe(v3!==te)},[Qe,te]),y.useImperativeHandle(l,()=>({updateIndicator:Re,updateScrollButtons:ct}),[Re,ct]);const nt=$.jsx(k$e,{...E,className:fe(q.indicator,E.className),ownerState:U,style:{...te,...E.style}});let et=0;const yt=y.Children.map(u,$e=>{if(!y.isValidElement($e))return null;const Xe=$e.props.value===void 0?et:$e.props.value;ge.set(Xe,et);const bt=Xe===A;return et+=1,y.cloneElement($e,{fullWidth:I==="fullWidth",indicator:bt&&!Z&&nt,selected:bt,selectionFollowsFocus:S,onChange:g,textColor:k,value:Xe,...et===1&&A===!1&&!$e.props.tabIndex?{tabIndex:0}:{}})}),vn=$e=>{const Xe=xe.current,bt=ii(Xe).activeElement;if(bt.getAttribute("role")!=="tab")return;let Ot=v==="horizontal"?"ArrowLeft":"ArrowUp",cn=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&i&&(Ot="ArrowRight",cn="ArrowLeft"),$e.key){case Ot:$e.preventDefault(),kC(Xe,bt,y3);break;case cn:$e.preventDefault(),kC(Xe,bt,g3);break;case"Home":$e.preventDefault(),kC(Xe,null,g3);break;case"End":$e.preventDefault(),kC(Xe,null,y3);break}},Ke=ze();return $.jsxs(E$e,{className:fe(q.root,d),ownerState:U,ref:n,as:f,...N,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,$.jsxs(O$e,{className:q.scroller,ownerState:U,style:{overflow:me.overflow,[B?`margin${i?"Left":"Right"}`:"marginBottom"]:R?void 0:-me.scrollbarWidth},ref:Se,children:[$.jsx(I$e,{"aria-label":a,"aria-labelledby":s,"aria-orientation":v==="vertical"?"vertical":null,className:q.flexContainer,ownerState:U,onKeyDown:vn,ref:xe,role:"tablist",children:yt}),Z&&nt]}),Ke.scrollButtonEnd]})});function $$e(e){return tt("MuiTextField",e)}ot("MuiTextField",["root"]);const R$e={standard:RT,filled:$T,outlined:_T},_$e=e=>{const{classes:t}=e;return rt({root:["root"]},$$e,t)},D$e=oe(Fh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Cn=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:h=!1,helperText:m,id:g,InputLabelProps:v,inputProps:w,InputProps:x,inputRef:S,label:P,maxRows:T,minRows:E,multiline:O=!1,name:k,onBlur:A,onChange:I,onFocus:R,placeholder:N,required:L=!1,rows:B,select:_=!1,SelectProps:D,slots:z={},slotProps:F={},type:H,value:U,variant:q="outlined",...Y}=r,ae={...r,autoFocus:i,color:l,disabled:u,error:d,fullWidth:h,multiline:O,required:L,select:_,variant:q},Z=_$e(ae),K=dh(g),te=m&&K?`${K}-helper-text`:void 0,pe=P&&K?`${K}-label`:void 0,ie=R$e[q],le={slots:z,slotProps:{input:x,inputLabel:v,htmlInput:w,formHelperText:f,select:D,...F}},re={},de=le.slotProps.inputLabel;q==="outlined"&&(de&&typeof de.shrink<"u"&&(re.notched=de.shrink),re.label=P),_&&((!D||!D.native)&&(re.id=void 0),re["aria-describedby"]=void 0);const[ee,ce]=hr("input",{elementType:ie,externalForwardedProps:le,additionalProps:re,ownerState:ae}),[me,we]=hr("inputLabel",{elementType:jh,externalForwardedProps:le,ownerState:ae}),[ge,Se]=hr("htmlInput",{elementType:"input",externalForwardedProps:le,ownerState:ae}),[xe,Ie]=hr("formHelperText",{elementType:EI,externalForwardedProps:le,ownerState:ae}),[Re,_e]=hr("select",{elementType:zf,externalForwardedProps:le,ownerState:ae}),ye=$.jsx(ee,{"aria-describedby":te,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:h,multiline:O,name:k,rows:B,maxRows:T,minRows:E,type:H,value:U,id:K,inputRef:S,onBlur:A,onChange:I,onFocus:R,placeholder:N,inputProps:Se,slots:{input:z.htmlInput?ge:void 0},...ce});return $.jsxs(D$e,{className:fe(Z.root,s),disabled:u,error:d,fullWidth:h,ref:n,required:L,color:l,variant:q,ownerState:ae,...Y,children:[P!=null&&P!==""&&$.jsx(me,{htmlFor:K,id:pe,...we,children:P}),_?$.jsx(Re,{"aria-describedby":te,id:K,labelId:pe,value:U,input:ye,..._e,children:a}):ye,m&&$.jsx(xe,{id:te,...Ie,children:m})]})});function N$e(e){return tt("MuiToggleButton",e)}const Lp=ot("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),IZ=y.createContext({}),kZ=y.createContext(void 0);function L$e(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const F$e=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Ce(i)}`,a]};return rt(s,N$e,t)},j$e=oe(Ki,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Ce(n.size)}`]]}})(Ze(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Lp.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Lp.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(Bn()).map(([t])=>({props:{color:t},style:{[`&.${Lp.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),e0=y.forwardRef(function(t,n){const{value:r,...o}=y.useContext(IZ),i=y.useContext(kZ),a=Sy({...o,selected:L$e(t.value,r)},t),s=it({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:h=!1,onChange:m,onClick:g,selected:v,size:w="medium",value:x,...S}=s,P={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:h,size:w},T=F$e(P),E=k=>{g&&(g(k,x),k.defaultPrevented)||m&&m(k,x)},O=i||"";return $.jsx(j$e,{className:fe(o.className,T.root,c,O),disabled:d,focusRipple:!f,ref:n,onClick:E,onChange:m,value:x,ownerState:P,"aria-pressed":v,...S,children:l})});function B$e(e){return tt("MuiToggleButtonGroup",e)}const Tr=ot("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),z$e=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Ce(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(i,B$e,t)},V$e=oe("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Tr.grouped}`]:t.grouped},{[`& .${Tr.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${Tr.firstButton}`]:t.firstButton},{[`& .${Tr.lastButton}`]:t.lastButton},{[`& .${Tr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(Ze(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Tr.grouped}`]:{[`&.${Tr.selected} + .${Tr.grouped}.${Tr.selected}`]:{borderTop:0,marginTop:0}},[`& .${Tr.firstButton},& .${Tr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Tr.lastButton},& .${Tr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Tr.lastButton}.${Lp.disabled},& .${Tr.middleButton}.${Lp.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Tr.grouped}`]:{[`&.${Tr.selected} + .${Tr.grouped}.${Tr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Tr.firstButton},& .${Tr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Tr.lastButton},& .${Tr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Tr.lastButton}.${Lp.disabled},& .${Tr.middleButton}.${Lp.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),H$e=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:f="medium",value:h,...m}=r,g={...r,disabled:s,fullWidth:c,orientation:d,size:f},v=z$e(g),w=y.useCallback((O,k)=>{if(!u)return;const A=h&&h.indexOf(k);let I;h&&A>=0?(I=h.slice(),I.splice(A,1)):I=h?h.concat(k):[k],u(O,I)},[u,h]),x=y.useCallback((O,k)=>{u&&u(O,h===k?null:k)},[u,h]),S=y.useMemo(()=>({className:v.grouped,onChange:l?x:w,value:h,size:f,fullWidth:c,color:a,disabled:s}),[v.grouped,l,x,w,h,f,c,a,s]),P=aX(o),T=P.length,E=O=>{const k=O===0,A=O===T-1;return k&&A?"":k?v.firstButton:A?v.lastButton:v.middleButton};return $.jsx(V$e,{role:"group",className:fe(v.root,i),ref:n,ownerState:g,...m,children:$.jsx(IZ.Provider,{value:S,children:P.map((O,k)=>$.jsx(kZ.Provider,{value:E(k),children:O},k))})})}),U$e=(...e)=>{console!=null&&console.warn&&(th(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},b3={},p_=(...e)=>{th(e[0])&&b3[e[0]]||(th(e[0])&&(b3[e[0]]=new Date),U$e(...e))},MZ=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},w3=(e,t,n)=>{e.loadNamespaces(t,MZ(e,n))},x3=(e,t,n,r)=>{th(n)&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,MZ(e,r))},W$e=(e,t,n={})=>!t.languages||!t.languages.length?(p_("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),th=e=>typeof e=="string",G$e=e=>typeof e=="object"&&e!==null,q$e=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,K$e={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Y$e=e=>K$e[e],X$e=e=>e.replace(q$e,Y$e);let h_={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:X$e};const Q$e=(e={})=>{h_={...h_,...e}},J$e=()=>h_;let AZ;const Z$e=e=>{AZ=e},eRe=()=>AZ,tRe={type:"3rdParty",init(e){Q$e(e.options.react),Z$e(e)}},nRe=y.createContext();class rRe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const oRe=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},$Z=(e,t,n,r)=>e.getFixedT(t,n,r),iRe=(e,t,n,r)=>y.useCallback($Z(e,t,n,r),[e,t,n,r]),Ge=(e,t={})=>{var P,T,E,O;const{i18n:n}=t,{i18n:r,defaultNS:o}=y.useContext(nRe)||{},i=n||r||eRe();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new rRe),!i){p_("You will need to pass in an i18next instance by using initReactI18next");const k=(I,R)=>th(R)?R:G$e(R)&&th(R.defaultValue)?R.defaultValue:Array.isArray(I)?I[I.length-1]:I,A=[k,{},!1];return A.t=k,A.i18n={},A.ready=!1,A}(P=i.options.react)!=null&&P.wait&&p_("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...J$e(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((T=i.options)==null?void 0:T.defaultNS);c=th(c)?[c]:c||["translation"],(O=(E=i.reportNamespaces).addUsedNamespaces)==null||O.call(E,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(k=>W$e(k,i,a)),d=iRe(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),f=()=>d,h=()=>$Z(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[m,g]=y.useState(f);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const w=oRe(v),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:k,bindI18nStore:A}=a;x.current=!0,!u&&!s&&(t.lng?x3(i,t.lng,c,()=>{x.current&&g(h)}):w3(i,c,()=>{x.current&&g(h)})),u&&w&&w!==v&&x.current&&g(h);const I=()=>{x.current&&g(h)};return k&&(i==null||i.on(k,I)),A&&(i==null||i.store.on(A,I)),()=>{x.current=!1,i&&(k==null||k.split(" ").forEach(R=>i.off(R,I))),A&&i&&A.split(" ").forEach(R=>i.store.off(R,I))}},[i,v]),y.useEffect(()=>{x.current&&u&&g(f)},[i,l,u]);const S=[m,i,u];if(S.t=m,S.i18n=i,S.ready=u,u||!u&&!s)return S;throw new Promise(k=>{t.lng?x3(i,t.lng,c,()=>k()):w3(i,c,()=>k())})},Ja=()=>{const[e]=Ge();return C(er,{sx:{textAlign:"center"},children:e("loading")})},_o=()=>C(er,{sx:{height:200,alignItems:"center",mt:2},component:Kt,direction:"column",justifyContent:"center",children:C(oZ,{})}),RZ=st($.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),Mv=st($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),CS=st($.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"}),"HistoryEdu"),rd=st($.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),PS=st($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),ta=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>C(kv,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(Ro,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(nd,{title:e,subheader:t,action:C(PS,{onClick:r})}),C(xa,{children:o}),C(ps,{})]})}),kI=e=>{const[t]=Ge(),n=e.height?e.height:"50vh";return C(Mt,{children:X(er,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[C(dt,{variant:"h6",mr:3,children:t("nothingHereYet")}),C(dt,{mr:3,children:t("nothingHereYetAction")})]})})},HF=e=>{const[t]=Ge(),[n,r]=J.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?C(gt,{size:"small",variant:"contained",href:e.link,children:t("add")}):C(gt,{size:"small",variant:"contained",onClick:o,children:t("add")});return X(Mt,{children:[X(Ro,{children:[C(nd,{title:e.title,subheader:".",sx:{paddingBottom:0}}),C(xa,{sx:{paddingTop:0,height:"500px"},children:C(kI,{})}),C(ps,{children:a})]}),C(ta,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function _Z(e,t){return function(){return e.apply(t,arguments)}}const{toString:aRe}=Object.prototype,{getPrototypeOf:UF}=Object,MI=(e=>t=>{const n=aRe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ic=e=>(e=e.toLowerCase(),t=>MI(t)===e),AI=e=>t=>typeof t===e,{isArray:Av}=Array,Xw=AI("undefined");function sRe(e){return e!==null&&!Xw(e)&&e.constructor!==null&&!Xw(e.constructor)&&Za(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const DZ=ic("ArrayBuffer");function lRe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&DZ(e.buffer),t}const cRe=AI("string"),Za=AI("function"),NZ=AI("number"),$I=e=>e!==null&&typeof e=="object",uRe=e=>e===!0||e===!1,AP=e=>{if(MI(e)!=="object")return!1;const t=UF(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},dRe=ic("Date"),fRe=ic("File"),pRe=ic("Blob"),hRe=ic("FileList"),mRe=e=>$I(e)&&Za(e.pipe),gRe=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Za(e.append)&&((t=MI(e))==="formdata"||t==="object"&&Za(e.toString)&&e.toString()==="[object FormData]"))},yRe=ic("URLSearchParams"),[vRe,bRe,wRe,xRe]=["ReadableStream","Request","Response","Headers"].map(ic),SRe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function TS(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Av(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Fp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,FZ=e=>!Xw(e)&&e!==Fp;function m_(){const{caseless:e}=FZ(this)&&this||{},t={},n=(r,o)=>{const i=e&&LZ(t,o)||o;AP(t[i])&&AP(r)?t[i]=m_(t[i],r):AP(r)?t[i]=m_({},r):Av(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(TS(t,(o,i)=>{n&&Za(o)?e[i]=_Z(o,n):e[i]=o},{allOwnKeys:r}),e),PRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),TRe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ERe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&UF(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},ORe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},IRe=e=>{if(!e)return null;if(Av(e))return e;let t=e.length;if(!NZ(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},kRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&UF(Uint8Array)),MRe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},ARe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},$Re=ic("HTMLFormElement"),RRe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),S3=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_Re=ic("RegExp"),jZ=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};TS(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},DRe=e=>{jZ(e,(t,n)=>{if(Za(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Za(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},NRe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Av(e)?r(e):r(String(e).split(t)),n},LRe=()=>{},FRe=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,v$="abcdefghijklmnopqrstuvwxyz",C3="0123456789",BZ={DIGIT:C3,ALPHA:v$,ALPHA_DIGIT:v$+v$.toUpperCase()+C3},jRe=(e=16,t=BZ.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function BRe(e){return!!(e&&Za(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const zRe=e=>{const t=new Array(10),n=(r,o)=>{if($I(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Av(r)?[]:{};return TS(r,(a,s)=>{const l=n(a,o+1);!Xw(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},VRe=ic("AsyncFunction"),HRe=e=>e&&($I(e)||Za(e))&&Za(e.then)&&Za(e.catch),zZ=((e,t)=>e?setImmediate:t?((n,r)=>(Fp.addEventListener("message",({source:o,data:i})=>{o===Fp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Fp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Za(Fp.postMessage)),URe=typeof queueMicrotask<"u"?queueMicrotask.bind(Fp):typeof process<"u"&&process.nextTick||zZ,De={isArray:Av,isArrayBuffer:DZ,isBuffer:sRe,isFormData:gRe,isArrayBufferView:lRe,isString:cRe,isNumber:NZ,isBoolean:uRe,isObject:$I,isPlainObject:AP,isReadableStream:vRe,isRequest:bRe,isResponse:wRe,isHeaders:xRe,isUndefined:Xw,isDate:dRe,isFile:fRe,isBlob:pRe,isRegExp:_Re,isFunction:Za,isStream:mRe,isURLSearchParams:yRe,isTypedArray:kRe,isFileList:hRe,forEach:TS,merge:m_,extend:CRe,trim:SRe,stripBOM:PRe,inherits:TRe,toFlatObject:ERe,kindOf:MI,kindOfTest:ic,endsWith:ORe,toArray:IRe,forEachEntry:MRe,matchAll:ARe,isHTMLForm:$Re,hasOwnProperty:S3,hasOwnProp:S3,reduceDescriptors:jZ,freezeMethods:DRe,toObjectSet:NRe,toCamelCase:RRe,noop:LRe,toFiniteNumber:FRe,findKey:LZ,global:Fp,isContextDefined:FZ,ALPHABET:BZ,generateString:jRe,isSpecCompliantForm:BRe,toJSONObject:zRe,isAsyncFn:VRe,isThenable:HRe,setImmediate:zZ,asap:URe};function nn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}De.inherits(nn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.status}}});const VZ=nn.prototype,HZ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{HZ[e]={value:e}});Object.defineProperties(nn,HZ);Object.defineProperty(VZ,"isAxiosError",{value:!0});nn.from=(e,t,n,r,o,i)=>{const a=Object.create(VZ);return De.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),nn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const WRe=null;function g_(e){return De.isPlainObject(e)||De.isArray(e)}function UZ(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function P3(e,t,n){return e?e.concat(t).map(function(o,i){return o=UZ(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function GRe(e){return De.isArray(e)&&!e.some(g_)}const qRe=De.toFlatObject(De,{},null,function(t){return/^is[A-Z]/.test(t)});function RI(e,t,n){if(!De.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=De.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!De.isUndefined(v[g])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&De.isSpecCompliantForm(t);if(!De.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(De.isDate(m))return m.toISOString();if(!l&&De.isBlob(m))throw new nn("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(m)||De.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,g,v){let w=m;if(m&&!v&&typeof m=="object"){if(De.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(De.isArray(m)&&GRe(m)||(De.isFileList(m)||De.endsWith(g,"[]"))&&(w=De.toArray(m)))return g=UZ(g),w.forEach(function(S,P){!(De.isUndefined(S)||S===null)&&t.append(a===!0?P3([g],P,i):a===null?g:g+"[]",c(S))}),!1}return g_(m)?!0:(t.append(P3(v,g,i),c(m)),!1)}const d=[],f=Object.assign(qRe,{defaultVisitor:u,convertValue:c,isVisitable:g_});function h(m,g){if(!De.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),De.forEach(m,function(w,x){(!(De.isUndefined(w)||w===null)&&o.call(t,w,De.isString(x)?x.trim():x,g,f))===!0&&h(w,g?g.concat(x):[x])}),d.pop()}}if(!De.isObject(e))throw new TypeError("data must be an object");return h(e),t}function T3(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function WF(e,t){this._pairs=[],e&&RI(e,this,t)}const WZ=WF.prototype;WZ.append=function(t,n){this._pairs.push([t,n])};WZ.toString=function(t){const n=t?function(r){return t.call(this,r,T3)}:T3;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function KRe(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function GZ(e,t,n){if(!t)return e;const r=n&&n.encode||KRe,o=n&&n.serialize;let i;if(o?i=o(t,n):i=De.isURLSearchParams(t)?t.toString():new WF(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class E3{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){De.forEach(this.handlers,function(r){r!==null&&t(r)})}}const qZ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},YRe=typeof URLSearchParams<"u"?URLSearchParams:WF,XRe=typeof FormData<"u"?FormData:null,QRe=typeof Blob<"u"?Blob:null,JRe={isBrowser:!0,classes:{URLSearchParams:YRe,FormData:XRe,Blob:QRe},protocols:["http","https","file","blob","url","data"]},GF=typeof window<"u"&&typeof document<"u",y_=typeof navigator=="object"&&navigator||void 0,ZRe=GF&&(!y_||["ReactNative","NativeScript","NS"].indexOf(y_.product)<0),e2e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",t2e=GF&&window.location.href||"http://localhost",n2e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:GF,hasStandardBrowserEnv:ZRe,hasStandardBrowserWebWorkerEnv:e2e,navigator:y_,origin:t2e},Symbol.toStringTag,{value:"Module"})),Sa={...n2e,...JRe};function r2e(e,t){return RI(e,new Sa.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Sa.isNode&&De.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function o2e(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function i2e(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&De.isArray(o)?o.length:a,l?(De.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!De.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&De.isArray(o[a])&&(o[a]=i2e(o[a])),!s)}if(De.isFormData(e)&&De.isFunction(e.entries)){const n={};return De.forEachEntry(e,(r,o)=>{t(o2e(r),o,n,0)}),n}return null}function a2e(e,t,n){if(De.isString(e))try{return(t||JSON.parse)(e),De.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ES={transitional:qZ,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=De.isObject(t);if(i&&De.isHTMLForm(t)&&(t=new FormData(t)),De.isFormData(t))return o?JSON.stringify(KZ(t)):t;if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)||De.isReadableStream(t))return t;if(De.isArrayBufferView(t))return t.buffer;if(De.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return r2e(t,this.formSerializer).toString();if((s=De.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return RI(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),a2e(t)):t}],transformResponse:[function(t){const n=this.transitional||ES.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(De.isResponse(t)||De.isReadableStream(t))return t;if(t&&De.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?nn.from(s,nn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sa.classes.FormData,Blob:Sa.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};De.forEach(["delete","get","head","post","put","patch"],e=>{ES.headers[e]={}});const s2e=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),l2e=e=>{const t={};let n,r,o;return e&&e.split(` -`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&s2e[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},O3=Symbol("internals");function t0(e){return e&&String(e).trim().toLowerCase()}function $P(e){return e===!1||e==null?e:De.isArray(e)?e.map($P):String(e)}function c2e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const u2e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function b$(e,t,n,r,o){if(De.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!De.isString(t)){if(De.isString(r))return t.indexOf(r)!==-1;if(De.isRegExp(r))return r.test(t)}}function d2e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function f2e(e,t){const n=De.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Ca{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=t0(l);if(!u)throw new Error("header name must be a non-empty string");const d=De.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=$P(s))}const a=(s,l)=>De.forEach(s,(c,u)=>i(c,u,l));if(De.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(De.isString(t)&&(t=t.trim())&&!u2e(t))a(l2e(t),n);else if(De.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=t0(t),t){const r=De.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return c2e(o);if(De.isFunction(n))return n.call(this,o,r);if(De.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=t0(t),t){const r=De.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||b$(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=t0(a),a){const s=De.findKey(r,a);s&&(!n||b$(r,r[s],s,n))&&(delete r[s],o=!0)}}return De.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||b$(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return De.forEach(this,(o,i)=>{const a=De.findKey(r,i);if(a){n[a]=$P(o),delete n[i];return}const s=t?d2e(i):String(i).trim();s!==i&&delete n[i],n[s]=$P(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return De.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&De.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[O3]=this[O3]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=t0(a);r[s]||(f2e(o,a),r[s]=!0)}return De.isArray(t)?t.forEach(i):i(t),this}}Ca.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.reduceDescriptors(Ca.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});De.freezeMethods(Ca);function w$(e,t){const n=this||ES,r=t||n,o=Ca.from(r.headers);let i=r.data;return De.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function YZ(e){return!!(e&&e.__CANCEL__)}function $v(e,t,n){nn.call(this,e??"canceled",nn.ERR_CANCELED,t,n),this.name="CanceledError"}De.inherits($v,nn,{__CANCEL__:!0});function XZ(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new nn("Request failed with status code "+n.status,[nn.ERR_BAD_REQUEST,nn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function p2e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function h2e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const DT=(e,t,n=3)=>{let r=0;const o=h2e(50,250);return m2e(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},I3=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},k3=e=>(...t)=>De.asap(()=>e(...t)),g2e=Sa.hasStandardBrowserEnv?function(){const t=Sa.navigator&&/(msie|trident)/i.test(Sa.navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=De.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),y2e=Sa.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];De.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),De.isString(r)&&a.push("path="+r),De.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function v2e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function b2e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function QZ(e,t){return e&&!v2e(t)?b2e(e,t):t}const M3=e=>e instanceof Ca?{...e}:e;function xh(e,t){t=t||{};const n={};function r(c,u,d){return De.isPlainObject(c)&&De.isPlainObject(u)?De.merge.call({caseless:d},c,u):De.isPlainObject(u)?De.merge({},u):De.isArray(u)?u.slice():u}function o(c,u,d){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function i(c,u){if(!De.isUndefined(u))return r(void 0,u)}function a(c,u){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>o(M3(c),M3(u),!0)};return De.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);De.isUndefined(f)&&d!==s||(n[u]=f)}),n}const JZ=e=>{const t=xh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Ca.from(a),t.url=GZ(QZ(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(De.isFormData(n)){if(Sa.hasStandardBrowserEnv||Sa.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Sa.hasStandardBrowserEnv&&(r&&De.isFunction(r)&&(r=r(t)),r||r!==!1&&g2e(t.url))){const c=o&&i&&y2e.read(i);c&&a.set(o,c)}return t},w2e=typeof XMLHttpRequest<"u",x2e=w2e&&function(e){return new Promise(function(n,r){const o=JZ(e);let i=o.data;const a=Ca.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,h,m;function g(){h&&h(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function w(){if(!v)return;const S=Ca.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};XZ(function(O){n(O),g()},function(O){r(O),g()},T),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new nn("Request aborted",nn.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new nn("Network Error",nn.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||qZ;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new nn(P,T.clarifyTimeoutError?nn.ETIMEDOUT:nn.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&De.forEach(a.toJSON(),function(P,T){v.setRequestHeader(T,P)}),De.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([f,m]=DT(c,!0),v.addEventListener("progress",f)),l&&v.upload&&([d,h]=DT(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",h)),(o.cancelToken||o.signal)&&(u=S=>{v&&(r(!S||S.type?new $v(null,e,v):S),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=p2e(o.url);if(x&&Sa.protocols.indexOf(x)===-1){r(new nn("Unsupported protocol "+x+":",nn.ERR_BAD_REQUEST,e));return}v.send(i||null)})},S2e=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof nn?u:new $v(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new nn(`timeout ${t} of ms exceeded`,nn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>De.asap(s),l}},C2e=function*(e,t){let n=e.byteLength;if(n{const o=P2e(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},_I=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ZZ=_I&&typeof ReadableStream=="function",E2e=_I&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),eee=(e,...t)=>{try{return!!e(...t)}catch{return!1}},O2e=ZZ&&eee(()=>{let e=!1;const t=new Request(Sa.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),$3=64*1024,v_=ZZ&&eee(()=>De.isReadableStream(new Response("").body)),NT={stream:v_&&(e=>e.body)};_I&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!NT[t]&&(NT[t]=De.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new nn(`Response type '${t}' is not supported`,nn.ERR_NOT_SUPPORT,r)})})})(new Response);const I2e=async e=>{if(e==null)return 0;if(De.isBlob(e))return e.size;if(De.isSpecCompliantForm(e))return(await new Request(Sa.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(De.isArrayBufferView(e)||De.isArrayBuffer(e))return e.byteLength;if(De.isURLSearchParams(e)&&(e=e+""),De.isString(e))return(await E2e(e)).byteLength},k2e=async(e,t)=>{const n=De.toFiniteNumber(e.getContentLength());return n??I2e(t)},M2e=_I&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=JZ(e);c=c?(c+"").toLowerCase():"text";let h=S2e([o,i&&i.toAbortSignal()],a),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let v;try{if(l&&O2e&&n!=="get"&&n!=="head"&&(v=await k2e(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(De.isFormData(r)&&(E=T.headers.get("content-type"))&&u.setContentType(E),T.body){const[O,k]=I3(v,DT(k3(l)));r=A3(T.body,$3,O,k)}}De.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(m);const S=v_&&(c==="stream"||c==="response");if(v_&&(s||S&&g)){const T={};["status","statusText","headers"].forEach(A=>{T[A]=x[A]});const E=De.toFiniteNumber(x.headers.get("content-length")),[O,k]=s&&I3(E,DT(k3(s),!0))||[];x=new Response(A3(x.body,$3,O,()=>{k&&k(),g&&g()}),T)}c=c||"text";let P=await NT[De.findKey(NT,c)||"text"](x,e);return!S&&g&&g(),await new Promise((T,E)=>{XZ(T,E,{data:P,headers:Ca.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw g&&g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new nn("Network Error",nn.ERR_NETWORK,e,m),{cause:w.cause||w}):nn.from(w,w&&w.code,e,m)}}),b_={http:WRe,xhr:x2e,fetch:M2e};De.forEach(b_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const R3=e=>`- ${e}`,A2e=e=>De.isFunction(e)||e===null||e===!1,tee={getAdapter:e=>{e=De.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : -`+i.map(R3).join(` -`):" "+R3(i[0]):"as no adapter specified";throw new nn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:b_};function x$(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $v(null,e)}function _3(e){return x$(e),e.headers=Ca.from(e.headers),e.data=w$.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tee.getAdapter(e.adapter||ES.adapter)(e).then(function(r){return x$(e),r.data=w$.call(e,e.transformResponse,r),r.headers=Ca.from(r.headers),r},function(r){return YZ(r)||(x$(e),r&&r.response&&(r.response.data=w$.call(e,e.transformResponse,r.response),r.response.headers=Ca.from(r.response.headers))),Promise.reject(r)})}const nee="1.7.7",qF={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qF[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const D3={};qF.transitional=function(t,n,r){function o(i,a){return"[Axios v"+nee+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new nn(o(a," has been removed"+(n?" in "+n:"")),nn.ERR_DEPRECATED);return n&&!D3[a]&&(D3[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function $2e(e,t,n){if(typeof e!="object")throw new nn("options must be an object",nn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new nn("option "+i+" must be "+l,nn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new nn("Unknown option "+i,nn.ERR_BAD_OPTION)}}const w_={assertOptions:$2e,validators:qF},Td=w_.validators;class nh{constructor(t){this.defaults=t,this.interceptors={request:new E3,response:new E3}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xh(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&w_.assertOptions(r,{silentJSONParsing:Td.transitional(Td.boolean),forcedJSONParsing:Td.transitional(Td.boolean),clarifyTimeoutError:Td.transitional(Td.boolean)},!1),o!=null&&(De.isFunction(o)?n.paramsSerializer={serialize:o}:w_.assertOptions(o,{encode:Td.function,serialize:Td.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&De.merge(i.common,i[n.method]);i&&De.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Ca.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!l){const m=[_3.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),f=m.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new $v(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new KF(function(o){t=o}),cancel:t}}}function R2e(e){return function(n){return e.apply(null,n)}}function _2e(e){return De.isObject(e)&&e.isAxiosError===!0}const x_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(x_).forEach(([e,t])=>{x_[t]=e});function ree(e){const t=new nh(e),n=_Z(nh.prototype.request,t);return De.extend(n,nh.prototype,t,{allOwnKeys:!0}),De.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return ree(xh(e,o))},n}const ut=ree(ES);ut.Axios=nh;ut.CanceledError=$v;ut.CancelToken=KF;ut.isCancel=YZ;ut.VERSION=nee;ut.toFormData=RI;ut.AxiosError=nn;ut.Cancel=ut.CanceledError;ut.all=function(t){return Promise.all(t)};ut.spread=R2e;ut.isAxiosError=_2e;ut.mergeConfig=xh;ut.AxiosHeaders=Ca;ut.formToJSON=e=>KZ(De.isHTMLForm(e)?new FormData(e):e);ut.getAdapter=tee.getAdapter;ut.HttpStatusCode=x_;ut.default=ut;const qg={protein:4,carbohydrates:4,fat:9};class Wa{constructor(t){sn(this,"bodyWeight",0);sn(this,"energy",0);sn(this,"protein",0);sn(this,"carbohydrates",0);sn(this,"carbohydratesSugar",0);sn(this,"fat",0);sn(this,"fatSaturated",0);sn(this,"fiber",0);sn(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*qg.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*qg.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*qg.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new Wa,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function Si(e){return e.toISOString().split("T")[0]}const oee=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];function S_(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function LT(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function D2e(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function N2e(e){if(e==null)return null;const[t,n]=e.split(":"),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function L2e(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return Si(t)}class iee{constructor(t,n,r,o){sn(this,"items",[]);sn(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return LT(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>S_(t.datetime,new Date))}get plannedNutritionalValues(){const t=new Wa;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new Wa;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class YF{fromJson(t){return new iee(t.id,t.order,N2e(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:LT(t.time)}}}const RP=-1;class F2e{constructor(t,n,r,o=!1,i=null,a=null,s=null,l=null,c=null,u=null,d=null){sn(this,"meals",[]);sn(this,"diaryEntries",[]);this.id=t,this.creationDate=n,this.description=r,this.onlyLogging=o,this.goalEnergy=i,this.goalProtein=a,this.goalCarbohydrates=s,this.goalFiber=l,this.goalSodium=c,this.goalFat=u,this.goalFatsSaturated=d}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new Wa({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new Wa;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>S_(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new Wa};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new Wa({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}pseudoMealOthers(t){const n=new iee(RP,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>S_(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new Wa)}}class DI{fromJson(t){return new F2e(t.id,new Date(t.creation_date),t.description,t.only_logging,t.goal_energy,t.goal_protein,t.goal_carbohydrates,t.goal_fiber,t.goal_fat)}toJson(t){return{description:t.description}}}class j2e{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class B2e{fromJson(t){return new j2e(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class z2e{constructor(t,n,r,o,i,a,s,l,c,u,d,f,h=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=d,this.sodium=f,this.image=h}}class V2e{fromJson(t){return new z2e(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new B2e().fromJson(t.image))}}var XF={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_SERVER:""};const H2e="/static/react",QF="",U2e=XF.TIME_ZONE,W2e=XF.MIN_ACCOUNT_AGE_TO_TRUST,G2e="",q2e=XF.VITE_API_KEY,Ny=2,K2e="en",Y2e=W2e||21,aee=1,X2e=2,Q2e=1,J2e=2,Z2e="exercises",e_e="variations",t_e="detail",n_e="languages",r_e="categories",o_e="equipment",i_e="muscles",a_e="permission",s_e="profile",l_e="routine",c_e="routines-shallow",u_e="routines-active",d_e="routines-logs",Rv="measurements",_v="measurements-categories";var Fr=(e=>(e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e))(Fr||{}),Yi=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e))(Yi||{});const see="999",f_e=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],p_e=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],h_e=["#2a4c7d","#d45089","#ffa600"],N3={pageSizeOptions:[5,10,25,50,100],pageSize:10},m_e=U2e||"Europe/Berlin",Ly="en",lee=3e3;var cee={exports:{}};(function(e){(function(t){let n;function r(u,d){const f=u.charCodeAt(d);if(isNaN(f))throw new RangeError("Index "+d+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(f<55296||f>57343)return[u.charAt(d),d];if(f>=55296&&f<=56319){if(u.length<=d+1)return[" ",d];const m=u.charCodeAt(d+1);return m<56320||m>57343?[" ",d]:[u.charAt(d)+u.charAt(d+1),d+1]}if(d===0)return[" ",d];const h=u.charCodeAt(d-1);if(h<55296||h>56319)return[" ",d];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const d=unescape(encodeURIComponent(u+""));let f="";for(let h,m,g=0,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.charAt(g|0)||(v="=",g%1);f+=v.charAt(63&h>>8-g%1*8)){if(m=d.charCodeAt(g+=3/4),m>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");h=h<<8|m}return f}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,d){let f=s(u,d);if((d&&d.fallback!==void 0?d.fallback:o.defaults.fallback)===!0&&f===""){let m="";for(let g=0;g1?f[d[m]]=u[d[m]]:h[d[m]]=u[d[m]];Object.assign(o.charmap,h),Object.assign(o.multicharmap,f)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(Bi)})(cee);var g_e=cee.exports;const uee=Rn(g_e);function Pt(e,t){t=t||{};const r=[t.server||G2e,"api","v2",e];if(t.objectMethod&&r.push(t.objectMethod),t.id&&r.push(t.id.toString()),r.push(""),t.query){const o=[];for(const i in t.query)t.query.hasOwnProperty(i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var wn=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_ADD=3]="ROUTINE_ADD",e[e.ROUTINE_DELETE=4]="ROUTINE_DELETE",e[e.ROUTINE_ADD_LOG=5]="ROUTINE_ADD_LOG",e[e.ROUTINE_EDIT_LOG=6]="ROUTINE_EDIT_LOG",e[e.ROUTINE_DELETE_LOG=7]="ROUTINE_DELETE_LOG",e[e.ROUTINE_EDIT_DAY=8]="ROUTINE_EDIT_DAY",e[e.ROUTINE_ADD_DAY=9]="ROUTINE_ADD_DAY",e[e.ROUTINE_DELETE_DAY=10]="ROUTINE_DELETE_DAY",e[e.ROUTINE_ADD_SET=11]="ROUTINE_ADD_SET",e[e.ROUTINE_EDIT_SET=12]="ROUTINE_EDIT_SET",e[e.ROUTINE_DELETE_SET=13]="ROUTINE_DELETE_SET",e[e.EXERCISE_DETAIL=14]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=15]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=16]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=17]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=18]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=19]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=20]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=21]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=22]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=23]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=24]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=25]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=26]="INGREDIENT_DETAIL",e))(wn||{});function Tn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 3:return`/${r}/routine/add`;case 9:return`/${r}/routine/day/${n.id}/add`;case 5:return`/${r}/routine/day/${n.id}/log/add`;case 6:return`/${r}/routine/log/${n.id}/edit`;case 7:return`/${r}/routine/log/${n.id}/delete`;case 8:return`/${r}/routine/day/${n.id}/edit`;case 10:return`/${r}/routine/day/${n.id}/delete`;case 11:return`/${r}/routine/set/${n.id}/add`;case 12:return`/${r}/routine/set/${n.id}/edit`;case 13:return`/${r}/routine/set/${n.id}/delete`;case 16:return`/${r}/exercise/contribute`;case 14:return n.slug?`/${r}/exercise/${n.id}/view-base/${uee(n.slug)}`:`/${r}/exercise/${n.id}/view-base`;case 15:return`/${r}/exercise/overview`;case 17:return`/${r}/weight/overview`;case 18:return`/${r}/weight/add`;case 19:return`/${r}/measurement/overview`;case 20:return`/${r}/measurement/category/${n.id}`;case 21:return`/${r}/nutrition/overview`;case 22:return`/${r}/nutrition/${n.id}/view`;case 25:return`/${r}/nutrition/${n.id}/${n.date}`;case 23:return`/${r}/nutrition/${n.id}/pdf`;case 24:return`/${r}/nutrition/${n.id}/copy`;case 26:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function y_e(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r{if(e.length===0)return[];const t=Pt(Yi.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new V2e,r=[];for await(const o of OS(t,kt()))for(const i of o)r.push(n.fromJson(i));return r},v_e=async(e,t,n=!0)=>{const r=[t];t!==Ly&&n&&r.push(Ly);const o=Pt(Yi.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await ut.get(o);return i.suggestions};class b_e{constructor(t,n,r,o,i,a,s){sn(this,"ingredient",null);sn(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?Wa.fromIngredient(this.ingredient,this.amount,this.weightUnit):new Wa}}class JF{fromJson(t){return new b_e(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}class w_e{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class x_e{fromJson(t){return new w_e(t.id,parseFloat(t.amount),t.gram)}}const fee=async e=>{if(e===null)return null;const{data:t}=await ut.get(Pt(Yi.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:kt()});return new x_e().fromJson(t)},S_e=async e=>{const t=await ut.post(Pt(Yi.MEAL),e,{headers:kt()});return new YF().fromJson(t.data)},C_e=async e=>{const t=await ut.patch(Pt(Yi.MEAL,{id:e.id}),e,{headers:kt()});return new YF().fromJson(t.data)},P_e=async e=>{await ut.delete(Pt(Yi.MEAL,{id:e}),{headers:kt()})},T_e=async e=>{let t=[];const n=new YF,r=new JF,{data:o}=await ut.get(Pt(Yi.MEAL,{query:{plan:e}}),{headers:kt()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await ut.get(Pt(Yi.MEAL_ITEM,{query:{meal:a.id}}),{headers:kt()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await dee(t);for(const u of l)u.weightUnit=await fee(u.weightUnitId),u.ingredient=c.find(d=>d.id===u.ingredientId);a.items=l}return i};class E_e{constructor(t,n,r,o,i,a,s,l,c){sn(this,"ingredient",null);sn(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?Wa.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new Wa)}}class ZF{fromJson(t){return new E_e(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const O_e=async(e,t)=>{const n=new ZF,r={plan:e,limit:see};t&&(r.datetime__date=Si(t));const o=Pt(Yi.NUTRITIONAL_DIARY,{query:r}),i=[];for await(const a of OS(o,kt()))for(const s of a){let l=n.fromJson(s);l.weightUnit=await fee(l.weightUnitId),i.push(l)}return i},pee=async e=>{const t=await ut.post(Pt(Yi.NUTRITIONAL_DIARY),e,{headers:kt()});return new ZF().fromJson(t.data)},I_e=async e=>{const t=await ut.patch(Pt(Yi.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:kt()});return new ZF().fromJson(t.data)},Dv="nutritionplan",k_e=async()=>{const{data:e}=await ut.get(Pt(Dv),{headers:kt()}),t=new DI;return e.results.map(n=>t.fromJson(n))},M_e=async()=>{const{data:e}=await ut.get(Pt(Dv,{query:{limit:"1"}}),{headers:kt()});return e.count===0?null:await ej(e.results[0].id)},ej=async(e,t)=>{if(e===null)return null;const{data:n}=await ut.get(Pt(Dv,{id:e}),{headers:kt()}),r=[],i=new DI().fromJson(n),a=await Promise.all([T_e(e),O_e(e,t)]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{r.includes(l.ingredientId)||r.push(l.ingredientId)});const s=await dee(r);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},A_e=async e=>{const t=await ut.post(Pt(Dv),e,{headers:kt()});return new DI().fromJson(t.data)},$_e=async e=>{const t=await ut.patch(Pt(Dv,{id:e.id}),e,{headers:kt()});return new DI().fromJson(t.data)},R_e=async e=>{await ut.delete(Pt(Dv,{id:e}),{headers:kt()})};function __e(){return So({queryKey:[Fr.NUTRITIONAL_PLANS],queryFn:()=>k_e()})}function D_e(){return So({queryKey:[Fr.NUTRITIONAL_PLAN,"last"],queryFn:()=>M_e()})}function N_e(e){return So({queryKey:[Fr.NUTRITIONAL_PLAN,e],queryFn:()=>ej(e)})}function L_e(e,t,n=!0){return So({queryKey:[Fr.NUTRITIONAL_PLAN,e,t],queryFn:()=>ej(e,new Date(t)),enabled:n})}const F_e=()=>{const e=Gr();return lo({mutationFn:t=>A_e(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN]})}})},j_e=e=>{const t=Gr();return lo({mutationFn:n=>R_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})},B_e=e=>{const t=Gr();return lo({mutationFn:n=>$_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLANS]})}})},z_e=e=>{const t=Gr();return lo({mutationFn:n=>pee(n),onSuccess:()=>t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})})},hee=e=>{const t=Gr();return lo({mutationFn:n=>Promise.all(n.map(r=>pee(r))),onSuccess:()=>t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})})},V_e=e=>{const t=Gr();return lo({mutationFn:n=>I_e(n),onSuccess:()=>t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})})},H_e=e=>{const t=Gr();return lo({mutationFn:n=>S_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})},U_e=e=>{const t=Gr();return lo({mutationFn:n=>P_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})},W_e=e=>{const t=Gr();return lo({mutationFn:n=>C_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})},G_e=async e=>{const t=await ut.post(Pt(Yi.MEAL_ITEM),e,{headers:kt()});return new JF().fromJson(t.data)},q_e=async e=>{const t=await ut.patch(Pt(Yi.MEAL_ITEM,{id:e.id}),e,{headers:kt()});return new JF().fromJson(t.data)},K_e=async e=>{await ut.delete(Pt(Yi.MEAL_ITEM,{id:e}),{headers:kt()})},Y_e=e=>{const t=Gr();return lo({mutationFn:n=>G_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})},X_e=e=>{const t=Gr();return lo({mutationFn:n=>q_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})},Q_e=e=>{const t=Gr();return lo({mutationFn:n=>K_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Fr.NUTRITIONAL_PLAN,e]})}})};class mee{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class tj{fromJson(t){return new mee(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:Si(t.date),weight:t.weight}}}const NI="weightentry",J_e=async(e="")=>{const t=L2e(e),n=Pt(NI,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await ut.get(n,{headers:kt()}),o=new tj;return r.results.map(i=>o.fromJson(i))},Z_e=async e=>(await ut.delete(Pt(NI,{id:e}),{headers:kt()})).status,eDe=async e=>{const t=new tj,n=await ut.patch(Pt(NI,{id:e.id}),t.toJson(e),{headers:kt()});return t.fromJson(n)},tDe=async e=>{const t=new tj,n=await ut.post(Pt(NI),t.toJson(e),{headers:kt()});return t.fromJson(n.data)},nDe=22;function rDe(e,t=nDe){return e.length>t?e.slice(0,t)+"…":e}function oDe(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function Xi(e){return`server.${oDe(e)}`}class iDe{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}getName(t){return this.nameEn?`${this.name} (${t(Xi(this.nameEn))})`:this.name}}class gee{fromJson(t){return new iDe(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const aDe="muscle",sDe=async()=>{const e=Pt(aDe),{data:t}=await ut.get(e,{headers:kt()}),n=new gee;return t.results.map(r=>n.fromJson(r))};class lDe{constructor(t,n){this.id=t,this.name=n}}class yee{fromJson(t){return new lDe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const cDe="equipment",uDe=async()=>{const e=Pt(cDe),{data:t}=await ut.get(e,{headers:kt()}),n=new yee;return t.results.map(r=>n.fromJson(r))};class dDe{constructor(t,n){this.id=t,this.name=n}}class vee{fromJson(t){return new dDe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const fDe="exercisecategory",pDe=async()=>{const e=Pt(fDe),{data:t}=await ut.get(e,{headers:kt()}),n=new vee;return t.results.map(r=>n.fromJson(r))};var bu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(bu||{});class hDe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class C_{fromJson(t){return new hDe(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class mDe{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class bee{fromJson(t){return new mDe(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class P_{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class wee{fromJson(t){return new P_(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class xee{constructor(t,n,r,o,i,a,s,l){sn(this,"notes",[]);sn(this,"aliases",[]);sn(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return rDe(this.name)}get nameSlug(){return uee(this.name)}}class nj{fromJson(t){var n,r;return new xee(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new wee().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new bee().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class gDe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class See{fromJson(t){return new gDe(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class yDe{constructor(t,n,r,o,i,a,s,l,c,u,d){sn(this,"translations",[]);sn(this,"videos",[]);sn(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),d&&(this.authors=d)}getTranslation(t){const n=t!=null?t.id:Ny;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===Ny)),r||this.translations[0]}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}}class Cee{fromJson(t){const n=new vee,r=new yee,o=new gee,i=new C_,a=new nj,s=new See,l=new yDe(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.exercises.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===Ny)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new C_().toJson(n))}}}const rj="exercisebaseinfo",oj="exercise-base";function Pee(e){const t=new Cee,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const vDe=async()=>{const e=Pt(rj,{query:{limit:900}}),t=await ut.get(e,{headers:kt()});return Pee(t.data)},LI=async e=>{const t=new Cee,n=Pt(rj,{id:e}),r=await ut.get(n,{headers:kt()});return t.fromJson(r.data)},bDe=async e=>{if(!e)return[];const t=Pt(rj,{query:{variations:e}}),n=await ut.get(t,{headers:kt()});return Pee(n.data)},wDe=async(e,t,n,r,o,i)=>{const a=Pt(oj),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await ut.post(a,s,{headers:kt()})).data.id},ij=async(e,t)=>{const n=Pt(oj,{id:e});return(await ut.patch(n,t,{headers:kt()})).status},L3=async(e,t)=>{const r=Pt(oj,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await ut.delete(r,{headers:kt()})).status},aj="exercise-translation",xDe="exercise/search",SDe=async(e,t=K2e,n=!0)=>{const r=[t];t!==Ly&&n&&r.push(Ly);const o=Pt(xDe,{query:{term:e,language:r.join(",")}}),{data:i}=await ut.get(o);return i.suggestions},T_=async(e,t,n,r,o)=>{const i=Pt(aj),a={exercise_base:e,language:t,name:n,description:r,license_author:o},s=await ut.post(i,a,{headers:kt()});return new nj().fromJson(s.data)},CDe=async(e,t,n,r,o)=>{const i=Pt(aj,{id:e}),a={exercise_base:t,language:n,name:r,description:o},s=await ut.patch(i,a,{headers:kt()});return new nj().fromJson(s.data)},PDe=async e=>{const t=Pt(aj,{id:e});return(await ut.delete(t,{headers:kt()})).status};class Tee{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class TDe{fromJson(t){return new Tee(t.id,t.short_name,t.full_name)}toJson(t){return{}}}const EDe="language",ODe=async()=>{const e=Pt(EDe),{data:t}=await ut.get(e,{headers:kt()}),n=new TDe;return t.results.map(r=>n.fromJson(r))},Eee=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},Oee="exerciseimage",Iee=async e=>{const t=Pt(Oee),n=kt();n["Content-Type"]="multipart/form-data";const r=await ut.post(t,{exercise_base:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new C_().fromJson(r.data)},IDe=async e=>{const t=Pt(Oee,{id:e}),n=kt();return(await ut.delete(t,{headers:n})).status},kee="exercisealias",E_=async(e,t)=>{const n=Pt(kee),r=await ut.post(n,{exercise:e,alias:t},{headers:kt()});return new bee().fromJson(r.data)},kDe=async e=>(await ut.delete(Pt(kee,{id:e}),{headers:kt()})).status,Mee="video",MDe=async(e,t,n)=>{const r=Pt(Mee),o=kt();o["Content-Type"]="multipart/form-data";const i=await ut.post(r,{exercise_base:e,license_author:t,video:n},{headers:o});return new See().fromJson(i.data)},ADe=async e=>{const t=Pt(Mee,{id:e}),n=kt();return(await ut.delete(t,{headers:n})).status};class $De{constructor(t,n,r,o){sn(this,"sets",[]);this.id=t,this.description=n,this.daysOfWeek=r,o&&(this.sets=o)}}class RDe{fromJson(t){return new $De(t.id,t.description,t.day)}toJson(t){return{id:t.id,description:t.description,day:t.daysOfWeek}}}class _De{constructor(t,n,r,o,i,a,s,l,c,u,d){this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.repetitionUnitObj=c,this.weightUnitObj=u,this.baseObj=d,c&&(this.repetitionUnitObj=c),u&&(this.weightUnitObj=u),d&&(this.baseObj=d)}get rirString(){return this.rir===null||this.rir===""?"-/-":this.rir}}class DDe{fromJson(t){return new _De(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir}}}class NDe{constructor(t,n,r,o,i){sn(this,"days",[]);this.id=t,this.name=n,this.description=r,this.date=o,i&&(this.days=i)}}class Aee{fromJson(t){return new NDe(t.id,t.name,t.description,new Date(t.creation_date))}toJson(t){return{id:t.id,name:t.name,description:t.description,creation_date:Si(t.date)}}}function LDe(e,t,n){n=n||(s=>s);const r=s=>s.rir?`${s.rir} ${n("routines.rir")}`:"",o=s=>{if(s.repetitionUnit===X2e)return"∞";const l=s.repetitionUnit!==aee?n(Xi(s.repetitionUnitObj.name)):"";return`${s.reps} ${l}`},i=s=>s===null?"":Number.isInteger(s)?s.toString():s.toFixed(2).toString(),a=(s,l=!1)=>{const c=o(s),u=s.weightUnitObj.name,d=i(s.weight),f=r(s);let h=l?c:`${e} × ${c}`.trim();if(d){const m=f?`, ${f}`:"";h+=` (${d} ${u}${m})`}else h+=f?` (${f})`:"";return h};return t.length===1?a(t[0]):t.map(s=>a(s,!0)).join(" – ")}class FDe{constructor(t,n,r,o,i,a){sn(this,"settings",[]);sn(this,"settingsComputed",[]);this.id=t,this.sets=n,this.order=r,this.comment=o,i&&(this.settings=i),a&&(this.settingsComputed=a)}get exercises(){return this.settingsFiltered.map(t=>t.base)}get settingsFiltered(){const t=[];for(const n of this.settings)t.filter(o=>o.exerciseId===n.exerciseId).length===0&&t.push(n);return t}filterSettingsByExercise(t){return this.settings.filter(n=>n.exerciseId===t.id)}getSettingsTextRepresentation(t,n){return n=n||(r=>r),LDe(this.sets,this.filterSettingsByExercise(t),n)}}class jDe{fromJson(t){return new FDe(t.id,t.sets,t.order,t.comment)}toJson(t){return{id:t.id,sets:t.sets,order:t.order,comment:t.order}}}class BDe{constructor(t,n,r,o,i,a,s,l,c,u,d,f){sn(this,"base");this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.order=c,this.comment=u,this.repetitionUnitObj=d,this.weightUnitObj=f,d&&(this.repetitionUnitObj=d),f&&(this.weightUnitObj=f)}}class zDe{fromJson(t){return new BDe(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir,t.order,t.comment)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir,order:t.order,comment:t.comment}}}class VDe{constructor(t,n){sn(this,"id");sn(this,"name");this.id=t,this.name=n}}class HDe{fromJson(t){return new VDe(t.id,t.name)}toJson(t){return{}}}class UDe{constructor(t,n){sn(this,"id");sn(this,"name");this.id=t,this.name=n}}class WDe{fromJson(t){return new UDe(t.id,t.name)}toJson(t){return{}}}const GDe="setting-repetitionunit",qDe="setting-weightunit",$ee=async()=>{const e=Pt(GDe),{data:t}=await ut.get(e,{headers:kt()}),n=new HDe;return t.results.map(r=>n.fromJson(r))},Ree=async()=>{const e=Pt(qDe),{data:t}=await ut.get(e,{headers:kt()}),n=new WDe;return t.results.map(r=>n.fromJson(r))},sj="workout",KDe="workoutlog",YDe="day",XDe="set",QDe="setting",JDe=e=>new Aee().fromJson(e),_ee=async e=>{const t=new Aee,n=new RDe,r=new jDe,o=new zDe,i=await ut.get(Pt(sj,{id:e}),{headers:kt()}),a=t.fromJson(i.data),s=await ut.get(Pt(YDe,{query:{training:a.id.toString()}}),{headers:kt()}),l=await Promise.all([$ee(),Ree()]),c=l[0],u=l[1];for(const d of s.data.results){const f=n.fromJson(d),h=await ut.get(Pt(XDe,{query:{exerciseday:f.id.toString()}}),{headers:kt()});for(const v of h.data.results){const w=r.fromJson(v);f.sets.push(w)}const m=h.data.results.map(v=>ut.get(Pt(QDe,{query:{set:v.id}}),{headers:kt()})),g=await Promise.all(m);for(const v of g)for(const w of v.data.results){const x=f.sets.find(O=>O.id===w.set),S=o.fromJson(w),P=u.find(O=>O.id===S.weightUnit),T=c.find(O=>O.id===S.repetitionUnit),E=x.settings.find(O=>O.exerciseId===S.exerciseId);S.base=E!==void 0?E.base:await LI(S.exerciseId),S.weightUnitObj=P,S.repetitionUnitObj=T,x.settings.push(S)}a.days.push(f)}return a},ZDe=async()=>{const e=Pt(sj,{query:{limit:"1"}}),t=await ut.get(e,{headers:kt()});return t.data.count===0?null:await _ee(t.data.results[0].id)},eNe=async e=>await _ee(e),tNe=async()=>{const e=Pt(sj),t=await ut.get(e,{headers:kt()}),n=[];for(const r of t.data.results)n.push(await JDe(r));return n},nNe=async(e,t=!1)=>{const n=new DDe,r=Pt(KDe,{query:{workout:e.toString(),limit:see,ordering:"-date"}}),o=await Promise.all([$ee(),Ree()]),i=o[0],a=o[1],s=new Map,l=[];for await(const c of OS(r))for(const u of c){const d=n.fromJson(u);d.repetitionUnitObj=i.find(f=>f.id===d.repetitionUnit),d.weightUnitObj=a.find(f=>f.id===d.weightUnit),t&&(s.get(d.exerciseId)===void 0&&s.set(d.exerciseId,await LI(d.exerciseId)),d.baseObj=s.get(d.exerciseId)),l.push(d)}return l};class rNe{constructor(t,n,r,o){sn(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class FI{fromJson(t){return new rNe(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class oNe{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class jI{fromJson(t){return new oNe(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}const IS="measurement-category",kS="measurement",iNe=async()=>{const e=new FI,t=new jI,{data:n}=await ut.get(Pt(IS),{headers:kt()}),r=n.results.map(s=>e.fromJson(s)),o=r.map(async s=>{const l=[],c=Pt(kS,{query:{category:s.id}});for await(const u of OS(c,kt()))for(const d of u)l.push(t.fromJson(d));return l}),i=await Promise.all(o);let a;return i.forEach(s=>{s.length>0&&(a=s[0].category,r.findLast(l=>l.id===a).entries=s)}),r},aNe=async e=>{const{data:t}=await ut.get(Pt(IS,{id:e}),{headers:kt()}),n=new FI().fromJson(t),r=new jI,o=[],i=Pt(kS,{query:{category:n.id}});for await(const a of OS(i,kt()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},sNe=async e=>{const t=await ut.post(Pt(IS),{name:e.name,unit:e.unit},{headers:kt()});return new FI().fromJson(t.data)},lNe=async e=>{const t=await ut.patch(Pt(IS,{id:e.id}),{name:e.name,unit:e.unit},{headers:kt()});return new FI().fromJson(t.data)},cNe=async e=>{await ut.delete(Pt(IS,{id:e}),{headers:kt()})},uNe=async e=>{await ut.delete(Pt(kS,{id:e}),{headers:kt()})},dNe=async e=>{const t=await ut.patch(Pt(kS,{id:e.id}),{date:Si(e.date),value:e.value,notes:e.notes},{headers:kt()});return new jI().fromJson(t.data)},fNe=async e=>{const t=await ut.post(Pt(kS),{category:e.categoryId,date:Si(e.date),value:e.value,notes:e.notes},{headers:kt()});return new jI().fromJson(t.data)};function bi(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function Dee(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function bn(e,t){return Dee(e,t,"gram")}function S$(e,t){return Dee(e,t,"percent")}const Kg=e=>{const{i18n:t}=Ge(),n=e.planned>0;return X(Mt,{children:[C(hZ,{variant:"determinate",value:e.percentage<100?e.percentage:100}),X(dt,{variant:"caption",children:[e.title," — ",bn(e.logged,t.language),n&&X(Mt,{children:[" / ",bn(e.planned,t.language)]})]})]})};var pNe=Array.isArray,Ea=pNe,hNe=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,Nee=hNe,mNe=Nee,gNe=typeof self=="object"&&self&&self.Object===Object&&self,yNe=mNe||gNe||Function("return this")(),Wc=yNe,vNe=Wc,bNe=vNe.Symbol,MS=bNe,F3=MS,Lee=Object.prototype,wNe=Lee.hasOwnProperty,xNe=Lee.toString,n0=F3?F3.toStringTag:void 0;function SNe(e){var t=wNe.call(e,n0),n=e[n0];try{e[n0]=void 0;var r=!0}catch{}var o=xNe.call(e);return r&&(t?e[n0]=n:delete e[n0]),o}var CNe=SNe,PNe=Object.prototype,TNe=PNe.toString;function ENe(e){return TNe.call(e)}var ONe=ENe,j3=MS,INe=CNe,kNe=ONe,MNe="[object Null]",ANe="[object Undefined]",B3=j3?j3.toStringTag:void 0;function $Ne(e){return e==null?e===void 0?ANe:MNe:B3&&B3 in Object(e)?INe(e):kNe(e)}var od=$Ne;function RNe(e){return e!=null&&typeof e=="object"}var id=RNe,_Ne=od,DNe=id,NNe="[object Symbol]";function LNe(e){return typeof e=="symbol"||DNe(e)&&_Ne(e)==NNe}var Nv=LNe,FNe=Ea,jNe=Nv,BNe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,zNe=/^\w*$/;function VNe(e,t){if(FNe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||jNe(e)?!0:zNe.test(e)||!BNe.test(e)||t!=null&&e in Object(t)}var lj=VNe;function HNe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Hf=HNe;const Lv=Rn(Hf);var UNe=od,WNe=Hf,GNe="[object AsyncFunction]",qNe="[object Function]",KNe="[object GeneratorFunction]",YNe="[object Proxy]";function XNe(e){if(!WNe(e))return!1;var t=UNe(e);return t==qNe||t==KNe||t==GNe||t==YNe}var cj=XNe;const Gt=Rn(cj);var QNe=Wc,JNe=QNe["__core-js_shared__"],ZNe=JNe,C$=ZNe,z3=function(){var e=/[^.]+$/.exec(C$&&C$.keys&&C$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function eLe(e){return!!z3&&z3 in e}var tLe=eLe,nLe=Function.prototype,rLe=nLe.toString;function oLe(e){if(e!=null){try{return rLe.call(e)}catch{}try{return e+""}catch{}}return""}var Fee=oLe,iLe=cj,aLe=tLe,sLe=Hf,lLe=Fee,cLe=/[\\^$.*+?()[\]{}|]/g,uLe=/^\[object .+?Constructor\]$/,dLe=Function.prototype,fLe=Object.prototype,pLe=dLe.toString,hLe=fLe.hasOwnProperty,mLe=RegExp("^"+pLe.call(hLe).replace(cLe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gLe(e){if(!sLe(e)||aLe(e))return!1;var t=iLe(e)?mLe:uLe;return t.test(lLe(e))}var yLe=gLe;function vLe(e,t){return e==null?void 0:e[t]}var bLe=vLe,wLe=yLe,xLe=bLe;function SLe(e,t){var n=xLe(e,t);return wLe(n)?n:void 0}var zh=SLe,CLe=zh,PLe=CLe(Object,"create"),BI=PLe,V3=BI;function TLe(){this.__data__=V3?V3(null):{},this.size=0}var ELe=TLe;function OLe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ILe=OLe,kLe=BI,MLe="__lodash_hash_undefined__",ALe=Object.prototype,$Le=ALe.hasOwnProperty;function RLe(e){var t=this.__data__;if(kLe){var n=t[e];return n===MLe?void 0:n}return $Le.call(t,e)?t[e]:void 0}var _Le=RLe,DLe=BI,NLe=Object.prototype,LLe=NLe.hasOwnProperty;function FLe(e){var t=this.__data__;return DLe?t[e]!==void 0:LLe.call(t,e)}var jLe=FLe,BLe=BI,zLe="__lodash_hash_undefined__";function VLe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=BLe&&t===void 0?zLe:t,this}var HLe=VLe,ULe=ELe,WLe=ILe,GLe=_Le,qLe=jLe,KLe=HLe;function Fv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var dFe=uFe,fFe=zI;function pFe(e,t){var n=this.__data__,r=fFe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var hFe=pFe,mFe=QLe,gFe=iFe,yFe=lFe,vFe=dFe,bFe=hFe;function jv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},jp=function(t){return AS(t)&&t.indexOf("%")===t.length-1},lt=function(t){return Fje(t)&&!$S(t)},Ao=function(t){return lt(t)||AS(t)},Vje=0,Vh=function(t){var n=++Vje;return"".concat(t||"").concat(n)},Vi=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!lt(t)&&!AS(t))return r;var i;if(jp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return $S(i)&&(i=r),o&&i>n&&(i=n),i},zd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Hje=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xje(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function I_(e){"@babel/helpers - typeof";return I_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I_(e)}var Y3={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},ku=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},X3=null,T$=null,yj=function e(t){if(t===X3&&Array.isArray(T$))return T$;var n=[];return y.Children.forEach(t,function(r){Vt(r)||(Hbe.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),T$=n,X3=t,n};function qi(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return ku(o)}):r=[ku(t)],yj(e).forEach(function(o){var i=es(o,"type.displayName")||es(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Ba(e,t){var n=qi(e,t);return n&&n[0]}var Q3=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!lt(r)||r<=0||!lt(o)||o<=0)},Qje=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],Jje=function(t){return t&&t.type&&AS(t.type)&&Qje.indexOf(t.type)>=0},Zje=function(t){return t&&I_(t)==="object"&&"clipDot"in t},eBe=function(t,n,r,o){var i,a=(i=P$==null?void 0:P$[o])!==null&&i!==void 0?i:[];return!Gt(t)&&(o&&a.includes(n)||Gje.includes(n))||r&&gj.includes(n)},_t=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(y.isValidElement(t)&&(o=t.props),!Lv(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;eBe((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},k_=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return J3(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function iBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A_(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=oBe(e,rBe),u=o||{width:n,height:r,x:0,y:0},d=fe("recharts-surface",i);return J.createElement("svg",M_({},_t(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),J.createElement("title",null,s),J.createElement("desc",null,l),t)}var aBe=["children","className"];function $_(){return $_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function lBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Pn=J.forwardRef(function(e,t){var n=e.children,r=e.className,o=sBe(e,aBe),i=fe("recharts-layer",r);return J.createElement("g",$_({className:i},_t(o,!0),{ref:t}),n)}),ql=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:dBe(e,t,n)}var pBe=fBe,hBe="\\ud800-\\udfff",mBe="\\u0300-\\u036f",gBe="\\ufe20-\\ufe2f",yBe="\\u20d0-\\u20ff",vBe=mBe+gBe+yBe,bBe="\\ufe0e\\ufe0f",wBe="\\u200d",xBe=RegExp("["+wBe+hBe+vBe+bBe+"]");function SBe(e){return xBe.test(e)}var Gee=SBe;function CBe(e){return e.split("")}var PBe=CBe,qee="\\ud800-\\udfff",TBe="\\u0300-\\u036f",EBe="\\ufe20-\\ufe2f",OBe="\\u20d0-\\u20ff",IBe=TBe+EBe+OBe,kBe="\\ufe0e\\ufe0f",MBe="["+qee+"]",R_="["+IBe+"]",__="\\ud83c[\\udffb-\\udfff]",ABe="(?:"+R_+"|"+__+")",Kee="[^"+qee+"]",Yee="(?:\\ud83c[\\udde6-\\uddff]){2}",Xee="[\\ud800-\\udbff][\\udc00-\\udfff]",$Be="\\u200d",Qee=ABe+"?",Jee="["+kBe+"]?",RBe="(?:"+$Be+"(?:"+[Kee,Yee,Xee].join("|")+")"+Jee+Qee+")*",_Be=Jee+Qee+RBe,DBe="(?:"+[Kee+R_+"?",R_,Yee,Xee,MBe].join("|")+")",NBe=RegExp(__+"(?="+__+")|"+DBe+_Be,"g");function LBe(e){return e.match(NBe)||[]}var FBe=LBe,jBe=PBe,BBe=Gee,zBe=FBe;function VBe(e){return BBe(e)?zBe(e):jBe(e)}var HBe=VBe,UBe=pBe,WBe=Gee,GBe=HBe,qBe=Vee;function KBe(e){return function(t){t=qBe(t);var n=WBe(t)?GBe(t):void 0,r=n?n[0]:t.charAt(0),o=n?UBe(n,1).join(""):t.slice(1);return r[e]()+o}}var YBe=KBe,XBe=YBe,QBe=XBe("toUpperCase"),JBe=QBe;const WI=Rn(JBe);function br(e){return function(){return e}}const Zee=Math.cos,BT=Math.sin,ac=Math.sqrt,zT=Math.PI,GI=2*zT,D_=Math.PI,N_=2*D_,Op=1e-6,ZBe=N_-Op;function ete(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return ete;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oOp)if(!(Math.abs(d*l-c*u)>Op)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-a,m=o-s,g=l*l+c*c,v=h*h+m*m,w=Math.sqrt(g),x=Math.sqrt(f),S=i*Math.tan((D_-Math.acos((g+f-v)/(2*w*x)))/2),P=S/x,T=S/w;Math.abs(P-1)>Op&&this._append`L${t+P*u},${n+P*d}`,this._append`A${i},${i},0,0,${+(d*h>u*m)},${this._x1=t+T*l},${this._y1=n+T*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Op||Math.abs(this._y1-u)>Op)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%N_+N_),f>ZBe?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Op&&this._append`A${r},${r},0,${+(f>=D_)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function vj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new tze(t)}function bj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function tte(e){this._context=e}tte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function qI(e){return new tte(e)}function nte(e){return e[0]}function rte(e){return e[1]}function ote(e,t){var n=br(!0),r=null,o=qI,i=null,a=vj(s);e=typeof e=="function"?e:e===void 0?nte:br(e),t=typeof t=="function"?t:t===void 0?rte:br(t);function s(l){var c,u=(l=bj(l)).length,d,f=!1,h;for(r==null&&(i=o(h=a())),c=0;c<=u;++c)!(c=h;--m)s.point(S[m],P[m]);s.lineEnd(),s.areaEnd()}w&&(S[f]=+e(v,f,d),P[f]=+t(v,f,d),s.point(r?+r(v,f,d):S[f],n?+n(v,f,d):P[f]))}if(x)return s=null,x+""||null}function u(){return ote().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:br(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:br(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:br(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:br(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:br(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:br(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(o=typeof d=="function"?d:br(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class ite{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function nze(e){return new ite(e,!0)}function rze(e){return new ite(e,!1)}const wj={draw(e,t){const n=ac(t/zT);e.moveTo(n,0),e.arc(0,0,n,0,GI)}},oze={draw(e,t){const n=ac(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},ate=ac(1/3),ize=ate*2,aze={draw(e,t){const n=ac(t/ize),r=n*ate;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},sze={draw(e,t){const n=ac(t),r=-n/2;e.rect(r,r,n,n)}},lze=.8908130915292852,ste=BT(zT/10)/BT(7*zT/10),cze=BT(GI/10)*ste,uze=-Zee(GI/10)*ste,dze={draw(e,t){const n=ac(t*lze),r=cze*n,o=uze*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=GI*i/5,s=Zee(a),l=BT(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},E$=ac(3),fze={draw(e,t){const n=-ac(t/(E$*3));e.moveTo(0,n*2),e.lineTo(-E$*n,-n),e.lineTo(E$*n,-n),e.closePath()}},Os=-.5,Is=ac(3)/2,L_=1/ac(12),pze=(L_/2+1)*3,hze={draw(e,t){const n=ac(t/pze),r=n/2,o=n*L_,i=r,a=n*L_+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Os*r-Is*o,Is*r+Os*o),e.lineTo(Os*i-Is*a,Is*i+Os*a),e.lineTo(Os*s-Is*l,Is*s+Os*l),e.lineTo(Os*r+Is*o,Os*o-Is*r),e.lineTo(Os*i+Is*a,Os*a-Is*i),e.lineTo(Os*s+Is*l,Os*l-Is*s),e.closePath()}};function mze(e,t){let n=null,r=vj(o);e=typeof e=="function"?e:br(e||wj),t=typeof t=="function"?t:br(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:br(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:br(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function VT(){}function HT(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function lte(e){this._context=e}lte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:HT(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:HT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function gze(e){return new lte(e)}function cte(e){this._context=e}cte.prototype={areaStart:VT,areaEnd:VT,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:HT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yze(e){return new cte(e)}function ute(e){this._context=e}ute.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:HT(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function vze(e){return new ute(e)}function dte(e){this._context=e}dte.prototype={areaStart:VT,areaEnd:VT,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function bze(e){return new dte(e)}function eW(e){return e<0?-1:1}function tW(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(eW(i)+eW(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function nW(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function O$(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function UT(e){this._context=e}UT.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:O$(this,this._t0,nW(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,O$(this,nW(this,n=tW(this,e,t)),n);break;default:O$(this,this._t0,n=tW(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function fte(e){this._context=new pte(e)}(fte.prototype=Object.create(UT.prototype)).point=function(e,t){UT.prototype.point.call(this,t,e)};function pte(e){this._context=e}pte.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function wze(e){return new UT(e)}function xze(e){return new fte(e)}function hte(e){this._context=e}hte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=rW(e),o=rW(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Cze(e){return new KI(e,.5)}function Pze(e){return new KI(e,0)}function Tze(e){return new KI(e,1)}function Fy(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function Eze(e,t){return e[t]}function Oze(e){const t=[];return t.key=e,t}function Ize(){var e=br([]),t=F_,n=Fy,r=Eze;function o(i){var a=Array.from(e.apply(this,arguments),Oze),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Lze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var mte={symbolCircle:wj,symbolCross:oze,symbolDiamond:aze,symbolSquare:sze,symbolStar:dze,symbolTriangle:fze,symbolWye:hze},Fze=Math.PI/180,jze=function(t){var n="symbol".concat(WI(t));return mte[n]||wj},Bze=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*Fze;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},zze=function(t,n){mte["symbol".concat(WI(t))]=n},YI=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=Nze(t,$ze),c=iW(iW({},l),{},{type:r,size:i,sizeType:s}),u=function(){var v=jze(r),w=mze().type(v).size(Bze(i,s,r));return w()},d=c.className,f=c.cx,h=c.cy,m=_t(c,!0);return f===+f&&h===+h&&i===+i?J.createElement("path",j_({},m,{className:fe("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(h,")"),d:u()})):null};YI.registerSymbol=zze;function jy(e){"@babel/helpers - typeof";return jy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jy(e)}function B_(){return B_=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(!o)return;function w(x){x.defaultPrevented||x.key==="Escape"&&(r==null||r(x,"escapeKeyDown"))}return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w)}},[o,r]);const s=Go((w,x)=>{r==null||r(w,x)}),l=Go(w=>{!r||w==null||a.start(w,()=>{s(null,"timeout")})});y.useEffect(()=>(o&&l(t),a.clear),[o,t,l,a]);const c=w=>{r==null||r(w,"clickaway")},u=a.clear,d=y.useCallback(()=>{t!=null&&l(i??t*.5)},[t,i,l]),f=w=>x=>{const S=w.onBlur;S==null||S(x),d()},p=w=>x=>{const S=w.onFocus;S==null||S(x),u()},m=w=>x=>{const S=w.onMouseEnter;S==null||S(x),u()},g=w=>x=>{const S=w.onMouseLeave;S==null||S(x),d()};return y.useEffect(()=>{if(!n&&o)return window.addEventListener("focus",d),window.addEventListener("blur",u),()=>{window.removeEventListener("focus",d),window.removeEventListener("blur",u)}},[n,o,d,u]),{getRootProps:(w={})=>{const x={...cT(e),...cT(w)};return{role:"presentation",...w,...x,onBlur:f(x),onFocus:p(x),onMouseEnter:m(x),onMouseLeave:g(x)}},onClickAway:c}}function QMe(e){return tt("MuiSnackbarContent",e)}ot("MuiSnackbarContent",["root","message","action"]);const JMe=e=>{const{classes:t}=e;return rt({root:["root"],action:["action"],message:["message"]},QMe,t)},ZMe=oe(uo,{name:"MuiSnackbarContent",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?.8:.98,n=fX(e.palette.background.default,t);return{...e.typography.body2,color:e.vars?e.vars.palette.SnackbarContent.color:e.palette.getContrastText(n),backgroundColor:e.vars?e.vars.palette.SnackbarContent.bg:n,display:"flex",alignItems:"center",flexWrap:"wrap",padding:"6px 16px",borderRadius:(e.vars||e).shape.borderRadius,flexGrow:1,[e.breakpoints.up("sm")]:{flexGrow:"initial",minWidth:288}}})),eAe=oe("div",{name:"MuiSnackbarContent",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0"}),tAe=oe("div",{name:"MuiSnackbarContent",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8}),nAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbarContent"}),{action:o,className:i,message:a,role:s="alert",...l}=r,c=r,u=JMe(c);return $.jsxs(ZMe,{role:s,square:!0,elevation:6,className:de(u.root,i),ownerState:c,ref:n,...l,children:[$.jsx(eAe,{className:u.message,ownerState:c,children:a}),o?$.jsx(tAe,{className:u.action,ownerState:c,children:o}):null]})});function rAe(e){return tt("MuiSnackbar",e)}ot("MuiSnackbar",["root","anchorOriginTopCenter","anchorOriginBottomCenter","anchorOriginTopRight","anchorOriginBottomRight","anchorOriginTopLeft","anchorOriginBottomLeft"]);const oAe=e=>{const{classes:t,anchorOrigin:n}=e,r={root:["root",`anchorOrigin${Ce(n.vertical)}${Ce(n.horizontal)}`]};return rt(r,rAe,t)},mU=oe("div",{name:"MuiSnackbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`anchorOrigin${Ce(n.anchorOrigin.vertical)}${Ce(n.anchorOrigin.horizontal)}`]]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.snackbar,position:"fixed",display:"flex",left:8,right:8,justifyContent:"center",alignItems:"center",variants:[{props:({ownerState:t})=>t.anchorOrigin.vertical==="top",style:{top:8,[e.breakpoints.up("sm")]:{top:24}}},{props:({ownerState:t})=>t.anchorOrigin.vertical!=="top",style:{bottom:8,[e.breakpoints.up("sm")]:{bottom:24}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="left",style:{justifyContent:"flex-start",[e.breakpoints.up("sm")]:{left:24,right:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="right",style:{justifyContent:"flex-end",[e.breakpoints.up("sm")]:{right:24,left:"auto"}}},{props:({ownerState:t})=>t.anchorOrigin.horizontal==="center",style:{[e.breakpoints.up("sm")]:{left:"50%",right:"auto",transform:"translateX(-50%)"}}}]}))),_Z=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSnackbar"}),o=Ei(),i={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{action:a,anchorOrigin:{vertical:s,horizontal:l}={vertical:"bottom",horizontal:"left"},autoHideDuration:c=null,children:u,className:d,ClickAwayListenerProps:f,ContentProps:p,disableWindowBlurListener:m=!1,message:g,onBlur:v,onClose:w,onFocus:x,onMouseEnter:S,onMouseLeave:P,open:T,resumeHideDuration:E,TransitionComponent:O=kf,transitionDuration:k=i,TransitionProps:{onEnter:A,onExited:I,...R}={},...N}=r,L={...r,anchorOrigin:{vertical:s,horizontal:l},autoHideDuration:c,disableWindowBlurListener:m,TransitionComponent:O,transitionDuration:k},j=oAe(L),{getRootProps:_,onClickAway:D}=XMe({...L}),[z,F]=y.useState(!0),H=Bc({elementType:mU,getSlotProps:_,externalForwardedProps:N,ownerState:L,additionalProps:{ref:n},className:[j.root,d]}),U=X=>{F(!0),I&&I(X)},q=(X,ae)=>{F(!1),A&&A(X,ae)};return!T&&z?null:$.jsx(qF,{onClickAway:D,...f,children:$.jsx(mU,{...H,children:$.jsx(O,{appear:!0,in:T,timeout:k,direction:s==="top"?"down":"up",onEnter:q,onExited:U,...R,children:u||$.jsx(nAe,{message:g,action:a,...p})})})})});function iAe(e){return tt("MuiTooltip",e)}const zr=ot("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function aAe(e){return Math.round(e*1e5)/1e5}const sAe=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch",`tooltipPlacement${Ce(i.split("-")[0])}`],arrow:["arrow"]};return rt(a,iAe,t)},lAe=oe(Hf,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Ze(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${zr.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${zr.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${zr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${zr.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${zr.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${zr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${zr.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${zr.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),cAe=oe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${Ce(n.placement.split("-")[0])}`]]}})(Ze(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:mt(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${zr.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${zr.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${zr.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${zr.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${aAe(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${zr.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${zr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${zr.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${zr.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${zr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${zr.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${zr.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${zr.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${zr.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${zr.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),uAe=oe("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})(Ze(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:mt(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let LC=!1;const gU=new hX;let l0={x:0,y:0};function FC(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const ac=y.forwardRef(function(t,n){var Kr,Ii,ys;const r=it({props:t,name:"MuiTooltip"}),{arrow:o=!1,children:i,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:g=0,enterTouchDelay:v=700,followCursor:w=!1,id:x,leaveDelay:S=0,leaveTouchDelay:P=1500,onClose:T,onOpen:E,open:O,placement:k="bottom",PopperComponent:A,PopperProps:I={},slotProps:R={},slots:N={},title:L,TransitionComponent:j=kf,TransitionProps:_,...D}=r,z=y.isValidElement(i)?i:$.jsx("span",{children:i}),F=Ei(),H=nr(),[U,q]=y.useState(),[X,ae]=y.useState(null),Z=y.useRef(!1),K=f||w,te=tf(),pe=tf(),ie=tf(),le=tf(),[re,fe]=ku({controlled:O,default:!1,name:"Tooltip",state:"open"});let ee=re;const ce=wh(x),me=y.useRef(),we=Go(()=>{me.current!==void 0&&(document.body.style.WebkitUserSelect=me.current,me.current=void 0),le.clear()});y.useEffect(()=>we,[we]);const ge=Wt=>{gU.clear(),LC=!0,fe(!0),E&&!ee&&E(Wt)},Se=Go(Wt=>{gU.start(800+S,()=>{LC=!1}),fe(!1),T&&ee&&T(Wt),te.start(F.transitions.duration.shortest,()=>{Z.current=!1})}),xe=Wt=>{Z.current&&Wt.type!=="touchstart"||(U&&U.removeAttribute("title"),pe.clear(),ie.clear(),m||LC&&g?pe.start(LC?g:m,()=>{ge(Wt)}):ge(Wt))},Ie=Wt=>{pe.clear(),ie.start(S,()=>{Se(Wt)})},[,Re]=y.useState(!1),_e=Wt=>{lT(Wt.target)||(Re(!1),Ie(Wt))},ye=Wt=>{U||q(Wt.currentTarget),lT(Wt.target)&&(Re(!0),xe(Wt))},Te=Wt=>{Z.current=!0;const Xo=z.props;Xo.onTouchStart&&Xo.onTouchStart(Wt)},Oe=Wt=>{Te(Wt),ie.clear(),te.clear(),we(),me.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",le.start(v,()=>{document.body.style.WebkitUserSelect=me.current,xe(Wt)})},Me=Wt=>{z.props.onTouchEnd&&z.props.onTouchEnd(Wt),we(),ie.start(P,()=>{Se(Wt)})};y.useEffect(()=>{if(!ee)return;function Wt(Xo){Xo.key==="Escape"&&Se(Xo)}return document.addEventListener("keydown",Wt),()=>{document.removeEventListener("keydown",Wt)}},[Se,ee]);const We=Cr(Lf(z),q,n);!L&&L!==0&&(ee=!1);const Ve=y.useRef(),Qe=Wt=>{const Xo=z.props;Xo.onMouseMove&&Xo.onMouseMove(Wt),l0={x:Wt.clientX,y:Wt.clientY},Ve.current&&Ve.current.update()},ut={},nt=typeof L=="string";c?(ut.title=!ee&&nt&&!d?L:null,ut["aria-describedby"]=ee?ce:null):(ut["aria-label"]=nt?L:null,ut["aria-labelledby"]=ee&&!nt?ce:null);const et={...ut,...D,...z.props,className:de(D.className,z.props.className),onTouchStart:Te,ref:We,...w?{onMouseMove:Qe}:{}},yt={};p||(et.onTouchStart=Oe,et.onTouchEnd=Me),d||(et.onMouseOver=FC(xe,et.onMouseOver),et.onMouseLeave=FC(Ie,et.onMouseLeave),K||(yt.onMouseOver=xe,yt.onMouseLeave=Ie)),u||(et.onFocus=FC(ye,et.onFocus),et.onBlur=FC(_e,et.onBlur),K||(yt.onFocus=ye,yt.onBlur=_e));const wn=y.useMemo(()=>{var Xo;let Wt=[{name:"arrow",enabled:!!X,options:{element:X,padding:4}}];return(Xo=I.popperOptions)!=null&&Xo.modifiers&&(Wt=Wt.concat(I.popperOptions.modifiers)),{...I.popperOptions,modifiers:Wt}},[X,I]),Ke={...r,isRtl:H,arrow:o,disableInteractive:K,placement:k,PopperComponentProp:A,touch:Z.current},$e=sAe(Ke),Xe=N.popper??s.Popper??lAe,bt=N.transition??s.Transition??j??kf,Vt=N.tooltip??s.Tooltip??cAe,Ot=N.arrow??s.Arrow??uAe,un=bg(Xe,{...I,...R.popper??l.popper,className:de($e.popper,I==null?void 0:I.className,(Kr=R.popper??l.popper)==null?void 0:Kr.className)},Ke),jn=bg(bt,{..._,...R.transition??l.transition},Ke),Wn=bg(Vt,{...R.tooltip??l.tooltip,className:de($e.tooltip,(Ii=R.tooltip??l.tooltip)==null?void 0:Ii.className)},Ke),Eo=bg(Ot,{...R.arrow??l.arrow,className:de($e.arrow,(ys=R.arrow??l.arrow)==null?void 0:ys.className)},Ke);return $.jsxs(y.Fragment,{children:[y.cloneElement(z,et),$.jsx(Xe,{as:A??Hf,placement:k,anchorEl:w?{getBoundingClientRect:()=>({top:l0.y,left:l0.x,right:l0.x,bottom:l0.y,width:0,height:0})}:U,popperRef:Ve,open:U?ee:!1,id:ce,transition:!0,...yt,...un,popperOptions:wn,children:({TransitionProps:Wt})=>$.jsx(bt,{timeout:F.transitions.duration.shorter,...Wt,...jn,children:$.jsxs(Vt,{...Wn,children:[L,o?$.jsx(Ot,{...Eo,ref:ae}):null]})})})]})}),Gt=gwe({createStyledComponent:oe("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>it({props:e,name:"MuiStack"})}),MS=y.createContext({}),jI=y.createContext({});function dAe(e){return tt("MuiStep",e)}ot("MuiStep",["root","horizontal","vertical","alternativeLabel","completed"]);const fAe=e=>{const{classes:t,orientation:n,alternativeLabel:r,completed:o}=e;return rt({root:["root",n,r&&"alternativeLabel",o&&"completed"]},dAe,t)},pAe=oe("div",{name:"MuiStep",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({variants:[{props:{orientation:"horizontal"},style:{paddingLeft:8,paddingRight:8}},{props:{alternativeLabel:!0},style:{flex:1,position:"relative"}}]}),Wm=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStep"}),{active:o,children:i,className:a,component:s="div",completed:l,disabled:c,expanded:u=!1,index:d,last:f,...p}=r,{activeStep:m,connector:g,alternativeLabel:v,orientation:w,nonLinear:x}=y.useContext(MS);let[S=!1,P=!1,T=!1]=[o,l,c];m===d?S=o!==void 0?o:!0:!x&&m>d?P=l!==void 0?l:!0:!x&&m({index:d,last:f,expanded:u,icon:d+1,active:S,completed:P,disabled:T}),[d,f,u,S,P,T]),O={...r,active:S,orientation:w,alternativeLabel:v,completed:P,disabled:T,expanded:u,component:s},k=fAe(O),A=$.jsxs(pAe,{as:s,className:de(k.root,a),ref:n,ownerState:O,...p,children:[g&&v&&d!==0?g:null,i]});return $.jsx(jI.Provider,{value:E,children:g&&!v&&d!==0?$.jsxs(y.Fragment,{children:[g,A]}):A})}),hAe=lt($.jsx("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"}),"CheckCircle"),mAe=lt($.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"Warning");function gAe(e){return tt("MuiStepIcon",e)}const E$=ot("MuiStepIcon",["root","active","completed","error","text"]);var yU;const yAe=e=>{const{classes:t,active:n,completed:r,error:o}=e;return rt({root:["root",n&&"active",r&&"completed",o&&"error"],text:["text"]},gAe,t)},O$=oe(jw,{name:"MuiStepIcon",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),color:(e.vars||e).palette.text.disabled,[`&.${E$.completed}`]:{color:(e.vars||e).palette.primary.main},[`&.${E$.active}`]:{color:(e.vars||e).palette.primary.main},[`&.${E$.error}`]:{color:(e.vars||e).palette.error.main}}))),vAe=oe("text",{name:"MuiStepIcon",slot:"Text",overridesResolver:(e,t)=>t.text})(Ze(({theme:e})=>({fill:(e.vars||e).palette.primary.contrastText,fontSize:e.typography.caption.fontSize,fontFamily:e.typography.fontFamily}))),bAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepIcon"}),{active:o=!1,className:i,completed:a=!1,error:s=!1,icon:l,...c}=r,u={...r,active:o,completed:a,error:s},d=yAe(u);if(typeof l=="number"||typeof l=="string"){const f=de(i,d.root);return s?$.jsx(O$,{as:mAe,className:f,ref:n,ownerState:u,...c}):a?$.jsx(O$,{as:hAe,className:f,ref:n,ownerState:u,...c}):$.jsxs(O$,{className:f,ref:n,ownerState:u,...c,children:[yU||(yU=$.jsx("circle",{cx:"12",cy:"12",r:"12"})),$.jsx(vAe,{className:d.text,x:"12",y:"12",textAnchor:"middle",dominantBaseline:"central",ownerState:u,children:l})]})}return l});function wAe(e){return tt("MuiStepLabel",e)}const of=ot("MuiStepLabel",["root","horizontal","vertical","label","active","completed","error","disabled","iconContainer","alternativeLabel","labelContainer"]),xAe=e=>{const{classes:t,orientation:n,active:r,completed:o,error:i,disabled:a,alternativeLabel:s}=e;return rt({root:["root",n,i&&"error",a&&"disabled",s&&"alternativeLabel"],label:["label",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],iconContainer:["iconContainer",r&&"active",o&&"completed",i&&"error",a&&"disabled",s&&"alternativeLabel"],labelContainer:["labelContainer",s&&"alternativeLabel"]},wAe,t)},SAe=oe("span",{name:"MuiStepLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation]]}})({display:"flex",alignItems:"center",[`&.${of.alternativeLabel}`]:{flexDirection:"column"},[`&.${of.disabled}`]:{cursor:"default"},variants:[{props:{orientation:"vertical"},style:{textAlign:"left",padding:"8px 0"}}]}),CAe=oe("span",{name:"MuiStepLabel",slot:"Label",overridesResolver:(e,t)=>t.label})(Ze(({theme:e})=>({...e.typography.body2,display:"block",transition:e.transitions.create("color",{duration:e.transitions.duration.shortest}),[`&.${of.active}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${of.completed}`]:{color:(e.vars||e).palette.text.primary,fontWeight:500},[`&.${of.alternativeLabel}`]:{marginTop:16},[`&.${of.error}`]:{color:(e.vars||e).palette.error.main}}))),PAe=oe("span",{name:"MuiStepLabel",slot:"IconContainer",overridesResolver:(e,t)=>t.iconContainer})({flexShrink:0,display:"flex",paddingRight:8,[`&.${of.alternativeLabel}`]:{paddingRight:0}}),TAe=oe("span",{name:"MuiStepLabel",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(Ze(({theme:e})=>({width:"100%",color:(e.vars||e).palette.text.secondary,[`&.${of.alternativeLabel}`]:{textAlign:"center"}}))),Nd=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepLabel"}),{children:o,className:i,componentsProps:a={},error:s=!1,icon:l,optional:c,slots:u={},slotProps:d={},StepIconComponent:f,StepIconProps:p,...m}=r,{alternativeLabel:g,orientation:v}=y.useContext(MS),{active:w,disabled:x,completed:S,icon:P}=y.useContext(jI),T=l||P;let E=f;T&&!E&&(E=bAe);const O={...r,active:w,alternativeLabel:g,completed:S,disabled:x,error:s,orientation:v},k=xAe(O),A={slots:u,slotProps:{stepIcon:p,...a,...d}},[I,R]=hr("label",{elementType:CAe,externalForwardedProps:A,ownerState:O}),[N,L]=hr("stepIcon",{elementType:E,externalForwardedProps:A,ownerState:O});return $.jsxs(SAe,{className:de(k.root,i),ref:n,ownerState:O,...m,children:[T||N?$.jsx(PAe,{className:k.iconContainer,ownerState:O,children:$.jsx(N,{completed:S,active:w,error:s,icon:T,...L})}):null,$.jsxs(TAe,{className:k.labelContainer,ownerState:O,children:[o?$.jsx(I,{...R,className:de(k.label,R==null?void 0:R.className),children:o}):null,c]})]})});Nd&&(Nd.muiName="StepLabel");function EAe(e){return tt("MuiStepConnector",e)}ot("MuiStepConnector",["root","horizontal","vertical","alternativeLabel","active","completed","disabled","line","lineHorizontal","lineVertical"]);const OAe=e=>{const{classes:t,orientation:n,alternativeLabel:r,active:o,completed:i,disabled:a}=e,s={root:["root",n,r&&"alternativeLabel",o&&"active",i&&"completed",a&&"disabled"],line:["line",`line${Ce(n)}`]};return rt(s,EAe,t)},IAe=oe("div",{name:"MuiStepConnector",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.completed&&t.completed]}})({flex:"1 1 auto",variants:[{props:{orientation:"vertical"},style:{marginLeft:12}},{props:{alternativeLabel:!0},style:{position:"absolute",top:12,left:"calc(-50% + 20px)",right:"calc(50% + 20px)"}}]}),kAe=oe("span",{name:"MuiStepConnector",slot:"Line",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.line,t[`line${Ce(n.orientation)}`]]}})(Ze(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600];return{display:"block",borderColor:e.vars?e.vars.palette.StepConnector.border:t,variants:[{props:{orientation:"horizontal"},style:{borderTopStyle:"solid",borderTopWidth:1}},{props:{orientation:"vertical"},style:{borderLeftStyle:"solid",borderLeftWidth:1,minHeight:24}}]}})),MAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepConnector"}),{className:o,...i}=r,{alternativeLabel:a,orientation:s="horizontal"}=y.useContext(MS),{active:l,disabled:c,completed:u}=y.useContext(jI),d={...r,alternativeLabel:a,orientation:s,active:l,completed:u,disabled:c},f=OAe(d);return $.jsx(IAe,{className:de(f.root,o),ref:n,ownerState:d,...i,children:$.jsx(kAe,{className:f.line,ownerState:d})})});function AAe(e){return tt("MuiStepContent",e)}ot("MuiStepContent",["root","last","transition"]);const $Ae=e=>{const{classes:t,last:n}=e;return rt({root:["root",n&&"last"],transition:["transition"]},AAe,t)},RAe=oe("div",{name:"MuiStepContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.last&&t.last]}})(Ze(({theme:e})=>({marginLeft:12,paddingLeft:20,paddingRight:8,borderLeft:e.vars?`1px solid ${e.vars.palette.StepContent.border}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[600]}`,variants:[{props:{last:!0},style:{borderLeft:"none"}}]}))),_Ae=oe(Zs,{name:"MuiStepContent",slot:"Transition",overridesResolver:(e,t)=>t.transition})({}),Gm=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepContent"}),{children:o,className:i,TransitionComponent:a=Zs,transitionDuration:s="auto",TransitionProps:l,...c}=r;y.useContext(MS);const{active:u,last:d,expanded:f}=y.useContext(jI),p={...r,last:d},m=$Ae(p);let g=s;return s==="auto"&&!a.muiSupportAuto&&(g=void 0),$.jsx(RAe,{className:de(m.root,i),ref:n,ownerState:p,...c,children:$.jsx(_Ae,{as:a,in:u||f,className:m.transition,ownerState:p,timeout:g,unmountOnExit:!0,...l,children:o})})});function DAe(e){return tt("MuiStepper",e)}ot("MuiStepper",["root","horizontal","vertical","nonLinear","alternativeLabel"]);const NAe=e=>{const{orientation:t,nonLinear:n,alternativeLabel:r,classes:o}=e;return rt({root:["root",t,n&&"nonLinear",r&&"alternativeLabel"]},DAe,o)},LAe=oe("div",{name:"MuiStepper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.alternativeLabel&&t.alternativeLabel,n.nonLinear&&t.nonLinear]}})({display:"flex",variants:[{props:{orientation:"horizontal"},style:{flexDirection:"row",alignItems:"center"}},{props:{orientation:"vertical"},style:{flexDirection:"column"}},{props:{alternativeLabel:!0},style:{alignItems:"flex-start"}}]}),FAe=$.jsx(MAe,{}),jAe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiStepper"}),{activeStep:o=0,alternativeLabel:i=!1,children:a,className:s,component:l="div",connector:c=FAe,nonLinear:u=!1,orientation:d="horizontal",...f}=r,p={...r,nonLinear:u,alternativeLabel:i,orientation:d,component:l},m=NAe(p),g=y.Children.toArray(a).filter(Boolean),v=g.map((x,S)=>y.cloneElement(x,{index:S,last:S+1===g.length,...x.props})),w=y.useMemo(()=>({activeStep:o,alternativeLabel:i,connector:c,nonLinear:u,orientation:d}),[o,i,c,u,d]);return $.jsx(MS.Provider,{value:w,children:$.jsx(LAe,{as:l,ownerState:p,className:de(m.root,s),ref:n,...f,children:v})})});function BAe(e){return tt("MuiSwitch",e)}const _i=ot("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),zAe=e=>{const{classes:t,edge:n,size:r,color:o,checked:i,disabled:a}=e,s={root:["root",n&&`edge${Ce(n)}`,`size${Ce(r)}`],switchBase:["switchBase",`color${Ce(o)}`,i&&"checked",a&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},l=rt(s,BAe,t);return{...t,...l}},VAe=oe("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.edge&&t[`edge${Ce(n.edge)}`],t[`size${Ce(n.size)}`]]}})({display:"inline-flex",width:34+12*2,height:14+12*2,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${_i.thumb}`]:{width:16,height:16},[`& .${_i.switchBase}`]:{padding:4,[`&.${_i.checked}`]:{transform:"translateX(16px)"}}}}]}),HAe=oe(hZ,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.switchBase,{[`& .${_i.input}`]:t.input},n.color!=="default"&&t[`color${Ce(n.color)}`]]}})(Ze(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${e.palette.mode==="light"?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${_i.checked}`]:{transform:"translateX(20px)"},[`&.${_i.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${e.palette.mode==="light"?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${_i.checked} + .${_i.track}`]:{opacity:.5},[`&.${_i.disabled} + .${_i.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:`${e.palette.mode==="light"?.12:.2}`},[`& .${_i.input}`]:{left:"-100%",width:"300%"}})),Ze(({theme:e})=>({"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(zn(["light"])).map(([t])=>({props:{color:t},style:{[`&.${_i.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette[t].main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${_i.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${e.palette.mode==="light"?Vu(e.palette[t].main,.62):zu(e.palette[t].main,.55)}`}},[`&.${_i.checked} + .${_i.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),UAe=oe("span",{name:"MuiSwitch",slot:"Track",overridesResolver:(e,t)=>t.track})(Ze(({theme:e})=>({height:"100%",width:"100%",borderRadius:14/2,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),backgroundColor:e.vars?e.vars.palette.common.onBackground:`${e.palette.mode==="light"?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:`${e.palette.mode==="light"?.38:.3}`}))),WAe=oe("span",{name:"MuiSwitch",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(Ze(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",width:20,height:20,borderRadius:"50%"}))),qf=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiSwitch"}),{className:o,color:i="primary",edge:a=!1,size:s="medium",sx:l,...c}=r,u={...r,color:i,edge:a,size:s},d=zAe(u),f=$.jsx(WAe,{className:d.thumb,ownerState:u});return $.jsxs(VAe,{className:de(d.root,o),sx:l,ownerState:u,children:[$.jsx(HAe,{type:"checkbox",icon:f,checkedIcon:f,ref:n,ownerState:u,...c,classes:{...d,root:d.switchBase}}),$.jsx(UAe,{className:d.track,ownerState:u})]})});function GAe(e){return tt("MuiTab",e)}const Os=ot("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper","icon"]),qAe=e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:o,icon:i,label:a,selected:s,disabled:l}=e,c={root:["root",i&&a&&"labelIcon",`textColor${Ce(n)}`,r&&"fullWidth",o&&"wrapped",s&&"selected",l&&"disabled"],icon:["iconWrapper","icon"]};return rt(c,GAe,t)},KAe=oe(Ki,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t[`textColor${Ce(n.textColor)}`],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped,{[`& .${Os.iconWrapper}`]:t.iconWrapper},{[`& .${Os.icon}`]:t.icon}]}})(Ze(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:t})=>t.label&&(t.iconPosition==="top"||t.iconPosition==="bottom"),style:{flexDirection:"column"}},{props:({ownerState:t})=>t.label&&t.iconPosition!=="top"&&t.iconPosition!=="bottom",style:{flexDirection:"row"}},{props:({ownerState:t})=>t.icon&&t.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="top",style:{[`& > .${Os.icon}`]:{marginBottom:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="bottom",style:{[`& > .${Os.icon}`]:{marginTop:6}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="start",style:{[`& > .${Os.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:t,iconPosition:n})=>t.icon&&t.label&&n==="end",style:{[`& > .${Os.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Os.selected}`]:{opacity:1},[`&.${Os.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Os.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Os.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Os.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Os.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:t})=>t.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:t})=>t.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),vU=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTab"}),{className:o,disabled:i=!1,disableFocusRipple:a=!1,fullWidth:s,icon:l,iconPosition:c="top",indicator:u,label:d,onChange:f,onClick:p,onFocus:m,selected:g,selectionFollowsFocus:v,textColor:w="inherit",value:x,wrapped:S=!1,...P}=r,T={...r,disabled:i,disableFocusRipple:a,selected:g,icon:!!l,iconPosition:c,label:!!d,fullWidth:s,textColor:w,wrapped:S},E=qAe(T),O=l&&d&&y.isValidElement(l)?y.cloneElement(l,{className:de(E.icon,l.props.className)}):l,k=I=>{!g&&f&&f(I,x),p&&p(I)},A=I=>{v&&!g&&f&&f(I,x),m&&m(I)};return $.jsxs(KAe,{focusRipple:!a,className:de(E.root,o),ref:n,role:"tab","aria-selected":g,disabled:i,onClick:k,onFocus:A,ownerState:T,tabIndex:g?0:-1,...P,children:[c==="top"||c==="start"?$.jsxs(y.Fragment,{children:[O,d]}):$.jsxs(y.Fragment,{children:[d,O]}),u]})}),DZ=y.createContext();function YAe(e){return tt("MuiTable",e)}ot("MuiTable",["root","stickyHeader"]);const XAe=e=>{const{classes:t,stickyHeader:n}=e;return rt({root:["root",n&&"stickyHeader"]},YAe,t)},QAe=oe("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(Ze(({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:t})=>t.stickyHeader,style:{borderCollapse:"separate"}}]}))),bU="table",Xu=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTable"}),{className:o,component:i=bU,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=XAe(u),f=y.useMemo(()=>({padding:a,size:s,stickyHeader:l}),[a,s,l]);return $.jsx(DZ.Provider,{value:f,children:$.jsx(QAe,{as:i,role:i===bU?null:"table",ref:n,className:de(d.root,o),ownerState:u,...c})})}),BI=y.createContext();function JAe(e){return tt("MuiTableBody",e)}ot("MuiTableBody",["root"]);const ZAe=e=>{const{classes:t}=e;return rt({root:["root"]},JAe,t)},e$e=oe("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),t$e={variant:"body"},wU="tbody",Qu=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableBody"}),{className:o,component:i=wU,...a}=r,s={...r,component:i},l=ZAe(s);return $.jsx(BI.Provider,{value:t$e,children:$.jsx(e$e,{className:de(l.root,o),as:i,ref:n,role:i===wU?null:"rowgroup",ownerState:s,...a})})});function n$e(e){return tt("MuiTableCell",e)}const r$e=ot("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),o$e=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,s={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${Ce(r)}`,o!=="normal"&&`padding${Ce(o)}`,`size${Ce(i)}`]};return rt(s,n$e,t)},i$e=oe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${Ce(n.size)}`],n.padding!=="normal"&&t[`padding${Ce(n.padding)}`],n.align!=="inherit"&&t[`align${Ce(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(Ze(({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid + ${e.palette.mode==="light"?Vu(mt(e.palette.divider,1),.88):zu(mt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${r$e.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:t})=>t.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]}))),ke=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=y.useContext(DZ),m=y.useContext(BI),g=m&&m.variant==="head";let v;a?v=a:v=g?"th":"td";let w=l;v==="td"?w=void 0:!w&&g&&(w="col");const x=d||m&&m.variant,S={...r,align:o,component:v,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:x==="head"&&p&&p.stickyHeader,variant:x},P=o$e(S);let T=null;return u&&(T=u==="asc"?"ascending":"descending"),$.jsx(i$e,{as:v,ref:n,className:de(P.root,i),"aria-sort":T,scope:w,ownerState:S,...f})});function a$e(e){return tt("MuiTableContainer",e)}ot("MuiTableContainer",["root"]);const s$e=e=>{const{classes:t}=e;return rt({root:["root"]},a$e,t)},l$e=oe("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),Ju=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableContainer"}),{className:o,component:i="div",...a}=r,s={...r,component:i},l=s$e(s);return $.jsx(l$e,{ref:n,as:i,className:de(l.root,o),ownerState:s,...a})});function c$e(e){return tt("MuiTableHead",e)}ot("MuiTableHead",["root"]);const u$e=e=>{const{classes:t}=e;return rt({root:["root"]},c$e,t)},d$e=oe("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),f$e={variant:"head"},xU="thead",Yh=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableHead"}),{className:o,component:i=xU,...a}=r,s={...r,component:i},l=u$e(s);return $.jsx(BI.Provider,{value:f$e,children:$.jsx(d$e,{as:i,className:de(l.root,o),ref:n,role:i===xU?null:"rowgroup",ownerState:s,...a})})});function p$e(e){return tt("MuiToolbar",e)}ot("MuiToolbar",["root","gutters","regular","dense"]);const h$e=e=>{const{classes:t,disableGutters:n,variant:r}=e;return rt({root:["root",!n&&"gutters",r]},p$e,t)},m$e=oe("div",{name:"MuiToolbar",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableGutters&&t.gutters,t[n.variant]]}})(Ze(({theme:e})=>({position:"relative",display:"flex",alignItems:"center",variants:[{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}},{props:{variant:"dense"},style:{minHeight:48}},{props:{variant:"regular"},style:e.mixins.toolbar}]}))),NZ=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiToolbar"}),{className:o,component:i="div",disableGutters:a=!1,variant:s="regular",...l}=r,c={...r,component:i,disableGutters:a,variant:s},u=h$e(c);return $.jsx(m$e,{as:i,className:de(u.root,o),ref:n,ownerState:c,...l})}),LZ=lt($.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),FZ=lt($.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),g$e=y.forwardRef(function(t,n){const{backIconButtonProps:r,count:o,disabled:i=!1,getItemAriaLabel:a,nextIconButtonProps:s,onPageChange:l,page:c,rowsPerPage:u,showFirstButton:d,showLastButton:f,slots:p={},slotProps:m={},...g}=t,v=nr(),w=q=>{l(q,0)},x=q=>{l(q,c-1)},S=q=>{l(q,c+1)},P=q=>{l(q,Math.max(0,Math.ceil(o/u)-1))},T=p.firstButton??kn,E=p.lastButton??kn,O=p.nextButton??kn,k=p.previousButton??kn,A=p.firstButtonIcon??AZ,I=p.lastButtonIcon??$Z,R=p.nextButtonIcon??FZ,N=p.previousButtonIcon??LZ,L=v?E:T,j=v?O:k,_=v?k:O,D=v?T:E,z=v?m.lastButton:m.firstButton,F=v?m.nextButton:m.previousButton,H=v?m.previousButton:m.nextButton,U=v?m.firstButton:m.lastButton;return $.jsxs("div",{ref:n,...g,children:[d&&$.jsx(L,{onClick:w,disabled:i||c===0,"aria-label":a("first",c),title:a("first",c),...z,children:v?$.jsx(I,{...m.lastButtonIcon}):$.jsx(A,{...m.firstButtonIcon})}),$.jsx(j,{onClick:x,disabled:i||c===0,color:"inherit","aria-label":a("previous",c),title:a("previous",c),...F??r,children:v?$.jsx(R,{...m.nextButtonIcon}):$.jsx(N,{...m.previousButtonIcon})}),$.jsx(_,{onClick:S,disabled:i||(o!==-1?c>=Math.ceil(o/u)-1:!1),color:"inherit","aria-label":a("next",c),title:a("next",c),...H??s,children:v?$.jsx(N,{...m.previousButtonIcon}):$.jsx(R,{...m.nextButtonIcon})}),f&&$.jsx(D,{onClick:P,disabled:i||c>=Math.ceil(o/u)-1,"aria-label":a("last",c),title:a("last",c),...U,children:v?$.jsx(A,{...m.firstButtonIcon}):$.jsx(I,{...m.lastButtonIcon})})]})});function y$e(e){return tt("MuiTablePagination",e)}const ch=ot("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]);var SU;const v$e=oe(ke,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(Ze(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}}))),b$e=oe(NZ,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>({[`& .${ch.actions}`]:t.actions,...t.toolbar})})(Ze(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${ch.actions}`]:{flexShrink:0,marginLeft:20}}))),w$e=oe("div",{name:"MuiTablePagination",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})({flex:"1 1 100%"}),x$e=oe("p",{name:"MuiTablePagination",slot:"SelectLabel",overridesResolver:(e,t)=>t.selectLabel})(Ze(({theme:e})=>({...e.typography.body2,flexShrink:0}))),S$e=oe(Gf,{name:"MuiTablePagination",slot:"Select",overridesResolver:(e,t)=>({[`& .${ch.selectIcon}`]:t.selectIcon,[`& .${ch.select}`]:t.select,...t.input,...t.selectRoot})})({color:"inherit",fontSize:"inherit",flexShrink:0,marginRight:32,marginLeft:8,[`& .${ch.select}`]:{paddingLeft:8,paddingRight:24,textAlign:"right",textAlignLast:"right"}}),C$e=oe(Yt,{name:"MuiTablePagination",slot:"MenuItem",overridesResolver:(e,t)=>t.menuItem})({}),P$e=oe("p",{name:"MuiTablePagination",slot:"DisplayedRows",overridesResolver:(e,t)=>t.displayedRows})(Ze(({theme:e})=>({...e.typography.body2,flexShrink:0})));function T$e({from:e,to:t,count:n}){return`${e}–${t} of ${n!==-1?n:`more than ${t}`}`}function E$e(e){return`Go to ${e} page`}const O$e=e=>{const{classes:t}=e;return rt({root:["root"],toolbar:["toolbar"],spacer:["spacer"],selectLabel:["selectLabel"],select:["select"],input:["input"],selectIcon:["selectIcon"],menuItem:["menuItem"],displayedRows:["displayedRows"],actions:["actions"]},y$e,t)},ZF=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTablePagination"}),{ActionsComponent:o=g$e,backIconButtonProps:i,className:a,colSpan:s,component:l=ke,count:c,disabled:u=!1,getItemAriaLabel:d=E$e,labelDisplayedRows:f=T$e,labelRowsPerPage:p="Rows per page:",nextIconButtonProps:m,onPageChange:g,onRowsPerPageChange:v,page:w,rowsPerPage:x,rowsPerPageOptions:S=[10,25,50,100],SelectProps:P={},showFirstButton:T=!1,showLastButton:E=!1,slotProps:O={},slots:k={},...A}=r,I=r,R=O$e(I),N=(O==null?void 0:O.select)??P,L=N.native?"option":C$e;let j;(l===ke||l==="td")&&(j=s||1e3);const _=wh(N.id),D=wh(N.labelId),z=()=>c===-1?(w+1)*x:x===-1?c:Math.min(c,(w+1)*x);return $.jsx(v$e,{colSpan:j,ref:n,as:l,ownerState:I,className:de(R.root,a),...A,children:$.jsxs(b$e,{className:R.toolbar,children:[$.jsx(w$e,{className:R.spacer}),S.length>1&&$.jsx(x$e,{className:R.selectLabel,id:D,children:p}),S.length>1&&$.jsx(S$e,{variant:"standard",...!N.variant&&{input:SU||(SU=$.jsx(Fv,{}))},value:x,onChange:v,id:_,labelId:D,...N,classes:{...N.classes,root:de(R.input,R.selectRoot,(N.classes||{}).root),select:de(R.select,(N.classes||{}).select),icon:de(R.selectIcon,(N.classes||{}).icon)},disabled:u,children:S.map(F=>y.createElement(L,{...!Hy(L)&&{ownerState:I},className:R.menuItem,key:F.label?F.label:F,value:F.value?F.value:F},F.label?F.label:F))}),$.jsx(P$e,{className:R.displayedRows,children:f({from:c===0?0:w*x+1,to:z(),count:c===-1?-1:c,page:w})}),$.jsx(o,{className:R.actions,backIconButtonProps:i,count:c,nextIconButtonProps:m,onPageChange:g,page:w,rowsPerPage:x,showFirstButton:T,showLastButton:E,slotProps:O.actions,slots:k.actions,getItemAriaLabel:d,disabled:u})]})})});function I$e(e){return tt("MuiTableRow",e)}const CU=ot("MuiTableRow",["root","selected","hover","head","footer"]),k$e=e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return rt({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},I$e,t)},M$e=oe("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(Ze(({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${CU.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${CU.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}}))),PU="tr",Qt=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTableRow"}),{className:o,component:i=PU,hover:a=!1,selected:s=!1,...l}=r,c=y.useContext(BI),u={...r,component:i,hover:a,selected:s,head:c&&c.variant==="head",footer:c&&c.variant==="footer"},d=k$e(u);return $.jsx(M$e,{as:i,ref:n,className:de(d.root,o),role:i===PU?null:"row",ownerState:u,...l})});function A$e(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function $$e(e,t,n,r={},o=()=>{}){const{ease:i=A$e,duration:a=300}=r;let s=null;const l=t[e];let c=!1;const u=()=>{c=!0},d=f=>{if(c){o(new Error("Animation cancelled"));return}s===null&&(s=f);const p=Math.min(1,(f-s)/a);if(t[e]=i(p)*(n-l)+l,p>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(d)};return l===n?(o(new Error("Element already at target position")),u):(requestAnimationFrame(d),u)}const R$e={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function _$e(e){const{onChange:t,...n}=e,r=y.useRef(),o=y.useRef(null),i=()=>{r.current=o.current.offsetHeight-o.current.clientHeight};return rs(()=>{const a=bS(()=>{const l=r.current;i(),l!==r.current&&t(r.current)}),s=os(o.current);return s.addEventListener("resize",a),()=>{a.clear(),s.removeEventListener("resize",a)}},[t]),y.useEffect(()=>{i(),t(r.current)},[t]),$.jsx("div",{style:R$e,ref:o,...n})}function D$e(e){return tt("MuiTabScrollButton",e)}const N$e=ot("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),L$e=e=>{const{classes:t,orientation:n,disabled:r}=e;return rt({root:["root",n,r&&"disabled"]},D$e,t)},F$e=oe(Ki,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${N$e.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),j$e=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTabScrollButton"}),{className:o,slots:i={},slotProps:a={},direction:s,orientation:l,disabled:c,...u}=r,d=nr(),f={isRtl:d,...r},p=L$e(f),m=i.StartScrollButtonIcon??LZ,g=i.EndScrollButtonIcon??FZ,v=Bc({elementType:m,externalSlotProps:a.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f}),w=Bc({elementType:g,externalSlotProps:a.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:f});return $.jsx(F$e,{component:"div",className:de(p.root,o),ref:n,role:null,ownerState:f,tabIndex:null,...u,style:{...u.style,...l==="vertical"&&{"--TabScrollButton-svgRotate":`rotate(${d?-90:90}deg)`}},children:s==="left"?$.jsx(m,{...v}):$.jsx(g,{...w})})});function B$e(e){return tt("MuiTabs",e)}const zP=ot("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),TU=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,EU=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,jC=(e,t,n)=>{let r=!1,o=n(e,t);for(;o;){if(o===e.firstChild){if(r)return;r=!0}const i=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||i)o=n(e,o);else{o.focus();return}}},z$e=e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:o,scrollableY:i,centered:a,scrollButtonsHideMobile:s,classes:l}=e;return rt({root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",o&&"scrollableX",i&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]},B$e,l)},V$e=oe("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${zP.scrollButtons}`]:t.scrollButtons},{[`& .${zP.scrollButtons}`]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(Ze(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:t})=>t.vertical,style:{flexDirection:"column"}},{props:({ownerState:t})=>t.scrollButtonsHideMobile,style:{[`& .${zP.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),H$e=oe("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),U$e=oe("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),W$e=oe("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(Ze(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:t})=>t.vertical,style:{height:"100%",width:2,right:0}}]}))),G$e=oe(_$e)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),OU={},q$e=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTabs"}),o=Ei(),i=nr(),{"aria-label":a,"aria-labelledby":s,action:l,centered:c=!1,children:u,className:d,component:f="div",allowScrollButtonsMobile:p=!1,indicatorColor:m="primary",onChange:g,orientation:v="horizontal",ScrollButtonComponent:w=j$e,scrollButtons:x="auto",selectionFollowsFocus:S,slots:P={},slotProps:T={},TabIndicatorProps:E={},TabScrollButtonProps:O={},textColor:k="primary",value:A,variant:I="standard",visibleScrollbar:R=!1,...N}=r,L=I==="scrollable",j=v==="vertical",_=j?"scrollTop":"scrollLeft",D=j?"top":"left",z=j?"bottom":"right",F=j?"clientHeight":"clientWidth",H=j?"height":"width",U={...r,component:f,allowScrollButtonsMobile:p,indicatorColor:m,orientation:v,vertical:j,scrollButtons:x,textColor:k,variant:I,visibleScrollbar:R,fixed:!L,hideScrollbar:L&&!R,scrollableX:L&&!j,scrollableY:L&&j,centered:c&&!L,scrollButtonsHideMobile:!p},q=z$e(U),X=Bc({elementType:P.StartScrollButtonIcon,externalSlotProps:T.startScrollButtonIcon,ownerState:U}),ae=Bc({elementType:P.EndScrollButtonIcon,externalSlotProps:T.endScrollButtonIcon,ownerState:U}),[Z,K]=y.useState(!1),[te,pe]=y.useState(OU),[ie,le]=y.useState(!1),[re,fe]=y.useState(!1),[ee,ce]=y.useState(!1),[me,we]=y.useState({overflow:"hidden",scrollbarWidth:0}),ge=new Map,Se=y.useRef(null),xe=y.useRef(null),Ie=()=>{const $e=Se.current;let Xe;if($e){const Vt=$e.getBoundingClientRect();Xe={clientWidth:$e.clientWidth,scrollLeft:$e.scrollLeft,scrollTop:$e.scrollTop,scrollWidth:$e.scrollWidth,top:Vt.top,bottom:Vt.bottom,left:Vt.left,right:Vt.right}}let bt;if($e&&A!==!1){const Vt=xe.current.children;if(Vt.length>0){const Ot=Vt[ge.get(A)];bt=Ot?Ot.getBoundingClientRect():null}}return{tabsMeta:Xe,tabMeta:bt}},Re=Go(()=>{const{tabsMeta:$e,tabMeta:Xe}=Ie();let bt=0,Vt;j?(Vt="top",Xe&&$e&&(bt=Xe.top-$e.top+$e.scrollTop)):(Vt=i?"right":"left",Xe&&$e&&(bt=(i?-1:1)*(Xe[Vt]-$e[Vt]+$e.scrollLeft)));const Ot={[Vt]:bt,[H]:Xe?Xe[H]:0};if(typeof te[Vt]!="number"||typeof te[H]!="number")pe(Ot);else{const un=Math.abs(te[Vt]-Ot[Vt]),jn=Math.abs(te[H]-Ot[H]);(un>=1||jn>=1)&&pe(Ot)}}),_e=($e,{animation:Xe=!0}={})=>{Xe?$$e(_,Se.current,$e,{duration:o.transitions.duration.standard}):Se.current[_]=$e},ye=$e=>{let Xe=Se.current[_];j?Xe+=$e:Xe+=$e*(i?-1:1),_e(Xe)},Te=()=>{const $e=Se.current[F];let Xe=0;const bt=Array.from(xe.current.children);for(let Vt=0;Vt$e){Vt===0&&(Xe=$e);break}Xe+=Ot[F]}return Xe},Oe=()=>{ye(-1*Te())},Me=()=>{ye(Te())},We=y.useCallback($e=>{we({overflow:null,scrollbarWidth:$e})},[]),Ve=()=>{const $e={};$e.scrollbarSizeListener=L?$.jsx(G$e,{onChange:We,className:de(q.scrollableX,q.hideScrollbar)}):null;const bt=L&&(x==="auto"&&(ie||re)||x===!0);return $e.scrollButtonStart=bt?$.jsx(w,{slots:{StartScrollButtonIcon:P.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:X},orientation:v,direction:i?"right":"left",onClick:Oe,disabled:!ie,...O,className:de(q.scrollButtons,O.className)}):null,$e.scrollButtonEnd=bt?$.jsx(w,{slots:{EndScrollButtonIcon:P.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ae},orientation:v,direction:i?"left":"right",onClick:Me,disabled:!re,...O,className:de(q.scrollButtons,O.className)}):null,$e},Qe=Go($e=>{const{tabsMeta:Xe,tabMeta:bt}=Ie();if(!(!bt||!Xe)){if(bt[D]Xe[z]){const Vt=Xe[_]+(bt[z]-Xe[z]);_e(Vt,{animation:$e})}}}),ut=Go(()=>{L&&x!==!1&&ce(!ee)});y.useEffect(()=>{const $e=bS(()=>{Se.current&&Re()});let Xe;const bt=un=>{un.forEach(jn=>{jn.removedNodes.forEach(Wn=>{Xe==null||Xe.unobserve(Wn)}),jn.addedNodes.forEach(Wn=>{Xe==null||Xe.observe(Wn)})}),$e(),ut()},Vt=os(Se.current);Vt.addEventListener("resize",$e);let Ot;return typeof ResizeObserver<"u"&&(Xe=new ResizeObserver($e),Array.from(xe.current.children).forEach(un=>{Xe.observe(un)})),typeof MutationObserver<"u"&&(Ot=new MutationObserver(bt),Ot.observe(xe.current,{childList:!0})),()=>{$e.clear(),Vt.removeEventListener("resize",$e),Ot==null||Ot.disconnect(),Xe==null||Xe.disconnect()}},[Re,ut]),y.useEffect(()=>{const $e=Array.from(xe.current.children),Xe=$e.length;if(typeof IntersectionObserver<"u"&&Xe>0&&L&&x!==!1){const bt=$e[0],Vt=$e[Xe-1],Ot={root:Se.current,threshold:.99},un=Kr=>{le(!Kr[0].isIntersecting)},jn=new IntersectionObserver(un,Ot);jn.observe(bt);const Wn=Kr=>{fe(!Kr[0].isIntersecting)},Eo=new IntersectionObserver(Wn,Ot);return Eo.observe(Vt),()=>{jn.disconnect(),Eo.disconnect()}}},[L,x,ee,u==null?void 0:u.length]),y.useEffect(()=>{K(!0)},[]),y.useEffect(()=>{Re()}),y.useEffect(()=>{Qe(OU!==te)},[Qe,te]),y.useImperativeHandle(l,()=>({updateIndicator:Re,updateScrollButtons:ut}),[Re,ut]);const nt=$.jsx(W$e,{...E,className:de(q.indicator,E.className),ownerState:U,style:{...te,...E.style}});let et=0;const yt=y.Children.map(u,$e=>{if(!y.isValidElement($e))return null;const Xe=$e.props.value===void 0?et:$e.props.value;ge.set(Xe,et);const bt=Xe===A;return et+=1,y.cloneElement($e,{fullWidth:I==="fullWidth",indicator:bt&&!Z&&nt,selected:bt,selectionFollowsFocus:S,onChange:g,textColor:k,value:Xe,...et===1&&A===!1&&!$e.props.tabIndex?{tabIndex:0}:{}})}),wn=$e=>{const Xe=xe.current,bt=ii(Xe).activeElement;if(bt.getAttribute("role")!=="tab")return;let Ot=v==="horizontal"?"ArrowLeft":"ArrowUp",un=v==="horizontal"?"ArrowRight":"ArrowDown";switch(v==="horizontal"&&i&&(Ot="ArrowRight",un="ArrowLeft"),$e.key){case Ot:$e.preventDefault(),jC(Xe,bt,EU);break;case un:$e.preventDefault(),jC(Xe,bt,TU);break;case"Home":$e.preventDefault(),jC(Xe,null,TU);break;case"End":$e.preventDefault(),jC(Xe,null,EU);break}},Ke=Ve();return $.jsxs(V$e,{className:de(q.root,d),ownerState:U,ref:n,as:f,...N,children:[Ke.scrollButtonStart,Ke.scrollbarSizeListener,$.jsxs(H$e,{className:q.scroller,ownerState:U,style:{overflow:me.overflow,[j?`margin${i?"Left":"Right"}`:"marginBottom"]:R?void 0:-me.scrollbarWidth},ref:Se,children:[$.jsx(U$e,{"aria-label":a,"aria-labelledby":s,"aria-orientation":v==="vertical"?"vertical":null,className:q.flexContainer,ownerState:U,onKeyDown:wn,ref:xe,role:"tablist",children:yt}),Z&&nt]}),Ke.scrollButtonEnd]})});function K$e(e){return tt("MuiTextField",e)}ot("MuiTextField",["root"]);const Y$e={standard:WT,filled:UT,outlined:GT},X$e=e=>{const{classes:t}=e;return rt({root:["root"]},K$e,t)},Q$e=oe(qh,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yn=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiTextField"}),{autoComplete:o,autoFocus:i=!1,children:a,className:s,color:l="primary",defaultValue:c,disabled:u=!1,error:d=!1,FormHelperTextProps:f,fullWidth:p=!1,helperText:m,id:g,InputLabelProps:v,inputProps:w,InputProps:x,inputRef:S,label:P,maxRows:T,minRows:E,multiline:O=!1,name:k,onBlur:A,onChange:I,onFocus:R,placeholder:N,required:L=!1,rows:j,select:_=!1,SelectProps:D,slots:z={},slotProps:F={},type:H,value:U,variant:q="outlined",...X}=r,ae={...r,autoFocus:i,color:l,disabled:u,error:d,fullWidth:p,multiline:O,required:L,select:_,variant:q},Z=X$e(ae),K=wh(g),te=m&&K?`${K}-helper-text`:void 0,pe=P&&K?`${K}-label`:void 0,ie=Y$e[q],le={slots:z,slotProps:{input:x,inputLabel:v,htmlInput:w,formHelperText:f,select:D,...F}},re={},fe=le.slotProps.inputLabel;q==="outlined"&&(fe&&typeof fe.shrink<"u"&&(re.notched=fe.shrink),re.label=P),_&&((!D||!D.native)&&(re.id=void 0),re["aria-describedby"]=void 0);const[ee,ce]=hr("input",{elementType:ie,externalForwardedProps:le,additionalProps:re,ownerState:ae}),[me,we]=hr("inputLabel",{elementType:Kh,externalForwardedProps:le,ownerState:ae}),[ge,Se]=hr("htmlInput",{elementType:"input",externalForwardedProps:le,ownerState:ae}),[xe,Ie]=hr("formHelperText",{elementType:FI,externalForwardedProps:le,ownerState:ae}),[Re,_e]=hr("select",{elementType:Gf,externalForwardedProps:le,ownerState:ae}),ye=$.jsx(ee,{"aria-describedby":te,autoComplete:o,autoFocus:i,defaultValue:c,fullWidth:p,multiline:O,name:k,rows:j,maxRows:T,minRows:E,type:H,value:U,id:K,inputRef:S,onBlur:A,onChange:I,onFocus:R,placeholder:N,inputProps:Se,slots:{input:z.htmlInput?ge:void 0},...ce});return $.jsxs(Q$e,{className:de(Z.root,s),disabled:u,error:d,fullWidth:p,ref:n,required:L,color:l,variant:q,ownerState:ae,...X,children:[P!=null&&P!==""&&$.jsx(me,{htmlFor:K,id:pe,...we,children:P}),_?$.jsx(Re,{"aria-describedby":te,id:K,labelId:pe,value:U,input:ye,..._e,children:a}):ye,m&&$.jsx(xe,{id:te,...Ie,children:m})]})});function J$e(e){return tt("MuiToggleButton",e)}const Wp=ot("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]),jZ=y.createContext({}),BZ=y.createContext(void 0);function Z$e(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}const eRe=e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:a}=e,s={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth",`size${Ce(i)}`,a]};return rt(s,J$e,t)},tRe=oe(Ki,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`size${Ce(n.size)}`]]}})(Ze(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${Wp.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:"none",backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.text.primary,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[{props:{color:"standard"},style:{[`&.${Wp.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.text.primary,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette.text.primary,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette.text.primary,e.palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(zn()).map(([t])=>({props:{color:t},style:{[`&.${Wp.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette[t].main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:mt(e.palette[t].main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.selectedOpacity})`:mt(e.palette[t].main,e.palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:"large"},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),c0=y.forwardRef(function(t,n){const{value:r,...o}=y.useContext(jZ),i=y.useContext(BZ),a=Ay({...o,selected:Z$e(t.value,r)},t),s=it({props:a,name:"MuiToggleButton"}),{children:l,className:c,color:u="standard",disabled:d=!1,disableFocusRipple:f=!1,fullWidth:p=!1,onChange:m,onClick:g,selected:v,size:w="medium",value:x,...S}=s,P={...s,color:u,disabled:d,disableFocusRipple:f,fullWidth:p,size:w},T=eRe(P),E=k=>{g&&(g(k,x),k.defaultPrevented)||m&&m(k,x)},O=i||"";return $.jsx(tRe,{className:de(o.className,T.root,c,O),disabled:d,focusRipple:!f,ref:n,onClick:E,onChange:m,value:x,ownerState:P,"aria-pressed":v,...S,children:l})});function nRe(e){return tt("MuiToggleButtonGroup",e)}const Tr=ot("MuiToggleButtonGroup",["root","selected","horizontal","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]),rRe=e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root",n,r&&"fullWidth"],grouped:["grouped",`grouped${Ce(n)}`,o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return rt(i,nRe,t)},oRe=oe("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Tr.grouped}`]:t.grouped},{[`& .${Tr.grouped}`]:t[`grouped${Ce(n.orientation)}`]},{[`& .${Tr.firstButton}`]:t.firstButton},{[`& .${Tr.lastButton}`]:t.lastButton},{[`& .${Tr.middleButton}`]:t.middleButton},t.root,n.orientation==="vertical"&&t.vertical,n.fullWidth&&t.fullWidth]}})(Ze(({theme:e})=>({display:"inline-flex",borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:"vertical"},style:{flexDirection:"column",[`& .${Tr.grouped}`]:{[`&.${Tr.selected} + .${Tr.grouped}.${Tr.selected}`]:{borderTop:0,marginTop:0}},[`& .${Tr.firstButton},& .${Tr.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${Tr.lastButton},& .${Tr.middleButton}`]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${Tr.lastButton}.${Wp.disabled},& .${Tr.middleButton}.${Wp.disabled}`]:{borderTop:"1px solid transparent"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{orientation:"horizontal"},style:{[`& .${Tr.grouped}`]:{[`&.${Tr.selected} + .${Tr.grouped}.${Tr.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${Tr.firstButton},& .${Tr.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${Tr.lastButton},& .${Tr.middleButton}`]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${Tr.lastButton}.${Wp.disabled},& .${Tr.middleButton}.${Wp.disabled}`]:{borderLeft:"1px solid transparent"}}}]}))),iRe=y.forwardRef(function(t,n){const r=it({props:t,name:"MuiToggleButtonGroup"}),{children:o,className:i,color:a="standard",disabled:s=!1,exclusive:l=!1,fullWidth:c=!1,onChange:u,orientation:d="horizontal",size:f="medium",value:p,...m}=r,g={...r,disabled:s,fullWidth:c,orientation:d,size:f},v=rRe(g),w=y.useCallback((O,k)=>{if(!u)return;const A=p&&p.indexOf(k);let I;p&&A>=0?(I=p.slice(),I.splice(A,1)):I=p?p.concat(k):[k],u(O,I)},[u,p]),x=y.useCallback((O,k)=>{u&&u(O,p===k?null:k)},[u,p]),S=y.useMemo(()=>({className:v.grouped,onChange:l?x:w,value:p,size:f,fullWidth:c,color:a,disabled:s}),[v.grouped,l,x,w,p,f,c,a,s]),P=yX(o),T=P.length,E=O=>{const k=O===0,A=O===T-1;return k&&A?"":k?v.firstButton:A?v.lastButton:v.middleButton};return $.jsx(oRe,{role:"group",className:de(v.root,i),ref:n,ownerState:g,...m,children:$.jsx(jZ.Provider,{value:S,children:P.map((O,k)=>$.jsx(BZ.Provider,{value:E(k),children:O},k))})})}),aRe=(...e)=>{console!=null&&console.warn&&(uh(e[0])&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e))},IU={},C_=(...e)=>{uh(e[0])&&IU[e[0]]||(uh(e[0])&&(IU[e[0]]=new Date),aRe(...e))},zZ=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},kU=(e,t,n)=>{e.loadNamespaces(t,zZ(e,n))},MU=(e,t,n,r)=>{uh(n)&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,zZ(e,r))},sRe=(e,t,n={})=>!t.languages||!t.languages.length?(C_("i18n.languages were undefined or empty",t.languages),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,o)=>{var i;if(((i=n.bindI18n)==null?void 0:i.indexOf("languageChanging"))>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!o(r.isLanguageChangingTo,e))return!1}}),uh=e=>typeof e=="string",lRe=e=>typeof e=="object"&&e!==null,cRe=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,uRe={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},dRe=e=>uRe[e],fRe=e=>e.replace(cRe,dRe);let P_={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:fRe};const pRe=(e={})=>{P_={...P_,...e}},hRe=()=>P_;let VZ;const mRe=e=>{VZ=e},gRe=()=>VZ,yRe={type:"3rdParty",init(e){pRe(e.options.react),mRe(e)}},vRe=y.createContext();class bRe{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const wRe=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},HZ=(e,t,n,r)=>e.getFixedT(t,n,r),xRe=(e,t,n,r)=>y.useCallback(HZ(e,t,n,r),[e,t,n,r]),Ue=(e,t={})=>{var P,T,E,O;const{i18n:n}=t,{i18n:r,defaultNS:o}=y.useContext(vRe)||{},i=n||r||gRe();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new bRe),!i){C_("You will need to pass in an i18next instance by using initReactI18next");const k=(I,R)=>uh(R)?R:lRe(R)&&uh(R.defaultValue)?R.defaultValue:Array.isArray(I)?I[I.length-1]:I,A=[k,{},!1];return A.t=k,A.i18n={},A.ready=!1,A}(P=i.options.react)!=null&&P.wait&&C_("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...hRe(),...i.options.react,...t},{useSuspense:s,keyPrefix:l}=a;let c=o||((T=i.options)==null?void 0:T.defaultNS);c=uh(c)?[c]:c||["translation"],(O=(E=i.reportNamespaces).addUsedNamespaces)==null||O.call(E,c);const u=(i.isInitialized||i.initializedStoreOnce)&&c.every(k=>sRe(k,i,a)),d=xRe(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),f=()=>d,p=()=>HZ(i,t.lng||null,a.nsMode==="fallback"?c:c[0],l),[m,g]=y.useState(f);let v=c.join();t.lng&&(v=`${t.lng}${v}`);const w=wRe(v),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:k,bindI18nStore:A}=a;x.current=!0,!u&&!s&&(t.lng?MU(i,t.lng,c,()=>{x.current&&g(p)}):kU(i,c,()=>{x.current&&g(p)})),u&&w&&w!==v&&x.current&&g(p);const I=()=>{x.current&&g(p)};return k&&(i==null||i.on(k,I)),A&&(i==null||i.store.on(A,I)),()=>{x.current=!1,i&&(k==null||k.split(" ").forEach(R=>i.off(R,I))),A&&i&&A.split(" ").forEach(R=>i.store.off(R,I))}},[i,v]),y.useEffect(()=>{x.current&&u&&g(f)},[i,l,u]);const S=[m,i,u];if(S.t=m,S.i18n=i,S.ready=u,u||!u&&!s)return S;throw new Promise(k=>{t.lng?MU(i,t.lng,c,()=>k()):kU(i,c,()=>k())})},Za=()=>{const[e]=Ue();return C(Rn,{sx:{textAlign:"center"},children:e("loading")})},Po=()=>C(Rn,{sx:{height:200,alignItems:"center",mt:2},component:Gt,direction:"column",justifyContent:"center",children:C(mZ,{})}),UZ=lt($.jsx("path",{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"}),"ExpandLess"),zv=lt($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),AS=lt($.jsx("path",{d:"M9 4v1.38c-.83-.33-1.72-.5-2.61-.5-1.79 0-3.58.68-4.95 2.05l3.33 3.33h1.11v1.11c.86.86 1.98 1.31 3.11 1.36V15H6v3c0 1.1.9 2 2 2h10c1.66 0 3-1.34 3-3V4zm-1.11 6.41V8.26H5.61L4.57 7.22a5.07 5.07 0 0 1 1.82-.34c1.34 0 2.59.52 3.54 1.46l1.41 1.41-.2.2c-.51.51-1.19.8-1.92.8-.47 0-.93-.12-1.33-.34M19 17c0 .55-.45 1-1 1s-1-.45-1-1v-2h-6v-2.59c.57-.23 1.1-.57 1.56-1.03l.2-.2L15.59 14H17v-1.41l-6-5.97V6h8z"}),"HistoryEdu"),id=lt($.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),$S=lt($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),ta=({title:e,subtitle:t,isOpen:n,closeFn:r,children:o})=>C(Bv,{open:n,onClose:r,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(Do,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(od,{title:e,subheader:t,action:C($S,{onClick:r})}),C(xa,{children:o}),C(hs,{})]})}),zI=e=>{const[t]=Ue(),n=e.height?e.height:"50vh";return C(Mt,{children:Q(Rn,{sx:{height:n,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center"},children:[C(ct,{variant:"h6",mr:3,children:t("nothingHereYet")}),C(ct,{mr:3,children:t("nothingHereYetAction")})]})})},ej=e=>{const[t]=Ue(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1),a=e.link!==void 0?C(gt,{size:"small",variant:"contained",href:e.link,children:t("add")}):C(gt,{size:"small",variant:"contained",onClick:o,children:t("add")});return Q(Mt,{children:[Q(Do,{children:[C(od,{title:e.title,subheader:".",sx:{paddingBottom:0}}),C(xa,{sx:{paddingTop:0,height:"500px"},children:C(zI,{})}),C(hs,{children:a})]}),C(ta,{title:t("add"),isOpen:n,closeFn:i,children:e.modalContent})]})};function WZ(e,t){return function(){return e.apply(t,arguments)}}const{toString:SRe}=Object.prototype,{getPrototypeOf:tj}=Object,VI=(e=>t=>{const n=SRe.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lc=e=>(e=e.toLowerCase(),t=>VI(t)===e),HI=e=>t=>typeof t===e,{isArray:Vv}=Array,ix=HI("undefined");function CRe(e){return e!==null&&!ix(e)&&e.constructor!==null&&!ix(e.constructor)&&es(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const GZ=lc("ArrayBuffer");function PRe(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&GZ(e.buffer),t}const TRe=HI("string"),es=HI("function"),qZ=HI("number"),UI=e=>e!==null&&typeof e=="object",ERe=e=>e===!0||e===!1,VP=e=>{if(VI(e)!=="object")return!1;const t=tj(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ORe=lc("Date"),IRe=lc("File"),kRe=lc("Blob"),MRe=lc("FileList"),ARe=e=>UI(e)&&es(e.pipe),$Re=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||es(e.append)&&((t=VI(e))==="formdata"||t==="object"&&es(e.toString)&&e.toString()==="[object FormData]"))},RRe=lc("URLSearchParams"),[_Re,DRe,NRe,LRe]=["ReadableStream","Request","Response","Headers"].map(lc),FRe=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function RS(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Vv(e))for(r=0,o=e.length;r0;)if(o=n[r],t===o.toLowerCase())return o;return null}const Gp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,YZ=e=>!ix(e)&&e!==Gp;function T_(){const{caseless:e}=YZ(this)&&this||{},t={},n=(r,o)=>{const i=e&&KZ(t,o)||o;VP(t[i])&&VP(r)?t[i]=T_(t[i],r):VP(r)?t[i]=T_({},r):Vv(r)?t[i]=r.slice():t[i]=r};for(let r=0,o=arguments.length;r(RS(t,(o,i)=>{n&&es(o)?e[i]=WZ(o,n):e[i]=o},{allOwnKeys:r}),e),BRe=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),zRe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},VRe=(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&tj(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},HRe=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},URe=e=>{if(!e)return null;if(Vv(e))return e;let t=e.length;if(!qZ(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},WRe=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&tj(Uint8Array)),GRe=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},qRe=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},KRe=lc("HTMLFormElement"),YRe=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),AU=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),XRe=lc("RegExp"),XZ=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};RS(n,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(r[i]=a||o)}),Object.defineProperties(e,r)},QRe=e=>{XZ(e,(t,n)=>{if(es(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(es(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},JRe=(e,t)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Vv(e)?r(e):r(String(e).split(t)),n},ZRe=()=>{},e2e=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,I$="abcdefghijklmnopqrstuvwxyz",$U="0123456789",QZ={DIGIT:$U,ALPHA:I$,ALPHA_DIGIT:I$+I$.toUpperCase()+$U},t2e=(e=16,t=QZ.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function n2e(e){return!!(e&&es(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const r2e=e=>{const t=new Array(10),n=(r,o)=>{if(UI(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const i=Vv(r)?[]:{};return RS(r,(a,s)=>{const l=n(a,o+1);!ix(l)&&(i[s]=l)}),t[o]=void 0,i}}return r};return n(e,0)},o2e=lc("AsyncFunction"),i2e=e=>e&&(UI(e)||es(e))&&es(e.then)&&es(e.catch),JZ=((e,t)=>e?setImmediate:t?((n,r)=>(Gp.addEventListener("message",({source:o,data:i})=>{o===Gp&&i===n&&r.length&&r.shift()()},!1),o=>{r.push(o),Gp.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",es(Gp.postMessage)),a2e=typeof queueMicrotask<"u"?queueMicrotask.bind(Gp):typeof process<"u"&&process.nextTick||JZ,De={isArray:Vv,isArrayBuffer:GZ,isBuffer:CRe,isFormData:$Re,isArrayBufferView:PRe,isString:TRe,isNumber:qZ,isBoolean:ERe,isObject:UI,isPlainObject:VP,isReadableStream:_Re,isRequest:DRe,isResponse:NRe,isHeaders:LRe,isUndefined:ix,isDate:ORe,isFile:IRe,isBlob:kRe,isRegExp:XRe,isFunction:es,isStream:ARe,isURLSearchParams:RRe,isTypedArray:WRe,isFileList:MRe,forEach:RS,merge:T_,extend:jRe,trim:FRe,stripBOM:BRe,inherits:zRe,toFlatObject:VRe,kindOf:VI,kindOfTest:lc,endsWith:HRe,toArray:URe,forEachEntry:GRe,matchAll:qRe,isHTMLForm:KRe,hasOwnProperty:AU,hasOwnProp:AU,reduceDescriptors:XZ,freezeMethods:QRe,toObjectSet:JRe,toCamelCase:YRe,noop:ZRe,toFiniteNumber:e2e,findKey:KZ,global:Gp,isContextDefined:YZ,ALPHABET:QZ,generateString:t2e,isSpecCompliantForm:n2e,toJSONObject:r2e,isAsyncFn:o2e,isThenable:i2e,setImmediate:JZ,asap:a2e};function rn(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}De.inherits(rn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:De.toJSONObject(this.config),code:this.code,status:this.status}}});const ZZ=rn.prototype,eee={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{eee[e]={value:e}});Object.defineProperties(rn,eee);Object.defineProperty(ZZ,"isAxiosError",{value:!0});rn.from=(e,t,n,r,o,i)=>{const a=Object.create(ZZ);return De.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),rn.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const s2e=null;function E_(e){return De.isPlainObject(e)||De.isArray(e)}function tee(e){return De.endsWith(e,"[]")?e.slice(0,-2):e}function RU(e,t,n){return e?e.concat(t).map(function(o,i){return o=tee(o),!n&&i?"["+o+"]":o}).join(n?".":""):t}function l2e(e){return De.isArray(e)&&!e.some(E_)}const c2e=De.toFlatObject(De,{},null,function(t){return/^is[A-Z]/.test(t)});function WI(e,t,n){if(!De.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=De.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,v){return!De.isUndefined(v[g])});const r=n.metaTokens,o=n.visitor||u,i=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&De.isSpecCompliantForm(t);if(!De.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(De.isDate(m))return m.toISOString();if(!l&&De.isBlob(m))throw new rn("Blob is not supported. Use a Buffer instead.");return De.isArrayBuffer(m)||De.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function u(m,g,v){let w=m;if(m&&!v&&typeof m=="object"){if(De.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(De.isArray(m)&&l2e(m)||(De.isFileList(m)||De.endsWith(g,"[]"))&&(w=De.toArray(m)))return g=tee(g),w.forEach(function(S,P){!(De.isUndefined(S)||S===null)&&t.append(a===!0?RU([g],P,i):a===null?g:g+"[]",c(S))}),!1}return E_(m)?!0:(t.append(RU(v,g,i),c(m)),!1)}const d=[],f=Object.assign(c2e,{defaultVisitor:u,convertValue:c,isVisitable:E_});function p(m,g){if(!De.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),De.forEach(m,function(w,x){(!(De.isUndefined(w)||w===null)&&o.call(t,w,De.isString(x)?x.trim():x,g,f))===!0&&p(w,g?g.concat(x):[x])}),d.pop()}}if(!De.isObject(e))throw new TypeError("data must be an object");return p(e),t}function _U(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function nj(e,t){this._pairs=[],e&&WI(e,this,t)}const nee=nj.prototype;nee.append=function(t,n){this._pairs.push([t,n])};nee.toString=function(t){const n=t?function(r){return t.call(this,r,_U)}:_U;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function u2e(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ree(e,t,n){if(!t)return e;const r=n&&n.encode||u2e,o=n&&n.serialize;let i;if(o?i=o(t,n):i=De.isURLSearchParams(t)?t.toString():new nj(t,n).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class DU{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){De.forEach(this.handlers,function(r){r!==null&&t(r)})}}const oee={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},d2e=typeof URLSearchParams<"u"?URLSearchParams:nj,f2e=typeof FormData<"u"?FormData:null,p2e=typeof Blob<"u"?Blob:null,h2e={isBrowser:!0,classes:{URLSearchParams:d2e,FormData:f2e,Blob:p2e},protocols:["http","https","file","blob","url","data"]},rj=typeof window<"u"&&typeof document<"u",O_=typeof navigator=="object"&&navigator||void 0,m2e=rj&&(!O_||["ReactNative","NativeScript","NS"].indexOf(O_.product)<0),g2e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",y2e=rj&&window.location.href||"http://localhost",v2e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:rj,hasStandardBrowserEnv:m2e,hasStandardBrowserWebWorkerEnv:g2e,navigator:O_,origin:y2e},Symbol.toStringTag,{value:"Module"})),Sa={...v2e,...h2e};function b2e(e,t){return WI(e,new Sa.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Sa.isNode&&De.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function w2e(e){return De.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function x2e(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r=n.length;return a=!a&&De.isArray(o)?o.length:a,l?(De.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!s):((!o[a]||!De.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],i)&&De.isArray(o[a])&&(o[a]=x2e(o[a])),!s)}if(De.isFormData(e)&&De.isFunction(e.entries)){const n={};return De.forEachEntry(e,(r,o)=>{t(w2e(r),o,n,0)}),n}return null}function S2e(e,t,n){if(De.isString(e))try{return(t||JSON.parse)(e),De.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const _S={transitional:oee,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=De.isObject(t);if(i&&De.isHTMLForm(t)&&(t=new FormData(t)),De.isFormData(t))return o?JSON.stringify(iee(t)):t;if(De.isArrayBuffer(t)||De.isBuffer(t)||De.isStream(t)||De.isFile(t)||De.isBlob(t)||De.isReadableStream(t))return t;if(De.isArrayBufferView(t))return t.buffer;if(De.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return b2e(t,this.formSerializer).toString();if((s=De.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return WI(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),S2e(t)):t}],transformResponse:[function(t){const n=this.transitional||_S.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(De.isResponse(t)||De.isReadableStream(t))return t;if(t&&De.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?rn.from(s,rn.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Sa.classes.FormData,Blob:Sa.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};De.forEach(["delete","get","head","post","put","patch"],e=>{_S.headers[e]={}});const C2e=De.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),P2e=e=>{const t={};let n,r,o;return e&&e.split(` +`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&C2e[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},NU=Symbol("internals");function u0(e){return e&&String(e).trim().toLowerCase()}function HP(e){return e===!1||e==null?e:De.isArray(e)?e.map(HP):String(e)}function T2e(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const E2e=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function k$(e,t,n,r,o){if(De.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!De.isString(t)){if(De.isString(r))return t.indexOf(r)!==-1;if(De.isRegExp(r))return r.test(t)}}function O2e(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function I2e(e,t){const n=De.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class Ca{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(s,l,c){const u=u0(l);if(!u)throw new Error("header name must be a non-empty string");const d=De.findKey(o,u);(!d||o[d]===void 0||c===!0||c===void 0&&o[d]!==!1)&&(o[d||l]=HP(s))}const a=(s,l)=>De.forEach(s,(c,u)=>i(c,u,l));if(De.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(De.isString(t)&&(t=t.trim())&&!E2e(t))a(P2e(t),n);else if(De.isHeaders(t))for(const[s,l]of t.entries())i(l,s,r);else t!=null&&i(n,t,r);return this}get(t,n){if(t=u0(t),t){const r=De.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return T2e(o);if(De.isFunction(n))return n.call(this,o,r);if(De.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=u0(t),t){const r=De.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||k$(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=u0(a),a){const s=De.findKey(r,a);s&&(!n||k$(r,r[s],s,n))&&(delete r[s],o=!0)}}return De.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||k$(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return De.forEach(this,(o,i)=>{const a=De.findKey(r,i);if(a){n[a]=HP(o),delete n[i];return}const s=t?O2e(i):String(i).trim();s!==i&&delete n[i],n[s]=HP(o),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return De.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&De.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[NU]=this[NU]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=u0(a);r[s]||(I2e(o,a),r[s]=!0)}return De.isArray(t)?t.forEach(i):i(t),this}}Ca.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);De.reduceDescriptors(Ca.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});De.freezeMethods(Ca);function M$(e,t){const n=this||_S,r=t||n,o=Ca.from(r.headers);let i=r.data;return De.forEach(e,function(s){i=s.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function aee(e){return!!(e&&e.__CANCEL__)}function Hv(e,t,n){rn.call(this,e??"canceled",rn.ERR_CANCELED,t,n),this.name="CanceledError"}De.inherits(Hv,rn,{__CANCEL__:!0});function see(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new rn("Request failed with status code "+n.status,[rn.ERR_BAD_REQUEST,rn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function k2e(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function M2e(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];a||(a=c),n[o]=l,r[o]=c;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),c-a{n=u,o=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=r?a(c,u):(o=c,i||(i=setTimeout(()=>{i=null,a(o)},r-d)))},()=>o&&a(o)]}const qT=(e,t,n=3)=>{let r=0;const o=M2e(50,250);return A2e(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,l=a-r,c=o(l),u=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:i,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(d)},n)},LU=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},FU=e=>(...t)=>De.asap(()=>e(...t)),$2e=Sa.hasStandardBrowserEnv?function(){const t=Sa.navigator&&/(msie|trident)/i.test(Sa.navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const s=De.isString(a)?o(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),R2e=Sa.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];De.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),De.isString(r)&&a.push("path="+r),De.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _2e(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function D2e(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function lee(e,t){return e&&!_2e(t)?D2e(e,t):t}const jU=e=>e instanceof Ca?{...e}:e;function Mh(e,t){t=t||{};const n={};function r(c,u,d){return De.isPlainObject(c)&&De.isPlainObject(u)?De.merge.call({caseless:d},c,u):De.isPlainObject(u)?De.merge({},u):De.isArray(u)?u.slice():u}function o(c,u,d){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function i(c,u){if(!De.isUndefined(u))return r(void 0,u)}function a(c,u){if(De.isUndefined(u)){if(!De.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>o(jU(c),jU(u),!0)};return De.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=l[u]||o,f=d(e[u],t[u],u);De.isUndefined(f)&&d!==s||(n[u]=f)}),n}const cee=e=>{const t=Mh({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Ca.from(a),t.url=ree(lee(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(De.isFormData(n)){if(Sa.hasStandardBrowserEnv||Sa.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Sa.hasStandardBrowserEnv&&(r&&De.isFunction(r)&&(r=r(t)),r||r!==!1&&$2e(t.url))){const c=o&&i&&R2e.read(i);c&&a.set(o,c)}return t},N2e=typeof XMLHttpRequest<"u",L2e=N2e&&function(e){return new Promise(function(n,r){const o=cee(e);let i=o.data;const a=Ca.from(o.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=o,u,d,f,p,m;function g(){p&&p(),m&&m(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let v=new XMLHttpRequest;v.open(o.method.toUpperCase(),o.url,!0),v.timeout=o.timeout;function w(){if(!v)return;const S=Ca.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),T={data:!s||s==="text"||s==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:S,config:e,request:v};see(function(O){n(O),g()},function(O){r(O),g()},T),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(w)},v.onabort=function(){v&&(r(new rn("Request aborted",rn.ECONNABORTED,e,v)),v=null)},v.onerror=function(){r(new rn("Network Error",rn.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let P=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const T=o.transitional||oee;o.timeoutErrorMessage&&(P=o.timeoutErrorMessage),r(new rn(P,T.clarifyTimeoutError?rn.ETIMEDOUT:rn.ECONNABORTED,e,v)),v=null},i===void 0&&a.setContentType(null),"setRequestHeader"in v&&De.forEach(a.toJSON(),function(P,T){v.setRequestHeader(T,P)}),De.isUndefined(o.withCredentials)||(v.withCredentials=!!o.withCredentials),s&&s!=="json"&&(v.responseType=o.responseType),c&&([f,m]=qT(c,!0),v.addEventListener("progress",f)),l&&v.upload&&([d,p]=qT(l),v.upload.addEventListener("progress",d),v.upload.addEventListener("loadend",p)),(o.cancelToken||o.signal)&&(u=S=>{v&&(r(!S||S.type?new Hv(null,e,v):S),v.abort(),v=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const x=k2e(o.url);if(x&&Sa.protocols.indexOf(x)===-1){r(new rn("Unsupported protocol "+x+":",rn.ERR_BAD_REQUEST,e));return}v.send(i||null)})},F2e=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const i=function(c){if(!o){o=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof rn?u:new Hv(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,i(new rn(`timeout ${t} of ms exceeded`,rn.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>De.asap(s),l}},j2e=function*(e,t){let n=e.byteLength;if(n{const o=B2e(e,t);let i=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await o.next();if(c){s(),l.close();return}let d=u.byteLength;if(n){let f=i+=d;n(f)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),o.return()}},{highWaterMark:2})},GI=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uee=GI&&typeof ReadableStream=="function",V2e=GI&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dee=(e,...t)=>{try{return!!e(...t)}catch{return!1}},H2e=uee&&dee(()=>{let e=!1;const t=new Request(Sa.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),zU=64*1024,I_=uee&&dee(()=>De.isReadableStream(new Response("").body)),KT={stream:I_&&(e=>e.body)};GI&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!KT[t]&&(KT[t]=De.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new rn(`Response type '${t}' is not supported`,rn.ERR_NOT_SUPPORT,r)})})})(new Response);const U2e=async e=>{if(e==null)return 0;if(De.isBlob(e))return e.size;if(De.isSpecCompliantForm(e))return(await new Request(Sa.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(De.isArrayBufferView(e)||De.isArrayBuffer(e))return e.byteLength;if(De.isURLSearchParams(e)&&(e=e+""),De.isString(e))return(await V2e(e)).byteLength},W2e=async(e,t)=>{const n=De.toFiniteNumber(e.getContentLength());return n??U2e(t)},G2e=GI&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=cee(e);c=c?(c+"").toLowerCase():"text";let p=F2e([o,i&&i.toAbortSignal()],a),m;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let v;try{if(l&&H2e&&n!=="get"&&n!=="head"&&(v=await W2e(u,r))!==0){let T=new Request(t,{method:"POST",body:r,duplex:"half"}),E;if(De.isFormData(r)&&(E=T.headers.get("content-type"))&&u.setContentType(E),T.body){const[O,k]=LU(v,qT(FU(l)));r=BU(T.body,zU,O,k)}}De.isString(d)||(d=d?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...f,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?d:void 0});let x=await fetch(m);const S=I_&&(c==="stream"||c==="response");if(I_&&(s||S&&g)){const T={};["status","statusText","headers"].forEach(A=>{T[A]=x[A]});const E=De.toFiniteNumber(x.headers.get("content-length")),[O,k]=s&&LU(E,qT(FU(s),!0))||[];x=new Response(BU(x.body,zU,O,()=>{k&&k(),g&&g()}),T)}c=c||"text";let P=await KT[De.findKey(KT,c)||"text"](x,e);return!S&&g&&g(),await new Promise((T,E)=>{see(T,E,{data:P,headers:Ca.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw g&&g(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new rn("Network Error",rn.ERR_NETWORK,e,m),{cause:w.cause||w}):rn.from(w,w&&w.code,e,m)}}),k_={http:s2e,xhr:L2e,fetch:G2e};De.forEach(k_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const VU=e=>`- ${e}`,q2e=e=>De.isFunction(e)||e===null||e===!1,fee={getAdapter:e=>{e=De.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since : +`+i.map(VU).join(` +`):" "+VU(i[0]):"as no adapter specified";throw new rn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:k_};function A$(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Hv(null,e)}function HU(e){return A$(e),e.headers=Ca.from(e.headers),e.data=M$.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),fee.getAdapter(e.adapter||_S.adapter)(e).then(function(r){return A$(e),r.data=M$.call(e,e.transformResponse,r),r.headers=Ca.from(r.headers),r},function(r){return aee(r)||(A$(e),r&&r.response&&(r.response.data=M$.call(e,e.transformResponse,r.response),r.response.headers=Ca.from(r.response.headers))),Promise.reject(r)})}const pee="1.7.7",oj={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{oj[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const UU={};oj.transitional=function(t,n,r){function o(i,a){return"[Axios v"+pee+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,s)=>{if(t===!1)throw new rn(o(a," has been removed"+(n?" in "+n:"")),rn.ERR_DEPRECATED);return n&&!UU[a]&&(UU[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,s):!0}};function K2e(e,t,n){if(typeof e!="object")throw new rn("options must be an object",rn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const s=e[i],l=s===void 0||a(s,i,e);if(l!==!0)throw new rn("option "+i+" must be "+l,rn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new rn("Unknown option "+i,rn.ERR_BAD_OPTION)}}const M_={assertOptions:K2e,validators:oj},Ed=M_.validators;class dh{constructor(t){this.defaults=t,this.interceptors={request:new DU,response:new DU}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Mh(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&M_.assertOptions(r,{silentJSONParsing:Ed.transitional(Ed.boolean),forcedJSONParsing:Ed.transitional(Ed.boolean),clarifyTimeoutError:Ed.transitional(Ed.boolean)},!1),o!=null&&(De.isFunction(o)?n.paramsSerializer={serialize:o}:M_.assertOptions(o,{encode:Ed.function,serialize:Ed.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&De.merge(i.common,i[n.method]);i&&De.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Ca.concat(a,i);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!l){const m=[HU.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,c),f=m.length,u=Promise.resolve(n);d{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{r.subscribe(s),i=s}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,s){r.reason||(r.reason=new Hv(i,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new ij(function(o){t=o}),cancel:t}}}function Y2e(e){return function(n){return e.apply(null,n)}}function X2e(e){return De.isObject(e)&&e.isAxiosError===!0}const A_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(A_).forEach(([e,t])=>{A_[t]=e});function hee(e){const t=new dh(e),n=WZ(dh.prototype.request,t);return De.extend(n,dh.prototype,t,{allOwnKeys:!0}),De.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return hee(Mh(e,o))},n}const dt=hee(_S);dt.Axios=dh;dt.CanceledError=Hv;dt.CancelToken=ij;dt.isCancel=aee;dt.VERSION=pee;dt.toFormData=WI;dt.AxiosError=rn;dt.Cancel=dt.CanceledError;dt.all=function(t){return Promise.all(t)};dt.spread=Y2e;dt.isAxiosError=X2e;dt.mergeConfig=Mh;dt.AxiosHeaders=Ca;dt.formToJSON=e=>iee(De.isHTMLForm(e)?new FormData(e):e);dt.getAdapter=fee.getAdapter;dt.HttpStatusCode=A_;dt.default=dt;const ny={protein:4,carbohydrates:4,fat:9};class Ga{constructor(t){nn(this,"bodyWeight",0);nn(this,"energy",0);nn(this,"protein",0);nn(this,"carbohydrates",0);nn(this,"carbohydratesSugar",0);nn(this,"fat",0);nn(this,"fatSaturated",0);nn(this,"fiber",0);nn(this,"sodium",0);this.energy=(t==null?void 0:t.energy)??0,this.protein=(t==null?void 0:t.protein)??0,this.carbohydrates=(t==null?void 0:t.carbohydrates)??0,this.carbohydratesSugar=(t==null?void 0:t.carbohydratesSugar)??0,this.fat=(t==null?void 0:t.fat)??0,this.fatSaturated=(t==null?void 0:t.fatSaturated)??0,this.fiber=(t==null?void 0:t.fiber)??0,this.sodium=(t==null?void 0:t.sodium)??0,this.bodyWeight=(t==null?void 0:t.bodyWeight)??0}get energyKj(){return this.energy*4.184}get isEmpty(){return this.energy===0&&this.protein===0&&this.carbohydrates===0&&this.fat===0}get percent(){return{protein:this.protein>0?this.protein*ny.protein/this.energy*100:0,carbohydrates:this.carbohydrates>0?this.carbohydrates*ny.carbohydrates/this.energy*100:0,fat:this.fat>0?this.fat*ny.fat/this.energy*100:0}}get perBodyKg(){return{protein:this.bodyWeight>0?this.protein/this.bodyWeight:0,carbohydrates:this.bodyWeight>0?this.carbohydrates/this.bodyWeight:0,fat:this.bodyWeight>0?this.fat/this.bodyWeight:0}}static fromIngredient(t,n,r){const o=new Ga,i=r===null?n:n*r.amount*r.grams;return o.energy=t.energy*i/100,o.protein=t.protein*i/100,o.carbohydrates=t.carbohydrates*i/100,o.carbohydratesSugar=t.carbohydratesSugar?t.carbohydratesSugar*i/100:0,o.fat=t.fat*i/100,o.fatSaturated=t.fatSaturated?t.fatSaturated*i/100:0,o.fiber=t.fiber?t.fiber*i/100:0,o.sodium=t.sodium?t.sodium*i/100:0,o}add(t){return this.energy+=t.energy,this.protein+=t.protein,this.carbohydrates+=t.carbohydrates,this.carbohydratesSugar+=t.carbohydratesSugar,this.fat+=t.fat,this.fatSaturated+=t.fatSaturated,this.fiber+=t.fiber,this.sodium+=t.sodium,this}toString(){return`e: ${this.energy}, p: ${this.protein}, c: ${this.carbohydrates}, cS: ${this.carbohydratesSugar}, f: ${this.fat}, fS: ${this.fatSaturated}, fi: ${this.fiber}, s: ${this.sodium}`}equals(t){return this.energy===t.energy&&this.protein===t.protein&&this.carbohydrates===t.carbohydrates&&this.carbohydratesSugar===t.carbohydratesSugar&&this.fat===t.fat&&this.fatSaturated===t.fatSaturated&&this.fiber===t.fiber&&this.sodium===t.sodium}}function Si(e){return e.toISOString().split("T")[0]}const mee=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];function $_(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function YT(e,t){return e==null?null:e.toLocaleTimeString(t?[t]:[],{hour:"2-digit",minute:"2-digit"})}function Q2e(e){if(e==null)return null;const[t,n]=e.toTimeString().split(":");return`${t}:${n}`}function J2e(e){if(e==null)return null;const[t,n]=e.split(":"),r=new Date;return r.setHours(parseInt(t)),r.setMinutes(parseInt(n)),r}function Z2e(e,t=new Date){const r={lastWeek:()=>t.setDate(t.getDate()-7),lastMonth:()=>t.setMonth(t.getMonth()-1),lastHalfYear:()=>t.setMonth(t.getMonth()-6),lastYear:()=>t.setFullYear(t.getFullYear()-1),"":void 0}[e];if(r)r();else return;return Si(t)}class gee{constructor(t,n,r,o){nn(this,"items",[]);nn(this,"diaryEntries",[]);this.id=t,this.order=n,this.time=r,this.name=o}get timeHHMMLocale(){return YT(this.time)}get displayName(){return this.name?this.name:this.timeHHMMLocale}get diaryEntriesToday(){return this.diaryEntries.filter(t=>$_(t.datetime,new Date))}get plannedNutritionalValues(){const t=new Ga;for(const n of this.items)t.add(n.nutritionalValues);return t}get loggedNutritionalValuesToday(){const t=new Ga;for(const n of this.diaryEntriesToday)t.add(n.nutritionalValues);return t}}class aj{fromJson(t){return new gee(t.id,t.order,J2e(t.time),t.name)}toJson(t){return{name:t.name,order:t.order,time:YT(t.time)}}}const UP=-1;class e_e{constructor(t,n,r,o=!1,i=null,a=null,s=null,l=null,c=null,u=null,d=null){nn(this,"meals",[]);nn(this,"diaryEntries",[]);this.id=t,this.creationDate=n,this.description=r,this.onlyLogging=o,this.goalEnergy=i,this.goalProtein=a,this.goalCarbohydrates=s,this.goalFiber=l,this.goalSodium=c,this.goalFat=u,this.goalFatsSaturated=d}get hasAnyGoals(){return this.goalEnergy!==null||this.goalProtein!==null||this.goalCarbohydrates!==null||this.goalFat!==null}get hasAnyAdvancedGoals(){return this.goalFiber!==null||this.goalSodium!==null||this.goalFatsSaturated!==null}get hasAnyPlanned(){return this.hasAnyGoals||this.plannedNutritionalValues.energy>0}get plannedNutritionalValues(){if(this.hasAnyGoals)return new Ga({energy:this.goalEnergy,carbohydrates:this.goalCarbohydrates,protein:this.goalProtein,fat:this.goalFat});const t=new Ga;for(const n of this.meals)t.add(n.plannedNutritionalValues);return t}get loggedNutritionalValues7DayAvg(){const t=new Date,n=new Date(t.getTime()-7*24*60*60*1e3),r=this.diaryEntries.filter(o=>o.datetime>=n);return this.getAverageNutritionalValuesFromDiaryEntries(r)}get loggedNutritionalValuesToday(){const t=this.diaryEntries.filter(n=>$_(n.datetime,new Date));return this.getNutritionalValuesFromDiaryEntries(t)}get groupDiaryEntries(){return this.diaryEntries.reduce((t,n)=>{const r=n.datetime.toISOString().split("T")[0],o=t.get(r)||{entries:[],nutritionalValues:new Ga};return o.entries.push(n),o.nutritionalValues.add(n.nutritionalValues),t.set(r,o),t},new Map)}get percentageValuesLoggedToday(){return new Ga({protein:this.loggedNutritionalValuesToday.protein/this.plannedNutritionalValues.protein*100,carbohydrates:this.loggedNutritionalValuesToday.carbohydrates/this.plannedNutritionalValues.carbohydrates*100,fat:this.loggedNutritionalValuesToday.fat/this.plannedNutritionalValues.fat*100})}pseudoMealOthers(t){const n=new gee(UP,-1,null,t);return n.diaryEntries=this.diaryEntries.filter(r=>r.mealId===null),n}loggedNutritionalValuesDate(t){return this.getNutritionalValuesFromDiaryEntries(this.loggedEntriesDate(t))}loggedEntriesDate(t){return this.diaryEntries.filter(n=>$_(n.datetime,t))}getAverageNutritionalValuesFromDiaryEntries(t){const n=t.length,r=this.getNutritionalValuesFromDiaryEntries(t);return n===0||(r.energy=r.energy/n,r.protein=r.protein/n,r.carbohydrates=r.carbohydrates/n,r.carbohydratesSugar=r.carbohydratesSugar/n,r.fat=r.fat/n,r.fatSaturated=r.fatSaturated/n,r.fiber=r.fiber/n,r.sodium=r.sodium/n),r}getNutritionalValuesFromDiaryEntries(t){return t.reduce((n,r)=>n.add(r.nutritionalValues),new Ga)}}class qI{fromJson(t){return new e_e(t.id,new Date(t.creation_date),t.description,t.only_logging,t.goal_energy,t.goal_protein,t.goal_carbohydrates,t.goal_fiber,t.goal_fat)}toJson(t){return{description:t.description}}}class t_e{constructor(t,n,r,o,i,a,s,l){this.id=t,this.uuid=n,this.url=r,this.created=o,this.lastUpdate=i,this.size=a,this.width=s,this.height=l}}class n_e{fromJson(t){return new t_e(t.id,t.uuid,t.image,new Date(t.created),new Date(t.last_update),t.size,t.width,t.height)}}class r_e{constructor(t,n,r,o,i,a,s,l,c,u,d,f,p=null){this.id=t,this.uuid=n,this.code=r,this.name=o,this.energy=i,this.protein=a,this.carbohydrates=s,this.carbohydratesSugar=l,this.fat=c,this.fatSaturated=u,this.fiber=d,this.sodium=f,this.image=p}}class o_e{fromJson(t){return new r_e(t.id,t.uuid,t.code,t.name,t.energy,parseFloat(t.protein),parseFloat(t.carbohydrates),t.carbohydrates_sugar===null?null:parseFloat(t.carbohydrates_sugar),parseFloat(t.fat),t.fat_saturated===null?null:parseFloat(t.fat_saturated),t.fiber===null?null:parseFloat(t.fiber),t.sodium===null?null:parseFloat(t.sodium),t.image===null?null:new n_e().fromJson(t.image))}}var sj={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_SERVER:""};const i_e="/static/react",lj="",a_e=sj.TIME_ZONE,s_e=sj.MIN_ACCOUNT_AGE_TO_TRUST,l_e="",c_e=sj.VITE_API_KEY,Wy=2,u_e="en",d_e=s_e||21,yee=1,f_e=2,p_e=1,h_e=2,m_e="exercises",g_e="variations",y_e="detail",v_e="languages",b_e="categories",w_e="equipment",x_e="muscles",S_e="permission",C_e="profile",P_e="routine",T_e="routines-shallow",E_e="routines-active",O_e="routines-logs",Uv="measurements",Wv="measurements-categories";var jr=(e=>(e.NUTRITIONAL_PLANS="nutritional-plans",e.NUTRITIONAL_PLAN="nutritional-plan",e.NUTRITIONAL_PLAN_LAST="nutritional-plan-last",e.INGREDIENT="ingredient",e.BODY_WEIGHT="body-weight",e))(jr||{}),Yi=(e=>(e.MEAL="meal",e.MEAL_ITEM="mealitem",e.NUTRITIONAL_DIARY="nutritiondiary",e.INGREDIENT_PATH="ingredientinfo",e.INGREDIENT_SEARCH_PATH="ingredient/search",e.INGREDIENT_WEIGHT_UNIT="ingredientweightunit",e))(Yi||{});const vee="999",I_e=["#2a4c7d","#5b5291","#8e5298","#bf5092","#e7537e","#ff6461","#ff813d","#ffa600"],k_e=["#2a4c7d","#825298","#d45089","#ff6a59","#ffa600"],M_e=["#2a4c7d","#d45089","#ffa600"],WU={pageSizeOptions:[5,10,25,50,100],pageSize:10},A_e=a_e||"Europe/Berlin",Gy="en",bee=3e3;var wee={exports:{}};(function(e){(function(t){let n;function r(u,d){const f=u.charCodeAt(d);if(isNaN(f))throw new RangeError("Index "+d+' out of range for string "'+u+'"; please open an issue at https://github.com/Trott/slug/issues/new');if(f<55296||f>57343)return[u.charAt(d),d];if(f>=55296&&f<=56319){if(u.length<=d+1)return[" ",d];const m=u.charCodeAt(d+1);return m<56320||m>57343?[" ",d]:[u.charAt(d)+u.charAt(d+1),d+1]}if(d===0)return[" ",d];const p=u.charCodeAt(d-1);if(p<55296||p>56319)return[" ",d];throw new Error('String "'+u+'" reaches code believed to be unreachable; please open an issue at https://github.com/Trott/slug/issues/new')}typeof window<"u"?window.btoa?n=function(u){return btoa(unescape(encodeURIComponent(u)))}:n=function(u){const d=unescape(encodeURIComponent(u+""));let f="";for(let p,m,g=0,v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";d.charAt(g|0)||(v="=",g%1);f+=v.charAt(63&p>>8-g%1*8)){if(m=d.charCodeAt(g+=3/4),m>255)throw new Error("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");p=p<<8|m}return f}:n=function(u){return Buffer.from(u).toString("base64")};function o(u,d){let f=s(u,d);if((d&&d.fallback!==void 0?d.fallback:o.defaults.fallback)===!0&&f===""){let m="";for(let g=0;g1?f[d[m]]=u[d[m]]:p[d[m]]=u[d[m]];Object.assign(o.charmap,p),Object.assign(o.multicharmap,f)},o.setLocale=function(u){a=i[u]||{}},e.exports?e.exports=o:t.slug=o})(Bi)})(wee);var $_e=wee.exports;const xee=_n($_e);function Pt(e,t){t=t||{};const r=[t.server||l_e,"api","v2",e];if(t.objectMethod&&r.push(t.objectMethod),t.id&&r.push(t.id.toString()),r.push(""),t.query){const o=[];for(const i in t.query)t.query.hasOwnProperty(i)&&o.push(`${encodeURIComponent(i)}=${encodeURIComponent(t.query[i])}`);r.pop(),r.push(`?${o.join("&")}`)}return r.join("/")}var Sn=(e=>(e[e.DASHBOARD=0]="DASHBOARD",e[e.ROUTINE_OVERVIEW=1]="ROUTINE_OVERVIEW",e[e.ROUTINE_DETAIL=2]="ROUTINE_DETAIL",e[e.ROUTINE_ADD=3]="ROUTINE_ADD",e[e.ROUTINE_DELETE=4]="ROUTINE_DELETE",e[e.ROUTINE_ADD_LOG=5]="ROUTINE_ADD_LOG",e[e.ROUTINE_EDIT_LOG=6]="ROUTINE_EDIT_LOG",e[e.ROUTINE_DELETE_LOG=7]="ROUTINE_DELETE_LOG",e[e.ROUTINE_EDIT_DAY=8]="ROUTINE_EDIT_DAY",e[e.ROUTINE_ADD_DAY=9]="ROUTINE_ADD_DAY",e[e.ROUTINE_DELETE_DAY=10]="ROUTINE_DELETE_DAY",e[e.ROUTINE_ADD_SET=11]="ROUTINE_ADD_SET",e[e.ROUTINE_EDIT_SET=12]="ROUTINE_EDIT_SET",e[e.ROUTINE_DELETE_SET=13]="ROUTINE_DELETE_SET",e[e.EXERCISE_DETAIL=14]="EXERCISE_DETAIL",e[e.EXERCISE_OVERVIEW=15]="EXERCISE_OVERVIEW",e[e.EXERCISE_CONTRIBUTE=16]="EXERCISE_CONTRIBUTE",e[e.WEIGHT_OVERVIEW=17]="WEIGHT_OVERVIEW",e[e.WEIGHT_ADD=18]="WEIGHT_ADD",e[e.MEASUREMENT_OVERVIEW=19]="MEASUREMENT_OVERVIEW",e[e.MEASUREMENT_DETAIL=20]="MEASUREMENT_DETAIL",e[e.NUTRITION_OVERVIEW=21]="NUTRITION_OVERVIEW",e[e.NUTRITION_DETAIL=22]="NUTRITION_DETAIL",e[e.NUTRITION_PLAN_PDF=23]="NUTRITION_PLAN_PDF",e[e.NUTRITION_PLAN_COPY=24]="NUTRITION_PLAN_COPY",e[e.NUTRITION_DIARY=25]="NUTRITION_DIARY",e[e.INGREDIENT_DETAIL=26]="INGREDIENT_DETAIL",e))(Sn||{});function Tn(e,t,n){t=t||"en-us";const r=t.split("-")[0];switch(e){case 1:return`/${r}/routine/overview`;case 2:return`/${r}/routine/${n.id}/view`;case 3:return`/${r}/routine/add`;case 9:return`/${r}/routine/day/${n.id}/add`;case 5:return`/${r}/routine/day/${n.id}/log/add`;case 6:return`/${r}/routine/log/${n.id}/edit`;case 7:return`/${r}/routine/log/${n.id}/delete`;case 8:return`/${r}/routine/day/${n.id}/edit`;case 10:return`/${r}/routine/day/${n.id}/delete`;case 11:return`/${r}/routine/set/${n.id}/add`;case 12:return`/${r}/routine/set/${n.id}/edit`;case 13:return`/${r}/routine/set/${n.id}/delete`;case 16:return`/${r}/exercise/contribute`;case 14:return n.slug?`/${r}/exercise/${n.id}/view-base/${xee(n.slug)}`:`/${r}/exercise/${n.id}/view-base`;case 15:return`/${r}/exercise/overview`;case 17:return`/${r}/weight/overview`;case 18:return`/${r}/weight/add`;case 19:return`/${r}/measurement/overview`;case 20:return`/${r}/measurement/category/${n.id}`;case 21:return`/${r}/nutrition/overview`;case 22:return`/${r}/nutrition/${n.id}/view`;case 25:return`/${r}/nutrition/${n.id}/${n.date}`;case 23:return`/${r}/nutrition/${n.id}/pdf`;case 24:return`/${r}/nutrition/${n.id}/copy`;case 26:return`/${r}/nutrition/ingredient/${n.id}/view`;case 0:default:return"/"}}function R_e(e){let t=null;if(document.cookie&&document.cookie!==""){const n=document.cookie.split(";");for(let r=0;r{if(e.length===0)return[];const t=Pt(Yi.INGREDIENT_PATH,{query:{id__in:e.join(",")}}),n=new o_e,r=[];for await(const o of DS(t,kt()))for(const i of o)r.push(n.fromJson(i));return r},__e=async(e,t,n=!0)=>{const r=[t];t!==Gy&&n&&r.push(Gy);const o=Pt(Yi.INGREDIENT_SEARCH_PATH,{query:{term:e,language:r.join(",")}}),{data:i}=await dt.get(o);return i.suggestions};class D_e{constructor(t,n,r,o,i,a,s){nn(this,"ingredient",null);nn(this,"weightUnit",null);this.id=t,this.ingredientId=n,this.weightUnitId=r,this.amount=o,this.order=i,a&&(this.ingredient=a),s&&(this.weightUnit=s)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?Ga.fromIngredient(this.ingredient,this.amount,this.weightUnit):new Ga}}class cj{fromJson(t){return new D_e(t.id,t.ingredient,t.weight_unit,parseFloat(t.amount),t.order)}toJson(t){return{ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),order:t.order}}}class N_e{constructor(t,n,r,o=""){this.id=t,this.amount=n,this.grams=r,this.name=o}}class L_e{fromJson(t){return new N_e(t.id,parseFloat(t.amount),t.gram)}}const Cee=async e=>{if(e===null)return null;const{data:t}=await dt.get(Pt(Yi.INGREDIENT_WEIGHT_UNIT,{id:e}),{headers:kt()});return new L_e().fromJson(t)},F_e=async e=>{const t=await dt.post(Pt(Yi.MEAL),e,{headers:kt()});return new aj().fromJson(t.data)},j_e=async e=>{const t=await dt.patch(Pt(Yi.MEAL,{id:e.id}),e,{headers:kt()});return new aj().fromJson(t.data)},B_e=async e=>{await dt.delete(Pt(Yi.MEAL,{id:e}),{headers:kt()})},z_e=async e=>{let t=[];const n=new aj,r=new cj,{data:o}=await dt.get(Pt(Yi.MEAL,{query:{plan:e}}),{headers:kt()}),i=o.results.map(a=>n.fromJson(a));for(const a of i){t=[];const{data:s}=await dt.get(Pt(Yi.MEAL_ITEM,{query:{meal:a.id}}),{headers:kt()}),l=s.results.map(u=>r.fromJson(u));for(const u of l)t.push(u.ingredientId);const c=await See(t);for(const u of l)u.weightUnit=await Cee(u.weightUnitId),u.ingredient=c.find(d=>d.id===u.ingredientId);a.items=l}return i};class V_e{constructor(t,n,r,o,i,a,s,l,c){nn(this,"ingredient",null);nn(this,"weightUnit",null);this.id=t,this.planId=n,this.mealId=r,this.ingredientId=o,this.weightUnitId=i,this.amount=a,this.datetime=s,l&&(this.ingredient=l),c&&(this.weightUnit=c)}get amountString(){var t;return this.amount.toFixed().toString()+(this.weightUnitId!==null?` ${(t=this.weightUnit)==null?void 0:t.name}`:"g")}get nutritionalValues(){return this.ingredient?Ga.fromIngredient(this.ingredient,this.amount,this.weightUnit):(console.log("Diary entry has no ingredient, returning empty NutritionalValues object"),new Ga)}}class uj{fromJson(t){return new V_e(t.id,t.plan,t.meal,t.ingredient,t.weight_unit,parseFloat(t.amount),new Date(t.datetime))}toJson(t){return{plan:t.planId,meal:t.mealId,ingredient:t.ingredientId,weight_unit:t.weightUnitId,amount:t.amount.toString(),datetime:t.datetime.toISOString()}}}const H_e=async(e,t)=>{const n=new uj,r={plan:e,limit:vee};t&&(r.datetime__date=Si(t));const o=Pt(Yi.NUTRITIONAL_DIARY,{query:r}),i=[];for await(const a of DS(o,kt()))for(const s of a){let l=n.fromJson(s);l.weightUnit=await Cee(l.weightUnitId),i.push(l)}return i},Pee=async e=>{const t=await dt.post(Pt(Yi.NUTRITIONAL_DIARY),e,{headers:kt()});return new uj().fromJson(t.data)},U_e=async e=>{const t=await dt.patch(Pt(Yi.NUTRITIONAL_DIARY,{id:e.id}),e,{headers:kt()});return new uj().fromJson(t.data)},Gv="nutritionplan",W_e=async()=>{const{data:e}=await dt.get(Pt(Gv),{headers:kt()}),t=new qI;return e.results.map(n=>t.fromJson(n))},G_e=async()=>{const{data:e}=await dt.get(Pt(Gv,{query:{limit:"1"}}),{headers:kt()});return e.count===0?null:await dj(e.results[0].id)},dj=async(e,t)=>{if(e===null)return null;const{data:n}=await dt.get(Pt(Gv,{id:e}),{headers:kt()}),r=[],i=new qI().fromJson(n),a=await Promise.all([z_e(e),H_e(e,t)]);i.meals=a[0],i.diaryEntries=a[1],i.diaryEntries.forEach(l=>{r.includes(l.ingredientId)||r.push(l.ingredientId)});const s=await See(r);return i.diaryEntries.forEach(l=>{l.ingredient=s.find(c=>c.id===l.ingredientId)}),i.meals.forEach(l=>{l.diaryEntries=i.diaryEntries.filter(c=>c.mealId===l.id)}),i},q_e=async e=>{const t=await dt.post(Pt(Gv),e,{headers:kt()});return new qI().fromJson(t.data)},K_e=async e=>{const t=await dt.patch(Pt(Gv,{id:e.id}),e,{headers:kt()});return new qI().fromJson(t.data)},Y_e=async e=>{await dt.delete(Pt(Gv,{id:e}),{headers:kt()})};function X_e(){return Co({queryKey:[jr.NUTRITIONAL_PLANS],queryFn:()=>W_e()})}function Q_e(){return Co({queryKey:[jr.NUTRITIONAL_PLAN,"last"],queryFn:()=>G_e()})}function J_e(e){return Co({queryKey:[jr.NUTRITIONAL_PLAN,e],queryFn:()=>dj(e)})}function Z_e(e,t,n=!0){return Co({queryKey:[jr.NUTRITIONAL_PLAN,e,t],queryFn:()=>dj(e,new Date(t)),enabled:n})}const eDe=()=>{const e=qr();return co({mutationFn:t=>q_e(t),onSuccess:()=>{e.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLANS]}),e.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN]})}})},tDe=e=>{const t=qr();return co({mutationFn:n=>Y_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLANS]}),t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})},nDe=e=>{const t=qr();return co({mutationFn:n=>K_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]}),t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLANS]})}})},rDe=e=>{const t=qr();return co({mutationFn:n=>Pee(n),onSuccess:()=>t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})})},Tee=e=>{const t=qr();return co({mutationFn:n=>Promise.all(n.map(r=>Pee(r))),onSuccess:()=>t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})})},oDe=e=>{const t=qr();return co({mutationFn:n=>U_e(n),onSuccess:()=>t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})})},iDe=e=>{const t=qr();return co({mutationFn:n=>F_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})},aDe=e=>{const t=qr();return co({mutationFn:n=>B_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})},sDe=e=>{const t=qr();return co({mutationFn:n=>j_e(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})},lDe=async e=>{const t=await dt.post(Pt(Yi.MEAL_ITEM),e,{headers:kt()});return new cj().fromJson(t.data)},cDe=async e=>{const t=await dt.patch(Pt(Yi.MEAL_ITEM,{id:e.id}),e,{headers:kt()});return new cj().fromJson(t.data)},uDe=async e=>{await dt.delete(Pt(Yi.MEAL_ITEM,{id:e}),{headers:kt()})},dDe=e=>{const t=qr();return co({mutationFn:n=>lDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})},fDe=e=>{const t=qr();return co({mutationFn:n=>cDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})},pDe=e=>{const t=qr();return co({mutationFn:n=>uDe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[jr.NUTRITIONAL_PLAN,e]})}})};class Eee{constructor(t,n,r){this.date=t,this.weight=n,this.id=r}}class fj{fromJson(t){return new Eee(new Date(t.date),parseFloat(t.weight),t.id)}toJson(t){return{id:t.id,date:Si(t.date),weight:t.weight}}}const KI="weightentry",hDe=async(e="")=>{const t=Z2e(e),n=Pt(KI,{query:{ordering:"-date",limit:900,...t&&{date__gte:t}}}),{data:r}=await dt.get(n,{headers:kt()}),o=new fj;return r.results.map(i=>o.fromJson(i))},mDe=async e=>(await dt.delete(Pt(KI,{id:e}),{headers:kt()})).status,gDe=async e=>{const t=new fj,n=await dt.patch(Pt(KI,{id:e.id}),t.toJson(e),{headers:kt()});return t.fromJson(n)},yDe=async e=>{const t=new fj,n=await dt.post(Pt(KI),t.toJson(e),{headers:kt()});return t.fromJson(n.data)},vDe=22;function bDe(e,t=vDe){return e.length>t?e.slice(0,t)+"…":e}function wDe(e){return e.toLowerCase().replace(/\s/g,"_").replace("(","_").replace(")","_").replace("-","_")}function Xi(e){return`server.${wDe(e)}`}class xDe{constructor(t,n,r,o){this.id=t,this.name=n,this.nameEn=r,this.isFront=o}getName(t){return this.nameEn?`${this.name} (${t(Xi(this.nameEn))})`:this.name}}class Oee{fromJson(t){return new xDe(t.id,t.name,t.name_en,t.is_front)}toJson(t){return{}}}const SDe="muscle",CDe=async()=>{const e=Pt(SDe),{data:t}=await dt.get(e,{headers:kt()}),n=new Oee;return t.results.map(r=>n.fromJson(r))};class PDe{constructor(t,n){this.id=t,this.name=n}}class Iee{fromJson(t){return new PDe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const TDe="equipment",EDe=async()=>{const e=Pt(TDe),{data:t}=await dt.get(e,{headers:kt()}),n=new Iee;return t.results.map(r=>n.fromJson(r))};class ODe{constructor(t,n){this.id=t,this.name=n}}class kee{fromJson(t){return new ODe(t.id,t.name)}toJson(t){return{id:t.id,name:t.name}}}const IDe="exercisecategory",kDe=async()=>{const e=Pt(IDe),{data:t}=await dt.get(e,{headers:kt()}),n=new kee;return t.results.map(r=>n.fromJson(r))};var xu=(e=>(e[e.LINE_ART=1]="LINE_ART",e[e.THREE_D=2]="THREE_D",e[e.LOW_POLY=3]="LOW_POLY",e[e.PHOTO=4]="PHOTO",e[e.OTHER=5]="OTHER",e))(xu||{});class MDe{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class R_{fromJson(t){return new MDe(t.id,t.uuid,t.image,t.is_main)}toJson(t){return{id:t.id,image:t.url,is_front:t.isMain}}}class ADe{constructor(t,n,r){this.id=t,this.uuid=n,this.alias=r}}class Mee{fromJson(t){return new ADe(t.id,t.uuid,t.alias)}toJson(t){return{id:t.id,name:t.alias}}}class __{constructor(t,n,r){this.id=t,this.exercise=n,this.note=r}}class Aee{fromJson(t){return new __(t.id,t.exercise,t.comment)}toJson(t){return{id:t.id,comment:t.note,exercise:t.exercise}}}class $ee{constructor(t,n,r,o,i,a,s,l){nn(this,"notes",[]);nn(this,"aliases",[]);nn(this,"authors",[]);this.id=t,this.uuid=n,this.name=r,this.description=o,this.language=i,a&&(this.notes=a),s&&(this.aliases=s),l&&(this.authors=l)}get nameLong(){return bDe(this.name)}get nameSlug(){return xee(this.name)}}class pj{fromJson(t){var n,r;return new $ee(t.id,t.uuid,t.name,t.description,t.language,(n=t.notes)==null?void 0:n.map(o=>new Aee().fromJson(o)),(r=t.aliases)==null?void 0:r.map(o=>new Mee().fromJson(o)),t.author_history)}toJson(t){return{id:t.id,uuid:t.uuid,name:t.name,description:t.description,language:t.language}}}class $De{constructor(t,n,r,o){this.id=t,this.uuid=n,this.url=r,this.isMain=o}}class Ree{fromJson(t){return new $De(t.id,t.uuid,t.video,t.is_main)}toJson(t){return{id:t.id,video:t.url}}}class RDe{constructor(t,n,r,o,i,a,s,l,c,u,d){nn(this,"translations",[]);nn(this,"videos",[]);nn(this,"authors",[]);this.id=t,this.uuid=n,this.category=r,this.equipment=o,this.muscles=i,this.musclesSecondary=a,this.images=s,this.variationId=l,c&&(this.translations=c),u&&(this.videos=u),d&&(this.authors=d)}getTranslation(t){const n=t!=null?t.id:Wy;let r=this.translations.find(o=>o.language===n);return r||(r=this.translations.find(o=>o.language===Wy)),r||this.translations[0]}get availableLanguages(){return this.translations.map(t=>t.language)}get mainImage(){return this.images.find(t=>t.isMain)}get sideImages(){return this.images.filter(t=>!t.isMain)}}class _ee{fromJson(t){const n=new kee,r=new Iee,o=new Oee,i=new R_,a=new pj,s=new Ree,l=new RDe(t.id,t.uuid,n.fromJson(t.category),t.equipment.map(c=>r.fromJson(c)),t.muscles.map(c=>o.fromJson(c)),t.muscles_secondary.map(c=>o.fromJson(c)),t.images.map(c=>i.fromJson(c)),t.variations,t.exercises.map(c=>a.fromJson(c)),t.videos.map(c=>s.fromJson(c)),t.author_history);if(l.translations.some(c=>c.language===Wy)||console.info(`No english translation found for exercise base ${l.uuid}!`),l.translations.length===0)throw new Error(`No translations found for exercise base ${l.uuid}!`);return l}toJson(t){return{id:t.id,uuid:t.uuid,category:t.category.id,equipment:t.equipment.map(n=>n.id),muscles:t.muscles.map(n=>n.id),muscles_secondary:t.musclesSecondary.map(n=>n.id),images:t.images.map(n=>new R_().toJson(n))}}}const hj="exercisebaseinfo",mj="exercise-base";function Dee(e){const t=new _ee,n=[];for(const r of e.results)try{n.push(t.fromJson(r))}catch(o){console.error("An error happened, skipping base:",o)}return n}const _De=async()=>{const e=Pt(hj,{query:{limit:900}}),t=await dt.get(e,{headers:kt()});return Dee(t.data)},YI=async e=>{const t=new _ee,n=Pt(hj,{id:e}),r=await dt.get(n,{headers:kt()});return t.fromJson(r.data)},DDe=async e=>{if(!e)return[];const t=Pt(hj,{query:{variations:e}}),n=await dt.get(t,{headers:kt()});return Dee(n.data)},NDe=async(e,t,n,r,o,i)=>{const a=Pt(mj),s={category:e,equipment:t,muscles:n,muscles_secondary:r,variation_id:o,license_author:i};return(await dt.post(a,s,{headers:kt()})).data.id},gj=async(e,t)=>{const n=Pt(mj,{id:e});return(await dt.patch(n,t,{headers:kt()})).status},GU=async(e,t)=>{const r=Pt(mj,t===void 0?{id:e}:{id:e,query:{replaced_by:t}});return(await dt.delete(r,{headers:kt()})).status},yj="exercise-translation",LDe="exercise/search",FDe=async(e,t=u_e,n=!0)=>{const r=[t];t!==Gy&&n&&r.push(Gy);const o=Pt(LDe,{query:{term:e,language:r.join(",")}}),{data:i}=await dt.get(o);return i.suggestions},D_=async(e,t,n,r,o)=>{const i=Pt(yj),a={exercise_base:e,language:t,name:n,description:r,license_author:o},s=await dt.post(i,a,{headers:kt()});return new pj().fromJson(s.data)},jDe=async(e,t,n,r,o)=>{const i=Pt(yj,{id:e}),a={exercise_base:t,language:n,name:r,description:o},s=await dt.patch(i,a,{headers:kt()});return new pj().fromJson(s.data)},BDe=async e=>{const t=Pt(yj,{id:e});return(await dt.delete(t,{headers:kt()})).status};class Nee{constructor(t,n,r){this.id=t,this.nameShort=n,this.nameLong=r}}class zDe{fromJson(t){return new Nee(t.id,t.short_name,t.full_name)}toJson(t){return{}}}const VDe="language",HDe=async()=>{const e=Pt(VDe),{data:t}=await dt.get(e,{headers:kt()}),n=new zDe;return t.results.map(r=>n.fromJson(r))},Lee=(e,t)=>{const n=e.split("-")[0],r=t.find(o=>o.nameShort===n);if(r)return r},Fee="exerciseimage",jee=async e=>{const t=Pt(Fee),n=kt();n["Content-Type"]="multipart/form-data";const r=await dt.post(t,{exercise_base:e.exerciseId,image:e.image,license_title:e.imageData.title,license_object_url:e.imageData.objectUrl,license_author:e.imageData.author,license_author_url:e.imageData.authorUrl,license_derivative_source_url:e.imageData.derivativeSourceUrl,style:e.imageData.style},{headers:n});return new R_().fromJson(r.data)},UDe=async e=>{const t=Pt(Fee,{id:e}),n=kt();return(await dt.delete(t,{headers:n})).status},Bee="exercisealias",N_=async(e,t)=>{const n=Pt(Bee),r=await dt.post(n,{exercise:e,alias:t},{headers:kt()});return new Mee().fromJson(r.data)},WDe=async e=>(await dt.delete(Pt(Bee,{id:e}),{headers:kt()})).status,zee="video",GDe=async(e,t,n)=>{const r=Pt(zee),o=kt();o["Content-Type"]="multipart/form-data";const i=await dt.post(r,{exercise_base:e,license_author:t,video:n},{headers:o});return new Ree().fromJson(i.data)},qDe=async e=>{const t=Pt(zee,{id:e}),n=kt();return(await dt.delete(t,{headers:n})).status};class KDe{constructor(t,n,r,o){nn(this,"sets",[]);this.id=t,this.description=n,this.daysOfWeek=r,o&&(this.sets=o)}}class YDe{fromJson(t){return new KDe(t.id,t.description,t.day)}toJson(t){return{id:t.id,description:t.description,day:t.daysOfWeek}}}class XDe{constructor(t,n,r,o,i,a,s,l,c,u,d){this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.repetitionUnitObj=c,this.weightUnitObj=u,this.baseObj=d,c&&(this.repetitionUnitObj=c),u&&(this.weightUnitObj=u),d&&(this.baseObj=d)}get rirString(){return this.rir===null||this.rir===""?"-/-":this.rir}}class QDe{fromJson(t){return new XDe(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir}}}class JDe{constructor(t,n,r,o,i){nn(this,"days",[]);this.id=t,this.name=n,this.description=r,this.date=o,i&&(this.days=i)}}class Vee{fromJson(t){return new JDe(t.id,t.name,t.description,new Date(t.creation_date))}toJson(t){return{id:t.id,name:t.name,description:t.description,creation_date:Si(t.date)}}}function ZDe(e,t,n){n=n||(s=>s);const r=s=>s.rir?`${s.rir} ${n("routines.rir")}`:"",o=s=>{if(s.repetitionUnit===f_e)return"∞";const l=s.repetitionUnit!==yee?n(Xi(s.repetitionUnitObj.name)):"";return`${s.reps} ${l}`},i=s=>s===null?"":Number.isInteger(s)?s.toString():s.toFixed(2).toString(),a=(s,l=!1)=>{const c=o(s),u=s.weightUnitObj.name,d=i(s.weight),f=r(s);let p=l?c:`${e} × ${c}`.trim();if(d){const m=f?`, ${f}`:"";p+=` (${d} ${u}${m})`}else p+=f?` (${f})`:"";return p};return t.length===1?a(t[0]):t.map(s=>a(s,!0)).join(" – ")}class eNe{constructor(t,n,r,o,i,a){nn(this,"settings",[]);nn(this,"settingsComputed",[]);this.id=t,this.sets=n,this.order=r,this.comment=o,i&&(this.settings=i),a&&(this.settingsComputed=a)}get exercises(){return this.settingsFiltered.map(t=>t.base)}get settingsFiltered(){const t=[];for(const n of this.settings)t.filter(o=>o.exerciseId===n.exerciseId).length===0&&t.push(n);return t}filterSettingsByExercise(t){return this.settings.filter(n=>n.exerciseId===t.id)}getSettingsTextRepresentation(t,n){return n=n||(r=>r),ZDe(this.sets,this.filterSettingsByExercise(t),n)}}class tNe{fromJson(t){return new eNe(t.id,t.sets,t.order,t.comment)}toJson(t){return{id:t.id,sets:t.sets,order:t.order,comment:t.order}}}class nNe{constructor(t,n,r,o,i,a,s,l,c,u,d,f){nn(this,"base");this.id=t,this.date=n,this.exerciseId=r,this.repetitionUnit=o,this.reps=i,this.weight=a,this.weightUnit=s,this.rir=l,this.order=c,this.comment=u,this.repetitionUnitObj=d,this.weightUnitObj=f,d&&(this.repetitionUnitObj=d),f&&(this.weightUnitObj=f)}}class rNe{fromJson(t){return new nNe(t.id,new Date(t.date),t.exercise_base,t.repetition_unit,t.reps,t.weight===null?null:Number.parseFloat(t.weight),t.weight_unit,t.rir,t.order,t.comment)}toJson(t){return{id:t.id,exercise_base:t.exerciseId,repetition_unit:t.repetitionUnit,reps:t.reps,weight:t.weight,weight_unit:t.weightUnit,rir:t.rir,order:t.order,comment:t.comment}}}class oNe{constructor(t,n){nn(this,"id");nn(this,"name");this.id=t,this.name=n}}class iNe{fromJson(t){return new oNe(t.id,t.name)}toJson(t){return{}}}class aNe{constructor(t,n){nn(this,"id");nn(this,"name");this.id=t,this.name=n}}class sNe{fromJson(t){return new aNe(t.id,t.name)}toJson(t){return{}}}const lNe="setting-repetitionunit",cNe="setting-weightunit",Hee=async()=>{const e=Pt(lNe),{data:t}=await dt.get(e,{headers:kt()}),n=new iNe;return t.results.map(r=>n.fromJson(r))},Uee=async()=>{const e=Pt(cNe),{data:t}=await dt.get(e,{headers:kt()}),n=new sNe;return t.results.map(r=>n.fromJson(r))},vj="workout",uNe="workoutlog",dNe="day",fNe="set",pNe="setting",hNe=e=>new Vee().fromJson(e),Wee=async e=>{const t=new Vee,n=new YDe,r=new tNe,o=new rNe,i=await dt.get(Pt(vj,{id:e}),{headers:kt()}),a=t.fromJson(i.data),s=await dt.get(Pt(dNe,{query:{training:a.id.toString()}}),{headers:kt()}),l=await Promise.all([Hee(),Uee()]),c=l[0],u=l[1];for(const d of s.data.results){const f=n.fromJson(d),p=await dt.get(Pt(fNe,{query:{exerciseday:f.id.toString()}}),{headers:kt()});for(const v of p.data.results){const w=r.fromJson(v);f.sets.push(w)}const m=p.data.results.map(v=>dt.get(Pt(pNe,{query:{set:v.id}}),{headers:kt()})),g=await Promise.all(m);for(const v of g)for(const w of v.data.results){const x=f.sets.find(O=>O.id===w.set),S=o.fromJson(w),P=u.find(O=>O.id===S.weightUnit),T=c.find(O=>O.id===S.repetitionUnit),E=x.settings.find(O=>O.exerciseId===S.exerciseId);S.base=E!==void 0?E.base:await YI(S.exerciseId),S.weightUnitObj=P,S.repetitionUnitObj=T,x.settings.push(S)}a.days.push(f)}return a},mNe=async()=>{const e=Pt(vj,{query:{limit:"1"}}),t=await dt.get(e,{headers:kt()});return t.data.count===0?null:await Wee(t.data.results[0].id)},gNe=async e=>await Wee(e),yNe=async()=>{const e=Pt(vj),t=await dt.get(e,{headers:kt()}),n=[];for(const r of t.data.results)n.push(await hNe(r));return n},vNe=async(e,t=!1)=>{const n=new QDe,r=Pt(uNe,{query:{workout:e.toString(),limit:vee,ordering:"-date"}}),o=await Promise.all([Hee(),Uee()]),i=o[0],a=o[1],s=new Map,l=[];for await(const c of DS(r))for(const u of c){const d=n.fromJson(u);d.repetitionUnitObj=i.find(f=>f.id===d.repetitionUnit),d.weightUnitObj=a.find(f=>f.id===d.weightUnit),t&&(s.get(d.exerciseId)===void 0&&s.set(d.exerciseId,await YI(d.exerciseId)),d.baseObj=s.get(d.exerciseId)),l.push(d)}return l};class bNe{constructor(t,n,r,o){nn(this,"entries",[]);this.id=t,this.name=n,this.unit=r,o&&(this.entries=o)}}class XI{fromJson(t){return new bNe(t.id,t.name,t.unit)}toJson(t){return{id:t.id,name:t.name,unit:t.unit}}}class wNe{constructor(t,n,r,o,i){this.id=t,this.category=n,this.date=r,this.value=o,this.notes=i}}class QI{fromJson(t){return new wNe(t.id,t.category,new Date(t.date),t.value,t.notes)}toJson(t){return{id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes}}}const NS="measurement-category",LS="measurement",xNe=async()=>{const e=new XI,t=new QI,{data:n}=await dt.get(Pt(NS),{headers:kt()}),r=n.results.map(s=>e.fromJson(s)),o=r.map(async s=>{const l=[],c=Pt(LS,{query:{category:s.id}});for await(const u of DS(c,kt()))for(const d of u)l.push(t.fromJson(d));return l}),i=await Promise.all(o);let a;return i.forEach(s=>{s.length>0&&(a=s[0].category,r.findLast(l=>l.id===a).entries=s)}),r},SNe=async e=>{const{data:t}=await dt.get(Pt(NS,{id:e}),{headers:kt()}),n=new XI().fromJson(t),r=new QI,o=[],i=Pt(LS,{query:{category:n.id}});for await(const a of DS(i,kt()))for(const s of a)o.push(r.fromJson(s));return n.entries=o,n},CNe=async e=>{const t=await dt.post(Pt(NS),{name:e.name,unit:e.unit},{headers:kt()});return new XI().fromJson(t.data)},PNe=async e=>{const t=await dt.patch(Pt(NS,{id:e.id}),{name:e.name,unit:e.unit},{headers:kt()});return new XI().fromJson(t.data)},TNe=async e=>{await dt.delete(Pt(NS,{id:e}),{headers:kt()})},ENe=async e=>{await dt.delete(Pt(LS,{id:e}),{headers:kt()})},ONe=async e=>{const t=await dt.patch(Pt(LS,{id:e.id}),{date:Si(e.date),value:e.value,notes:e.notes},{headers:kt()});return new QI().fromJson(t.data)},INe=async e=>{const t=await dt.post(Pt(LS),{category:e.categoryId,date:Si(e.date),value:e.value,notes:e.notes},{headers:kt()});return new QI().fromJson(t.data)};function bi(e,t){return e.toLocaleString(t,{maximumFractionDigits:0})}function Gee(e,t,n){return e.toLocaleString(t,{maximumFractionDigits:0,unit:n.valueOf(),style:"unit"})}function xn(e,t){return Gee(e,t,"gram")}function $$(e,t){return Gee(e,t,"percent")}const ry=e=>{const{i18n:t}=Ue(),n=e.planned>0;return Q(Mt,{children:[C(TZ,{variant:"determinate",value:e.percentage<100?e.percentage:100}),Q(ct,{variant:"caption",children:[e.title," — ",xn(e.logged,t.language),n&&Q(Mt,{children:[" / ",xn(e.planned,t.language)]})]})]})};var kNe=Array.isArray,Ea=kNe,MNe=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,qee=MNe,ANe=qee,$Ne=typeof self=="object"&&self&&self.Object===Object&&self,RNe=ANe||$Ne||Function("return this")(),Kc=RNe,_Ne=Kc,DNe=_Ne.Symbol,FS=DNe,qU=FS,Kee=Object.prototype,NNe=Kee.hasOwnProperty,LNe=Kee.toString,d0=qU?qU.toStringTag:void 0;function FNe(e){var t=NNe.call(e,d0),n=e[d0];try{e[d0]=void 0;var r=!0}catch{}var o=LNe.call(e);return r&&(t?e[d0]=n:delete e[d0]),o}var jNe=FNe,BNe=Object.prototype,zNe=BNe.toString;function VNe(e){return zNe.call(e)}var HNe=VNe,KU=FS,UNe=jNe,WNe=HNe,GNe="[object Null]",qNe="[object Undefined]",YU=KU?KU.toStringTag:void 0;function KNe(e){return e==null?e===void 0?qNe:GNe:YU&&YU in Object(e)?UNe(e):WNe(e)}var ad=KNe;function YNe(e){return e!=null&&typeof e=="object"}var sd=YNe,XNe=ad,QNe=sd,JNe="[object Symbol]";function ZNe(e){return typeof e=="symbol"||QNe(e)&&XNe(e)==JNe}var qv=ZNe,eLe=Ea,tLe=qv,nLe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rLe=/^\w*$/;function oLe(e,t){if(eLe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||tLe(e)?!0:rLe.test(e)||!nLe.test(e)||t!=null&&e in Object(t)}var bj=oLe;function iLe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Kf=iLe;const Kv=_n(Kf);var aLe=ad,sLe=Kf,lLe="[object AsyncFunction]",cLe="[object Function]",uLe="[object GeneratorFunction]",dLe="[object Proxy]";function fLe(e){if(!sLe(e))return!1;var t=aLe(e);return t==cLe||t==uLe||t==lLe||t==dLe}var wj=fLe;const Ht=_n(wj);var pLe=Kc,hLe=pLe["__core-js_shared__"],mLe=hLe,R$=mLe,XU=function(){var e=/[^.]+$/.exec(R$&&R$.keys&&R$.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gLe(e){return!!XU&&XU in e}var yLe=gLe,vLe=Function.prototype,bLe=vLe.toString;function wLe(e){if(e!=null){try{return bLe.call(e)}catch{}try{return e+""}catch{}}return""}var Yee=wLe,xLe=wj,SLe=yLe,CLe=Kf,PLe=Yee,TLe=/[\\^$.*+?()[\]{}|]/g,ELe=/^\[object .+?Constructor\]$/,OLe=Function.prototype,ILe=Object.prototype,kLe=OLe.toString,MLe=ILe.hasOwnProperty,ALe=RegExp("^"+kLe.call(MLe).replace(TLe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $Le(e){if(!CLe(e)||SLe(e))return!1;var t=xLe(e)?ALe:ELe;return t.test(PLe(e))}var RLe=$Le;function _Le(e,t){return e==null?void 0:e[t]}var DLe=_Le,NLe=RLe,LLe=DLe;function FLe(e,t){var n=LLe(e,t);return NLe(n)?n:void 0}var Xh=FLe,jLe=Xh,BLe=jLe(Object,"create"),JI=BLe,QU=JI;function zLe(){this.__data__=QU?QU(null):{},this.size=0}var VLe=zLe;function HLe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ULe=HLe,WLe=JI,GLe="__lodash_hash_undefined__",qLe=Object.prototype,KLe=qLe.hasOwnProperty;function YLe(e){var t=this.__data__;if(WLe){var n=t[e];return n===GLe?void 0:n}return KLe.call(t,e)?t[e]:void 0}var XLe=YLe,QLe=JI,JLe=Object.prototype,ZLe=JLe.hasOwnProperty;function eFe(e){var t=this.__data__;return QLe?t[e]!==void 0:ZLe.call(t,e)}var tFe=eFe,nFe=JI,rFe="__lodash_hash_undefined__";function oFe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=nFe&&t===void 0?rFe:t,this}var iFe=oFe,aFe=VLe,sFe=ULe,lFe=XLe,cFe=tFe,uFe=iFe;function Yv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var OFe=EFe,IFe=ZI;function kFe(e,t){var n=this.__data__,r=IFe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var MFe=kFe,AFe=pFe,$Fe=xFe,RFe=PFe,_Fe=OFe,DFe=MFe;function Xv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},qp=function(t){return jS(t)&&t.indexOf("%")===t.length-1},st=function(t){return eBe(t)&&!Jv(t)},Ro=function(t){return st(t)||jS(t)},oBe=0,Yf=function(t){var n=++oBe;return"".concat(t||"").concat(n)},Vi=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!st(t)&&!jS(t))return r;var i;if(qp(t)){var a=t.indexOf("%");i=n*parseFloat(t.slice(0,a))/100}else i=+t;return Jv(i)&&(i=r),o&&i>n&&(i=n),i},Hd=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},iBe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function F_(e){"@babel/helpers - typeof";return F_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F_(e)}var oW={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart"},Au=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},iW=null,D$=null,Ij=function e(t){if(t===iW&&Array.isArray(D$))return D$;var n=[];return y.Children.forEach(t,function(r){jt(r)||(i0e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),D$=n,iW=t,n};function qi(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(o){return Au(o)}):r=[Au(t)],Ij(e).forEach(function(o){var i=ts(o,"type.displayName")||ts(o,"type.name");r.indexOf(i)!==-1&&n.push(o)}),n}function Ba(e,t){var n=qi(e,t);return n&&n[0]}var aW=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,o=n.height;return!(!st(r)||r<=0||!st(o)||o<=0)},pBe=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],hBe=function(t){return t&&t.type&&jS(t.type)&&pBe.indexOf(t.type)>=0},rte=function(t){return t&&F_(t)==="object"&&"clipDot"in t},mBe=function(t,n,r,o){var i,a=(i=_$==null?void 0:_$[o])!==null&&i!==void 0?i:[];return!Ht(t)&&(o&&a.includes(n)||lBe.includes(n))||r&&Oj.includes(n)},$t=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var o=t;if(y.isValidElement(t)&&(o=t.props),!Kv(o))return null;var i={};return Object.keys(o).forEach(function(a){var s;mBe((s=o)===null||s===void 0?void 0:s[a],a,n,r)&&(i[a]=o[a])}),i},j_=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return sW(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function z_(e){var t=e.children,n=e.width,r=e.height,o=e.viewBox,i=e.className,a=e.style,s=e.title,l=e.desc,c=bBe(e,vBe),u=o||{width:n,height:r,x:0,y:0},d=de("recharts-surface",i);return Y.createElement("svg",B_({},$t(c,!0,"svg"),{className:d,width:n,height:r,style:a,viewBox:"".concat(u.x," ").concat(u.y," ").concat(u.width," ").concat(u.height)}),Y.createElement("title",null,s),Y.createElement("desc",null,l),t)}var xBe=["children","className"];function V_(){return V_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function CBe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var on=Y.forwardRef(function(e,t){var n=e.children,r=e.className,o=SBe(e,xBe),i=de("recharts-layer",r);return Y.createElement("g",V_({className:i},$t(o,!0),{ref:t}),n)}),Ql=function(t,n){for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;io?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r=r?e:EBe(e,t,n)}var IBe=OBe,kBe="\\ud800-\\udfff",MBe="\\u0300-\\u036f",ABe="\\ufe20-\\ufe2f",$Be="\\u20d0-\\u20ff",RBe=MBe+ABe+$Be,_Be="\\ufe0e\\ufe0f",DBe="\\u200d",NBe=RegExp("["+DBe+kBe+RBe+_Be+"]");function LBe(e){return NBe.test(e)}var ote=LBe;function FBe(e){return e.split("")}var jBe=FBe,ite="\\ud800-\\udfff",BBe="\\u0300-\\u036f",zBe="\\ufe20-\\ufe2f",VBe="\\u20d0-\\u20ff",HBe=BBe+zBe+VBe,UBe="\\ufe0e\\ufe0f",WBe="["+ite+"]",H_="["+HBe+"]",U_="\\ud83c[\\udffb-\\udfff]",GBe="(?:"+H_+"|"+U_+")",ate="[^"+ite+"]",ste="(?:\\ud83c[\\udde6-\\uddff]){2}",lte="[\\ud800-\\udbff][\\udc00-\\udfff]",qBe="\\u200d",cte=GBe+"?",ute="["+UBe+"]?",KBe="(?:"+qBe+"(?:"+[ate,ste,lte].join("|")+")"+ute+cte+")*",YBe=ute+cte+KBe,XBe="(?:"+[ate+H_+"?",H_,ste,lte,WBe].join("|")+")",QBe=RegExp(U_+"(?="+U_+")|"+XBe+YBe,"g");function JBe(e){return e.match(QBe)||[]}var ZBe=JBe,eze=jBe,tze=ote,nze=ZBe;function rze(e){return tze(e)?nze(e):eze(e)}var oze=rze,ize=IBe,aze=ote,sze=oze,lze=Zee;function cze(e){return function(t){t=lze(t);var n=aze(t)?sze(t):void 0,r=n?n[0]:t.charAt(0),o=n?ize(n,1).join(""):t.slice(1);return r[e]()+o}}var uze=cze,dze=uze,fze=dze("toUpperCase"),pze=fze;const rk=_n(pze);function br(e){return function(){return e}}const dte=Math.cos,JT=Math.sin,cc=Math.sqrt,ZT=Math.PI,ok=2*ZT,W_=Math.PI,G_=2*W_,Dp=1e-6,hze=G_-Dp;function fte(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return fte;const n=10**t;return function(r){this._+=r[0];for(let o=1,i=r.length;oDp)if(!(Math.abs(d*l-c*u)>Dp)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=o-s,g=l*l+c*c,v=p*p+m*m,w=Math.sqrt(g),x=Math.sqrt(f),S=i*Math.tan((W_-Math.acos((g+f-v)/(2*w*x)))/2),P=S/x,T=S/w;Math.abs(P-1)>Dp&&this._append`L${t+P*u},${n+P*d}`,this._append`A${i},${i},0,0,${+(d*p>u*m)},${this._x1=t+T*l},${this._y1=n+T*c}`}}arc(t,n,r,o,i,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(o),l=r*Math.sin(o),c=t+s,u=n+l,d=1^a,f=a?o-i:i-o;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Dp||Math.abs(this._y1-u)>Dp)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%G_+G_),f>hze?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>Dp&&this._append`A${r},${r},0,${+(f>=W_)},${d},${this._x1=t+r*Math.cos(i)},${this._y1=n+r*Math.sin(i)}`)}rect(t,n,r,o){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+o}h${-r}Z`}toString(){return this._}}function kj(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new gze(t)}function Mj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function pte(e){this._context=e}pte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ik(e){return new pte(e)}function hte(e){return e[0]}function mte(e){return e[1]}function gte(e,t){var n=br(!0),r=null,o=ik,i=null,a=kj(s);e=typeof e=="function"?e:e===void 0?hte:br(e),t=typeof t=="function"?t:t===void 0?mte:br(t);function s(l){var c,u=(l=Mj(l)).length,d,f=!1,p;for(r==null&&(i=o(p=a())),c=0;c<=u;++c)!(c=p;--m)s.point(S[m],P[m]);s.lineEnd(),s.areaEnd()}w&&(S[f]=+e(v,f,d),P[f]=+t(v,f,d),s.point(r?+r(v,f,d):S[f],n?+n(v,f,d):P[f]))}if(x)return s=null,x+""||null}function u(){return gte().defined(o).curve(a).context(i)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:br(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:br(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:br(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:br(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:br(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:br(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(o=typeof d=="function"?d:br(!!d),c):o},c.curve=function(d){return arguments.length?(a=d,i!=null&&(s=a(i)),c):a},c.context=function(d){return arguments.length?(d==null?i=s=null:s=a(i=d),c):i},c}class yte{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function yze(e){return new yte(e,!0)}function vze(e){return new yte(e,!1)}const Aj={draw(e,t){const n=cc(t/ZT);e.moveTo(n,0),e.arc(0,0,n,0,ok)}},bze={draw(e,t){const n=cc(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},vte=cc(1/3),wze=vte*2,xze={draw(e,t){const n=cc(t/wze),r=n*vte;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Sze={draw(e,t){const n=cc(t),r=-n/2;e.rect(r,r,n,n)}},Cze=.8908130915292852,bte=JT(ZT/10)/JT(7*ZT/10),Pze=JT(ok/10)*bte,Tze=-dte(ok/10)*bte,Eze={draw(e,t){const n=cc(t*Cze),r=Pze*n,o=Tze*n;e.moveTo(0,-n),e.lineTo(r,o);for(let i=1;i<5;++i){const a=ok*i/5,s=dte(a),l=JT(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*o,l*r+s*o)}e.closePath()}},N$=cc(3),Oze={draw(e,t){const n=-cc(t/(N$*3));e.moveTo(0,n*2),e.lineTo(-N$*n,-n),e.lineTo(N$*n,-n),e.closePath()}},Is=-.5,ks=cc(3)/2,q_=1/cc(12),Ize=(q_/2+1)*3,kze={draw(e,t){const n=cc(t/Ize),r=n/2,o=n*q_,i=r,a=n*q_+n,s=-i,l=a;e.moveTo(r,o),e.lineTo(i,a),e.lineTo(s,l),e.lineTo(Is*r-ks*o,ks*r+Is*o),e.lineTo(Is*i-ks*a,ks*i+Is*a),e.lineTo(Is*s-ks*l,ks*s+Is*l),e.lineTo(Is*r+ks*o,Is*o-ks*r),e.lineTo(Is*i+ks*a,Is*a-ks*i),e.lineTo(Is*s+ks*l,Is*l-ks*s),e.closePath()}};function Mze(e,t){let n=null,r=kj(o);e=typeof e=="function"?e:br(e||Aj),t=typeof t=="function"?t:br(t===void 0?64:+t);function o(){let i;if(n||(n=i=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(i){return arguments.length?(e=typeof i=="function"?i:br(i),o):e},o.size=function(i){return arguments.length?(t=typeof i=="function"?i:br(+i),o):t},o.context=function(i){return arguments.length?(n=i??null,o):n},o}function eE(){}function tE(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function wte(e){this._context=e}wte.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:tE(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:tE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Aze(e){return new wte(e)}function xte(e){this._context=e}xte.prototype={areaStart:eE,areaEnd:eE,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:tE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function $ze(e){return new xte(e)}function Ste(e){this._context=e}Ste.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:tE(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Rze(e){return new Ste(e)}function Cte(e){this._context=e}Cte.prototype={areaStart:eE,areaEnd:eE,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function _ze(e){return new Cte(e)}function cW(e){return e<0?-1:1}function uW(e,t,n){var r=e._x1-e._x0,o=t-e._x1,i=(e._y1-e._y0)/(r||o<0&&-0),a=(n-e._y1)/(o||r<0&&-0),s=(i*o+a*r)/(r+o);return(cW(i)+cW(a))*Math.min(Math.abs(i),Math.abs(a),.5*Math.abs(s))||0}function dW(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function L$(e,t,n){var r=e._x0,o=e._y0,i=e._x1,a=e._y1,s=(i-r)/3;e._context.bezierCurveTo(r+s,o+s*t,i-s,a-s*n,i,a)}function nE(e){this._context=e}nE.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:L$(this,this._t0,dW(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,L$(this,dW(this,n=uW(this,e,t)),n);break;default:L$(this,this._t0,n=uW(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Pte(e){this._context=new Tte(e)}(Pte.prototype=Object.create(nE.prototype)).point=function(e,t){nE.prototype.point.call(this,t,e)};function Tte(e){this._context=e}Tte.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,o,i){this._context.bezierCurveTo(t,e,r,n,i,o)}};function Dze(e){return new nE(e)}function Nze(e){return new Pte(e)}function Ete(e){this._context=e}Ete.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=fW(e),o=fW(t),i=0,a=1;a=0;--t)o[t]=(a[t]-o[t+1])/i[t];for(i[n-1]=(e[n]+o[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Fze(e){return new ak(e,.5)}function jze(e){return new ak(e,0)}function Bze(e){return new ak(e,1)}function qy(e,t){if((a=e.length)>1)for(var n=1,r,o,i=e[t[0]],a,s=i.length;n=0;)n[t]=t;return n}function zze(e,t){return e[t]}function Vze(e){const t=[];return t.key=e,t}function Hze(){var e=br([]),t=K_,n=qy,r=zze;function o(i){var a=Array.from(e.apply(this,arguments),Vze),s,l=a.length,c=-1,u;for(const d of i)for(s=0,++c;s0){for(var n,r,o=0,i=e[0].length,a;o0){for(var n=0,r=e[t[0]],o,i=r.length;n0)||!((i=(o=e[t[0]]).length)>0))){for(var n=0,r=1,o,i,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jze(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Ote={symbolCircle:Aj,symbolCross:bze,symbolDiamond:xze,symbolSquare:Sze,symbolStar:Eze,symbolTriangle:Oze,symbolWye:kze},Zze=Math.PI/180,eVe=function(t){var n="symbol".concat(rk(t));return Ote[n]||Aj},tVe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var o=18*Zze;return 1.25*t*t*(Math.tan(o)-Math.tan(o*2)*Math.pow(Math.tan(o),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},nVe=function(t,n){Ote["symbol".concat(rk(t))]=n},sk=function(t){var n=t.type,r=n===void 0?"circle":n,o=t.size,i=o===void 0?64:o,a=t.sizeType,s=a===void 0?"area":a,l=Qze(t,qze),c=hW(hW({},l),{},{type:r,size:i,sizeType:s}),u=function(){var v=eVe(r),w=Mze().type(v).size(tVe(i,s,r));return w()},d=c.className,f=c.cx,p=c.cy,m=$t(c,!0);return f===+f&&p===+p&&i===+i?Y.createElement("path",Y_({},m,{className:de("recharts-symbols",d),transform:"translate(".concat(f,", ").concat(p,")"),d:u()})):null};sk.registerSymbol=nVe;function Ky(e){"@babel/helpers - typeof";return Ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ky(e)}function X_(){return X_=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=h.inactive?c:h.color;return J.createElement("li",B_({className:v,style:d,key:"legend-item-".concat(m)},Ef(r.props,h,m)),J.createElement(A_,{width:a,height:a,viewBox:u,style:f},r.renderIcon(h)),J.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(w,h,m):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return J.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);Jw(xj,"displayName","Legend");Jw(xj,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Qze=VI;function Jze(){this.__data__=new Qze,this.size=0}var Zze=Jze;function eVe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var tVe=eVe;function nVe(e){return this.__data__.get(e)}var rVe=nVe;function oVe(e){return this.__data__.has(e)}var iVe=oVe,aVe=VI,sVe=dj,lVe=fj,cVe=200;function uVe(e,t){var n=this.__data__;if(n instanceof aVe){var r=n.__data__;if(!sVe||r.lengths))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,h=n&$Ve?new IVe:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=N5e}var Tj=L5e,F5e=od,j5e=Tj,B5e=id,z5e="[object Arguments]",V5e="[object Array]",H5e="[object Boolean]",U5e="[object Date]",W5e="[object Error]",G5e="[object Function]",q5e="[object Map]",K5e="[object Number]",Y5e="[object Object]",X5e="[object RegExp]",Q5e="[object Set]",J5e="[object String]",Z5e="[object WeakMap]",eHe="[object ArrayBuffer]",tHe="[object DataView]",nHe="[object Float32Array]",rHe="[object Float64Array]",oHe="[object Int8Array]",iHe="[object Int16Array]",aHe="[object Int32Array]",sHe="[object Uint8Array]",lHe="[object Uint8ClampedArray]",cHe="[object Uint16Array]",uHe="[object Uint32Array]",Or={};Or[nHe]=Or[rHe]=Or[oHe]=Or[iHe]=Or[aHe]=Or[sHe]=Or[lHe]=Or[cHe]=Or[uHe]=!0;Or[z5e]=Or[V5e]=Or[eHe]=Or[H5e]=Or[tHe]=Or[U5e]=Or[W5e]=Or[G5e]=Or[q5e]=Or[K5e]=Or[Y5e]=Or[X5e]=Or[Q5e]=Or[J5e]=Or[Z5e]=!1;function dHe(e){return B5e(e)&&j5e(e.length)&&!!Or[F5e(e)]}var fHe=dHe;function pHe(e){return function(t){return e(t)}}var Ete=pHe,KT={exports:{}};KT.exports;(function(e,t){var n=Nee,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(KT,KT.exports);var hHe=KT.exports,mHe=fHe,gHe=Ete,fW=hHe,pW=fW&&fW.isTypedArray,yHe=pW?gHe(pW):mHe,Ote=yHe,vHe=x5e,bHe=Cj,wHe=Ea,xHe=Tte,SHe=Pj,CHe=Ote,PHe=Object.prototype,THe=PHe.hasOwnProperty;function EHe(e,t){var n=wHe(e),r=!n&&bHe(e),o=!n&&!r&&xHe(e),i=!n&&!r&&!o&&CHe(e),a=n||r||o||i,s=a?vHe(e.length,String):[],l=s.length;for(var c in e)(t||THe.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||SHe(c,l)))&&s.push(c);return s}var OHe=EHe,IHe=Object.prototype;function kHe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||IHe;return e===n}var MHe=kHe;function AHe(e,t){return function(n){return e(t(n))}}var Ite=AHe,$He=Ite,RHe=$He(Object.keys,Object),_He=RHe,DHe=MHe,NHe=_He,LHe=Object.prototype,FHe=LHe.hasOwnProperty;function jHe(e){if(!DHe(e))return NHe(e);var t=[];for(var n in Object(e))FHe.call(e,n)&&n!="constructor"&&t.push(n);return t}var BHe=jHe,zHe=cj,VHe=Tj;function HHe(e){return e!=null&&VHe(e.length)&&!zHe(e)}var RS=HHe,UHe=OHe,WHe=BHe,GHe=RS;function qHe(e){return GHe(e)?UHe(e):WHe(e)}var XI=qHe,KHe=c5e,YHe=b5e,XHe=XI;function QHe(e){return KHe(e,XHe,YHe)}var JHe=QHe,hW=JHe,ZHe=1,e4e=Object.prototype,t4e=e4e.hasOwnProperty;function n4e(e,t,n,r,o,i){var a=n&ZHe,s=hW(e),l=s.length,c=hW(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:t4e.call(t,f)))return!1}var h=i.get(e),m=i.get(t);if(h&&m)return h==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=a;++d-1}var e3e=ZUe;function t3e(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=g3e){var c=t?null:h3e(e);if(c)return m3e(c);a=!1,o=p3e,l=new u3e}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $3e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function R3e(e){return e.value}function _3e(e,t){if(J.isValidElement(e))return J.cloneElement(e,t);if(typeof e=="function")return J.createElement(e,t);t.ref;var n=A3e(t,C3e);return J.createElement(xj,n)}var MW=1,Mu=function(e){function t(){var n;P3e(this,t);for(var r=arguments.length,o=new Array(r),i=0;iMW||Math.abs(o.height-this.lastBoundingBox.height)>MW)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?du({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var h=this.getBBoxSnapshot();d={left:((c||0)-h.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();f={top:((u||0)-m.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return du(du({},d),f)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,d=du(du({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return J.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(h){r.wrapperNode=h}},_3e(i,du(du({},this.props),{},{payload:Dte(u,c,R3e)})))}}],[{key:"getWithHeight",value:function(r,o){var i=du(du({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&<(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(y.PureComponent);QI(Mu,"displayName","Legend");QI(Mu,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var AW=MS,D3e=Cj,N3e=Ea,$W=AW?AW.isConcatSpreadable:void 0;function L3e(e){return N3e(e)||D3e(e)||!!($W&&e&&e[$W])}var F3e=L3e,j3e=Cte,B3e=F3e;function Fte(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=B3e),o||(o=[]);++i0&&n(s)?t>1?Fte(s,t-1,n,r,o):j3e(o,s):r||(o[o.length]=s)}return o}var jte=Fte;function z3e(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(n(i[l],l,i)===!1)break}return t}}var V3e=z3e,H3e=V3e,U3e=H3e(),W3e=U3e,G3e=W3e,q3e=XI;function K3e(e,t){return e&&G3e(e,t,q3e)}var Bte=K3e,Y3e=RS;function X3e(e,t){return function(n,r){if(n==null)return n;if(!Y3e(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++it||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var uWe=cWe,A$=hj,dWe=mj,fWe=Gc,pWe=zte,hWe=iWe,mWe=Ete,gWe=uWe,yWe=Hv,vWe=Ea;function bWe(e,t,n){t.length?t=A$(t,function(i){return vWe(i)?function(a){return dWe(a,i.length===1?i[0]:i)}:i}):t=[yWe];var r=-1;t=A$(t,mWe(fWe));var o=pWe(e,function(i,a,s){var l=A$(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return hWe(o,function(i,a){return gWe(i,a,n)})}var wWe=bWe;function xWe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var SWe=xWe,CWe=SWe,_W=Math.max;function PWe(e,t,n){return t=_W(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=_W(r.length-t,0),a=Array(i);++o0){if(++t>=_We)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var FWe=LWe,jWe=RWe,BWe=FWe,zWe=BWe(jWe),VWe=zWe,HWe=Hv,UWe=TWe,WWe=VWe;function GWe(e,t){return WWe(UWe(e,t,HWe),e+"")}var qWe=GWe,KWe=uj,YWe=RS,XWe=Pj,QWe=Hf;function JWe(e,t,n){if(!QWe(n))return!1;var r=typeof t;return(r=="number"?YWe(n)&&XWe(t,n.length):r=="string"&&t in n)?KWe(n[t],e):!1}var JI=JWe,ZWe=jte,e6e=wWe,t6e=qWe,NW=JI,n6e=t6e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&NW(e,t[0],t[1])?t=[]:n>2&&NW(t[0],t[1],t[2])&&(t=[t[0]]),e6e(e,ZWe(t,1),[])}),r6e=n6e;const Ij=Rn(r6e);function Zw(e){"@babel/helpers - typeof";return Zw=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zw(e)}function K_(){return K_=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(r0,"-left"),lt(n)&&t&<(t.x)&&n=t.y),"".concat(r0,"-top"),lt(r)&&t&<(t.y)&&rg?Math.max(u,l[r]):Math.max(d,l[r])}function v6e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function b6e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&n?(u=jW({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=jW({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=v6e({translateX:u,translateY:d,useTranslate3d:s})):c=g6e,{cssProperties:c,cssClasses:y6e({translateX:u,translateY:d,coordinate:n})}}function zy(e){"@babel/helpers - typeof";return zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zy(e)}function BW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function zW(e){for(var t=1;tVW||Math.abs(r.height-this.state.lastBoundingBox.height)>VW)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,d=o.hasPayload,f=o.isAnimationActive,h=o.offset,m=o.position,g=o.reverseDirection,v=o.useTranslate3d,w=o.viewBox,x=o.wrapperStyle,S=b6e({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:h,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),P=S.cssClasses,T=S.cssProperties,E=zW(zW({transition:f&&i?"transform ".concat(s,"ms ").concat(l):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return J.createElement("div",{tabIndex:-1,className:P,style:E,ref:function(k){r.wrapperNode=k}},c)}}])}(y.PureComponent),k6e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Kl={isSsr:k6e(),get:function(t){return Kl[t]},set:function(t,n){if(typeof t=="string")Kl[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(o){Kl[o]=t[o]})}}};function Vy(e){"@babel/helpers - typeof";return Vy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vy(e)}function HW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function UW(e){for(var t=1;t0;return J.createElement(I6e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:i,coordinate:u,hasPayload:E,offset:h,position:v,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:P},j6e(c,UW(UW({},this.props),{},{payload:T})))}}])}(y.PureComponent);kj(zs,"displayName","Tooltip");kj(zs,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Kl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var B6e=Wc,z6e=function(){return B6e.Date.now()},V6e=z6e,H6e=/\s/;function U6e(e){for(var t=e.length;t--&&H6e.test(e.charAt(t)););return t}var W6e=U6e,G6e=W6e,q6e=/^\s+/;function K6e(e){return e&&e.slice(0,G6e(e)+1).replace(q6e,"")}var Y6e=K6e,X6e=Y6e,WW=Hf,Q6e=Nv,GW=NaN,J6e=/^[-+]0x[0-9a-f]+$/i,Z6e=/^0b[01]+$/i,eGe=/^0o[0-7]+$/i,tGe=parseInt;function nGe(e){if(typeof e=="number")return e;if(Q6e(e))return GW;if(WW(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=WW(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=X6e(e);var n=Z6e.test(e);return n||eGe.test(e)?tGe(e.slice(2),n?2:8):J6e.test(e)?GW:+e}var qte=nGe,rGe=Hf,R$=V6e,qW=qte,oGe="Expected a function",iGe=Math.max,aGe=Math.min;function sGe(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(oGe);t=qW(t)||0,rGe(n)&&(u=!!n.leading,d="maxWait"in n,i=d?iGe(qW(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function h(E){var O=r,k=o;return r=o=void 0,c=E,a=e.apply(k,O),a}function m(E){return c=E,s=setTimeout(w,t),u?h(E):a}function g(E){var O=E-l,k=E-c,A=t-O;return d?aGe(A,i-k):A}function v(E){var O=E-l,k=E-c;return l===void 0||O>=t||O<0||d&&k>=i}function w(){var E=R$();if(v(E))return x(E);s=setTimeout(w,g(E))}function x(E){return s=void 0,f&&r?h(E):(r=o=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function P(){return s===void 0?a:x(R$())}function T(){var E=R$(),O=v(E);if(r=arguments,o=this,l=E,O){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(w,t),h(l)}return s===void 0&&(s=setTimeout(w,t)),a}return T.cancel=S,T.flush=P,T}var lGe=sGe,cGe=lGe,uGe=Hf,dGe="Expected a function";function fGe(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(dGe);return uGe(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),cGe(e,t,{leading:r,maxWait:t,trailing:o})}var pGe=fGe;const ZI=Rn(pGe);function tx(e){"@babel/helpers - typeof";return tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tx(e)}function KW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function RC(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=ZI(L,g,{trailing:!0,leading:!1}));var B=new ResizeObserver(L),_=T.current.getBoundingClientRect(),D=_.width,z=_.height;return R(D,z),B.observe(T.current),function(){B.disconnect()}},[R,g]);var N=y.useMemo(function(){var L=A.containerWidth,B=A.containerHeight;if(L<0||B<0)return null;ql(jp(a)||jp(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,a,l),ql(!n||n>0,"The aspect(%s) must be greater than zero.",n);var _=jp(a)?L:a,D=jp(l)?B:l;n&&n>0&&(_?D=_/n:D&&(_=D*n),f&&D>f&&(D=f)),ql(_>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, + H`).concat(Ms,"M").concat(2*s,",").concat(i,` + A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(i),className:"recharts-legend-icon"});if(r.type==="rect")return Y.createElement("path",{stroke:"none",fill:l,d:"M0,".concat(Ms/8,"h").concat(Ms,"v").concat(Ms*3/4,"h").concat(-Ms,"z"),className:"recharts-legend-icon"});if(Y.isValidElement(r.legendIcon)){var c=rVe({},r);return delete c.legendIcon,Y.cloneElement(r.legendIcon,c)}return Y.createElement(sk,{fill:l,cx:i,cy:i,size:Ms,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,o=this.props,i=o.payload,a=o.iconSize,s=o.layout,l=o.formatter,c=o.inactiveColor,u={x:0,y:0,width:Ms,height:Ms},d={display:s==="horizontal"?"inline-block":"block",marginRight:10},f={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(p,m){var g=p.formatter||l,v=de(sx(sx({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var w=Ht(p.value)?null:p.value;Ql(!Ht(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=p.inactive?c:p.color;return Y.createElement("li",X_({className:v,style:d,key:"legend-item-".concat(m)},Mf(r.props,p,m)),Y.createElement(z_,{width:a,height:a,viewBox:u,style:f},r.renderIcon(p)),Y.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},g?g(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,o=r.payload,i=r.layout,a=r.align;if(!o||!o.length)return null;var s={padding:0,margin:0,textAlign:i==="horizontal"?a:"left"};return Y.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);sx($j,"displayName","Legend");sx($j,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var fVe=ek;function pVe(){this.__data__=new fVe,this.size=0}var hVe=pVe;function mVe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var gVe=mVe;function yVe(e){return this.__data__.get(e)}var vVe=yVe;function bVe(e){return this.__data__.has(e)}var wVe=bVe,xVe=ek,SVe=Sj,CVe=Cj,PVe=200;function TVe(e,t){var n=this.__data__;if(n instanceof xVe){var r=n.__data__;if(!SVe||r.lengths))return!1;var c=i.get(e),u=i.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&qVe?new HVe:void 0;for(i.set(e,t),i.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=Q5e}var Nj=J5e,Z5e=ad,eHe=Nj,tHe=sd,nHe="[object Arguments]",rHe="[object Array]",oHe="[object Boolean]",iHe="[object Date]",aHe="[object Error]",sHe="[object Function]",lHe="[object Map]",cHe="[object Number]",uHe="[object Object]",dHe="[object RegExp]",fHe="[object Set]",pHe="[object String]",hHe="[object WeakMap]",mHe="[object ArrayBuffer]",gHe="[object DataView]",yHe="[object Float32Array]",vHe="[object Float64Array]",bHe="[object Int8Array]",wHe="[object Int16Array]",xHe="[object Int32Array]",SHe="[object Uint8Array]",CHe="[object Uint8ClampedArray]",PHe="[object Uint16Array]",THe="[object Uint32Array]",Or={};Or[yHe]=Or[vHe]=Or[bHe]=Or[wHe]=Or[xHe]=Or[SHe]=Or[CHe]=Or[PHe]=Or[THe]=!0;Or[nHe]=Or[rHe]=Or[mHe]=Or[oHe]=Or[gHe]=Or[iHe]=Or[aHe]=Or[sHe]=Or[lHe]=Or[cHe]=Or[uHe]=Or[dHe]=Or[fHe]=Or[pHe]=Or[hHe]=!1;function EHe(e){return tHe(e)&&eHe(e.length)&&!!Or[Z5e(e)]}var OHe=EHe;function IHe(e){return function(t){return e(t)}}var Fte=IHe,aE={exports:{}};aE.exports;(function(e,t){var n=qee,r=t&&!t.nodeType&&t,o=r&&!0&&e&&!e.nodeType&&e,i=o&&o.exports===r,a=i&&n.process,s=function(){try{var l=o&&o.require&&o.require("util").types;return l||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(aE,aE.exports);var kHe=aE.exports,MHe=OHe,AHe=Fte,xW=kHe,SW=xW&&xW.isTypedArray,$He=SW?AHe(SW):MHe,jte=$He,RHe=N5e,_He=_j,DHe=Ea,NHe=Lte,LHe=Dj,FHe=jte,jHe=Object.prototype,BHe=jHe.hasOwnProperty;function zHe(e,t){var n=DHe(e),r=!n&&_He(e),o=!n&&!r&&NHe(e),i=!n&&!r&&!o&&FHe(e),a=n||r||o||i,s=a?RHe(e.length,String):[],l=s.length;for(var c in e)(t||BHe.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||LHe(c,l)))&&s.push(c);return s}var VHe=zHe,HHe=Object.prototype;function UHe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||HHe;return e===n}var WHe=UHe;function GHe(e,t){return function(n){return e(t(n))}}var Bte=GHe,qHe=Bte,KHe=qHe(Object.keys,Object),YHe=KHe,XHe=WHe,QHe=YHe,JHe=Object.prototype,ZHe=JHe.hasOwnProperty;function e4e(e){if(!XHe(e))return QHe(e);var t=[];for(var n in Object(e))ZHe.call(e,n)&&n!="constructor"&&t.push(n);return t}var t4e=e4e,n4e=wj,r4e=Nj;function o4e(e){return e!=null&&r4e(e.length)&&!n4e(e)}var BS=o4e,i4e=VHe,a4e=t4e,s4e=BS;function l4e(e){return s4e(e)?i4e(e):a4e(e)}var lk=l4e,c4e=P5e,u4e=_5e,d4e=lk;function f4e(e){return c4e(e,d4e,u4e)}var p4e=f4e,CW=p4e,h4e=1,m4e=Object.prototype,g4e=m4e.hasOwnProperty;function y4e(e,t,n,r,o,i){var a=n&h4e,s=CW(e),l=s.length,c=CW(t),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in t:g4e.call(t,f)))return!1}var p=i.get(e),m=i.get(t);if(p&&m)return p==t&&m==e;var g=!0;i.set(e,t),i.set(t,e);for(var v=a;++d-1}var mUe=hUe;function gUe(e,t,n){for(var r=-1,o=e==null?0:e.length;++r=AUe){var c=t?null:kUe(e);if(c)return MUe(c);a=!1,o=IUe,l=new TUe}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qUe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function KUe(e){return e.value}function YUe(e,t){if(Y.isValidElement(e))return Y.cloneElement(e,t);if(typeof e=="function")return Y.createElement(e,t);t.ref;var n=GUe(t,FUe);return Y.createElement($j,n)}var jW=1,$u=function(e){function t(){var n;jUe(this,t);for(var r=arguments.length,o=new Array(r),i=0;ijW||Math.abs(o.height-this.lastBoundingBox.height)>jW)&&(this.lastBoundingBox.width=o.width,this.lastBoundingBox.height=o.height,r&&r(o)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?pu({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var o=this.props,i=o.layout,a=o.align,s=o.verticalAlign,l=o.margin,c=o.chartWidth,u=o.chartHeight,d,f;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&i==="vertical"){var p=this.getBBoxSnapshot();d={left:((c||0)-p.width)/2}}else d=a==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();f={top:((u||0)-m.height)/2}}else f=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return pu(pu({},d),f)}},{key:"render",value:function(){var r=this,o=this.props,i=o.content,a=o.width,s=o.height,l=o.wrapperStyle,c=o.payloadUniqBy,u=o.payload,d=pu(pu({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return Y.createElement("div",{className:"recharts-legend-wrapper",style:d,ref:function(p){r.wrapperNode=p}},YUe(i,pu(pu({},this.props),{},{payload:qte(u,c,KUe)})))}}],[{key:"getWithHeight",value:function(r,o){var i=pu(pu({},this.defaultProps),r.props),a=i.layout;return a==="vertical"&&st(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||o}:null}}])}(y.PureComponent);ck($u,"displayName","Legend");ck($u,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var BW=FS,XUe=_j,QUe=Ea,zW=BW?BW.isConcatSpreadable:void 0;function JUe(e){return QUe(e)||XUe(e)||!!(zW&&e&&e[zW])}var ZUe=JUe,eWe=Dte,tWe=ZUe;function Xte(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=tWe),o||(o=[]);++i0&&n(s)?t>1?Xte(s,t-1,n,r,o):eWe(o,s):r||(o[o.length]=s)}return o}var Qte=Xte;function nWe(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),s=a.length;s--;){var l=a[e?s:++o];if(n(i[l],l,i)===!1)break}return t}}var rWe=nWe,oWe=rWe,iWe=oWe(),aWe=iWe,sWe=aWe,lWe=lk;function cWe(e,t){return e&&sWe(e,t,lWe)}var Jte=cWe,uWe=BS;function dWe(e,t){return function(n,r){if(n==null)return n;if(!uWe(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=Object(n);(t?i--:++it||i&&a&&l&&!s&&!c||r&&a&&l||!n&&l||!o)return 1;if(!r&&!i&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var TWe=PWe,z$=Tj,EWe=Ej,OWe=Yc,IWe=Zte,kWe=wWe,MWe=Fte,AWe=TWe,$We=tb,RWe=Ea;function _We(e,t,n){t.length?t=z$(t,function(i){return RWe(i)?function(a){return EWe(a,i.length===1?i[0]:i)}:i}):t=[$We];var r=-1;t=z$(t,MWe(OWe));var o=IWe(e,function(i,a,s){var l=z$(t,function(c){return c(i)});return{criteria:l,index:++r,value:i}});return kWe(o,function(i,a){return AWe(i,a,n)})}var DWe=_We;function NWe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var LWe=NWe,FWe=LWe,HW=Math.max;function jWe(e,t,n){return t=HW(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,i=HW(r.length-t,0),a=Array(i);++o0){if(++t>=YWe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ZWe=JWe,e6e=KWe,t6e=ZWe,n6e=t6e(e6e),r6e=n6e,o6e=tb,i6e=BWe,a6e=r6e;function s6e(e,t){return a6e(i6e(e,t,o6e),e+"")}var l6e=s6e,c6e=xj,u6e=BS,d6e=Dj,f6e=Kf;function p6e(e,t,n){if(!f6e(n))return!1;var r=typeof t;return(r=="number"?u6e(n)&&d6e(t,n.length):r=="string"&&t in n)?c6e(n[t],e):!1}var uk=p6e,h6e=Qte,m6e=DWe,g6e=l6e,WW=uk,y6e=g6e(function(e,t){if(e==null)return[];var n=t.length;return n>1&&WW(e,t[0],t[1])?t=[]:n>2&&WW(t[0],t[1],t[2])&&(t=[t[0]]),m6e(e,h6e(t,1),[])}),v6e=y6e;const jj=_n(v6e);function lx(e){"@babel/helpers - typeof";return lx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lx(e)}function oD(){return oD=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(f0,"-left"),st(n)&&t&&st(t.x)&&n=t.y),"".concat(f0,"-top"),st(r)&&t&&st(t.y)&&rg?Math.max(u,l[r]):Math.max(d,l[r])}function R6e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function _6e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,o=e.position,i=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,u,d;return a.height>0&&a.width>0&&n?(u=KW({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=KW({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:o,reverseDirection:i,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=R6e({translateX:u,translateY:d,useTranslate3d:s})):c=A6e,{cssProperties:c,cssClasses:$6e({translateX:u,translateY:d,coordinate:n})}}function Xy(e){"@babel/helpers - typeof";return Xy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xy(e)}function YW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function XW(e){for(var t=1;tQW||Math.abs(r.height-this.state.lastBoundingBox.height)>QW)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,o;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,o=this.props,i=o.active,a=o.allowEscapeViewBox,s=o.animationDuration,l=o.animationEasing,c=o.children,u=o.coordinate,d=o.hasPayload,f=o.isAnimationActive,p=o.offset,m=o.position,g=o.reverseDirection,v=o.useTranslate3d,w=o.viewBox,x=o.wrapperStyle,S=_6e({allowEscapeViewBox:a,coordinate:u,offsetTopLeft:p,position:m,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:v,viewBox:w}),P=S.cssClasses,T=S.cssProperties,E=XW(XW({transition:f&&i?"transform ".concat(s,"ms ").concat(l):void 0},T),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&d?"visible":"hidden",position:"absolute",top:0,left:0},x);return Y.createElement("div",{tabIndex:-1,className:P,style:E,ref:function(k){r.wrapperNode=k}},c)}}])}(y.PureComponent),U6e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},nl={isSsr:U6e(),get:function(t){return nl[t]},set:function(t,n){if(typeof t=="string")nl[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(o){nl[o]=t[o]})}}};function Qy(e){"@babel/helpers - typeof";return Qy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qy(e)}function JW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ZW(e){for(var t=1;t0;return Y.createElement(H6e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:l,isAnimationActive:f,active:i,coordinate:u,hasPayload:E,offset:p,position:v,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:P},eGe(c,ZW(ZW({},this.props),{},{payload:T})))}}])}(y.PureComponent);Bj(Ua,"displayName","Tooltip");Bj(Ua,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!nl.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var tGe=Kc,nGe=function(){return tGe.Date.now()},rGe=nGe,oGe=/\s/;function iGe(e){for(var t=e.length;t--&&oGe.test(e.charAt(t)););return t}var aGe=iGe,sGe=aGe,lGe=/^\s+/;function cGe(e){return e&&e.slice(0,sGe(e)+1).replace(lGe,"")}var uGe=cGe,dGe=uGe,e6=Kf,fGe=qv,t6=NaN,pGe=/^[-+]0x[0-9a-f]+$/i,hGe=/^0b[01]+$/i,mGe=/^0o[0-7]+$/i,gGe=parseInt;function yGe(e){if(typeof e=="number")return e;if(fGe(e))return t6;if(e6(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=e6(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=dGe(e);var n=hGe.test(e);return n||mGe.test(e)?gGe(e.slice(2),n?2:8):pGe.test(e)?t6:+e}var ine=yGe,vGe=Kf,H$=rGe,n6=ine,bGe="Expected a function",wGe=Math.max,xGe=Math.min;function SGe(e,t,n){var r,o,i,a,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(bGe);t=n6(t)||0,vGe(n)&&(u=!!n.leading,d="maxWait"in n,i=d?wGe(n6(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing:f);function p(E){var O=r,k=o;return r=o=void 0,c=E,a=e.apply(k,O),a}function m(E){return c=E,s=setTimeout(w,t),u?p(E):a}function g(E){var O=E-l,k=E-c,A=t-O;return d?xGe(A,i-k):A}function v(E){var O=E-l,k=E-c;return l===void 0||O>=t||O<0||d&&k>=i}function w(){var E=H$();if(v(E))return x(E);s=setTimeout(w,g(E))}function x(E){return s=void 0,f&&r?p(E):(r=o=void 0,a)}function S(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function P(){return s===void 0?a:x(H$())}function T(){var E=H$(),O=v(E);if(r=arguments,o=this,l=E,O){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(w,t),p(l)}return s===void 0&&(s=setTimeout(w,t)),a}return T.cancel=S,T.flush=P,T}var CGe=SGe,PGe=CGe,TGe=Kf,EGe="Expected a function";function OGe(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(EGe);return TGe(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),PGe(e,t,{leading:r,maxWait:t,trailing:o})}var IGe=OGe;const dk=_n(IGe);function ux(e){"@babel/helpers - typeof";return ux=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ux(e)}function r6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function HC(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(L=dk(L,g,{trailing:!0,leading:!1}));var j=new ResizeObserver(L),_=T.current.getBoundingClientRect(),D=_.width,z=_.height;return R(D,z),j.observe(T.current),function(){j.disconnect()}},[R,g]);var N=y.useMemo(function(){var L=A.containerWidth,j=A.containerHeight;if(L<0||j<0)return null;Ql(qp(a)||qp(l),`The width(%s) and height(%s) are both fixed numbers, + maybe you don't need to use a ResponsiveContainer.`,a,l),Ql(!n||n>0,"The aspect(%s) must be greater than zero.",n);var _=qp(a)?L:a,D=qp(l)?j:l;n&&n>0&&(_?D=_/n:D&&(_=D*n),f&&D>f&&(D=f)),Ql(_>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,_,D,a,l,u,d,n);var z=!Array.isArray(h)&&ku(h.type).endsWith("Chart");return J.Children.map(h,function(F){return J.isValidElement(F)?y.cloneElement(F,RC({width:_,height:D},z?{style:RC({height:"100%",width:"100%",maxHeight:D,maxWidth:_},F.props.style)}:{})):F})},[n,h,l,f,d,u,A,a]);return J.createElement("div",{id:v?"".concat(v):void 0,className:fe("recharts-responsive-container",w),style:RC(RC({},P),{},{width:a,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:T},N)}),Uv=function(t){return null};Uv.displayName="Cell";function nx(e){"@babel/helpers - typeof";return nx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nx(e)}function XW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function J_(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Kl.isSsr)return{width:0,height:0};var r=OGe(n),o=JSON.stringify({text:t,copyStyle:r});if(Fm.widthCache[o])return Fm.widthCache[o];try{var i=document.getElementById(QW);i||(i=document.createElement("span"),i.setAttribute("id",QW),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=J_(J_({},EGe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return Fm.widthCache[o]=l,++Fm.cacheCount>TGe&&(Fm.cacheCount=0,Fm.widthCache={}),l}catch{return{width:0,height:0}}},IGe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function rx(e){"@babel/helpers - typeof";return rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rx(e)}function JT(e,t){return $Ge(e)||AGe(e,t)||MGe(e,t)||kGe()}function kGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function MGe(e,t){if(e){if(typeof e=="string")return JW(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return JW(e,t)}}function JW(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GGe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function o6(e,t){return XGe(e)||YGe(e,t)||KGe(e,t)||qGe()}function qGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KGe(e,t){if(e){if(typeof e=="string")return i6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i6(e,t)}}function i6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return _.reduce(function(D,z){var F=z.word,H=z.width,U=D[D.length-1];if(U&&(o==null||i||U.width+H+rz.width?D:z})};if(!u)return h;for(var g="…",v=function(_){var D=d.slice(0,_),z=Qte({breakAll:c,style:l,children:D+g}).wordsWithComputedWidth,F=f(z),H=F.length>a||m(F).width>Number(o);return[H,F]},w=0,x=d.length-1,S=0,P;w<=x&&S<=d.length-1;){var T=Math.floor((w+x)/2),E=T-1,O=v(E),k=o6(O,2),A=k[0],I=k[1],R=v(T),N=o6(R,1),L=N[0];if(!A&&!L&&(w=T+1),A&&L&&(x=T-1),!A&&L){P=I;break}S++}return P||h},a6=function(t){var n=Vt(t)?[]:t.toString().split(Xte);return[{words:n}]},JGe=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Kl.isSsr){var l,c,u=Qte({breakAll:a,children:o,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return a6(o);return QGe({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return a6(o)},s6="#808080",Sh=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,h=f===void 0?"start":f,m=t.verticalAnchor,g=m===void 0?"end":m,v=t.fill,w=v===void 0?s6:v,x=r6(t,UGe),S=y.useMemo(function(){return JGe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),P=x.dx,T=x.dy,E=x.angle,O=x.className,k=x.breakAll,A=r6(x,WGe);if(!Ao(r)||!Ao(i))return null;var I=r+(lt(P)?P:0),R=i+(lt(T)?T:0),N;switch(g){case"start":N=_$("calc(".concat(c,")"));break;case"middle":N=_$("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=_$("calc(".concat(S.length-1," * -").concat(s,")"));break}var L=[];if(d){var B=S[0].width,_=x.width;L.push("scale(".concat((lt(_)?_/B:1)/B,")"))}return E&&L.push("rotate(".concat(E,", ").concat(I,", ").concat(R,")")),L.length&&(A.transform=L.join(" ")),J.createElement("text",Z_({},_t(A,!0),{x:I,y:R,className:fe("recharts-text",O),textAnchor:h,fill:w.includes("url")?s6:w}),S.map(function(D,z){var F=D.words.join(k?"":" ");return J.createElement("tspan",{x:I,dy:z===0?N:s,key:"".concat(F,"-").concat(z)},F)}))};function gf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function ZGe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function Mj(e){let t,n,r;e.length!==2?(t=gf,n=(s,l)=>gf(e(s),l),r=(s,l)=>e(s)-l):(t=e===gf||e===ZGe?e:e8e,n=e,r=e);function o(s,l,c=0,u=s.length){if(c>>1;n(s[d],l)<0?c=d+1:u=d}while(c>>1;n(s[d],l)<=0?c=d+1:u=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function e8e(){return 0}function Jte(e){return e===null?NaN:+e}function*t8e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const n8e=Mj(gf),_S=n8e.right;Mj(Jte).center;class l6 extends Map{constructor(t,n=i8e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(c6(this,t))}has(t){return super.has(c6(this,t))}set(t,n){return super.set(r8e(this,t),n)}delete(t){return super.delete(o8e(this,t))}}function c6({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function r8e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function o8e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function i8e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function a8e(e=gf){if(e===gf)return Zte;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function Zte(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const s8e=Math.sqrt(50),l8e=Math.sqrt(10),c8e=Math.sqrt(2);function ZT(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=s8e?10:i>=l8e?5:i>=c8e?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function d6(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function ene(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?Zte:a8e(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),h=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));ene(e,t,h,m,o)}const i=e[t];let a=n,s=r;for(o0(e,n,t),o(e[r],i)>0&&o0(e,n,r);a0;)--s}o(e[n],i)===0?o0(e,n,s):(++s,o0(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function o0(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function u8e(e,t,n){if(e=Float64Array.from(t8e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return d6(e);if(t>=1)return u6(e);var r,o=(r-1)*t,i=Math.floor(o),a=u6(ene(e,i).subarray(0,i+1)),s=d6(e.subarray(i+1));return a+(s-a)*(o-i)}}function d8e(e,t,n=Jte){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function f8e(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?DC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?DC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=h8e.exec(e))?new ma(t[1],t[2],t[3],1):(t=m8e.exec(e))?new ma(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=g8e.exec(e))?DC(t[1],t[2],t[3],t[4]):(t=y8e.exec(e))?DC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=v8e.exec(e))?v6(t[1],t[2]/100,t[3]/100,1):(t=b8e.exec(e))?v6(t[1],t[2]/100,t[3]/100,t[4]):f6.hasOwnProperty(e)?m6(f6[e]):e==="transparent"?new ma(NaN,NaN,NaN,0):null}function m6(e){return new ma(e>>16&255,e>>8&255,e&255,1)}function DC(e,t,n,r){return r<=0&&(e=t=n=NaN),new ma(e,t,n,r)}function S8e(e){return e instanceof DS||(e=sx(e)),e?(e=e.rgb(),new ma(e.r,e.g,e.b,e.opacity)):new ma}function oD(e,t,n,r){return arguments.length===1?S8e(e):new ma(e,t,n,r??1)}function ma(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}$j(ma,oD,nne(DS,{brighter(e){return e=e==null?eE:Math.pow(eE,e),new ma(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ix:Math.pow(ix,e),new ma(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ma(rh(this.r),rh(this.g),rh(this.b),tE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:g6,formatHex:g6,formatHex8:C8e,formatRgb:y6,toString:y6}));function g6(){return`#${Bp(this.r)}${Bp(this.g)}${Bp(this.b)}`}function C8e(){return`#${Bp(this.r)}${Bp(this.g)}${Bp(this.b)}${Bp((isNaN(this.opacity)?1:this.opacity)*255)}`}function y6(){const e=tE(this.opacity);return`${e===1?"rgb(":"rgba("}${rh(this.r)}, ${rh(this.g)}, ${rh(this.b)}${e===1?")":`, ${e})`}`}function tE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function rh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Bp(e){return e=rh(e),(e<16?"0":"")+e.toString(16)}function v6(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new jl(e,t,n,r)}function rne(e){if(e instanceof jl)return new jl(e.h,e.s,e.l,e.opacity);if(e instanceof DS||(e=sx(e)),!e)return new jl;if(e instanceof jl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new jl(a,s,l,e.opacity)}function P8e(e,t,n,r){return arguments.length===1?rne(e):new jl(e,t,n,r??1)}function jl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}$j(jl,P8e,nne(DS,{brighter(e){return e=e==null?eE:Math.pow(eE,e),new jl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ix:Math.pow(ix,e),new jl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ma(D$(e>=240?e-240:e+120,o,r),D$(e,o,r),D$(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new jl(b6(this.h),NC(this.s),NC(this.l),tE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=tE(this.opacity);return`${e===1?"hsl(":"hsla("}${b6(this.h)}, ${NC(this.s)*100}%, ${NC(this.l)*100}%${e===1?")":`, ${e})`}`}}));function b6(e){return e=(e||0)%360,e<0?e+360:e}function NC(e){return Math.max(0,Math.min(1,e||0))}function D$(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Rj=e=>()=>e;function T8e(e,t){return function(n){return e+n*t}}function E8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function O8e(e){return(e=+e)==1?one:function(t,n){return n-t?E8e(t,n,e):Rj(isNaN(t)?n:t)}}function one(e,t){var n=t-e;return n?T8e(e,n):Rj(isNaN(e)?t:e)}const w6=function e(t){var n=O8e(t);function r(o,i){var a=n((o=oD(o)).r,(i=oD(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=one(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function I8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:nE(r,o)})),n=N$.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function j8e(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?B8e:j8e,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(r),nE)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,rE),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=_j,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Hi,u()):a!==Hi},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,h){return r=f,o=h,u()}}function Dj(){return ek()(Hi,Hi)}function z8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function oE(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Hy(e){return e=oE(Math.abs(e)),e?e[1]:NaN}function V8e(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function H8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var U8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function lx(e){if(!(t=U8e.exec(e)))throw new Error("invalid format: "+e);var t;return new Nj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}lx.prototype=Nj.prototype;function Nj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}Nj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function W8e(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var ine;function G8e(e,t){var n=oE(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(ine=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+oE(e,Math.max(0,t+i-1))[0]}function S6(e,t){var n=oE(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const C6={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:z8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>S6(e*100,t),r:S6,s:G8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function P6(e){return e}var T6=Array.prototype.map,E6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function q8e(e){var t=e.grouping===void 0||e.thousands===void 0?P6:V8e(T6.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?P6:H8e(T6.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=lx(d);var f=d.fill,h=d.align,m=d.sign,g=d.symbol,v=d.zero,w=d.width,x=d.comma,S=d.precision,P=d.trim,T=d.type;T==="n"?(x=!0,T="g"):C6[T]||(S===void 0&&(S=12),P=!0,T="g"),(v||f==="0"&&h==="=")&&(v=!0,f="0",h="=");var E=g==="$"?n:g==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",O=g==="$"?r:/[%p]/.test(T)?a:"",k=C6[T],A=/[defgprs%]/.test(T);S=S===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function I(R){var N=E,L=O,B,_,D;if(T==="c")L=k(R)+L,R="";else{R=+R;var z=R<0||1/R<0;if(R=isNaN(R)?l:k(Math.abs(R),S),P&&(R=W8e(R)),z&&+R==0&&m!=="+"&&(z=!1),N=(z?m==="("?m:s:m==="-"||m==="("?"":m)+N,L=(T==="s"?E6[8+ine/3]:"")+L+(z&&m==="("?")":""),A){for(B=-1,_=R.length;++B<_;)if(D=R.charCodeAt(B),48>D||D>57){L=(D===46?o+R.slice(B+1):R.slice(B))+L,R=R.slice(0,B);break}}}x&&!v&&(R=t(R,1/0));var F=N.length+R.length+L.length,H=F>1)+N+R+L+H.slice(F);break;default:R=H+N+R+L;break}return i(R)}return I.toString=function(){return d+""},I}function u(d,f){var h=c((d=lx(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Hy(f)/3)))*3,g=Math.pow(10,-m),v=E6[8+m/3];return function(w){return h(g*w)+v}}return{format:c,formatPrefix:u}}var LC,Lj,ane;K8e({thousands:",",grouping:[3],currency:["$",""]});function K8e(e){return LC=q8e(e),Lj=LC.format,ane=LC.formatPrefix,LC}function Y8e(e){return Math.max(0,-Hy(Math.abs(e)))}function X8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Hy(t)/3)))*3-Hy(Math.abs(e)))}function Q8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Hy(t)-Hy(e))+1}function sne(e,t,n,r){var o=nD(e,t,n),i;switch(r=lx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=X8e(o,a))&&(r.precision=i),ane(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=Q8e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=Y8e(o))&&(r.precision=i-(r.type==="%")*2);break}}return Lj(r)}function Uf(e){var t=e.domain;return e.ticks=function(n){var r=t();return eD(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return sne(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s0;){if(c=tD(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function iE(){var e=Dj();return e.copy=function(){return NS(e,iE())},fl.apply(e,arguments),Uf(e)}function lne(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,rE),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return lne(e).unknown(t)},e=arguments.length?Array.from(e,rE):[0,1],Uf(n)}function cne(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function n9e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function k6(e){return(t,n)=>-e(-t,n)}function Fj(e){const t=e(O6,I6),n=t.domain;let r=10,o,i;function a(){return o=n9e(r),i=t9e(r),n()[0]<0?(o=k6(o),i=k6(i),e(J8e,Z8e)):e(O6,I6),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=h;++f)for(m=1;mu)break;w.push(g)}}else for(;f<=h;++f)for(m=r-1;m>=1;--m)if(g=f>0?m/i(-f):m*i(f),!(gu)break;w.push(g)}w.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=lx(l)).precision==null&&(l.trim=!0),l=Lj(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*rn(cne(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function une(){const e=Fj(ek()).domain([1,10]);return e.copy=()=>NS(e,une()).base(e.base()),fl.apply(e,arguments),e}function M6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function A6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function jj(e){var t=1,n=e(M6(t),A6(t));return n.constant=function(r){return arguments.length?e(M6(t=+r),A6(t)):t},Uf(n)}function dne(){var e=jj(ek());return e.copy=function(){return NS(e,dne()).constant(e.constant())},fl.apply(e,arguments)}function $6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function r9e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function o9e(e){return e<0?-e*e:e*e}function Bj(e){var t=e(Hi,Hi),n=1;function r(){return n===1?e(Hi,Hi):n===.5?e(r9e,o9e):e($6(n),$6(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Uf(t)}function zj(){var e=Bj(ek());return e.copy=function(){return NS(e,zj()).exponent(e.exponent())},fl.apply(e,arguments),e}function i9e(){return zj.apply(null,arguments).exponent(.5)}function R6(e){return Math.sign(e)*e*e}function a9e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function fne(){var e=Dj(),t=[0,1],n=!1,r;function o(i){var a=a9e(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(R6(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,rE)).map(R6)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return fne(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},fl.apply(o,arguments),Uf(o)}function pne(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return hne().domain([e,t]).range(o).unknown(i)},fl.apply(Uf(a),arguments)}function mne(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[_S(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return mne().domain(e).range(t).unknown(n)},fl.apply(o,arguments)}const L$=new Date,F$=new Date;function Do(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(cDo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(L$.setTime(+i),F$.setTime(+a),e(L$),e(F$),Math.floor(n(L$,F$))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const aE=Do(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);aE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Do(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):aE);aE.range;const Pu=1e3,Ks=Pu*60,Tu=Ks*60,Qu=Tu*24,Vj=Qu*7,_6=Qu*30,j$=Qu*365,zp=Do(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Pu)},(e,t)=>(t-e)/Pu,e=>e.getUTCSeconds());zp.range;const Hj=Do(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Pu)},(e,t)=>{e.setTime(+e+t*Ks)},(e,t)=>(t-e)/Ks,e=>e.getMinutes());Hj.range;const Uj=Do(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ks)},(e,t)=>(t-e)/Ks,e=>e.getUTCMinutes());Uj.range;const Wj=Do(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Pu-e.getMinutes()*Ks)},(e,t)=>{e.setTime(+e+t*Tu)},(e,t)=>(t-e)/Tu,e=>e.getHours());Wj.range;const Gj=Do(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Tu)},(e,t)=>(t-e)/Tu,e=>e.getUTCHours());Gj.range;const LS=Do(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ks)/Qu,e=>e.getDate()-1);LS.range;const tk=Do(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qu,e=>e.getUTCDate()-1);tk.range;const gne=Do(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Qu,e=>Math.floor(e/Qu));gne.range;function Uh(e){return Do(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ks)/Vj)}const nk=Uh(0),sE=Uh(1),s9e=Uh(2),l9e=Uh(3),Uy=Uh(4),c9e=Uh(5),u9e=Uh(6);nk.range;sE.range;s9e.range;l9e.range;Uy.range;c9e.range;u9e.range;function Wh(e){return Do(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Vj)}const rk=Wh(0),lE=Wh(1),d9e=Wh(2),f9e=Wh(3),Wy=Wh(4),p9e=Wh(5),h9e=Wh(6);rk.range;lE.range;d9e.range;f9e.range;Wy.range;p9e.range;h9e.range;const qj=Do(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());qj.range;const Kj=Do(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());Kj.range;const Ju=Do(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Ju.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Do(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Ju.range;const Zu=Do(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Zu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Do(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Zu.range;function yne(e,t,n,r,o,i){const a=[[zp,1,Pu],[zp,5,5*Pu],[zp,15,15*Pu],[zp,30,30*Pu],[i,1,Ks],[i,5,5*Ks],[i,15,15*Ks],[i,30,30*Ks],[o,1,Tu],[o,3,3*Tu],[o,6,6*Tu],[o,12,12*Tu],[r,1,Qu],[r,2,2*Qu],[n,1,Vj],[t,1,_6],[t,3,3*_6],[e,1,j$]];function s(c,u,d){const f=uv).right(a,f);if(h===a.length)return e.every(nD(c/j$,u/j$,d));if(h===0)return aE.every(Math.max(nD(c,u,d),1));const[m,g]=a[f/a[h-1][2]53)return null;"w"in ee||(ee.w=1),"Z"in ee?(me=z$(i0(ee.y,0,1)),we=me.getUTCDay(),me=we>4||we===0?lE.ceil(me):lE(me),me=tk.offset(me,(ee.V-1)*7),ee.y=me.getUTCFullYear(),ee.m=me.getUTCMonth(),ee.d=me.getUTCDate()+(ee.w+6)%7):(me=B$(i0(ee.y,0,1)),we=me.getDay(),me=we>4||we===0?sE.ceil(me):sE(me),me=LS.offset(me,(ee.V-1)*7),ee.y=me.getFullYear(),ee.m=me.getMonth(),ee.d=me.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),we="Z"in ee?z$(i0(ee.y,0,1)).getUTCDay():B$(i0(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(we+5)%7:ee.w+ee.U*7-(we+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,z$(ee)):B$(ee)}}function k(le,re,de,ee){for(var ce=0,me=re.length,we=de.length,ge,Se;ce=we)return-1;if(ge=re.charCodeAt(ce++),ge===37){if(ge=re.charAt(ce++),Se=T[ge in D6?re.charAt(ce++):ge],!Se||(ee=Se(le,de,ee))<0)return-1}else if(ge!=de.charCodeAt(ee++))return-1}return ee}function A(le,re,de){var ee=c.exec(re.slice(de));return ee?(le.p=u.get(ee[0].toLowerCase()),de+ee[0].length):-1}function I(le,re,de){var ee=h.exec(re.slice(de));return ee?(le.w=m.get(ee[0].toLowerCase()),de+ee[0].length):-1}function R(le,re,de){var ee=d.exec(re.slice(de));return ee?(le.w=f.get(ee[0].toLowerCase()),de+ee[0].length):-1}function N(le,re,de){var ee=w.exec(re.slice(de));return ee?(le.m=x.get(ee[0].toLowerCase()),de+ee[0].length):-1}function L(le,re,de){var ee=g.exec(re.slice(de));return ee?(le.m=v.get(ee[0].toLowerCase()),de+ee[0].length):-1}function B(le,re,de){return k(le,t,re,de)}function _(le,re,de){return k(le,n,re,de)}function D(le,re,de){return k(le,r,re,de)}function z(le){return a[le.getDay()]}function F(le){return i[le.getDay()]}function H(le){return l[le.getMonth()]}function U(le){return s[le.getMonth()]}function q(le){return o[+(le.getHours()>=12)]}function Y(le){return 1+~~(le.getMonth()/3)}function ae(le){return a[le.getUTCDay()]}function Z(le){return i[le.getUTCDay()]}function K(le){return l[le.getUTCMonth()]}function te(le){return s[le.getUTCMonth()]}function pe(le){return o[+(le.getUTCHours()>=12)]}function ie(le){return 1+~~(le.getUTCMonth()/3)}return{format:function(le){var re=E(le+="",S);return re.toString=function(){return le},re},parse:function(le){var re=O(le+="",!1);return re.toString=function(){return le},re},utcFormat:function(le){var re=E(le+="",P);return re.toString=function(){return le},re},utcParse:function(le){var re=O(le+="",!0);return re.toString=function(){return le},re}}}var D6={"-":"",_:" ",0:"0"},Ko=/^\s*\d+/,w9e=/^%/,x9e=/[\\^$*+?|[\]().{}]/g;function Vn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function C9e(e,t,n){var r=Ko.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function P9e(e,t,n){var r=Ko.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function T9e(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function E9e(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function O9e(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function N6(e,t,n){var r=Ko.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function L6(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function I9e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function k9e(e,t,n){var r=Ko.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function M9e(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function F6(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function A9e(e,t,n){var r=Ko.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function j6(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function $9e(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function R9e(e,t,n){var r=Ko.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function _9e(e,t,n){var r=Ko.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function D9e(e,t,n){var r=Ko.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function N9e(e,t,n){var r=w9e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function L9e(e,t,n){var r=Ko.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function F9e(e,t,n){var r=Ko.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function B6(e,t){return Vn(e.getDate(),t,2)}function j9e(e,t){return Vn(e.getHours(),t,2)}function B9e(e,t){return Vn(e.getHours()%12||12,t,2)}function z9e(e,t){return Vn(1+LS.count(Ju(e),e),t,3)}function vne(e,t){return Vn(e.getMilliseconds(),t,3)}function V9e(e,t){return vne(e,t)+"000"}function H9e(e,t){return Vn(e.getMonth()+1,t,2)}function U9e(e,t){return Vn(e.getMinutes(),t,2)}function W9e(e,t){return Vn(e.getSeconds(),t,2)}function G9e(e){var t=e.getDay();return t===0?7:t}function q9e(e,t){return Vn(nk.count(Ju(e)-1,e),t,2)}function bne(e){var t=e.getDay();return t>=4||t===0?Uy(e):Uy.ceil(e)}function K9e(e,t){return e=bne(e),Vn(Uy.count(Ju(e),e)+(Ju(e).getDay()===4),t,2)}function Y9e(e){return e.getDay()}function X9e(e,t){return Vn(sE.count(Ju(e)-1,e),t,2)}function Q9e(e,t){return Vn(e.getFullYear()%100,t,2)}function J9e(e,t){return e=bne(e),Vn(e.getFullYear()%100,t,2)}function Z9e(e,t){return Vn(e.getFullYear()%1e4,t,4)}function e7e(e,t){var n=e.getDay();return e=n>=4||n===0?Uy(e):Uy.ceil(e),Vn(e.getFullYear()%1e4,t,4)}function t7e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Vn(t/60|0,"0",2)+Vn(t%60,"0",2)}function z6(e,t){return Vn(e.getUTCDate(),t,2)}function n7e(e,t){return Vn(e.getUTCHours(),t,2)}function r7e(e,t){return Vn(e.getUTCHours()%12||12,t,2)}function o7e(e,t){return Vn(1+tk.count(Zu(e),e),t,3)}function wne(e,t){return Vn(e.getUTCMilliseconds(),t,3)}function i7e(e,t){return wne(e,t)+"000"}function a7e(e,t){return Vn(e.getUTCMonth()+1,t,2)}function s7e(e,t){return Vn(e.getUTCMinutes(),t,2)}function l7e(e,t){return Vn(e.getUTCSeconds(),t,2)}function c7e(e){var t=e.getUTCDay();return t===0?7:t}function u7e(e,t){return Vn(rk.count(Zu(e)-1,e),t,2)}function xne(e){var t=e.getUTCDay();return t>=4||t===0?Wy(e):Wy.ceil(e)}function d7e(e,t){return e=xne(e),Vn(Wy.count(Zu(e),e)+(Zu(e).getUTCDay()===4),t,2)}function f7e(e){return e.getUTCDay()}function p7e(e,t){return Vn(lE.count(Zu(e)-1,e),t,2)}function h7e(e,t){return Vn(e.getUTCFullYear()%100,t,2)}function m7e(e,t){return e=xne(e),Vn(e.getUTCFullYear()%100,t,2)}function g7e(e,t){return Vn(e.getUTCFullYear()%1e4,t,4)}function y7e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Wy(e):Wy.ceil(e),Vn(e.getUTCFullYear()%1e4,t,4)}function v7e(){return"+0000"}function V6(){return"%"}function H6(e){return+e}function U6(e){return Math.floor(+e/1e3)}var jm,Sne,Cne;b7e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function b7e(e){return jm=b9e(e),Sne=jm.format,jm.parse,Cne=jm.utcFormat,jm.utcParse,jm}function w7e(e){return new Date(e)}function x7e(e){return e instanceof Date?+e:+new Date(+e)}function Yj(e,t,n,r,o,i,a,s,l,c){var u=Dj(),d=u.invert,f=u.domain,h=c(".%L"),m=c(":%S"),g=c("%I:%M"),v=c("%I %p"),w=c("%a %d"),x=c("%b %d"),S=c("%B"),P=c("%Y");function T(E){return(l(E)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>u8e(e,i/r))},n.copy=function(){return One(t).domain(e)},ad.apply(n,arguments)}function ik(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=Hi,u,d=!1,f;function h(g){return isNaN(g=+g)?f:(g=.5+((g=+u(g))-i)*(r*gt}var Ane=I7e,k7e=ak,M7e=Ane,A7e=Hv;function $7e(e){return e&&e.length?k7e(e,A7e,M7e):void 0}var R7e=$7e;const sk=Rn(R7e);function _7e(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Et.decimalPlaces=Et.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*kr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Et.dividedBy=Et.div=function(e){return Au(this,new this.constructor(e))};Et.dividedToIntegerBy=Et.idiv=function(e){var t=this,n=t.constructor;return mr(Au(t,new n(e),0,1),n.precision)};Et.equals=Et.eq=function(e){return!this.cmp(e)};Et.exponent=function(){return wo(this)};Et.greaterThan=Et.gt=function(e){return this.cmp(e)>0};Et.greaterThanOrEqualTo=Et.gte=function(e){return this.cmp(e)>=0};Et.isInteger=Et.isint=function(){return this.e>this.d.length-2};Et.isNegative=Et.isneg=function(){return this.s<0};Et.isPositive=Et.ispos=function(){return this.s>0};Et.isZero=function(){return this.s===0};Et.lessThan=Et.lt=function(e){return this.cmp(e)<0};Et.lessThanOrEqualTo=Et.lte=function(e){return this.cmp(e)<1};Et.logarithm=Et.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Ga))throw Error(ll+"NaN");if(n.s<1)throw Error(ll+(n.s?"NaN":"-Infinity"));return n.eq(Ga)?new r(0):(Lr=!1,t=Au(cx(n,i),cx(e,i),i),Lr=!0,mr(t,o))};Et.minus=Et.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Nne(t,e):_ne(t,(e.s=-e.s,e))};Et.modulo=Et.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(ll+"NaN");return n.s?(Lr=!1,t=Au(n,e,0,1).times(e),Lr=!0,n.minus(t)):mr(new r(n),o)};Et.naturalExponential=Et.exp=function(){return Dne(this)};Et.naturalLogarithm=Et.ln=function(){return cx(this)};Et.negated=Et.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Et.plus=Et.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?_ne(t,e):Nne(t,(e.s=-e.s,e))};Et.precision=Et.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(oh+e);if(t=wo(o)+1,r=o.d.length-1,n=r*kr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Et.squareRoot=Et.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(ll+"NaN")}for(e=wo(s),Lr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=Pc(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=Kv((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(Au(s,i,a+2)).times(.5),Pc(i.d).slice(0,a)===(t=Pc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(mr(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Lr=!0,mr(r,n)};Et.times=Et.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,h=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=h.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+h[r]*f[o-r-1]+t,i[o--]=s%zo|0,t=s/zo|0;i[o]=(i[o]+t)%zo|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Lr?mr(e,d.precision):e};Et.toDecimalPlaces=Et.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Bc(e,0,qv),t===void 0?t=r.rounding:Bc(t,0,8),mr(n,e+wo(n)+1,t))};Et.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=Ch(r,!0):(Bc(e,0,qv),t===void 0?t=o.rounding:Bc(t,0,8),r=mr(new o(r),e+1,t),n=Ch(r,!0,e+1)),n};Et.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?Ch(o):(Bc(e,0,qv),t===void 0?t=i.rounding:Bc(t,0,8),r=mr(new i(o),e+wo(o)+1,t),n=Ch(r.abs(),!1,e+wo(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Et.toInteger=Et.toint=function(){var e=this,t=e.constructor;return mr(new t(e),wo(e)+1,t.rounding)};Et.toNumber=function(){return+this};Et.toPower=Et.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Ga);if(s=new l(s),!s.s){if(e.s<1)throw Error(ll+"Infinity");return s}if(s.eq(Ga))return s;if(r=l.precision,e.eq(Ga))return mr(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=Rne){for(o=new l(Ga),t=Math.ceil(r/kr+4),Lr=!1;n%2&&(o=o.times(s),q6(o.d,t)),n=Kv(n/2),n!==0;)s=s.times(s),q6(s.d,t);return Lr=!0,e.s<0?new l(Ga).div(o):mr(o,r)}}else if(i<0)throw Error(ll+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Lr=!1,o=e.times(cx(s,r+c)),Lr=!0,o=Dne(o),o.s=i,o};Et.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=wo(o),r=Ch(o,n<=i.toExpNeg||n>=i.toExpPos)):(Bc(e,1,qv),t===void 0?t=i.rounding:Bc(t,0,8),o=mr(new i(o),e,t),n=wo(o),r=Ch(o,e<=n||n<=i.toExpNeg,e)),r};Et.toSignificantDigits=Et.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Bc(e,1,qv),t===void 0?t=r.rounding:Bc(t,0,8)),mr(new r(n),e,t)};Et.toString=Et.valueOf=Et.val=Et.toJSON=Et[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=wo(e),n=e.constructor;return Ch(e,t<=n.toExpNeg||t>=n.toExpPos)};function _ne(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Lr?mr(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(d/kr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/zo|0,l[i]%=zo;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Lr?mr(t,d):t}function Bc(e,t,n){if(e!==~~e||en)throw Error(oh+e)}function Pc(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,c,u,d,f,h,m,g,v,w,x,S,P,T,E,O,k,A=r.constructor,I=r.s==o.s?1:-1,R=r.d,N=o.d;if(!r.s)return new A(r);if(!o.s)throw Error(ll+"Division by zero");for(l=r.e-o.e,O=N.length,T=R.length,h=new A(I),m=h.d=[],c=0;N[c]==(R[c]||0);)++c;if(N[c]>(R[c]||0)&&--l,i==null?x=i=A.precision:a?x=i+(wo(r)-wo(o))+1:x=i,x<0)return new A(0);if(x=x/kr+2|0,c=0,O==1)for(u=0,N=N[0],x++;(c1&&(N=e(N,u),R=e(R,u),O=N.length,T=R.length),P=O,g=R.slice(0,O),v=g.length;v=zo/2&&++E;do u=0,s=t(N,g,O,v),s<0?(w=g[0],O!=v&&(w=w*zo+(g[1]||0)),u=w/E|0,u>1?(u>=zo&&(u=zo-1),d=e(N,u),f=d.length,v=g.length,s=t(d,g,f,v),s==1&&(u--,n(d,O16)throw Error(Jj+wo(e));if(!e.s)return new u(Ga);for(t==null?(Lr=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(kp(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(Ga),u.precision=s;;){if(o=mr(o.times(e),s),n=n.times(++l),a=i.plus(Au(o,n,s)),Pc(a.d).slice(0,s)===Pc(i.d).slice(0,s)){for(;c--;)i=mr(i.times(i),s);return u.precision=d,t==null?(Lr=!0,mr(i,d)):i}i=a}}function wo(e){for(var t=e.e*kr,n=e.d[0];n>=10;n/=10)t++;return t}function V$(e,t,n){if(t>e.LN10.sd())throw Lr=!0,n&&(e.precision=n),Error(ll+"LN10 precision limit exceeded");return mr(new e(e.LN10),t)}function Dd(e){for(var t="";e--;)t+="0";return t}function cx(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=10,h=e,m=h.d,g=h.constructor,v=g.precision;if(h.s<1)throw Error(ll+(h.s?"NaN":"-Infinity"));if(h.eq(Ga))return new g(0);if(t==null?(Lr=!1,c=v):c=t,h.eq(10))return t==null&&(Lr=!0),V$(g,c);if(c+=f,g.precision=c,n=Pc(m),r=n.charAt(0),i=wo(h),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=Pc(h.d),r=n.charAt(0),d++;i=wo(h),r>1?(h=new g("0."+n),i++):h=new g(r+"."+n.slice(1))}else return l=V$(g,c+2,v).times(i+""),h=cx(new g(r+"."+n.slice(1)),c-f).plus(l),g.precision=v,t==null?(Lr=!0,mr(h,v)):h;for(s=a=h=Au(h.minus(Ga),h.plus(Ga),c),u=mr(h.times(h),c),o=3;;){if(a=mr(a.times(u),c),l=s.plus(Au(a,new g(o),c)),Pc(l.d).slice(0,c)===Pc(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(V$(g,c+2,v).times(i+""))),s=Au(s,new g(d),c),g.precision=v,t==null?(Lr=!0,mr(s,v)):s;s=l,o+=2}}function G6(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=Kv(n/kr),e.d=[],r=(n+1)%kr,n<0&&(r+=kr),rcE||e.e<-cE))throw Error(Jj+n)}else e.s=0,e.e=0,e.d=[0];return e}function mr(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=kr,o=t,c=d[u=0];else{if(u=Math.ceil((r+1)/kr),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;r%=kr,o=r-kr+a}if(n!==void 0&&(i=kp(10,a-o-1),s=c/i%10|0,l=t<0||d[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/kp(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=wo(e),d.length=1,t=t-i-1,d[0]=kp(10,(kr-t%kr)%kr),e.e=Kv(-t/kr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,i=1,u--):(d.length=u+1,i=kp(10,kr-r),d[u]=o>0?(c/kp(10,a-o)%kp(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==zo&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=zo)break;d[u--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Lr&&(e.e>cE||e.e<-cE))throw Error(Jj+wo(e));return e}function Nne(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,h=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Lr?mr(t,h):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),o=Math.max(Math.ceil(h/kr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,u=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+Dd(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+Dd(-o-1)+i,n&&(r=n-a)>0&&(i+=Dd(r))):o>=a?(i+=Dd(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+Dd(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=Dd(r))),e.s<0?"-"+i:i}function q6(e,t){if(e.length>t)return e.length=t,!0}function Lne(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(oh+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return G6(a,i.toString())}else if(typeof i!="string")throw Error(oh+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,tqe.test(i))G6(a,i);else throw Error(oh+i)}if(o.prototype=Et,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Lne,o.config=o.set=nqe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(oh+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(oh+n+": "+r);return this}var Zj=Lne(eqe);Ga=new Zj(1);const cr=Zj;function rqe(e){return sqe(e)||aqe(e)||iqe(e)||oqe()}function oqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iqe(e,t){if(e){if(typeof e=="string")return sD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sD(e,t)}}function aqe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function sqe(e){if(Array.isArray(e))return sD(e)}function sD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,K6(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function Sqe(e){if(Array.isArray(e))return e}function Vne(e){var t=ux(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function Hne(e,t,n){if(e.lte(0))return new cr(0);var r=uk.getDigitCount(e.toNumber()),o=new cr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new cr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new cr(Math.ceil(l))}function Cqe(e,t,n){var r=1,o=new cr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new cr(10).pow(uk.getDigitCount(e)-1),o=new cr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new cr(Math.floor(e)))}else e===0?o=new cr(Math.floor((t-1)/2)):n||(o=new cr(Math.floor(e)));var a=Math.floor((t-1)/2),s=dqe(uqe(function(l){return o.add(new cr(l-a).mul(r)).toNumber()}),lD);return s(0,t)}function Une(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new cr(0),tickMin:new cr(0),tickMax:new cr(0)};var i=Hne(new cr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new cr(0):(a=new cr(e).add(t).div(2),a=a.sub(new cr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new cr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?Une(e,t,n,r,o+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new cr(s).mul(i)),tickMax:a.add(new cr(l).mul(i))})}function Pqe(e){var t=ux(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=Vne([n,r]),l=ux(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(uD(lD(0,o-1).map(function(){return 1/0}))):[].concat(uD(lD(0,o-1).map(function(){return-1/0})),[u]);return n>r?cD(d):d}if(c===u)return Cqe(c,o,i);var f=Une(c,u,a,i),h=f.step,m=f.tickMin,g=f.tickMax,v=uk.rangeStep(m,g.add(new cr(.1).mul(h)),h);return n>r?cD(v):v}function Tqe(e,t){var n=ux(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Vne([r,o]),s=ux(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),d=Hne(new cr(c).sub(l).div(u-1),i,0),f=[].concat(uD(uk.rangeStep(new cr(l),new cr(c).sub(new cr(.99).mul(d)),d)),[c]);return r>o?cD(f):f}var Eqe=Bne(Pqe),Oqe=Bne(Tqe),Iqe="Invariant failed";function Ph(e,t){throw new Error(Iqe)}var kqe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Gy(e){"@babel/helpers - typeof";return Gy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gy(e)}function uE(){return uE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Lqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fqe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c0?o[c-1].coordinate:o[s-1].coordinate,d=o[c].coordinate,f=c>=s-1?o[0].coordinate:o[c+1].coordinate,h=void 0;if(zi(d-u)!==zi(f-d)){var m=[];if(zi(f-d)===zi(l[1]-l[0])){h=f;var g=d+l[1]-l[0];m[0]=Math.min(g,(g+u)/2),m[1]=Math.max(g,(g+u)/2)}else{h=u;var v=f+l[1]-l[0];m[0]=Math.min(d,(v+d)/2),m[1]=Math.max(d,(v+d)/2)}var w=[Math.min(d,(h+d)/2),Math.max(d,(h+d)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=o[c].index;break}}else{var x=Math.min(u,f),S=Math.max(u,f);if(t>(x+d)/2&&t<=(S+d)/2){a=o[c].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},eB=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?to(to({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},tKe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?to(to({},x),w[0].props):w[0].props,P=S.barSize,T=S[v];a[T]||(a[T]=[]);var E=Vt(P)?n:P;a[T].push({item:w[0],stackList:w.slice(1),barSize:Vt(E)?void 0:Vi(E,r,0)})}}return a},nKe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=Vi(n,o,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,h=o/l,m=a.reduce(function(P,T){return P+T.barSize||0},0);m+=(l-1)*c,m>=o&&(m-=(l-1)*c,c=0),m>=o&&h>0&&(f=!0,h*=.9,m=l*h);var g=(o-m)/2>>0,v={offset:g-c,size:0};u=a.reduce(function(P,T){var E={item:T.item,position:{offset:v.offset+v.size+c,size:f?h:T.barSize}},O=[].concat(Q6(P),[E]);return v=O[O.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(k){O.push({item:k,position:v})}),O},d)}else{var w=Vi(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var x=(o-2*w-(l-1)*c)/l;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;u=a.reduce(function(P,T,E){var O=[].concat(Q6(P),[{item:T.item,position:{offset:w+(x+c)*E+(x-S)/2,size:S}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(k){O.push({item:k,position:O[O.length-1].position})}),O},d)}return u},rKe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=Kne({children:i,legendWidth:l});if(c){var u=o||{},d=u.width,f=u.height,h=c.align,m=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&h!=="center"&<(t[h]))return to(to({},t),{},Qg({},h,t[h]+(d||0)));if((g==="horizontal"||g==="vertical"&&h==="center")&&m!=="middle"&<(t[m]))return to(to({},t),{},Qg({},m,t[m]+(f||0)))}return t},oKe=function(t,n,r){return Vt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},Yne=function(t,n,r,o,i){var a=n.props.children,s=qi(a,Yv).filter(function(c){return oKe(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=Hr(u,r);if(Vt(d))return c;var f=Array.isArray(d)?[lk(d),sk(d)]:[d,d],h=l.reduce(function(m,g){var v=Hr(u,g,0),w=f[0]-Math.abs(Array.isArray(v)?v[0]:v),x=f[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(h[0],c[0]),Math.max(h[1],c[1])]},[1/0,-1/0])}return null},iKe=function(t,n,r,o,i){var a=n.map(function(s){return Yne(t,s,r,i,o)}).filter(function(s){return!Vt(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},Xne=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&Yne(t,l,c,o)||cw(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u=2?zi(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:o(f)+c,value:d,offset:c}});return u.filter(function(d){return!$S(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:o(d)+c,value:d,index:f,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+c,value:d,offset:c}}):o.domain().map(function(d,f){return{coordinate:o(d)+c,value:i?i[d]:d,index:f,offset:c}})},H$=new WeakMap,FC=function(t,n){if(typeof n!="function")return t;H$.has(t)||H$.set(t,new WeakMap);var r=H$.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},Zne=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:ox(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:iE(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:lw(),realScaleType:"point"}:i==="category"?{scale:ox(),realScaleType:"band"}:{scale:iE(),realScaleType:"linear"};if(AS(o)){var l="scale".concat(WI(o));return{scale:(W6[l]||lw)(),realScaleType:W6[l]?l:"point"}}return Gt(o)?{scale:o}:{scale:lw(),realScaleType:"point"}},Z6=1e-4,ere=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-Z6,a=Math.max(o[0],o[1])+Z6,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},aKe=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},cKe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},uKe={sign:lKe,expand:kze,none:Fy,silhouette:Mze,wiggle:Aze,positive:cKe},dKe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=uKe[r],a=Ize().keys(o).value(function(s,l){return+Hr(s,l,0)}).order(F_).offset(i);return a(t)},fKe=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,f){var h,m=(h=f.type)!==null&&h!==void 0&&h.defaultProps?to(to({},f.type.defaultProps),f.props):f.props,g=m.stackId,v=m.hide;if(v)return d;var w=m[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(Ao(g)){var S=x.stackGroups[g]||{numericAxisId:r,cateAxisId:o,items:[]};S.items.push(f),x.hasStack=!0,x.stackGroups[g]=S}else x.stackGroups[Vh("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[f]};return to(to({},d),{},Qg({},w,x))},l),u={};return Object.keys(c).reduce(function(d,f){var h=c[f];if(h.hasStack){var m={};h.stackGroups=Object.keys(h.stackGroups).reduce(function(g,v){var w=h.stackGroups[v];return to(to({},g),{},Qg({},v,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:dKe(t,w.items,i)}))},m)}return to(to({},d),{},Qg({},f,h))},u)},tre=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=Eqe(c,i,s);return t.domain([lk(u),sk(u)]),{niceTicks:u}}if(i&&o==="number"){var d=t.domain(),f=Oqe(d,i,s);return{niceTicks:f}}return null};function fE(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Vt(o[t.dataKey])){var s=FT(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=Hr(o,Vt(a)?t.dataKey:a);return Vt(l)?null:t.scale(l)}var eG=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=Hr(a,n.dataKey,n.domain[s]);return Vt(l)?null:n.scale(l)-i/2+o},pKe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},hKe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?to(to({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Ao(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},mKe=function(t){return t.reduce(function(n,r){return[lk(r.concat([n[0]]).filter(lt)),sk(r.concat([n[1]]).filter(lt))]},[1/0,-1/0])},nre=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var d=mKe(u.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},tG=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,nG=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,hD=function(t,n,r){if(Gt(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(lt(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(tG.test(t[0])){var i=+tG.exec(t[0])[1];o[0]=n[0]-i}else Gt(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(lt(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(nG.test(t[1])){var a=+nG.exec(t[1])[1];o[1]=n[1]+a}else Gt(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},pE=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=Ij(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},PKe=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=Vi(t.cx,a,a/2),d=Vi(t.cy,s,s/2),f=ire(a,s,r),h=Vi(t.innerRadius,f,0),m=Vi(t.outerRadius,f,f*.8),g=Object.keys(n);return g.reduce(function(v,w){var x=n[w],S=x.domain,P=x.reversed,T;if(Vt(x.range))o==="angleAxis"?T=[l,c]:o==="radiusAxis"&&(T=[h,m]),P&&(T=[T[1],T[0]]);else{T=x.range;var E=T,O=vKe(E,2);l=O[0],c=O[1]}var k=Zne(x,i),A=k.realScaleType,I=k.scale;I.domain(S).range(T),ere(I);var R=tre(I,gu(gu({},x),{},{realScaleType:A})),N=gu(gu(gu({},x),R),{},{range:T,radius:m,realScaleType:A,scale:I,cx:u,cy:d,innerRadius:h,outerRadius:m,startAngle:l,endAngle:c});return gu(gu({},v),{},ore({},w,N))},{})},TKe=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},EKe=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=TKe({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:CKe(c),angleInRadian:c}},OKe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},IKe=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},aG=function(t,n){var r=t.x,o=t.y,i=EKe({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var u=OKe(n),d=u.startAngle,f=u.endAngle,h=s,m;if(d<=f){for(;h>f;)h-=360;for(;h=d&&h<=f}else{for(;h>d;)h-=360;for(;h=f&&h<=d}return m?gu(gu({},n),{},{radius:a,angle:IKe(h,n)}):null},are=function(t){return!y.isValidElement(t)&&!Gt(t)&&typeof t!="boolean"?t.className:""};function hx(e){"@babel/helpers - typeof";return hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hx(e)}var kKe=["offset"];function MKe(e){return _Ke(e)||RKe(e)||$Ke(e)||AKe()}function AKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ke(e,t){if(e){if(typeof e=="string")return mD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mD(e,t)}}function RKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _Ke(e){if(Array.isArray(e))return mD(e)}function mD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function sG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Oo(e){for(var t=1;t=0?1:-1,S,P;o==="insideStart"?(S=h+x*a,P=g):o==="insideEnd"?(S=m-x*a,P=!g):o==="end"&&(S=m+x*a,P=g),P=w<=0?P:!P;var T=Sr(c,u,v,S),E=Sr(c,u,v,S+(P?1:-1)*359),O="M".concat(T.x,",").concat(T.y,` + height and width.`,_,D,a,l,u,d,n);var z=!Array.isArray(p)&&Au(p.type).endsWith("Chart");return Y.Children.map(p,function(F){return Y.isValidElement(F)?y.cloneElement(F,HC({width:_,height:D},z?{style:HC({height:"100%",width:"100%",maxHeight:D,maxWidth:_},F.props.style)}:{})):F})},[n,p,l,f,d,u,A,a]);return Y.createElement("div",{id:v?"".concat(v):void 0,className:de("recharts-responsive-container",w),style:HC(HC({},P),{},{width:a,height:l,minWidth:u,minHeight:d,maxHeight:f}),ref:T},N)}),nb=function(t){return null};nb.displayName="Cell";function dx(e){"@babel/helpers - typeof";return dx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dx(e)}function i6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function lD(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||nl.isSsr)return{width:0,height:0};var r=VGe(n),o=JSON.stringify({text:t,copyStyle:r});if(qm.widthCache[o])return qm.widthCache[o];try{var i=document.getElementById(a6);i||(i=document.createElement("span"),i.setAttribute("id",a6),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var a=lD(lD({},zGe),r);Object.assign(i.style,a),i.textContent="".concat(t);var s=i.getBoundingClientRect(),l={width:s.width,height:s.height};return qm.widthCache[o]=l,++qm.cacheCount>BGe&&(qm.cacheCount=0,qm.widthCache={}),l}catch{return{width:0,height:0}}},HGe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function fx(e){"@babel/helpers - typeof";return fx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fx(e)}function uE(e,t){return qGe(e)||GGe(e,t)||WGe(e,t)||UGe()}function UGe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WGe(e,t){if(e){if(typeof e=="string")return s6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s6(e,t)}}function s6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function s8e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function p6(e,t){return d8e(e)||u8e(e,t)||c8e(e,t)||l8e()}function l8e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c8e(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return _.reduce(function(D,z){var F=z.word,H=z.width,U=D[D.length-1];if(U&&(o==null||i||U.width+H+rz.width?D:z})};if(!u)return p;for(var g="…",v=function(_){var D=d.slice(0,_),z=cne({breakAll:c,style:l,children:D+g}).wordsWithComputedWidth,F=f(z),H=F.length>a||m(F).width>Number(o);return[H,F]},w=0,x=d.length-1,S=0,P;w<=x&&S<=d.length-1;){var T=Math.floor((w+x)/2),E=T-1,O=v(E),k=p6(O,2),A=k[0],I=k[1],R=v(T),N=p6(R,1),L=N[0];if(!A&&!L&&(w=T+1),A&&L&&(x=T-1),!A&&L){P=I;break}S++}return P||p},m6=function(t){var n=jt(t)?[]:t.toString().split(lne);return[{words:n}]},p8e=function(t){var n=t.width,r=t.scaleToFit,o=t.children,i=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!nl.isSsr){var l,c,u=cne({breakAll:a,children:o,style:i});if(u){var d=u.wordsWithComputedWidth,f=u.spaceWidth;l=d,c=f}else return m6(o);return f8e({breakAll:a,children:o,maxLines:s,style:i},l,c,n,r)}return m6(o)},g6="#808080",Ah=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.lineHeight,s=a===void 0?"1em":a,l=t.capHeight,c=l===void 0?"0.71em":l,u=t.scaleToFit,d=u===void 0?!1:u,f=t.textAnchor,p=f===void 0?"start":f,m=t.verticalAnchor,g=m===void 0?"end":m,v=t.fill,w=v===void 0?g6:v,x=f6(t,i8e),S=y.useMemo(function(){return p8e({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:d,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,d,x.style,x.width]),P=x.dx,T=x.dy,E=x.angle,O=x.className,k=x.breakAll,A=f6(x,a8e);if(!Ro(r)||!Ro(i))return null;var I=r+(st(P)?P:0),R=i+(st(T)?T:0),N;switch(g){case"start":N=U$("calc(".concat(c,")"));break;case"middle":N=U$("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:N=U$("calc(".concat(S.length-1," * -").concat(s,")"));break}var L=[];if(d){var j=S[0].width,_=x.width;L.push("scale(".concat((st(_)?_/j:1)/j,")"))}return E&&L.push("rotate(".concat(E,", ").concat(I,", ").concat(R,")")),L.length&&(A.transform=L.join(" ")),Y.createElement("text",cD({},$t(A,!0),{x:I,y:R,className:de("recharts-text",O),textAnchor:p,fill:w.includes("url")?g6:w}),S.map(function(D,z){var F=D.words.join(k?"":" ");return Y.createElement("tspan",{x:I,dy:z===0?N:s,key:"".concat(F,"-").concat(z)},F)}))};function bf(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function h8e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function zj(e){let t,n,r;e.length!==2?(t=bf,n=(s,l)=>bf(e(s),l),r=(s,l)=>e(s)-l):(t=e===bf||e===h8e?e:m8e,n=e,r=e);function o(s,l,c=0,u=s.length){if(c>>1;n(s[d],l)<0?c=d+1:u=d}while(c>>1;n(s[d],l)<=0?c=d+1:u=d}while(cc&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:o,center:a,right:i}}function m8e(){return 0}function une(e){return e===null?NaN:+e}function*g8e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const y8e=zj(bf),zS=y8e.right;zj(une).center;class y6 extends Map{constructor(t,n=w8e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,o]of t)this.set(r,o)}get(t){return super.get(v6(this,t))}has(t){return super.has(v6(this,t))}set(t,n){return super.set(v8e(this,t),n)}delete(t){return super.delete(b8e(this,t))}}function v6({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function v8e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function b8e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function w8e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function x8e(e=bf){if(e===bf)return dne;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function dne(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const S8e=Math.sqrt(50),C8e=Math.sqrt(10),P8e=Math.sqrt(2);function dE(e,t,n){const r=(t-e)/Math.max(0,n),o=Math.floor(Math.log10(r)),i=r/Math.pow(10,o),a=i>=S8e?10:i>=C8e?5:i>=P8e?2:1;let s,l,c;return o<0?(c=Math.pow(10,-o)/a,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,o)*a,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=o))return[];const s=i-o+1,l=new Array(s);if(r)if(a<0)for(let c=0;c=r)&&(n=r);return n}function w6(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function fne(e,t,n=0,r=1/0,o){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(o=o===void 0?dne:x8e(o);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));fne(e,t,p,m,o)}const i=e[t];let a=n,s=r;for(p0(e,n,t),o(e[r],i)>0&&p0(e,n,r);a0;)--s}o(e[n],i)===0?p0(e,n,s):(++s,p0(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function p0(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function T8e(e,t,n){if(e=Float64Array.from(g8e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return w6(e);if(t>=1)return b6(e);var r,o=(r-1)*t,i=Math.floor(o),a=b6(fne(e,i).subarray(0,i+1)),s=w6(e.subarray(i+1));return a+(s-a)*(o-i)}}function E8e(e,t,n=une){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,o=(r-1)*t,i=Math.floor(o),a=+n(e[i],i,e),s=+n(e[i+1],i+1,e);return a+(s-a)*(o-i)}}function O8e(e,t,n){e=+e,t=+t,n=(o=arguments.length)<2?(t=e,e=0,1):o<3?1:+n;for(var r=-1,o=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(o);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?WC(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?WC(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=k8e.exec(e))?new ma(t[1],t[2],t[3],1):(t=M8e.exec(e))?new ma(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=A8e.exec(e))?WC(t[1],t[2],t[3],t[4]):(t=$8e.exec(e))?WC(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=R8e.exec(e))?O6(t[1],t[2]/100,t[3]/100,1):(t=_8e.exec(e))?O6(t[1],t[2]/100,t[3]/100,t[4]):x6.hasOwnProperty(e)?P6(x6[e]):e==="transparent"?new ma(NaN,NaN,NaN,0):null}function P6(e){return new ma(e>>16&255,e>>8&255,e&255,1)}function WC(e,t,n,r){return r<=0&&(e=t=n=NaN),new ma(e,t,n,r)}function L8e(e){return e instanceof VS||(e=gx(e)),e?(e=e.rgb(),new ma(e.r,e.g,e.b,e.opacity)):new ma}function hD(e,t,n,r){return arguments.length===1?L8e(e):new ma(e,t,n,r??1)}function ma(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Hj(ma,hD,hne(VS,{brighter(e){return e=e==null?fE:Math.pow(fE,e),new ma(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?hx:Math.pow(hx,e),new ma(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ma(fh(this.r),fh(this.g),fh(this.b),pE(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T6,formatHex:T6,formatHex8:F8e,formatRgb:E6,toString:E6}));function T6(){return`#${Kp(this.r)}${Kp(this.g)}${Kp(this.b)}`}function F8e(){return`#${Kp(this.r)}${Kp(this.g)}${Kp(this.b)}${Kp((isNaN(this.opacity)?1:this.opacity)*255)}`}function E6(){const e=pE(this.opacity);return`${e===1?"rgb(":"rgba("}${fh(this.r)}, ${fh(this.g)}, ${fh(this.b)}${e===1?")":`, ${e})`}`}function pE(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function fh(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Kp(e){return e=fh(e),(e<16?"0":"")+e.toString(16)}function O6(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Hl(e,t,n,r)}function mne(e){if(e instanceof Hl)return new Hl(e.h,e.s,e.l,e.opacity);if(e instanceof VS||(e=gx(e)),!e)return new Hl;if(e instanceof Hl)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(t===i?a=(n-r)/s+(n0&&l<1?0:a,new Hl(a,s,l,e.opacity)}function j8e(e,t,n,r){return arguments.length===1?mne(e):new Hl(e,t,n,r??1)}function Hl(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Hj(Hl,j8e,hne(VS,{brighter(e){return e=e==null?fE:Math.pow(fE,e),new Hl(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?hx:Math.pow(hx,e),new Hl(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new ma(W$(e>=240?e-240:e+120,o,r),W$(e,o,r),W$(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new Hl(I6(this.h),GC(this.s),GC(this.l),pE(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=pE(this.opacity);return`${e===1?"hsl(":"hsla("}${I6(this.h)}, ${GC(this.s)*100}%, ${GC(this.l)*100}%${e===1?")":`, ${e})`}`}}));function I6(e){return e=(e||0)%360,e<0?e+360:e}function GC(e){return Math.max(0,Math.min(1,e||0))}function W$(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Uj=e=>()=>e;function B8e(e,t){return function(n){return e+n*t}}function z8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function V8e(e){return(e=+e)==1?gne:function(t,n){return n-t?z8e(t,n,e):Uj(isNaN(t)?n:t)}}function gne(e,t){var n=t-e;return n?B8e(e,n):Uj(isNaN(e)?t:e)}const k6=function e(t){var n=V8e(t);function r(o,i){var a=n((o=hD(o)).r,(i=hD(i)).r),s=n(o.g,i.g),l=n(o.b,i.b),c=gne(o.opacity,i.opacity);return function(u){return o.r=a(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function H8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(i){for(o=0;on&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(r=r[0])===(o=o[0])?s[a]?s[a]+=o:s[++a]=o:(s[++a]=null,l.push({i:a,x:hE(r,o)})),n=G$.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function e9e(e,t,n){var r=e[0],o=e[1],i=t[0],a=t[1];return o2?t9e:e9e,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?i:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(o((c||(c=s(t,e.map(r),hE)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,mE),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Wj,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Hi,u()):a!==Hi},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(i=f,d):i},function(f,p){return r=f,o=p,u()}}function Gj(){return fk()(Hi,Hi)}function n9e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function gE(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Jy(e){return e=gE(Math.abs(e)),e?e[1]:NaN}function r9e(e,t){return function(n,r){for(var o=n.length,i=[],a=0,s=e[0],l=0;o>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),i.push(n.substring(o-=s,o+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return i.reverse().join(t)}}function o9e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var i9e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function yx(e){if(!(t=i9e.exec(e)))throw new Error("invalid format: "+e);var t;return new qj({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}yx.prototype=qj.prototype;function qj(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}qj.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a9e(e){e:for(var t=e.length,n=1,r=-1,o;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(o+1):e}var yne;function s9e(e,t){var n=gE(e,t);if(!n)return e+"";var r=n[0],o=n[1],i=o-(yne=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+gE(e,Math.max(0,t+i-1))[0]}function A6(e,t){var n=gE(e,t);if(!n)return e+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}const $6={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:n9e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>A6(e*100,t),r:A6,s:s9e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function R6(e){return e}var _6=Array.prototype.map,D6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function l9e(e){var t=e.grouping===void 0||e.thousands===void 0?R6:r9e(_6.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",o=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?R6:o9e(_6.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=yx(d);var f=d.fill,p=d.align,m=d.sign,g=d.symbol,v=d.zero,w=d.width,x=d.comma,S=d.precision,P=d.trim,T=d.type;T==="n"?(x=!0,T="g"):$6[T]||(S===void 0&&(S=12),P=!0,T="g"),(v||f==="0"&&p==="=")&&(v=!0,f="0",p="=");var E=g==="$"?n:g==="#"&&/[boxX]/.test(T)?"0"+T.toLowerCase():"",O=g==="$"?r:/[%p]/.test(T)?a:"",k=$6[T],A=/[defgprs%]/.test(T);S=S===void 0?6:/[gprs]/.test(T)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function I(R){var N=E,L=O,j,_,D;if(T==="c")L=k(R)+L,R="";else{R=+R;var z=R<0||1/R<0;if(R=isNaN(R)?l:k(Math.abs(R),S),P&&(R=a9e(R)),z&&+R==0&&m!=="+"&&(z=!1),N=(z?m==="("?m:s:m==="-"||m==="("?"":m)+N,L=(T==="s"?D6[8+yne/3]:"")+L+(z&&m==="("?")":""),A){for(j=-1,_=R.length;++j<_;)if(D=R.charCodeAt(j),48>D||D>57){L=(D===46?o+R.slice(j+1):R.slice(j))+L,R=R.slice(0,j);break}}}x&&!v&&(R=t(R,1/0));var F=N.length+R.length+L.length,H=F>1)+N+R+L+H.slice(F);break;default:R=H+N+R+L;break}return i(R)}return I.toString=function(){return d+""},I}function u(d,f){var p=c((d=yx(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Jy(f)/3)))*3,g=Math.pow(10,-m),v=D6[8+m/3];return function(w){return p(g*w)+v}}return{format:c,formatPrefix:u}}var qC,Kj,vne;c9e({thousands:",",grouping:[3],currency:["$",""]});function c9e(e){return qC=l9e(e),Kj=qC.format,vne=qC.formatPrefix,qC}function u9e(e){return Math.max(0,-Jy(Math.abs(e)))}function d9e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Jy(t)/3)))*3-Jy(Math.abs(e)))}function f9e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Jy(t)-Jy(e))+1}function bne(e,t,n,r){var o=fD(e,t,n),i;switch(r=yx(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(i=d9e(o,a))&&(r.precision=i),vne(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(i=f9e(o,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=i-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(i=u9e(o))&&(r.precision=i-(r.type==="%")*2);break}}return Kj(r)}function Qf(e){var t=e.domain;return e.ticks=function(n){var r=t();return uD(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var o=t();return bne(o[0],o[o.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),o=0,i=r.length-1,a=r[o],s=r[i],l,c,u=10;for(s0;){if(c=dD(a,s,n),c===l)return r[o]=a,r[i]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function yE(){var e=Gj();return e.copy=function(){return HS(e,yE())},hl.apply(e,arguments),Qf(e)}function wne(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,mE),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return wne(e).unknown(t)},e=arguments.length?Array.from(e,mE):[0,1],Qf(n)}function xne(e,t){e=e.slice();var n=0,r=e.length-1,o=e[n],i=e[r],a;return iMath.pow(e,t)}function y9e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function F6(e){return(t,n)=>-e(-t,n)}function Yj(e){const t=e(N6,L6),n=t.domain;let r=10,o,i;function a(){return o=y9e(r),i=g9e(r),n()[0]<0?(o=F6(o),i=F6(i),e(p9e,h9e)):e(N6,L6),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u0){for(;f<=p;++f)for(m=1;mu)break;w.push(g)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(g=f>0?m/i(-f):m*i(f),!(gu)break;w.push(g)}w.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=yx(l)).precision==null&&(l.trim=!0),l=Kj(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/i(Math.round(o(u)));return d*rn(xne(n(),{floor:s=>i(Math.floor(o(s))),ceil:s=>i(Math.ceil(o(s)))})),t}function Sne(){const e=Yj(fk()).domain([1,10]);return e.copy=()=>HS(e,Sne()).base(e.base()),hl.apply(e,arguments),e}function j6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function B6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Xj(e){var t=1,n=e(j6(t),B6(t));return n.constant=function(r){return arguments.length?e(j6(t=+r),B6(t)):t},Qf(n)}function Cne(){var e=Xj(fk());return e.copy=function(){return HS(e,Cne()).constant(e.constant())},hl.apply(e,arguments)}function z6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function v9e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function b9e(e){return e<0?-e*e:e*e}function Qj(e){var t=e(Hi,Hi),n=1;function r(){return n===1?e(Hi,Hi):n===.5?e(v9e,b9e):e(z6(n),z6(1/n))}return t.exponent=function(o){return arguments.length?(n=+o,r()):n},Qf(t)}function Jj(){var e=Qj(fk());return e.copy=function(){return HS(e,Jj()).exponent(e.exponent())},hl.apply(e,arguments),e}function w9e(){return Jj.apply(null,arguments).exponent(.5)}function V6(e){return Math.sign(e)*e*e}function x9e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function Pne(){var e=Gj(),t=[0,1],n=!1,r;function o(i){var a=x9e(e(i));return isNaN(a)?r:n?Math.round(a):a}return o.invert=function(i){return e.invert(V6(i))},o.domain=function(i){return arguments.length?(e.domain(i),o):e.domain()},o.range=function(i){return arguments.length?(e.range((t=Array.from(i,mE)).map(V6)),o):t.slice()},o.rangeRound=function(i){return o.range(i).round(!0)},o.round=function(i){return arguments.length?(n=!!i,o):n},o.clamp=function(i){return arguments.length?(e.clamp(i),o):e.clamp()},o.unknown=function(i){return arguments.length?(r=i,o):r},o.copy=function(){return Pne(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},hl.apply(o,arguments),Qf(o)}function Tne(){var e=[],t=[],n=[],r;function o(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(i=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return Ene().domain([e,t]).range(o).unknown(i)},hl.apply(Qf(a),arguments)}function One(){var e=[.5],t=[0,1],n,r=1;function o(i){return i!=null&&i<=i?t[zS(e,i,0,r)]:n}return o.domain=function(i){return arguments.length?(e=Array.from(i),r=Math.min(e.length,t.length-1),o):e.slice()},o.range=function(i){return arguments.length?(t=Array.from(i),r=Math.min(e.length,t.length-1),o):t.slice()},o.invertExtent=function(i){var a=t.indexOf(i);return[e[a-1],e[a]]},o.unknown=function(i){return arguments.length?(n=i,o):n},o.copy=function(){return One().domain(e).range(t).unknown(n)},hl.apply(o,arguments)}const q$=new Date,K$=new Date;function No(e,t,n,r){function o(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return o.floor=i=>(e(i=new Date(+i)),i),o.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),o.round=i=>{const a=o(i),s=o.ceil(i);return i-a(t(i=new Date(+i),a==null?1:Math.floor(a)),i),o.range=(i,a,s)=>{const l=[];if(i=o.ceil(i),s=s==null?1:Math.floor(s),!(i0))return l;let c;do l.push(c=new Date(+i)),t(i,s),e(i);while(cNo(a=>{if(a>=a)for(;e(a),!i(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!i(a););else for(;--s>=0;)for(;t(a,1),!i(a););}),n&&(o.count=(i,a)=>(q$.setTime(+i),K$.setTime(+a),e(q$),e(K$),Math.floor(n(q$,K$))),o.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?o.filter(r?a=>r(a)%i===0:a=>o.count(0,a)%i===0):o)),o}const vE=No(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);vE.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?No(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):vE);vE.range;const Eu=1e3,Ks=Eu*60,Ou=Ks*60,Zu=Ou*24,Zj=Zu*7,H6=Zu*30,Y$=Zu*365,Yp=No(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Eu)},(e,t)=>(t-e)/Eu,e=>e.getUTCSeconds());Yp.range;const eB=No(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Eu)},(e,t)=>{e.setTime(+e+t*Ks)},(e,t)=>(t-e)/Ks,e=>e.getMinutes());eB.range;const tB=No(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Ks)},(e,t)=>(t-e)/Ks,e=>e.getUTCMinutes());tB.range;const nB=No(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Eu-e.getMinutes()*Ks)},(e,t)=>{e.setTime(+e+t*Ou)},(e,t)=>(t-e)/Ou,e=>e.getHours());nB.range;const rB=No(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ou)},(e,t)=>(t-e)/Ou,e=>e.getUTCHours());rB.range;const US=No(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ks)/Zu,e=>e.getDate()-1);US.range;const pk=No(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zu,e=>e.getUTCDate()-1);pk.range;const Ine=No(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Zu,e=>Math.floor(e/Zu));Ine.range;function Qh(e){return No(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ks)/Zj)}const hk=Qh(0),bE=Qh(1),S9e=Qh(2),C9e=Qh(3),Zy=Qh(4),P9e=Qh(5),T9e=Qh(6);hk.range;bE.range;S9e.range;C9e.range;Zy.range;P9e.range;T9e.range;function Jh(e){return No(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Zj)}const mk=Jh(0),wE=Jh(1),E9e=Jh(2),O9e=Jh(3),ev=Jh(4),I9e=Jh(5),k9e=Jh(6);mk.range;wE.range;E9e.range;O9e.range;ev.range;I9e.range;k9e.range;const oB=No(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());oB.range;const iB=No(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());iB.range;const ed=No(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ed.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:No(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ed.range;const td=No(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());td.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:No(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});td.range;function kne(e,t,n,r,o,i){const a=[[Yp,1,Eu],[Yp,5,5*Eu],[Yp,15,15*Eu],[Yp,30,30*Eu],[i,1,Ks],[i,5,5*Ks],[i,15,15*Ks],[i,30,30*Ks],[o,1,Ou],[o,3,3*Ou],[o,6,6*Ou],[o,12,12*Ou],[r,1,Zu],[r,2,2*Zu],[n,1,Zj],[t,1,H6],[t,3,3*H6],[e,1,Y$]];function s(c,u,d){const f=uv).right(a,f);if(p===a.length)return e.every(fD(c/Y$,u/Y$,d));if(p===0)return vE.every(Math.max(fD(c,u,d),1));const[m,g]=a[f/a[p-1][2]53)return null;"w"in ee||(ee.w=1),"Z"in ee?(me=Q$(h0(ee.y,0,1)),we=me.getUTCDay(),me=we>4||we===0?wE.ceil(me):wE(me),me=pk.offset(me,(ee.V-1)*7),ee.y=me.getUTCFullYear(),ee.m=me.getUTCMonth(),ee.d=me.getUTCDate()+(ee.w+6)%7):(me=X$(h0(ee.y,0,1)),we=me.getDay(),me=we>4||we===0?bE.ceil(me):bE(me),me=US.offset(me,(ee.V-1)*7),ee.y=me.getFullYear(),ee.m=me.getMonth(),ee.d=me.getDate()+(ee.w+6)%7)}else("W"in ee||"U"in ee)&&("w"in ee||(ee.w="u"in ee?ee.u%7:"W"in ee?1:0),we="Z"in ee?Q$(h0(ee.y,0,1)).getUTCDay():X$(h0(ee.y,0,1)).getDay(),ee.m=0,ee.d="W"in ee?(ee.w+6)%7+ee.W*7-(we+5)%7:ee.w+ee.U*7-(we+6)%7);return"Z"in ee?(ee.H+=ee.Z/100|0,ee.M+=ee.Z%100,Q$(ee)):X$(ee)}}function k(le,re,fe,ee){for(var ce=0,me=re.length,we=fe.length,ge,Se;ce=we)return-1;if(ge=re.charCodeAt(ce++),ge===37){if(ge=re.charAt(ce++),Se=T[ge in U6?re.charAt(ce++):ge],!Se||(ee=Se(le,fe,ee))<0)return-1}else if(ge!=fe.charCodeAt(ee++))return-1}return ee}function A(le,re,fe){var ee=c.exec(re.slice(fe));return ee?(le.p=u.get(ee[0].toLowerCase()),fe+ee[0].length):-1}function I(le,re,fe){var ee=p.exec(re.slice(fe));return ee?(le.w=m.get(ee[0].toLowerCase()),fe+ee[0].length):-1}function R(le,re,fe){var ee=d.exec(re.slice(fe));return ee?(le.w=f.get(ee[0].toLowerCase()),fe+ee[0].length):-1}function N(le,re,fe){var ee=w.exec(re.slice(fe));return ee?(le.m=x.get(ee[0].toLowerCase()),fe+ee[0].length):-1}function L(le,re,fe){var ee=g.exec(re.slice(fe));return ee?(le.m=v.get(ee[0].toLowerCase()),fe+ee[0].length):-1}function j(le,re,fe){return k(le,t,re,fe)}function _(le,re,fe){return k(le,n,re,fe)}function D(le,re,fe){return k(le,r,re,fe)}function z(le){return a[le.getDay()]}function F(le){return i[le.getDay()]}function H(le){return l[le.getMonth()]}function U(le){return s[le.getMonth()]}function q(le){return o[+(le.getHours()>=12)]}function X(le){return 1+~~(le.getMonth()/3)}function ae(le){return a[le.getUTCDay()]}function Z(le){return i[le.getUTCDay()]}function K(le){return l[le.getUTCMonth()]}function te(le){return s[le.getUTCMonth()]}function pe(le){return o[+(le.getUTCHours()>=12)]}function ie(le){return 1+~~(le.getUTCMonth()/3)}return{format:function(le){var re=E(le+="",S);return re.toString=function(){return le},re},parse:function(le){var re=O(le+="",!1);return re.toString=function(){return le},re},utcFormat:function(le){var re=E(le+="",P);return re.toString=function(){return le},re},utcParse:function(le){var re=O(le+="",!0);return re.toString=function(){return le},re}}}var U6={"-":"",_:" ",0:"0"},Yo=/^\s*\d+/,D9e=/^%/,N9e=/[\\^$*+?|[\]().{}]/g;function Hn(e,t,n){var r=e<0?"-":"",o=(r?-e:e)+"",i=o.length;return r+(i[t.toLowerCase(),n]))}function F9e(e,t,n){var r=Yo.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function j9e(e,t,n){var r=Yo.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function B9e(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function z9e(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function V9e(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function W6(e,t,n){var r=Yo.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function G6(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function H9e(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function U9e(e,t,n){var r=Yo.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function W9e(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function q6(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function G9e(e,t,n){var r=Yo.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function K6(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function q9e(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function K9e(e,t,n){var r=Yo.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Y9e(e,t,n){var r=Yo.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function X9e(e,t,n){var r=Yo.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Q9e(e,t,n){var r=D9e.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function J9e(e,t,n){var r=Yo.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Z9e(e,t,n){var r=Yo.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Y6(e,t){return Hn(e.getDate(),t,2)}function e7e(e,t){return Hn(e.getHours(),t,2)}function t7e(e,t){return Hn(e.getHours()%12||12,t,2)}function n7e(e,t){return Hn(1+US.count(ed(e),e),t,3)}function Mne(e,t){return Hn(e.getMilliseconds(),t,3)}function r7e(e,t){return Mne(e,t)+"000"}function o7e(e,t){return Hn(e.getMonth()+1,t,2)}function i7e(e,t){return Hn(e.getMinutes(),t,2)}function a7e(e,t){return Hn(e.getSeconds(),t,2)}function s7e(e){var t=e.getDay();return t===0?7:t}function l7e(e,t){return Hn(hk.count(ed(e)-1,e),t,2)}function Ane(e){var t=e.getDay();return t>=4||t===0?Zy(e):Zy.ceil(e)}function c7e(e,t){return e=Ane(e),Hn(Zy.count(ed(e),e)+(ed(e).getDay()===4),t,2)}function u7e(e){return e.getDay()}function d7e(e,t){return Hn(bE.count(ed(e)-1,e),t,2)}function f7e(e,t){return Hn(e.getFullYear()%100,t,2)}function p7e(e,t){return e=Ane(e),Hn(e.getFullYear()%100,t,2)}function h7e(e,t){return Hn(e.getFullYear()%1e4,t,4)}function m7e(e,t){var n=e.getDay();return e=n>=4||n===0?Zy(e):Zy.ceil(e),Hn(e.getFullYear()%1e4,t,4)}function g7e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Hn(t/60|0,"0",2)+Hn(t%60,"0",2)}function X6(e,t){return Hn(e.getUTCDate(),t,2)}function y7e(e,t){return Hn(e.getUTCHours(),t,2)}function v7e(e,t){return Hn(e.getUTCHours()%12||12,t,2)}function b7e(e,t){return Hn(1+pk.count(td(e),e),t,3)}function $ne(e,t){return Hn(e.getUTCMilliseconds(),t,3)}function w7e(e,t){return $ne(e,t)+"000"}function x7e(e,t){return Hn(e.getUTCMonth()+1,t,2)}function S7e(e,t){return Hn(e.getUTCMinutes(),t,2)}function C7e(e,t){return Hn(e.getUTCSeconds(),t,2)}function P7e(e){var t=e.getUTCDay();return t===0?7:t}function T7e(e,t){return Hn(mk.count(td(e)-1,e),t,2)}function Rne(e){var t=e.getUTCDay();return t>=4||t===0?ev(e):ev.ceil(e)}function E7e(e,t){return e=Rne(e),Hn(ev.count(td(e),e)+(td(e).getUTCDay()===4),t,2)}function O7e(e){return e.getUTCDay()}function I7e(e,t){return Hn(wE.count(td(e)-1,e),t,2)}function k7e(e,t){return Hn(e.getUTCFullYear()%100,t,2)}function M7e(e,t){return e=Rne(e),Hn(e.getUTCFullYear()%100,t,2)}function A7e(e,t){return Hn(e.getUTCFullYear()%1e4,t,4)}function $7e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ev(e):ev.ceil(e),Hn(e.getUTCFullYear()%1e4,t,4)}function R7e(){return"+0000"}function Q6(){return"%"}function J6(e){return+e}function Z6(e){return Math.floor(+e/1e3)}var Km,_ne,Dne;_7e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function _7e(e){return Km=_9e(e),_ne=Km.format,Km.parse,Dne=Km.utcFormat,Km.utcParse,Km}function D7e(e){return new Date(e)}function N7e(e){return e instanceof Date?+e:+new Date(+e)}function aB(e,t,n,r,o,i,a,s,l,c){var u=Gj(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),g=c("%I:%M"),v=c("%I %p"),w=c("%a %d"),x=c("%b %d"),S=c("%B"),P=c("%Y");function T(E){return(l(E)t(o/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(o,i)=>T8e(e,i/r))},n.copy=function(){return jne(t).domain(e)},ld.apply(n,arguments)}function yk(){var e=0,t=.5,n=1,r=1,o,i,a,s,l,c=Hi,u,d=!1,f;function p(g){return isNaN(g=+g)?f:(g=.5+((g=+u(g))-i)*(r*gt}var Hne=H7e,U7e=vk,W7e=Hne,G7e=tb;function q7e(e){return e&&e.length?U7e(e,G7e,W7e):void 0}var K7e=q7e;const af=_n(K7e);function Y7e(e,t){return ee.e^i.s<0?1:-1;for(r=i.d.length,o=e.d.length,t=0,n=re.d[t]^i.s<0?1:-1;return r===o?0:r>o^i.s<0?1:-1};Et.decimalPlaces=Et.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*kr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};Et.dividedBy=Et.div=function(e){return Ru(this,new this.constructor(e))};Et.dividedToIntegerBy=Et.idiv=function(e){var t=this,n=t.constructor;return mr(Ru(t,new n(e),0,1),n.precision)};Et.equals=Et.eq=function(e){return!this.cmp(e)};Et.exponent=function(){return xo(this)};Et.greaterThan=Et.gt=function(e){return this.cmp(e)>0};Et.greaterThanOrEqualTo=Et.gte=function(e){return this.cmp(e)>=0};Et.isInteger=Et.isint=function(){return this.e>this.d.length-2};Et.isNegative=Et.isneg=function(){return this.s<0};Et.isPositive=Et.ispos=function(){return this.s>0};Et.isZero=function(){return this.s===0};Et.lessThan=Et.lt=function(e){return this.cmp(e)<0};Et.lessThanOrEqualTo=Et.lte=function(e){return this.cmp(e)<1};Et.logarithm=Et.log=function(e){var t,n=this,r=n.constructor,o=r.precision,i=o+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(qa))throw Error(cl+"NaN");if(n.s<1)throw Error(cl+(n.s?"NaN":"-Infinity"));return n.eq(qa)?new r(0):(Fr=!1,t=Ru(vx(n,i),vx(e,i),i),Fr=!0,mr(t,o))};Et.minus=Et.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Kne(t,e):Gne(t,(e.s=-e.s,e))};Et.modulo=Et.mod=function(e){var t,n=this,r=n.constructor,o=r.precision;if(e=new r(e),!e.s)throw Error(cl+"NaN");return n.s?(Fr=!1,t=Ru(n,e,0,1).times(e),Fr=!0,n.minus(t)):mr(new r(n),o)};Et.naturalExponential=Et.exp=function(){return qne(this)};Et.naturalLogarithm=Et.ln=function(){return vx(this)};Et.negated=Et.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Et.plus=Et.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Gne(t,e):Kne(t,(e.s=-e.s,e))};Et.precision=Et.sd=function(e){var t,n,r,o=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ph+e);if(t=xo(o)+1,r=o.d.length-1,n=r*kr+1,r=o.d[r],r){for(;r%10==0;r/=10)n--;for(r=o.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};Et.squareRoot=Et.sqrt=function(){var e,t,n,r,o,i,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(cl+"NaN")}for(e=xo(s),Fr=!1,o=Math.sqrt(+s),o==0||o==1/0?(t=Oc(s.d),(t.length+e)%2==0&&(t+="0"),o=Math.sqrt(t),e=ib((e+1)/2)-(e<0||e%2),o==1/0?t="5e"+e:(t=o.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(o.toString()),n=l.precision,o=a=n+3;;)if(i=r,r=i.plus(Ru(s,i,a+2)).times(.5),Oc(i.d).slice(0,a)===(t=Oc(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),o==a&&t=="4999"){if(mr(i,n+1,0),i.times(i).eq(s)){r=i;break}}else if(t!="9999")break;a+=4}return Fr=!0,mr(r,n)};Et.times=Et.mul=function(e){var t,n,r,o,i,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l=0;){for(t=0,o=l+r;o>r;)s=i[o]+p[r]*f[o-r-1]+t,i[o--]=s%Vo|0,t=s/Vo|0;i[o]=(i[o]+t)%Vo|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,Fr?mr(e,d.precision):e};Et.toDecimalPlaces=Et.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Hc(e,0,ob),t===void 0?t=r.rounding:Hc(t,0,8),mr(n,e+xo(n)+1,t))};Et.toExponential=function(e,t){var n,r=this,o=r.constructor;return e===void 0?n=$h(r,!0):(Hc(e,0,ob),t===void 0?t=o.rounding:Hc(t,0,8),r=mr(new o(r),e+1,t),n=$h(r,!0,e+1)),n};Et.toFixed=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?$h(o):(Hc(e,0,ob),t===void 0?t=i.rounding:Hc(t,0,8),r=mr(new i(o),e+xo(o)+1,t),n=$h(r.abs(),!1,e+xo(r)+1),o.isneg()&&!o.isZero()?"-"+n:n)};Et.toInteger=Et.toint=function(){var e=this,t=e.constructor;return mr(new t(e),xo(e)+1,t.rounding)};Et.toNumber=function(){return+this};Et.toPower=Et.pow=function(e){var t,n,r,o,i,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(qa);if(s=new l(s),!s.s){if(e.s<1)throw Error(cl+"Infinity");return s}if(s.eq(qa))return s;if(r=l.precision,e.eq(qa))return mr(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,i=s.s,a){if((n=u<0?-u:u)<=Wne){for(o=new l(qa),t=Math.ceil(r/kr+4),Fr=!1;n%2&&(o=o.times(s),nG(o.d,t)),n=ib(n/2),n!==0;)s=s.times(s),nG(s.d,t);return Fr=!0,e.s<0?new l(qa).div(o):mr(o,r)}}else if(i<0)throw Error(cl+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Fr=!1,o=e.times(vx(s,r+c)),Fr=!0,o=qne(o),o.s=i,o};Et.toPrecision=function(e,t){var n,r,o=this,i=o.constructor;return e===void 0?(n=xo(o),r=$h(o,n<=i.toExpNeg||n>=i.toExpPos)):(Hc(e,1,ob),t===void 0?t=i.rounding:Hc(t,0,8),o=mr(new i(o),e,t),n=xo(o),r=$h(o,e<=n||n<=i.toExpNeg,e)),r};Et.toSignificantDigits=Et.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Hc(e,1,ob),t===void 0?t=r.rounding:Hc(t,0,8)),mr(new r(n),e,t)};Et.toString=Et.valueOf=Et.val=Et.toJSON=Et[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=xo(e),n=e.constructor;return $h(e,t<=n.toExpNeg||t>=n.toExpPos)};function Gne(e,t){var n,r,o,i,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),Fr?mr(t,d):t;if(l=e.d,c=t.d,a=e.e,o=t.e,l=l.slice(),i=a-o,i){for(i<0?(r=l,i=-i,s=c.length):(r=c,o=a,s=l.length),a=Math.ceil(d/kr),s=a>s?a+1:s+1,i>s&&(i=s,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(s=l.length,i=c.length,s-i<0&&(i=s,r=c,c=l,l=r),n=0;i;)n=(l[--i]=l[i]+c[i]+n)/Vo|0,l[i]%=Vo;for(n&&(l.unshift(n),++o),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=o,Fr?mr(t,d):t}function Hc(e,t,n){if(e!==~~e||en)throw Error(ph+e)}function Oc(e){var t,n,r,o=e.length-1,i="",a=e[0];if(o>0){for(i+=a,t=1;ta?1:-1;else for(s=l=0;so[s]?1:-1;break}return l}function n(r,o,i){for(var a=0;i--;)r[i]-=a,a=r[i]1;)r.shift()}return function(r,o,i,a){var s,l,c,u,d,f,p,m,g,v,w,x,S,P,T,E,O,k,A=r.constructor,I=r.s==o.s?1:-1,R=r.d,N=o.d;if(!r.s)return new A(r);if(!o.s)throw Error(cl+"Division by zero");for(l=r.e-o.e,O=N.length,T=R.length,p=new A(I),m=p.d=[],c=0;N[c]==(R[c]||0);)++c;if(N[c]>(R[c]||0)&&--l,i==null?x=i=A.precision:a?x=i+(xo(r)-xo(o))+1:x=i,x<0)return new A(0);if(x=x/kr+2|0,c=0,O==1)for(u=0,N=N[0],x++;(c1&&(N=e(N,u),R=e(R,u),O=N.length,T=R.length),P=O,g=R.slice(0,O),v=g.length;v=Vo/2&&++E;do u=0,s=t(N,g,O,v),s<0?(w=g[0],O!=v&&(w=w*Vo+(g[1]||0)),u=w/E|0,u>1?(u>=Vo&&(u=Vo-1),d=e(N,u),f=d.length,v=g.length,s=t(d,g,f,v),s==1&&(u--,n(d,O16)throw Error(cB+xo(e));if(!e.s)return new u(qa);for(t==null?(Fr=!1,s=d):s=t,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(Lp(2,c))/Math.LN10*2+5|0,s+=r,n=o=i=new u(qa),u.precision=s;;){if(o=mr(o.times(e),s),n=n.times(++l),a=i.plus(Ru(o,n,s)),Oc(a.d).slice(0,s)===Oc(i.d).slice(0,s)){for(;c--;)i=mr(i.times(i),s);return u.precision=d,t==null?(Fr=!0,mr(i,d)):i}i=a}}function xo(e){for(var t=e.e*kr,n=e.d[0];n>=10;n/=10)t++;return t}function J$(e,t,n){if(t>e.LN10.sd())throw Fr=!0,n&&(e.precision=n),Error(cl+"LN10 precision limit exceeded");return mr(new e(e.LN10),t)}function Ld(e){for(var t="";e--;)t+="0";return t}function vx(e,t){var n,r,o,i,a,s,l,c,u,d=1,f=10,p=e,m=p.d,g=p.constructor,v=g.precision;if(p.s<1)throw Error(cl+(p.s?"NaN":"-Infinity"));if(p.eq(qa))return new g(0);if(t==null?(Fr=!1,c=v):c=t,p.eq(10))return t==null&&(Fr=!0),J$(g,c);if(c+=f,g.precision=c,n=Oc(m),r=n.charAt(0),i=xo(p),Math.abs(i)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=Oc(p.d),r=n.charAt(0),d++;i=xo(p),r>1?(p=new g("0."+n),i++):p=new g(r+"."+n.slice(1))}else return l=J$(g,c+2,v).times(i+""),p=vx(new g(r+"."+n.slice(1)),c-f).plus(l),g.precision=v,t==null?(Fr=!0,mr(p,v)):p;for(s=a=p=Ru(p.minus(qa),p.plus(qa),c),u=mr(p.times(p),c),o=3;;){if(a=mr(a.times(u),c),l=s.plus(Ru(a,new g(o),c)),Oc(l.d).slice(0,c)===Oc(s.d).slice(0,c))return s=s.times(2),i!==0&&(s=s.plus(J$(g,c+2,v).times(i+""))),s=Ru(s,new g(d),c),g.precision=v,t==null?(Fr=!0,mr(s,v)):s;s=l,o+=2}}function tG(e,t){var n,r,o;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(o=t.length;t.charCodeAt(o-1)===48;)--o;if(t=t.slice(r,o),t){if(o-=r,n=n-r-1,e.e=ib(n/kr),e.d=[],r=(n+1)%kr,n<0&&(r+=kr),rxE||e.e<-xE))throw Error(cB+n)}else e.s=0,e.e=0,e.d=[0];return e}function mr(e,t,n){var r,o,i,a,s,l,c,u,d=e.d;for(a=1,i=d[0];i>=10;i/=10)a++;if(r=t-a,r<0)r+=kr,o=t,c=d[u=0];else{if(u=Math.ceil((r+1)/kr),i=d.length,u>=i)return e;for(c=i=d[u],a=1;i>=10;i/=10)a++;r%=kr,o=r-kr+a}if(n!==void 0&&(i=Lp(10,a-o-1),s=c/i%10|0,l=t<0||d[u+1]!==void 0||c%i,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?o>0?c/Lp(10,a-o):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(i=xo(e),d.length=1,t=t-i-1,d[0]=Lp(10,(kr-t%kr)%kr),e.e=ib(-t/kr)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,i=1,u--):(d.length=u+1,i=Lp(10,kr-r),d[u]=o>0?(c/Lp(10,a-o)%Lp(10,o)|0)*i:0),l)for(;;)if(u==0){(d[0]+=i)==Vo&&(d[0]=1,++e.e);break}else{if(d[u]+=i,d[u]!=Vo)break;d[u--]=0,i=1}for(r=d.length;d[--r]===0;)d.pop();if(Fr&&(e.e>xE||e.e<-xE))throw Error(cB+xo(e));return e}function Kne(e,t){var n,r,o,i,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),Fr?mr(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),o=Math.max(Math.ceil(p/kr),s)+2,a>o&&(a=o,n.length=1),n.reverse(),o=a;o--;)n.push(0);n.reverse()}else{for(o=l.length,s=d.length,u=o0;--o)l[s++]=0;for(o=d.length;o>a;){if(l[--o]0?i=i.charAt(0)+"."+i.slice(1)+Ld(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(o<0?"e":"e+")+o):o<0?(i="0."+Ld(-o-1)+i,n&&(r=n-a)>0&&(i+=Ld(r))):o>=a?(i+=Ld(o+1-a),n&&(r=n-o-1)>0&&(i=i+"."+Ld(r))):((r=o+1)0&&(o+1===a&&(i+="."),i+=Ld(r))),e.s<0?"-"+i:i}function nG(e,t){if(e.length>t)return e.length=t,!0}function Yne(e){var t,n,r;function o(i){var a=this;if(!(a instanceof o))return new o(i);if(a.constructor=o,i instanceof o){a.s=i.s,a.e=i.e,a.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(ph+i);if(i>0)a.s=1;else if(i<0)i=-i,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(i===~~i&&i<1e7){a.e=0,a.d=[i];return}return tG(a,i.toString())}else if(typeof i!="string")throw Error(ph+i);if(i.charCodeAt(0)===45?(i=i.slice(1),a.s=-1):a.s=1,gqe.test(i))tG(a,i);else throw Error(ph+i)}if(o.prototype=Et,o.ROUND_UP=0,o.ROUND_DOWN=1,o.ROUND_CEIL=2,o.ROUND_FLOOR=3,o.ROUND_HALF_UP=4,o.ROUND_HALF_DOWN=5,o.ROUND_HALF_EVEN=6,o.ROUND_HALF_CEIL=7,o.ROUND_HALF_FLOOR=8,o.clone=Yne,o.config=o.set=yqe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(ph+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(ph+n+": "+r);return this}var uB=Yne(mqe);qa=new uB(1);const cr=uB;function vqe(e){return Sqe(e)||xqe(e)||wqe(e)||bqe()}function bqe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wqe(e,t){if(e){if(typeof e=="string")return yD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return yD(e,t)}}function xqe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function Sqe(e){if(Array.isArray(e))return yD(e)}function yD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,o):e(t-a,rG(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,i=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(o)throw i}}return n}}function Lqe(e){if(Array.isArray(e))return e}function ere(e){var t=bx(e,2),n=t[0],r=t[1],o=n,i=r;return n>r&&(o=r,i=n),[o,i]}function tre(e,t,n){if(e.lte(0))return new cr(0);var r=xk.getDigitCount(e.toNumber()),o=new cr(10).pow(r),i=e.div(o),a=r!==1?.05:.1,s=new cr(Math.ceil(i.div(a).toNumber())).add(n).mul(a),l=s.mul(o);return t?l:new cr(Math.ceil(l))}function Fqe(e,t,n){var r=1,o=new cr(e);if(!o.isint()&&n){var i=Math.abs(e);i<1?(r=new cr(10).pow(xk.getDigitCount(e)-1),o=new cr(Math.floor(o.div(r).toNumber())).mul(r)):i>1&&(o=new cr(Math.floor(e)))}else e===0?o=new cr(Math.floor((t-1)/2)):n||(o=new cr(Math.floor(e)));var a=Math.floor((t-1)/2),s=Eqe(Tqe(function(l){return o.add(new cr(l-a).mul(r)).toNumber()}),vD);return s(0,t)}function nre(e,t,n,r){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new cr(0),tickMin:new cr(0),tickMax:new cr(0)};var i=tre(new cr(t).sub(e).div(n-1),r,o),a;e<=0&&t>=0?a=new cr(0):(a=new cr(e).add(t).div(2),a=a.sub(new cr(a).mod(i)));var s=Math.ceil(a.sub(e).div(i).toNumber()),l=Math.ceil(new cr(t).sub(a).div(i).toNumber()),c=s+l+1;return c>n?nre(e,t,n,r,o+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:i,tickMin:a.sub(new cr(s).mul(i)),tickMax:a.add(new cr(l).mul(i))})}function jqe(e){var t=bx(e,2),n=t[0],r=t[1],o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(o,2),s=ere([n,r]),l=bx(s,2),c=l[0],u=l[1];if(c===-1/0||u===1/0){var d=u===1/0?[c].concat(wD(vD(0,o-1).map(function(){return 1/0}))):[].concat(wD(vD(0,o-1).map(function(){return-1/0})),[u]);return n>r?bD(d):d}if(c===u)return Fqe(c,o,i);var f=nre(c,u,a,i),p=f.step,m=f.tickMin,g=f.tickMax,v=xk.rangeStep(m,g.add(new cr(.1).mul(p)),p);return n>r?bD(v):v}function Bqe(e,t){var n=bx(e,2),r=n[0],o=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=ere([r,o]),s=bx(a,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,o];if(l===c)return[l];var u=Math.max(t,2),d=tre(new cr(c).sub(l).div(u-1),i,0),f=[].concat(wD(xk.rangeStep(new cr(l),new cr(c).sub(new cr(.99).mul(d)),d)),[c]);return r>o?bD(f):f}var zqe=Jne(jqe),Vqe=Jne(Bqe),Hqe="Invariant failed";function Rh(e,t){throw new Error(Hqe)}var Uqe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function tv(e){"@babel/helpers - typeof";return tv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tv(e)}function SE(){return SE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qqe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Jqe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zqe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var l=i.range,c=0;c0?o[c-1].coordinate:o[s-1].coordinate,d=o[c].coordinate,f=c>=s-1?o[0].coordinate:o[c+1].coordinate,p=void 0;if(zi(d-u)!==zi(f-d)){var m=[];if(zi(f-d)===zi(l[1]-l[0])){p=f;var g=d+l[1]-l[0];m[0]=Math.min(g,(g+u)/2),m[1]=Math.max(g,(g+u)/2)}else{p=u;var v=f+l[1]-l[0];m[0]=Math.min(d,(v+d)/2),m[1]=Math.max(d,(v+d)/2)}var w=[Math.min(d,(p+d)/2),Math.max(d,(p+d)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=o[c].index;break}}else{var x=Math.min(u,f),S=Math.max(u,f);if(t>(x+d)/2&&t<=(S+d)/2){a=o[c].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){a=r[P].index;break}return a},dB=function(t){var n,r=t,o=r.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?no(no({},t.type.defaultProps),t.props):t.props,a=i.stroke,s=i.fill,l;switch(o){case"Line":l=a;break;case"Area":case"Radar":l=a&&a!=="none"?a:s;break;default:l=s;break}return l},gKe=function(t){var n=t.barSize,r=t.totalSize,o=t.stackGroups,i=o===void 0?{}:o;if(!i)return{};for(var a={},s=Object.keys(i),l=0,c=s.length;l=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?no(no({},x),w[0].props):w[0].props,P=S.barSize,T=S[v];a[T]||(a[T]=[]);var E=jt(P)?n:P;a[T].push({item:w[0],stackList:w.slice(1),barSize:jt(E)?void 0:Vi(E,r,0)})}}return a},yKe=function(t){var n=t.barGap,r=t.barCategoryGap,o=t.bandSize,i=t.sizeList,a=i===void 0?[]:i,s=t.maxBarSize,l=a.length;if(l<1)return null;var c=Vi(n,o,0,!0),u,d=[];if(a[0].barSize===+a[0].barSize){var f=!1,p=o/l,m=a.reduce(function(P,T){return P+T.barSize||0},0);m+=(l-1)*c,m>=o&&(m-=(l-1)*c,c=0),m>=o&&p>0&&(f=!0,p*=.9,m=l*p);var g=(o-m)/2>>0,v={offset:g-c,size:0};u=a.reduce(function(P,T){var E={item:T.item,position:{offset:v.offset+v.size+c,size:f?p:T.barSize}},O=[].concat(aG(P),[E]);return v=O[O.length-1].position,T.stackList&&T.stackList.length&&T.stackList.forEach(function(k){O.push({item:k,position:v})}),O},d)}else{var w=Vi(r,o,0,!0);o-2*w-(l-1)*c<=0&&(c=0);var x=(o-2*w-(l-1)*c)/l;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;u=a.reduce(function(P,T,E){var O=[].concat(aG(P),[{item:T.item,position:{offset:w+(x+c)*E+(x-S)/2,size:S}}]);return T.stackList&&T.stackList.length&&T.stackList.forEach(function(k){O.push({item:k,position:O[O.length-1].position})}),O},d)}return u},vKe=function(t,n,r,o){var i=r.children,a=r.width,s=r.margin,l=a-(s.left||0)-(s.right||0),c=are({children:i,legendWidth:l});if(c){var u=o||{},d=u.width,f=u.height,p=c.align,m=c.verticalAlign,g=c.layout;if((g==="vertical"||g==="horizontal"&&m==="middle")&&p!=="center"&&st(t[p]))return no(no({},t),{},ay({},p,t[p]+(d||0)));if((g==="horizontal"||g==="vertical"&&p==="center")&&m!=="middle"&&st(t[m]))return no(no({},t),{},ay({},m,t[m]+(f||0)))}return t},bKe=function(t,n,r){return jt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},sre=function(t,n,r,o,i){var a=n.props.children,s=qi(a,ab).filter(function(c){return bKe(o,i,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,u){var d=Mr(u,r);if(jt(d))return c;var f=Array.isArray(d)?[bk(d),af(d)]:[d,d],p=l.reduce(function(m,g){var v=Mr(u,g,0),w=f[0]-Math.abs(Array.isArray(v)?v[0]:v),x=f[1]+Math.abs(Array.isArray(v)?v[1]:v);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},wKe=function(t,n,r,o,i){var a=n.map(function(s){return sre(t,s,r,i,o)}).filter(function(s){return!jt(s)});return a&&a.length?a.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},lre=function(t,n,r,o,i){var a=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&sre(t,l,c,o)||vw(t,c,r,i)});if(r==="number")return a.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return a.reduce(function(l,c){for(var u=0,d=c.length;u=2?zi(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var u=(t.ticks||t.niceTicks).map(function(d){var f=i?i.indexOf(d):d;return{coordinate:o(f)+c,value:d,offset:c}});return u.filter(function(d){return!Jv(d.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(d,f){return{coordinate:o(d)+c,value:d,index:f,offset:c}}):o.ticks&&!r?o.ticks(t.tickCount).map(function(d){return{coordinate:o(d)+c,value:d,offset:c}}):o.domain().map(function(d,f){return{coordinate:o(d)+c,value:i?i[d]:d,index:f,offset:c}})},Z$=new WeakMap,KC=function(t,n){if(typeof n!="function")return t;Z$.has(t)||Z$.set(t,new WeakMap);var r=Z$.get(t);if(r.has(n))return r.get(n);var o=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,o),o},dre=function(t,n,r){var o=t.scale,i=t.type,a=t.layout,s=t.axisType;if(o==="auto")return a==="radial"&&s==="radiusAxis"?{scale:px(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:yE(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:yw(),realScaleType:"point"}:i==="category"?{scale:px(),realScaleType:"band"}:{scale:yE(),realScaleType:"linear"};if(jS(o)){var l="scale".concat(rk(o));return{scale:(eG[l]||yw)(),realScaleType:eG[l]?l:"point"}}return Ht(o)?{scale:o}:{scale:yw(),realScaleType:"point"}},lG=1e-4,fre=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,o=t.range(),i=Math.min(o[0],o[1])-lG,a=Math.max(o[0],o[1])+lG,s=t(n[0]),l=t(n[r-1]);(sa||la)&&t.domain([n[0],n[r-1]])}},xKe=function(t,n){if(!t)return null;for(var r=0,o=t.length;ro)&&(i[1]=o),i[0]>o&&(i[0]=o),i[1]=0?(t[s][r][0]=i,t[s][r][1]=i+l,i=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1])}},PKe=function(t){var n=t.length;if(!(n<=0))for(var r=0,o=t[0].length;r=0?(t[a][r][0]=i,t[a][r][1]=i+s,i=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},TKe={sign:CKe,expand:Uze,none:qy,silhouette:Wze,wiggle:Gze,positive:PKe},EKe=function(t,n,r){var o=n.map(function(s){return s.props.dataKey}),i=TKe[r],a=Hze().keys(o).value(function(s,l){return+Mr(s,l,0)}).order(K_).offset(i);return a(t)},OKe=function(t,n,r,o,i,a){if(!t)return null;var s=a?n.reverse():n,l={},c=s.reduce(function(d,f){var p,m=(p=f.type)!==null&&p!==void 0&&p.defaultProps?no(no({},f.type.defaultProps),f.props):f.props,g=m.stackId,v=m.hide;if(v)return d;var w=m[r],x=d[w]||{hasStack:!1,stackGroups:{}};if(Ro(g)){var S=x.stackGroups[g]||{numericAxisId:r,cateAxisId:o,items:[]};S.items.push(f),x.hasStack=!0,x.stackGroups[g]=S}else x.stackGroups[Yf("_stackId_")]={numericAxisId:r,cateAxisId:o,items:[f]};return no(no({},d),{},ay({},w,x))},l),u={};return Object.keys(c).reduce(function(d,f){var p=c[f];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(g,v){var w=p.stackGroups[v];return no(no({},g),{},ay({},v,{numericAxisId:r,cateAxisId:o,items:w.items,stackedData:EKe(t,w.items,i)}))},m)}return no(no({},d),{},ay({},f,p))},u)},pre=function(t,n){var r=n.realScaleType,o=n.type,i=n.tickCount,a=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(i&&o==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var c=t.domain();if(!c.length)return null;var u=zqe(c,i,s);return t.domain([bk(u),af(u)]),{niceTicks:u}}if(i&&o==="number"){var d=t.domain(),f=Vqe(d,i,s);return{niceTicks:f}}return null};function nv(e){var t=e.axis,n=e.ticks,r=e.bandSize,o=e.entry,i=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!jt(o[t.dataKey])){var s=XT(n,"value",o[t.dataKey]);if(s)return s.coordinate+r/2}return n[i]?n[i].coordinate+r/2:null}var l=Mr(o,jt(a)?t.dataKey:a);return jt(l)?null:t.scale(l)}var cG=function(t){var n=t.axis,r=t.ticks,o=t.offset,i=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+o:null;var l=Mr(a,n.dataKey,n.domain[s]);return jt(l)?null:n.scale(l)-i/2+o},IKe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var o=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return o<=0&&i>=0?0:i<0?i:o}return r[0]},kKe=function(t,n){var r,o=(r=t.type)!==null&&r!==void 0&&r.defaultProps?no(no({},t.type.defaultProps),t.props):t.props,i=o.stackId;if(Ro(i)){var a=n[i];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},MKe=function(t){return t.reduce(function(n,r){return[bk(r.concat([n[0]]).filter(st)),af(r.concat([n[1]]).filter(st))]},[1/0,-1/0])},hre=function(t,n,r){return Object.keys(t).reduce(function(o,i){var a=t[i],s=a.stackedData,l=s.reduce(function(c,u){var d=MKe(u.slice(n,r+1));return[Math.min(c[0],d[0]),Math.max(c[1],d[1])]},[1/0,-1/0]);return[Math.min(l[0],o[0]),Math.max(l[1],o[1])]},[1/0,-1/0]).map(function(o){return o===1/0||o===-1/0?0:o})},uG=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,dG=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,PD=function(t,n,r){if(Ht(t))return t(n,r);if(!Array.isArray(t))return n;var o=[];if(st(t[0]))o[0]=r?t[0]:Math.min(t[0],n[0]);else if(uG.test(t[0])){var i=+uG.exec(t[0])[1];o[0]=n[0]-i}else Ht(t[0])?o[0]=t[0](n[0]):o[0]=n[0];if(st(t[1]))o[1]=r?t[1]:Math.max(t[1],n[1]);else if(dG.test(t[1])){var a=+dG.exec(t[1])[1];o[1]=n[1]+a}else Ht(t[1])?o[1]=t[1](n[1]):o[1]=n[1];return o},PE=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var o=t.scale.bandwidth();if(!r||o>0)return o}if(t&&n&&n.length>=2){for(var i=jj(n,function(d){return d.coordinate}),a=1/0,s=1,l=i.length;se.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},jKe=function(t,n,r,o,i){var a=t.width,s=t.height,l=t.startAngle,c=t.endAngle,u=Vi(t.cx,a,a/2),d=Vi(t.cy,s,s/2),f=yre(a,s,r),p=Vi(t.innerRadius,f,0),m=Vi(t.outerRadius,f,f*.8),g=Object.keys(n);return g.reduce(function(v,w){var x=n[w],S=x.domain,P=x.reversed,T;if(jt(x.range))o==="angleAxis"?T=[l,c]:o==="radiusAxis"&&(T=[p,m]),P&&(T=[T[1],T[0]]);else{T=x.range;var E=T,O=RKe(E,2);l=O[0],c=O[1]}var k=dre(x,i),A=k.realScaleType,I=k.scale;I.domain(S).range(T),fre(I);var R=pre(I,vu(vu({},x),{},{realScaleType:A})),N=vu(vu(vu({},x),R),{},{range:T,radius:m,realScaleType:A,scale:I,cx:u,cy:d,innerRadius:p,outerRadius:m,startAngle:l,endAngle:c});return vu(vu({},v),{},gre({},w,N))},{})},BKe=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return Math.sqrt(Math.pow(r-i,2)+Math.pow(o-a,2))},zKe=function(t,n){var r=t.x,o=t.y,i=n.cx,a=n.cy,s=BKe({x:r,y:o},{x:i,y:a});if(s<=0)return{radius:s};var l=(r-i)/s,c=Math.acos(l);return o>a&&(c=2*Math.PI-c),{radius:s,angle:FKe(c),angleInRadian:c}},VKe=function(t){var n=t.startAngle,r=t.endAngle,o=Math.floor(n/360),i=Math.floor(r/360),a=Math.min(o,i);return{startAngle:n-a*360,endAngle:r-a*360}},HKe=function(t,n){var r=n.startAngle,o=n.endAngle,i=Math.floor(r/360),a=Math.floor(o/360),s=Math.min(i,a);return t+s*360},mG=function(t,n){var r=t.x,o=t.y,i=zKe({x:r,y:o},n),a=i.radius,s=i.angle,l=n.innerRadius,c=n.outerRadius;if(ac)return!1;if(a===0)return!0;var u=VKe(n),d=u.startAngle,f=u.endAngle,p=s,m;if(d<=f){for(;p>f;)p-=360;for(;p=d&&p<=f}else{for(;p>d;)p-=360;for(;p=f&&p<=d}return m?vu(vu({},n),{},{radius:a,angle:HKe(p,n)}):null},vre=function(t){return!y.isValidElement(t)&&!Ht(t)&&typeof t!="boolean"?t.className:""};function Cx(e){"@babel/helpers - typeof";return Cx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cx(e)}var UKe=["offset"];function WKe(e){return YKe(e)||KKe(e)||qKe(e)||GKe()}function GKe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qKe(e,t){if(e){if(typeof e=="string")return TD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TD(e,t)}}function KKe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function YKe(e){if(Array.isArray(e))return TD(e)}function TD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function QKe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function gG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ko(e){for(var t=1;t=0?1:-1,S,P;o==="insideStart"?(S=p+x*a,P=g):o==="insideEnd"?(S=m-x*a,P=!g):o==="end"&&(S=m+x*a,P=g),P=w<=0?P:!P;var T=Sr(c,u,v,S),E=Sr(c,u,v,S+(P?1:-1)*359),O="M".concat(T.x,",").concat(T.y,` A`).concat(v,",").concat(v,",0,1,").concat(P?0:1,`, - `).concat(E.x,",").concat(E.y),k=Vt(t.id)?Vh("recharts-radial-line-"):t.id;return J.createElement("text",mx({},r,{dominantBaseline:"central",className:fe("recharts-radial-bar-label",s)}),J.createElement("defs",null,J.createElement("path",{id:k,d:O})),J.createElement("textPath",{xlinkHref:"#".concat(k)},n))},HKe=function(t){var n=t.viewBox,r=t.offset,o=t.position,i=n,a=i.cx,s=i.cy,l=i.innerRadius,c=i.outerRadius,u=i.startAngle,d=i.endAngle,f=(u+d)/2;if(o==="outside"){var h=Sr(a,s,c+r,f),m=h.x,g=h.y;return{x:m,y:g,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,w=Sr(a,s,v,f),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},UKe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*o,h=d>0?"end":"start",m=d>0?"start":"end",g=c>=0?1:-1,v=g*o,w=g>0?"end":"start",x=g>0?"start":"end";if(i==="top"){var S={x:s+c/2,y:l-d*o,textAnchor:"middle",verticalAnchor:h};return Oo(Oo({},S),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var P={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:m};return Oo(Oo({},P),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var T={x:s-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return Oo(Oo({},T),r?{width:Math.max(T.x-r.x,0),height:u}:{})}if(i==="right"){var E={x:s+c+v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return Oo(Oo({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:u}:{})}var O=r?{width:c,height:u}:{};return i==="insideLeft"?Oo({x:s+v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},O):i==="insideRight"?Oo({x:s+c-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},O):i==="insideTop"?Oo({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:m},O):i==="insideBottom"?Oo({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:h},O):i==="insideTopLeft"?Oo({x:s+v,y:l+f,textAnchor:x,verticalAnchor:m},O):i==="insideTopRight"?Oo({x:s+c-v,y:l+f,textAnchor:w,verticalAnchor:m},O):i==="insideBottomLeft"?Oo({x:s+v,y:l+u-f,textAnchor:x,verticalAnchor:h},O):i==="insideBottomRight"?Oo({x:s+c-v,y:l+u-f,textAnchor:w,verticalAnchor:h},O):Lv(i)&&(lt(i.x)||jp(i.x))&&(lt(i.y)||jp(i.y))?Oo({x:s+Vi(i.x,c),y:l+Vi(i.y,u),textAnchor:"end",verticalAnchor:"end"},O):Oo({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},O)},WKe=function(t){return"cx"in t&<(t.cx)};function Uo(e){var t=e.offset,n=t===void 0?5:t,r=DKe(e,kKe),o=Oo({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=u===void 0?"":u,f=o.textBreakAll;if(!i||Vt(s)&&Vt(l)&&!y.isValidElement(c)&&!Gt(c))return null;if(y.isValidElement(c))return y.cloneElement(c,o);var h;if(Gt(c)){if(h=y.createElement(c,o),y.isValidElement(h))return h}else h=BKe(o);var m=WKe(i),g=_t(o,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return VKe(o,h,g);var v=m?HKe(o):UKe(o);return J.createElement(Sh,mx({className:fe("recharts-label",d)},g,v,{breakAll:f}),h)}Uo.displayName="Label";var sre=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,h=t.top,m=t.left,g=t.width,v=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(lt(g)&<(v)){if(lt(d)&<(f))return{x:d,y:f,width:g,height:v};if(lt(h)&<(m))return{x:h,y:m,width:g,height:v}}return lt(d)&<(f)?{x:d,y:f,width:0,height:0}:lt(n)&<(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},GKe=function(t,n){return t?t===!0?J.createElement(Uo,{key:"label-implicit",viewBox:n}):Ao(t)?J.createElement(Uo,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===Uo?y.cloneElement(t,{key:"label-implicit",viewBox:n}):J.createElement(Uo,{key:"label-implicit",content:t,viewBox:n}):Gt(t)?J.createElement(Uo,{key:"label-implicit",content:t,viewBox:n}):Lv(t)?J.createElement(Uo,mx({viewBox:n},t,{key:"label-implicit"})):null:null},qKe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=sre(t),a=qi(o,Uo).map(function(l,c){return y.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=GKe(t.label,n||i);return[s].concat(MKe(a))};Uo.parseViewBox=sre;Uo.renderCallByParent=qKe;function KKe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var YKe=KKe;const XKe=Rn(YKe);function gx(e){"@babel/helpers - typeof";return gx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gx(e)}var QKe=["valueAccessor"],JKe=["data","dataKey","clockWise","id","textBreakAll"];function ZKe(e){return rYe(e)||nYe(e)||tYe(e)||eYe()}function eYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tYe(e,t){if(e){if(typeof e=="string")return gD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gD(e,t)}}function nYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rYe(e){if(Array.isArray(e))return gD(e)}function gD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var lYe=function(t){return Array.isArray(t.value)?XKe(t.value):t.value};function Ac(e){var t=e.valueAccessor,n=t===void 0?lYe:t,r=uG(e,QKe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=uG(r,JKe);return!o||!o.length?null:J.createElement(Pn,{className:"recharts-label-list"},o.map(function(u,d){var f=Vt(i)?n(u,d):Hr(u&&u.payload,i),h=Vt(s)?{}:{id:"".concat(s,"-").concat(d)};return J.createElement(Uo,mE({},_t(u,!0),c,h,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Uo.parseViewBox(Vt(a)?u:cG(cG({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Ac.displayName="LabelList";function cYe(e,t){return e?e===!0?J.createElement(Ac,{key:"labelList-implicit",data:t}):J.isValidElement(e)||Gt(e)?J.createElement(Ac,{key:"labelList-implicit",data:t,content:e}):Lv(e)?J.createElement(Ac,mE({data:t},e,{key:"labelList-implicit"})):null:null}function uYe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=qi(r,Ac).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=cYe(e.label,t);return[i].concat(ZKe(o))}Ac.renderCallByParent=uYe;function yx(e){"@babel/helpers - typeof";return yx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yx(e)}function yD(){return yD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=a?"start":"end",verticalAnchor:"middle"}}if(o==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(o==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(o==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var v=(l+c)/2,w=Sr(a,s,v,f),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},iYe=function(t){var n=t.viewBox,r=t.parentViewBox,o=t.offset,i=t.position,a=n,s=a.x,l=a.y,c=a.width,u=a.height,d=u>=0?1:-1,f=d*o,p=d>0?"end":"start",m=d>0?"start":"end",g=c>=0?1:-1,v=g*o,w=g>0?"end":"start",x=g>0?"start":"end";if(i==="top"){var S={x:s+c/2,y:l-d*o,textAnchor:"middle",verticalAnchor:p};return ko(ko({},S),r?{height:Math.max(l-r.y,0),width:c}:{})}if(i==="bottom"){var P={x:s+c/2,y:l+u+f,textAnchor:"middle",verticalAnchor:m};return ko(ko({},P),r?{height:Math.max(r.y+r.height-(l+u),0),width:c}:{})}if(i==="left"){var T={x:s-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"};return ko(ko({},T),r?{width:Math.max(T.x-r.x,0),height:u}:{})}if(i==="right"){var E={x:s+c+v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"};return ko(ko({},E),r?{width:Math.max(r.x+r.width-E.x,0),height:u}:{})}var O=r?{width:c,height:u}:{};return i==="insideLeft"?ko({x:s+v,y:l+u/2,textAnchor:x,verticalAnchor:"middle"},O):i==="insideRight"?ko({x:s+c-v,y:l+u/2,textAnchor:w,verticalAnchor:"middle"},O):i==="insideTop"?ko({x:s+c/2,y:l+f,textAnchor:"middle",verticalAnchor:m},O):i==="insideBottom"?ko({x:s+c/2,y:l+u-f,textAnchor:"middle",verticalAnchor:p},O):i==="insideTopLeft"?ko({x:s+v,y:l+f,textAnchor:x,verticalAnchor:m},O):i==="insideTopRight"?ko({x:s+c-v,y:l+f,textAnchor:w,verticalAnchor:m},O):i==="insideBottomLeft"?ko({x:s+v,y:l+u-f,textAnchor:x,verticalAnchor:p},O):i==="insideBottomRight"?ko({x:s+c-v,y:l+u-f,textAnchor:w,verticalAnchor:p},O):Kv(i)&&(st(i.x)||qp(i.x))&&(st(i.y)||qp(i.y))?ko({x:s+Vi(i.x,c),y:l+Vi(i.y,u),textAnchor:"end",verticalAnchor:"end"},O):ko({x:s+c/2,y:l+u/2,textAnchor:"middle",verticalAnchor:"middle"},O)},aYe=function(t){return"cx"in t&&st(t.cx)};function Wo(e){var t=e.offset,n=t===void 0?5:t,r=XKe(e,UKe),o=ko({offset:n},r),i=o.viewBox,a=o.position,s=o.value,l=o.children,c=o.content,u=o.className,d=u===void 0?"":u,f=o.textBreakAll;if(!i||jt(s)&&jt(l)&&!y.isValidElement(c)&&!Ht(c))return null;if(y.isValidElement(c))return y.cloneElement(c,o);var p;if(Ht(c)){if(p=y.createElement(c,o),y.isValidElement(p))return p}else p=tYe(o);var m=aYe(i),g=$t(o,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return rYe(o,p,g);var v=m?oYe(o):iYe(o);return Y.createElement(Ah,Px({className:de("recharts-label",d)},g,v,{breakAll:f}),p)}Wo.displayName="Label";var bre=function(t){var n=t.cx,r=t.cy,o=t.angle,i=t.startAngle,a=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,u=t.outerRadius,d=t.x,f=t.y,p=t.top,m=t.left,g=t.width,v=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(st(g)&&st(v)){if(st(d)&&st(f))return{x:d,y:f,width:g,height:v};if(st(p)&&st(m))return{x:p,y:m,width:g,height:v}}return st(d)&&st(f)?{x:d,y:f,width:0,height:0}:st(n)&&st(r)?{cx:n,cy:r,startAngle:i||o||0,endAngle:a||o||0,innerRadius:c||0,outerRadius:u||l||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},sYe=function(t,n){return t?t===!0?Y.createElement(Wo,{key:"label-implicit",viewBox:n}):Ro(t)?Y.createElement(Wo,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===Wo?y.cloneElement(t,{key:"label-implicit",viewBox:n}):Y.createElement(Wo,{key:"label-implicit",content:t,viewBox:n}):Ht(t)?Y.createElement(Wo,{key:"label-implicit",content:t,viewBox:n}):Kv(t)?Y.createElement(Wo,Px({viewBox:n},t,{key:"label-implicit"})):null:null},lYe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var o=t.children,i=bre(t),a=qi(o,Wo).map(function(l,c){return y.cloneElement(l,{viewBox:n||i,key:"label-".concat(c)})});if(!r)return a;var s=sYe(t.label,n||i);return[s].concat(WKe(a))};Wo.parseViewBox=bre;Wo.renderCallByParent=lYe;function cYe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var uYe=cYe;const dYe=_n(uYe);function Tx(e){"@babel/helpers - typeof";return Tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tx(e)}var fYe=["valueAccessor"],pYe=["data","dataKey","clockWise","id","textBreakAll"];function hYe(e){return vYe(e)||yYe(e)||gYe(e)||mYe()}function mYe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gYe(e,t){if(e){if(typeof e=="string")return ED(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ED(e,t)}}function yYe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vYe(e){if(Array.isArray(e))return ED(e)}function ED(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function SYe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var CYe=function(t){return Array.isArray(t.value)?dYe(t.value):t.value};function Jl(e){var t=e.valueAccessor,n=t===void 0?CYe:t,r=bG(e,fYe),o=r.data,i=r.dataKey,a=r.clockWise,s=r.id,l=r.textBreakAll,c=bG(r,pYe);return!o||!o.length?null:Y.createElement(on,{className:"recharts-label-list"},o.map(function(u,d){var f=jt(i)?n(u,d):Mr(u&&u.payload,i),p=jt(s)?{}:{id:"".concat(s,"-").concat(d)};return Y.createElement(Wo,EE({},$t(u,!0),c,p,{parentViewBox:u.parentViewBox,value:f,textBreakAll:l,viewBox:Wo.parseViewBox(jt(a)?u:vG(vG({},u),{},{clockWise:a})),key:"label-".concat(d),index:d}))}))}Jl.displayName="LabelList";function PYe(e,t){return e?e===!0?Y.createElement(Jl,{key:"labelList-implicit",data:t}):Y.isValidElement(e)||Ht(e)?Y.createElement(Jl,{key:"labelList-implicit",data:t,content:e}):Kv(e)?Y.createElement(Jl,EE({data:t},e,{key:"labelList-implicit"})):null:null}function TYe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,o=qi(r,Jl).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return o;var i=PYe(e.label,t);return[i].concat(hYe(o))}Jl.renderCallByParent=TYe;function Ex(e){"@babel/helpers - typeof";return Ex=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ex(e)}function OD(){return OD=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>c),`, `).concat(d.x,",").concat(d.y,` - `);if(o>0){var h=Sr(n,r,o,a),m=Sr(n,r,o,c);f+="L ".concat(m.x,",").concat(m.y,` + `);if(o>0){var p=Sr(n,r,o,a),m=Sr(n,r,o,c);f+="L ".concat(m.x,",").concat(m.y,` A `).concat(o,",").concat(o,`,0, `).concat(+(Math.abs(l)>180),",").concat(+(a<=c),`, - `).concat(h.x,",").concat(h.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},mYe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=zi(u-c),f=jC({cx:n,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),h=f.circleTangency,m=f.lineTangency,g=f.theta,v=jC({cx:n,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),w=v.circleTangency,x=v.lineTangency,S=v.theta,P=l?Math.abs(c-u):Math.abs(c-u)-g-S;if(P<0)return s?"M ".concat(m.x,",").concat(m.y,` + `).concat(p.x,",").concat(p.y," Z")}else f+="L ".concat(n,",").concat(r," Z");return f},MYe=function(t){var n=t.cx,r=t.cy,o=t.innerRadius,i=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,u=t.endAngle,d=zi(u-c),f=YC({cx:n,cy:r,radius:i,angle:c,sign:d,cornerRadius:a,cornerIsExternal:l}),p=f.circleTangency,m=f.lineTangency,g=f.theta,v=YC({cx:n,cy:r,radius:i,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:l}),w=v.circleTangency,x=v.lineTangency,S=v.theta,P=l?Math.abs(c-u):Math.abs(c-u)-g-S;if(P<0)return s?"M ".concat(m.x,",").concat(m.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 - `):lre({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var T="M ".concat(m.x,",").concat(m.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(h.x,",").concat(h.y,` + `):wre({cx:n,cy:r,innerRadius:o,outerRadius:i,startAngle:c,endAngle:u});var T="M ".concat(m.x,",").concat(m.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(p.x,",").concat(p.y,` A`).concat(i,",").concat(i,",0,").concat(+(P>180),",").concat(+(d<0),",").concat(w.x,",").concat(w.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(x.x,",").concat(x.y,` - `);if(o>0){var E=jC({cx:n,cy:r,radius:o,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),O=E.circleTangency,k=E.lineTangency,A=E.theta,I=jC({cx:n,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),R=I.circleTangency,N=I.lineTangency,L=I.theta,B=l?Math.abs(c-u):Math.abs(c-u)-A-L;if(B<0&&a===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(N.x,",").concat(N.y,` + `);if(o>0){var E=YC({cx:n,cy:r,radius:o,angle:c,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),O=E.circleTangency,k=E.lineTangency,A=E.theta,I=YC({cx:n,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:l}),R=I.circleTangency,N=I.lineTangency,L=I.theta,j=l?Math.abs(c-u):Math.abs(c-u)-A-L;if(j<0&&a===0)return"".concat(T,"L").concat(n,",").concat(r,"Z");T+="L".concat(N.x,",").concat(N.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(R.x,",").concat(R.y,` - A`).concat(o,",").concat(o,",0,").concat(+(B>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},gYe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},cre=function(t){var n=fG(fG({},gYe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,f=n.className;if(a0&&Math.abs(u-d)<360?v=mYe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):v=lre({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),J.createElement("path",yD({},_t(n,!0),{className:h,d:v,role:"img"}))};function vx(e){"@babel/helpers - typeof";return vx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vx(e)}function vD(){return vD=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function EYe(e,t){return Xv(e.getTime(),t.getTime())}function wG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.entries(),i=0,a,s;(a=o.next())&&!a.done;){for(var l=t.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var d=a.value,f=d[0],h=d[1],m=s.value,g=m[0],v=m[1];!c&&!r[u]&&(c=n.equals(f,g,i,u,e,t,n)&&n.equals(h,v,f,g,e,t,n))&&(r[u]=!0),u++}if(!c)return!1;i++}return!0}function OYe(e,t,n){var r=bG(e),o=r.length;if(bG(t).length!==o)return!1;for(var i;o-- >0;)if(i=r[o],i===dre&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!ure(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function u0(e,t,n){var r=yG(e),o=r.length;if(yG(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],i===dre&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!ure(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(a=vG(e,i),s=vG(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function IYe(e,t){return Xv(e.valueOf(),t.valueOf())}function kYe(e,t){return e.source===t.source&&e.flags===t.flags}function xG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(i.value,a.value,i.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function MYe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var AYe="[object Arguments]",$Ye="[object Boolean]",RYe="[object Date]",_Ye="[object Map]",DYe="[object Number]",NYe="[object Object]",LYe="[object RegExp]",FYe="[object Set]",jYe="[object String]",BYe=Array.isArray,SG=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,CG=Object.assign,zYe=Object.prototype.toString.call.bind(Object.prototype.toString);function VYe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,d,f){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var h=u.constructor;if(h!==d.constructor)return!1;if(h===Object)return o(u,d,f);if(BYe(u))return t(u,d,f);if(SG!=null&&SG(u))return l(u,d,f);if(h===Date)return n(u,d,f);if(h===RegExp)return a(u,d,f);if(h===Map)return r(u,d,f);if(h===Set)return s(u,d,f);var m=zYe(u);return m===RYe?n(u,d,f):m===LYe?a(u,d,f):m===_Ye?r(u,d,f):m===FYe?s(u,d,f):m===NYe?typeof u.then!="function"&&typeof d.then!="function"&&o(u,d,f):m===AYe?o(u,d,f):m===$Ye||m===DYe||m===jYe?i(u,d,f):!1}}function HYe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?u0:TYe,areDatesEqual:EYe,areMapsEqual:r?gG(wG,u0):wG,areObjectsEqual:r?u0:OYe,arePrimitiveWrappersEqual:IYe,areRegExpsEqual:kYe,areSetsEqual:r?gG(xG,u0):xG,areTypedArraysEqual:r?u0:MYe};if(n&&(o=CG({},o,n(o))),t){var i=zC(o.areArraysEqual),a=zC(o.areMapsEqual),s=zC(o.areObjectsEqual),l=zC(o.areSetsEqual);o=CG({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function UYe(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function WYe(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,h=u.meta;return n(l,c,{cache:f,equals:o,meta:h,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var GYe=Gf();Gf({strict:!0});Gf({circular:!0});Gf({circular:!0,strict:!0});Gf({createInternalComparator:function(){return Xv}});Gf({strict:!0,createInternalComparator:function(){return Xv}});Gf({circular:!0,createInternalComparator:function(){return Xv}});Gf({circular:!0,createInternalComparator:function(){return Xv},strict:!0});function Gf(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=HYe(e),l=VYe(s),c=r?r(l):UYe(l);return WYe({circular:n,comparator:l,createState:o,equals:c,strict:a})}function qYe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function PG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):qYe(o)};requestAnimationFrame(r)}function bD(e){"@babel/helpers - typeof";return bD=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bD(e)}function KYe(e){return JYe(e)||QYe(e)||XYe(e)||YYe()}function YYe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XYe(e,t){if(e){if(typeof e=="string")return TG(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return TG(e,t)}}function TG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},g=function(w){for(var x=w>1?1:w,S=x,P=0;P<8;++P){var T=d(S)-x,E=h(S);if(Math.abs(T-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var h=-(u-d)*r,m=f*i,g=f+(h-m)*s/1e3,v=f*s/1e3+u;return Math.abs(v-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kXe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function U$(e){return RXe(e)||$Xe(e)||AXe(e)||MXe()}function MXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function AXe(e,t){if(e){if(typeof e=="string")return PD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return PD(e,t)}}function $Xe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function RXe(e){if(Array.isArray(e))return PD(e)}function PD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vE(e){return vE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vE(e)}var rc=function(e){FXe(n,e);var t=jXe(n);function n(r,o){var i;_Xe(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,h=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(OD(i)),i.changeStyle=i.changeStyle.bind(OD(i)),!s||h<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:u}),ED(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof f=="function")return i.state={style:c},ED(i);i.state={style:l?D0({},l,c):c}}else i.state={style:{}};return i}return NXe(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,d=i.from,f=this.state.style;if(s){if(!a){var h={style:l?D0({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(h);return}if(!(GYe(o.to,u)&&o.canBegin&&o.isActive)){var m=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||c?d:o.to;if(this.state&&f){var v={style:l?D0({},l,g):g};(l&&f[l]!==g||!l&&f!==g)&&this.setState(v)}this.runAnimation(Pl(Pl({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,d=o.onAnimationEnd,f=o.onAnimationStart,h=EXe(a,s,mXe(c),l,this.changeStyle),m=function(){i.stopJSAnimation=h()};this.manager.start([f,u,m,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,h=function(g,v,w){if(w===0)return g;var x=v.duration,S=v.easing,P=S===void 0?"ease":S,T=v.style,E=v.properties,O=v.onAnimationEnd,k=w>0?a[w-1]:v,A=E||Object.keys(T);if(typeof P=="function"||P==="spring")return[].concat(U$(g),[i.runJSAnimation.bind(i,{from:k.style,to:T,duration:x,easing:P}),x]);var I=IG(A,x,P),R=Pl(Pl(Pl({},k.style),T),{},{transition:I});return[].concat(U$(g),[R,x,O]).filter(rXe)};return this.manager.start([l].concat(U$(a.reduce(h,[u,Math.max(f,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=ZYe());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,d=o.onAnimationEnd,f=o.steps,h=o.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof h=="function"||c==="spring"){this.runJSAnimation(o);return}if(f.length>1){this.runStepAnimation(o);return}var g=s?D0({},s,l):l,v=IG(Object.keys(g),a,c);m.start([u,i,Pl(Pl({},g),{},{transition:v}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=IXe(o,OXe),c=y.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var d=function(h){var m=h.props,g=m.style,v=g===void 0?{}:g,w=m.className,x=y.cloneElement(h,Pl(Pl({},l),{},{style:Pl(Pl({},v),u),className:w}));return x};return c===1?d(y.Children.only(i)):J.createElement("div",null,y.Children.map(i,function(f){return d(f)}))}}]),n}(y.PureComponent);rc.displayName="Animate";rc.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};rc.propTypes={from:j.oneOfType([j.object,j.string]),to:j.oneOfType([j.object,j.string]),attributeName:j.string,duration:j.number,begin:j.number,easing:j.oneOfType([j.string,j.func]),steps:j.arrayOf(j.shape({duration:j.number.isRequired,style:j.object.isRequired,easing:j.oneOfType([j.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),j.func]),properties:j.arrayOf("string"),onAnimationEnd:j.func})),children:j.oneOfType([j.node,j.func]),isActive:j.bool,canBegin:j.bool,onAnimationEnd:j.func,shouldReAnimate:j.bool,onAnimationStart:j.func,onAnimationReStart:j.func};j.object,j.object,j.object,j.element;j.object,j.object,j.object,j.oneOfType([j.array,j.element]),j.any;function Sx(e){"@babel/helpers - typeof";return Sx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sx(e)}function bE(){return bE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,h=4;fa?a:i[f];u="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),u+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, + A`).concat(o,",").concat(o,",0,").concat(+(j>180),",").concat(+(d>0),",").concat(O.x,",").concat(O.y,` + A`).concat(a,",").concat(a,",0,0,").concat(+(d<0),",").concat(k.x,",").concat(k.y,"Z")}else T+="L".concat(n,",").concat(r,"Z");return T},AYe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xre=function(t){var n=xG(xG({},AYe),t),r=n.cx,o=n.cy,i=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,u=n.startAngle,d=n.endAngle,f=n.className;if(a0&&Math.abs(u-d)<360?v=MYe({cx:r,cy:o,innerRadius:i,outerRadius:a,cornerRadius:Math.min(g,m/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:u,endAngle:d}):v=wre({cx:r,cy:o,innerRadius:i,outerRadius:a,startAngle:u,endAngle:d}),Y.createElement("path",OD({},$t(n,!0),{className:p,d:v,role:"img"}))};function Ox(e){"@babel/helpers - typeof";return Ox=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ox(e)}function ID(){return ID=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function zYe(e,t){return sb(e.getTime(),t.getTime())}function kG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.entries(),i=0,a,s;(a=o.next())&&!a.done;){for(var l=t.entries(),c=!1,u=0;(s=l.next())&&!s.done;){var d=a.value,f=d[0],p=d[1],m=s.value,g=m[0],v=m[1];!c&&!r[u]&&(c=n.equals(f,g,i,u,e,t,n)&&n.equals(p,v,f,g,e,t,n))&&(r[u]=!0),u++}if(!c)return!1;i++}return!0}function VYe(e,t,n){var r=IG(e),o=r.length;if(IG(t).length!==o)return!1;for(var i;o-- >0;)if(i=r[o],i===Cre&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!Sre(t,i)||!n.equals(e[i],t[i],i,i,e,t,n))return!1;return!0}function b0(e,t,n){var r=EG(e),o=r.length;if(EG(t).length!==o)return!1;for(var i,a,s;o-- >0;)if(i=r[o],i===Cre&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!Sre(t,i)||!n.equals(e[i],t[i],i,i,e,t,n)||(a=OG(e,i),s=OG(t,i),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function HYe(e,t){return sb(e.valueOf(),t.valueOf())}function UYe(e,t){return e.source===t.source&&e.flags===t.flags}function MG(e,t,n){if(e.size!==t.size)return!1;for(var r={},o=e.values(),i,a;(i=o.next())&&!i.done;){for(var s=t.values(),l=!1,c=0;(a=s.next())&&!a.done;)!l&&!r[c]&&(l=n.equals(i.value,a.value,i.value,a.value,e,t,n))&&(r[c]=!0),c++;if(!l)return!1}return!0}function WYe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var GYe="[object Arguments]",qYe="[object Boolean]",KYe="[object Date]",YYe="[object Map]",XYe="[object Number]",QYe="[object Object]",JYe="[object RegExp]",ZYe="[object Set]",eXe="[object String]",tXe=Array.isArray,AG=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,$G=Object.assign,nXe=Object.prototype.toString.call.bind(Object.prototype.toString);function rXe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,o=e.areObjectsEqual,i=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,l=e.areTypedArraysEqual;return function(u,d,f){if(u===d)return!0;if(u==null||d==null||typeof u!="object"||typeof d!="object")return u!==u&&d!==d;var p=u.constructor;if(p!==d.constructor)return!1;if(p===Object)return o(u,d,f);if(tXe(u))return t(u,d,f);if(AG!=null&&AG(u))return l(u,d,f);if(p===Date)return n(u,d,f);if(p===RegExp)return a(u,d,f);if(p===Map)return r(u,d,f);if(p===Set)return s(u,d,f);var m=nXe(u);return m===KYe?n(u,d,f):m===JYe?a(u,d,f):m===YYe?r(u,d,f):m===ZYe?s(u,d,f):m===QYe?typeof u.then!="function"&&typeof d.then!="function"&&o(u,d,f):m===GYe?o(u,d,f):m===qYe||m===XYe||m===eXe?i(u,d,f):!1}}function oXe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,o={areArraysEqual:r?b0:BYe,areDatesEqual:zYe,areMapsEqual:r?TG(kG,b0):kG,areObjectsEqual:r?b0:VYe,arePrimitiveWrappersEqual:HYe,areRegExpsEqual:UYe,areSetsEqual:r?TG(MG,b0):MG,areTypedArraysEqual:r?b0:WYe};if(n&&(o=$G({},o,n(o))),t){var i=QC(o.areArraysEqual),a=QC(o.areMapsEqual),s=QC(o.areObjectsEqual),l=QC(o.areSetsEqual);o=$G({},o,{areArraysEqual:i,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:l})}return o}function iXe(e){return function(t,n,r,o,i,a,s){return e(t,n,s)}}function aXe(e){var t=e.circular,n=e.comparator,r=e.createState,o=e.equals,i=e.strict;if(r)return function(l,c){var u=r(),d=u.cache,f=d===void 0?t?new WeakMap:void 0:d,p=u.meta;return n(l,c,{cache:f,equals:o,meta:p,strict:i})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:o,meta:void 0,strict:i})};var a={cache:void 0,equals:o,meta:void 0,strict:i};return function(l,c){return n(l,c,a)}}var sXe=Zf();Zf({strict:!0});Zf({circular:!0});Zf({circular:!0,strict:!0});Zf({createInternalComparator:function(){return sb}});Zf({strict:!0,createInternalComparator:function(){return sb}});Zf({circular:!0,createInternalComparator:function(){return sb}});Zf({circular:!0,createInternalComparator:function(){return sb},strict:!0});function Zf(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,o=e.createState,i=e.strict,a=i===void 0?!1:i,s=oXe(e),l=rXe(s),c=r?r(l):iXe(l);return aXe({circular:n,comparator:l,createState:o,equals:c,strict:a})}function lXe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function RG(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function o(i){n<0&&(n=i),i-n>t?(e(i),n=-1):lXe(o)};requestAnimationFrame(r)}function kD(e){"@babel/helpers - typeof";return kD=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kD(e)}function cXe(e){return pXe(e)||fXe(e)||dXe(e)||uXe()}function uXe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dXe(e,t){if(e){if(typeof e=="string")return _G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _G(e,t)}}function _G(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},g=function(w){for(var x=w>1?1:w,S=x,P=0;P<8;++P){var T=d(S)-x,E=p(S);if(Math.abs(T-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,o=t.damping,i=o===void 0?8:o,a=t.dt,s=a===void 0?17:a,l=function(u,d,f){var p=-(u-d)*r,m=f*i,g=f+(p-m)*s/1e3,v=f*s/1e3+u;return Math.abs(v-d)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function UXe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}function eR(e){return KXe(e)||qXe(e)||GXe(e)||WXe()}function WXe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GXe(e,t){if(e){if(typeof e=="string")return _D(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _D(e,t)}}function qXe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KXe(e){if(Array.isArray(e))return _D(e)}function _D(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function kE(e){return kE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kE(e)}var ul=function(e){ZXe(n,e);var t=eQe(n);function n(r,o){var i;YXe(this,n),i=t.call(this,r,o);var a=i.props,s=a.isActive,l=a.attributeName,c=a.from,u=a.to,d=a.steps,f=a.children,p=a.duration;if(i.handleStyleChange=i.handleStyleChange.bind(LD(i)),i.changeStyle=i.changeStyle.bind(LD(i)),!s||p<=0)return i.state={style:{}},typeof f=="function"&&(i.state={style:u}),ND(i);if(d&&d.length)i.state={style:d[0].style};else if(c){if(typeof f=="function")return i.state={style:c},ND(i);i.state={style:l?U0({},l,c):c}}else i.state={style:{}};return i}return QXe(n,[{key:"componentDidMount",value:function(){var o=this.props,i=o.isActive,a=o.canBegin;this.mounted=!0,!(!i||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(o){var i=this.props,a=i.isActive,s=i.canBegin,l=i.attributeName,c=i.shouldReAnimate,u=i.to,d=i.from,f=this.state.style;if(s){if(!a){var p={style:l?U0({},l,u):u};this.state&&f&&(l&&f[l]!==u||!l&&f!==u)&&this.setState(p);return}if(!(sXe(o.to,u)&&o.canBegin&&o.isActive)){var m=!o.canBegin||!o.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=m||c?d:o.to;if(this.state&&f){var v={style:l?U0({},l,g):g};(l&&f[l]!==g||!l&&f!==g)&&this.setState(v)}this.runAnimation(Il(Il({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var o=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),o&&o()}},{key:"handleStyleChange",value:function(o){this.changeStyle(o)}},{key:"changeStyle",value:function(o){this.mounted&&this.setState({style:o})}},{key:"runJSAnimation",value:function(o){var i=this,a=o.from,s=o.to,l=o.duration,c=o.easing,u=o.begin,d=o.onAnimationEnd,f=o.onAnimationStart,p=zXe(a,s,MXe(c),l,this.changeStyle),m=function(){i.stopJSAnimation=p()};this.manager.start([f,u,m,l,d])}},{key:"runStepAnimation",value:function(o){var i=this,a=o.steps,s=o.begin,l=o.onAnimationStart,c=a[0],u=c.style,d=c.duration,f=d===void 0?0:d,p=function(g,v,w){if(w===0)return g;var x=v.duration,S=v.easing,P=S===void 0?"ease":S,T=v.style,E=v.properties,O=v.onAnimationEnd,k=w>0?a[w-1]:v,A=E||Object.keys(T);if(typeof P=="function"||P==="spring")return[].concat(eR(g),[i.runJSAnimation.bind(i,{from:k.style,to:T,duration:x,easing:P}),x]);var I=LG(A,x,P),R=Il(Il(Il({},k.style),T),{},{transition:I});return[].concat(eR(g),[R,x,O]).filter(vXe)};return this.manager.start([l].concat(eR(a.reduce(p,[u,Math.max(f,s)])),[o.onAnimationEnd]))}},{key:"runAnimation",value:function(o){this.manager||(this.manager=hXe());var i=o.begin,a=o.duration,s=o.attributeName,l=o.to,c=o.easing,u=o.onAnimationStart,d=o.onAnimationEnd,f=o.steps,p=o.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(o);return}if(f.length>1){this.runStepAnimation(o);return}var g=s?U0({},s,l):l,v=LG(Object.keys(g),a,c);m.start([u,i,Il(Il({},g),{},{transition:v}),a,d])}},{key:"render",value:function(){var o=this.props,i=o.children;o.begin;var a=o.duration;o.attributeName,o.easing;var s=o.isActive;o.steps,o.from,o.to,o.canBegin,o.onAnimationEnd,o.shouldReAnimate,o.onAnimationReStart;var l=HXe(o,VXe),c=y.Children.count(i),u=this.state.style;if(typeof i=="function")return i(u);if(!s||c===0||a<=0)return i;var d=function(p){var m=p.props,g=m.style,v=g===void 0?{}:g,w=m.className,x=y.cloneElement(p,Il(Il({},l),{},{style:Il(Il({},v),u),className:w}));return x};return c===1?d(y.Children.only(i)):Y.createElement("div",null,y.Children.map(i,function(f){return d(f)}))}}]),n}(y.PureComponent);ul.displayName="Animate";ul.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};ul.propTypes={from:B.oneOfType([B.object,B.string]),to:B.oneOfType([B.object,B.string]),attributeName:B.string,duration:B.number,begin:B.number,easing:B.oneOfType([B.string,B.func]),steps:B.arrayOf(B.shape({duration:B.number.isRequired,style:B.object.isRequired,easing:B.oneOfType([B.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),B.func]),properties:B.arrayOf("string"),onAnimationEnd:B.func})),children:B.oneOfType([B.node,B.func]),isActive:B.bool,canBegin:B.bool,onAnimationEnd:B.func,shouldReAnimate:B.bool,onAnimationStart:B.func,onAnimationReStart:B.func};B.object,B.object,B.object,B.element;B.object,B.object,B.object,B.oneOfType([B.array,B.element]),B.any;function Mx(e){"@babel/helpers - typeof";return Mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mx(e)}function ME(){return ME=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=o>=0&&r>=0||o<0&&r<0?1:0,u;if(a>0&&i instanceof Array){for(var d=[0,0,0,0],f=0,p=4;fa?a:i[f];u="M".concat(t,",").concat(n+s*d[0]),d[0]>0&&(u+="A ".concat(d[0],",").concat(d[0],",0,0,").concat(c,",").concat(t+l*d[0],",").concat(n)),u+="L ".concat(t+r-l*d[1],",").concat(n),d[1]>0&&(u+="A ".concat(d[1],",").concat(d[1],",0,0,").concat(c,`, `).concat(t+r,",").concat(n+s*d[1])),u+="L ".concat(t+r,",").concat(n+o-s*d[2]),d[2]>0&&(u+="A ".concat(d[2],",").concat(d[2],",0,0,").concat(c,`, `).concat(t+r-l*d[2],",").concat(n+o)),u+="L ".concat(t+l*d[3],",").concat(n+o),d[3]>0&&(u+="A ".concat(d[3],",").concat(d[3],",0,0,").concat(c,`, `).concat(t,",").concat(n+o-s*d[3])),u+="Z"}else if(a>0&&i===+i&&i>0){var m=Math.min(a,i);u="M ".concat(t,",").concat(n+s*m,` @@ -342,24 +342,24 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+o-s*m,` A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t+r-l*m,",").concat(n+o,` L `).concat(t+l*m,",").concat(n+o,` - A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*m," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},YXe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return r>=c&&r<=u&&o>=d&&o<=f}return!1},XXe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},tB=function(t){var n=NG(NG({},XXe),t),r=y.useRef(),o=y.useState(-1),i=zXe(o,2),a=i[0],s=i[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,f=n.radius,h=n.className,m=n.animationEasing,g=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var S=fe("recharts-rectangle",h);return x?J.createElement(rc,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:g,animationEasing:m,isActive:x},function(P){var T=P.width,E=P.height,O=P.x,k=P.y;return J.createElement(rc,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:w,easing:m},J.createElement("path",bE({},_t(n,!0),{className:S,d:LG(O,k,T,E,f),ref:r})))}):J.createElement("path",bE({},_t(n,!0),{className:S,d:LG(l,c,u,d,f)}))},QXe=["points","className","baseLinePoints","connectNulls"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZXe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function FG(e){return rQe(e)||nQe(e)||tQe(e)||eQe()}function eQe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function tQe(e,t){if(e){if(typeof e=="string")return ID(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ID(e,t)}}function nQe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rQe(e){if(Array.isArray(e))return ID(e)}function ID(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){jG(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),jG(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},dw=function(t,n){var r=oQe(t);n&&(r=[r.reduce(function(i,a){return[].concat(FG(i),FG(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},iQe=function(t,n,r){var o=dw(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(dw(n.reverse(),r).slice(1))},aQe=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=JXe(t,QXe);if(!n||!n.length)return null;var s=fe("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=iQe(n,o,i);return J.createElement("g",{className:s},J.createElement("path",Eg({},_t(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?J.createElement("path",Eg({},_t(a,!0),{fill:"none",d:dw(n,i)})):null,l?J.createElement("path",Eg({},_t(a,!0),{fill:"none",d:dw(o,i)})):null)}var u=dw(n,i);return J.createElement("path",Eg({},_t(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function kD(){return kD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var hQe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},mQe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,h=f===void 0?0:f,m=t.className,g=fQe(t,sQe),v=lQe({x:r,y:i,top:s,left:c,width:d,height:h},g);return!lt(r)||!lt(i)||!lt(d)||!lt(h)||!lt(s)||!lt(c)?null:J.createElement("path",MD({},_t(v,!0),{className:fe("recharts-cross",m),d:hQe(r,i,d,h,s,c)}))},gQe=ak,yQe=Ane,vQe=Gc;function bQe(e,t){return e&&e.length?gQe(e,vQe(t),yQe):void 0}var wQe=bQe;const xQe=Rn(wQe);var SQe=ak,CQe=Gc,PQe=$ne;function TQe(e,t){return e&&e.length?SQe(e,CQe(t),PQe):void 0}var EQe=TQe;const OQe=Rn(EQe);var IQe=["cx","cy","angle","ticks","axisLine"],kQe=["ticks","tick","angle","tickFormatter","stroke"];function Ky(e){"@babel/helpers - typeof";return Ky=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ky(e)}function fw(){return fw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function MQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function AQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HG(e,t){for(var n=0;nGG?a=o==="outer"?"start":"end":i<-GG?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=gp(gp({},_t(this.props,!1)),{},{fill:"none"},_t(s,!1));if(l==="circle")return J.createElement(dk,Ap({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,d=u.map(function(f){return Sr(o,i,a,f.coordinate)});return J.createElement(aQe,Ap({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=_t(this.props,!1),d=_t(a,!1),f=gp(gp({},u),{},{fill:"none"},_t(s,!1)),h=i.map(function(m,g){var v=r.getTickLineCoord(m),w=r.getTickTextAnchor(m),x=gp(gp(gp({textAnchor:w},u),{},{stroke:"none",fill:c},d),{},{index:g,payload:m,x:v.x2,y:v.y2});return J.createElement(Pn,Ap({className:fe("recharts-polar-angle-axis-tick",are(a)),key:"tick-".concat(m.coordinate)},Ef(r.props,m,g)),s&&J.createElement("line",Ap({className:"recharts-polar-angle-axis-tick-line"},f,v)),a&&t.renderTickItem(a,x,l?l(m.value,g):m.value))});return J.createElement(Pn,{className:"recharts-polar-angle-axis-ticks"},h)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:J.createElement(Pn,{className:fe("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):Gt(r)?a=r(o):a=J.createElement(Sh,Ap({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(y.PureComponent);hk(mk,"displayName","PolarAngleAxis");hk(mk,"axisType","angleAxis");hk(mk,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var GQe=Ite,qQe=GQe(Object.getPrototypeOf,Object),KQe=qQe,YQe=od,XQe=KQe,QQe=id,JQe="[object Object]",ZQe=Function.prototype,eJe=Object.prototype,Sre=ZQe.toString,tJe=eJe.hasOwnProperty,nJe=Sre.call(Object);function rJe(e){if(!QQe(e)||YQe(e)!=JQe)return!1;var t=XQe(e);if(t===null)return!0;var n=tJe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Sre.call(n)==nJe}var oJe=rJe;const iJe=Rn(oJe);var aJe=od,sJe=id,lJe="[object Boolean]";function cJe(e){return e===!0||e===!1||sJe(e)&&aJe(e)==lJe}var uJe=cJe;const dJe=Rn(uJe);function Px(e){"@babel/helpers - typeof";return Px=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Px(e)}function SE(){return SE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:g,animationEasing:m,isActive:w},function(S){var P=S.upperWidth,T=S.lowerWidth,E=S.height,O=S.x,k=S.y;return J.createElement(rc,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:m},J.createElement("path",SE({},_t(n,!0),{className:x,d:XG(O,k,P,T,E),ref:r})))}):J.createElement("g",null,J.createElement("path",SE({},_t(n,!0),{className:x,d:XG(l,c,u,d,f)})))},SJe=["option","shapeType","propTransformer","activeClassName","isActive"];function Tx(e){"@babel/helpers - typeof";return Tx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tx(e)}function CJe(e,t){if(e==null)return{};var n=PJe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PJe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function QG(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function CE(e){for(var t=1;t0?es(S,"paddingAngle",0):0;if(T){var O=ri(T.endAngle-T.startAngle,S.endAngle-S.startAngle),k=vr(vr({},S),{},{startAngle:x+E,endAngle:x+O(g)+E});v.push(k),x=k.endAngle}else{var A=S.endAngle,I=S.startAngle,R=ri(0,A-I),N=R(g),L=vr(vr({},S),{},{startAngle:x+E,endAngle:x+N+E});v.push(L),x=L.endAngle}}),J.createElement(Pn,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!Gv(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,h=o.isAnimationActive,m=this.state.isAnimationFinished;if(i||!a||!a.length||!lt(c)||!lt(u)||!lt(d)||!lt(f))return null;var g=fe("recharts-pie",s);return J.createElement(Pn,{tabIndex:this.props.rootTabIndex,className:g,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),Uo.renderCallByParent(this.props,null,!1),(!h||m)&&Ac.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r=360?x:x-1)*l,P=v-x*h-S,T=o.reduce(function(k,A){var I=Hr(A,w,0);return k+(lt(I)?I:0)},0),E;if(T>0){var O;E=o.map(function(k,A){var I=Hr(k,w,0),R=Hr(k,u,A),N=(lt(I)?I:0)/T,L;A?L=O.endAngle+zi(g)*l*(I!==0?1:0):L=a;var B=L+zi(g)*((I!==0?h:0)+N*P),_=(L+B)/2,D=(m.innerRadius+m.outerRadius)/2,z=[{name:R,value:I,payload:k,dataKey:w,type:f}],F=Sr(m.cx,m.cy,D,_);return O=vr(vr(vr({percent:N,cornerRadius:i,name:R,tooltipPayload:z,midAngle:_,middleRadius:D,tooltipPosition:F},k),m),{},{value:Hr(k,w),startAngle:L,endAngle:B,payload:k,paddingAngle:zi(g)*l}),O})}return vr(vr({},m),{},{sectors:E,data:o})});var WJe=Math.ceil,GJe=Math.max;function qJe(e,t,n,r){for(var o=-1,i=GJe(WJe((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var KJe=qJe,YJe=qte,t8=1/0,XJe=17976931348623157e292;function QJe(e){if(!e)return e===0?e:0;if(e=YJe(e),e===t8||e===-t8){var t=e<0?-1:1;return t*XJe}return e===e?e:0}var Tre=QJe,JJe=KJe,ZJe=JI,W$=Tre;function eZe(e){return function(t,n,r){return r&&typeof r!="number"&&ZJe(t,n,r)&&(n=r=void 0),t=W$(t),n===void 0?(n=t,t=0):n=W$(n),r=r===void 0?t0&&r.handleDrag(o.changedTouches[0])}),Na(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Na(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Na(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Na(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Na(r,"handleSlideDragStart",function(o){var i=a8(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return hZe(t,e),uZe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(o,i),f=Math.max(o,i),h=t.getIndexInRange(a,d),m=t.getIndexInRange(a,f);return{startIndex:h-h%l,endIndex:m===u?u:m-m%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=Hr(i[r],s,r);return Gt(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,h=l.endIndex,m=l.onChange,g=r.pageX-i;g>0?g=Math.min(g,c+u-d-s,c+u-d-a):g<0&&(g=Math.max(g,c-a,c-s));var v=this.getIndex({startX:a+g,endX:s+g});(v.startIndex!==f||v.endIndex!==h)&&m&&m(v),this.setState({startX:a+g,endX:s+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=a8(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,h=u.travellerWidth,m=u.onChange,g=u.gap,v=u.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-h-c):x<0&&(x=Math.max(x,d-c)),w[a]=c+x;var S=this.getIndex(w),P=S.startIndex,T=S.endIndex,E=function(){var k=v.length-1;return a==="startX"&&(s>l?P%g===0:T%g===0)||sl?T%g===0:P%g===0)||s>l&&T===k};this.setState(Na(Na({},a,c+x),"brushMoveStartX",r.pageX),function(){m&&E()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],d=s.indexOf(u);if(d!==-1){var f=d+r;if(!(f===-1||f>=s.length)){var h=s[f];o==="startX"&&h>=c||o==="endX"&&h<=l||this.setState(Na({},o,h),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return J.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,d=y.Children.only(c);return d?J.cloneElement(d,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,h=l.ariaLabel,m=l.data,g=l.startIndex,v=l.endIndex,w=Math.max(r,this.props.x),x=G$(G$({},_t(this.props,!1)),{},{x:w,y:c,width:u,height:d}),S=h||"Min value: ".concat((i=m[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=m[v])===null||a===void 0?void 0:a.name);return J.createElement(Pn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),s.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,d=Math.max(Math.abs(o-r)-c,0);return J.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,d=u.startX,f=u.endX,h=5,m={pointerEvents:"none",fill:c};return J.createElement(Pn,{className:"recharts-brush-texts"},J.createElement(Sh,OE({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-h,y:a+s/2},m),this.getTextOfTick(o)),J.createElement(Sh,OE({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+h,y:a+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,d=r.alwaysShowText,f=this.state,h=f.startX,m=f.endX,g=f.isTextActive,v=f.isSlideMoving,w=f.isTravellerMoving,x=f.isTravellerFocused;if(!o||!o.length||!lt(s)||!lt(l)||!lt(c)||!lt(u)||c<=0||u<=0)return null;var S=fe("recharts-brush",i),P=J.Children.count(a)===1,T=lZe("userSelect","none");return J.createElement(Pn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(h,m),this.renderTravellerLayer(h,"startX"),this.renderTravellerLayer(m,"endX"),(g||v||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return J.createElement(J.Fragment,null,J.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),J.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),J.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return J.isValidElement(r)?i=J.cloneElement(r,o):Gt(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,d=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return G$({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?gZe({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var f=o.scale.domain().map(function(h){return o.scale(h)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(y.PureComponent);Na(Jy,"displayName","Brush");Na(Jy,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var yZe=Oj;function vZe(e,t){var n;return yZe(e,function(r,o,i){return n=t(r,o,i),!n}),!!n}var bZe=vZe,wZe=wte,xZe=Gc,SZe=bZe,CZe=Ea,PZe=JI;function TZe(e,t,n){var r=CZe(e)?wZe:SZe;return n&&PZe(e,t,n)&&(t=void 0),r(e,xZe(t))}var EZe=TZe;const OZe=Rn(EZe);var $c=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},s8=Vte;function IZe(e,t,n){t=="__proto__"&&s8?s8(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var kZe=IZe,MZe=kZe,AZe=Bte,$Ze=Gc;function RZe(e,t){var n={};return t=$Ze(t),AZe(e,function(r,o,i){MZe(n,o,t(r,o,i))}),n}var _Ze=RZe;const DZe=Rn(_Ze);function NZe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZZe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function eet(e,t){var n=e.x,r=e.y,o=JZe(e,KZe),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return d0(d0(d0(d0(d0({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function c8(e){return J.createElement(PE,DD({shapeType:"rectangle",propTransformer:eet,activeClassName:"recharts-active-bar"},e))}var tet=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||Ph(),n)}},net=["value","background"],Mre;function Zy(e){"@babel/helpers - typeof";return Zy=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zy(e)}function ret(e,t){if(e==null)return{};var n=oet(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oet(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(_)0&&Math.abs(B)0&&(L=Math.min((Z||0)-(B[K-1]||0),L))}),Number.isFinite(L)){var _=L/N,D=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(O=_*D/2),g.padding==="no-gap"){var z=Vi(t.barCategoryGap,_*D),F=_*D/2;O=F-z-(F-z)/D*z}}}o==="xAxis"?k=[r.left+(S.left||0)+(O||0),r.left+r.width-(S.right||0)-(O||0)]:o==="yAxis"?k=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(O||0),r.top+r.height-(S.bottom||0)-(O||0)]:k=g.range,T&&(k=[k[1],k[0]]);var H=Zne(g,i,f),U=H.scale,q=H.realScaleType;U.domain(w).range(k),ere(U);var Y=tre(U,Rl(Rl({},g),{},{realScaleType:q}));o==="xAxis"?(R=v==="top"&&!P||v==="bottom"&&P,A=r.left,I=d[E]-R*g.height):o==="yAxis"&&(R=v==="left"&&!P||v==="right"&&P,A=d[E]-R*g.width,I=r.top);var ae=Rl(Rl(Rl({},g),Y),{},{realScaleType:q,x:A,y:I,scale:U,width:o==="xAxis"?r.width:g.width,height:o==="yAxis"?r.height:g.height});return ae.bandSize=pE(ae,Y),!g.hide&&o==="xAxis"?d[E]+=(R?-1:1)*ae.height:g.hide||(d[E]+=(R?-1:1)*ae.width),Rl(Rl({},h),{},vk({},m,ae))},{})},_re=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},get=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return _re({x:n,y:r},{x:o,y:i})},Dre=function(){function e(t){pet(this,e),this.scale=t}return het(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();vk(Dre,"EPS",1e-4);var rB=function(t){var n=Object.keys(t).reduce(function(r,o){return Rl(Rl({},r),{},vk({},o,Dre.create(t[o])))},{});return Rl(Rl({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return DZe(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return kre(o,function(i,a){return n[a].isInRange(i)})}})};function yet(e){return(e%180+180)%180}var vet=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=yet(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?o[i?t[a]:a]:void 0}}var Pet=Cet,Tet=Tre;function Eet(e){var t=Tet(e),n=t%1;return t===t?n?t-n:t:0}var Oet=Eet,Iet=_te,ket=Gc,Met=Oet,Aet=Math.max;function $et(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:Met(n);return o<0&&(o=Aet(r+o,0)),Iet(e,ket(t),o)}var Ret=$et,_et=Pet,Det=Ret,Net=_et(Det),Let=Net;const Fet=Rn(Let);var jet=YFe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),oB=y.createContext(void 0),iB=y.createContext(void 0),Nre=y.createContext(void 0),Lre=y.createContext({}),Fre=y.createContext(void 0),jre=y.createContext(0),Bre=y.createContext(0),h8=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=jet(i);return J.createElement(oB.Provider,{value:r},J.createElement(iB.Provider,{value:o},J.createElement(Lre.Provider,{value:i},J.createElement(Nre.Provider,{value:u},J.createElement(Fre.Provider,{value:a},J.createElement(jre.Provider,{value:c},J.createElement(Bre.Provider,{value:l},s)))))))},Bet=function(){return y.useContext(Fre)},zre=function(t){var n=y.useContext(oB);n==null&&Ph();var r=n[t];return r==null&&Ph(),r},zet=function(){var t=y.useContext(oB);return zd(t)},Vet=function(){var t=y.useContext(iB),n=Fet(t,function(r){return kre(r.domain,Number.isFinite)});return n||zd(t)},Vre=function(t){var n=y.useContext(iB);n==null&&Ph();var r=n[t];return r==null&&Ph(),r},Het=function(){var t=y.useContext(Nre);return t},Uet=function(){return y.useContext(Lre)},aB=function(){return y.useContext(Bre)},sB=function(){return y.useContext(jre)};function ev(e){"@babel/helpers - typeof";return ev=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ev(e)}function Wet(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Get(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function Ott(e,t){return Yre(e,t+1)}function Itt(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var m=r==null?void 0:r[l];if(m===void 0)return{v:Yre(r,c)};var g=l,v,w=function(){return v===void 0&&(v=n(m,g)),v},x=m.coordinate,S=l===0||_E(e,x,w,u,s);S||(l=0,u=a,c+=1),S&&(u=x+e*(w()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function Mx(e){"@babel/helpers - typeof";return Mx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mx(e)}function S8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t0?h.coordinate-v*e:h.coordinate})}else i[f]=h=gi(gi({},h),{},{tickCoord:h.coordinate});var w=_E(e,h.tickCoord,g,s,l);w&&(l=h.tickCoord-e*(g()/2+o),i[f]=gi(gi({},h),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function Rtt(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=gi(gi({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var h=_E(e,u.tickCoord,function(){return d},l,c);h&&(c=u.tickCoord-e*(d/2+o),a[s-1]=gi(gi({},u),{},{isShow:!0}))}for(var m=i?s-1:s,g=function(x){var S=a[x],P,T=function(){return P===void 0&&(P=n(S,x)),P};if(x===0){var E=e*(S.coordinate-e*T()/2-l);a[x]=S=gi(gi({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else a[x]=S=gi(gi({},S),{},{tickCoord:S.coordinate});var O=_E(e,S.tickCoord,T,l,c);O&&(l=S.tickCoord+e*(T()/2+o),a[x]=gi(gi({},S),{},{isShow:!0}))},v=0;v=2?zi(o[1].coordinate-o[0].coordinate):1,w=Ett(i,v,h);return l==="equidistantPreserveStart"?Itt(v,w,g,o,a):(l==="preserveStart"||l==="preserveStartEnd"?f=Rtt(v,w,g,o,a,l==="preserveStartEnd"):f=$tt(v,w,g,o,a),f.filter(function(x){return x.isShow}))}var _tt=["viewBox"],Dtt=["viewBox"],Ntt=["ticks"];function rv(e){"@babel/helpers - typeof";return rv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rv(e)}function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Ltt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ftt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P8(e,t){for(var n=0;n0?l(this.props):l(h)),a<=0||s<=0||!m||!m.length?null:J.createElement(Pn,{className:fe("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Uo.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return J.isValidElement(r)?a=J.cloneElement(r,o):Gt(r)?a=r(o):a=J.createElement(Sh,Ig({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(y.Component);dB(Qv,"displayName","CartesianAxis");dB(Qv,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var Wtt=["x1","y1","x2","y2","key"],Gtt=["offset"];function Th(e){"@babel/helpers - typeof";return Th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Th(e)}function T8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Xtt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Qtt=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return J.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Jre(e,t){var n;if(J.isValidElement(e))n=J.cloneElement(e,t);else if(Gt(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=E8(t,Wtt),c=_t(l,!1);c.offset;var u=E8(c,Gtt);n=J.createElement("line",Vp({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function Jtt(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=wi(wi({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return Jre(o,c)});return J.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function Ztt(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=wi(wi({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return Jre(o,c)});return J.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function ent(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+o-o)}).sort(function(f,h){return f-h});o!==u[0]&&u.unshift(0);var d=u.map(function(f,h){var m=!u[h+1],g=m?o+a-f:u[h+1]-f;if(g<=0)return null;var v=h%t.length;return J.createElement("rect",{key:"react-".concat(h),y:f,x:r,height:g,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function tnt(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(f){return Math.round(f+i-i)}).sort(function(f,h){return f-h});i!==u[0]&&u.unshift(0);var d=u.map(function(f,h){var m=!u[h+1],g=m?i+s-f:u[h+1]-f;if(g<=0)return null;var v=h%r.length;return J.createElement("rect",{key:"react-".concat(h),x:f,y:a,width:g,height:l,stroke:"none",fill:r[v],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return J.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var nnt=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return Jne(uB(wi(wi(wi({},Qv.defaultProps),r),{},{ticks:Eu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},rnt=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return Jne(uB(wi(wi(wi({},Qv.defaultProps),r),{},{ticks:Eu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},Bm={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Jv(e){var t,n,r,o,i,a,s=aB(),l=sB(),c=Uet(),u=wi(wi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Bm.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Bm.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Bm.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:Bm.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Bm.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Bm.verticalFill,x:lt(e.x)?e.x:c.left,y:lt(e.y)?e.y:c.top,width:lt(e.width)?e.width:c.width,height:lt(e.height)?e.height:c.height}),d=u.x,f=u.y,h=u.width,m=u.height,g=u.syncWithTicks,v=u.horizontalValues,w=u.verticalValues,x=zet(),S=Vet();if(!lt(h)||h<=0||!lt(m)||m<=0||!lt(d)||d!==+d||!lt(f)||f!==+f)return null;var P=u.verticalCoordinatesGenerator||nnt,T=u.horizontalCoordinatesGenerator||rnt,E=u.horizontalPoints,O=u.verticalPoints;if((!E||!E.length)&&Gt(T)){var k=v&&v.length,A=T({yAxis:S?wi(wi({},S),{},{ticks:k?v:S.ticks}):void 0,width:s,height:l,offset:c},k?!0:g);ql(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Th(A),"]")),Array.isArray(A)&&(E=A)}if((!O||!O.length)&&Gt(P)){var I=w&&w.length,R=P({xAxis:x?wi(wi({},x),{},{ticks:I?w:x.ticks}):void 0,width:s,height:l,offset:c},I?!0:g);ql(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Th(R),"]")),Array.isArray(R)&&(O=R)}return J.createElement("g",{className:"recharts-cartesian-grid"},J.createElement(Qtt,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),J.createElement(Jtt,Vp({},u,{offset:c,horizontalPoints:E,xAxis:x,yAxis:S})),J.createElement(Ztt,Vp({},u,{offset:c,verticalPoints:O,xAxis:x,yAxis:S})),J.createElement(ent,Vp({},u,{horizontalPoints:E})),J.createElement(tnt,Vp({},u,{verticalPoints:O})))}Jv.displayName="CartesianGrid";var ont=["type","layout","connectNulls","ref"],int=["key"];function ov(e){"@babel/helpers - typeof";return ov=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ov(e)}function O8(e,t){if(e==null)return{};var n=ant(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ant(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){h=[].concat(zm(l.slice(0,m)),[d-g]);break}var v=h.length%2===0?[0,f]:[f];return[].concat(zm(t.repeat(l,u)),zm(h),v).map(function(w){return"".concat(w,"px")}).join(", ")}),_l(n,"id",Vh("recharts-line-")),_l(n,"pathRef",function(a){n.mainCurve=a}),_l(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),_l(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return gnt(t,e),fnt(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,d=qi(u,Yv);if(!d)return null;var f=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:Hr(g.payload,v)}},h={clipPath:r?"url(#clipPath-".concat(o,")"):null};return J.createElement(Pn,h,d.map(function(m){return J.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=_t(this.props,!1),f=_t(l,!0),h=c.map(function(g,v){var w=_a(_a(_a({key:"dot-".concat(v),r:3},d),f),{},{value:g.value,dataKey:u,cx:g.x,cy:g.y,index:v,payload:g.payload});return t.renderDotItem(l,w)}),m={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return J.createElement(Pn,pw({className:"recharts-line-dots",key:"dots"},m),h)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=O8(s,ont),f=_a(_a(_a({},_t(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return J.createElement(bx,pw({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,h=a.animationId,m=a.animateNewValues,g=a.width,v=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return J.createElement(rc,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(h),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var T=P.t;if(x){var E=x.length/s.length,O=s.map(function(N,L){var B=Math.floor(L*E);if(x[B]){var _=x[B],D=ri(_.x,N.x),z=ri(_.y,N.y);return _a(_a({},N),{},{x:D(T),y:z(T)})}if(m){var F=ri(g*2,N.x),H=ri(v/2,N.y);return _a(_a({},N),{},{x:F(T),y:H(T)})}return _a(_a({},N),{},{x:N.x,y:N.y})});return i.renderCurveStatically(O,r,o)}var k=ri(0,S),A=k(T),I;if(l){var R="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});I=i.getStrokeDasharray(A,S,R)}else I=i.generateSimpleStrokeDasharray(S,A);return i.renderCurveStatically(s,r,o,{strokeDasharray:I})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!Gv(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,h=o.width,m=o.height,g=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=fe("recharts-line",l),P=c&&c.allowDataOverflow,T=u&&u.allowDataOverflow,E=P||T,O=Vt(v)?this.id:v,k=(r=_t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=k.r,I=A===void 0?3:A,R=k.strokeWidth,N=R===void 0?2:R,L=Zje(a)?a:{},B=L.clipDot,_=B===void 0?!0:B,D=I*2+N;return J.createElement(Pn,{className:S},P||T?J.createElement("defs",null,J.createElement("clipPath",{id:"clipPath-".concat(O)},J.createElement("rect",{x:P?f:f-h/2,y:T?d:d-m/2,width:P?h:h*2,height:T?m:m*2})),!_&&J.createElement("clipPath",{id:"clipPath-dots-".concat(O)},J.createElement("rect",{x:f-D/2,y:d-D/2,width:h+D,height:m+D}))):null,!x&&this.renderCurve(E,O),this.renderErrorBar(E,O),(x||a)&&this.renderDots(E,_,O),(!g||w)&&Ac.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(zm(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Int(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function knt(e){var t=e.option,n=e.isActive,r=Ont(e,Ent);return typeof t=="string"?J.createElement(PE,hw({option:J.createElement(YI,hw({type:t},r)),isActive:n,shapeType:"symbols"},r)):J.createElement(PE,hw({option:t,isActive:n,shapeType:"symbols"},r))}function av(e){"@babel/helpers - typeof";return av=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},av(e)}function mw(){return mw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Prt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Trt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ert(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&<(o)&<(i)?t.slice(o,i+1):[]};function boe(e){return e==="number"?[0,"auto"]:void 0}var nN=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=Pk(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var h=d===void 0?s:d;f=FT(h,a.dataKey,o)}else f=d&&d[r]||s[r];return f?[].concat(uv(l),[rre(c,f)]):l},[])},L8=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=Frt(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=eKe(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=nN(t,n,u,d),h=jrt(r,s,u,i);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:h}}return null},Brt=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,h=Qne(u,i);return r.reduce(function(m,g){var v,w=g.type.defaultProps!==void 0?Fe(Fe({},g.type.defaultProps),g.props):g.props,x=w.type,S=w.dataKey,P=w.allowDataOverflow,T=w.allowDuplicatedCategory,E=w.scale,O=w.ticks,k=w.includeHidden,A=w[a];if(m[A])return m;var I=Pk(t.data,{graphicalItems:o.filter(function(Y){var ae,Z=a in Y.props?Y.props[a]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[a];return Z===A}),dataStartIndex:l,dataEndIndex:c}),R=I.length,N,L,B;frt(w.domain,P,x)&&(N=hD(w.domain,null,P),h&&(x==="number"||E!=="auto")&&(B=cw(I,S,"category")));var _=boe(x);if(!N||N.length===0){var D,z=(D=w.domain)!==null&&D!==void 0?D:_;if(S){if(N=cw(I,S,x),x==="category"&&h){var F=Hje(N);T&&F?(L=N,N=EE(0,R)):T||(N=rG(z,N,g).reduce(function(Y,ae){return Y.indexOf(ae)>=0?Y:[].concat(uv(Y),[ae])},[]))}else if(x==="category")T?N=N.filter(function(Y){return Y!==""&&!Vt(Y)}):N=rG(z,N,g).reduce(function(Y,ae){return Y.indexOf(ae)>=0||ae===""||Vt(ae)?Y:[].concat(uv(Y),[ae])},[]);else if(x==="number"){var H=iKe(I,o.filter(function(Y){var ae,Z,K=a in Y.props?Y.props[a]:(ae=Y.type.defaultProps)===null||ae===void 0?void 0:ae[a],te="hide"in Y.props?Y.props.hide:(Z=Y.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return K===A&&(k||!te)}),S,i,u);H&&(N=H)}h&&(x==="number"||E!=="auto")&&(B=cw(I,S,"category"))}else h?N=EE(0,R):s&&s[A]&&s[A].hasStack&&x==="number"?N=f==="expand"?[0,1]:nre(s[A].stackGroups,l,c):N=Xne(I,o.filter(function(Y){var ae=a in Y.props?Y.props[a]:Y.type.defaultProps[a],Z="hide"in Y.props?Y.props.hide:Y.type.defaultProps.hide;return ae===A&&(k||!Z)}),x,u,!0);if(x==="number")N=ZD(d,N,A,i,O),z&&(N=hD(z,N,P));else if(x==="category"&&z){var U=z,q=N.every(function(Y){return U.indexOf(Y)>=0});q&&(N=U)}}return Fe(Fe({},m),{},Ht({},A,Fe(Fe({},w),{},{axisType:i,domain:N,categoricalDomain:B,duplicateDomain:L,originalDomain:(v=w.domain)!==null&&v!==void 0?v:_,isCategorical:h,layout:u})))},{})},zrt=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=Pk(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),h=f.length,m=Qne(u,i),g=-1;return r.reduce(function(v,w){var x=w.type.defaultProps!==void 0?Fe(Fe({},w.type.defaultProps),w.props):w.props,S=x[a],P=boe("number");if(!v[S]){g++;var T;return m?T=EE(0,h):s&&s[S]&&s[S].hasStack?(T=nre(s[S].stackGroups,l,c),T=ZD(d,T,S,i)):(T=hD(P,Xne(f,r.filter(function(E){var O,k,A=a in E.props?E.props[a]:(O=E.type.defaultProps)===null||O===void 0?void 0:O[a],I="hide"in E.props?E.props.hide:(k=E.type.defaultProps)===null||k===void 0?void 0:k.hide;return A===S&&!I}),"number",u),o.defaultProps.allowDataOverflow),T=ZD(d,T,S,i)),Fe(Fe({},v),{},Ht({},S,Fe(Fe({axisType:i},o.defaultProps),{},{hide:!0,orientation:es(Nrt,"".concat(i,".").concat(g%2),null),domain:T,originalDomain:P,isCategorical:m,layout:u})))}return v},{})},Vrt=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=qi(u,i),h={};return f&&f.length?h=Brt(t,{axes:f,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(h=zrt(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),h},Hrt=function(t){var n=zd(t),r=Eu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:Ij(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:pE(n,r)}},F8=function(t){var n=t.children,r=t.defaultShowTooltip,o=Ba(n,Jy),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},Urt=function(t){return!t||!t.length?!1:t.some(function(n){var r=ku(n&&n.type);return r&&r.indexOf("Bar")>=0})},j8=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},Wrt=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,d=r.children,f=r.margin||{},h=Ba(d,Jy),m=Ba(d,Mu),g=Object.keys(l).reduce(function(T,E){var O=l[E],k=O.orientation;return!O.mirror&&!O.hide?Fe(Fe({},T),{},Ht({},k,T[k]+O.width)):T},{left:f.left||0,right:f.right||0}),v=Object.keys(a).reduce(function(T,E){var O=a[E],k=O.orientation;return!O.mirror&&!O.hide?Fe(Fe({},T),{},Ht({},k,es(T,"".concat(k))+O.height)):T},{top:f.top||0,bottom:f.bottom||0}),w=Fe(Fe({},v),g),x=w.bottom;h&&(w.bottom+=h.props.height||Jy.defaultProps.height),m&&n&&(w=rKe(w,o,r,n));var S=c-w.left-w.right,P=u-w.top-w.bottom;return Fe(Fe({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(P,0)})},Grt=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},Tk=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(w,x){var S=x.graphicalItems,P=x.stackGroups,T=x.offset,E=x.updateId,O=x.dataStartIndex,k=x.dataEndIndex,A=w.barSize,I=w.layout,R=w.barGap,N=w.barCategoryGap,L=w.maxBarSize,B=j8(I),_=B.numericAxisName,D=B.cateAxisName,z=Urt(S),F=[];return S.forEach(function(H,U){var q=Pk(w.data,{graphicalItems:[H],dataStartIndex:O,dataEndIndex:k}),Y=H.type.defaultProps!==void 0?Fe(Fe({},H.type.defaultProps),H.props):H.props,ae=Y.dataKey,Z=Y.maxBarSize,K=Y["".concat(_,"Id")],te=Y["".concat(D,"Id")],pe={},ie=l.reduce(function(_e,ye){var Te=x["".concat(ye.axisType,"Map")],Oe=Y["".concat(ye.axisType,"Id")];Te&&Te[Oe]||ye.axisType==="zAxis"||Ph();var Me=Te[Oe];return Fe(Fe({},_e),{},Ht(Ht({},ye.axisType,Me),"".concat(ye.axisType,"Ticks"),Eu(Me)))},pe),le=ie[D],re=ie["".concat(D,"Ticks")],de=P&&P[K]&&P[K].hasStack&&hKe(H,P[K].stackGroups),ee=ku(H.type).indexOf("Bar")>=0,ce=pE(le,re),me=[],we=z&&tKe({barSize:A,stackGroups:P,totalSize:Grt(ie,D)});if(ee){var ge,Se,xe=Vt(Z)?L:Z,Ie=(ge=(Se=pE(le,re,!0))!==null&&Se!==void 0?Se:xe)!==null&&ge!==void 0?ge:0;me=nKe({barGap:R,barCategoryGap:N,bandSize:Ie!==ce?Ie:ce,sizeList:we[te],maxBarSize:xe}),Ie!==ce&&(me=me.map(function(_e){return Fe(Fe({},_e),{},{position:Fe(Fe({},_e.position),{},{offset:_e.position.offset-Ie/2})})}))}var Re=H&&H.type&&H.type.getComposedData;Re&&F.push({props:Fe(Fe({},Re(Fe(Fe({},ie),{},{displayedData:q,props:w,dataKey:ae,item:H,bandSize:ce,barPosition:me,offset:T,stackedData:de,layout:I,dataStartIndex:O,dataEndIndex:k}))),{},Ht(Ht(Ht({key:H.key||"item-".concat(U)},_,ie[_]),D,ie[D]),"animationId",E)),childIndex:nBe(H,w.children),item:H})}),F},h=function(w,x){var S=w.props,P=w.dataStartIndex,T=w.dataEndIndex,E=w.updateId;if(!Q3({props:S}))return null;var O=S.children,k=S.layout,A=S.stackOffset,I=S.data,R=S.reverseStackOrder,N=j8(k),L=N.numericAxisName,B=N.cateAxisName,_=qi(O,r),D=fKe(I,_,"".concat(L,"Id"),"".concat(B,"Id"),A,R),z=l.reduce(function(Y,ae){var Z="".concat(ae.axisType,"Map");return Fe(Fe({},Y),{},Ht({},Z,Vrt(S,Fe(Fe({},ae),{},{graphicalItems:_,stackGroups:ae.axisType===L&&D,dataStartIndex:P,dataEndIndex:T}))))},{}),F=Wrt(Fe(Fe({},z),{},{props:S,graphicalItems:_}),x==null?void 0:x.legendBBox);Object.keys(z).forEach(function(Y){z[Y]=u(S,z[Y],F,Y.replace("Map",""),n)});var H=z["".concat(B,"Map")],U=Hrt(H),q=f(S,Fe(Fe({},z),{},{dataStartIndex:P,dataEndIndex:T,updateId:E,graphicalItems:_,stackGroups:D,offset:F}));return Fe(Fe({formattedGraphicalItems:q,graphicalItems:_,offset:F,stackGroups:D},U),z)},m=function(v){function w(x){var S,P,T;return Trt(this,w),T=Irt(this,w,[x]),Ht(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ht(T,"accessibilityManager",new drt),Ht(T,"handleLegendBBoxUpdate",function(E){if(E){var O=T.state,k=O.dataStartIndex,A=O.dataEndIndex,I=O.updateId;T.setState(Fe({legendBBox:E},h({props:T.props,dataStartIndex:k,dataEndIndex:A,updateId:I},Fe(Fe({},T.state),{},{legendBBox:E}))))}}),Ht(T,"handleReceiveSyncEvent",function(E,O,k){if(T.props.syncId===E){if(k===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(O)}}),Ht(T,"handleBrushChange",function(E){var O=E.startIndex,k=E.endIndex;if(O!==T.state.dataStartIndex||k!==T.state.dataEndIndex){var A=T.state.updateId;T.setState(function(){return Fe({dataStartIndex:O,dataEndIndex:k},h({props:T.props,dataStartIndex:O,dataEndIndex:k,updateId:A},T.state))}),T.triggerSyncEvent({dataStartIndex:O,dataEndIndex:k})}}),Ht(T,"handleMouseEnter",function(E){var O=T.getMouseInfo(E);if(O){var k=Fe(Fe({},O),{},{isTooltipActive:!0});T.setState(k),T.triggerSyncEvent(k);var A=T.props.onMouseEnter;Gt(A)&&A(k,E)}}),Ht(T,"triggeredAfterMouseMove",function(E){var O=T.getMouseInfo(E),k=O?Fe(Fe({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(k),T.triggerSyncEvent(k);var A=T.props.onMouseMove;Gt(A)&&A(k,E)}),Ht(T,"handleItemMouseEnter",function(E){T.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ht(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Ht(T,"handleMouseMove",function(E){E.persist(),T.throttleTriggeredAfterMouseMove(E)}),Ht(T,"handleMouseLeave",function(E){T.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};T.setState(O),T.triggerSyncEvent(O);var k=T.props.onMouseLeave;Gt(k)&&k(O,E)}),Ht(T,"handleOuterEvent",function(E){var O=tBe(E),k=es(T.props,"".concat(O));if(O&&Gt(k)){var A,I;/.*touch.*/i.test(O)?I=T.getMouseInfo(E.changedTouches[0]):I=T.getMouseInfo(E),k((A=I)!==null&&A!==void 0?A:{},E)}}),Ht(T,"handleClick",function(E){var O=T.getMouseInfo(E);if(O){var k=Fe(Fe({},O),{},{isTooltipActive:!0});T.setState(k),T.triggerSyncEvent(k);var A=T.props.onClick;Gt(A)&&A(k,E)}}),Ht(T,"handleMouseDown",function(E){var O=T.props.onMouseDown;if(Gt(O)){var k=T.getMouseInfo(E);O(k,E)}}),Ht(T,"handleMouseUp",function(E){var O=T.props.onMouseUp;if(Gt(O)){var k=T.getMouseInfo(E);O(k,E)}}),Ht(T,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ht(T,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseDown(E.changedTouches[0])}),Ht(T,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseUp(E.changedTouches[0])}),Ht(T,"triggerSyncEvent",function(E){T.props.syncId!==void 0&&K$.emit(Y$,T.props.syncId,E,T.eventEmitterSymbol)}),Ht(T,"applySyncEvent",function(E){var O=T.props,k=O.layout,A=O.syncMethod,I=T.state.updateId,R=E.dataStartIndex,N=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)T.setState(Fe({dataStartIndex:R,dataEndIndex:N},h({props:T.props,dataStartIndex:R,dataEndIndex:N,updateId:I},T.state)));else if(E.activeTooltipIndex!==void 0){var L=E.chartX,B=E.chartY,_=E.activeTooltipIndex,D=T.state,z=D.offset,F=D.tooltipTicks;if(!z)return;if(typeof A=="function")_=A(F,E);else if(A==="value"){_=-1;for(var H=0;H=0){var de,ee;if(L.dataKey&&!L.allowDuplicatedCategory){var ce=typeof L.dataKey=="function"?re:"payload.".concat(L.dataKey.toString());de=FT(H,ce,_),ee=U&&q&&FT(q,ce,_)}else de=H==null?void 0:H[B],ee=U&&q&&q[B];if(te||K){var me=E.props.activeIndex!==void 0?E.props.activeIndex:B;return[y.cloneElement(E,Fe(Fe(Fe({},A.props),ie),{},{activeIndex:me})),null,null]}if(!Vt(de))return[le].concat(uv(T.renderActivePoints({item:A,activePoint:de,basePoint:ee,childIndex:B,isRange:U})))}else{var we,ge=(we=T.getItemByXY(T.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:le},Se=ge.graphicalItem,xe=Se.item,Ie=xe===void 0?E:xe,Re=Se.childIndex,_e=Fe(Fe(Fe({},A.props),ie),{},{activeIndex:Re});return[y.cloneElement(Ie,_e),null,null]}return U?[le,null,null]:[le,null]}),Ht(T,"renderCustomized",function(E,O,k){return y.cloneElement(E,Fe(Fe({key:"recharts-customized-".concat(k)},T.props),T.state))}),Ht(T,"renderMap",{CartesianGrid:{handler:HC,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:HC},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:HC},YAxis:{handler:HC},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:Vh("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=ZI(T.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),T.state={},T}return Art(w,v),Ort(w,[{key:"componentDidMount",value:function(){var S,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,P=S.children,T=S.data,E=S.height,O=S.layout,k=Ba(P,zs);if(k){var A=k.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,R=nN(this.state,T,A,I),N=this.state.tooltipTicks[A].coordinate,L=(this.state.offset.top+E)/2,B=O==="horizontal",_=B?{x:N,y:L}:{y:N,x:L},D=this.state.formattedGraphicalItems.find(function(F){var H=F.item;return H.type.name==="Scatter"});D&&(_=Fe(Fe({},_),D.props.points[A].tooltipPosition),R=D.props.points[A].tooltipPayload);var z={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:I,activePayload:R,activeCoordinate:_};this.setState(z),this.renderCursor(k),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var T,E;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(S){k_([Ba(S.children,zs)],[Ba(this.props.children,zs)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Ba(this.props.children,zs);if(S&&typeof S.props.shared=="boolean"){var P=S.props.shared?"axis":"item";return s.indexOf(P)>=0?P:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var P=this.container,T=P.getBoundingClientRect(),E=IGe(T),O={chartX:Math.round(S.pageX-E.left),chartY:Math.round(S.pageY-E.top)},k=T.width/P.offsetWidth||1,A=this.inRange(O.chartX,O.chartY,k);if(!A)return null;var I=this.state,R=I.xAxisMap,N=I.yAxisMap,L=this.getTooltipEventType();if(L!=="axis"&&R&&N){var B=zd(R).scale,_=zd(N).scale,D=B&&B.invert?B.invert(O.chartX):null,z=_&&_.invert?_.invert(O.chartY):null;return Fe(Fe({},O),{},{xValue:D,yValue:z})}var F=L8(this.state,this.props.data,this.props.layout,A);return F?Fe(Fe({},O),F):null}},{key:"inRange",value:function(S,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,O=S/T,k=P/T;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,I=O>=A.left&&O<=A.left+A.width&&k>=A.top&&k<=A.top+A.height;return I?{x:O,y:k}:null}var R=this.state,N=R.angleAxisMap,L=R.radiusAxisMap;if(N&&L){var B=zd(N);return aG({x:O,y:k},B)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,P=this.getTooltipEventType(),T=Ba(S,zs),E={};T&&P==="axis"&&(T.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var O=jT(this.props,this.handleOuterEvent);return Fe(Fe({},O),E)}},{key:"addListener",value:function(){K$.on(Y$,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){K$.removeListener(Y$,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,P,T){for(var E=this.state.formattedGraphicalItems,O=0,k=E.length;O{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=Ei(),[o,i]=Ge(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return X(Kt,{direction:"row",children:[C(Hh,{width:"50%",height:140,children:X(Soe,{children:[C(qc,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>C(Uv,{fill:s[c%s.length]},`cell-${c}`))}),X("g",{children:[C("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:bi(n,i.language)})}),C("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),X(Kt,{width:"50%",spacing:1,children:[C(Kg,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),C(Kg,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),C(Kg,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})};function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const eb=j.oneOfType([j.func,j.object]);function Xrt(e){if(typeof e!="string")throw new Error(Yrt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Q$(e){return e&&e.ownerDocument||document}function Qrt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const zc=typeof window<"u"?y.useLayoutEffect:y.useEffect;let B8=0;function Jrt(e){const[t,n]=y.useState(e),r=e||t;return y.useEffect(()=>{t==null&&(B8+=1,n(`mui-${B8}`))},[t]),r}const Zrt={...ch},z8=Zrt.useId;function tb(e){if(z8!==void 0){const t=z8();return e??t}return Jrt(e)}function Eh({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=y.useRef(e!==void 0),[i,a]=y.useState(t),s=o?e:i,l=y.useCallback(c=>{o||a(c)},[]);return[s,l]}function Ct(e){const t=y.useRef(e);return zc(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function Qi(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Qrt(n,t)})},e)}const eot={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function _n(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;le,tot=()=>{let e=V8;return{configure(t){e=t},generate(t){return e(t)},reset(){e=V8}}},not=tot(),rot={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Ln(e,t,n="Mui"){const r=rot[t];return r?`${n}-${r}`:`${not.generate(e)}-${t}`}function Hn(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Ln(e,o,n)}),r}function oot(e){return typeof e=="string"}function iot(e,t,n){return e===void 0||oot(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function aot(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function H8(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function sot(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const h=fe(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return h.length>0&&(g.className=h),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=aot({...o,...r}),s=H8(r),l=H8(o),c=t(a),u=fe(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function Of(e,t,n){return typeof e=="function"?e(t,n):e}function zn(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:Of(n,r),{props:s,internalRef:l}=sot({...i,externalSlotProps:a}),c=Qi(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return iot(t,{...s,ref:c},r)}const lot=["localeText"],rN=y.createContext(null),jS=function(t){const{localeText:n}=t,r=Rt(t,lot),{utils:o,localeText:i}=y.useContext(rN)??{utils:void 0,localeText:void 0},a=Zt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:f}=a,h=y.useMemo(()=>ue({},f,i,n),[f,i,n]),m=y.useMemo(()=>{if(!l)return o||null;const w=new l({locale:d,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` -`));return w},[l,d,c,u,o]),g=y.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),v=y.useMemo(()=>({utils:m,defaultDates:g,localeText:h}),[g,m,h]);return $.jsx(rN.Provider,{value:v,children:s})},cot=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ue({},e)}}}}),nb=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},Coe={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},uot=Coe;cot(Coe);const Gh=()=>{const e=y.useContext(rN);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` + A `).concat(m,",").concat(m,",0,0,").concat(c,",").concat(t,",").concat(n+o-s*m," Z")}else u="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(o," h ").concat(-r," Z");return u},uQe=function(t,n){if(!t||!n)return!1;var r=t.x,o=t.y,i=n.x,a=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(i,i+s),u=Math.max(i,i+s),d=Math.min(a,a+l),f=Math.max(a,a+l);return r>=c&&r<=u&&o>=d&&o<=f}return!1},dQe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},fB=function(t){var n=WG(WG({},dQe),t),r=y.useRef(),o=y.useState(-1),i=nQe(o,2),a=i[0],s=i[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,c=n.y,u=n.width,d=n.height,f=n.radius,p=n.className,m=n.animationEasing,g=n.animationDuration,v=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||u!==+u||d!==+d||u===0||d===0)return null;var S=de("recharts-rectangle",p);return x?Y.createElement(ul,{canBegin:a>0,from:{width:u,height:d,x:l,y:c},to:{width:u,height:d,x:l,y:c},duration:g,animationEasing:m,isActive:x},function(P){var T=P.width,E=P.height,O=P.x,k=P.y;return Y.createElement(ul,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,isActive:w,easing:m},Y.createElement("path",ME({},$t(n,!0),{className:S,d:GG(O,k,T,E,f),ref:r})))}):Y.createElement("path",ME({},$t(n,!0),{className:S,d:GG(l,c,u,d,f)}))},fQe=["points","className","baseLinePoints","connectNulls"];function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function qG(e){return vQe(e)||yQe(e)||gQe(e)||mQe()}function mQe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gQe(e,t){if(e){if(typeof e=="string")return FD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FD(e,t)}}function yQe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vQe(e){if(Array.isArray(e))return FD(e)}function FD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(r){KG(r)?n[n.length-1].push(r):n[n.length-1].length>0&&n.push([])}),KG(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},ww=function(t,n){var r=bQe(t);n&&(r=[r.reduce(function(i,a){return[].concat(qG(i),qG(a))},[])]);var o=r.map(function(i){return i.reduce(function(a,s,l){return"".concat(a).concat(l===0?"M":"L").concat(s.x,",").concat(s.y)},"")}).join("");return r.length===1?"".concat(o,"Z"):o},wQe=function(t,n,r){var o=ww(t,r);return"".concat(o.slice(-1)==="Z"?o.slice(0,-1):o,"L").concat(ww(n.reverse(),r).slice(1))},xQe=function(t){var n=t.points,r=t.className,o=t.baseLinePoints,i=t.connectNulls,a=pQe(t,fQe);if(!n||!n.length)return null;var s=de("recharts-polygon",r);if(o&&o.length){var l=a.stroke&&a.stroke!=="none",c=wQe(n,o,i);return Y.createElement("g",{className:s},Y.createElement("path",Dg({},$t(a,!0),{fill:c.slice(-1)==="Z"?a.fill:"none",stroke:"none",d:c})),l?Y.createElement("path",Dg({},$t(a,!0),{fill:"none",d:ww(n,i)})):null,l?Y.createElement("path",Dg({},$t(a,!0),{fill:"none",d:ww(o,i)})):null)}var u=ww(n,i);return Y.createElement("path",Dg({},$t(a,!0),{fill:u.slice(-1)==="Z"?a.fill:"none",className:s,d:u}))};function jD(){return jD=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function IQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var kQe=function(t,n,r,o,i,a){return"M".concat(t,",").concat(i,"v").concat(o,"M").concat(a,",").concat(n,"h").concat(r)},MQe=function(t){var n=t.x,r=n===void 0?0:n,o=t.y,i=o===void 0?0:o,a=t.top,s=a===void 0?0:a,l=t.left,c=l===void 0?0:l,u=t.width,d=u===void 0?0:u,f=t.height,p=f===void 0?0:f,m=t.className,g=OQe(t,SQe),v=CQe({x:r,y:i,top:s,left:c,width:d,height:p},g);return!st(r)||!st(i)||!st(d)||!st(p)||!st(s)||!st(c)?null:Y.createElement("path",BD({},$t(v,!0),{className:de("recharts-cross",m),d:kQe(r,i,d,p,s,c)}))},AQe=vk,$Qe=Hne,RQe=Yc;function _Qe(e,t){return e&&e.length?AQe(e,RQe(t),$Qe):void 0}var DQe=_Qe;const NQe=_n(DQe);var LQe=vk,FQe=Yc,jQe=Une;function BQe(e,t){return e&&e.length?LQe(e,FQe(t),jQe):void 0}var zQe=BQe;const VQe=_n(zQe);var HQe=["cx","cy","angle","ticks","axisLine"],UQe=["ticks","tick","angle","tickFormatter","stroke"];function ov(e){"@babel/helpers - typeof";return ov=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ov(e)}function xw(){return xw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function WQe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function GQe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function JG(e,t){for(var n=0;nt8?a=o==="outer"?"start":"end":i<-t8?a=o==="outer"?"end":"start":a="middle",a}},{key:"renderAxisLine",value:function(){var r=this.props,o=r.cx,i=r.cy,a=r.radius,s=r.axisLine,l=r.axisLineType,c=Pp(Pp({},$t(this.props,!1)),{},{fill:"none"},$t(s,!1));if(l==="circle")return Y.createElement(WS,jp({className:"recharts-polar-angle-axis-line"},c,{cx:o,cy:i,r:a}));var u=this.props.ticks,d=u.map(function(f){return Sr(o,i,a,f.coordinate)});return Y.createElement(xQe,jp({className:"recharts-polar-angle-axis-line"},c,{points:d}))}},{key:"renderTicks",value:function(){var r=this,o=this.props,i=o.ticks,a=o.tick,s=o.tickLine,l=o.tickFormatter,c=o.stroke,u=$t(this.props,!1),d=$t(a,!1),f=Pp(Pp({},u),{},{fill:"none"},$t(s,!1)),p=i.map(function(m,g){var v=r.getTickLineCoord(m),w=r.getTickTextAnchor(m),x=Pp(Pp(Pp({textAnchor:w},u),{},{stroke:"none",fill:c},d),{},{index:g,payload:m,x:v.x2,y:v.y2});return Y.createElement(on,jp({className:de("recharts-polar-angle-axis-tick",vre(a)),key:"tick-".concat(m.coordinate)},Mf(r.props,m,g)),s&&Y.createElement("line",jp({className:"recharts-polar-angle-axis-tick-line"},f,v)),a&&t.renderTickItem(a,x,l?l(m.value,g):m.value))});return Y.createElement(on,{className:"recharts-polar-angle-axis-ticks"},p)}},{key:"render",value:function(){var r=this.props,o=r.ticks,i=r.radius,a=r.axisLine;return i<=0||!o||!o.length?null:Y.createElement(on,{className:de("recharts-polar-angle-axis",this.props.className)},a&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Ht(r)?a=r(o):a=Y.createElement(Ah,jp({},o,{className:"recharts-polar-angle-axis-tick-value"}),i),a}}])}(y.PureComponent);Pk(Tk,"displayName","PolarAngleAxis");Pk(Tk,"axisType","angleAxis");Pk(Tk,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var sJe=Bte,lJe=sJe(Object.getPrototypeOf,Object),cJe=lJe,uJe=ad,dJe=cJe,fJe=sd,pJe="[object Object]",hJe=Function.prototype,mJe=Object.prototype,_re=hJe.toString,gJe=mJe.hasOwnProperty,yJe=_re.call(Object);function vJe(e){if(!fJe(e)||uJe(e)!=pJe)return!1;var t=dJe(e);if(t===null)return!0;var n=gJe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_re.call(n)==yJe}var bJe=vJe;const wJe=_n(bJe);var xJe=ad,SJe=sd,CJe="[object Boolean]";function PJe(e){return e===!0||e===!1||SJe(e)&&xJe(e)==CJe}var TJe=PJe;const EJe=_n(TJe);function $x(e){"@babel/helpers - typeof";return $x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$x(e)}function RE(){return RE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:f,x:l,y:c},to:{upperWidth:u,lowerWidth:d,height:f,x:l,y:c},duration:g,animationEasing:m,isActive:w},function(S){var P=S.upperWidth,T=S.lowerWidth,E=S.height,O=S.x,k=S.y;return Y.createElement(ul,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:v,duration:g,easing:m},Y.createElement("path",RE({},$t(n,!0),{className:x,d:i8(O,k,P,T,E),ref:r})))}):Y.createElement("g",null,Y.createElement("path",RE({},$t(n,!0),{className:x,d:i8(l,c,u,d,f)})))},LJe=["option","shapeType","propTransformer","activeClassName","isActive"];function Rx(e){"@babel/helpers - typeof";return Rx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rx(e)}function FJe(e,t){if(e==null)return{};var n=jJe(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jJe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function a8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _E(e){for(var t=1;t0?ts(S,"paddingAngle",0):0;if(T){var O=Ur(T.endAngle-T.startAngle,S.endAngle-S.startAngle),k=vr(vr({},S),{},{startAngle:x+E,endAngle:x+O(g)+E});v.push(k),x=k.endAngle}else{var A=S.endAngle,I=S.startAngle,R=Ur(0,A-I),N=R(g),L=vr(vr({},S),{},{startAngle:x+E,endAngle:x+N+E});v.push(L),x=L.endAngle}}),Y.createElement(on,null,r.renderSectorsStatically(v))})}},{key:"attachKeyboardHandlers",value:function(r){var o=this;r.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var a=++o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[a].focus(),o.setState({sectorToFocus:a});break}case"ArrowRight":{var s=--o.state.sectorToFocus<0?o.sectorRefs.length-1:o.state.sectorToFocus%o.sectorRefs.length;o.sectorRefs[s].focus(),o.setState({sectorToFocus:s});break}case"Escape":{o.sectorRefs[o.state.sectorToFocus].blur(),o.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var r=this.props,o=r.sectors,i=r.isAnimationActive,a=this.state.prevSectors;return i&&o&&o.length&&(!a||!Af(a,o))?this.renderSectorsWithAnimation():this.renderSectorsStatically(o)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var r=this,o=this.props,i=o.hide,a=o.sectors,s=o.className,l=o.label,c=o.cx,u=o.cy,d=o.innerRadius,f=o.outerRadius,p=o.isAnimationActive,m=this.state.isAnimationFinished;if(i||!a||!a.length||!st(c)||!st(u)||!st(d)||!st(f))return null;var g=de("recharts-pie",s);return Y.createElement(on,{tabIndex:this.props.rootTabIndex,className:g,ref:function(w){r.pieRef=w}},this.renderSectors(),l&&this.renderLabels(a),Wo.renderCallByParent(this.props,null,!1),(!p||m)&&Jl.renderCallByParent(this.props,a,!1))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return o.prevIsAnimationActive!==r.isAnimationActive?{prevIsAnimationActive:r.isAnimationActive,prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:[],isAnimationFinished:!0}:r.isAnimationActive&&r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curSectors:r.sectors,prevSectors:o.curSectors,isAnimationFinished:!0}:r.sectors!==o.curSectors?{curSectors:r.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(r,o){return r>o?"start":r=360?x:x-1)*l,P=v-x*p-S,T=o.reduce(function(k,A){var I=Mr(A,w,0);return k+(st(I)?I:0)},0),E;if(T>0){var O;E=o.map(function(k,A){var I=Mr(k,w,0),R=Mr(k,u,A),N=(st(I)?I:0)/T,L;A?L=O.endAngle+zi(g)*l*(I!==0?1:0):L=a;var j=L+zi(g)*((I!==0?p:0)+N*P),_=(L+j)/2,D=(m.innerRadius+m.outerRadius)/2,z=[{name:R,value:I,payload:k,dataKey:w,type:f}],F=Sr(m.cx,m.cy,D,_);return O=vr(vr(vr({percent:N,cornerRadius:i,name:R,tooltipPayload:z,midAngle:_,middleRadius:D,tooltipPosition:F},k),m),{},{value:Mr(k,w),startAngle:L,endAngle:j,payload:k,paddingAngle:zi(g)*l}),O})}return vr(vr({},m),{},{sectors:E,data:o})});var aZe=Math.ceil,sZe=Math.max;function lZe(e,t,n,r){for(var o=-1,i=sZe(aZe((t-e)/(n||1)),0),a=Array(i);i--;)a[r?i:++o]=e,e+=n;return a}var cZe=lZe,uZe=ine,u8=1/0,dZe=17976931348623157e292;function fZe(e){if(!e)return e===0?e:0;if(e=uZe(e),e===u8||e===-u8){var t=e<0?-1:1;return t*dZe}return e===e?e:0}var Lre=fZe,pZe=cZe,hZe=uk,tR=Lre;function mZe(e){return function(t,n,r){return r&&typeof r!="number"&&hZe(t,n,r)&&(n=r=void 0),t=tR(t),n===void 0?(n=t,t=0):n=tR(n),r=r===void 0?t0&&r.handleDrag(o.changedTouches[0])}),Na(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var o=r.props,i=o.endIndex,a=o.onDragEnd,s=o.startIndex;a==null||a({endIndex:i,startIndex:s})}),r.detachDragEndListener()}),Na(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Na(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Na(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Na(r,"handleSlideDragStart",function(o){var i=m8(o)?o.changedTouches[0]:o;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return kZe(t,e),TZe(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var o=r.startX,i=r.endX,a=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,u=c.length-1,d=Math.min(o,i),f=Math.max(o,i),p=t.getIndexInRange(a,d),m=t.getIndexInRange(a,f);return{startIndex:p-p%l,endIndex:m===u?u:m-m%l}}},{key:"getTextOfTick",value:function(r){var o=this.props,i=o.data,a=o.tickFormatter,s=o.dataKey,l=Mr(i[r],s,r);return Ht(a)?a(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var o=this.state,i=o.slideMoveStartX,a=o.startX,s=o.endX,l=this.props,c=l.x,u=l.width,d=l.travellerWidth,f=l.startIndex,p=l.endIndex,m=l.onChange,g=r.pageX-i;g>0?g=Math.min(g,c+u-d-s,c+u-d-a):g<0&&(g=Math.max(g,c-a,c-s));var v=this.getIndex({startX:a+g,endX:s+g});(v.startIndex!==f||v.endIndex!==p)&&m&&m(v),this.setState({startX:a+g,endX:s+g,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,o){var i=m8(o)?o.changedTouches[0]:o;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var o=this.state,i=o.brushMoveStartX,a=o.movingTravellerId,s=o.endX,l=o.startX,c=this.state[a],u=this.props,d=u.x,f=u.width,p=u.travellerWidth,m=u.onChange,g=u.gap,v=u.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-i;x>0?x=Math.min(x,d+f-p-c):x<0&&(x=Math.max(x,d-c)),w[a]=c+x;var S=this.getIndex(w),P=S.startIndex,T=S.endIndex,E=function(){var k=v.length-1;return a==="startX"&&(s>l?P%g===0:T%g===0)||sl?T%g===0:P%g===0)||s>l&&T===k};this.setState(Na(Na({},a,c+x),"brushMoveStartX",r.pageX),function(){m&&E()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,o){var i=this,a=this.state,s=a.scaleValues,l=a.startX,c=a.endX,u=this.state[o],d=s.indexOf(u);if(d!==-1){var f=d+r;if(!(f===-1||f>=s.length)){var p=s[f];o==="startX"&&p>=c||o==="endX"&&p<=l||this.setState(Na({},o,p),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.fill,c=r.stroke;return Y.createElement("rect",{stroke:c,fill:l,x:o,y:i,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,o=r.x,i=r.y,a=r.width,s=r.height,l=r.data,c=r.children,u=r.padding,d=y.Children.only(c);return d?Y.cloneElement(d,{x:o,y:i,width:a,height:s,margin:u,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,o){var i,a,s=this,l=this.props,c=l.y,u=l.travellerWidth,d=l.height,f=l.traveller,p=l.ariaLabel,m=l.data,g=l.startIndex,v=l.endIndex,w=Math.max(r,this.props.x),x=nR(nR({},$t(this.props,!1)),{},{x:w,y:c,width:u,height:d}),S=p||"Min value: ".concat((i=m[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((a=m[v])===null||a===void 0?void 0:a.name);return Y.createElement(on,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[o],onTouchStart:this.travellerDragStartHandlers[o],onKeyDown:function(T){["ArrowLeft","ArrowRight"].includes(T.key)&&(T.preventDefault(),T.stopPropagation(),s.handleTravellerMoveKeyboard(T.key==="ArrowRight"?1:-1,o))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(f,x))}},{key:"renderSlide",value:function(r,o){var i=this.props,a=i.y,s=i.height,l=i.stroke,c=i.travellerWidth,u=Math.min(r,o)+c,d=Math.max(Math.abs(o-r)-c,0);return Y.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:u,y:a,width:d,height:s})}},{key:"renderText",value:function(){var r=this.props,o=r.startIndex,i=r.endIndex,a=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,u=this.state,d=u.startX,f=u.endX,p=5,m={pointerEvents:"none",fill:c};return Y.createElement(on,{className:"recharts-brush-texts"},Y.createElement(Ah,FE({textAnchor:"end",verticalAnchor:"middle",x:Math.min(d,f)-p,y:a+s/2},m),this.getTextOfTick(o)),Y.createElement(Ah,FE({textAnchor:"start",verticalAnchor:"middle",x:Math.max(d,f)+l+p,y:a+s/2},m),this.getTextOfTick(i)))}},{key:"render",value:function(){var r=this.props,o=r.data,i=r.className,a=r.children,s=r.x,l=r.y,c=r.width,u=r.height,d=r.alwaysShowText,f=this.state,p=f.startX,m=f.endX,g=f.isTextActive,v=f.isSlideMoving,w=f.isTravellerMoving,x=f.isTravellerFocused;if(!o||!o.length||!st(s)||!st(l)||!st(c)||!st(u)||c<=0||u<=0)return null;var S=de("recharts-brush",i),P=Y.Children.count(a)===1,T=CZe("userSelect","none");return Y.createElement(on,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:T},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(g||v||w||x||d)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var o=r.x,i=r.y,a=r.width,s=r.height,l=r.stroke,c=Math.floor(i+s/2)-1;return Y.createElement(Y.Fragment,null,Y.createElement("rect",{x:o,y:i,width:a,height:s,fill:l,stroke:"none"}),Y.createElement("line",{x1:o+1,y1:c,x2:o+a-1,y2:c,fill:"none",stroke:"#fff"}),Y.createElement("line",{x1:o+1,y1:c+2,x2:o+a-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,o){var i;return Y.isValidElement(r)?i=Y.cloneElement(r,o):Ht(r)?i=r(o):i=t.renderDefaultTraveller(o),i}},{key:"getDerivedStateFromProps",value:function(r,o){var i=r.data,a=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,u=r.startIndex,d=r.endIndex;if(i!==o.prevData||c!==o.prevUpdateId)return nR({prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a},i&&i.length?AZe({data:i,width:a,x:s,travellerWidth:l,startIndex:u,endIndex:d}):{scale:null,scaleValues:null});if(o.scale&&(a!==o.prevWidth||s!==o.prevX||l!==o.prevTravellerWidth)){o.scale.range([s,s+a-l]);var f=o.scale.domain().map(function(p){return o.scale(p)});return{prevData:i,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:a,startX:o.scale(r.startIndex),endX:o.scale(r.endIndex),scaleValues:f}}return null}},{key:"getIndexInRange",value:function(r,o){for(var i=r.length,a=0,s=i-1;s-a>1;){var l=Math.floor((a+s)/2);r[l]>o?s=l:a=l}return o>=r[s]?s:a}}])}(y.PureComponent);Na(lv,"displayName","Brush");Na(lv,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var $Ze=Fj;function RZe(e,t){var n;return $Ze(e,function(r,o,i){return n=t(r,o,i),!n}),!!n}var _Ze=RZe,DZe=$te,NZe=Yc,LZe=_Ze,FZe=Ea,jZe=uk;function BZe(e,t,n){var r=FZe(e)?DZe:LZe;return n&&jZe(e,t,n)&&(t=void 0),r(e,NZe(t))}var zZe=BZe;const VZe=_n(zZe);var Dc=function(t,n){var r=t.alwaysShow,o=t.ifOverflow;return r&&(o="extendDomain"),o===n},g8=ene;function HZe(e,t,n){t=="__proto__"&&g8?g8(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var UZe=HZe,WZe=UZe,GZe=Jte,qZe=Yc;function KZe(e,t){var n={};return t=qZe(t),GZe(e,function(r,o,i){WZe(n,o,t(r,o,i))}),n}var YZe=KZe;const XZe=_n(YZe);function QZe(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function met(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function get(e,t){var n=e.x,r=e.y,o=het(e,uet),i="".concat(n),a=parseInt(i,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||o.height),u=parseInt(c,10),d="".concat(t.width||o.width),f=parseInt(d,10);return w0(w0(w0(w0(w0({},t),o),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function v8(e){return Y.createElement(DE,WD({shapeType:"rectangle",propTransformer:get,activeClassName:"recharts-active-bar"},e))}var yet=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,o){if(typeof t=="number")return t;var i=typeof r=="number";return i?t(r,o):(i||Rh(),n)}},vet=["value","background"],Vre;function cv(e){"@babel/helpers - typeof";return cv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cv(e)}function bet(e,t){if(e==null)return{};var n=wet(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wet(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function BE(){return BE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(_)0&&Math.abs(j)0&&(L=Math.min((Z||0)-(j[K-1]||0),L))}),Number.isFinite(L)){var _=L/N,D=g.layout==="vertical"?r.height:r.width;if(g.padding==="gap"&&(O=_*D/2),g.padding==="no-gap"){var z=Vi(t.barCategoryGap,_*D),F=_*D/2;O=F-z-(F-z)/D*z}}}o==="xAxis"?k=[r.left+(S.left||0)+(O||0),r.left+r.width-(S.right||0)-(O||0)]:o==="yAxis"?k=l==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(O||0),r.top+r.height-(S.bottom||0)-(O||0)]:k=g.range,T&&(k=[k[1],k[0]]);var H=dre(g,i,f),U=H.scale,q=H.realScaleType;U.domain(w).range(k),fre(U);var X=pre(U,Ll(Ll({},g),{},{realScaleType:q}));o==="xAxis"?(R=v==="top"&&!P||v==="bottom"&&P,A=r.left,I=d[E]-R*g.height):o==="yAxis"&&(R=v==="left"&&!P||v==="right"&&P,A=d[E]-R*g.width,I=r.top);var ae=Ll(Ll(Ll({},g),X),{},{realScaleType:q,x:A,y:I,scale:U,width:o==="xAxis"?r.width:g.width,height:o==="yAxis"?r.height:g.height});return ae.bandSize=PE(ae,X),!g.hide&&o==="xAxis"?d[E]+=(R?-1:1)*ae.height:g.hide||(d[E]+=(R?-1:1)*ae.width),Ll(Ll({},p),{},Ik({},m,ae))},{})},Gre=function(t,n){var r=t.x,o=t.y,i=n.x,a=n.y;return{x:Math.min(r,i),y:Math.min(o,a),width:Math.abs(i-r),height:Math.abs(a-o)}},$et=function(t){var n=t.x1,r=t.y1,o=t.x2,i=t.y2;return Gre({x:n,y:r},{x:o,y:i})},qre=function(){function e(t){ket(this,e),this.scale=t}return Met(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=r.bandAware,i=r.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(o){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),o=r[0],i=r[r.length-1];return o<=i?n>=o&&n<=i:n>=i&&n<=o}}],[{key:"create",value:function(n){return new e(n)}}])}();Ik(qre,"EPS",1e-4);var pB=function(t){var n=Object.keys(t).reduce(function(r,o){return Ll(Ll({},r),{},Ik({},o,qre.create(t[o])))},{});return Ll(Ll({},n),{},{apply:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.bandAware,s=i.position;return XZe(o,function(l,c){return n[c].apply(l,{bandAware:a,position:s})})},isInRange:function(o){return zre(o,function(i,a){return n[a].isInRange(i)})}})};function Ret(e){return(e%180+180)%180}var _et=function(t){var n=t.width,r=t.height,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Ret(o),a=i*Math.PI/180,s=Math.atan(r/n),l=a>s&&a-1?o[i?t[a]:a]:void 0}}var jet=Fet,Bet=Lre;function zet(e){var t=Bet(e),n=t%1;return t===t?n?t-n:t:0}var Vet=zet,Het=Gte,Uet=Yc,Wet=Vet,Get=Math.max;function qet(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:Wet(n);return o<0&&(o=Get(r+o,0)),Het(e,Uet(t),o)}var Ket=qet,Yet=jet,Xet=Ket,Qet=Yet(Xet),Jet=Qet;const Zet=_n(Jet);var ett=dje(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),hB=y.createContext(void 0),mB=y.createContext(void 0),Kre=y.createContext(void 0),Yre=y.createContext({}),Xre=y.createContext(void 0),Qre=y.createContext(0),Jre=y.createContext(0),C8=function(t){var n=t.state,r=n.xAxisMap,o=n.yAxisMap,i=n.offset,a=t.clipPathId,s=t.children,l=t.width,c=t.height,u=ett(i);return Y.createElement(hB.Provider,{value:r},Y.createElement(mB.Provider,{value:o},Y.createElement(Yre.Provider,{value:i},Y.createElement(Kre.Provider,{value:u},Y.createElement(Xre.Provider,{value:a},Y.createElement(Qre.Provider,{value:c},Y.createElement(Jre.Provider,{value:l},s)))))))},ttt=function(){return y.useContext(Xre)},Zre=function(t){var n=y.useContext(hB);n==null&&Rh();var r=n[t];return r==null&&Rh(),r},ntt=function(){var t=y.useContext(hB);return Hd(t)},rtt=function(){var t=y.useContext(mB),n=Zet(t,function(r){return zre(r.domain,Number.isFinite)});return n||Hd(t)},eoe=function(t){var n=y.useContext(mB);n==null&&Rh();var r=n[t];return r==null&&Rh(),r},ott=function(){var t=y.useContext(Kre);return t},itt=function(){return y.useContext(Yre)},gB=function(){return y.useContext(Jre)},yB=function(){return y.useContext(Qre)};function uv(e){"@babel/helpers - typeof";return uv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uv(e)}function att(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function stt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*o)return!1;var i=n();return e*(t-e*i/2-r)>=0&&e*(t+e*i/2-o)<=0}function Vtt(e,t){return soe(e,t+1)}function Htt(e,t,n,r,o){for(var i=(r||[]).slice(),a=t.start,s=t.end,l=0,c=1,u=a,d=function(){var m=r==null?void 0:r[l];if(m===void 0)return{v:soe(r,c)};var g=l,v,w=function(){return v===void 0&&(v=n(m,g)),v},x=m.coordinate,S=l===0||WE(e,x,w,u,s);S||(l=0,u=a,c+=1),S&&(u=x+e*(w()/2+o),l+=c)},f;c<=i.length;)if(f=d(),f)return f.v;return[]}function Fx(e){"@babel/helpers - typeof";return Fx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fx(e)}function A8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function gi(e){for(var t=1;t0?p.coordinate-v*e:p.coordinate})}else i[f]=p=gi(gi({},p),{},{tickCoord:p.coordinate});var w=WE(e,p.tickCoord,g,s,l);w&&(l=p.tickCoord-e*(g()/2+o),i[f]=gi(gi({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return i}function Ktt(e,t,n,r,o,i){var a=(r||[]).slice(),s=a.length,l=t.start,c=t.end;if(i){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=gi(gi({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=WE(e,u.tickCoord,function(){return d},l,c);p&&(c=u.tickCoord-e*(d/2+o),a[s-1]=gi(gi({},u),{},{isShow:!0}))}for(var m=i?s-1:s,g=function(x){var S=a[x],P,T=function(){return P===void 0&&(P=n(S,x)),P};if(x===0){var E=e*(S.coordinate-e*T()/2-l);a[x]=S=gi(gi({},S),{},{tickCoord:E<0?S.coordinate-E*e:S.coordinate})}else a[x]=S=gi(gi({},S),{},{tickCoord:S.coordinate});var O=WE(e,S.tickCoord,T,l,c);O&&(l=S.tickCoord+e*(T()/2+o),a[x]=gi(gi({},S),{},{isShow:!0}))},v=0;v=2?zi(o[1].coordinate-o[0].coordinate):1,w=ztt(i,v,p);return l==="equidistantPreserveStart"?Htt(v,w,g,o,a):(l==="preserveStart"||l==="preserveStartEnd"?f=Ktt(v,w,g,o,a,l==="preserveStartEnd"):f=qtt(v,w,g,o,a),f.filter(function(x){return x.isShow}))}var Ytt=["viewBox"],Xtt=["viewBox"],Qtt=["ticks"];function pv(e){"@babel/helpers - typeof";return pv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pv(e)}function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Jtt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ztt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R8(e,t){for(var n=0;n0?l(this.props):l(p)),a<=0||s<=0||!m||!m.length?null:Y.createElement(on,{className:de("recharts-cartesian-axis",c),ref:function(v){r.layerReference=v}},i&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),Wo.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,o,i){var a;return Y.isValidElement(r)?a=Y.cloneElement(r,o):Ht(r)?a=r(o):a=Y.createElement(Ah,Lg({},o,{className:"recharts-cartesian-axis-tick-value"}),i),a}}])}(y.Component);xB(lb,"displayName","CartesianAxis");xB(lb,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var ant=["x1","y1","x2","y2","key"],snt=["offset"];function _h(e){"@babel/helpers - typeof";return _h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_h(e)}function _8(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function wi(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function dnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var fnt=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,o=t.x,i=t.y,a=t.width,s=t.height,l=t.ry;return Y.createElement("rect",{x:o,y:i,ry:l,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function uoe(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Ht(e))n=e(t);else{var r=t.x1,o=t.y1,i=t.x2,a=t.y2,s=t.key,l=D8(t,ant),c=$t(l,!1);c.offset;var u=D8(c,snt);n=Y.createElement("line",Xp({},u,{x1:r,y1:o,x2:i,y2:a,fill:"none",key:s}))}return n}function pnt(e){var t=e.x,n=e.width,r=e.horizontal,o=r===void 0?!0:r,i=e.horizontalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=wi(wi({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return uoe(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function hnt(e){var t=e.y,n=e.height,r=e.vertical,o=r===void 0?!0:r,i=e.verticalPoints;if(!o||!i||!i.length)return null;var a=i.map(function(s,l){var c=wi(wi({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return uoe(o,c)});return Y.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function mnt(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,o=e.y,i=e.width,a=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var u=s.map(function(f){return Math.round(f+o-o)}).sort(function(f,p){return f-p});o!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var m=!u[p+1],g=m?o+a-f:u[p+1]-f;if(g<=0)return null;var v=p%t.length;return Y.createElement("rect",{key:"react-".concat(p),y:f,x:r,height:g,width:i,stroke:"none",fill:t[v],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function gnt(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,o=e.fillOpacity,i=e.x,a=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var u=c.map(function(f){return Math.round(f+i-i)}).sort(function(f,p){return f-p});i!==u[0]&&u.unshift(0);var d=u.map(function(f,p){var m=!u[p+1],g=m?i+s-f:u[p+1]-f;if(g<=0)return null;var v=p%r.length;return Y.createElement("rect",{key:"react-".concat(p),x:f,y:a,width:g,height:l,stroke:"none",fill:r[v],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return Y.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var ynt=function(t,n){var r=t.xAxis,o=t.width,i=t.height,a=t.offset;return ure(wB(wi(wi(wi({},lb.defaultProps),r),{},{ticks:Iu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.left,a.left+a.width,n)},vnt=function(t,n){var r=t.yAxis,o=t.width,i=t.height,a=t.offset;return ure(wB(wi(wi(wi({},lb.defaultProps),r),{},{ticks:Iu(r,!0),viewBox:{x:0,y:0,width:o,height:i}})),a.top,a.top+a.height,n)},Ym={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Zh(e){var t,n,r,o,i,a,s=gB(),l=yB(),c=itt(),u=wi(wi({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Ym.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Ym.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Ym.horizontal,horizontalFill:(o=e.horizontalFill)!==null&&o!==void 0?o:Ym.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Ym.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Ym.verticalFill,x:st(e.x)?e.x:c.left,y:st(e.y)?e.y:c.top,width:st(e.width)?e.width:c.width,height:st(e.height)?e.height:c.height}),d=u.x,f=u.y,p=u.width,m=u.height,g=u.syncWithTicks,v=u.horizontalValues,w=u.verticalValues,x=ntt(),S=rtt();if(!st(p)||p<=0||!st(m)||m<=0||!st(d)||d!==+d||!st(f)||f!==+f)return null;var P=u.verticalCoordinatesGenerator||ynt,T=u.horizontalCoordinatesGenerator||vnt,E=u.horizontalPoints,O=u.verticalPoints;if((!E||!E.length)&&Ht(T)){var k=v&&v.length,A=T({yAxis:S?wi(wi({},S),{},{ticks:k?v:S.ticks}):void 0,width:s,height:l,offset:c},k?!0:g);Ql(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(_h(A),"]")),Array.isArray(A)&&(E=A)}if((!O||!O.length)&&Ht(P)){var I=w&&w.length,R=P({xAxis:x?wi(wi({},x),{},{ticks:I?w:x.ticks}):void 0,width:s,height:l,offset:c},I?!0:g);Ql(Array.isArray(R),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(_h(R),"]")),Array.isArray(R)&&(O=R)}return Y.createElement("g",{className:"recharts-cartesian-grid"},Y.createElement(fnt,{fill:u.fill,fillOpacity:u.fillOpacity,x:u.x,y:u.y,width:u.width,height:u.height,ry:u.ry}),Y.createElement(pnt,Xp({},u,{offset:c,horizontalPoints:E,xAxis:x,yAxis:S})),Y.createElement(hnt,Xp({},u,{offset:c,verticalPoints:O,xAxis:x,yAxis:S})),Y.createElement(mnt,Xp({},u,{horizontalPoints:E})),Y.createElement(gnt,Xp({},u,{verticalPoints:O})))}Zh.displayName="CartesianGrid";var bnt=["type","layout","connectNulls","ref"],wnt=["key"];function hv(e){"@babel/helpers - typeof";return hv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hv(e)}function N8(e,t){if(e==null)return{};var n=xnt(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function xnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Sw(){return Sw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nd){p=[].concat(Xm(l.slice(0,m)),[d-g]);break}var v=p.length%2===0?[0,f]:[f];return[].concat(Xm(t.repeat(l,u)),Xm(p),v).map(function(w){return"".concat(w,"px")}).join(", ")}),Fl(n,"id",Yf("recharts-line-")),Fl(n,"pathRef",function(a){n.mainCurve=a}),Fl(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Fl(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return Ant(t,e),Ont(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,o){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,a=i.points,s=i.xAxis,l=i.yAxis,c=i.layout,u=i.children,d=qi(u,ab);if(!d)return null;var f=function(g,v){return{x:g.x,y:g.y,value:g.value,errorVal:Mr(g.payload,v)}},p={clipPath:r?"url(#clipPath-".concat(o,")"):null};return Y.createElement(on,p,d.map(function(m){return Y.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:l,layout:c,dataPointFormatter:f})}))}},{key:"renderDots",value:function(r,o,i){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,l=s.dot,c=s.points,u=s.dataKey,d=$t(this.props,!1),f=$t(l,!0),p=c.map(function(g,v){var w=_a(_a(_a({key:"dot-".concat(v),r:3},d),f),{},{value:g.value,dataKey:u,cx:g.x,cy:g.y,index:v,payload:g.payload});return t.renderDotItem(l,w)}),m={clipPath:r?"url(#clipPath-".concat(o?"":"dots-").concat(i,")"):null};return Y.createElement(on,Sw({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,o,i,a){var s=this.props,l=s.type,c=s.layout,u=s.connectNulls;s.ref;var d=N8(s,bnt),f=_a(_a(_a({},$t(d,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:o?"url(#clipPath-".concat(i,")"):null,points:r},a),{},{type:l,layout:c,connectNulls:u});return Y.createElement(wf,Sw({},f,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,o){var i=this,a=this.props,s=a.points,l=a.strokeDasharray,c=a.isAnimationActive,u=a.animationBegin,d=a.animationDuration,f=a.animationEasing,p=a.animationId,m=a.animateNewValues,g=a.width,v=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return Y.createElement(ul,{begin:u,duration:d,isActive:c,easing:f,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(P){var T=P.t;if(x){var E=x.length/s.length,O=s.map(function(N,L){var j=Math.floor(L*E);if(x[j]){var _=x[j],D=Ur(_.x,N.x),z=Ur(_.y,N.y);return _a(_a({},N),{},{x:D(T),y:z(T)})}if(m){var F=Ur(g*2,N.x),H=Ur(v/2,N.y);return _a(_a({},N),{},{x:F(T),y:H(T)})}return _a(_a({},N),{},{x:N.x,y:N.y})});return i.renderCurveStatically(O,r,o)}var k=Ur(0,S),A=k(T),I;if(l){var R="".concat(l).split(/[,\s]+/gim).map(function(N){return parseFloat(N)});I=i.getStrokeDasharray(A,S,R)}else I=i.generateSimpleStrokeDasharray(S,A);return i.renderCurveStatically(s,r,o,{strokeDasharray:I})})}},{key:"renderCurve",value:function(r,o){var i=this.props,a=i.points,s=i.isAnimationActive,l=this.state,c=l.prevPoints,u=l.totalLength;return s&&a&&a.length&&(!c&&u>0||!Af(c,a))?this.renderCurveWithAnimation(r,o):this.renderCurveStatically(a,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.xAxis,u=o.yAxis,d=o.top,f=o.left,p=o.width,m=o.height,g=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=de("recharts-line",l),P=c&&c.allowDataOverflow,T=u&&u.allowDataOverflow,E=P||T,O=jt(v)?this.id:v,k=(r=$t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=k.r,I=A===void 0?3:A,R=k.strokeWidth,N=R===void 0?2:R,L=rte(a)?a:{},j=L.clipDot,_=j===void 0?!0:j,D=I*2+N;return Y.createElement(on,{className:S},P||T?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(O)},Y.createElement("rect",{x:P?f:f-p/2,y:T?d:d-m/2,width:P?p:p*2,height:T?m:m*2})),!_&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(O)},Y.createElement("rect",{x:f-D/2,y:d-D/2,width:p+D,height:m+D}))):null,!x&&this.renderCurve(E,O),this.renderErrorBar(E,O),(x||a)&&this.renderDots(E,_,O),(!g||w)&&Jl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:o.curPoints}:r.points!==o.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,o){for(var i=r.length%2!==0?[].concat(Xm(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Dnt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Af(u,a)||!Af(d,s))?this.renderAreaWithAnimation(r,o):this.renderAreaStatically(a,s,r,o)}},{key:"render",value:function(){var r,o=this.props,i=o.hide,a=o.dot,s=o.points,l=o.className,c=o.top,u=o.left,d=o.xAxis,f=o.yAxis,p=o.width,m=o.height,g=o.isAnimationActive,v=o.id;if(i||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=de("recharts-area",l),P=d&&d.allowDataOverflow,T=f&&f.allowDataOverflow,E=P||T,O=jt(v)?this.id:v,k=(r=$t(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=k.r,I=A===void 0?3:A,R=k.strokeWidth,N=R===void 0?2:R,L=rte(a)?a:{},j=L.clipDot,_=j===void 0?!0:j,D=I*2+N;return Y.createElement(on,{className:S},P||T?Y.createElement("defs",null,Y.createElement("clipPath",{id:"clipPath-".concat(O)},Y.createElement("rect",{x:P?u:u-p/2,y:T?c:c-m/2,width:P?p:p*2,height:T?m:m*2})),!_&&Y.createElement("clipPath",{id:"clipPath-dots-".concat(O)},Y.createElement("rect",{x:u-D/2,y:c-D/2,width:p+D,height:m+D}))):null,x?null:this.renderArea(E,O),(a||x)&&this.renderDots(E,_,O),(!g||w)&&Jl.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,o){return r.animationId!==o.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:o.curPoints,prevBaseLine:o.curBaseLine}:r.points!==o.curPoints||r.baseLine!==o.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);poe=ep;Ic(ep,"displayName","Area");Ic(ep,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!nl.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Ic(ep,"getBaseValue",function(e,t,n,r){var o=e.layout,i=e.baseValue,a=t.props.baseValue,s=a??i;if(st(s)&&typeof s=="number")return s;var l=o==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var u=Math.max(c[0],c[1]),d=Math.min(c[0],c[1]);return s==="dataMin"?d:s==="dataMax"||u<0?u:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Ic(ep,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,o=e.yAxis,i=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,u=e.dataStartIndex,d=e.displayedData,f=e.offset,p=t.layout,m=c&&c.length,g=poe.getBaseValue(t,n,r,o),v=p==="horizontal",w=!1,x=d.map(function(P,T){var E;m?E=c[u+T]:(E=Mr(P,l),Array.isArray(E)?w=!0:E=[g,E]);var O=E[1]==null||m&&Mr(P,l)==null;return v?{x:nv({axis:r,ticks:i,bandSize:s,entry:P,index:T}),y:O?null:o.scale(E[1]),value:E,payload:P}:{x:O?null:r.scale(E[1]),y:nv({axis:o,ticks:a,bandSize:s,entry:P,index:T}),value:E,payload:P}}),S;return m||w?S=x.map(function(P){var T=Array.isArray(P.value)?P.value[0]:null;return v?{x:P.x,y:T!=null&&P.y!=null?o.scale(T):null}:{x:T!=null?r.scale(T):null,y:P.y}}):S=v?o.scale(g):r.scale(g),Md({points:x,baseLine:S,layout:p,isRange:w},f)});Ic(ep,"renderDotItem",function(e,t){var n;if(Y.isValidElement(e))n=Y.cloneElement(e,t);else if(Ht(e))n=e(t);else{var r=de("recharts-area-dot",typeof e!="boolean"?e.className:""),o=t.key,i=hoe(t,_nt);n=Y.createElement(WS,Qp({},i,{key:o,className:r}))}return n});function gv(e){"@babel/helpers - typeof";return gv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gv(e)}function Hnt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Unt(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Znt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ert(e){var t=e.option,n=e.isActive,r=Jnt(e,Qnt);return typeof t=="string"?Y.createElement(DE,Cw({option:Y.createElement(sk,Cw({type:t},r)),isActive:n,shapeType:"symbols"},r)):Y.createElement(DE,Cw({option:t,isActive:n,shapeType:"symbols"},r))}function yv(e){"@babel/helpers - typeof";return yv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yv(e)}function Pw(){return Pw=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Yrt(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Xrt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Qrt(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&st(o)&&st(i)?t.slice(o,i+1):[]};function Doe(e){return e==="number"?[0,"auto"]:void 0}var pN=function(t,n,r,o){var i=t.graphicalItems,a=t.tooltipAxis,s=_k(n,t);return r<0||!i||!i.length||r>=s.length?null:i.reduce(function(l,c){var u,d=(u=c.props.data)!==null&&u!==void 0?u:n;d&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(d=d.slice(t.dataStartIndex,t.dataEndIndex+1));var f;if(a.dataKey&&!a.allowDuplicatedCategory){var p=d===void 0?s:d;f=XT(p,a.dataKey,o)}else f=d&&d[r]||s[r];return f?[].concat(xv(l),[mre(c,f)]):l},[])},K8=function(t,n,r,o){var i=o||{x:t.chartX,y:t.chartY},a=cot(i,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,u=mKe(a,s,c,l);if(u>=0&&c){var d=c[u]&&c[u].value,f=pN(t,n,u,d),p=uot(r,s,u,i);return{activeTooltipIndex:u,activeLabel:d,activePayload:f,activeCoordinate:p}}return null},dot=function(t,n){var r=n.axes,o=n.graphicalItems,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=t.stackOffset,p=cre(u,i);return r.reduce(function(m,g){var v,w=g.type.defaultProps!==void 0?Fe(Fe({},g.type.defaultProps),g.props):g.props,x=w.type,S=w.dataKey,P=w.allowDataOverflow,T=w.allowDuplicatedCategory,E=w.scale,O=w.ticks,k=w.includeHidden,A=w[a];if(m[A])return m;var I=_k(t.data,{graphicalItems:o.filter(function(X){var ae,Z=a in X.props?X.props[a]:(ae=X.type.defaultProps)===null||ae===void 0?void 0:ae[a];return Z===A}),dataStartIndex:l,dataEndIndex:c}),R=I.length,N,L,j;Lrt(w.domain,P,x)&&(N=PD(w.domain,null,P),p&&(x==="number"||E!=="auto")&&(j=vw(I,S,"category")));var _=Doe(x);if(!N||N.length===0){var D,z=(D=w.domain)!==null&&D!==void 0?D:_;if(S){if(N=vw(I,S,x),x==="category"&&p){var F=iBe(N);T&&F?(L=N,N=LE(0,R)):T||(N=fG(z,N,g).reduce(function(X,ae){return X.indexOf(ae)>=0?X:[].concat(xv(X),[ae])},[]))}else if(x==="category")T?N=N.filter(function(X){return X!==""&&!jt(X)}):N=fG(z,N,g).reduce(function(X,ae){return X.indexOf(ae)>=0||ae===""||jt(ae)?X:[].concat(xv(X),[ae])},[]);else if(x==="number"){var H=wKe(I,o.filter(function(X){var ae,Z,K=a in X.props?X.props[a]:(ae=X.type.defaultProps)===null||ae===void 0?void 0:ae[a],te="hide"in X.props?X.props.hide:(Z=X.type.defaultProps)===null||Z===void 0?void 0:Z.hide;return K===A&&(k||!te)}),S,i,u);H&&(N=H)}p&&(x==="number"||E!=="auto")&&(j=vw(I,S,"category"))}else p?N=LE(0,R):s&&s[A]&&s[A].hasStack&&x==="number"?N=f==="expand"?[0,1]:hre(s[A].stackGroups,l,c):N=lre(I,o.filter(function(X){var ae=a in X.props?X.props[a]:X.type.defaultProps[a],Z="hide"in X.props?X.props.hide:X.type.defaultProps.hide;return ae===A&&(k||!Z)}),x,u,!0);if(x==="number")N=uN(d,N,A,i,O),z&&(N=PD(z,N,P));else if(x==="category"&&z){var U=z,q=N.every(function(X){return U.indexOf(X)>=0});q&&(N=U)}}return Fe(Fe({},m),{},Ut({},A,Fe(Fe({},w),{},{axisType:i,domain:N,categoricalDomain:j,duplicateDomain:L,originalDomain:(v=w.domain)!==null&&v!==void 0?v:_,isCategorical:p,layout:u})))},{})},fot=function(t,n){var r=n.graphicalItems,o=n.Axis,i=n.axisType,a=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.layout,d=t.children,f=_k(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=f.length,m=cre(u,i),g=-1;return r.reduce(function(v,w){var x=w.type.defaultProps!==void 0?Fe(Fe({},w.type.defaultProps),w.props):w.props,S=x[a],P=Doe("number");if(!v[S]){g++;var T;return m?T=LE(0,p):s&&s[S]&&s[S].hasStack?(T=hre(s[S].stackGroups,l,c),T=uN(d,T,S,i)):(T=PD(P,lre(f,r.filter(function(E){var O,k,A=a in E.props?E.props[a]:(O=E.type.defaultProps)===null||O===void 0?void 0:O[a],I="hide"in E.props?E.props.hide:(k=E.type.defaultProps)===null||k===void 0?void 0:k.hide;return A===S&&!I}),"number",u),o.defaultProps.allowDataOverflow),T=uN(d,T,S,i)),Fe(Fe({},v),{},Ut({},S,Fe(Fe({axisType:i},o.defaultProps),{},{hide:!0,orientation:ts(sot,"".concat(i,".").concat(g%2),null),domain:T,originalDomain:P,isCategorical:m,layout:u})))}return v},{})},pot=function(t,n){var r=n.axisType,o=r===void 0?"xAxis":r,i=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,u=t.children,d="".concat(o,"Id"),f=qi(u,i),p={};return f&&f.length?p=dot(t,{axes:f,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):a&&a.length&&(p=fot(t,{Axis:i,graphicalItems:a,axisType:o,axisIdKey:d,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},hot=function(t){var n=Hd(t),r=Iu(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:jj(r,function(o){return o.coordinate}),tooltipAxis:n,tooltipAxisBandSize:PE(n,r)}},Y8=function(t){var n=t.children,r=t.defaultShowTooltip,o=Ba(n,lv),i=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),o&&o.props&&(o.props.startIndex>=0&&(i=o.props.startIndex),o.props.endIndex>=0&&(a=o.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},mot=function(t){return!t||!t.length?!1:t.some(function(n){var r=Au(n&&n.type);return r&&r.indexOf("Bar")>=0})},X8=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},got=function(t,n){var r=t.props,o=t.graphicalItems,i=t.xAxisMap,a=i===void 0?{}:i,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,u=r.height,d=r.children,f=r.margin||{},p=Ba(d,lv),m=Ba(d,$u),g=Object.keys(l).reduce(function(T,E){var O=l[E],k=O.orientation;return!O.mirror&&!O.hide?Fe(Fe({},T),{},Ut({},k,T[k]+O.width)):T},{left:f.left||0,right:f.right||0}),v=Object.keys(a).reduce(function(T,E){var O=a[E],k=O.orientation;return!O.mirror&&!O.hide?Fe(Fe({},T),{},Ut({},k,ts(T,"".concat(k))+O.height)):T},{top:f.top||0,bottom:f.bottom||0}),w=Fe(Fe({},v),g),x=w.bottom;p&&(w.bottom+=p.props.height||lv.defaultProps.height),m&&n&&(w=vKe(w,o,r,n));var S=c-w.left-w.right,P=u-w.top-w.bottom;return Fe(Fe({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(P,0)})},yot=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},KS=function(t){var n=t.chartName,r=t.GraphicalChild,o=t.defaultTooltipEventType,i=o===void 0?"axis":o,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,l=t.axisComponents,c=t.legendContent,u=t.formatAxisMap,d=t.defaultProps,f=function(w,x){var S=x.graphicalItems,P=x.stackGroups,T=x.offset,E=x.updateId,O=x.dataStartIndex,k=x.dataEndIndex,A=w.barSize,I=w.layout,R=w.barGap,N=w.barCategoryGap,L=w.maxBarSize,j=X8(I),_=j.numericAxisName,D=j.cateAxisName,z=mot(S),F=[];return S.forEach(function(H,U){var q=_k(w.data,{graphicalItems:[H],dataStartIndex:O,dataEndIndex:k}),X=H.type.defaultProps!==void 0?Fe(Fe({},H.type.defaultProps),H.props):H.props,ae=X.dataKey,Z=X.maxBarSize,K=X["".concat(_,"Id")],te=X["".concat(D,"Id")],pe={},ie=l.reduce(function(_e,ye){var Te=x["".concat(ye.axisType,"Map")],Oe=X["".concat(ye.axisType,"Id")];Te&&Te[Oe]||ye.axisType==="zAxis"||Rh();var Me=Te[Oe];return Fe(Fe({},_e),{},Ut(Ut({},ye.axisType,Me),"".concat(ye.axisType,"Ticks"),Iu(Me)))},pe),le=ie[D],re=ie["".concat(D,"Ticks")],fe=P&&P[K]&&P[K].hasStack&&kKe(H,P[K].stackGroups),ee=Au(H.type).indexOf("Bar")>=0,ce=PE(le,re),me=[],we=z&&gKe({barSize:A,stackGroups:P,totalSize:yot(ie,D)});if(ee){var ge,Se,xe=jt(Z)?L:Z,Ie=(ge=(Se=PE(le,re,!0))!==null&&Se!==void 0?Se:xe)!==null&&ge!==void 0?ge:0;me=yKe({barGap:R,barCategoryGap:N,bandSize:Ie!==ce?Ie:ce,sizeList:we[te],maxBarSize:xe}),Ie!==ce&&(me=me.map(function(_e){return Fe(Fe({},_e),{},{position:Fe(Fe({},_e.position),{},{offset:_e.position.offset-Ie/2})})}))}var Re=H&&H.type&&H.type.getComposedData;Re&&F.push({props:Fe(Fe({},Re(Fe(Fe({},ie),{},{displayedData:q,props:w,dataKey:ae,item:H,bandSize:ce,barPosition:me,offset:T,stackedData:fe,layout:I,dataStartIndex:O,dataEndIndex:k}))),{},Ut(Ut(Ut({key:H.key||"item-".concat(U)},_,ie[_]),D,ie[D]),"animationId",E)),childIndex:yBe(H,w.children),item:H})}),F},p=function(w,x){var S=w.props,P=w.dataStartIndex,T=w.dataEndIndex,E=w.updateId;if(!aW({props:S}))return null;var O=S.children,k=S.layout,A=S.stackOffset,I=S.data,R=S.reverseStackOrder,N=X8(k),L=N.numericAxisName,j=N.cateAxisName,_=qi(O,r),D=OKe(I,_,"".concat(L,"Id"),"".concat(j,"Id"),A,R),z=l.reduce(function(X,ae){var Z="".concat(ae.axisType,"Map");return Fe(Fe({},X),{},Ut({},Z,pot(S,Fe(Fe({},ae),{},{graphicalItems:_,stackGroups:ae.axisType===L&&D,dataStartIndex:P,dataEndIndex:T}))))},{}),F=got(Fe(Fe({},z),{},{props:S,graphicalItems:_}),x==null?void 0:x.legendBBox);Object.keys(z).forEach(function(X){z[X]=u(S,z[X],F,X.replace("Map",""),n)});var H=z["".concat(j,"Map")],U=hot(H),q=f(S,Fe(Fe({},z),{},{dataStartIndex:P,dataEndIndex:T,updateId:E,graphicalItems:_,stackGroups:D,offset:F}));return Fe(Fe({formattedGraphicalItems:q,graphicalItems:_,offset:F,stackGroups:D},U),z)},m=function(v){function w(x){var S,P,T;return Xrt(this,w),T=Zrt(this,w,[x]),Ut(T,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),Ut(T,"accessibilityManager",new Nrt),Ut(T,"handleLegendBBoxUpdate",function(E){if(E){var O=T.state,k=O.dataStartIndex,A=O.dataEndIndex,I=O.updateId;T.setState(Fe({legendBBox:E},p({props:T.props,dataStartIndex:k,dataEndIndex:A,updateId:I},Fe(Fe({},T.state),{},{legendBBox:E}))))}}),Ut(T,"handleReceiveSyncEvent",function(E,O,k){if(T.props.syncId===E){if(k===T.eventEmitterSymbol&&typeof T.props.syncMethod!="function")return;T.applySyncEvent(O)}}),Ut(T,"handleBrushChange",function(E){var O=E.startIndex,k=E.endIndex;if(O!==T.state.dataStartIndex||k!==T.state.dataEndIndex){var A=T.state.updateId;T.setState(function(){return Fe({dataStartIndex:O,dataEndIndex:k},p({props:T.props,dataStartIndex:O,dataEndIndex:k,updateId:A},T.state))}),T.triggerSyncEvent({dataStartIndex:O,dataEndIndex:k})}}),Ut(T,"handleMouseEnter",function(E){var O=T.getMouseInfo(E);if(O){var k=Fe(Fe({},O),{},{isTooltipActive:!0});T.setState(k),T.triggerSyncEvent(k);var A=T.props.onMouseEnter;Ht(A)&&A(k,E)}}),Ut(T,"triggeredAfterMouseMove",function(E){var O=T.getMouseInfo(E),k=O?Fe(Fe({},O),{},{isTooltipActive:!0}):{isTooltipActive:!1};T.setState(k),T.triggerSyncEvent(k);var A=T.props.onMouseMove;Ht(A)&&A(k,E)}),Ut(T,"handleItemMouseEnter",function(E){T.setState(function(){return{isTooltipActive:!0,activeItem:E,activePayload:E.tooltipPayload,activeCoordinate:E.tooltipPosition||{x:E.cx,y:E.cy}}})}),Ut(T,"handleItemMouseLeave",function(){T.setState(function(){return{isTooltipActive:!1}})}),Ut(T,"handleMouseMove",function(E){E.persist(),T.throttleTriggeredAfterMouseMove(E)}),Ut(T,"handleMouseLeave",function(E){T.throttleTriggeredAfterMouseMove.cancel();var O={isTooltipActive:!1};T.setState(O),T.triggerSyncEvent(O);var k=T.props.onMouseLeave;Ht(k)&&k(O,E)}),Ut(T,"handleOuterEvent",function(E){var O=gBe(E),k=ts(T.props,"".concat(O));if(O&&Ht(k)){var A,I;/.*touch.*/i.test(O)?I=T.getMouseInfo(E.changedTouches[0]):I=T.getMouseInfo(E),k((A=I)!==null&&A!==void 0?A:{},E)}}),Ut(T,"handleClick",function(E){var O=T.getMouseInfo(E);if(O){var k=Fe(Fe({},O),{},{isTooltipActive:!0});T.setState(k),T.triggerSyncEvent(k);var A=T.props.onClick;Ht(A)&&A(k,E)}}),Ut(T,"handleMouseDown",function(E){var O=T.props.onMouseDown;if(Ht(O)){var k=T.getMouseInfo(E);O(k,E)}}),Ut(T,"handleMouseUp",function(E){var O=T.props.onMouseUp;if(Ht(O)){var k=T.getMouseInfo(E);O(k,E)}}),Ut(T,"handleTouchMove",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.throttleTriggeredAfterMouseMove(E.changedTouches[0])}),Ut(T,"handleTouchStart",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseDown(E.changedTouches[0])}),Ut(T,"handleTouchEnd",function(E){E.changedTouches!=null&&E.changedTouches.length>0&&T.handleMouseUp(E.changedTouches[0])}),Ut(T,"triggerSyncEvent",function(E){T.props.syncId!==void 0&&oR.emit(iR,T.props.syncId,E,T.eventEmitterSymbol)}),Ut(T,"applySyncEvent",function(E){var O=T.props,k=O.layout,A=O.syncMethod,I=T.state.updateId,R=E.dataStartIndex,N=E.dataEndIndex;if(E.dataStartIndex!==void 0||E.dataEndIndex!==void 0)T.setState(Fe({dataStartIndex:R,dataEndIndex:N},p({props:T.props,dataStartIndex:R,dataEndIndex:N,updateId:I},T.state)));else if(E.activeTooltipIndex!==void 0){var L=E.chartX,j=E.chartY,_=E.activeTooltipIndex,D=T.state,z=D.offset,F=D.tooltipTicks;if(!z)return;if(typeof A=="function")_=A(F,E);else if(A==="value"){_=-1;for(var H=0;H=0){var fe,ee;if(L.dataKey&&!L.allowDuplicatedCategory){var ce=typeof L.dataKey=="function"?re:"payload.".concat(L.dataKey.toString());fe=XT(H,ce,_),ee=U&&q&&XT(q,ce,_)}else fe=H==null?void 0:H[j],ee=U&&q&&q[j];if(te||K){var me=E.props.activeIndex!==void 0?E.props.activeIndex:j;return[y.cloneElement(E,Fe(Fe(Fe({},A.props),ie),{},{activeIndex:me})),null,null]}if(!jt(fe))return[le].concat(xv(T.renderActivePoints({item:A,activePoint:fe,basePoint:ee,childIndex:j,isRange:U})))}else{var we,ge=(we=T.getItemByXY(T.state.activeCoordinate))!==null&&we!==void 0?we:{graphicalItem:le},Se=ge.graphicalItem,xe=Se.item,Ie=xe===void 0?E:xe,Re=Se.childIndex,_e=Fe(Fe(Fe({},A.props),ie),{},{activeIndex:Re});return[y.cloneElement(Ie,_e),null,null]}return U?[le,null,null]:[le,null]}),Ut(T,"renderCustomized",function(E,O,k){return y.cloneElement(E,Fe(Fe({key:"recharts-customized-".concat(k)},T.props),T.state))}),Ut(T,"renderMap",{CartesianGrid:{handler:ZC,once:!0},ReferenceArea:{handler:T.renderReferenceElement},ReferenceLine:{handler:ZC},ReferenceDot:{handler:T.renderReferenceElement},XAxis:{handler:ZC},YAxis:{handler:ZC},Brush:{handler:T.renderBrush,once:!0},Bar:{handler:T.renderGraphicChild},Line:{handler:T.renderGraphicChild},Area:{handler:T.renderGraphicChild},Radar:{handler:T.renderGraphicChild},RadialBar:{handler:T.renderGraphicChild},Scatter:{handler:T.renderGraphicChild},Pie:{handler:T.renderGraphicChild},Funnel:{handler:T.renderGraphicChild},Tooltip:{handler:T.renderCursor,once:!0},PolarGrid:{handler:T.renderPolarGrid,once:!0},PolarAngleAxis:{handler:T.renderPolarAxis},PolarRadiusAxis:{handler:T.renderPolarAxis},Customized:{handler:T.renderCustomized}}),T.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:Yf("recharts"),"-clip"),T.throttleTriggeredAfterMouseMove=dk(T.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),T.state={},T}return not(w,v),Jrt(w,[{key:"componentDidMount",value:function(){var S,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,P=S.children,T=S.data,E=S.height,O=S.layout,k=Ba(P,Ua);if(k){var A=k.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var I=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,R=pN(this.state,T,A,I),N=this.state.tooltipTicks[A].coordinate,L=(this.state.offset.top+E)/2,j=O==="horizontal",_=j?{x:N,y:L}:{y:N,x:L},D=this.state.formattedGraphicalItems.find(function(F){var H=F.item;return H.type.name==="Scatter"});D&&(_=Fe(Fe({},_),D.props.points[A].tooltipPosition),R=D.props.points[A].tooltipPayload);var z={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:I,activePayload:R,activeCoordinate:_};this.setState(z),this.renderCursor(k),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var T,E;this.accessibilityManager.setDetails({offset:{left:(T=this.props.margin.left)!==null&&T!==void 0?T:0,top:(E=this.props.margin.top)!==null&&E!==void 0?E:0}})}return null}},{key:"componentDidUpdate",value:function(S){j_([Ba(S.children,Ua)],[Ba(this.props.children,Ua)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Ba(this.props.children,Ua);if(S&&typeof S.props.shared=="boolean"){var P=S.props.shared?"axis":"item";return s.indexOf(P)>=0?P:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var P=this.container,T=P.getBoundingClientRect(),E=HGe(T),O={chartX:Math.round(S.pageX-E.left),chartY:Math.round(S.pageY-E.top)},k=T.width/P.offsetWidth||1,A=this.inRange(O.chartX,O.chartY,k);if(!A)return null;var I=this.state,R=I.xAxisMap,N=I.yAxisMap,L=this.getTooltipEventType();if(L!=="axis"&&R&&N){var j=Hd(R).scale,_=Hd(N).scale,D=j&&j.invert?j.invert(O.chartX):null,z=_&&_.invert?_.invert(O.chartY):null;return Fe(Fe({},O),{},{xValue:D,yValue:z})}var F=K8(this.state,this.props.data,this.props.layout,A);return F?Fe(Fe({},O),F):null}},{key:"inRange",value:function(S,P){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,E=this.props.layout,O=S/T,k=P/T;if(E==="horizontal"||E==="vertical"){var A=this.state.offset,I=O>=A.left&&O<=A.left+A.width&&k>=A.top&&k<=A.top+A.height;return I?{x:O,y:k}:null}var R=this.state,N=R.angleAxisMap,L=R.radiusAxisMap;if(N&&L){var j=Hd(N);return mG({x:O,y:k},j)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,P=this.getTooltipEventType(),T=Ba(S,Ua),E={};T&&P==="axis"&&(T.props.trigger==="click"?E={onClick:this.handleClick}:E={onMouseEnter:this.handleMouseEnter,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd});var O=QT(this.props,this.handleOuterEvent);return Fe(Fe({},O),E)}},{key:"addListener",value:function(){oR.on(iR,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){oR.removeListener(iR,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,P,T){for(var E=this.state.formattedGraphicalItems,O=0,k=E.length;O{const t=e.planned.energy>0?e.logged.energy/e.planned.energy*100:100,n=e.planned.energy>0?e.planned.energy-e.logged.energy:e.logged.energy,r=Ei(),[o,i]=Ue(),a=[{name:"",value:t},{name:"",value:t<100?100-t:0}],s=[r.palette.primary.main,"#C5C5C5"];return Q(Gt,{direction:"row",children:[C(Xf,{width:"50%",height:140,children:Q(Foe,{children:[C(Xc,{height:100,data:a,startAngle:200,endAngle:-20,innerRadius:60,outerRadius:70,paddingAngle:2,dataKey:"value",children:a.map((l,c)=>C(nb,{fill:s[c%s.length]},`cell-${c}`))}),Q("g",{children:[C("text",{x:"50%",y:"45%",fontSize:"1.25em",textAnchor:"middle",children:o("nutrition.valueEnergyKcal",{value:bi(n,i.language)})}),C("text",{x:"50%",y:"60%",fontSize:"1em",textAnchor:"middle",children:e.planned.energy>0&&o(t<100?"nutrition.valueRemaining":"nutrition.valueTooMany")})]})]})}),Q(Gt,{width:"50%",spacing:1,children:[C(ry,{title:o("nutrition.protein"),percentage:e.percentage.protein,logged:e.logged.protein,planned:e.planned.protein}),C(ry,{title:o("nutrition.carbohydrates"),percentage:e.percentage.carbohydrates,logged:e.logged.carbohydrates,planned:e.planned.carbohydrates}),C(ry,{title:o("nutrition.fat"),percentage:e.percentage.fat,logged:e.logged.fat,planned:e.planned.fat})]})]})};function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}const ub=B.oneOfType([B.func,B.object]);function Sot(e){if(typeof e!="string")throw new Error(xot(7));return e.charAt(0).toUpperCase()+e.slice(1)}function sR(e){return e&&e.ownerDocument||document}function Cot(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const Uc=typeof window<"u"?y.useLayoutEffect:y.useEffect;let Q8=0;function Pot(e){const[t,n]=y.useState(e),r=e||t;return y.useEffect(()=>{t==null&&(Q8+=1,n(`mui-${Q8}`))},[t]),r}const Tot={...vh},J8=Tot.useId;function db(e){if(J8!==void 0){const t=J8();return e??t}return Pot(e)}function Dh({controlled:e,default:t,name:n,state:r="value"}){const{current:o}=y.useRef(e!==void 0),[i,a]=y.useState(t),s=o?e:i,l=y.useCallback(c=>{o||a(c)},[]);return[s,l]}function Ct(e){const t=y.useRef(e);return Uc(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function Qi(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Cot(n,t)})},e)}const Eot={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function Dn(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let l=0;le,Oot=()=>{let e=Z8;return{configure(t){e=t},generate(t){return e(t)},reset(){e=Z8}}},Iot=Oot(),kot={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Fn(e,t,n="Mui"){const r=kot[t];return r?`${n}-${r}`:`${Iot.generate(e)}-${t}`}function Un(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Fn(e,o,n)}),r}function Mot(e){return typeof e=="string"}function Aot(e,t,n){return e===void 0||Mot(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function $ot(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function e9(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function Rot(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const p=de(n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),m={...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},g={...n,...o,...r};return p.length>0&&(g.className=p),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:void 0}}const a=$ot({...o,...r}),s=e9(r),l=e9(o),c=t(a),u=de(c==null?void 0:c.className,n==null?void 0:n.className,i,o==null?void 0:o.className,r==null?void 0:r.className),d={...c==null?void 0:c.style,...n==null?void 0:n.style,...o==null?void 0:o.style,...r==null?void 0:r.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function $f(e,t,n){return typeof e=="function"?e(t,n):e}function Vn(e){var d;const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:o=!1,...i}=e,a=o?{}:$f(n,r),{props:s,internalRef:l}=Rot({...i,externalSlotProps:a}),c=Qi(l,a==null?void 0:a.ref,(d=e.additionalProps)==null?void 0:d.ref);return Aot(t,{...s,ref:c},r)}const _ot=["localeText"],hN=y.createContext(null),YS=function(t){const{localeText:n}=t,r=_t(t,_ot),{utils:o,localeText:i}=y.useContext(hN)??{utils:void 0,localeText:void 0},a=Zt({props:r,name:"MuiLocalizationProvider"}),{children:s,dateAdapter:l,dateFormats:c,dateLibInstance:u,adapterLocale:d,localeText:f}=a,p=y.useMemo(()=>ue({},f,i,n),[f,i,n]),m=y.useMemo(()=>{if(!l)return o||null;const w=new l({locale:d,formats:c,instance:u});if(!w.isMUIAdapter)throw new Error(["MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`","For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`","More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(` +`));return w},[l,d,c,u,o]),g=y.useMemo(()=>m?{minDate:m.date("1900-01-01T00:00:00.000"),maxDate:m.date("2099-12-31T00:00:00.000")}:null,[m]),v=y.useMemo(()=>({utils:m,defaultDates:g,localeText:p}),[g,m,p]);return $.jsx(hN.Provider,{value:v,children:s})},Dot=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:ue({},e)}}}}),fb=e=>{const{utils:t,formatKey:n,contextTranslation:r,propsTranslation:o}=e;return i=>{const a=i!==null&&t.isValid(i)?t.format(i,n):null;return(o??r)(i,t,a)}},joe={previousMonth:"Previous month",nextMonth:"Next month",openPreviousView:"Open previous view",openNextView:"Open next view",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"year view is open, switch to calendar view":"calendar view is open, switch to year view",start:"Start",end:"End",startDate:"Start date",startTime:"Start time",endDate:"End date",endTime:"End time",cancelButtonLabel:"Cancel",clearButtonLabel:"Clear",okButtonLabel:"OK",todayButtonLabel:"Today",datePickerToolbarTitle:"Select date",dateTimePickerToolbarTitle:"Select date & time",timePickerToolbarTitle:"Select time",dateRangePickerToolbarTitle:"Select date range",clockLabelText:(e,t,n,r)=>`Select ${e}. ${!r&&(t===null||!n.isValid(t))?"No time selected":`Selected time is ${r??n.format(t,"fullTime")}`}`,hoursClockNumberText:e=>`${e} hours`,minutesClockNumberText:e=>`${e} minutes`,secondsClockNumberText:e=>`${e} seconds`,selectViewText:e=>`Select ${e}`,calendarWeekNumberHeaderLabel:"Week number",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`Week ${e}`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose date, selected date is ${n??t.format(e,"fullDate")}`:"Choose date",openTimePickerDialogue:(e,t,n)=>n||e!==null&&t.isValid(e)?`Choose time, selected time is ${n??t.format(e,"fullTime")}`:"Choose time",fieldClearLabel:"Clear",timeTableLabel:"pick time",dateTableLabel:"pick date",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa",year:"Year",month:"Month",day:"Day",weekDay:"Week day",hours:"Hours",minutes:"Minutes",seconds:"Seconds",meridiem:"Meridiem",empty:"Empty"},Not=joe;Dot(joe);const em=()=>{const e=y.useContext(hN);if(e===null)throw new Error(["MUI X: Can not find the date and time pickers localization context.","It looks like you forgot to wrap your component in LocalizationProvider.","This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join(` `));if(e.utils===null)throw new Error(["MUI X: Can not find the date and time pickers adapter from its localization context.","It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join(` -`));const t=y.useMemo(()=>ue({},uot,e.localeText),[e.localeText]);return y.useMemo(()=>ue({},e,{localeText:t}),[e,t])},pn=()=>Gh().utils,qh=()=>Gh().defaultDates,Kh=e=>{const t=pn(),n=y.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},Co=()=>Gh().localeText,dot=st($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),fot=st($.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),pot=st($.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Poe=st($.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),hot=st($.jsxs(y.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),mot=st($.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),got=st($.jsxs(y.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),yot=st($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function vot(e){return Ln("MuiPickersArrowSwitcher",e)}Hn("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const bot=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],wot=["ownerState"],xot=["ownerState"],Sot=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Cot=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),U8=oe(kn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Pot=e=>{const{classes:t}=e;return _n({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},vot,t)},Toe=y.forwardRef(function(t,n){const r=nr(),o=Zt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:f,isPreviousDisabled:h,isPreviousHidden:m,onGoToPrevious:g,previousLabel:v,labelId:w}=o,x=Rt(o,bot),S=o,P=Pot(S),T={isDisabled:c,isHidden:u,goTo:d,label:f},E={isDisabled:h,isHidden:m,goTo:g,label:v},O=(s==null?void 0:s.previousIconButton)??U8,k=zn({elementType:O,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:ue({},S,{hidden:E.isHidden}),className:fe(P.button,P.previousIconButton)}),A=(s==null?void 0:s.nextIconButton)??U8,I=zn({elementType:A,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"start",onClick:T.goTo},ownerState:ue({},S,{hidden:T.isHidden}),className:fe(P.button,P.nextIconButton)}),R=(s==null?void 0:s.leftArrowIcon)??fot,N=zn({elementType:R,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.leftArrowIcon}),L=Rt(N,wot),B=(s==null?void 0:s.rightArrowIcon)??pot,_=zn({elementType:B,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.rightArrowIcon}),D=Rt(_,xot);return $.jsxs(Sot,ue({ref:n,className:fe(P.root,a),ownerState:S},x,{children:[$.jsx(O,ue({},k,{children:r?$.jsx(B,ue({},D)):$.jsx(R,ue({},L))})),i?$.jsx(dt,{variant:"subtitle1",component:"span",id:w,children:i}):$.jsx(Cot,{className:P.spacer,ownerState:S}),$.jsx(A,ue({},I,{children:r?$.jsx(R,ue({},L)):$.jsx(B,ue({},D))}))]}))}),Cc=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),fB=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},Eoe=["hours","minutes","seconds"],dv=e=>Eoe.includes(e),N0=e=>Eoe.includes(e)||e==="meridiem",Tot=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,Rx=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,Eot=(e,t,n,r)=>{const o=Rx(r.getHours(e),t,n);return r.setHours(e,o)},W8=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),BS=(e,t)=>(n,r)=>e?t.isAfter(n,r):W8(n,t)>W8(r,t),VE=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return Cc(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:Cc(n,["minutes"])?o.minutes:Cc(n,["seconds"])?o.seconds:Cc(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:Cc(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`};function zS({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=y.useRef(n),c=y.useRef(o),u=y.useRef(o.includes(n)?n:o[0]),[d,f]=Eh({name:"useViews",state:"view",controlled:r,default:u.current}),h=y.useRef(i?d:null),[m,g]=Eh({name:"useViews",state:"focusedView",controlled:a,default:h.current});y.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(O=>!o.includes(O)))&&(f(o.includes(n)?n:o[0]),c.current=o,l.current=n)},[n,f,d,o]);const v=o.indexOf(d),w=o[v-1]??null,x=o[v+1]??null,S=Ct((O,k)=>{g(k?O:A=>O===A?null:A),s==null||s(O,k)}),P=Ct(O=>{S(O,!0),O!==d&&(f(O),t&&t(O))}),T=Ct(()=>{x&&P(x)}),E=Ct((O,k,A)=>{const I=k==="finish",R=A?o.indexOf(A){const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function Iot(e,{disablePast:t,minDate:n,timezone:r}){const o=pn();return y.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function Ek(e,t,n,r){const o=pn(),i=Tot(e,o),a=y.useCallback(s=>{const l=e==null?null:Eot(e,s,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const _x=36,Ok=2,Ik=320,kot=280,kk=336,Ooe=232,L0=48,Mk=oe("div")({overflow:"hidden",width:Ik,maxHeight:kk,display:"flex",flexDirection:"column",margin:"0 auto"});function Mot(e){return Ln("MuiTimeClock",e)}Hn("MuiTimeClock",["root","arrowSwitcher"]);const fv=220,$u=36,Dx={x:fv/2,y:fv/2},Ioe={x:Dx.x,y:0},Aot=Ioe.x-Dx.x,$ot=Ioe.y-Dx.y,Rot=e=>e*(180/Math.PI),koe=(e,t,n)=>{const r=t-Dx.x,o=n-Dx.y,i=Math.atan2(Aot,$ot)-Math.atan2(r,o);let a=Rot(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},_ot=(e,t,n=1)=>{const r=n*6;let{value:o}=koe(r,e,t);return o=o*n%60,o},Dot=(e,t,n)=>{const{value:r,distance:o}=koe(30,e,t);let i=r||12;return n?i%=12:o{const{classes:t}=e;return _n({root:["root"],thumb:["thumb"]},Not,t)},jot=oe("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),Bot=oe("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${$u/2}px)`,border:`${($u-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function zot(e){const t=Zt({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:i}=t,a=Rt(t,Lot),s=y.useRef(o);y.useEffect(()=>{s.current=o},[o]);const l=ue({},t,{shouldAnimate:s.current!==o}),c=Fot(l),u=()=>{let f=360/(o==="hours"?12:60)*i;return o==="hours"&&i>12&&(f-=360),{height:Math.round((r?.26:.4)*fv),transform:`rotateZ(${f}deg)`}};return $.jsx(jot,ue({style:u(),className:fe(c.root,n),ownerState:l},a,{children:$.jsx(Bot,{ownerState:l,className:c.thumb})}))}function Vot(e){return Ln("MuiClock",e)}Hn("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const HE=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},gw=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=HE(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},Hot=(e,t)=>t==null||!e.isValid(t)?null:t,Ti=(e,t,n)=>t==null||!e.isValid(t)?n:t,Uot=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),pB=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},hB=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),zl=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},Wot=["year","month","day"],pv=e=>Wot.includes(e),Nx=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return Cc(n,["year"])?o.year:Cc(n,["month"])?o.month:Cc(n,["day"])?o.dayOfMonth:Cc(n,["month","year"])?`${o.month} ${o.year}`:Cc(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},Got=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},qot=e=>{const{classes:t,meridiemMode:n}=e;return _n({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",n==="am"&&"selected"],pmButton:["pmButton",n==="pm"&&"selected"],meridiemText:["meridiemText"]},Vot,t)},Kot=oe("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),Yot=oe("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Xot=oe("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Qot=oe("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Jot=oe("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),Moe=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:$u,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Zot=oe(kn,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>ue({},Moe(e,"am"),{position:"absolute",left:8})),eit=oe(kn,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>ue({},Moe(e,"pm"),{position:"absolute",right:8})),G8=oe(dt,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function tit(e){const t=Zt({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:h,viewValue:m,disabled:g=!1,readOnly:v,className:w}=t,x=t,S=pn(),P=Co(),T=y.useRef(!1),E=qot(x),O=l(m,h),k=!n&&h==="hours"&&(m<1||m>12),A=(H,U)=>{g||v||l(H,h)||d(H,U)},I=(H,U)=>{let{offsetX:q,offsetY:Y}=H;if(q===void 0){const Z=H.target.getBoundingClientRect();q=H.changedTouches[0].clientX-Z.left,Y=H.changedTouches[0].clientY-Z.top}const ae=h==="seconds"||h==="minutes"?_ot(q,Y,u):Dot(q,Y,!!n);A(ae,U)},R=H=>{T.current=!0,I(H,"shallow")},N=H=>{T.current&&(I(H,"finish"),T.current=!1)},L=H=>{H.buttons>0&&I(H.nativeEvent,"shallow")},B=H=>{T.current&&(T.current=!1),I(H.nativeEvent,"finish")},_=y.useMemo(()=>h==="hours"?!0:m%5===0,[h,m]),D=h==="minutes"?u:1,z=y.useRef(null);zc(()=>{o&&z.current.focus()},[o]);const F=H=>{if(!T.current)switch(H.key){case"Home":A(0,"partial"),H.preventDefault();break;case"End":A(h==="minutes"?59:23,"partial"),H.preventDefault();break;case"ArrowUp":A(m+D,"partial"),H.preventDefault();break;case"ArrowDown":A(m-D,"partial"),H.preventDefault();break;case"PageUp":A(m+5,"partial"),H.preventDefault();break;case"PageDown":A(m-5,"partial"),H.preventDefault();break;case"Enter":case" ":A(m,"finish"),H.preventDefault();break}};return $.jsxs(Kot,{className:fe(E.root,w),children:[$.jsxs(Yot,{className:E.clock,children:[$.jsx(Qot,{onTouchMove:R,onTouchStart:R,onTouchEnd:N,onMouseUp:B,onMouseMove:L,ownerState:{disabled:g},className:E.squareMask}),!O&&$.jsxs(y.Fragment,{children:[$.jsx(Jot,{className:E.pin}),a!=null&&$.jsx(zot,{type:h,viewValue:m,isInner:k,hasSelected:_})]}),$.jsx(Xot,{"aria-activedescendant":f,"aria-label":P.clockLabelText(h,a,S,a==null?null:S.format(a,"fullTime")),ref:z,role:"listbox",onKeyDown:F,tabIndex:0,className:E.wrapper,children:i})]}),n&&r&&$.jsxs(y.Fragment,{children:[$.jsx(Zot,{onClick:v?void 0:()=>s("am"),disabled:g||c===null,ownerState:x,className:E.amButton,title:zl(S,"am"),children:$.jsx(G8,{variant:"caption",className:E.meridiemText,children:zl(S,"am")})}),$.jsx(eit,{disabled:g||c===null,onClick:v?void 0:()=>s("pm"),ownerState:x,className:E.pmButton,title:zl(S,"pm"),children:$.jsx(G8,{variant:"caption",className:E.meridiemText,children:zl(S,"pm")})})]})]})}function nit(e){return Ln("MuiClockNumber",e)}const UC=Hn("MuiClockNumber",["root","selected","disabled"]),rit=["className","disabled","index","inner","label","selected"],oit=e=>{const{classes:t,selected:n,disabled:r}=e;return _n({root:["root",n&&"selected",r&&"disabled"]},nit,t)},iit=oe("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${UC.disabled}`]:t.disabled},{[`&.${UC.selected}`]:t.selected}]})(({theme:e})=>({height:$u,width:$u,position:"absolute",left:`calc((100% - ${$u}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${UC.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${UC.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:ue({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function Aoe(e){const t=Zt({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=Rt(t,rit),c=t,u=oit(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(fv-$u-2)/2*(i?.65:1),h=Math.round(Math.cos(d)*f),m=Math.round(Math.sin(d)*f);return $.jsx(iit,ue({className:fe(u.root,n),"aria-disabled":r?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${h}px, ${m+(fv-$u)/2}px`},ownerState:c},l,{children:a}))}const ait=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const h=!e&&(d===0||d>12);f=i.formatNumber(f);const m=u(d);s.push($.jsx(Aoe,{id:m?o:void 0,index:d,inner:h,selected:m,disabled:r(d),label:f,"aria-label":n(f)},d))}return s},q8=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return $.jsx(Aoe,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},mB=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{const i=pn(),a=y.useRef(n),s=t??a.current??o.emptyValue,l=y.useMemo(()=>o.getTimezone(i,s),[i,o,s]),c=Ct(h=>l==null?h:o.setTimezone(i,l,h)),u=e??l??"default",d=y.useMemo(()=>o.setTimezone(i,u,s),[o,i,u,s]),f=Ct((h,...m)=>{const g=c(h);r==null||r(g,...m)});return{value:d,handleValueChange:f,timezone:u}},rb=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:i})=>{const[a,s]=Eh({name:e,state:"value",controlled:n,default:r??i.emptyValue}),l=Ct((c,...u)=>{s(c),o==null||o(c,...u)});return mB({timezone:t,value:a,defaultValue:void 0,onChange:l,valueManager:i})},Fl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},sit=e=>Math.max(...e.map(t=>Fl[t.type]??1)),f0=(e,t,n)=>{if(t===Fl.year)return e.startOfYear(n);if(t===Fl.month)return e.startOfMonth(n);if(t===Fl.day)return e.startOfDay(n);let r=n;return t{let i=o?o():f0(t,n,hB(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=f0(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=f0(t,n,e.maxDate));const a=BS(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=f0(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:HE(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=f0(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:HE(t,i,e.maxTime))),i},$oe=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" 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(` -`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},cit=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Ak=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},Roe=(e,t,n,r)=>{switch(n){case"month":return pB(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return Ak(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},K8="s",uit=["0","1","2","3","4","5","6","7","8","9"],dit=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),K8)==="0"?uit:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),K8))},Oh=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},gB=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),Y8=(e,t)=>{const n=Oh(e,t);return n!==" "&&!Number.isNaN(Number(n))},_oe=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=_oe(i,o.maxLength)),gB(i,r)},fit=(e,t,n,r,o,i,a,s)=>{const l=cit(r),c=r==="Home",u=r==="End",d=n.value===""||c||u,f=()=>{const m=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),g=S=>Doe(e,S,m,i,n),v=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let x=parseInt(Oh(n.value,i),10)+l*v;if(d){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?x=m.minimum:x=m.maximum}return x%v!==0&&((l<0||c)&&(x+=v-(v+x)%v),(l>0||u)&&(x-=x%v)),x>m.maximum?g(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x{const m=Roe(e,t,n.type,n.format);if(m.length===0)return n.value;if(d)return l>0||c?m[0]:m[m.length-1];const w=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?f():h()},yB=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Oh(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},X8=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),Noe=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,Loe=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return Noe(e,r)?e.formatByString(e.setYear(o,1),r)==="0001":e.formatByString(e.setYear(o,2001),r)==="01";case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},pit=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;le.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),mit=(e,t,n)=>{const o=e.map(i=>{const a=yB(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},git=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=pB(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:Noe(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=Ak(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Oh(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Oh(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},yit=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=Ak(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},Q8={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},J8=(e,t,n,r,o)=>[...n].sort((i,a)=>Q8[i.type]-Q8[a.type]).reduce((i,a)=>!o||a.modified?yit(e,a,t,i):i,r),vit=()=>navigator.userAgent.toLowerCase().includes("android"),bit=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,d=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],f=u===e.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},oN=(e,t)=>e==null?null:e==="all"?"all":typeof e=="string"?t.findIndex(n=>n.type===e):e,wit=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},xit=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},Sit=["value","referenceDate"],no={emptyValue:null,getTodayValue:hB,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=Rt(e,Sit);return t!=null&&r.utils.isValid(t)?t:n??lit(r)},cleanValue:Hot,areValuesEqual:Uot,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},vB={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:hit,getV6InputValueFromSections:mit,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},bB=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=y.useMemo(()=>no.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Fl.day,timezone:o,getTodayDate:()=>hB(n,o,"date")}),[]);return e??i},Cit=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Pit=e=>{const{classes:t}=e;return _n({root:["root"],arrowSwitcher:["arrowSwitcher"]},Mot,t)},Tit=oe(Mk,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),Eit=oe(Toe,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),Oit=["hours","minutes"],Iit=y.forwardRef(function(t,n){const r=pn(),o=Zt({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:h=!1,maxTime:m,minTime:g,disableFuture:v,disablePast:w,minutesStep:x=1,shouldDisableTime:S,showViewSwitcher:P,onChange:T,view:E,views:O=Oit,openTo:k,onViewChange:A,focusedView:I,onFocusedViewChange:R,className:N,disabled:L,readOnly:B,timezone:_}=o,D=Rt(o,Cit),{value:z,handleValueChange:F,timezone:H}=rb({name:"TimeClock",timezone:_,value:u,defaultValue:d,onChange:T,valueManager:no}),U=bB({value:z,referenceDate:f,utils:r,props:o,timezone:H}),q=Co(),Y=Kh(H),{view:ae,setView:Z,previousView:K,nextView:te,setValueAndGoToNextView:pe}=zS({view:E,views:O,openTo:k,onViewChange:A,onChange:F,focusedView:I,onFocusedViewChange:R}),{meridiemMode:ie,handleMeridiemChange:le}=Ek(U,i,pe),re=y.useCallback((we,ge)=>{const Se=BS(h,r),xe=ge==="hours"||ge==="minutes"&&O.includes("seconds"),Ie=({start:_e,end:ye})=>!(g&&Se(g,ye)||m&&Se(_e,m)||v&&Se(_e,Y)||w&&Se(Y,xe?ye:_e)),Re=(_e,ye=1)=>{if(_e%ye!==0)return!1;if(S)switch(ge){case"hours":return!S(r.setHours(U,_e),"hours");case"minutes":return!S(r.setMinutes(U,_e),"minutes");case"seconds":return!S(r.setSeconds(U,_e),"seconds");default:return!1}return!0};switch(ge){case"hours":{const _e=Rx(we,ie,i),ye=r.setHours(U,_e),Te=r.setSeconds(r.setMinutes(ye,0),0),Oe=r.setSeconds(r.setMinutes(ye,59),59);return!Ie({start:Te,end:Oe})||!Re(_e)}case"minutes":{const _e=r.setMinutes(U,we),ye=r.setSeconds(_e,0),Te=r.setSeconds(_e,59);return!Ie({start:ye,end:Te})||!Re(we,x)}case"seconds":{const _e=r.setSeconds(U,we);return!Ie({start:_e,end:_e})||!Re(we)}default:throw new Error("not supported")}},[i,U,h,m,ie,g,x,S,r,v,w,Y,O]),de=tb(),ee=y.useMemo(()=>{switch(ae){case"hours":{const we=(ge,Se)=>{const xe=Rx(ge,ie,i);pe(r.setHours(U,xe),Se,"hours")};return{onChange:we,viewValue:r.getHours(U),children:ait({value:z,utils:r,ampm:i,onChange:we,getClockNumberText:q.hoursClockNumberText,isDisabled:ge=>L||re(ge,"hours"),selectedId:de})}}case"minutes":{const we=r.getMinutes(U),ge=(Se,xe)=>{pe(r.setMinutes(U,Se),xe,"minutes")};return{viewValue:we,onChange:ge,children:q8({utils:r,value:we,onChange:ge,getClockNumberText:q.minutesClockNumberText,isDisabled:Se=>L||re(Se,"minutes"),selectedId:de})}}case"seconds":{const we=r.getSeconds(U),ge=(Se,xe)=>{pe(r.setSeconds(U,Se),xe,"seconds")};return{viewValue:we,onChange:ge,children:q8({utils:r,value:we,onChange:ge,getClockNumberText:q.secondsClockNumberText,isDisabled:Se=>L||re(Se,"seconds"),selectedId:de})}}default:throw new Error("You must provide the type for ClockView")}},[ae,r,z,i,q.hoursClockNumberText,q.minutesClockNumberText,q.secondsClockNumberText,ie,pe,U,re,de,L]),ce=o,me=Pit(ce);return $.jsxs(Tit,ue({ref:n,className:fe(me.root,N),ownerState:ce},D,{children:[$.jsx(tit,ue({autoFocus:s??!!I,ampmInClock:a&&O.includes("hours"),value:z,type:ae,ampm:i,minutesStep:x,isTimeDisabled:re,meridiemMode:ie,handleMeridiemChange:le,selectedId:de,disabled:L,readOnly:B},ee)),P&&$.jsx(Eit,{className:me.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>Z(K),isPreviousDisabled:!K,previousLabel:q.openPreviousView,onGoToNext:()=>Z(te),isNextDisabled:!te,nextLabel:q.openNextView,ownerState:ce})]}))});function kit(e){return Ln("MuiDigitalClock",e)}const Mit=Hn("MuiDigitalClock",["root","list","item"]);function og(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const Ait=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},ua=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?ua(t.shadowRoot):t:null},UE=e=>Array.from(e.children).indexOf(ua(document)),wB="@media (pointer: fine)",$it=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],Rit=e=>{const{classes:t}=e;return _n({root:["root"],list:["list"],item:["item"]},kit,t)},_it=oe(Mk,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:Ooe,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),Dit=oe(xS,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),Nit=oe(Yt,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.primary.main,e.palette.action.focusOpacity)}})),Lit=y.forwardRef(function(t,n){const r=pn(),o=y.useRef(null),i=Qi(n,o),a=y.useRef(null),s=Zt({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:d,slotProps:f,value:h,defaultValue:m,referenceDate:g,disableIgnoringDatePartForTimeValidation:v=!1,maxTime:w,minTime:x,disableFuture:S,disablePast:P,minutesStep:T=1,shouldDisableTime:E,onChange:O,view:k,openTo:A,onViewChange:I,focusedView:R,onFocusedViewChange:N,className:L,disabled:B,readOnly:_,views:D=["hours"],skipDisabled:z=!1,timezone:F}=s,H=Rt(s,$it),{value:U,handleValueChange:q,timezone:Y}=rb({name:"DigitalClock",timezone:F,value:h,defaultValue:m,onChange:O,valueManager:no}),ae=Co(),Z=Kh(Y),K=y.useMemo(()=>ue({},s,{alreadyRendered:!!o.current}),[s]),te=Rit(K),pe=(d==null?void 0:d.digitalClockItem)??Nit,ie=zn({elementType:pe,externalSlotProps:f==null?void 0:f.digitalClockItem,ownerState:{},className:te.item}),le=bB({value:U,referenceDate:g,utils:r,props:s,timezone:Y}),re=Ct(Se=>q(Se,"finish","hours")),{setValueAndGoToNextView:de}=zS({view:k,views:D,openTo:A,onViewChange:I,onChange:re,focusedView:R,onFocusedViewChange:N}),ee=Ct(Se=>{de(Se,"finish")});y.useEffect(()=>{if(o.current===null)return;const Se=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!Se)return;const xe=Se.offsetTop;(u||R)&&Se.focus(),o.current.scrollTop=xe-4});const ce=y.useCallback(Se=>{const xe=BS(v,r),Ie=()=>!(x&&xe(x,Se)||w&&xe(Se,w)||S&&xe(Se,Z)||P&&xe(Z,Se)),Re=()=>r.getMinutes(Se)%T!==0?!1:E?!E(Se,"hours"):!0;return!Ie()||!Re()},[v,r,x,w,S,Z,P,T,E]),me=y.useMemo(()=>{const Se=[];let Ie=r.startOfDay(le);for(;r.isSameDay(le,Ie);)Se.push(Ie),Ie=r.addMinutes(Ie,c);return Se},[le,c,r]),we=me.findIndex(Se=>r.isEqual(Se,le)),ge=Se=>{switch(Se.key){case"PageUp":{const xe=UE(a.current)-5,Ie=a.current.children,Re=Math.max(0,xe),_e=Ie[Re];_e&&_e.focus(),Se.preventDefault();break}case"PageDown":{const xe=UE(a.current)+5,Ie=a.current.children,Re=Math.min(Ie.length-1,xe),_e=Ie[Re];_e&&_e.focus(),Se.preventDefault();break}}};return $.jsx(_it,ue({ref:i,className:fe(te.root,L),ownerState:K},H,{children:$.jsx(Dit,{ref:a,role:"listbox","aria-label":ae.timePickerToolbarTitle,className:te.list,onKeyDown:ge,children:me.map((Se,xe)=>{if(z&&ce(Se))return null;const Ie=r.isEqual(Se,U),Re=r.format(Se,l?"fullTime12h":"fullTime24h"),_e=we===xe||we===-1&&xe===0?0:-1;return $.jsx(pe,ue({onClick:()=>!_&&ee(Se),selected:Ie,disabled:B||ce(Se),disableRipple:_,role:"option","aria-disabled":_,"aria-selected":Ie,tabIndex:_e},ie,{children:Re}),`${Se.valueOf()}-${Re}`)})})}))});function Fit(e){return Ln("MuiMultiSectionDigitalClock",e)}const Z8=Hn("MuiMultiSectionDigitalClock",["root"]);function jit(e){return Ln("MuiMultiSectionDigitalClockSection",e)}const Bit=Hn("MuiMultiSectionDigitalClockSection",["root","item"]),zit=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],Vit=e=>{const{classes:t}=e;return _n({root:["root"],item:["item"]},jit,t)},Hit=oe(xS,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({maxHeight:Ooe,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),Uit=oe(Yt,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:L0,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.primary.main,e.palette.action.focusOpacity)}})),Wit=y.forwardRef(function(t,n){const r=y.useRef(null),o=Qi(n,r),i=y.useRef(null),a=Zt({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:f,active:h,slots:m,slotProps:g,skipDisabled:v}=a,w=Rt(a,zit),x=y.useMemo(()=>ue({},a,{alreadyRendered:!!r.current}),[a]),S=Vit(x),P=(m==null?void 0:m.digitalClockSectionItem)??Uit;y.useEffect(()=>{if(r.current===null)return;const O=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(h&&s&&O&&O.focus(),!O||i.current===O)return;i.current=O;const k=O.offsetTop;r.current.scrollTop=k-4});const T=f.findIndex(O=>O.isFocused(O.value)),E=O=>{switch(O.key){case"PageUp":{const k=UE(r.current)-5,A=r.current.children,I=Math.max(0,k),R=A[I];R&&R.focus(),O.preventDefault();break}case"PageDown":{const k=UE(r.current)+5,A=r.current.children,I=Math.min(A.length-1,k),R=A[I];R&&R.focus(),O.preventDefault();break}}};return $.jsx(Hit,ue({ref:o,className:fe(S.root,c),ownerState:x,autoFocusItem:s&&h,role:"listbox",onKeyDown:E},w,{children:f.map((O,k)=>{var L;const A=(L=O.isDisabled)==null?void 0:L.call(O,O.value),I=u||A;if(v&&I)return null;const R=O.isSelected(O.value),N=T===k||T===-1&&k===0?0:-1;return $.jsx(P,ue({onClick:()=>!d&&l(O.value),selected:R,disabled:I,disableRipple:d,role:"option","aria-disabled":d||I||void 0,"aria-label":O.ariaLabel,"aria-selected":R,tabIndex:N,className:S.item},g==null?void 0:g.digitalClockSectionItem,{children:O.label}),O.label)})}))}),Git=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(h,m)=>{const g=m??l;return g===null?!1:r?h===12?g===12||g===0:g===h||g-12===h:g===h},d=h=>u(h,n.getHours(s)),f=r?11:23;for(let h=0;h<=f;h+=a){let m=n.format(n.setHours(e,h),r?"hours12h":"hours24h");const g=i(parseInt(m,10).toString());m=n.formatNumber(m),c.push({value:h,label:m,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:g})}return c},e9=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const d=r*u;return{value:d,label:t.formatNumber(o(d)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(d.toString())}})]},qit=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],Kit=e=>{const{classes:t}=e;return _n({root:["root"]},Fit,t)},Yit=oe(Mk,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Xit=y.forwardRef(function(t,n){const r=pn(),o=nr(),i=Zt({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:d,defaultValue:f,referenceDate:h,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:v,disableFuture:w,disablePast:x,minutesStep:S=1,shouldDisableTime:P,onChange:T,view:E,views:O=["hours","minutes"],openTo:k,onViewChange:A,focusedView:I,onFocusedViewChange:R,className:N,disabled:L,readOnly:B,skipDisabled:_=!1,timezone:D}=i,z=Rt(i,qit),{value:F,handleValueChange:H,timezone:U}=rb({name:"MultiSectionDigitalClock",timezone:D,value:d,defaultValue:f,onChange:T,valueManager:no}),q=Co(),Y=Kh(U),ae=y.useMemo(()=>ue({hours:1,minutes:5,seconds:5},s),[s]),Z=bB({value:F,referenceDate:h,utils:r,props:i,timezone:U}),K=Ct((Ie,Re,_e)=>H(Ie,Re,_e)),te=y.useMemo(()=>!a||!O.includes("hours")||O.includes("meridiem")?O:[...O,"meridiem"],[a,O]),{view:pe,setValueAndGoToNextView:ie,focusedView:le}=zS({view:E,views:te,openTo:k,onViewChange:A,onChange:K,focusedView:I,onFocusedViewChange:R}),re=Ct(Ie=>{ie(Ie,"finish","meridiem")}),{meridiemMode:de,handleMeridiemChange:ee}=Ek(Z,a,re,"finish"),ce=y.useCallback((Ie,Re)=>{const _e=BS(m,r),ye=Re==="hours"||Re==="minutes"&&te.includes("seconds"),Te=({start:Me,end:Ue})=>!(v&&_e(v,Ue)||g&&_e(Me,g)||w&&_e(Me,Y)||x&&_e(Y,ye?Ue:Me)),Oe=(Me,Ue=1)=>{if(Me%Ue!==0)return!1;if(P)switch(Re){case"hours":return!P(r.setHours(Z,Me),"hours");case"minutes":return!P(r.setMinutes(Z,Me),"minutes");case"seconds":return!P(r.setSeconds(Z,Me),"seconds");default:return!1}return!0};switch(Re){case"hours":{const Me=Rx(Ie,de,a),Ue=r.setHours(Z,Me),ze=r.setSeconds(r.setMinutes(Ue,0),0),Qe=r.setSeconds(r.setMinutes(Ue,59),59);return!Te({start:ze,end:Qe})||!Oe(Me)}case"minutes":{const Me=r.setMinutes(Z,Ie),Ue=r.setSeconds(Me,0),ze=r.setSeconds(Me,59);return!Te({start:Ue,end:ze})||!Oe(Ie,S)}case"seconds":{const Me=r.setSeconds(Z,Ie);return!Te({start:Me,end:Me})||!Oe(Ie)}default:throw new Error("not supported")}},[a,Z,m,g,de,v,S,P,r,w,x,Y,te]),me=y.useCallback(Ie=>{switch(Ie){case"hours":return{onChange:Re=>{const _e=Rx(Re,de,a);ie(r.setHours(Z,_e),"finish","hours")},items:Git({now:Y,value:F,ampm:a,utils:r,isDisabled:Re=>ce(Re,"hours"),timeStep:ae.hours,resolveAriaLabel:q.hoursClockNumberText,valueOrReferenceDate:Z})};case"minutes":return{onChange:Re=>{ie(r.setMinutes(Z,Re),"finish","minutes")},items:e9({value:r.getMinutes(Z),utils:r,isDisabled:Re=>ce(Re,"minutes"),resolveLabel:Re=>r.format(r.setMinutes(Y,Re),"minutes"),timeStep:ae.minutes,hasValue:!!F,resolveAriaLabel:q.minutesClockNumberText})};case"seconds":return{onChange:Re=>{ie(r.setSeconds(Z,Re),"finish","seconds")},items:e9({value:r.getSeconds(Z),utils:r,isDisabled:Re=>ce(Re,"seconds"),resolveLabel:Re=>r.format(r.setSeconds(Y,Re),"seconds"),timeStep:ae.seconds,hasValue:!!F,resolveAriaLabel:q.secondsClockNumberText})};case"meridiem":{const Re=zl(r,"am"),_e=zl(r,"pm");return{onChange:ee,items:[{value:"am",label:Re,isSelected:()=>!!F&&de==="am",isFocused:()=>!!Z&&de==="am",ariaLabel:Re},{value:"pm",label:_e,isSelected:()=>!!F&&de==="pm",isFocused:()=>!!Z&&de==="pm",ariaLabel:_e}]}}default:throw new Error(`Unknown view: ${Ie} found.`)}},[Y,F,a,r,ae.hours,ae.minutes,ae.seconds,q.hoursClockNumberText,q.minutesClockNumberText,q.secondsClockNumberText,de,ie,Z,ce,ee]),we=y.useMemo(()=>{if(!o)return te;const Ie=te.filter(Re=>Re!=="meridiem");return Ie.reverse(),te.includes("meridiem")&&Ie.push("meridiem"),Ie},[o,te]),ge=y.useMemo(()=>te.reduce((Ie,Re)=>ue({},Ie,{[Re]:me(Re)}),{}),[te,me]),Se=i,xe=Kit(Se);return $.jsx(Yit,ue({ref:n,className:fe(xe.root,N),ownerState:Se,role:"group"},z,{children:we.map(Ie=>$.jsx(Wit,{items:ge[Ie].items,onChange:ge[Ie].onChange,active:pe===Ie,autoFocus:l??le===Ie,disabled:L,readOnly:B,slots:c,slotProps:u,skipDisabled:_,"aria-label":q.selectViewText(Ie)},Ie))}))});function Qit(e){return Ln("MuiPickersDay",e)}const yp=Hn("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Jit=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Zit=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s;return _n({root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Qit,l)},Foe=({theme:e})=>ue({},e.typography.caption,{width:_x,height:_x,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${yp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${yp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${yp.disabled}:not(.${yp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${yp.disabled}&.${yp.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Ok}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${yp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),joe=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},eat=oe(Ki,{name:"MuiPickersDay",slot:"Root",overridesResolver:joe})(Foe),tat=oe("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:joe})(({theme:e})=>ue({},Foe({theme:e}),{opacity:0,pointerEvents:"none"})),p0=()=>{},nat=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:h=p0,onBlur:m=p0,onKeyDown:g=p0,onMouseDown:v=p0,onMouseEnter:w=p0,outsideCurrentMonth:x,selected:S=!1,showDaysOutsideCurrentMonth:P=!1,children:T,today:E=!1}=r,O=Rt(r,Jit),k=ue({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:P,today:E}),A=Zit(k),I=pn(),R=y.useRef(null),N=Qi(R,n);zc(()=>{o&&!s&&!u&&!x&&R.current.focus()},[o,s,u,x]);const L=_=>{v(_),x&&_.preventDefault()},B=_=>{s||f(a),x&&_.currentTarget.focus(),d&&d(_)};return x&&!P?$.jsx(tat,{className:fe(A.root,A.hiddenDaySpacingFiller,i),ownerState:k,role:O.role}):$.jsx(eat,ue({className:fe(A.root,i),ref:N,centerRipple:!0,disabled:s,tabIndex:S?0:-1,onKeyDown:_=>g(_,a),onFocus:_=>h(_,a),onBlur:_=>m(_,a),onMouseEnter:_=>w(_,a),onClick:B,onMouseDown:L},O,{ownerState:k,children:T||I.format(a,"dayOfMonth")}))}),rat=y.memo(nat),ob=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,c=r.utils.date(void 0,n),u=Ti(r.utils,e.minDate,r.defaultDates.minDate),d=Ti(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};ob.valueManager=no;const VS=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.utils.date(void 0,n),f=BS(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&f(o,t)):return"minTime";case!!(i&&f(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,d)):return"disableFuture";case!!(c&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};VS.valueManager=no;const $k=({adapter:e,value:t,timezone:n,props:r})=>{const o=ob({adapter:e,value:t,timezone:n,props:r});return o!==null?o:VS({adapter:e,value:t,timezone:n,props:r})};$k.valueManager=no;const iN=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],aN=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],Boe=["minDateTime","maxDateTime"],oat=[...iN,...aN,...Boe],ib=e=>oat.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function zoe(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=Gh(),s=y.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);y.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=Ct(d=>n({adapter:a,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const iat=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},aat=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},sat=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},lat=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=$oe(e,a),c=Loe(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",d=t!=null&&e.isValid(t);let f=d?e.formatByString(t,a):"",h=null;if(u)if(c)h=f===""?e.formatByString(i,a).length:f.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);h=l.maxLength,d&&(f=gB(_oe(Oh(f,o),h),o))}return ue({},l,{format:a,maxLength:h,value:f,placeholder:sat(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},cat=e=>{var h;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((m,g)=>g.length-m.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=m=>r.find(g=>g.start<=m&&g.end>=m);let f=0;for(;f0;){const x=u.exec(w)[1];w=w.slice(x.length),i.push(lat(ue({},e,{now:o,token:x,startSeparator:a}))),a=""}f+=v.length}else{const w=n[f];g&&(m==null?void 0:m.start)===f||(m==null?void 0:m.end)===f||(i.length===0?a+=w:i[i.length-1].endSeparator+=w),f+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},uat=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),t9=e=>{let t=iat(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=aat(ue({},e,{expandedFormat:t})),r=cat(ue({},e,{expandedFormat:t,escapedParts:n}));return uat(ue({},e,{sections:r}))},dat=e=>{const t=pn(),n=Co(),r=Gh(),o=nr(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:f,onChange:h,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:w,shouldRespectLeadingZeros:x=!1,timezone:S,enableAccessibleFieldDOMStructure:P=!1}}=e,{timezone:T,value:E,handleValueChange:O}=mB({timezone:S,value:u,defaultValue:d,onChange:h,valueManager:i}),k=y.useMemo(()=>dit(t),[t]),A=y.useMemo(()=>git(t,k,T),[t,k,T]),I=y.useCallback((K,te=null)=>a.getSectionsFromValue(t,K,te,pe=>t9({utils:t,localeText:n,localizedDigits:k,format:m,date:pe,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o})),[a,m,n,k,o,x,t,g,P]),[R,N]=y.useState(()=>{const K=I(E),te={sections:K,value:E,referenceValue:i.emptyValue,tempValueStrAndroid:null},pe=sit(K),ie=i.getInitialReferenceValue({referenceDate:f,value:E,utils:t,props:c,granularity:pe,timezone:T});return ue({},te,{referenceValue:ie})}),[L,B]=Eh({controlled:v,default:null,name:"useField",state:"selectedSections"}),_=K=>{B(K),w==null||w(K)},D=y.useMemo(()=>oN(L,R.sections),[L,R.sections]),z=D==="all"?0:D,F=({value:K,referenceValue:te,sections:pe})=>{if(N(le=>ue({},le,{sections:pe,value:K,referenceValue:te,tempValueStrAndroid:null})),i.areValuesEqual(t,R.value,K))return;const ie={validationError:l({adapter:r,value:K,timezone:T,props:c})};O(K,ie)},H=(K,te)=>{const pe=[...R.sections];return pe[K]=ue({},pe[K],{value:te,modified:!0}),pe},U=()=>{F({value:i.emptyValue,referenceValue:R.referenceValue,sections:I(i.emptyValue)})},q=()=>{if(z==null)return;const K=R.sections[z],te=a.getActiveDateManager(t,R,K),ie=te.getSections(R.sections).filter(ee=>ee.value!=="").length===(K.value===""?0:1),le=H(z,""),re=ie?null:t.getInvalidDate(),de=te.getNewValuesFromNewActiveDate(re);F(ue({},de,{sections:le}))},Y=K=>{const te=(le,re)=>{const de=t.parse(le,m);if(de==null||!t.isValid(de))return null;const ee=t9({utils:t,localeText:n,localizedDigits:k,format:m,date:de,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o});return J8(t,de,ee,re,!1)},pe=a.parseValueStr(K,R.referenceValue,te),ie=a.updateReferenceValue(t,pe,R.referenceValue);F({value:pe,referenceValue:ie,sections:I(pe,R.sections)})},ae=({activeSection:K,newSectionValue:te,shouldGoToNextSection:pe})=>{pe&&zue({},me,ee,{sections:le,tempValueStrAndroid:null}))},Z=K=>N(te=>ue({},te,{tempValueStrAndroid:K}));return y.useEffect(()=>{const K=I(R.value);N(te=>ue({},te,{sections:K}))},[m,t.locale,o]),y.useEffect(()=>{let K;i.areValuesEqual(t,R.value,E)?K=i.getTimezone(t,R.value)!==i.getTimezone(t,E):K=!0,K&&N(te=>ue({},te,{value:E,referenceValue:a.updateReferenceValue(t,E,te.referenceValue),sections:I(E)}))},[E]),{state:R,activeSectionIndex:z,parsedSelectedSections:D,setSelectedSections:_,clearValue:U,clearActiveSection:q,updateSectionValue:ae,updateValueFromValueStr:Y,setTempAndroidValueStr:Z,getSectionsFromValue:I,sectionsValueBoundaries:A,localizedDigits:k,timezone:T}},fat=5e3,Vm=e=>e.saveQuery!=null,pat=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=pn(),[s,l]=y.useState(null),c=Ct(()=>l(null));y.useEffect(()=>{var m;s!=null&&((m=e[s.sectionIndex])==null?void 0:m.type)!==s.sectionType&&c()},[e,s,c]),y.useEffect(()=>{if(s!=null){const m=setTimeout(()=>c(),fat);return()=>{clearTimeout(m)}}return()=>{}},[s,c]);const u=({keyPressed:m,sectionIndex:g},v,w)=>{const x=m.toLowerCase(),S=e[g];if(s!=null&&(!w||w(s.value))&&s.sectionIndex===g){const T=`${s.value}${x}`,E=v(T,S);if(!Vm(E))return l({sectionIndex:g,value:T,sectionType:S.type}),E}const P=v(x,S);return Vm(P)&&!P.saveQuery?(c(),null):(l({sectionIndex:g,value:x,sectionType:S.type}),Vm(P)?null:P)},d=m=>{const g=(x,S,P)=>{const T=S.filter(E=>E.toLowerCase().startsWith(P));return T.length===0?{saveQuery:!1}:{sectionValue:T[0],shouldGoToNextSection:T.length===1}},v=(x,S,P,T)=>{const E=O=>Roe(a,i,S.type,O);if(S.contentType==="letter")return g(S.format,E(S.format),x);if(P&&T!=null&&$oe(a,P).contentType==="letter"){const O=E(P),k=g(P,O,x);return Vm(k)?{saveQuery:!1}:ue({},k,{sectionValue:T(k.sectionValue,O)})}return{saveQuery:!1}};return u(m,(x,S)=>{switch(S.type){case"month":{const P=T=>X8(a,T,a.formats.month,S.format);return v(x,S,a.formats.month,P)}case"weekDay":{const P=(T,E)=>E.indexOf(T).toString();return v(x,S,a.formats.weekday,P)}case"meridiem":return v(x,S);default:return{saveQuery:!1}}})},f=m=>{const g=(w,x)=>{const S=Oh(w,r),P=Number(S),T=n[x.type]({currentDate:null,format:x.format,contentType:x.contentType});if(P>T.maximum)return{saveQuery:!1};if(PT.maximum||S.length===T.maximum.toString().length;return{sectionValue:Doe(a,P,T,r,x),shouldGoToNextSection:E}};return u(m,(w,x)=>{if(x.contentType==="digit"||x.contentType==="digit-with-letter")return g(w,x);if(x.type==="month"){const S=Loe(a,"digit","month","MM"),P=g(w,{type:x.type,format:"MM",hasLeadingZerosInFormat:S,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Vm(P))return P;const T=X8(a,P.sectionValue,"MM",x.format);return ue({},P,{sectionValue:T})}if(x.type==="weekDay"){const S=g(w,x);if(Vm(S))return S;const P=Ak(a,x.format)[Number(S.sectionValue)-1];return ue({},S,{sectionValue:P})}return{saveQuery:!1}},w=>Y8(w,r))};return{applyCharacterEditing:Ct(m=>{const g=e[m.sectionIndex],w=Y8(m.keyPressed,r)?f(ue({},m,{keyPressed:gB(m.keyPressed,r)})):d(m);if(w==null){o(null);return}t({activeSection:g,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:c}},hat=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:c,autoFocus:u=!1},fieldValueManager:d,applyCharacterEditing:f,resetCharacterQuery:h,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:w,clearValue:x,updateSectionValue:S,updateValueFromValueStr:P,sectionOrder:T,areAllSectionsEmpty:E,sectionsValueBoundaries:O}=e,k=y.useRef(null),A=Qi(r,k),I=Co(),R=pn(),N=tb(),[L,B]=y.useState(!1),_=y.useMemo(()=>({syncSelectionToDOM:()=>{if(!k.current)return;const ce=document.getSelection();if(!ce)return;if(g==null){ce.rangeCount>0&&k.current.getRoot().contains(ce.getRangeAt(0).startContainer)&&ce.removeAllRanges(),L&&k.current.getRoot().blur();return}if(!k.current.getRoot().contains(ua(document)))return;const me=new window.Range;let we;g==="all"?we=k.current.getRoot():v.sections[g].type==="empty"?we=k.current.getSectionContainer(g):we=k.current.getSectionContent(g),me.selectNodeContents(we),we.focus(),ce.removeAllRanges(),ce.addRange(me)},getActiveSectionIndexFromDOM:()=>{const ce=ua(document);return!ce||!k.current||!k.current.getRoot().contains(ce)?null:k.current.getSectionIndexFromDOMElement(ce)},focusField:(ce=0)=>{if(!k.current)return;const me=oN(ce,v.sections);B(!0),k.current.getSectionContent(me).focus()},setSelectedSections:ce=>{if(!k.current)return;const me=oN(ce,v.sections);B((me==="all"?0:me)!==null),m(ce)},isFieldFocused:()=>{const ce=ua(document);return!!k.current&&k.current.getRoot().contains(ce)}}),[g,m,v.sections,L]),D=Ct(ce=>{if(!k.current)return;const me=v.sections[ce];k.current.getSectionContent(ce).innerHTML=me.value||me.placeholder,_.syncSelectionToDOM()}),z=Ct((ce,...me)=>{ce.isDefaultPrevented()||!k.current||(B(!0),i==null||i(ce,...me),g==="all"?setTimeout(()=>{const we=document.getSelection().getRangeAt(0).startOffset;if(we===0){m(T.startIndex);return}let ge=0,Se=0;for(;Se{if(s==null||s(ce),!k.current||g!=="all")return;const we=ce.target.textContent??"";k.current.getRoot().innerHTML=v.sections.map(ge=>`${ge.startSeparator}${ge.value||ge.placeholder}${ge.endSeparator}`).join(""),_.syncSelectionToDOM(),we.length===0||we.charCodeAt(0)===10?(h(),x(),m("all")):we.length>1?P(we):f({keyPressed:we,sectionIndex:0})}),H=Ct(ce=>{if(l==null||l(ce),n||g!=="all"){ce.preventDefault();return}const me=ce.clipboardData.getData("text");ce.preventDefault(),h(),P(me)}),U=Ct((...ce)=>{if(a==null||a(...ce),L||!k.current)return;B(!0),k.current.getSectionIndexFromDOMElement(ua(document))!=null||m(T.startIndex)}),q=Ct((...ce)=>{o==null||o(...ce),setTimeout(()=>{if(!k.current)return;const me=ua(document);!k.current.getRoot().contains(me)&&(B(!1),m(null))})}),Y=Ct(ce=>me=>{me.isDefaultPrevented()||m(ce)}),ae=Ct(ce=>{ce.preventDefault()}),Z=Ct(ce=>()=>{m(ce)}),K=Ct(ce=>{if(ce.preventDefault(),n||t||typeof g!="number")return;const me=v.sections[g],we=ce.clipboardData.getData("text"),ge=/^[a-zA-Z]+$/.test(we),Se=/^[0-9]+$/.test(we),xe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(we);me.contentType==="letter"&&ge||me.contentType==="digit"&&Se||me.contentType==="digit-with-letter"&&xe?(h(),S({activeSection:me,newSectionValue:we,shouldGoToNextSection:!0})):!ge&&!Se&&(h(),P(we))}),te=Ct(ce=>{ce.preventDefault(),ce.dataTransfer.dropEffect="none"}),pe=Ct(ce=>{if(!k.current)return;const me=ce.target,we=me.textContent??"",ge=k.current.getSectionIndexFromDOMElement(me),Se=v.sections[ge];if(n||!k.current){D(ge);return}if(we.length===0){if(Se.value===""){D(ge);return}const xe=ce.nativeEvent.inputType;if(xe==="insertParagraph"||xe==="insertLineBreak"){D(ge);return}h(),w();return}f({keyPressed:we,sectionIndex:ge}),D(ge)});zc(()=>{if(!(!L||!k.current)){if(g==="all")k.current.getRoot().focus();else if(typeof g=="number"){const ce=k.current.getSectionContent(g);ce&&ce.focus()}}},[g,L]);const ie=y.useMemo(()=>v.sections.reduce((ce,me)=>(ce[me.type]=O[me.type]({currentDate:null,contentType:me.contentType,format:me.format}),ce),{}),[O,v.sections]),le=g==="all",re=y.useMemo(()=>v.sections.map((ce,me)=>{const we=!le&&!t&&!n;return{container:{"data-sectionindex":me,onClick:Y(me)},content:{tabIndex:le||me>0?-1:0,contentEditable:!le&&!t&&!n,role:"spinbutton",id:`${N}-${ce.type}`,"aria-labelledby":`${N}-${ce.type}`,"aria-readonly":n,"aria-valuenow":xit(ce,R),"aria-valuemin":ie[ce.type].minimum,"aria-valuemax":ie[ce.type].maximum,"aria-valuetext":ce.value?wit(ce,R):I.empty,"aria-label":I[ce.type],"aria-disabled":t,spellCheck:we?!1:void 0,autoCapitalize:we?"off":void 0,autoCorrect:we?"off":void 0,[parseInt(y.version,10)>=17?"enterKeyHint":"enterkeyhint"]:we?"next":void 0,children:ce.value||ce.placeholder,onInput:pe,onPaste:K,onFocus:Z(me),onDragOver:te,onMouseUp:ae,inputMode:ce.contentType==="letter"?"text":"numeric"},before:{children:ce.startSeparator},after:{children:ce.endSeparator}}}),[v.sections,Z,K,te,pe,Y,ae,t,n,le,I,R,ie,N]),de=Ct(ce=>{P(ce.target.value)}),ee=y.useMemo(()=>E?"":d.getV7HiddenInputValueFromSections(v.sections),[E,v.sections,d]);return y.useEffect(()=>{if(k.current==null)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(` -`));u&&k.current&&k.current.getSectionContent(T.startIndex).focus()},[]),{interactions:_,returnedValue:{autoFocus:u,readOnly:n,focused:c??L,sectionListRef:A,onBlur:q,onClick:z,onFocus:U,onInput:F,onPaste:H,enableAccessibleFieldDOMStructure:!0,elements:re,tabIndex:g===0?-1:0,contentEditable:le,value:ee,onChange:de,areAllSectionsEmpty:E}}},Mg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),mat=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a{const t=nr(),n=y.useRef(),r=y.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:f,activeSectionIndex:h,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:w,resetCharacterQuery:x,updateSectionValue:S,updateValueFromValueStr:P,clearActiveSection:T,clearValue:E,setTempAndroidValueStr:O,setSelectedSections:k,getSectionsFromValue:A,areAllSectionsEmpty:I,localizedDigits:R}=e,N=y.useRef(null),L=Qi(l,N),B=y.useMemo(()=>mat(m.sections,R,t),[m.sections,R,t]),_=y.useMemo(()=>({syncSelectionToDOM:()=>{if(!N.current)return;if(f==null){N.current.scrollLeft&&(N.current.scrollLeft=0);return}if(N.current!==ua(document))return;const pe=N.current.scrollTop;if(f==="all")N.current.select();else{const ie=B[f],le=ie.type==="empty"?ie.startInInput-ie.startSeparator.length:ie.startInInput,re=ie.type==="empty"?ie.endInInput+ie.endSeparator.length:ie.endInInput;(le!==N.current.selectionStart||re!==N.current.selectionEnd)&&N.current===ua(document)&&N.current.setSelectionRange(le,re),clearTimeout(r.current),r.current=setTimeout(()=>{N.current&&N.current===ua(document)&&N.current.selectionStart===N.current.selectionEnd&&(N.current.selectionStart!==le||N.current.selectionEnd!==re)&&_.syncSelectionToDOM()})}N.current.scrollTop=pe},getActiveSectionIndexFromDOM:()=>{const pe=N.current.selectionStart??0,ie=N.current.selectionEnd??0;if(pe===0&&ie===0)return null;const le=pe<=B[0].startInInput?1:B.findIndex(re=>re.startInInput-re.startSeparator.length>pe);return le===-1?B.length-1:le-1},focusField:(pe=0)=>{var ie;(ie=N.current)==null||ie.focus(),k(pe)},setSelectedSections:pe=>k(pe),isFieldFocused:()=>N.current===ua(document)}),[N,f,B,k]),D=()=>{const pe=N.current.selectionStart??0;let ie;pe<=B[0].startInInput||pe>=B[B.length-1].endInInput?ie=1:ie=B.findIndex(re=>re.startInInput-re.startSeparator.length>pe);const le=ie===-1?B.length-1:ie-1;k(le)},z=Ct((...pe)=>{o==null||o(...pe);const ie=N.current;clearTimeout(n.current),n.current=setTimeout(()=>{!ie||ie!==N.current||h==null&&(ie.value.length&&Number(ie.selectionEnd)-Number(ie.selectionStart)===ie.value.length?k("all"):D())})}),F=Ct((pe,...ie)=>{pe.isDefaultPrevented()||(i==null||i(pe,...ie),D())}),H=Ct(pe=>{if(a==null||a(pe),pe.preventDefault(),u||d)return;const ie=pe.clipboardData.getData("text");if(typeof f=="number"){const le=m.sections[f],re=/^[a-zA-Z]+$/.test(ie),de=/^[0-9]+$/.test(ie),ee=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ie);if(le.contentType==="letter"&&re||le.contentType==="digit"&&de||le.contentType==="digit-with-letter"&&ee){x(),S({activeSection:le,newSectionValue:ie,shouldGoToNextSection:!0});return}if(re||de)return}x(),P(ie)}),U=Ct((...pe)=>{s==null||s(...pe),k(null)}),q=Ct(pe=>{if(u)return;const ie=pe.target.value;if(ie===""){x(),E();return}const le=pe.nativeEvent.data,re=le&&le.length>1,de=re?le:ie,ee=Mg(de);if(h==null||re){P(re?le:ee);return}let ce;if(f==="all"&&ee.length===1)ce=ee;else{const me=Mg(g.getV6InputValueFromSections(B,R,t));let we=-1,ge=-1;for(let Re=0;ReSe.end)return;const Ie=ee.length-me.length+Se.end-Mg(Se.endSeparator||"").length;ce=ee.slice(Se.start+Mg(Se.startSeparator||"").length,Ie)}if(ce.length===0){vit()&&O(de),x(),T();return}w({keyPressed:ce,sectionIndex:h})}),Y=y.useMemo(()=>c!==void 0?c:g.getV6InputValueFromSections(A(v.emptyValue),R,t),[c,g,A,v.emptyValue,R,t]),ae=y.useMemo(()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,R,t),[m.sections,g,m.tempValueStrAndroid,R,t]);y.useEffect(()=>(N.current&&N.current===ua(document)&&k("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const Z=y.useMemo(()=>h==null||m.sections[h].contentType==="letter"?"text":"numeric",[h,m.sections]),te=!(N.current&&N.current===ua(document))&&I;return{interactions:_,returnedValue:{readOnly:u,onBlur:U,onClick:F,onFocus:z,onPaste:H,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:Y,inputMode:Z,autoComplete:"off",value:te?"":ae,onChange:q}}},xB=e=>{const t=pn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:f,valueManager:h,validator:m}=e,g=nr(),v=dat(e),{state:w,activeSectionIndex:x,parsedSelectedSections:S,setSelectedSections:P,clearValue:T,clearActiveSection:E,updateSectionValue:O,setTempAndroidValueStr:k,sectionsValueBoundaries:A,localizedDigits:I,timezone:R}=v,N=pat({sections:w.sections,updateSectionValue:O,sectionsValueBoundaries:A,localizedDigits:I,setTempAndroidValueStr:k,timezone:R}),{resetCharacterQuery:L}=N,B=h.areValuesEqual(t,w.value,h.emptyValue),_=i?hat:gat,D=y.useMemo(()=>bit(w.sections,g&&!i),[w.sections,g,i]),{returnedValue:z,interactions:F}=_(ue({},e,v,N,{areAllSectionsEmpty:B,sectionOrder:D})),H=Ct(K=>{if(l==null||l(K),!a)switch(!0){case((K.ctrlKey||K.metaKey)&&String.fromCharCode(K.keyCode)==="A"&&!K.shiftKey&&!K.altKey):{K.preventDefault(),P("all");break}case K.key==="ArrowRight":{if(K.preventDefault(),S==null)P(D.startIndex);else if(S==="all")P(D.endIndex);else{const te=D.neighbors[S].rightIndex;te!==null&&P(te)}break}case K.key==="ArrowLeft":{if(K.preventDefault(),S==null)P(D.endIndex);else if(S==="all")P(D.startIndex);else{const te=D.neighbors[S].leftIndex;te!==null&&P(te)}break}case K.key==="Delete":{if(K.preventDefault(),s)break;S==null||S==="all"?T():E(),L();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(K.key):{if(K.preventDefault(),s||x==null)break;const te=w.sections[x],pe=f.getActiveDateManager(t,w,te),ie=fit(t,R,te,K.key,A,I,pe.date,{minutesStep:o});O({activeSection:te,newSectionValue:ie,shouldGoToNextSection:!1});break}}});zc(()=>{F.syncSelectionToDOM()});const{hasValidationError:U}=zoe({props:n,validator:m,timezone:R,value:w.value,onError:n.onError}),q=y.useMemo(()=>c!==void 0?c:U,[U,c]);y.useEffect(()=>{!q&&x==null&&L()},[w.referenceValue,x,q]),y.useEffect(()=>{w.tempValueStrAndroid!=null&&x!=null&&(L(),E())},[w.sections]),y.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:F.getActiveSectionIndexFromDOM,setSelectedSections:F.setSelectedSections,focusField:F.focusField,isFieldFocused:F.isFieldFocused}));const Y=Ct((K,...te)=>{K.preventDefault(),d==null||d(K,...te),T(),F.isFieldFocused()?P(D.startIndex):F.focusField(0)}),ae={onKeyDown:H,onClear:Y,error:q,clearable:!!(u&&!B&&!s&&!a)},Z={disabled:a,readOnly:s};return ue({},e.forwardedProps,ae,Z,z)},yat=["clearable","onClear","InputProps","sx","slots","slotProps"],vat=["ownerState"],SB=e=>{const t=Co(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=Rt(e,yat),c=(a==null?void 0:a.clearButton)??kn,u=zn({elementType:c,externalSlotProps:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=Rt(u,vat),f=(a==null?void 0:a.clearIcon)??yot,h=zn({elementType:f,externalSlotProps:s==null?void 0:s.clearIcon,ownerState:{}});return ue({},l,{InputProps:ue({},o,{endAdornment:$.jsxs(y.Fragment,{children:[n&&$.jsx(fo,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:$.jsx(c,ue({},d,{onClick:r,children:$.jsx(f,ue({fontSize:"small"},h))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},bat=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],CB=(e,t)=>y.useMemo(()=>{const n=ue({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return bat.forEach(o),t==="date"?iN.forEach(o):t==="time"?aN.forEach(o):t==="date-time"&&(iN.forEach(o),aN.forEach(o),Boe.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),wat=y.createContext(null);function Voe(e){const{contextValue:t,localeText:n,children:r}=e;return $.jsx(wat.Provider,{value:t,children:$.jsx(jS,{localeText:n,children:r})})}const xat=e=>{const t=pn(),n=qh();return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Ti(t,e.minDate,n.minDate),maxDate:Ti(t,e.maxDate,n.maxDate)})},Sat=e=>{const t=pn(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.fullTime12h:t.formats.fullTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r})},Cat=e=>{const t=pn(),n=qh(),o=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??o,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:Ti(t,e.minDateTime??e.minDate,n.minDate),maxDate:Ti(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},Pat=e=>{const t=xat(e),{forwardedProps:n,internalProps:r}=CB(t,"date");return xB({forwardedProps:n,internalProps:r,valueManager:no,fieldValueManager:vB,validator:ob,valueType:"date"})};function Tat(e){return Ln("MuiPickersTextField",e)}Hn("MuiPickersTextField",["root","focused","disabled","error","required"]);function Eat(e){return Ln("MuiPickersInputBase",e)}const Jg=Hn("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Oat(e){return Ln("MuiPickersSectionList",e)}const h0=Hn("MuiPickersSectionList",["root","section","sectionContent"]),Iat=["slots","slotProps","elements","sectionListRef"],Hoe=oe("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),Uoe=oe("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),Woe=oe("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),Goe=oe("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),kat=e=>{const{classes:t}=e;return _n({root:["root"],section:["section"],sectionContent:["sectionContent"]},Oat,t)};function Mat(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=(t==null?void 0:t.section)??Uoe,a=zn({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=(t==null?void 0:t.sectionContent)??Goe,l=zn({elementType:s,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=(t==null?void 0:t.sectionSeparator)??Woe,u=zn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=zn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return $.jsxs(i,ue({},a,{children:[$.jsx(c,ue({},u)),$.jsx(s,ue({},l)),$.jsx(c,ue({},d))]}))}const Aat=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=Rt(r,Iat),c=kat(r),u=y.useRef(null),d=Qi(n,u),f=g=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return u.current};y.useImperativeHandle(s,()=>({getRoot(){return f("getRoot")},getSectionContainer(g){return f("getSectionContainer").querySelector(`.${h0.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return f("getSectionContent").querySelector(`.${h0.section}[data-sectionindex="${g}"] .${h0.sectionContent}`)},getSectionIndexFromDOMElement(g){const v=f("getSectionIndexFromDOMElement");if(g==null||!v.contains(g))return null;let w=null;return g.classList.contains(h0.section)?w=g:g.classList.contains(h0.sectionContent)&&(w=g.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const h=(o==null?void 0:o.root)??Hoe,m=zn({elementType:h,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return $.jsx(h,ue({},m,{children:m.contentEditable?a.map(({content:g,before:v,after:w})=>`${v.children}${g.children}${w.children}`).join(""):$.jsx(y.Fragment,{children:a.map((g,v)=>$.jsx(Mat,{slots:o,slotProps:i,element:g,classes:c},v))})}))}),$at=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],Rat=e=>Math.round(e*1e5)/1e5,Rk=oe("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>ue({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${Rat(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),PB=oe(Hoe,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),_at=oe(Uoe,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),Dat=oe(Goe,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),Nat=oe(Woe,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),Lat=oe("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(ue({},eot)),Fat=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${Xrt(s)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return _n(d,Eat,o)},TB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:f,slotProps:h,contentEditable:m,tabIndex:g,onInput:v,onPaste:w,onKeyDown:x,name:S,readOnly:P,inputProps:T,inputRef:E,sectionListRef:O}=r,k=Rt(r,$at),A=y.useRef(null),I=Qi(n,A),R=Qi(T==null?void 0:T.ref,E),N=nr(),L=Ta();if(!L)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const B=U=>{var q;if(L.disabled){U.stopPropagation();return}(q=L.onFocus)==null||q.call(L,U)};y.useEffect(()=>{L&&L.setAdornedStart(!!u)},[L,u]),y.useEffect(()=>{L&&(i?L.onEmpty():L.onFilled())},[L,i]);const _=ue({},r,L,{isRtl:N}),D=Fat(_),z=(f==null?void 0:f.root)||Rk,F=zn({elementType:z,externalSlotProps:h==null?void 0:h.root,externalForwardedProps:k,additionalProps:{"aria-invalid":L.error,ref:I},className:D.root,ownerState:_}),H=(f==null?void 0:f.input)||PB;return $.jsxs(z,ue({},F,{children:[u,$.jsx(Aat,{sectionListRef:O,elements:o,contentEditable:m,tabIndex:g,className:D.sectionsContainer,onFocus:B,onBlur:L.onBlur,onInput:v,onPaste:w,onKeyDown:x,slots:{root:H,section:_at,sectionContent:Dat,sectionSeparator:Nat},slotProps:{root:{ownerState:_},sectionContent:{className:Jg.sectionContent},sectionSeparator:({position:U})=>({className:U==="before"?Jg.sectionBefore:Jg.sectionAfter})}}),c,d?d(ue({},L)):null,$.jsx(Lat,ue({name:S,className:D.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:P,required:L.required,disabled:L.disabled},T,{ref:R}))]}))});function jat(e){return Ln("MuiPickersOutlinedInput",e)}const Tl=ue({},Jg,Hn("MuiPickersOutlinedInput",["root","notchedOutline","input"])),Bat=["children","className","label","notched","shrink"],zat=oe("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),n9=oe("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),Vat=oe("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function Hat(e){const{className:t,label:n}=e,r=Rt(e,Bat),o=n!=null&&n!=="",i=ue({},e,{withLabel:o});return $.jsx(zat,ue({"aria-hidden":!0,className:t},r,{ownerState:i,children:$.jsx(Vat,{ownerState:i,children:o?$.jsx(n9,{children:n}):$.jsx(n9,{className:"notranslate",children:"​"})})}))}const Uat=["label","autoFocus","ownerState","notched"],Wat=oe(Rk,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${Tl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${Tl.focused} .${Tl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${Tl.disabled}`]:{[`& .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${Tl.error} .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${Tl.focused}:not(.${Tl.error}) .${Tl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),Gat=oe(PB,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),qat=e=>{const{classes:t}=e,r=_n({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},jat,t);return ue({},t,r)},qoe=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=Rt(r,Uat),l=Ta(),c=ue({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),u=qat(c);return $.jsx(TB,ue({slots:{root:Wat,input:Gat},renderSuffix:d=>$.jsx(Hat,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?$.jsxs(y.Fragment,{children:[o," ","*"]}):o,ownerState:c})},s,{label:o,classes:u,ref:n}))});qoe.muiName="Input";function Kat(e){return Ln("MuiPickersFilledInput",e)}const vp=ue({},Jg,Hn("MuiPickersFilledInput",["root","underline","input"])),Yat=["label","autoFocus","disableUnderline","ownerState"],Xat=oe(Rk,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>mP(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${vp.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${vp.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${vp.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${vp.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${vp.disabled}, .${vp.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${vp.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),Qat=oe(PB,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Jat=e=>{const{classes:t,disableUnderline:n}=e,o=_n({root:["root",!n&&"underline"],input:["input"]},Kat,t);return ue({},t,o)},Koe=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Rt(r,Yat),l=Ta(),c=ue({},r,a,l,{color:(l==null?void 0:l.color)||"primary"}),u=Jat(c);return $.jsx(TB,ue({slots:{root:Xat,input:Qat},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});Koe.muiName="Input";function Zat(e){return Ln("MuiPickersFilledInput",e)}const m0=ue({},Jg,Hn("MuiPickersInput",["root","input"])),est=["label","autoFocus","disableUnderline","ownerState"],tst=oe(Rk,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${m0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${m0.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${m0.disabled}, .${m0.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${m0.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),nst=e=>{const{classes:t,disableUnderline:n}=e,o=_n({root:["root",!n&&"underline"],input:["input"]},Zat,t);return ue({},t,o)},Yoe=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=Rt(r,est),l=Ta(),c=ue({},r,a,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),u=nst(c);return $.jsx(TB,ue({slots:{root:tst}},s,{label:o,classes:u,ref:n}))});Yoe.muiName="Input";const rst=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],ost={standard:Yoe,filled:Koe,outlined:qoe},ist=oe(Fh,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),ast=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return _n({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},Tat,r)},EB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:f,inputProps:h,inputRef:m,sectionListRef:g,elements:v,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:P,onPaste:T,onInput:E,endAdornment:O,startAdornment:k,tabIndex:A,contentEditable:I,focused:R,value:N,onChange:L,fullWidth:B,id:_,name:D,helperText:z,FormHelperTextProps:F,label:H,InputLabelProps:U}=r,q=Rt(r,rst),Y=y.useRef(null),ae=Qi(n,Y),Z=tb(_),K=z&&Z?`${Z}-helper-text`:void 0,te=H&&Z?`${Z}-label`:void 0,pe=ue({},r,{color:s,disabled:l,error:c,focused:R,required:d,variant:u}),ie=ast(pe),le=ost[u];return $.jsxs(ist,ue({className:fe(ie.root,a),ref:ae,focused:R,onFocus:o,onBlur:i,disabled:l,variant:u,error:c,color:s,fullWidth:B,required:d,ownerState:pe},q,{children:[$.jsx(jh,ue({htmlFor:Z,id:te},U,{children:H})),$.jsx(le,ue({elements:v,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:P,onInput:E,onPaste:T,endAdornment:O,startAdornment:k,tabIndex:A,contentEditable:I,value:N,onChange:L,id:Z,fullWidth:B,inputProps:h,inputRef:m,sectionListRef:g,label:H,name:D,role:"group","aria-labelledby":te},f)),z&&$.jsx(EI,ue({id:K},F,{children:z}))]}))}),sst=["enableAccessibleFieldDOMStructure"],lst=["InputProps","readOnly"],cst=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],OB=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=Rt(e,sst);if(t){const{InputProps:d,readOnly:f}=n,h=Rt(n,lst);return ue({},h,{InputProps:ue({},d??{},{readOnly:f})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c}=n,u=Rt(n,cst);return ue({},u,{InputProps:ue({},s??{},{readOnly:a}),inputProps:ue({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})},ust=["slots","slotProps","InputProps","inputProps"],Xoe=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Rt(r,ust),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?EB:Cn),d=zn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Pat(d),h=OB(f),m=SB(ue({},h,{slots:o,slotProps:i}));return $.jsx(u,ue({},m))}),dst=e=>{const t=Sat(e),{forwardedProps:n,internalProps:r}=CB(t,"time");return xB({forwardedProps:n,internalProps:r,valueManager:no,fieldValueManager:vB,validator:VS,valueType:"time"})},fst=["slots","slotProps","InputProps","inputProps"],Qoe=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Rt(r,fst),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?EB:Cn),d=zn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=dst(d),h=OB(f),m=SB(ue({},h,{slots:o,slotProps:i}));return $.jsx(u,ue({},m))}),pst=e=>{const t=Cat(e),{forwardedProps:n,internalProps:r}=CB(t,"date-time");return xB({forwardedProps:n,internalProps:r,valueManager:no,fieldValueManager:vB,validator:$k,valueType:"date-time"})},hst=["slots","slotProps","InputProps","inputProps"],Joe=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=Rt(r,hst),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?EB:Cn),d=zn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=pst(d),h=OB(f),m=SB(ue({},h,{slots:o,slotProps:i}));return $.jsx(u,ue({},m))}),Zoe=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=Gh();return y.useCallback(c=>ob({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},mst=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return ue({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),ue({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return ue({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return ue({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},gst=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,f=pn(),h=y.useRef(mst(!!c,i,f)).current,m=y.useMemo(()=>no.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:Fl.day}),[n,d]),[g,v]=y.useReducer(h,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:f.startOfMonth(m),slideDirection:"left"});y.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:f.getTimezone(m)})},[m,f]);const w=y.useCallback(E=>{v(ue({type:"changeMonth"},E)),l&&l(E.newMonth)},[l]),x=y.useCallback(E=>{const O=E;f.isSameMonth(O,g.currentMonth)||w({newMonth:f.startOfMonth(O),direction:f.isAfterDay(O,g.currentMonth)?"left":"right"})},[g.currentMonth,w,f]),S=Zoe({shouldDisableDate:u,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:d}),P=y.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]),T=Ct((E,O)=>{S(E)||v({type:"changeFocusedDay",focusedDay:E,withoutMonthSwitchingAnimation:O})});return{referenceDate:m,calendarState:g,changeMonth:x,changeFocusedDay:T,isDateDisabled:S,onMonthSwitchingAnimationEnd:P,handleChangeMonth:w}},yst=e=>Ln("MuiPickersFadeTransitionGroup",e);Hn("MuiPickersFadeTransitionGroup",["root"]);const vst=e=>{const{classes:t}=e;return _n({root:["root"]},yst,t)},bst=oe(vS,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function eie(e){const t=Zt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=vst(t),s=Ei();return o?n:$.jsx(bst,{className:fe(a.root,r),children:$.jsx(Iv,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}const wst=e=>Ln("MuiPickersSlideTransition",e),Ms=Hn("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),xst=["children","className","reduceAnimations","slideDirection","transKey","classes"],Sst=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return _n(r,wst,t)},Cst=oe(vS,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${Ms["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${Ms["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${Ms.slideEnterActive}`]:t.slideEnterActive},{[`.${Ms.slideExit}`]:t.slideExit},{[`.${Ms["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${Ms["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${Ms["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${Ms["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${Ms.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${Ms.slideExit}`]:{transform:"translate(0%)"},[`& .${Ms["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${Ms["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function Pst(e){const t=Zt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Rt(t,xst),s=Sst(t),l=Ei();if(o)return $.jsx("div",{className:fe(s.root,r),children:n});const c={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return $.jsx(Cst,{className:fe(s.root,r),childFactory:u=>y.cloneElement(u,{classNames:c}),role:"presentation",children:$.jsx(CF,ue({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),i)})}const Tst=e=>Ln("MuiDayCalendar",e);Hn("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const Est=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Ost=["ownerState"],Ist=e=>{const{classes:t}=e;return _n({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Tst,t)},tie=(_x+Ok*2)*6,kst=oe("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Mst=oe("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),Ast=oe(dt,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),$st=oe(dt,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),Rst=oe(dt,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>ue({},e.typography.caption,{width:_x,height:_x,padding:0,margin:`0 ${Ok}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),_st=oe("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:tie}),Dst=oe(Pst,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:tie}),Nst=oe("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),Lst=oe("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Ok}px 0`,display:"flex",justifyContent:"center"});function Fst(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=Rt(e,Est);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:h,slotProps:m,timezone:g}=t,v=pn(),w=Kh(g),x=r!==null&&v.isSameDay(n,r),S=o.some(N=>v.isSameDay(N,n)),P=v.isSameDay(n,w),T=(h==null?void 0:h.day)??rat,E=zn({elementType:T,externalSlotProps:m==null?void 0:m.day,additionalProps:ue({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":v.toJsDate(n).valueOf()},l),ownerState:ue({},t,{day:n,selected:S})}),O=Rt(E,Ost),k=y.useMemo(()=>c||i(n),[c,i,n]),A=y.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),I=y.useMemo(()=>{const N=v.startOfMonth(v.setMonth(n,a));return f?v.isSameDay(n,v.startOfWeek(N)):v.isSameDay(n,N)},[a,n,f,v]),R=y.useMemo(()=>{const N=v.endOfMonth(v.setMonth(n,a));return f?v.isSameDay(n,v.endOfWeek(N)):v.isSameDay(n,N)},[a,n,f,v]);return $.jsx(T,ue({},O,{day:n,disabled:k,autoFocus:s&&x,today:P,outsideCurrentMonth:A,isFirstVisibleCell:I,isLastVisibleCell:R,selected:S,tabIndex:x?0:-1,"aria-selected":S,"aria-current":P?"date":void 0}))}function jst(e){const t=Zt({props:e,name:"MuiDayCalendar"}),n=pn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:f,renderLoading:h=()=>$.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:v,disableFuture:w,minDate:x,maxDate:S,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:O=ge=>n.format(ge,"weekdayShort").charAt(0).toUpperCase(),hasFocus:k,onFocusedViewChange:A,gridLabelId:I,displayWeekNumber:R,fixedWeekNumber:N,autoFocus:L,timezone:B}=t,_=Kh(B),D=Ist(t),z=nr(),F=Zoe({shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:E,minDate:x,maxDate:S,disablePast:v,disableFuture:w,timezone:B}),H=Co(),[U,q]=Eh({name:"DayCalendar",state:"hasFocus",controlled:k,default:L??!1}),[Y,ae]=y.useState(()=>s||_),Z=Ct(ge=>{d||c(ge)}),K=ge=>{F(ge)||(r(ge),ae(ge),A==null||A(!0),q(!0))},te=Ct((ge,Se)=>{switch(ge.key){case"ArrowUp":K(n.addDays(Se,-7)),ge.preventDefault();break;case"ArrowDown":K(n.addDays(Se,7)),ge.preventDefault();break;case"ArrowLeft":{const xe=n.addDays(Se,z?1:-1),Ie=n.addMonths(Se,z?1:-1),Re=gw({utils:n,date:xe,minDate:z?xe:n.startOfMonth(Ie),maxDate:z?n.endOfMonth(Ie):xe,isDateDisabled:F,timezone:B});K(Re||xe),ge.preventDefault();break}case"ArrowRight":{const xe=n.addDays(Se,z?-1:1),Ie=n.addMonths(Se,z?-1:1),Re=gw({utils:n,date:xe,minDate:z?n.startOfMonth(Ie):xe,maxDate:z?xe:n.endOfMonth(Ie),isDateDisabled:F,timezone:B});K(Re||xe),ge.preventDefault();break}case"Home":K(n.startOfWeek(Se)),ge.preventDefault();break;case"End":K(n.endOfWeek(Se)),ge.preventDefault();break;case"PageUp":K(n.addMonths(Se,1)),ge.preventDefault();break;case"PageDown":K(n.addMonths(Se,-1)),ge.preventDefault();break}}),pe=Ct((ge,Se)=>K(Se)),ie=Ct((ge,Se)=>{U&&n.isSameDay(Y,Se)&&(A==null||A(!1))}),le=n.getMonth(i),re=n.getYear(i),de=y.useMemo(()=>a.filter(ge=>!!ge).map(ge=>n.startOfDay(ge)),[n,a]),ee=`${re}-${le}`,ce=y.useMemo(()=>y.createRef(),[ee]),me=y.useMemo(()=>{const ge=n.startOfMonth(i),Se=n.endOfMonth(i);return F(Y)||n.isAfterDay(Y,Se)||n.isBeforeDay(Y,ge)?gw({utils:n,date:Y,minDate:ge,maxDate:Se,disablePast:v,disableFuture:w,isDateDisabled:F,timezone:B}):Y},[i,w,v,Y,F,n,B]),we=y.useMemo(()=>{const ge=n.getWeekArray(i);let Se=n.addMonths(i,1);for(;N&&ge.length{ge.length$.jsx(Ast,{variant:"caption",role:"columnheader","aria-label":n.format(ge,"weekday"),className:D.weekDayLabel,children:O(ge)},Se.toString()))]}),l?$.jsx(_st,{className:D.loadingContainer,children:h()}):$.jsx(Dst,ue({transKey:ee,onExited:u,reduceAnimations:f,slideDirection:m,className:fe(o,D.slideTransition)},g,{nodeRef:ce,children:$.jsx(Nst,{ref:ce,role:"rowgroup",className:D.monthContainer,children:we.map((ge,Se)=>$.jsxs(Lst,{role:"row",className:D.weekContainer,"aria-rowindex":Se+1,children:[R&&$.jsx(Rst,{className:D.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(ge[0])),children:H.calendarWeekNumberText(n.getWeekNumber(ge[0]))}),ge.map((xe,Ie)=>$.jsx(Fst,{parentProps:t,day:xe,selectedDays:de,focusableDay:me,onKeyDown:te,onFocus:pe,onBlur:ie,onDaySelect:Z,isDateDisabled:F,currentMonthNumber:le,isViewFocused:U,"aria-colindex":Ie+1},xe.toString()))]},`week-${ge[0]}`))})}))]})}function Bst(e){return Ln("MuiPickersMonth",e)}const WC=Hn("MuiPickersMonth",["root","monthButton","disabled","selected"]),zst=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],Vst=e=>{const{disabled:t,selected:n,classes:r}=e;return _n({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},Bst,r)},Hst=oe("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),Ust=oe("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${WC.disabled}`]:t.disabled},{[`&.${WC.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${WC.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${WC.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),Wst=y.memo(function(t){const n=Zt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:h,"aria-current":m,"aria-label":g,slots:v,slotProps:w}=n,x=Rt(n,zst),S=y.useRef(null),P=Vst(n);zc(()=>{var O;r&&((O=S.current)==null||O.focus())},[r]);const T=(v==null?void 0:v.monthButton)??Ust,E=zn({elementType:T,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:S,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:O=>u(O,l),onKeyDown:O=>d(O,l),onFocus:O=>f(O,l),onBlur:O=>h(O,l)},ownerState:n,className:P.monthButton});return $.jsx(Hst,ue({className:fe(P.root,o),ownerState:n},x,{children:$.jsx(T,ue({},E))}))});function Gst(e){return Ln("MuiMonthCalendar",e)}Hn("MuiMonthCalendar",["root"]);const qst=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],Kst=e=>{const{classes:t}=e;return _n({root:["root"]},Gst,t)};function Yst(e,t){const n=pn(),r=qh(),o=Zt({props:e,name:t});return ue({disableFuture:!1,disablePast:!1},o,{minDate:Ti(n,o.minDate,r.minDate),maxDate:Ti(n,o.maxDate,r.maxDate)})}const Xst=oe("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Ik,boxSizing:"border-box"}),Qst=y.forwardRef(function(t,n){const r=Yst(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:h,shouldDisableMonth:m,readOnly:g,autoFocus:v=!1,onMonthFocus:w,hasFocus:x,onFocusedViewChange:S,monthsPerRow:P=3,timezone:T,gridLabelId:E,slots:O,slotProps:k}=r,A=Rt(r,qst),{value:I,handleValueChange:R,timezone:N}=rb({name:"MonthCalendar",timezone:T,value:i,defaultValue:a,onChange:h,valueManager:no}),L=Kh(N),B=nr(),_=pn(),D=y.useMemo(()=>no.getInitialReferenceValue({value:I,utils:_,props:r,timezone:N,referenceDate:s,granularity:Fl.month}),[]),z=r,F=Kst(z),H=y.useMemo(()=>_.getMonth(L),[_,L]),U=y.useMemo(()=>I!=null?_.getMonth(I):null,[I,_]),[q,Y]=y.useState(()=>U||_.getMonth(D)),[ae,Z]=Eh({name:"MonthCalendar",state:"hasFocus",controlled:x,default:v??!1}),K=Ct(ee=>{Z(ee),S&&S(ee)}),te=y.useCallback(ee=>{const ce=_.startOfMonth(u&&_.isAfter(L,f)?L:f),me=_.startOfMonth(c&&_.isBefore(L,d)?L:d),we=_.startOfMonth(ee);return _.isBefore(we,ce)||_.isAfter(we,me)?!0:m?m(we):!1},[c,u,d,f,L,m,_]),pe=Ct((ee,ce)=>{if(g)return;const me=_.setMonth(I??D,ce);R(me)}),ie=Ct(ee=>{te(_.setMonth(I??D,ee))||(Y(ee),K(!0),w&&w(ee))});y.useEffect(()=>{Y(ee=>U!==null&&ee!==U?U:ee)},[U]);const le=Ct((ee,ce)=>{switch(ee.key){case"ArrowUp":ie((12+ce-3)%12),ee.preventDefault();break;case"ArrowDown":ie((12+ce+3)%12),ee.preventDefault();break;case"ArrowLeft":ie((12+ce+(B?1:-1))%12),ee.preventDefault();break;case"ArrowRight":ie((12+ce+(B?-1:1))%12),ee.preventDefault();break}}),re=Ct((ee,ce)=>{ie(ce)}),de=Ct((ee,ce)=>{q===ce&&K(!1)});return $.jsx(Xst,ue({ref:n,className:fe(F.root,o),ownerState:z,role:"radiogroup","aria-labelledby":E},A,{children:pB(_,I??D).map(ee=>{const ce=_.getMonth(ee),me=_.format(ee,"monthShort"),we=_.format(ee,"month"),ge=ce===U,Se=l||te(ee);return $.jsx(Wst,{selected:ge,value:ce,onClick:pe,onKeyDown:le,autoFocus:ae&&ce===q,disabled:Se,tabIndex:ce===q&&!Se?0:-1,onFocus:re,onBlur:de,"aria-current":H===ce?"date":void 0,"aria-label":we,monthsPerRow:P,slots:O,slotProps:k,children:me},me)})}))});function Jst(e){return Ln("MuiPickersYear",e)}const GC=Hn("MuiPickersYear",["root","yearButton","selected","disabled"]),Zst=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],elt=e=>{const{disabled:t,selected:n,classes:r}=e;return _n({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Jst,r)},tlt=oe("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),nlt=oe("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${GC.disabled}`]:t.disabled},{[`&.${GC.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${GC.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${GC.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),rlt=y.memo(function(t){const n=Zt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:h,"aria-current":m,slots:g,slotProps:v}=n,w=Rt(n,Zst),x=y.useRef(null),S=elt(n);zc(()=>{var E;r&&((E=x.current)==null||E.focus())},[r]);const P=(g==null?void 0:g.yearButton)??nlt,T=zn({elementType:P,externalSlotProps:v==null?void 0:v.yearButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:x,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:E=>u(E,l),onKeyDown:E=>d(E,l),onFocus:E=>f(E,l),onBlur:E=>h(E,l)},ownerState:n,className:S.yearButton});return $.jsx(tlt,ue({className:fe(S.root,o),ownerState:n},w,{children:$.jsx(P,ue({},T))}))});function olt(e){return Ln("MuiYearCalendar",e)}Hn("MuiYearCalendar",["root"]);const ilt=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],alt=e=>{const{classes:t}=e;return _n({root:["root"]},olt,t)};function slt(e,t){const n=pn(),r=qh(),o=Zt({props:e,name:t});return ue({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Ti(n,o.minDate,r.minDate),maxDate:Ti(n,o.maxDate,r.maxDate)})}const llt=oe("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Ik,maxHeight:kot,boxSizing:"border-box",position:"relative"}),clt=y.forwardRef(function(t,n){const r=slt(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:h,onChange:m,readOnly:g,shouldDisableYear:v,onYearFocus:w,hasFocus:x,onFocusedViewChange:S,yearsOrder:P="asc",yearsPerRow:T,timezone:E,gridLabelId:O,slots:k,slotProps:A}=r,I=Rt(r,ilt),{value:R,handleValueChange:N,timezone:L}=rb({name:"YearCalendar",timezone:E,value:a,defaultValue:s,onChange:m,valueManager:no}),B=Kh(L),_=nr(),D=pn(),z=y.useMemo(()=>no.getInitialReferenceValue({value:R,utils:D,props:r,timezone:L,referenceDate:l,granularity:Fl.year}),[]),F=r,H=alt(F),U=y.useMemo(()=>D.getYear(B),[D,B]),q=y.useMemo(()=>R!=null?D.getYear(R):null,[R,D]),[Y,ae]=y.useState(()=>q||D.getYear(z)),[Z,K]=Eh({name:"YearCalendar",state:"hasFocus",controlled:x,default:o??!1}),te=Ct(xe=>{K(xe),S&&S(xe)}),pe=y.useCallback(xe=>{if(d&&D.isBeforeYear(xe,B)||u&&D.isAfterYear(xe,B)||h&&D.isBeforeYear(xe,h)||f&&D.isAfterYear(xe,f))return!0;if(!v)return!1;const Ie=D.startOfYear(xe);return v(Ie)},[u,d,f,h,B,v,D]),ie=Ct((xe,Ie)=>{if(g)return;const Re=D.setYear(R??z,Ie);N(Re)}),le=Ct(xe=>{pe(D.setYear(R??z,xe))||(ae(xe),te(!0),w==null||w(xe))});y.useEffect(()=>{ae(xe=>q!==null&&xe!==q?q:xe)},[q]);const re=P!=="desc"?T*1:T*-1,de=_&&P==="asc"||!_&&P==="desc"?-1:1,ee=Ct((xe,Ie)=>{switch(xe.key){case"ArrowUp":le(Ie-re),xe.preventDefault();break;case"ArrowDown":le(Ie+re),xe.preventDefault();break;case"ArrowLeft":le(Ie-de),xe.preventDefault();break;case"ArrowRight":le(Ie+de),xe.preventDefault();break}}),ce=Ct((xe,Ie)=>{le(Ie)}),me=Ct((xe,Ie)=>{Y===Ie&&te(!1)}),we=y.useRef(null),ge=Qi(n,we);y.useEffect(()=>{if(o||we.current===null)return;const xe=we.current.querySelector('[tabindex="0"]');if(!xe)return;const Ie=xe.offsetHeight,Re=xe.offsetTop,_e=we.current.clientHeight,ye=we.current.scrollTop,Te=Re+Ie;Ie>_e||Re{const Ie=D.getYear(xe),Re=Ie===q,_e=c||pe(xe);return $.jsx(rlt,{selected:Re,value:Ie,onClick:ie,onKeyDown:ee,autoFocus:Z&&Ie===Y,disabled:_e,tabIndex:Ie===Y&&!_e?0:-1,onFocus:ce,onBlur:me,"aria-current":U===Ie?"date":void 0,yearsPerRow:T,slots:k,slotProps:A,children:D.format(xe,"year")},D.format(xe,"year"))})}))}),ult=e=>Ln("MuiPickersCalendarHeader",e),dlt=Hn("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),flt=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],plt=["ownerState"],hlt=e=>{const{classes:t}=e;return _n({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},ult,t)},mlt=oe("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),glt=oe("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>ue({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),ylt=oe("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),vlt=oe(kn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${dlt.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),blt=oe(dot,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),wlt=y.forwardRef(function(t,n){const r=Co(),o=pn(),i=Zt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:h,onMonthChange:m,onViewChange:g,view:v,reduceAnimations:w,views:x,labelId:S,className:P,timezone:T,format:E=`${o.formats.month} ${o.formats.year}`}=i,O=Rt(i,flt),k=i,A=hlt(i),I=(a==null?void 0:a.switchViewButton)??vlt,R=zn({elementType:I,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:k,className:A.switchViewButton}),N=(a==null?void 0:a.switchViewIcon)??blt,L=zn({elementType:N,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:k,className:A.switchViewIcon}),B=Rt(L,plt),_=()=>m(o.addMonths(l,1),"left"),D=()=>m(o.addMonths(l,-1),"right"),z=Oot(l,{disableFuture:u,maxDate:f,timezone:T}),F=Iot(l,{disablePast:d,minDate:h,timezone:T}),H=()=>{if(!(x.length===1||!g||c))if(x.length===2)g(x.find(q=>q!==v)||x[0]);else{const q=x.indexOf(v)!==0?0:1;g(x[q])}};if(x.length===1&&x[0]==="year")return null;const U=o.formatByString(l,E);return $.jsxs(mlt,ue({},O,{ownerState:k,className:fe(A.root,P),ref:n,children:[$.jsxs(glt,{role:"presentation",onClick:H,ownerState:k,"aria-live":"polite",className:A.labelContainer,children:[$.jsx(eie,{reduceAnimations:w,transKey:U,children:$.jsx(ylt,{id:S,ownerState:k,className:A.label,children:U})}),x.length>1&&!c&&$.jsx(I,ue({},R,{children:$.jsx(N,ue({},B))}))]}),$.jsx(Iv,{in:v==="day",children:$.jsx(Toe,{slots:a,slotProps:s,onGoToPrevious:D,isPreviousDisabled:F,previousLabel:r.previousMonth,onGoToNext:_,isNextDisabled:z,nextLabel:r.nextMonth})})]}))}),xlt="@media (prefers-reduced-motion: reduce)",Zg=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),r9=Zg&&Zg[1]?parseInt(Zg[1],10):null,o9=Zg&&Zg[2]?parseInt(Zg[2],10):null,Slt=r9&&r9<10||o9&&o9<13||!1,nie=()=>cS(xlt,{defaultMatches:!1})||Slt,Clt=e=>Ln("MuiDateCalendar",e);Hn("MuiDateCalendar",["root","viewTransitionContainer"]);const Plt=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Tlt=e=>{const{classes:t}=e;return _n({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Clt,t)};function Elt(e,t){const n=pn(),r=qh(),o=nie(),i=Zt({props:e,name:t});return ue({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>$.jsx("span",{children:"..."})),minDate:Ti(n,i.minDate,r.minDate),maxDate:Ti(n,i.maxDate,r.maxDate)})}const Olt=oe(Mk,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:kk}),Ilt=oe(eie,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),klt=y.forwardRef(function(t,n){const r=pn(),o=tb(),i=Elt(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:h,onYearChange:m,onMonthChange:g,reduceAnimations:v,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,view:P,views:T,openTo:E,className:O,disabled:k,readOnly:A,minDate:I,maxDate:R,disableHighlightToday:N,focusedView:L,onFocusedViewChange:B,showDaysOutsideCurrentMonth:_,fixedWeekNumber:D,dayOfWeekFormatter:z,slots:F,slotProps:H,loading:U,renderLoading:q,displayWeekNumber:Y,yearsOrder:ae,yearsPerRow:Z,monthsPerRow:K,timezone:te}=i,pe=Rt(i,Plt),{value:ie,handleValueChange:le,timezone:re}=rb({name:"DateCalendar",timezone:te,value:l,defaultValue:c,onChange:h,valueManager:no}),{view:de,setView:ee,focusedView:ce,setFocusedView:me,goToNextView:we,setValueAndGoToNextView:ge}=zS({view:P,views:T,openTo:E,onChange:le,onViewChange:s,autoFocus:a,focusedView:L,onFocusedViewChange:B}),{referenceDate:Se,calendarState:xe,changeFocusedDay:Ie,changeMonth:Re,handleChangeMonth:_e,isDateDisabled:ye,onMonthSwitchingAnimationEnd:Te}=gst({value:ie,referenceDate:u,reduceAnimations:v,onMonthChange:g,minDate:I,maxDate:R,shouldDisableDate:w,disablePast:f,disableFuture:d,timezone:re}),Oe=k&&ie||I,Me=k&&ie||R,Ue=`${o}-grid-label`,ze=ce!==null,Qe=(F==null?void 0:F.calendarHeader)??wlt,ct=zn({elementType:Qe,externalSlotProps:H==null?void 0:H.calendarHeader,additionalProps:{views:T,view:de,currentMonth:xe.currentMonth,onViewChange:ee,onMonthChange:(Ot,cn)=>_e({newMonth:Ot,direction:cn}),minDate:Oe,maxDate:Me,disabled:k,disablePast:f,disableFuture:d,reduceAnimations:v,timezone:re,labelId:Ue},ownerState:i}),nt=Ct(Ot=>{const cn=r.startOfMonth(Ot),Fn=r.endOfMonth(Ot),Un=ye(Ot)?gw({utils:r,date:Ot,minDate:r.isBefore(I,cn)?cn:I,maxDate:r.isAfter(R,Fn)?Fn:R,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:re}):Ot;Un?(ge(Un,"finish"),g==null||g(cn)):(we(),Re(cn)),Ie(Un,!0)}),et=Ct(Ot=>{const cn=r.startOfYear(Ot),Fn=r.endOfYear(Ot),Un=ye(Ot)?gw({utils:r,date:Ot,minDate:r.isBefore(I,cn)?cn:I,maxDate:r.isAfter(R,Fn)?Fn:R,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:re}):Ot;Un?(ge(Un,"finish"),m==null||m(Un)):(we(),Re(cn)),Ie(Un,!0)}),yt=Ct(Ot=>le(Ot&&HE(r,Ot,ie??Se),"finish",de));y.useEffect(()=>{ie!=null&&r.isValid(ie)&&Re(ie)},[ie]);const vn=i,Ke=Tlt(vn),$e={disablePast:f,disableFuture:d,maxDate:R,minDate:I},Xe={disableHighlightToday:N,readOnly:A,disabled:k,timezone:re,gridLabelId:Ue,slots:F,slotProps:H},bt=y.useRef(de);y.useEffect(()=>{bt.current!==de&&(ce===bt.current&&me(de,!0),bt.current=de)},[ce,me,de]);const zt=y.useMemo(()=>[ie],[ie]);return $.jsxs(Olt,ue({ref:n,className:fe(Ke.root,O),ownerState:vn},pe,{children:[$.jsx(Qe,ue({},ct,{slots:F,slotProps:H})),$.jsx(Ilt,{reduceAnimations:v,className:Ke.viewTransitionContainer,transKey:de,ownerState:vn,children:$.jsxs("div",{children:[de==="year"&&$.jsx(clt,ue({},$e,Xe,{value:ie,onChange:et,shouldDisableYear:S,hasFocus:ze,onFocusedViewChange:Ot=>me("year",Ot),yearsOrder:ae,yearsPerRow:Z,referenceDate:Se})),de==="month"&&$.jsx(Qst,ue({},$e,Xe,{hasFocus:ze,className:O,value:ie,onChange:nt,shouldDisableMonth:x,onFocusedViewChange:Ot=>me("month",Ot),monthsPerRow:K,referenceDate:Se})),de==="day"&&$.jsx(jst,ue({},xe,$e,Xe,{onMonthSwitchingAnimationEnd:Te,onFocusedDayChange:Ie,reduceAnimations:v,selectedDays:zt,onSelectedDaysChange:yt,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,hasFocus:ze,onFocusedViewChange:Ot=>me("day",Ot),showDaysOutsideCurrentMonth:_,fixedWeekNumber:D,dayOfWeekFormatter:z,displayWeekNumber:Y,loading:U,renderLoading:q}))]})})]}))});function rie(e){return Ln("MuiPickersToolbar",e)}const Mlt=Hn("MuiPickersToolbar",["root","content"]),Alt=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],$lt=e=>{const{classes:t,isLandscape:n}=e;return _n({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},rie,t)},Rlt=oe("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),_lt=oe("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),IB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,c=Rt(r,Alt),u=r,d=$lt(u);return s?null:$.jsxs(Rlt,ue({ref:n,className:fe(d.root,i),ownerState:u},c,{children:[$.jsx(dt,{color:"text.secondary",variant:"overline",id:l,children:a}),$.jsx(_lt,{className:d.content,ownerState:u,children:o})]}))});function Dlt(e){return Ln("MuiDatePickerToolbar",e)}Hn("MuiDatePickerToolbar",["root","title"]);const Nlt=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],Llt=e=>{const{classes:t}=e;return _n({root:["root"],title:["title"]},Dlt,t)},Flt=oe(IB,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),jlt=oe(dt,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),Blt=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:c}=r,u=Rt(r,Nlt),d=pn(),f=Co(),h=Llt(r),m=y.useMemo(()=>{if(!o)return s;const v=Nx(d,{format:a,views:l},!0);return d.formatByString(o,v)},[o,a,s,d,l]),g=r;return $.jsx(Flt,ue({ref:n,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:fe(h.root,c)},u,{children:$.jsx(jlt,{variant:"h4",align:i?"left":"center",ownerState:g,className:h.title,children:m})}))});function oie(e,t){const n=pn(),r=qh(),o=Zt({props:e,name:t}),i=y.useMemo(()=>{var a;return((a=o.localeText)==null?void 0:a.toolbarTitle)==null?o.localeText:ue({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,{localeText:i},fB({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Ti(n,o.minDate,r.minDate),maxDate:Ti(n,o.maxDate,r.maxDate),slots:ue({toolbar:Blt},o.slots)})}function zlt(e){return Ln("MuiPickersPopper",e)}Hn("MuiPickersPopper",["root","paper"]);const Vlt=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],Hlt=e=>{const{classes:t}=e;return _n({root:["root"],paper:["paper"]},zlt,t)},Ult=oe(Ff,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),Wlt=oe(co,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function Glt(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Ct(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=Q$(o.current);if(!o.current||"clientX"in l&&Glt(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),s=()=>{r.current=!0};return y.useEffect(()=>{if(e){const l=Q$(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),y.useEffect(()=>{if(e){const l=Q$(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const Klt=y.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:c}=e,u=Rt(e,Vlt),d=ue({},o,{placement:r}),f=zn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:d});return $.jsx(n,ue({},u,f,{onClick:h=>{var m;l(h),(m=f.onClick)==null||m.call(f,h)},onTouchStart:h=>{var m;c(h),(m=f.onTouchStart)==null||m.call(f,h)},ownerState:d,children:i}))});function Ylt(e){const t=Zt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:c,placement:u,slots:d,slotProps:f,reduceAnimations:h}=t;y.useEffect(()=>{function _(D){l&&D.key==="Escape"&&s()}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[s,l]);const m=y.useRef(null);y.useEffect(()=>{c==="tooltip"||i&&!i()||(l?m.current=ua(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,c,i]);const[g,v,w]=qlt(l,a??s),x=y.useRef(null),S=Qi(x,o),P=Qi(S,g),T=t,E=Hlt(T),O=nie(),k=h??O,A=_=>{_.key==="Escape"&&(_.stopPropagation(),s())},I=(d==null?void 0:d.desktopTransition)??k?Iv:Tf,R=(d==null?void 0:d.desktopTrapFocus)??LF,N=(d==null?void 0:d.desktopPaper)??Wlt,L=(d==null?void 0:d.popper)??Ult,B=zn({elementType:L,externalSlotProps:f==null?void 0:f.popper,additionalProps:{transition:!0,role:c,open:l,anchorEl:n,placement:u,onKeyDown:A},className:E.root,ownerState:t});return $.jsx(L,ue({},B,{children:({TransitionProps:_,placement:D})=>$.jsx(R,ue({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:c==="tooltip",isEnabled:()=>!0},f==null?void 0:f.desktopTrapFocus,{children:$.jsx(I,ue({},_,f==null?void 0:f.desktopTransition,{children:$.jsx(Klt,{PaperComponent:N,ownerState:T,popperPlacement:D,ref:P,onPaperClick:v,onPaperTouchStart:w,paperClasses:E.paper,paperSlotProps:f==null?void 0:f.desktopPaper,children:r})}))}))}))}const Xlt=({open:e,onOpen:t,onClose:n})=>{const r=y.useRef(typeof e=="boolean").current,[o,i]=y.useState(!1);y.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=y.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},Qlt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},Jlt=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},Zlt=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},ect=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:c=r==="desktop",timezone:u}=e,{current:d}=y.useRef(l),{current:f}=y.useRef(s!==void 0),h=pn(),m=Gh(),{isOpen:g,setIsOpen:v}=Xlt(e),{timezone:w,value:x,handleValueChange:S}=mB({timezone:u,value:s,defaultValue:d,onChange:a,valueManager:t}),[P,T]=y.useState(()=>{let K;return x!==void 0?K=x:d!==void 0?K=d:K=t.emptyValue,{draft:K,lastPublishedValue:K,lastCommittedValue:K,lastControlledValue:x,hasBeenModifiedSinceMount:!1}}),{getValidationErrorForNewValue:E}=zoe({props:e,validator:o,timezone:w,value:P.draft,onError:e.onError}),O=Ct(K=>{const te={action:K,dateState:P,hasChanged:ee=>!t.areValuesEqual(h,K.value,ee),isControlled:f,closeOnSelect:c},pe=Qlt(te),ie=Jlt(te),le=Zlt(te);T(ee=>ue({},ee,{draft:K.value,lastPublishedValue:pe?K.value:ee.lastPublishedValue,lastCommittedValue:ie?K.value:ee.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let re=null;const de=()=>(re||(re={validationError:K.name==="setValueFromField"?K.context.validationError:E(K.value)},K.name==="setValueFromShortcut"&&(re.shortcut=K.shortcut)),re);pe&&S(K.value,de()),ie&&i&&i(K.value,de()),le&&v(!1)});if(x!==void 0&&(P.lastControlledValue===void 0||!t.areValuesEqual(h,P.lastControlledValue,x))){const K=t.areValuesEqual(h,P.draft,x);T(te=>ue({},te,{lastControlledValue:x},K?{}:{lastCommittedValue:x,lastPublishedValue:x,draft:x,hasBeenModifiedSinceMount:!0}))}const k=Ct(()=>{O({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),A=Ct(()=>{O({value:P.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),I=Ct(()=>{O({value:P.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=Ct(()=>{O({value:P.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),N=Ct(()=>{O({value:t.getTodayValue(h,w,n),name:"setValueFromAction",pickerAction:"today"})}),L=Ct(K=>{K.preventDefault(),v(!0)}),B=Ct(K=>{K==null||K.preventDefault(),v(!1)}),_=Ct((K,te="partial")=>O({name:"setValueFromView",value:K,selectionState:te})),D=Ct((K,te,pe)=>O({name:"setValueFromShortcut",value:K,changeImportance:te,shortcut:pe})),z=Ct((K,te)=>O({name:"setValueFromField",value:K,context:te})),F={onClear:k,onAccept:A,onDismiss:I,onCancel:R,onSetToday:N,onOpen:L,onClose:B},H={value:P.draft,onChange:z},U=y.useMemo(()=>t.cleanValue(h,P.draft),[h,t,P.draft]),q={value:U,onChange:_,onClose:B,open:g},ae=ue({},F,{value:U,onChange:_,onSelectShortcut:D,isValid:K=>{const te=o({adapter:m,value:K,timezone:w,props:e});return!t.hasError(te)}}),Z=y.useMemo(()=>({onOpen:L,onClose:B,open:g}),[g,B,L]);return{open:g,fieldProps:H,viewProps:q,layoutProps:ae,actions:F,contextValue:Z}},tct=["className","sx"],nct=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:c,views:u,openTo:d,onViewChange:f,viewRenderers:h,timezone:m}=e,g=Rt(e,tct),{view:v,setView:w,defaultView:x,focusedView:S,setFocusedView:P,setValueAndGoToNextView:T}=zS({view:c,views:u,openTo:d,onChange:a,onViewChange:f,autoFocus:r}),{hasUIView:E,viewModeLookup:O}=y.useMemo(()=>u.reduce((B,_)=>{let D;return h[_]!=null?D="UI":D="field",B.viewModeLookup[_]=D,D==="UI"&&(B.hasUIView=!0),B},{hasUIView:!1,viewModeLookup:{}}),[h,u]),k=y.useMemo(()=>u.reduce((B,_)=>h[_]!=null&&dv(_)?B+1:B,0),[h,u]),A=O[v],I=Ct(()=>A==="UI"),[R,N]=y.useState(A==="UI"?v:null);return R!==v&&O[v]==="UI"&&N(v),zc(()=>{A==="field"&&s&&(l(),setTimeout(()=>{var B,_;(B=i==null?void 0:i.current)==null||B.setSelectedSections(v),(_=i==null?void 0:i.current)==null||_.focusField(v)}))},[v]),zc(()=>{if(!s)return;let B=v;A==="field"&&R!=null&&(B=R),B!==x&&O[B]==="UI"&&O[x]==="UI"&&(B=x),B!==v&&w(B),P(B,!0)},[s]),{hasUIView:E,shouldRestoreFocus:I,layoutProps:{views:u,view:R,onViewChange:w},renderCurrentView:()=>{if(R==null)return null;const B=h[R];if(B==null)return null;const _=ue({},g,n,t,{views:u,timezone:m,onChange:T,view:R,onViewChange:w,focusedView:S,onFocusedViewChange:P,showViewSwitcher:k>1,timeViewsCount:k});return o?o(h,R,_):B(_)}}};function i9(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const rct=(e,t)=>{const[n,r]=y.useState(i9);return zc(()=>{const i=()=>{r(i9())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),og(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},oct=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=rct(n.views,o),a=nr();return{layoutProps:ue({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function ict(e){const{props:t,pickerValueResponse:n}=e;return y.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const iie=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const c=ect({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),u=nct({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:s}),d=oct({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps}),f=ict({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:f}};function aie(e){return Ln("MuiPickersLayout",e)}const Dl=Hn("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),act=["onAccept","onClear","onCancel","onSetToday","actions"];function sct(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=Rt(e,act),s=Co();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(c=>{switch(c){case"clear":return $.jsx(gt,{onClick:n,children:s.clearButtonLabel},c);case"cancel":return $.jsx(gt,{onClick:r,children:s.cancelButtonLabel},c);case"accept":return $.jsx(gt,{onClick:t,children:s.okButtonLabel},c);case"today":return $.jsx(gt,{onClick:o,children:s.todayButtonLabel},c);default:return null}});return $.jsx(sZ,ue({},a,{children:l}))}const lct=["items","changeImportance","isLandscape","onChange","isValid"],cct=["getValue"];function uct(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=Rt(e,lct);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=Rt(s,cct);const u=l({isValid:o});return ue({},c,{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)})});return $.jsx(dl,ue({dense:!0,sx:[{maxHeight:kk,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>$.jsx(ss,{children:$.jsx(wh,ue({},s))},s.id??s.label))}))}function dct(e){return e.view!==null}const fct=e=>{const{classes:t,isLandscape:n}=e;return _n({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},aie,t)},sie=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:c,onChange:u,onSelectShortcut:d,isValid:f,isLandscape:h,disabled:m,readOnly:g,children:v,slots:w,slotProps:x}=e,S=fct(e),P=(w==null?void 0:w.actionBar)??sct,T=zn({elementType:P,externalSlotProps:x==null?void 0:x.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:S.actionBar,ownerState:ue({},e,{wrapperVariant:t})}),E=$.jsx(P,ue({},T)),O=w==null?void 0:w.toolbar,k=zn({elementType:O,externalSlotProps:x==null?void 0:x.toolbar,additionalProps:{isLandscape:h,onChange:u,value:c,view:a,onViewChange:l,views:s,disabled:m,readOnly:g},className:S.toolbar,ownerState:ue({},e,{wrapperVariant:t})}),A=dct(k)&&O?$.jsx(O,ue({},k)):null,I=v,R=w==null?void 0:w.tabs,N=a&&R?$.jsx(R,ue({view:a,onViewChange:l,className:S.tabs},x==null?void 0:x.tabs)):null,L=(w==null?void 0:w.shortcuts)??uct,B=zn({elementType:L,externalSlotProps:x==null?void 0:x.shortcuts,additionalProps:{isValid:f,isLandscape:h,onChange:d},className:S.shortcuts,ownerState:{isValid:f,isLandscape:h,onChange:d,wrapperVariant:t}}),_=a&&L?$.jsx(L,ue({},B)):null;return{toolbar:A,content:I,tabs:N,actionBar:E,shortcuts:_}},pct=e=>{const{isLandscape:t,classes:n}=e;return _n({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},aie,n)},lie=oe("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${Dl.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${Dl.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${Dl.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${Dl.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${Dl.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${Dl.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${Dl.shortcuts}`]:{gridColumn:3}}}]}),cie=oe("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),uie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=sie(r),{sx:c,className:u,isLandscape:d,wrapperVariant:f}=r,h=pct(r);return $.jsxs(lie,{ref:n,sx:c,className:fe(h.root,u),ownerState:r,children:[d?l:o,d?o:l,$.jsx(cie,{className:h.contentWrapper,children:f==="desktop"?$.jsxs(y.Fragment,{children:[i,a]}):$.jsxs(y.Fragment,{children:[a,i]})}),s]})}),hct=["props","getOpenDialogAriaText"],mct=["ownerState"],gct=["ownerState"],kB=e=>{var we;let{props:t,getOpenDialogAriaText:n}=e,r=Rt(e,hct);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:h,name:m,label:g,inputRef:v,readOnly:w,disabled:x,autoFocus:S,localeText:P,reduceAnimations:T}=t,E=y.useRef(null),O=y.useRef(null),k=tb(),A=((we=i==null?void 0:i.toolbar)==null?void 0:we.hidden)??!1,{open:I,actions:R,hasUIView:N,layoutProps:L,renderCurrentView:B,shouldRestoreFocus:_,fieldProps:D,contextValue:z,ownerState:F}=iie(ue({},r,{props:t,fieldRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),H=o.inputAdornment??fo,U=zn({elementType:H,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:t}),q=Rt(U,mct),Y=o.openPickerButton??kn,ae=zn({elementType:Y,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:x||w,onClick:I?R.onClose:R.onOpen,"aria-label":n(D.value),edge:q.position},ownerState:t}),Z=Rt(ae,gct),K=o.openPickerIcon,te=zn({elementType:K,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:F}),pe=o.field,ie=zn({elementType:pe,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},D,A&&{id:k},{readOnly:w,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:h,label:g,name:m,autoFocus:S&&!t.open,focused:I?!0:void 0},v?{inputRef:v}:{}),ownerState:t});N&&(ie.InputProps=ue({},ie.InputProps,{ref:E},!t.disableOpenPicker&&{[`${q.position}Adornment`]:$.jsx(H,ue({},q,{children:$.jsx(Y,ue({},Z,{children:$.jsx(K,ue({},te))}))}))}));const le=ue({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},ie.slots),re=o.layout??uie;let de=k;A&&(g?de=`${k}-label`:de=void 0);const ee=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:k}),popper:ue({"aria-labelledby":de},i==null?void 0:i.popper)}),ce=Qi(O,ie.unstableFieldRef);return{renderPicker:()=>$.jsxs(Voe,{contextValue:z,localeText:P,children:[$.jsx(pe,ue({},ie,{slots:le,slotProps:ee,unstableFieldRef:ce})),$.jsx(Ylt,ue({role:"dialog",placement:"bottom-start",anchorEl:E.current},R,{open:I,slots:o,slotProps:ee,shouldRestoreFocus:_,reduceAnimations:T,children:$.jsx(re,ue({},L,ee==null?void 0:ee.layout,{slots:o,slotProps:ee,children:B()}))}))]})}},nl=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:h,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:T,yearsOrder:E,yearsPerRow:O,slots:k,slotProps:A,loading:I,renderLoading:R,disableHighlightToday:N,readOnly:L,disabled:B,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:D,sx:z,autoFocus:F,fixedWeekNumber:H,displayWeekNumber:U,timezone:q})=>$.jsx(klt,{view:e,onViewChange:t,views:n.filter(pv),focusedView:r&&pv(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:h,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:T,yearsOrder:E,yearsPerRow:O,slots:k,slotProps:A,loading:I,renderLoading:R,disableHighlightToday:N,readOnly:L,disabled:B,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:D,sx:z,autoFocus:F,fixedWeekNumber:H,displayWeekNumber:U,timezone:q}),die=y.forwardRef(function(t,n){var c,u;const r=Co(),o=pn(),i=oie(t,"MuiDesktopDatePicker"),a=ue({day:nl,month:nl,year:nl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:Nx(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ue({openPickerIcon:Poe,field:Xoe},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},Of((f=i.slotProps)==null?void 0:f.field,d),ib(i),{ref:n})},toolbar:ue({hidden:!0},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=kB({props:s,valueManager:no,valueType:"date",getOpenDialogAriaText:nb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:ob});return l()});die.propTypes={autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:eb,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,minDate:j.object,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","month","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","month","year"]),viewRenderers:j.shape({day:j.func,month:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","month","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const yct=oe(aZ)({[`& .${iw.container}`]:{outline:0},[`& .${iw.paper}`]:{outline:0,minWidth:Ik}}),vct=oe(lZ)({"&:first-of-type":{padding:0}});function bct(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=(o==null?void 0:o.dialog)??yct,s=(o==null?void 0:o.mobileTransition)??Iv;return $.jsx(a,ue({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:s,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:$.jsx(vct,{children:t})}))}const wct=["props","getOpenDialogAriaText"],MB=e=>{var q;let{props:t,getOpenDialogAriaText:n}=e,r=Rt(e,wct);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:h,name:m,label:g,inputRef:v,readOnly:w,disabled:x,localeText:S}=t,P=y.useRef(null),T=tb(),E=((q=i==null?void 0:i.toolbar)==null?void 0:q.hidden)??!1,{open:O,actions:k,layoutProps:A,renderCurrentView:I,fieldProps:R,contextValue:N}=iie(ue({},r,{props:t,fieldRef:P,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),L=o.field,B=zn({elementType:L,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},R,E&&{id:T},!(x||w)&&{onClick:k.onOpen,onKeyDown:Ait(k.onOpen)},{readOnly:w??!0,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:h,label:g,name:m},v?{inputRef:v}:{}),ownerState:t});B.inputProps=ue({},B.inputProps,{"aria-label":n(R.value)});const _=ue({textField:o.textField},B.slots),D=o.layout??uie;let z=T;E&&(g?z=`${T}-label`:z=void 0);const F=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:T}),mobilePaper:ue({"aria-labelledby":z},i==null?void 0:i.mobilePaper)}),H=Qi(P,B.unstableFieldRef);return{renderPicker:()=>$.jsxs(Voe,{contextValue:N,localeText:S,children:[$.jsx(L,ue({},B,{slots:_,slotProps:F,unstableFieldRef:H})),$.jsx(bct,ue({},k,{open:O,slots:o,slotProps:F,children:$.jsx(D,ue({},A,F==null?void 0:F.layout,{slots:o,slotProps:F,children:I()}))}))]})}},fie=y.forwardRef(function(t,n){var c,u;const r=Co(),o=pn(),i=oie(t,"MuiMobileDatePicker"),a=ue({day:nl,month:nl,year:nl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:Nx(o,i,!1),slots:ue({field:Xoe},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},Of((f=i.slotProps)==null?void 0:f.field,d),ib(i),{ref:n})},toolbar:ue({hidden:!1},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=MB({props:s,valueManager:no,valueType:"date",getOpenDialogAriaText:nb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:ob});return l()});fie.propTypes={autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:eb,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,minDate:j.object,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","month","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","month","year"]),viewRenderers:j.shape({day:j.func,month:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","month","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const xct=["desktopModeMediaQuery"],pie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=wB}=r,i=Rt(r,xct);return cS(o,{defaultMatches:!0})?$.jsx(die,ue({ref:n},i)):$.jsx(fie,ue({ref:n},i))});function Sct(e){return Ln("MuiPickersToolbarText",e)}const sN=Hn("MuiPickersToolbarText",["root","selected"]),Cct=["className","selected","value"],Pct=e=>{const{classes:t,selected:n}=e;return _n({root:["root",n&&"selected"]},Sct,t)},Tct=oe(dt,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${sN.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${sN.selected}`]:{color:(e.vars||e).palette.text.primary}})),AB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=r,a=Rt(r,Cct),s=Pct(r);return $.jsx(Tct,ue({ref:n,className:fe(s.root,o),component:"span"},a,{children:i}))}),Ect=["align","className","selected","typographyClassName","value","variant","width"],Oct=e=>{const{classes:t}=e;return _n({root:["root"]},rie,t)},Ict=oe(gt,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),za=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=r,d=Rt(r,Ect),f=Oct(r);return $.jsx(Ict,ue({variant:"text",ref:n,className:fe(f.root,i)},u?{sx:{width:u}}:{},d,{children:$.jsx(AB,{align:o,className:s,variant:c,value:l,selected:a})}))});function kct(e){return Ln("MuiTimePickerToolbar",e)}const yw=Hn("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Mct=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],Act=e=>{const{isLandscape:t,classes:n,isRtl:r}=e;return _n({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",t&&"hourMinuteLabelLandscape",r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",t&&"ampmLandscape"],ampmLabel:["ampmLabel"]},kct,n)},$ct=oe(IB,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Rct=oe(AB,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),_ct=oe("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${yw.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${yw.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),Dct=oe("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${yw.ampmLabel}`]:t.ampmLabel},{[`&.${yw.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${yw.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function Nct(e){const t=Zt({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:i,onChange:a,view:s,onViewChange:l,views:c,disabled:u,readOnly:d,className:f}=t,h=Rt(t,Mct),m=pn(),g=Co(),v=nr(),w=!!(n&&!r&&c.includes("hours")),{meridiemMode:x,handleMeridiemChange:S}=Ek(o,n,a),P=k=>n?m.format(k,"hours12h"):m.format(k,"hours24h"),T=ue({},t,{isRtl:v}),E=Act(T),O=$.jsx(Rct,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:E.separator});return $.jsxs($ct,ue({landscapeDirection:"row",toolbarTitle:g.timePickerToolbarTitle,isLandscape:i,ownerState:T,className:fe(E.root,f)},h,{children:[$.jsxs(_ct,{className:E.hourMinuteLabel,ownerState:T,children:[og(c,"hours")&&$.jsx(za,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:s==="hours",value:o?P(o):"--"}),og(c,["hours","minutes"])&&O,og(c,"minutes")&&$.jsx(za,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:s==="minutes",value:o?m.format(o,"minutes"):"--"}),og(c,["minutes","seconds"])&&O,og(c,"seconds")&&$.jsx(za,{variant:"h3",onClick:()=>l("seconds"),selected:s==="seconds",value:o?m.format(o,"seconds"):"--"})]}),w&&$.jsxs(Dct,{className:E.ampmSelection,ownerState:T,children:[$.jsx(za,{disableRipple:!0,variant:"subtitle2",selected:x==="am",typographyClassName:E.ampmLabel,value:zl(m,"am"),onClick:d?void 0:()=>S("am"),disabled:u}),$.jsx(za,{disableRipple:!0,variant:"subtitle2",selected:x==="pm",typographyClassName:E.ampmLabel,value:zl(m,"pm"),onClick:d?void 0:()=>S("pm"),disabled:u})]})]}))}function hie(e,t){var a;const n=pn(),r=Zt({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),i=y.useMemo(()=>{var s;return((s=r.localeText)==null?void 0:s.toolbarTitle)==null?r.localeText:ue({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return ue({},r,{ampm:o,localeText:i},fB({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,slots:ue({toolbar:Nct},r.slots),slotProps:ue({},r.slotProps,{toolbar:ue({ampm:o,ampmInClock:r.ampmInClock},(a=r.slotProps)==null?void 0:a.toolbar)})})}const ey=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:h,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,ampmInClock:x,slots:S,slotProps:P,readOnly:T,disabled:E,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:I,timezone:R})=>$.jsx(Iit,{view:e,onViewChange:t,focusedView:n&&dv(n)?n:null,onFocusedViewChange:r,views:o.filter(dv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:h,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,ampmInClock:x,slots:S,slotProps:P,readOnly:T,disabled:E,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:I,timezone:R}),mie=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:h,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R})=>$.jsx(Lit,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(dv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:h,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeStep:A==null?void 0:A.minutes,skipDisabled:I,timezone:R}),WE=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:h,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R})=>$.jsx(Xit,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(dv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:h,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R}),Lct=["views","format"],gie=(e,t,n)=>{let{views:r,format:o}=t,i=Rt(t,Lct);if(o)return o;const a=[],s=[];if(r.forEach(u=>{dv(u)?s.push(u):pv(u)&&a.push(u)}),s.length===0)return Nx(e,ue({views:a},i),!1);if(a.length===0)return VE(e,ue({views:s},i));const l=VE(e,ue({views:s},i));return`${Nx(e,ue({views:a},i),!1)} ${l}`},Fct=(e,t,n)=>n?t.filter(r=>!N0(r)||r==="hours"):e?[...t,"meridiem"]:t,jct=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function yie({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=ue({hours:1,minutes:5,seconds:5},n),a=jct(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:Fct(t,r,a)}}const vie=y.forwardRef(function(t,n){var w,x,S,P;const r=Co(),o=pn(),i=hie(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:a,views:s,timeSteps:l}=yie(i),c=a?mie:WE,u=ue({hours:c,minutes:c,seconds:c,meridiem:c},i.viewRenderers),d=i.ampmInClock??!0,f=a?[]:["accept"],m=((w=u.hours)==null?void 0:w.name)===WE.name?s:s.filter(T=>T!=="meridiem"),g=ue({},i,{ampmInClock:d,timeSteps:l,viewRenderers:u,format:VE(o,i),views:a?["hours"]:m,slots:ue({field:Qoe,openPickerIcon:hot},i.slots),slotProps:ue({},i.slotProps,{field:T=>{var E;return ue({},Of((E=i.slotProps)==null?void 0:E.field,T),ib(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:d},(x=i.slotProps)==null?void 0:x.toolbar),actionBar:ue({actions:f},(S=i.slotProps)==null?void 0:S.actionBar)})}),{renderPicker:v}=kB({props:g,valueManager:no,valueType:"time",getOpenDialogAriaText:nb({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(P=g.localeText)==null?void 0:P.openTimePickerDialogue}),validator:VS});return v()});vie.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,enableAccessibleFieldDOMStructure:j.any,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:eb,label:j.node,localeText:j.object,maxTime:j.object,minTime:j.object,minutesStep:j.number,name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,open:j.bool,openTo:j.oneOf(["hours","meridiem","minutes","seconds"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableTime:j.func,skipDisabled:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thresholdToRenderTimeInASingleColumn:j.number,timeSteps:j.shape({hours:j.number,minutes:j.number,seconds:j.number}),timezone:j.string,value:j.object,view:j.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:j.shape({hours:j.func,meridiem:j.func,minutes:j.func,seconds:j.func}),views:j.arrayOf(j.oneOf(["hours","minutes","seconds"]).isRequired)};const bie=y.forwardRef(function(t,n){var u,d;const r=Co(),o=pn(),i=hie(t,"MuiMobileTimePicker"),a=ue({hours:ey,minutes:ey,seconds:ey},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{ampmInClock:s,viewRenderers:a,format:VE(o,i),slots:ue({field:Qoe},i.slots),slotProps:ue({},i.slotProps,{field:f=>{var h;return ue({},Of((h=i.slotProps)==null?void 0:h.field,f),ib(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=MB({props:l,valueManager:no,valueType:"time",getOpenDialogAriaText:nb({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(d=l.localeText)==null?void 0:d.openTimePickerDialogue}),validator:VS});return c()});bie.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,enableAccessibleFieldDOMStructure:j.any,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:eb,label:j.node,localeText:j.object,maxTime:j.object,minTime:j.object,minutesStep:j.number,name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,open:j.bool,openTo:j.oneOf(["hours","minutes","seconds"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableTime:j.func,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["hours","minutes","seconds"]),viewRenderers:j.shape({hours:j.func,minutes:j.func,seconds:j.func}),views:j.arrayOf(j.oneOf(["hours","minutes","seconds"]).isRequired)};const Bct=["desktopModeMediaQuery"],zct=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=wB}=r,i=Rt(r,Bct);return cS(o,{defaultMatches:!0})?$.jsx(vie,ue({ref:n},i)):$.jsx(bie,ue({ref:n},i))});function Vct(e){return Ln("MuiDateTimePickerTabs",e)}Hn("MuiDateTimePickerTabs",["root"]);const Hct=e=>pv(e)?"date":"time",Uct=e=>e==="date"?"day":"hours",Wct=e=>{const{classes:t}=e;return _n({root:["root"]},Vct,t)},Gct=oe(A$e,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${MP.indicator}`]:{bottom:"auto",top:0}}})),qct=function(t){const n=Zt({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=$.jsx(mot,{}),onViewChange:o,timeIcon:i=$.jsx(got,{}),view:a,hidden:s=typeof window>"u"||window.innerHeight<667,className:l,sx:c}=n,u=Co(),d=Wct(n),f=(h,m)=>{o(Uct(m))};return s?null:$.jsxs(Gct,{ownerState:n,variant:"fullWidth",value:Hct(a),onChange:f,className:fe(l,d.root),sx:c,children:[$.jsx(c3,{value:"date","aria-label":u.dateTableLabel,icon:$.jsx(y.Fragment,{children:r})}),$.jsx(c3,{value:"time","aria-label":u.timeTableLabel,icon:$.jsx(y.Fragment,{children:i})})]})};function Kct(e){return Ln("MuiDateTimePickerToolbar",e)}const J$=Hn("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),Yct=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],Xct=e=>{const{classes:t,isLandscape:n,isRtl:r}=e;return _n({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},Kct,t)},Qct=oe(IB,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${Mlt.content} .${sN.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),Jct=oe("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),Zct=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&t!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&t!=="desktop"&&n,style:{flexDirection:"column-reverse"}}]}),eut=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),a9=oe(AB,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),tut=oe("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${J$.ampmLabel}`]:t.ampmLabel},{[`&.${J$.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${J$.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function nut(e){const t=Zt({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:i,view:a,isLandscape:s,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:h,toolbarVariant:m="mobile",toolbarTitle:g,className:v}=t,w=Rt(t,Yct),x=nr(),S=ue({},t,{isRtl:x}),P=pn(),{meridiemMode:T,handleMeridiemChange:E}=Ek(o,n,i),O=!!(n&&!r),k=m==="desktop",A=Co(),I=Xct(S),R=g??A.dateTimePickerToolbarTitle,N=B=>n?P.format(B,"hours12h"):P.format(B,"hours24h"),L=y.useMemo(()=>o?c?P.formatByString(o,c):P.format(o,"shortDate"):u,[o,c,u,P]);return $.jsxs(Qct,ue({isLandscape:s,className:fe(I.root,v),toolbarTitle:R},w,{ownerState:S,children:[$.jsxs(Jct,{className:I.dateContainer,ownerState:S,children:[d.includes("year")&&$.jsx(za,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?P.format(o,"year"):"–"}),d.includes("day")&&$.jsx(za,{tabIndex:-1,variant:k?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:L})]}),$.jsxs(Zct,{className:I.timeContainer,ownerState:S,children:[$.jsxs(eut,{className:I.timeDigitsContainer,ownerState:S,children:[d.includes("hours")&&$.jsxs(y.Fragment,{children:[$.jsx(za,{variant:k?"h5":"h3",width:k&&!s?L0:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?N(o):"--"}),$.jsx(a9,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(za,{variant:k?"h5":"h3",width:k&&!s?L0:void 0,onClick:()=>l("minutes"),selected:a==="minutes"||!d.includes("minutes")&&a==="hours",value:o?P.format(o,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&$.jsxs(y.Fragment,{children:[$.jsx(a9,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(za,{variant:k?"h5":"h3",width:k&&!s?L0:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?P.format(o,"seconds"):"--"})]})]}),O&&!k&&$.jsxs(tut,{className:I.ampmSelection,ownerState:S,children:[$.jsx(za,{variant:"subtitle2",selected:T==="am",typographyClassName:I.ampmLabel,value:zl(P,"am"),onClick:h?void 0:()=>E("am"),disabled:f}),$.jsx(za,{variant:"subtitle2",selected:T==="pm",typographyClassName:I.ampmLabel,value:zl(P,"pm"),onClick:h?void 0:()=>E("pm"),disabled:f})]}),n&&k&&$.jsx(za,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&T?zl(P,T):"--",width:L0})]})]}))}function wie(e,t){var s;const n=pn(),r=qh(),o=Zt({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=y.useMemo(()=>{var l;return((l=o.localeText)==null?void 0:l.toolbarTitle)==null?o.localeText:ue({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,fB({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??!!(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Ti(n,o.minDateTime??o.minDate,r.minDate),maxDate:Ti(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:ue({toolbar:nut,tabs:qct},o.slots),slotProps:ue({},o.slotProps,{toolbar:ue({ampm:i},(s=o.slotProps)==null?void 0:s.toolbar)})})}const rut=y.forwardRef(function(t,n){var g;const r=nr(),{toolbar:o,tabs:i,content:a,actionBar:s,shortcuts:l}=sie(t),{sx:c,className:u,isLandscape:d,classes:f}=t,h=s&&(((g=s.props.actions)==null?void 0:g.length)??0)>0,m=ue({},t,{isRtl:r});return $.jsxs(lie,{ref:n,className:fe(Dl.root,f==null?void 0:f.root,u),sx:[{[`& .${Dl.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${Dl.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:m,children:[d?l:o,d?o:l,$.jsxs(cie,{className:fe(Dl.contentWrapper,f==null?void 0:f.contentWrapper),sx:{display:"grid"},children:[a,i,h&&$.jsx(as,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),out=["openTo","focusedView","timeViewsCount"],iut=function(t,n,r){var u,d;const{openTo:o,focusedView:i,timeViewsCount:a}=r,s=Rt(r,out),l=ue({},s,{focusedView:null,sx:[{[`&.${Z8.root}`]:{borderBottom:0},[`&.${Z8.root}, .${Bit.root}, &.${Mit.root}`]:{maxHeight:kk}}]}),c=N0(n);return $.jsxs(y.Fragment,{children:[(u=t[c?"day":n])==null?void 0:u.call(t,ue({},r,{view:c?"day":n,focusedView:i&&pv(i)?i:null,views:r.views.filter(pv),sx:[{gridColumn:1},...l.sx]})),a>0&&$.jsxs(y.Fragment,{children:[$.jsx(as,{orientation:"vertical",sx:{gridColumn:2}}),(d=t[c?n:"hours"])==null?void 0:d.call(t,ue({},l,{view:c?n:"hours",focusedView:i&&N0(i)?i:null,openTo:N0(o)?o:"hours",views:r.views.filter(N0),sx:[{gridColumn:3},...l.sx]}))]})]})},xie=y.forwardRef(function(t,n){var x,S,P,T;const r=Co(),o=pn(),i=wie(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:a,thresholdToRenderTimeInASingleColumn:s,views:l,timeSteps:c}=yie(i),u=a?mie:WE,d=ue({day:nl,month:nl,year:nl,hours:u,minutes:u,seconds:u,meridiem:u},i.viewRenderers),f=i.ampmInClock??!0,m=((x=d.hours)==null?void 0:x.name)===WE.name?l:l.filter(E=>E!=="meridiem"),g=a?[]:["accept"],v=ue({},i,{viewRenderers:d,format:gie(o,i),views:m,yearsPerRow:i.yearsPerRow??4,ampmInClock:f,timeSteps:c,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:a,slots:ue({field:Joe,layout:rut,openPickerIcon:Poe},i.slots),slotProps:ue({},i.slotProps,{field:E=>{var O;return ue({},Of((O=i.slotProps)==null?void 0:O.field,E),ib(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:f,toolbarVariant:"desktop"},(S=i.slotProps)==null?void 0:S.toolbar),tabs:ue({hidden:!0},(P=i.slotProps)==null?void 0:P.tabs),actionBar:E=>{var O;return ue({actions:g},Of((O=i.slotProps)==null?void 0:O.actionBar,E))}})}),{renderPicker:w}=kB({props:v,valueManager:no,valueType:"date-time",getOpenDialogAriaText:nb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(T=v.localeText)==null?void 0:T.openDatePickerDialogue}),validator:$k,rendererInterceptor:iut});return w()});xie.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:eb,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,maxDateTime:j.object,maxTime:j.object,minDate:j.object,minDateTime:j.object,minTime:j.object,minutesStep:j.number,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableTime:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,skipDisabled:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),thresholdToRenderTimeInASingleColumn:j.number,timeSteps:j.shape({hours:j.number,minutes:j.number,seconds:j.number}),timezone:j.string,value:j.object,view:j.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:j.shape({day:j.func,hours:j.func,meridiem:j.func,minutes:j.func,month:j.func,seconds:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const Sie=y.forwardRef(function(t,n){var u,d,f;const r=Co(),o=pn(),i=wie(t,"MuiMobileDateTimePicker"),a=ue({day:nl,month:nl,year:nl,hours:ey,minutes:ey,seconds:ey},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{viewRenderers:a,format:gie(o,i),ampmInClock:s,slots:ue({field:Joe},i.slots),slotProps:ue({},i.slotProps,{field:h=>{var m;return ue({},Of((m=i.slotProps)==null?void 0:m.field,h),ib(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar),tabs:ue({hidden:!1},(d=i.slotProps)==null?void 0:d.tabs)})}),{renderPicker:c}=MB({props:l,valueManager:no,valueType:"date-time",getOpenDialogAriaText:nb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=l.localeText)==null?void 0:f.openDatePickerDialogue}),validator:$k});return c()});Sie.propTypes={ampm:j.bool,ampmInClock:j.bool,autoFocus:j.bool,className:j.string,closeOnSelect:j.bool,dayOfWeekFormatter:j.func,defaultValue:j.object,disabled:j.bool,disableFuture:j.bool,disableHighlightToday:j.bool,disableIgnoringDatePartForTimeValidation:j.bool,disableOpenPicker:j.bool,disablePast:j.bool,displayWeekNumber:j.bool,enableAccessibleFieldDOMStructure:j.any,fixedWeekNumber:j.number,format:j.string,formatDensity:j.oneOf(["dense","spacious"]),inputRef:eb,label:j.node,loading:j.bool,localeText:j.object,maxDate:j.object,maxDateTime:j.object,maxTime:j.object,minDate:j.object,minDateTime:j.object,minTime:j.object,minutesStep:j.number,monthsPerRow:j.oneOf([3,4]),name:j.string,onAccept:j.func,onChange:j.func,onClose:j.func,onError:j.func,onMonthChange:j.func,onOpen:j.func,onSelectedSectionsChange:j.func,onViewChange:j.func,onYearChange:j.func,open:j.bool,openTo:j.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:j.oneOf(["landscape","portrait"]),readOnly:j.bool,reduceAnimations:j.bool,referenceDate:j.object,renderLoading:j.func,selectedSections:j.oneOfType([j.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),j.number]),shouldDisableDate:j.func,shouldDisableMonth:j.func,shouldDisableTime:j.func,shouldDisableYear:j.func,showDaysOutsideCurrentMonth:j.bool,slotProps:j.object,slots:j.object,sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),timezone:j.string,value:j.object,view:j.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:j.shape({day:j.func,hours:j.func,minutes:j.func,month:j.func,seconds:j.func,year:j.func}),views:j.arrayOf(j.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:j.oneOf(["asc","desc"]),yearsPerRow:j.oneOf([3,4])};const aut=["desktopModeMediaQuery"],sut=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=wB}=r,i=Rt(r,aut);return cS(o,{defaultMatches:!0})?$.jsx(xie,ue({ref:n},i)):$.jsx(Sie,ue({ref:n},i))});class Yh extends Error{}class lut extends Yh{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class cut extends Yh{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class uut extends Yh{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Ag extends Yh{}class Cie extends Yh{constructor(t){super(`Invalid unit ${t}`)}}class yi extends Yh{}class Ed extends Yh{constructor(){super("Zone is an abstract class")}}const pt="numeric",oc="short",ts="long",GE={year:pt,month:pt,day:pt},Pie={year:pt,month:oc,day:pt},dut={year:pt,month:oc,day:pt,weekday:oc},Tie={year:pt,month:ts,day:pt},Eie={year:pt,month:ts,day:pt,weekday:ts},Oie={hour:pt,minute:pt},Iie={hour:pt,minute:pt,second:pt},kie={hour:pt,minute:pt,second:pt,timeZoneName:oc},Mie={hour:pt,minute:pt,second:pt,timeZoneName:ts},Aie={hour:pt,minute:pt,hourCycle:"h23"},$ie={hour:pt,minute:pt,second:pt,hourCycle:"h23"},Rie={hour:pt,minute:pt,second:pt,hourCycle:"h23",timeZoneName:oc},_ie={hour:pt,minute:pt,second:pt,hourCycle:"h23",timeZoneName:ts},Die={year:pt,month:pt,day:pt,hour:pt,minute:pt},Nie={year:pt,month:pt,day:pt,hour:pt,minute:pt,second:pt},Lie={year:pt,month:oc,day:pt,hour:pt,minute:pt},Fie={year:pt,month:oc,day:pt,hour:pt,minute:pt,second:pt},fut={year:pt,month:oc,day:pt,weekday:oc,hour:pt,minute:pt},jie={year:pt,month:ts,day:pt,hour:pt,minute:pt,timeZoneName:oc},Bie={year:pt,month:ts,day:pt,hour:pt,minute:pt,second:pt,timeZoneName:oc},zie={year:pt,month:ts,day:pt,weekday:ts,hour:pt,minute:pt,timeZoneName:ts},Vie={year:pt,month:ts,day:pt,weekday:ts,hour:pt,minute:pt,second:pt,timeZoneName:ts};class HS{get type(){throw new Ed}get name(){throw new Ed}get ianaName(){return this.name}get isUniversal(){throw new Ed}offsetName(t,n){throw new Ed}formatOffset(t,n){throw new Ed}offset(t){throw new Ed}equals(t){throw new Ed}get isValid(){throw new Ed}}let Z$=null;class _k extends HS{static get instance(){return Z$===null&&(Z$=new _k),Z$}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return Qie(t,n,r)}formatOffset(t,n){return vw(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let DP={};function put(e){return DP[e]||(DP[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),DP[e]}const hut={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function mut(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function gut(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o=0?m:1e3+m,(f-h)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let s9={};function yut(e,t={}){const n=JSON.stringify([e,t]);let r=s9[n];return r||(r=new Intl.ListFormat(e,t),s9[n]=r),r}let lN={};function cN(e,t={}){const n=JSON.stringify([e,t]);let r=lN[n];return r||(r=new Intl.DateTimeFormat(e,t),lN[n]=r),r}let uN={};function vut(e,t={}){const n=JSON.stringify([e,t]);let r=uN[n];return r||(r=new Intl.NumberFormat(e,t),uN[n]=r),r}let dN={};function but(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=dN[o];return i||(i=new Intl.RelativeTimeFormat(e,t),dN[o]=i),i}let F0=null;function wut(){return F0||(F0=new Intl.DateTimeFormat().resolvedOptions().locale,F0)}let l9={};function xut(e){let t=l9[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,l9[e]=t}return t}function Sut(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=cN(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=cN(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function Cut(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Put(e){const t=[];for(let n=1;n<=12;n++){const r=It.utc(2009,n,1);t.push(e(r))}return t}function Tut(e){const t=[];for(let n=1;n<=7;n++){const r=It.utc(2016,11,13+n);t.push(e(r))}return t}function KC(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function Eut(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Out{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=vut(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):NB(t,3);return po(n,this.padTo)}}}class Iut{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&ed.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=cN(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class kut{constructor(t,n,r){this.opts={style:"long",...r},!n&&Yie()&&(this.rtf=but(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Jut(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const Mut={firstDay:1,minimalDays:4,weekend:[6,7]};class Zn{static fromOpts(t){return Zn.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||zr.defaultLocale,s=a||(i?"en-US":wut()),l=n||zr.defaultNumberingSystem,c=r||zr.defaultOutputCalendar,u=fN(o)||zr.defaultWeekSettings;return new Zn(s,l,c,u,a)}static resetCache(){F0=null,lN={},uN={},dN={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return Zn.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=Sut(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=Cut(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Eut(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Zn.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,fN(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return KC(this,t,eae,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=Put(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return KC(this,t,rae,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Tut(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return KC(this,void 0,()=>oae,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[It.utc(2016,11,13,9),It.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return KC(this,t,iae,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[It.utc(-40,1,1),It.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new Out(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new Iut(t,this.intl,n)}relFormatter(t={}){return new kut(this.intl,this.isEnglish(),t)}listFormatter(t={}){return yut(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Xie()?xut(this.locale):Mut}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let eR=null;class Ui extends HS{static get utcInstance(){return eR===null&&(eR=new Ui(0)),eR}static instance(t){return t===0?Ui.utcInstance:new Ui(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ui(Lk(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${vw(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${vw(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return vw(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class Aut extends HS{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Vd(e,t){if(Wt(e)||e===null)return t;if(e instanceof HS)return e;if(Lut(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?_k.instance:n==="utc"||n==="gmt"?Ui.utcInstance:Ui.parseSpecifier(n)||ed.create(e)}else return yf(e)?Ui.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new Aut(e)}const $B={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},c9={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},$ut=$B.hanidec.replace(/[\[|\]]/g,"").split("");function Rut(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}let ig={};function _ut(){ig={}}function El({numberingSystem:e},t=""){const n=e||"latn";return ig[n]||(ig[n]={}),ig[n][t]||(ig[n][t]=new RegExp(`${$B[n]}${t}`)),ig[n][t]}let u9=()=>Date.now(),d9="system",f9=null,p9=null,h9=null,m9=60,g9,y9=null;class zr{static get now(){return u9}static set now(t){u9=t}static set defaultZone(t){d9=t}static get defaultZone(){return Vd(d9,_k.instance)}static get defaultLocale(){return f9}static set defaultLocale(t){f9=t}static get defaultNumberingSystem(){return p9}static set defaultNumberingSystem(t){p9=t}static get defaultOutputCalendar(){return h9}static set defaultOutputCalendar(t){h9=t}static get defaultWeekSettings(){return y9}static set defaultWeekSettings(t){y9=fN(t)}static get twoDigitCutoffYear(){return m9}static set twoDigitCutoffYear(t){m9=t%100}static get throwOnInvalid(){return g9}static set throwOnInvalid(t){g9=t}static resetCaches(){Zn.resetCache(),ed.resetCache(),It.resetCache(),_ut()}}class Vl{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Hie=[0,31,59,90,120,151,181,212,243,273,304,334],Uie=[0,31,60,91,121,152,182,213,244,274,305,335];function Ys(e,t){return new Vl("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function RB(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function Wie(e,t,n){return n+(US(e)?Uie:Hie)[t-1]}function Gie(e,t){const n=US(e)?Uie:Hie,r=n.findIndex(i=>iLx(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...Fk(e)}}function v9(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=_B(RB(r,1,t),n),s=ty(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=ty(c)):l>s?(c=r+1,l-=ty(r)):c=r;const{month:u,day:d}=Gie(c,l);return{year:c,month:u,day:d,...Fk(e)}}function tR(e){const{year:t,month:n,day:r}=e,o=Wie(t,n,r);return{year:t,ordinal:o,...Fk(e)}}function b9(e){const{year:t,ordinal:n}=e,{month:r,day:o}=Gie(t,n);return{year:t,month:r,day:o,...Fk(e)}}function w9(e,t){if(!Wt(e.localWeekday)||!Wt(e.localWeekNumber)||!Wt(e.localWeekYear)){if(!Wt(e.weekday)||!Wt(e.weekNumber)||!Wt(e.weekYear))throw new Ag("Cannot mix locale-based week fields with ISO-based week fields");return Wt(e.localWeekday)||(e.weekday=e.localWeekday),Wt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Wt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Dut(e,t=4,n=1){const r=Dk(e.weekYear),o=Xs(e.weekNumber,1,Lx(e.weekYear,t,n)),i=Xs(e.weekday,1,7);return r?o?i?!1:Ys("weekday",e.weekday):Ys("week",e.weekNumber):Ys("weekYear",e.weekYear)}function Nut(e){const t=Dk(e.year),n=Xs(e.ordinal,1,ty(e.year));return t?n?!1:Ys("ordinal",e.ordinal):Ys("year",e.year)}function qie(e){const t=Dk(e.year),n=Xs(e.month,1,12),r=Xs(e.day,1,KE(e.year,e.month));return t?n?r?!1:Ys("day",e.day):Ys("month",e.month):Ys("year",e.year)}function Kie(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Xs(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Xs(n,0,59),s=Xs(r,0,59),l=Xs(o,0,999);return i?a?s?l?!1:Ys("millisecond",o):Ys("second",r):Ys("minute",n):Ys("hour",t)}function Wt(e){return typeof e>"u"}function yf(e){return typeof e=="number"}function Dk(e){return typeof e=="number"&&e%1===0}function Lut(e){return typeof e=="string"}function Fut(e){return Object.prototype.toString.call(e)==="[object Date]"}function Yie(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Xie(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jut(e){return Array.isArray(e)?e:[e]}function x9(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function But(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function hv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function fN(e){if(e==null)return null;if(typeof e!="object")throw new yi("Week settings must be an object");if(!Xs(e.firstDay,1,7)||!Xs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Xs(t,1,7)))throw new yi("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Xs(e,t,n){return Dk(e)&&e>=t&&e<=n}function zut(e,t){return e-t*Math.floor(e/t)}function po(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Nd(e){if(!(Wt(e)||e===null||e===""))return parseInt(e,10)}function bp(e){if(!(Wt(e)||e===null||e===""))return parseFloat(e)}function DB(e){if(!(Wt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function NB(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function US(e){return e%4===0&&(e%100!==0||e%400===0)}function ty(e){return US(e)?366:365}function KE(e,t){const n=zut(t-1,12)+1,r=e+(t-n)/12;return n===2?US(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Nk(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function S9(e,t,n){return-_B(RB(e,1,t),n)+t-1}function Lx(e,t=4,n=1){const r=S9(e,t,n),o=S9(e+1,t,n);return(ty(e)-r+o)/7}function pN(e){return e>99?e:e>zr.twoDigitCutoffYear?1900+e:2e3+e}function Qie(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function Lk(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function Jie(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new yi(`Invalid unit value ${e}`);return t}function YE(e,t){const n={};for(const r in e)if(hv(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=Jie(o)}return n}function vw(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${po(n,2)}:${po(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${po(n,2)}${po(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function Fk(e){return But(e,["hour","minute","second","millisecond"])}const Vut=["January","February","March","April","May","June","July","August","September","October","November","December"],Zie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Hut=["J","F","M","A","M","J","J","A","S","O","N","D"];function eae(e){switch(e){case"narrow":return[...Hut];case"short":return[...Zie];case"long":return[...Vut];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const tae=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],nae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Uut=["M","T","W","T","F","S","S"];function rae(e){switch(e){case"narrow":return[...Uut];case"short":return[...nae];case"long":return[...tae];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const oae=["AM","PM"],Wut=["Before Christ","Anno Domini"],Gut=["BC","AD"],qut=["B","A"];function iae(e){switch(e){case"narrow":return[...qut];case"short":return[...Gut];case"long":return[...Wut];default:return null}}function Kut(e){return oae[e.hour<12?0:1]}function Yut(e,t){return rae(t)[e.weekday-1]}function Xut(e,t){return eae(t)[e.month-1]}function Qut(e,t){return iae(t)[e.year<0?0:1]}function Jut(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function C9(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Zut={D:GE,DD:Pie,DDD:Tie,DDDD:Eie,t:Oie,tt:Iie,ttt:kie,tttt:Mie,T:Aie,TT:$ie,TTT:Rie,TTTT:_ie,f:Die,ff:Lie,fff:jie,ffff:zie,F:Nie,FF:Fie,FFF:Bie,FFFF:Vie};let Bl=class j0{static create(t,n={}){return new j0(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return Zut[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return po(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,m)=>this.loc.extract(t,h,m),a=h=>t.isOffsetFixed&&t.offset===0&&h.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,h.format):"",s=()=>r?Kut(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(h,m)=>r?Xut(t,h):i(m?{month:h}:{month:h,day:"numeric"},"month"),c=(h,m)=>r?Yut(t,h):i(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),u=h=>{const m=j0.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(t,m):h},d=h=>r?Qut(t,h):i({era:h},"era"),f=h=>{switch(h){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(h)}};return C9(j0.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=j0.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return C9(i,o(s))}};const aae=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ab(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function sb(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function lb(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function sae(...e){return(t,n)=>{const r={};let o;for(o=0;oh!==void 0&&(m||h&&u)?-h:h;return[{years:f(bp(n)),months:f(bp(r)),weeks:f(bp(o)),days:f(bp(i)),hours:f(bp(a)),minutes:f(bp(s)),seconds:f(bp(l),l==="-0"),milliseconds:f(DB(c),d)}]}const fdt={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function jB(e,t,n,r,o,i,a){const s={year:t.length===2?pN(Nd(t)):Nd(t),month:Zie.indexOf(n)+1,day:Nd(r),hour:Nd(o),minute:Nd(i)};return a&&(s.second=Nd(a)),e&&(s.weekday=e.length>3?tae.indexOf(e)+1:nae.indexOf(e)+1),s}const pdt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function hdt(e){const[,t,n,r,o,i,a,s,l,c,u,d]=e,f=jB(t,o,r,n,i,a,s);let h;return l?h=fdt[l]:c?h=0:h=Lk(u,d),[f,new Ui(h)]}function mdt(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const gdt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,ydt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,vdt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function P9(e){const[,t,n,r,o,i,a,s]=e;return[jB(t,o,r,n,i,a,s),Ui.utcInstance]}function bdt(e){const[,t,n,r,o,i,a,s]=e;return[jB(t,s,n,r,o,i,a),Ui.utcInstance]}const wdt=ab(tdt,FB),xdt=ab(ndt,FB),Sdt=ab(rdt,FB),Cdt=ab(cae),dae=sb(ldt,cb,WS,GS),Pdt=sb(odt,cb,WS,GS),Tdt=sb(idt,cb,WS,GS),Edt=sb(cb,WS,GS);function Odt(e){return lb(e,[wdt,dae],[xdt,Pdt],[Sdt,Tdt],[Cdt,Edt])}function Idt(e){return lb(mdt(e),[pdt,hdt])}function kdt(e){return lb(e,[gdt,P9],[ydt,P9],[vdt,bdt])}function Mdt(e){return lb(e,[udt,ddt])}const Adt=sb(cb);function $dt(e){return lb(e,[cdt,Adt])}const Rdt=ab(adt,sdt),_dt=ab(uae),Ddt=sb(cb,WS,GS);function Ndt(e){return lb(e,[Rdt,dae],[_dt,Ddt])}const T9="Invalid Duration",fae={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ldt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...fae},As=146097/400,Hm=146097/4800,Fdt={years:{quarters:4,months:12,weeks:As/7,days:As,hours:As*24,minutes:As*24*60,seconds:As*24*60*60,milliseconds:As*24*60*60*1e3},quarters:{months:3,weeks:As/28,days:As/4,hours:As*24/4,minutes:As*24*60/4,seconds:As*24*60*60/4,milliseconds:As*24*60*60*1e3/4},months:{weeks:Hm/7,days:Hm,hours:Hm*24,minutes:Hm*24*60,seconds:Hm*24*60*60,milliseconds:Hm*24*60*60*1e3},...fae},Hp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],jdt=Hp.slice(0).reverse();function Od(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Dn(r)}function pae(e,t){let n=t.milliseconds??0;for(const r of jdt.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function E9(e,t){const n=pae(e,t)<0?-1:1;Hp.reduceRight((r,o)=>{if(Wt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),Hp.reduce((r,o)=>{if(Wt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function Bdt(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Dn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?Fdt:Ldt;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||Zn.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Dn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new yi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Dn({values:YE(t,Dn.normalizeUnit),loc:Zn.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(yf(t))return Dn.fromMillis(t);if(Dn.isDuration(t))return t;if(typeof t=="object")return Dn.fromObject(t);throw new yi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=Mdt(t);return r?Dn.fromObject(r,n):Dn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=$dt(t);return r?Dn.fromObject(r,n):Dn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new yi("need to specify a reason the Duration is invalid");const r=t instanceof Vl?t:new Vl(t,n);if(zr.throwOnInvalid)throw new uut(r);return new Dn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new Cie(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Bl.create(this.loc,r).formatDurationFromString(this,t):T9}toHuman(t={}){if(!this.isValid)return T9;const n=Hp.map(r=>{const o=this.values[r];return Wt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=NB(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},It.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?pae(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t),r={};for(const o of Hp)(hv(n.values,o)||hv(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Od(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=Jie(t(this.values[r],r));return Od(this,{values:n},!0)}get(t){return this[Dn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...YE(t,Dn.normalizeUnit)};return Od(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Od(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return E9(this.matrix,t),Od(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=Bdt(this.normalize().shiftToAll().toObject());return Od(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Dn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of Hp)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;yf(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else yf(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return E9(this.matrix,n),Od(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Od(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of Hp)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Um="Invalid Interval";function zdt(e,t){return!e||!e.isValid?Zr.invalid("missing or invalid start"):!t||!t.isValid?Zr.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Zr.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(g0).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o+this.e?this.e:a;r.push(Zr.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Dn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;rl*o));i=+s>+this.e?this.e:s,a.push(Zr.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:Zr.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return Zr.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(Zr.fromDateTimes(n,l.time)),n=null);return Zr.merge(o)}difference(...t){return Zr.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Um}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=GE,n={}){return this.isValid?Bl.create(this.s.loc.clone(n),t).formatInterval(this):Um}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Um}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Um}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Um}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Um}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Dn.invalid(this.invalidReason)}mapEndpoints(t){return Zr.fromDateTimes(t(this.s),t(this.e))}}class B0{static hasDST(t=zr.defaultZone){const n=It.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return ed.isValidZone(t)}static normalizeZone(t){return Vd(t,zr.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||Zn.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||Zn.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||Zn.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Zn.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||Zn.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Zn.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||Zn.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Zn.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Zn.create(n,null,"gregory").eras(t)}static features(){return{relative:Yie(),localeWeek:Xie()}}}function O9(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Dn.fromMillis(r).as("days"))}function Vdt(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=O9(l,c);return(u-u%7)/7}],["days",O9]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function Hdt(e,t,n,r){let[o,i,a,s]=Vdt(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?Dn.fromMillis(l,r).shiftTo(...c).plus(u):u}const Udt="missing Intl.DateTimeFormat.formatToParts support";function qn(e,t=n=>n){return{regex:e,deser:([n])=>t(Rut(n))}}const Wdt=" ",hae=`[ ${Wdt}]`,mae=new RegExp(hae,"g");function Gdt(e){return e.replace(/\./g,"\\.?").replace(mae,hae)}function I9(e){return e.replace(/\./g,"").replace(mae," ").toLowerCase()}function Ol(e,t){return e===null?null:{regex:RegExp(e.map(Gdt).join("|")),deser:([n])=>e.findIndex(r=>I9(n)===I9(r))+t}}function k9(e,t){return{regex:e,deser:([,n,r])=>Lk(n,r),groups:t}}function YC(e){return{regex:e,deser:([t])=>t}}function qdt(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Kdt(e,t){const n=El(t),r=El(t,"{2}"),o=El(t,"{3}"),i=El(t,"{4}"),a=El(t,"{6}"),s=El(t,"{1,2}"),l=El(t,"{1,3}"),c=El(t,"{1,6}"),u=El(t,"{1,9}"),d=El(t,"{2,4}"),f=El(t,"{4,6}"),h=v=>({regex:RegExp(qdt(v.val)),deser:([w])=>w,literal:!0}),g=(v=>{if(e.literal)return h(v);switch(v.val){case"G":return Ol(t.eras("short"),0);case"GG":return Ol(t.eras("long"),0);case"y":return qn(c);case"yy":return qn(d,pN);case"yyyy":return qn(i);case"yyyyy":return qn(f);case"yyyyyy":return qn(a);case"M":return qn(s);case"MM":return qn(r);case"MMM":return Ol(t.months("short",!0),1);case"MMMM":return Ol(t.months("long",!0),1);case"L":return qn(s);case"LL":return qn(r);case"LLL":return Ol(t.months("short",!1),1);case"LLLL":return Ol(t.months("long",!1),1);case"d":return qn(s);case"dd":return qn(r);case"o":return qn(l);case"ooo":return qn(o);case"HH":return qn(r);case"H":return qn(s);case"hh":return qn(r);case"h":return qn(s);case"mm":return qn(r);case"m":return qn(s);case"q":return qn(s);case"qq":return qn(r);case"s":return qn(s);case"ss":return qn(r);case"S":return qn(l);case"SSS":return qn(o);case"u":return YC(u);case"uu":return YC(s);case"uuu":return qn(n);case"a":return Ol(t.meridiems(),0);case"kkkk":return qn(i);case"kk":return qn(d,pN);case"W":return qn(s);case"WW":return qn(r);case"E":case"c":return qn(n);case"EEE":return Ol(t.weekdays("short",!1),1);case"EEEE":return Ol(t.weekdays("long",!1),1);case"ccc":return Ol(t.weekdays("short",!0),1);case"cccc":return Ol(t.weekdays("long",!0),1);case"Z":case"ZZ":return k9(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return k9(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return YC(/[a-z_+-/]{1,256}?/i);case" ":return YC(/[^\S\n\r]/);default:return h(v)}})(e)||{invalidReason:Udt};return g.token=e,g}const Ydt={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Xdt(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=Ydt[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function Qdt(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Jdt(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(hv(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function Zdt(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return Wt(e.z)||(n=ed.create(e.z)),Wt(e.Z)||(n||(n=new Ui(e.Z)),r=e.Z),Wt(e.q)||(e.M=(e.q-1)*3+1),Wt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),Wt(e.u)||(e.S=DB(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let nR=null;function eft(){return nR||(nR=It.fromMillis(1555555555555)),nR}function tft(e,t){if(e.literal)return e;const n=Bl.macroTokenToFormatOpts(e.val),r=bae(n,t);return r==null||r.includes(void 0)?e:r}function gae(e,t){return Array.prototype.concat(...e.map(n=>tft(n,t)))}class yae{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=gae(Bl.parseFormat(n),t),this.units=this.tokens.map(r=>Kdt(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=Qdt(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=Jdt(t,this.regex,this.handlers),[o,i,a]=r?Zdt(r):[null,null,void 0];if(hv(r,"a")&&hv(r,"H"))throw new Ag("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function vae(e,t,n){return new yae(e,n).explainFromTokens(t)}function nft(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=vae(e,t,n);return[r,o,i,a]}function bae(e,t){if(!e)return null;const r=Bl.create(t,e).dtFormatter(eft()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>Xdt(a,e,i))}const rR="Invalid DateTime",M9=864e13;function z0(e){return new Vl("unsupported zone",`the zone "${e.name}" is not supported`)}function oR(e){return e.weekData===null&&(e.weekData=qE(e.c)),e.weekData}function iR(e){return e.localWeekData===null&&(e.localWeekData=qE(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function wp(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new It({...n,...t,old:n})}function wae(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function XC(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function NP(e,t,n){return wae(Nk(e),t,n)}function A9(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,KE(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Dn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=Nk(i);let[l,c]=wae(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function Wm(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=It.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return It.invalid(new Vl("unparsable",`the input "${o}" can't be parsed as ${r}`))}function QC(e,t,n=!0){return e.isValid?Bl.create(Zn.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function aR(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=po(e.c.year,n?6:4),t?(r+="-",r+=po(e.c.month),r+="-",r+=po(e.c.day)):(r+=po(e.c.month),r+=po(e.c.day)),r}function $9(e,t,n,r,o,i){let a=po(e.c.hour);return t?(a+=":",a+=po(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=po(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=po(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=po(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=po(Math.trunc(-e.o/60)),a+=":",a+=po(Math.trunc(-e.o%60))):(a+="+",a+=po(Math.trunc(e.o/60)),a+=":",a+=po(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const xae={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},rft={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},oft={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Sae=["year","month","day","hour","minute","second","millisecond"],ift=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],aft=["year","ordinal","hour","minute","second","millisecond"];function sft(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new Cie(e);return t}function R9(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return sft(e)}}function lft(e){return FP[e]||(LP===void 0&&(LP=zr.now()),FP[e]=e.offset(LP)),FP[e]}function _9(e,t){const n=Vd(t.zone,zr.defaultZone);if(!n.isValid)return It.invalid(z0(n));const r=Zn.fromObject(t);let o,i;if(Wt(e.year))o=zr.now();else{for(const l of Sae)Wt(e[l])&&(e[l]=xae[l]);const a=qie(e)||Kie(e);if(a)return It.invalid(a);const s=lft(n);[o,i]=NP(e,s,n)}return new It({ts:o,zone:n,loc:r,o:i})}function D9(e,t,n){const r=Wt(n.round)?!0:n.round,o=(a,s)=>(a=NB(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function N9(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let LP,FP={};class It{constructor(t){const n=t.zone||zr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Vl("invalid input"):null)||(n.isValid?null:z0(n));this.ts=Wt(t.ts)?zr.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=yf(t.o)&&!t.old?t.o:n.offset(this.ts);o=XC(this.ts,s),r=Number.isNaN(o.year)?new Vl("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||Zn.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new It({})}static local(){const[t,n]=N9(arguments),[r,o,i,a,s,l,c]=n;return _9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=N9(arguments),[r,o,i,a,s,l,c]=n;return t.zone=Ui.utcInstance,_9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=Fut(t)?t.valueOf():NaN;if(Number.isNaN(r))return It.invalid("invalid input");const o=Vd(n.zone,zr.defaultZone);return o.isValid?new It({ts:r,zone:o,loc:Zn.fromObject(n)}):It.invalid(z0(o))}static fromMillis(t,n={}){if(yf(t))return t<-M9||t>M9?It.invalid("Timestamp out of range"):new It({ts:t,zone:Vd(n.zone,zr.defaultZone),loc:Zn.fromObject(n)});throw new yi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(yf(t))return new It({ts:t*1e3,zone:Vd(n.zone,zr.defaultZone),loc:Zn.fromObject(n)});throw new yi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Vd(n.zone,zr.defaultZone);if(!r.isValid)return It.invalid(z0(r));const o=Zn.fromObject(n),i=YE(t,R9),{minDaysInFirstWeek:a,startOfWeek:s}=w9(i,o),l=zr.now(),c=Wt(n.specificOffset)?r.offset(l):n.specificOffset,u=!Wt(i.ordinal),d=!Wt(i.year),f=!Wt(i.month)||!Wt(i.day),h=d||f,m=i.weekYear||i.weekNumber;if((h||u)&&m)throw new Ag("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Ag("Can't mix ordinal dates with month/day");const g=m||i.weekday&&!h;let v,w,x=XC(l,c);g?(v=ift,w=rft,x=qE(x,a,s)):u?(v=aft,w=oft,x=tR(x)):(v=Sae,w=xae);let S=!1;for(const I of v){const R=i[I];Wt(R)?S?i[I]=w[I]:i[I]=x[I]:S=!0}const P=g?Dut(i,a,s):u?Nut(i):qie(i),T=P||Kie(i);if(T)return It.invalid(T);const E=g?v9(i,a,s):u?b9(i):i,[O,k]=NP(E,c,r),A=new It({ts:O,zone:r,o:k,loc:o});return i.weekday&&h&&t.weekday!==A.weekday?It.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${A.toISO()}`):A.isValid?A:It.invalid(A.invalid)}static fromISO(t,n={}){const[r,o]=Odt(t);return Wm(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=Idt(t);return Wm(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=kdt(t);return Wm(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(Wt(t)||Wt(n))throw new yi("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=Zn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=nft(a,t,n);return u?It.invalid(u):Wm(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return It.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=Ndt(t);return Wm(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new yi("need to specify a reason the DateTime is invalid");const r=t instanceof Vl?t:new Vl(t,n);if(zr.throwOnInvalid)throw new lut(r);return new It({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=bae(t,Zn.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return gae(Bl.parseFormat(t),Zn.fromObject(n)).map(o=>o.val).join("")}static resetCache(){LP=void 0,FP={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?oR(this).weekYear:NaN}get weekNumber(){return this.isValid?oR(this).weekNumber:NaN}get weekday(){return this.isValid?oR(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?iR(this).weekday:NaN}get localWeekNumber(){return this.isValid?iR(this).weekNumber:NaN}get localWeekYear(){return this.isValid?iR(this).weekYear:NaN}get ordinal(){return this.isValid?tR(this.c).ordinal:NaN}get monthShort(){return this.isValid?B0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?B0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?B0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?B0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Nk(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=XC(l,a),d=XC(c,s);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[wp(this,{ts:l}),wp(this,{ts:c})]:[this]}get isInLeapYear(){return US(this.year)}get daysInMonth(){return KE(this.year,this.month)}get daysInYear(){return this.isValid?ty(this.year):NaN}get weeksInWeekYear(){return this.isValid?Lx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Lx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Bl.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Ui.instance(t),n)}toLocal(){return this.setZone(zr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Vd(t,zr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=NP(a,i,t)}return wp(this,{ts:o,zone:t})}else return It.invalid(z0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return wp(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=YE(t,R9),{minDaysInFirstWeek:r,startOfWeek:o}=w9(n,this.loc),i=!Wt(n.weekYear)||!Wt(n.weekNumber)||!Wt(n.weekday),a=!Wt(n.ordinal),s=!Wt(n.year),l=!Wt(n.month)||!Wt(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new Ag("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new Ag("Can't mix ordinal dates with month/day");let d;i?d=v9({...qE(this.c,r,o),...n},r,o):Wt(n.ordinal)?(d={...this.toObject(),...n},Wt(n.day)&&(d.day=Math.min(KE(d.year,d.month),d.day))):d=b9({...tR(this.c),...n});const[f,h]=NP(d,this.o,this.zone);return wp(this,{ts:f,o:h})}plus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t);return wp(this,A9(this,n))}minus(t){if(!this.isValid)return this;const n=Dn.fromDurationLike(t).negate();return wp(this,A9(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Dn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:t,l=a?t:this,c=Hdt(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(It.now(),t,n)}until(t){return this.isValid?Zr.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||It.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(It.isDateTime))throw new yi("max requires all arguments be DateTimes");return x9(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=Zn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return vae(a,t,n)}static fromStringExplain(t,n,r={}){return It.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=Zn.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new yae(i,t)}static fromFormatParser(t,n,r={}){if(Wt(t)||Wt(n))throw new yi("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=Zn.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new yi(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?It.invalid(u):Wm(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return GE}static get DATE_MED(){return Pie}static get DATE_MED_WITH_WEEKDAY(){return dut}static get DATE_FULL(){return Tie}static get DATE_HUGE(){return Eie}static get TIME_SIMPLE(){return Oie}static get TIME_WITH_SECONDS(){return Iie}static get TIME_WITH_SHORT_OFFSET(){return kie}static get TIME_WITH_LONG_OFFSET(){return Mie}static get TIME_24_SIMPLE(){return Aie}static get TIME_24_WITH_SECONDS(){return $ie}static get TIME_24_WITH_SHORT_OFFSET(){return Rie}static get TIME_24_WITH_LONG_OFFSET(){return _ie}static get DATETIME_SHORT(){return Die}static get DATETIME_SHORT_WITH_SECONDS(){return Nie}static get DATETIME_MED(){return Lie}static get DATETIME_MED_WITH_SECONDS(){return Fie}static get DATETIME_MED_WITH_WEEKDAY(){return fut}static get DATETIME_FULL(){return jie}static get DATETIME_FULL_WITH_SECONDS(){return Bie}static get DATETIME_HUGE(){return zie}static get DATETIME_HUGE_WITH_SECONDS(){return Vie}}function g0(e){if(It.isDateTime(e))return e;if(e&&e.valueOf&&yf(e.valueOf()))return It.fromJSDate(e);if(e&&typeof e=="object")return It.fromObject(e);throw new yi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const cft={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},uft={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"t",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime:"D t",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class jk{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=cft,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?It.fromJSDate(new Date,{locale:this.locale,zone:o}):It.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>It.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals(B0.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:It.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:It.expandFormat(l,{locale:this.locale}).replace(s,(d,f,h)=>{const m=f||h;return a.test(m)?d:`'${d}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=ue({},uft,n)}}const BB=st($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function zB({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=y.useState(!0),[i,a]=y.useState(n),[s,l]=y.useState(""),[c,u]=y.useState([]),[d,f]=Ge(),h=y.useMemo(()=>ZI(m=>v_e(m,f.language,r).then(g=>u(g)),200),[f.language,r]);return y.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return h(s),()=>{}},[i,s,h]),X(Kt,{children:[C(ec,{id:"ingredient-autocomplete",getOptionLabel:m=>m.value,"data-testid":"autocomplete",filterOptions:m=>m,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:d("noResults"),isOptionEqualToValue:(m,g)=>m.value===g.value,onChange:(m,g)=>{u(g?[g,...c]:c),a(g),e(g)},onInputChange:(m,g)=>{l(g)},renderInput:m=>C(Cn,{...m,label:d("nutrition.searchIngredientName"),fullWidth:!0,InputProps:{...m.InputProps,startAdornment:X(Mt,{children:[C(fo,{position:"start",children:C(BB,{})}),m.InputProps.startAdornment]})}}),renderOption:(m,g)=>RY("li",{...m,key:`ingredient-${g.data.id}`},X(ss,{disablePadding:!0,component:"div",children:[C(Gi,{children:C(tc,{alt:"",src:`${QF}${g.data.image}`,variant:"rounded",children:C(rd,{})})}),C(bo,{primary:g.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),f.language!==Ly&&C(TI,{children:C(Dy,{control:C(Vf,{checked:r,onChange:(m,g)=>o(g)}),label:d("alsoSearchEnglish")})})]})}var dft=function(t){return fft(t)&&!pft(t)};function fft(e){return!!e&&typeof e=="object"}function pft(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||gft(e)}var hft=typeof Symbol=="function"&&Symbol.for,mft=hft?Symbol.for("react.element"):60103;function gft(e){return e.$$typeof===mft}function yft(e){return Array.isArray(e)?[]:{}}function XE(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Fx(yft(e),e,t):e}function vft(e,t,n){return e.concat(t).map(function(r){return XE(r,n)})}function bft(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=XE(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=XE(t[o],n):r[o]=Fx(e[o],t[o],n)}),r}function Fx(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||vft,n.isMergeableObject=n.isMergeableObject||dft;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):bft(e,t,n):XE(t,n)}Fx.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Fx(r,o,n)},{})};var hN=Fx,Cae=typeof global=="object"&&global&&global.Object===Object&&global,wft=typeof self=="object"&&self&&self.Object===Object&&self,Xc=Cae||wft||Function("return this")(),If=Xc.Symbol,Pae=Object.prototype,xft=Pae.hasOwnProperty,Sft=Pae.toString,y0=If?If.toStringTag:void 0;function Cft(e){var t=xft.call(e,y0),n=e[y0];try{e[y0]=void 0;var r=!0}catch{}var o=Sft.call(e);return r&&(t?e[y0]=n:delete e[y0]),o}var Pft=Object.prototype,Tft=Pft.toString;function Eft(e){return Tft.call(e)}var Oft="[object Null]",Ift="[object Undefined]",L9=If?If.toStringTag:void 0;function Xh(e){return e==null?e===void 0?Ift:Oft:L9&&L9 in Object(e)?Cft(e):Eft(e)}function Tae(e,t){return function(n){return e(t(n))}}var VB=Tae(Object.getPrototypeOf,Object);function Qh(e){return e!=null&&typeof e=="object"}var kft="[object Object]",Mft=Function.prototype,Aft=Object.prototype,Eae=Mft.toString,$ft=Aft.hasOwnProperty,Rft=Eae.call(Object);function F9(e){if(!Qh(e)||Xh(e)!=kft)return!1;var t=VB(e);if(t===null)return!0;var n=$ft.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Eae.call(n)==Rft}function _ft(){this.__data__=[],this.size=0}function Oae(e,t){return e===t||e!==e&&t!==t}function Bk(e,t){for(var n=e.length;n--;)if(Oae(e[n][0],t))return n;return-1}var Dft=Array.prototype,Nft=Dft.splice;function Lft(e){var t=this.__data__,n=Bk(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Nft.call(t,n,1),--this.size,!0}function Fft(e){var t=this.__data__,n=Bk(t,e);return n<0?void 0:t[n][1]}function jft(e){return Bk(this.__data__,e)>-1}function Bft(e,t){var n=this.__data__,r=Bk(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function sd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=Bpt}var zpt="[object Arguments]",Vpt="[object Array]",Hpt="[object Boolean]",Upt="[object Date]",Wpt="[object Error]",Gpt="[object Function]",qpt="[object Map]",Kpt="[object Number]",Ypt="[object Object]",Xpt="[object RegExp]",Qpt="[object Set]",Jpt="[object String]",Zpt="[object WeakMap]",eht="[object ArrayBuffer]",tht="[object DataView]",nht="[object Float32Array]",rht="[object Float64Array]",oht="[object Int8Array]",iht="[object Int16Array]",aht="[object Int32Array]",sht="[object Uint8Array]",lht="[object Uint8ClampedArray]",cht="[object Uint16Array]",uht="[object Uint32Array]",Ir={};Ir[nht]=Ir[rht]=Ir[oht]=Ir[iht]=Ir[aht]=Ir[sht]=Ir[lht]=Ir[cht]=Ir[uht]=!0;Ir[zpt]=Ir[Vpt]=Ir[eht]=Ir[Hpt]=Ir[tht]=Ir[Upt]=Ir[Wpt]=Ir[Gpt]=Ir[qpt]=Ir[Kpt]=Ir[Ypt]=Ir[Xpt]=Ir[Qpt]=Ir[Jpt]=Ir[Zpt]=!1;function dht(e){return Qh(e)&&_ae(e.length)&&!!Ir[Xh(e)]}function HB(e){return function(t){return e(t)}}var Dae=typeof Ka=="object"&&Ka&&!Ka.nodeType&&Ka,bw=Dae&&typeof Ya=="object"&&Ya&&!Ya.nodeType&&Ya,fht=bw&&bw.exports===Dae,lR=fht&&Cae.process,mv=function(){try{var e=bw&&bw.require&&bw.require("util").types;return e||lR&&lR.binding&&lR.binding("util")}catch{}}(),U9=mv&&mv.isTypedArray,pht=U9?HB(U9):dht,hht=Object.prototype,mht=hht.hasOwnProperty;function Nae(e,t){var n=KS(e),r=!n&&Rpt(e),o=!n&&!r&&Rae(e),i=!n&&!r&&!o&&pht(e),a=n||r||o||i,s=a?kpt(e.length,String):[],l=s.length;for(var c in e)(t||mht.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||jpt(c,l)))&&s.push(c);return s}var ght=Object.prototype;function UB(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ght;return e===n}var yht=Tae(Object.keys,Object),vht=Object.prototype,bht=vht.hasOwnProperty;function wht(e){if(!UB(e))return yht(e);var t=[];for(var n in Object(e))bht.call(e,n)&&n!="constructor"&&t.push(n);return t}function Lae(e){return e!=null&&_ae(e.length)&&!Iae(e)}function WB(e){return Lae(e)?Nae(e):wht(e)}function xht(e,t){return e&&Vk(t,WB(t),e)}function Sht(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Cht=Object.prototype,Pht=Cht.hasOwnProperty;function Tht(e){if(!qS(e))return Sht(e);var t=UB(e),n=[];for(var r in e)r=="constructor"&&(t||!Pht.call(e,r))||n.push(r);return n}function GB(e){return Lae(e)?Nae(e,!0):Tht(e)}function Eht(e,t){return e&&Vk(t,GB(t),e)}var Fae=typeof Ka=="object"&&Ka&&!Ka.nodeType&&Ka,W9=Fae&&typeof Ya=="object"&&Ya&&!Ya.nodeType&&Ya,Oht=W9&&W9.exports===Fae,G9=Oht?Xc.Buffer:void 0,q9=G9?G9.allocUnsafe:void 0;function Iht(e,t){if(t)return e.slice();var n=e.length,r=q9?q9(n):new e.constructor(n);return e.copy(r),r}function jae(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}var Hk=y.createContext(void 0);Hk.displayName="FormikContext";var hgt=Hk.Provider;Hk.Consumer;function Qae(){var e=y.useContext(Hk);return e}var _s=function(t){return typeof t=="function"},YS=function(t){return t!==null&&typeof t=="object"},mgt=function(t){return String(Math.floor(Number(t)))===t},cR=function(t){return Object.prototype.toString.call(t)==="[object String]"},ggt=function(t){return y.Children.count(t)===0},uR=function(t){return YS(t)&&_s(t.then)};function Da(e,t,n,r){r===void 0&&(r=0);for(var o=Yae(t);e&&r=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function Jae(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o0?Te.map(function(Me){return I(Me,Da(ye,Me))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Oe).then(function(Me){return Me.reduce(function(Ue,ze,Qe){return ze==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||ze&&(Ue=ih(Ue,Te[Qe],ze)),Ue},{})})},[I]),N=y.useCallback(function(ye){return Promise.all([R(ye),f.validationSchema?A(ye):{},f.validate?k(ye):{}]).then(function(Te){var Oe=Te[0],Me=Te[1],Ue=Te[2],ze=hN.all([Oe,Me,Ue],{arrayMerge:xgt});return ze})},[f.validate,f.validationSchema,R,k,A]),L=$s(function(ye){return ye===void 0&&(ye=E.values),O({type:"SET_ISVALIDATING",payload:!0}),N(ye).then(function(Te){return w.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:Te})),Te})});y.useEffect(function(){a&&w.current===!0&&Mp(h.current,f.initialValues)&&L(h.current)},[a,L]);var B=y.useCallback(function(ye){var Te=ye&&ye.values?ye.values:h.current,Oe=ye&&ye.errors?ye.errors:m.current?m.current:f.initialErrors||{},Me=ye&&ye.touched?ye.touched:g.current?g.current:f.initialTouched||{},Ue=ye&&ye.status?ye.status:v.current?v.current:f.initialStatus;h.current=Te,m.current=Oe,g.current=Me,v.current=Ue;var ze=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!ye&&!!ye.isSubmitting,errors:Oe,touched:Me,status:Ue,values:Te,isValidating:!!ye&&!!ye.isValidating,submitCount:ye&&ye.submitCount&&typeof ye.submitCount=="number"?ye.submitCount:0}})};if(f.onReset){var Qe=f.onReset(E.values,ce);uR(Qe)?Qe.then(ze):ze()}else ze()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);y.useEffect(function(){w.current===!0&&!Mp(h.current,f.initialValues)&&c&&(h.current=f.initialValues,B(),a&&L(h.current))},[c,f.initialValues,B,a,L]),y.useEffect(function(){c&&w.current===!0&&!Mp(m.current,f.initialErrors)&&(m.current=f.initialErrors||xp,O({type:"SET_ERRORS",payload:f.initialErrors||xp}))},[c,f.initialErrors]),y.useEffect(function(){c&&w.current===!0&&!Mp(g.current,f.initialTouched)&&(g.current=f.initialTouched||ZC,O({type:"SET_TOUCHED",payload:f.initialTouched||ZC}))},[c,f.initialTouched]),y.useEffect(function(){c&&w.current===!0&&!Mp(v.current,f.initialStatus)&&(v.current=f.initialStatus,O({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var _=$s(function(ye){if(x.current[ye]&&_s(x.current[ye].validate)){var Te=Da(E.values,ye),Oe=x.current[ye].validate(Te);return uR(Oe)?(O({type:"SET_ISVALIDATING",payload:!0}),Oe.then(function(Me){return Me}).then(function(Me){O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Me}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Oe}}),Promise.resolve(Oe))}else if(f.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),A(E.values,ye).then(function(Me){return Me}).then(function(Me){O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Da(Me,ye)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),D=y.useCallback(function(ye,Te){var Oe=Te.validate;x.current[ye]={validate:Oe}},[]),z=y.useCallback(function(ye){delete x.current[ye]},[]),F=$s(function(ye,Te){O({type:"SET_TOUCHED",payload:ye});var Oe=Te===void 0?o:Te;return Oe?L(E.values):Promise.resolve()}),H=y.useCallback(function(ye){O({type:"SET_ERRORS",payload:ye})},[]),U=$s(function(ye,Te){var Oe=_s(ye)?ye(E.values):ye;O({type:"SET_VALUES",payload:Oe});var Me=Te===void 0?n:Te;return Me?L(Oe):Promise.resolve()}),q=y.useCallback(function(ye,Te){O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Te}})},[]),Y=$s(function(ye,Te,Oe){O({type:"SET_FIELD_VALUE",payload:{field:ye,value:Te}});var Me=Oe===void 0?n:Oe;return Me?L(ih(E.values,ye,Te)):Promise.resolve()}),ae=y.useCallback(function(ye,Te){var Oe=Te,Me=ye,Ue;if(!cR(ye)){ye.persist&&ye.persist();var ze=ye.target?ye.target:ye.currentTarget,Qe=ze.type,ct=ze.name,nt=ze.id,et=ze.value,yt=ze.checked,vn=ze.outerHTML,Ke=ze.options,$e=ze.multiple;Oe=Te||ct||nt,Me=/number|range/.test(Qe)?(Ue=parseFloat(et),isNaN(Ue)?"":Ue):/checkbox/.test(Qe)?Cgt(Da(E.values,Oe),yt,et):Ke&&$e?Sgt(Ke):et}Oe&&Y(Oe,Me)},[Y,E.values]),Z=$s(function(ye){if(cR(ye))return function(Te){return ae(Te,ye)};ae(ye)}),K=$s(function(ye,Te,Oe){Te===void 0&&(Te=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:ye,value:Te}});var Me=Oe===void 0?o:Oe;return Me?L(E.values):Promise.resolve()}),te=y.useCallback(function(ye,Te){ye.persist&&ye.persist();var Oe=ye.target,Me=Oe.name,Ue=Oe.id,ze=Oe.outerHTML,Qe=Te||Me||Ue;K(Qe,!0)},[K]),pe=$s(function(ye){if(cR(ye))return function(Te){return te(Te,ye)};te(ye)}),ie=y.useCallback(function(ye){_s(ye)?O({type:"SET_FORMIK_STATE",payload:ye}):O({type:"SET_FORMIK_STATE",payload:function(){return ye}})},[]),le=y.useCallback(function(ye){O({type:"SET_STATUS",payload:ye})},[]),re=y.useCallback(function(ye){O({type:"SET_ISSUBMITTING",payload:ye})},[]),de=$s(function(){return O({type:"SUBMIT_ATTEMPT"}),L().then(function(ye){var Te=ye instanceof Error,Oe=!Te&&Object.keys(ye).length===0;if(Oe){var Me;try{if(Me=me(),Me===void 0)return}catch(Ue){throw Ue}return Promise.resolve(Me).then(function(Ue){return w.current&&O({type:"SUBMIT_SUCCESS"}),Ue}).catch(function(Ue){if(w.current)throw O({type:"SUBMIT_FAILURE"}),Ue})}else if(w.current&&(O({type:"SUBMIT_FAILURE"}),Te))throw ye})}),ee=$s(function(ye){ye&&ye.preventDefault&&_s(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&_s(ye.stopPropagation)&&ye.stopPropagation(),de().catch(function(Te){console.warn("Warning: An unhandled error was caught from submitForm()",Te)})}),ce={resetForm:B,validateForm:L,validateField:_,setErrors:H,setFieldError:q,setFieldTouched:K,setFieldValue:Y,setStatus:le,setSubmitting:re,setTouched:F,setValues:U,setFormikState:ie,submitForm:de},me=$s(function(){return u(E.values,ce)}),we=$s(function(ye){ye&&ye.preventDefault&&_s(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&_s(ye.stopPropagation)&&ye.stopPropagation(),B()}),ge=y.useCallback(function(ye){return{value:Da(E.values,ye),error:Da(E.errors,ye),touched:!!Da(E.touched,ye),initialValue:Da(h.current,ye),initialTouched:!!Da(g.current,ye),initialError:Da(m.current,ye)}},[E.errors,E.touched,E.values]),Se=y.useCallback(function(ye){return{setValue:function(Oe,Me){return Y(ye,Oe,Me)},setTouched:function(Oe,Me){return K(ye,Oe,Me)},setError:function(Oe){return q(ye,Oe)}}},[Y,K,q]),xe=y.useCallback(function(ye){var Te=YS(ye),Oe=Te?ye.name:ye,Me=Da(E.values,Oe),Ue={name:Oe,value:Me,onChange:Z,onBlur:pe};if(Te){var ze=ye.type,Qe=ye.value,ct=ye.as,nt=ye.multiple;ze==="checkbox"?Qe===void 0?Ue.checked=!!Me:(Ue.checked=!!(Array.isArray(Me)&&~Me.indexOf(Qe)),Ue.value=Qe):ze==="radio"?(Ue.checked=Me===Qe,Ue.value=Qe):ct==="select"&&nt&&(Ue.value=Ue.value||[],Ue.multiple=!0)}return Ue},[pe,Z,E.values]),Ie=y.useMemo(function(){return!Mp(h.current,E.values)},[h.current,E.values]),Re=y.useMemo(function(){return typeof s<"u"?Ie?E.errors&&Object.keys(E.errors).length===0:s!==!1&&_s(s)?s(f):s:E.errors&&Object.keys(E.errors).length===0},[s,Ie,E.errors,f]),_e=Bo({},E,{initialValues:h.current,initialErrors:m.current,initialTouched:g.current,initialStatus:v.current,handleBlur:pe,handleChange:Z,handleReset:we,handleSubmit:ee,resetForm:B,setErrors:H,setFormikState:ie,setFieldTouched:K,setFieldValue:Y,setFieldError:q,setStatus:le,setSubmitting:re,setTouched:F,setValues:U,submitForm:de,validateForm:L,validateField:_,isValid:Re,dirty:Ie,unregisterField:z,registerField:D,getFieldProps:xe,getFieldMeta:ge,getFieldHelpers:Se,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return _e}function pl(e){var t=vgt(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return y.useImperativeHandle(i,function(){return t}),y.createElement(hgt,{value:t},n?y.createElement(n,t):o?o(t):r?_s(r)?r(t):ggt(r)?null:y.Children.only(r):null)}function bgt(e){var t={};if(e.inner){if(e.inner.length===0)return ih(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;Da(t,a.path)||(t=ih(t,a.path,a.message))}}return t}function wgt(e,t,n,r){n===void 0&&(n=!1);var o=wN(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function wN(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||F9(o)?wN(o):o!==""?o:void 0}):F9(e[r])?t[r]=wN(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function xgt(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?hN(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=hN(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function Sgt(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Cgt(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var Pgt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function $s(e){var t=y.useRef(e);return Pgt(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Tgt=/[^.^\]^[]+|(?=\[\]|\.\.)/g,Zae=/^\d+$/,Egt=/^\d/,Ogt=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Igt=/^\s*(['"]?)(.*?)(\1)\s*$/,QB=512,d7=new em(QB),f7=new em(QB),p7=new em(QB),ah={Cache:em,split:xN,normalizePath:dR,setter:function(e){var t=dR(e);return f7.get(e)||f7.set(e,function(r,o){for(var i=0,a=t.length,s=r;ie.match(Rgt)||[],Wk=e=>e[0].toUpperCase()+e.slice(1),ZB=(e,t)=>Uk(e).join(t).toLowerCase(),ese=e=>Uk(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),_gt=e=>Wk(ese(e)),Dgt=e=>ZB(e,"_"),Ngt=e=>ZB(e,"-"),Lgt=e=>Wk(ZB(e," ")),Fgt=e=>Uk(e).map(Wk).join(" ");var fR={words:Uk,upperFirst:Wk,camelCase:ese,pascalCase:_gt,snakeCase:Dgt,kebabCase:Ngt,sentenceCase:Lgt,titleCase:Fgt},ez={exports:{}};ez.exports=function(e){return tse(jgt(e),e)};ez.exports.array=tse;function tse(e,t){var n=e.length,r=new Array(n),o={},i=n,a=Bgt(t),s=zgt(e);for(t.forEach(function(c){if(!s.has(c[0])||!s.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(c,u,d){if(d.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var h=a.get(c)||new Set;if(h=Array.from(h),u=h.length){d.add(c);do{var m=h[--u];l(m,s.get(m),d)}while(u);d.delete(c)}r[--n]=c}}}function jgt(e){for(var t=new Set,n=0,r=e.length;n"",Kgt=/^Symbol\((.*)\)(.*)$/;function Ygt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function h7(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return Ygt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return qgt.call(e).replace(Kgt,"Symbol($1)");const r=Ugt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+Wgt.call(e)+"]":r==="RegExp"?Ggt.call(e):null}function Ru(e,t){let n=h7(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=h7(this[r],t);return i!==null?i:o},2)}function nse(e){return e==null?[]:[].concat(e)}let rse,ose,ise,Xgt=/\$\{\s*(\w+)\s*\}/g;rse=Symbol.toStringTag;class m7{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[rse]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],nse(t).forEach(i=>{if(da.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}ose=Symbol.hasInstance;ise=Symbol.toStringTag;class da extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(Xgt,(o,i)=>Ru(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new m7(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[ise]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,da)}static[ose](t){return m7[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let hc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Ru(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Ru(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Ru(n,!0)}\``+o}},aa={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},kd={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},SN={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},CN={isValue:"${path} field must be ${value}"},PN={noUnknown:"${path} field has unspecified keys: ${unknown}"},jP={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Qgt={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Ru(n,!0)}\``}return da.formatError(hc.notType,e)}};Object.assign(Object.create(null),{mixed:hc,string:aa,number:kd,date:SN,object:PN,array:jP,boolean:CN,tuple:Qgt});const Gk=e=>e&&e.__isYupSchema__;class QE{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new QE(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!Gk(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const eP={context:"$",value:"."};class tm{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===eP.context,this.isValue=this.key[0]===eP.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?eP.context:this.isValue?eP.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&ah.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}tm.prototype.__isYupRef=!0;const Hl=e=>e==null;function Gm(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:d,message:f,skipAbsent:h}=e;let{parent:m,context:g,abortEarly:v=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function x(R){return tm.isRef(R)?R.getValue(n,m,g):R}function S(R={}){const N=Object.assign({value:n,originalValue:i,label:a.spec.label,path:R.path||r,spec:a.spec,disableStackTrace:R.disableStackTrace||w},d,R.params);for(const B of Object.keys(N))N[B]=x(N[B]);const L=new da(da.formatError(R.message||f,N),n,N.path,R.type||c,N.disableStackTrace);return L.params=N,L}const P=v?s:l;let T={path:r,parent:m,type:c,from:o.from,createError:S,resolve:x,options:o,originalValue:i,schema:a};const E=R=>{da.isError(R)?P(R):R?l(null):P(S())},O=R=>{da.isError(R)?P(R):s(R)};if(h&&Hl(n))return E(!0);let A;try{var I;if(A=u.call(T,n,T),typeof((I=A)==null?void 0:I.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(E,O)}}catch(R){O(R);return}E(A)}return t.OPTIONS=e,t}function Jgt(e,t,n,r=n){let o,i,a;return t?(ah.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class JE extends Set{describe(){const t=[];for(const n of this.values())t.push(tm.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new JE(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function $g(e,t=new Map){if(Gk(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(hc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=$g(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&Hl(i))return i;let a=Ru(t),s=Ru(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". +`));const t=y.useMemo(()=>ue({},Not,e.localeText),[e.localeText]);return y.useMemo(()=>ue({},e,{localeText:t}),[e,t])},hn=()=>em().utils,tm=()=>em().defaultDates,nm=e=>{const t=hn(),n=y.useRef();return n.current===void 0&&(n.current=t.date(void 0,e)),n.current},To=()=>em().localeText,Lot=lt($.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),Fot=lt($.jsx("path",{d:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"ArrowLeft"),jot=lt($.jsx("path",{d:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"ArrowRight"),Boe=lt($.jsx("path",{d:"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"}),"Calendar"),Bot=lt($.jsxs(y.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Clock"),zot=lt($.jsx("path",{d:"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"}),"DateRange"),Vot=lt($.jsxs(y.Fragment,{children:[$.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),$.jsx("path",{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"})]}),"Time"),Hot=lt($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");function Uot(e){return Fn("MuiPickersArrowSwitcher",e)}Un("MuiPickersArrowSwitcher",["root","spacer","button","previousIconButton","nextIconButton","leftArrowIcon","rightArrowIcon"]);const Wot=["children","className","slots","slotProps","isNextDisabled","isNextHidden","onGoToNext","nextLabel","isPreviousDisabled","isPreviousHidden","onGoToPrevious","previousLabel","labelId"],Got=["ownerState"],qot=["ownerState"],Kot=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex"}),Yot=oe("div",{name:"MuiPickersArrowSwitcher",slot:"Spacer",overridesResolver:(e,t)=>t.spacer})(({theme:e})=>({width:e.spacing(3)})),t9=oe(kn,{name:"MuiPickersArrowSwitcher",slot:"Button",overridesResolver:(e,t)=>t.button})({variants:[{props:{hidden:!0},style:{visibility:"hidden"}}]}),Xot=e=>{const{classes:t}=e;return Dn({root:["root"],spacer:["spacer"],button:["button"],previousIconButton:["previousIconButton"],nextIconButton:["nextIconButton"],leftArrowIcon:["leftArrowIcon"],rightArrowIcon:["rightArrowIcon"]},Uot,t)},zoe=y.forwardRef(function(t,n){const r=nr(),o=Zt({props:t,name:"MuiPickersArrowSwitcher"}),{children:i,className:a,slots:s,slotProps:l,isNextDisabled:c,isNextHidden:u,onGoToNext:d,nextLabel:f,isPreviousDisabled:p,isPreviousHidden:m,onGoToPrevious:g,previousLabel:v,labelId:w}=o,x=_t(o,Wot),S=o,P=Xot(S),T={isDisabled:c,isHidden:u,goTo:d,label:f},E={isDisabled:p,isHidden:m,goTo:g,label:v},O=(s==null?void 0:s.previousIconButton)??t9,k=Vn({elementType:O,externalSlotProps:l==null?void 0:l.previousIconButton,additionalProps:{size:"medium",title:E.label,"aria-label":E.label,disabled:E.isDisabled,edge:"end",onClick:E.goTo},ownerState:ue({},S,{hidden:E.isHidden}),className:de(P.button,P.previousIconButton)}),A=(s==null?void 0:s.nextIconButton)??t9,I=Vn({elementType:A,externalSlotProps:l==null?void 0:l.nextIconButton,additionalProps:{size:"medium",title:T.label,"aria-label":T.label,disabled:T.isDisabled,edge:"start",onClick:T.goTo},ownerState:ue({},S,{hidden:T.isHidden}),className:de(P.button,P.nextIconButton)}),R=(s==null?void 0:s.leftArrowIcon)??Fot,N=Vn({elementType:R,externalSlotProps:l==null?void 0:l.leftArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.leftArrowIcon}),L=_t(N,Got),j=(s==null?void 0:s.rightArrowIcon)??jot,_=Vn({elementType:j,externalSlotProps:l==null?void 0:l.rightArrowIcon,additionalProps:{fontSize:"inherit"},ownerState:S,className:P.rightArrowIcon}),D=_t(_,qot);return $.jsxs(Kot,ue({ref:n,className:de(P.root,a),ownerState:S},x,{children:[$.jsx(O,ue({},k,{children:r?$.jsx(j,ue({},D)):$.jsx(R,ue({},L))})),i?$.jsx(ct,{variant:"subtitle1",component:"span",id:w,children:i}):$.jsx(Yot,{className:P.spacer,ownerState:S}),$.jsx(A,ue({},I,{children:r?$.jsx(R,ue({},L)):$.jsx(j,ue({},D))}))]}))}),Ec=(e,t)=>e.length!==t.length?!1:t.every(n=>e.includes(n)),SB=({openTo:e,defaultOpenTo:t,views:n,defaultViews:r})=>{const o=n??r;let i;if(e!=null)i=e;else if(o.includes(t))i=t;else if(o.length>0)i=o[0];else throw new Error("MUI X: The `views` prop must contain at least one view.");return{views:o,openTo:i}},Voe=["hours","minutes","seconds"],Sv=e=>Voe.includes(e),W0=e=>Voe.includes(e)||e==="meridiem",Qot=(e,t)=>e?t.getHours(e)>=12?"pm":"am":null,zx=(e,t,n)=>n&&(e>=12?"pm":"am")!==t?t==="am"?e-12:e+12:e,Jot=(e,t,n,r)=>{const o=zx(r.getHours(e),t,n);return r.setHours(e,o)},n9=(e,t)=>t.getHours(e)*3600+t.getMinutes(e)*60+t.getSeconds(e),XS=(e,t)=>(n,r)=>e?t.isAfter(n,r):n9(n,t)>n9(r,t),eO=(e,{format:t,views:n,ampm:r})=>{if(t!=null)return t;const o=e.formats;return Ec(n,["hours"])?r?`${o.hours12h} ${o.meridiem}`:o.hours24h:Ec(n,["minutes"])?o.minutes:Ec(n,["seconds"])?o.seconds:Ec(n,["minutes","seconds"])?`${o.minutes}:${o.seconds}`:Ec(n,["hours","minutes","seconds"])?r?`${o.hours12h}:${o.minutes}:${o.seconds} ${o.meridiem}`:`${o.hours24h}:${o.minutes}:${o.seconds}`:r?`${o.hours12h}:${o.minutes} ${o.meridiem}`:`${o.hours24h}:${o.minutes}`};function QS({onChange:e,onViewChange:t,openTo:n,view:r,views:o,autoFocus:i,focusedView:a,onFocusedViewChange:s}){const l=y.useRef(n),c=y.useRef(o),u=y.useRef(o.includes(n)?n:o[0]),[d,f]=Dh({name:"useViews",state:"view",controlled:r,default:u.current}),p=y.useRef(i?d:null),[m,g]=Dh({name:"useViews",state:"focusedView",controlled:a,default:p.current});y.useEffect(()=>{(l.current&&l.current!==n||c.current&&c.current.some(O=>!o.includes(O)))&&(f(o.includes(n)?n:o[0]),c.current=o,l.current=n)},[n,f,d,o]);const v=o.indexOf(d),w=o[v-1]??null,x=o[v+1]??null,S=Ct((O,k)=>{g(k?O:A=>O===A?null:A),s==null||s(O,k)}),P=Ct(O=>{S(O,!0),O!==d&&(f(O),t&&t(O))}),T=Ct(()=>{x&&P(x)}),E=Ct((O,k,A)=>{const I=k==="finish",R=A?o.indexOf(A){const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isBefore(i,n)?i:n);return!o.isAfter(a,e)},[t,n,e,o,r])}function eit(e,{disablePast:t,minDate:n,timezone:r}){const o=hn();return y.useMemo(()=>{const i=o.date(void 0,r),a=o.startOfMonth(t&&o.isAfter(i,n)?i:n);return!o.isBefore(a,e)},[t,n,e,o,r])}function Dk(e,t,n,r){const o=hn(),i=Qot(e,o),a=y.useCallback(s=>{const l=e==null?null:Jot(e,s,!!t,o);n(l,r??"partial")},[t,e,n,r,o]);return{meridiemMode:i,handleMeridiemChange:a}}const Vx=36,Nk=2,Lk=320,tit=280,Fk=336,Hoe=232,G0=48,jk=oe("div")({overflow:"hidden",width:Lk,maxHeight:Fk,display:"flex",flexDirection:"column",margin:"0 auto"});function nit(e){return Fn("MuiTimeClock",e)}Un("MuiTimeClock",["root","arrowSwitcher"]);const Cv=220,_u=36,Hx={x:Cv/2,y:Cv/2},Uoe={x:Hx.x,y:0},rit=Uoe.x-Hx.x,oit=Uoe.y-Hx.y,iit=e=>e*(180/Math.PI),Woe=(e,t,n)=>{const r=t-Hx.x,o=n-Hx.y,i=Math.atan2(rit,oit)-Math.atan2(r,o);let a=iit(i);a=Math.round(a/e)*e,a%=360;const s=Math.floor(a/e)||0,l=r**2+o**2,c=Math.sqrt(l);return{value:s,distance:c}},ait=(e,t,n=1)=>{const r=n*6;let{value:o}=Woe(r,e,t);return o=o*n%60,o},sit=(e,t,n)=>{const{value:r,distance:o}=Woe(30,e,t);let i=r||12;return n?i%=12:o{const{classes:t}=e;return Dn({root:["root"],thumb:["thumb"]},lit,t)},dit=oe("div",{name:"MuiClockPointer",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({width:2,backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",left:"calc(50% - 1px)",bottom:"50%",transformOrigin:"center bottom 0px",variants:[{props:{shouldAnimate:!0},style:{transition:e.transitions.create(["transform","height"])}}]})),fit=oe("div",{name:"MuiClockPointer",slot:"Thumb",overridesResolver:(e,t)=>t.thumb})(({theme:e})=>({width:4,height:4,backgroundColor:(e.vars||e).palette.primary.contrastText,borderRadius:"50%",position:"absolute",top:-21,left:`calc(50% - ${_u/2}px)`,border:`${(_u-4)/2}px solid ${(e.vars||e).palette.primary.main}`,boxSizing:"content-box",variants:[{props:{hasSelected:!0},style:{backgroundColor:(e.vars||e).palette.primary.main}}]}));function pit(e){const t=Zt({props:e,name:"MuiClockPointer"}),{className:n,isInner:r,type:o,viewValue:i}=t,a=_t(t,cit),s=y.useRef(o);y.useEffect(()=>{s.current=o},[o]);const l=ue({},t,{shouldAnimate:s.current!==o}),c=uit(l),u=()=>{let f=360/(o==="hours"?12:60)*i;return o==="hours"&&i>12&&(f-=360),{height:Math.round((r?.26:.4)*Cv),transform:`rotateZ(${f}deg)`}};return $.jsx(dit,ue({style:u(),className:de(c.root,n),ownerState:l},a,{children:$.jsx(fit,{ownerState:l,className:c.thumb})}))}function hit(e){return Fn("MuiClock",e)}Un("MuiClock",["root","clock","wrapper","squareMask","pin","amButton","pmButton","meridiemText","selected"]);const tO=(e,t,n)=>{let r=t;return r=e.setHours(r,e.getHours(n)),r=e.setMinutes(r,e.getMinutes(n)),r=e.setSeconds(r,e.getSeconds(n)),r=e.setMilliseconds(r,e.getMilliseconds(n)),r},Tw=({date:e,disableFuture:t,disablePast:n,maxDate:r,minDate:o,isDateDisabled:i,utils:a,timezone:s})=>{const l=tO(a,a.date(void 0,s),e);n&&a.isBefore(o,l)&&(o=l),t&&a.isAfter(r,l)&&(r=l);let c=e,u=e;for(a.isBefore(e,o)&&(c=o,u=null),a.isAfter(e,r)&&(u&&(u=r),c=null);c||u;){if(c&&a.isAfter(c,r)&&(c=null),u&&a.isBefore(u,o)&&(u=null),c){if(!i(c))return c;c=a.addDays(c,1)}if(u){if(!i(u))return u;u=a.addDays(u,-1)}}return null},mit=(e,t)=>t==null||!e.isValid(t)?null:t,Ti=(e,t,n)=>t==null||!e.isValid(t)?n:t,git=(e,t,n)=>!e.isValid(t)&&t!=null&&!e.isValid(n)&&n!=null?!0:e.isEqual(t,n),CB=(e,t)=>{const r=[e.startOfYear(t)];for(;r.length<12;){const o=r[r.length-1];r.push(e.addMonths(o,1))}return r},PB=(e,t,n)=>n==="date"?e.startOfDay(e.date(void 0,t)):e.date(void 0,t),Wl=(e,t)=>{const n=e.setHours(e.date(),t==="am"?2:14);return e.format(n,"meridiem")},yit=["year","month","day"],Pv=e=>yit.includes(e),Ux=(e,{format:t,views:n},r)=>{if(t!=null)return t;const o=e.formats;return Ec(n,["year"])?o.year:Ec(n,["month"])?o.month:Ec(n,["day"])?o.dayOfMonth:Ec(n,["month","year"])?`${o.month} ${o.year}`:Ec(n,["day","month"])?`${o.month} ${o.dayOfMonth}`:r?/en/.test(e.getCurrentLocaleCode())?o.normalDateWithWeekday:o.normalDate:o.keyboardDate},vit=(e,t)=>{const n=e.startOfWeek(t);return[0,1,2,3,4,5,6].map(r=>e.addDays(n,r))},bit=e=>{const{classes:t,meridiemMode:n}=e;return Dn({root:["root"],clock:["clock"],wrapper:["wrapper"],squareMask:["squareMask"],pin:["pin"],amButton:["amButton",n==="am"&&"selected"],pmButton:["pmButton",n==="pm"&&"selected"],meridiemText:["meridiemText"]},hit,t)},wit=oe("div",{name:"MuiClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",margin:e.spacing(2)})),xit=oe("div",{name:"MuiClock",slot:"Clock",overridesResolver:(e,t)=>t.clock})({backgroundColor:"rgba(0,0,0,.07)",borderRadius:"50%",height:220,width:220,flexShrink:0,position:"relative",pointerEvents:"none"}),Sit=oe("div",{name:"MuiClock",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({"&:focus":{outline:"none"}}),Cit=oe("div",{name:"MuiClock",slot:"SquareMask",overridesResolver:(e,t)=>t.squareMask})({width:"100%",height:"100%",position:"absolute",pointerEvents:"auto",outline:0,touchAction:"none",userSelect:"none",variants:[{props:{disabled:!1},style:{"@media (pointer: fine)":{cursor:"pointer",borderRadius:"50%"},"&:active":{cursor:"move"}}}]}),Pit=oe("div",{name:"MuiClock",slot:"Pin",overridesResolver:(e,t)=>t.pin})(({theme:e})=>({width:6,height:6,borderRadius:"50%",backgroundColor:(e.vars||e).palette.primary.main,position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"})),Goe=(e,t)=>({zIndex:1,bottom:8,paddingLeft:4,paddingRight:4,width:_u,variants:[{props:{meridiemMode:t},style:{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:hover":{backgroundColor:(e.vars||e).palette.primary.light}}}]}),Tit=oe(kn,{name:"MuiClock",slot:"AmButton",overridesResolver:(e,t)=>t.amButton})(({theme:e})=>ue({},Goe(e,"am"),{position:"absolute",left:8})),Eit=oe(kn,{name:"MuiClock",slot:"PmButton",overridesResolver:(e,t)=>t.pmButton})(({theme:e})=>ue({},Goe(e,"pm"),{position:"absolute",right:8})),r9=oe(ct,{name:"MuiClock",slot:"meridiemText",overridesResolver:(e,t)=>t.meridiemText})({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});function Oit(e){const t=Zt({props:e,name:"MuiClock"}),{ampm:n,ampmInClock:r,autoFocus:o,children:i,value:a,handleMeridiemChange:s,isTimeDisabled:l,meridiemMode:c,minutesStep:u=1,onChange:d,selectedId:f,type:p,viewValue:m,disabled:g=!1,readOnly:v,className:w}=t,x=t,S=hn(),P=To(),T=y.useRef(!1),E=bit(x),O=l(m,p),k=!n&&p==="hours"&&(m<1||m>12),A=(H,U)=>{g||v||l(H,p)||d(H,U)},I=(H,U)=>{let{offsetX:q,offsetY:X}=H;if(q===void 0){const Z=H.target.getBoundingClientRect();q=H.changedTouches[0].clientX-Z.left,X=H.changedTouches[0].clientY-Z.top}const ae=p==="seconds"||p==="minutes"?ait(q,X,u):sit(q,X,!!n);A(ae,U)},R=H=>{T.current=!0,I(H,"shallow")},N=H=>{T.current&&(I(H,"finish"),T.current=!1)},L=H=>{H.buttons>0&&I(H.nativeEvent,"shallow")},j=H=>{T.current&&(T.current=!1),I(H.nativeEvent,"finish")},_=y.useMemo(()=>p==="hours"?!0:m%5===0,[p,m]),D=p==="minutes"?u:1,z=y.useRef(null);Uc(()=>{o&&z.current.focus()},[o]);const F=H=>{if(!T.current)switch(H.key){case"Home":A(0,"partial"),H.preventDefault();break;case"End":A(p==="minutes"?59:23,"partial"),H.preventDefault();break;case"ArrowUp":A(m+D,"partial"),H.preventDefault();break;case"ArrowDown":A(m-D,"partial"),H.preventDefault();break;case"PageUp":A(m+5,"partial"),H.preventDefault();break;case"PageDown":A(m-5,"partial"),H.preventDefault();break;case"Enter":case" ":A(m,"finish"),H.preventDefault();break}};return $.jsxs(wit,{className:de(E.root,w),children:[$.jsxs(xit,{className:E.clock,children:[$.jsx(Cit,{onTouchMove:R,onTouchStart:R,onTouchEnd:N,onMouseUp:j,onMouseMove:L,ownerState:{disabled:g},className:E.squareMask}),!O&&$.jsxs(y.Fragment,{children:[$.jsx(Pit,{className:E.pin}),a!=null&&$.jsx(pit,{type:p,viewValue:m,isInner:k,hasSelected:_})]}),$.jsx(Sit,{"aria-activedescendant":f,"aria-label":P.clockLabelText(p,a,S,a==null?null:S.format(a,"fullTime")),ref:z,role:"listbox",onKeyDown:F,tabIndex:0,className:E.wrapper,children:i})]}),n&&r&&$.jsxs(y.Fragment,{children:[$.jsx(Tit,{onClick:v?void 0:()=>s("am"),disabled:g||c===null,ownerState:x,className:E.amButton,title:Wl(S,"am"),children:$.jsx(r9,{variant:"caption",className:E.meridiemText,children:Wl(S,"am")})}),$.jsx(Eit,{disabled:g||c===null,onClick:v?void 0:()=>s("pm"),ownerState:x,className:E.pmButton,title:Wl(S,"pm"),children:$.jsx(r9,{variant:"caption",className:E.meridiemText,children:Wl(S,"pm")})})]})]})}function Iit(e){return Fn("MuiClockNumber",e)}const eP=Un("MuiClockNumber",["root","selected","disabled"]),kit=["className","disabled","index","inner","label","selected"],Mit=e=>{const{classes:t,selected:n,disabled:r}=e;return Dn({root:["root",n&&"selected",r&&"disabled"]},Iit,t)},Ait=oe("span",{name:"MuiClockNumber",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${eP.disabled}`]:t.disabled},{[`&.${eP.selected}`]:t.selected}]})(({theme:e})=>({height:_u,width:_u,position:"absolute",left:`calc((100% - ${_u}px) / 2)`,display:"inline-flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",color:(e.vars||e).palette.text.primary,fontFamily:e.typography.fontFamily,"&:focused":{backgroundColor:(e.vars||e).palette.background.paper},[`&.${eP.selected}`]:{color:(e.vars||e).palette.primary.contrastText},[`&.${eP.disabled}`]:{pointerEvents:"none",color:(e.vars||e).palette.text.disabled},variants:[{props:{inner:!0},style:ue({},e.typography.body2,{color:(e.vars||e).palette.text.secondary})}]}));function qoe(e){const t=Zt({props:e,name:"MuiClockNumber"}),{className:n,disabled:r,index:o,inner:i,label:a,selected:s}=t,l=_t(t,kit),c=t,u=Mit(c),d=o%12/12*Math.PI*2-Math.PI/2,f=(Cv-_u-2)/2*(i?.65:1),p=Math.round(Math.cos(d)*f),m=Math.round(Math.sin(d)*f);return $.jsx(Ait,ue({className:de(u.root,n),"aria-disabled":r?!0:void 0,"aria-selected":s?!0:void 0,role:"option",style:{transform:`translate(${p}px, ${m+(Cv-_u)/2}px`},ownerState:c},l,{children:a}))}const $it=({ampm:e,value:t,getClockNumberText:n,isDisabled:r,selectedId:o,utils:i})=>{const a=t?i.getHours(t):null,s=[],l=e?1:0,c=e?12:23,u=d=>a===null?!1:e?d===12?a===12||a===0:a===d||a-12===d:a===d;for(let d=l;d<=c;d+=1){let f=d.toString();d===0&&(f="00");const p=!e&&(d===0||d>12);f=i.formatNumber(f);const m=u(d);s.push($.jsx(qoe,{id:m?o:void 0,index:d,inner:p,selected:m,disabled:r(d),label:f,"aria-label":n(f)},d))}return s},o9=({utils:e,value:t,isDisabled:n,getClockNumberText:r,selectedId:o})=>{const i=e.formatNumber;return[[5,i("05")],[10,i("10")],[15,i("15")],[20,i("20")],[25,i("25")],[30,i("30")],[35,i("35")],[40,i("40")],[45,i("45")],[50,i("50")],[55,i("55")],[0,i("00")]].map(([a,s],l)=>{const c=a===t;return $.jsx(qoe,{label:s,id:c?o:void 0,index:l+1,inner:!1,disabled:n(a),selected:c,"aria-label":r(s)},a)})},TB=({timezone:e,value:t,defaultValue:n,onChange:r,valueManager:o})=>{const i=hn(),a=y.useRef(n),s=t??a.current??o.emptyValue,l=y.useMemo(()=>o.getTimezone(i,s),[i,o,s]),c=Ct(p=>l==null?p:o.setTimezone(i,l,p)),u=e??l??"default",d=y.useMemo(()=>o.setTimezone(i,u,s),[o,i,u,s]),f=Ct((p,...m)=>{const g=c(p);r==null||r(g,...m)});return{value:d,handleValueChange:f,timezone:u}},pb=({name:e,timezone:t,value:n,defaultValue:r,onChange:o,valueManager:i})=>{const[a,s]=Dh({name:e,state:"value",controlled:n,default:r??i.emptyValue}),l=Ct((c,...u)=>{s(c),o==null||o(c,...u)});return TB({timezone:t,value:a,defaultValue:void 0,onChange:l,valueManager:i})},Vl={year:1,month:2,day:3,hours:4,minutes:5,seconds:6,milliseconds:7},Rit=e=>Math.max(...e.map(t=>Vl[t.type]??1)),x0=(e,t,n)=>{if(t===Vl.year)return e.startOfYear(n);if(t===Vl.month)return e.startOfMonth(n);if(t===Vl.day)return e.startOfDay(n);let r=n;return t{let i=o?o():x0(t,n,PB(t,r));e.minDate!=null&&t.isAfterDay(e.minDate,i)&&(i=x0(t,n,e.minDate)),e.maxDate!=null&&t.isBeforeDay(e.maxDate,i)&&(i=x0(t,n,e.maxDate));const a=XS(e.disableIgnoringDatePartForTimeValidation??!1,t);return e.minTime!=null&&a(e.minTime,i)&&(i=x0(t,n,e.disableIgnoringDatePartForTimeValidation?e.minTime:tO(t,i,e.minTime))),e.maxTime!=null&&a(i,e.maxTime)&&(i=x0(t,n,e.disableIgnoringDatePartForTimeValidation?e.maxTime:tO(t,i,e.maxTime))),i},Koe=(e,t)=>{const n=e.formatTokenMap[t];if(n==null)throw new Error([`MUI X: The token "${t}" 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(` +`));return typeof n=="string"?{type:n,contentType:n==="meridiem"?"letter":"digit",maxLength:void 0}:{type:n.sectionType,contentType:n.contentType,maxLength:n.maxLength}},Dit=e=>{switch(e){case"ArrowUp":return 1;case"ArrowDown":return-1;case"PageUp":return 5;case"PageDown":return-5;default:return 0}},Bk=(e,t)=>{const n=[],r=e.date(void 0,"default"),o=e.startOfWeek(r),i=e.endOfWeek(r);let a=o;for(;e.isBefore(a,i);)n.push(a),a=e.addDays(a,1);return n.map(s=>e.formatByString(s,t))},Yoe=(e,t,n,r)=>{switch(n){case"month":return CB(e,e.date(void 0,t)).map(o=>e.formatByString(o,r));case"weekDay":return Bk(e,r);case"meridiem":{const o=e.date(void 0,t);return[e.startOfDay(o),e.endOfDay(o)].map(i=>e.formatByString(i,r))}default:return[]}},i9="s",Nit=["0","1","2","3","4","5","6","7","8","9"],Lit=e=>{const t=e.date(void 0);return e.formatByString(e.setSeconds(t,0),i9)==="0"?Nit:Array.from({length:10}).map((r,o)=>e.formatByString(e.setSeconds(t,o),i9))},Nh=(e,t)=>{if(t[0]==="0")return e;const n=[];let r="";for(let o=0;o-1&&(n.push(i.toString()),r="")}return n.join("")},EB=(e,t)=>t[0]==="0"?e:e.split("").map(n=>t[Number(n)]).join(""),a9=(e,t)=>{const n=Nh(e,t);return n!==" "&&!Number.isNaN(Number(n))},Xoe=(e,t)=>{let n=e;for(n=Number(n).toString();n.length{if(o.type==="day"&&o.contentType==="digit-with-letter"){const a=e.setDate(n.longestMonth,t);return e.formatByString(a,o.format)}let i=t.toString();return o.hasLeadingZerosInInput&&(i=Xoe(i,o.maxLength)),EB(i,r)},Fit=(e,t,n,r,o,i,a,s)=>{const l=Dit(r),c=r==="Home",u=r==="End",d=n.value===""||c||u,f=()=>{const m=o[n.type]({currentDate:a,format:n.format,contentType:n.contentType}),g=S=>Qoe(e,S,m,i,n),v=n.type==="minutes"&&(s!=null&&s.minutesStep)?s.minutesStep:1;let x=parseInt(Nh(n.value,i),10)+l*v;if(d){if(n.type==="year"&&!u&&!c)return e.formatByString(e.date(void 0,t),n.format);l>0||c?x=m.minimum:x=m.maximum}return x%v!==0&&((l<0||c)&&(x+=v-(v+x)%v),(l>0||u)&&(x-=x%v)),x>m.maximum?g(m.minimum+(x-m.maximum-1)%(m.maximum-m.minimum+1)):x{const m=Yoe(e,t,n.type,n.format);if(m.length===0)return n.value;if(d)return l>0||c?m[0]:m[m.length-1];const w=((m.indexOf(n.value)+l)%m.length+m.length)%m.length;return m[w]};return n.contentType==="digit"||n.contentType==="digit-with-letter"?f():p()},OB=(e,t,n)=>{let r=e.value||e.placeholder;const o=t==="non-input"?e.hasLeadingZerosInFormat:e.hasLeadingZerosInInput;return t==="non-input"&&e.hasLeadingZerosInInput&&!e.hasLeadingZerosInFormat&&(r=Number(Nh(r,n)).toString()),["input-rtl","input-ltr"].includes(t)&&e.contentType==="digit"&&!o&&r.length===1&&(r=`${r}‎`),t==="input-rtl"&&(r=`⁨${r}⁩`),r},s9=(e,t,n,r)=>e.formatByString(e.parse(t,n),r),Joe=(e,t)=>e.formatByString(e.date(void 0,"system"),t).length===4,Zoe=(e,t,n,r)=>{if(t!=="digit")return!1;const o=e.date(void 0,"default");switch(n){case"year":return Joe(e,r)?e.formatByString(e.setYear(o,1),r)==="0001":e.formatByString(e.setYear(o,2001),r)==="01";case"month":return e.formatByString(e.startOfYear(o),r).length>1;case"day":return e.formatByString(e.startOfMonth(o),r).length>1;case"weekDay":return e.formatByString(e.startOfWeek(o),r).length>1;case"hours":return e.formatByString(e.setHours(o,1),r).length>1;case"minutes":return e.formatByString(e.setMinutes(o,1),r).length>1;case"seconds":return e.formatByString(e.setSeconds(o,1),r).length>1;default:throw new Error("Invalid section type")}},jit=(e,t,n)=>{const r=t.some(l=>l.type==="day"),o=[],i=[];for(let l=0;le.map(t=>`${t.startSeparator}${t.value||t.placeholder}${t.endSeparator}`).join(""),zit=(e,t,n)=>{const o=e.map(i=>{const a=OB(i,n?"input-rtl":"input-ltr",t);return`${i.startSeparator}${a}${i.endSeparator}`}).join("");return n?`⁦${o}⁩`:o},Vit=(e,t,n)=>{const r=e.date(void 0,n),o=e.endOfYear(r),i=e.endOfDay(r),{maxDaysInMonth:a,longestMonth:s}=CB(e,r).reduce((l,c)=>{const u=e.getDaysInMonth(c);return u>l.maxDaysInMonth?{maxDaysInMonth:u,longestMonth:c}:l},{maxDaysInMonth:0,longestMonth:null});return{year:({format:l})=>({minimum:0,maximum:Joe(e,l)?9999:99}),month:()=>({minimum:1,maximum:e.getMonth(o)+1}),day:({currentDate:l})=>({minimum:1,maximum:l!=null&&e.isValid(l)?e.getDaysInMonth(l):a,longestMonth:s}),weekDay:({format:l,contentType:c})=>{if(c==="digit"){const u=Bk(e,l).map(Number);return{minimum:Math.min(...u),maximum:Math.max(...u)}}return{minimum:1,maximum:7}},hours:({format:l})=>{const c=e.getHours(i);return Nh(e.formatByString(e.endOfDay(r),l),t)!==c.toString()?{minimum:1,maximum:Number(Nh(e.formatByString(e.startOfDay(r),l),t))}:{minimum:0,maximum:c}},minutes:()=>({minimum:0,maximum:e.getMinutes(i)}),seconds:()=>({minimum:0,maximum:e.getSeconds(i)}),meridiem:()=>({minimum:0,maximum:1}),empty:()=>({minimum:0,maximum:0})}},Hit=(e,t,n,r)=>{switch(t.type){case"year":return e.setYear(r,e.getYear(n));case"month":return e.setMonth(r,e.getMonth(n));case"weekDay":{const o=Bk(e,t.format),i=e.formatByString(n,t.format),a=o.indexOf(i),l=o.indexOf(t.value)-a;return e.addDays(n,l)}case"day":return e.setDate(r,e.getDate(n));case"meridiem":{const o=e.getHours(n)<12,i=e.getHours(r);return o&&i>=12?e.addHours(r,-12):!o&&i<12?e.addHours(r,12):r}case"hours":return e.setHours(r,e.getHours(n));case"minutes":return e.setMinutes(r,e.getMinutes(n));case"seconds":return e.setSeconds(r,e.getSeconds(n));default:return r}},l9={year:1,month:2,day:3,weekDay:4,hours:5,minutes:6,seconds:7,meridiem:8,empty:9},c9=(e,t,n,r,o)=>[...n].sort((i,a)=>l9[i.type]-l9[a.type]).reduce((i,a)=>!o||a.modified?Hit(e,a,t,i):i,r),Uit=()=>navigator.userAgent.toLowerCase().includes("android"),Wit=(e,t)=>{const n={};if(!t)return e.forEach((l,c)=>{const u=c===0?null:c-1,d=c===e.length-1?null:c+1;n[c]={leftIndex:u,rightIndex:d}}),{neighbors:n,startIndex:0,endIndex:e.length-1};const r={},o={};let i=0,a=0,s=e.length-1;for(;s>=0;){a=e.findIndex((l,c)=>{var u;return c>=i&&((u=l.endSeparator)==null?void 0:u.includes(" "))&&l.endSeparator!==" / "}),a===-1&&(a=e.length-1);for(let l=a;l>=i;l-=1)o[l]=s,r[s]=l,s-=1;i=a+1}return e.forEach((l,c)=>{const u=o[c],d=u===0?null:r[u-1],f=u===e.length-1?null:r[u+1];n[c]={leftIndex:d,rightIndex:f}}),{neighbors:n,startIndex:r[0],endIndex:r[e.length-1]}},mN=(e,t)=>e==null?null:e==="all"?"all":typeof e=="string"?t.findIndex(n=>n.type===e):e,Git=(e,t)=>{if(e.value)switch(e.type){case"month":{if(e.contentType==="digit")return t.format(t.setMonth(t.date(),Number(e.value)-1),"month");const n=t.parse(e.value,e.format);return n?t.format(n,"month"):void 0}case"day":return e.contentType==="digit"?t.format(t.setDate(t.startOfYear(t.date()),Number(e.value)),"dayOfMonthFull"):e.value;case"weekDay":return;default:return}},qit=(e,t)=>{if(e.value)switch(e.type){case"weekDay":return e.contentType==="letter"?void 0:Number(e.value);case"meridiem":{const n=t.parse(`01:00 ${e.value}`,`${t.formats.hours12h}:${t.formats.minutes} ${e.format}`);return n?t.getHours(n)>=12?1:0:void 0}case"day":return e.contentType==="digit-with-letter"?parseInt(e.value,10):Number(e.value);case"month":{if(e.contentType==="digit")return Number(e.value);const n=t.parse(e.value,e.format);return n?t.getMonth(n)+1:void 0}default:return e.contentType!=="letter"?Number(e.value):void 0}},Kit=["value","referenceDate"],ro={emptyValue:null,getTodayValue:PB,getInitialReferenceValue:e=>{let{value:t,referenceDate:n}=e,r=_t(e,Kit);return t!=null&&r.utils.isValid(t)?t:n??_it(r)},cleanValue:mit,areValuesEqual:git,isSameError:(e,t)=>e===t,hasError:e=>e!=null,defaultErrorState:null,getTimezone:(e,t)=>t==null||!e.isValid(t)?null:e.getTimezone(t),setTimezone:(e,t,n)=>n==null?null:e.setTimezone(n,t)},IB={updateReferenceValue:(e,t,n)=>t==null||!e.isValid(t)?n:t,getSectionsFromValue:(e,t,n,r)=>!e.isValid(t)&&!!n?n:r(t),getV7HiddenInputValueFromSections:Bit,getV6InputValueFromSections:zit,getActiveDateManager:(e,t)=>({date:t.value,referenceDate:t.referenceValue,getSections:n=>n,getNewValuesFromNewActiveDate:n=>({value:n,referenceValue:n==null||!e.isValid(n)?t.referenceValue:n})}),parseValueStr:(e,t,n)=>n(e.trim(),t)},kB=({value:e,referenceDate:t,utils:n,props:r,timezone:o})=>{const i=y.useMemo(()=>ro.getInitialReferenceValue({value:e,utils:n,props:r,referenceDate:t,granularity:Vl.day,timezone:o,getTodayDate:()=>PB(n,o,"date")}),[]);return e??i},Yit=["ampm","ampmInClock","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","showViewSwitcher","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","timezone"],Xit=e=>{const{classes:t}=e;return Dn({root:["root"],arrowSwitcher:["arrowSwitcher"]},nit,t)},Qit=oe(jk,{name:"MuiTimeClock",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",position:"relative"}),Jit=oe(zoe,{name:"MuiTimeClock",slot:"ArrowSwitcher",overridesResolver:(e,t)=>t.arrowSwitcher})({position:"absolute",right:12,top:15}),Zit=["hours","minutes"],eat=y.forwardRef(function(t,n){const r=hn(),o=Zt({props:t,name:"MuiTimeClock"}),{ampm:i=r.is12HourCycleInCurrentLocale(),ampmInClock:a=!1,autoFocus:s,slots:l,slotProps:c,value:u,defaultValue:d,referenceDate:f,disableIgnoringDatePartForTimeValidation:p=!1,maxTime:m,minTime:g,disableFuture:v,disablePast:w,minutesStep:x=1,shouldDisableTime:S,showViewSwitcher:P,onChange:T,view:E,views:O=Zit,openTo:k,onViewChange:A,focusedView:I,onFocusedViewChange:R,className:N,disabled:L,readOnly:j,timezone:_}=o,D=_t(o,Yit),{value:z,handleValueChange:F,timezone:H}=pb({name:"TimeClock",timezone:_,value:u,defaultValue:d,onChange:T,valueManager:ro}),U=kB({value:z,referenceDate:f,utils:r,props:o,timezone:H}),q=To(),X=nm(H),{view:ae,setView:Z,previousView:K,nextView:te,setValueAndGoToNextView:pe}=QS({view:E,views:O,openTo:k,onViewChange:A,onChange:F,focusedView:I,onFocusedViewChange:R}),{meridiemMode:ie,handleMeridiemChange:le}=Dk(U,i,pe),re=y.useCallback((we,ge)=>{const Se=XS(p,r),xe=ge==="hours"||ge==="minutes"&&O.includes("seconds"),Ie=({start:_e,end:ye})=>!(g&&Se(g,ye)||m&&Se(_e,m)||v&&Se(_e,X)||w&&Se(X,xe?ye:_e)),Re=(_e,ye=1)=>{if(_e%ye!==0)return!1;if(S)switch(ge){case"hours":return!S(r.setHours(U,_e),"hours");case"minutes":return!S(r.setMinutes(U,_e),"minutes");case"seconds":return!S(r.setSeconds(U,_e),"seconds");default:return!1}return!0};switch(ge){case"hours":{const _e=zx(we,ie,i),ye=r.setHours(U,_e),Te=r.setSeconds(r.setMinutes(ye,0),0),Oe=r.setSeconds(r.setMinutes(ye,59),59);return!Ie({start:Te,end:Oe})||!Re(_e)}case"minutes":{const _e=r.setMinutes(U,we),ye=r.setSeconds(_e,0),Te=r.setSeconds(_e,59);return!Ie({start:ye,end:Te})||!Re(we,x)}case"seconds":{const _e=r.setSeconds(U,we);return!Ie({start:_e,end:_e})||!Re(we)}default:throw new Error("not supported")}},[i,U,p,m,ie,g,x,S,r,v,w,X,O]),fe=db(),ee=y.useMemo(()=>{switch(ae){case"hours":{const we=(ge,Se)=>{const xe=zx(ge,ie,i);pe(r.setHours(U,xe),Se,"hours")};return{onChange:we,viewValue:r.getHours(U),children:$it({value:z,utils:r,ampm:i,onChange:we,getClockNumberText:q.hoursClockNumberText,isDisabled:ge=>L||re(ge,"hours"),selectedId:fe})}}case"minutes":{const we=r.getMinutes(U),ge=(Se,xe)=>{pe(r.setMinutes(U,Se),xe,"minutes")};return{viewValue:we,onChange:ge,children:o9({utils:r,value:we,onChange:ge,getClockNumberText:q.minutesClockNumberText,isDisabled:Se=>L||re(Se,"minutes"),selectedId:fe})}}case"seconds":{const we=r.getSeconds(U),ge=(Se,xe)=>{pe(r.setSeconds(U,Se),xe,"seconds")};return{viewValue:we,onChange:ge,children:o9({utils:r,value:we,onChange:ge,getClockNumberText:q.secondsClockNumberText,isDisabled:Se=>L||re(Se,"seconds"),selectedId:fe})}}default:throw new Error("You must provide the type for ClockView")}},[ae,r,z,i,q.hoursClockNumberText,q.minutesClockNumberText,q.secondsClockNumberText,ie,pe,U,re,fe,L]),ce=o,me=Xit(ce);return $.jsxs(Qit,ue({ref:n,className:de(me.root,N),ownerState:ce},D,{children:[$.jsx(Oit,ue({autoFocus:s??!!I,ampmInClock:a&&O.includes("hours"),value:z,type:ae,ampm:i,minutesStep:x,isTimeDisabled:re,meridiemMode:ie,handleMeridiemChange:le,selectedId:fe,disabled:L,readOnly:j},ee)),P&&$.jsx(Jit,{className:me.arrowSwitcher,slots:l,slotProps:c,onGoToPrevious:()=>Z(K),isPreviousDisabled:!K,previousLabel:q.openPreviousView,onGoToNext:()=>Z(te),isNextDisabled:!te,nextLabel:q.openNextView,ownerState:ce})]}))});function tat(e){return Fn("MuiDigitalClock",e)}const nat=Un("MuiDigitalClock",["root","list","item"]);function pg(e,t){return Array.isArray(t)?t.every(n=>e.indexOf(n)!==-1):e.indexOf(t)!==-1}const rat=(e,t)=>n=>{(n.key==="Enter"||n.key===" ")&&(e(n),n.preventDefault(),n.stopPropagation())},ua=(e=document)=>{const t=e.activeElement;return t?t.shadowRoot?ua(t.shadowRoot):t:null},nO=e=>Array.from(e.children).indexOf(ua(document)),MB="@media (pointer: fine)",oat=["ampm","timeStep","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","views","skipDisabled","timezone"],iat=e=>{const{classes:t}=e;return Dn({root:["root"],list:["list"],item:["item"]},tat,t)},aat=oe(jk,{name:"MuiDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})({overflowY:"auto",width:"100%","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},maxHeight:Hoe,variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]}),sat=oe(kS,{name:"MuiDigitalClock",slot:"List",overridesResolver:(e,t)=>t.list})({padding:0}),lat=oe(Yt,{name:"MuiDigitalClock",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:"8px 16px",margin:"2px 4px","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.primary.main,e.palette.action.focusOpacity)}})),cat=y.forwardRef(function(t,n){const r=hn(),o=y.useRef(null),i=Qi(n,o),a=y.useRef(null),s=Zt({props:t,name:"MuiDigitalClock"}),{ampm:l=r.is12HourCycleInCurrentLocale(),timeStep:c=30,autoFocus:u,slots:d,slotProps:f,value:p,defaultValue:m,referenceDate:g,disableIgnoringDatePartForTimeValidation:v=!1,maxTime:w,minTime:x,disableFuture:S,disablePast:P,minutesStep:T=1,shouldDisableTime:E,onChange:O,view:k,openTo:A,onViewChange:I,focusedView:R,onFocusedViewChange:N,className:L,disabled:j,readOnly:_,views:D=["hours"],skipDisabled:z=!1,timezone:F}=s,H=_t(s,oat),{value:U,handleValueChange:q,timezone:X}=pb({name:"DigitalClock",timezone:F,value:p,defaultValue:m,onChange:O,valueManager:ro}),ae=To(),Z=nm(X),K=y.useMemo(()=>ue({},s,{alreadyRendered:!!o.current}),[s]),te=iat(K),pe=(d==null?void 0:d.digitalClockItem)??lat,ie=Vn({elementType:pe,externalSlotProps:f==null?void 0:f.digitalClockItem,ownerState:{},className:te.item}),le=kB({value:U,referenceDate:g,utils:r,props:s,timezone:X}),re=Ct(Se=>q(Se,"finish","hours")),{setValueAndGoToNextView:fe}=QS({view:k,views:D,openTo:A,onViewChange:I,onChange:re,focusedView:R,onFocusedViewChange:N}),ee=Ct(Se=>{fe(Se,"finish")});y.useEffect(()=>{if(o.current===null)return;const Se=o.current.querySelector('[role="listbox"] [role="option"][tabindex="0"], [role="listbox"] [role="option"][aria-selected="true"]');if(!Se)return;const xe=Se.offsetTop;(u||R)&&Se.focus(),o.current.scrollTop=xe-4});const ce=y.useCallback(Se=>{const xe=XS(v,r),Ie=()=>!(x&&xe(x,Se)||w&&xe(Se,w)||S&&xe(Se,Z)||P&&xe(Z,Se)),Re=()=>r.getMinutes(Se)%T!==0?!1:E?!E(Se,"hours"):!0;return!Ie()||!Re()},[v,r,x,w,S,Z,P,T,E]),me=y.useMemo(()=>{const Se=[];let Ie=r.startOfDay(le);for(;r.isSameDay(le,Ie);)Se.push(Ie),Ie=r.addMinutes(Ie,c);return Se},[le,c,r]),we=me.findIndex(Se=>r.isEqual(Se,le)),ge=Se=>{switch(Se.key){case"PageUp":{const xe=nO(a.current)-5,Ie=a.current.children,Re=Math.max(0,xe),_e=Ie[Re];_e&&_e.focus(),Se.preventDefault();break}case"PageDown":{const xe=nO(a.current)+5,Ie=a.current.children,Re=Math.min(Ie.length-1,xe),_e=Ie[Re];_e&&_e.focus(),Se.preventDefault();break}}};return $.jsx(aat,ue({ref:i,className:de(te.root,L),ownerState:K},H,{children:$.jsx(sat,{ref:a,role:"listbox","aria-label":ae.timePickerToolbarTitle,className:te.list,onKeyDown:ge,children:me.map((Se,xe)=>{if(z&&ce(Se))return null;const Ie=r.isEqual(Se,U),Re=r.format(Se,l?"fullTime12h":"fullTime24h"),_e=we===xe||we===-1&&xe===0?0:-1;return $.jsx(pe,ue({onClick:()=>!_&&ee(Se),selected:Ie,disabled:j||ce(Se),disableRipple:_,role:"option","aria-disabled":_,"aria-selected":Ie,tabIndex:_e},ie,{children:Re}),`${Se.valueOf()}-${Re}`)})})}))});function uat(e){return Fn("MuiMultiSectionDigitalClock",e)}const u9=Un("MuiMultiSectionDigitalClock",["root"]);function dat(e){return Fn("MuiMultiSectionDigitalClockSection",e)}const fat=Un("MuiMultiSectionDigitalClockSection",["root","item"]),pat=["autoFocus","onChange","className","disabled","readOnly","items","active","slots","slotProps","skipDisabled"],hat=e=>{const{classes:t}=e;return Dn({root:["root"],item:["item"]},dat,t)},mat=oe(kS,{name:"MuiMultiSectionDigitalClockSection",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({maxHeight:Hoe,width:56,padding:0,overflow:"hidden","@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"auto"},"@media (pointer: fine)":{"&:hover":{overflowY:"auto"}},"@media (pointer: none), (pointer: coarse)":{overflowY:"auto"},"&:not(:first-of-type)":{borderLeft:`1px solid ${(e.vars||e).palette.divider}`},"&::after":{display:"block",content:'""',height:"calc(100% - 40px - 6px)"},variants:[{props:{alreadyRendered:!0},style:{"@media (prefers-reduced-motion: no-preference)":{scrollBehavior:"smooth"}}}]})),gat=oe(Yt,{name:"MuiMultiSectionDigitalClockSection",slot:"Item",overridesResolver:(e,t)=>t.item})(({theme:e})=>({padding:8,margin:"2px 4px",width:G0,justifyContent:"center","&:first-of-type":{marginTop:4},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.primary.main,e.palette.action.hoverOpacity)},"&.Mui-selected":{backgroundColor:(e.vars||e).palette.primary.main,color:(e.vars||e).palette.primary.contrastText,"&:focus-visible, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}},"&.Mui-focusVisible":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.primary.main,e.palette.action.focusOpacity)}})),yat=y.forwardRef(function(t,n){const r=y.useRef(null),o=Qi(n,r),i=y.useRef(null),a=Zt({props:t,name:"MuiMultiSectionDigitalClockSection"}),{autoFocus:s,onChange:l,className:c,disabled:u,readOnly:d,items:f,active:p,slots:m,slotProps:g,skipDisabled:v}=a,w=_t(a,pat),x=y.useMemo(()=>ue({},a,{alreadyRendered:!!r.current}),[a]),S=hat(x),P=(m==null?void 0:m.digitalClockSectionItem)??gat;y.useEffect(()=>{if(r.current===null)return;const O=r.current.querySelector('[role="option"][tabindex="0"], [role="option"][aria-selected="true"]');if(p&&s&&O&&O.focus(),!O||i.current===O)return;i.current=O;const k=O.offsetTop;r.current.scrollTop=k-4});const T=f.findIndex(O=>O.isFocused(O.value)),E=O=>{switch(O.key){case"PageUp":{const k=nO(r.current)-5,A=r.current.children,I=Math.max(0,k),R=A[I];R&&R.focus(),O.preventDefault();break}case"PageDown":{const k=nO(r.current)+5,A=r.current.children,I=Math.min(A.length-1,k),R=A[I];R&&R.focus(),O.preventDefault();break}}};return $.jsx(mat,ue({ref:o,className:de(S.root,c),ownerState:x,autoFocusItem:s&&p,role:"listbox",onKeyDown:E},w,{children:f.map((O,k)=>{var L;const A=(L=O.isDisabled)==null?void 0:L.call(O,O.value),I=u||A;if(v&&I)return null;const R=O.isSelected(O.value),N=T===k||T===-1&&k===0?0:-1;return $.jsx(P,ue({onClick:()=>!d&&l(O.value),selected:R,disabled:I,disableRipple:d,role:"option","aria-disabled":d||I||void 0,"aria-label":O.ariaLabel,"aria-selected":R,tabIndex:N,className:S.item},g==null?void 0:g.digitalClockSectionItem,{children:O.label}),O.label)})}))}),vat=({now:e,value:t,utils:n,ampm:r,isDisabled:o,resolveAriaLabel:i,timeStep:a,valueOrReferenceDate:s})=>{const l=t?n.getHours(t):null,c=[],u=(p,m)=>{const g=m??l;return g===null?!1:r?p===12?g===12||g===0:g===p||g-12===p:g===p},d=p=>u(p,n.getHours(s)),f=r?11:23;for(let p=0;p<=f;p+=a){let m=n.format(n.setHours(e,p),r?"hours12h":"hours24h");const g=i(parseInt(m,10).toString());m=n.formatNumber(m),c.push({value:p,label:m,isSelected:u,isDisabled:o,isFocused:d,ariaLabel:g})}return c},d9=({value:e,utils:t,isDisabled:n,timeStep:r,resolveLabel:o,resolveAriaLabel:i,hasValue:a=!0})=>{const s=c=>e===null?!1:a&&e===c,l=c=>e===c;return[...Array.from({length:Math.ceil(60/r)},(c,u)=>{const d=r*u;return{value:d,label:t.formatNumber(o(d)),isDisabled:n,isSelected:s,isFocused:l,ariaLabel:i(d.toString())}})]},bat=["ampm","timeSteps","autoFocus","slots","slotProps","value","defaultValue","referenceDate","disableIgnoringDatePartForTimeValidation","maxTime","minTime","disableFuture","disablePast","minutesStep","shouldDisableTime","onChange","view","views","openTo","onViewChange","focusedView","onFocusedViewChange","className","disabled","readOnly","skipDisabled","timezone"],wat=e=>{const{classes:t}=e;return Dn({root:["root"]},uat,t)},xat=oe(jk,{name:"MuiMultiSectionDigitalClock",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"row",width:"100%",borderBottom:`1px solid ${(e.vars||e).palette.divider}`})),Sat=y.forwardRef(function(t,n){const r=hn(),o=nr(),i=Zt({props:t,name:"MuiMultiSectionDigitalClock"}),{ampm:a=r.is12HourCycleInCurrentLocale(),timeSteps:s,autoFocus:l,slots:c,slotProps:u,value:d,defaultValue:f,referenceDate:p,disableIgnoringDatePartForTimeValidation:m=!1,maxTime:g,minTime:v,disableFuture:w,disablePast:x,minutesStep:S=1,shouldDisableTime:P,onChange:T,view:E,views:O=["hours","minutes"],openTo:k,onViewChange:A,focusedView:I,onFocusedViewChange:R,className:N,disabled:L,readOnly:j,skipDisabled:_=!1,timezone:D}=i,z=_t(i,bat),{value:F,handleValueChange:H,timezone:U}=pb({name:"MultiSectionDigitalClock",timezone:D,value:d,defaultValue:f,onChange:T,valueManager:ro}),q=To(),X=nm(U),ae=y.useMemo(()=>ue({hours:1,minutes:5,seconds:5},s),[s]),Z=kB({value:F,referenceDate:p,utils:r,props:i,timezone:U}),K=Ct((Ie,Re,_e)=>H(Ie,Re,_e)),te=y.useMemo(()=>!a||!O.includes("hours")||O.includes("meridiem")?O:[...O,"meridiem"],[a,O]),{view:pe,setValueAndGoToNextView:ie,focusedView:le}=QS({view:E,views:te,openTo:k,onViewChange:A,onChange:K,focusedView:I,onFocusedViewChange:R}),re=Ct(Ie=>{ie(Ie,"finish","meridiem")}),{meridiemMode:fe,handleMeridiemChange:ee}=Dk(Z,a,re,"finish"),ce=y.useCallback((Ie,Re)=>{const _e=XS(m,r),ye=Re==="hours"||Re==="minutes"&&te.includes("seconds"),Te=({start:Me,end:We})=>!(v&&_e(v,We)||g&&_e(Me,g)||w&&_e(Me,X)||x&&_e(X,ye?We:Me)),Oe=(Me,We=1)=>{if(Me%We!==0)return!1;if(P)switch(Re){case"hours":return!P(r.setHours(Z,Me),"hours");case"minutes":return!P(r.setMinutes(Z,Me),"minutes");case"seconds":return!P(r.setSeconds(Z,Me),"seconds");default:return!1}return!0};switch(Re){case"hours":{const Me=zx(Ie,fe,a),We=r.setHours(Z,Me),Ve=r.setSeconds(r.setMinutes(We,0),0),Qe=r.setSeconds(r.setMinutes(We,59),59);return!Te({start:Ve,end:Qe})||!Oe(Me)}case"minutes":{const Me=r.setMinutes(Z,Ie),We=r.setSeconds(Me,0),Ve=r.setSeconds(Me,59);return!Te({start:We,end:Ve})||!Oe(Ie,S)}case"seconds":{const Me=r.setSeconds(Z,Ie);return!Te({start:Me,end:Me})||!Oe(Ie)}default:throw new Error("not supported")}},[a,Z,m,g,fe,v,S,P,r,w,x,X,te]),me=y.useCallback(Ie=>{switch(Ie){case"hours":return{onChange:Re=>{const _e=zx(Re,fe,a);ie(r.setHours(Z,_e),"finish","hours")},items:vat({now:X,value:F,ampm:a,utils:r,isDisabled:Re=>ce(Re,"hours"),timeStep:ae.hours,resolveAriaLabel:q.hoursClockNumberText,valueOrReferenceDate:Z})};case"minutes":return{onChange:Re=>{ie(r.setMinutes(Z,Re),"finish","minutes")},items:d9({value:r.getMinutes(Z),utils:r,isDisabled:Re=>ce(Re,"minutes"),resolveLabel:Re=>r.format(r.setMinutes(X,Re),"minutes"),timeStep:ae.minutes,hasValue:!!F,resolveAriaLabel:q.minutesClockNumberText})};case"seconds":return{onChange:Re=>{ie(r.setSeconds(Z,Re),"finish","seconds")},items:d9({value:r.getSeconds(Z),utils:r,isDisabled:Re=>ce(Re,"seconds"),resolveLabel:Re=>r.format(r.setSeconds(X,Re),"seconds"),timeStep:ae.seconds,hasValue:!!F,resolveAriaLabel:q.secondsClockNumberText})};case"meridiem":{const Re=Wl(r,"am"),_e=Wl(r,"pm");return{onChange:ee,items:[{value:"am",label:Re,isSelected:()=>!!F&&fe==="am",isFocused:()=>!!Z&&fe==="am",ariaLabel:Re},{value:"pm",label:_e,isSelected:()=>!!F&&fe==="pm",isFocused:()=>!!Z&&fe==="pm",ariaLabel:_e}]}}default:throw new Error(`Unknown view: ${Ie} found.`)}},[X,F,a,r,ae.hours,ae.minutes,ae.seconds,q.hoursClockNumberText,q.minutesClockNumberText,q.secondsClockNumberText,fe,ie,Z,ce,ee]),we=y.useMemo(()=>{if(!o)return te;const Ie=te.filter(Re=>Re!=="meridiem");return Ie.reverse(),te.includes("meridiem")&&Ie.push("meridiem"),Ie},[o,te]),ge=y.useMemo(()=>te.reduce((Ie,Re)=>ue({},Ie,{[Re]:me(Re)}),{}),[te,me]),Se=i,xe=wat(Se);return $.jsx(xat,ue({ref:n,className:de(xe.root,N),ownerState:Se,role:"group"},z,{children:we.map(Ie=>$.jsx(yat,{items:ge[Ie].items,onChange:ge[Ie].onChange,active:pe===Ie,autoFocus:l??le===Ie,disabled:L,readOnly:j,slots:c,slotProps:u,skipDisabled:_,"aria-label":q.selectViewText(Ie)},Ie))}))});function Cat(e){return Fn("MuiPickersDay",e)}const Tp=Un("MuiPickersDay",["root","dayWithMargin","dayOutsideMonth","hiddenDaySpacingFiller","today","selected","disabled"]),Pat=["autoFocus","className","day","disabled","disableHighlightToday","disableMargin","hidden","isAnimating","onClick","onDaySelect","onFocus","onBlur","onKeyDown","onMouseDown","onMouseEnter","outsideCurrentMonth","selected","showDaysOutsideCurrentMonth","children","today","isFirstVisibleCell","isLastVisibleCell"],Tat=e=>{const{selected:t,disableMargin:n,disableHighlightToday:r,today:o,disabled:i,outsideCurrentMonth:a,showDaysOutsideCurrentMonth:s,classes:l}=e,c=a&&!s;return Dn({root:["root",t&&!c&&"selected",i&&"disabled",!n&&"dayWithMargin",!r&&o&&"today",a&&s&&"dayOutsideMonth",c&&"hiddenDaySpacingFiller"],hiddenDaySpacingFiller:["hiddenDaySpacingFiller"]},Cat,l)},eie=({theme:e})=>ue({},e.typography.caption,{width:Vx,height:Vx,borderRadius:"50%",padding:0,backgroundColor:"transparent",transition:e.transitions.create("background-color",{duration:e.transitions.duration.short}),color:(e.vars||e).palette.text.primary,"@media (pointer: fine)":{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.primary.main,e.palette.action.hoverOpacity)}},"&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.primary.main,e.palette.action.focusOpacity),[`&.${Tp.selected}`]:{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Tp.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightMedium,"&:hover":{willChange:"background-color",backgroundColor:(e.vars||e).palette.primary.dark}},[`&.${Tp.disabled}:not(.${Tp.selected})`]:{color:(e.vars||e).palette.text.disabled},[`&.${Tp.disabled}&.${Tp.selected}`]:{opacity:.6},variants:[{props:{disableMargin:!1},style:{margin:`0 ${Nk}px`}},{props:{outsideCurrentMonth:!0,showDaysOutsideCurrentMonth:!0},style:{color:(e.vars||e).palette.text.secondary}},{props:{disableHighlightToday:!1,today:!0},style:{[`&:not(.${Tp.selected})`]:{border:`1px solid ${(e.vars||e).palette.text.secondary}`}}}]}),tie=(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableMargin&&t.dayWithMargin,!n.disableHighlightToday&&n.today&&t.today,!n.outsideCurrentMonth&&n.showDaysOutsideCurrentMonth&&t.dayOutsideMonth,n.outsideCurrentMonth&&!n.showDaysOutsideCurrentMonth&&t.hiddenDaySpacingFiller]},Eat=oe(Ki,{name:"MuiPickersDay",slot:"Root",overridesResolver:tie})(eie),Oat=oe("div",{name:"MuiPickersDay",slot:"Root",overridesResolver:tie})(({theme:e})=>ue({},eie({theme:e}),{opacity:0,pointerEvents:"none"})),S0=()=>{},Iat=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersDay"}),{autoFocus:o=!1,className:i,day:a,disabled:s=!1,disableHighlightToday:l=!1,disableMargin:c=!1,isAnimating:u,onClick:d,onDaySelect:f,onFocus:p=S0,onBlur:m=S0,onKeyDown:g=S0,onMouseDown:v=S0,onMouseEnter:w=S0,outsideCurrentMonth:x,selected:S=!1,showDaysOutsideCurrentMonth:P=!1,children:T,today:E=!1}=r,O=_t(r,Pat),k=ue({},r,{autoFocus:o,disabled:s,disableHighlightToday:l,disableMargin:c,selected:S,showDaysOutsideCurrentMonth:P,today:E}),A=Tat(k),I=hn(),R=y.useRef(null),N=Qi(R,n);Uc(()=>{o&&!s&&!u&&!x&&R.current.focus()},[o,s,u,x]);const L=_=>{v(_),x&&_.preventDefault()},j=_=>{s||f(a),x&&_.currentTarget.focus(),d&&d(_)};return x&&!P?$.jsx(Oat,{className:de(A.root,A.hiddenDaySpacingFiller,i),ownerState:k,role:O.role}):$.jsx(Eat,ue({className:de(A.root,i),ref:N,centerRipple:!0,disabled:s,tabIndex:S?0:-1,onKeyDown:_=>g(_,a),onFocus:_=>p(_,a),onBlur:_=>m(_,a),onMouseEnter:_=>w(_,a),onClick:j,onMouseDown:L},O,{ownerState:k,children:T||I.format(a,"dayOfMonth")}))}),kat=y.memo(Iat),hb=({props:e,value:t,timezone:n,adapter:r})=>{if(t===null)return null;const{shouldDisableDate:o,shouldDisableMonth:i,shouldDisableYear:a,disablePast:s,disableFuture:l}=e,c=r.utils.date(void 0,n),u=Ti(r.utils,e.minDate,r.defaultDates.minDate),d=Ti(r.utils,e.maxDate,r.defaultDates.maxDate);switch(!0){case!r.utils.isValid(t):return"invalidDate";case!!(o&&o(t)):return"shouldDisableDate";case!!(i&&i(t)):return"shouldDisableMonth";case!!(a&&a(t)):return"shouldDisableYear";case!!(l&&r.utils.isAfterDay(t,c)):return"disableFuture";case!!(s&&r.utils.isBeforeDay(t,c)):return"disablePast";case!!(u&&r.utils.isBeforeDay(t,u)):return"minDate";case!!(d&&r.utils.isAfterDay(t,d)):return"maxDate";default:return null}};hb.valueManager=ro;const JS=({adapter:e,value:t,timezone:n,props:r})=>{if(t===null)return null;const{minTime:o,maxTime:i,minutesStep:a,shouldDisableTime:s,disableIgnoringDatePartForTimeValidation:l=!1,disablePast:c,disableFuture:u}=r,d=e.utils.date(void 0,n),f=XS(l,e.utils);switch(!0){case!e.utils.isValid(t):return"invalidDate";case!!(o&&f(o,t)):return"minTime";case!!(i&&f(t,i)):return"maxTime";case!!(u&&e.utils.isAfter(t,d)):return"disableFuture";case!!(c&&e.utils.isBefore(t,d)):return"disablePast";case!!(s&&s(t,"hours")):return"shouldDisableTime-hours";case!!(s&&s(t,"minutes")):return"shouldDisableTime-minutes";case!!(s&&s(t,"seconds")):return"shouldDisableTime-seconds";case!!(a&&e.utils.getMinutes(t)%a!==0):return"minutesStep";default:return null}};JS.valueManager=ro;const zk=({adapter:e,value:t,timezone:n,props:r})=>{const o=hb({adapter:e,value:t,timezone:n,props:r});return o!==null?o:JS({adapter:e,value:t,timezone:n,props:r})};zk.valueManager=ro;const gN=["disablePast","disableFuture","minDate","maxDate","shouldDisableDate","shouldDisableMonth","shouldDisableYear"],yN=["disablePast","disableFuture","minTime","maxTime","shouldDisableTime","minutesStep","ampm","disableIgnoringDatePartForTimeValidation"],nie=["minDateTime","maxDateTime"],Mat=[...gN,...yN,...nie],mb=e=>Mat.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{});function rie(e){const{props:t,validator:n,value:r,timezone:o,onError:i}=e,a=em(),s=y.useRef(n.valueManager.defaultErrorState),l=n({adapter:a,value:r,timezone:o,props:t}),c=n.valueManager.hasError(l);y.useEffect(()=>{i&&!n.valueManager.isSameError(l,s.current)&&i(l,r),s.current=l},[n,i,l,r]);const u=Ct(d=>n({adapter:a,value:d,timezone:o,props:t}));return{validationError:l,hasValidationError:c,getValidationErrorForNewValue:u}}const Aat=({utils:e,format:t})=>{let n=10,r=t,o=e.expandFormat(t);for(;o!==r;)if(r=o,o=e.expandFormat(r),n-=1,n<0)throw new Error("MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.");return o},$at=({utils:e,expandedFormat:t})=>{const n=[],{start:r,end:o}=e.escapedCharacters,i=new RegExp(`(\\${r}[^\\${o}]*\\${o})+`,"g");let a=null;for(;a=i.exec(t);)n.push({start:a.index,end:i.lastIndex-1});return n},Rat=(e,t,n,r)=>{switch(n.type){case"year":return t.fieldYearPlaceholder({digitAmount:e.formatByString(e.date(void 0,"default"),r).length,format:r});case"month":return t.fieldMonthPlaceholder({contentType:n.contentType,format:r});case"day":return t.fieldDayPlaceholder({format:r});case"weekDay":return t.fieldWeekDayPlaceholder({contentType:n.contentType,format:r});case"hours":return t.fieldHoursPlaceholder({format:r});case"minutes":return t.fieldMinutesPlaceholder({format:r});case"seconds":return t.fieldSecondsPlaceholder({format:r});case"meridiem":return t.fieldMeridiemPlaceholder({format:r});default:return r}},_at=({utils:e,date:t,shouldRespectLeadingZeros:n,localeText:r,localizedDigits:o,now:i,token:a,startSeparator:s})=>{if(a==="")throw new Error("MUI X: Should not call `commitToken` with an empty token");const l=Koe(e,a),c=Zoe(e,l.contentType,l.type,a),u=n?c:l.contentType==="digit",d=t!=null&&e.isValid(t);let f=d?e.formatByString(t,a):"",p=null;if(u)if(c)p=f===""?e.formatByString(i,a).length:f.length;else{if(l.maxLength==null)throw new Error(`MUI X: The token ${a} should have a 'maxDigitNumber' property on it's adapter`);p=l.maxLength,d&&(f=EB(Xoe(Nh(f,o),p),o))}return ue({},l,{format:a,maxLength:p,value:f,placeholder:Rat(e,r,l,a),hasLeadingZerosInFormat:c,hasLeadingZerosInInput:u,startSeparator:s,endSeparator:"",modified:!1})},Dat=e=>{var p;const{utils:t,expandedFormat:n,escapedParts:r}=e,o=t.date(void 0),i=[];let a="";const s=Object.keys(t.formatTokenMap).sort((m,g)=>g.length-m.length),l=/^([a-zA-Z]+)/,c=new RegExp(`^(${s.join("|")})*$`),u=new RegExp(`^(${s.join("|")})`),d=m=>r.find(g=>g.start<=m&&g.end>=m);let f=0;for(;f0;){const x=u.exec(w)[1];w=w.slice(x.length),i.push(_at(ue({},e,{now:o,token:x,startSeparator:a}))),a=""}f+=v.length}else{const w=n[f];g&&(m==null?void 0:m.start)===f||(m==null?void 0:m.end)===f||(i.length===0?a+=w:i[i.length-1].endSeparator+=w),f+=1}}return i.length===0&&a.length>0&&i.push({type:"empty",contentType:"letter",maxLength:null,format:"",value:"",placeholder:"",hasLeadingZerosInFormat:!1,hasLeadingZerosInInput:!1,startSeparator:a,endSeparator:"",modified:!1}),i},Nat=({isRtl:e,formatDensity:t,sections:n})=>n.map(r=>{const o=i=>{let a=i;return e&&a!==null&&a.includes(" ")&&(a=`⁩${a}⁦`),t==="spacious"&&["/",".","-"].includes(a)&&(a=` ${a} `),a};return r.startSeparator=o(r.startSeparator),r.endSeparator=o(r.endSeparator),r}),f9=e=>{let t=Aat(e);e.isRtl&&e.enableAccessibleFieldDOMStructure&&(t=t.split(" ").reverse().join(" "));const n=$at(ue({},e,{expandedFormat:t})),r=Dat(ue({},e,{expandedFormat:t,escapedParts:n}));return Nat(ue({},e,{sections:r}))},Lat=e=>{const t=hn(),n=To(),r=em(),o=nr(),{valueManager:i,fieldValueManager:a,valueType:s,validator:l,internalProps:c,internalProps:{value:u,defaultValue:d,referenceDate:f,onChange:p,format:m,formatDensity:g="dense",selectedSections:v,onSelectedSectionsChange:w,shouldRespectLeadingZeros:x=!1,timezone:S,enableAccessibleFieldDOMStructure:P=!1}}=e,{timezone:T,value:E,handleValueChange:O}=TB({timezone:S,value:u,defaultValue:d,onChange:p,valueManager:i}),k=y.useMemo(()=>Lit(t),[t]),A=y.useMemo(()=>Vit(t,k,T),[t,k,T]),I=y.useCallback((K,te=null)=>a.getSectionsFromValue(t,K,te,pe=>f9({utils:t,localeText:n,localizedDigits:k,format:m,date:pe,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o})),[a,m,n,k,o,x,t,g,P]),[R,N]=y.useState(()=>{const K=I(E),te={sections:K,value:E,referenceValue:i.emptyValue,tempValueStrAndroid:null},pe=Rit(K),ie=i.getInitialReferenceValue({referenceDate:f,value:E,utils:t,props:c,granularity:pe,timezone:T});return ue({},te,{referenceValue:ie})}),[L,j]=Dh({controlled:v,default:null,name:"useField",state:"selectedSections"}),_=K=>{j(K),w==null||w(K)},D=y.useMemo(()=>mN(L,R.sections),[L,R.sections]),z=D==="all"?0:D,F=({value:K,referenceValue:te,sections:pe})=>{if(N(le=>ue({},le,{sections:pe,value:K,referenceValue:te,tempValueStrAndroid:null})),i.areValuesEqual(t,R.value,K))return;const ie={validationError:l({adapter:r,value:K,timezone:T,props:c})};O(K,ie)},H=(K,te)=>{const pe=[...R.sections];return pe[K]=ue({},pe[K],{value:te,modified:!0}),pe},U=()=>{F({value:i.emptyValue,referenceValue:R.referenceValue,sections:I(i.emptyValue)})},q=()=>{if(z==null)return;const K=R.sections[z],te=a.getActiveDateManager(t,R,K),ie=te.getSections(R.sections).filter(ee=>ee.value!=="").length===(K.value===""?0:1),le=H(z,""),re=ie?null:t.getInvalidDate(),fe=te.getNewValuesFromNewActiveDate(re);F(ue({},fe,{sections:le}))},X=K=>{const te=(le,re)=>{const fe=t.parse(le,m);if(fe==null||!t.isValid(fe))return null;const ee=f9({utils:t,localeText:n,localizedDigits:k,format:m,date:fe,formatDensity:g,shouldRespectLeadingZeros:x,enableAccessibleFieldDOMStructure:P,isRtl:o});return c9(t,fe,ee,re,!1)},pe=a.parseValueStr(K,R.referenceValue,te),ie=a.updateReferenceValue(t,pe,R.referenceValue);F({value:pe,referenceValue:ie,sections:I(pe,R.sections)})},ae=({activeSection:K,newSectionValue:te,shouldGoToNextSection:pe})=>{pe&&zue({},me,ee,{sections:le,tempValueStrAndroid:null}))},Z=K=>N(te=>ue({},te,{tempValueStrAndroid:K}));return y.useEffect(()=>{const K=I(R.value);N(te=>ue({},te,{sections:K}))},[m,t.locale,o]),y.useEffect(()=>{let K;i.areValuesEqual(t,R.value,E)?K=i.getTimezone(t,R.value)!==i.getTimezone(t,E):K=!0,K&&N(te=>ue({},te,{value:E,referenceValue:a.updateReferenceValue(t,E,te.referenceValue),sections:I(E)}))},[E]),{state:R,activeSectionIndex:z,parsedSelectedSections:D,setSelectedSections:_,clearValue:U,clearActiveSection:q,updateSectionValue:ae,updateValueFromValueStr:X,setTempAndroidValueStr:Z,getSectionsFromValue:I,sectionsValueBoundaries:A,localizedDigits:k,timezone:T}},Fat=5e3,Qm=e=>e.saveQuery!=null,jat=({sections:e,updateSectionValue:t,sectionsValueBoundaries:n,localizedDigits:r,setTempAndroidValueStr:o,timezone:i})=>{const a=hn(),[s,l]=y.useState(null),c=Ct(()=>l(null));y.useEffect(()=>{var m;s!=null&&((m=e[s.sectionIndex])==null?void 0:m.type)!==s.sectionType&&c()},[e,s,c]),y.useEffect(()=>{if(s!=null){const m=setTimeout(()=>c(),Fat);return()=>{clearTimeout(m)}}return()=>{}},[s,c]);const u=({keyPressed:m,sectionIndex:g},v,w)=>{const x=m.toLowerCase(),S=e[g];if(s!=null&&(!w||w(s.value))&&s.sectionIndex===g){const T=`${s.value}${x}`,E=v(T,S);if(!Qm(E))return l({sectionIndex:g,value:T,sectionType:S.type}),E}const P=v(x,S);return Qm(P)&&!P.saveQuery?(c(),null):(l({sectionIndex:g,value:x,sectionType:S.type}),Qm(P)?null:P)},d=m=>{const g=(x,S,P)=>{const T=S.filter(E=>E.toLowerCase().startsWith(P));return T.length===0?{saveQuery:!1}:{sectionValue:T[0],shouldGoToNextSection:T.length===1}},v=(x,S,P,T)=>{const E=O=>Yoe(a,i,S.type,O);if(S.contentType==="letter")return g(S.format,E(S.format),x);if(P&&T!=null&&Koe(a,P).contentType==="letter"){const O=E(P),k=g(P,O,x);return Qm(k)?{saveQuery:!1}:ue({},k,{sectionValue:T(k.sectionValue,O)})}return{saveQuery:!1}};return u(m,(x,S)=>{switch(S.type){case"month":{const P=T=>s9(a,T,a.formats.month,S.format);return v(x,S,a.formats.month,P)}case"weekDay":{const P=(T,E)=>E.indexOf(T).toString();return v(x,S,a.formats.weekday,P)}case"meridiem":return v(x,S);default:return{saveQuery:!1}}})},f=m=>{const g=(w,x)=>{const S=Nh(w,r),P=Number(S),T=n[x.type]({currentDate:null,format:x.format,contentType:x.contentType});if(P>T.maximum)return{saveQuery:!1};if(PT.maximum||S.length===T.maximum.toString().length;return{sectionValue:Qoe(a,P,T,r,x),shouldGoToNextSection:E}};return u(m,(w,x)=>{if(x.contentType==="digit"||x.contentType==="digit-with-letter")return g(w,x);if(x.type==="month"){const S=Zoe(a,"digit","month","MM"),P=g(w,{type:x.type,format:"MM",hasLeadingZerosInFormat:S,hasLeadingZerosInInput:!0,contentType:"digit",maxLength:2});if(Qm(P))return P;const T=s9(a,P.sectionValue,"MM",x.format);return ue({},P,{sectionValue:T})}if(x.type==="weekDay"){const S=g(w,x);if(Qm(S))return S;const P=Bk(a,x.format)[Number(S.sectionValue)-1];return ue({},S,{sectionValue:P})}return{saveQuery:!1}},w=>a9(w,r))};return{applyCharacterEditing:Ct(m=>{const g=e[m.sectionIndex],w=a9(m.keyPressed,r)?f(ue({},m,{keyPressed:EB(m.keyPressed,r)})):d(m);if(w==null){o(null);return}t({activeSection:g,newSectionValue:w.sectionValue,shouldGoToNextSection:w.shouldGoToNextSection})}),resetCharacterQuery:c}},Bat=e=>{const{internalProps:{disabled:t,readOnly:n=!1},forwardedProps:{sectionListRef:r,onBlur:o,onClick:i,onFocus:a,onInput:s,onPaste:l,focused:c,autoFocus:u=!1},fieldValueManager:d,applyCharacterEditing:f,resetCharacterQuery:p,setSelectedSections:m,parsedSelectedSections:g,state:v,clearActiveSection:w,clearValue:x,updateSectionValue:S,updateValueFromValueStr:P,sectionOrder:T,areAllSectionsEmpty:E,sectionsValueBoundaries:O}=e,k=y.useRef(null),A=Qi(r,k),I=To(),R=hn(),N=db(),[L,j]=y.useState(!1),_=y.useMemo(()=>({syncSelectionToDOM:()=>{if(!k.current)return;const ce=document.getSelection();if(!ce)return;if(g==null){ce.rangeCount>0&&k.current.getRoot().contains(ce.getRangeAt(0).startContainer)&&ce.removeAllRanges(),L&&k.current.getRoot().blur();return}if(!k.current.getRoot().contains(ua(document)))return;const me=new window.Range;let we;g==="all"?we=k.current.getRoot():v.sections[g].type==="empty"?we=k.current.getSectionContainer(g):we=k.current.getSectionContent(g),me.selectNodeContents(we),we.focus(),ce.removeAllRanges(),ce.addRange(me)},getActiveSectionIndexFromDOM:()=>{const ce=ua(document);return!ce||!k.current||!k.current.getRoot().contains(ce)?null:k.current.getSectionIndexFromDOMElement(ce)},focusField:(ce=0)=>{if(!k.current)return;const me=mN(ce,v.sections);j(!0),k.current.getSectionContent(me).focus()},setSelectedSections:ce=>{if(!k.current)return;const me=mN(ce,v.sections);j((me==="all"?0:me)!==null),m(ce)},isFieldFocused:()=>{const ce=ua(document);return!!k.current&&k.current.getRoot().contains(ce)}}),[g,m,v.sections,L]),D=Ct(ce=>{if(!k.current)return;const me=v.sections[ce];k.current.getSectionContent(ce).innerHTML=me.value||me.placeholder,_.syncSelectionToDOM()}),z=Ct((ce,...me)=>{ce.isDefaultPrevented()||!k.current||(j(!0),i==null||i(ce,...me),g==="all"?setTimeout(()=>{const we=document.getSelection().getRangeAt(0).startOffset;if(we===0){m(T.startIndex);return}let ge=0,Se=0;for(;Se{if(s==null||s(ce),!k.current||g!=="all")return;const we=ce.target.textContent??"";k.current.getRoot().innerHTML=v.sections.map(ge=>`${ge.startSeparator}${ge.value||ge.placeholder}${ge.endSeparator}`).join(""),_.syncSelectionToDOM(),we.length===0||we.charCodeAt(0)===10?(p(),x(),m("all")):we.length>1?P(we):f({keyPressed:we,sectionIndex:0})}),H=Ct(ce=>{if(l==null||l(ce),n||g!=="all"){ce.preventDefault();return}const me=ce.clipboardData.getData("text");ce.preventDefault(),p(),P(me)}),U=Ct((...ce)=>{if(a==null||a(...ce),L||!k.current)return;j(!0),k.current.getSectionIndexFromDOMElement(ua(document))!=null||m(T.startIndex)}),q=Ct((...ce)=>{o==null||o(...ce),setTimeout(()=>{if(!k.current)return;const me=ua(document);!k.current.getRoot().contains(me)&&(j(!1),m(null))})}),X=Ct(ce=>me=>{me.isDefaultPrevented()||m(ce)}),ae=Ct(ce=>{ce.preventDefault()}),Z=Ct(ce=>()=>{m(ce)}),K=Ct(ce=>{if(ce.preventDefault(),n||t||typeof g!="number")return;const me=v.sections[g],we=ce.clipboardData.getData("text"),ge=/^[a-zA-Z]+$/.test(we),Se=/^[0-9]+$/.test(we),xe=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(we);me.contentType==="letter"&&ge||me.contentType==="digit"&&Se||me.contentType==="digit-with-letter"&&xe?(p(),S({activeSection:me,newSectionValue:we,shouldGoToNextSection:!0})):!ge&&!Se&&(p(),P(we))}),te=Ct(ce=>{ce.preventDefault(),ce.dataTransfer.dropEffect="none"}),pe=Ct(ce=>{if(!k.current)return;const me=ce.target,we=me.textContent??"",ge=k.current.getSectionIndexFromDOMElement(me),Se=v.sections[ge];if(n||!k.current){D(ge);return}if(we.length===0){if(Se.value===""){D(ge);return}const xe=ce.nativeEvent.inputType;if(xe==="insertParagraph"||xe==="insertLineBreak"){D(ge);return}p(),w();return}f({keyPressed:we,sectionIndex:ge}),D(ge)});Uc(()=>{if(!(!L||!k.current)){if(g==="all")k.current.getRoot().focus();else if(typeof g=="number"){const ce=k.current.getSectionContent(g);ce&&ce.focus()}}},[g,L]);const ie=y.useMemo(()=>v.sections.reduce((ce,me)=>(ce[me.type]=O[me.type]({currentDate:null,contentType:me.contentType,format:me.format}),ce),{}),[O,v.sections]),le=g==="all",re=y.useMemo(()=>v.sections.map((ce,me)=>{const we=!le&&!t&&!n;return{container:{"data-sectionindex":me,onClick:X(me)},content:{tabIndex:le||me>0?-1:0,contentEditable:!le&&!t&&!n,role:"spinbutton",id:`${N}-${ce.type}`,"aria-labelledby":`${N}-${ce.type}`,"aria-readonly":n,"aria-valuenow":qit(ce,R),"aria-valuemin":ie[ce.type].minimum,"aria-valuemax":ie[ce.type].maximum,"aria-valuetext":ce.value?Git(ce,R):I.empty,"aria-label":I[ce.type],"aria-disabled":t,spellCheck:we?!1:void 0,autoCapitalize:we?"off":void 0,autoCorrect:we?"off":void 0,[parseInt(y.version,10)>=17?"enterKeyHint":"enterkeyhint"]:we?"next":void 0,children:ce.value||ce.placeholder,onInput:pe,onPaste:K,onFocus:Z(me),onDragOver:te,onMouseUp:ae,inputMode:ce.contentType==="letter"?"text":"numeric"},before:{children:ce.startSeparator},after:{children:ce.endSeparator}}}),[v.sections,Z,K,te,pe,X,ae,t,n,le,I,R,ie,N]),fe=Ct(ce=>{P(ce.target.value)}),ee=y.useMemo(()=>E?"":d.getV7HiddenInputValueFromSections(v.sections),[E,v.sections,d]);return y.useEffect(()=>{if(k.current==null)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(` +`));u&&k.current&&k.current.getSectionContent(T.startIndex).focus()},[]),{interactions:_,returnedValue:{autoFocus:u,readOnly:n,focused:c??L,sectionListRef:A,onBlur:q,onClick:z,onFocus:U,onInput:F,onPaste:H,enableAccessibleFieldDOMStructure:!0,elements:re,tabIndex:g===0?-1:0,contentEditable:le,value:ee,onChange:fe,areAllSectionsEmpty:E}}},jg=e=>e.replace(/[\u2066\u2067\u2068\u2069]/g,""),zat=(e,t,n)=>{let r=0,o=n?1:0;const i=[];for(let a=0;a{const t=nr(),n=y.useRef(),r=y.useRef(),{forwardedProps:{onFocus:o,onClick:i,onPaste:a,onBlur:s,inputRef:l,placeholder:c},internalProps:{readOnly:u=!1,disabled:d=!1},parsedSelectedSections:f,activeSectionIndex:p,state:m,fieldValueManager:g,valueManager:v,applyCharacterEditing:w,resetCharacterQuery:x,updateSectionValue:S,updateValueFromValueStr:P,clearActiveSection:T,clearValue:E,setTempAndroidValueStr:O,setSelectedSections:k,getSectionsFromValue:A,areAllSectionsEmpty:I,localizedDigits:R}=e,N=y.useRef(null),L=Qi(l,N),j=y.useMemo(()=>zat(m.sections,R,t),[m.sections,R,t]),_=y.useMemo(()=>({syncSelectionToDOM:()=>{if(!N.current)return;if(f==null){N.current.scrollLeft&&(N.current.scrollLeft=0);return}if(N.current!==ua(document))return;const pe=N.current.scrollTop;if(f==="all")N.current.select();else{const ie=j[f],le=ie.type==="empty"?ie.startInInput-ie.startSeparator.length:ie.startInInput,re=ie.type==="empty"?ie.endInInput+ie.endSeparator.length:ie.endInInput;(le!==N.current.selectionStart||re!==N.current.selectionEnd)&&N.current===ua(document)&&N.current.setSelectionRange(le,re),clearTimeout(r.current),r.current=setTimeout(()=>{N.current&&N.current===ua(document)&&N.current.selectionStart===N.current.selectionEnd&&(N.current.selectionStart!==le||N.current.selectionEnd!==re)&&_.syncSelectionToDOM()})}N.current.scrollTop=pe},getActiveSectionIndexFromDOM:()=>{const pe=N.current.selectionStart??0,ie=N.current.selectionEnd??0;if(pe===0&&ie===0)return null;const le=pe<=j[0].startInInput?1:j.findIndex(re=>re.startInInput-re.startSeparator.length>pe);return le===-1?j.length-1:le-1},focusField:(pe=0)=>{var ie;(ie=N.current)==null||ie.focus(),k(pe)},setSelectedSections:pe=>k(pe),isFieldFocused:()=>N.current===ua(document)}),[N,f,j,k]),D=()=>{const pe=N.current.selectionStart??0;let ie;pe<=j[0].startInInput||pe>=j[j.length-1].endInInput?ie=1:ie=j.findIndex(re=>re.startInInput-re.startSeparator.length>pe);const le=ie===-1?j.length-1:ie-1;k(le)},z=Ct((...pe)=>{o==null||o(...pe);const ie=N.current;clearTimeout(n.current),n.current=setTimeout(()=>{!ie||ie!==N.current||p==null&&(ie.value.length&&Number(ie.selectionEnd)-Number(ie.selectionStart)===ie.value.length?k("all"):D())})}),F=Ct((pe,...ie)=>{pe.isDefaultPrevented()||(i==null||i(pe,...ie),D())}),H=Ct(pe=>{if(a==null||a(pe),pe.preventDefault(),u||d)return;const ie=pe.clipboardData.getData("text");if(typeof f=="number"){const le=m.sections[f],re=/^[a-zA-Z]+$/.test(ie),fe=/^[0-9]+$/.test(ie),ee=/^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(ie);if(le.contentType==="letter"&&re||le.contentType==="digit"&&fe||le.contentType==="digit-with-letter"&&ee){x(),S({activeSection:le,newSectionValue:ie,shouldGoToNextSection:!0});return}if(re||fe)return}x(),P(ie)}),U=Ct((...pe)=>{s==null||s(...pe),k(null)}),q=Ct(pe=>{if(u)return;const ie=pe.target.value;if(ie===""){x(),E();return}const le=pe.nativeEvent.data,re=le&&le.length>1,fe=re?le:ie,ee=jg(fe);if(p==null||re){P(re?le:ee);return}let ce;if(f==="all"&&ee.length===1)ce=ee;else{const me=jg(g.getV6InputValueFromSections(j,R,t));let we=-1,ge=-1;for(let Re=0;ReSe.end)return;const Ie=ee.length-me.length+Se.end-jg(Se.endSeparator||"").length;ce=ee.slice(Se.start+jg(Se.startSeparator||"").length,Ie)}if(ce.length===0){Uit()&&O(fe),x(),T();return}w({keyPressed:ce,sectionIndex:p})}),X=y.useMemo(()=>c!==void 0?c:g.getV6InputValueFromSections(A(v.emptyValue),R,t),[c,g,A,v.emptyValue,R,t]),ae=y.useMemo(()=>m.tempValueStrAndroid??g.getV6InputValueFromSections(m.sections,R,t),[m.sections,g,m.tempValueStrAndroid,R,t]);y.useEffect(()=>(N.current&&N.current===ua(document)&&k("all"),()=>{clearTimeout(n.current),clearTimeout(r.current)}),[]);const Z=y.useMemo(()=>p==null||m.sections[p].contentType==="letter"?"text":"numeric",[p,m.sections]),te=!(N.current&&N.current===ua(document))&&I;return{interactions:_,returnedValue:{readOnly:u,onBlur:U,onClick:F,onFocus:z,onPaste:H,inputRef:L,enableAccessibleFieldDOMStructure:!1,placeholder:X,inputMode:Z,autoComplete:"off",value:te?"":ae,onChange:q}}},AB=e=>{const t=hn(),{internalProps:n,internalProps:{unstableFieldRef:r,minutesStep:o,enableAccessibleFieldDOMStructure:i=!1,disabled:a=!1,readOnly:s=!1},forwardedProps:{onKeyDown:l,error:c,clearable:u,onClear:d},fieldValueManager:f,valueManager:p,validator:m}=e,g=nr(),v=Lat(e),{state:w,activeSectionIndex:x,parsedSelectedSections:S,setSelectedSections:P,clearValue:T,clearActiveSection:E,updateSectionValue:O,setTempAndroidValueStr:k,sectionsValueBoundaries:A,localizedDigits:I,timezone:R}=v,N=jat({sections:w.sections,updateSectionValue:O,sectionsValueBoundaries:A,localizedDigits:I,setTempAndroidValueStr:k,timezone:R}),{resetCharacterQuery:L}=N,j=p.areValuesEqual(t,w.value,p.emptyValue),_=i?Bat:Vat,D=y.useMemo(()=>Wit(w.sections,g&&!i),[w.sections,g,i]),{returnedValue:z,interactions:F}=_(ue({},e,v,N,{areAllSectionsEmpty:j,sectionOrder:D})),H=Ct(K=>{if(l==null||l(K),!a)switch(!0){case((K.ctrlKey||K.metaKey)&&String.fromCharCode(K.keyCode)==="A"&&!K.shiftKey&&!K.altKey):{K.preventDefault(),P("all");break}case K.key==="ArrowRight":{if(K.preventDefault(),S==null)P(D.startIndex);else if(S==="all")P(D.endIndex);else{const te=D.neighbors[S].rightIndex;te!==null&&P(te)}break}case K.key==="ArrowLeft":{if(K.preventDefault(),S==null)P(D.endIndex);else if(S==="all")P(D.startIndex);else{const te=D.neighbors[S].leftIndex;te!==null&&P(te)}break}case K.key==="Delete":{if(K.preventDefault(),s)break;S==null||S==="all"?T():E(),L();break}case["ArrowUp","ArrowDown","Home","End","PageUp","PageDown"].includes(K.key):{if(K.preventDefault(),s||x==null)break;const te=w.sections[x],pe=f.getActiveDateManager(t,w,te),ie=Fit(t,R,te,K.key,A,I,pe.date,{minutesStep:o});O({activeSection:te,newSectionValue:ie,shouldGoToNextSection:!1});break}}});Uc(()=>{F.syncSelectionToDOM()});const{hasValidationError:U}=rie({props:n,validator:m,timezone:R,value:w.value,onError:n.onError}),q=y.useMemo(()=>c!==void 0?c:U,[U,c]);y.useEffect(()=>{!q&&x==null&&L()},[w.referenceValue,x,q]),y.useEffect(()=>{w.tempValueStrAndroid!=null&&x!=null&&(L(),E())},[w.sections]),y.useImperativeHandle(r,()=>({getSections:()=>w.sections,getActiveSectionIndex:F.getActiveSectionIndexFromDOM,setSelectedSections:F.setSelectedSections,focusField:F.focusField,isFieldFocused:F.isFieldFocused}));const X=Ct((K,...te)=>{K.preventDefault(),d==null||d(K,...te),T(),F.isFieldFocused()?P(D.startIndex):F.focusField(0)}),ae={onKeyDown:H,onClear:X,error:q,clearable:!!(u&&!j&&!s&&!a)},Z={disabled:a,readOnly:s};return ue({},e.forwardedProps,ae,Z,z)},Hat=["clearable","onClear","InputProps","sx","slots","slotProps"],Uat=["ownerState"],$B=e=>{const t=To(),{clearable:n,onClear:r,InputProps:o,sx:i,slots:a,slotProps:s}=e,l=_t(e,Hat),c=(a==null?void 0:a.clearButton)??kn,u=Vn({elementType:c,externalSlotProps:s==null?void 0:s.clearButton,ownerState:{},className:"clearButton",additionalProps:{title:t.fieldClearLabel}}),d=_t(u,Uat),f=(a==null?void 0:a.clearIcon)??Hot,p=Vn({elementType:f,externalSlotProps:s==null?void 0:s.clearIcon,ownerState:{}});return ue({},l,{InputProps:ue({},o,{endAdornment:$.jsxs(y.Fragment,{children:[n&&$.jsx(po,{position:"end",sx:{marginRight:o!=null&&o.endAdornment?-1:-1.5},children:$.jsx(c,ue({},d,{onClick:r,children:$.jsx(f,ue({fontSize:"small"},p))}))}),o==null?void 0:o.endAdornment]})}),sx:[{"& .clearButton":{opacity:1},"@media (pointer: fine)":{"& .clearButton":{opacity:0},"&:hover, &:focus-within":{".clearButton":{opacity:1}}}},...Array.isArray(i)?i:[i]]})},Wat=["value","defaultValue","referenceDate","format","formatDensity","onChange","timezone","onError","shouldRespectLeadingZeros","selectedSections","onSelectedSectionsChange","unstableFieldRef","enableAccessibleFieldDOMStructure","disabled","readOnly","dateSeparator"],RB=(e,t)=>y.useMemo(()=>{const n=ue({},e),r={},o=i=>{n.hasOwnProperty(i)&&(r[i]=n[i],delete n[i])};return Wat.forEach(o),t==="date"?gN.forEach(o):t==="time"?yN.forEach(o):t==="date-time"&&(gN.forEach(o),yN.forEach(o),nie.forEach(o)),{forwardedProps:n,internalProps:r}},[e,t]),Gat=y.createContext(null);function oie(e){const{contextValue:t,localeText:n,children:r}=e;return $.jsx(Gat.Provider,{value:t,children:$.jsx(YS,{localeText:n,children:r})})}const qat=e=>{const t=hn(),n=tm();return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??t.formats.keyboardDate,minDate:Ti(t,e.minDate,n.minDate),maxDate:Ti(t,e.maxDate,n.maxDate)})},Kat=e=>{const t=hn(),r=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.fullTime12h:t.formats.fullTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??r})},Yat=e=>{const t=hn(),n=tm(),o=e.ampm??t.is12HourCycleInCurrentLocale()?t.formats.keyboardDateTime12h:t.formats.keyboardDateTime24h;return ue({},e,{disablePast:e.disablePast??!1,disableFuture:e.disableFuture??!1,format:e.format??o,disableIgnoringDatePartForTimeValidation:!!(e.minDateTime||e.maxDateTime),minDate:Ti(t,e.minDateTime??e.minDate,n.minDate),maxDate:Ti(t,e.maxDateTime??e.maxDate,n.maxDate),minTime:e.minDateTime??e.minTime,maxTime:e.maxDateTime??e.maxTime})},Xat=e=>{const t=qat(e),{forwardedProps:n,internalProps:r}=RB(t,"date");return AB({forwardedProps:n,internalProps:r,valueManager:ro,fieldValueManager:IB,validator:hb,valueType:"date"})};function Qat(e){return Fn("MuiPickersTextField",e)}Un("MuiPickersTextField",["root","focused","disabled","error","required"]);function Jat(e){return Fn("MuiPickersInputBase",e)}const sy=Un("MuiPickersInputBase",["root","focused","disabled","error","notchedOutline","sectionContent","sectionBefore","sectionAfter","adornedStart","adornedEnd","input"]);function Zat(e){return Fn("MuiPickersSectionList",e)}const C0=Un("MuiPickersSectionList",["root","section","sectionContent"]),est=["slots","slotProps","elements","sectionListRef"],iie=oe("div",{name:"MuiPickersSectionList",slot:"Root",overridesResolver:(e,t)=>t.root})({direction:"ltr /*! @noflip */",outline:"none"}),aie=oe("span",{name:"MuiPickersSectionList",slot:"Section",overridesResolver:(e,t)=>t.section})({}),sie=oe("span",{name:"MuiPickersSectionList",slot:"SectionSeparator",overridesResolver:(e,t)=>t.sectionSeparator})({whiteSpace:"pre"}),lie=oe("span",{name:"MuiPickersSectionList",slot:"SectionContent",overridesResolver:(e,t)=>t.sectionContent})({outline:"none"}),tst=e=>{const{classes:t}=e;return Dn({root:["root"],section:["section"],sectionContent:["sectionContent"]},Zat,t)};function nst(e){const{slots:t,slotProps:n,element:r,classes:o}=e,i=(t==null?void 0:t.section)??aie,a=Vn({elementType:i,externalSlotProps:n==null?void 0:n.section,externalForwardedProps:r.container,className:o.section,ownerState:{}}),s=(t==null?void 0:t.sectionContent)??lie,l=Vn({elementType:s,externalSlotProps:n==null?void 0:n.sectionContent,externalForwardedProps:r.content,additionalProps:{suppressContentEditableWarning:!0},className:o.sectionContent,ownerState:{}}),c=(t==null?void 0:t.sectionSeparator)??sie,u=Vn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.before,ownerState:{position:"before"}}),d=Vn({elementType:c,externalSlotProps:n==null?void 0:n.sectionSeparator,externalForwardedProps:r.after,ownerState:{position:"after"}});return $.jsxs(i,ue({},a,{children:[$.jsx(c,ue({},u)),$.jsx(s,ue({},l)),$.jsx(c,ue({},d))]}))}const rst=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersSectionList"}),{slots:o,slotProps:i,elements:a,sectionListRef:s}=r,l=_t(r,est),c=tst(r),u=y.useRef(null),d=Qi(n,u),f=g=>{if(!u.current)throw new Error(`MUI X: Cannot call sectionListRef.${g} before the mount of the component.`);return u.current};y.useImperativeHandle(s,()=>({getRoot(){return f("getRoot")},getSectionContainer(g){return f("getSectionContainer").querySelector(`.${C0.section}[data-sectionindex="${g}"]`)},getSectionContent(g){return f("getSectionContent").querySelector(`.${C0.section}[data-sectionindex="${g}"] .${C0.sectionContent}`)},getSectionIndexFromDOMElement(g){const v=f("getSectionIndexFromDOMElement");if(g==null||!v.contains(g))return null;let w=null;return g.classList.contains(C0.section)?w=g:g.classList.contains(C0.sectionContent)&&(w=g.parentElement),w==null?null:Number(w.dataset.sectionindex)}}));const p=(o==null?void 0:o.root)??iie,m=Vn({elementType:p,externalSlotProps:i==null?void 0:i.root,externalForwardedProps:l,additionalProps:{ref:d,suppressContentEditableWarning:!0},className:c.root,ownerState:{}});return $.jsx(p,ue({},m,{children:m.contentEditable?a.map(({content:g,before:v,after:w})=>`${v.children}${g.children}${w.children}`).join(""):$.jsx(y.Fragment,{children:a.map((g,v)=>$.jsx(nst,{slots:o,slotProps:i,element:g,classes:c},v))})}))}),ost=["elements","areAllSectionsEmpty","defaultValue","label","value","onChange","id","autoFocus","endAdornment","startAdornment","renderSuffix","slots","slotProps","contentEditable","tabIndex","onInput","onPaste","onKeyDown","fullWidth","name","readOnly","inputProps","inputRef","sectionListRef"],ist=e=>Math.round(e*1e5)/1e5,Vk=oe("div",{name:"MuiPickersInputBase",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>ue({},e.typography.body1,{color:(e.vars||e).palette.text.primary,cursor:"text",padding:0,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",boxSizing:"border-box",letterSpacing:`${ist(.15/16)}em`,variants:[{props:{fullWidth:!0},style:{width:"100%"}}]})),_B=oe(iie,{name:"MuiPickersInputBase",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})(({theme:e})=>({padding:"4px 0 5px",fontFamily:e.typography.fontFamily,fontSize:"inherit",lineHeight:"1.4375em",flexGrow:1,outline:"none",display:"flex",flexWrap:"nowrap",overflow:"hidden",letterSpacing:"inherit",width:"182px",variants:[{props:{isRtl:!0},style:{textAlign:"right /*! @noflip */"}},{props:{size:"small"},style:{paddingTop:1}},{props:{adornedStart:!1,focused:!1,filled:!1},style:{color:"currentColor",opacity:0}},{props:({adornedStart:t,focused:n,filled:r,label:o})=>!t&&!n&&!r&&o==null,style:e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:e.palette.mode==="light"?.42:.5}}]})),ast=oe(aie,{name:"MuiPickersInputBase",slot:"Section",overridesResolver:(e,t)=>t.section})(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit",letterSpacing:"inherit",lineHeight:"1.4375em",display:"flex"})),sst=oe(lie,{name:"MuiPickersInputBase",slot:"SectionContent",overridesResolver:(e,t)=>t.content})(({theme:e})=>({fontFamily:e.typography.fontFamily,lineHeight:"1.4375em",letterSpacing:"inherit",width:"fit-content",outline:"none"})),lst=oe(sie,{name:"MuiPickersInputBase",slot:"Separator",overridesResolver:(e,t)=>t.separator})(()=>({whiteSpace:"pre",letterSpacing:"inherit"})),cst=oe("input",{name:"MuiPickersInputBase",slot:"Input",overridesResolver:(e,t)=>t.hiddenInput})(ue({},Eot)),ust=e=>{const{focused:t,disabled:n,error:r,classes:o,fullWidth:i,readOnly:a,color:s,size:l,endAdornment:c,startAdornment:u}=e,d={root:["root",t&&!n&&"focused",n&&"disabled",a&&"readOnly",r&&"error",i&&"fullWidth",`color${Sot(s)}`,l==="small"&&"inputSizeSmall",!!u&&"adornedStart",!!c&&"adornedEnd"],notchedOutline:["notchedOutline"],input:["input"],sectionsContainer:["sectionsContainer"],sectionContent:["sectionContent"],sectionBefore:["sectionBefore"],sectionAfter:["sectionAfter"]};return Dn(d,Jat,o)},DB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersInputBase"}),{elements:o,areAllSectionsEmpty:i,value:a,onChange:s,id:l,endAdornment:c,startAdornment:u,renderSuffix:d,slots:f,slotProps:p,contentEditable:m,tabIndex:g,onInput:v,onPaste:w,onKeyDown:x,name:S,readOnly:P,inputProps:T,inputRef:E,sectionListRef:O}=r,k=_t(r,ost),A=y.useRef(null),I=Qi(n,A),R=Qi(T==null?void 0:T.ref,E),N=nr(),L=Ta();if(!L)throw new Error("MUI X: PickersInputBase should always be used inside a PickersTextField component");const j=U=>{var q;if(L.disabled){U.stopPropagation();return}(q=L.onFocus)==null||q.call(L,U)};y.useEffect(()=>{L&&L.setAdornedStart(!!u)},[L,u]),y.useEffect(()=>{L&&(i?L.onEmpty():L.onFilled())},[L,i]);const _=ue({},r,L,{isRtl:N}),D=ust(_),z=(f==null?void 0:f.root)||Vk,F=Vn({elementType:z,externalSlotProps:p==null?void 0:p.root,externalForwardedProps:k,additionalProps:{"aria-invalid":L.error,ref:I},className:D.root,ownerState:_}),H=(f==null?void 0:f.input)||_B;return $.jsxs(z,ue({},F,{children:[u,$.jsx(rst,{sectionListRef:O,elements:o,contentEditable:m,tabIndex:g,className:D.sectionsContainer,onFocus:j,onBlur:L.onBlur,onInput:v,onPaste:w,onKeyDown:x,slots:{root:H,section:ast,sectionContent:sst,sectionSeparator:lst},slotProps:{root:{ownerState:_},sectionContent:{className:sy.sectionContent},sectionSeparator:({position:U})=>({className:U==="before"?sy.sectionBefore:sy.sectionAfter})}}),c,d?d(ue({},L)):null,$.jsx(cst,ue({name:S,className:D.input,value:a,onChange:s,id:l,"aria-hidden":"true",tabIndex:-1,readOnly:P,required:L.required,disabled:L.disabled},T,{ref:R}))]}))});function dst(e){return Fn("MuiPickersOutlinedInput",e)}const kl=ue({},sy,Un("MuiPickersOutlinedInput",["root","notchedOutline","input"])),fst=["children","className","label","notched","shrink"],pst=oe("fieldset",{name:"MuiPickersOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%",borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}),p9=oe("span")(({theme:e})=>({fontFamily:e.typography.fontFamily,fontSize:"inherit"})),hst=oe("legend")(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:{withLabel:!1},style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:{withLabel:!0},style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:{withLabel:!0,notched:!0},style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}));function mst(e){const{className:t,label:n}=e,r=_t(e,fst),o=n!=null&&n!=="",i=ue({},e,{withLabel:o});return $.jsx(pst,ue({"aria-hidden":!0,className:t},r,{ownerState:i,children:$.jsx(hst,{ownerState:i,children:o?$.jsx(p9,{children:n}):$.jsx(p9,{className:"notranslate",children:"​"})})}))}const gst=["label","autoFocus","ownerState","notched"],yst=oe(Vk,{name:"MuiPickersOutlinedInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{padding:"0 14px",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${kl.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${kl.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${kl.focused} .${kl.notchedOutline}`]:{borderStyle:"solid",borderWidth:2},[`&.${kl.disabled}`]:{[`& .${kl.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled},"*":{color:(e.vars||e).palette.action.disabled}},[`&.${kl.error} .${kl.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},variants:Object.keys((e.vars??e).palette).filter(n=>{var r;return((r=(e.vars??e).palette[n])==null?void 0:r.main)??!1}).map(n=>({props:{color:n},style:{[`&.${kl.focused}:not(.${kl.error}) .${kl.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}}))}}),vst=oe(_B,{name:"MuiPickersOutlinedInput",slot:"SectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({padding:"16.5px 0",variants:[{props:{size:"small"},style:{padding:"8.5px 0"}}]}),bst=e=>{const{classes:t}=e,r=Dn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},dst,t);return ue({},t,r)},cie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersOutlinedInput"}),{label:o,ownerState:i,notched:a}=r,s=_t(r,gst),l=Ta(),c=ue({},r,i,l,{color:(l==null?void 0:l.color)||"primary"}),u=bst(c);return $.jsx(DB,ue({slots:{root:yst,input:vst},renderSuffix:d=>$.jsx(mst,{shrink:!!(a||d.adornedStart||d.focused||d.filled),notched:!!(a||d.adornedStart||d.focused||d.filled),className:u.notchedOutline,label:o!=null&&o!==""&&(l!=null&&l.required)?$.jsxs(y.Fragment,{children:[o," ","*"]}):o,ownerState:c})},s,{label:o,classes:u,ref:n}))});cie.muiName="Input";function wst(e){return Fn("MuiPickersFilledInput",e)}const Ep=ue({},sy,Un("MuiPickersFilledInput",["root","underline","input"])),xst=["label","autoFocus","disableUnderline","ownerState"],Sst=oe(Vk,{name:"MuiPickersFilledInput",slot:"Root",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>EP(e)&&e!=="disableUnderline"})(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${Ep.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${Ep.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[...Object.keys((e.vars??e).palette).filter(a=>(e.vars??e).palette[a].main).map(a=>{var s;return{props:{color:a,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(s=(e.vars||e).palette[a])==null?void 0:s.main}`}}}}),{props:{disableUnderline:!1},style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Ep.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Ep.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Ep.disabled}, .${Ep.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${Ep.disabled}:before`]:{borderBottomStyle:"dotted"}}},{props:({startAdornment:a})=>!!a,style:{paddingLeft:12}},{props:({endAdornment:a})=>!!a,style:{paddingRight:12}}]}}),Cst=oe(_B,{name:"MuiPickersFilledInput",slot:"sectionsContainer",overridesResolver:(e,t)=>t.sectionsContainer})({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({startAdornment:e})=>!!e,style:{paddingLeft:0}},{props:({endAdornment:e})=>!!e,style:{paddingRight:0}},{props:{hiddenLabel:!0},style:{paddingTop:16,paddingBottom:17}},{props:{hiddenLabel:!0,size:"small"},style:{paddingTop:8,paddingBottom:9}}]}),Pst=e=>{const{classes:t,disableUnderline:n}=e,o=Dn({root:["root",!n&&"underline"],input:["input"]},wst,t);return ue({},t,o)},uie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersFilledInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=_t(r,xst),l=Ta(),c=ue({},r,a,l,{color:(l==null?void 0:l.color)||"primary"}),u=Pst(c);return $.jsx(DB,ue({slots:{root:Sst,input:Cst},slotProps:{root:{disableUnderline:i}}},s,{label:o,classes:u,ref:n}))});uie.muiName="Input";function Tst(e){return Fn("MuiPickersFilledInput",e)}const P0=ue({},sy,Un("MuiPickersInput",["root","input"])),Est=["label","autoFocus","disableUnderline","ownerState"],Ost=oe(Vk,{name:"MuiPickersInput",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{"label + &":{marginTop:16},variants:[...Object.keys((e.vars??e).palette).filter(r=>(e.vars??e).palette[r].main).map(r=>({props:{color:r},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}})),{props:{disableUnderline:!1},style:{"&::after":{background:"red",left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${P0.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${P0.error}`]:{"&:before, &:after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${P0.disabled}, .${P0.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${P0.disabled}:before`]:{borderBottomStyle:"dotted"}}}]}}),Ist=e=>{const{classes:t,disableUnderline:n}=e,o=Dn({root:["root",!n&&"underline"],input:["input"]},Tst,t);return ue({},t,o)},die=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersInput"}),{label:o,disableUnderline:i=!1,ownerState:a}=r,s=_t(r,Est),l=Ta(),c=ue({},r,a,l,{disableUnderline:i,color:(l==null?void 0:l.color)||"primary"}),u=Ist(c);return $.jsx(DB,ue({slots:{root:Ost}},s,{label:o,classes:u,ref:n}))});die.muiName="Input";const kst=["onFocus","onBlur","className","color","disabled","error","variant","required","InputProps","inputProps","inputRef","sectionListRef","elements","areAllSectionsEmpty","onClick","onKeyDown","onKeyUp","onPaste","onInput","endAdornment","startAdornment","tabIndex","contentEditable","focused","value","onChange","fullWidth","id","name","helperText","FormHelperTextProps","label","InputLabelProps"],Mst={standard:die,filled:uie,outlined:cie},Ast=oe(qh,{name:"MuiPickersTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),$st=e=>{const{focused:t,disabled:n,classes:r,required:o}=e;return Dn({root:["root",t&&!n&&"focused",n&&"disabled",o&&"required"]},Qat,r)},NB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersTextField"}),{onFocus:o,onBlur:i,className:a,color:s="primary",disabled:l=!1,error:c=!1,variant:u="outlined",required:d=!1,InputProps:f,inputProps:p,inputRef:m,sectionListRef:g,elements:v,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:P,onPaste:T,onInput:E,endAdornment:O,startAdornment:k,tabIndex:A,contentEditable:I,focused:R,value:N,onChange:L,fullWidth:j,id:_,name:D,helperText:z,FormHelperTextProps:F,label:H,InputLabelProps:U}=r,q=_t(r,kst),X=y.useRef(null),ae=Qi(n,X),Z=db(_),K=z&&Z?`${Z}-helper-text`:void 0,te=H&&Z?`${Z}-label`:void 0,pe=ue({},r,{color:s,disabled:l,error:c,focused:R,required:d,variant:u}),ie=$st(pe),le=Mst[u];return $.jsxs(Ast,ue({className:de(ie.root,a),ref:ae,focused:R,onFocus:o,onBlur:i,disabled:l,variant:u,error:c,color:s,fullWidth:j,required:d,ownerState:pe},q,{children:[$.jsx(Kh,ue({htmlFor:Z,id:te},U,{children:H})),$.jsx(le,ue({elements:v,areAllSectionsEmpty:w,onClick:x,onKeyDown:S,onKeyUp:P,onInput:E,onPaste:T,endAdornment:O,startAdornment:k,tabIndex:A,contentEditable:I,value:N,onChange:L,id:Z,fullWidth:j,inputProps:p,inputRef:m,sectionListRef:g,label:H,name:D,role:"group","aria-labelledby":te},f)),z&&$.jsx(FI,ue({id:K},F,{children:z}))]}))}),Rst=["enableAccessibleFieldDOMStructure"],_st=["InputProps","readOnly"],Dst=["onPaste","onKeyDown","inputMode","readOnly","InputProps","inputProps","inputRef"],LB=e=>{let{enableAccessibleFieldDOMStructure:t}=e,n=_t(e,Rst);if(t){const{InputProps:d,readOnly:f}=n,p=_t(n,_st);return ue({},p,{InputProps:ue({},d??{},{readOnly:f})})}const{onPaste:r,onKeyDown:o,inputMode:i,readOnly:a,InputProps:s,inputProps:l,inputRef:c}=n,u=_t(n,Dst);return ue({},u,{InputProps:ue({},s??{},{readOnly:a}),inputProps:ue({},l??{},{inputMode:i,onPaste:r,onKeyDown:o,ref:c})})},Nst=["slots","slotProps","InputProps","inputProps"],fie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDateField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=_t(r,Nst),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?NB:yn),d=Vn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,additionalProps:{ref:n},ownerState:c});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Xat(d),p=LB(f),m=$B(ue({},p,{slots:o,slotProps:i}));return $.jsx(u,ue({},m))}),Lst=e=>{const t=Kat(e),{forwardedProps:n,internalProps:r}=RB(t,"time");return AB({forwardedProps:n,internalProps:r,valueManager:ro,fieldValueManager:IB,validator:JS,valueType:"time"})},Fst=["slots","slotProps","InputProps","inputProps"],pie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=_t(r,Fst),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?NB:yn),d=Vn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=Lst(d),p=LB(f),m=$B(ue({},p,{slots:o,slotProps:i}));return $.jsx(u,ue({},m))}),jst=e=>{const t=Yat(e),{forwardedProps:n,internalProps:r}=RB(t,"date-time");return AB({forwardedProps:n,internalProps:r,valueManager:ro,fieldValueManager:IB,validator:zk,valueType:"date-time"})},Bst=["slots","slotProps","InputProps","inputProps"],hie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDateTimeField"}),{slots:o,slotProps:i,InputProps:a,inputProps:s}=r,l=_t(r,Bst),c=r,u=(o==null?void 0:o.textField)??(t.enableAccessibleFieldDOMStructure?NB:yn),d=Vn({elementType:u,externalSlotProps:i==null?void 0:i.textField,externalForwardedProps:l,ownerState:c,additionalProps:{ref:n}});d.inputProps=ue({},s,d.inputProps),d.InputProps=ue({},a,d.InputProps);const f=jst(d),p=LB(f),m=$B(ue({},p,{slots:o,slotProps:i}));return $.jsx(u,ue({},m))}),mie=({shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a,timezone:s})=>{const l=em();return y.useCallback(c=>hb({adapter:l,value:c,timezone:s,props:{shouldDisableDate:e,shouldDisableMonth:t,shouldDisableYear:n,minDate:r,maxDate:o,disableFuture:i,disablePast:a}})!==null,[l,e,t,n,r,o,i,a,s])},zst=(e,t,n)=>(r,o)=>{switch(o.type){case"changeMonth":return ue({},r,{slideDirection:o.direction,currentMonth:o.newMonth,isMonthSwitchingAnimating:!e});case"changeMonthTimezone":{const i=o.newTimezone;if(n.getTimezone(r.currentMonth)===i)return r;let a=n.setTimezone(r.currentMonth,i);return n.getMonth(a)!==n.getMonth(r.currentMonth)&&(a=n.setMonth(a,n.getMonth(r.currentMonth))),ue({},r,{currentMonth:a})}case"finishMonthSwitchingAnimation":return ue({},r,{isMonthSwitchingAnimating:!1});case"changeFocusedDay":{if(r.focusedDay!=null&&o.focusedDay!=null&&n.isSameDay(o.focusedDay,r.focusedDay))return r;const i=o.focusedDay!=null&&!t&&!n.isSameMonth(r.currentMonth,o.focusedDay);return ue({},r,{focusedDay:o.focusedDay,isMonthSwitchingAnimating:i&&!e&&!o.withoutMonthSwitchingAnimation,currentMonth:i?n.startOfMonth(o.focusedDay):r.currentMonth,slideDirection:o.focusedDay!=null&&n.isAfterDay(o.focusedDay,r.currentMonth)?"left":"right"})}default:throw new Error("missing support")}},Vst=e=>{const{value:t,referenceDate:n,disableFuture:r,disablePast:o,disableSwitchToMonthOnDayFocus:i=!1,maxDate:a,minDate:s,onMonthChange:l,reduceAnimations:c,shouldDisableDate:u,timezone:d}=e,f=hn(),p=y.useRef(zst(!!c,i,f)).current,m=y.useMemo(()=>ro.getInitialReferenceValue({value:t,utils:f,timezone:d,props:e,referenceDate:n,granularity:Vl.day}),[n,d]),[g,v]=y.useReducer(p,{isMonthSwitchingAnimating:!1,focusedDay:m,currentMonth:f.startOfMonth(m),slideDirection:"left"});y.useEffect(()=>{v({type:"changeMonthTimezone",newTimezone:f.getTimezone(m)})},[m,f]);const w=y.useCallback(E=>{v(ue({type:"changeMonth"},E)),l&&l(E.newMonth)},[l]),x=y.useCallback(E=>{const O=E;f.isSameMonth(O,g.currentMonth)||w({newMonth:f.startOfMonth(O),direction:f.isAfterDay(O,g.currentMonth)?"left":"right"})},[g.currentMonth,w,f]),S=mie({shouldDisableDate:u,minDate:s,maxDate:a,disableFuture:r,disablePast:o,timezone:d}),P=y.useCallback(()=>{v({type:"finishMonthSwitchingAnimation"})},[]),T=Ct((E,O)=>{S(E)||v({type:"changeFocusedDay",focusedDay:E,withoutMonthSwitchingAnimation:O})});return{referenceDate:m,calendarState:g,changeMonth:x,changeFocusedDay:T,isDateDisabled:S,onMonthSwitchingAnimationEnd:P,handleChangeMonth:w}},Hst=e=>Fn("MuiPickersFadeTransitionGroup",e);Un("MuiPickersFadeTransitionGroup",["root"]);const Ust=e=>{const{classes:t}=e;return Dn({root:["root"]},Hst,t)},Wst=oe(ES,{name:"MuiPickersFadeTransitionGroup",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"block",position:"relative"});function gie(e){const t=Zt({props:e,name:"MuiPickersFadeTransitionGroup"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=Ust(t),s=Ei();return o?n:$.jsx(Wst,{className:de(a.root,r),children:$.jsx(jv,{appear:!1,mountOnEnter:!0,unmountOnExit:!0,timeout:{appear:s.transitions.duration.enteringScreen,enter:s.transitions.duration.enteringScreen,exit:0},children:n},i)})}const Gst=e=>Fn("MuiPickersSlideTransition",e),As=Un("MuiPickersSlideTransition",["root","slideEnter-left","slideEnter-right","slideEnterActive","slideExit","slideExitActiveLeft-left","slideExitActiveLeft-right"]),qst=["children","className","reduceAnimations","slideDirection","transKey","classes"],Kst=e=>{const{classes:t,slideDirection:n}=e,r={root:["root"],exit:["slideExit"],enterActive:["slideEnterActive"],enter:[`slideEnter-${n}`],exitActive:[`slideExitActiveLeft-${n}`]};return Dn(r,Gst,t)},Yst=oe(ES,{name:"MuiPickersSlideTransition",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`.${As["slideEnter-left"]}`]:t["slideEnter-left"]},{[`.${As["slideEnter-right"]}`]:t["slideEnter-right"]},{[`.${As.slideEnterActive}`]:t.slideEnterActive},{[`.${As.slideExit}`]:t.slideExit},{[`.${As["slideExitActiveLeft-left"]}`]:t["slideExitActiveLeft-left"]},{[`.${As["slideExitActiveLeft-right"]}`]:t["slideExitActiveLeft-right"]}]})(({theme:e})=>{const t=e.transitions.create("transform",{duration:e.transitions.duration.complex,easing:"cubic-bezier(0.35, 0.8, 0.4, 1)"});return{display:"block",position:"relative",overflowX:"hidden","& > *":{position:"absolute",top:0,right:0,left:0},[`& .${As["slideEnter-left"]}`]:{willChange:"transform",transform:"translate(100%)",zIndex:1},[`& .${As["slideEnter-right"]}`]:{willChange:"transform",transform:"translate(-100%)",zIndex:1},[`& .${As.slideEnterActive}`]:{transform:"translate(0%)",transition:t},[`& .${As.slideExit}`]:{transform:"translate(0%)"},[`& .${As["slideExitActiveLeft-left"]}`]:{willChange:"transform",transform:"translate(-100%)",transition:t,zIndex:0},[`& .${As["slideExitActiveLeft-right"]}`]:{willChange:"transform",transform:"translate(100%)",transition:t,zIndex:0}}});function Xst(e){const t=Zt({props:e,name:"MuiPickersSlideTransition"}),{children:n,className:r,reduceAnimations:o,transKey:i}=t,a=_t(t,qst),s=Kst(t),l=Ei();if(o)return $.jsx("div",{className:de(s.root,r),children:n});const c={exit:s.exit,enterActive:s.enterActive,enter:s.enter,exitActive:s.exitActive};return $.jsx(Yst,{className:de(s.root,r),childFactory:u=>y.cloneElement(u,{classNames:c}),role:"presentation",children:$.jsx(_F,ue({mountOnEnter:!0,unmountOnExit:!0,timeout:l.transitions.duration.complex,classNames:c},a,{children:n}),i)})}const Qst=e=>Fn("MuiDayCalendar",e);Un("MuiDayCalendar",["root","header","weekDayLabel","loadingContainer","slideTransition","monthContainer","weekContainer","weekNumberLabel","weekNumber"]);const Jst=["parentProps","day","focusableDay","selectedDays","isDateDisabled","currentMonthNumber","isViewFocused"],Zst=["ownerState"],elt=e=>{const{classes:t}=e;return Dn({root:["root"],header:["header"],weekDayLabel:["weekDayLabel"],loadingContainer:["loadingContainer"],slideTransition:["slideTransition"],monthContainer:["monthContainer"],weekContainer:["weekContainer"],weekNumberLabel:["weekNumberLabel"],weekNumber:["weekNumber"]},Qst,t)},yie=(Vx+Nk*2)*6,tlt=oe("div",{name:"MuiDayCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nlt=oe("div",{name:"MuiDayCalendar",slot:"Header",overridesResolver:(e,t)=>t.header})({display:"flex",justifyContent:"center",alignItems:"center"}),rlt=oe(ct,{name:"MuiDayCalendar",slot:"WeekDayLabel",overridesResolver:(e,t)=>t.weekDayLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:(e.vars||e).palette.text.secondary})),olt=oe(ct,{name:"MuiDayCalendar",slot:"WeekNumberLabel",overridesResolver:(e,t)=>t.weekNumberLabel})(({theme:e})=>({width:36,height:40,margin:"0 2px",textAlign:"center",display:"flex",justifyContent:"center",alignItems:"center",color:e.palette.text.disabled})),ilt=oe(ct,{name:"MuiDayCalendar",slot:"WeekNumber",overridesResolver:(e,t)=>t.weekNumber})(({theme:e})=>ue({},e.typography.caption,{width:Vx,height:Vx,padding:0,margin:`0 ${Nk}px`,color:e.palette.text.disabled,fontSize:"0.75rem",alignItems:"center",justifyContent:"center",display:"inline-flex"})),alt=oe("div",{name:"MuiDayCalendar",slot:"LoadingContainer",overridesResolver:(e,t)=>t.loadingContainer})({display:"flex",justifyContent:"center",alignItems:"center",minHeight:yie}),slt=oe(Xst,{name:"MuiDayCalendar",slot:"SlideTransition",overridesResolver:(e,t)=>t.slideTransition})({minHeight:yie}),llt=oe("div",{name:"MuiDayCalendar",slot:"MonthContainer",overridesResolver:(e,t)=>t.monthContainer})({overflow:"hidden"}),clt=oe("div",{name:"MuiDayCalendar",slot:"WeekContainer",overridesResolver:(e,t)=>t.weekContainer})({margin:`${Nk}px 0`,display:"flex",justifyContent:"center"});function ult(e){let{parentProps:t,day:n,focusableDay:r,selectedDays:o,isDateDisabled:i,currentMonthNumber:a,isViewFocused:s}=e,l=_t(e,Jst);const{disabled:c,disableHighlightToday:u,isMonthSwitchingAnimating:d,showDaysOutsideCurrentMonth:f,slots:p,slotProps:m,timezone:g}=t,v=hn(),w=nm(g),x=r!==null&&v.isSameDay(n,r),S=o.some(N=>v.isSameDay(N,n)),P=v.isSameDay(n,w),T=(p==null?void 0:p.day)??kat,E=Vn({elementType:T,externalSlotProps:m==null?void 0:m.day,additionalProps:ue({disableHighlightToday:u,showDaysOutsideCurrentMonth:f,role:"gridcell",isAnimating:d,"data-timestamp":v.toJsDate(n).valueOf()},l),ownerState:ue({},t,{day:n,selected:S})}),O=_t(E,Zst),k=y.useMemo(()=>c||i(n),[c,i,n]),A=y.useMemo(()=>v.getMonth(n)!==a,[v,n,a]),I=y.useMemo(()=>{const N=v.startOfMonth(v.setMonth(n,a));return f?v.isSameDay(n,v.startOfWeek(N)):v.isSameDay(n,N)},[a,n,f,v]),R=y.useMemo(()=>{const N=v.endOfMonth(v.setMonth(n,a));return f?v.isSameDay(n,v.endOfWeek(N)):v.isSameDay(n,N)},[a,n,f,v]);return $.jsx(T,ue({},O,{day:n,disabled:k,autoFocus:s&&x,today:P,outsideCurrentMonth:A,isFirstVisibleCell:I,isLastVisibleCell:R,selected:S,tabIndex:x?0:-1,"aria-selected":S,"aria-current":P?"date":void 0}))}function dlt(e){const t=Zt({props:e,name:"MuiDayCalendar"}),n=hn(),{onFocusedDayChange:r,className:o,currentMonth:i,selectedDays:a,focusedDay:s,loading:l,onSelectedDaysChange:c,onMonthSwitchingAnimationEnd:u,readOnly:d,reduceAnimations:f,renderLoading:p=()=>$.jsx("span",{children:"..."}),slideDirection:m,TransitionProps:g,disablePast:v,disableFuture:w,minDate:x,maxDate:S,shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:E,dayOfWeekFormatter:O=ge=>n.format(ge,"weekdayShort").charAt(0).toUpperCase(),hasFocus:k,onFocusedViewChange:A,gridLabelId:I,displayWeekNumber:R,fixedWeekNumber:N,autoFocus:L,timezone:j}=t,_=nm(j),D=elt(t),z=nr(),F=mie({shouldDisableDate:P,shouldDisableMonth:T,shouldDisableYear:E,minDate:x,maxDate:S,disablePast:v,disableFuture:w,timezone:j}),H=To(),[U,q]=Dh({name:"DayCalendar",state:"hasFocus",controlled:k,default:L??!1}),[X,ae]=y.useState(()=>s||_),Z=Ct(ge=>{d||c(ge)}),K=ge=>{F(ge)||(r(ge),ae(ge),A==null||A(!0),q(!0))},te=Ct((ge,Se)=>{switch(ge.key){case"ArrowUp":K(n.addDays(Se,-7)),ge.preventDefault();break;case"ArrowDown":K(n.addDays(Se,7)),ge.preventDefault();break;case"ArrowLeft":{const xe=n.addDays(Se,z?1:-1),Ie=n.addMonths(Se,z?1:-1),Re=Tw({utils:n,date:xe,minDate:z?xe:n.startOfMonth(Ie),maxDate:z?n.endOfMonth(Ie):xe,isDateDisabled:F,timezone:j});K(Re||xe),ge.preventDefault();break}case"ArrowRight":{const xe=n.addDays(Se,z?-1:1),Ie=n.addMonths(Se,z?-1:1),Re=Tw({utils:n,date:xe,minDate:z?n.startOfMonth(Ie):xe,maxDate:z?xe:n.endOfMonth(Ie),isDateDisabled:F,timezone:j});K(Re||xe),ge.preventDefault();break}case"Home":K(n.startOfWeek(Se)),ge.preventDefault();break;case"End":K(n.endOfWeek(Se)),ge.preventDefault();break;case"PageUp":K(n.addMonths(Se,1)),ge.preventDefault();break;case"PageDown":K(n.addMonths(Se,-1)),ge.preventDefault();break}}),pe=Ct((ge,Se)=>K(Se)),ie=Ct((ge,Se)=>{U&&n.isSameDay(X,Se)&&(A==null||A(!1))}),le=n.getMonth(i),re=n.getYear(i),fe=y.useMemo(()=>a.filter(ge=>!!ge).map(ge=>n.startOfDay(ge)),[n,a]),ee=`${re}-${le}`,ce=y.useMemo(()=>y.createRef(),[ee]),me=y.useMemo(()=>{const ge=n.startOfMonth(i),Se=n.endOfMonth(i);return F(X)||n.isAfterDay(X,Se)||n.isBeforeDay(X,ge)?Tw({utils:n,date:X,minDate:ge,maxDate:Se,disablePast:v,disableFuture:w,isDateDisabled:F,timezone:j}):X},[i,w,v,X,F,n,j]),we=y.useMemo(()=>{const ge=n.getWeekArray(i);let Se=n.addMonths(i,1);for(;N&&ge.length{ge.length$.jsx(rlt,{variant:"caption",role:"columnheader","aria-label":n.format(ge,"weekday"),className:D.weekDayLabel,children:O(ge)},Se.toString()))]}),l?$.jsx(alt,{className:D.loadingContainer,children:p()}):$.jsx(slt,ue({transKey:ee,onExited:u,reduceAnimations:f,slideDirection:m,className:de(o,D.slideTransition)},g,{nodeRef:ce,children:$.jsx(llt,{ref:ce,role:"rowgroup",className:D.monthContainer,children:we.map((ge,Se)=>$.jsxs(clt,{role:"row",className:D.weekContainer,"aria-rowindex":Se+1,children:[R&&$.jsx(ilt,{className:D.weekNumber,role:"rowheader","aria-label":H.calendarWeekNumberAriaLabelText(n.getWeekNumber(ge[0])),children:H.calendarWeekNumberText(n.getWeekNumber(ge[0]))}),ge.map((xe,Ie)=>$.jsx(ult,{parentProps:t,day:xe,selectedDays:fe,focusableDay:me,onKeyDown:te,onFocus:pe,onBlur:ie,onDaySelect:Z,isDateDisabled:F,currentMonthNumber:le,isViewFocused:U,"aria-colindex":Ie+1},xe.toString()))]},`week-${ge[0]}`))})}))]})}function flt(e){return Fn("MuiPickersMonth",e)}const tP=Un("MuiPickersMonth",["root","monthButton","disabled","selected"]),plt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","aria-label","monthsPerRow","slots","slotProps"],hlt=e=>{const{disabled:t,selected:n,classes:r}=e;return Dn({root:["root"],monthButton:["monthButton",t&&"disabled",n&&"selected"]},flt,r)},mlt=oe("div",{name:"MuiPickersMonth",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{monthsPerRow:4},style:{flexBasis:"25%"}}]}),glt=oe("button",{name:"MuiPickersMonth",slot:"MonthButton",overridesResolver:(e,t)=>[t.monthButton,{[`&.${tP.disabled}`]:t.disabled},{[`&.${tP.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"8px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${tP.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${tP.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),ylt=y.memo(function(t){const n=Zt({props:t,name:"MuiPickersMonth"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":m,"aria-label":g,slots:v,slotProps:w}=n,x=_t(n,plt),S=y.useRef(null),P=hlt(n);Uc(()=>{var O;r&&((O=S.current)==null||O.focus())},[r]);const T=(v==null?void 0:v.monthButton)??glt,E=Vn({elementType:T,externalSlotProps:w==null?void 0:w.monthButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:S,type:"button",role:"radio","aria-current":m,"aria-checked":s,"aria-label":g,onClick:O=>u(O,l),onKeyDown:O=>d(O,l),onFocus:O=>f(O,l),onBlur:O=>p(O,l)},ownerState:n,className:P.monthButton});return $.jsx(mlt,ue({className:de(P.root,o),ownerState:n},x,{children:$.jsx(T,ue({},E))}))});function vlt(e){return Fn("MuiMonthCalendar",e)}Un("MuiMonthCalendar",["root"]);const blt=["className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","shouldDisableMonth","readOnly","disableHighlightToday","autoFocus","onMonthFocus","hasFocus","onFocusedViewChange","monthsPerRow","timezone","gridLabelId","slots","slotProps"],wlt=e=>{const{classes:t}=e;return Dn({root:["root"]},vlt,t)};function xlt(e,t){const n=hn(),r=tm(),o=Zt({props:e,name:t});return ue({disableFuture:!1,disablePast:!1},o,{minDate:Ti(n,o.minDate,r.minDate),maxDate:Ti(n,o.maxDate,r.maxDate)})}const Slt=oe("div",{name:"MuiMonthCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexWrap:"wrap",alignContent:"stretch",padding:"0 4px",width:Lk,boxSizing:"border-box"}),Clt=y.forwardRef(function(t,n){const r=xlt(t,"MuiMonthCalendar"),{className:o,value:i,defaultValue:a,referenceDate:s,disabled:l,disableFuture:c,disablePast:u,maxDate:d,minDate:f,onChange:p,shouldDisableMonth:m,readOnly:g,autoFocus:v=!1,onMonthFocus:w,hasFocus:x,onFocusedViewChange:S,monthsPerRow:P=3,timezone:T,gridLabelId:E,slots:O,slotProps:k}=r,A=_t(r,blt),{value:I,handleValueChange:R,timezone:N}=pb({name:"MonthCalendar",timezone:T,value:i,defaultValue:a,onChange:p,valueManager:ro}),L=nm(N),j=nr(),_=hn(),D=y.useMemo(()=>ro.getInitialReferenceValue({value:I,utils:_,props:r,timezone:N,referenceDate:s,granularity:Vl.month}),[]),z=r,F=wlt(z),H=y.useMemo(()=>_.getMonth(L),[_,L]),U=y.useMemo(()=>I!=null?_.getMonth(I):null,[I,_]),[q,X]=y.useState(()=>U||_.getMonth(D)),[ae,Z]=Dh({name:"MonthCalendar",state:"hasFocus",controlled:x,default:v??!1}),K=Ct(ee=>{Z(ee),S&&S(ee)}),te=y.useCallback(ee=>{const ce=_.startOfMonth(u&&_.isAfter(L,f)?L:f),me=_.startOfMonth(c&&_.isBefore(L,d)?L:d),we=_.startOfMonth(ee);return _.isBefore(we,ce)||_.isAfter(we,me)?!0:m?m(we):!1},[c,u,d,f,L,m,_]),pe=Ct((ee,ce)=>{if(g)return;const me=_.setMonth(I??D,ce);R(me)}),ie=Ct(ee=>{te(_.setMonth(I??D,ee))||(X(ee),K(!0),w&&w(ee))});y.useEffect(()=>{X(ee=>U!==null&&ee!==U?U:ee)},[U]);const le=Ct((ee,ce)=>{switch(ee.key){case"ArrowUp":ie((12+ce-3)%12),ee.preventDefault();break;case"ArrowDown":ie((12+ce+3)%12),ee.preventDefault();break;case"ArrowLeft":ie((12+ce+(j?1:-1))%12),ee.preventDefault();break;case"ArrowRight":ie((12+ce+(j?-1:1))%12),ee.preventDefault();break}}),re=Ct((ee,ce)=>{ie(ce)}),fe=Ct((ee,ce)=>{q===ce&&K(!1)});return $.jsx(Slt,ue({ref:n,className:de(F.root,o),ownerState:z,role:"radiogroup","aria-labelledby":E},A,{children:CB(_,I??D).map(ee=>{const ce=_.getMonth(ee),me=_.format(ee,"monthShort"),we=_.format(ee,"month"),ge=ce===U,Se=l||te(ee);return $.jsx(ylt,{selected:ge,value:ce,onClick:pe,onKeyDown:le,autoFocus:ae&&ce===q,disabled:Se,tabIndex:ce===q&&!Se?0:-1,onFocus:re,onBlur:fe,"aria-current":H===ce?"date":void 0,"aria-label":we,monthsPerRow:P,slots:O,slotProps:k,children:me},me)})}))});function Plt(e){return Fn("MuiPickersYear",e)}const nP=Un("MuiPickersYear",["root","yearButton","selected","disabled"]),Tlt=["autoFocus","className","children","disabled","selected","value","tabIndex","onClick","onKeyDown","onFocus","onBlur","aria-current","yearsPerRow","slots","slotProps"],Elt=e=>{const{disabled:t,selected:n,classes:r}=e;return Dn({root:["root"],yearButton:["yearButton",t&&"disabled",n&&"selected"]},Plt,r)},Olt=oe("div",{name:"MuiPickersYear",slot:"Root",overridesResolver:(e,t)=>[t.root]})({display:"flex",alignItems:"center",justifyContent:"center",flexBasis:"33.3%",variants:[{props:{yearsPerRow:4},style:{flexBasis:"25%"}}]}),Ilt=oe("button",{name:"MuiPickersYear",slot:"YearButton",overridesResolver:(e,t)=>[t.yearButton,{[`&.${nP.disabled}`]:t.disabled},{[`&.${nP.selected}`]:t.selected}]})(({theme:e})=>ue({color:"unset",backgroundColor:"transparent",border:0,outline:0},e.typography.subtitle1,{margin:"6px 0",height:36,width:72,borderRadius:18,cursor:"pointer","&:focus":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.focusOpacity})`:mt(e.palette.action.active,e.palette.action.focusOpacity)},"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:mt(e.palette.action.active,e.palette.action.hoverOpacity)},"&:disabled":{cursor:"auto",pointerEvents:"none"},[`&.${nP.disabled}`]:{color:(e.vars||e).palette.text.secondary},[`&.${nP.selected}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.main,"&:focus, &:hover":{backgroundColor:(e.vars||e).palette.primary.dark}}})),klt=y.memo(function(t){const n=Zt({props:t,name:"MuiPickersYear"}),{autoFocus:r,className:o,children:i,disabled:a,selected:s,value:l,tabIndex:c,onClick:u,onKeyDown:d,onFocus:f,onBlur:p,"aria-current":m,slots:g,slotProps:v}=n,w=_t(n,Tlt),x=y.useRef(null),S=Elt(n);Uc(()=>{var E;r&&((E=x.current)==null||E.focus())},[r]);const P=(g==null?void 0:g.yearButton)??Ilt,T=Vn({elementType:P,externalSlotProps:v==null?void 0:v.yearButton,additionalProps:{children:i,disabled:a,tabIndex:c,ref:x,type:"button",role:"radio","aria-current":m,"aria-checked":s,onClick:E=>u(E,l),onKeyDown:E=>d(E,l),onFocus:E=>f(E,l),onBlur:E=>p(E,l)},ownerState:n,className:S.yearButton});return $.jsx(Olt,ue({className:de(S.root,o),ownerState:n},w,{children:$.jsx(P,ue({},T))}))});function Mlt(e){return Fn("MuiYearCalendar",e)}Un("MuiYearCalendar",["root"]);const Alt=["autoFocus","className","value","defaultValue","referenceDate","disabled","disableFuture","disablePast","maxDate","minDate","onChange","readOnly","shouldDisableYear","disableHighlightToday","onYearFocus","hasFocus","onFocusedViewChange","yearsOrder","yearsPerRow","timezone","gridLabelId","slots","slotProps"],$lt=e=>{const{classes:t}=e;return Dn({root:["root"]},Mlt,t)};function Rlt(e,t){const n=hn(),r=tm(),o=Zt({props:e,name:t});return ue({disablePast:!1,disableFuture:!1},o,{yearsPerRow:o.yearsPerRow??3,minDate:Ti(n,o.minDate,r.minDate),maxDate:Ti(n,o.maxDate,r.maxDate)})}const _lt=oe("div",{name:"MuiYearCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"row",flexWrap:"wrap",overflowY:"auto",height:"100%",padding:"0 4px",width:Lk,maxHeight:tit,boxSizing:"border-box",position:"relative"}),Dlt=y.forwardRef(function(t,n){const r=Rlt(t,"MuiYearCalendar"),{autoFocus:o,className:i,value:a,defaultValue:s,referenceDate:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onChange:m,readOnly:g,shouldDisableYear:v,onYearFocus:w,hasFocus:x,onFocusedViewChange:S,yearsOrder:P="asc",yearsPerRow:T,timezone:E,gridLabelId:O,slots:k,slotProps:A}=r,I=_t(r,Alt),{value:R,handleValueChange:N,timezone:L}=pb({name:"YearCalendar",timezone:E,value:a,defaultValue:s,onChange:m,valueManager:ro}),j=nm(L),_=nr(),D=hn(),z=y.useMemo(()=>ro.getInitialReferenceValue({value:R,utils:D,props:r,timezone:L,referenceDate:l,granularity:Vl.year}),[]),F=r,H=$lt(F),U=y.useMemo(()=>D.getYear(j),[D,j]),q=y.useMemo(()=>R!=null?D.getYear(R):null,[R,D]),[X,ae]=y.useState(()=>q||D.getYear(z)),[Z,K]=Dh({name:"YearCalendar",state:"hasFocus",controlled:x,default:o??!1}),te=Ct(xe=>{K(xe),S&&S(xe)}),pe=y.useCallback(xe=>{if(d&&D.isBeforeYear(xe,j)||u&&D.isAfterYear(xe,j)||p&&D.isBeforeYear(xe,p)||f&&D.isAfterYear(xe,f))return!0;if(!v)return!1;const Ie=D.startOfYear(xe);return v(Ie)},[u,d,f,p,j,v,D]),ie=Ct((xe,Ie)=>{if(g)return;const Re=D.setYear(R??z,Ie);N(Re)}),le=Ct(xe=>{pe(D.setYear(R??z,xe))||(ae(xe),te(!0),w==null||w(xe))});y.useEffect(()=>{ae(xe=>q!==null&&xe!==q?q:xe)},[q]);const re=P!=="desc"?T*1:T*-1,fe=_&&P==="asc"||!_&&P==="desc"?-1:1,ee=Ct((xe,Ie)=>{switch(xe.key){case"ArrowUp":le(Ie-re),xe.preventDefault();break;case"ArrowDown":le(Ie+re),xe.preventDefault();break;case"ArrowLeft":le(Ie-fe),xe.preventDefault();break;case"ArrowRight":le(Ie+fe),xe.preventDefault();break}}),ce=Ct((xe,Ie)=>{le(Ie)}),me=Ct((xe,Ie)=>{X===Ie&&te(!1)}),we=y.useRef(null),ge=Qi(n,we);y.useEffect(()=>{if(o||we.current===null)return;const xe=we.current.querySelector('[tabindex="0"]');if(!xe)return;const Ie=xe.offsetHeight,Re=xe.offsetTop,_e=we.current.clientHeight,ye=we.current.scrollTop,Te=Re+Ie;Ie>_e||Re{const Ie=D.getYear(xe),Re=Ie===q,_e=c||pe(xe);return $.jsx(klt,{selected:Re,value:Ie,onClick:ie,onKeyDown:ee,autoFocus:Z&&Ie===X,disabled:_e,tabIndex:Ie===X&&!_e?0:-1,onFocus:ce,onBlur:me,"aria-current":U===Ie?"date":void 0,yearsPerRow:T,slots:k,slotProps:A,children:D.format(xe,"year")},D.format(xe,"year"))})}))}),Nlt=e=>Fn("MuiPickersCalendarHeader",e),Llt=Un("MuiPickersCalendarHeader",["root","labelContainer","label","switchViewButton","switchViewIcon"]),Flt=["slots","slotProps","currentMonth","disabled","disableFuture","disablePast","maxDate","minDate","onMonthChange","onViewChange","view","reduceAnimations","views","labelId","className","timezone","format"],jlt=["ownerState"],Blt=e=>{const{classes:t}=e;return Dn({root:["root"],labelContainer:["labelContainer"],label:["label"],switchViewButton:["switchViewButton"],switchViewIcon:["switchViewIcon"]},Nlt,t)},zlt=oe("div",{name:"MuiPickersCalendarHeader",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",alignItems:"center",marginTop:12,marginBottom:4,paddingLeft:24,paddingRight:12,maxHeight:40,minHeight:40}),Vlt=oe("div",{name:"MuiPickersCalendarHeader",slot:"LabelContainer",overridesResolver:(e,t)=>t.labelContainer})(({theme:e})=>ue({display:"flex",overflow:"hidden",alignItems:"center",cursor:"pointer",marginRight:"auto"},e.typography.body1,{fontWeight:e.typography.fontWeightMedium})),Hlt=oe("div",{name:"MuiPickersCalendarHeader",slot:"Label",overridesResolver:(e,t)=>t.label})({marginRight:6}),Ult=oe(kn,{name:"MuiPickersCalendarHeader",slot:"SwitchViewButton",overridesResolver:(e,t)=>t.switchViewButton})({marginRight:"auto",variants:[{props:{view:"year"},style:{[`.${Llt.switchViewIcon}`]:{transform:"rotate(180deg)"}}}]}),Wlt=oe(Lot,{name:"MuiPickersCalendarHeader",slot:"SwitchViewIcon",overridesResolver:(e,t)=>t.switchViewIcon})(({theme:e})=>({willChange:"transform",transition:e.transitions.create("transform"),transform:"rotate(0deg)"})),Glt=y.forwardRef(function(t,n){const r=To(),o=hn(),i=Zt({props:t,name:"MuiPickersCalendarHeader"}),{slots:a,slotProps:s,currentMonth:l,disabled:c,disableFuture:u,disablePast:d,maxDate:f,minDate:p,onMonthChange:m,onViewChange:g,view:v,reduceAnimations:w,views:x,labelId:S,className:P,timezone:T,format:E=`${o.formats.month} ${o.formats.year}`}=i,O=_t(i,Flt),k=i,A=Blt(i),I=(a==null?void 0:a.switchViewButton)??Ult,R=Vn({elementType:I,externalSlotProps:s==null?void 0:s.switchViewButton,additionalProps:{size:"small","aria-label":r.calendarViewSwitchingButtonAriaLabel(v)},ownerState:k,className:A.switchViewButton}),N=(a==null?void 0:a.switchViewIcon)??Wlt,L=Vn({elementType:N,externalSlotProps:s==null?void 0:s.switchViewIcon,ownerState:k,className:A.switchViewIcon}),j=_t(L,jlt),_=()=>m(o.addMonths(l,1),"left"),D=()=>m(o.addMonths(l,-1),"right"),z=Zot(l,{disableFuture:u,maxDate:f,timezone:T}),F=eit(l,{disablePast:d,minDate:p,timezone:T}),H=()=>{if(!(x.length===1||!g||c))if(x.length===2)g(x.find(q=>q!==v)||x[0]);else{const q=x.indexOf(v)!==0?0:1;g(x[q])}};if(x.length===1&&x[0]==="year")return null;const U=o.formatByString(l,E);return $.jsxs(zlt,ue({},O,{ownerState:k,className:de(A.root,P),ref:n,children:[$.jsxs(Vlt,{role:"presentation",onClick:H,ownerState:k,"aria-live":"polite",className:A.labelContainer,children:[$.jsx(gie,{reduceAnimations:w,transKey:U,children:$.jsx(Hlt,{id:S,ownerState:k,className:A.label,children:U})}),x.length>1&&!c&&$.jsx(I,ue({},R,{children:$.jsx(N,ue({},j))}))]}),$.jsx(jv,{in:v==="day",children:$.jsx(zoe,{slots:a,slotProps:s,onGoToPrevious:D,isPreviousDisabled:F,previousLabel:r.previousMonth,onGoToNext:_,isNextDisabled:z,nextLabel:r.nextMonth})})]}))}),qlt="@media (prefers-reduced-motion: reduce)",ly=typeof navigator<"u"&&navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i),h9=ly&&ly[1]?parseInt(ly[1],10):null,m9=ly&&ly[2]?parseInt(ly[2],10):null,Klt=h9&&h9<10||m9&&m9<13||!1,vie=()=>yS(qlt,{defaultMatches:!1})||Klt,Ylt=e=>Fn("MuiDateCalendar",e);Un("MuiDateCalendar",["root","viewTransitionContainer"]);const Xlt=["autoFocus","onViewChange","value","defaultValue","referenceDate","disableFuture","disablePast","onChange","onYearChange","onMonthChange","reduceAnimations","shouldDisableDate","shouldDisableMonth","shouldDisableYear","view","views","openTo","className","disabled","readOnly","minDate","maxDate","disableHighlightToday","focusedView","onFocusedViewChange","showDaysOutsideCurrentMonth","fixedWeekNumber","dayOfWeekFormatter","slots","slotProps","loading","renderLoading","displayWeekNumber","yearsOrder","yearsPerRow","monthsPerRow","timezone"],Qlt=e=>{const{classes:t}=e;return Dn({root:["root"],viewTransitionContainer:["viewTransitionContainer"]},Ylt,t)};function Jlt(e,t){const n=hn(),r=tm(),o=vie(),i=Zt({props:e,name:t});return ue({},i,{loading:i.loading??!1,disablePast:i.disablePast??!1,disableFuture:i.disableFuture??!1,openTo:i.openTo??"day",views:i.views??["year","day"],reduceAnimations:i.reduceAnimations??o,renderLoading:i.renderLoading??(()=>$.jsx("span",{children:"..."})),minDate:Ti(n,i.minDate,r.minDate),maxDate:Ti(n,i.maxDate,r.maxDate)})}const Zlt=oe(jk,{name:"MuiDateCalendar",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"flex",flexDirection:"column",height:Fk}),ect=oe(gie,{name:"MuiDateCalendar",slot:"ViewTransitionContainer",overridesResolver:(e,t)=>t.viewTransitionContainer})({}),tct=y.forwardRef(function(t,n){const r=hn(),o=db(),i=Jlt(t,"MuiDateCalendar"),{autoFocus:a,onViewChange:s,value:l,defaultValue:c,referenceDate:u,disableFuture:d,disablePast:f,onChange:p,onYearChange:m,onMonthChange:g,reduceAnimations:v,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,view:P,views:T,openTo:E,className:O,disabled:k,readOnly:A,minDate:I,maxDate:R,disableHighlightToday:N,focusedView:L,onFocusedViewChange:j,showDaysOutsideCurrentMonth:_,fixedWeekNumber:D,dayOfWeekFormatter:z,slots:F,slotProps:H,loading:U,renderLoading:q,displayWeekNumber:X,yearsOrder:ae,yearsPerRow:Z,monthsPerRow:K,timezone:te}=i,pe=_t(i,Xlt),{value:ie,handleValueChange:le,timezone:re}=pb({name:"DateCalendar",timezone:te,value:l,defaultValue:c,onChange:p,valueManager:ro}),{view:fe,setView:ee,focusedView:ce,setFocusedView:me,goToNextView:we,setValueAndGoToNextView:ge}=QS({view:P,views:T,openTo:E,onChange:le,onViewChange:s,autoFocus:a,focusedView:L,onFocusedViewChange:j}),{referenceDate:Se,calendarState:xe,changeFocusedDay:Ie,changeMonth:Re,handleChangeMonth:_e,isDateDisabled:ye,onMonthSwitchingAnimationEnd:Te}=Vst({value:ie,referenceDate:u,reduceAnimations:v,onMonthChange:g,minDate:I,maxDate:R,shouldDisableDate:w,disablePast:f,disableFuture:d,timezone:re}),Oe=k&&ie||I,Me=k&&ie||R,We=`${o}-grid-label`,Ve=ce!==null,Qe=(F==null?void 0:F.calendarHeader)??Glt,ut=Vn({elementType:Qe,externalSlotProps:H==null?void 0:H.calendarHeader,additionalProps:{views:T,view:fe,currentMonth:xe.currentMonth,onViewChange:ee,onMonthChange:(Ot,un)=>_e({newMonth:Ot,direction:un}),minDate:Oe,maxDate:Me,disabled:k,disablePast:f,disableFuture:d,reduceAnimations:v,timezone:re,labelId:We},ownerState:i}),nt=Ct(Ot=>{const un=r.startOfMonth(Ot),jn=r.endOfMonth(Ot),Wn=ye(Ot)?Tw({utils:r,date:Ot,minDate:r.isBefore(I,un)?un:I,maxDate:r.isAfter(R,jn)?jn:R,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:re}):Ot;Wn?(ge(Wn,"finish"),g==null||g(un)):(we(),Re(un)),Ie(Wn,!0)}),et=Ct(Ot=>{const un=r.startOfYear(Ot),jn=r.endOfYear(Ot),Wn=ye(Ot)?Tw({utils:r,date:Ot,minDate:r.isBefore(I,un)?un:I,maxDate:r.isAfter(R,jn)?jn:R,disablePast:f,disableFuture:d,isDateDisabled:ye,timezone:re}):Ot;Wn?(ge(Wn,"finish"),m==null||m(Wn)):(we(),Re(un)),Ie(Wn,!0)}),yt=Ct(Ot=>le(Ot&&tO(r,Ot,ie??Se),"finish",fe));y.useEffect(()=>{ie!=null&&r.isValid(ie)&&Re(ie)},[ie]);const wn=i,Ke=Qlt(wn),$e={disablePast:f,disableFuture:d,maxDate:R,minDate:I},Xe={disableHighlightToday:N,readOnly:A,disabled:k,timezone:re,gridLabelId:We,slots:F,slotProps:H},bt=y.useRef(fe);y.useEffect(()=>{bt.current!==fe&&(ce===bt.current&&me(fe,!0),bt.current=fe)},[ce,me,fe]);const Vt=y.useMemo(()=>[ie],[ie]);return $.jsxs(Zlt,ue({ref:n,className:de(Ke.root,O),ownerState:wn},pe,{children:[$.jsx(Qe,ue({},ut,{slots:F,slotProps:H})),$.jsx(ect,{reduceAnimations:v,className:Ke.viewTransitionContainer,transKey:fe,ownerState:wn,children:$.jsxs("div",{children:[fe==="year"&&$.jsx(Dlt,ue({},$e,Xe,{value:ie,onChange:et,shouldDisableYear:S,hasFocus:Ve,onFocusedViewChange:Ot=>me("year",Ot),yearsOrder:ae,yearsPerRow:Z,referenceDate:Se})),fe==="month"&&$.jsx(Clt,ue({},$e,Xe,{hasFocus:Ve,className:O,value:ie,onChange:nt,shouldDisableMonth:x,onFocusedViewChange:Ot=>me("month",Ot),monthsPerRow:K,referenceDate:Se})),fe==="day"&&$.jsx(dlt,ue({},xe,$e,Xe,{onMonthSwitchingAnimationEnd:Te,onFocusedDayChange:Ie,reduceAnimations:v,selectedDays:Vt,onSelectedDaysChange:yt,shouldDisableDate:w,shouldDisableMonth:x,shouldDisableYear:S,hasFocus:Ve,onFocusedViewChange:Ot=>me("day",Ot),showDaysOutsideCurrentMonth:_,fixedWeekNumber:D,dayOfWeekFormatter:z,displayWeekNumber:X,loading:U,renderLoading:q}))]})})]}))});function bie(e){return Fn("MuiPickersToolbar",e)}const nct=Un("MuiPickersToolbar",["root","content"]),rct=["children","className","toolbarTitle","hidden","titleId","isLandscape","classes","landscapeDirection"],oct=e=>{const{classes:t,isLandscape:n}=e;return Dn({root:["root"],content:["content"],penIconButton:["penIconButton",n&&"penIconButtonLandscape"]},bie,t)},ict=oe("div",{name:"MuiPickersToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({display:"flex",flexDirection:"column",alignItems:"flex-start",justifyContent:"space-between",padding:e.spacing(2,3),variants:[{props:{isLandscape:!0},style:{height:"auto",maxWidth:160,padding:16,justifyContent:"flex-start",flexWrap:"wrap"}}]})),act=oe("div",{name:"MuiPickersToolbar",slot:"Content",overridesResolver:(e,t)=>t.content})({display:"flex",flexWrap:"wrap",width:"100%",flex:1,justifyContent:"space-between",alignItems:"center",flexDirection:"row",variants:[{props:{isLandscape:!0},style:{justifyContent:"flex-start",alignItems:"flex-start",flexDirection:"column"}},{props:{isLandscape:!0,landscapeDirection:"row"},style:{flexDirection:"row"}}]}),FB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersToolbar"}),{children:o,className:i,toolbarTitle:a,hidden:s,titleId:l}=r,c=_t(r,rct),u=r,d=oct(u);return s?null:$.jsxs(ict,ue({ref:n,className:de(d.root,i),ownerState:u},c,{children:[$.jsx(ct,{color:"text.secondary",variant:"overline",id:l,children:a}),$.jsx(act,{className:d.content,ownerState:u,children:o})]}))});function sct(e){return Fn("MuiDatePickerToolbar",e)}Un("MuiDatePickerToolbar",["root","title"]);const lct=["value","isLandscape","onChange","toolbarFormat","toolbarPlaceholder","views","className","onViewChange","view"],cct=e=>{const{classes:t}=e;return Dn({root:["root"],title:["title"]},sct,t)},uct=oe(FB,{name:"MuiDatePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),dct=oe(ct,{name:"MuiDatePickerToolbar",slot:"Title",overridesResolver:(e,t)=>t.title})({variants:[{props:{isLandscape:!0},style:{margin:"auto 16px auto auto"}}]}),fct=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDatePickerToolbar"}),{value:o,isLandscape:i,toolbarFormat:a,toolbarPlaceholder:s="––",views:l,className:c}=r,u=_t(r,lct),d=hn(),f=To(),p=cct(r),m=y.useMemo(()=>{if(!o)return s;const v=Ux(d,{format:a,views:l},!0);return d.formatByString(o,v)},[o,a,s,d,l]),g=r;return $.jsx(uct,ue({ref:n,toolbarTitle:f.datePickerToolbarTitle,isLandscape:i,className:de(p.root,c)},u,{children:$.jsx(dct,{variant:"h4",align:i?"left":"center",ownerState:g,className:p.title,children:m})}))});function wie(e,t){const n=hn(),r=tm(),o=Zt({props:e,name:t}),i=y.useMemo(()=>{var a;return((a=o.localeText)==null?void 0:a.toolbarTitle)==null?o.localeText:ue({},o.localeText,{datePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,{localeText:i},SB({views:o.views,openTo:o.openTo,defaultViews:["year","day"],defaultOpenTo:"day"}),{disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Ti(n,o.minDate,r.minDate),maxDate:Ti(n,o.maxDate,r.maxDate),slots:ue({toolbar:fct},o.slots)})}function pct(e){return Fn("MuiPickersPopper",e)}Un("MuiPickersPopper",["root","paper"]);const hct=["PaperComponent","popperPlacement","ownerState","children","paperSlotProps","paperClasses","onPaperClick","onPaperTouchStart"],mct=e=>{const{classes:t}=e;return Dn({root:["root"],paper:["paper"]},pct,t)},gct=oe(Hf,{name:"MuiPickersPopper",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({zIndex:e.zIndex.modal})),yct=oe(uo,{name:"MuiPickersPopper",slot:"Paper",overridesResolver:(e,t)=>t.paper})({outline:0,transformOrigin:"top center",variants:[{props:({placement:e})=>["top","top-start","top-end"].includes(e),style:{transformOrigin:"bottom center"}}]});function vct(e,t){return t.documentElement.clientWidth{if(!e)return;function l(){i.current=!0}return document.addEventListener("mousedown",l,!0),document.addEventListener("touchstart",l,!0),()=>{document.removeEventListener("mousedown",l,!0),document.removeEventListener("touchstart",l,!0),i.current=!1}},[e]);const a=Ct(l=>{if(!i.current)return;const c=r.current;r.current=!1;const u=sR(o.current);if(!o.current||"clientX"in l&&vct(l,u))return;if(n.current){n.current=!1;return}let d;l.composedPath?d=l.composedPath().indexOf(o.current)>-1:d=!u.documentElement.contains(l.target)||o.current.contains(l.target),!d&&!c&&t(l)}),s=()=>{r.current=!0};return y.useEffect(()=>{if(e){const l=sR(o.current),c=()=>{n.current=!0};return l.addEventListener("touchstart",a),l.addEventListener("touchmove",c),()=>{l.removeEventListener("touchstart",a),l.removeEventListener("touchmove",c)}}},[e,a]),y.useEffect(()=>{if(e){const l=sR(o.current);return l.addEventListener("click",a),()=>{l.removeEventListener("click",a),r.current=!1}}},[e,a]),[o,s,s]}const wct=y.forwardRef((e,t)=>{const{PaperComponent:n,popperPlacement:r,ownerState:o,children:i,paperSlotProps:a,paperClasses:s,onPaperClick:l,onPaperTouchStart:c}=e,u=_t(e,hct),d=ue({},o,{placement:r}),f=Vn({elementType:n,externalSlotProps:a,additionalProps:{tabIndex:-1,elevation:8,ref:t},className:s,ownerState:d});return $.jsx(n,ue({},u,f,{onClick:p=>{var m;l(p),(m=f.onClick)==null||m.call(f,p)},onTouchStart:p=>{var m;c(p),(m=f.onTouchStart)==null||m.call(f,p)},ownerState:d,children:i}))});function xct(e){const t=Zt({props:e,name:"MuiPickersPopper"}),{anchorEl:n,children:r,containerRef:o=null,shouldRestoreFocus:i,onBlur:a,onDismiss:s,open:l,role:c,placement:u,slots:d,slotProps:f,reduceAnimations:p}=t;y.useEffect(()=>{function _(D){l&&D.key==="Escape"&&s()}return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[s,l]);const m=y.useRef(null);y.useEffect(()=>{c==="tooltip"||i&&!i()||(l?m.current=ua(document):m.current&&m.current instanceof HTMLElement&&setTimeout(()=>{m.current instanceof HTMLElement&&m.current.focus()}))},[l,c,i]);const[g,v,w]=bct(l,a??s),x=y.useRef(null),S=Qi(x,o),P=Qi(S,g),T=t,E=mct(T),O=vie(),k=p??O,A=_=>{_.key==="Escape"&&(_.stopPropagation(),s())},I=(d==null?void 0:d.desktopTransition)??k?jv:kf,R=(d==null?void 0:d.desktopTrapFocus)??KF,N=(d==null?void 0:d.desktopPaper)??yct,L=(d==null?void 0:d.popper)??gct,j=Vn({elementType:L,externalSlotProps:f==null?void 0:f.popper,additionalProps:{transition:!0,role:c,open:l,anchorEl:n,placement:u,onKeyDown:A},className:E.root,ownerState:t});return $.jsx(L,ue({},j,{children:({TransitionProps:_,placement:D})=>$.jsx(R,ue({open:l,disableAutoFocus:!0,disableRestoreFocus:!0,disableEnforceFocus:c==="tooltip",isEnabled:()=>!0},f==null?void 0:f.desktopTrapFocus,{children:$.jsx(I,ue({},_,f==null?void 0:f.desktopTransition,{children:$.jsx(wct,{PaperComponent:N,ownerState:T,popperPlacement:D,ref:P,onPaperClick:v,onPaperTouchStart:w,paperClasses:E.paper,paperSlotProps:f==null?void 0:f.desktopPaper,children:r})}))}))}))}const Sct=({open:e,onOpen:t,onClose:n})=>{const r=y.useRef(typeof e=="boolean").current,[o,i]=y.useState(!1);y.useEffect(()=>{if(r){if(typeof e!="boolean")throw new Error("You must not mix controlling and uncontrolled mode for `open` prop");i(e)}},[r,e]);const a=y.useCallback(s=>{r||i(s),s&&t&&t(),!s&&n&&n()},[r,t,n]);return{isOpen:o,setIsOpen:a}},Cct=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o}=e,i=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromField"?!0:t.name==="setValueFromAction"?i&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastPublishedValue):t.name==="setValueFromView"&&t.selectionState!=="shallow"||t.name==="setValueFromShortcut"?i?!0:n(r.lastPublishedValue):!1},Pct=e=>{const{action:t,hasChanged:n,dateState:r,isControlled:o,closeOnSelect:i}=e,a=!o&&!r.hasBeenModifiedSinceMount;return t.name==="setValueFromAction"?a&&["accept","today","clear"].includes(t.pickerAction)?!0:n(r.lastCommittedValue):t.name==="setValueFromView"&&t.selectionState==="finish"&&i?a?!0:n(r.lastCommittedValue):t.name==="setValueFromShortcut"?t.changeImportance==="accept"&&n(r.lastCommittedValue):!1},Tct=e=>{const{action:t,closeOnSelect:n}=e;return t.name==="setValueFromAction"?!0:t.name==="setValueFromView"?t.selectionState==="finish"&&n:t.name==="setValueFromShortcut"?t.changeImportance==="accept":!1},Ect=({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:o})=>{const{onAccept:i,onChange:a,value:s,defaultValue:l,closeOnSelect:c=r==="desktop",timezone:u}=e,{current:d}=y.useRef(l),{current:f}=y.useRef(s!==void 0),p=hn(),m=em(),{isOpen:g,setIsOpen:v}=Sct(e),{timezone:w,value:x,handleValueChange:S}=TB({timezone:u,value:s,defaultValue:d,onChange:a,valueManager:t}),[P,T]=y.useState(()=>{let K;return x!==void 0?K=x:d!==void 0?K=d:K=t.emptyValue,{draft:K,lastPublishedValue:K,lastCommittedValue:K,lastControlledValue:x,hasBeenModifiedSinceMount:!1}}),{getValidationErrorForNewValue:E}=rie({props:e,validator:o,timezone:w,value:P.draft,onError:e.onError}),O=Ct(K=>{const te={action:K,dateState:P,hasChanged:ee=>!t.areValuesEqual(p,K.value,ee),isControlled:f,closeOnSelect:c},pe=Cct(te),ie=Pct(te),le=Tct(te);T(ee=>ue({},ee,{draft:K.value,lastPublishedValue:pe?K.value:ee.lastPublishedValue,lastCommittedValue:ie?K.value:ee.lastCommittedValue,hasBeenModifiedSinceMount:!0}));let re=null;const fe=()=>(re||(re={validationError:K.name==="setValueFromField"?K.context.validationError:E(K.value)},K.name==="setValueFromShortcut"&&(re.shortcut=K.shortcut)),re);pe&&S(K.value,fe()),ie&&i&&i(K.value,fe()),le&&v(!1)});if(x!==void 0&&(P.lastControlledValue===void 0||!t.areValuesEqual(p,P.lastControlledValue,x))){const K=t.areValuesEqual(p,P.draft,x);T(te=>ue({},te,{lastControlledValue:x},K?{}:{lastCommittedValue:x,lastPublishedValue:x,draft:x,hasBeenModifiedSinceMount:!0}))}const k=Ct(()=>{O({value:t.emptyValue,name:"setValueFromAction",pickerAction:"clear"})}),A=Ct(()=>{O({value:P.lastPublishedValue,name:"setValueFromAction",pickerAction:"accept"})}),I=Ct(()=>{O({value:P.lastPublishedValue,name:"setValueFromAction",pickerAction:"dismiss"})}),R=Ct(()=>{O({value:P.lastCommittedValue,name:"setValueFromAction",pickerAction:"cancel"})}),N=Ct(()=>{O({value:t.getTodayValue(p,w,n),name:"setValueFromAction",pickerAction:"today"})}),L=Ct(K=>{K.preventDefault(),v(!0)}),j=Ct(K=>{K==null||K.preventDefault(),v(!1)}),_=Ct((K,te="partial")=>O({name:"setValueFromView",value:K,selectionState:te})),D=Ct((K,te,pe)=>O({name:"setValueFromShortcut",value:K,changeImportance:te,shortcut:pe})),z=Ct((K,te)=>O({name:"setValueFromField",value:K,context:te})),F={onClear:k,onAccept:A,onDismiss:I,onCancel:R,onSetToday:N,onOpen:L,onClose:j},H={value:P.draft,onChange:z},U=y.useMemo(()=>t.cleanValue(p,P.draft),[p,t,P.draft]),q={value:U,onChange:_,onClose:j,open:g},ae=ue({},F,{value:U,onChange:_,onSelectShortcut:D,isValid:K=>{const te=o({adapter:m,value:K,timezone:w,props:e});return!t.hasError(te)}}),Z=y.useMemo(()=>({onOpen:L,onClose:j,open:g}),[g,j,L]);return{open:g,fieldProps:H,viewProps:q,layoutProps:ae,actions:F,contextValue:Z}},Oct=["className","sx"],Ict=({props:e,propsFromPickerValue:t,additionalViewProps:n,autoFocusView:r,rendererInterceptor:o,fieldRef:i})=>{const{onChange:a,open:s,onClose:l}=t,{view:c,views:u,openTo:d,onViewChange:f,viewRenderers:p,timezone:m}=e,g=_t(e,Oct),{view:v,setView:w,defaultView:x,focusedView:S,setFocusedView:P,setValueAndGoToNextView:T}=QS({view:c,views:u,openTo:d,onChange:a,onViewChange:f,autoFocus:r}),{hasUIView:E,viewModeLookup:O}=y.useMemo(()=>u.reduce((j,_)=>{let D;return p[_]!=null?D="UI":D="field",j.viewModeLookup[_]=D,D==="UI"&&(j.hasUIView=!0),j},{hasUIView:!1,viewModeLookup:{}}),[p,u]),k=y.useMemo(()=>u.reduce((j,_)=>p[_]!=null&&Sv(_)?j+1:j,0),[p,u]),A=O[v],I=Ct(()=>A==="UI"),[R,N]=y.useState(A==="UI"?v:null);return R!==v&&O[v]==="UI"&&N(v),Uc(()=>{A==="field"&&s&&(l(),setTimeout(()=>{var j,_;(j=i==null?void 0:i.current)==null||j.setSelectedSections(v),(_=i==null?void 0:i.current)==null||_.focusField(v)}))},[v]),Uc(()=>{if(!s)return;let j=v;A==="field"&&R!=null&&(j=R),j!==x&&O[j]==="UI"&&O[x]==="UI"&&(j=x),j!==v&&w(j),P(j,!0)},[s]),{hasUIView:E,shouldRestoreFocus:I,layoutProps:{views:u,view:R,onViewChange:w},renderCurrentView:()=>{if(R==null)return null;const j=p[R];if(j==null)return null;const _=ue({},g,n,t,{views:u,timezone:m,onChange:T,view:R,onViewChange:w,focusedView:S,onFocusedViewChange:P,showViewSwitcher:k>1,timeViewsCount:k});return o?o(p,R,_):j(_)}}};function g9(){return typeof window>"u"?"portrait":window.screen&&window.screen.orientation&&window.screen.orientation.angle?Math.abs(window.screen.orientation.angle)===90?"landscape":"portrait":window.orientation&&Math.abs(Number(window.orientation))===90?"landscape":"portrait"}const kct=(e,t)=>{const[n,r]=y.useState(g9);return Uc(()=>{const i=()=>{r(g9())};return window.addEventListener("orientationchange",i),()=>{window.removeEventListener("orientationchange",i)}},[]),pg(e,["hours","minutes","seconds"])?!1:(t||n)==="landscape"},Mct=({props:e,propsFromPickerValue:t,propsFromPickerViews:n,wrapperVariant:r})=>{const{orientation:o}=e,i=kct(n.views,o),a=nr();return{layoutProps:ue({},n,t,{isLandscape:i,isRtl:a,wrapperVariant:r,disabled:e.disabled,readOnly:e.readOnly})}};function Act(e){const{props:t,pickerValueResponse:n}=e;return y.useMemo(()=>({value:n.viewProps.value,open:n.open,disabled:t.disabled??!1,readOnly:t.readOnly??!1}),[n.viewProps.value,n.open,t.disabled,t.readOnly])}const xie=({props:e,valueManager:t,valueType:n,wrapperVariant:r,additionalViewProps:o,validator:i,autoFocusView:a,rendererInterceptor:s,fieldRef:l})=>{const c=Ect({props:e,valueManager:t,valueType:n,wrapperVariant:r,validator:i}),u=Ict({props:e,additionalViewProps:o,autoFocusView:a,fieldRef:l,propsFromPickerValue:c.viewProps,rendererInterceptor:s}),d=Mct({props:e,wrapperVariant:r,propsFromPickerValue:c.layoutProps,propsFromPickerViews:u.layoutProps}),f=Act({props:e,pickerValueResponse:c});return{open:c.open,actions:c.actions,fieldProps:c.fieldProps,renderCurrentView:u.renderCurrentView,hasUIView:u.hasUIView,shouldRestoreFocus:u.shouldRestoreFocus,layoutProps:d.layoutProps,contextValue:c.contextValue,ownerState:f}};function Sie(e){return Fn("MuiPickersLayout",e)}const jl=Un("MuiPickersLayout",["root","landscape","contentWrapper","toolbar","actionBar","tabs","shortcuts"]),$ct=["onAccept","onClear","onCancel","onSetToday","actions"];function Rct(e){const{onAccept:t,onClear:n,onCancel:r,onSetToday:o,actions:i}=e,a=_t(e,$ct),s=To();if(i==null||i.length===0)return null;const l=i==null?void 0:i.map(c=>{switch(c){case"clear":return $.jsx(gt,{onClick:n,children:s.clearButtonLabel},c);case"cancel":return $.jsx(gt,{onClick:r,children:s.cancelButtonLabel},c);case"accept":return $.jsx(gt,{onClick:t,children:s.okButtonLabel},c);case"today":return $.jsx(gt,{onClick:o,children:s.todayButtonLabel},c);default:return null}});return $.jsx(vZ,ue({},a,{children:l}))}const _ct=["items","changeImportance","isLandscape","onChange","isValid"],Dct=["getValue"];function Nct(e){const{items:t,changeImportance:n="accept",onChange:r,isValid:o}=e,i=_t(e,_ct);if(t==null||t.length===0)return null;const a=t.map(s=>{let{getValue:l}=s,c=_t(s,Dct);const u=l({isValid:o});return ue({},c,{label:c.label,onClick:()=>{r(u,n,c)},disabled:!o(u)})});return $.jsx(pl,ue({dense:!0,sx:[{maxHeight:Fk,maxWidth:200,overflow:"auto"},...Array.isArray(i.sx)?i.sx:[i.sx]]},i,{children:a.map(s=>$.jsx(ls,{children:$.jsx(kh,ue({},s))},s.id??s.label))}))}function Lct(e){return e.view!==null}const Fct=e=>{const{classes:t,isLandscape:n}=e;return Dn({root:["root",n&&"landscape"],contentWrapper:["contentWrapper"],toolbar:["toolbar"],actionBar:["actionBar"],tabs:["tabs"],landscape:["landscape"],shortcuts:["shortcuts"]},Sie,t)},Cie=e=>{const{wrapperVariant:t,onAccept:n,onClear:r,onCancel:o,onSetToday:i,view:a,views:s,onViewChange:l,value:c,onChange:u,onSelectShortcut:d,isValid:f,isLandscape:p,disabled:m,readOnly:g,children:v,slots:w,slotProps:x}=e,S=Fct(e),P=(w==null?void 0:w.actionBar)??Rct,T=Vn({elementType:P,externalSlotProps:x==null?void 0:x.actionBar,additionalProps:{onAccept:n,onClear:r,onCancel:o,onSetToday:i,actions:t==="desktop"?[]:["cancel","accept"]},className:S.actionBar,ownerState:ue({},e,{wrapperVariant:t})}),E=$.jsx(P,ue({},T)),O=w==null?void 0:w.toolbar,k=Vn({elementType:O,externalSlotProps:x==null?void 0:x.toolbar,additionalProps:{isLandscape:p,onChange:u,value:c,view:a,onViewChange:l,views:s,disabled:m,readOnly:g},className:S.toolbar,ownerState:ue({},e,{wrapperVariant:t})}),A=Lct(k)&&O?$.jsx(O,ue({},k)):null,I=v,R=w==null?void 0:w.tabs,N=a&&R?$.jsx(R,ue({view:a,onViewChange:l,className:S.tabs},x==null?void 0:x.tabs)):null,L=(w==null?void 0:w.shortcuts)??Nct,j=Vn({elementType:L,externalSlotProps:x==null?void 0:x.shortcuts,additionalProps:{isValid:f,isLandscape:p,onChange:d},className:S.shortcuts,ownerState:{isValid:f,isLandscape:p,onChange:d,wrapperVariant:t}}),_=a&&L?$.jsx(L,ue({},j)):null;return{toolbar:A,content:I,tabs:N,actionBar:E,shortcuts:_}},jct=e=>{const{isLandscape:t,classes:n}=e;return Dn({root:["root",t&&"landscape"],contentWrapper:["contentWrapper"]},Sie,n)},Pie=oe("div",{name:"MuiPickersLayout",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"grid",gridAutoColumns:"max-content auto max-content",gridAutoRows:"max-content auto max-content",[`& .${jl.actionBar}`]:{gridColumn:"1 / 4",gridRow:3},variants:[{props:{isLandscape:!0},style:{[`& .${jl.toolbar}`]:{gridColumn:1,gridRow:"2 / 3"},[`.${jl.shortcuts}`]:{gridColumn:"2 / 4",gridRow:1}}},{props:{isLandscape:!0,isRtl:!0},style:{[`& .${jl.toolbar}`]:{gridColumn:3}}},{props:{isLandscape:!1},style:{[`& .${jl.toolbar}`]:{gridColumn:"2 / 4",gridRow:1},[`& .${jl.shortcuts}`]:{gridColumn:1,gridRow:"2 / 3"}}},{props:{isLandscape:!1,isRtl:!0},style:{[`& .${jl.shortcuts}`]:{gridColumn:3}}}]}),Tie=oe("div",{name:"MuiPickersLayout",slot:"ContentWrapper",overridesResolver:(e,t)=>t.contentWrapper})({gridColumn:2,gridRow:2,display:"flex",flexDirection:"column"}),Eie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersLayout"}),{toolbar:o,content:i,tabs:a,actionBar:s,shortcuts:l}=Cie(r),{sx:c,className:u,isLandscape:d,wrapperVariant:f}=r,p=jct(r);return $.jsxs(Pie,{ref:n,sx:c,className:de(p.root,u),ownerState:r,children:[d?l:o,d?o:l,$.jsx(Tie,{className:p.contentWrapper,children:f==="desktop"?$.jsxs(y.Fragment,{children:[i,a]}):$.jsxs(y.Fragment,{children:[a,i]})}),s]})}),Bct=["props","getOpenDialogAriaText"],zct=["ownerState"],Vct=["ownerState"],jB=e=>{var we;let{props:t,getOpenDialogAriaText:n}=e,r=_t(e,Bct);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:m,label:g,inputRef:v,readOnly:w,disabled:x,autoFocus:S,localeText:P,reduceAnimations:T}=t,E=y.useRef(null),O=y.useRef(null),k=db(),A=((we=i==null?void 0:i.toolbar)==null?void 0:we.hidden)??!1,{open:I,actions:R,hasUIView:N,layoutProps:L,renderCurrentView:j,shouldRestoreFocus:_,fieldProps:D,contextValue:z,ownerState:F}=xie(ue({},r,{props:t,fieldRef:O,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"desktop"})),H=o.inputAdornment??po,U=Vn({elementType:H,externalSlotProps:i==null?void 0:i.inputAdornment,additionalProps:{position:"end"},ownerState:t}),q=_t(U,zct),X=o.openPickerButton??kn,ae=Vn({elementType:X,externalSlotProps:i==null?void 0:i.openPickerButton,additionalProps:{disabled:x||w,onClick:I?R.onClose:R.onOpen,"aria-label":n(D.value),edge:q.position},ownerState:t}),Z=_t(ae,Vct),K=o.openPickerIcon,te=Vn({elementType:K,externalSlotProps:i==null?void 0:i.openPickerIcon,ownerState:F}),pe=o.field,ie=Vn({elementType:pe,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},D,A&&{id:k},{readOnly:w,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:g,name:m,autoFocus:S&&!t.open,focused:I?!0:void 0},v?{inputRef:v}:{}),ownerState:t});N&&(ie.InputProps=ue({},ie.InputProps,{ref:E},!t.disableOpenPicker&&{[`${q.position}Adornment`]:$.jsx(H,ue({},q,{children:$.jsx(X,ue({},Z,{children:$.jsx(K,ue({},te))}))}))}));const le=ue({textField:o.textField,clearIcon:o.clearIcon,clearButton:o.clearButton},ie.slots),re=o.layout??Eie;let fe=k;A&&(g?fe=`${k}-label`:fe=void 0);const ee=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:k}),popper:ue({"aria-labelledby":fe},i==null?void 0:i.popper)}),ce=Qi(O,ie.unstableFieldRef);return{renderPicker:()=>$.jsxs(oie,{contextValue:z,localeText:P,children:[$.jsx(pe,ue({},ie,{slots:le,slotProps:ee,unstableFieldRef:ce})),$.jsx(xct,ue({role:"dialog",placement:"bottom-start",anchorEl:E.current},R,{open:I,slots:o,slotProps:ee,shouldRestoreFocus:_,reduceAnimations:T,children:$.jsx(re,ue({},L,ee==null?void 0:ee.layout,{slots:o,slotProps:ee,children:j()}))}))]})}},rl=({view:e,onViewChange:t,views:n,focusedView:r,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:T,yearsOrder:E,yearsPerRow:O,slots:k,slotProps:A,loading:I,renderLoading:R,disableHighlightToday:N,readOnly:L,disabled:j,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:D,sx:z,autoFocus:F,fixedWeekNumber:H,displayWeekNumber:U,timezone:q})=>$.jsx(tct,{view:e,onViewChange:t,views:n.filter(Pv),focusedView:r&&Pv(r)?r:null,onFocusedViewChange:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minDate:p,maxDate:m,shouldDisableDate:g,shouldDisableMonth:v,shouldDisableYear:w,reduceAnimations:x,onMonthChange:S,monthsPerRow:P,onYearChange:T,yearsOrder:E,yearsPerRow:O,slots:k,slotProps:A,loading:I,renderLoading:R,disableHighlightToday:N,readOnly:L,disabled:j,showDaysOutsideCurrentMonth:_,dayOfWeekFormatter:D,sx:z,autoFocus:F,fixedWeekNumber:H,displayWeekNumber:U,timezone:q}),Oie=y.forwardRef(function(t,n){var c,u;const r=To(),o=hn(),i=wie(t,"MuiDesktopDatePicker"),a=ue({day:rl,month:rl,year:rl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:Ux(o,i,!1),yearsPerRow:i.yearsPerRow??4,slots:ue({openPickerIcon:Boe,field:fie},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},$f((f=i.slotProps)==null?void 0:f.field,d),mb(i),{ref:n})},toolbar:ue({hidden:!0},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=jB({props:s,valueManager:ro,valueType:"date",getOpenDialogAriaText:fb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:hb});return l()});Oie.propTypes={autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:ub,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,minDate:B.object,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","month","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","month","year"]),viewRenderers:B.shape({day:B.func,month:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","month","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const Hct=oe(yZ)({[`& .${hw.container}`]:{outline:0},[`& .${hw.paper}`]:{outline:0,minWidth:Lk}}),Uct=oe(bZ)({"&:first-of-type":{padding:0}});function Wct(e){const{children:t,onDismiss:n,open:r,slots:o,slotProps:i}=e,a=(o==null?void 0:o.dialog)??Hct,s=(o==null?void 0:o.mobileTransition)??jv;return $.jsx(a,ue({open:r,onClose:n},i==null?void 0:i.dialog,{TransitionComponent:s,TransitionProps:i==null?void 0:i.mobileTransition,PaperComponent:o==null?void 0:o.mobilePaper,PaperProps:i==null?void 0:i.mobilePaper,children:$.jsx(Uct,{children:t})}))}const Gct=["props","getOpenDialogAriaText"],BB=e=>{var q;let{props:t,getOpenDialogAriaText:n}=e,r=_t(e,Gct);const{slots:o,slotProps:i,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,name:m,label:g,inputRef:v,readOnly:w,disabled:x,localeText:S}=t,P=y.useRef(null),T=db(),E=((q=i==null?void 0:i.toolbar)==null?void 0:q.hidden)??!1,{open:O,actions:k,layoutProps:A,renderCurrentView:I,fieldProps:R,contextValue:N}=xie(ue({},r,{props:t,fieldRef:P,autoFocusView:!0,additionalViewProps:{},wrapperVariant:"mobile"})),L=o.field,j=Vn({elementType:L,externalSlotProps:i==null?void 0:i.field,additionalProps:ue({},R,E&&{id:T},!(x||w)&&{onClick:k.onOpen,onKeyDown:rat(k.onOpen)},{readOnly:w??!0,disabled:x,className:a,sx:s,format:l,formatDensity:c,enableAccessibleFieldDOMStructure:u,selectedSections:d,onSelectedSectionsChange:f,timezone:p,label:g,name:m},v?{inputRef:v}:{}),ownerState:t});j.inputProps=ue({},j.inputProps,{"aria-label":n(R.value)});const _=ue({textField:o.textField},j.slots),D=o.layout??Eie;let z=T;E&&(g?z=`${T}-label`:z=void 0);const F=ue({},i,{toolbar:ue({},i==null?void 0:i.toolbar,{titleId:T}),mobilePaper:ue({"aria-labelledby":z},i==null?void 0:i.mobilePaper)}),H=Qi(P,j.unstableFieldRef);return{renderPicker:()=>$.jsxs(oie,{contextValue:N,localeText:S,children:[$.jsx(L,ue({},j,{slots:_,slotProps:F,unstableFieldRef:H})),$.jsx(Wct,ue({},k,{open:O,slots:o,slotProps:F,children:$.jsx(D,ue({},A,F==null?void 0:F.layout,{slots:o,slotProps:F,children:I()}))}))]})}},Iie=y.forwardRef(function(t,n){var c,u;const r=To(),o=hn(),i=wie(t,"MuiMobileDatePicker"),a=ue({day:rl,month:rl,year:rl},i.viewRenderers),s=ue({},i,{viewRenderers:a,format:Ux(o,i,!1),slots:ue({field:fie},i.slots),slotProps:ue({},i.slotProps,{field:d=>{var f;return ue({},$f((f=i.slotProps)==null?void 0:f.field,d),mb(i),{ref:n})},toolbar:ue({hidden:!1},(c=i.slotProps)==null?void 0:c.toolbar)})}),{renderPicker:l}=BB({props:s,valueManager:ro,valueType:"date",getOpenDialogAriaText:fb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(u=s.localeText)==null?void 0:u.openDatePickerDialogue}),validator:hb});return l()});Iie.propTypes={autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:ub,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,minDate:B.object,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","month","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","month","year"]),viewRenderers:B.shape({day:B.func,month:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","month","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const qct=["desktopModeMediaQuery"],kie=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDatePicker"}),{desktopModeMediaQuery:o=MB}=r,i=_t(r,qct);return yS(o,{defaultMatches:!0})?$.jsx(Oie,ue({ref:n},i)):$.jsx(Iie,ue({ref:n},i))});function Kct(e){return Fn("MuiPickersToolbarText",e)}const vN=Un("MuiPickersToolbarText",["root","selected"]),Yct=["className","selected","value"],Xct=e=>{const{classes:t,selected:n}=e;return Dn({root:["root",n&&"selected"]},Kct,t)},Qct=oe(ct,{name:"MuiPickersToolbarText",slot:"Root",overridesResolver:(e,t)=>[t.root,{[`&.${vN.selected}`]:t.selected}]})(({theme:e})=>({transition:e.transitions.create("color"),color:(e.vars||e).palette.text.secondary,[`&.${vN.selected}`]:{color:(e.vars||e).palette.text.primary}})),zB=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersToolbarText"}),{className:o,value:i}=r,a=_t(r,Yct),s=Xct(r);return $.jsx(Qct,ue({ref:n,className:de(s.root,o),component:"span"},a,{children:i}))}),Jct=["align","className","selected","typographyClassName","value","variant","width"],Zct=e=>{const{classes:t}=e;return Dn({root:["root"]},bie,t)},eut=oe(gt,{name:"MuiPickersToolbarButton",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:0,minWidth:16,textTransform:"none"}),za=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiPickersToolbarButton"}),{align:o,className:i,selected:a,typographyClassName:s,value:l,variant:c,width:u}=r,d=_t(r,Jct),f=Zct(r);return $.jsx(eut,ue({variant:"text",ref:n,className:de(f.root,i)},u?{sx:{width:u}}:{},d,{children:$.jsx(zB,{align:o,className:s,variant:c,value:l,selected:a})}))});function tut(e){return Fn("MuiTimePickerToolbar",e)}const Ew=Un("MuiTimePickerToolbar",["root","separator","hourMinuteLabel","hourMinuteLabelLandscape","hourMinuteLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),nut=["ampm","ampmInClock","value","isLandscape","onChange","view","onViewChange","views","disabled","readOnly","className"],rut=e=>{const{isLandscape:t,classes:n,isRtl:r}=e;return Dn({root:["root"],separator:["separator"],hourMinuteLabel:["hourMinuteLabel",t&&"hourMinuteLabelLandscape",r&&"hourMinuteLabelReverse"],ampmSelection:["ampmSelection",t&&"ampmLandscape"],ampmLabel:["ampmLabel"]},tut,n)},out=oe(FB,{name:"MuiTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})({}),iut=oe(zB,{name:"MuiTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({outline:0,margin:"0 4px 0 2px",cursor:"default"}),aut=oe("div",{name:"MuiTimePickerToolbar",slot:"HourMinuteLabel",overridesResolver:(e,t)=>[{[`&.${Ew.hourMinuteLabelLandscape}`]:t.hourMinuteLabelLandscape,[`&.${Ew.hourMinuteLabelReverse}`]:t.hourMinuteLabelReverse},t.hourMinuteLabel]})({display:"flex",justifyContent:"flex-end",alignItems:"flex-end",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{isLandscape:!0},style:{marginTop:"auto"}}]}),sut=oe("div",{name:"MuiTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${Ew.ampmLabel}`]:t.ampmLabel},{[`&.${Ew.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${Ew.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",flexBasis:"100%"}}]});function lut(e){const t=Zt({props:e,name:"MuiTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,isLandscape:i,onChange:a,view:s,onViewChange:l,views:c,disabled:u,readOnly:d,className:f}=t,p=_t(t,nut),m=hn(),g=To(),v=nr(),w=!!(n&&!r&&c.includes("hours")),{meridiemMode:x,handleMeridiemChange:S}=Dk(o,n,a),P=k=>n?m.format(k,"hours12h"):m.format(k,"hours24h"),T=ue({},t,{isRtl:v}),E=rut(T),O=$.jsx(iut,{tabIndex:-1,value:":",variant:"h3",selected:!1,className:E.separator});return $.jsxs(out,ue({landscapeDirection:"row",toolbarTitle:g.timePickerToolbarTitle,isLandscape:i,ownerState:T,className:de(E.root,f)},p,{children:[$.jsxs(aut,{className:E.hourMinuteLabel,ownerState:T,children:[pg(c,"hours")&&$.jsx(za,{tabIndex:-1,variant:"h3",onClick:()=>l("hours"),selected:s==="hours",value:o?P(o):"--"}),pg(c,["hours","minutes"])&&O,pg(c,"minutes")&&$.jsx(za,{tabIndex:-1,variant:"h3",onClick:()=>l("minutes"),selected:s==="minutes",value:o?m.format(o,"minutes"):"--"}),pg(c,["minutes","seconds"])&&O,pg(c,"seconds")&&$.jsx(za,{variant:"h3",onClick:()=>l("seconds"),selected:s==="seconds",value:o?m.format(o,"seconds"):"--"})]}),w&&$.jsxs(sut,{className:E.ampmSelection,ownerState:T,children:[$.jsx(za,{disableRipple:!0,variant:"subtitle2",selected:x==="am",typographyClassName:E.ampmLabel,value:Wl(m,"am"),onClick:d?void 0:()=>S("am"),disabled:u}),$.jsx(za,{disableRipple:!0,variant:"subtitle2",selected:x==="pm",typographyClassName:E.ampmLabel,value:Wl(m,"pm"),onClick:d?void 0:()=>S("pm"),disabled:u})]})]}))}function Mie(e,t){var a;const n=hn(),r=Zt({props:e,name:t}),o=r.ampm??n.is12HourCycleInCurrentLocale(),i=y.useMemo(()=>{var s;return((s=r.localeText)==null?void 0:s.toolbarTitle)==null?r.localeText:ue({},r.localeText,{timePickerToolbarTitle:r.localeText.toolbarTitle})},[r.localeText]);return ue({},r,{ampm:o,localeText:i},SB({views:r.views,openTo:r.openTo,defaultViews:["hours","minutes"],defaultOpenTo:"hours"}),{disableFuture:r.disableFuture??!1,disablePast:r.disablePast??!1,slots:ue({toolbar:lut},r.slots),slotProps:ue({},r.slotProps,{toolbar:ue({ampm:o,ampmInClock:r.ampmInClock},(a=r.slotProps)==null?void 0:a.toolbar)})})}const cy=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,ampmInClock:x,slots:S,slotProps:P,readOnly:T,disabled:E,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:I,timezone:R})=>$.jsx(eat,{view:e,onViewChange:t,focusedView:n&&Sv(n)?n:null,onFocusedViewChange:r,views:o.filter(Sv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,ampmInClock:x,slots:S,slotProps:P,readOnly:T,disabled:E,sx:O,autoFocus:k,showViewSwitcher:A,disableIgnoringDatePartForTimeValidation:I,timezone:R}),Aie=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R})=>$.jsx(cat,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(Sv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeStep:A==null?void 0:A.minutes,skipDisabled:I,timezone:R}),rO=({view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o,value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R})=>$.jsx(Sat,{view:e,onViewChange:t,focusedView:n,onFocusedViewChange:r,views:o.filter(Sv),value:i,defaultValue:a,referenceDate:s,onChange:l,className:c,classes:u,disableFuture:d,disablePast:f,minTime:p,maxTime:m,shouldDisableTime:g,minutesStep:v,ampm:w,slots:x,slotProps:S,readOnly:P,disabled:T,sx:E,autoFocus:O,disableIgnoringDatePartForTimeValidation:k,timeSteps:A,skipDisabled:I,timezone:R}),cut=["views","format"],$ie=(e,t,n)=>{let{views:r,format:o}=t,i=_t(t,cut);if(o)return o;const a=[],s=[];if(r.forEach(u=>{Sv(u)?s.push(u):Pv(u)&&a.push(u)}),s.length===0)return Ux(e,ue({views:a},i),!1);if(a.length===0)return eO(e,ue({views:s},i));const l=eO(e,ue({views:s},i));return`${Ux(e,ue({views:a},i),!1)} ${l}`},uut=(e,t,n)=>n?t.filter(r=>!W0(r)||r==="hours"):e?[...t,"meridiem"]:t,dut=(e,t)=>24*60/((e.hours??1)*(e.minutes??5))<=t;function Rie({thresholdToRenderTimeInASingleColumn:e,ampm:t,timeSteps:n,views:r}){const o=e??24,i=ue({hours:1,minutes:5,seconds:5},n),a=dut(i,o);return{thresholdToRenderTimeInASingleColumn:o,timeSteps:i,shouldRenderTimeInASingleColumn:a,views:uut(t,r,a)}}const _ie=y.forwardRef(function(t,n){var w,x,S,P;const r=To(),o=hn(),i=Mie(t,"MuiDesktopTimePicker"),{shouldRenderTimeInASingleColumn:a,views:s,timeSteps:l}=Rie(i),c=a?Aie:rO,u=ue({hours:c,minutes:c,seconds:c,meridiem:c},i.viewRenderers),d=i.ampmInClock??!0,f=a?[]:["accept"],m=((w=u.hours)==null?void 0:w.name)===rO.name?s:s.filter(T=>T!=="meridiem"),g=ue({},i,{ampmInClock:d,timeSteps:l,viewRenderers:u,format:eO(o,i),views:a?["hours"]:m,slots:ue({field:pie,openPickerIcon:Bot},i.slots),slotProps:ue({},i.slotProps,{field:T=>{var E;return ue({},$f((E=i.slotProps)==null?void 0:E.field,T),mb(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:d},(x=i.slotProps)==null?void 0:x.toolbar),actionBar:ue({actions:f},(S=i.slotProps)==null?void 0:S.actionBar)})}),{renderPicker:v}=jB({props:g,valueManager:ro,valueType:"time",getOpenDialogAriaText:fb({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(P=g.localeText)==null?void 0:P.openTimePickerDialogue}),validator:JS});return v()});_ie.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,enableAccessibleFieldDOMStructure:B.any,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:ub,label:B.node,localeText:B.object,maxTime:B.object,minTime:B.object,minutesStep:B.number,name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,open:B.bool,openTo:B.oneOf(["hours","meridiem","minutes","seconds"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableTime:B.func,skipDisabled:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),thresholdToRenderTimeInASingleColumn:B.number,timeSteps:B.shape({hours:B.number,minutes:B.number,seconds:B.number}),timezone:B.string,value:B.object,view:B.oneOf(["hours","meridiem","minutes","seconds"]),viewRenderers:B.shape({hours:B.func,meridiem:B.func,minutes:B.func,seconds:B.func}),views:B.arrayOf(B.oneOf(["hours","minutes","seconds"]).isRequired)};const Die=y.forwardRef(function(t,n){var u,d;const r=To(),o=hn(),i=Mie(t,"MuiMobileTimePicker"),a=ue({hours:cy,minutes:cy,seconds:cy},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{ampmInClock:s,viewRenderers:a,format:eO(o,i),slots:ue({field:pie},i.slots),slotProps:ue({},i.slotProps,{field:f=>{var p;return ue({},$f((p=i.slotProps)==null?void 0:p.field,f),mb(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar)})}),{renderPicker:c}=BB({props:l,valueManager:ro,valueType:"time",getOpenDialogAriaText:fb({utils:o,formatKey:"fullTime",contextTranslation:r.openTimePickerDialogue,propsTranslation:(d=l.localeText)==null?void 0:d.openTimePickerDialogue}),validator:JS});return c()});Die.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,enableAccessibleFieldDOMStructure:B.any,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:ub,label:B.node,localeText:B.object,maxTime:B.object,minTime:B.object,minutesStep:B.number,name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,open:B.bool,openTo:B.oneOf(["hours","minutes","seconds"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableTime:B.func,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["hours","minutes","seconds"]),viewRenderers:B.shape({hours:B.func,minutes:B.func,seconds:B.func}),views:B.arrayOf(B.oneOf(["hours","minutes","seconds"]).isRequired)};const fut=["desktopModeMediaQuery"],put=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiTimePicker"}),{desktopModeMediaQuery:o=MB}=r,i=_t(r,fut);return yS(o,{defaultMatches:!0})?$.jsx(_ie,ue({ref:n},i)):$.jsx(Die,ue({ref:n},i))});function hut(e){return Fn("MuiDateTimePickerTabs",e)}Un("MuiDateTimePickerTabs",["root"]);const mut=e=>Pv(e)?"date":"time",gut=e=>e==="date"?"day":"hours",yut=e=>{const{classes:t}=e;return Dn({root:["root"]},hut,t)},vut=oe(q$e,{name:"MuiDateTimePickerTabs",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({boxShadow:`0 -1px 0 0 inset ${(e.vars||e).palette.divider}`,"&:last-child":{boxShadow:`0 1px 0 0 inset ${(e.vars||e).palette.divider}`,[`& .${zP.indicator}`]:{bottom:"auto",top:0}}})),but=function(t){const n=Zt({props:t,name:"MuiDateTimePickerTabs"}),{dateIcon:r=$.jsx(zot,{}),onViewChange:o,timeIcon:i=$.jsx(Vot,{}),view:a,hidden:s=typeof window>"u"||window.innerHeight<667,className:l,sx:c}=n,u=To(),d=yut(n),f=(p,m)=>{o(gut(m))};return s?null:$.jsxs(vut,{ownerState:n,variant:"fullWidth",value:mut(a),onChange:f,className:de(l,d.root),sx:c,children:[$.jsx(vU,{value:"date","aria-label":u.dateTableLabel,icon:$.jsx(y.Fragment,{children:r})}),$.jsx(vU,{value:"time","aria-label":u.timeTableLabel,icon:$.jsx(y.Fragment,{children:i})})]})};function wut(e){return Fn("MuiDateTimePickerToolbar",e)}const lR=Un("MuiDateTimePickerToolbar",["root","dateContainer","timeContainer","timeDigitsContainer","separator","timeLabelReverse","ampmSelection","ampmLandscape","ampmLabel"]),xut=["ampm","ampmInClock","value","onChange","view","isLandscape","onViewChange","toolbarFormat","toolbarPlaceholder","views","disabled","readOnly","toolbarVariant","toolbarTitle","className"],Sut=e=>{const{classes:t,isLandscape:n,isRtl:r}=e;return Dn({root:["root"],dateContainer:["dateContainer"],timeContainer:["timeContainer",r&&"timeLabelReverse"],timeDigitsContainer:["timeDigitsContainer",r&&"timeLabelReverse"],separator:["separator"],ampmSelection:["ampmSelection",n&&"ampmLandscape"],ampmLabel:["ampmLabel"]},wut,t)},Cut=oe(FB,{name:"MuiDateTimePickerToolbar",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({paddingLeft:16,paddingRight:16,justifyContent:"space-around",position:"relative",variants:[{props:{toolbarVariant:"desktop"},style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,[`& .${nct.content} .${vN.selected}`]:{color:(e.vars||e).palette.primary.main,fontWeight:e.typography.fontWeightBold}}},{props:{toolbarVariant:"desktop",isLandscape:!0},style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{paddingLeft:24,paddingRight:0}}]})),Put=oe("div",{name:"MuiDateTimePickerToolbar",slot:"DateContainer",overridesResolver:(e,t)=>t.dateContainer})({display:"flex",flexDirection:"column",alignItems:"flex-start"}),Tut=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeContainer",overridesResolver:(e,t)=>t.timeContainer})({display:"flex",flexDirection:"row",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop",isLandscape:!1},style:{gap:9,marginRight:4,alignSelf:"flex-end"}},{props:({isLandscape:e,toolbarVariant:t})=>e&&t!=="desktop",style:{flexDirection:"column"}},{props:({isLandscape:e,toolbarVariant:t,isRtl:n})=>e&&t!=="desktop"&&n,style:{flexDirection:"column-reverse"}}]}),Eut=oe("div",{name:"MuiDateTimePickerToolbar",slot:"TimeDigitsContainer",overridesResolver:(e,t)=>t.timeDigitsContainer})({display:"flex",variants:[{props:{isRtl:!0},style:{flexDirection:"row-reverse"}},{props:{toolbarVariant:"desktop"},style:{gap:1.5}}]}),y9=oe(zB,{name:"MuiDateTimePickerToolbar",slot:"Separator",overridesResolver:(e,t)=>t.separator})({margin:"0 4px 0 2px",cursor:"default",variants:[{props:{toolbarVariant:"desktop"},style:{margin:0}}]}),Out=oe("div",{name:"MuiDateTimePickerToolbar",slot:"AmPmSelection",overridesResolver:(e,t)=>[{[`.${lR.ampmLabel}`]:t.ampmLabel},{[`&.${lR.ampmLandscape}`]:t.ampmLandscape},t.ampmSelection]})({display:"flex",flexDirection:"column",marginRight:"auto",marginLeft:12,[`& .${lR.ampmLabel}`]:{fontSize:17},variants:[{props:{isLandscape:!0},style:{margin:"4px 0 auto",flexDirection:"row",justifyContent:"space-around",width:"100%"}}]});function Iut(e){const t=Zt({props:e,name:"MuiDateTimePickerToolbar"}),{ampm:n,ampmInClock:r,value:o,onChange:i,view:a,isLandscape:s,onViewChange:l,toolbarFormat:c,toolbarPlaceholder:u="––",views:d,disabled:f,readOnly:p,toolbarVariant:m="mobile",toolbarTitle:g,className:v}=t,w=_t(t,xut),x=nr(),S=ue({},t,{isRtl:x}),P=hn(),{meridiemMode:T,handleMeridiemChange:E}=Dk(o,n,i),O=!!(n&&!r),k=m==="desktop",A=To(),I=Sut(S),R=g??A.dateTimePickerToolbarTitle,N=j=>n?P.format(j,"hours12h"):P.format(j,"hours24h"),L=y.useMemo(()=>o?c?P.formatByString(o,c):P.format(o,"shortDate"):u,[o,c,u,P]);return $.jsxs(Cut,ue({isLandscape:s,className:de(I.root,v),toolbarTitle:R},w,{ownerState:S,children:[$.jsxs(Put,{className:I.dateContainer,ownerState:S,children:[d.includes("year")&&$.jsx(za,{tabIndex:-1,variant:"subtitle1",onClick:()=>l("year"),selected:a==="year",value:o?P.format(o,"year"):"–"}),d.includes("day")&&$.jsx(za,{tabIndex:-1,variant:k?"h5":"h4",onClick:()=>l("day"),selected:a==="day",value:L})]}),$.jsxs(Tut,{className:I.timeContainer,ownerState:S,children:[$.jsxs(Eut,{className:I.timeDigitsContainer,ownerState:S,children:[d.includes("hours")&&$.jsxs(y.Fragment,{children:[$.jsx(za,{variant:k?"h5":"h3",width:k&&!s?G0:void 0,onClick:()=>l("hours"),selected:a==="hours",value:o?N(o):"--"}),$.jsx(y9,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(za,{variant:k?"h5":"h3",width:k&&!s?G0:void 0,onClick:()=>l("minutes"),selected:a==="minutes"||!d.includes("minutes")&&a==="hours",value:o?P.format(o,"minutes"):"--",disabled:!d.includes("minutes")})]}),d.includes("seconds")&&$.jsxs(y.Fragment,{children:[$.jsx(y9,{variant:k?"h5":"h3",value:":",className:I.separator,ownerState:S}),$.jsx(za,{variant:k?"h5":"h3",width:k&&!s?G0:void 0,onClick:()=>l("seconds"),selected:a==="seconds",value:o?P.format(o,"seconds"):"--"})]})]}),O&&!k&&$.jsxs(Out,{className:I.ampmSelection,ownerState:S,children:[$.jsx(za,{variant:"subtitle2",selected:T==="am",typographyClassName:I.ampmLabel,value:Wl(P,"am"),onClick:p?void 0:()=>E("am"),disabled:f}),$.jsx(za,{variant:"subtitle2",selected:T==="pm",typographyClassName:I.ampmLabel,value:Wl(P,"pm"),onClick:p?void 0:()=>E("pm"),disabled:f})]}),n&&k&&$.jsx(za,{variant:"h5",onClick:()=>l("meridiem"),selected:a==="meridiem",value:o&&T?Wl(P,T):"--",width:G0})]})]}))}function Nie(e,t){var s;const n=hn(),r=tm(),o=Zt({props:e,name:t}),i=o.ampm??n.is12HourCycleInCurrentLocale(),a=y.useMemo(()=>{var l;return((l=o.localeText)==null?void 0:l.toolbarTitle)==null?o.localeText:ue({},o.localeText,{dateTimePickerToolbarTitle:o.localeText.toolbarTitle})},[o.localeText]);return ue({},o,SB({views:o.views,openTo:o.openTo,defaultViews:["year","day","hours","minutes"],defaultOpenTo:"day"}),{ampm:i,localeText:a,orientation:o.orientation??"portrait",disableIgnoringDatePartForTimeValidation:o.disableIgnoringDatePartForTimeValidation??!!(o.minDateTime||o.maxDateTime||o.disablePast||o.disableFuture),disableFuture:o.disableFuture??!1,disablePast:o.disablePast??!1,minDate:Ti(n,o.minDateTime??o.minDate,r.minDate),maxDate:Ti(n,o.maxDateTime??o.maxDate,r.maxDate),minTime:o.minDateTime??o.minTime,maxTime:o.maxDateTime??o.maxTime,slots:ue({toolbar:Iut,tabs:but},o.slots),slotProps:ue({},o.slotProps,{toolbar:ue({ampm:i},(s=o.slotProps)==null?void 0:s.toolbar)})})}const kut=y.forwardRef(function(t,n){var g;const r=nr(),{toolbar:o,tabs:i,content:a,actionBar:s,shortcuts:l}=Cie(t),{sx:c,className:u,isLandscape:d,classes:f}=t,p=s&&(((g=s.props.actions)==null?void 0:g.length)??0)>0,m=ue({},t,{isRtl:r});return $.jsxs(Pie,{ref:n,className:de(jl.root,f==null?void 0:f.root,u),sx:[{[`& .${jl.tabs}`]:{gridRow:4,gridColumn:"1 / 4"},[`& .${jl.actionBar}`]:{gridRow:5}},...Array.isArray(c)?c:[c]],ownerState:m,children:[d?l:o,d?o:l,$.jsxs(Tie,{className:de(jl.contentWrapper,f==null?void 0:f.contentWrapper),sx:{display:"grid"},children:[a,i,p&&$.jsx(ss,{sx:{gridRow:3,gridColumn:"1 / 4"}})]}),s]})}),Mut=["openTo","focusedView","timeViewsCount"],Aut=function(t,n,r){var u,d;const{openTo:o,focusedView:i,timeViewsCount:a}=r,s=_t(r,Mut),l=ue({},s,{focusedView:null,sx:[{[`&.${u9.root}`]:{borderBottom:0},[`&.${u9.root}, .${fat.root}, &.${nat.root}`]:{maxHeight:Fk}}]}),c=W0(n);return $.jsxs(y.Fragment,{children:[(u=t[c?"day":n])==null?void 0:u.call(t,ue({},r,{view:c?"day":n,focusedView:i&&Pv(i)?i:null,views:r.views.filter(Pv),sx:[{gridColumn:1},...l.sx]})),a>0&&$.jsxs(y.Fragment,{children:[$.jsx(ss,{orientation:"vertical",sx:{gridColumn:2}}),(d=t[c?n:"hours"])==null?void 0:d.call(t,ue({},l,{view:c?n:"hours",focusedView:i&&W0(i)?i:null,openTo:W0(o)?o:"hours",views:r.views.filter(W0),sx:[{gridColumn:3},...l.sx]}))]})]})},Lie=y.forwardRef(function(t,n){var x,S,P,T;const r=To(),o=hn(),i=Nie(t,"MuiDesktopDateTimePicker"),{shouldRenderTimeInASingleColumn:a,thresholdToRenderTimeInASingleColumn:s,views:l,timeSteps:c}=Rie(i),u=a?Aie:rO,d=ue({day:rl,month:rl,year:rl,hours:u,minutes:u,seconds:u,meridiem:u},i.viewRenderers),f=i.ampmInClock??!0,m=((x=d.hours)==null?void 0:x.name)===rO.name?l:l.filter(E=>E!=="meridiem"),g=a?[]:["accept"],v=ue({},i,{viewRenderers:d,format:$ie(o,i),views:m,yearsPerRow:i.yearsPerRow??4,ampmInClock:f,timeSteps:c,thresholdToRenderTimeInASingleColumn:s,shouldRenderTimeInASingleColumn:a,slots:ue({field:hie,layout:kut,openPickerIcon:Boe},i.slots),slotProps:ue({},i.slotProps,{field:E=>{var O;return ue({},$f((O=i.slotProps)==null?void 0:O.field,E),mb(i),{ref:n})},toolbar:ue({hidden:!0,ampmInClock:f,toolbarVariant:"desktop"},(S=i.slotProps)==null?void 0:S.toolbar),tabs:ue({hidden:!0},(P=i.slotProps)==null?void 0:P.tabs),actionBar:E=>{var O;return ue({actions:g},$f((O=i.slotProps)==null?void 0:O.actionBar,E))}})}),{renderPicker:w}=jB({props:v,valueManager:ro,valueType:"date-time",getOpenDialogAriaText:fb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(T=v.localeText)==null?void 0:T.openDatePickerDialogue}),validator:zk,rendererInterceptor:Aut});return w()});Lie.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:ub,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,maxDateTime:B.object,maxTime:B.object,minDate:B.object,minDateTime:B.object,minTime:B.object,minutesStep:B.number,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableTime:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,skipDisabled:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),thresholdToRenderTimeInASingleColumn:B.number,timeSteps:B.shape({hours:B.number,minutes:B.number,seconds:B.number}),timezone:B.string,value:B.object,view:B.oneOf(["day","hours","meridiem","minutes","month","seconds","year"]),viewRenderers:B.shape({day:B.func,hours:B.func,meridiem:B.func,minutes:B.func,month:B.func,seconds:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const Fie=y.forwardRef(function(t,n){var u,d,f;const r=To(),o=hn(),i=Nie(t,"MuiMobileDateTimePicker"),a=ue({day:rl,month:rl,year:rl,hours:cy,minutes:cy,seconds:cy},i.viewRenderers),s=i.ampmInClock??!1,l=ue({},i,{viewRenderers:a,format:$ie(o,i),ampmInClock:s,slots:ue({field:hie},i.slots),slotProps:ue({},i.slotProps,{field:p=>{var m;return ue({},$f((m=i.slotProps)==null?void 0:m.field,p),mb(i),{ref:n})},toolbar:ue({hidden:!1,ampmInClock:s},(u=i.slotProps)==null?void 0:u.toolbar),tabs:ue({hidden:!1},(d=i.slotProps)==null?void 0:d.tabs)})}),{renderPicker:c}=BB({props:l,valueManager:ro,valueType:"date-time",getOpenDialogAriaText:fb({utils:o,formatKey:"fullDate",contextTranslation:r.openDatePickerDialogue,propsTranslation:(f=l.localeText)==null?void 0:f.openDatePickerDialogue}),validator:zk});return c()});Fie.propTypes={ampm:B.bool,ampmInClock:B.bool,autoFocus:B.bool,className:B.string,closeOnSelect:B.bool,dayOfWeekFormatter:B.func,defaultValue:B.object,disabled:B.bool,disableFuture:B.bool,disableHighlightToday:B.bool,disableIgnoringDatePartForTimeValidation:B.bool,disableOpenPicker:B.bool,disablePast:B.bool,displayWeekNumber:B.bool,enableAccessibleFieldDOMStructure:B.any,fixedWeekNumber:B.number,format:B.string,formatDensity:B.oneOf(["dense","spacious"]),inputRef:ub,label:B.node,loading:B.bool,localeText:B.object,maxDate:B.object,maxDateTime:B.object,maxTime:B.object,minDate:B.object,minDateTime:B.object,minTime:B.object,minutesStep:B.number,monthsPerRow:B.oneOf([3,4]),name:B.string,onAccept:B.func,onChange:B.func,onClose:B.func,onError:B.func,onMonthChange:B.func,onOpen:B.func,onSelectedSectionsChange:B.func,onViewChange:B.func,onYearChange:B.func,open:B.bool,openTo:B.oneOf(["day","hours","minutes","month","seconds","year"]),orientation:B.oneOf(["landscape","portrait"]),readOnly:B.bool,reduceAnimations:B.bool,referenceDate:B.object,renderLoading:B.func,selectedSections:B.oneOfType([B.oneOf(["all","day","empty","hours","meridiem","minutes","month","seconds","weekDay","year"]),B.number]),shouldDisableDate:B.func,shouldDisableMonth:B.func,shouldDisableTime:B.func,shouldDisableYear:B.func,showDaysOutsideCurrentMonth:B.bool,slotProps:B.object,slots:B.object,sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),timezone:B.string,value:B.object,view:B.oneOf(["day","hours","minutes","month","seconds","year"]),viewRenderers:B.shape({day:B.func,hours:B.func,minutes:B.func,month:B.func,seconds:B.func,year:B.func}),views:B.arrayOf(B.oneOf(["day","hours","minutes","month","seconds","year"]).isRequired),yearsOrder:B.oneOf(["asc","desc"]),yearsPerRow:B.oneOf([3,4])};const $ut=["desktopModeMediaQuery"],Rut=y.forwardRef(function(t,n){const r=Zt({props:t,name:"MuiDateTimePicker"}),{desktopModeMediaQuery:o=MB}=r,i=_t(r,$ut);return yS(o,{defaultMatches:!0})?$.jsx(Lie,ue({ref:n},i)):$.jsx(Fie,ue({ref:n},i))});class rm extends Error{}class _ut extends rm{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class Dut extends rm{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class Nut extends rm{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class Bg extends rm{}class jie extends rm{constructor(t){super(`Invalid unit ${t}`)}}class yi extends rm{}class Od extends rm{constructor(){super("Zone is an abstract class")}}const pt="numeric",sc="short",ns="long",oO={year:pt,month:pt,day:pt},Bie={year:pt,month:sc,day:pt},Lut={year:pt,month:sc,day:pt,weekday:sc},zie={year:pt,month:ns,day:pt},Vie={year:pt,month:ns,day:pt,weekday:ns},Hie={hour:pt,minute:pt},Uie={hour:pt,minute:pt,second:pt},Wie={hour:pt,minute:pt,second:pt,timeZoneName:sc},Gie={hour:pt,minute:pt,second:pt,timeZoneName:ns},qie={hour:pt,minute:pt,hourCycle:"h23"},Kie={hour:pt,minute:pt,second:pt,hourCycle:"h23"},Yie={hour:pt,minute:pt,second:pt,hourCycle:"h23",timeZoneName:sc},Xie={hour:pt,minute:pt,second:pt,hourCycle:"h23",timeZoneName:ns},Qie={year:pt,month:pt,day:pt,hour:pt,minute:pt},Jie={year:pt,month:pt,day:pt,hour:pt,minute:pt,second:pt},Zie={year:pt,month:sc,day:pt,hour:pt,minute:pt},eae={year:pt,month:sc,day:pt,hour:pt,minute:pt,second:pt},Fut={year:pt,month:sc,day:pt,weekday:sc,hour:pt,minute:pt},tae={year:pt,month:ns,day:pt,hour:pt,minute:pt,timeZoneName:sc},nae={year:pt,month:ns,day:pt,hour:pt,minute:pt,second:pt,timeZoneName:sc},rae={year:pt,month:ns,day:pt,weekday:ns,hour:pt,minute:pt,timeZoneName:ns},oae={year:pt,month:ns,day:pt,weekday:ns,hour:pt,minute:pt,second:pt,timeZoneName:ns};class ZS{get type(){throw new Od}get name(){throw new Od}get ianaName(){return this.name}get isUniversal(){throw new Od}offsetName(t,n){throw new Od}formatOffset(t,n){throw new Od}offset(t){throw new Od}equals(t){throw new Od}get isValid(){throw new Od}}let cR=null;class Hk extends ZS{static get instance(){return cR===null&&(cR=new Hk),cR}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(t,{format:n,locale:r}){return pae(t,n,r)}formatOffset(t,n){return Ow(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="system"}get isValid(){return!0}}let GP={};function jut(e){return GP[e]||(GP[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),GP[e]}const But={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function zut(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,o,i,a,s,l,c,u]=r;return[a,o,i,s,l,c,u]}function Vut(e,t){const n=e.formatToParts(t),r=[];for(let o=0;o=0?m:1e3+m,(f-p)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let v9={};function Hut(e,t={}){const n=JSON.stringify([e,t]);let r=v9[n];return r||(r=new Intl.ListFormat(e,t),v9[n]=r),r}let bN={};function wN(e,t={}){const n=JSON.stringify([e,t]);let r=bN[n];return r||(r=new Intl.DateTimeFormat(e,t),bN[n]=r),r}let xN={};function Uut(e,t={}){const n=JSON.stringify([e,t]);let r=xN[n];return r||(r=new Intl.NumberFormat(e,t),xN[n]=r),r}let SN={};function Wut(e,t={}){const{base:n,...r}=t,o=JSON.stringify([e,r]);let i=SN[o];return i||(i=new Intl.RelativeTimeFormat(e,t),SN[o]=i),i}let q0=null;function Gut(){return q0||(q0=new Intl.DateTimeFormat().resolvedOptions().locale,q0)}let b9={};function qut(e){let t=b9[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,b9[e]=t}return t}function Kut(e){const t=e.indexOf("-x-");t!==-1&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(n===-1)return[e];{let r,o;try{r=wN(e).resolvedOptions(),o=e}catch{const l=e.substring(0,n);r=wN(l).resolvedOptions(),o=l}const{numberingSystem:i,calendar:a}=r;return[o,i,a]}}function Yut(e,t,n){return(n||t)&&(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e}function Xut(e){const t=[];for(let n=1;n<=12;n++){const r=It.utc(2009,n,1);t.push(e(r))}return t}function Qut(e){const t=[];for(let n=1;n<=7;n++){const r=It.utc(2016,11,13+n);t.push(e(r))}return t}function oP(e,t,n,r){const o=e.listingMode();return o==="error"?null:o==="en"?n(t):r(t)}function Jut(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Zut{constructor(t,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:o,floor:i,...a}=r;if(!n||Object.keys(a).length>0){const s={useGrouping:!1,...r};r.padTo>0&&(s.minimumIntegerDigits=r.padTo),this.inf=Uut(t,s)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):GB(t,3);return ho(n,this.padTo)}}}class edt{constructor(t,n,r){this.opts=r,this.originalZone=void 0;let o;if(this.opts.timeZone)this.dt=t;else if(t.zone.type==="fixed"){const a=-1*(t.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;t.offset!==0&&nd.create(s).valid?(o=s,this.dt=t):(o="UTC",this.dt=t.offset===0?t:t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone)}else t.zone.type==="system"?this.dt=t:t.zone.type==="iana"?(this.dt=t,o=t.zone.name):(o="UTC",this.dt=t.setZone("UTC").plus({minutes:t.offset}),this.originalZone=t.zone);const i={...this.opts};i.timeZone=i.timeZone||o,this.dtf=wN(n,i)}format(){return this.originalZone?this.formatToParts().map(({value:t})=>t).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const t=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?t.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):t}resolvedOptions(){return this.dtf.resolvedOptions()}}class tdt{constructor(t,n,r){this.opts={style:"long",...r},!n&&dae()&&(this.rtf=Wut(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):Pdt(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}const ndt={firstDay:1,minimalDays:4,weekend:[6,7]};class er{static fromOpts(t){return er.create(t.locale,t.numberingSystem,t.outputCalendar,t.weekSettings,t.defaultToEN)}static create(t,n,r,o,i=!1){const a=t||Vr.defaultLocale,s=a||(i?"en-US":Gut()),l=n||Vr.defaultNumberingSystem,c=r||Vr.defaultOutputCalendar,u=CN(o)||Vr.defaultWeekSettings;return new er(s,l,c,u,a)}static resetCache(){q0=null,bN={},xN={},SN={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r,weekSettings:o}={}){return er.create(t,n,r,o)}constructor(t,n,r,o,i){const[a,s,l]=Kut(t);this.locale=a,this.numberingSystem=n||s||null,this.outputCalendar=r||l||null,this.weekSettings=o,this.intl=Yut(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Jut(this)),this.fastNumbersCached}listingMode(){const t=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return t&&n?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:er.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,CN(t.weekSettings)||this.weekSettings,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone({...t,defaultToEN:!0})}redefaultToSystem(t={}){return this.clone({...t,defaultToEN:!1})}months(t,n=!1){return oP(this,t,gae,()=>{const r=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=Xut(i=>this.extract(i,r,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1){return oP(this,t,bae,()=>{const r=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=Qut(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[o][t]})}meridiems(){return oP(this,void 0,()=>wae,()=>{if(!this.meridiemCache){const t={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[It.utc(2016,11,13,9),It.utc(2016,11,13,19)].map(n=>this.extract(n,t,"dayperiod"))}return this.meridiemCache})}eras(t){return oP(this,t,xae,()=>{const n={era:t};return this.eraCache[t]||(this.eraCache[t]=[It.utc(-40,1,1),It.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[t]})}extract(t,n,r){const o=this.dtFormatter(t,n),i=o.formatToParts(),a=i.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new Zut(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new edt(t,this.intl,n)}relFormatter(t={}){return new tdt(this.intl,this.isEnglish(),t)}listFormatter(t={}){return Hut(this.intl,t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:fae()?qut(this.locale):ndt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let uR=null;class Ui extends ZS{static get utcInstance(){return uR===null&&(uR=new Ui(0)),uR}static instance(t){return t===0?Ui.utcInstance:new Ui(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ui(Gk(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Ow(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Ow(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Ow(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class rdt extends ZS{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Ud(e,t){if(qt(e)||e===null)return t;if(e instanceof ZS)return e;if(cdt(e)){const n=e.toLowerCase();return n==="default"?t:n==="local"||n==="system"?Hk.instance:n==="utc"||n==="gmt"?Ui.utcInstance:Ui.parseSpecifier(n)||nd.create(e)}else return xf(e)?Ui.instance(e):typeof e=="object"&&"offset"in e&&typeof e.offset=="function"?e:new rdt(e)}const VB={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},w9={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},odt=VB.hanidec.replace(/[\[|\]]/g,"").split("");function idt(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=i&&r<=a&&(t+=r-i)}}return parseInt(t,10)}else return t}let hg={};function adt(){hg={}}function Ml({numberingSystem:e},t=""){const n=e||"latn";return hg[n]||(hg[n]={}),hg[n][t]||(hg[n][t]=new RegExp(`${VB[n]}${t}`)),hg[n][t]}let x9=()=>Date.now(),S9="system",C9=null,P9=null,T9=null,E9=60,O9,I9=null;class Vr{static get now(){return x9}static set now(t){x9=t}static set defaultZone(t){S9=t}static get defaultZone(){return Ud(S9,Hk.instance)}static get defaultLocale(){return C9}static set defaultLocale(t){C9=t}static get defaultNumberingSystem(){return P9}static set defaultNumberingSystem(t){P9=t}static get defaultOutputCalendar(){return T9}static set defaultOutputCalendar(t){T9=t}static get defaultWeekSettings(){return I9}static set defaultWeekSettings(t){I9=CN(t)}static get twoDigitCutoffYear(){return E9}static set twoDigitCutoffYear(t){E9=t%100}static get throwOnInvalid(){return O9}static set throwOnInvalid(t){O9=t}static resetCaches(){er.resetCache(),nd.resetCache(),It.resetCache(),adt()}}class Gl{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const iae=[0,31,59,90,120,151,181,212,243,273,304,334],aae=[0,31,60,91,121,152,182,213,244,274,305,335];function Ys(e,t){return new Gl("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function HB(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const o=r.getUTCDay();return o===0?7:o}function sae(e,t,n){return n+(e1(e)?aae:iae)[t-1]}function lae(e,t){const n=e1(e)?aae:iae,r=n.findIndex(i=>iWx(r,t,n)?(c=r+1,l=1):c=r,{weekYear:c,weekNumber:l,weekday:s,...qk(e)}}function k9(e,t=4,n=1){const{weekYear:r,weekNumber:o,weekday:i}=e,a=UB(HB(r,1,t),n),s=uy(r);let l=o*7+i-a-7+t,c;l<1?(c=r-1,l+=uy(c)):l>s?(c=r+1,l-=uy(r)):c=r;const{month:u,day:d}=lae(c,l);return{year:c,month:u,day:d,...qk(e)}}function dR(e){const{year:t,month:n,day:r}=e,o=sae(t,n,r);return{year:t,ordinal:o,...qk(e)}}function M9(e){const{year:t,ordinal:n}=e,{month:r,day:o}=lae(t,n);return{year:t,month:r,day:o,...qk(e)}}function A9(e,t){if(!qt(e.localWeekday)||!qt(e.localWeekNumber)||!qt(e.localWeekYear)){if(!qt(e.weekday)||!qt(e.weekNumber)||!qt(e.weekYear))throw new Bg("Cannot mix locale-based week fields with ISO-based week fields");return qt(e.localWeekday)||(e.weekday=e.localWeekday),qt(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),qt(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function sdt(e,t=4,n=1){const r=Uk(e.weekYear),o=Xs(e.weekNumber,1,Wx(e.weekYear,t,n)),i=Xs(e.weekday,1,7);return r?o?i?!1:Ys("weekday",e.weekday):Ys("week",e.weekNumber):Ys("weekYear",e.weekYear)}function ldt(e){const t=Uk(e.year),n=Xs(e.ordinal,1,uy(e.year));return t?n?!1:Ys("ordinal",e.ordinal):Ys("year",e.year)}function cae(e){const t=Uk(e.year),n=Xs(e.month,1,12),r=Xs(e.day,1,aO(e.year,e.month));return t?n?r?!1:Ys("day",e.day):Ys("month",e.month):Ys("year",e.year)}function uae(e){const{hour:t,minute:n,second:r,millisecond:o}=e,i=Xs(t,0,23)||t===24&&n===0&&r===0&&o===0,a=Xs(n,0,59),s=Xs(r,0,59),l=Xs(o,0,999);return i?a?s?l?!1:Ys("millisecond",o):Ys("second",r):Ys("minute",n):Ys("hour",t)}function qt(e){return typeof e>"u"}function xf(e){return typeof e=="number"}function Uk(e){return typeof e=="number"&&e%1===0}function cdt(e){return typeof e=="string"}function udt(e){return Object.prototype.toString.call(e)==="[object Date]"}function dae(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function fae(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ddt(e){return Array.isArray(e)?e:[e]}function $9(e,t,n){if(e.length!==0)return e.reduce((r,o)=>{const i=[t(o),o];return r&&n(r[0],i[0])===r[0]?r:i},null)[1]}function fdt(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function Tv(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function CN(e){if(e==null)return null;if(typeof e!="object")throw new yi("Week settings must be an object");if(!Xs(e.firstDay,1,7)||!Xs(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(t=>!Xs(t,1,7)))throw new yi("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Xs(e,t,n){return Uk(e)&&e>=t&&e<=n}function pdt(e,t){return e-t*Math.floor(e/t)}function ho(e,t=2){const n=e<0;let r;return n?r="-"+(""+-e).padStart(t,"0"):r=(""+e).padStart(t,"0"),r}function Fd(e){if(!(qt(e)||e===null||e===""))return parseInt(e,10)}function Op(e){if(!(qt(e)||e===null||e===""))return parseFloat(e)}function WB(e){if(!(qt(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function GB(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function e1(e){return e%4===0&&(e%100!==0||e%400===0)}function uy(e){return e1(e)?366:365}function aO(e,t){const n=pdt(t-1,12)+1,r=e+(t-n)/12;return n===2?e1(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Wk(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function R9(e,t,n){return-UB(HB(e,1,t),n)+t-1}function Wx(e,t=4,n=1){const r=R9(e,t,n),o=R9(e+1,t,n);return(uy(e)-r+o)/7}function PN(e){return e>99?e:e>Vr.twoDigitCutoffYear?1900+e:2e3+e}function pae(e,t,n,r=null){const o=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},s=new Intl.DateTimeFormat(n,a).formatToParts(o).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function Gk(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,o=n<0||Object.is(n,-0)?-r:r;return n*60+o}function hae(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new yi(`Invalid unit value ${e}`);return t}function sO(e,t){const n={};for(const r in e)if(Tv(e,r)){const o=e[r];if(o==null)continue;n[t(r)]=hae(o)}return n}function Ow(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),o=e>=0?"+":"-";switch(t){case"short":return`${o}${ho(n,2)}:${ho(r,2)}`;case"narrow":return`${o}${n}${r>0?`:${r}`:""}`;case"techie":return`${o}${ho(n,2)}${ho(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function qk(e){return fdt(e,["hour","minute","second","millisecond"])}const hdt=["January","February","March","April","May","June","July","August","September","October","November","December"],mae=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],mdt=["J","F","M","A","M","J","J","A","S","O","N","D"];function gae(e){switch(e){case"narrow":return[...mdt];case"short":return[...mae];case"long":return[...hdt];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const yae=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],vae=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gdt=["M","T","W","T","F","S","S"];function bae(e){switch(e){case"narrow":return[...gdt];case"short":return[...vae];case"long":return[...yae];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const wae=["AM","PM"],ydt=["Before Christ","Anno Domini"],vdt=["BC","AD"],bdt=["B","A"];function xae(e){switch(e){case"narrow":return[...bdt];case"short":return[...vdt];case"long":return[...ydt];default:return null}}function wdt(e){return wae[e.hour<12?0:1]}function xdt(e,t){return bae(t)[e.weekday-1]}function Sdt(e,t){return gae(t)[e.month-1]}function Cdt(e,t){return xae(t)[e.year<0?0:1]}function Pdt(e,t,n="always",r=!1){const o={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&i){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${o[e][0]}`;case-1:return d?"yesterday":`last ${o[e][0]}`;case 0:return d?"today":`this ${o[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=o[e],u=r?l?c[1]:c[2]||c[1]:l?o[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function _9(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Tdt={D:oO,DD:Bie,DDD:zie,DDDD:Vie,t:Hie,tt:Uie,ttt:Wie,tttt:Gie,T:qie,TT:Kie,TTT:Yie,TTTT:Xie,f:Qie,ff:Zie,fff:tae,ffff:rae,F:Jie,FF:eae,FFF:nae,FFFF:oae};let Ul=class K0{static create(t,n={}){return new K0(t,n)}static parseFormat(t){let n=null,r="",o=!1;const i=[];for(let a=0;a0&&i.push({literal:o||/^\s+$/.test(r),val:r}),n=null,r="",o=!o):o||s===n?r+=s:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=s,n=s)}return r.length>0&&i.push({literal:o||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(t){return Tdt[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,{...this.opts,...n}).format()}dtFormatter(t,n={}){return this.loc.dtFormatter(t,{...this.opts,...n})}formatDateTime(t,n){return this.dtFormatter(t,n).format()}formatDateTimeParts(t,n){return this.dtFormatter(t,n).formatToParts()}formatInterval(t,n){return this.dtFormatter(t.start,n).dtf.formatRange(t.start.toJSDate(),t.end.toJSDate())}resolvedOptions(t,n){return this.dtFormatter(t,n).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return ho(t,n);const r={...this.opts};return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",o=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(p,m)=>this.loc.extract(t,p,m),a=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",s=()=>r?wdt(t):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(p,m)=>r?Sdt(t,p):i(m?{month:p}:{month:p,day:"numeric"},"month"),c=(p,m)=>r?xdt(t,p):i(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const m=K0.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(t,m):p},d=p=>r?Cdt(t,p):i({era:p},"era"),f=p=>{switch(p){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"uu":return this.num(Math.floor(t.millisecond/10),2);case"uuu":return this.num(Math.floor(t.millisecond/100));case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return o?i({day:"numeric"},"day"):this.num(t.day);case"dd":return o?i({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return o?i({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return o?i({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return o?i({month:"numeric"},"month"):this.num(t.month);case"MM":return o?i({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return o?i({year:"numeric"},"year"):this.num(t.year);case"yy":return o?i({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return o?i({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return o?i({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"n":return this.num(t.localWeekNumber);case"nn":return this.num(t.localWeekNumber,2);case"ii":return this.num(t.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(t.localWeekYear,4);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(p)}};return _9(K0.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},o=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},i=K0.parseFormat(n),a=i.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return _9(i,o(s))}};const Sae=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function gb(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function yb(...e){return t=>e.reduce(([n,r,o],i)=>{const[a,s,l]=i(t,o);return[{...n,...a},s||r,l]},[{},null,1]).slice(0,2)}function vb(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const o=n.exec(e);if(o)return r(o)}return[null,null]}function Cae(...e){return(t,n)=>{const r={};let o;for(o=0;op!==void 0&&(m||p&&u)?-p:p;return[{years:f(Op(n)),months:f(Op(r)),weeks:f(Op(o)),days:f(Op(i)),hours:f(Op(a)),minutes:f(Op(s)),seconds:f(Op(l),l==="-0"),milliseconds:f(WB(c),d)}]}const Fdt={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function YB(e,t,n,r,o,i,a){const s={year:t.length===2?PN(Fd(t)):Fd(t),month:mae.indexOf(n)+1,day:Fd(r),hour:Fd(o),minute:Fd(i)};return a&&(s.second=Fd(a)),e&&(s.weekday=e.length>3?yae.indexOf(e)+1:vae.indexOf(e)+1),s}const jdt=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Bdt(e){const[,t,n,r,o,i,a,s,l,c,u,d]=e,f=YB(t,o,r,n,i,a,s);let p;return l?p=Fdt[l]:c?p=0:p=Gk(u,d),[f,new Ui(p)]}function zdt(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Vdt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Hdt=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Udt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function D9(e){const[,t,n,r,o,i,a,s]=e;return[YB(t,o,r,n,i,a,s),Ui.utcInstance]}function Wdt(e){const[,t,n,r,o,i,a,s]=e;return[YB(t,s,n,r,o,i,a),Ui.utcInstance]}const Gdt=gb(Odt,KB),qdt=gb(Idt,KB),Kdt=gb(kdt,KB),Ydt=gb(Tae),Oae=yb(_dt,bb,t1,n1),Xdt=yb(Mdt,bb,t1,n1),Qdt=yb(Adt,bb,t1,n1),Jdt=yb(bb,t1,n1);function Zdt(e){return vb(e,[Gdt,Oae],[qdt,Xdt],[Kdt,Qdt],[Ydt,Jdt])}function eft(e){return vb(zdt(e),[jdt,Bdt])}function tft(e){return vb(e,[Vdt,D9],[Hdt,D9],[Udt,Wdt])}function nft(e){return vb(e,[Ndt,Ldt])}const rft=yb(bb);function oft(e){return vb(e,[Ddt,rft])}const ift=gb($dt,Rdt),aft=gb(Eae),sft=yb(bb,t1,n1);function lft(e){return vb(e,[ift,Oae],[aft,sft])}const N9="Invalid Duration",Iae={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},cft={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...Iae},$s=146097/400,Jm=146097/4800,uft={years:{quarters:4,months:12,weeks:$s/7,days:$s,hours:$s*24,minutes:$s*24*60,seconds:$s*24*60*60,milliseconds:$s*24*60*60*1e3},quarters:{months:3,weeks:$s/28,days:$s/4,hours:$s*24/4,minutes:$s*24*60/4,seconds:$s*24*60*60/4,milliseconds:$s*24*60*60*1e3/4},months:{weeks:Jm/7,days:Jm,hours:Jm*24,minutes:Jm*24*60,seconds:Jm*24*60*60,milliseconds:Jm*24*60*60*1e3},...Iae},Jp=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],dft=Jp.slice(0).reverse();function Id(e,t,n=!1){const r={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Nn(r)}function kae(e,t){let n=t.milliseconds??0;for(const r of dft.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function L9(e,t){const n=kae(e,t)<0?-1:1;Jp.reduceRight((r,o)=>{if(qt(t[o]))return r;if(r){const i=t[r]*n,a=e[o][r],s=Math.floor(i/a);t[o]+=s*n,t[r]-=s*a*n}return o},null),Jp.reduce((r,o)=>{if(qt(t[o]))return r;if(r){const i=t[r]%1;t[r]-=i,t[o]+=i*e[r][o]}return o},null)}function fft(e){const t={};for(const[n,r]of Object.entries(e))r!==0&&(t[n]=r);return t}class Nn{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;let r=n?uft:cft;t.matrix&&(r=t.matrix),this.values=t.values,this.loc=t.loc||er.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(t,n){return Nn.fromObject({milliseconds:t},n)}static fromObject(t,n={}){if(t==null||typeof t!="object")throw new yi(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new Nn({values:sO(t,Nn.normalizeUnit),loc:er.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(t){if(xf(t))return Nn.fromMillis(t);if(Nn.isDuration(t))return t;if(typeof t=="object")return Nn.fromObject(t);throw new yi(`Unknown duration argument ${t} of type ${typeof t}`)}static fromISO(t,n){const[r]=nft(t);return r?Nn.fromObject(r,n):Nn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=oft(t);return r?Nn.fromObject(r,n):Nn.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new yi("need to specify a reason the Duration is invalid");const r=t instanceof Gl?t:new Gl(t,n);if(Vr.throwOnInvalid)throw new Nut(r);return new Nn({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new jie(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?Ul.create(this.loc,r).formatDurationFromString(this,t):N9}toHuman(t={}){if(!this.isValid)return N9;const n=Jp.map(r=>{const o=this.values[r];return qt(o)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...t,unit:r.slice(0,-1)}).format(o)}).filter(r=>r);return this.loc.listFormatter({type:"conjunction",style:t.listStyle||"narrow",...t}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=GB(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(t={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...t,includeOffset:!1},It.fromMillis(n,{zone:"UTC"}).toISOTime(t))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?kae(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Nn.fromDurationLike(t),r={};for(const o of Jp)(Tv(n.values,o)||Tv(this.values,o))&&(r[o]=n.get(o)+this.get(o));return Id(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Nn.fromDurationLike(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=hae(t(this.values[r],r));return Id(this,{values:n},!0)}get(t){return this[Nn.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n={...this.values,...sO(t,Nn.normalizeUnit)};return Id(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r,matrix:o}={}){const a={loc:this.loc.clone({locale:t,numberingSystem:n}),matrix:o,conversionAccuracy:r};return Id(this,a)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return L9(this.matrix,t),Id(this,{values:t},!0)}rescale(){if(!this.isValid)return this;const t=fft(this.normalize().shiftToAll().toObject());return Id(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>Nn.normalizeUnit(a));const n={},r={},o=this.toObject();let i;for(const a of Jp)if(t.indexOf(a)>=0){i=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;xf(o[a])&&(s+=o[a]);const l=Math.trunc(s);n[a]=l,r[a]=(s*1e3-l*1e3)/1e3}else xf(o[a])&&(r[a]=o[a]);for(const a in r)r[a]!==0&&(n[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return L9(this.matrix,n),Id(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=this.values[n]===0?0:-this.values[n];return Id(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,o){return r===void 0||r===0?o===void 0||o===0:r===o}for(const r of Jp)if(!n(this.values[r],t.values[r]))return!1;return!0}}const Zm="Invalid Interval";function pft(e,t){return!e||!e.isValid?eo.invalid("missing or invalid start"):!t||!t.isValid?eo.invalid("missing or invalid end"):tt:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?eo.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(T0).filter(a=>this.contains(a)).sort((a,s)=>a.toMillis()-s.toMillis()),r=[];let{s:o}=this,i=0;for(;o+this.e?this.e:a;r.push(eo.fromDateTimes(o,s)),o=s,i+=1}return r}splitBy(t){const n=Nn.fromDurationLike(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,o=1,i;const a=[];for(;rl*o));i=+s>+this.e?this.e:s,a.push(eo.fromDateTimes(r,i)),r=i,o+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e=r?null:eo.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.st.e?this.e:t.e;return eo.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((o,i)=>o.s-i.s).reduce(([o,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[o,i.union(a)]:[o.concat([i]),a]:[o,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const o=[],i=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...i),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&o.push(eo.fromDateTimes(n,l.time)),n=null);return eo.merge(o)}difference(...t){return eo.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Zm}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(t=oO,n={}){return this.isValid?Ul.create(this.s.loc.clone(n),t).formatInterval(this):Zm}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:Zm}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Zm}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:Zm}toFormat(t,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:Zm}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):Nn.invalid(this.invalidReason)}mapEndpoints(t){return eo.fromDateTimes(t(this.s),t(this.e))}}class Y0{static hasDST(t=Vr.defaultZone){const n=It.now().setZone(t).set({month:12});return!t.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return nd.isValidZone(t)}static normalizeZone(t){return Ud(t,Vr.defaultZone)}static getStartOfWeek({locale:t=null,locObj:n=null}={}){return(n||er.create(t)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:t=null,locObj:n=null}={}){return(n||er.create(t)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:t=null,locObj:n=null}={}){return(n||er.create(t)).getWeekendDays().slice()}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||er.create(n,r,i)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null,outputCalendar:i="gregory"}={}){return(o||er.create(n,r,i)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||er.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:o=null}={}){return(o||er.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return er.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return er.create(n,null,"gregory").eras(t)}static features(){return{relative:dae(),localeWeek:fae()}}}function F9(e,t){const n=o=>o.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Nn.fromMillis(r).as("days"))}function hft(e,t,n){const r=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{const u=F9(l,c);return(u-u%7)/7}],["days",F9]],o={},i=e;let a,s;for(const[l,c]of r)n.indexOf(l)>=0&&(a=l,o[l]=c(e,t),s=i.plus(o),s>t?(o[l]--,e=i.plus(o),e>t&&(s=e,o[l]--,e=i.plus(o))):e=s);return[e,o,s,a]}function mft(e,t,n,r){let[o,i,a,s]=hft(e,t,n);const l=t-o,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a0?Nn.fromMillis(l,r).shiftTo(...c).plus(u):u}const gft="missing Intl.DateTimeFormat.formatToParts support";function Kn(e,t=n=>n){return{regex:e,deser:([n])=>t(idt(n))}}const yft=" ",Mae=`[ ${yft}]`,Aae=new RegExp(Mae,"g");function vft(e){return e.replace(/\./g,"\\.?").replace(Aae,Mae)}function j9(e){return e.replace(/\./g,"").replace(Aae," ").toLowerCase()}function Al(e,t){return e===null?null:{regex:RegExp(e.map(vft).join("|")),deser:([n])=>e.findIndex(r=>j9(n)===j9(r))+t}}function B9(e,t){return{regex:e,deser:([,n,r])=>Gk(n,r),groups:t}}function iP(e){return{regex:e,deser:([t])=>t}}function bft(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function wft(e,t){const n=Ml(t),r=Ml(t,"{2}"),o=Ml(t,"{3}"),i=Ml(t,"{4}"),a=Ml(t,"{6}"),s=Ml(t,"{1,2}"),l=Ml(t,"{1,3}"),c=Ml(t,"{1,6}"),u=Ml(t,"{1,9}"),d=Ml(t,"{2,4}"),f=Ml(t,"{4,6}"),p=v=>({regex:RegExp(bft(v.val)),deser:([w])=>w,literal:!0}),g=(v=>{if(e.literal)return p(v);switch(v.val){case"G":return Al(t.eras("short"),0);case"GG":return Al(t.eras("long"),0);case"y":return Kn(c);case"yy":return Kn(d,PN);case"yyyy":return Kn(i);case"yyyyy":return Kn(f);case"yyyyyy":return Kn(a);case"M":return Kn(s);case"MM":return Kn(r);case"MMM":return Al(t.months("short",!0),1);case"MMMM":return Al(t.months("long",!0),1);case"L":return Kn(s);case"LL":return Kn(r);case"LLL":return Al(t.months("short",!1),1);case"LLLL":return Al(t.months("long",!1),1);case"d":return Kn(s);case"dd":return Kn(r);case"o":return Kn(l);case"ooo":return Kn(o);case"HH":return Kn(r);case"H":return Kn(s);case"hh":return Kn(r);case"h":return Kn(s);case"mm":return Kn(r);case"m":return Kn(s);case"q":return Kn(s);case"qq":return Kn(r);case"s":return Kn(s);case"ss":return Kn(r);case"S":return Kn(l);case"SSS":return Kn(o);case"u":return iP(u);case"uu":return iP(s);case"uuu":return Kn(n);case"a":return Al(t.meridiems(),0);case"kkkk":return Kn(i);case"kk":return Kn(d,PN);case"W":return Kn(s);case"WW":return Kn(r);case"E":case"c":return Kn(n);case"EEE":return Al(t.weekdays("short",!1),1);case"EEEE":return Al(t.weekdays("long",!1),1);case"ccc":return Al(t.weekdays("short",!0),1);case"cccc":return Al(t.weekdays("long",!0),1);case"Z":case"ZZ":return B9(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return B9(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return iP(/[a-z_+-/]{1,256}?/i);case" ":return iP(/[^\S\n\r]/);default:return p(v)}})(e)||{invalidReason:gft};return g.token=e,g}const xft={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Sft(e,t,n){const{type:r,value:o}=e;if(r==="literal"){const l=/^\s+$/.test(o);return{literal:!l,val:l?" ":o}}const i=t[r];let a=r;r==="hour"&&(t.hour12!=null?a=t.hour12?"hour12":"hour24":t.hourCycle!=null?t.hourCycle==="h11"||t.hourCycle==="h12"?a="hour12":a="hour24":a=n.hour12?"hour12":"hour24");let s=xft[a];if(typeof s=="object"&&(s=s[i]),s)return{literal:!1,val:s}}function Cft(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function Pft(e,t,n){const r=e.match(t);if(r){const o={};let i=1;for(const a in n)if(Tv(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(o[s.token.val[0]]=s.deser(r.slice(i,i+l))),i+=l}return[r,o]}else return[r,{}]}function Tft(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return qt(e.z)||(n=nd.create(e.z)),qt(e.Z)||(n||(n=new Ui(e.Z)),r=e.Z),qt(e.q)||(e.M=(e.q-1)*3+1),qt(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),qt(e.u)||(e.S=WB(e.u)),[Object.keys(e).reduce((i,a)=>{const s=t(a);return s&&(i[s]=e[a]),i},{}),n,r]}let fR=null;function Eft(){return fR||(fR=It.fromMillis(1555555555555)),fR}function Oft(e,t){if(e.literal)return e;const n=Ul.macroTokenToFormatOpts(e.val),r=Dae(n,t);return r==null||r.includes(void 0)?e:r}function $ae(e,t){return Array.prototype.concat(...e.map(n=>Oft(n,t)))}class Rae{constructor(t,n){if(this.locale=t,this.format=n,this.tokens=$ae(Ul.parseFormat(n),t),this.units=this.tokens.map(r=>wft(r,t)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,o]=Cft(this.units);this.regex=RegExp(r,"i"),this.handlers=o}}explainFromTokens(t){if(this.isValid){const[n,r]=Pft(t,this.regex,this.handlers),[o,i,a]=r?Tft(r):[null,null,void 0];if(Tv(r,"a")&&Tv(r,"H"))throw new Bg("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:o,zone:i,specificOffset:a}}else return{input:t,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function _ae(e,t,n){return new Rae(e,n).explainFromTokens(t)}function Ift(e,t,n){const{result:r,zone:o,specificOffset:i,invalidReason:a}=_ae(e,t,n);return[r,o,i,a]}function Dae(e,t){if(!e)return null;const r=Ul.create(t,e).dtFormatter(Eft()),o=r.formatToParts(),i=r.resolvedOptions();return o.map(a=>Sft(a,e,i))}const pR="Invalid DateTime",z9=864e13;function X0(e){return new Gl("unsupported zone",`the zone "${e.name}" is not supported`)}function hR(e){return e.weekData===null&&(e.weekData=iO(e.c)),e.weekData}function mR(e){return e.localWeekData===null&&(e.localWeekData=iO(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Ip(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new It({...n,...t,old:n})}function Nae(e,t,n){let r=e-t*60*1e3;const o=n.offset(r);if(t===o)return[r,t];r-=(o-t)*60*1e3;const i=n.offset(r);return o===i?[r,o]:[e-Math.min(o,i)*60*1e3,Math.max(o,i)]}function aP(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function qP(e,t,n){return Nae(Wk(e),t,n)}function V9(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),o=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,i={...e.c,year:r,month:o,day:Math.min(e.c.day,aO(r,o))+Math.trunc(t.days)+Math.trunc(t.weeks)*7},a=Nn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=Wk(i);let[l,c]=Nae(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function eg(e,t,n,r,o,i){const{setZone:a,zone:s}=n;if(e&&Object.keys(e).length!==0||t){const l=t||s,c=It.fromObject(e,{...n,zone:l,specificOffset:i});return a?c:c.setZone(s)}else return It.invalid(new Gl("unparsable",`the input "${o}" can't be parsed as ${r}`))}function sP(e,t,n=!0){return e.isValid?Ul.create(er.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function gR(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=ho(e.c.year,n?6:4),t?(r+="-",r+=ho(e.c.month),r+="-",r+=ho(e.c.day)):(r+=ho(e.c.month),r+=ho(e.c.day)),r}function H9(e,t,n,r,o,i){let a=ho(e.c.hour);return t?(a+=":",a+=ho(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=":")):a+=ho(e.c.minute),(e.c.millisecond!==0||e.c.second!==0||!n)&&(a+=ho(e.c.second),(e.c.millisecond!==0||!r)&&(a+=".",a+=ho(e.c.millisecond,3))),o&&(e.isOffsetFixed&&e.offset===0&&!i?a+="Z":e.o<0?(a+="-",a+=ho(Math.trunc(-e.o/60)),a+=":",a+=ho(Math.trunc(-e.o%60))):(a+="+",a+=ho(Math.trunc(e.o/60)),a+=":",a+=ho(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const Lae={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},kft={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Mft={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Fae=["year","month","day","hour","minute","second","millisecond"],Aft=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],$ft=["year","ordinal","hour","minute","second","millisecond"];function Rft(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new jie(e);return t}function U9(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Rft(e)}}function _ft(e){return YP[e]||(KP===void 0&&(KP=Vr.now()),YP[e]=e.offset(KP)),YP[e]}function W9(e,t){const n=Ud(t.zone,Vr.defaultZone);if(!n.isValid)return It.invalid(X0(n));const r=er.fromObject(t);let o,i;if(qt(e.year))o=Vr.now();else{for(const l of Fae)qt(e[l])&&(e[l]=Lae[l]);const a=cae(e)||uae(e);if(a)return It.invalid(a);const s=_ft(n);[o,i]=qP(e,s,n)}return new It({ts:o,zone:n,loc:r,o:i})}function G9(e,t,n){const r=qt(n.round)?!0:n.round,o=(a,s)=>(a=GB(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),i=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return o(i(n.unit),n.unit);for(const a of n.units){const s=i(a);if(Math.abs(s)>=1)return o(s,a)}return o(e>t?-0:0,n.units[n.units.length-1])}function q9(e){let t={},n;return e.length>0&&typeof e[e.length-1]=="object"?(t=e[e.length-1],n=Array.from(e).slice(0,e.length-1)):n=Array.from(e),[t,n]}let KP,YP={};class It{constructor(t){const n=t.zone||Vr.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new Gl("invalid input"):null)||(n.isValid?null:X0(n));this.ts=qt(t.ts)?Vr.now():t.ts;let o=null,i=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[o,i]=[t.old.c,t.old.o];else{const s=xf(t.o)&&!t.old?t.o:n.offset(this.ts);o=aP(this.ts,s),r=Number.isNaN(o.year)?new Gl("invalid input"):null,o=r?null:o,i=r?null:s}this._zone=n,this.loc=t.loc||er.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=o,this.o=i,this.isLuxonDateTime=!0}static now(){return new It({})}static local(){const[t,n]=q9(arguments),[r,o,i,a,s,l,c]=n;return W9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static utc(){const[t,n]=q9(arguments),[r,o,i,a,s,l,c]=n;return t.zone=Ui.utcInstance,W9({year:r,month:o,day:i,hour:a,minute:s,second:l,millisecond:c},t)}static fromJSDate(t,n={}){const r=udt(t)?t.valueOf():NaN;if(Number.isNaN(r))return It.invalid("invalid input");const o=Ud(n.zone,Vr.defaultZone);return o.isValid?new It({ts:r,zone:o,loc:er.fromObject(n)}):It.invalid(X0(o))}static fromMillis(t,n={}){if(xf(t))return t<-z9||t>z9?It.invalid("Timestamp out of range"):new It({ts:t,zone:Ud(n.zone,Vr.defaultZone),loc:er.fromObject(n)});throw new yi(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(xf(t))return new It({ts:t*1e3,zone:Ud(n.zone,Vr.defaultZone),loc:er.fromObject(n)});throw new yi("fromSeconds requires a numerical input")}static fromObject(t,n={}){t=t||{};const r=Ud(n.zone,Vr.defaultZone);if(!r.isValid)return It.invalid(X0(r));const o=er.fromObject(n),i=sO(t,U9),{minDaysInFirstWeek:a,startOfWeek:s}=A9(i,o),l=Vr.now(),c=qt(n.specificOffset)?r.offset(l):n.specificOffset,u=!qt(i.ordinal),d=!qt(i.year),f=!qt(i.month)||!qt(i.day),p=d||f,m=i.weekYear||i.weekNumber;if((p||u)&&m)throw new Bg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&u)throw new Bg("Can't mix ordinal dates with month/day");const g=m||i.weekday&&!p;let v,w,x=aP(l,c);g?(v=Aft,w=kft,x=iO(x,a,s)):u?(v=$ft,w=Mft,x=dR(x)):(v=Fae,w=Lae);let S=!1;for(const I of v){const R=i[I];qt(R)?S?i[I]=w[I]:i[I]=x[I]:S=!0}const P=g?sdt(i,a,s):u?ldt(i):cae(i),T=P||uae(i);if(T)return It.invalid(T);const E=g?k9(i,a,s):u?M9(i):i,[O,k]=qP(E,c,r),A=new It({ts:O,zone:r,o:k,loc:o});return i.weekday&&p&&t.weekday!==A.weekday?It.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${A.toISO()}`):A.isValid?A:It.invalid(A.invalid)}static fromISO(t,n={}){const[r,o]=Zdt(t);return eg(r,o,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,o]=eft(t);return eg(r,o,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,o]=tft(t);return eg(r,o,n,"HTTP",n)}static fromFormat(t,n,r={}){if(qt(t)||qt(n))throw new yi("fromFormat requires an input string and a format");const{locale:o=null,numberingSystem:i=null}=r,a=er.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0}),[s,l,c,u]=Ift(a,t,n);return u?It.invalid(u):eg(s,l,r,`format ${n}`,t,c)}static fromString(t,n,r={}){return It.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,o]=lft(t);return eg(r,o,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new yi("need to specify a reason the DateTime is invalid");const r=t instanceof Gl?t:new Gl(t,n);if(Vr.throwOnInvalid)throw new _ut(r);return new It({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}static parseFormatForOpts(t,n={}){const r=Dae(t,er.fromObject(n));return r?r.map(o=>o?o.val:null).join(""):null}static expandFormat(t,n={}){return $ae(Ul.parseFormat(t),er.fromObject(n)).map(o=>o.val).join("")}static resetCache(){KP=void 0,YP={}}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?hR(this).weekYear:NaN}get weekNumber(){return this.isValid?hR(this).weekNumber:NaN}get weekday(){return this.isValid?hR(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?mR(this).weekday:NaN}get localWeekNumber(){return this.isValid?mR(this).weekNumber:NaN}get localWeekYear(){return this.isValid?mR(this).weekYear:NaN}get ordinal(){return this.isValid?dR(this.c).ordinal:NaN}get monthShort(){return this.isValid?Y0.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Y0.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Y0.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Y0.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const t=864e5,n=6e4,r=Wk(this.c),o=this.zone.offset(r-t),i=this.zone.offset(r+t),a=this.zone.offset(r-o*n),s=this.zone.offset(r-i*n);if(a===s)return[this];const l=r-a*n,c=r-s*n,u=aP(l,a),d=aP(c,s);return u.hour===d.hour&&u.minute===d.minute&&u.second===d.second&&u.millisecond===d.millisecond?[Ip(this,{ts:l}),Ip(this,{ts:c})]:[this]}get isInLeapYear(){return e1(this.year)}get daysInMonth(){return aO(this.year,this.month)}get daysInYear(){return this.isValid?uy(this.year):NaN}get weeksInWeekYear(){return this.isValid?Wx(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Wx(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(t={}){const{locale:n,numberingSystem:r,calendar:o}=Ul.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:o}}toUTC(t=0,n={}){return this.setZone(Ui.instance(t),n)}toLocal(){return this.setZone(Vr.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Ud(t,Vr.defaultZone),t.equals(this.zone))return this;if(t.isValid){let o=this.ts;if(n||r){const i=t.offset(this.ts),a=this.toObject();[o]=qP(a,i,t)}return Ip(this,{ts:o,zone:t})}else return It.invalid(X0(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const o=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return Ip(this,{loc:o})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=sO(t,U9),{minDaysInFirstWeek:r,startOfWeek:o}=A9(n,this.loc),i=!qt(n.weekYear)||!qt(n.weekNumber)||!qt(n.weekday),a=!qt(n.ordinal),s=!qt(n.year),l=!qt(n.month)||!qt(n.day),c=s||l,u=n.weekYear||n.weekNumber;if((c||a)&&u)throw new Bg("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new Bg("Can't mix ordinal dates with month/day");let d;i?d=k9({...iO(this.c,r,o),...n},r,o):qt(n.ordinal)?(d={...this.toObject(),...n},qt(n.day)&&(d.day=Math.min(aO(d.year,d.month),d.day))):d=M9({...dR(this.c),...n});const[f,p]=qP(d,this.o,this.zone);return Ip(this,{ts:f,o:p})}plus(t){if(!this.isValid)return this;const n=Nn.fromDurationLike(t);return Ip(this,V9(this,n))}minus(t){if(!this.isValid)return this;const n=Nn.fromDurationLike(t).negate();return Ip(this,V9(this,n))}startOf(t,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},o=Nn.normalizeUnit(t);switch(o){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(o==="weeks")if(n){const i=this.loc.getStartOfWeek(),{weekday:a}=this;athis.valueOf(),s=a?this:t,l=a?t:this,c=mft(s,l,i,o);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(It.now(),t,n)}until(t){return this.isValid?eo.fromDateTimes(this,t):this}hasSame(t,n,r){if(!this.isValid)return!1;const o=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n,r)<=o&&o<=i.endOf(n,r)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||It.fromObject({},{zone:this.zone}),r=t.padding?thisn.valueOf(),Math.min)}static max(...t){if(!t.every(It.isDateTime))throw new yi("max requires all arguments be DateTimes");return $9(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:o=null,numberingSystem:i=null}=r,a=er.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});return _ae(a,t,n)}static fromStringExplain(t,n,r={}){return It.fromFormatExplain(t,n,r)}static buildFormatParser(t,n={}){const{locale:r=null,numberingSystem:o=null}=n,i=er.fromOpts({locale:r,numberingSystem:o,defaultToEN:!0});return new Rae(i,t)}static fromFormatParser(t,n,r={}){if(qt(t)||qt(n))throw new yi("fromFormatParser requires an input string and a format parser");const{locale:o=null,numberingSystem:i=null}=r,a=er.fromOpts({locale:o,numberingSystem:i,defaultToEN:!0});if(!a.equals(n.locale))throw new yi(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${n.locale}`);const{result:s,zone:l,specificOffset:c,invalidReason:u}=n.explainFromTokens(t);return u?It.invalid(u):eg(s,l,r,`format ${n.format}`,t,c)}static get DATE_SHORT(){return oO}static get DATE_MED(){return Bie}static get DATE_MED_WITH_WEEKDAY(){return Lut}static get DATE_FULL(){return zie}static get DATE_HUGE(){return Vie}static get TIME_SIMPLE(){return Hie}static get TIME_WITH_SECONDS(){return Uie}static get TIME_WITH_SHORT_OFFSET(){return Wie}static get TIME_WITH_LONG_OFFSET(){return Gie}static get TIME_24_SIMPLE(){return qie}static get TIME_24_WITH_SECONDS(){return Kie}static get TIME_24_WITH_SHORT_OFFSET(){return Yie}static get TIME_24_WITH_LONG_OFFSET(){return Xie}static get DATETIME_SHORT(){return Qie}static get DATETIME_SHORT_WITH_SECONDS(){return Jie}static get DATETIME_MED(){return Zie}static get DATETIME_MED_WITH_SECONDS(){return eae}static get DATETIME_MED_WITH_WEEKDAY(){return Fut}static get DATETIME_FULL(){return tae}static get DATETIME_FULL_WITH_SECONDS(){return nae}static get DATETIME_HUGE(){return rae}static get DATETIME_HUGE_WITH_SECONDS(){return oae}}function T0(e){if(It.isDateTime(e))return e;if(e&&e.valueOf&&xf(e.valueOf()))return It.fromJSDate(e);if(e&&typeof e=="object")return It.fromObject(e);throw new yi(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Dft={y:{sectionType:"year",contentType:"digit",maxLength:4},yy:"year",yyyy:{sectionType:"year",contentType:"digit",maxLength:4},L:{sectionType:"month",contentType:"digit",maxLength:2},LL:"month",LLL:{sectionType:"month",contentType:"letter"},LLLL:{sectionType:"month",contentType:"letter"},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},d:{sectionType:"day",contentType:"digit",maxLength:2},dd:"day",c:{sectionType:"weekDay",contentType:"digit",maxLength:1},ccc:{sectionType:"weekDay",contentType:"letter"},cccc:{sectionType:"weekDay",contentType:"letter"},E:{sectionType:"weekDay",contentType:"digit",maxLength:2},EEE:{sectionType:"weekDay",contentType:"letter"},EEEE:{sectionType:"weekDay",contentType:"letter"},a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},Nft={year:"yyyy",month:"LLLL",monthShort:"MMM",dayOfMonth:"d",dayOfMonthFull:"d",weekday:"cccc",weekdayShort:"ccccc",hours24h:"HH",hours12h:"hh",meridiem:"a",minutes:"mm",seconds:"ss",fullDate:"DD",keyboardDate:"D",shortDate:"MMM d",normalDate:"d MMMM",normalDateWithWeekday:"EEE, MMM d",fullTime:"t",fullTime12h:"hh:mm a",fullTime24h:"HH:mm",keyboardDateTime:"D t",keyboardDateTime12h:"D hh:mm a",keyboardDateTime24h:"D T"};class Kk{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="luxon",this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"'",end:"'"},this.formatTokenMap=Dft,this.setLocaleToValue=r=>{const o=this.getCurrentLocaleCode();return o===r.locale?r:r.setLocale(o)},this.date=(r,o="default")=>r===null?null:typeof r>"u"?It.fromJSDate(new Date,{locale:this.locale,zone:o}):It.fromISO(r,{locale:this.locale,zone:o}),this.getInvalidDate=()=>It.fromJSDate(new Date("Invalid Date")),this.getTimezone=r=>r.zone.type==="system"?"system":r.zoneName,this.setTimezone=(r,o)=>r.zone.equals(Y0.normalizeZone(o))?r:r.setZone(o),this.toJsDate=r=>r.toJSDate(),this.parse=(r,o)=>r===""?null:It.fromFormat(r,o,{locale:this.locale}),this.getCurrentLocaleCode=()=>this.locale,this.is12HourCycleInCurrentLocale=()=>{var r,o;return typeof Intl>"u"||typeof Intl.DateTimeFormat>"u"?!0:!!((o=(r=new Intl.DateTimeFormat(this.locale,{hour:"numeric"}))==null?void 0:r.resolvedOptions())!=null&&o.hour12)},this.expandFormat=r=>{const o=/''|'(''|[^'])+('|$)|[^']*/g,i=[...Object.keys(this.formatTokenMap),"yyyyy"],a=new RegExp(`^(${i.join("|")})+$`),s=/(?:^|[^a-z])([a-z]+)(?:[^a-z]|$)|([a-z]+)/gi;return r.match(o).map(l=>l[0]==="'"?l:It.expandFormat(l,{locale:this.locale}).replace(s,(d,f,p)=>{const m=f||p;return a.test(m)?d:`'${d}'`})).join("").replace("yyyyy","yyyy")},this.isValid=r=>r===null?!1:r.isValid,this.format=(r,o)=>this.formatByString(r,this.formats[o]),this.formatByString=(r,o)=>r.setLocale(this.locale).toFormat(o),this.formatNumber=r=>r,this.isEqual=(r,o)=>r===null&&o===null?!0:r===null||o===null?!1:+r==+o,this.isSameYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"year")},this.isSameMonth=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"month")},this.isSameDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"day")},this.isSameHour=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.hasSame(i,"hour")},this.isAfter=(r,o)=>r>o,this.isAfterYear=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfYear(i),"years").toObject().years>0},this.isAfterDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.endOfDay(i),"days").toObject().days>0},this.isBefore=(r,o)=>r{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfYear(i),"years").toObject().years<0},this.isBeforeDay=(r,o)=>{const i=this.setTimezone(o,this.getTimezone(r));return r.diff(this.startOfDay(i),"days").toObject().days<0},this.isWithinRange=(r,[o,i])=>this.isEqual(r,o)||this.isEqual(r,i)||this.isAfter(r,o)&&this.isBefore(r,i),this.startOfYear=r=>r.startOf("year"),this.startOfMonth=r=>r.startOf("month"),this.startOfWeek=r=>this.setLocaleToValue(r).startOf("week",{useLocaleWeeks:!0}),this.startOfDay=r=>r.startOf("day"),this.endOfYear=r=>r.endOf("year"),this.endOfMonth=r=>r.endOf("month"),this.endOfWeek=r=>this.setLocaleToValue(r).endOf("week",{useLocaleWeeks:!0}),this.endOfDay=r=>r.endOf("day"),this.addYears=(r,o)=>r.plus({years:o}),this.addMonths=(r,o)=>r.plus({months:o}),this.addWeeks=(r,o)=>r.plus({weeks:o}),this.addDays=(r,o)=>r.plus({days:o}),this.addHours=(r,o)=>r.plus({hours:o}),this.addMinutes=(r,o)=>r.plus({minutes:o}),this.addSeconds=(r,o)=>r.plus({seconds:o}),this.getYear=r=>r.get("year"),this.getMonth=r=>r.get("month")-1,this.getDate=r=>r.get("day"),this.getHours=r=>r.get("hour"),this.getMinutes=r=>r.get("minute"),this.getSeconds=r=>r.get("second"),this.getMilliseconds=r=>r.get("millisecond"),this.setYear=(r,o)=>r.set({year:o}),this.setMonth=(r,o)=>r.set({month:o+1}),this.setDate=(r,o)=>r.set({day:o}),this.setHours=(r,o)=>r.set({hour:o}),this.setMinutes=(r,o)=>r.set({minute:o}),this.setSeconds=(r,o)=>r.set({second:o}),this.setMilliseconds=(r,o)=>r.set({millisecond:o}),this.getDaysInMonth=r=>r.daysInMonth,this.getWeekArray=r=>{const o=this.startOfWeek(this.startOfMonth(r)),i=this.endOfWeek(this.endOfMonth(r)),{days:a}=i.diff(o,"days").toObject(),s=[];return new Array(Math.round(a)).fill(0).map((l,c)=>c).map(l=>o.plus({days:l})).forEach((l,c)=>{if(c===0||c%7===0&&c>6){s.push([l]);return}s[s.length-1].push(l)}),s},this.getWeekNumber=r=>r.localWeekNumber??r.weekNumber,this.getDayOfWeek=r=>r.weekday,this.getYearRange=([r,o])=>{const i=this.startOfYear(r),a=this.endOfYear(o),s=[];let l=i;for(;this.isBefore(l,a);)s.push(l),l=this.addYears(l,1);return s},this.locale=t||"en-US",this.formats=ue({},Nft,n)}}const XB=lt($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search");function QB({callback:e,initialIngredient:t}){const n=t?{value:t,data:{id:-1,name:t,image:null,image_thumbnail:null}}:null,[r,o]=y.useState(!0),[i,a]=y.useState(n),[s,l]=y.useState(""),[c,u]=y.useState([]),[d,f]=Ue(),p=y.useMemo(()=>dk(m=>__e(m,f.language,r).then(g=>u(g)),200),[f.language,r]);return y.useEffect(()=>{if(s===""){u(i?[i]:[]);return}return p(s),()=>{}},[i,s,p]),Q(Gt,{children:[C(oc,{id:"ingredient-autocomplete",getOptionLabel:m=>m.value,"data-testid":"autocomplete",filterOptions:m=>m,options:c,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:i,noOptionsText:d("noResults"),isOptionEqualToValue:(m,g)=>m.value===g.value,onChange:(m,g)=>{u(g?[g,...c]:c),a(g),e(g)},onInputChange:(m,g)=>{l(g)},renderInput:m=>C(yn,{...m,label:d("nutrition.searchIngredientName"),fullWidth:!0,InputProps:{...m.InputProps,startAdornment:Q(Mt,{children:[C(po,{position:"start",children:C(XB,{})}),m.InputProps.startAdornment]})}}),renderOption:(m,g)=>UY("li",{...m,key:`ingredient-${g.data.id}`},Q(ls,{disablePadding:!0,component:"div",children:[C(Gi,{children:C(ic,{alt:"",src:`${lj}${g.data.image}`,variant:"rounded",children:C(id,{})})}),C(wo,{primary:g.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}}})]}))}),f.language!==Gy&&C(LI,{children:C(Uy,{control:C(qf,{checked:r,onChange:(m,g)=>o(g)}),label:d("alsoSearchEnglish")})})]})}var Lft=function(t){return Fft(t)&&!jft(t)};function Fft(e){return!!e&&typeof e=="object"}function jft(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||Vft(e)}var Bft=typeof Symbol=="function"&&Symbol.for,zft=Bft?Symbol.for("react.element"):60103;function Vft(e){return e.$$typeof===zft}function Hft(e){return Array.isArray(e)?[]:{}}function lO(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Gx(Hft(e),e,t):e}function Uft(e,t,n){return e.concat(t).map(function(r){return lO(r,n)})}function Wft(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach(function(o){r[o]=lO(e[o],n)}),Object.keys(t).forEach(function(o){!n.isMergeableObject(t[o])||!e[o]?r[o]=lO(t[o],n):r[o]=Gx(e[o],t[o],n)}),r}function Gx(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||Uft,n.isMergeableObject=n.isMergeableObject||Lft;var r=Array.isArray(t),o=Array.isArray(e),i=r===o;return i?r?n.arrayMerge(e,t,n):Wft(e,t,n):lO(t,n)}Gx.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,o){return Gx(r,o,n)},{})};var TN=Gx,jae=typeof global=="object"&&global&&global.Object===Object&&global,Gft=typeof self=="object"&&self&&self.Object===Object&&self,Qc=jae||Gft||Function("return this")(),Rf=Qc.Symbol,Bae=Object.prototype,qft=Bae.hasOwnProperty,Kft=Bae.toString,E0=Rf?Rf.toStringTag:void 0;function Yft(e){var t=qft.call(e,E0),n=e[E0];try{e[E0]=void 0;var r=!0}catch{}var o=Kft.call(e);return r&&(t?e[E0]=n:delete e[E0]),o}var Xft=Object.prototype,Qft=Xft.toString;function Jft(e){return Qft.call(e)}var Zft="[object Null]",ept="[object Undefined]",K9=Rf?Rf.toStringTag:void 0;function om(e){return e==null?e===void 0?ept:Zft:K9&&K9 in Object(e)?Yft(e):Jft(e)}function zae(e,t){return function(n){return e(t(n))}}var JB=zae(Object.getPrototypeOf,Object);function im(e){return e!=null&&typeof e=="object"}var tpt="[object Object]",npt=Function.prototype,rpt=Object.prototype,Vae=npt.toString,opt=rpt.hasOwnProperty,ipt=Vae.call(Object);function Y9(e){if(!im(e)||om(e)!=tpt)return!1;var t=JB(e);if(t===null)return!0;var n=opt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Vae.call(n)==ipt}function apt(){this.__data__=[],this.size=0}function Hae(e,t){return e===t||e!==e&&t!==t}function Yk(e,t){for(var n=e.length;n--;)if(Hae(e[n][0],t))return n;return-1}var spt=Array.prototype,lpt=spt.splice;function cpt(e){var t=this.__data__,n=Yk(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():lpt.call(t,n,1),--this.size,!0}function upt(e){var t=this.__data__,n=Yk(t,e);return n<0?void 0:t[n][1]}function dpt(e){return Yk(this.__data__,e)>-1}function fpt(e,t){var n=this.__data__,r=Yk(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function cd(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=fht}var pht="[object Arguments]",hht="[object Array]",mht="[object Boolean]",ght="[object Date]",yht="[object Error]",vht="[object Function]",bht="[object Map]",wht="[object Number]",xht="[object Object]",Sht="[object RegExp]",Cht="[object Set]",Pht="[object String]",Tht="[object WeakMap]",Eht="[object ArrayBuffer]",Oht="[object DataView]",Iht="[object Float32Array]",kht="[object Float64Array]",Mht="[object Int8Array]",Aht="[object Int16Array]",$ht="[object Int32Array]",Rht="[object Uint8Array]",_ht="[object Uint8ClampedArray]",Dht="[object Uint16Array]",Nht="[object Uint32Array]",Ir={};Ir[Iht]=Ir[kht]=Ir[Mht]=Ir[Aht]=Ir[$ht]=Ir[Rht]=Ir[_ht]=Ir[Dht]=Ir[Nht]=!0;Ir[pht]=Ir[hht]=Ir[Eht]=Ir[mht]=Ir[Oht]=Ir[ght]=Ir[yht]=Ir[vht]=Ir[bht]=Ir[wht]=Ir[xht]=Ir[Sht]=Ir[Cht]=Ir[Pht]=Ir[Tht]=!1;function Lht(e){return im(e)&&Xae(e.length)&&!!Ir[om(e)]}function ZB(e){return function(t){return e(t)}}var Qae=typeof Ya=="object"&&Ya&&!Ya.nodeType&&Ya,Iw=Qae&&typeof Xa=="object"&&Xa&&!Xa.nodeType&&Xa,Fht=Iw&&Iw.exports===Qae,vR=Fht&&jae.process,Ev=function(){try{var e=Iw&&Iw.require&&Iw.require("util").types;return e||vR&&vR.binding&&vR.binding("util")}catch{}}(),t7=Ev&&Ev.isTypedArray,jht=t7?ZB(t7):Lht,Bht=Object.prototype,zht=Bht.hasOwnProperty;function Jae(e,t){var n=o1(e),r=!n&&iht(e),o=!n&&!r&&Yae(e),i=!n&&!r&&!o&&jht(e),a=n||r||o||i,s=a?tht(e.length,String):[],l=s.length;for(var c in e)(t||zht.call(e,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||i&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||dht(c,l)))&&s.push(c);return s}var Vht=Object.prototype;function ez(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Vht;return e===n}var Hht=zae(Object.keys,Object),Uht=Object.prototype,Wht=Uht.hasOwnProperty;function Ght(e){if(!ez(e))return Hht(e);var t=[];for(var n in Object(e))Wht.call(e,n)&&n!="constructor"&&t.push(n);return t}function Zae(e){return e!=null&&Xae(e.length)&&!Uae(e)}function tz(e){return Zae(e)?Jae(e):Ght(e)}function qht(e,t){return e&&Qk(t,tz(t),e)}function Kht(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Yht=Object.prototype,Xht=Yht.hasOwnProperty;function Qht(e){if(!r1(e))return Kht(e);var t=ez(e),n=[];for(var r in e)r=="constructor"&&(t||!Xht.call(e,r))||n.push(r);return n}function nz(e){return Zae(e)?Jae(e,!0):Qht(e)}function Jht(e,t){return e&&Qk(t,nz(t),e)}var ese=typeof Ya=="object"&&Ya&&!Ya.nodeType&&Ya,n7=ese&&typeof Xa=="object"&&Xa&&!Xa.nodeType&&Xa,Zht=n7&&n7.exports===ese,r7=Zht?Qc.Buffer:void 0,o7=r7?r7.allocUnsafe:void 0;function emt(e,t){if(t)return e.slice();var n=e.length,r=o7?o7(n):new e.constructor(n);return e.copy(r),r}function tse(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0)&&(n[o]=e[o]);return n}var Jk=y.createContext(void 0);Jk.displayName="FormikContext";var Bgt=Jk.Provider;Jk.Consumer;function pse(){var e=y.useContext(Jk);return e}var Ds=function(t){return typeof t=="function"},i1=function(t){return t!==null&&typeof t=="object"},zgt=function(t){return String(Math.floor(Number(t)))===t},bR=function(t){return Object.prototype.toString.call(t)==="[object String]"},Vgt=function(t){return y.Children.count(t)===0},wR=function(t){return i1(t)&&Ds(t.then)};function Da(e,t,n,r){r===void 0&&(r=0);for(var o=dse(t);e&&r=0?[]:{}}}return(i===0?e:o)[a[i]]===n?e:(n===void 0?delete o[a[i]]:o[a[i]]=n,i===0&&n===void 0&&delete r[a[i]],r)}function hse(e,t,n,r){n===void 0&&(n=new WeakMap),r===void 0&&(r={});for(var o=0,i=Object.keys(e);o0?Te.map(function(Me){return I(Me,Da(ye,Me))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(Oe).then(function(Me){return Me.reduce(function(We,Ve,Qe){return Ve==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||Ve&&(We=hh(We,Te[Qe],Ve)),We},{})})},[I]),N=y.useCallback(function(ye){return Promise.all([R(ye),f.validationSchema?A(ye):{},f.validate?k(ye):{}]).then(function(Te){var Oe=Te[0],Me=Te[1],We=Te[2],Ve=TN.all([Oe,Me,We],{arrayMerge:qgt});return Ve})},[f.validate,f.validationSchema,R,k,A]),L=Rs(function(ye){return ye===void 0&&(ye=E.values),O({type:"SET_ISVALIDATING",payload:!0}),N(ye).then(function(Te){return w.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:Te})),Te})});y.useEffect(function(){a&&w.current===!0&&Fp(p.current,f.initialValues)&&L(p.current)},[a,L]);var j=y.useCallback(function(ye){var Te=ye&&ye.values?ye.values:p.current,Oe=ye&&ye.errors?ye.errors:m.current?m.current:f.initialErrors||{},Me=ye&&ye.touched?ye.touched:g.current?g.current:f.initialTouched||{},We=ye&&ye.status?ye.status:v.current?v.current:f.initialStatus;p.current=Te,m.current=Oe,g.current=Me,v.current=We;var Ve=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!ye&&!!ye.isSubmitting,errors:Oe,touched:Me,status:We,values:Te,isValidating:!!ye&&!!ye.isValidating,submitCount:ye&&ye.submitCount&&typeof ye.submitCount=="number"?ye.submitCount:0}})};if(f.onReset){var Qe=f.onReset(E.values,ce);wR(Qe)?Qe.then(Ve):Ve()}else Ve()},[f.initialErrors,f.initialStatus,f.initialTouched,f.onReset]);y.useEffect(function(){w.current===!0&&!Fp(p.current,f.initialValues)&&c&&(p.current=f.initialValues,j(),a&&L(p.current))},[c,f.initialValues,j,a,L]),y.useEffect(function(){c&&w.current===!0&&!Fp(m.current,f.initialErrors)&&(m.current=f.initialErrors||kp,O({type:"SET_ERRORS",payload:f.initialErrors||kp}))},[c,f.initialErrors]),y.useEffect(function(){c&&w.current===!0&&!Fp(g.current,f.initialTouched)&&(g.current=f.initialTouched||cP,O({type:"SET_TOUCHED",payload:f.initialTouched||cP}))},[c,f.initialTouched]),y.useEffect(function(){c&&w.current===!0&&!Fp(v.current,f.initialStatus)&&(v.current=f.initialStatus,O({type:"SET_STATUS",payload:f.initialStatus}))},[c,f.initialStatus,f.initialTouched]);var _=Rs(function(ye){if(x.current[ye]&&Ds(x.current[ye].validate)){var Te=Da(E.values,ye),Oe=x.current[ye].validate(Te);return wR(Oe)?(O({type:"SET_ISVALIDATING",payload:!0}),Oe.then(function(Me){return Me}).then(function(Me){O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Me}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Oe}}),Promise.resolve(Oe))}else if(f.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),A(E.values,ye).then(function(Me){return Me}).then(function(Me){O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Da(Me,ye)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),D=y.useCallback(function(ye,Te){var Oe=Te.validate;x.current[ye]={validate:Oe}},[]),z=y.useCallback(function(ye){delete x.current[ye]},[]),F=Rs(function(ye,Te){O({type:"SET_TOUCHED",payload:ye});var Oe=Te===void 0?o:Te;return Oe?L(E.values):Promise.resolve()}),H=y.useCallback(function(ye){O({type:"SET_ERRORS",payload:ye})},[]),U=Rs(function(ye,Te){var Oe=Ds(ye)?ye(E.values):ye;O({type:"SET_VALUES",payload:Oe});var Me=Te===void 0?n:Te;return Me?L(Oe):Promise.resolve()}),q=y.useCallback(function(ye,Te){O({type:"SET_FIELD_ERROR",payload:{field:ye,value:Te}})},[]),X=Rs(function(ye,Te,Oe){O({type:"SET_FIELD_VALUE",payload:{field:ye,value:Te}});var Me=Oe===void 0?n:Oe;return Me?L(hh(E.values,ye,Te)):Promise.resolve()}),ae=y.useCallback(function(ye,Te){var Oe=Te,Me=ye,We;if(!bR(ye)){ye.persist&&ye.persist();var Ve=ye.target?ye.target:ye.currentTarget,Qe=Ve.type,ut=Ve.name,nt=Ve.id,et=Ve.value,yt=Ve.checked,wn=Ve.outerHTML,Ke=Ve.options,$e=Ve.multiple;Oe=Te||ut||nt,Me=/number|range/.test(Qe)?(We=parseFloat(et),isNaN(We)?"":We):/checkbox/.test(Qe)?Ygt(Da(E.values,Oe),yt,et):Ke&&$e?Kgt(Ke):et}Oe&&X(Oe,Me)},[X,E.values]),Z=Rs(function(ye){if(bR(ye))return function(Te){return ae(Te,ye)};ae(ye)}),K=Rs(function(ye,Te,Oe){Te===void 0&&(Te=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:ye,value:Te}});var Me=Oe===void 0?o:Oe;return Me?L(E.values):Promise.resolve()}),te=y.useCallback(function(ye,Te){ye.persist&&ye.persist();var Oe=ye.target,Me=Oe.name,We=Oe.id,Ve=Oe.outerHTML,Qe=Te||Me||We;K(Qe,!0)},[K]),pe=Rs(function(ye){if(bR(ye))return function(Te){return te(Te,ye)};te(ye)}),ie=y.useCallback(function(ye){Ds(ye)?O({type:"SET_FORMIK_STATE",payload:ye}):O({type:"SET_FORMIK_STATE",payload:function(){return ye}})},[]),le=y.useCallback(function(ye){O({type:"SET_STATUS",payload:ye})},[]),re=y.useCallback(function(ye){O({type:"SET_ISSUBMITTING",payload:ye})},[]),fe=Rs(function(){return O({type:"SUBMIT_ATTEMPT"}),L().then(function(ye){var Te=ye instanceof Error,Oe=!Te&&Object.keys(ye).length===0;if(Oe){var Me;try{if(Me=me(),Me===void 0)return}catch(We){throw We}return Promise.resolve(Me).then(function(We){return w.current&&O({type:"SUBMIT_SUCCESS"}),We}).catch(function(We){if(w.current)throw O({type:"SUBMIT_FAILURE"}),We})}else if(w.current&&(O({type:"SUBMIT_FAILURE"}),Te))throw ye})}),ee=Rs(function(ye){ye&&ye.preventDefault&&Ds(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&Ds(ye.stopPropagation)&&ye.stopPropagation(),fe().catch(function(Te){console.warn("Warning: An unhandled error was caught from submitForm()",Te)})}),ce={resetForm:j,validateForm:L,validateField:_,setErrors:H,setFieldError:q,setFieldTouched:K,setFieldValue:X,setStatus:le,setSubmitting:re,setTouched:F,setValues:U,setFormikState:ie,submitForm:fe},me=Rs(function(){return u(E.values,ce)}),we=Rs(function(ye){ye&&ye.preventDefault&&Ds(ye.preventDefault)&&ye.preventDefault(),ye&&ye.stopPropagation&&Ds(ye.stopPropagation)&&ye.stopPropagation(),j()}),ge=y.useCallback(function(ye){return{value:Da(E.values,ye),error:Da(E.errors,ye),touched:!!Da(E.touched,ye),initialValue:Da(p.current,ye),initialTouched:!!Da(g.current,ye),initialError:Da(m.current,ye)}},[E.errors,E.touched,E.values]),Se=y.useCallback(function(ye){return{setValue:function(Oe,Me){return X(ye,Oe,Me)},setTouched:function(Oe,Me){return K(ye,Oe,Me)},setError:function(Oe){return q(ye,Oe)}}},[X,K,q]),xe=y.useCallback(function(ye){var Te=i1(ye),Oe=Te?ye.name:ye,Me=Da(E.values,Oe),We={name:Oe,value:Me,onChange:Z,onBlur:pe};if(Te){var Ve=ye.type,Qe=ye.value,ut=ye.as,nt=ye.multiple;Ve==="checkbox"?Qe===void 0?We.checked=!!Me:(We.checked=!!(Array.isArray(Me)&&~Me.indexOf(Qe)),We.value=Qe):Ve==="radio"?(We.checked=Me===Qe,We.value=Qe):ut==="select"&&nt&&(We.value=We.value||[],We.multiple=!0)}return We},[pe,Z,E.values]),Ie=y.useMemo(function(){return!Fp(p.current,E.values)},[p.current,E.values]),Re=y.useMemo(function(){return typeof s<"u"?Ie?E.errors&&Object.keys(E.errors).length===0:s!==!1&&Ds(s)?s(f):s:E.errors&&Object.keys(E.errors).length===0},[s,Ie,E.errors,f]),_e=zo({},E,{initialValues:p.current,initialErrors:m.current,initialTouched:g.current,initialStatus:v.current,handleBlur:pe,handleChange:Z,handleReset:we,handleSubmit:ee,resetForm:j,setErrors:H,setFormikState:ie,setFieldTouched:K,setFieldValue:X,setFieldError:q,setStatus:le,setSubmitting:re,setTouched:F,setValues:U,submitForm:fe,validateForm:L,validateField:_,isValid:Re,dirty:Ie,unregisterField:z,registerField:D,getFieldProps:xe,getFieldMeta:ge,getFieldHelpers:Se,validateOnBlur:o,validateOnChange:n,validateOnMount:a});return _e}function yl(e){var t=Ugt(e),n=e.component,r=e.children,o=e.render,i=e.innerRef;return y.useImperativeHandle(i,function(){return t}),y.createElement(Bgt,{value:t},n?y.createElement(n,t):o?o(t):r?Ds(r)?r(t):Vgt(r)?null:y.Children.only(r):null)}function Wgt(e){var t={};if(e.inner){if(e.inner.length===0)return hh(t,e.path,e.message);for(var o=e.inner,n=Array.isArray(o),r=0,o=n?o:o[Symbol.iterator]();;){var i;if(n){if(r>=o.length)break;i=o[r++]}else{if(r=o.next(),r.done)break;i=r.value}var a=i;Da(t,a.path)||(t=hh(t,a.path,a.message))}}return t}function Ggt(e,t,n,r){n===void 0&&(n=!1);var o=AN(e);return t[n?"validateSync":"validate"](o,{abortEarly:!1,context:o})}function AN(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);Array.isArray(e[r])===!0?t[r]=e[r].map(function(o){return Array.isArray(o)===!0||Y9(o)?AN(o):o!==""?o:void 0}):Y9(e[r])?t[r]=AN(e[r]):t[r]=e[r]!==""?e[r]:void 0}return t}function qgt(e,t,n){var r=e.slice();return t.forEach(function(i,a){if(typeof r[a]>"u"){var s=n.clone!==!1,l=s&&n.isMergeableObject(i);r[a]=l?TN(Array.isArray(i)?[]:{},i,n):i}else n.isMergeableObject(i)?r[a]=TN(e[a],i,n):e.indexOf(i)===-1&&r.push(i)}),r}function Kgt(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Ygt(e,t,n){if(typeof e=="boolean")return!!t;var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,i=e.indexOf(n),o=i>=0;else if(!n||n=="true"||n=="false")return!!t;return t&&n&&!o?r.concat(n):o?r.slice(0,i).concat(r.slice(i+1)):r}var Xgt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?y.useLayoutEffect:y.useEffect;function Rs(e){var t=y.useRef(e);return Xgt(function(){t.current=e}),y.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Qgt=/[^.^\]^[]+|(?=\[\]|\.\.)/g,mse=/^\d+$/,Jgt=/^\d/,Zgt=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,eyt=/^\s*(['"]?)(.*?)(\1)\s*$/,sz=512,S7=new lm(sz),C7=new lm(sz),P7=new lm(sz),mh={Cache:lm,split:$N,normalizePath:xR,setter:function(e){var t=xR(e);return C7.get(e)||C7.set(e,function(r,o){for(var i=0,a=t.length,s=r;ie.match(iyt)||[],eM=e=>e[0].toUpperCase()+e.slice(1),cz=(e,t)=>Zk(e).join(t).toLowerCase(),gse=e=>Zk(e).reduce((t,n)=>`${t}${t?n[0].toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()}`,""),ayt=e=>eM(gse(e)),syt=e=>cz(e,"_"),lyt=e=>cz(e,"-"),cyt=e=>eM(cz(e," ")),uyt=e=>Zk(e).map(eM).join(" ");var SR={words:Zk,upperFirst:eM,camelCase:gse,pascalCase:ayt,snakeCase:syt,kebabCase:lyt,sentenceCase:cyt,titleCase:uyt},uz={exports:{}};uz.exports=function(e){return yse(dyt(e),e)};uz.exports.array=yse;function yse(e,t){var n=e.length,r=new Array(n),o={},i=n,a=fyt(t),s=pyt(e);for(t.forEach(function(c){if(!s.has(c[0])||!s.has(c[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)o[i]||l(e[i],i,new Set);return r;function l(c,u,d){if(d.has(c)){var f;try{f=", node was:"+JSON.stringify(c)}catch{f=""}throw new Error("Cyclic dependency"+f)}if(!s.has(c))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(c));if(!o[u]){o[u]=!0;var p=a.get(c)||new Set;if(p=Array.from(p),u=p.length){d.add(c);do{var m=p[--u];l(m,s.get(m),d)}while(u);d.delete(c)}r[--n]=c}}}function dyt(e){for(var t=new Set,n=0,r=e.length;n"",wyt=/^Symbol\((.*)\)(.*)$/;function xyt(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function T7(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const n=typeof e;if(n==="number")return xyt(e);if(n==="string")return t?`"${e}"`:e;if(n==="function")return"[Function "+(e.name||"anonymous")+"]";if(n==="symbol")return byt.call(e).replace(wyt,"Symbol($1)");const r=gyt.call(e).slice(8,-1);return r==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):r==="Error"||e instanceof Error?"["+yyt.call(e)+"]":r==="RegExp"?vyt.call(e):null}function Du(e,t){let n=T7(e,t);return n!==null?n:JSON.stringify(e,function(r,o){let i=T7(this[r],t);return i!==null?i:o},2)}function vse(e){return e==null?[]:[].concat(e)}let bse,wse,xse,Syt=/\$\{\s*(\w+)\s*\}/g;bse=Symbol.toStringTag;class E7{constructor(t,n,r,o){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[bse]="Error",this.name="ValidationError",this.value=n,this.path=r,this.type=o,this.errors=[],this.inner=[],vse(t).forEach(i=>{if(da.isError(i)){this.errors.push(...i.errors);const a=i.inner.length?i.inner:[i];this.inner.push(...a)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}wse=Symbol.hasInstance;xse=Symbol.toStringTag;class da extends Error{static formatError(t,n){const r=n.label||n.path||"this";return r!==n.path&&(n=Object.assign({},n,{path:r})),typeof t=="string"?t.replace(Syt,(o,i)=>Du(n[i])):typeof t=="function"?t(n):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,n,r,o,i){const a=new E7(t,n,r,o);if(i)return a;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[xse]="Error",this.name=a.name,this.message=a.message,this.type=a.type,this.value=a.value,this.path=a.path,this.errors=a.errors,this.inner=a.inner,Error.captureStackTrace&&Error.captureStackTrace(this,da)}static[wse](t){return E7[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let yc={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:n,originalValue:r})=>{const o=r!=null&&r!==n?` (cast from the value \`${Du(r,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${Du(n,!0)}\``+o:`${e} must match the configured type. The validated value was: \`${Du(n,!0)}\``+o}},aa={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ad={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},RN={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},_N={isValue:"${path} field must be ${value}"},DN={noUnknown:"${path} field has unspecified keys: ${unknown}"},XP={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},Cyt={notType:e=>{const{path:t,value:n,spec:r}=e,o=r.types.length;if(Array.isArray(n)){if(n.lengtho)return`${t} tuple value has too many items, expected a length of ${o} but got ${n.length} for value: \`${Du(n,!0)}\``}return da.formatError(yc.notType,e)}};Object.assign(Object.create(null),{mixed:yc,string:aa,number:Ad,date:RN,object:DN,array:XP,boolean:_N,tuple:Cyt});const tM=e=>e&&e.__isYupSchema__;class cO{static fromOptions(t,n){if(!n.then&&!n.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:o,otherwise:i}=n,a=typeof r=="function"?r:(...s)=>s.every(l=>l===r);return new cO(t,(s,l)=>{var c;let u=a(...s)?o:i;return(c=u==null?void 0:u(l))!=null?c:l})}constructor(t,n){this.fn=void 0,this.refs=t,this.refs=t,this.fn=n}resolve(t,n){let r=this.refs.map(i=>i.getValue(n==null?void 0:n.value,n==null?void 0:n.parent,n==null?void 0:n.context)),o=this.fn(r,t,n);if(o===void 0||o===t)return t;if(!tM(o))throw new TypeError("conditions must return a schema object");return o.resolve(n)}}const uP={context:"$",value:"."};class cm{constructor(t,n={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===uP.context,this.isValue=this.key[0]===uP.value,this.isSibling=!this.isContext&&!this.isValue;let r=this.isContext?uP.context:this.isValue?uP.value:"";this.path=this.key.slice(r.length),this.getter=this.path&&mh.getter(this.path,!0),this.map=n.map}getValue(t,n,r){let o=this.isContext?r:this.isValue?t:n;return this.getter&&(o=this.getter(o||{})),this.map&&(o=this.map(o)),o}cast(t,n){return this.getValue(t,n==null?void 0:n.parent,n==null?void 0:n.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}cm.prototype.__isYupRef=!0;const ql=e=>e==null;function tg(e){function t({value:n,path:r="",options:o,originalValue:i,schema:a},s,l){const{name:c,test:u,params:d,message:f,skipAbsent:p}=e;let{parent:m,context:g,abortEarly:v=a.spec.abortEarly,disableStackTrace:w=a.spec.disableStackTrace}=o;function x(R){return cm.isRef(R)?R.getValue(n,m,g):R}function S(R={}){const N=Object.assign({value:n,originalValue:i,label:a.spec.label,path:R.path||r,spec:a.spec,disableStackTrace:R.disableStackTrace||w},d,R.params);for(const j of Object.keys(N))N[j]=x(N[j]);const L=new da(da.formatError(R.message||f,N),n,N.path,R.type||c,N.disableStackTrace);return L.params=N,L}const P=v?s:l;let T={path:r,parent:m,type:c,from:o.from,createError:S,resolve:x,options:o,originalValue:i,schema:a};const E=R=>{da.isError(R)?P(R):R?l(null):P(S())},O=R=>{da.isError(R)?P(R):s(R)};if(p&&ql(n))return E(!0);let A;try{var I;if(A=u.call(T,n,T),typeof((I=A)==null?void 0:I.then)=="function"){if(o.sync)throw new Error(`Validation test of type: "${T.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(A).then(E,O)}}catch(R){O(R);return}E(A)}return t.OPTIONS=e,t}function Pyt(e,t,n,r=n){let o,i,a;return t?(mh.forEach(t,(s,l,c)=>{let u=l?s.slice(1,s.length-1):s;e=e.resolve({context:r,parent:o,value:n});let d=e.type==="tuple",f=c?parseInt(u,10):0;if(e.innerType||d){if(d&&!c)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(n&&f>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);o=n,n=n&&n[f],e=d?e.spec.types[f]:e.innerType}if(!c){if(!e.fields||!e.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${a} which is a type: "${e.type}")`);o=n,n=n&&n[u],e=e.fields[u]}i=u,a=l?"["+s+"]":"."+s}),{schema:e,parent:o,parentPath:i}):{parent:o,parentPath:t,schema:e}}class uO extends Set{describe(){const t=[];for(const n of this.values())t.push(cm.isRef(n)?n.describe():n);return t}resolveAll(t){let n=[];for(const r of this.values())n.push(t(r));return n}clone(){return new uO(this.values())}merge(t,n){const r=this.clone();return t.forEach(o=>r.add(o)),n.forEach(o=>r.delete(o)),r}}function zg(e,t=new Map){if(tM(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let n;if(e instanceof Date)n=new Date(e.getTime()),t.set(e,n);else if(e instanceof RegExp)n=new RegExp(e),t.set(e,n);else if(Array.isArray(e)){n=new Array(e.length),t.set(e,n);for(let r=0;r{this.typeError(yc.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(n=>{n.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const n=Object.create(Object.getPrototypeOf(this));return n.type=this.type,n._typeCheck=this._typeCheck,n._whitelist=this._whitelist.clone(),n._blacklist=this._blacklist.clone(),n.internalTests=Object.assign({},this.internalTests),n.exclusiveTests=Object.assign({},this.exclusiveTests),n.deps=[...this.deps],n.conditions=[...this.conditions],n.tests=[...this.tests],n.transforms=[...this.transforms],n.spec=zg(Object.assign({},this.spec,t)),n}label(t){let n=this.clone();return n.spec.label=t,n}meta(...t){if(t.length===0)return this.spec.meta;let n=this.clone();return n.spec.meta=Object.assign(n.spec.meta||{},t[0]),n}withMutation(t){let n=this._mutate;this._mutate=!0;let r=t(this);return this._mutate=n,r}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let n=this,r=t.clone();const o=Object.assign({},n.spec,r.spec);return r.spec=o,r.internalTests=Object.assign({},n.internalTests,r.internalTests),r._whitelist=n._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=n._blacklist.merge(t._blacklist,t._whitelist),r.tests=n.tests,r.exclusiveTests=n.exclusiveTests,r.withMutation(i=>{t.tests.forEach(a=>{i.test(a.OPTIONS)})}),r.transforms=[...n.transforms,...r.transforms],r}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let n=this;if(n.conditions.length){let r=n.conditions;n=n.clone(),n.conditions=[],n=r.reduce((o,i)=>i.resolve(o,t),n),n=n.resolve(t)}return n}resolveOptions(t){var n,r,o,i;return Object.assign({},t,{from:t.from||[],strict:(n=t.strict)!=null?n:this.spec.strict,abortEarly:(r=t.abortEarly)!=null?r:this.spec.abortEarly,recursive:(o=t.recursive)!=null?o:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,n={}){let r=this.resolve(Object.assign({value:t},n)),o=n.assert==="ignore-optionality",i=r._cast(t,n);if(n.assert!==!1&&!r.isType(i)){if(o&&ql(i))return i;let a=Du(t),s=Du(i);throw new TypeError(`The value of ${n.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". attempted value: ${a} -`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=g=>{o||(o=!0,n(g,a))},d=g=>{o||(o=!0,r(g,a))},f=i.length,h=[];if(!f)return d([]);let m={value:a,originalValue:s,path:l,options:c,schema:this};for(let g=0;gthis.resolve(u)._validate(c,u,f,h)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{da.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new da(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw da.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new da(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(da.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(da.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):$g(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=Gm({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=Gm({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=hc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=hc.notNull){return this.nullability(!1,t)}required(t=hc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=hc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=Gm(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=nse(t).map(i=>new tm(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new QE(o,n):QE.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=Gm({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=hc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=Gm({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=hc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=Gm({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}ls.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ls.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=Jgt(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])ls.prototype[e]=ls.prototype.oneOf;for(const e of["not","nope"])ls.prototype[e]=ls.prototype.notOneOf;function ase(){return new sse}class sse extends ls{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=CN.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return Hl(n)||n===!0}})}isFalse(t=CN.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return Hl(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}ase.prototype=sse.prototype;const Zgt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function eyt(e){const t=TN(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function TN(e){var t,n;const r=Zgt.exec(e);return r?{year:fu(r[1]),month:fu(r[2],1)-1,day:fu(r[3],1),hour:fu(r[4]),minute:fu(r[5]),second:fu(r[6]),millisecond:r[7]?fu(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:fu(r[10]),minuteOffset:fu(r[11])}:null}function fu(e,t=0){return Number(e)||t}let tyt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,nyt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,ryt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,oyt="^\\d{4}-\\d{2}-\\d{2}",iyt="\\d{2}:\\d{2}:\\d{2}",ayt="(([+-]\\d{2}(:?\\d{2})?)|Z)",syt=new RegExp(`${oyt}T${iyt}(\\.\\d+)?${ayt}$`),lyt=e=>Hl(e)||e===e.trim(),cyt={}.toString();function Vc(){return new lse}class lse extends ls{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===cyt?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||hc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=aa.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=aa.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=aa.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||aa.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=aa.email){return this.matches(tyt,{name:"email",message:t,excludeEmptyString:!0})}url(t=aa.url){return this.matches(nyt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=aa.uuid){return this.matches(ryt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(syt,{name:"datetime",message:n||aa.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||aa.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=TN(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||aa.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=TN(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=aa.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:lyt})}lowercase(t=aa.lowercase){return this.transform(n=>Hl(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Hl(n)||n===n.toLowerCase()})}uppercase(t=aa.uppercase){return this.transform(n=>Hl(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>Hl(n)||n===n.toUpperCase()})}}Vc.prototype=lse.prototype;let uyt=e=>e!=+e;function pa(){return new cse}class cse extends ls{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!uyt(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=kd.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=kd.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=kd.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return rthis.resolve(t)}})}positive(t=kd.positive){return this.moreThan(0,t)}negative(t=kd.negative){return this.lessThan(0,t)}integer(t=kd.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>Hl(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>Hl(o)?o:Math[t](o))}}pa.prototype=cse.prototype;let use=new Date(""),dyt=e=>Object.prototype.toString.call(e)==="[object Date]";function XS(){return new QS}class QS extends ls{constructor(){super({type:"date",check(t){return dyt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=eyt(t),isNaN(t)?QS.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(tm.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=SN.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=SN.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}QS.INVALID_DATE=use;XS.prototype=QS.prototype;XS.INVALID_DATE=use;function fyt(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=ah.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),tm.isRef(s)&&s.isSibling?i(s.path,a):Gk(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return Hgt.array(Array.from(r),n).reverse()}function g7(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function dse(e){return(t,n)=>g7(e,t)-g7(e,n)}const fse=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function BP(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=BP(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=BP(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(BP)}):"optional"in e?e.optional():e}const pyt=(e,t)=>{const n=[...ah.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=ah.getter(ah.join(n),!0)(e);return!!(o&&r in o)};let y7=e=>Object.prototype.toString.call(e)==="[object Object]";function hyt(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const myt=dse([]);function ml(e){return new pse(e)}class pse extends ls{constructor(t){super({type:"object",check(n){return y7(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=myt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of s){let f=i[d],h=d in o;if(f){let m,g=o[d];c.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:g,context:n.context,parent:l});let v=f instanceof ls?f.spec:void 0,w=v==null?void 0:v.strict;if(v!=null&&v.strip){u=u||d in o;continue}m=!n.__validating||!w?f.cast(o[d],c):o[d],m!==void 0&&(l[d]=m)}else h&&!a&&(l[d]=o[d]);(h!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!y7(c)){o(l,c);return}a=a||c;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||tm.isRef(f)||u.push(f.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=fyt(t,n),r._sortErrors=dse(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return BP(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=ah.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return pyt(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(fse)}noUnknown(t=!0,n=PN.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=hyt(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=PN.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(fR.camelCase)}snakeCase(){return this.transformKeys(fR.snakeCase)}constantCase(){return this.transformKeys(t=>fR.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}ml.prototype=pse.prototype;function tz(e){return new hse(e)}class hse extends ls{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let d=new Array(c.length);for(let h=0;ho(h.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(fse)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!Gk(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Ru(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=jP.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||jP.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||jP.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}tz.prototype=hse.prototype;const nz=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=Ge(),c=z_e(e),u=V_e(e),[d,f]=y.useState(t?It.fromJSDate(t.datetime):It.now()),[h,m]=y.useState(i),g=ml({amount:pa().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:pa().required(s("forms.fieldRequired")),datetime:XS().required(s("forms.fieldRequired"))});return C(pl,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:g,onSubmit:async v=>{const w={...v,plan:e,meal:h,weight_unit:null,datetime:v.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:v=>C(ms,{children:X(Kt,{spacing:2,children:[C(zB,{callback:w=>v.setFieldValue("ingredient",w==null?void 0:w.data.id)}),C(Cn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(fo,{position:"end",children:s("nutrition.gramShort")})},error:v.touched.amount&&!!v.errors.amount,helperText:v.touched.amount&&v.errors.amount,...v.getFieldProps("amount")}),a.length>0&&C(ec,{value:h,options:a.map(w=>w.id),getOptionLabel:w=>a.find(x=>x.id===w).displayName,onChange:(w,x)=>m(x),renderInput:w=>C(Cn,{label:s("nutrition.meal"),value:h,...w})}),C(jS,{dateAdapter:jk,adapterLocale:l.language,children:C(sut,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:d,disableFuture:!0,onChange:w=>{v.setFieldValue("datetime",w==null?void 0:w.toJSDate()),f(w)},shouldDisableDate:w=>(t&&Si(t.datetime)===Si(w.toJSDate()),!1)})}),X(Kt,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&C(gt,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),C(gt,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},rz=({plan:e,closeFn:t})=>{const[n]=Ge(),r=F_e(),o=B_e(e==null?void 0:e.id),[i,a]=y.useState(e==null?void 0:e.hasAnyGoals),s=ml({description:Vc().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),only_logging:ase(),goal_energy:pa().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goal_protein:pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_carbohydrates:pa().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goal_fiber:pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_fat:pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"}))});return C(pl,{initialValues:{description:e?e.description:n("nutrition.plan"),only_logging:e?e.onlyLogging:!0,goal_energy:e?e.goalEnergy:null,goal_protein:e?e.goalProtein:null,goal_carbohydrates:e?e.goalCarbohydrates:null,goal_fiber:e?e.goalFiber:null,goal_fat:e?e.goalFat:null},validationSchema:s,onSubmit:async l=>{l.goal_energy=l.goal_energy?l.goal_energy:null,l.goal_protein=l.goal_protein?l.goal_protein:null,l.goal_carbohydrates=l.goal_carbohydrates?l.goal_carbohydrates:null,l.goal_fiber=l.goal_fiber?l.goal_fiber:null,l.goal_fat=l.goal_fat?l.goal_fat:null,e?o.mutate({...l,id:e.id}):r.mutate(l),t&&t()},children:l=>C(ms,{children:X(Kt,{spacing:2,children:[C(Cn,{fullWidth:!0,id:"description",label:n("description"),error:l.touched.description&&!!l.errors.description,helperText:l.touched.description&&l.errors.description,...l.getFieldProps("description")}),C(TI,{children:C(Dy,{label:n("nutrition.onlyLoggingHelpText"),control:C(Vf,{id:"onlyLogging",checked:l.values.only_logging,...l.getFieldProps("only_logging")})})}),X(Fh,{fullWidth:!0,children:[C(jh,{id:"demo-simple-select-label",children:"Goal Setting"}),X(zf,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:10,label:"Goal setting",onChange:()=>{},children:[C(Yt,{value:10,children:"Based on my meals"}),C(Yt,{value:20,children:"Set basic macros"}),C(Yt,{value:30,children:"Set advanced macros"})]})]}),i&&X(Mt,{children:[C(Cn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:l.touched.goal_energy&&!!l.errors.goal_energy,helperText:l.touched.goal_energy&&l.errors.goal_energy,...l.getFieldProps("goal_energy"),InputProps:{endAdornment:C(fo,{position:"end",children:n("nutrition.kcal")})}}),X(He,{container:!0,spacing:1,children:[C(He,{size:4,children:C(Cn,{id:"protein",label:n("nutrition.goalProtein"),error:l.touched.goal_protein&&!!l.errors.goal_protein,helperText:l.touched.goal_protein&&l.errors.goal_protein,...l.getFieldProps("goal_protein"),InputProps:{startAdornment:C(fo,{position:"start",children:l.values.goal_protein!==null&&l.values.goal_protein!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_protein*qg.protein}):""}),endAdornment:C(fo,{position:"end",children:n("nutrition.gramShort")})}})}),C(He,{size:4,children:C(Cn,{id:"carbohydrates",label:n("nutrition.goalCarbohydrates"),error:l.touched.goal_carbohydrates&&!!l.errors.goal_carbohydrates,helperText:l.touched.goal_carbohydrates&&l.errors.goal_carbohydrates,...l.getFieldProps("goal_carbohydrates"),InputProps:{startAdornment:C(fo,{position:"start",children:l.values.goal_carbohydrates!==null&&l.values.goal_carbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_carbohydrates*qg.carbohydrates}):""}),endAdornment:C(fo,{position:"end",children:n("nutrition.gramShort")})}})}),C(He,{size:4,children:C(Cn,{id:"fat",label:n("nutrition.goalFat"),error:l.touched.goal_fat&&!!l.errors.goal_fat,helperText:l.touched.goal_fat&&l.errors.goal_fat,...l.getFieldProps("goal_fat"),InputProps:{startAdornment:C(fo,{position:"start",children:l.values.goal_fat!==null&&l.values.goal_fat!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_fat*qg.fat}):""}),endAdornment:C(fo,{position:"end",children:n("nutrition.gramShort")})}})})]}),C(He,{container:!0,spacing:1,children:C(He,{size:4,children:C(Cn,{id:"fiber",label:n("nutrition.goalFiber"),error:l.touched.goal_fiber&&!!l.errors.goal_fiber,helperText:l.touched.goal_fiber&&l.errors.goal_fiber,...l.getFieldProps("goal_fiber"),InputProps:{startAdornment:C(fo,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:C(fo,{position:"end",children:n("nutrition.gramShort")})}})})})]}),C(Kt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},mse=()=>{const[e]=Ge(),t=D_e();return C(Mt,{children:t.isLoading?C(_o,{}):C(Mt,{children:t.data!==null?C(gyt,{plan:t.data}):C(HF,{title:e("nutritionalPlan"),modalContent:C(rz,{}),modalTitle:e("add")})})})};function gyt(e){const[t,n]=Ge(),[r,o]=J.useState(!1),i=()=>o(!0),a=()=>o(!1);return X(Mt,{children:[X(Ro,{children:[C(nd,{title:t("nutritionalPlan"),subheader:e.plan.description}),X(xa,{sx:{height:"500px",overflow:"auto"},children:[C(Krt,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),C(dl,{children:e.plan.meals.map(s=>C(yyt,{meal:s,planId:e.plan.id},s.id))})]}),X(ps,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(gt,{size:"small",href:Tn(wn.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),C(nc,{title:t("nutrition.logThisMealItem"),children:C(kn,{onClick:i,children:C(CS,{})})})]})]}),C(ta,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:C(nz,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const yyt=e=>{const[t,n]=Ge(),r=hee(e.planId),[o,i]=y.useState(!1),[a,s]=J.useState(!1),l=()=>i(!o),c=(h,m)=>{m!=="clickaway"&&s(!1)},u=h=>{const m=[{plan:e.planId,meal:e.meal.id,mealItem:h.id,ingredient:h.ingredientId,weight_unit:h.weightUnitId,datetime:new Date().toISOString(),amount:h.amount}];r.mutate(m),s(!0)},d=e.meal.name?e.meal.name:LT(e.meal.time,n.language),f=e.meal.name?LT(e.meal.time,n.language):null;return X(Mt,{children:[X(Bf,{onClick:l,selected:o,children:[C(Gi,{children:o?C(RZ,{}):C(Mv,{})}),C(bo,{primary:d,secondary:f})]}),C(Zs,{in:o,timeout:"auto",unmountOnExit:!0,children:C(dl,{children:e.meal.items.map(h=>{var m,g,v,w;return X(ss,{secondaryAction:C(nc,{title:t("nutrition.logThisMealItem"),children:C(kn,{edge:"end",onClick:()=>u(h),children:C(CS,{})})}),children:[C(jF,{children:C(tc,{alt:(m=h.ingredient)==null?void 0:m.name,src:(v=(g=h.ingredient)==null?void 0:g.image)==null?void 0:v.url,sx:{width:45,height:45},children:C(rd,{})})}),C(bo,{primary:(w=h.ingredient)==null?void 0:w.name,secondary:bn(h.amount,n.language)})]},h.id)})})}),C(CZ,{open:a,autoHideDuration:lee,onClose:c,children:C(Wu,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},Ji=st($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),gse=st($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),vyt=st($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),byt=st($.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),wyt=st($.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"Cached"),xyt=st([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),yse=st($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Syt=st($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Cyt=st($.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),Pyt=st($.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),oz=st($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Tyt=st($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),Eyt=st($.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"}),"DeleteOutlined"),vse=st($.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),Oyt=st($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),bse=st($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),wse=st($.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),Iyt=st($.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"}),"Landscape"),kyt=st($.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"}),"LandscapeOutlined"),Myt=st([$.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),$.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")],"LandscapeTwoTone"),Ayt=st($.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),JS=st($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),$yt=st($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),Ryt=st([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),_yt=st($.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),Dyt=st($.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),xse=st($.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),Nyt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return C(tc,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:C(rd,{sx:{height:n,width:n}})})};function Sse(e){return So({queryKey:[l_e,e],queryFn:()=>eNe(e)})}function Lyt(e,t=!1){return So({queryKey:[d_e,e,t],queryFn:()=>nNe(e,t)})}function Fyt(){return So({queryKey:[c_e],queryFn:()=>tNe()})}function jyt(){return So({queryKey:[u_e],queryFn:ZDe})}/** +`+(s!==a?`result of cast: ${s}`:""))}return i}_cast(t,n){let r=t===void 0?t:this.transforms.reduce((o,i)=>i.call(this,o,t,this),t);return r===void 0&&(r=this.getDefault(n)),r}_validate(t,n={},r,o){let{path:i,originalValue:a=t,strict:s=this.spec.strict}=n,l=t;s||(l=this._cast(l,Object.assign({assert:!1},n)));let c=[];for(let u of Object.values(this.internalTests))u&&c.push(u);this.runTests({path:i,value:l,originalValue:a,options:n,tests:c},r,u=>{if(u.length)return o(u,l);this.runTests({path:i,value:l,originalValue:a,options:n,tests:this.tests},r,o)})}runTests(t,n,r){let o=!1,{tests:i,value:a,originalValue:s,path:l,options:c}=t,u=g=>{o||(o=!0,n(g,a))},d=g=>{o||(o=!0,r(g,a))},f=i.length,p=[];if(!f)return d([]);let m={value:a,originalValue:s,path:l,options:c,schema:this};for(let g=0;gthis.resolve(u)._validate(c,u,f,p)}validate(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return new Promise((a,s)=>o._validate(t,n,(l,c)=>{da.isError(l)&&(l.value=c),s(l)},(l,c)=>{l.length?s(new da(l,c,void 0,void 0,i)):a(c)}))}validateSync(t,n){var r;let o=this.resolve(Object.assign({},n,{value:t})),i,a=(r=n==null?void 0:n.disableStackTrace)!=null?r:o.spec.disableStackTrace;return o._validate(t,Object.assign({},n,{sync:!0}),(s,l)=>{throw da.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new da(s,t,void 0,void 0,a);i=l}),i}isValid(t,n){return this.validate(t,n).then(()=>!0,r=>{if(da.isError(r))return!1;throw r})}isValidSync(t,n){try{return this.validateSync(t,n),!0}catch(r){if(da.isError(r))return!1;throw r}}_getDefault(t){let n=this.spec.default;return n==null?n:typeof n=="function"?n.call(this,t):zg(n)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,n){const r=this.clone({nullable:t});return r.internalTests.nullable=tg({message:n,name:"nullable",test(o){return o===null?this.schema.spec.nullable:!0}}),r}optionality(t,n){const r=this.clone({optional:t});return r.internalTests.optionality=tg({message:n,name:"optionality",test(o){return o===void 0?this.schema.spec.optional:!0}}),r}optional(){return this.optionality(!0)}defined(t=yc.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=yc.notNull){return this.nullability(!1,t)}required(t=yc.required){return this.clone().withMutation(n=>n.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let n=this.clone();return n.transforms.push(t),n}test(...t){let n;if(t.length===1?typeof t[0]=="function"?n={test:t[0]}:n=t[0]:t.length===2?n={name:t[0],test:t[1]}:n={name:t[0],message:t[1],test:t[2]},n.message===void 0&&(n.message=yc.default),typeof n.test!="function")throw new TypeError("`test` is a required parameters");let r=this.clone(),o=tg(n),i=n.exclusive||n.name&&r.exclusiveTests[n.name]===!0;if(n.exclusive&&!n.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return n.name&&(r.exclusiveTests[n.name]=!!n.exclusive),r.tests=r.tests.filter(a=>!(a.OPTIONS.name===n.name&&(i||a.OPTIONS.test===o.OPTIONS.test))),r.tests.push(o),r}when(t,n){!Array.isArray(t)&&typeof t!="string"&&(n=t,t=".");let r=this.clone(),o=vse(t).map(i=>new cm(i));return o.forEach(i=>{i.isSibling&&r.deps.push(i.key)}),r.conditions.push(typeof n=="function"?new cO(o,n):cO.fromOptions(o,n)),r}typeError(t){let n=this.clone();return n.internalTests.typeError=tg({message:t,name:"typeError",skipAbsent:!0,test(r){return this.schema._typeCheck(r)?!0:this.createError({params:{type:this.schema.type}})}}),n}oneOf(t,n=yc.oneOf){let r=this.clone();return t.forEach(o=>{r._whitelist.add(o),r._blacklist.delete(o)}),r.internalTests.whiteList=tg({message:n,name:"oneOf",skipAbsent:!0,test(o){let i=this.schema._whitelist,a=i.resolveAll(this.resolve);return a.includes(o)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:a}})}}),r}notOneOf(t,n=yc.notOneOf){let r=this.clone();return t.forEach(o=>{r._blacklist.add(o),r._whitelist.delete(o)}),r.internalTests.blacklist=tg({message:n,name:"notOneOf",test(o){let i=this.schema._blacklist,a=i.resolveAll(this.resolve);return a.includes(o)?this.createError({params:{values:Array.from(i).join(", "),resolved:a}}):!0}}),r}strip(t=!0){let n=this.clone();return n.spec.strip=t,n}describe(t){const n=(t?this.resolve(t):this).clone(),{label:r,meta:o,optional:i,nullable:a}=n.spec;return{meta:o,label:r,optional:i,nullable:a,default:n.getDefault(t),type:n.type,oneOf:n._whitelist.describe(),notOneOf:n._blacklist.describe(),tests:n.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,c,u)=>u.findIndex(d=>d.name===l.name)===c)}}}cs.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])cs.prototype[`${e}At`]=function(t,n,r={}){const{parent:o,parentPath:i,schema:a}=Pyt(this,t,n,r.context);return a[e](o&&o[i],Object.assign({},r,{parent:o,path:t}))};for(const e of["equals","is"])cs.prototype[e]=cs.prototype.oneOf;for(const e of["not","nope"])cs.prototype[e]=cs.prototype.notOneOf;function Sse(){return new Cse}class Cse extends cs{constructor(){super({type:"boolean",check(t){return t instanceof Boolean&&(t=t.valueOf()),typeof t=="boolean"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(r.spec.coerce&&!r.isType(t)){if(/^(true|1)$/i.test(String(t)))return!0;if(/^(false|0)$/i.test(String(t)))return!1}return t})})}isTrue(t=_N.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"true"},test(n){return ql(n)||n===!0}})}isFalse(t=_N.isValue){return this.test({message:t,name:"is-value",exclusive:!0,params:{value:"false"},test(n){return ql(n)||n===!1}})}default(t){return super.default(t)}defined(t){return super.defined(t)}optional(){return super.optional()}required(t){return super.required(t)}notRequired(){return super.notRequired()}nullable(){return super.nullable()}nonNullable(t){return super.nonNullable(t)}strip(t){return super.strip(t)}}Sse.prototype=Cse.prototype;const Tyt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Eyt(e){const t=NN(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let n=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(n=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(n=0-n)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+n,t.second,t.millisecond)}function NN(e){var t,n;const r=Tyt.exec(e);return r?{year:hu(r[1]),month:hu(r[2],1)-1,day:hu(r[3],1),hour:hu(r[4]),minute:hu(r[5]),second:hu(r[6]),millisecond:r[7]?hu(r[7].substring(0,3)):0,precision:(t=(n=r[7])==null?void 0:n.length)!=null?t:void 0,z:r[8]||void 0,plusMinus:r[9]||void 0,hourOffset:hu(r[10]),minuteOffset:hu(r[11])}:null}function hu(e,t=0){return Number(e)||t}let Oyt=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Iyt=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,kyt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Myt="^\\d{4}-\\d{2}-\\d{2}",Ayt="\\d{2}:\\d{2}:\\d{2}",$yt="(([+-]\\d{2}(:?\\d{2})?)|Z)",Ryt=new RegExp(`${Myt}T${Ayt}(\\.\\d+)?${$yt}$`),_yt=e=>ql(e)||e===e.trim(),Dyt={}.toString();function Wc(){return new Pse}class Pse extends cs{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce||r.isType(t)||Array.isArray(t))return t;const o=t!=null&&t.toString?t.toString():t;return o===Dyt?t:o})})}required(t){return super.required(t).withMutation(n=>n.test({message:t||yc.required,name:"required",skipAbsent:!0,test:r=>!!r.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(n=>n.OPTIONS.name!=="required"),t))}length(t,n=aa.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n=aa.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n=aa.max){return this.test({name:"max",exclusive:!0,message:n,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}matches(t,n){let r=!1,o,i;return n&&(typeof n=="object"?{excludeEmptyString:r=!1,message:o,name:i}=n:o=n),this.test({name:i||"matches",message:o||aa.matches,params:{regex:t},skipAbsent:!0,test:a=>a===""&&r||a.search(t)!==-1})}email(t=aa.email){return this.matches(Oyt,{name:"email",message:t,excludeEmptyString:!0})}url(t=aa.url){return this.matches(Iyt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=aa.uuid){return this.matches(kyt,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let n="",r,o;return t&&(typeof t=="object"?{message:n="",allowOffset:r=!1,precision:o=void 0}=t:n=t),this.matches(Ryt,{name:"datetime",message:n||aa.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:n||aa.datetime_offset,params:{allowOffset:r},skipAbsent:!0,test:i=>{if(!i||r)return!0;const a=NN(i);return a?!!a.z:!1}}).test({name:"datetime_precision",message:n||aa.datetime_precision,params:{precision:o},skipAbsent:!0,test:i=>{if(!i||o==null)return!0;const a=NN(i);return a?a.precision===o:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=aa.trim){return this.transform(n=>n!=null?n.trim():n).test({message:t,name:"trim",test:_yt})}lowercase(t=aa.lowercase){return this.transform(n=>ql(n)?n:n.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ql(n)||n===n.toLowerCase()})}uppercase(t=aa.uppercase){return this.transform(n=>ql(n)?n:n.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:n=>ql(n)||n===n.toUpperCase()})}}Wc.prototype=Pse.prototype;let Nyt=e=>e!=+e;function pa(){return new Tse}class Tse extends cs{constructor(){super({type:"number",check(t){return t instanceof Number&&(t=t.valueOf()),typeof t=="number"&&!Nyt(t)}}),this.withMutation(()=>{this.transform((t,n,r)=>{if(!r.spec.coerce)return t;let o=t;if(typeof o=="string"){if(o=o.replace(/\s/g,""),o==="")return NaN;o=+o}return r.isType(o)||o===null?o:parseFloat(o)})})}min(t,n=Ad.min){return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r>=this.resolve(t)}})}max(t,n=Ad.max){return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r<=this.resolve(t)}})}lessThan(t,n=Ad.lessThan){return this.test({message:n,name:"max",exclusive:!0,params:{less:t},skipAbsent:!0,test(r){return rthis.resolve(t)}})}positive(t=Ad.positive){return this.moreThan(0,t)}negative(t=Ad.negative){return this.lessThan(0,t)}integer(t=Ad.integer){return this.test({name:"integer",message:t,skipAbsent:!0,test:n=>Number.isInteger(n)})}truncate(){return this.transform(t=>ql(t)?t:t|0)}round(t){var n;let r=["ceil","floor","round","trunc"];if(t=((n=t)==null?void 0:n.toLowerCase())||"round",t==="trunc")return this.truncate();if(r.indexOf(t.toLowerCase())===-1)throw new TypeError("Only valid options for round() are: "+r.join(", "));return this.transform(o=>ql(o)?o:Math[t](o))}}pa.prototype=Tse.prototype;let Ese=new Date(""),Lyt=e=>Object.prototype.toString.call(e)==="[object Date]";function a1(){return new s1}class s1 extends cs{constructor(){super({type:"date",check(t){return Lyt(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,n,r)=>!r.spec.coerce||r.isType(t)||t===null?t:(t=Eyt(t),isNaN(t)?s1.INVALID_DATE:new Date(t)))})}prepareParam(t,n){let r;if(cm.isRef(t))r=t;else{let o=this.cast(t);if(!this._typeCheck(o))throw new TypeError(`\`${n}\` must be a Date or a value that can be \`cast()\` to a Date`);r=o}return r}min(t,n=RN.min){let r=this.prepareParam(t,"min");return this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(o){return o>=this.resolve(r)}})}max(t,n=RN.max){let r=this.prepareParam(t,"max");return this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(o){return o<=this.resolve(r)}})}}s1.INVALID_DATE=Ese;a1.prototype=s1.prototype;a1.INVALID_DATE=Ese;function Fyt(e,t=[]){let n=[],r=new Set,o=new Set(t.map(([a,s])=>`${a}-${s}`));function i(a,s){let l=mh.split(a)[0];r.add(l),o.has(`${s}-${l}`)||n.push([s,l])}for(const a of Object.keys(e)){let s=e[a];r.add(a),cm.isRef(s)&&s.isSibling?i(s.path,a):tM(s)&&"deps"in s&&s.deps.forEach(l=>i(l,a))}return myt.array(Array.from(r),n).reverse()}function O7(e,t){let n=1/0;return e.some((r,o)=>{var i;if((i=t.path)!=null&&i.includes(r))return n=o,!0}),n}function Ose(e){return(t,n)=>O7(e,t)-O7(e,n)}const Ise=(e,t,n)=>{if(typeof e!="string")return e;let r=e;try{r=JSON.parse(e)}catch{}return n.isType(r)?r:e};function QP(e){if("fields"in e){const t={};for(const[n,r]of Object.entries(e.fields))t[n]=QP(r);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=QP(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(QP)}):"optional"in e?e.optional():e}const jyt=(e,t)=>{const n=[...mh.normalizePath(t)];if(n.length===1)return n[0]in e;let r=n.pop(),o=mh.getter(mh.join(n),!0)(e);return!!(o&&r in o)};let I7=e=>Object.prototype.toString.call(e)==="[object Object]";function Byt(e,t){let n=Object.keys(e.fields);return Object.keys(t).filter(r=>n.indexOf(r)===-1)}const zyt=Ose([]);function bl(e){return new kse(e)}class kse extends cs{constructor(t){super({type:"object",check(n){return I7(n)||typeof n=="function"}}),this.fields=Object.create(null),this._sortErrors=zyt,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,n={}){var r;let o=super._cast(t,n);if(o===void 0)return this.getDefault(n);if(!this._typeCheck(o))return o;let i=this.fields,a=(r=n.stripUnknown)!=null?r:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(o).filter(d=>!this._nodes.includes(d))),l={},c=Object.assign({},n,{parent:l,__validating:n.__validating||!1}),u=!1;for(const d of s){let f=i[d],p=d in o;if(f){let m,g=o[d];c.path=(n.path?`${n.path}.`:"")+d,f=f.resolve({value:g,context:n.context,parent:l});let v=f instanceof cs?f.spec:void 0,w=v==null?void 0:v.strict;if(v!=null&&v.strip){u=u||d in o;continue}m=!n.__validating||!w?f.cast(o[d],c):o[d],m!==void 0&&(l[d]=m)}else p&&!a&&(l[d]=o[d]);(p!==d in l||l[d]!==o[d])&&(u=!0)}return u?l:o}_validate(t,n={},r,o){let{from:i=[],originalValue:a=t,recursive:s=this.spec.recursive}=n;n.from=[{schema:this,value:a},...i],n.__validating=!0,n.originalValue=a,super._validate(t,n,r,(l,c)=>{if(!s||!I7(c)){o(l,c);return}a=a||c;let u=[];for(let d of this._nodes){let f=this.fields[d];!f||cm.isRef(f)||u.push(f.asNestedTest({options:n,key:d,parent:c,parentPath:n.path,originalParent:a}))}this.runTests({tests:u,value:c,originalValue:a,options:n},r,d=>{o(d.sort(this._sortErrors).concat(l),c)})})}clone(t){const n=super.clone(t);return n.fields=Object.assign({},this.fields),n._nodes=this._nodes,n._excludedEdges=this._excludedEdges,n._sortErrors=this._sortErrors,n}concat(t){let n=super.concat(t),r=n.fields;for(let[o,i]of Object.entries(this.fields)){const a=r[o];r[o]=a===void 0?i:a}return n.withMutation(o=>o.setFields(r,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let n={};return this._nodes.forEach(r=>{var o;const i=this.fields[r];let a=t;(o=a)!=null&&o.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[r]})),n[r]=i&&"getDefault"in i?i.getDefault(a):void 0}),n}setFields(t,n){let r=this.clone();return r.fields=t,r._nodes=Fyt(t,n),r._sortErrors=Ose(Object.keys(t)),n&&(r._excludedEdges=n),r}shape(t,n=[]){return this.clone().withMutation(r=>{let o=r._excludedEdges;return n.length&&(Array.isArray(n[0])||(n=[n]),o=[...r._excludedEdges,...n]),r.setFields(Object.assign(r.fields,t),o)})}partial(){const t={};for(const[n,r]of Object.entries(this.fields))t[n]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return QP(this)}pick(t){const n={};for(const r of t)this.fields[r]&&(n[r]=this.fields[r]);return this.setFields(n,this._excludedEdges.filter(([r,o])=>t.includes(r)&&t.includes(o)))}omit(t){const n=[];for(const r of Object.keys(this.fields))t.includes(r)||n.push(r);return this.pick(n)}from(t,n,r){let o=mh.getter(t,!0);return this.transform(i=>{if(!i)return i;let a=i;return jyt(i,t)&&(a=Object.assign({},i),r||delete a[t],a[n]=o(i)),a})}json(){return this.transform(Ise)}noUnknown(t=!0,n=DN.noUnknown){typeof t!="boolean"&&(n=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:n,test(o){if(o==null)return!0;const i=Byt(this.schema,o);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,n=DN.noUnknown){return this.noUnknown(!t,n)}transformKeys(t){return this.transform(n=>{if(!n)return n;const r={};for(const o of Object.keys(n))r[t(o)]=n[o];return r})}camelCase(){return this.transformKeys(SR.camelCase)}snakeCase(){return this.transformKeys(SR.snakeCase)}constantCase(){return this.transformKeys(t=>SR.snakeCase(t).toUpperCase())}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[i,a]of Object.entries(n.fields)){var o;let s=t;(o=s)!=null&&o.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[i]})),r.fields[i]=a.describe(s)}return r}}bl.prototype=kse.prototype;function dz(e){return new Mse(e)}class Mse extends cs{constructor(t){super({type:"array",spec:{types:t},check(n){return Array.isArray(n)}}),this.innerType=void 0,this.innerType=t}_cast(t,n){const r=super._cast(t,n);if(!this._typeCheck(r)||!this.innerType)return r;let o=!1;const i=r.map((a,s)=>{const l=this.innerType.cast(a,Object.assign({},n,{path:`${n.path||""}[${s}]`}));return l!==a&&(o=!0),l});return o?i:r}_validate(t,n={},r,o){var i;let a=this.innerType,s=(i=n.recursive)!=null?i:this.spec.recursive;n.originalValue!=null&&n.originalValue,super._validate(t,n,r,(l,c)=>{var u;if(!s||!a||!this._typeCheck(c)){o(l,c);return}let d=new Array(c.length);for(let p=0;po(p.concat(l),c))})}clone(t){const n=super.clone(t);return n.innerType=this.innerType,n}json(){return this.transform(Ise)}concat(t){let n=super.concat(t);return n.innerType=this.innerType,t.innerType&&(n.innerType=n.innerType?n.innerType.concat(t.innerType):t.innerType),n}of(t){let n=this.clone();if(!tM(t))throw new TypeError("`array.of()` sub-schema must be a valid yup schema not: "+Du(t));return n.innerType=t,n.spec=Object.assign({},n.spec,{types:t}),n}length(t,n=XP.length){return this.test({message:n,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(r){return r.length===this.resolve(t)}})}min(t,n){return n=n||XP.min,this.test({message:n,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(r){return r.length>=this.resolve(t)}})}max(t,n){return n=n||XP.max,this.test({message:n,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(r){return r.length<=this.resolve(t)}})}ensure(){return this.default(()=>[]).transform((t,n)=>this._typeCheck(t)?t:n==null?[]:[].concat(n))}compact(t){let n=t?(r,o,i)=>!t(r,o,i):r=>!!r;return this.transform(r=>r!=null?r.filter(n):r)}describe(t){const n=(t?this.resolve(t):this).clone(),r=super.describe(t);if(n.innerType){var o;let i=t;(o=i)!=null&&o.value&&(i=Object.assign({},i,{parent:i.value,value:i.value[0]})),r.innerType=n.innerType.describe(i)}return r}}dz.prototype=Mse.prototype;const fz=({planId:e,entry:t,mealId:n,meals:r,closeFn:o})=>{const i=n===void 0?null:n,a=r===void 0?[]:r,[s,l]=Ue(),c=rDe(e),u=oDe(e),[d,f]=y.useState(t?It.fromJSDate(t.datetime):It.now()),[p,m]=y.useState(i),g=bl({amount:pa().required(s("forms.fieldRequired")).max(1e3,s("forms.maxValue",{value:"1000"})).min(1,s("forms.minValue",{value:"1"})),ingredient:pa().required(s("forms.fieldRequired")),datetime:a1().required(s("forms.fieldRequired"))});return C(yl,{initialValues:{datetime:new Date,amount:0,ingredient:0},validationSchema:g,onSubmit:async v=>{const w={...v,plan:e,meal:p,weight_unit:null,datetime:v.datetime.toISOString()};t?u.mutate({...w,id:t.id}):c.mutate(w),o&&o()},children:v=>C(gs,{children:Q(Gt,{spacing:2,children:[C(QB,{callback:w=>v.setFieldValue("ingredient",w==null?void 0:w.data.id)}),C(yn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(po,{position:"end",children:s("nutrition.gramShort")})},error:v.touched.amount&&!!v.errors.amount,helperText:v.touched.amount&&v.errors.amount,...v.getFieldProps("amount")}),a.length>0&&C(oc,{value:p,options:a.map(w=>w.id),getOptionLabel:w=>a.find(x=>x.id===w).displayName,onChange:(w,x)=>m(x),renderInput:w=>C(yn,{label:s("nutrition.meal"),value:p,...w})}),C(YS,{dateAdapter:Kk,adapterLocale:l.language,children:C(Rut,{format:"yyyy-MM-dd HH:mm",label:s("date"),value:d,disableFuture:!0,onChange:w=>{v.setFieldValue("datetime",w==null?void 0:w.toJSDate()),f(w)},shouldDisableDate:w=>(t&&Si(t.datetime)===Si(w.toJSDate()),!1)})}),Q(Gt,{direction:"row",justifyContent:"end",spacing:2,children:[o!==void 0&&C(gt,{color:"primary",variant:"outlined",onClick:()=>o(),children:s("close")}),C(gt,{color:"primary",variant:"contained",type:"submit",children:s("submit")})]})]})})})},pz=({plan:e,closeFn:t})=>{const[n]=Ue(),r=eDe(),o=nDe(e==null?void 0:e.id),[i,a]=y.useState(e==null?void 0:e.hasAnyGoals),s=bl({description:Wc().required().max(25,n("forms.maxLength",{chars:"25"})).min(3,n("forms.minLength",{chars:"3"})),only_logging:Sse(),goal_energy:pa().notRequired().positive().max(6e3,n("forms.maxValue",{value:"6000kcal"})),goal_protein:pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_carbohydrates:pa().notRequired().positive().max(750,n("forms.maxValue",{value:"750"})),goal_fiber:pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"})),goal_fat:pa().notRequired().positive().max(500,n("forms.maxValue",{value:"500"}))});return C(yl,{initialValues:{description:e?e.description:n("nutrition.plan"),only_logging:e?e.onlyLogging:!0,goal_energy:e?e.goalEnergy:null,goal_protein:e?e.goalProtein:null,goal_carbohydrates:e?e.goalCarbohydrates:null,goal_fiber:e?e.goalFiber:null,goal_fat:e?e.goalFat:null},validationSchema:s,onSubmit:async l=>{l.goal_energy=l.goal_energy?l.goal_energy:null,l.goal_protein=l.goal_protein?l.goal_protein:null,l.goal_carbohydrates=l.goal_carbohydrates?l.goal_carbohydrates:null,l.goal_fiber=l.goal_fiber?l.goal_fiber:null,l.goal_fat=l.goal_fat?l.goal_fat:null,e?o.mutate({...l,id:e.id}):r.mutate(l),t&&t()},children:l=>C(gs,{children:Q(Gt,{spacing:2,children:[C(yn,{fullWidth:!0,id:"description",label:n("description"),error:l.touched.description&&!!l.errors.description,helperText:l.touched.description&&l.errors.description,...l.getFieldProps("description")}),C(LI,{children:C(Uy,{label:n("nutrition.onlyLoggingHelpText"),control:C(qf,{id:"onlyLogging",checked:l.values.only_logging,...l.getFieldProps("only_logging")})})}),Q(qh,{fullWidth:!0,children:[C(Kh,{id:"demo-simple-select-label",children:"Goal Setting"}),Q(Gf,{labelId:"demo-simple-select-label",id:"demo-simple-select",value:10,label:"Goal setting",onChange:()=>{},children:[C(Yt,{value:10,children:"Based on my meals"}),C(Yt,{value:20,children:"Set basic macros"}),C(Yt,{value:30,children:"Set advanced macros"})]})]}),i&&Q(Mt,{children:[C(yn,{fullWidth:!0,id:"energy",label:n("nutrition.goalEnergy"),error:l.touched.goal_energy&&!!l.errors.goal_energy,helperText:l.touched.goal_energy&&l.errors.goal_energy,...l.getFieldProps("goal_energy"),InputProps:{endAdornment:C(po,{position:"end",children:n("nutrition.kcal")})}}),Q(Be,{container:!0,spacing:1,children:[C(Be,{size:4,children:C(yn,{id:"protein",label:n("nutrition.goalProtein"),error:l.touched.goal_protein&&!!l.errors.goal_protein,helperText:l.touched.goal_protein&&l.errors.goal_protein,...l.getFieldProps("goal_protein"),InputProps:{startAdornment:C(po,{position:"start",children:l.values.goal_protein!==null&&l.values.goal_protein!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_protein*ny.protein}):""}),endAdornment:C(po,{position:"end",children:n("nutrition.gramShort")})}})}),C(Be,{size:4,children:C(yn,{id:"carbohydrates",label:n("nutrition.goalCarbohydrates"),error:l.touched.goal_carbohydrates&&!!l.errors.goal_carbohydrates,helperText:l.touched.goal_carbohydrates&&l.errors.goal_carbohydrates,...l.getFieldProps("goal_carbohydrates"),InputProps:{startAdornment:C(po,{position:"start",children:l.values.goal_carbohydrates!==null&&l.values.goal_carbohydrates!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_carbohydrates*ny.carbohydrates}):""}),endAdornment:C(po,{position:"end",children:n("nutrition.gramShort")})}})}),C(Be,{size:4,children:C(yn,{id:"fat",label:n("nutrition.goalFat"),error:l.touched.goal_fat&&!!l.errors.goal_fat,helperText:l.touched.goal_fat&&l.errors.goal_fat,...l.getFieldProps("goal_fat"),InputProps:{startAdornment:C(po,{position:"start",children:l.values.goal_fat!==null&&l.values.goal_fat!==void 0?n("nutrition.valueEnergyKcal",{value:l.values.goal_fat*ny.fat}):""}),endAdornment:C(po,{position:"end",children:n("nutrition.gramShort")})}})})]}),C(Be,{container:!0,spacing:1,children:C(Be,{size:4,children:C(yn,{id:"fiber",label:n("nutrition.goalFiber"),error:l.touched.goal_fiber&&!!l.errors.goal_fiber,helperText:l.touched.goal_fiber&&l.errors.goal_fiber,...l.getFieldProps("goal_fiber"),InputProps:{startAdornment:C(po,{position:"start",children:n("nutrition.valueEnergyKcal",{value:0})}),endAdornment:C(po,{position:"end",children:n("nutrition.gramShort")})}})})})]}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})},Ase=()=>{const[e]=Ue(),t=Q_e();return C(Mt,{children:t.isLoading?C(Po,{}):C(Mt,{children:t.data!==null?C(Vyt,{plan:t.data}):C(ej,{title:e("nutritionalPlan"),modalContent:C(pz,{}),modalTitle:e("add")})})})};function Vyt(e){const[t,n]=Ue(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return Q(Mt,{children:[Q(Do,{children:[C(od,{title:t("nutritionalPlan"),subheader:e.plan.description}),Q(xa,{sx:{height:"500px",overflow:"auto"},children:[C(wot,{percentage:e.plan.percentageValuesLoggedToday,planned:e.plan.plannedNutritionalValues,logged:e.plan.loggedNutritionalValuesToday}),C(pl,{children:e.plan.meals.map(s=>C(Hyt,{meal:s,planId:e.plan.id},s.id))})]}),Q(hs,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(gt,{size:"small",href:Tn(Sn.NUTRITION_DETAIL,n.language,{id:e.plan.id}),children:t("seeDetails")}),C(ac,{title:t("nutrition.logThisMealItem"),children:C(kn,{onClick:i,children:C(AS,{})})})]})]}),C(ta,{title:t("nutrition.addNutritionalDiary"),isOpen:r,closeFn:a,children:C(fz,{closeFn:a,planId:e.plan.id,meals:e.plan.meals})})]})}const Hyt=e=>{const[t,n]=Ue(),r=Tee(e.planId),[o,i]=y.useState(!1),[a,s]=Y.useState(!1),l=()=>i(!o),c=(p,m)=>{m!=="clickaway"&&s(!1)},u=p=>{const m=[{plan:e.planId,meal:e.meal.id,mealItem:p.id,ingredient:p.ingredientId,weight_unit:p.weightUnitId,datetime:new Date().toISOString(),amount:p.amount}];r.mutate(m),s(!0)},d=e.meal.name?e.meal.name:YT(e.meal.time,n.language),f=e.meal.name?YT(e.meal.time,n.language):null;return Q(Mt,{children:[Q(Wf,{onClick:l,selected:o,children:[C(Gi,{children:o?C(UZ,{}):C(zv,{})}),C(wo,{primary:d,secondary:f})]}),C(Zs,{in:o,timeout:"auto",unmountOnExit:!0,children:C(pl,{children:e.meal.items.map(p=>{var m,g,v,w;return Q(ls,{secondaryAction:C(ac,{title:t("nutrition.logThisMealItem"),children:C(kn,{edge:"end",onClick:()=>u(p),children:C(AS,{})})}),children:[C(XF,{children:C(ic,{alt:(m=p.ingredient)==null?void 0:m.name,src:(v=(g=p.ingredient)==null?void 0:g.image)==null?void 0:v.url,sx:{width:45,height:45},children:C(id,{})})}),C(wo,{primary:(w=p.ingredient)==null?void 0:w.name,secondary:xn(p.amount,n.language)})]},p.id)})})}),C(_Z,{open:a,autoHideDuration:bee,onClose:c,children:C(qu,{onClose:c,severity:"success",sx:{width:"100%"},children:t("nutrition.diaryEntrySaved")})})]})},Ji=lt($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add"),$se=lt($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),Uyt=lt($.jsx("path",{d:"m7 10 5 5 5-5z"}),"ArrowDropDown"),Wyt=lt($.jsx("path",{d:"M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"}),"ArrowForwardIos"),Gyt=lt($.jsx("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"Cached"),qyt=lt([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"CameraAlt"),Rse=lt($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"ChevronRight"),Kyt=lt($.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear"),Yyt=lt($.jsx("path",{d:"M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2m-11-4 2.03 2.71L16 11l4 5H8zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6z"}),"Collections"),Xyt=lt($.jsx("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopy"),hz=lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"}),"Delete"),Qyt=lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM8 9h8v10H8zm7.5-5-1-1h-5l-1 1H5v2h14V4z"}),"DeleteOutline"),Jyt=lt($.jsx("path",{d:"M16 9v10H8V9zm-1.5-6h-5l-1 1H5v2h14V4h-3.5zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2z"}),"DeleteOutlined"),_se=lt($.jsx("path",{d:"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"Edit"),Zyt=lt($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"}),"FilterAlt"),Dse=lt($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),Nse=lt($.jsx("path",{d:"M11 7h2v2h-2zm0 4h2v6h-2zm1-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8"}),"InfoOutlined"),evt=lt($.jsx("path",{d:"m14 6-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22z"}),"Landscape"),tvt=lt($.jsx("path",{d:"m14 6-4.22 5.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22zM5 16l1.52-2.03L8.04 16z"}),"LandscapeOutlined"),nvt=lt([$.jsx("path",{d:"M5 16h3.04l-1.52-2.03z",opacity:".3"},"0"),$.jsx("path",{d:"m9.78 11.63 1.25 1.67L14 9.33 19 16h-8.46l-4.01-5.37L1 18h22L14 6zM5 16l1.52-2.03L8.04 16z"},"1")],"LandscapeTwoTone"),rvt=lt($.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreHoriz"),l1=lt($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert"),ovt=lt($.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),ivt=lt([$.jsx("circle",{cx:"12",cy:"12",r:"3.2"},"0"),$.jsx("path",{d:"M9 2 7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5"},"1")],"PhotoCamera"),avt=lt($.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7z"}),"Redo"),svt=lt($.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),Lse=lt($.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),lvt=e=>{var r;const t=e.avatarSize||40,n=e.iconSize||40;return C(ic,{sx:{height:t,width:t},src:(r=e.image)==null?void 0:r.url,children:C(id,{sx:{height:n,width:n}})})};function Fse(e){return Co({queryKey:[P_e,e],queryFn:()=>gNe(e)})}function cvt(e,t=!1){return Co({queryKey:[O_e,e,t],queryFn:()=>vNe(e,t)})}function uvt(){return Co({queryKey:[T_e],queryFn:()=>yNe()})}function dvt(){return Co({queryKey:[E_e],queryFn:mNe})}/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -368,7 +368,7 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Cse(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zyt(){return Math.random().toString(36).substr(2,8)}function b7(e,t){return{usr:e.state,key:e.key,idx:t}}function EN(e,t,n,r){return n===void 0&&(n=null),zx({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?db(t):t,{state:n,key:t&&t.key||r||zyt()})}function ZE(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function db(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Vyt(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=af.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(zx({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=af.Pop;let v=u(),w=v==null?null:v-c;c=v,l&&l({action:s,location:g.location,delta:w})}function f(v,w){s=af.Push;let x=EN(g.location,v,w);c=u()+1;let S=b7(x,c),P=g.createHref(x);try{a.pushState(S,"",P)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(P)}i&&l&&l({action:s,location:g.location,delta:1})}function h(v,w){s=af.Replace;let x=EN(g.location,v,w);c=u();let S=b7(x,c),P=g.createHref(x);a.replaceState(S,"",P),i&&l&&l({action:s,location:g.location,delta:0})}function m(v){let w=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof v=="string"?v:ZE(v);return x=x.replace(/ $/,"%20"),xo(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let g={get action(){return s},get location(){return e(o,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(v7,d),l=v,()=>{o.removeEventListener(v7,d),l=null}},createHref(v){return t(o,v)},createURL:m,encodeLocation(v){let w=m(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:h,go(v){return a.go(v)}};return g}var w7;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(w7||(w7={}));function Hyt(e,t,n){return n===void 0&&(n="/"),Uyt(e,t,n,!1)}function Uyt(e,t,n,r){let o=typeof t=="string"?db(t):t,i=iz(o.pathname||"/",n);if(i==null)return null;let a=Pse(e);Wyt(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(xo(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=vf([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(xo(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Pse(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Jyt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of Tse(i.path))o(i,a,l)}),t}function Tse(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=Tse(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Wyt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Zyt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Gyt=/^:[\w-]+$/,qyt=3,Kyt=2,Yyt=1,Xyt=10,Qyt=-2,x7=e=>e==="*";function Jyt(e,t){let n=e.split("/"),r=n.length;return n.some(x7)&&(r+=Qyt),t&&(r+=Kyt),n.filter(o=>!x7(o)).reduce((o,i)=>o+(Gyt.test(i)?qyt:i===""?Yyt:Xyt),r)}function Zyt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function evt(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s{let{paramName:f,isOptional:h}=u;if(f==="*"){let g=s[d]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return h&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function tvt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Cse(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function nvt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Cse(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function iz(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function rvt(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?db(e):e;return{pathname:n?n.startsWith("/")?n:ovt(n,t):t,search:svt(r),hash:lvt(o)}}function ovt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function pR(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ivt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ese(e,t){let n=ivt(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ose(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=db(e):(o=zx({},e),xo(!o.pathname||!o.pathname.includes("?"),pR("?","pathname","search",o)),xo(!o.pathname||!o.pathname.includes("#"),pR("#","pathname","hash",o)),xo(!o.search||!o.search.includes("#"),pR("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=rvt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const vf=e=>e.join("/").replace(/\/\/+/g,"/"),avt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),svt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lvt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function cvt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ise=["post","put","patch","delete"];new Set(Ise);const uvt=["get",...Ise];new Set(uvt);/** + */function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function jse(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function pvt(){return Math.random().toString(36).substr(2,8)}function M7(e,t){return{usr:e.state,key:e.key,idx:t}}function LN(e,t,n,r){return n===void 0&&(n=null),Yx({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xb(t):t,{state:n,key:t&&t.key||r||pvt()})}function dO(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function xb(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function hvt(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=cf.Pop,l=null,c=u();c==null&&(c=0,a.replaceState(Yx({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){s=cf.Pop;let v=u(),w=v==null?null:v-c;c=v,l&&l({action:s,location:g.location,delta:w})}function f(v,w){s=cf.Push;let x=LN(g.location,v,w);c=u()+1;let S=M7(x,c),P=g.createHref(x);try{a.pushState(S,"",P)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;o.location.assign(P)}i&&l&&l({action:s,location:g.location,delta:1})}function p(v,w){s=cf.Replace;let x=LN(g.location,v,w);c=u();let S=M7(x,c),P=g.createHref(x);a.replaceState(S,"",P),i&&l&&l({action:s,location:g.location,delta:0})}function m(v){let w=o.location.origin!=="null"?o.location.origin:o.location.href,x=typeof v=="string"?v:dO(v);return x=x.replace(/ $/,"%20"),So(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let g={get action(){return s},get location(){return e(o,a)},listen(v){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(k7,d),l=v,()=>{o.removeEventListener(k7,d),l=null}},createHref(v){return t(o,v)},createURL:m,encodeLocation(v){let w=m(v);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:p,go(v){return a.go(v)}};return g}var A7;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(A7||(A7={}));function mvt(e,t,n){return n===void 0&&(n="/"),gvt(e,t,n,!1)}function gvt(e,t,n,r){let o=typeof t=="string"?xb(t):t,i=mz(o.pathname||"/",n);if(i==null)return null;let a=Bse(e);yvt(a);let s=null;for(let l=0;s==null&&l{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(So(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Sf([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(So(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Bse(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Pvt(c,i.index),routesMeta:u})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of zse(i.path))o(i,a,l)}),t}function zse(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=zse(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function yvt(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Tvt(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const vvt=/^:[\w-]+$/,bvt=3,wvt=2,xvt=1,Svt=10,Cvt=-2,$7=e=>e==="*";function Pvt(e,t){let n=e.split("/"),r=n.length;return n.some($7)&&(r+=Cvt),t&&(r+=wvt),n.filter(o=>!$7(o)).reduce((o,i)=>o+(vvt.test(i)?bvt:i===""?xvt:Svt),r)}function Tvt(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Evt(e,t,n){let{routesMeta:r}=e,o={},i="/",a=[];for(let s=0;s{let{paramName:f,isOptional:p}=u;if(f==="*"){let g=s[d]||"";a=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const m=s[d];return p&&!m?c[f]=void 0:c[f]=(m||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function Ovt(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),jse(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Ivt(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return jse(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function mz(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function kvt(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?xb(e):e;return{pathname:n?n.startsWith("/")?n:Mvt(n,t):t,search:Rvt(r),hash:_vt(o)}}function Mvt(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function CR(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Avt(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Vse(e,t){let n=Avt(e);return t?n.map((r,o)=>o===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Hse(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=xb(e):(o=Yx({},e),So(!o.pathname||!o.pathname.includes("?"),CR("?","pathname","search",o)),So(!o.pathname||!o.pathname.includes("#"),CR("#","pathname","hash",o)),So(!o.search||!o.search.includes("#"),CR("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(a==null)s=n;else{let d=t.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=kvt(o,s),c=a&&a!=="/"&&a.endsWith("/"),u=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const Sf=e=>e.join("/").replace(/\/\/+/g,"/"),$vt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Rvt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,_vt=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Dvt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Use=["post","put","patch","delete"];new Set(Use);const Nvt=["get",...Use];new Set(Nvt);/** * React Router v6.28.0 * * Copyright (c) Remix Software Inc. @@ -377,7 +377,7 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Vx(){return Vx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=Ose(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:vf([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}function om(){let{matches:e}=y.useContext(Kf),t=e[e.length-1];return t?t.params:{}}function Ase(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(nm),{matches:o}=y.useContext(Kf),{pathname:i}=Kk(),a=JSON.stringify(Ese(o,r.v7_relativeSplatPath));return y.useMemo(()=>Ose(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function hvt(e,t){return mvt(e,t)}function mvt(e,t,n,r){ZS()||xo(!1);let{navigator:o}=y.useContext(nm),{matches:i}=y.useContext(Kf),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=Kk(),u;if(t){var d;let v=typeof t=="string"?db(t):t;l==="/"||(d=v.pathname)!=null&&d.startsWith(l)||xo(!1),u=v}else u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=Hyt(e,{pathname:h}),g=wvt(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:vf([l,o.encodeLocation?o.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:vf([l,o.encodeLocation?o.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r);return t&&g?y.createElement(qk.Provider,{value:{location:Vx({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:af.Pop}},g):g}function gvt(){let e=Pvt(),t=cvt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,null)}const yvt=y.createElement(gvt,null);class vvt extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Kf.Provider,{value:this.props.routeContext},y.createElement(kse.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bvt(e){let{routeContext:t,match:n,children:r}=e,o=y.useContext(az);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Kf.Provider,{value:t},r)}function wvt(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||xo(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let h,m=!1,g=null,v=null;n&&(h=s&&d.route.id?s[d.route.id]:void 0,g=d.route.errorElement||yvt,l&&(c<0&&f===0?(m=!0,v=null):c===f&&(m=!0,v=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,f+1)),x=()=>{let S;return h?S=g:m?S=v:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,y.createElement(bvt,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?y.createElement(vvt,{location:n.location,revalidation:n.revalidation,component:g,error:h,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var $se=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($se||{}),eO=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(eO||{});function xvt(e){let t=y.useContext(az);return t||xo(!1),t}function Svt(e){let t=y.useContext(dvt);return t||xo(!1),t}function Cvt(e){let t=y.useContext(Kf);return t||xo(!1),t}function Rse(e){let t=Cvt(),n=t.matches[t.matches.length-1];return n.route.id||xo(!1),n.route.id}function Pvt(){var e;let t=y.useContext(kse),n=Svt(eO.UseRouteError),r=Rse(eO.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Tvt(){let{router:e}=xvt($se.UseNavigateStable),t=Rse(eO.UseNavigateStable),n=y.useRef(!1);return Mse(()=>{n.current=!0}),y.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Vx({fromRouteId:t},i)))},[e,t])}const C7={};function Evt(e,t){C7[t]||(C7[t]=!0,console.warn(t))}const P7=(e,t,n)=>Evt(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Ovt(e,t){e!=null&&e.v7_startTransition||P7("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&P7("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function Nt(e){xo(!1)}function Ivt(e){let{basename:t="/",children:n=null,location:r,navigationType:o=af.Pop,navigator:i,static:a=!1,future:s}=e;ZS()&&xo(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:a,future:Vx({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=db(r));let{pathname:u="/",search:d="",hash:f="",state:h=null,key:m="default"}=r,g=y.useMemo(()=>{let v=iz(u,l);return v==null?null:{location:{pathname:v,search:d,hash:f,state:h,key:m},navigationType:o}},[l,u,d,f,h,m,o]);return g==null?null:y.createElement(nm.Provider,{value:c},y.createElement(qk.Provider,{children:n,value:g}))}function kvt(e){let{children:t,location:n}=e;return hvt(ON(t),n)}new Promise(()=>{});function ON(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,o)=>{if(!y.isValidElement(r))return;let i=[...t,o];if(r.type===y.Fragment){n.push.apply(n,ON(r.props.children,i));return}r.type!==Nt&&xo(!1),!r.props.index||!r.props.children||xo(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=ON(r.props.children,i)),n.push(a)}),n}/** + */function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let d=Hse(c,JSON.parse(a),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Sf([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,a,i,e])}function fm(){let{matches:e}=y.useContext(np),t=e[e.length-1];return t?t.params:{}}function qse(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(um),{matches:o}=y.useContext(np),{pathname:i}=rM(),a=JSON.stringify(Vse(o,r.v7_relativeSplatPath));return y.useMemo(()=>Hse(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Bvt(e,t){return zvt(e,t)}function zvt(e,t,n,r){c1()||So(!1);let{navigator:o}=y.useContext(um),{matches:i}=y.useContext(np),a=i[i.length-1],s=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=rM(),u;if(t){var d;let v=typeof t=="string"?xb(t):t;l==="/"||(d=v.pathname)!=null&&d.startsWith(l)||So(!1),u=v}else u=c;let f=u.pathname||"/",p=f;if(l!=="/"){let v=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=mvt(e,{pathname:p}),g=Gvt(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:Sf([l,o.encodeLocation?o.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:Sf([l,o.encodeLocation?o.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r);return t&&g?y.createElement(nM.Provider,{value:{location:Xx({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cf.Pop}},g):g}function Vvt(){let e=Xvt(),t=Dvt(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:o},n):null,null)}const Hvt=y.createElement(Vvt,null);class Uvt extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(np.Provider,{value:this.props.routeContext},y.createElement(Wse.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Wvt(e){let{routeContext:t,match:n,children:r}=e,o=y.useContext(gz);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(np.Provider,{value:t},r)}function Gvt(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(o=n)==null?void 0:o.errors;if(s!=null){let u=a.findIndex(d=>d.route.id&&(s==null?void 0:s[d.route.id])!==void 0);u>=0||So(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let p,m=!1,g=null,v=null;n&&(p=s&&d.route.id?s[d.route.id]:void 0,g=d.route.errorElement||Hvt,l&&(c<0&&f===0?(m=!0,v=null):c===f&&(m=!0,v=d.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,f+1)),x=()=>{let S;return p?S=g:m?S=v:d.route.Component?S=y.createElement(d.route.Component,null):d.route.element?S=d.route.element:S=u,y.createElement(Wvt,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:S})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?y.createElement(Uvt,{location:n.location,revalidation:n.revalidation,component:g,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var Kse=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Kse||{}),fO=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fO||{});function qvt(e){let t=y.useContext(gz);return t||So(!1),t}function Kvt(e){let t=y.useContext(Lvt);return t||So(!1),t}function Yvt(e){let t=y.useContext(np);return t||So(!1),t}function Yse(e){let t=Yvt(),n=t.matches[t.matches.length-1];return n.route.id||So(!1),n.route.id}function Xvt(){var e;let t=y.useContext(Wse),n=Kvt(fO.UseRouteError),r=Yse(fO.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Qvt(){let{router:e}=qvt(Kse.UseNavigateStable),t=Yse(fO.UseNavigateStable),n=y.useRef(!1);return Gse(()=>{n.current=!0}),y.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Xx({fromRouteId:t},i)))},[e,t])}const _7={};function Jvt(e,t){_7[t]||(_7[t]=!0,console.warn(t))}const D7=(e,t,n)=>Jvt(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Zvt(e,t){e!=null&&e.v7_startTransition||D7("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),!(e!=null&&e.v7_relativeSplatPath)&&!t&&D7("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath")}function Nt(e){So(!1)}function ebt(e){let{basename:t="/",children:n=null,location:r,navigationType:o=cf.Pop,navigator:i,static:a=!1,future:s}=e;c1()&&So(!1);let l=t.replace(/^\/*/,"/"),c=y.useMemo(()=>({basename:l,navigator:i,static:a,future:Xx({v7_relativeSplatPath:!1},s)}),[l,s,i,a]);typeof r=="string"&&(r=xb(r));let{pathname:u="/",search:d="",hash:f="",state:p=null,key:m="default"}=r,g=y.useMemo(()=>{let v=mz(u,l);return v==null?null:{location:{pathname:v,search:d,hash:f,state:p,key:m},navigationType:o}},[l,u,d,f,p,m,o]);return g==null?null:y.createElement(um.Provider,{value:c},y.createElement(nM.Provider,{children:n,value:g}))}function tbt(e){let{children:t,location:n}=e;return Bvt(FN(t),n)}new Promise(()=>{});function FN(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,o)=>{if(!y.isValidElement(r))return;let i=[...t,o];if(r.type===y.Fragment){n.push.apply(n,FN(r.props.children,i));return}r.type!==Nt&&So(!1),!r.props.index||!r.props.children||So(!1);let a={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=FN(r.props.children,i)),n.push(a)}),n}/** * React Router DOM v6.28.0 * * Copyright (c) Remix Software Inc. @@ -386,47 +386,47 @@ attempted value: ${a} * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function IN(){return IN=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function Avt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $vt(e,t){return e.button===0&&(!t||t==="_self")&&!Avt(e)}const Rvt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],_vt="6";try{window.__reactRouterVersion=_vt}catch{}const Dvt="startTransition",T7=ch[Dvt];function sz(e){let{basename:t,children:n,future:r,window:o}=e,i=y.useRef();i.current==null&&(i.current=Byt({window:o,v5Compat:!0}));let a=i.current,[s,l]=y.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=y.useCallback(d=>{c&&T7?T7(()=>l(d)):l(d)},[l,c]);return y.useLayoutEffect(()=>a.listen(u),[a,u]),y.useEffect(()=>Ovt(r),[r]),y.createElement(Ivt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const Nvt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Lvt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yl=y.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=Mvt(t,Rvt),{basename:h}=y.useContext(nm),m,g=!1;if(typeof c=="string"&&Lvt.test(c)&&(m=c,Nvt))try{let S=new URL(window.location.href),P=c.startsWith("//")?new URL(S.protocol+c):new URL(c),T=iz(P.pathname,h);P.origin===S.origin&&T!=null?c=T+P.search+P.hash:g=!0}catch{}let v=fvt(c,{relative:o}),w=Fvt(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",IN({},f,{href:m||v,onClick:g||i?r:x,ref:n,target:l}))});var E7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(E7||(E7={}));var O7;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(O7||(O7={}));function Fvt(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=rm(),c=Kk(),u=Ase(e,{relative:a});return y.useCallback(d=>{if($vt(d,n)){d.preventDefault();let f=r!==void 0?r:ZE(c)===ZE(u);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}const I7=()=>{var a,s;const e=om(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Ge(),o=Sse(t),i=()=>window.location.href=Tn(wn.ROUTINE_ADD_DAY,r.language,{id:t});return C(Mt,{children:C(qu,{maxWidth:"lg",children:o.isLoading?C(_o,{}):X(Mt,{children:[C(dt,{variant:"caption",children:(a=o.data)==null?void 0:a.description}),C(Kt,{spacing:2,sx:{mt:2},children:(s=o.data)==null?void 0:s.days.map(l=>C(Bvt,{day:l},l.id))}),C(er,{textAlign:"center",sx:{mt:4},children:C(gt,{variant:"outlined",onClick:i,children:n("routines.addDay")})})]})})})};function _se(e){var a,s;const[t]=Ge(),n=e.imageHeight||60,r=e.rowHeight||"100px",o=e.iconHeight||40,i=l=>t(l);return X(He,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:r,p:0},children:[C(He,{size:{xs:3,md:2},children:C(Nyt,{image:(a=e.setting.base)==null?void 0:a.mainImage,iconSize:o,avatarSize:n})}),C(He,{size:9,children:X(Kt,{spacing:0,children:[C(dt,{variant:"subtitle1",children:(s=e.setting.base)==null?void 0:s.getTranslation().name}),C(dt,{children:e.set.getSettingsTextRepresentation(e.setting.base,i)}),C(dt,{variant:"caption",children:e.set.comment})]})})]})}function jvt(e){const[t,n]=Ge(),[r,o]=J.useState(null),i=!!r,a=u=>{o(u.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Tn(wn.ROUTINE_EDIT_SET,n.language,{id:e.set.id}),c=()=>window.location.href=Tn(wn.ROUTINE_DELETE_SET,n.language,{id:e.set.id});return X(He,{container:!0,spacing:2,justifyContent:"space-between",alignItems:"flex-start",children:[C(He,{size:11,children:e.set.settingsFiltered.map(u=>C(_se,{setting:u,set:e.set},u.id))}),X(He,{textAlign:"right",size:1,children:[C(kn,{"aria-label":"settings",onClick:a,children:C(JS,{fontSize:"small"})}),X(hs,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:l,children:t("edit")}),C(Yt,{onClick:c,children:t("delete")})]})]})]})}const Bvt=e=>{const[t,n]=J.useState(null),r=!!t,o=f=>{n(f.currentTarget)},i=()=>{n(null)},[a,s]=Ge(),l=()=>window.location.href=Tn(wn.ROUTINE_EDIT_DAY,s.language,{id:e.day.id}),c=()=>window.location.href=Tn(wn.ROUTINE_ADD_LOG,s.language,{id:e.day.id}),u=()=>window.location.href=Tn(wn.ROUTINE_DELETE_DAY,s.language,{id:e.day.id}),d=()=>window.location.href=Tn(wn.ROUTINE_ADD_SET,s.language,{id:e.day.id});return X(Ro,{sx:{minWidth:275},children:[C(nd,{sx:{bgcolor:"lightgray"},action:C(kn,{"aria-label":"settings",onClick:o,children:C(JS,{})}),title:e.day.description,subheader:e.day.daysOfWeek.map(f=>oee[f-1]).join(", ")}),X(hs,{id:"basic-menu",anchorEl:t,open:r,onClose:i,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:c,children:a("routines.addWeightLog")}),C(Yt,{onClick:l,children:a("edit")}),C(as,{}),X(Yt,{onClick:u,children:[C(oz,{}),a("delete")]})]}),C(xa,{children:C(Kt,{divider:C(as,{flexItem:!0}),children:e.day.sets.map((f,h)=>C(jvt,{set:f,index:h},f.id))})}),C(ps,{children:C(kn,{onClick:d,children:C(Ji,{})})})]})},Dse=()=>{const[e,t]=Ge(),n=jyt();return C(Mt,{children:n.isLoading?C(_o,{}):C(Mt,{children:n.data!==null?C(zvt,{routine:n.data}):C(HF,{title:e("routines.routine"),link:Tn(wn.ROUTINE_ADD,t.language)})})})},zvt=e=>{const[t,n]=Ge();return X(Ro,{children:[C(nd,{title:t("routines.routine"),subheader:e.routine.name??"."}),C(xa,{sx:{height:"510px",overflow:"auto"},children:C(dl,{children:e.routine.days.map(r=>C(Vvt,{day:r},r.id))})}),C(ps,{children:C(gt,{size:"small",href:Tn(wn.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},Vvt=e=>{const[t,n]=y.useState(!1);return X(Mt,{children:[X(Bf,{onClick:()=>n(!t),selected:t,children:[C(Gi,{children:t?C(RZ,{}):C(Mv,{})}),C(bo,{primary:e.day.description,secondary:e.day.daysOfWeek.map(o=>oee[o-1]).join(", ")})]}),C(Zs,{in:t,timeout:"auto",unmountOnExit:!0,children:e.day.sets.map(o=>C("div",{children:o.settingsFiltered.map(i=>C(_se,{setting:i,set:o,imageHeight:45,iconHeight:25,rowHeight:"70px"},i.id))},o.id))})]})};function lz(e=""){return So({queryKey:[Fr.BODY_WEIGHT,e],queryFn:()=>J_e(e)})}const Hvt=()=>{const e=Gr();return lo({mutationFn:t=>Z_e(t),onSuccess:()=>e.invalidateQueries({queryKey:[Fr.BODY_WEIGHT]})})},Uvt=()=>{const e=Gr();return lo({mutationFn:t=>tDe(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[Fr.BODY_WEIGHT]})})},Wvt=()=>{const e=Gr();return lo({mutationFn:t=>eDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Fr.BODY_WEIGHT]})}})},fb=({weightEntry:e,closeFn:t})=>{const n=lz(),r=Uvt(),o=Wvt(),[i,a]=y.useState(e?It.fromJSDate(e.date):It.now),[s,l]=Ge(),c=ml({weight:pa().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?C(_o,{}):C(pl,{initialValues:{weight:e?e.weight:0,date:Si(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{if(e){e.weight=u.weight,e.date=new Date(u.date);try{o.mutate(e)}catch{}}else{e=new mee(new Date(u.date),u.weight);try{r.mutate(e)}catch{}}t&&t()},children:u=>C(ms,{children:X(Kt,{spacing:2,children:[C(Cn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),C(jS,{dateAdapter:jk,adapterLocale:l.language,children:C(pie,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:d=>{d&&u.setFieldValue("date",d.toJSDate()),a(d)},shouldDisableDate:d=>e&&Si(e.date)===d.toISODate()?!1:d?n.data.some(f=>Si(f.date)===d.toISODate()):!1})}),C(Kt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},Gvt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function qvt(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=r===""?"":`${r}-`;let i=0;const a=()=>(i+=1,i);return(s,l)=>{const c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!t){if(Gvt.includes(s.key))return`Mui-${s.key}`;const u=`${o}${c}-${s.key}`;return!l.options.theme[uX]||r!==""?u:`${u}-${a()}`}return`${o}${n}${a()}`}}var k7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e1=(typeof window>"u"?"undefined":k7(window))==="object"&&(typeof document>"u"?"undefined":k7(document))==="object"&&document.nodeType===9;function Hx(e){"@babel/helpers - typeof";return Hx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hx(e)}function Kvt(e,t){if(Hx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Hx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Yvt(e){var t=Kvt(e,"string");return Hx(t)=="symbol"?t:t+""}function Xvt(e,t){for(var n=0;n<+~=|^:(),"'`\s])/g,A7=typeof CSS<"u"&&CSS.escape,uz=function(e){return A7?A7(e):e.replace(Jvt,"\\$1")},Lse=function(){function e(n,r,o){this.type="style",this.isProcessed=!1;var i=o.sheet,a=o.Renderer;this.key=n,this.options=o,this.style=r,i?this.renderer=i.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,o,i){if(o===void 0)return this.style[r];var a=i?i.force:!1;if(!a&&this.style[r]===o)return this;var s=o;(!i||i.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(o,r,this));var l=s==null||s===!1,c=r in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),MN=function(e){pS(t,e);function t(r,o,i){var a;a=e.call(this,r,o,i)||this;var s=i.selector,l=i.scoped,c=i.sheet,u=i.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(J2(J2(a)),c),a.selectorText="."+uz(a.id)),a}var n=t.prototype;return n.applyTo=function(o){var i=this.renderer;if(i){var a=this.toJSON();for(var s in a)i.setProperty(o,s,a[s])}return this},n.toJSON=function(){var o={};for(var i in this.style){var a=this.style[i];typeof a!="object"?o[i]=a:Array.isArray(a)&&(o[i]=sh(a))}return o},n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Nr({},o,{allowEmpty:!0}):o;return Ux(this.selectorText,this.style,s)},Nse(t,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var i=this.renderer,a=this.renderable;if(!(!a||!i)){var s=i.setSelector(a,o);s||i.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(Lse),Zvt={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new MN(t,n,r)}},hR={indent:1,children:!0},ebt=/@([\w-]+)/,tbt=function(){function e(n,r,o){this.type="conditional",this.isProcessed=!1,this.key=n;var i=n.match(ebt);this.at=i?i[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new Yk(Nr({},o,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=hR);var o=pb(r),i=o.linebreak;if(r.indent==null&&(r.indent=hR.indent),r.children==null&&(r.children=hR.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+i+a+i+"}":""},e}(),nbt=/@container|@media|@supports\s+/,rbt={onCreateRule:function(t,n,r){return nbt.test(t)?new tbt(t,n,r):null}},mR={indent:1,children:!0},obt=/@keyframes\s+([\w-]+)/,AN=function(){function e(n,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=n.match(obt);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=o;var a=o.scoped,s=o.sheet,l=o.generateId;this.id=a===!1?this.name:uz(l(this,s)),this.rules=new Yk(Nr({},o,{parent:this}));for(var c in r)this.rules.add(c,r[c],Nr({},o,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=mR);var o=pb(r),i=o.linebreak;if(r.indent==null&&(r.indent=mR.indent),r.children==null&&(r.children=mR.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+i+a+i),this.at+" "+this.id+" {"+a+"}"},e}(),ibt=/@keyframes\s+/,abt=/\$([\w-]+)/g,$N=function(t,n){return typeof t=="string"?t.replace(abt,function(r,o){return o in n?n[o]:r}):t},$7=function(t,n,r){var o=t[n],i=$N(o,r);i!==o&&(t[n]=i)},sbt={onCreateRule:function(t,n,r){return typeof t=="string"&&ibt.test(t)?new AN(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&$7(t,"animation-name",r.keyframes),"animation"in t&&$7(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var o=r.options.sheet;if(!o)return t;switch(n){case"animation":return $N(t,o.keyframes);case"animation-name":return $N(t,o.keyframes);default:return t}}},lbt=function(e){pS(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Nr({},o,{allowEmpty:!0}):o;return Ux(this.key,this.style,s)},t}(Lse),cbt={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new lbt(t,n,r):null}},ubt=function(){function e(n,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=o}var t=e.prototype;return t.toString=function(r){var o=pb(r),i=o.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s=this.index){o.push(r);return}for(var a=0;ai){o.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},t.toString=function(r){for(var o=r===void 0?{}:r,i=o.attached,a=nI(o,["attached"]),s=pb(a),l=s.linebreak,c="",u=0;u-1?o.substr(0,i-1):o;t.style.setProperty(n,a,i>-1?"important":"")}}catch{return!1}return!0},Cbt=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},Pbt=function(t,n){return t.selectorText=n,t.selectorText===n},Bse=jse(function(){return document.querySelector("head")});function Tbt(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Ebt(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Obt(e){for(var t=Bse(),n=0;n0){var n=Tbt(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Ebt(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=Obt(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}function kbt(e,t){var n=t.insertionPoint,r=Ibt(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling);return}Bse().appendChild(e)}var Mbt=jse(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),L7=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},F7=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},Abt=function(){var t=document.createElement("style");return t.textContent=` -`,t},$bt=function(){function e(n){this.getPropertyValue=xbt,this.setProperty=Sbt,this.removeProperty=Cbt,this.setSelector=Pbt,this.hasInsertedRules=!1,this.cssRules=[],n&&xw.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},o=r.media,i=r.meta,a=r.element;this.element=a||Abt(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),i&&this.element.setAttribute("data-meta",i);var s=Mbt();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){kbt(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` + */function jN(){return jN=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function rbt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function obt(e,t){return e.button===0&&(!t||t==="_self")&&!rbt(e)}const ibt=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],abt="6";try{window.__reactRouterVersion=abt}catch{}const sbt="startTransition",N7=vh[sbt];function yz(e){let{basename:t,children:n,future:r,window:o}=e,i=y.useRef();i.current==null&&(i.current=fvt({window:o,v5Compat:!0}));let a=i.current,[s,l]=y.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=y.useCallback(d=>{c&&N7?N7(()=>l(d)):l(d)},[l,c]);return y.useLayoutEffect(()=>a.listen(u),[a,u]),y.useEffect(()=>Zvt(r),[r]),y.createElement(ebt,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a,future:r})}const lbt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cbt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Zl=y.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:c,preventScrollReset:u,viewTransition:d}=t,f=nbt(t,ibt),{basename:p}=y.useContext(um),m,g=!1;if(typeof c=="string"&&cbt.test(c)&&(m=c,lbt))try{let S=new URL(window.location.href),P=c.startsWith("//")?new URL(S.protocol+c):new URL(c),T=mz(P.pathname,p);P.origin===S.origin&&T!=null?c=T+P.search+P.hash:g=!0}catch{}let v=Fvt(c,{relative:o}),w=ubt(c,{replace:a,state:s,target:l,preventScrollReset:u,relative:o,viewTransition:d});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",jN({},f,{href:m||v,onClick:g||i?r:x,ref:n,target:l}))});var L7;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(L7||(L7={}));var F7;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(F7||(F7={}));function ubt(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,viewTransition:s}=t===void 0?{}:t,l=dm(),c=rM(),u=qse(e,{relative:a});return y.useCallback(d=>{if(obt(d,n)){d.preventDefault();let f=r!==void 0?r:dO(c)===dO(u);l(e,{replace:f,state:o,preventScrollReset:i,relative:a,viewTransition:s})}},[c,l,u,r,o,n,e,i,a,s])}const j7=()=>{var a,s;const e=fm(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Ue(),o=Fse(t),i=()=>window.location.href=Tn(Sn.ROUTINE_ADD_DAY,r.language,{id:t});return C(Mt,{children:C(Yu,{maxWidth:"lg",children:o.isLoading?C(Po,{}):Q(Mt,{children:[C(ct,{variant:"caption",children:(a=o.data)==null?void 0:a.description}),C(Gt,{spacing:2,sx:{mt:2},children:(s=o.data)==null?void 0:s.days.map(l=>C(fbt,{day:l},l.id))}),C(Rn,{textAlign:"center",sx:{mt:4},children:C(gt,{variant:"outlined",onClick:i,children:n("routines.addDay")})})]})})})};function Xse(e){var a,s;const[t]=Ue(),n=e.imageHeight||60,r=e.rowHeight||"100px",o=e.iconHeight||40,i=l=>t(l);return Q(Be,{container:!0,alignItems:"center",justifyContent:"center",sx:{height:r,p:0},children:[C(Be,{size:{xs:3,md:2},children:C(lvt,{image:(a=e.setting.base)==null?void 0:a.mainImage,iconSize:o,avatarSize:n})}),C(Be,{size:9,children:Q(Gt,{spacing:0,children:[C(ct,{variant:"subtitle1",children:(s=e.setting.base)==null?void 0:s.getTranslation().name}),C(ct,{children:e.set.getSettingsTextRepresentation(e.setting.base,i)}),C(ct,{variant:"caption",children:e.set.comment})]})})]})}function dbt(e){const[t,n]=Ue(),[r,o]=Y.useState(null),i=!!r,a=u=>{o(u.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Tn(Sn.ROUTINE_EDIT_SET,n.language,{id:e.set.id}),c=()=>window.location.href=Tn(Sn.ROUTINE_DELETE_SET,n.language,{id:e.set.id});return Q(Be,{container:!0,spacing:2,justifyContent:"space-between",alignItems:"flex-start",children:[C(Be,{size:11,children:e.set.settingsFiltered.map(u=>C(Xse,{setting:u,set:e.set},u.id))}),Q(Be,{textAlign:"right",size:1,children:[C(kn,{"aria-label":"settings",onClick:a,children:C(l1,{fontSize:"small"})}),Q(ms,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:l,children:t("edit")}),C(Yt,{onClick:c,children:t("delete")})]})]})]})}const fbt=e=>{const[t,n]=Y.useState(null),r=!!t,o=f=>{n(f.currentTarget)},i=()=>{n(null)},[a,s]=Ue(),l=()=>window.location.href=Tn(Sn.ROUTINE_EDIT_DAY,s.language,{id:e.day.id}),c=()=>window.location.href=Tn(Sn.ROUTINE_ADD_LOG,s.language,{id:e.day.id}),u=()=>window.location.href=Tn(Sn.ROUTINE_DELETE_DAY,s.language,{id:e.day.id}),d=()=>window.location.href=Tn(Sn.ROUTINE_ADD_SET,s.language,{id:e.day.id});return Q(Do,{sx:{minWidth:275},children:[C(od,{sx:{bgcolor:"lightgray"},action:C(kn,{"aria-label":"settings",onClick:o,children:C(l1,{})}),title:e.day.description,subheader:e.day.daysOfWeek.map(f=>mee[f-1]).join(", ")}),Q(ms,{id:"basic-menu",anchorEl:t,open:r,onClose:i,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:c,children:a("routines.addWeightLog")}),C(Yt,{onClick:l,children:a("edit")}),C(ss,{}),Q(Yt,{onClick:u,children:[C(hz,{}),a("delete")]})]}),C(xa,{children:C(Gt,{divider:C(ss,{flexItem:!0}),children:e.day.sets.map((f,p)=>C(dbt,{set:f,index:p},f.id))})}),C(hs,{children:C(kn,{onClick:d,children:C(Ji,{})})})]})},Qse=()=>{const[e,t]=Ue(),n=dvt();return C(Mt,{children:n.isLoading?C(Po,{}):C(Mt,{children:n.data!==null?C(pbt,{routine:n.data}):C(ej,{title:e("routines.routine"),link:Tn(Sn.ROUTINE_ADD,t.language)})})})},pbt=e=>{const[t,n]=Ue();return Q(Do,{children:[C(od,{title:t("routines.routine"),subheader:e.routine.name??"."}),C(xa,{sx:{height:"510px",overflow:"auto"},children:C(pl,{children:e.routine.days.map(r=>C(hbt,{day:r},r.id))})}),C(hs,{children:C(gt,{size:"small",href:Tn(Sn.ROUTINE_DETAIL,n.language,{id:e.routine.id}),children:t("seeDetails")})})]})},hbt=e=>{const[t,n]=y.useState(!1);return Q(Mt,{children:[Q(Wf,{onClick:()=>n(!t),selected:t,children:[C(Gi,{children:t?C(UZ,{}):C(zv,{})}),C(wo,{primary:e.day.description,secondary:e.day.daysOfWeek.map(o=>mee[o-1]).join(", ")})]}),C(Zs,{in:t,timeout:"auto",unmountOnExit:!0,children:e.day.sets.map(o=>C("div",{children:o.settingsFiltered.map(i=>C(Xse,{setting:i,set:o,imageHeight:45,iconHeight:25,rowHeight:"70px"},i.id))},o.id))})]})};function oM(e="lastWeek"){return Co({queryKey:[jr.BODY_WEIGHT,e],queryFn:()=>hDe(e)})}const mbt=()=>{const e=qr();return co({mutationFn:t=>mDe(t),onSuccess:()=>e.invalidateQueries({queryKey:[jr.BODY_WEIGHT]})})},gbt=()=>{const e=qr();return co({mutationFn:t=>yDe(t),onError:t=>{console.log(t)},onSuccess:()=>e.invalidateQueries({queryKey:[jr.BODY_WEIGHT]})})},ybt=()=>{const e=qr();return co({mutationFn:t=>gDe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[jr.BODY_WEIGHT]})}})},Sb=({weightEntry:e,closeFn:t})=>{const n=oM(),r=gbt(),o=ybt(),[i,a]=y.useState(e?It.fromJSDate(e.date):It.now),[s,l]=Ue(),c=bl({weight:pa().min(30,"Min weight is 30 kg").max(300,"Max weight is 300 kg").required("Weight field is required")});return n.isLoading?C(Po,{}):C(yl,{initialValues:{weight:e?e.weight:0,date:Si(e?e.date:new Date)},validationSchema:c,onSubmit:async u=>{if(e){e.weight=u.weight,e.date=new Date(u.date);try{o.mutate(e)}catch{}}else{e=new Eee(new Date(u.date),u.weight);try{r.mutate(e)}catch{}}t&&t()},children:u=>C(gs,{children:Q(Gt,{spacing:2,children:[C(yn,{fullWidth:!0,id:"weight",label:s("weight"),error:u.touched.weight&&!!u.touched.weight,helperText:u.touched.weight&&u.errors.weight,...u.getFieldProps("weight")}),C(YS,{dateAdapter:Kk,adapterLocale:l.language,children:C(kie,{format:"yyyy-MM-dd",label:s("date"),value:i,slotProps:{textField:{variant:"outlined"}},disableFuture:!0,onChange:d=>{d&&u.setFieldValue("date",d.toJSDate()),a(d)},shouldDisableDate:d=>e&&Si(e.date)===d.toISODate()?!1:d?n.data.some(f=>Si(f.date)===d.toISODate()):!1})}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:s("submit")})})]})})})},vbt=["checked","disabled","error","focused","focusVisible","required","expanded","selected"];function bbt(e={}){const{disableGlobal:t=!1,productionPrefix:n="jss",seed:r=""}=e,o=r===""?"":`${r}-`;let i=0;const a=()=>(i+=1,i);return(s,l)=>{const c=l.options.name;if(c&&c.startsWith("Mui")&&!l.options.link&&!t){if(vbt.includes(s.key))return`Mui-${s.key}`;const u=`${o}${c}-${s.key}`;return!l.options.theme[xX]||r!==""?u:`${u}-${a()}`}return`${o}${n}${a()}`}}var B7=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u1=(typeof window>"u"?"undefined":B7(window))==="object"&&(typeof document>"u"?"undefined":B7(document))==="object"&&document.nodeType===9;function Qx(e){"@babel/helpers - typeof";return Qx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qx(e)}function wbt(e,t){if(Qx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Qx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function xbt(e){var t=wbt(e,"string");return Qx(t)=="symbol"?t:t+""}function Sbt(e,t){for(var n=0;n<+~=|^:(),"'`\s])/g,V7=typeof CSS<"u"&&CSS.escape,bz=function(e){return V7?V7(e):e.replace(Pbt,"\\$1")},Zse=function(){function e(n,r,o){this.type="style",this.isProcessed=!1;var i=o.sheet,a=o.Renderer;this.key=n,this.options=o,this.style=r,i?this.renderer=i.renderer:a&&(this.renderer=new a)}var t=e.prototype;return t.prop=function(r,o,i){if(o===void 0)return this.style[r];var a=i?i.force:!1;if(!a&&this.style[r]===o)return this;var s=o;(!i||i.process!==!1)&&(s=this.options.jss.plugins.onChangeValue(o,r,this));var l=s==null||s===!1,c=r in this.style;if(l&&!c&&!a)return this;var u=l&&c;if(u?delete this.style[r]:this.style[r]=s,this.renderable&&this.renderer)return u?this.renderer.removeProperty(this.renderable,r):this.renderer.setProperty(this.renderable,r,s),this;var d=this.options.sheet;return d&&d.attached,this},e}(),zN=function(e){xS(t,e);function t(r,o,i){var a;a=e.call(this,r,o,i)||this;var s=i.selector,l=i.scoped,c=i.sheet,u=i.generateId;return s?a.selectorText=s:l!==!1&&(a.id=u(l_(l_(a)),c),a.selectorText="."+bz(a.id)),a}var n=t.prototype;return n.applyTo=function(o){var i=this.renderer;if(i){var a=this.toJSON();for(var s in a)i.setProperty(o,s,a[s])}return this},n.toJSON=function(){var o={};for(var i in this.style){var a=this.style[i];typeof a!="object"?o[i]=a:Array.isArray(a)&&(o[i]=gh(a))}return o},n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Lr({},o,{allowEmpty:!0}):o;return Jx(this.selectorText,this.style,s)},Jse(t,[{key:"selector",set:function(o){if(o!==this.selectorText){this.selectorText=o;var i=this.renderer,a=this.renderable;if(!(!a||!i)){var s=i.setSelector(a,o);s||i.replaceRule(a,this)}}},get:function(){return this.selectorText}}]),t}(Zse),Tbt={onCreateRule:function(t,n,r){return t[0]==="@"||r.parent&&r.parent.type==="keyframes"?null:new zN(t,n,r)}},PR={indent:1,children:!0},Ebt=/@([\w-]+)/,Obt=function(){function e(n,r,o){this.type="conditional",this.isProcessed=!1,this.key=n;var i=n.match(Ebt);this.at=i?i[1]:"unknown",this.query=o.name||"@"+this.at,this.options=o,this.rules=new iM(Lr({},o,{parent:this}));for(var a in r)this.rules.add(a,r[a]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.indexOf=function(r){return this.rules.indexOf(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a?(this.options.jss.plugins.onProcessRule(a),a):null},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.toString=function(r){r===void 0&&(r=PR);var o=Cb(r),i=o.linebreak;if(r.indent==null&&(r.indent=PR.indent),r.children==null&&(r.children=PR.children),r.children===!1)return this.query+" {}";var a=this.rules.toString(r);return a?this.query+" {"+i+a+i+"}":""},e}(),Ibt=/@container|@media|@supports\s+/,kbt={onCreateRule:function(t,n,r){return Ibt.test(t)?new Obt(t,n,r):null}},TR={indent:1,children:!0},Mbt=/@keyframes\s+([\w-]+)/,VN=function(){function e(n,r,o){this.type="keyframes",this.at="@keyframes",this.isProcessed=!1;var i=n.match(Mbt);i&&i[1]?this.name=i[1]:this.name="noname",this.key=this.type+"-"+this.name,this.options=o;var a=o.scoped,s=o.sheet,l=o.generateId;this.id=a===!1?this.name:bz(l(this,s)),this.rules=new iM(Lr({},o,{parent:this}));for(var c in r)this.rules.add(c,r[c],Lr({},o,{parent:this}));this.rules.process()}var t=e.prototype;return t.toString=function(r){r===void 0&&(r=TR);var o=Cb(r),i=o.linebreak;if(r.indent==null&&(r.indent=TR.indent),r.children==null&&(r.children=TR.children),r.children===!1)return this.at+" "+this.id+" {}";var a=this.rules.toString(r);return a&&(a=""+i+a+i),this.at+" "+this.id+" {"+a+"}"},e}(),Abt=/@keyframes\s+/,$bt=/\$([\w-]+)/g,HN=function(t,n){return typeof t=="string"?t.replace($bt,function(r,o){return o in n?n[o]:r}):t},H7=function(t,n,r){var o=t[n],i=HN(o,r);i!==o&&(t[n]=i)},Rbt={onCreateRule:function(t,n,r){return typeof t=="string"&&Abt.test(t)?new VN(t,n,r):null},onProcessStyle:function(t,n,r){return n.type!=="style"||!r||("animation-name"in t&&H7(t,"animation-name",r.keyframes),"animation"in t&&H7(t,"animation",r.keyframes)),t},onChangeValue:function(t,n,r){var o=r.options.sheet;if(!o)return t;switch(n){case"animation":return HN(t,o.keyframes);case"animation-name":return HN(t,o.keyframes);default:return t}}},_bt=function(e){xS(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.toString=function(o){var i=this.options.sheet,a=i?i.options.link:!1,s=a?Lr({},o,{allowEmpty:!0}):o;return Jx(this.key,this.style,s)},t}(Zse),Dbt={onCreateRule:function(t,n,r){return r.parent&&r.parent.type==="keyframes"?new _bt(t,n,r):null}},Nbt=function(){function e(n,r,o){this.type="font-face",this.at="@font-face",this.isProcessed=!1,this.key=n,this.style=r,this.options=o}var t=e.prototype;return t.toString=function(r){var o=Cb(r),i=o.linebreak;if(Array.isArray(this.style)){for(var a="",s=0;s=this.index){o.push(r);return}for(var a=0;ai){o.splice(a,0,r);return}}},t.reset=function(){this.registry=[]},t.remove=function(r){var o=this.registry.indexOf(r);this.registry.splice(o,1)},t.toString=function(r){for(var o=r===void 0?{}:r,i=o.attached,a=hI(o,["attached"]),s=Cb(a),l=s.linebreak,c="",u=0;u-1?o.substr(0,i-1):o;t.style.setProperty(n,a,i>-1?"important":"")}}catch{return!1}return!0},Ybt=function(t,n){try{t.attributeStyleMap?t.attributeStyleMap.delete(n):t.style.removeProperty(n)}catch{}},Xbt=function(t,n){return t.selectorText=n,t.selectorText===n},nle=tle(function(){return document.querySelector("head")});function Qbt(e,t){for(var n=0;nt.index&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Jbt(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.attached&&r.options.insertionPoint===t.insertionPoint)return r}return null}function Zbt(e){for(var t=nle(),n=0;n0){var n=Qbt(t,e);if(n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element};if(n=Jbt(t,e),n&&n.renderer)return{parent:n.renderer.element.parentNode,node:n.renderer.element.nextSibling}}var r=e.insertionPoint;if(r&&typeof r=="string"){var o=Zbt(r);if(o)return{parent:o.parentNode,node:o.nextSibling}}return!1}function t0t(e,t){var n=t.insertionPoint,r=e0t(t);if(r!==!1&&r.parent){r.parent.insertBefore(e,r.node);return}if(n&&typeof n.nodeType=="number"){var o=n,i=o.parentNode;i&&i.insertBefore(e,o.nextSibling);return}nle().appendChild(e)}var n0t=tle(function(){var e=document.querySelector('meta[property="csp-nonce"]');return e?e.getAttribute("content"):null}),K7=function(t,n,r){try{"insertRule"in t?t.insertRule(n,r):"appendRule"in t&&t.appendRule(n)}catch{return!1}return t.cssRules[r]},Y7=function(t,n){var r=t.cssRules.length;return n===void 0||n>r?r:n},r0t=function(){var t=document.createElement("style");return t.textContent=` +`,t},o0t=function(){function e(n){this.getPropertyValue=qbt,this.setProperty=Kbt,this.removeProperty=Ybt,this.setSelector=Xbt,this.hasInsertedRules=!1,this.cssRules=[],n&&Mw.add(n),this.sheet=n;var r=this.sheet?this.sheet.options:{},o=r.media,i=r.meta,a=r.element;this.element=a||r0t(),this.element.setAttribute("data-jss",""),o&&this.element.setAttribute("media",o),i&&this.element.setAttribute("data-meta",i);var s=n0t();s&&this.element.setAttribute("nonce",s)}var t=e.prototype;return t.attach=function(){if(!(this.element.parentNode||!this.sheet)){t0t(this.element,this.sheet.options);var r=!!(this.sheet&&this.sheet.deployed);this.hasInsertedRules&&r&&(this.hasInsertedRules=!1,this.deploy())}},t.detach=function(){if(this.sheet){var r=this.element.parentNode;r&&r.removeChild(this.element),this.sheet.options.link&&(this.cssRules=[],this.element.textContent=` `)}},t.deploy=function(){var r=this.sheet;if(r){if(r.options.link){this.insertRules(r.rules);return}this.element.textContent=` `+r.toString()+` -`}},t.insertRules=function(r,o){for(var i=0;ie.length)&&(t=e.length);for(var n=0,r=Array(t);n-1){var i=Yse[t];if(!Array.isArray(i))return rn.js+kf(i)in n?rn.css+i:!1;if(!o)return!1;for(var a=0;ar?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var o={},i=Object.keys(n).sort(e),a=0;a"u"?null:$0t(),R0t()]}}function Qse(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o={...t};return Object.keys(n).forEach(i=>{n[i]&&(o[i]=`${t[i]} ${n[i]}`)}),o}const Rg={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};function D0t(){const e=ZO();return(e==null?void 0:e.$$material)??e}const N0t=zse(_0t()),L0t=qvt(),F0t=new Map,j0t={disableGeneration:!1,generateClassName:L0t,jss:N0t,sheetsCache:null,sheetsManager:F0t,sheetsRegistry:null},B0t=y.createContext(j0t);let V7=-1e9;function z0t(){return V7+=1,V7}function H7(e){return e.length===0}function V0t(e){const{variant:t,...n}=e;let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=H7(r)?e[o]:Ce(e[o]):r+=`${H7(r)?o:Ce(o)}${Ce(e[o].toString())}`}),r}const H0t={};function U0t(e){const t=typeof e=="function";return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const i=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s={...o};return Object.keys(i).forEach(l=>{s[l]=vo(s[l]||{},i[l])}),a.forEach(l=>{const c=V0t(l.props);s[c]=vo(s[c]||{},l.style)}),s},options:{}}}function W0t({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=Qse({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}function G0t({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},i){if(n.disableGeneration)return;let a=Rg.get(n.sheetsManager,r,t);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Rg.set(n.sheetsManager,r,t,a));const s={...r.options,...n,theme:t,flip:typeof n.flip=="boolean"?n.flip:t.direction==="rtl"};s.generateId=s.serverGenerateClassName||s.generateClassName;const l=n.sheetsRegistry;if(a.refs===0){let c;n.sheetsCache&&(c=Rg.get(n.sheetsCache,r,t));const u=r.create(t,o);c||(c=n.jss.createStyleSheet(u,{link:!1,...s}),c.attach(),n.sheetsCache&&Rg.set(n.sheetsCache,r,t,c)),l&&l.add(c),a.staticSheet=c,a.dynamicStyles=Vse(u)}if(a.dynamicStyles){const c=n.jss.createStyleSheet(a.dynamicStyles,{link:!0,...s});c.update(i),c.attach(),e.dynamicSheet=c,e.classes=Qse({baseClasses:a.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else e.classes=a.staticSheet.classes;a.refs+=1}function q0t({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}function K0t({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Rg.get(n.sheetsManager,r,t);o.refs-=1;const i=n.sheetsRegistry;o.refs===0&&(Rg.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}function Y0t(e,t){const n=y.useRef([]);let r;const o=y.useMemo(()=>({}),t);n.current!==o&&(n.current=o,r=e()),y.useEffect(()=>()=>{r&&r()},[o])}function Jse(e,t={}){const{name:n,classNamePrefix:r,Component:o,defaultTheme:i=H0t,...a}=t,s=U0t(e),l=n||r||"makeStyles";return s.options={index:z0t(),name:n,meta:l,classNamePrefix:l},(u={})=>{const d=D0t()||i,f={...y.useContext(B0t),...a},h=y.useRef(),m=y.useRef();return Y0t(()=>{const v={name:n,state:{},stylesCreator:s,stylesOptions:f,theme:d};return G0t(v,u),m.current=!1,h.current=v,()=>{K0t(v)}},[d,s]),y.useEffect(()=>{m.current&&q0t(h.current,u),m.current=!0}),W0t(h.current,u.classes,o)}}const X0t=Jse(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),Q0t=({weights:e})=>{const[t]=Ge(),n=X0t(),o=e.slice(0,5);return C("div",{className:n.table,children:C(Xu,{children:X(Ku,{size:"small",children:[C(Bh,{children:X(Qt,{children:[C(ke,{align:"center",children:t("date")}),C(ke,{align:"center",children:t("weight")})]})}),C(Yu,{children:o.map(i=>X(Qt,{children:[C(ke,{align:"center",children:i.date.toLocaleDateString()}),C(ke,{align:"center",children:i.weight})]},i.date.toLocaleDateString()))})]})})})},J0t=({active:e,payload:t,label:n})=>{const[r,o]=Ge();return e&&t&&t.length?X(co,{style:{padding:8},children:[C("p",{children:C("strong",{children:new Date(n).toLocaleDateString(o.language)})}),X("p",{children:[r("weight"),": ",t[0].value]})]}):null},Zse=({weights:e,height:t})=>{t=t||300;const r=Ei(),[o,i]=Ge(),[a,s]=J.useState(!1),[l,c]=J.useState(),u=()=>s(!1),d=[...e].sort((h,m)=>h.date.getTime()-m.date.getTime()).map(h=>({date:h.date.getTime(),weight:h.weight,entry:h}));function f(h,m){c(m.payload.entry),s(!0)}return X("div",{children:[l&&C(ta,{title:o("edit"),isOpen:a,closeFn:u,children:C(fb,{weightEntry:l})}),C(Hh,{height:t,children:X(woe,{data:d,children:[C(Zv,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:d.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:f}}),C(Jv,{stroke:"#ccc",strokeDasharray:"5 5"}),C(Kc,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:h=>new Date(h).toLocaleDateString(i.language)}),C(Yc,{domain:["auto","auto"]}),C(zs,{content:C(J0t,{})})]})})]})},ele=()=>{var n,r;const[e]=Ge(),t=lz("lastYear");return C(Mt,{children:t.isLoading?C(_o,{}):C(Mt,{children:((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?C(Z0t,{entries:t.data}):C(HF,{title:e("weight"),modalContent:C(fb,{})})})})},Z0t=e=>{const[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=Ge();return X(Mt,{children:[X(Ro,{children:[C(nd,{title:i("weight"),subheader:"."}),X(xa,{sx:{height:"500px",overflow:"auto"},children:[C(Zse,{weights:e.entries,height:200}),C(er,{sx:{mt:2},children:C(Q0t,{weights:e.entries})})]}),X(ps,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(gt,{size:"small",href:Tn(wn.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),C(nc,{title:i("addEntry"),children:C(kn,{onClick:r,children:C(Ji,{})})})]})]}),C(ta,{title:i("add"),isOpen:t,closeFn:o,children:C(fb,{closeFn:o})})]})},ewt=()=>{const[e,t]=Ge();return C(zB,{callback:r=>{r!==null&&(window.location.href=Tn(wn.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})},twt=()=>C("div",{children:"About Page"});function pz(e){const[t]=Ge(),[n,r,o]=hl(e.fieldName);return C(ec,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>C(wh,{label:s,...a({index:l})})),onBlur:n.onBlur,renderInput:i=>C(Cn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function nwt(e){const[t]=Ge(),[n,r,o]=hl(e.fieldName);return C(ec,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>t(Xi(e.options.find(a=>a.id===i).name)),...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>C(Cn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function hz(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return C(Cn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function rwt(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return X(Fh,{fullWidth:!0,children:[C(jh,{id:"label-category",children:t("category")}),C(zf,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&C(EI,{error:!0,children:r.error})]})}const tle=5,nle=40,mz=e=>Vc().min(tle,e("forms.valueTooShort")).max(nle,e("forms.valueTooLong")).required(e("forms.fieldRequired")),gz=e=>tz().ensure().compact().of(Vc().min(tle,e("forms.valueTooShort")).max(nle,e("forms.valueTooLong"))),yz=e=>Vc().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),rle=e=>tz().ensure().compact().of(Vc().min(15,e("forms.valueTooShort"))),owt=e=>pa().required(e("forms.fieldRequired"));function ole(){return So({queryKey:[Z2e],queryFn:vDe})}function Xk(){return So({queryKey:[r_e],queryFn:pDe})}function t1(){return So({queryKey:[i_e],queryFn:sDe})}function Qk(){return So({queryKey:[o_e],queryFn:uDe})}function Jk(){return So({queryKey:[n_e],queryFn:ODe})}const kh=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${H2e}${i})`).join(", ");return C("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})};var ile=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(ile||{}),$n=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))($n||{});const U7=e=>({type:ile.SET_NOTIFICATION,payload:e}),W7={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},iwt=y.createContext([W7,()=>W7]),awt=()=>y.useContext(iwt),swt=e=>({type:$n.SET_NAME_EN,payload:e}),lwt=e=>({type:$n.SET_DESCRIPTION_EN,payload:e}),cwt=e=>({type:$n.SET_NOTES_EN,payload:e}),uwt=e=>({type:$n.SET_ALIASES_EN,payload:e}),dwt=e=>({type:$n.SET_NAME_I18N,payload:e}),fwt=e=>({type:$n.SET_DESCRIPTION_I18N,payload:e}),pwt=e=>({type:$n.SET_NOTES_I18N,payload:e}),hwt=e=>({type:$n.SET_ALIASES_I18N,payload:e}),mwt=e=>({type:$n.SET_CATEGORY,payload:e}),gwt=e=>({type:$n.SET_EQUIPMENT,payload:e}),ywt=e=>({type:$n.SET_PRIMARY_MUSCLES,payload:e}),vwt=e=>({type:$n.SET_MUSCLES_SECONDARY,payload:e}),bwt=e=>({type:$n.SET_VARIATION_ID,payload:e}),wwt=e=>({type:$n.SET_NEW_VARIATION_BASE_ID,payload:e}),xwt=e=>({type:$n.SET_LANGUAGE,payload:e}),Swt=e=>({type:$n.SET_IMAGES,payload:e}),Cwt=(e,t)=>{if(t===void 0)return e;switch(t.type){case $n.RESET:return nO;case $n.SET_NAME_EN:return{...e,nameEn:t.payload};case $n.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case $n.SET_NOTES_EN:return{...e,notesEn:t.payload};case $n.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case $n.SET_CATEGORY:return{...e,category:t.payload};case $n.SET_EQUIPMENT:return{...e,equipment:t.payload};case $n.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case $n.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case $n.SET_VARIATION_ID:return{...e,variationId:t.payload};case $n.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationBaseId:t.payload};case $n.SET_LANGUAGE:return{...e,languageId:t.payload};case $n.SET_NAME_I18N:return{...e,nameI18n:t.payload};case $n.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case $n.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case $n.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case $n.SET_IMAGES:return{...e,images:t.payload};default:return e}},nO={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationBaseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},ale=y.createContext([nO,()=>nO]),Pwt=({children:e})=>{const[t,n]=y.useReducer(Cwt,nO);return C(ale.Provider,{value:[t,n],children:e})},hb=()=>y.useContext(ale),Twt=({onContinue:e})=>{const[t]=Ge(),[n,r]=hb(),[o,i]=y.useState(n.muscles),[a,s]=y.useState(n.musclesSecondary);y.useEffect(()=>{r(ywt(o))},[r,o]),y.useEffect(()=>{r(vwt(a))},[r,a]);const l=Xk(),c=t1(),u=Qk(),d=ml({nameEn:mz(t),newAlternativeNameEn:gz(t),category:owt(t)});return C(pl,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:d,onSubmit:f=>{r(swt(f.nameEn)),r(mwt(f.category)),r(uwt(f.newAlternativeNameEn)),r(gwt(f.equipment)),e()},children:f=>X(ms,{children:[X(Kt,{spacing:2,children:[C(hz,{fieldName:"nameEn"}),C(pz,{fieldName:"newAlternativeNameEn"}),l.isLoading?X(er,{children:[" ",C(Ja,{})," "]}):C(rwt,{fieldName:"category",options:l.data.map(h=>C(Yt,{value:h.id,children:t(Xi(h.name))},h.id))}),u.isLoading?X(er,{children:[" ",C(Ja,{})," "]}):C(nwt,{fieldName:"equipment",options:u.data}),c.isLoading?X(er,{children:[" ",C(Ja,{})," "]}):X(Mt,{children:[C(ec,{multiple:!0,id:"muscles",options:c.data.map(h=>h.id),getOptionDisabled:h=>a.includes(h),getOptionLabel:h=>c.data.find(m=>m.id===h).getName(t),value:o,onChange:(h,m)=>{i(m)},renderInput:h=>C(Cn,{...h,variant:"standard",label:t("exercises.muscles"),value:f.getFieldProps("muscles").value,onChange:m=>{f.setFieldValue(f.getFieldProps("muscles").name,m.target.value)}})}),C(ec,{multiple:!0,id:"secondary-muscles",options:c.data.map(h=>h.id),getOptionDisabled:h=>o.includes(h),getOptionLabel:h=>c.data.find(m=>m.id===h).getName(t),value:a,onChange:(h,m)=>{s(m)},renderInput:h=>C(Cn,{...h,variant:"standard",label:t("exercises.secondaryMuscles"),value:f.getFieldProps("muscles").value})})]}),X(He,{container:!0,children:[C(He,{display:"flex",justifyContent:"center",size:6,children:C(kh,{primaryMuscles:o.map(h=>c.data.find(m=>m.id===h)),secondaryMuscles:a.map(h=>c.data.find(m=>m.id===h)),isFront:!0})}),C(He,{display:"flex",justifyContent:"center",size:6,children:C(kh,{primaryMuscles:o.map(h=>c.data.find(m=>m.id===h)),secondaryMuscles:a.map(h=>c.data.find(m=>m.id===h)),isFront:!1})})]})]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C(er,{sx:{mb:2},children:C("div",{children:C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function Ewt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const G7=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=hb(),[s,l]=y.useState(!1),[c,u]=y.useState(i.variationId),[d,f]=y.useState(i.newVariationBaseId);y.useEffect(()=>{a(bwt(c))},[a,c]),y.useEffect(()=>{a(wwt(d))},[a,d]);const h=(g,v)=>()=>{g!==null?(v=null,g===i.variationId&&(g=null)):(g=null,v===i.newVariationBaseId&&(v=null)),u(g),f(v)};let m;return r===null?m=i.newVariationBaseId===o:m=r===i.variationId,C(ss,{disableGutters:!0,children:C(Bf,{onClick:h(r,o),children:X(He,{container:!0,children:[C(He,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:C(UTe,{max:4,spacing:"small",children:e.map(g=>g.mainImage?C(tc,{src:g.mainImage.url},g.id):C(tc,{children:C(rd,{})},g.id))})}),X(He,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(g=>C("p",{style:{margin:0},children:g.getTranslation().name},g.id)),!s&&e.length>5?C(Mv,{onMouseEnter:()=>l(!0)}):null]}),C(He,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:C(Vf,{edge:"start",checked:m,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),C(He,{size:12,children:C(as,{sx:{pt:1}})})]})})})},Owt=({onContinue:e,onBack:t})=>{const[n]=Ge(),r=ole(),[o,i]=y.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=Ewt(a.filter(l=>l.variationId!==null),l=>l.variationId),X(Mt,{children:[X(He,{container:!0,children:[C(He,{size:{xs:12,sm:6},children:C(dt,{children:n("exercises.whatVariationsExist")})}),C(He,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:C(Cn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:C(fo,{position:"start",children:C(BB,{})})}})})]}),r.isLoading?C(_o,{}):C(co,{elevation:2,sx:{mt:2},children:X(dl,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>C(G7,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>C(G7,{exercises:s.get(l)},"variation-"+l))]})}),X(Wu,{severity:"info",variant:"filled",sx:{mt:2},children:[C(IT,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C(er,{sx:{mb:2},children:X("div",{children:[C(gt,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};class Iwt{constructor(t,n,r,o,i){this.username=t,this.email=n,this.emailVerified=r,this.dateJoined=o,this.isTrustworthy=i}}class kwt{fromJson(t){return new Iwt(t.username,t.email,t.email_verified,new Date(t.date_joined),t.is_trustworthy)}toJson(t){return{email:t.email}}}const Mwt="userprofile",Awt=async()=>{const e=Pt(Mwt),t=new kwt;try{const n=await ut.get(e,{headers:kt()});return t.fromJson(n.data)}catch{return null}};function ld(){return So({queryKey:[s_e],queryFn:Awt})}function $wt(e){const{t}=Ge(),[n,r]=J.useState(e.initial.toString()),o=Xk(),i=ld(),a=async s=>{r(s.target.value),await ij(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?X(Fh,{fullWidth:!0,children:[C(jh,{id:"label-category",children:t("category")}),C(zf,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>C(Yt,{value:s.id,children:t(Xi(s.name))},s.id))})]}):null}function Rwt(e){const{t}=Ge(),[n,r]=J.useState(e.initial),o=Qk(),i=ld(),a=async s=>{r(s),await ij(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?C(ec,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>t(Xi(o.data.find(l=>l.id===s).name)),onChange:(s,l)=>a(l),renderInput:s=>C(Cn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var Ci=function(){return Ci=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0)return e.getRangeAt(0).startContainer.parentNode||void 0}function q7(e){return e?e.replace(/ |\u202F|\u00A0/g," "):""}function Dwt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function K7(e){if(e){var t=e.textContent,n=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;e.style.direction=t&&n.test(t[0])?"rtl":"ltr"}}var Nwt=J.memo(J.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=vz(t,["className","disabled","tagName","value"]),c=J.useRef(),u=J.useRef(s),d=J.useRef(l);return J.useEffect(function(){d.current=l;var f=c.current;f&&q7(u.current)!==q7(s)&&(u.current=s,f.innerHTML=s,Dwt(f))}),J.useMemo(function(){function f(m){c.current=m,K7(m),typeof n=="function"?n(m):typeof n=="object"&&n&&(n.current=m)}function h(m){var g,v,w=c.current;if(w){var x=w.innerHTML;x!==u.current&&((v=(g=d.current).onChange)===null||v===void 0||v.call(g,Ci(Ci({},m),{target:{value:x,name:l.name}}))),K7(w),u.current=x}}return J.createElement(i||"div",Ci(Ci({},l),{className:r,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(m){return(d.current.onBlur||h)(m)},onInput:h,onKeyDown:function(m){return(d.current.onKeyDown||h)(m)},onKeyUp:function(m){return(d.current.onKeyUp||h)(m)},ref:f}))},[r,o,i])})),sle=J.createContext(void 0);function Lwt(e){var t=e.children,n=J.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return Ci(Ci(Ci({},s),a),{date:Date.now()})})}return J.createElement(sle.Provider,{value:r},t)}function bz(){var e=J.useContext(sle);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}function Fwt(e){var t=vz(e,[]);return J.createElement("textarea",Ci({},t))}var Y7=[],b0=[];function jwt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=Y7.indexOf(i);a===-1&&(a=Y7.push(i)-1,b0[a]={}),n=b0[a]&&b0[a][r]?b0[a][r]:b0[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;ur.setValue(o.target.value)})}),n.touched&&!!n.error&&C(EI,{error:!0,children:n.error})]})}const Zwt=({image:e,canDelete:t})=>{const[n]=Ge();return X(Ro,{children:[C(jc,{component:"img",image:e.url,sx:{height:120},alt:""}),C(ps,{children:t&&C(gt,{color:"primary",onClick:()=>IDe(e.id),children:n("delete")})})]})},ext=({exerciseId:e})=>{const[t]=Ge(),n=ld(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await Iee({exerciseId:e,image:i,imageData:{url:"",file:i,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return X(Ro,{children:[C(jc,{children:C(er,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C(gse,{sx:{fontSize:80,color:"gray"}})})}),C(ps,{children:X(gt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:r})]})})]})};function Q7(e){const{t}=Ge(),n=t1(),r=async o=>{e.setValue(o),await ij(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?C(ec,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>C(Cn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const txt=({video:e,canDelete:t})=>{const[n]=Ge();return X(Ro,{children:[C(jc,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),C(ps,{children:t&&C(gt,{color:"primary",onClick:()=>ADe(e.id),children:n("delete")})})]})},nxt=({exerciseId:e})=>{const[t]=Ge(),n=ld(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await MDe(e,n.data.username,i)};return X(Ro,{children:[C(jc,{children:C(er,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C(gse,{sx:{fontSize:80,color:"gray"}})})}),C(ps,{children:X(gt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},rxt="check-permission",oxt=async e=>{const t=Pt(rxt,{query:{permission:e}}),n=await ut.get(t,{headers:kt()});return n.status===400?!1:n.data.result};function ry(e){return So({queryKey:[a_e,e],queryFn:()=>oxt(e.valueOf())})}var lh=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(lh||{});const ixt=({exercise:e,language:t})=>{const[n]=Ge(),[r,o]=J.useState(!1),[i,a]=J.useState(e.muscles.map(S=>S.id)),[s,l]=J.useState(e.musclesSecondary.map(S=>S.id)),c=e.getTranslation(t),d=t.id!==c.language?new xee(null,null,"","",t.id):c,f=e.getTranslation(),h=ry(lh.DELETE_IMAGE),m=ry(lh.DELETE_VIDEO),g=ry(lh.EDIT_EXERCISE),v=t1(),w=ld(),x=ml({name:mz(n),alternativeNames:gz(n),description:yz(n)});return X(Mt,{children:[C(pl,{initialValues:{name:d.name,alternativeNames:d.aliases.map(S=>S.alias),description:d.description},enableReinitialize:!0,validationSchema:x,onSubmit:async S=>{const P=d.id?await CDe(d.id,e.id,d.language,S.name,S.description):await T_(e.id,t.id,S.name,S.description,w.data.username),T=d.aliases.map(A=>A.alias),E=S.alternativeNames,O=E.filter(A=>!T.includes(A));let k=T.filter(A=>!E.includes(A));O.forEach(A=>{E_(P.id,A)}),k.forEach(A=>{kDe(d.aliases.find(I=>I.alias===A).id)}),o(!0)},children:C(ms,{children:X(He,{container:!0,children:[r&&X(He,{size:12,children:[C(Wu,{severity:"success",action:C(kn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:C(PS,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),C(ti,{})]}),C(He,{size:6,children:C(dt,{variant:"h5",children:n("English")})}),C(He,{size:6,children:X(dt,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),X(He,{size:12,children:[C(ti,{}),C(dt,{variant:"h6",children:n("name")})]}),X(He,{size:6,children:[f.name,C("ul",{children:f.aliases.map(S=>C("li",{children:S.alias},S.id))})]}),X(He,{size:6,children:[C(er,{mb:2,children:C(hz,{fieldName:"name"})}),C(pz,{fieldName:"alternativeNames"})]}),C(He,{size:12,children:C(ti,{})}),C(He,{size:12,children:C(dt,{variant:"h6",children:n("exercises.description")})}),C(He,{size:{xs:12,md:6},children:C("div",{dangerouslySetInnerHTML:{__html:f.description}})}),C(He,{size:{xs:12,md:6},children:C(wz,{fieldName:"description"})}),X(He,{size:12,children:[C(ti,{}),C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("save")})]})]})})}),C(ti,{}),C(dt,{variant:"h5",children:n("exercises.basics")}),h.isSuccess&&X(Mt,{children:[C(ti,{}),C(dt,{variant:"h6",children:n("images")}),X(He,{container:!0,spacing:2,mt:2,children:[C(He,{size:{md:3},children:C(ext,{exerciseId:e.id})},"add"),e.images.map(S=>C(He,{size:{md:3},children:C(Zwt,{image:S,canDelete:h.data})},S.id))]})]}),m.isSuccess&&X(Mt,{children:[C(ti,{}),C(dt,{variant:"h6",children:n("videos")}),X(He,{container:!0,spacing:2,mt:2,children:[m.data&&C(He,{size:{md:3},children:C(nxt,{exerciseId:e.id})},"add"),e.videos.map(S=>C(He,{size:{md:3},children:C(txt,{video:S,canDelete:m.data})},S.id))]})]}),g.isSuccess&&g.data&&v.isSuccess&&X(Mt,{children:[C(ti,{}),C($wt,{exerciseId:e.id,initial:e.category.id}),C(Rwt,{exerciseId:e.id,initial:e.equipment.map(S=>S.id)}),X(He,{container:!0,mt:1,children:[X(He,{size:{sm:7},children:[C(Q7,{exerciseId:e.id,value:i,setValue:a,blocked:s,isMain:!0}),C(Q7,{exerciseId:e.id,value:s,setValue:l,blocked:i,isMain:!1})]}),C(He,{size:{sm:5},children:X(He,{container:!0,children:[C(He,{display:"flex",justifyContent:"center",size:6,children:C(kh,{primaryMuscles:i.map(S=>v.data.find(P=>P.id===S)),secondaryMuscles:s.map(S=>v.data.find(P=>P.id===S)),isFront:!0})}),C(He,{display:"flex",justifyContent:"center",size:6,children:C(kh,{primaryMuscles:i.map(S=>v.data.find(P=>P.id===S)),secondaryMuscles:s.map(S=>v.data.find(P=>P.id===S)),isFront:!1})})]})})]})]})]})},axt=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return C(er,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:C(rd,{sx:{fontSize:80,color:n}})})},lle=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new Tee(Ny,"en","English")),[r,o]=Ge();return C(Ro,{sx:{width:"100%"},children:X(xEe,{href:Tn(wn.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?C(jc,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):C(jc,{children:C(axt,{})}),X(xa,{children:[C(nc,{title:n.name,placement:"top",arrow:!0,children:C(dt,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),C(wh,{label:r(Xi(e.category.name)),sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>C(dt,{display:"inline",mr:1,children:r(Xi(i.name))},i.id)),e.equipment.length===0&&C(dt,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},sxt=({mainImage:e,sideImages:t})=>X(He,{container:!0,spacing:1,children:[e&&C(He,{size:12,children:C(Ro,{children:C(jc,{component:"img",image:e.url,alt:""})})}),t.map(n=>C(He,{size:6,children:C(Ro,{children:C(jc,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),lxt=({videos:e})=>C(He,{container:!0,spacing:1,children:e.map(t=>C(He,{size:6,children:C(Ro,{children:C(jc,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function xz(){var r,o;const e=ld(),t=ry(lh.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const cxt=({setEditMode:e})=>{const[t]=Ge();return X(er,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(dt,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),C(dt,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),C(gt,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},uxt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=Ge(),i=xz(),a=e.getTranslation(n),s=n&&n.id!==a.language;return X(He,{container:!0,children:[s&&i.canContribute&&C(He,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:C(cxt,{setEditMode:r})}),X(He,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&X(Mt,{children:[X("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),C(ti,{})]}),C(dt,{variant:"h5",children:o("exercises.description")}),C("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),C(ti,{}),(a==null?void 0:a.notes.length)>0&&C(dt,{variant:"h5",children:o("exercises.notes")}),C("ul",{children:a==null?void 0:a.notes.map(c=>C("li",{children:c.note},c.id))}),C(ti,{}),C(dt,{variant:"h5",children:o("exercises.muscles")}),X(He,{container:!0,children:[C(He,{order:{xs:1},size:{xs:6,md:3},children:C(kh,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),X(He,{order:{xs:2,md:3},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.primaryMuscles")}),C("ul",{children:e.muscles.map(c=>C("li",{children:c.getName(o)},c.id))})]}),C(He,{order:{xs:3,md:2},size:{xs:6,md:3},children:C(kh,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),X(He,{order:{xs:4},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.secondaryMuscles")}),C("ul",{children:e.musclesSecondary.map(c=>C("li",{children:c.getName(o)},c.id))})]})]}),C(ti,{})]}),X(He,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[C(sxt,{mainImage:e.mainImage,sideImages:e.sideImages}),C(ti,{}),C(lxt,{videos:e.videos})]}),X(He,{order:{xs:3},size:12,children:[C(as,{}),C(ti,{}),t.length>0&&C(dt,{variant:"h5",children:o("exercises.variations")}),C(He,{container:!0,spacing:2,children:t.map(c=>C(He,{size:{xs:6,md:2},children:C(lle,{exercise:c,language:n},c.id)},c.id))})]}),C(He,{order:{xs:4},size:12,children:X(dt,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};var rO={exports:{}};/** + */rle();var ile=Date.now(),ER="fnValues"+ile,OR="fnStyle"+ ++ile,s0t=function(){return{onCreateRule:function(n,r,o){if(typeof r!="function")return null;var i=vz(n,{},o);return i[OR]=r,i},onProcessStyle:function(n,r){if(ER in r||OR in r)return n;var o={};for(var i in n){var a=n[i];typeof a=="function"&&(delete n[i],o[i]=a)}return r[ER]=o,n},onUpdate:function(n,r,o,i){var a=r,s=a[OR];s&&(a.style=s(n)||{});var l=a[ER];if(l)for(var c in l)a.prop(c,l[c](n),i)}}},Cf="@global",GN="@global ",l0t=function(){function e(n,r,o){this.type="global",this.at=Cf,this.isProcessed=!1,this.key=n,this.options=o,this.rules=new iM(Lr({},o,{parent:this}));for(var i in r)this.rules.add(i,r[i]);this.rules.process()}var t=e.prototype;return t.getRule=function(r){return this.rules.get(r)},t.addRule=function(r,o,i){var a=this.rules.add(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.replaceRule=function(r,o,i){var a=this.rules.replace(r,o,i);return a&&this.options.jss.plugins.onProcessRule(a),a},t.indexOf=function(r){return this.rules.indexOf(r)},t.toString=function(r){return this.rules.toString(r)},e}(),c0t=function(){function e(n,r,o){this.type="global",this.at=Cf,this.isProcessed=!1,this.key=n,this.options=o;var i=n.substr(GN.length);this.rule=o.jss.createRule(i,r,Lr({},o,{parent:this}))}var t=e.prototype;return t.toString=function(r){return this.rule?this.rule.toString(r):""},e}(),u0t=/\s*,\s*/g;function ale(e,t){for(var n=e.split(u0t),r="",o=0;oe.length)&&(t=e.length);for(var n=0,r=Array(t);n-1){var i=dle[t];if(!Array.isArray(i))return an.js+_f(i)in n?an.css+i:!1;if(!o)return!1;for(var a=0;ar?1:-1:n.length-r.length};return{onProcessStyle:function(n,r){if(r.type!=="style")return n;for(var o={},i=Object.keys(n).sort(e),a=0;a"u"?null:owt(),iwt()]}}function ple(e={}){const{baseClasses:t,newClasses:n,Component:r}=e;if(!n)return t;const o={...t};return Object.keys(n).forEach(i=>{n[i]&&(o[i]=`${t[i]} ${n[i]}`)}),o}const Vg={set:(e,t,n,r)=>{let o=e.get(t);o||(o=new Map,e.set(t,o)),o.set(n,r)},get:(e,t,n)=>{const r=e.get(t);return r?r.get(n):void 0},delete:(e,t,n)=>{e.get(t).delete(n)}};function swt(){const e=dI();return(e==null?void 0:e.$$material)??e}const lwt=rle(awt()),cwt=bbt(),uwt=new Map,dwt={disableGeneration:!1,generateClassName:cwt,jss:lwt,sheetsCache:null,sheetsManager:uwt,sheetsRegistry:null},fwt=y.createContext(dwt);let Z7=-1e9;function pwt(){return Z7+=1,Z7}function eq(e){return e.length===0}function hwt(e){const{variant:t,...n}=e;let r=t||"";return Object.keys(n).sort().forEach(o=>{o==="color"?r+=eq(r)?e[o]:Ce(e[o]):r+=`${eq(r)?o:Ce(o)}${Ce(e[o].toString())}`}),r}const mwt={};function gwt(e){const t=typeof e=="function";return{create:(n,r)=>{let o;try{o=t?e(n):e}catch(l){throw l}if(!r||!n.components||!n.components[r]||!n.components[r].styleOverrides&&!n.components[r].variants)return o;const i=n.components[r].styleOverrides||{},a=n.components[r].variants||[],s={...o};return Object.keys(i).forEach(l=>{s[l]=bo(s[l]||{},i[l])}),a.forEach(l=>{const c=hwt(l.props);s[c]=bo(s[c]||{},l.style)}),s},options:{}}}function ywt({state:e,stylesOptions:t},n,r){if(t.disableGeneration)return n||{};e.cacheClasses||(e.cacheClasses={value:null,lastProp:null,lastJSS:{}});let o=!1;return e.classes!==e.cacheClasses.lastJSS&&(e.cacheClasses.lastJSS=e.classes,o=!0),n!==e.cacheClasses.lastProp&&(e.cacheClasses.lastProp=n,o=!0),o&&(e.cacheClasses.value=ple({baseClasses:e.cacheClasses.lastJSS,newClasses:n,Component:r})),e.cacheClasses.value}function vwt({state:e,theme:t,stylesOptions:n,stylesCreator:r,name:o},i){if(n.disableGeneration)return;let a=Vg.get(n.sheetsManager,r,t);a||(a={refs:0,staticSheet:null,dynamicStyles:null},Vg.set(n.sheetsManager,r,t,a));const s={...r.options,...n,theme:t,flip:typeof n.flip=="boolean"?n.flip:t.direction==="rtl"};s.generateId=s.serverGenerateClassName||s.generateClassName;const l=n.sheetsRegistry;if(a.refs===0){let c;n.sheetsCache&&(c=Vg.get(n.sheetsCache,r,t));const u=r.create(t,o);c||(c=n.jss.createStyleSheet(u,{link:!1,...s}),c.attach(),n.sheetsCache&&Vg.set(n.sheetsCache,r,t,c)),l&&l.add(c),a.staticSheet=c,a.dynamicStyles=ole(u)}if(a.dynamicStyles){const c=n.jss.createStyleSheet(a.dynamicStyles,{link:!0,...s});c.update(i),c.attach(),e.dynamicSheet=c,e.classes=ple({baseClasses:a.staticSheet.classes,newClasses:c.classes}),l&&l.add(c)}else e.classes=a.staticSheet.classes;a.refs+=1}function bwt({state:e},t){e.dynamicSheet&&e.dynamicSheet.update(t)}function wwt({state:e,theme:t,stylesOptions:n,stylesCreator:r}){if(n.disableGeneration)return;const o=Vg.get(n.sheetsManager,r,t);o.refs-=1;const i=n.sheetsRegistry;o.refs===0&&(Vg.delete(n.sheetsManager,r,t),n.jss.removeStyleSheet(o.staticSheet),i&&i.remove(o.staticSheet)),e.dynamicSheet&&(n.jss.removeStyleSheet(e.dynamicSheet),i&&i.remove(e.dynamicSheet))}function xwt(e,t){const n=y.useRef([]);let r;const o=y.useMemo(()=>({}),t);n.current!==o&&(n.current=o,r=e()),y.useEffect(()=>()=>{r&&r()},[o])}function hle(e,t={}){const{name:n,classNamePrefix:r,Component:o,defaultTheme:i=mwt,...a}=t,s=gwt(e),l=n||r||"makeStyles";return s.options={index:pwt(),name:n,meta:l,classNamePrefix:l},(u={})=>{const d=swt()||i,f={...y.useContext(fwt),...a},p=y.useRef(),m=y.useRef();return xwt(()=>{const v={name:n,state:{},stylesCreator:s,stylesOptions:f,theme:d};return vwt(v,u),m.current=!1,p.current=v,()=>{wwt(v)}},[d,s]),y.useEffect(()=>{m.current&&bwt(p.current,u),m.current=!0}),ywt(p.current,u.classes,o)}}const Swt=hle(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),Cwt=({weights:e})=>{const[t]=Ue(),n=Swt(),o=e.slice(0,5);return C("div",{className:n.table,children:C(Ju,{children:Q(Xu,{size:"small",children:[C(Yh,{children:Q(Qt,{children:[C(ke,{align:"center",children:t("date")}),C(ke,{align:"center",children:t("weight")})]})}),C(Qu,{children:o.map(i=>Q(Qt,{children:[C(ke,{align:"center",children:i.date.toLocaleDateString()}),C(ke,{align:"center",children:i.weight})]},i.date.toLocaleDateString()))})]})})})},Pwt=({active:e,payload:t,label:n})=>{const[r,o]=Ue();return e&&t&&t.length?Q(uo,{style:{padding:8},children:[C("p",{children:C("strong",{children:new Date(n).toLocaleDateString(o.language)})}),Q("p",{children:[r("weight"),": ",t[0].value]})]}):null},mle=({weights:e,height:t})=>{t=t||300;const r=Ei(),[o,i]=Ue(),[a,s]=Y.useState(!1),[l,c]=Y.useState(),u=()=>s(!1),d=[...e].sort((p,m)=>p.date.getTime()-m.date.getTime()).map(p=>({date:p.date.getTime(),weight:p.weight,entry:p}));function f(p,m){c(m.payload.entry),s(!0)}return Q("div",{children:[l&&C(ta,{title:o("edit"),isOpen:a,closeFn:u,children:C(Sb,{weightEntry:l})}),C(Xf,{height:t,children:Q(Noe,{data:d,children:[C(cb,{type:"monotone",dataKey:"weight",stroke:r.palette.secondary.main,strokeWidth:2,dot:d.length>30?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6,onClick:f}}),C(Zh,{stroke:"#ccc",strokeDasharray:"5 5"}),C(ml,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:p=>new Date(p).toLocaleDateString(i.language)}),C(gl,{domain:["auto","auto"]}),C(Ua,{content:C(Pwt,{})})]})})]})},gle=()=>{var n,r;const[e]=Ue(),t=oM("lastYear");return C(Mt,{children:t.isLoading?C(Po,{}):C(Mt,{children:((n=t.data)==null?void 0:n.length)!==void 0&&((r=t.data)==null?void 0:r.length)>0?C(Twt,{entries:t.data}):C(ej,{title:e("weight"),modalContent:C(Sb,{})})})})},Twt=e=>{const[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),[i,a]=Ue();return Q(Mt,{children:[Q(Do,{children:[C(od,{title:i("weight"),subheader:"."}),Q(xa,{sx:{height:"500px",overflow:"auto"},children:[C(mle,{weights:e.entries,height:200}),C(Rn,{sx:{mt:2},children:C(Cwt,{weights:e.entries})})]}),Q(hs,{sx:{justifyContent:"space-between",alignItems:"flex-start"},children:[C(gt,{size:"small",href:Tn(Sn.WEIGHT_OVERVIEW,a.language),children:i("seeDetails")}),C(ac,{title:i("addEntry"),children:C(kn,{onClick:r,children:C(Ji,{})})})]})]}),C(ta,{title:i("add"),isOpen:t,closeFn:o,children:C(Sb,{closeFn:o})})]})},Ewt=()=>{const[e,t]=Ue();return C(QB,{callback:r=>{r!==null&&(window.location.href=Tn(Sn.INGREDIENT_DETAIL,t.language,{id:r.data.id}))}})},Owt=()=>C("div",{children:"About Page"});function Sz(e){const[t]=Ue(),[n,r,o]=vl(e.fieldName);return C(oc,{multiple:!0,freeSolo:!0,id:e.fieldName,value:n.value,options:n.value,onChange:(i,a)=>{o.setValue(a)},renderTags:(i,a)=>i.map((s,l)=>C(kh,{label:s,...a({index:l})})),onBlur:n.onBlur,renderInput:i=>C(yn,{...i,id:"exerciseAliases",variant:"standard",label:t("exercises.alternativeNames"),error:r.touched&&!!r.error,helperText:r.touched&&r.error,value:n.value})})}function Iwt(e){const[t]=Ue(),[n,r,o]=vl(e.fieldName);return C(oc,{multiple:!0,id:e.fieldName,options:e.options.map(i=>i.id),getOptionLabel:i=>t(Xi(e.options.find(a=>a.id===i).name)),...n,onChange:(i,a)=>{o.setValue(a)},renderInput:i=>C(yn,{variant:"standard",label:t("exercises.equipment"),value:n.value,...i})})}function Cz(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return C(yn,{fullWidth:!0,id:e.fieldName,label:t("name"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function kwt(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return Q(qh,{fullWidth:!0,children:[C(Kh,{id:"label-category",children:t("category")}),C(Gf,{labelId:"label-category",id:"category",label:t("category"),error:r.touched&&!!r.error,...n,children:e.options}),r.touched&&!!r.error&&C(FI,{error:!0,children:r.error})]})}const yle=5,vle=40,Pz=e=>Wc().min(yle,e("forms.valueTooShort")).max(vle,e("forms.valueTooLong")).required(e("forms.fieldRequired")),Tz=e=>dz().ensure().compact().of(Wc().min(yle,e("forms.valueTooShort")).max(vle,e("forms.valueTooLong"))),Ez=e=>Wc().min(40,e("forms.valueTooShort")).required(e("forms.fieldRequired")),ble=e=>dz().ensure().compact().of(Wc().min(15,e("forms.valueTooShort"))),Mwt=e=>pa().required(e("forms.fieldRequired"));function wle(){return Co({queryKey:[m_e],queryFn:_De})}function aM(){return Co({queryKey:[b_e],queryFn:kDe})}function d1(){return Co({queryKey:[x_e],queryFn:CDe})}function sM(){return Co({queryKey:[w_e],queryFn:EDe})}function lM(){return Co({queryKey:[v_e],queryFn:HDe})}const Fh=({primaryMuscles:e,secondaryMuscles:t,isFront:n})=>{const r=[];r.push(...e.filter(i=>i.isFront===n).map(i=>`/muscles/main/muscle-${i.id}.svg`)),r.push(...t.filter(i=>i.isFront===n).map(i=>`/muscles/secondary/muscle-${i.id}.svg`)),r.push(n?"/muscles/muscular_system_front.svg":"/muscles/muscular_system_back.svg");const o=r.map(i=>`url(${i_e}${i})`).join(", ");return C("div",{style:{height:"400px",width:"200px",backgroundImage:o,backgroundRepeat:"no-repeat"}})};var xle=(e=>(e[e.SET_NOTIFICATION=0]="SET_NOTIFICATION",e))(xle||{}),$n=(e=>(e[e.RESET=0]="RESET",e[e.SET_NAME_EN=1]="SET_NAME_EN",e[e.SET_ALIASES_EN=2]="SET_ALIASES_EN",e[e.SET_DESCRIPTION_EN=3]="SET_DESCRIPTION_EN",e[e.SET_NOTES_EN=4]="SET_NOTES_EN",e[e.SET_CATEGORY=5]="SET_CATEGORY",e[e.SET_EQUIPMENT=6]="SET_EQUIPMENT",e[e.SET_PRIMARY_MUSCLES=7]="SET_PRIMARY_MUSCLES",e[e.SET_MUSCLES_SECONDARY=8]="SET_MUSCLES_SECONDARY",e[e.SET_VARIATION_ID=9]="SET_VARIATION_ID",e[e.SET_NEW_VARIATION_BASE_ID=10]="SET_NEW_VARIATION_BASE_ID",e[e.SET_LANGUAGE=11]="SET_LANGUAGE",e[e.SET_NAME_I18N=12]="SET_NAME_I18N",e[e.SET_ALIASES_I18N=13]="SET_ALIASES_I18N",e[e.SET_DESCRIPTION_I18N=14]="SET_DESCRIPTION_I18N",e[e.SET_NOTES_I18N=15]="SET_NOTES_I18N",e[e.SET_IMAGES=16]="SET_IMAGES",e))($n||{});const tq=e=>({type:xle.SET_NOTIFICATION,payload:e}),nq={notification:{notify:!1,message:"",severity:void 0,title:"",type:void 0}},Awt=y.createContext([nq,()=>nq]),$wt=()=>y.useContext(Awt),Rwt=e=>({type:$n.SET_NAME_EN,payload:e}),_wt=e=>({type:$n.SET_DESCRIPTION_EN,payload:e}),Dwt=e=>({type:$n.SET_NOTES_EN,payload:e}),Nwt=e=>({type:$n.SET_ALIASES_EN,payload:e}),Lwt=e=>({type:$n.SET_NAME_I18N,payload:e}),Fwt=e=>({type:$n.SET_DESCRIPTION_I18N,payload:e}),jwt=e=>({type:$n.SET_NOTES_I18N,payload:e}),Bwt=e=>({type:$n.SET_ALIASES_I18N,payload:e}),zwt=e=>({type:$n.SET_CATEGORY,payload:e}),Vwt=e=>({type:$n.SET_EQUIPMENT,payload:e}),Hwt=e=>({type:$n.SET_PRIMARY_MUSCLES,payload:e}),Uwt=e=>({type:$n.SET_MUSCLES_SECONDARY,payload:e}),Wwt=e=>({type:$n.SET_VARIATION_ID,payload:e}),Gwt=e=>({type:$n.SET_NEW_VARIATION_BASE_ID,payload:e}),qwt=e=>({type:$n.SET_LANGUAGE,payload:e}),Kwt=e=>({type:$n.SET_IMAGES,payload:e}),Ywt=(e,t)=>{if(t===void 0)return e;switch(t.type){case $n.RESET:return hO;case $n.SET_NAME_EN:return{...e,nameEn:t.payload};case $n.SET_DESCRIPTION_EN:return{...e,descriptionEn:t.payload};case $n.SET_NOTES_EN:return{...e,notesEn:t.payload};case $n.SET_ALIASES_EN:return{...e,alternativeNamesEn:t.payload};case $n.SET_CATEGORY:return{...e,category:t.payload};case $n.SET_EQUIPMENT:return{...e,equipment:t.payload};case $n.SET_PRIMARY_MUSCLES:return{...e,muscles:t.payload};case $n.SET_MUSCLES_SECONDARY:return{...e,musclesSecondary:t.payload};case $n.SET_VARIATION_ID:return{...e,variationId:t.payload};case $n.SET_NEW_VARIATION_BASE_ID:return{...e,newVariationBaseId:t.payload};case $n.SET_LANGUAGE:return{...e,languageId:t.payload};case $n.SET_NAME_I18N:return{...e,nameI18n:t.payload};case $n.SET_DESCRIPTION_I18N:return{...e,descriptionI18n:t.payload};case $n.SET_NOTES_I18N:return{...e,notesI18n:t.payload};case $n.SET_ALIASES_I18N:return{...e,alternativeNamesI18n:t.payload};case $n.SET_IMAGES:return{...e,images:t.payload};default:return e}},hO={category:null,muscles:[],musclesSecondary:[],variationId:null,newVariationBaseId:null,languageId:null,equipment:[],nameEn:"",descriptionEn:"",alternativeNamesEn:[],notesEn:[],nameI18n:"",alternativeNamesI18n:[],descriptionI18n:"",notesI18n:[],images:[]},Sle=y.createContext([hO,()=>hO]),Xwt=({children:e})=>{const[t,n]=y.useReducer(Ywt,hO);return C(Sle.Provider,{value:[t,n],children:e})},Pb=()=>y.useContext(Sle),Qwt=({onContinue:e})=>{const[t]=Ue(),[n,r]=Pb(),[o,i]=y.useState(n.muscles),[a,s]=y.useState(n.musclesSecondary);y.useEffect(()=>{r(Hwt(o))},[r,o]),y.useEffect(()=>{r(Uwt(a))},[r,a]);const l=aM(),c=d1(),u=sM(),d=bl({nameEn:Pz(t),newAlternativeNameEn:Tz(t),category:Mwt(t)});return C(yl,{initialValues:{nameEn:n.nameEn,newAlternativeNameEn:n.alternativeNamesEn,category:n.category!==null?n.category:"",muscles:n.muscles,equipment:n.equipment,musclesSecondary:n.musclesSecondary},validationSchema:d,onSubmit:f=>{r(Rwt(f.nameEn)),r(zwt(f.category)),r(Nwt(f.newAlternativeNameEn)),r(Vwt(f.equipment)),e()},children:f=>Q(gs,{children:[Q(Gt,{spacing:2,children:[C(Cz,{fieldName:"nameEn"}),C(Sz,{fieldName:"newAlternativeNameEn"}),l.isLoading?Q(Rn,{children:[" ",C(Za,{})," "]}):C(kwt,{fieldName:"category",options:l.data.map(p=>C(Yt,{value:p.id,children:t(Xi(p.name))},p.id))}),u.isLoading?Q(Rn,{children:[" ",C(Za,{})," "]}):C(Iwt,{fieldName:"equipment",options:u.data}),c.isLoading?Q(Rn,{children:[" ",C(Za,{})," "]}):Q(Mt,{children:[C(oc,{multiple:!0,id:"muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>a.includes(p),getOptionLabel:p=>c.data.find(m=>m.id===p).getName(t),value:o,onChange:(p,m)=>{i(m)},renderInput:p=>C(yn,{...p,variant:"standard",label:t("exercises.muscles"),value:f.getFieldProps("muscles").value,onChange:m=>{f.setFieldValue(f.getFieldProps("muscles").name,m.target.value)}})}),C(oc,{multiple:!0,id:"secondary-muscles",options:c.data.map(p=>p.id),getOptionDisabled:p=>o.includes(p),getOptionLabel:p=>c.data.find(m=>m.id===p).getName(t),value:a,onChange:(p,m)=>{s(m)},renderInput:p=>C(yn,{...p,variant:"standard",label:t("exercises.secondaryMuscles"),value:f.getFieldProps("muscles").value})})]}),Q(Be,{container:!0,children:[C(Be,{display:"flex",justifyContent:"center",size:6,children:C(Fh,{primaryMuscles:o.map(p=>c.data.find(m=>m.id===p)),secondaryMuscles:a.map(p=>c.data.find(m=>m.id===p)),isFront:!0})}),C(Be,{display:"flex",justifyContent:"center",size:6,children:C(Fh,{primaryMuscles:o.map(p=>c.data.find(m=>m.id===p)),secondaryMuscles:a.map(p=>c.data.find(m=>m.id===p)),isFront:!1})})]})]}),C(Be,{container:!0,children:C(Be,{display:"flex",justifyContent:"end",size:12,children:C(Rn,{sx:{mb:2},children:C("div",{children:C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:t("continue")})})})})})]})})};function Jwt(e,t){const n=new Map;return e.forEach(r=>{const o=t(r),i=n.get(o);i?i.push(r):n.set(o,[r])}),n}const rq=({exercises:e})=>{const r=e[0].variationId,o=e[0].id,[i,a]=Pb(),[s,l]=y.useState(!1),[c,u]=y.useState(i.variationId),[d,f]=y.useState(i.newVariationBaseId);y.useEffect(()=>{a(Wwt(c))},[a,c]),y.useEffect(()=>{a(Gwt(d))},[a,d]);const p=(g,v)=>()=>{g!==null?(v=null,g===i.variationId&&(g=null)):(g=null,v===i.newVariationBaseId&&(v=null)),u(g),f(v)};let m;return r===null?m=i.newVariationBaseId===o:m=r===i.variationId,C(ls,{disableGutters:!0,children:C(Wf,{onClick:p(r,o),children:Q(Be,{container:!0,children:[C(Be,{display:"flex",justifyContent:"start",alignItems:"center",size:{xs:12,sm:3},children:C(aEe,{max:4,spacing:"small",children:e.map(g=>g.mainImage?C(ic,{src:g.mainImage.url},g.id):C(ic,{children:C(id,{})},g.id))})}),Q(Be,{size:{xs:10,sm:7},children:[e.slice(0,s?e.length:5).map(g=>C("p",{style:{margin:0},children:g.getTranslation().name},g.id)),!s&&e.length>5?C(zv,{onMouseEnter:()=>l(!0)}):null]}),C(Be,{display:"flex",justifyContent:"end",size:{xs:2,sm:2},children:C(qf,{edge:"start",checked:m,tabIndex:-1,disableRipple:!0},`variation-${r}`)}),C(Be,{size:12,children:C(ss,{sx:{pt:1}})})]})})})},Zwt=({onContinue:e,onBack:t})=>{const[n]=Ue(),r=wle(),[o,i]=y.useState("");let a=[],s=new Map;return r.isSuccess&&(a=r.data,o!==""&&(a=a.filter(l=>l.getTranslation().name.toLowerCase().includes(o.toLowerCase())))),s=Jwt(a.filter(l=>l.variationId!==null),l=>l.variationId),Q(Mt,{children:[Q(Be,{container:!0,children:[C(Be,{size:{xs:12,sm:6},children:C(ct,{children:n("exercises.whatVariationsExist")})}),C(Be,{display:"flex",justifyContent:"end",size:{xs:12,sm:6},children:C(yn,{label:n("exercises.filterVariations"),variant:"standard",onChange:l=>i(l.target.value),InputProps:{startAdornment:C(po,{position:"start",children:C(XB,{})})}})})]}),r.isLoading?C(Po,{}):C(uo,{elevation:2,sx:{mt:2},children:Q(pl,{style:{maxHeight:"400px",overflowY:"scroll"},children:[a.filter(l=>l.variationId===null).map(l=>C(rq,{exercises:[l]},"base-"+l.id)),[...s.keys()].map(l=>C(rq,{exercises:s.get(l)},"variation-"+l))]})}),Q(qu,{severity:"info",variant:"filled",sx:{mt:2},children:[C(BT,{children:n("exercises.identicalExercise")}),n("exercises.identicalExercisePleaseDiscard")]}),C(Be,{container:!0,children:C(Be,{display:"flex",justifyContent:"end",size:12,children:C(Rn,{sx:{mb:2},children:Q("div",{children:[C(gt,{disabled:!1,onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",onClick:e,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})};class ext{constructor(t,n,r,o,i,a,s){this.username=t,this.email=n,this.emailVerified=r,this.dateJoined=o,this.isTrustworthy=i,this.useMetric=a,this.height=s}}class txt{constructor(){nn(this,"fromJson",t=>new ext(t.username,t.email,t.email_verified,new Date(t.date_joined),t.is_trustworthy,t.weight_unit==="kg",t.height));nn(this,"toJson",t=>({email:t.email,height:t.height,weight_unit:t.useMetric?"kg":"lb"}))}}const nxt="userprofile",rxt=async()=>{const e=Pt(nxt),t=new txt;try{const n=await dt.get(e,{headers:kt()});return t.fromJson(n.data)}catch{return null}};function Jc(){return Co({queryKey:[C_e],queryFn:rxt})}function oxt(e){const{t}=Ue(),[n,r]=Y.useState(e.initial.toString()),o=aM(),i=Jc(),a=async s=>{r(s.target.value),await gj(e.exerciseId,{category:parseInt(s.target.value),license_author:i.data.username})};return o.isSuccess?Q(qh,{fullWidth:!0,children:[C(Kh,{id:"label-category",children:t("category")}),C(Gf,{labelId:"label-category",id:"category",label:t("category"),value:n,onChange:a,children:o.data.map(s=>C(Yt,{value:s.id,children:t(Xi(s.name))},s.id))})]}):null}function ixt(e){const{t}=Ue(),[n,r]=Y.useState(e.initial),o=sM(),i=Jc(),a=async s=>{r(s),await gj(e.exerciseId,{equipment:s,license_author:i.data.username})};return o.isSuccess?C(oc,{multiple:!0,value:n,options:o.data.map(s=>s.id),getOptionLabel:s=>t(Xi(o.data.find(l=>l.id===s).name)),onChange:(s,l)=>a(l),renderInput:s=>C(yn,{variant:"standard",label:t("exercises.equipment"),value:n,...s})}):null}var Ci=function(){return Ci=Object.assign||function(t){for(var n,r=1,o=arguments.length;r0)return e.getRangeAt(0).startContainer.parentNode||void 0}function oq(e){return e?e.replace(/ |\u202F|\u00A0/g," "):""}function sxt(e){var t=document.createTextNode("");e.appendChild(t);var n=document.activeElement===e;if(t!==null&&t.nodeValue!==null&&n){var r=window.getSelection();if(r!==null){var o=document.createRange();o.setStart(t,t.nodeValue.length),o.collapse(!0),r.removeAllRanges(),r.addRange(o)}e instanceof HTMLElement&&e.focus()}}function iq(e){if(e){var t=e.textContent,n=/[\u0591-\u07FF\uFB1D-\uFDFD\uFE70-\uFEFC]/;e.style.direction=t&&n.test(t[0])?"rtl":"ltr"}}var lxt=Y.memo(Y.forwardRef(function(t,n){var r=t.className,o=t.disabled,i=t.tagName,a=t.value,s=a===void 0?"":a,l=Oz(t,["className","disabled","tagName","value"]),c=Y.useRef(),u=Y.useRef(s),d=Y.useRef(l);return Y.useEffect(function(){d.current=l;var f=c.current;f&&oq(u.current)!==oq(s)&&(u.current=s,f.innerHTML=s,sxt(f))}),Y.useMemo(function(){function f(m){c.current=m,iq(m),typeof n=="function"?n(m):typeof n=="object"&&n&&(n.current=m)}function p(m){var g,v,w=c.current;if(w){var x=w.innerHTML;x!==u.current&&((v=(g=d.current).onChange)===null||v===void 0||v.call(g,Ci(Ci({},m),{target:{value:x,name:l.name}}))),iq(w),u.current=x}}return Y.createElement(i||"div",Ci(Ci({},l),{className:r,contentEditable:!o,dangerouslySetInnerHTML:{__html:s},onBlur:function(m){return(d.current.onBlur||p)(m)},onInput:p,onKeyDown:function(m){return(d.current.onKeyDown||p)(m)},onKeyUp:function(m){return(d.current.onKeyUp||p)(m)},ref:f}))},[r,o,i])})),Cle=Y.createContext(void 0);function cxt(e){var t=e.children,n=Y.useState({htmlMode:!1,update:i}),r=n[0],o=n[1];function i(a){o(function(s){return Ci(Ci(Ci({},s),a),{date:Date.now()})})}return Y.createElement(Cle.Provider,{value:r},t)}function Iz(){var e=Y.useContext(Cle);if(!e)throw new Error("You should wrap your component by EditorProvider");return e}function uxt(e){var t=Oz(e,[]);return Y.createElement("textarea",Ci({},t))}var aq=[],I0=[];function dxt(e,t){if(e&&typeof document<"u"){var n,r=t.prepend===!0?"prepend":"append",o=t.singleTag===!0,i=typeof t.container=="string"?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var a=aq.indexOf(i);a===-1&&(a=aq.push(i)-1,I0[a]={}),n=I0[a]&&I0[a][r]?I0[a][r]:I0[a][r]=s()}else n=s();e.charCodeAt(0)===65279&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),t.attributes)for(var c=Object.keys(t.attributes),u=0;ur.setValue(o.target.value)})}),n.touched&&!!n.error&&C(FI,{error:!0,children:n.error})]})}const Txt=({image:e,canDelete:t})=>{const[n]=Ue();return Q(Do,{children:[C(Vc,{component:"img",image:e.url,sx:{height:120},alt:""}),C(hs,{children:t&&C(gt,{color:"primary",onClick:()=>UDe(e.id),children:n("delete")})})]})},Ext=({exerciseId:e})=>{const[t]=Ue(),n=Jc(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await jee({exerciseId:e,image:i,imageData:{url:"",file:i,author:"",authorUrl:"",title:"",objectUrl:"",derivativeSourceUrl:"",style:""}})};return Q(Do,{children:[C(Vc,{children:C(Rn,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C($se,{sx:{fontSize:80,color:"gray"}})})}),C(hs,{children:Q(gt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:r})]})})]})};function lq(e){const{t}=Ue(),n=d1(),r=async o=>{e.setValue(o),await gj(e.exerciseId,e.isMain?{muscles:o}:{muscles_secondary:o})};return n.isSuccess?C(oc,{multiple:!0,options:n.data.map(o=>o.id),getOptionDisabled:o=>e.blocked.includes(o),getOptionLabel:o=>n.data.find(i=>i.id===o).getName(t),value:e.value,onChange:(o,i)=>r(i),renderInput:o=>C(yn,{...o,variant:"standard",label:t(e.isMain?"exercises.muscles":"exercises.secondaryMuscles"),value:e.value})}):null}const Oxt=({video:e,canDelete:t})=>{const[n]=Ue();return Q(Do,{children:[C(Vc,{component:"video",src:e.url,sx:{height:120},controls:!0,preload:"metadata"}),C(hs,{children:t&&C(gt,{color:"primary",onClick:()=>qDe(e.id),children:n("delete")})})]})},Ixt=({exerciseId:e})=>{const[t]=Ue(),n=Jc(),r=async o=>{var a;if(!((a=o.target.files)!=null&&a.length))return;const[i]=o.target.files;n.isSuccess&&await GDe(e,n.data.username,i)};return Q(Do,{children:[C(Vc,{children:C(Rn,{sx:{backgroundColor:"lightgray",height:120},display:"flex",alignItems:"center",justifyContent:"center",children:C($se,{sx:{fontSize:80,color:"gray"}})})}),C(hs,{children:Q(gt,{component:"label",children:[t("add"),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"video/*",capture:"environment",onChange:r})]})})]})},kxt="check-permission",Mxt=async e=>{const t=Pt(kxt,{query:{permission:e}}),n=await dt.get(t,{headers:kt()});return n.status===400?!1:n.data.result};function fy(e){return Co({queryKey:[S_e,e],queryFn:()=>Mxt(e.valueOf())})}var yh=(e=>(e.EDIT_EXERCISE="exercises.change_exercise",e.DELETE_EXERCISE="exercises.delete_exercise",e.EDIT_IMAGE="exercises.change_exerciseimage",e.DELETE_IMAGE="exercises.delete_exerciseimage",e.EDIT_VIDEO="exercises.change_exercisevideo",e.DELETE_VIDEO="exercises.delete_exercisevideo",e))(yh||{});const Axt=({exercise:e,language:t})=>{const[n]=Ue(),[r,o]=Y.useState(!1),[i,a]=Y.useState(e.muscles.map(S=>S.id)),[s,l]=Y.useState(e.musclesSecondary.map(S=>S.id)),c=e.getTranslation(t),d=t.id!==c.language?new $ee(null,null,"","",t.id):c,f=e.getTranslation(),p=fy(yh.DELETE_IMAGE),m=fy(yh.DELETE_VIDEO),g=fy(yh.EDIT_EXERCISE),v=d1(),w=Jc(),x=bl({name:Pz(n),alternativeNames:Tz(n),description:Ez(n)});return Q(Mt,{children:[C(yl,{initialValues:{name:d.name,alternativeNames:d.aliases.map(S=>S.alias),description:d.description},enableReinitialize:!0,validationSchema:x,onSubmit:async S=>{const P=d.id?await jDe(d.id,e.id,d.language,S.name,S.description):await D_(e.id,t.id,S.name,S.description,w.data.username),T=d.aliases.map(A=>A.alias),E=S.alternativeNames,O=E.filter(A=>!T.includes(A));let k=T.filter(A=>!E.includes(A));O.forEach(A=>{N_(P.id,A)}),k.forEach(A=>{WDe(d.aliases.find(I=>I.alias===A).id)}),o(!0)},children:C(gs,{children:Q(Be,{container:!0,children:[r&&Q(Be,{size:12,children:[C(qu,{severity:"success",action:C(kn,{"aria-label":"close",size:"small",color:"inherit",onClick:()=>{o(!1)},children:C($S,{fontSize:"inherit"})}),children:n("exercises.successfullyUpdated")}),C(ni,{})]}),C(Be,{size:6,children:C(ct,{variant:"h5",children:n("English")})}),C(Be,{size:6,children:Q(ct,{variant:"h5",children:[t.nameLong," (",t.nameShort,")"]})}),Q(Be,{size:12,children:[C(ni,{}),C(ct,{variant:"h6",children:n("name")})]}),Q(Be,{size:6,children:[f.name,C("ul",{children:f.aliases.map(S=>C("li",{children:S.alias},S.id))})]}),Q(Be,{size:6,children:[C(Rn,{mb:2,children:C(Cz,{fieldName:"name"})}),C(Sz,{fieldName:"alternativeNames"})]}),C(Be,{size:12,children:C(ni,{})}),C(Be,{size:12,children:C(ct,{variant:"h6",children:n("exercises.description")})}),C(Be,{size:{xs:12,md:6},children:C("div",{dangerouslySetInnerHTML:{__html:f.description}})}),C(Be,{size:{xs:12,md:6},children:C(kz,{fieldName:"description"})}),Q(Be,{size:12,children:[C(ni,{}),C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("save")})]})]})})}),C(ni,{}),C(ct,{variant:"h5",children:n("exercises.basics")}),p.isSuccess&&Q(Mt,{children:[C(ni,{}),C(ct,{variant:"h6",children:n("images")}),Q(Be,{container:!0,spacing:2,mt:2,children:[C(Be,{size:{md:3},children:C(Ext,{exerciseId:e.id})},"add"),e.images.map(S=>C(Be,{size:{md:3},children:C(Txt,{image:S,canDelete:p.data})},S.id))]})]}),m.isSuccess&&Q(Mt,{children:[C(ni,{}),C(ct,{variant:"h6",children:n("videos")}),Q(Be,{container:!0,spacing:2,mt:2,children:[m.data&&C(Be,{size:{md:3},children:C(Ixt,{exerciseId:e.id})},"add"),e.videos.map(S=>C(Be,{size:{md:3},children:C(Oxt,{video:S,canDelete:m.data})},S.id))]})]}),g.isSuccess&&g.data&&v.isSuccess&&Q(Mt,{children:[C(ni,{}),C(oxt,{exerciseId:e.id,initial:e.category.id}),C(ixt,{exerciseId:e.id,initial:e.equipment.map(S=>S.id)}),Q(Be,{container:!0,mt:1,children:[Q(Be,{size:{sm:7},children:[C(lq,{exerciseId:e.id,value:i,setValue:a,blocked:s,isMain:!0}),C(lq,{exerciseId:e.id,value:s,setValue:l,blocked:i,isMain:!1})]}),C(Be,{size:{sm:5},children:Q(Be,{container:!0,children:[C(Be,{display:"flex",justifyContent:"center",size:6,children:C(Fh,{primaryMuscles:i.map(S=>v.data.find(P=>P.id===S)),secondaryMuscles:s.map(S=>v.data.find(P=>P.id===S)),isFront:!0})}),C(Be,{display:"flex",justifyContent:"center",size:6,children:C(Fh,{primaryMuscles:i.map(S=>v.data.find(P=>P.id===S)),secondaryMuscles:s.map(S=>v.data.find(P=>P.id===S)),isFront:!1})})]})})]})]})]})},$xt=e=>{const t=e.backgroundColor||"lightgray",n=e.iconColor||"gray",r=e.height||200;return C(Rn,{sx:{backgroundColor:t,height:r},display:"flex",alignItems:"center",justifyContent:"center",children:C(id,{sx:{fontSize:80,color:n}})})},Ple=({exercise:e,language:t})=>{const n=t?e.getTranslation(t):e.getTranslation(new Nee(Wy,"en","English")),[r,o]=Ue();return C(Do,{sx:{width:"100%"},children:Q(LEe,{href:Tn(Sn.EXERCISE_DETAIL,o.language,{id:e.id,slug:n.nameSlug}),sx:{minHeight:330},children:[e.mainImage?C(Vc,{component:"img",image:e.mainImage.url,sx:{height:200},alt:""}):C(Vc,{children:C($xt,{})}),Q(xa,{children:[C(ac,{title:n.name,placement:"top",arrow:!0,children:C(ct,{gutterBottom:!0,variant:"h6",component:"div",noWrap:!0,children:n.name})}),C(kh,{label:r(Xi(e.category.name)),sx:{position:"absolute",top:8,left:8},color:"primary",size:"small"},e.category.id),e.equipment.map(i=>C(ct,{display:"inline",mr:1,children:r(Xi(i.name))},i.id)),e.equipment.length===0&&C(ct,{color:"text.secondary",display:"inline",mr:1,children:r("exercises.noEquipment")})]})]})},e.id)},Rxt=({mainImage:e,sideImages:t})=>Q(Be,{container:!0,spacing:1,children:[e&&C(Be,{size:12,children:C(Do,{children:C(Vc,{component:"img",image:e.url,alt:""})})}),t.map(n=>C(Be,{size:6,children:C(Do,{children:C(Vc,{component:"img",image:n.url,sx:{height:120},alt:""})})},n.id))]}),_xt=({videos:e})=>C(Be,{container:!0,spacing:1,children:e.map(t=>C(Be,{size:6,children:C(Do,{children:C(Vc,{component:"video",src:t.url,sx:{height:120},controls:!0,muted:!0,preload:"metadata"})})},t.id))});function Mz(){var r,o;const e=Jc(),t=fy(yh.EDIT_EXERCISE),n={canContribute:!1,anonymous:!0,emailVerified:!1,admin:!1};if(e.isSuccess&&t.isSuccess){if(e.data===null)return n;n.anonymous=!1,(r=e.data)!=null&&r.emailVerified&&(n.emailVerified=!0),t.data&&(n.admin=!0),(n.admin||(o=e.data)!=null&&o.isTrustworthy)&&(n.canContribute=!0)}return n}const Dxt=({setEditMode:e})=>{const[t]=Ue();return Q(Rn,{mb:2,paddingY:2,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(ct,{variant:"h5",children:t("exercises.exerciseNotTranslated")}),C(ct,{gutterBottom:!0,variant:"body1",component:"div",children:t("exercises.exerciseNotTranslatedBody")}),C(gt,{variant:"contained",onClick:()=>e(!0),children:t("exercises.translateExerciseNow")})]})},Nxt=({exercise:e,variations:t,language:n,setEditMode:r})=>{var l;const[o]=Ue(),i=Mz(),a=e.getTranslation(n),s=n&&n.id!==a.language;return Q(Be,{container:!0,children:[s&&i.canContribute&&C(Be,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:12},children:C(Dxt,{setEditMode:r})}),Q(Be,{order:{xs:2,sm:1},size:{xs:12,sm:7,md:8},children:[(a==null?void 0:a.aliases.length)>0&&Q(Mt,{children:[Q("p",{children:[o("exercises.alsoKnownAs"),"  ",(l=a==null?void 0:a.aliases)==null?void 0:l.map(c=>c.alias).join(", ")]}),C(ni,{})]}),C(ct,{variant:"h5",children:o("exercises.description")}),C("div",{dangerouslySetInnerHTML:{__html:a==null?void 0:a.description}}),C(ni,{}),(a==null?void 0:a.notes.length)>0&&C(ct,{variant:"h5",children:o("exercises.notes")}),C("ul",{children:a==null?void 0:a.notes.map(c=>C("li",{children:c.note},c.id))}),C(ni,{}),C(ct,{variant:"h5",children:o("exercises.muscles")}),Q(Be,{container:!0,children:[C(Be,{order:{xs:1},size:{xs:6,md:3},children:C(Fh,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!0})}),Q(Be,{order:{xs:2,md:3},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.primaryMuscles")}),C("ul",{children:e.muscles.map(c=>C("li",{children:c.getName(o)},c.id))})]}),C(Be,{order:{xs:3,md:2},size:{xs:6,md:3},children:C(Fh,{primaryMuscles:e.muscles,secondaryMuscles:e.musclesSecondary,isFront:!1})}),Q(Be,{order:{xs:4},size:{xs:6,md:3},children:[C("h3",{children:o("exercises.secondaryMuscles")}),C("ul",{children:e.musclesSecondary.map(c=>C("li",{children:c.getName(o)},c.id))})]})]}),C(ni,{})]}),Q(Be,{order:{xs:1,sm:2},size:{xs:12,sm:5,md:4},children:[C(Rxt,{mainImage:e.mainImage,sideImages:e.sideImages}),C(ni,{}),C(_xt,{videos:e.videos})]}),Q(Be,{order:{xs:3},size:12,children:[C(ss,{}),C(ni,{}),t.length>0&&C(ct,{variant:"h5",children:o("exercises.variations")}),C(Be,{container:!0,spacing:2,children:t.map(c=>C(Be,{size:{xs:6,md:2},children:C(Ple,{exercise:c,language:n},c.id)},c.id))})]}),C(Be,{order:{xs:4},size:12,children:Q(ct,{variant:"caption",display:"block",mt:2,children:["The text on this page is available under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/deed",children:"CC BY-SA 4 License"}),"."]})})]})};var mO={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */rO.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,h=4,m=1,g=2,v=1,w=2,x=4,S=8,P=16,T=32,E=64,O=128,k=256,A=512,I=30,R="...",N=800,L=16,B=1,_=2,D=3,z=1/0,F=9007199254740991,H=17976931348623157e292,U=NaN,q=4294967295,Y=q-1,ae=q>>>1,Z=[["ary",O],["bind",v],["bindKey",w],["curry",S],["curryRight",P],["flip",A],["partial",T],["partialRight",E],["rearg",k]],K="[object Arguments]",te="[object Array]",pe="[object AsyncFunction]",ie="[object Boolean]",le="[object Date]",re="[object DOMException]",de="[object Error]",ee="[object Function]",ce="[object GeneratorFunction]",me="[object Map]",we="[object Number]",ge="[object Null]",Se="[object Object]",xe="[object Promise]",Ie="[object Proxy]",Re="[object RegExp]",_e="[object Set]",ye="[object String]",Te="[object Symbol]",Oe="[object Undefined]",Me="[object WeakMap]",Ue="[object WeakSet]",ze="[object ArrayBuffer]",Qe="[object DataView]",ct="[object Float32Array]",nt="[object Float64Array]",et="[object Int8Array]",yt="[object Int16Array]",vn="[object Int32Array]",Ke="[object Uint8Array]",$e="[object Uint8ClampedArray]",Xe="[object Uint16Array]",bt="[object Uint32Array]",zt=/\b__p \+= '';/g,Ot=/\b(__p \+=) '' \+/g,cn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Fn=/&(?:amp|lt|gt|quot|#39);/g,Un=/[&<>"']/g,Po=RegExp(Fn.source),qr=RegExp(Un.source),Ii=/<%-([\s\S]+?)%>/g,gs=/<%([\s\S]+?)%>/g,Ut=/<%=([\s\S]+?)%>/g,Yo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,lm=/^\w*$/,fd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zc=/[\\^$.*+?()[\]{}|]/g,ep=RegExp(Zc.source),tp=/^\s+/,Cb=/\s/,cm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,u1=/\{\n\/\* \[wrapped with (.+)\] \*/,np=/,? & /,Lo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Kr=/[()=,{}\[\]\/\s]/,vl=/\\(\\)?/g,Ve=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ne=/\w*$/,wt=/^[-+]0x[0-9a-f]+$/i,en=/^0b[01]+$/i,on=/^\[object .+?Constructor\]$/,$r=/^0o[0-7]+$/i,Wn=/^(?:0|[1-9]\d*)$/,Oa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,eu=/($^)/,Kz=/['\n\r\u2028\u2029\\]/g,um="\\ud800-\\udfff",d1="\\u0300-\\u036f",dm="\\ufe20-\\ufe2f",fm="\\u20d0-\\u20ff",pm=d1+dm+fm,rp="\\u2700-\\u27bf",On="a-z\\xdf-\\xf6\\xf8-\\xff",ys="\\xac\\xb1\\xd7\\xf7",sc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",op="\\u2000-\\u206f",mM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Yz="A-Z\\xc0-\\xd6\\xd8-\\xde",Xz="\\ufe0e\\ufe0f",Qz=ys+sc+op+mM,gM="['’]",Jce="["+um+"]",Jz="["+Qz+"]",f1="["+pm+"]",Zz="\\d+",Zce="["+rp+"]",eV="["+On+"]",tV="[^"+um+Qz+Zz+rp+On+Yz+"]",yM="\\ud83c[\\udffb-\\udfff]",eue="(?:"+f1+"|"+yM+")",nV="[^"+um+"]",vM="(?:\\ud83c[\\udde6-\\uddff]){2}",bM="[\\ud800-\\udbff][\\udc00-\\udfff]",hm="["+Yz+"]",rV="\\u200d",oV="(?:"+eV+"|"+tV+")",tue="(?:"+hm+"|"+tV+")",iV="(?:"+gM+"(?:d|ll|m|re|s|t|ve))?",aV="(?:"+gM+"(?:D|LL|M|RE|S|T|VE))?",sV=eue+"?",lV="["+Xz+"]?",nue="(?:"+rV+"(?:"+[nV,vM,bM].join("|")+")"+lV+sV+")*",rue="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",oue="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",cV=lV+sV+nue,iue="(?:"+[Zce,vM,bM].join("|")+")"+cV,aue="(?:"+[nV+f1+"?",f1,vM,bM,Jce].join("|")+")",sue=RegExp(gM,"g"),lue=RegExp(f1,"g"),wM=RegExp(yM+"(?="+yM+")|"+aue+cV,"g"),cue=RegExp([hm+"?"+eV+"+"+iV+"(?="+[Jz,hm,"$"].join("|")+")",tue+"+"+aV+"(?="+[Jz,hm+oV,"$"].join("|")+")",hm+"?"+oV+"+"+iV,hm+"+"+aV,oue,rue,Zz,iue].join("|"),"g"),uue=RegExp("["+rV+um+pm+Xz+"]"),due=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fue=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],pue=-1,Pr={};Pr[ct]=Pr[nt]=Pr[et]=Pr[yt]=Pr[vn]=Pr[Ke]=Pr[$e]=Pr[Xe]=Pr[bt]=!0,Pr[K]=Pr[te]=Pr[ze]=Pr[ie]=Pr[Qe]=Pr[le]=Pr[de]=Pr[ee]=Pr[me]=Pr[we]=Pr[Se]=Pr[Re]=Pr[_e]=Pr[ye]=Pr[Me]=!1;var gr={};gr[K]=gr[te]=gr[ze]=gr[Qe]=gr[ie]=gr[le]=gr[ct]=gr[nt]=gr[et]=gr[yt]=gr[vn]=gr[me]=gr[we]=gr[Se]=gr[Re]=gr[_e]=gr[ye]=gr[Te]=gr[Ke]=gr[$e]=gr[Xe]=gr[bt]=!0,gr[de]=gr[ee]=gr[Me]=!1;var hue={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},mue={"&":"&","<":"<",">":">",'"':""","'":"'"},gue={"&":"&","<":"<",">":">",""":'"',"'":"'"},yue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},vue=parseFloat,bue=parseInt,uV=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,wue=typeof self=="object"&&self&&self.Object===Object&&self,Xo=uV||wue||Function("return this")(),xM=t&&!t.nodeType&&t,ip=xM&&!0&&e&&!e.nodeType&&e,dV=ip&&ip.exports===xM,SM=dV&&uV.process,vs=function(){try{var Pe=ip&&ip.require&&ip.require("util").types;return Pe||SM&&SM.binding&&SM.binding("util")}catch{}}(),fV=vs&&vs.isArrayBuffer,pV=vs&&vs.isDate,hV=vs&&vs.isMap,mV=vs&&vs.isRegExp,gV=vs&&vs.isSet,yV=vs&&vs.isTypedArray;function Ia(Pe,je,Ae){switch(Ae.length){case 0:return Pe.call(je);case 1:return Pe.call(je,Ae[0]);case 2:return Pe.call(je,Ae[0],Ae[1]);case 3:return Pe.call(je,Ae[0],Ae[1],Ae[2])}return Pe.apply(je,Ae)}function xue(Pe,je,Ae,St){for(var Xt=-1,Gn=Pe==null?0:Pe.length;++Xt-1}function CM(Pe,je,Ae){for(var St=-1,Xt=Pe==null?0:Pe.length;++St-1;);return Ae}function TV(Pe,je){for(var Ae=Pe.length;Ae--&&mm(je,Pe[Ae],0)>-1;);return Ae}function Mue(Pe,je){for(var Ae=Pe.length,St=0;Ae--;)Pe[Ae]===je&&++St;return St}var Aue=OM(hue),$ue=OM(mue);function Rue(Pe){return"\\"+yue[Pe]}function _ue(Pe,je){return Pe==null?n:Pe[je]}function gm(Pe){return uue.test(Pe)}function Due(Pe){return due.test(Pe)}function Nue(Pe){for(var je,Ae=[];!(je=Pe.next()).done;)Ae.push(je.value);return Ae}function AM(Pe){var je=-1,Ae=Array(Pe.size);return Pe.forEach(function(St,Xt){Ae[++je]=[Xt,St]}),Ae}function EV(Pe,je){return function(Ae){return Pe(je(Ae))}}function md(Pe,je){for(var Ae=-1,St=Pe.length,Xt=0,Gn=[];++Ae-1}function Cde(p,b){var M=this.__data__,V=M1(M,p);return V<0?(++this.size,M.push([p,b])):M[V][1]=b,this}tu.prototype.clear=bde,tu.prototype.delete=wde,tu.prototype.get=xde,tu.prototype.has=Sde,tu.prototype.set=Cde;function nu(p){var b=-1,M=p==null?0:p.length;for(this.clear();++b=b?p:b)),p}function Ss(p,b,M,V,G,ne){var he,ve=b&d,Ee=b&f,We=b&h;if(M&&(he=G?M(p,V,G,ne):M(p)),he!==n)return he;if(!jr(p))return p;var qe=tn(p);if(qe){if(he=Ofe(p),!ve)return na(p,he)}else{var Je=di(p),ft=Je==ee||Je==ce;if(xd(p))return l5(p,ve);if(Je==Se||Je==K||ft&&!G){if(he=Ee||ft?{}:O5(p),!ve)return Ee?gfe(p,jde(he,p)):mfe(p,FV(he,p))}else{if(!gr[Je])return G?p:{};he=Ife(p,Je,ve)}}ne||(ne=new wl);var $t=ne.get(p);if($t)return $t;ne.set(p,he),nH(p)?p.forEach(function(Bt){he.add(Ss(Bt,b,M,Bt,p,ne))}):eH(p)&&p.forEach(function(Bt,xn){he.set(xn,Ss(Bt,b,M,xn,p,ne))});var jt=We?Ee?rA:nA:Ee?oa:Fo,un=qe?n:jt(p);return bs(un||p,function(Bt,xn){un&&(xn=Bt,Bt=p[xn]),Mb(he,xn,Ss(Bt,b,M,xn,p,ne))}),he}function Bde(p){var b=Fo(p);return function(M){return jV(M,p,b)}}function jV(p,b,M){var V=M.length;if(p==null)return!V;for(p=dr(p);V--;){var G=M[V],ne=b[G],he=p[G];if(he===n&&!(G in p)||!ne(he))return!1}return!0}function BV(p,b,M){if(typeof p!="function")throw new ws(a);return Lb(function(){p.apply(n,M)},b)}function Ab(p,b,M,V){var G=-1,ne=p1,he=!0,ve=p.length,Ee=[],We=b.length;if(!ve)return Ee;M&&(b=Rr(b,ka(M))),V?(ne=CM,he=!1):b.length>=o&&(ne=Pb,he=!1,b=new lp(b));e:for(;++GG?0:G+M),V=V===n||V>G?G:an(V),V<0&&(V+=G),V=M>V?0:oH(V);M0&&M(ve)?b>1?Qo(ve,b-1,M,V,G):hd(G,ve):V||(G[G.length]=ve)}return G}var FM=h5(),HV=h5(!0);function lc(p,b){return p&&FM(p,b,Fo)}function jM(p,b){return p&&HV(p,b,Fo)}function $1(p,b){return pd(b,function(M){return su(p[M])})}function up(p,b){b=bd(b,p);for(var M=0,V=b.length;p!=null&&Mb}function Hde(p,b){return p!=null&&rr.call(p,b)}function Ude(p,b){return p!=null&&b in dr(p)}function Wde(p,b,M){return p>=ui(b,M)&&p=120&&qe.length>=120)?new lp(he&&qe):n}qe=p[0];var Je=-1,ft=ve[0];e:for(;++Je-1;)ve!==p&&C1.call(ve,Ee,1),C1.call(p,Ee,1);return p}function e5(p,b){for(var M=p?b.length:0,V=M-1;M--;){var G=b[M];if(M==V||G!==ne){var ne=G;au(G)?C1.call(p,G,1):YM(p,G)}}return p}function GM(p,b){return p+E1(_V()*(b-p+1))}function ofe(p,b,M,V){for(var G=-1,ne=Eo(T1((b-p)/(M||1)),0),he=Ae(ne);ne--;)he[V?ne:++G]=p,p+=M;return he}function qM(p,b){var M="";if(!p||b<1||b>F)return M;do b%2&&(M+=p),b=E1(b/2),b&&(p+=p);while(b);return M}function mn(p,b){return uA(M5(p,b,ia),p+"")}function ife(p){return LV(Om(p))}function afe(p,b){var M=Om(p);return H1(M,cp(b,0,M.length))}function _b(p,b,M,V){if(!jr(p))return p;b=bd(b,p);for(var G=-1,ne=b.length,he=ne-1,ve=p;ve!=null&&++GG?0:G+b),M=M>G?G:M,M<0&&(M+=G),G=b>M?0:M-b>>>0,b>>>=0;for(var ne=Ae(G);++V>>1,he=p[ne];he!==null&&!Aa(he)&&(M?he<=b:he=o){var We=b?null:wfe(p);if(We)return m1(We);he=!1,G=Pb,Ee=new lp}else Ee=b?[]:ve;e:for(;++V=V?p:Cs(p,b,M)}var s5=Que||function(p){return Xo.clearTimeout(p)};function l5(p,b){if(b)return p.slice();var M=p.length,V=kV?kV(M):new p.constructor(M);return p.copy(V),V}function ZM(p){var b=new p.constructor(p.byteLength);return new x1(b).set(new x1(p)),b}function dfe(p,b){var M=b?ZM(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.byteLength)}function ffe(p){var b=new p.constructor(p.source,Ne.exec(p));return b.lastIndex=p.lastIndex,b}function pfe(p){return kb?dr(kb.call(p)):{}}function c5(p,b){var M=b?ZM(p.buffer):p.buffer;return new p.constructor(M,p.byteOffset,p.length)}function u5(p,b){if(p!==b){var M=p!==n,V=p===null,G=p===p,ne=Aa(p),he=b!==n,ve=b===null,Ee=b===b,We=Aa(b);if(!ve&&!We&&!ne&&p>b||ne&&he&&Ee&&!ve&&!We||V&&he&&Ee||!M&&Ee||!G)return 1;if(!V&&!ne&&!We&&p=ve)return Ee;var We=M[V];return Ee*(We=="desc"?-1:1)}}return p.index-b.index}function d5(p,b,M,V){for(var G=-1,ne=p.length,he=M.length,ve=-1,Ee=b.length,We=Eo(ne-he,0),qe=Ae(Ee+We),Je=!V;++ve1?M[G-1]:n,he=G>2?M[2]:n;for(ne=p.length>3&&typeof ne=="function"?(G--,ne):n,he&&Mi(M[0],M[1],he)&&(ne=G<3?n:ne,G=1),b=dr(b);++V-1?G[ne?b[he]:he]:n}}function y5(p){return iu(function(b){var M=b.length,V=M,G=xs.prototype.thru;for(p&&b.reverse();V--;){var ne=b[V];if(typeof ne!="function")throw new ws(a);if(G&&!he&&z1(ne)=="wrapper")var he=new xs([],!0)}for(V=he?V:M;++V1&&Mn.reverse(),qe&&Eeve))return!1;var We=ne.get(p),qe=ne.get(b);if(We&&qe)return We==b&&qe==p;var Je=-1,ft=!0,$t=M&g?new lp:n;for(ne.set(p,b),ne.set(b,p);++Je1?"& ":"")+b[V],b=b.join(M>2?", ":" "),p.replace(cm,`{ + */mO.exports;(function(e,t){(function(){var n,r="4.17.21",o=200,i="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",c=500,u="__lodash_placeholder__",d=1,f=2,p=4,m=1,g=2,v=1,w=2,x=4,S=8,P=16,T=32,E=64,O=128,k=256,A=512,I=30,R="...",N=800,L=16,j=1,_=2,D=3,z=1/0,F=9007199254740991,H=17976931348623157e292,U=NaN,q=4294967295,X=q-1,ae=q>>>1,Z=[["ary",O],["bind",v],["bindKey",w],["curry",S],["curryRight",P],["flip",A],["partial",T],["partialRight",E],["rearg",k]],K="[object Arguments]",te="[object Array]",pe="[object AsyncFunction]",ie="[object Boolean]",le="[object Date]",re="[object DOMException]",fe="[object Error]",ee="[object Function]",ce="[object GeneratorFunction]",me="[object Map]",we="[object Number]",ge="[object Null]",Se="[object Object]",xe="[object Promise]",Ie="[object Proxy]",Re="[object RegExp]",_e="[object Set]",ye="[object String]",Te="[object Symbol]",Oe="[object Undefined]",Me="[object WeakMap]",We="[object WeakSet]",Ve="[object ArrayBuffer]",Qe="[object DataView]",ut="[object Float32Array]",nt="[object Float64Array]",et="[object Int8Array]",yt="[object Int16Array]",wn="[object Int32Array]",Ke="[object Uint8Array]",$e="[object Uint8ClampedArray]",Xe="[object Uint16Array]",bt="[object Uint32Array]",Vt=/\b__p \+= '';/g,Ot=/\b(__p \+=) '' \+/g,un=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jn=/&(?:amp|lt|gt|quot|#39);/g,Wn=/[&<>"']/g,Eo=RegExp(jn.source),Kr=RegExp(Wn.source),Ii=/<%-([\s\S]+?)%>/g,ys=/<%([\s\S]+?)%>/g,Wt=/<%=([\s\S]+?)%>/g,Xo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ym=/^\w*$/,pd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tu=/[\\^$.*+?()[\]{}|]/g,lp=RegExp(tu.source),cp=/^\s+/,$b=/\s/,vm=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,w1=/\{\n\/\* \[wrapped with (.+)\] \*/,up=/,? & /,Fo=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Yr=/[()=,{}\[\]\/\s]/,Sl=/\\(\\)?/g,He=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ne=/\w*$/,wt=/^[-+]0x[0-9a-f]+$/i,en=/^0b[01]+$/i,sn=/^\[object .+?Constructor\]$/,Rr=/^0o[0-7]+$/i,Gn=/^(?:0|[1-9]\d*)$/,Oa=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,nu=/($^)/,rV=/['\n\r\u2028\u2029\\]/g,bm="\\ud800-\\udfff",x1="\\u0300-\\u036f",wm="\\ufe20-\\ufe2f",xm="\\u20d0-\\u20ff",Sm=x1+wm+xm,dp="\\u2700-\\u27bf",On="a-z\\xdf-\\xf6\\xf8-\\xff",vs="\\xac\\xb1\\xd7\\xf7",uc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",fp="\\u2000-\\u206f",TM=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",oV="A-Z\\xc0-\\xd6\\xd8-\\xde",iV="\\ufe0e\\ufe0f",aV=vs+uc+fp+TM,EM="['’]",hue="["+bm+"]",sV="["+aV+"]",S1="["+Sm+"]",lV="\\d+",mue="["+dp+"]",cV="["+On+"]",uV="[^"+bm+aV+lV+dp+On+oV+"]",OM="\\ud83c[\\udffb-\\udfff]",gue="(?:"+S1+"|"+OM+")",dV="[^"+bm+"]",IM="(?:\\ud83c[\\udde6-\\uddff]){2}",kM="[\\ud800-\\udbff][\\udc00-\\udfff]",Cm="["+oV+"]",fV="\\u200d",pV="(?:"+cV+"|"+uV+")",yue="(?:"+Cm+"|"+uV+")",hV="(?:"+EM+"(?:d|ll|m|re|s|t|ve))?",mV="(?:"+EM+"(?:D|LL|M|RE|S|T|VE))?",gV=gue+"?",yV="["+iV+"]?",vue="(?:"+fV+"(?:"+[dV,IM,kM].join("|")+")"+yV+gV+")*",bue="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wue="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vV=yV+gV+vue,xue="(?:"+[mue,IM,kM].join("|")+")"+vV,Sue="(?:"+[dV+S1+"?",S1,IM,kM,hue].join("|")+")",Cue=RegExp(EM,"g"),Pue=RegExp(S1,"g"),MM=RegExp(OM+"(?="+OM+")|"+Sue+vV,"g"),Tue=RegExp([Cm+"?"+cV+"+"+hV+"(?="+[sV,Cm,"$"].join("|")+")",yue+"+"+mV+"(?="+[sV,Cm+pV,"$"].join("|")+")",Cm+"?"+pV+"+"+hV,Cm+"+"+mV,wue,bue,lV,xue].join("|"),"g"),Eue=RegExp("["+fV+bm+Sm+iV+"]"),Oue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Iue=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],kue=-1,Pr={};Pr[ut]=Pr[nt]=Pr[et]=Pr[yt]=Pr[wn]=Pr[Ke]=Pr[$e]=Pr[Xe]=Pr[bt]=!0,Pr[K]=Pr[te]=Pr[Ve]=Pr[ie]=Pr[Qe]=Pr[le]=Pr[fe]=Pr[ee]=Pr[me]=Pr[we]=Pr[Se]=Pr[Re]=Pr[_e]=Pr[ye]=Pr[Me]=!1;var gr={};gr[K]=gr[te]=gr[Ve]=gr[Qe]=gr[ie]=gr[le]=gr[ut]=gr[nt]=gr[et]=gr[yt]=gr[wn]=gr[me]=gr[we]=gr[Se]=gr[Re]=gr[_e]=gr[ye]=gr[Te]=gr[Ke]=gr[$e]=gr[Xe]=gr[bt]=!0,gr[fe]=gr[ee]=gr[Me]=!1;var Mue={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Aue={"&":"&","<":"<",">":">",'"':""","'":"'"},$ue={"&":"&","<":"<",">":">",""":'"',"'":"'"},Rue={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_ue=parseFloat,Due=parseInt,bV=typeof Bi=="object"&&Bi&&Bi.Object===Object&&Bi,Nue=typeof self=="object"&&self&&self.Object===Object&&self,Qo=bV||Nue||Function("return this")(),AM=t&&!t.nodeType&&t,pp=AM&&!0&&e&&!e.nodeType&&e,wV=pp&&pp.exports===AM,$M=wV&&bV.process,bs=function(){try{var Pe=pp&&pp.require&&pp.require("util").types;return Pe||$M&&$M.binding&&$M.binding("util")}catch{}}(),xV=bs&&bs.isArrayBuffer,SV=bs&&bs.isDate,CV=bs&&bs.isMap,PV=bs&&bs.isRegExp,TV=bs&&bs.isSet,EV=bs&&bs.isTypedArray;function Ia(Pe,je,Ae){switch(Ae.length){case 0:return Pe.call(je);case 1:return Pe.call(je,Ae[0]);case 2:return Pe.call(je,Ae[0],Ae[1]);case 3:return Pe.call(je,Ae[0],Ae[1],Ae[2])}return Pe.apply(je,Ae)}function Lue(Pe,je,Ae,St){for(var Xt=-1,qn=Pe==null?0:Pe.length;++Xt-1}function RM(Pe,je,Ae){for(var St=-1,Xt=Pe==null?0:Pe.length;++St-1;);return Ae}function _V(Pe,je){for(var Ae=Pe.length;Ae--&&Pm(je,Pe[Ae],0)>-1;);return Ae}function Gue(Pe,je){for(var Ae=Pe.length,St=0;Ae--;)Pe[Ae]===je&&++St;return St}var que=LM(Mue),Kue=LM(Aue);function Yue(Pe){return"\\"+Rue[Pe]}function Xue(Pe,je){return Pe==null?n:Pe[je]}function Tm(Pe){return Eue.test(Pe)}function Que(Pe){return Oue.test(Pe)}function Jue(Pe){for(var je,Ae=[];!(je=Pe.next()).done;)Ae.push(je.value);return Ae}function zM(Pe){var je=-1,Ae=Array(Pe.size);return Pe.forEach(function(St,Xt){Ae[++je]=[Xt,St]}),Ae}function DV(Pe,je){return function(Ae){return Pe(je(Ae))}}function gd(Pe,je){for(var Ae=-1,St=Pe.length,Xt=0,qn=[];++Ae-1}function jde(h,b){var M=this.__data__,V=B1(M,h);return V<0?(++this.size,M.push([h,b])):M[V][1]=b,this}ru.prototype.clear=Dde,ru.prototype.delete=Nde,ru.prototype.get=Lde,ru.prototype.has=Fde,ru.prototype.set=jde;function ou(h){var b=-1,M=h==null?0:h.length;for(this.clear();++b=b?h:b)),h}function Cs(h,b,M,V,G,ne){var he,ve=b&d,Ee=b&f,Ge=b&p;if(M&&(he=G?M(h,V,G,ne):M(h)),he!==n)return he;if(!Br(h))return h;var qe=tn(h);if(qe){if(he=Hfe(h),!ve)return na(h,he)}else{var Je=di(h),ft=Je==ee||Je==ce;if(Sd(h))return y5(h,ve);if(Je==Se||Je==K||ft&&!G){if(he=Ee||ft?{}:N5(h),!ve)return Ee?$fe(h,tfe(he,h)):Afe(h,qV(he,h))}else{if(!gr[Je])return G?h:{};he=Ufe(h,Je,ve)}}ne||(ne=new Pl);var Rt=ne.get(h);if(Rt)return Rt;ne.set(h,he),dH(h)?h.forEach(function(zt){he.add(Cs(zt,b,M,zt,h,ne))}):cH(h)&&h.forEach(function(zt,Cn){he.set(Cn,Cs(zt,b,M,Cn,h,ne))});var Bt=Ge?Ee?pA:fA:Ee?oa:jo,dn=qe?n:Bt(h);return ws(dn||h,function(zt,Cn){dn&&(Cn=zt,zt=h[Cn]),jb(he,Cn,Cs(zt,b,M,Cn,h,ne))}),he}function nfe(h){var b=jo(h);return function(M){return KV(M,h,b)}}function KV(h,b,M){var V=M.length;if(h==null)return!V;for(h=dr(h);V--;){var G=M[V],ne=b[G],he=h[G];if(he===n&&!(G in h)||!ne(he))return!1}return!0}function YV(h,b,M){if(typeof h!="function")throw new xs(a);return Gb(function(){h.apply(n,M)},b)}function Bb(h,b,M,V){var G=-1,ne=C1,he=!0,ve=h.length,Ee=[],Ge=b.length;if(!ve)return Ee;M&&(b=_r(b,ka(M))),V?(ne=RM,he=!1):b.length>=o&&(ne=Rb,he=!1,b=new gp(b));e:for(;++GG?0:G+M),V=V===n||V>G?G:ln(V),V<0&&(V+=G),V=M>V?0:pH(V);M0&&M(ve)?b>1?Jo(ve,b-1,M,V,G):md(G,ve):V||(G[G.length]=ve)}return G}var KM=C5(),JV=C5(!0);function dc(h,b){return h&&KM(h,b,jo)}function YM(h,b){return h&&JV(h,b,jo)}function V1(h,b){return hd(b,function(M){return cu(h[M])})}function vp(h,b){b=wd(b,h);for(var M=0,V=b.length;h!=null&&Mb}function ife(h,b){return h!=null&&rr.call(h,b)}function afe(h,b){return h!=null&&b in dr(h)}function sfe(h,b,M){return h>=ui(b,M)&&h=120&&qe.length>=120)?new gp(he&&qe):n}qe=h[0];var Je=-1,ft=ve[0];e:for(;++Je-1;)ve!==h&&R1.call(ve,Ee,1),R1.call(h,Ee,1);return h}function c5(h,b){for(var M=h?b.length:0,V=M-1;M--;){var G=b[M];if(M==V||G!==ne){var ne=G;lu(G)?R1.call(h,G,1):iA(h,G)}}return h}function nA(h,b){return h+N1(HV()*(b-h+1))}function wfe(h,b,M,V){for(var G=-1,ne=Io(D1((b-h)/(M||1)),0),he=Ae(ne);ne--;)he[V?ne:++G]=h,h+=M;return he}function rA(h,b){var M="";if(!h||b<1||b>F)return M;do b%2&&(M+=h),b=N1(b/2),b&&(h+=h);while(b);return M}function gn(h,b){return wA(j5(h,b,ia),h+"")}function xfe(h){return GV(Nm(h))}function Sfe(h,b){var M=Nm(h);return Z1(M,yp(b,0,M.length))}function Hb(h,b,M,V){if(!Br(h))return h;b=wd(b,h);for(var G=-1,ne=b.length,he=ne-1,ve=h;ve!=null&&++GG?0:G+b),M=M>G?G:M,M<0&&(M+=G),G=b>M?0:M-b>>>0,b>>>=0;for(var ne=Ae(G);++V>>1,he=h[ne];he!==null&&!Aa(he)&&(M?he<=b:he=o){var Ge=b?null:Nfe(h);if(Ge)return T1(Ge);he=!1,G=Rb,Ee=new gp}else Ee=b?[]:ve;e:for(;++V=V?h:Ps(h,b,M)}var g5=pde||function(h){return Qo.clearTimeout(h)};function y5(h,b){if(b)return h.slice();var M=h.length,V=FV?FV(M):new h.constructor(M);return h.copy(V),V}function cA(h){var b=new h.constructor(h.byteLength);return new A1(b).set(new A1(h)),b}function Ofe(h,b){var M=b?cA(h.buffer):h.buffer;return new h.constructor(M,h.byteOffset,h.byteLength)}function Ife(h){var b=new h.constructor(h.source,Ne.exec(h));return b.lastIndex=h.lastIndex,b}function kfe(h){return Fb?dr(Fb.call(h)):{}}function v5(h,b){var M=b?cA(h.buffer):h.buffer;return new h.constructor(M,h.byteOffset,h.length)}function b5(h,b){if(h!==b){var M=h!==n,V=h===null,G=h===h,ne=Aa(h),he=b!==n,ve=b===null,Ee=b===b,Ge=Aa(b);if(!ve&&!Ge&&!ne&&h>b||ne&&he&&Ee&&!ve&&!Ge||V&&he&&Ee||!M&&Ee||!G)return 1;if(!V&&!ne&&!Ge&&h=ve)return Ee;var Ge=M[V];return Ee*(Ge=="desc"?-1:1)}}return h.index-b.index}function w5(h,b,M,V){for(var G=-1,ne=h.length,he=M.length,ve=-1,Ee=b.length,Ge=Io(ne-he,0),qe=Ae(Ee+Ge),Je=!V;++ve1?M[G-1]:n,he=G>2?M[2]:n;for(ne=h.length>3&&typeof ne=="function"?(G--,ne):n,he&&Mi(M[0],M[1],he)&&(ne=G<3?n:ne,G=1),b=dr(b);++V-1?G[ne?b[he]:he]:n}}function E5(h){return su(function(b){var M=b.length,V=M,G=Ss.prototype.thru;for(h&&b.reverse();V--;){var ne=b[V];if(typeof ne!="function")throw new xs(a);if(G&&!he&&Q1(ne)=="wrapper")var he=new Ss([],!0)}for(V=he?V:M;++V1&&Mn.reverse(),qe&&Eeve))return!1;var Ge=ne.get(h),qe=ne.get(b);if(Ge&&qe)return Ge==b&&qe==h;var Je=-1,ft=!0,Rt=M&g?new gp:n;for(ne.set(h,b),ne.set(b,h);++Je1?"& ":"")+b[V],b=b.join(M>2?", ":" "),h.replace(vm,`{ /* [wrapped with `+b+`] */ -`)}function Mfe(p){return tn(p)||pp(p)||!!($V&&p&&p[$V])}function au(p,b){var M=typeof p;return b=b??F,!!b&&(M=="number"||M!="symbol"&&Wn.test(p))&&p>-1&&p%1==0&&p0){if(++b>=N)return arguments[0]}else b=0;return p.apply(n,arguments)}}function H1(p,b){var M=-1,V=p.length,G=V-1;for(b=b===n?V:b;++M1?p[b-1]:n;return M=typeof M=="function"?(p.pop(),M):n,V5(p,M)});function H5(p){var b=Q(p);return b.__chain__=!0,b}function zpe(p,b){return b(p),p}function U1(p,b){return b(p)}var Vpe=iu(function(p){var b=p.length,M=b?p[0]:0,V=this.__wrapped__,G=function(ne){return LM(ne,p)};return b>1||this.__actions__.length||!(V instanceof In)||!au(M)?this.thru(G):(V=V.slice(M,+M+(b?1:0)),V.__actions__.push({func:U1,args:[G],thisArg:n}),new xs(V,this.__chain__).thru(function(ne){return b&&!ne.length&&ne.push(n),ne}))});function Hpe(){return H5(this)}function Upe(){return new xs(this.value(),this.__chain__)}function Wpe(){this.__values__===n&&(this.__values__=rH(this.value()));var p=this.__index__>=this.__values__.length,b=p?n:this.__values__[this.__index__++];return{done:p,value:b}}function Gpe(){return this}function qpe(p){for(var b,M=this;M instanceof k1;){var V=N5(M);V.__index__=0,V.__values__=n,b?G.__wrapped__=V:b=V;var G=V;M=M.__wrapped__}return G.__wrapped__=p,b}function Kpe(){var p=this.__wrapped__;if(p instanceof In){var b=p;return this.__actions__.length&&(b=new In(this)),b=b.reverse(),b.__actions__.push({func:U1,args:[dA],thisArg:n}),new xs(b,this.__chain__)}return this.thru(dA)}function Ype(){return i5(this.__wrapped__,this.__actions__)}var Xpe=N1(function(p,b,M){rr.call(p,M)?++p[M]:ru(p,M,1)});function Qpe(p,b,M){var V=tn(p)?vV:zde;return M&&Mi(p,b,M)&&(b=n),V(p,Lt(b,3))}function Jpe(p,b){var M=tn(p)?pd:VV;return M(p,Lt(b,3))}var Zpe=g5(L5),ehe=g5(F5);function the(p,b){return Qo(W1(p,b),1)}function nhe(p,b){return Qo(W1(p,b),z)}function rhe(p,b,M){return M=M===n?1:an(M),Qo(W1(p,b),M)}function U5(p,b){var M=tn(p)?bs:yd;return M(p,Lt(b,3))}function W5(p,b){var M=tn(p)?Sue:zV;return M(p,Lt(b,3))}var ohe=N1(function(p,b,M){rr.call(p,M)?p[M].push(b):ru(p,M,[b])});function ihe(p,b,M,V){p=ra(p)?p:Om(p),M=M&&!V?an(M):0;var G=p.length;return M<0&&(M=Eo(G+M,0)),X1(p)?M<=G&&p.indexOf(b,M)>-1:!!G&&mm(p,b,M)>-1}var ahe=mn(function(p,b,M){var V=-1,G=typeof b=="function",ne=ra(p)?Ae(p.length):[];return yd(p,function(he){ne[++V]=G?Ia(b,he,M):$b(he,b,M)}),ne}),she=N1(function(p,b,M){ru(p,M,b)});function W1(p,b){var M=tn(p)?Rr:KV;return M(p,Lt(b,3))}function lhe(p,b,M,V){return p==null?[]:(tn(b)||(b=b==null?[]:[b]),M=V?n:M,tn(M)||(M=M==null?[]:[M]),JV(p,b,M))}var che=N1(function(p,b,M){p[M?0:1].push(b)},function(){return[[],[]]});function uhe(p,b,M){var V=tn(p)?PM:SV,G=arguments.length<3;return V(p,Lt(b,4),M,G,yd)}function dhe(p,b,M){var V=tn(p)?Cue:SV,G=arguments.length<3;return V(p,Lt(b,4),M,G,zV)}function fhe(p,b){var M=tn(p)?pd:VV;return M(p,K1(Lt(b,3)))}function phe(p){var b=tn(p)?LV:ife;return b(p)}function hhe(p,b,M){(M?Mi(p,b,M):b===n)?b=1:b=an(b);var V=tn(p)?Nde:afe;return V(p,b)}function mhe(p){var b=tn(p)?Lde:lfe;return b(p)}function ghe(p){if(p==null)return 0;if(ra(p))return X1(p)?ym(p):p.length;var b=di(p);return b==me||b==_e?p.size:HM(p).length}function yhe(p,b,M){var V=tn(p)?TM:cfe;return M&&Mi(p,b,M)&&(b=n),V(p,Lt(b,3))}var vhe=mn(function(p,b){if(p==null)return[];var M=b.length;return M>1&&Mi(p,b[0],b[1])?b=[]:M>2&&Mi(b[0],b[1],b[2])&&(b=[b[0]]),JV(p,Qo(b,1),[])}),G1=Jue||function(){return Xo.Date.now()};function bhe(p,b){if(typeof b!="function")throw new ws(a);return p=an(p),function(){if(--p<1)return b.apply(this,arguments)}}function G5(p,b,M){return b=M?n:b,b=p&&b==null?p.length:b,ou(p,O,n,n,n,n,b)}function q5(p,b){var M;if(typeof b!="function")throw new ws(a);return p=an(p),function(){return--p>0&&(M=b.apply(this,arguments)),p<=1&&(b=n),M}}var pA=mn(function(p,b,M){var V=v;if(M.length){var G=md(M,Tm(pA));V|=T}return ou(p,V,b,M,G)}),K5=mn(function(p,b,M){var V=v|w;if(M.length){var G=md(M,Tm(K5));V|=T}return ou(b,V,p,M,G)});function Y5(p,b,M){b=M?n:b;var V=ou(p,S,n,n,n,n,n,b);return V.placeholder=Y5.placeholder,V}function X5(p,b,M){b=M?n:b;var V=ou(p,P,n,n,n,n,n,b);return V.placeholder=X5.placeholder,V}function Q5(p,b,M){var V,G,ne,he,ve,Ee,We=0,qe=!1,Je=!1,ft=!0;if(typeof p!="function")throw new ws(a);b=Ts(b)||0,jr(M)&&(qe=!!M.leading,Je="maxWait"in M,ne=Je?Eo(Ts(M.maxWait)||0,b):ne,ft="trailing"in M?!!M.trailing:ft);function $t(oo){var Sl=V,cu=G;return V=G=n,We=oo,he=p.apply(cu,Sl),he}function jt(oo){return We=oo,ve=Lb(xn,b),qe?$t(oo):he}function un(oo){var Sl=oo-Ee,cu=oo-We,gH=b-Sl;return Je?ui(gH,ne-cu):gH}function Bt(oo){var Sl=oo-Ee,cu=oo-We;return Ee===n||Sl>=b||Sl<0||Je&&cu>=ne}function xn(){var oo=G1();if(Bt(oo))return Mn(oo);ve=Lb(xn,un(oo))}function Mn(oo){return ve=n,ft&&V?$t(oo):(V=G=n,he)}function $a(){ve!==n&&s5(ve),We=0,V=Ee=G=ve=n}function Ai(){return ve===n?he:Mn(G1())}function Ra(){var oo=G1(),Sl=Bt(oo);if(V=arguments,G=this,Ee=oo,Sl){if(ve===n)return jt(Ee);if(Je)return s5(ve),ve=Lb(xn,b),$t(Ee)}return ve===n&&(ve=Lb(xn,b)),he}return Ra.cancel=$a,Ra.flush=Ai,Ra}var whe=mn(function(p,b){return BV(p,1,b)}),xhe=mn(function(p,b,M){return BV(p,Ts(b)||0,M)});function She(p){return ou(p,A)}function q1(p,b){if(typeof p!="function"||b!=null&&typeof b!="function")throw new ws(a);var M=function(){var V=arguments,G=b?b.apply(this,V):V[0],ne=M.cache;if(ne.has(G))return ne.get(G);var he=p.apply(this,V);return M.cache=ne.set(G,he)||ne,he};return M.cache=new(q1.Cache||nu),M}q1.Cache=nu;function K1(p){if(typeof p!="function")throw new ws(a);return function(){var b=arguments;switch(b.length){case 0:return!p.call(this);case 1:return!p.call(this,b[0]);case 2:return!p.call(this,b[0],b[1]);case 3:return!p.call(this,b[0],b[1],b[2])}return!p.apply(this,b)}}function Che(p){return q5(2,p)}var Phe=ufe(function(p,b){b=b.length==1&&tn(b[0])?Rr(b[0],ka(Lt())):Rr(Qo(b,1),ka(Lt()));var M=b.length;return mn(function(V){for(var G=-1,ne=ui(V.length,M);++G=b}),pp=WV(function(){return arguments}())?WV:function(p){return Yr(p)&&rr.call(p,"callee")&&!AV.call(p,"callee")},tn=Ae.isArray,jhe=fV?ka(fV):qde;function ra(p){return p!=null&&Y1(p.length)&&!su(p)}function ro(p){return Yr(p)&&ra(p)}function Bhe(p){return p===!0||p===!1||Yr(p)&&ki(p)==ie}var xd=ede||TA,zhe=pV?ka(pV):Kde;function Vhe(p){return Yr(p)&&p.nodeType===1&&!Fb(p)}function Hhe(p){if(p==null)return!0;if(ra(p)&&(tn(p)||typeof p=="string"||typeof p.splice=="function"||xd(p)||Em(p)||pp(p)))return!p.length;var b=di(p);if(b==me||b==_e)return!p.size;if(Nb(p))return!HM(p).length;for(var M in p)if(rr.call(p,M))return!1;return!0}function Uhe(p,b){return Rb(p,b)}function Whe(p,b,M){M=typeof M=="function"?M:n;var V=M?M(p,b):n;return V===n?Rb(p,b,n,M):!!V}function mA(p){if(!Yr(p))return!1;var b=ki(p);return b==de||b==re||typeof p.message=="string"&&typeof p.name=="string"&&!Fb(p)}function Ghe(p){return typeof p=="number"&&RV(p)}function su(p){if(!jr(p))return!1;var b=ki(p);return b==ee||b==ce||b==pe||b==Ie}function Z5(p){return typeof p=="number"&&p==an(p)}function Y1(p){return typeof p=="number"&&p>-1&&p%1==0&&p<=F}function jr(p){var b=typeof p;return p!=null&&(b=="object"||b=="function")}function Yr(p){return p!=null&&typeof p=="object"}var eH=hV?ka(hV):Xde;function qhe(p,b){return p===b||VM(p,b,iA(b))}function Khe(p,b,M){return M=typeof M=="function"?M:n,VM(p,b,iA(b),M)}function Yhe(p){return tH(p)&&p!=+p}function Xhe(p){if(Rfe(p))throw new Xt(i);return GV(p)}function Qhe(p){return p===null}function Jhe(p){return p==null}function tH(p){return typeof p=="number"||Yr(p)&&ki(p)==we}function Fb(p){if(!Yr(p)||ki(p)!=Se)return!1;var b=S1(p);if(b===null)return!0;var M=rr.call(b,"constructor")&&b.constructor;return typeof M=="function"&&M instanceof M&&v1.call(M)==Kue}var gA=mV?ka(mV):Qde;function Zhe(p){return Z5(p)&&p>=-F&&p<=F}var nH=gV?ka(gV):Jde;function X1(p){return typeof p=="string"||!tn(p)&&Yr(p)&&ki(p)==ye}function Aa(p){return typeof p=="symbol"||Yr(p)&&ki(p)==Te}var Em=yV?ka(yV):Zde;function eme(p){return p===n}function tme(p){return Yr(p)&&di(p)==Me}function nme(p){return Yr(p)&&ki(p)==Ue}var rme=B1(UM),ome=B1(function(p,b){return p<=b});function rH(p){if(!p)return[];if(ra(p))return X1(p)?bl(p):na(p);if(Tb&&p[Tb])return Nue(p[Tb]());var b=di(p),M=b==me?AM:b==_e?m1:Om;return M(p)}function lu(p){if(!p)return p===0?p:0;if(p=Ts(p),p===z||p===-z){var b=p<0?-1:1;return b*H}return p===p?p:0}function an(p){var b=lu(p),M=b%1;return b===b?M?b-M:b:0}function oH(p){return p?cp(an(p),0,q):0}function Ts(p){if(typeof p=="number")return p;if(Aa(p))return U;if(jr(p)){var b=typeof p.valueOf=="function"?p.valueOf():p;p=jr(b)?b+"":b}if(typeof p!="string")return p===0?p:+p;p=CV(p);var M=en.test(p);return M||$r.test(p)?bue(p.slice(2),M?2:8):wt.test(p)?U:+p}function iH(p){return cc(p,oa(p))}function ime(p){return p?cp(an(p),-F,F):p===0?p:0}function Qn(p){return p==null?"":Ma(p)}var ame=Cm(function(p,b){if(Nb(b)||ra(b)){cc(b,Fo(b),p);return}for(var M in b)rr.call(b,M)&&Mb(p,M,b[M])}),aH=Cm(function(p,b){cc(b,oa(b),p)}),Q1=Cm(function(p,b,M,V){cc(b,oa(b),p,V)}),sme=Cm(function(p,b,M,V){cc(b,Fo(b),p,V)}),lme=iu(LM);function cme(p,b){var M=Sm(p);return b==null?M:FV(M,b)}var ume=mn(function(p,b){p=dr(p);var M=-1,V=b.length,G=V>2?b[2]:n;for(G&&Mi(b[0],b[1],G)&&(V=1);++M1),ne}),cc(p,rA(p),M),V&&(M=Ss(M,d|f|h,xfe));for(var G=b.length;G--;)YM(M,b[G]);return M});function Ime(p,b){return lH(p,K1(Lt(b)))}var kme=iu(function(p,b){return p==null?{}:nfe(p,b)});function lH(p,b){if(p==null)return{};var M=Rr(rA(p),function(V){return[V]});return b=Lt(b),ZV(p,M,function(V,G){return b(V,G[0])})}function Mme(p,b,M){b=bd(b,p);var V=-1,G=b.length;for(G||(G=1,p=n);++Vb){var V=p;p=b,b=V}if(M||p%1||b%1){var G=_V();return ui(p+G*(b-p+vue("1e-"+((G+"").length-1))),b)}return GM(p,b)}var zme=Pm(function(p,b,M){return b=b.toLowerCase(),p+(M?dH(b):b)});function dH(p){return bA(Qn(p).toLowerCase())}function fH(p){return p=Qn(p),p&&p.replace(Oa,Aue).replace(lue,"")}function Vme(p,b,M){p=Qn(p),b=Ma(b);var V=p.length;M=M===n?V:cp(an(M),0,V);var G=M;return M-=b.length,M>=0&&p.slice(M,G)==b}function Hme(p){return p=Qn(p),p&&qr.test(p)?p.replace(Un,$ue):p}function Ume(p){return p=Qn(p),p&&ep.test(p)?p.replace(Zc,"\\$&"):p}var Wme=Pm(function(p,b,M){return p+(M?"-":"")+b.toLowerCase()}),Gme=Pm(function(p,b,M){return p+(M?" ":"")+b.toLowerCase()}),qme=m5("toLowerCase");function Kme(p,b,M){p=Qn(p),b=an(b);var V=b?ym(p):0;if(!b||V>=b)return p;var G=(b-V)/2;return j1(E1(G),M)+p+j1(T1(G),M)}function Yme(p,b,M){p=Qn(p),b=an(b);var V=b?ym(p):0;return b&&V>>0,M?(p=Qn(p),p&&(typeof b=="string"||b!=null&&!gA(b))&&(b=Ma(b),!b&&gm(p))?wd(bl(p),0,M):p.split(b,M)):[]}var nge=Pm(function(p,b,M){return p+(M?" ":"")+bA(b)});function rge(p,b,M){return p=Qn(p),M=M==null?0:cp(an(M),0,p.length),b=Ma(b),p.slice(M,M+b.length)==b}function oge(p,b,M){var V=Q.templateSettings;M&&Mi(p,b,M)&&(b=n),p=Qn(p),b=Q1({},b,V,S5);var G=Q1({},b.imports,V.imports,S5),ne=Fo(G),he=MM(G,ne),ve,Ee,We=0,qe=b.interpolate||eu,Je="__p += '",ft=$M((b.escape||eu).source+"|"+qe.source+"|"+(qe===Ut?Ve:eu).source+"|"+(b.evaluate||eu).source+"|$","g"),$t="//# sourceURL="+(rr.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pue+"]")+` -`;p.replace(ft,function(Bt,xn,Mn,$a,Ai,Ra){return Mn||(Mn=$a),Je+=p.slice(We,Ra).replace(Kz,Rue),xn&&(ve=!0,Je+=`' + -__e(`+xn+`) + +`)}function Gfe(h){return tn(h)||xp(h)||!!(zV&&h&&h[zV])}function lu(h,b){var M=typeof h;return b=b??F,!!b&&(M=="number"||M!="symbol"&&Gn.test(h))&&h>-1&&h%1==0&&h0){if(++b>=N)return arguments[0]}else b=0;return h.apply(n,arguments)}}function Z1(h,b){var M=-1,V=h.length,G=V-1;for(b=b===n?V:b;++M1?h[b-1]:n;return M=typeof M=="function"?(h.pop(),M):n,Q5(h,M)});function J5(h){var b=J(h);return b.__chain__=!0,b}function rhe(h,b){return b(h),h}function eC(h,b){return b(h)}var ohe=su(function(h){var b=h.length,M=b?h[0]:0,V=this.__wrapped__,G=function(ne){return qM(ne,h)};return b>1||this.__actions__.length||!(V instanceof In)||!lu(M)?this.thru(G):(V=V.slice(M,+M+(b?1:0)),V.__actions__.push({func:eC,args:[G],thisArg:n}),new Ss(V,this.__chain__).thru(function(ne){return b&&!ne.length&&ne.push(n),ne}))});function ihe(){return J5(this)}function ahe(){return new Ss(this.value(),this.__chain__)}function she(){this.__values__===n&&(this.__values__=fH(this.value()));var h=this.__index__>=this.__values__.length,b=h?n:this.__values__[this.__index__++];return{done:h,value:b}}function lhe(){return this}function che(h){for(var b,M=this;M instanceof j1;){var V=W5(M);V.__index__=0,V.__values__=n,b?G.__wrapped__=V:b=V;var G=V;M=M.__wrapped__}return G.__wrapped__=h,b}function uhe(){var h=this.__wrapped__;if(h instanceof In){var b=h;return this.__actions__.length&&(b=new In(this)),b=b.reverse(),b.__actions__.push({func:eC,args:[xA],thisArg:n}),new Ss(b,this.__chain__)}return this.thru(xA)}function dhe(){return h5(this.__wrapped__,this.__actions__)}var fhe=G1(function(h,b,M){rr.call(h,M)?++h[M]:iu(h,M,1)});function phe(h,b,M){var V=tn(h)?OV:rfe;return M&&Mi(h,b,M)&&(b=n),V(h,Lt(b,3))}function hhe(h,b){var M=tn(h)?hd:QV;return M(h,Lt(b,3))}var mhe=T5(G5),ghe=T5(q5);function yhe(h,b){return Jo(tC(h,b),1)}function vhe(h,b){return Jo(tC(h,b),z)}function bhe(h,b,M){return M=M===n?1:ln(M),Jo(tC(h,b),M)}function Z5(h,b){var M=tn(h)?ws:vd;return M(h,Lt(b,3))}function eH(h,b){var M=tn(h)?Fue:XV;return M(h,Lt(b,3))}var whe=G1(function(h,b,M){rr.call(h,M)?h[M].push(b):iu(h,M,[b])});function xhe(h,b,M,V){h=ra(h)?h:Nm(h),M=M&&!V?ln(M):0;var G=h.length;return M<0&&(M=Io(G+M,0)),aC(h)?M<=G&&h.indexOf(b,M)>-1:!!G&&Pm(h,b,M)>-1}var She=gn(function(h,b,M){var V=-1,G=typeof b=="function",ne=ra(h)?Ae(h.length):[];return vd(h,function(he){ne[++V]=G?Ia(b,he,M):zb(he,b,M)}),ne}),Che=G1(function(h,b,M){iu(h,M,b)});function tC(h,b){var M=tn(h)?_r:r5;return M(h,Lt(b,3))}function Phe(h,b,M,V){return h==null?[]:(tn(b)||(b=b==null?[]:[b]),M=V?n:M,tn(M)||(M=M==null?[]:[M]),s5(h,b,M))}var The=G1(function(h,b,M){h[M?0:1].push(b)},function(){return[[],[]]});function Ehe(h,b,M){var V=tn(h)?_M:AV,G=arguments.length<3;return V(h,Lt(b,4),M,G,vd)}function Ohe(h,b,M){var V=tn(h)?jue:AV,G=arguments.length<3;return V(h,Lt(b,4),M,G,XV)}function Ihe(h,b){var M=tn(h)?hd:QV;return M(h,oC(Lt(b,3)))}function khe(h){var b=tn(h)?GV:xfe;return b(h)}function Mhe(h,b,M){(M?Mi(h,b,M):b===n)?b=1:b=ln(b);var V=tn(h)?Jde:Sfe;return V(h,b)}function Ahe(h){var b=tn(h)?Zde:Pfe;return b(h)}function $he(h){if(h==null)return 0;if(ra(h))return aC(h)?Em(h):h.length;var b=di(h);return b==me||b==_e?h.size:ZM(h).length}function Rhe(h,b,M){var V=tn(h)?DM:Tfe;return M&&Mi(h,b,M)&&(b=n),V(h,Lt(b,3))}var _he=gn(function(h,b){if(h==null)return[];var M=b.length;return M>1&&Mi(h,b[0],b[1])?b=[]:M>2&&Mi(b[0],b[1],b[2])&&(b=[b[0]]),s5(h,Jo(b,1),[])}),nC=hde||function(){return Qo.Date.now()};function Dhe(h,b){if(typeof b!="function")throw new xs(a);return h=ln(h),function(){if(--h<1)return b.apply(this,arguments)}}function tH(h,b,M){return b=M?n:b,b=h&&b==null?h.length:b,au(h,O,n,n,n,n,b)}function nH(h,b){var M;if(typeof b!="function")throw new xs(a);return h=ln(h),function(){return--h>0&&(M=b.apply(this,arguments)),h<=1&&(b=n),M}}var CA=gn(function(h,b,M){var V=v;if(M.length){var G=gd(M,_m(CA));V|=T}return au(h,V,b,M,G)}),rH=gn(function(h,b,M){var V=v|w;if(M.length){var G=gd(M,_m(rH));V|=T}return au(b,V,h,M,G)});function oH(h,b,M){b=M?n:b;var V=au(h,S,n,n,n,n,n,b);return V.placeholder=oH.placeholder,V}function iH(h,b,M){b=M?n:b;var V=au(h,P,n,n,n,n,n,b);return V.placeholder=iH.placeholder,V}function aH(h,b,M){var V,G,ne,he,ve,Ee,Ge=0,qe=!1,Je=!1,ft=!0;if(typeof h!="function")throw new xs(a);b=Es(b)||0,Br(M)&&(qe=!!M.leading,Je="maxWait"in M,ne=Je?Io(Es(M.maxWait)||0,b):ne,ft="trailing"in M?!!M.trailing:ft);function Rt(io){var El=V,du=G;return V=G=n,Ge=io,he=h.apply(du,El),he}function Bt(io){return Ge=io,ve=Gb(Cn,b),qe?Rt(io):he}function dn(io){var El=io-Ee,du=io-Ge,TH=b-El;return Je?ui(TH,ne-du):TH}function zt(io){var El=io-Ee,du=io-Ge;return Ee===n||El>=b||El<0||Je&&du>=ne}function Cn(){var io=nC();if(zt(io))return Mn(io);ve=Gb(Cn,dn(io))}function Mn(io){return ve=n,ft&&V?Rt(io):(V=G=n,he)}function $a(){ve!==n&&g5(ve),Ge=0,V=Ee=G=ve=n}function Ai(){return ve===n?he:Mn(nC())}function Ra(){var io=nC(),El=zt(io);if(V=arguments,G=this,Ee=io,El){if(ve===n)return Bt(Ee);if(Je)return g5(ve),ve=Gb(Cn,b),Rt(Ee)}return ve===n&&(ve=Gb(Cn,b)),he}return Ra.cancel=$a,Ra.flush=Ai,Ra}var Nhe=gn(function(h,b){return YV(h,1,b)}),Lhe=gn(function(h,b,M){return YV(h,Es(b)||0,M)});function Fhe(h){return au(h,A)}function rC(h,b){if(typeof h!="function"||b!=null&&typeof b!="function")throw new xs(a);var M=function(){var V=arguments,G=b?b.apply(this,V):V[0],ne=M.cache;if(ne.has(G))return ne.get(G);var he=h.apply(this,V);return M.cache=ne.set(G,he)||ne,he};return M.cache=new(rC.Cache||ou),M}rC.Cache=ou;function oC(h){if(typeof h!="function")throw new xs(a);return function(){var b=arguments;switch(b.length){case 0:return!h.call(this);case 1:return!h.call(this,b[0]);case 2:return!h.call(this,b[0],b[1]);case 3:return!h.call(this,b[0],b[1],b[2])}return!h.apply(this,b)}}function jhe(h){return nH(2,h)}var Bhe=Efe(function(h,b){b=b.length==1&&tn(b[0])?_r(b[0],ka(Lt())):_r(Jo(b,1),ka(Lt()));var M=b.length;return gn(function(V){for(var G=-1,ne=ui(V.length,M);++G=b}),xp=e5(function(){return arguments}())?e5:function(h){return Xr(h)&&rr.call(h,"callee")&&!BV.call(h,"callee")},tn=Ae.isArray,tme=xV?ka(xV):cfe;function ra(h){return h!=null&&iC(h.length)&&!cu(h)}function oo(h){return Xr(h)&&ra(h)}function nme(h){return h===!0||h===!1||Xr(h)&&ki(h)==ie}var Sd=gde||DA,rme=SV?ka(SV):ufe;function ome(h){return Xr(h)&&h.nodeType===1&&!qb(h)}function ime(h){if(h==null)return!0;if(ra(h)&&(tn(h)||typeof h=="string"||typeof h.splice=="function"||Sd(h)||Dm(h)||xp(h)))return!h.length;var b=di(h);if(b==me||b==_e)return!h.size;if(Wb(h))return!ZM(h).length;for(var M in h)if(rr.call(h,M))return!1;return!0}function ame(h,b){return Vb(h,b)}function sme(h,b,M){M=typeof M=="function"?M:n;var V=M?M(h,b):n;return V===n?Vb(h,b,n,M):!!V}function TA(h){if(!Xr(h))return!1;var b=ki(h);return b==fe||b==re||typeof h.message=="string"&&typeof h.name=="string"&&!qb(h)}function lme(h){return typeof h=="number"&&VV(h)}function cu(h){if(!Br(h))return!1;var b=ki(h);return b==ee||b==ce||b==pe||b==Ie}function lH(h){return typeof h=="number"&&h==ln(h)}function iC(h){return typeof h=="number"&&h>-1&&h%1==0&&h<=F}function Br(h){var b=typeof h;return h!=null&&(b=="object"||b=="function")}function Xr(h){return h!=null&&typeof h=="object"}var cH=CV?ka(CV):ffe;function cme(h,b){return h===b||JM(h,b,mA(b))}function ume(h,b,M){return M=typeof M=="function"?M:n,JM(h,b,mA(b),M)}function dme(h){return uH(h)&&h!=+h}function fme(h){if(Yfe(h))throw new Xt(i);return t5(h)}function pme(h){return h===null}function hme(h){return h==null}function uH(h){return typeof h=="number"||Xr(h)&&ki(h)==we}function qb(h){if(!Xr(h)||ki(h)!=Se)return!1;var b=$1(h);if(b===null)return!0;var M=rr.call(b,"constructor")&&b.constructor;return typeof M=="function"&&M instanceof M&&I1.call(M)==ude}var EA=PV?ka(PV):pfe;function mme(h){return lH(h)&&h>=-F&&h<=F}var dH=TV?ka(TV):hfe;function aC(h){return typeof h=="string"||!tn(h)&&Xr(h)&&ki(h)==ye}function Aa(h){return typeof h=="symbol"||Xr(h)&&ki(h)==Te}var Dm=EV?ka(EV):mfe;function gme(h){return h===n}function yme(h){return Xr(h)&&di(h)==Me}function vme(h){return Xr(h)&&ki(h)==We}var bme=X1(eA),wme=X1(function(h,b){return h<=b});function fH(h){if(!h)return[];if(ra(h))return aC(h)?Cl(h):na(h);if(_b&&h[_b])return Jue(h[_b]());var b=di(h),M=b==me?zM:b==_e?T1:Nm;return M(h)}function uu(h){if(!h)return h===0?h:0;if(h=Es(h),h===z||h===-z){var b=h<0?-1:1;return b*H}return h===h?h:0}function ln(h){var b=uu(h),M=b%1;return b===b?M?b-M:b:0}function pH(h){return h?yp(ln(h),0,q):0}function Es(h){if(typeof h=="number")return h;if(Aa(h))return U;if(Br(h)){var b=typeof h.valueOf=="function"?h.valueOf():h;h=Br(b)?b+"":b}if(typeof h!="string")return h===0?h:+h;h=$V(h);var M=en.test(h);return M||Rr.test(h)?Due(h.slice(2),M?2:8):wt.test(h)?U:+h}function hH(h){return fc(h,oa(h))}function xme(h){return h?yp(ln(h),-F,F):h===0?h:0}function Jn(h){return h==null?"":Ma(h)}var Sme=$m(function(h,b){if(Wb(b)||ra(b)){fc(b,jo(b),h);return}for(var M in b)rr.call(b,M)&&jb(h,M,b[M])}),mH=$m(function(h,b){fc(b,oa(b),h)}),sC=$m(function(h,b,M,V){fc(b,oa(b),h,V)}),Cme=$m(function(h,b,M,V){fc(b,jo(b),h,V)}),Pme=su(qM);function Tme(h,b){var M=Am(h);return b==null?M:qV(M,b)}var Eme=gn(function(h,b){h=dr(h);var M=-1,V=b.length,G=V>2?b[2]:n;for(G&&Mi(b[0],b[1],G)&&(V=1);++M1),ne}),fc(h,pA(h),M),V&&(M=Cs(M,d|f|p,Lfe));for(var G=b.length;G--;)iA(M,b[G]);return M});function Ume(h,b){return yH(h,oC(Lt(b)))}var Wme=su(function(h,b){return h==null?{}:vfe(h,b)});function yH(h,b){if(h==null)return{};var M=_r(pA(h),function(V){return[V]});return b=Lt(b),l5(h,M,function(V,G){return b(V,G[0])})}function Gme(h,b,M){b=wd(b,h);var V=-1,G=b.length;for(G||(G=1,h=n);++Vb){var V=h;h=b,b=V}if(M||h%1||b%1){var G=HV();return ui(h+G*(b-h+_ue("1e-"+((G+"").length-1))),b)}return nA(h,b)}var rge=Rm(function(h,b,M){return b=b.toLowerCase(),h+(M?wH(b):b)});function wH(h){return kA(Jn(h).toLowerCase())}function xH(h){return h=Jn(h),h&&h.replace(Oa,que).replace(Pue,"")}function oge(h,b,M){h=Jn(h),b=Ma(b);var V=h.length;M=M===n?V:yp(ln(M),0,V);var G=M;return M-=b.length,M>=0&&h.slice(M,G)==b}function ige(h){return h=Jn(h),h&&Kr.test(h)?h.replace(Wn,Kue):h}function age(h){return h=Jn(h),h&&lp.test(h)?h.replace(tu,"\\$&"):h}var sge=Rm(function(h,b,M){return h+(M?"-":"")+b.toLowerCase()}),lge=Rm(function(h,b,M){return h+(M?" ":"")+b.toLowerCase()}),cge=P5("toLowerCase");function uge(h,b,M){h=Jn(h),b=ln(b);var V=b?Em(h):0;if(!b||V>=b)return h;var G=(b-V)/2;return Y1(N1(G),M)+h+Y1(D1(G),M)}function dge(h,b,M){h=Jn(h),b=ln(b);var V=b?Em(h):0;return b&&V>>0,M?(h=Jn(h),h&&(typeof b=="string"||b!=null&&!EA(b))&&(b=Ma(b),!b&&Tm(h))?xd(Cl(h),0,M):h.split(b,M)):[]}var vge=Rm(function(h,b,M){return h+(M?" ":"")+kA(b)});function bge(h,b,M){return h=Jn(h),M=M==null?0:yp(ln(M),0,h.length),b=Ma(b),h.slice(M,M+b.length)==b}function wge(h,b,M){var V=J.templateSettings;M&&Mi(h,b,M)&&(b=n),h=Jn(h),b=sC({},b,V,A5);var G=sC({},b.imports,V.imports,A5),ne=jo(G),he=BM(G,ne),ve,Ee,Ge=0,qe=b.interpolate||nu,Je="__p += '",ft=VM((b.escape||nu).source+"|"+qe.source+"|"+(qe===Wt?He:nu).source+"|"+(b.evaluate||nu).source+"|$","g"),Rt="//# sourceURL="+(rr.call(b,"sourceURL")?(b.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kue+"]")+` +`;h.replace(ft,function(zt,Cn,Mn,$a,Ai,Ra){return Mn||(Mn=$a),Je+=h.slice(Ge,Ra).replace(rV,Yue),Cn&&(ve=!0,Je+=`' + +__e(`+Cn+`) + '`),Ai&&(Ee=!0,Je+=`'; `+Ai+`; __p += '`),Mn&&(Je+=`' + ((__t = (`+Mn+`)) == null ? '' : __t) + -'`),We=Ra+Bt.length,Bt}),Je+=`'; -`;var jt=rr.call(b,"variable")&&b.variable;if(!jt)Je=`with (obj) { +'`),Ge=Ra+zt.length,zt}),Je+=`'; +`;var Bt=rr.call(b,"variable")&&b.variable;if(!Bt)Je=`with (obj) { `+Je+` } -`;else if(Kr.test(jt))throw new Xt(s);Je=(Ee?Je.replace(zt,""):Je).replace(Ot,"$1").replace(cn,"$1;"),Je="function("+(jt||"obj")+`) { -`+(jt?"":`obj || (obj = {}); +`;else if(Yr.test(Bt))throw new Xt(s);Je=(Ee?Je.replace(Vt,""):Je).replace(Ot,"$1").replace(un,"$1;"),Je="function("+(Bt||"obj")+`) { +`+(Bt?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(ve?", __e = _.escape":"")+(Ee?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Je+`return __p -}`;var un=hH(function(){return Gn(ne,$t+"return "+Je).apply(n,he)});if(un.source=Je,mA(un))throw un;return un}function ige(p){return Qn(p).toLowerCase()}function age(p){return Qn(p).toUpperCase()}function sge(p,b,M){if(p=Qn(p),p&&(M||b===n))return CV(p);if(!p||!(b=Ma(b)))return p;var V=bl(p),G=bl(b),ne=PV(V,G),he=TV(V,G)+1;return wd(V,ne,he).join("")}function lge(p,b,M){if(p=Qn(p),p&&(M||b===n))return p.slice(0,OV(p)+1);if(!p||!(b=Ma(b)))return p;var V=bl(p),G=TV(V,bl(b))+1;return wd(V,0,G).join("")}function cge(p,b,M){if(p=Qn(p),p&&(M||b===n))return p.replace(tp,"");if(!p||!(b=Ma(b)))return p;var V=bl(p),G=PV(V,bl(b));return wd(V,G).join("")}function uge(p,b){var M=I,V=R;if(jr(b)){var G="separator"in b?b.separator:G;M="length"in b?an(b.length):M,V="omission"in b?Ma(b.omission):V}p=Qn(p);var ne=p.length;if(gm(p)){var he=bl(p);ne=he.length}if(M>=ne)return p;var ve=M-ym(V);if(ve<1)return V;var Ee=he?wd(he,0,ve).join(""):p.slice(0,ve);if(G===n)return Ee+V;if(he&&(ve+=Ee.length-ve),gA(G)){if(p.slice(ve).search(G)){var We,qe=Ee;for(G.global||(G=$M(G.source,Qn(Ne.exec(G))+"g")),G.lastIndex=0;We=G.exec(qe);)var Je=We.index;Ee=Ee.slice(0,Je===n?ve:Je)}}else if(p.indexOf(Ma(G),ve)!=ve){var ft=Ee.lastIndexOf(G);ft>-1&&(Ee=Ee.slice(0,ft))}return Ee+V}function dge(p){return p=Qn(p),p&&Po.test(p)?p.replace(Fn,Bue):p}var fge=Pm(function(p,b,M){return p+(M?" ":"")+b.toUpperCase()}),bA=m5("toUpperCase");function pH(p,b,M){return p=Qn(p),b=M?n:b,b===n?Due(p)?Hue(p):Eue(p):p.match(b)||[]}var hH=mn(function(p,b){try{return Ia(p,n,b)}catch(M){return mA(M)?M:new Xt(M)}}),pge=iu(function(p,b){return bs(b,function(M){M=uc(M),ru(p,M,pA(p[M],p))}),p});function hge(p){var b=p==null?0:p.length,M=Lt();return p=b?Rr(p,function(V){if(typeof V[1]!="function")throw new ws(a);return[M(V[0]),V[1]]}):[],mn(function(V){for(var G=-1;++GF)return[];var M=q,V=ui(p,q);b=Lt(b),p-=q;for(var G=kM(V,b);++M0||b<0)?new In(M):(p<0?M=M.takeRight(-p):p&&(M=M.drop(p)),b!==n&&(b=an(b),M=b<0?M.dropRight(-b):M.take(b-p)),M)},In.prototype.takeRightWhile=function(p){return this.reverse().takeWhile(p).reverse()},In.prototype.toArray=function(){return this.take(q)},lc(In.prototype,function(p,b){var M=/^(?:filter|find|map|reject)|While$/.test(b),V=/^(?:head|last)$/.test(b),G=Q[V?"take"+(b=="last"?"Right":""):b],ne=V||/^find/.test(b);G&&(Q.prototype[b]=function(){var he=this.__wrapped__,ve=V?[1]:arguments,Ee=he instanceof In,We=ve[0],qe=Ee||tn(he),Je=function(xn){var Mn=G.apply(Q,hd([xn],ve));return V&&ft?Mn[0]:Mn};qe&&M&&typeof We=="function"&&We.length!=1&&(Ee=qe=!1);var ft=this.__chain__,$t=!!this.__actions__.length,jt=ne&&!ft,un=Ee&&!$t;if(!ne&&qe){he=un?he:new In(this);var Bt=p.apply(he,ve);return Bt.__actions__.push({func:U1,args:[Je],thisArg:n}),new xs(Bt,ft)}return jt&&un?p.apply(this,ve):(Bt=this.thru(Je),jt?V?Bt.value()[0]:Bt.value():Bt)})}),bs(["pop","push","shift","sort","splice","unshift"],function(p){var b=g1[p],M=/^(?:push|sort|unshift)$/.test(p)?"tap":"thru",V=/^(?:pop|shift)$/.test(p);Q.prototype[p]=function(){var G=arguments;if(V&&!this.__chain__){var ne=this.value();return b.apply(tn(ne)?ne:[],G)}return this[M](function(he){return b.apply(tn(he)?he:[],G)})}}),lc(In.prototype,function(p,b){var M=Q[b];if(M){var V=M.name+"";rr.call(xm,V)||(xm[V]=[]),xm[V].push({name:b,func:M})}}),xm[L1(n,w).name]=[{name:"wrapper",func:n}],In.prototype.clone=dde,In.prototype.reverse=fde,In.prototype.value=pde,Q.prototype.at=Vpe,Q.prototype.chain=Hpe,Q.prototype.commit=Upe,Q.prototype.next=Wpe,Q.prototype.plant=qpe,Q.prototype.reverse=Kpe,Q.prototype.toJSON=Q.prototype.valueOf=Q.prototype.value=Ype,Q.prototype.first=Q.prototype.head,Tb&&(Q.prototype[Tb]=Gpe),Q},vm=Uue();ip?((ip.exports=vm)._=vm,xM._=vm):Xo._=vm}).call(Bi)})(rO,rO.exports);var dxt=rO.exports;function jN({callback:e}){const[t,n]=y.useState(null),[r,o]=y.useState(""),[i,a]=y.useState(!0),[s,l]=y.useState([]),[c,u]=Ge(),d=y.useMemo(()=>ZI(f=>SDe(f,u.language,i).then(h=>l(h)),200),[u.language,i]);return y.useEffect(()=>{if(r===""){l(t?[t]:[]);return}return d(r),()=>{}},[t,r,d]),X(Mt,{children:[C(ec,{id:"exercise-name-autocomplete",getOptionLabel:f=>f.value,"data-testid":"autocomplete",filterOptions:f=>f,options:s,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:t,noOptionsText:c("noResults"),isOptionEqualToValue:(f,h)=>f.value===h.value,onChange:(f,h)=>{l(h?[h,...s]:s),n(h),e(h)},onInputChange:(f,h)=>{o(h)},renderInput:f=>C(Cn,{...f,label:c("exercises.searchExerciseName"),fullWidth:!0,InputProps:{...f.InputProps,startAdornment:X(Mt,{children:[C(fo,{position:"start",children:C(BB,{})}),f.InputProps.startAdornment]})}}),renderOption:(f,h)=>RY("li",{...f,key:`exercise${h.data.id}`,"data-testid":`autocompleter-result-${h.data.id}`},X(ss,{disablePadding:!0,component:"div",children:[C(Gi,{children:h.data.image?C(tc,{alt:"",src:`${QF}${h.data.image}`,variant:"rounded"}):C(rd,{fontSize:"large"})}),C(bo,{primary:h.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:h.data.category})]}))}),u.language!==Ly&&C(TI,{children:C(Dy,{control:C(Vf,{checked:i,onChange:(f,h)=>a(h)}),label:c("alsoSearchEnglish")})})]})}function fxt(e){var d,f;const[t,n]=J.useState(null),[r,o]=J.useState(null),[i]=Ge(),a=rm(),s=()=>{o(null),n(null)},l=async()=>{var h;await PDe((h=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:h.id),e.onClose(),e.onChangeLanguage()},c=async(h=!1)=>{h?await L3(e.currentExercise.id,r==null?void 0:r.uuid):await L3(e.currentExercise.id),e.onClose(),a("../overview")},u=async h=>{const m=h!==void 0?h:t;if(m!==null)try{const g=await LI(m);o(g)}catch{o(null)}};return X(Mt,{children:[C(zOe,{id:"alert-dialog-title",children:i("delete")}),X(lZ,{children:[C("p",{children:i("exercises.deleteExerciseBody",{name:(d=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:d.name,language:(f=e.currentLanguage)==null?void 0:f.nameLong})}),C("p",{children:i("cannotBeUndone")}),C("p",{children:C("b",{children:i("exercises.replacements")})}),C("p",{children:i("exercises.replacementsInfoText")}),C("p",{children:i("exercises.replacementsSearch")}),C(jN,{callback:h=>{h!==null&&(n(h.data.base_id),u(h.data.base_id))}}),C(Cn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async h=>{n(h.target.value!==""?parseInt(h.target.value):null)},value:t??"",InputProps:{endAdornment:C(fo,{position:"start",children:C(kn,{onClick:()=>u(),children:C(wyt,{})})})},fullWidth:!0,variant:"standard"}),r===null&&C(Mt,{children:C("p",{children:C("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&X(Mt,{children:[X("p",{children:["Selected exercise for replacement:",C(nc,{title:i("copyToClipboard"),children:C(kn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:C(Pyt,{})})})]}),X(ss,{disablePadding:!0,children:[C(jF,{children:C(tc,{children:r.mainImage?C(tc,{alt:"",src:`${QF}${r.mainImage.url}`,variant:"rounded"}):C(rd,{})})}),C(bo,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),C(kn,{onClick:s,children:C(Syt,{})})]})]})]}),X(sZ,{children:[C(gt,{onClick:()=>e.onClose(),children:i("cancel")}),C(gt,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),C(gt,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),C(gt,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const pxt="_root_l288f_1",hxt="_detail_language_l288f_4",mxt="_detail_l288f_4",gxt="_detail_arrow_l288f_18",yxt="_languages_l288f_28",vxt="_language_l288f_28",bxt="_language_menu_l288f_40",wxt="_header_l288f_52",xxt="_toolbar_l288f_55",Sxt="_dots_l288f_68",Sp={root:pxt,detail_language:hxt,detail:mxt,detail_arrow:gxt,languages:yxt,language:vxt,language_menu:bxt,header:wxt,toolbar:xxt,dots:Sxt},Cxt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var T,E,O;const[a,s]=y.useState(null),[l,c]=J.useState(!1),u=!!a,[d]=Ge(),f=ry(lh.DELETE_EXERCISE),h=ry(lh.EDIT_EXERCISE),m=ld(),g=m.isSuccess&&m.data===null;let v=!1;m.isSuccess&&h.isSuccess&&(v=h.data||m.data!==null&&m.data.isTrustworthy);const w=k=>{s(k.currentTarget)},x=()=>{s(null)},S=k=>{n(k),x()},P=t.map(k=>X(Yt,{onClick:()=>S(k),selected:(r==null?void 0:r.id)===k.id,children:[C(bo,{children:k.nameLong}),C(Gi,{children:e.availableLanguages.includes(k.id)?C(_yt,{}):C(Ji,{})})]},k.nameShort));return C(He,{container:!0,children:C(He,{size:12,children:X("div",{className:Sp.root,children:[C(aZ,{open:l,onClose:()=>c(!1),children:C(fxt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),X("div",{className:Sp.detail_language,children:[X("div",{className:Sp.detail,children:[C(Yl,{to:"../overview",children:d("exercises.exercises")})," > ",(T=e.getTranslation(r))==null?void 0:T.name]}),C("div",{className:Sp.languages,children:X("div",{className:Sp.language,children:[C(gt,{size:"small",id:"basic-button",onClick:w,startIcon:C(JS,{}),children:r==null?void 0:r.nameLong}),X(hs,{id:"basic-menu",anchorEl:a,open:u,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[C(Yt,{disabled:!0,children:d("exercises.changeExerciseLanguage")}),C(as,{}),P]})]})})]}),X("div",{className:Sp.header,children:[C(dt,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(E=e.getTranslation(r))==null?void 0:E.name}),!g&&X("nav",{className:Sp.toolbar,children:[f.isSuccess&&f.data&&(r==null?void 0:r.id)===((O=e.getTranslation(r))==null?void 0:O.language)&&C(gt,{onClick:()=>c(!0),children:d("delete")}),v&&C(gt,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),C(gt,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),X(Kt,{direction:"row",spacing:1,mt:2,children:[C(wh,{label:d(Xi(e.category.name)),size:"small"}),e.equipment.map(k=>C(wh,{label:d(Xi(k.name)),variant:"outlined",size:"small"},k.id))]})]})})})},ti=()=>C(er,{sx:{height:40}}),Pxt=()=>{var g;const[e,t]=y.useState(),[n,r]=y.useState(),[o,i]=y.useState(!1),a=om(),s=a.baseID?dxt.parseInt(a.baseID):0;Ge();const l=rm(),c=Jk(),u=So({queryKey:[t_e,s],queryFn:()=>LI(s),enabled:c.isSuccess}),d=So({queryKey:[e_e,(g=u.data)==null?void 0:g.variationId],queryFn:()=>{var v;return bDe((v=u.data)==null?void 0:v.variationId)},enabled:u.isSuccess});if(u.isError||c.isError||d.isError)return l("/not-found"),null;const f=v=>{var x;const w=Eee(v.nameShort,c.data);t(w),r((x=u.data)==null?void 0:x.getTranslation(v))},h=d.isSuccess?d.data.filter(v=>v.id!==s):[];let m;return u.isSuccess&&c.isSuccess&&(m=o?C(ixt,{exercise:u.data,language:e}):C(uxt,{exercise:u.data,language:e,variations:h,setEditMode:i})),X(Mt,{children:[u.isSuccess&&c.isSuccess&&C(qu,{children:C(Cxt,{exercise:u.data,languages:c.data,changeLanguage:f,language:e,setEditMode:i,editMode:o})}),C(ti,{}),X(qu,{maxWidth:"lg",children:[u.isLoading&&c.isLoading&&C(Ja,{}),m]})]})};function cle(e){const[t]=Ge(),[n,r,o]=hl(e.fieldName),[i,a]=y.useState(""),s=u=>{o.setValue(n.value.filter((d,f)=>f!==u))},l=(u,d)=>{n.value[u]=d,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return X(Mt,{children:[C(He,{size:12,children:C(Cn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:C(fo,{position:"end",children:C(kn,{onClick:c,children:C(Ji,{})})})}})}),n.value.map((u,d)=>C(Cn,{fullWidth:!0,value:u,onChange:f=>l(d,f.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:C(fo,{position:"end",children:C(kn,{onClick:()=>s(d),children:C(oz,{})})})}},d))]})}const Txt=({onContinue:e,onBack:t})=>{const[n]=Ge(),[r,o]=hb(),i=ml({description:yz(n),notes:rle(n)});return C(pl,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(lwt(a.description)),o(cwt(a.notes)),e()},children:C(ms,{children:X(Kt,{children:[C(wz,{fieldName:"description"}),C(ti,{}),C(cle,{fieldName:"notes"}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C(er,{sx:{mb:2},children:X("div",{children:[C(gt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},Ext=({onContinue:e,onBack:t})=>{const[n]=Ge(),r=Jk(),[o,i]=hb(),[a,s]=y.useState(o.languageId!==null),l=ml(a?{description:yz(n),name:mz(n),alternativeNames:gz(n),notes:rle(n),language:pa().required()}:{});return C(pl,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(dwt(c.name)),i(fwt(c.description)),i(hwt(c.alternativeNames)),i(xwt(c.language===""?null:c.language)),i(pwt(c.notes)),e()},children:c=>X(ms,{children:[X(Kt,{spacing:2,children:[C(TI,{children:C(Dy,{checked:a,onClick:()=>s(!a),control:C(Vf,{}),label:n("exercises.translateExerciseNow")})}),a&&X(Mt,{children:[r.isLoading?C(er,{children:C(Ja,{})}):X(Fh,{fullWidth:!0,children:[C(jh,{id:"label-language",children:n("language")}),C(zf,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==Ny).map(u=>X(Yt,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),C(hz,{fieldName:"name"}),C(pz,{fieldName:"alternativeNames"}),C(wz,{fieldName:"description"}),C(ti,{}),C(cle,{fieldName:"notes"})]})]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C(er,{sx:{mb:2},children:X("div",{children:[C(gt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function Oxt(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return C(Cn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function Ixt(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return C(Cn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function kxt(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return C(Cn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function Mxt(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return C(Cn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function Axt(e){const[t]=Ge(),[n,r]=hl(e.fieldName);return C(Cn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function $xt(e){const[t]=Ge(),[n,r]=y.useState(bu.PHOTO),[o,i,a]=hl(e.fieldName);return X(H$e,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[C(e0,{value:bu.PHOTO,children:X(Kt,{justifyContent:"center",alignItems:"center",children:[C(Ryt,{}),C(dt,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),C(e0,{value:bu.THREE_D,children:X(Kt,{justifyContent:"center",alignItems:"center",children:[C(Iyt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),C(e0,{value:bu.LINE_ART,children:X(Kt,{justifyContent:"center",alignItems:"center",children:[C(kyt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),C(e0,{value:bu.LOW_POLY,children:X(Kt,{justifyContent:"center",alignItems:"center",children:[C(Myt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),C(e0,{value:bu.OTHER,children:X(Kt,{justifyContent:"center",alignItems:"center",children:[C(Ayt,{}),C(dt,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const Rxt=({onContinue:e,onBack:t})=>{const[n]=Ge(),r=ld(),[o,i]=hb(),[a,s]=y.useState(o.images),[l,c]=y.useState(void 0),[u,d]=J.useState(!1),f=()=>d(!1);y.useEffect(()=>{i(Swt(a))},[i,a]);const h=x=>{var T;if(!((T=x.target.files)!=null&&T.length))return;const[S]=x.target.files,P=URL.createObjectURL(S);d(!0),c({url:P,file:S,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:bu.PHOTO.toString()})},m=x=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:x.author,authorUrl:x.authorUrl,title:x.title,derivativeSourceUrl:x.derivativeSourceUrl,objectUrl:x.objectUrl,style:x.imageStyle.toString()})),f()},g=x=>{const S=a.filter(P=>P.url!==x);s(S)},v=()=>{e()};return X("div",{children:[C(kv,{open:u,onClose:f,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(er,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[C(dt,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),X(He,{container:!0,spacing:2,children:[C(He,{size:4,children:l&&C("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),C(He,{size:8,children:C(pl,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:bu.PHOTO},onSubmit:x=>{console.log(x),m(x)},children:x=>X(ms,{children:[X(Kt,{spacing:2,children:[C(Axt,{fieldName:"title"}),C(Mxt,{fieldName:"objectUrl"}),C(Oxt,{fieldName:"author"}),C(Ixt,{fieldName:"authorUrl"}),C(kxt,{fieldName:"derivativeSourceUrl"}),C($xt,{fieldName:"imageStyle"}),X(Wu,{icon:C(bse,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),C(Kt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),C(dt,{children:n("exercises.compatibleImagesCC")}),X(Kt,{direction:"row",justifyContent:"center",children:[X("div",{children:[C("label",{htmlFor:"camera-input",children:C(xyt,{fontSize:"large",sx:{m:2}})}),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:h})]}),X("div",{children:[C("label",{htmlFor:"image-input",children:C(Cyt,{fontSize:"large",sx:{m:2}})}),C("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:h})]})]}),C(fZ,{cols:3,style:{maxHeight:"400px"},children:a.map(x=>X(pZ,{children:[C("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:x.url,alt:"",loading:"lazy"}),C(BIe,{title:x.title,subtitle:x.author,actionIcon:C(kn,{onClick:()=>g(x.url),sx:{color:"white"},children:C(Tyt,{})})})]},x.url))}),C(dt,{children:n("forms.supportedImageFormats")}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C(er,{sx:{mb:2},children:X(Mt,{children:[C(gt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",onClick:v,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},_xt="exercisecomment",J7=async e=>{const t=new wee,n=Pt(_xt),r=await ut.post(n,t.toJson(e),{headers:kt()});return t.fromJson(r.data)},Dxt="variation",Nxt=async()=>{const e=Pt(Dxt);return(await ut.post(e,{},{headers:kt()})).data.id},Lxt=({onBack:e})=>{const[t,n]=Ge(),[r]=hb(),o=rm(),i=Xk(),a=Jk(),s=t1(),l=Qk(),c=ld(),[u,d]=y.useState("initial"),f=async()=>{d("loading");let m;r.newVariationBaseId!==null?m=await Nxt():m=r.variationId;const g=await wDe(r.category,r.equipment,r.muscles,r.musclesSecondary,m,c.data.username),v=await T_(g,Ny,r.nameEn,r.descriptionEn,c.data.username);for(const w of r.alternativeNamesEn)await E_(v.id,w);for(const w of r.images)await Iee({exerciseId:g,image:w.file,imageData:w});for(const w of r.notesEn)await J7(new P_(null,v.id,w));if(r.languageId!==null){const w=await T_(g,r.languageId,r.nameI18n,r.descriptionI18n,c.data.username);for(const x of r.alternativeNamesI18n)await E_(w.id,x);for(const x of r.notesI18n)await J7(new P_(null,w.id,x))}console.log("Exercise created"),d("done")},h=()=>{o(Tn(wn.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?C(_o,{}):X(Mt,{children:[C(dt,{variant:"h6",children:t("exercises.step1HeaderBasics")}),C(Xu,{children:C(Ku,{children:X(Yu,{children:[X(Qt,{children:[C(ke,{children:t("name")}),C(ke,{children:r.nameEn})]}),X(Qt,{children:[C(ke,{children:t("exercises.alternativeNames")}),C(ke,{children:r.alternativeNamesEn.join(", ")})]}),X(Qt,{children:[C(ke,{children:t("description")}),C(ke,{children:r.descriptionEn})]}),X(Qt,{children:[C(ke,{children:t("exercises.notes")}),C(ke,{children:r.notesEn.map(m=>X(Mt,{children:[m,C("br",{})]}))})]}),X(Qt,{children:[C(ke,{children:t("category")}),C(ke,{children:t(Xi(i.data.find(m=>m.id===r.category).name))})]}),X(Qt,{children:[C(ke,{children:t("exercises.equipment")}),C(ke,{children:r.equipment.map(m=>t(Xi(l.data.find(g=>g.id===m).name))).join(", ")})]}),X(Qt,{children:[C(ke,{children:t("exercises.muscles")}),C(ke,{children:r.muscles.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),X(Qt,{children:[C(ke,{children:t("exercises.secondaryMuscles")}),C(ke,{children:r.musclesSecondary.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),X(Qt,{children:[C(ke,{children:t("exercises.variations")}),X(ke,{children:[r.variationId," / ",r.newVariationBaseId]})]})]})})}),r.images.length>0&&C(fZ,{cols:3,style:{maxHeight:"200px"},children:r.images.map(m=>C(pZ,{children:C("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:m.url,alt:"",loading:"lazy"})},m.url))}),r.languageId!==null&&X(Mt,{children:[C(dt,{variant:"h6",sx:{mt:3},children:a.data.find(m=>m.id===r.languageId).nameLong}),C(Xu,{children:C(Ku,{children:X(Yu,{children:[X(Qt,{children:[C(ke,{children:t("name")}),C(ke,{children:r.nameI18n})]}),X(Qt,{children:[C(ke,{children:t("exercises.alternativeNames")}),C(ke,{children:r.alternativeNamesI18n.join(", ")})]}),X(Qt,{children:[C(ke,{children:t("description")}),C(ke,{children:r.descriptionI18n})]}),X(Qt,{children:[C(ke,{children:t("exercises.notes")}),C(ke,{children:r.notesI18n.map(m=>X(Mt,{children:[m,C("br",{})]}))})]})]})})})]}),u!=="done"?C(Wu,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):X(Wu,{severity:"success",sx:{mt:2},children:[C(IT,{children:t("success")}),t("exercises.cacheWarning")]}),C(He,{container:!0,children:C(He,{display:"flex",justifyContent:"end",size:12,children:C(er,{sx:{mb:2},children:X("div",{children:[u!=="done"&&C(gt,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&C(gt,{variant:"contained",disabled:u!=="initial",onClick:f,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&X(gt,{variant:"contained",onClick:h,sx:{mt:1,mr:1},color:"success",children:[t("overview"),C($yt,{})]})]})})})})]})},Fxt=()=>{const[e]=Ge(),[t,n]=J.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return C(Pwt,{children:X(qu,{maxWidth:"md",children:[C(Kt,{direction:"row",children:C(dt,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),C(er,{children:X(CAe,{activeStep:t,orientation:"vertical",children:[X(Nm,{children:[C(_d,{children:e("exercises.step1HeaderBasics")}),C(Lm,{children:C(Twt,{onContinue:r,onBack:o})})]},1),X(Nm,{children:[C(_d,{children:e("exercises.variations")}),C(Lm,{children:C(Owt,{onContinue:r,onBack:o})})]},2),X(Nm,{children:[C(_d,{children:e("description")}),C(Lm,{children:C(Txt,{onContinue:r,onBack:o})})]},3),X(Nm,{children:[C(_d,{children:e("translation")}),C(Lm,{children:C(Ext,{onContinue:r,onBack:o})})]},4),X(Nm,{children:[C(_d,{children:e("images")}),C(Lm,{children:C(Rxt,{onContinue:r,onBack:o})})]},5),X(Nm,{children:[C(_d,{children:e("overview")}),C(Lm,{children:C(Lxt,{onBack:o})})]},6)]})})]})})},jxt=()=>{const[e]=Ge(),t=xz();return X(qu,{maxWidth:"md",children:[C(dt,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),X(er,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(dt,{mb:2,children:e("exercises.notEnoughRights",{days:Y2e})}),!t.anonymous&&!t.emailVerified&&C(gt,{variant:"contained",href:"/user/preferences",endIcon:C(byt,{}),children:e("preferences")})]})]})},Bxt=()=>{const e=xz();return C(Mt,{children:e.canContribute?C(Fxt,{}):C(jxt,{})})},zxt=()=>C("div",{children:"Add Weight Page"}),Vxt=()=>C("div",{children:"BmiCalculator Page"}),Hxt=()=>C("div",{children:"Calendar Page"}),Uxt=()=>C("div",{children:"Calories Calculator Page"}),Wxt=()=>C("div",{children:"Equipments Page"}),Gxt=()=>C("div",{children:"Gallery Page"}),qxt=()=>C("div",{children:"Ingredients Page"}),Kxt=()=>C("div",{children:"Login Page"}),Yxt=()=>C("div",{children:"Preferences Page"}),Xxt=()=>C("div",{children:"Public Template"}),Qxt=()=>C("div",{children:"RestApi Page"}),Jxt=()=>C("div",{children:"Your Template"}),Zxt=({weight:e})=>{const t=Hvt(),[n]=Ge(),[r,o]=J.useState(null),[i,a]=J.useState(!1),s=!!r,l=m=>{o(m.currentTarget)},c=()=>{u(),f()},u=()=>{o(null)},d=()=>{t.mutate(e.id),o(null)},f=()=>a(!0),h=()=>a(!1);return X("div",{children:[C(gt,{onClick:l,children:C(vyt,{})}),X(hs,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:c,children:n("edit")}),C(Yt,{onClick:d,children:n("delete")})]}),C(ta,{title:n("edit"),isOpen:i,closeFn:h,children:C(fb,{weightEntry:e,closeFn:h})})]})},eSt=()=>{const[e]=Ge(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Lh,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(fb,{closeFn:o})})]})},tSt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),nSt=Jse(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),rSt=({weights:e})=>{const t=[10,50,100],[n]=Ge(),r=nSt(),o=tSt(e),[i,a]=y.useState(t[0]),[s,l]=y.useState(0),c=(d,f)=>{l(f)},u=d=>{a(parseInt(d.target.value,10)),l(0)};return X("div",{className:r.table,children:[X(Xu,{children:[X(Ku,{sx:{minWidth:650},"aria-label":"simple table",children:[C(Bh,{children:X(Qt,{children:[C(ke,{align:"center",children:n("date")}),C(ke,{align:"center",children:n("weight")}),C(ke,{align:"center",children:n("difference")}),C(ke,{align:"center",children:n("days")}),C(ke,{align:"center"})]})}),C(Yu,{children:o.slice(s*i,s*i+i).map(d=>X(Qt,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[C(ke,{component:"th",scope:"row",align:"center",children:d.entry.date.toLocaleDateString()}),C(ke,{align:"center",children:d.entry.weight}),C(ke,{align:"center",children:+d.change.toFixed(2)}),C(ke,{align:"center",children:d.days}),C(ke,{align:"center",children:C(Zxt,{weight:d.entry})})]},d.entry.date.toLocaleDateString()))})]}),C(VF,{rowsPerPageOptions:t,component:"div",count:o.length,rowsPerPage:i,page:s,onPageChange:c,onRowsPerPageChange:u})]}),C(eSt,{})]})},oSt=()=>{const[e]=Ge(),[t,n]=y.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(fb,{closeFn:o})})]})},iSt=({currentFilter:e,onFilterChange:t})=>{const[n]=Ge(),r=Ei(),o=i=>{e!==i&&t(i)};return X(pEe,{variant:"outlined",sx:{mb:2},children:[C(gt,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),C(gt,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),C(gt,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),C(gt,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),C(gt,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},mb=e=>X(qu,{maxWidth:"lg",children:[X(He,{container:!0,spacing:2,children:[C(He,{sx:{mb:2},size:8,children:X(Kt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(dt,{gutterBottom:!0,variant:"h3",children:e.title}),e.optionsMenu]})}),C(He,{size:{xs:12,sm:8},children:e.mainContent}),C(He,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]}),aSt=()=>{const[e]=Ge(),[t,n]=y.useState("lastYear"),r=lz(t),o=i=>{n(i)};return r.isLoading?C(_o,{}):C(mb,{title:e("weight"),mainContent:X(Kt,{spacing:2,children:[C(iSt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&C(kI,{}),r.data.length!==0&&X(Mt,{children:[C(Zse,{weights:r.data}),C(er,{sx:{mt:4}}),C(rSt,{weights:r.data})]})]}),fab:C(oSt,{})})},sSt=()=>{const{i18n:e}=Ge(),[t,n]=J.useState(null);return X(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),X(hs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(Yt,{component:Yl,to:Tn(wn.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),C(Yt,{component:Yl,to:Tn(wn.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),C(Yt,{component:Yl,to:Tn(wn.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"})]})]})},lSt=()=>{const{i18n:e}=Ge(),[t,n]=J.useState(null);return X(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),X(hs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(Yt,{component:Yl,to:Tn(wn.WEIGHT_OVERVIEW,e.language),children:"Weight overview"}),C(Yt,{component:Yl,to:Tn(wn.WEIGHT_ADD,e.language),children:"Add weight entry"})]})]})},cSt=()=>{const{i18n:e}=Ge(),[t,n]=J.useState(null);return X(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),C(hs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(Yt,{component:Yl,to:Tn(wn.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},uSt=()=>{const{i18n:e}=Ge(),[t,n]=J.useState(null);return X(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),C(hs,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(Yt,{component:Yl,to:Tn(wn.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},dSt=()=>C(NCe,{position:"static",children:X(TZ,{children:[C(dt,{variant:"h6",component:"div",mr:3,children:"wger"}),C(sSt,{}),C(lSt,{}),C(cSt,{}),C(uSt,{})]})}),ule=()=>C(aSt,{}),fSt=()=>C("div",{children:"Workout Page"}),pSt=()=>C("div",{children:"Workout Schedule"});var cd,Z7=vI;cd=Z7.createRoot,Z7.hydrateRoot;const hSt=()=>X(He,{container:!0,spacing:2,children:[C(He,{size:4,children:C(Dse,{})}),C(He,{size:4,children:C(mse,{})}),C(He,{size:4,children:C(ele,{})})]}),n1=y.createContext({}),dle=()=>{const{data:e,isLoading:t}=Xk(),{selectedCategories:n,setSelectedCategories:r}=y.useContext(n1),[o]=Ge(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(_o,{}):C(dl,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(ss,{disablePadding:!0,children:X(Bf,{role:void 0,onClick:i(a),dense:!0,children:[C(Gi,{children:C(Vf,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),C(bo,{id:s,primary:o(Xi(a.name))})]})},a.id)})})},mSt=()=>{const[e]=Ge();return X(EF,{children:[C(IF,{expandIcon:C(Mv,{}),children:e("category")}),C(OF,{children:C(dle,{})})]})},gSt=()=>{const[e]=Ge();return C("div",{"data-testid":"categories",children:X(co,{children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),C(dle,{})]})})},fle=()=>{const{data:e,isLoading:t}=Qk(),{selectedEquipment:n,setSelectedEquipment:r}=y.useContext(n1),[o]=Ge(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(_o,{}):C(dl,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(ss,{disablePadding:!0,children:X(Bf,{role:void 0,onClick:i(a),dense:!0,children:[C(Gi,{children:C(Vf,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(bo,{id:s,primary:o(Xi(a.name))})]})},a.id)})})},ySt=()=>{const[e]=Ge();return X(EF,{children:[C(IF,{expandIcon:C(Mv,{}),children:e("exercises.equipment")}),C(OF,{children:C(fle,{})})]})},vSt=()=>{const[e]=Ge();return C("div",{"data-testid":"equipment",children:X(co,{sx:{mt:2},children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),C(fle,{})]})})},bSt=oe(({className:e,...t})=>C(nc,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${Br.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),ple=()=>{const{data:e,isLoading:t}=t1(),{selectedMuscles:n,setSelectedMuscles:r}=y.useContext(n1),[o]=Ge(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(_o,{}):C(dl,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(ss,{disablePadding:!0,secondaryAction:C(bSt,{title:C(kh,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:C(kn,{edge:"end","aria-label":"comments",children:C(wse,{})})}),children:X(Bf,{role:void 0,onClick:i(a),dense:!0,children:[C(Gi,{children:C(Vf,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(bo,{id:s,primary:a.name,secondary:a.nameEn!==""?o(Xi(a.nameEn)):""})]})},a.id)})})},wSt=()=>{const[e]=Ge();return X(EF,{children:[C(IF,{expandIcon:C(Mv,{}),children:e("exercises.muscles")}),C(OF,{children:C(ple,{})})]})},xSt=()=>{const[e]=Ge();return C("div",{"data-testid":"muscles",children:X(co,{sx:{mt:2},children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),C(ple,{})]})})},SSt=({exercises:e})=>{const t=Jk(),[n,r]=Ge();let o;return t.isSuccess&&(o=Eee(r.language,t.data)),C(He,{container:!0,spacing:1,children:e.map(i=>C(He,{sx:{display:"flex"},size:{xs:6,md:4},children:C(lle,{exercise:i,language:o})},i.id))})},CSt=()=>C(He,{container:!0,spacing:1,children:Array.apply(null,Array(21)).map((e,t)=>C(He,{sx:{display:"flex"},size:4,children:X(Ro,{children:[C(jc,{children:C(kP,{variant:"rectangular",width:250,height:150})}),C(xa,{children:X(er,{sx:{pt:.5},children:[C(kP,{width:"60%"}),C(kP,{})]})})]})},t))}),PSt=({children:e})=>{const[t]=Ge(),[n,r]=y.useState(!1),o=i=>()=>{r(i)};return X(Mt,{children:[C(gt,{onClick:o(!0),children:C(Oyt,{})}),X(tIe,{open:n,onClose:o(!1),anchor:"right",children:[X(Kt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(dt,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),C(gt,{onClick:o(!1),children:C(PS,{})})]}),C(as,{}),e]})]})},TSt=()=>{const[e,t]=Ge();return X(er,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(dt,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),C(dt,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),C(Yl,{to:Tn(wn.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},ESt=()=>{const e=ole(),[t,n]=Ge(),r=rm(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=y.useContext(n1),s=cS("(max-width:600px)"),[l,c]=J.useState(1),u=(v,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})};let d=y.useMemo(()=>{let v=e.data||[];return o.length>0&&(v=v.filter(w=>o.some(x=>w.category.id===x.id))),i.length>0&&(v=v.filter(w=>w.equipment.some(x=>i.some(S=>S.id===x.id)))),a.length>0&&(v=v.filter(w=>w.muscles.some(x=>a.some(S=>S.id===x.id)))),v},[e.data,o,i,a]);const f=21,h=Math.ceil(d.length/f),m=d.slice((l-1)*f,l*f),g=v=>{r(Tn(wn.EXERCISE_DETAIL,n.language,{id:v.data.base_id}))};return C(qu,{maxWidth:"lg",children:X(He,{container:!0,spacing:2,mt:2,children:[C(He,{size:{xs:10,sm:6},children:C(dt,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?X(Mt,{children:[C(He,{size:{xs:2,sm:6},children:C(gt,{variant:"contained",onClick:()=>r(Tn(wn.EXERCISE_CONTRIBUTE,n.language)),children:C(Ji,{})})}),C(He,{flexGrow:1,size:{sm:6},children:C(jN,{callback:g})}),C(He,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:X(PSt,{children:[C(mSt,{}),C(ySt,{}),C(wSt,{})]})})]}):X(Mt,{children:[C(He,{size:{xs:12,sm:3},children:C(jN,{callback:g})}),C(He,{size:{xs:12,sm:3},children:C(gt,{variant:"contained",startIcon:C(Ji,{}),onClick:()=>r(Tn(wn.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&C(He,{size:{xs:12,sm:3},children:X(He,{container:!0,spacing:1,children:[C(He,{size:{xs:6,sm:12},children:C(gSt,{})}),C(He,{size:{xs:6,sm:12},children:C(vSt,{})}),C(He,{size:12,children:C(xSt,{})})]})}),X(He,{size:{xs:12,sm:9},children:[e.isLoading?C(CSt,{}):X(Mt,{children:[C(SSt,{exercises:m}),C(Kt,{spacing:2,alignItems:"center",sx:{mt:2},children:C(yMe,{count:h,color:"primary",page:l,onChange:u})})]}),C(TSt,{})]})]})})},eq=()=>{const[e,t]=y.useState([]),[n,r]=y.useState([]),[o,i]=J.useState([]);return C(n1.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:C(ESt,{})})};function OSt(){return So({queryKey:[_v],queryFn:iNe})}const ISt=()=>{const e=Gr();return lo({mutationFn:t=>sNe(t),onSuccess:()=>e.invalidateQueries({queryKey:[_v]})})},kSt=e=>{const t=Gr();return lo({mutationFn:n=>lNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Rv,e]}),t.invalidateQueries({queryKey:[_v]})}})},MSt=e=>{const t=Gr();return lo({mutationFn:n=>cNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Rv,e]}),t.invalidateQueries({queryKey:[_v]})}})};function hle(e){return So({queryKey:[Rv,e],queryFn:()=>aNe(e)})}const ASt=()=>{const e=Gr();return lo({mutationFn:t=>fNe(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[Rv]}),e.invalidateQueries({queryKey:[_v]})}})},mle=()=>{const e=Gr();return lo({mutationFn:t=>dNe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Rv]}),e.invalidateQueries({queryKey:[_v]})}})},$St=()=>{const e=Gr();return lo({mutationFn:t=>uNe(t),onSuccess:()=>e.invalidateQueries({queryKey:[Rv]})})},nP=['"Open Sans Bold"',"sans-serif"].join(","),RSt=['"Open Sans Light"',"sans-serif"].join(","),gle={spacing:8,typography:{h3:{fontFamily:nP},h4:{fontFamily:nP},h5:{fontFamily:nP},h6:{fontFamily:nP},fontFamily:RSt},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},Yf=fS(gle),_St=e=>fS({...gle,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),yle=e=>{const{i18n:t}=Ge(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return C(er,{alignItems:"center",display:"flex",flexDirection:"column",children:C(Hh,{width:"90%",height:200,children:X(woe,{data:r,children:[C(Zv,{type:"monotone",dataKey:"value",stroke:Yf.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),C(Jv,{stroke:"#ccc",strokeDasharray:"5 5"}),C(Kc,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),C(Yc,{domain:["auto","auto"],unit:e.category.unit})]})})})},vle=({category:e,closeFn:t})=>{const[n]=Ge(),r=ISt(),o=kSt(e==null?void 0:e.id),i=ml({name:Vc().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:Vc().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return C(pl,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>C(ms,{children:X(Kt,{spacing:2,children:[C(Cn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),C(Cn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),C(Kt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})};zr.defaultZone=m_e;const ble=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=Ge(),i=ASt(),a=mle(),s=hle(n),[l,c]=J.useState(e?It.fromJSDate(e.date):It.now()),u=ml({value:pa().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:XS().required(r("forms.fieldRequired")),notes:Vc().max(500,r("forms.maxLength",{value:"500"}))});return C(pl,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async d=>{e?a.mutate({...d,id:e.id}):i.mutate({...d,categoryId:n}),t&&t()},children:d=>C(ms,{children:X(Kt,{spacing:2,children:[C(Cn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:d.touched.value&&!!d.errors.value,helperText:d.touched.value&&d.errors.value,...d.getFieldProps("value")}),s.isLoading?C(_o,{}):C(jS,{dateAdapter:jk,adapterLocale:o.language,children:C(pie,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:f=>{f&&d.setFieldValue("date",f.toJSDate()),c(f)},shouldDisableDate:f=>e&&Si(e.date)===Si(f.toJSDate())?!1:f?s.data.entries.some(h=>Si(h.date)===Si(f.toJSDate())):!1})}),C(Cn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:d.touched.notes&&!!d.errors.notes,helperText:d.touched.notes&&d.errors.notes,...d.getFieldProps("notes")}),C(Kt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},DSt=()=>{const[e]=Ge(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(vle,{closeFn:o})})]})},NSt=()=>{const[e]=Ge(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1),i=om(),a=parseInt(i.categoryId);return X(Mt,{children:[C(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(ble,{closeFn:o,categoryId:a})})]})},wle=y.createContext(void 0);function hn(){const e=y.useContext(wle);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e}const xle=y.createContext(void 0),xt=()=>{const e=y.useContext(xle);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function r1(e){if(typeof e!="string")throw new Error(LSt(7));return e.charAt(0).toUpperCase()+e.slice(1)}function wf(e){return e&&e.ownerDocument||document}function FSt(e){return wf(e).defaultView||window}function jSt(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const $o=typeof window<"u"?y.useLayoutEffect:y.useEffect;let tq=0;function BSt(e){const[t,n]=y.useState(e),r=t;return y.useEffect(()=>{t==null&&(tq+=1,n(`mui-${tq}`))},[t]),r}const zSt={...ch},nq=zSt.useId;function go(e){return nq!==void 0?nq():BSt(e)}function wr(e){const t=y.useRef(e);return $o(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function im(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{jSt(n,t)})},e)}const rq={};function Jc(e,t){const n=y.useRef(rq);return n.current===rq&&(n.current=e(t)),n}const VSt=[];function Zk(e){y.useEffect(e,VSt)}class Sz{constructor(){sn(this,"currentId",null);sn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});sn(this,"disposeEffect",()=>this.clear)}static create(){return new Sz}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function gb(){const e=Jc(Sz.create).current;return Zk(e.disposeEffect),e}function Sle(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=Sle(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const oq=e=>e,HSt=()=>{let e=oq;return{configure(t){e=t},generate(t){return e(t)},reset(){e=oq}}},USt=HSt(),WSt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function Cle(e,t,n="Mui"){const r=WSt[t];return r?`${n}-${r}`:`${USt.generate(e)}-${t}`}function Ple(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=Cle(e,o,n)}),r}const GSt=Object.is;function Tle(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!GSt(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function Xf(e){return y.memo(e,Tle)}const qSt={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function yn(e){return Cle("MuiDataGrid",e)}const se=Ple("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),iq=1e3;class KSt{constructor(t=iq){this.timeouts=new Map,this.cleanupTimeout=iq,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class YSt{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var rl=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(rl||{});class XSt{}function QSt(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new YSt:new KSt);const[s]=y.useState(new XSt),l=y.useRef(null),c=y.useRef();c.current=i;const u=y.useRef(null);if(!l.current&&c.current){const d=(f,h,m)=>{var g;h.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,h,m)};l.current=r.current.subscribeEvent(o,d,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));y.useEffect(()=>{if(!l.current&&c.current){const d=(f,h,m)=>{var g;h.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,h,m)};l.current=r.current.subscribeEvent(o,d,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,a])}}const JSt={registry:null},ht=QSt(JSt),ZSt={isFirst:!0};function lr(e,t,n){ht(e,t,n,ZSt)}function e1t(e){return e.acceptsApiRef}function aq(e,t){return e1t(t)?t(e):t(e.current.state)}const t1t=Object.is,Ele=Tle,n1t=()=>({state:null,equals:null,selector:null}),Ye=(e,t,n=t1t)=>{const r=Jc(n1t),o=r.current.selector!==null,[i,a]=y.useState(o?null:aq(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,Zk(()=>e.current.store.subscribe(()=>{const s=aq(e,r.current.selector);r.current.equals(r.current.state,s)||(r.current.state=s,a(s))})),i},li=e=>e.dimensions;var oO=Symbol("NOT_FOUND");function r1t(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function o1t(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function i1t(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var sq=e=>Array.isArray(e)?e:[e];function a1t(e){const t=Array.isArray(e[0])?e[0]:e;return i1t(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function s1t(e,t){const n=[],{length:r}=e;for(let o=0;ot(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return oO}function o(s,l){r(s)===oO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var u1t=(e,t)=>e===t;function d1t(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(h.value,u));f&&(u=f.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var f1t=class{constructor(e){this.value=e}deref(){return this.value}},p1t=typeof WeakRef<"u"?WeakRef:f1t,h1t=0,lq=1;function rP(){return{s:h1t,v:void 0,o:null,p:null}}function Ile(e,t={}){let n=rP();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var d;let s=n;const{length:l}=arguments;for(let f=0,h=l;f{n=rP(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function kle(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),r1t(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:h=Ile,argsMemoizeOptions:m=[],devModeChecks:g={}}=u,v=sq(f),w=sq(m),x=a1t(o),S=d(function(){return i++,c.apply(null,arguments)},...v),P=h(function(){a++;const E=s1t(x,arguments);return s=S.apply(null,E),s},...w);return Object.assign(P,{resultFunc:c,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var m1t=kle(Ile),g1t=Object.assign((e,t=m1t)=>{o1t(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>g1t});const y1t=kle({memoize:Ole,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),cq=new WeakMap;function ag(e){return"current"in e&&"instanceId"in e.current}const sg={id:"default"},Dt=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=ag(l),d=c??(u?l.current.instanceId:sg),f=u?l.current.state:l,h=e(f,d),m=t(f,d),g=n(f,d),v=r(f,d),w=o(f,d);return i(h,m,g,v,w)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=ag(l),d=c??(u?l.current.instanceId:sg),f=u?l.current.state:l,h=e(f,d),m=t(f,d),g=n(f,d),v=r(f,d);return o(h,m,g,v)};else if(e&&t&&n&&r)s=(l,c)=>{const u=ag(l),d=c??(u?l.current.instanceId:sg),f=u?l.current.state:l,h=e(f,d),m=t(f,d),g=n(f,d);return r(h,m,g)};else if(e&&t&&n)s=(l,c)=>{const u=ag(l),d=c??(u?l.current.instanceId:sg),f=u?l.current.state:l,h=e(f,d),m=t(f,d);return n(h,m)};else if(e&&t)s=(l,c)=>{const u=ag(l),d=c??(u?l.current.instanceId:sg),f=u?l.current.state:l,h=e(f,d);return t(h)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},sr=(...e)=>{const t=(n,r)=>{const o=ag(n),i=o?n.current.instanceId:r??sg,a=o?n.current.state:n,s=cq.get(i),l=s??new Map,c=l==null?void 0:l.get(e);if(l&&c)return c(a,i);const u=y1t(...e);return s||cq.set(i,l),l.set(e,u),u(a,i)};return t.acceptsApiRef=!0,t},v1t=.7,b1t=1.3,w1t={compact:v1t,comfortable:b1t,standard:1},_g=e=>e.density,o1=Dt(_g,e=>w1t[e]);let ur=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const BN={left:[],right:[]},x1t=e=>e.isRtl,_c=e=>e.columns,_u=Dt(_c,e=>e.orderedFields),ud=Dt(_c,e=>e.lookup),Xl=sr(_u,ud,(e,t)=>e.map(n=>t[n])),Qs=Dt(_c,e=>e.columnVisibilityModel),yo=sr(Xl,Qs,(e,t)=>e.filter(n=>t[n.field]!==!1)),yb=sr(yo,e=>e.map(t=>t.field)),S1t=e=>e.pinnedColumns,i1=sr(_c,S1t,yb,x1t,(e,t,n,r)=>{const o=C1t(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function C1t(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return BN;const r=(c,u)=>Array.isArray(c)?c.filter(d=>u.includes(d)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const Qf=sr(yo,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),Mle=sr(Xl,e=>e.filter(t=>t.filterable)),P1t=sr(Xl,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),T1t=sr(Xl,e=>e.some(t=>t.colSpan!==void 0));function At(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}const E1t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],O1t=e=>{const{classes:t}=e;return gn({root:["editInputCell"]},yn,t)},I1t=oe(Ov,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>W({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),k1t=y.forwardRef((e,t)=>{const n=xt(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=e,d=At(e,E1t),f=hn(),h=y.useRef(),[m,g]=y.useState(o),v=O1t(n),w=y.useCallback(async S=>{const P=S.target.value;u&&await u(S,P);const T=f.current.getColumn(i);let E=P;T.valueParser&&(E=T.valueParser(P,f.current.getRow(r),T,f)),g(E),f.current.setEditCellValue({id:r,field:i,value:E,debounceMs:l,unstable_skipValueParser:!0},S)},[f,l,i,r,u]),x=f.current.unstable_getEditCellMeta(r,i);return y.useEffect(()=>{(x==null?void 0:x.changeReason)!=="debouncedSetEditCellValue"&&g(o)},[x,o]),$o(()=>{s&&h.current.focus()},[s]),$.jsx(I1t,W({ref:t,inputRef:h,className:v.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:m??"",onChange:w,endAdornment:c?$.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),M1t=e=>$.jsx(k1t,W({},e)),Ale=(e,t)=>t&&e.length>1?[e[0]]:e,uq=(e,t)=>n=>W({},n,{sorting:W({},n.sorting,{sortModel:Ale(e,t)})}),A1t=e=>e==="desc",$1t=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=A1t(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},R1t=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),_1t=(e,t)=>{const n=e.map(r=>$1t(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>R1t(n,o,i)).map(o=>o.node.id)},dq=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},Pz=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,D1t=new Intl.Collator,N1t=(e,t)=>{const n=Pz(e,t);return n!==null?n:typeof e=="string"?D1t.compare(e.toString(),t.toString()):e-t},$le=(e,t)=>{const n=Pz(e,t);return n!==null?n:Number(e)-Number(t)},Rle=(e,t)=>{const n=Pz(e,t);return n!==null?n:e>t?1:e{const{value:E}=T.target;m(String(E)),v(!0),f.start(x.filterDebounceMs,()=>{const O=W({},t,{value:r==="number"?Number(E):E,fromInput:w});n(O),v(!1)})},[f,x.filterDebounceMs,t,r,w,n]);return y.useEffect(()=>{(t.fromInput!==w||t.value===void 0)&&m(String(t.value??""))},[w,t]),$.jsx(x.slots.baseTextField,W({id:w,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:h,onChange:S,variant:u,type:r||"text",InputProps:W({},g||l?{endAdornment:g?$.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:s},c,{inputProps:W({tabIndex:a},c==null?void 0:c.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,(P=x.slotProps)==null?void 0:P.baseTextField))}function F1t(e){return typeof e=="number"&&!Number.isNaN(e)}function _le(e){return typeof e=="function"}function Tz(e){return typeof e=="object"&&e!==null}function j1t(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function iO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Dc=(e,t,n)=>Math.max(t,Math.min(n,e));function fq(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function oy(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function z1t(e){const t=B1t(e);return(n,r)=>n+(r-n)*t()}function Dle(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const V1t=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],H1t=["key"];function Nle(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:c,variant:u="standard"}=e,d=At(e,V1t),f={color:a,error:s,helperText:l,size:c,variant:u},[h,m]=y.useState(t.value||[]),g=go(),v=xt();y.useEffect(()=>{const x=t.value??[];m(x.map(String))},[t.value]);const w=y.useCallback((x,S)=>{m(S.map(String)),n(W({},t,{value:[...S.map(P=>r==="number"?Number(P):P)]}))},[n,t,r]);return $.jsx(ec,W({multiple:!0,freeSolo:!0,options:[],filterOptions:(x,S)=>{const{inputValue:P}=S;return P==null||P===""?[]:[P]},id:g,value:h,onChange:w,renderTags:(x,S)=>x.map((P,T)=>{const E=S({index:T}),{key:O}=E,k=At(E,H1t);return $.jsx(v.slots.baseChip,W({variant:"outlined",size:"small",label:P},k),O)}),renderInput:x=>{var S;return $.jsx(v.slots.baseTextField,W({},x,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},x.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(S=v.slotProps)==null?void 0:S.baseTextField))}},d))}var Hc=function(e){return e.Cell="cell",e.Row="row",e}(Hc||{}),Jn=function(e){return e.Edit="edit",e.View="view",e}(Jn||{}),jn=function(e){return e.Edit="edit",e.View="view",e}(jn||{}),ji=function(e){return e.And="and",e.Or="or",e}(ji||{}),hu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(hu||{}),Ml=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Ml||{}),Ad=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Ad||{}),Il=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(Il||{});function Lle(e){return e.field!==void 0}const Wx=()=>({items:[],logicOperator:ji.And,quickFilterValues:[],quickFilterLogicOperator:ji.And});function Fle(e){return{current:e.current.getPublicApi()}}let w0;function U1t(){if(w0!==void 0)return w0;try{w0=new Function("return true")()}catch{w0=!1}return w0}const zN=(e,t)=>{const n=W({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=ud(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},Ez=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?W({},e,{items:o.map(s=>zN(s,n))}):e.items!==o?W({},e,{items:o}):e},pq=(e,t,n)=>r=>W({},r,{filterModel:Ez(e,t,n)}),Gx=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,jle=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const d=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(f=>d(f,void 0,n,t)):d(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=Gx(r));const i=W({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(d=>d.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=Fle(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:d=>{let f=t.current.getRowValue(d,n);return o&&(f=Gx(f)),c(f,d,n,l)}}};let hq=1;const W1t=(e,t,n)=>{const{items:r}=e,o=r.map(s=>jle(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!U1t())return(s,l)=>{const c={};for(let u=0;u=ne)return h;var ve=M-Em(V);if(ve<1)return V;var Ee=he?xd(he,0,ve).join(""):h.slice(0,ve);if(G===n)return Ee+V;if(he&&(ve+=Ee.length-ve),EA(G)){if(h.slice(ve).search(G)){var Ge,qe=Ee;for(G.global||(G=VM(G.source,Jn(Ne.exec(G))+"g")),G.lastIndex=0;Ge=G.exec(qe);)var Je=Ge.index;Ee=Ee.slice(0,Je===n?ve:Je)}}else if(h.indexOf(Ma(G),ve)!=ve){var ft=Ee.lastIndexOf(G);ft>-1&&(Ee=Ee.slice(0,ft))}return Ee+V}function Oge(h){return h=Jn(h),h&&Eo.test(h)?h.replace(jn,nde):h}var Ige=Rm(function(h,b,M){return h+(M?" ":"")+b.toUpperCase()}),kA=P5("toUpperCase");function SH(h,b,M){return h=Jn(h),b=M?n:b,b===n?Que(h)?ide(h):Vue(h):h.match(b)||[]}var CH=gn(function(h,b){try{return Ia(h,n,b)}catch(M){return TA(M)?M:new Xt(M)}}),kge=su(function(h,b){return ws(b,function(M){M=pc(M),iu(h,M,CA(h[M],h))}),h});function Mge(h){var b=h==null?0:h.length,M=Lt();return h=b?_r(h,function(V){if(typeof V[1]!="function")throw new xs(a);return[M(V[0]),V[1]]}):[],gn(function(V){for(var G=-1;++GF)return[];var M=q,V=ui(h,q);b=Lt(b),h-=q;for(var G=jM(V,b);++M0||b<0)?new In(M):(h<0?M=M.takeRight(-h):h&&(M=M.drop(h)),b!==n&&(b=ln(b),M=b<0?M.dropRight(-b):M.take(b-h)),M)},In.prototype.takeRightWhile=function(h){return this.reverse().takeWhile(h).reverse()},In.prototype.toArray=function(){return this.take(q)},dc(In.prototype,function(h,b){var M=/^(?:filter|find|map|reject)|While$/.test(b),V=/^(?:head|last)$/.test(b),G=J[V?"take"+(b=="last"?"Right":""):b],ne=V||/^find/.test(b);G&&(J.prototype[b]=function(){var he=this.__wrapped__,ve=V?[1]:arguments,Ee=he instanceof In,Ge=ve[0],qe=Ee||tn(he),Je=function(Cn){var Mn=G.apply(J,md([Cn],ve));return V&&ft?Mn[0]:Mn};qe&&M&&typeof Ge=="function"&&Ge.length!=1&&(Ee=qe=!1);var ft=this.__chain__,Rt=!!this.__actions__.length,Bt=ne&&!ft,dn=Ee&&!Rt;if(!ne&&qe){he=dn?he:new In(this);var zt=h.apply(he,ve);return zt.__actions__.push({func:eC,args:[Je],thisArg:n}),new Ss(zt,ft)}return Bt&&dn?h.apply(this,ve):(zt=this.thru(Je),Bt?V?zt.value()[0]:zt.value():zt)})}),ws(["pop","push","shift","sort","splice","unshift"],function(h){var b=E1[h],M=/^(?:push|sort|unshift)$/.test(h)?"tap":"thru",V=/^(?:pop|shift)$/.test(h);J.prototype[h]=function(){var G=arguments;if(V&&!this.__chain__){var ne=this.value();return b.apply(tn(ne)?ne:[],G)}return this[M](function(he){return b.apply(tn(he)?he:[],G)})}}),dc(In.prototype,function(h,b){var M=J[b];if(M){var V=M.name+"";rr.call(Mm,V)||(Mm[V]=[]),Mm[V].push({name:b,func:M})}}),Mm[q1(n,w).name]=[{name:"wrapper",func:n}],In.prototype.clone=Ode,In.prototype.reverse=Ide,In.prototype.value=kde,J.prototype.at=ohe,J.prototype.chain=ihe,J.prototype.commit=ahe,J.prototype.next=she,J.prototype.plant=che,J.prototype.reverse=uhe,J.prototype.toJSON=J.prototype.valueOf=J.prototype.value=dhe,J.prototype.first=J.prototype.head,_b&&(J.prototype[_b]=lhe),J},Om=ade();pp?((pp.exports=Om)._=Om,AM._=Om):Qo._=Om}).call(Bi)})(mO,mO.exports);var Lxt=mO.exports;function XN({callback:e}){const[t,n]=y.useState(null),[r,o]=y.useState(""),[i,a]=y.useState(!0),[s,l]=y.useState([]),[c,u]=Ue(),d=y.useMemo(()=>dk(f=>FDe(f,u.language,i).then(p=>l(p)),200),[u.language,i]);return y.useEffect(()=>{if(r===""){l(t?[t]:[]);return}return d(r),()=>{}},[t,r,d]),Q(Mt,{children:[C(oc,{id:"exercise-name-autocomplete",getOptionLabel:f=>f.value,"data-testid":"autocomplete",filterOptions:f=>f,options:s,autoComplete:!0,includeInputInList:!0,filterSelectedOptions:!0,value:t,noOptionsText:c("noResults"),isOptionEqualToValue:(f,p)=>f.value===p.value,onChange:(f,p)=>{l(p?[p,...s]:s),n(p),e(p)},onInputChange:(f,p)=>{o(p)},renderInput:f=>C(yn,{...f,label:c("exercises.searchExerciseName"),fullWidth:!0,InputProps:{...f.InputProps,startAdornment:Q(Mt,{children:[C(po,{position:"start",children:C(XB,{})}),f.InputProps.startAdornment]})}}),renderOption:(f,p)=>UY("li",{...f,key:`exercise${p.data.id}`,"data-testid":`autocompleter-result-${p.data.id}`},Q(ls,{disablePadding:!0,component:"div",children:[C(Gi,{children:p.data.image?C(ic,{alt:"",src:`${lj}${p.data.image}`,variant:"rounded"}):C(id,{fontSize:"large"})}),C(wo,{primary:p.value,primaryTypographyProps:{style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},secondary:p.data.category})]}))}),u.language!==Gy&&C(LI,{children:C(Uy,{control:C(qf,{checked:i,onChange:(f,p)=>a(p)}),label:c("alsoSearchEnglish")})})]})}function Fxt(e){var d,f;const[t,n]=Y.useState(null),[r,o]=Y.useState(null),[i]=Ue(),a=dm(),s=()=>{o(null),n(null)},l=async()=>{var p;await BDe((p=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:p.id),e.onClose(),e.onChangeLanguage()},c=async(p=!1)=>{p?await GU(e.currentExercise.id,r==null?void 0:r.uuid):await GU(e.currentExercise.id),e.onClose(),a("../overview")},u=async p=>{const m=p!==void 0?p:t;if(m!==null)try{const g=await YI(m);o(g)}catch{o(null)}};return Q(Mt,{children:[C(rIe,{id:"alert-dialog-title",children:i("delete")}),Q(bZ,{children:[C("p",{children:i("exercises.deleteExerciseBody",{name:(d=e.currentExercise.getTranslation(e.currentLanguage))==null?void 0:d.name,language:(f=e.currentLanguage)==null?void 0:f.nameLong})}),C("p",{children:i("cannotBeUndone")}),C("p",{children:C("b",{children:i("exercises.replacements")})}),C("p",{children:i("exercises.replacementsInfoText")}),C("p",{children:i("exercises.replacementsSearch")}),C(XN,{callback:p=>{p!==null&&(n(p.data.base_id),u(p.data.base_id))}}),C(yn,{"data-testid":"exercise-id-field",id:"foo",label:"Exercise ID",onBlur:()=>u(),onChange:async p=>{n(p.target.value!==""?parseInt(p.target.value):null)},value:t??"",InputProps:{endAdornment:C(po,{position:"start",children:C(kn,{onClick:()=>u(),children:C(Gyt,{})})})},fullWidth:!0,variant:"standard"}),r===null&&C(Mt,{children:C("p",{children:C("i",{children:i("exercises.noReplacementSelected")})})}),r!==null&&Q(Mt,{children:[Q("p",{children:["Selected exercise for replacement:",C(ac,{title:i("copyToClipboard"),children:C(kn,{onClick:()=>navigator.clipboard.writeText(r.id.toString()),children:C(Xyt,{})})})]}),Q(ls,{disablePadding:!0,children:[C(XF,{children:C(ic,{children:r.mainImage?C(ic,{alt:"",src:`${lj}${r.mainImage.url}`,variant:"rounded"}):C(id,{})})}),C(wo,{primary:r.getTranslation().name,secondary:`${r.id} (${r.uuid})`}),C(kn,{onClick:s,children:C(Kyt,{})})]})]})]}),Q(vZ,{children:[C(gt,{onClick:()=>e.onClose(),children:i("cancel")}),C(gt,{"data-testid":"button-delete-translation",size:"small",onClick:l,variant:"contained",children:i("exercises.deleteTranslation")}),C(gt,{"data-testid":"button-delete-all",size:"small",onClick:()=>c(),variant:"contained",children:i("exercises.deleteExerciseFull")}),C(gt,{"data-testid":"button-delete-and-replace",size:"small",disabled:r===null,onClick:()=>c(!0),variant:"contained",children:i("exercises.deleteExerciseReplace")})]})]})}const jxt="_root_l288f_1",Bxt="_detail_language_l288f_4",zxt="_detail_l288f_4",Vxt="_detail_arrow_l288f_18",Hxt="_languages_l288f_28",Uxt="_language_l288f_28",Wxt="_language_menu_l288f_40",Gxt="_header_l288f_52",qxt="_toolbar_l288f_55",Kxt="_dots_l288f_68",Mp={root:jxt,detail_language:Bxt,detail:zxt,detail_arrow:Vxt,languages:Hxt,language:Uxt,language_menu:Wxt,header:Gxt,toolbar:qxt,dots:Kxt},Yxt=({exercise:e,languages:t,changeLanguage:n,language:r,setEditMode:o,editMode:i})=>{var T,E,O;const[a,s]=y.useState(null),[l,c]=Y.useState(!1),u=!!a,[d]=Ue(),f=fy(yh.DELETE_EXERCISE),p=fy(yh.EDIT_EXERCISE),m=Jc(),g=m.isSuccess&&m.data===null;let v=!1;m.isSuccess&&p.isSuccess&&(v=p.data||m.data!==null&&m.data.isTrustworthy);const w=k=>{s(k.currentTarget)},x=()=>{s(null)},S=k=>{n(k),x()},P=t.map(k=>Q(Yt,{onClick:()=>S(k),selected:(r==null?void 0:r.id)===k.id,children:[C(wo,{children:k.nameLong}),C(Gi,{children:e.availableLanguages.includes(k.id)?C(avt,{}):C(Ji,{})})]},k.nameShort));return C(Be,{container:!0,children:C(Be,{size:12,children:Q("div",{className:Mp.root,children:[C(yZ,{open:l,onClose:()=>c(!1),children:C(Fxt,{onClose:()=>c(!1),onChangeLanguage:()=>n(t[0]),currentExercise:e,currentLanguage:r})}),Q("div",{className:Mp.detail_language,children:[Q("div",{className:Mp.detail,children:[C(Zl,{to:"../overview",children:d("exercises.exercises")})," > ",(T=e.getTranslation(r))==null?void 0:T.name]}),C("div",{className:Mp.languages,children:Q("div",{className:Mp.language,children:[C(gt,{size:"small",id:"basic-button",onClick:w,startIcon:C(l1,{}),children:r==null?void 0:r.nameLong}),Q(ms,{id:"basic-menu",anchorEl:a,open:u,onClose:x,MenuListProps:{"aria-labelledby":"basic-button"},sx:{padding:20},children:[C(Yt,{disabled:!0,children:d("exercises.changeExerciseLanguage")}),C(ss,{}),P]})]})})]}),Q("div",{className:Mp.header,children:[C(ct,{gutterBottom:!0,variant:"h2",margin:0,sx:{mt:2},children:(E=e.getTranslation(r))==null?void 0:E.name}),!g&&Q("nav",{className:Mp.toolbar,children:[f.isSuccess&&f.data&&(r==null?void 0:r.id)===((O=e.getTranslation(r))==null?void 0:O.language)&&C(gt,{onClick:()=>c(!0),children:d("delete")}),v&&C(gt,{onClick:()=>o(!0),disabled:i,children:"EDIT"}),C(gt,{onClick:()=>o(!1),disabled:!i,children:"VIEW"})]})]}),Q(Gt,{direction:"row",spacing:1,mt:2,children:[C(kh,{label:d(Xi(e.category.name)),size:"small"}),e.equipment.map(k=>C(kh,{label:d(Xi(k.name)),variant:"outlined",size:"small"},k.id))]})]})})})},ni=()=>C(Rn,{sx:{height:40}}),Xxt=()=>{var g;const[e,t]=y.useState(),[n,r]=y.useState(),[o,i]=y.useState(!1),a=fm(),s=a.baseID?Lxt.parseInt(a.baseID):0;Ue();const l=dm(),c=lM(),u=Co({queryKey:[y_e,s],queryFn:()=>YI(s),enabled:c.isSuccess}),d=Co({queryKey:[g_e,(g=u.data)==null?void 0:g.variationId],queryFn:()=>{var v;return DDe((v=u.data)==null?void 0:v.variationId)},enabled:u.isSuccess});if(u.isError||c.isError||d.isError)return l("/not-found"),null;const f=v=>{var x;const w=Lee(v.nameShort,c.data);t(w),r((x=u.data)==null?void 0:x.getTranslation(v))},p=d.isSuccess?d.data.filter(v=>v.id!==s):[];let m;return u.isSuccess&&c.isSuccess&&(m=o?C(Axt,{exercise:u.data,language:e}):C(Nxt,{exercise:u.data,language:e,variations:p,setEditMode:i})),Q(Mt,{children:[u.isSuccess&&c.isSuccess&&C(Yu,{children:C(Yxt,{exercise:u.data,languages:c.data,changeLanguage:f,language:e,setEditMode:i,editMode:o})}),C(ni,{}),Q(Yu,{maxWidth:"lg",children:[u.isLoading&&c.isLoading&&C(Za,{}),m]})]})};function Tle(e){const[t]=Ue(),[n,r,o]=vl(e.fieldName),[i,a]=y.useState(""),s=u=>{o.setValue(n.value.filter((d,f)=>f!==u))},l=(u,d)=>{n.value[u]=d,o.setValue(n.value)},c=()=>{n.value.push(i),o.setValue(n.value),a("")};return Q(Mt,{children:[C(Be,{size:12,children:C(yn,{fullWidth:!0,label:t("exercises.newNote"),sx:{mb:3},variant:"standard",value:i,onChange:u=>a(u.target.value),error:r.touched&&!!r.error,helperText:r.touched&&r.error?r.error:t("exercises.notesHelpText"),InputProps:{endAdornment:C(po,{position:"end",children:C(kn,{onClick:c,children:C(Ji,{})})})}})}),n.value.map((u,d)=>C(yn,{fullWidth:!0,value:u,onChange:f=>l(d,f.target.value),sx:{mt:2},variant:"standard",error:r.touched&&!!r.error,InputProps:{endAdornment:C(po,{position:"end",children:C(kn,{onClick:()=>s(d),children:C(hz,{})})})}},d))]})}const Qxt=({onContinue:e,onBack:t})=>{const[n]=Ue(),[r,o]=Pb(),i=bl({description:Ez(n),notes:ble(n)});return C(yl,{initialValues:{description:r.descriptionEn,notes:r.notesEn},validationSchema:i,onSubmit:a=>{o(_wt(a.description)),o(Dwt(a.notes)),e()},children:C(gs,{children:Q(Gt,{children:[C(kz,{fieldName:"description"}),C(ni,{}),C(Tle,{fieldName:"notes"}),C(Be,{container:!0,children:C(Be,{display:"flex",justifyContent:"end",size:12,children:C(Rn,{sx:{mb:2},children:Q("div",{children:[C(gt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})})},Jxt=({onContinue:e,onBack:t})=>{const[n]=Ue(),r=lM(),[o,i]=Pb(),[a,s]=y.useState(o.languageId!==null),l=bl(a?{description:Ez(n),name:Pz(n),alternativeNames:Tz(n),notes:ble(n),language:pa().required()}:{});return C(yl,{initialValues:{name:o.nameI18n,alternativeNames:o.alternativeNamesI18n,description:o.descriptionI18n,language:o.languageId===null?"":o.languageId,notes:o.notesI18n},validationSchema:l,onSubmit:c=>{i(Lwt(c.name)),i(Fwt(c.description)),i(Bwt(c.alternativeNames)),i(qwt(c.language===""?null:c.language)),i(jwt(c.notes)),e()},children:c=>Q(gs,{children:[Q(Gt,{spacing:2,children:[C(LI,{children:C(Uy,{checked:a,onClick:()=>s(!a),control:C(qf,{}),label:n("exercises.translateExerciseNow")})}),a&&Q(Mt,{children:[r.isLoading?C(Rn,{children:C(Za,{})}):Q(qh,{fullWidth:!0,children:[C(Kh,{id:"label-language",children:n("language")}),C(Gf,{labelId:"label-language",id:"language",value:c.getFieldProps("language").value,onChange:u=>{c.setFieldValue(c.getFieldProps("language").name,u.target.value)},label:n("language"),error:!!(c.touched.language&&c.errors.language),children:r.data.filter(u=>u.id!==Wy).map(u=>Q(Yt,{value:u.id,children:[u.nameShort," - ",u.nameLong]},u.id))})]}),C(Cz,{fieldName:"name"}),C(Sz,{fieldName:"alternativeNames"}),C(kz,{fieldName:"description"}),C(ni,{}),C(Tle,{fieldName:"notes"})]})]}),C(Be,{container:!0,children:C(Be,{display:"flex",justifyContent:"end",size:12,children:C(Rn,{sx:{mb:2},children:Q("div",{children:[C(gt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",type:"submit",sx:{mt:1,mr:1},children:n("continue")})]})})})})]})})};function Zxt(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return C(yn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authors"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function eSt(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return C(yn,{fullWidth:!0,id:e.fieldName,label:t("licenses.authorProfile"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function tSt(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return C(yn,{fullWidth:!0,id:e.fieldName,label:t("licenses.derivativeSourceUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:t("licenses.derivativeSourceUrlHelper")||r.touched&&r.error,...n})}function nSt(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return C(yn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalObjectUrl"),variant:"standard",placeholder:"https://",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function rSt(e){const[t]=Ue(),[n,r]=vl(e.fieldName);return C(yn,{fullWidth:!0,id:e.fieldName,label:t("licenses.originalTitle"),variant:"standard",error:r.touched&&!!r.error,helperText:r.touched&&r.error,...n})}function oSt(e){const[t]=Ue(),[n,r]=y.useState(xu.PHOTO),[o,i,a]=vl(e.fieldName);return Q(iRe,{value:n,exclusive:!0,fullWidth:!0,onChange:(l,c)=>{r(c),a.setValue(c)},"aria-label":"text alignment",children:[C(c0,{value:xu.PHOTO,children:Q(Gt,{justifyContent:"center",alignItems:"center",children:[C(ivt,{}),C(ct,{variant:"caption",children:t("exercises.imageStylePhoto")})]})}),C(c0,{value:xu.THREE_D,children:Q(Gt,{justifyContent:"center",alignItems:"center",children:[C(evt,{}),C(ct,{variant:"caption",children:t("exercises.imageStyle3D")})]})}),C(c0,{value:xu.LINE_ART,children:Q(Gt,{justifyContent:"center",alignItems:"center",children:[C(tvt,{}),C(ct,{variant:"caption",children:t("exercises.imageStyleLine")})]})}),C(c0,{value:xu.LOW_POLY,children:Q(Gt,{justifyContent:"center",alignItems:"center",children:[C(nvt,{}),C(ct,{variant:"caption",children:t("exercises.imageStyleLowPoly")})]})}),C(c0,{value:xu.OTHER,children:Q(Gt,{justifyContent:"center",alignItems:"center",children:[C(rvt,{}),C(ct,{variant:"caption",children:t("exercises.imageStyleOther")})]})})]})}const iSt=({onContinue:e,onBack:t})=>{const[n]=Ue(),r=Jc(),[o,i]=Pb(),[a,s]=y.useState(o.images),[l,c]=y.useState(void 0),[u,d]=Y.useState(!1),f=()=>d(!1);y.useEffect(()=>{i(Kwt(a))},[i,a]);const p=x=>{var T;if(!((T=x.target.files)!=null&&T.length))return;const[S]=x.target.files,P=URL.createObjectURL(S);d(!0),c({url:P,file:S,author:"",authorUrl:"",title:"",derivativeSourceUrl:"",objectUrl:"",style:xu.PHOTO.toString()})},m=x=>{s(a.concat({url:l==null?void 0:l.url,file:l==null?void 0:l.file,author:x.author,authorUrl:x.authorUrl,title:x.title,derivativeSourceUrl:x.derivativeSourceUrl,objectUrl:x.objectUrl,style:x.imageStyle.toString()})),f()},g=x=>{const S=a.filter(P=>P.url!==x);s(S)},v=()=>{e()};return Q("div",{children:[C(Bv,{open:u,onClose:f,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(Rn,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:600,bgcolor:"background.paper",boxShadow:24,p:4},children:[C(ct,{id:"modal-modal-title",variant:"h6",component:"h2",children:n("exercises.imageDetails")}),Q(Be,{container:!0,spacing:2,children:[C(Be,{size:4,children:l&&C("img",{style:{width:"100%"},src:l.url,alt:"",loading:"lazy"})}),C(Be,{size:8,children:C(yl,{initialValues:{title:"",objectUrl:"",author:r.isSuccess?r.data.username:"",authorUrl:"",derivativeSourceUrl:"",imageStyle:xu.PHOTO},onSubmit:x=>{console.log(x),m(x)},children:x=>Q(gs,{children:[Q(Gt,{spacing:2,children:[C(rSt,{fieldName:"title"}),C(nSt,{fieldName:"objectUrl"}),C(Zxt,{fieldName:"author"}),C(eSt,{fieldName:"authorUrl"}),C(tSt,{fieldName:"derivativeSourceUrl"}),C(oSt,{fieldName:"imageStyle"}),Q(qu,{icon:C(Dse,{fontSize:"inherit"}),severity:"info",children:["By submitting this image, you agree to release it under the ",C("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"})," license. The image must be either your own work or the author must have released in under a license compatible with CC BY-SA 4.0."]})]}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("add")})})]})})})]})]})}),C(ct,{children:n("exercises.compatibleImagesCC")}),Q(Gt,{direction:"row",justifyContent:"center",children:[Q("div",{children:[C("label",{htmlFor:"camera-input",children:C(qyt,{fontSize:"large",sx:{m:2}})}),C("input",{style:{display:"none"},id:"camera-input",type:"file",accept:"image/*",capture:"environment",onChange:p})]}),Q("div",{children:[C("label",{htmlFor:"image-input",children:C(Yyt,{fontSize:"large",sx:{m:2}})}),C("input",{type:"file",accept:"image/*",name:"image-file",id:"image-input",style:{display:"none"},onChange:p})]})]}),C(CZ,{cols:3,style:{maxHeight:"400px"},children:a.map(x=>Q(PZ,{children:[C("img",{style:{maxHeight:"400px",maxWidth:"400px"},src:x.url,alt:"",loading:"lazy"}),C(nke,{title:x.title,subtitle:x.author,actionIcon:C(kn,{onClick:()=>g(x.url),sx:{color:"white"},children:C(Qyt,{})})})]},x.url))}),C(ct,{children:n("forms.supportedImageFormats")}),C(Be,{container:!0,children:C(Be,{display:"flex",justifyContent:"end",size:12,children:C(Rn,{sx:{mb:2},children:Q(Mt,{children:[C(gt,{onClick:t,sx:{mt:1,mr:1},children:n("goBack")}),C(gt,{variant:"contained",onClick:v,sx:{mt:1,mr:1},children:n("continue")})]})})})})]})},aSt="exercisecomment",cq=async e=>{const t=new Aee,n=Pt(aSt),r=await dt.post(n,t.toJson(e),{headers:kt()});return t.fromJson(r.data)},sSt="variation",lSt=async()=>{const e=Pt(sSt);return(await dt.post(e,{},{headers:kt()})).data.id},cSt=({onBack:e})=>{const[t,n]=Ue(),[r]=Pb(),o=dm(),i=aM(),a=lM(),s=d1(),l=sM(),c=Jc(),[u,d]=y.useState("initial"),f=async()=>{d("loading");let m;r.newVariationBaseId!==null?m=await lSt():m=r.variationId;const g=await NDe(r.category,r.equipment,r.muscles,r.musclesSecondary,m,c.data.username),v=await D_(g,Wy,r.nameEn,r.descriptionEn,c.data.username);for(const w of r.alternativeNamesEn)await N_(v.id,w);for(const w of r.images)await jee({exerciseId:g,image:w.file,imageData:w});for(const w of r.notesEn)await cq(new __(null,v.id,w));if(r.languageId!==null){const w=await D_(g,r.languageId,r.nameI18n,r.descriptionI18n,c.data.username);for(const x of r.alternativeNamesI18n)await N_(w.id,x);for(const x of r.notesI18n)await cq(new __(null,w.id,x))}console.log("Exercise created"),d("done")},p=()=>{o(Tn(Sn.EXERCISE_OVERVIEW,n.language))};return l.isLoading||a.isLoading||s.isLoading||i.isLoading?C(Po,{}):Q(Mt,{children:[C(ct,{variant:"h6",children:t("exercises.step1HeaderBasics")}),C(Ju,{children:C(Xu,{children:Q(Qu,{children:[Q(Qt,{children:[C(ke,{children:t("name")}),C(ke,{children:r.nameEn})]}),Q(Qt,{children:[C(ke,{children:t("exercises.alternativeNames")}),C(ke,{children:r.alternativeNamesEn.join(", ")})]}),Q(Qt,{children:[C(ke,{children:t("description")}),C(ke,{children:r.descriptionEn})]}),Q(Qt,{children:[C(ke,{children:t("exercises.notes")}),C(ke,{children:r.notesEn.map(m=>Q(Mt,{children:[m,C("br",{})]}))})]}),Q(Qt,{children:[C(ke,{children:t("category")}),C(ke,{children:t(Xi(i.data.find(m=>m.id===r.category).name))})]}),Q(Qt,{children:[C(ke,{children:t("exercises.equipment")}),C(ke,{children:r.equipment.map(m=>t(Xi(l.data.find(g=>g.id===m).name))).join(", ")})]}),Q(Qt,{children:[C(ke,{children:t("exercises.muscles")}),C(ke,{children:r.muscles.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),Q(Qt,{children:[C(ke,{children:t("exercises.secondaryMuscles")}),C(ke,{children:r.musclesSecondary.map(m=>s.data.find(g=>g.id===m).getName(t)).join(", ")})]}),Q(Qt,{children:[C(ke,{children:t("exercises.variations")}),Q(ke,{children:[r.variationId," / ",r.newVariationBaseId]})]})]})})}),r.images.length>0&&C(CZ,{cols:3,style:{maxHeight:"200px"},children:r.images.map(m=>C(PZ,{children:C("img",{style:{maxHeight:"200px",maxWidth:"200px"},src:m.url,alt:"",loading:"lazy"})},m.url))}),r.languageId!==null&&Q(Mt,{children:[C(ct,{variant:"h6",sx:{mt:3},children:a.data.find(m=>m.id===r.languageId).nameLong}),C(Ju,{children:C(Xu,{children:Q(Qu,{children:[Q(Qt,{children:[C(ke,{children:t("name")}),C(ke,{children:r.nameI18n})]}),Q(Qt,{children:[C(ke,{children:t("exercises.alternativeNames")}),C(ke,{children:r.alternativeNamesI18n.join(", ")})]}),Q(Qt,{children:[C(ke,{children:t("description")}),C(ke,{children:r.descriptionI18n})]}),Q(Qt,{children:[C(ke,{children:t("exercises.notes")}),C(ke,{children:r.notesI18n.map(m=>Q(Mt,{children:[m,C("br",{})]}))})]})]})})})]}),u!=="done"?C(qu,{severity:"info",sx:{mt:2},children:t("exercises.checkInformationBeforeSubmitting")}):Q(qu,{severity:"success",sx:{mt:2},children:[C(BT,{children:t("success")}),t("exercises.cacheWarning")]}),C(Be,{container:!0,children:C(Be,{display:"flex",justifyContent:"end",size:12,children:C(Rn,{sx:{mb:2},children:Q("div",{children:[u!=="done"&&C(gt,{onClick:e,sx:{mt:1,mr:1},children:t("goBack")}),u!=="done"&&C(gt,{variant:"contained",disabled:u!=="initial",onClick:f,sx:{mt:1,mr:1},color:"info",children:t("exercises.submitExercise")}),u==="done"&&Q(gt,{variant:"contained",onClick:p,sx:{mt:1,mr:1},color:"success",children:[t("overview"),C(ovt,{})]})]})})})})]})},uSt=()=>{const[e]=Ue(),[t,n]=Y.useState(0),r=()=>{n(i=>i+1)},o=()=>{n(i=>i-1)};return C(Xwt,{children:Q(Yu,{maxWidth:"md",children:[C(Gt,{direction:"row",children:C(ct,{gutterBottom:!0,variant:"h3",component:"div",children:e("exercises.contributeExercise")})}),C(Rn,{children:Q(jAe,{activeStep:t,orientation:"vertical",children:[Q(Wm,{children:[C(Nd,{children:e("exercises.step1HeaderBasics")}),C(Gm,{children:C(Qwt,{onContinue:r,onBack:o})})]},1),Q(Wm,{children:[C(Nd,{children:e("exercises.variations")}),C(Gm,{children:C(Zwt,{onContinue:r,onBack:o})})]},2),Q(Wm,{children:[C(Nd,{children:e("description")}),C(Gm,{children:C(Qxt,{onContinue:r,onBack:o})})]},3),Q(Wm,{children:[C(Nd,{children:e("translation")}),C(Gm,{children:C(Jxt,{onContinue:r,onBack:o})})]},4),Q(Wm,{children:[C(Nd,{children:e("images")}),C(Gm,{children:C(iSt,{onContinue:r,onBack:o})})]},5),Q(Wm,{children:[C(Nd,{children:e("overview")}),C(Gm,{children:C(cSt,{onBack:o})})]},6)]})})]})})},dSt=()=>{const[e]=Ue(),t=Mz();return Q(Yu,{maxWidth:"md",children:[C(ct,{variant:"h3",children:e("exercises.notEnoughRightsHeader")}),Q(Rn,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(ct,{mb:2,children:e("exercises.notEnoughRights",{days:d_e})}),!t.anonymous&&!t.emailVerified&&C(gt,{variant:"contained",href:"/user/preferences",endIcon:C(Wyt,{}),children:e("preferences")})]})]})},fSt=()=>{const e=Mz();return C(Mt,{children:e.canContribute?C(uSt,{}):C(dSt,{})})},pSt=()=>C("div",{children:"Add Weight Page"}),hSt=()=>C("div",{children:"Calendar Page"}),mSt=()=>C("div",{children:"Calories Calculator Page"}),gSt=()=>C("div",{children:"Equipments Page"}),ySt=()=>C("div",{children:"Gallery Page"}),vSt=()=>C("div",{children:"Ingredients Page"}),bSt=()=>C("div",{children:"Login Page"}),wSt=()=>C("div",{children:"Preferences Page"}),xSt=()=>C("div",{children:"Public Template"}),SSt=()=>C("div",{children:"RestApi Page"}),CSt=()=>C("div",{children:"Your Template"}),PSt=({weight:e})=>{const t=mbt(),[n]=Ue(),[r,o]=Y.useState(null),[i,a]=Y.useState(!1),s=!!r,l=m=>{o(m.currentTarget)},c=()=>{u(),f()},u=()=>{o(null)},d=()=>{t.mutate(e.id),o(null)},f=()=>a(!0),p=()=>a(!1);return Q("div",{children:[C(gt,{onClick:l,children:C(Uyt,{})}),Q(ms,{anchorEl:r,open:s,onClose:u,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:c,children:n("edit")}),C(Yt,{onClick:d,children:n("delete")})]}),C(ta,{title:n("edit"),isOpen:i,closeFn:p,children:C(Sb,{weightEntry:e,closeFn:p})})]})},TSt=()=>{const[e]=Ue(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[C(Gh,{color:"primary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(Sb,{closeFn:o})})]})},ESt=e=>e.map((t,n)=>n===0?{entry:t,change:0,days:Math.abs(t.date.getTime()-t.date.getTime())/(1e3*60*60*24)}:{entry:t,change:e[n].weight-e[n-1].weight,days:Math.abs(t.date.getTime()-e[n-1].date.getTime())/(1e3*60*60*24)}),OSt=hle(e=>({table:{"& .MuiPaper-root":{border:"1px solid #bababa"}}})),ISt=({weights:e})=>{const t=[10,50,100],[n]=Ue(),r=OSt(),o=ESt(e),[i,a]=y.useState(t[0]),[s,l]=y.useState(0),c=(d,f)=>{l(f)},u=d=>{a(parseInt(d.target.value,10)),l(0)};return Q("div",{className:r.table,children:[Q(Ju,{children:[Q(Xu,{sx:{minWidth:650},"aria-label":"simple table",children:[C(Yh,{children:Q(Qt,{children:[C(ke,{align:"center",children:n("date")}),C(ke,{align:"center",children:n("weight")}),C(ke,{align:"center",children:n("difference")}),C(ke,{align:"center",children:n("days")}),C(ke,{align:"center"})]})}),C(Qu,{children:o.slice(s*i,s*i+i).map(d=>Q(Qt,{sx:{"&:last-child td, &:last-child th":{border:0}},children:[C(ke,{component:"th",scope:"row",align:"center",children:d.entry.date.toLocaleDateString()}),C(ke,{align:"center",children:d.entry.weight}),C(ke,{align:"center",children:+d.change.toFixed(2)}),C(ke,{align:"center",children:d.days}),C(ke,{align:"center",children:C(PSt,{weight:d.entry})})]},d.entry.date.toLocaleDateString()))})]}),C(ZF,{rowsPerPageOptions:t,component:"div",count:o.length,rowsPerPage:i,page:s,onPageChange:c,onRowsPerPageChange:u})]}),C(TSt,{})]})},kSt=()=>{const[e]=Ue(),[t,n]=y.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[C(Gh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(Sb,{closeFn:o})})]})},MSt=({currentFilter:e,onFilterChange:t})=>{const[n]=Ue(),r=Ei(),o=i=>{e!==i&&t(i)};return Q(kEe,{variant:"outlined",sx:{mb:2},children:[C(gt,{onClick:()=>o(""),color:e===""?"primary":"inherit",variant:e===""?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("all")}),C(gt,{onClick:()=>o("lastYear"),color:e==="lastYear"?"primary":"inherit",variant:e==="lastYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastYear")}),C(gt,{onClick:()=>o("lastHalfYear"),color:e==="lastHalfYear"?"primary":"inherit",variant:e==="lastHalfYear"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastHalfYear")}),C(gt,{onClick:()=>o("lastMonth"),color:e==="lastMonth"?"primary":"inherit",variant:e==="lastMonth"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastMonth")}),C(gt,{onClick:()=>o("lastWeek"),color:e==="lastWeek"?"primary":"inherit",variant:e==="lastWeek"?"contained":"outlined",sx:{fontFamily:r.typography.fontFamily},children:n("lastWeek")})]})},pm=e=>Q(Yu,{maxWidth:"lg",children:[Q(Be,{container:!0,spacing:2,children:[C(Be,{sx:{mb:2},size:8,children:Q(Gt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(ct,{gutterBottom:!0,variant:"h3",children:e.title}),e.optionsMenu]})}),C(Be,{size:{xs:12,sm:8},children:e.mainContent}),C(Be,{size:{xs:12,sm:4},children:e.sideBar})]}),e.fab]}),ASt=()=>{const[e]=Ue(),[t,n]=y.useState("lastYear"),r=oM(t),o=i=>{n(i)};return r.isLoading?C(Po,{}):C(pm,{title:e("weight"),mainContent:Q(Gt,{spacing:2,children:[C(MSt,{currentFilter:t,onFilterChange:o}),r.data.length===0&&C(zI,{}),r.data.length!==0&&Q(Mt,{children:[C(mle,{weights:r.data}),C(Rn,{sx:{mt:4}}),C(ISt,{weights:r.data})]})]}),fab:C(kSt,{})})},$St=()=>{const{i18n:e}=Ue(),[t,n]=Y.useState(null);return Q(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Routines"}),Q(ms,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(Yt,{component:Zl,to:Tn(Sn.ROUTINE_OVERVIEW,e.language),children:"Routine overview"}),C(Yt,{component:Zl,to:Tn(Sn.EXERCISE_OVERVIEW,e.language),children:"Exercise overview"}),C(Yt,{component:Zl,to:Tn(Sn.EXERCISE_CONTRIBUTE,e.language),children:"Contribute exercise"})]})]})},RSt=()=>{const{i18n:e}=Ue(),[t,n]=Y.useState(null);return Q(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Weight"}),Q(ms,{anchorEl:t,open:!!t,onClose:()=>n(null),children:[C(Yt,{component:Zl,to:Tn(Sn.WEIGHT_OVERVIEW,e.language),children:"Weight overview"}),C(Yt,{component:Zl,to:Tn(Sn.WEIGHT_ADD,e.language),children:"Add weight entry"})]})]})},_St=()=>{const{i18n:e}=Ue(),[t,n]=Y.useState(null);return Q(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Measurements"}),C(ms,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(Yt,{component:Zl,to:Tn(Sn.MEASUREMENT_OVERVIEW,e.language),children:"Overview"})})]})},DSt=()=>{const{i18n:e}=Ue(),[t,n]=Y.useState(null);return Q(Mt,{children:[C(gt,{color:"inherit",onClick:r=>n(r.currentTarget),children:"Nutrition"}),C(ms,{anchorEl:t,open:!!t,onClose:()=>n(null),children:C(Yt,{component:Zl,to:Tn(Sn.NUTRITION_OVERVIEW,e.language),children:"Overview"})})]})},NSt=()=>C(JCe,{position:"static",children:Q(NZ,{children:[C(ct,{variant:"h6",component:"div",mr:3,children:"wger"}),C($St,{}),C(RSt,{}),C(_St,{}),C(DSt,{})]})}),Ele=()=>C(ASt,{}),LSt=()=>C("div",{children:"Workout Page"}),FSt=()=>C("div",{children:"Workout Schedule"});var ud,uq=MI;ud=uq.createRoot,uq.hydrateRoot;const jSt=()=>Q(Be,{container:!0,spacing:2,children:[C(Be,{size:4,children:C(Qse,{})}),C(Be,{size:4,children:C(Ase,{})}),C(Be,{size:4,children:C(gle,{})})]}),f1=y.createContext({}),Ole=()=>{const{data:e,isLoading:t}=aM(),{selectedCategories:n,setSelectedCategories:r}=y.useContext(f1),[o]=Ue(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(Po,{}):C(pl,{children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(ls,{disablePadding:!0,children:Q(Wf,{role:void 0,onClick:i(a),dense:!0,children:[C(Gi,{children:C(qf,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`category-${a.id}`)}),C(wo,{id:s,primary:o(Xi(a.name))})]})},a.id)})})},BSt=()=>{const[e]=Ue();return Q(LF,{children:[C(jF,{expandIcon:C(zv,{}),children:e("category")}),C(FF,{children:C(Ole,{})})]})},zSt=()=>{const[e]=Ue();return C("div",{"data-testid":"categories",children:Q(uo,{children:[C(ct,{gutterBottom:!0,variant:"h6",m:2,children:e("category")}),C(Ole,{})]})})},Ile=()=>{const{data:e,isLoading:t}=sM(),{selectedEquipment:n,setSelectedEquipment:r}=y.useContext(f1),[o]=Ue(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(Po,{}):C(pl,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(ls,{disablePadding:!0,children:Q(Wf,{role:void 0,onClick:i(a),dense:!0,children:[C(Gi,{children:C(qf,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(wo,{id:s,primary:o(Xi(a.name))})]})},a.id)})})},VSt=()=>{const[e]=Ue();return Q(LF,{children:[C(jF,{expandIcon:C(zv,{}),children:e("exercises.equipment")}),C(FF,{children:C(Ile,{})})]})},HSt=()=>{const[e]=Ue();return C("div",{"data-testid":"equipment",children:Q(uo,{sx:{mt:2},children:[C(ct,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.equipment")}),C(Ile,{})]})})},USt=oe(({className:e,...t})=>C(ac,{...t,classes:{popper:e}}))(({theme:e})=>({[`& .${zr.tooltip}`]:{backgroundColor:"rgb(245, 245, 245)",color:"rgba(0, 0, 0, 0.87)",boxShadow:e.shadows[1],fontSize:11}})),kle=()=>{const{data:e,isLoading:t}=d1(),{selectedMuscles:n,setSelectedMuscles:r}=y.useContext(f1),[o]=Ue(),i=a=>()=>{const s=n.indexOf(a),l=[...n];s===-1?l.push(a):l.splice(s,1),r(l)};return t?C(Po,{}):C(pl,{sx:{maxHeight:"500px",overflowY:"auto"},children:e.map(a=>{const s=`checkbox-list-label-${a.id}`;return C(ls,{disablePadding:!0,secondaryAction:C(USt,{title:C(Fh,{primaryMuscles:[a],secondaryMuscles:[],isFront:a.isFront}),placement:"right",arrow:!0,children:C(kn,{edge:"end","aria-label":"comments",children:C(Nse,{})})}),children:Q(Wf,{role:void 0,onClick:i(a),dense:!0,children:[C(Gi,{children:C(qf,{edge:"start",checked:n.indexOf(a)!==-1,tabIndex:-1,disableRipple:!0,inputProps:{"aria-labelledby":s}},`muscle-${a.id}`)}),C(wo,{id:s,primary:a.name,secondary:a.nameEn!==""?o(Xi(a.nameEn)):""})]})},a.id)})})},WSt=()=>{const[e]=Ue();return Q(LF,{children:[C(jF,{expandIcon:C(zv,{}),children:e("exercises.muscles")}),C(FF,{children:C(kle,{})})]})},GSt=()=>{const[e]=Ue();return C("div",{"data-testid":"muscles",children:Q(uo,{sx:{mt:2},children:[C(ct,{gutterBottom:!0,variant:"h6",m:2,children:e("exercises.muscles")}),C(kle,{})]})})},qSt=({exercises:e})=>{const t=lM(),[n,r]=Ue();let o;return t.isSuccess&&(o=Lee(r.language,t.data)),C(Be,{container:!0,spacing:1,children:e.map(i=>C(Be,{sx:{display:"flex"},size:{xs:6,md:4},children:C(Ple,{exercise:i,language:o})},i.id))})},KSt=()=>C(Be,{container:!0,spacing:1,children:Array.apply(null,Array(21)).map((e,t)=>C(Be,{sx:{display:"flex"},size:4,children:Q(Do,{children:[C(Vc,{children:C(BP,{variant:"rectangular",width:250,height:150})}),C(xa,{children:Q(Rn,{sx:{pt:.5},children:[C(BP,{width:"60%"}),C(BP,{})]})})]})},t))}),YSt=({children:e})=>{const[t]=Ue(),[n,r]=y.useState(!1),o=i=>()=>{r(i)};return Q(Mt,{children:[C(gt,{onClick:o(!0),children:C(Zyt,{})}),Q(yIe,{open:n,onClose:o(!1),anchor:"right",children:[Q(Gt,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[C(ct,{gutterBottom:!0,variant:"h6",m:2,children:t("filters")}),C(gt,{onClick:o(!1),children:C($S,{})})]}),C(ss,{}),e]})]})},XSt=()=>{const[e,t]=Ue();return Q(Rn,{marginTop:4,padding:4,sx:{width:"100%",backgroundColor:"#ebebeb",textAlign:"center"},children:[C(ct,{gutterBottom:!0,variant:"h4",component:"div",children:e("exercises.missingExercise")}),C(ct,{gutterBottom:!0,variant:"body1",component:"div",children:e("exercises.missingExerciseDescription")}),C(Zl,{to:Tn(Sn.EXERCISE_CONTRIBUTE,t.language),children:e("exercises.contributeExercise")})]})},QSt=()=>{const e=wle(),[t,n]=Ue(),r=dm(),{selectedCategories:o,selectedEquipment:i,selectedMuscles:a}=y.useContext(f1),s=yS("(max-width:600px)"),[l,c]=Y.useState(1),u=(v,w)=>{c(w),window.scrollTo({top:0,behavior:"smooth"})};let d=y.useMemo(()=>{let v=e.data||[];return o.length>0&&(v=v.filter(w=>o.some(x=>w.category.id===x.id))),i.length>0&&(v=v.filter(w=>w.equipment.some(x=>i.some(S=>S.id===x.id)))),a.length>0&&(v=v.filter(w=>w.muscles.some(x=>a.some(S=>S.id===x.id)))),v},[e.data,o,i,a]);const f=21,p=Math.ceil(d.length/f),m=d.slice((l-1)*f,l*f),g=v=>{r(Tn(Sn.EXERCISE_DETAIL,n.language,{id:v.data.base_id}))};return C(Yu,{maxWidth:"lg",children:Q(Be,{container:!0,spacing:2,mt:2,children:[C(Be,{size:{xs:10,sm:6},children:C(ct,{gutterBottom:!0,variant:"h3",component:"div",children:t("exercises.exercises")})}),s?Q(Mt,{children:[C(Be,{size:{xs:2,sm:6},children:C(gt,{variant:"contained",onClick:()=>r(Tn(Sn.EXERCISE_CONTRIBUTE,n.language)),children:C(Ji,{})})}),C(Be,{flexGrow:1,size:{sm:6},children:C(XN,{callback:g})}),C(Be,{display:"flex",justifyContent:"center",alignItems:"center",size:{xs:2,sm:6},children:Q(YSt,{children:[C(BSt,{}),C(VSt,{}),C(WSt,{})]})})]}):Q(Mt,{children:[C(Be,{size:{xs:12,sm:3},children:C(XN,{callback:g})}),C(Be,{size:{xs:12,sm:3},children:C(gt,{variant:"contained",startIcon:C(Ji,{}),onClick:()=>r(Tn(Sn.EXERCISE_CONTRIBUTE,n.language)),children:t("exercises.contributeExercise")})})]}),!s&&C(Be,{size:{xs:12,sm:3},children:Q(Be,{container:!0,spacing:1,children:[C(Be,{size:{xs:6,sm:12},children:C(zSt,{})}),C(Be,{size:{xs:6,sm:12},children:C(HSt,{})}),C(Be,{size:12,children:C(GSt,{})})]})}),Q(Be,{size:{xs:12,sm:9},children:[e.isLoading?C(KSt,{}):Q(Mt,{children:[C(qSt,{exercises:m}),C(Gt,{spacing:2,alignItems:"center",sx:{mt:2},children:C(RMe,{count:p,color:"primary",page:l,onChange:u})})]}),C(XSt,{})]})]})})},dq=()=>{const[e,t]=y.useState([]),[n,r]=y.useState([]),[o,i]=Y.useState([]);return C(f1.Provider,{value:{selectedEquipment:e,setSelectedEquipment:t,selectedMuscles:n,setSelectedMuscles:r,selectedCategories:o,setSelectedCategories:i},children:C(QSt,{})})};function JSt(){return Co({queryKey:[Wv],queryFn:xNe})}const ZSt=()=>{const e=qr();return co({mutationFn:t=>CNe(t),onSuccess:()=>e.invalidateQueries({queryKey:[Wv]})})},e1t=e=>{const t=qr();return co({mutationFn:n=>PNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Uv,e]}),t.invalidateQueries({queryKey:[Wv]})}})},t1t=e=>{const t=qr();return co({mutationFn:n=>TNe(n),onSuccess:()=>{t.invalidateQueries({queryKey:[Uv,e]}),t.invalidateQueries({queryKey:[Wv]})}})};function Mle(e){return Co({queryKey:[Uv,e],queryFn:()=>SNe(e)})}const n1t=()=>{const e=qr();return co({mutationFn:t=>INe(t),onError:t=>{console.log(t)},onSuccess:()=>{e.invalidateQueries({queryKey:[Uv]}),e.invalidateQueries({queryKey:[Wv]})}})},Ale=()=>{const e=qr();return co({mutationFn:t=>ONe(t),onSuccess:()=>{e.invalidateQueries({queryKey:[Uv]}),e.invalidateQueries({queryKey:[Wv]})}})},r1t=()=>{const e=qr();return co({mutationFn:t=>ENe(t),onSuccess:()=>e.invalidateQueries({queryKey:[Uv]})})},fP=['"Open Sans Bold"',"sans-serif"].join(","),o1t=['"Open Sans Light"',"sans-serif"].join(","),$le={spacing:8,typography:{h3:{fontFamily:fP},h4:{fontFamily:fP},h5:{fontFamily:fP},h6:{fontFamily:fP},fontFamily:o1t},palette:{primary:{main:"#2A4C7D"},secondary:{main:"#e63946"},warning:{main:"#cba328"},info:{main:"#457b9d"},success:{main:"#307916"}}},rp=wS($le),i1t=e=>wS({...$le,components:{MuiPopover:{defaultProps:{container:e}},MuiPopper:{defaultProps:{container:e}},MuiModal:{defaultProps:{container:e}}}}),Rle=e=>{const{i18n:t}=Ue(),n=30,r=[...e.category.entries].sort((o,i)=>o.date.getTime()-i.date.getTime()).map(o=>({date:o.date.getTime(),value:o.value,entry:o}));return C(Rn,{alignItems:"center",display:"flex",flexDirection:"column",children:C(Xf,{width:"90%",height:200,children:Q(Noe,{data:r,children:[C(cb,{type:"monotone",dataKey:"value",stroke:rp.palette.secondary.main,strokeWidth:2,dot:r.length>n?!1:{strokeWidth:1,r:4},activeDot:{stroke:"black",strokeWidth:1,r:6}}),C(Zh,{stroke:"#ccc",strokeDasharray:"5 5"}),C(ml,{dataKey:"date",type:"number",domain:["dataMin","dataMax"],tickFormatter:o=>new Date(o).toLocaleDateString(t.language),tickCount:10}),C(gl,{domain:["auto","auto"],unit:e.category.unit})]})})})},_le=({category:e,closeFn:t})=>{const[n]=Ue(),r=ZSt(),o=e1t(e==null?void 0:e.id),i=bl({name:Wc().required(n("forms.fieldRequired")).max(20,n("forms.maxLength",{chars:"20"})).min(3,n("forms.minLength",{chars:"3"})),unit:Wc().required(n("forms.fieldRequired")).max(5,n("forms.maxLength",{chars:"5"}))});return C(yl,{initialValues:{name:e?e.name:"",unit:e?e.unit:""},validationSchema:i,onSubmit:async a=>{e?o.mutate({...a,id:e.id}):r.mutate(a),t&&t()},children:a=>C(gs,{children:Q(Gt,{spacing:2,children:[C(yn,{fullWidth:!0,id:"name",label:n("name"),error:a.touched.name&&!!a.touched.name,helperText:a.touched.name&&a.errors.name,...a.getFieldProps("name")}),C(yn,{fullWidth:!0,id:"unit",label:n("unit"),error:a.touched.unit&&!!a.errors.unit,helperText:a.touched.unit&&a.errors.unit?a.errors.unit:n("measurements.unitFormHelpText"),...a.getFieldProps("unit")}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:n("submit")})})]})})})};Vr.defaultZone=A_e;const Dle=({entry:e,closeFn:t,categoryId:n})=>{const[r,o]=Ue(),i=n1t(),a=Ale(),s=Mle(n),[l,c]=Y.useState(e?It.fromJSDate(e.date):It.now()),u=bl({value:pa().required(r("forms.fieldRequired")).min(0,r("forms.minValue",{value:"0"})).max(1e3,r("forms.maxValue",{value:"1000"})),date:a1().required(r("forms.fieldRequired")),notes:Wc().max(500,r("forms.maxLength",{value:"500"}))});return C(yl,{initialValues:{value:e?e.value:0,date:e?e.date:new Date,notes:e?e.notes:""},validationSchema:u,onSubmit:async d=>{e?a.mutate({...d,id:e.id}):i.mutate({...d,categoryId:n}),t&&t()},children:d=>C(gs,{children:Q(Gt,{spacing:2,children:[C(yn,{fullWidth:!0,id:"value",type:"number",label:r("value"),error:d.touched.value&&!!d.errors.value,helperText:d.touched.value&&d.errors.value,...d.getFieldProps("value")}),s.isLoading?C(Po,{}):C(YS,{dateAdapter:Kk,adapterLocale:o.language,children:C(kie,{format:"yyyy-MM-dd",label:r("date"),value:l,disableFuture:!0,onChange:f=>{f&&d.setFieldValue("date",f.toJSDate()),c(f)},shouldDisableDate:f=>e&&Si(e.date)===Si(f.toJSDate())?!1:f?s.data.entries.some(p=>Si(p.date)===Si(f.toJSDate())):!1})}),C(yn,{fullWidth:!0,id:"notes",label:r("notes"),multiline:!0,error:d.touched.notes&&!!d.errors.notes,helperText:d.touched.notes&&d.errors.notes,...d.getFieldProps("notes")}),C(Gt,{direction:"row",justifyContent:"end",sx:{mt:2},children:C(gt,{color:"primary",variant:"contained",type:"submit",sx:{mt:2},children:r("submit")})})]})})})},a1t=()=>{const[e]=Ue(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[C(Gh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(_le,{closeFn:o})})]})},s1t=()=>{const[e]=Ue(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1),i=fm(),a=parseInt(i.categoryId);return Q(Mt,{children:[C(Gh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:s=>s.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(Dle,{closeFn:o,categoryId:a})})]})},Nle=y.createContext(void 0);function mn(){const e=y.useContext(Nle);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const Lle=y.createContext(void 0),xt=()=>{const e=y.useContext(Lle);if(!e)throw new Error("MUI X: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e};function W(){return W=Object.assign?Object.assign.bind():function(e){for(var t=1;tn.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${n} for the full message.`}function p1(e){if(typeof e!="string")throw new Error(l1t(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Pf(e){return e&&e.ownerDocument||document}function c1t(e){return Pf(e).defaultView||window}function u1t(e,t){typeof e=="function"?e(t):e&&(e.current=t)}const _o=typeof window<"u"?y.useLayoutEffect:y.useEffect;let fq=0;function d1t(e){const[t,n]=y.useState(e),r=t;return y.useEffect(()=>{t==null&&(fq+=1,n(`mui-${fq}`))},[t]),r}const f1t={...vh},pq=f1t.useId;function yo(e){return pq!==void 0?pq():d1t(e)}function wr(e){const t=y.useRef(e);return _o(()=>{t.current=e}),y.useRef((...n)=>(0,t.current)(...n)).current}function hm(...e){return y.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{u1t(n,t)})},e)}const hq={};function eu(e,t){const n=y.useRef(hq);return n.current===hq&&(n.current=e(t)),n}const p1t=[];function cM(e){y.useEffect(e,p1t)}class Az{constructor(){nn(this,"currentId",null);nn(this,"clear",()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)});nn(this,"disposeEffect",()=>this.clear)}static create(){return new Az}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Tb(){const e=eu(Az.create).current;return cM(e.disposeEffect),e}function Fle(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if(o==="components"||o==="slots")n[o]={...e[o],...n[o]};else if(o==="componentsProps"||o==="slotProps"){const i=e[o],a=t[o];if(!a)n[o]=i||{};else if(!i)n[o]=a;else{n[o]={...a};for(const s in i)if(Object.prototype.hasOwnProperty.call(i,s)){const l=s;n[o][l]=Fle(i[l],a[l])}}}else n[o]===void 0&&(n[o]=e[o])}return n}const mq=e=>e,h1t=()=>{let e=mq;return{configure(t){e=t},generate(t){return e(t)},reset(){e=mq}}},m1t=h1t(),g1t={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function jle(e,t,n="Mui"){const r=g1t[t];return r?`${n}-${r}`:`${m1t.generate(e)}-${t}`}function Ble(e,t,n="Mui"){const r={};return t.forEach(o=>{r[o]=jle(e,o,n)}),r}const y1t=Object.is;function zle(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!y1t(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}function op(e){return y.memo(e,zle)}const v1t={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsManagementSearchTitle:"Search",columnsManagementNoColumns:"No columns",columnsManagementShowHideAllText:"Show/Hide All",columnsManagementReset:"Reset",filterPanelAddFilter:"Add filter",filterPanelRemoveAll:"Remove all",filterPanelDeleteIconLabel:"Delete",filterPanelLogicOperator:"Logic operator",filterPanelOperator:"Operator",filterPanelOperatorAnd:"And",filterPanelOperatorOr:"Or",filterPanelColumns:"Columns",filterPanelInputLabel:"Value",filterPanelInputPlaceholder:"Filter value",filterOperatorContains:"contains",filterOperatorDoesNotContain:"does not contain",filterOperatorEquals:"equals",filterOperatorDoesNotEqual:"does not equal",filterOperatorStartsWith:"starts with",filterOperatorEndsWith:"ends with",filterOperatorIs:"is",filterOperatorNot:"is not",filterOperatorAfter:"is after",filterOperatorOnOrAfter:"is on or after",filterOperatorBefore:"is before",filterOperatorOnOrBefore:"is on or before",filterOperatorIsEmpty:"is empty",filterOperatorIsNotEmpty:"is not empty",filterOperatorIsAnyOf:"is any of","filterOperator=":"=","filterOperator!=":"!=","filterOperator>":">","filterOperator>=":">=","filterOperator<":"<","filterOperator<=":"<=",headerFilterOperatorContains:"Contains",headerFilterOperatorDoesNotContain:"Does not contain",headerFilterOperatorEquals:"Equals",headerFilterOperatorDoesNotEqual:"Does not equal",headerFilterOperatorStartsWith:"Starts with",headerFilterOperatorEndsWith:"Ends with",headerFilterOperatorIs:"Is",headerFilterOperatorNot:"Is not",headerFilterOperatorAfter:"Is after",headerFilterOperatorOnOrAfter:"Is on or after",headerFilterOperatorBefore:"Is before",headerFilterOperatorOnOrBefore:"Is on or before",headerFilterOperatorIsEmpty:"Is empty",headerFilterOperatorIsNotEmpty:"Is not empty",headerFilterOperatorIsAnyOf:"Is any of","headerFilterOperator=":"Equals","headerFilterOperator!=":"Not equals","headerFilterOperator>":"Greater than","headerFilterOperator>=":"Greater than or equal to","headerFilterOperator<":"Less than","headerFilterOperator<=":"Less than or equal to",filterValueAny:"any",filterValueTrue:"true",filterValueFalse:"false",columnMenuLabel:"Menu",columnMenuShowColumns:"Show columns",columnMenuManageColumns:"Manage columns",columnMenuFilter:"Filter",columnMenuHideColumn:"Hide column",columnMenuUnsort:"Unsort",columnMenuSortAsc:"Sort by ASC",columnMenuSortDesc:"Sort by DESC",columnHeaderFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,columnHeaderFiltersLabel:"Show filters",columnHeaderSortIconLabel:"Sort",footerRowSelected:e=>e!==1?`${e.toLocaleString()} rows selected`:`${e.toLocaleString()} row selected`,footerTotalRows:"Total Rows:",footerTotalVisibleRows:(e,t)=>`${e.toLocaleString()} of ${t.toLocaleString()}`,checkboxSelectionHeaderName:"Checkbox selection",checkboxSelectionSelectAllRows:"Select all rows",checkboxSelectionUnselectAllRows:"Unselect all rows",checkboxSelectionSelectRow:"Select row",checkboxSelectionUnselectRow:"Unselect row",booleanCellTrueLabel:"yes",booleanCellFalseLabel:"no",actionsCellMore:"more",pinToLeft:"Pin to left",pinToRight:"Pin to right",unpin:"Unpin",treeDataGroupingHeaderName:"Group",treeDataExpand:"see children",treeDataCollapse:"hide children",groupingColumnHeaderName:"Group",groupColumn:e=>`Group by ${e}`,unGroupColumn:e=>`Stop grouping by ${e}`,detailPanelToggle:"Detail panel toggle",expandDetailPanel:"Expand",collapseDetailPanel:"Collapse",MuiTablePagination:{},rowReorderingHeaderName:"Row reordering",aggregationMenuItemHeader:"Aggregation",aggregationFunctionLabelSum:"sum",aggregationFunctionLabelAvg:"avg",aggregationFunctionLabelMin:"min",aggregationFunctionLabelMax:"max",aggregationFunctionLabelSize:"size"};function bn(e){return jle("MuiDataGrid",e)}const se=Ble("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--flex","cell--textCenter","cell--textLeft","cell--textRight","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--pinnedLeft","cell--pinnedRight","cell--selectionMode","cell","cellCheckbox","cellEmpty","cellSkeleton","cellOffsetLeft","checkboxInput","columnHeader","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader--pinnedLeft","columnHeader--pinnedRight","columnHeader--last","columnHeader--lastUnpinned","columnHeader--siblingFocused","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeaders","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsManagement","columnsManagementRow","columnsManagementHeader","columnsManagementFooter","container--top","container--bottom","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filler","filler--borderBottom","filler--pinnedLeft","filler--pinnedRight","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","main--hasPinnedRight","main--hasSkeletonLoadingOverlay","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","root--noToolbar","row","row--editable","row--editing","row--firstVisible","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","row--borderBottom","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","rowSkeleton","scrollArea--left","scrollArea--right","scrollArea","scrollbar","scrollbar--vertical","scrollbar--horizontal","scrollbarFiller","scrollbarFiller--header","scrollbarFiller--borderTop","scrollbarFiller--borderBottom","scrollbarFiller--pinnedRight","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScroller--hasScrollX","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","withVerticalBorder","withBorderColor","cell--withRightBorder","cell--withLeftBorder","columnHeader--withRightBorder","columnHeader--withLeftBorder","treeDataGroupingCell","treeDataGroupingCellToggle","treeDataGroupingCellLoadingContainer","groupingCriteriaCell","groupingCriteriaCellToggle","groupingCriteriaCellLoadingContainer","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]),gq=1e3;class b1t{constructor(t=gq){this.timeouts=new Map,this.cleanupTimeout=gq,this.cleanupTimeout=t}register(t,n,r){this.timeouts||(this.timeouts=new Map);const o=setTimeout(()=>{typeof n=="function"&&n(),this.timeouts.delete(r.cleanupToken)},this.cleanupTimeout);this.timeouts.set(r.cleanupToken,o)}unregister(t){const n=this.timeouts.get(t.cleanupToken);n&&(this.timeouts.delete(t.cleanupToken),clearTimeout(n))}reset(){this.timeouts&&(this.timeouts.forEach((t,n)=>{this.unregister({cleanupToken:n})}),this.timeouts=void 0)}}class w1t{constructor(){this.registry=new FinalizationRegistry(t=>{typeof t=="function"&&t()})}register(t,n,r){this.registry.register(t,n,r)}unregister(t){this.registry.unregister(t)}reset(){}}var ol=function(e){return e.DataGrid="DataGrid",e.DataGridPro="DataGridPro",e.DataGridPremium="DataGridPremium",e}(ol||{});class x1t{}function S1t(e){let t=0;return function(r,o,i,a){e.registry===null&&(e.registry=typeof FinalizationRegistry<"u"?new w1t:new b1t);const[s]=y.useState(new x1t),l=y.useRef(null),c=y.useRef();c.current=i;const u=y.useRef(null);if(!l.current&&c.current){const d=(f,p,m)=>{var g;p.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,p,m)};l.current=r.current.subscribeEvent(o,d,a),t+=1,u.current={cleanupToken:t},e.registry.register(s,()=>{var f;(f=l.current)==null||f.call(l),l.current=null,u.current=null},u.current)}else!c.current&&l.current&&(l.current(),l.current=null,u.current&&(e.registry.unregister(u.current),u.current=null));y.useEffect(()=>{if(!l.current&&c.current){const d=(f,p,m)=>{var g;p.defaultMuiPrevented||(g=c.current)==null||g.call(c,f,p,m)};l.current=r.current.subscribeEvent(o,d,a)}return u.current&&e.registry&&(e.registry.unregister(u.current),u.current=null),()=>{var d;(d=l.current)==null||d.call(l),l.current=null}},[r,o,a])}}const C1t={registry:null},ht=S1t(C1t),P1t={isFirst:!0};function lr(e,t,n){ht(e,t,n,P1t)}function T1t(e){return e.acceptsApiRef}function yq(e,t){return T1t(t)?t(e):t(e.current.state)}const E1t=Object.is,Vle=zle,O1t=()=>({state:null,equals:null,selector:null}),Ye=(e,t,n=E1t)=>{const r=eu(O1t),o=r.current.selector!==null,[i,a]=y.useState(o?null:yq(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,cM(()=>e.current.store.subscribe(()=>{const s=yq(e,r.current.selector);r.current.equals(r.current.state,s)||(r.current.state=s,a(s))})),i},li=e=>e.dimensions;var gO=Symbol("NOT_FOUND");function I1t(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function k1t(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function M1t(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var vq=e=>Array.isArray(e)?e:[e];function A1t(e){const t=Array.isArray(e[0])?e[0]:e;return M1t(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function $1t(e,t){const n=[],{length:r}=e;for(let o=0;ot(s,c.key));if(l>-1){const c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return gO}function o(s,l){r(s)===gO&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var D1t=(e,t)=>e===t;function N1t(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:o}=n;for(let i=0;ii(p.value,u));f&&(u=f.value,s!==0&&s--)}l.put(arguments,u)}return u}return c.clearCache=()=>{l.clear(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}var L1t=class{constructor(e){this.value=e}deref(){return this.value}},F1t=typeof WeakRef<"u"?WeakRef:L1t,j1t=0,bq=1;function pP(){return{s:j1t,v:void 0,o:null,p:null}}function Ule(e,t={}){let n=pP();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var d;let s=n;const{length:l}=arguments;for(let f=0,p=l;f{n=pP(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Wle(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...o)=>{let i=0,a=0,s,l={},c=o.pop();typeof c=="object"&&(l=c,c=o.pop()),I1t(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...n,...l},{memoize:d,memoizeOptions:f=[],argsMemoize:p=Ule,argsMemoizeOptions:m=[],devModeChecks:g={}}=u,v=vq(f),w=vq(m),x=A1t(o),S=d(function(){return i++,c.apply(null,arguments)},...v),P=p(function(){a++;const E=$1t(x,arguments);return s=S.apply(null,E),s},...w);return Object.assign(P,{resultFunc:c,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:d,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var B1t=Wle(Ule),z1t=Object.assign((e,t=B1t)=>{k1t(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((a,s,l)=>(a[n[l]]=s,a),{}))},{withTypes:()=>z1t});const V1t=Wle({memoize:Hle,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),wq=new WeakMap;function mg(e){return"current"in e&&"instanceId"in e.current}const gg={id:"default"},Dt=(e,t,n,r,o,i,...a)=>{if(a.length>0)throw new Error("Unsupported number of selectors");let s;if(e&&t&&n&&r&&o&&i)s=(l,c)=>{const u=mg(l),d=c??(u?l.current.instanceId:gg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d),v=r(f,d),w=o(f,d);return i(p,m,g,v,w)};else if(e&&t&&n&&r&&o)s=(l,c)=>{const u=mg(l),d=c??(u?l.current.instanceId:gg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d),v=r(f,d);return o(p,m,g,v)};else if(e&&t&&n&&r)s=(l,c)=>{const u=mg(l),d=c??(u?l.current.instanceId:gg),f=u?l.current.state:l,p=e(f,d),m=t(f,d),g=n(f,d);return r(p,m,g)};else if(e&&t&&n)s=(l,c)=>{const u=mg(l),d=c??(u?l.current.instanceId:gg),f=u?l.current.state:l,p=e(f,d),m=t(f,d);return n(p,m)};else if(e&&t)s=(l,c)=>{const u=mg(l),d=c??(u?l.current.instanceId:gg),f=u?l.current.state:l,p=e(f,d);return t(p)};else throw new Error("Missing arguments");return s.acceptsApiRef=!0,s},sr=(...e)=>{const t=(n,r)=>{const o=mg(n),i=o?n.current.instanceId:r??gg,a=o?n.current.state:n,s=wq.get(i),l=s??new Map,c=l==null?void 0:l.get(e);if(l&&c)return c(a,i);const u=V1t(...e);return s||wq.set(i,l),l.set(e,u),u(a,i)};return t.acceptsApiRef=!0,t},H1t=.7,U1t=1.3,W1t={compact:H1t,comfortable:U1t,standard:1},Hg=e=>e.density,h1=Dt(Hg,e=>W1t[e]);let ur=function(e){return e.LEFT="left",e.RIGHT="right",e}({});const QN={left:[],right:[]},G1t=e=>e.isRtl,Lc=e=>e.columns,Nu=Dt(Lc,e=>e.orderedFields),dd=Dt(Lc,e=>e.lookup),ec=sr(Nu,dd,(e,t)=>e.map(n=>t[n])),Qs=Dt(Lc,e=>e.columnVisibilityModel),vo=sr(ec,Qs,(e,t)=>e.filter(n=>t[n.field]!==!1)),Eb=sr(vo,e=>e.map(t=>t.field)),q1t=e=>e.pinnedColumns,m1=sr(Lc,q1t,Eb,G1t,(e,t,n,r)=>{const o=K1t(t,n,r);return{left:o.left.map(a=>e.lookup[a]),right:o.right.map(a=>e.lookup[a])}});function K1t(e,t,n){var s,l;if(!Array.isArray(e.left)&&!Array.isArray(e.right)||((s=e.left)==null?void 0:s.length)===0&&((l=e.right)==null?void 0:l.length)===0)return QN;const r=(c,u)=>Array.isArray(c)?c.filter(d=>u.includes(d)):[],o=r(e.left,t),i=t.filter(c=>!o.includes(c)),a=r(e.right,i);return n?{left:a,right:o}:{left:o,right:a}}const ip=sr(vo,e=>{const t=[];let n=0;for(let r=0;r{const n=e.length;return n===0?0:t[n-1]+e[n-1].computedWidth}),Gle=sr(ec,e=>e.filter(t=>t.filterable)),Y1t=sr(ec,e=>e.reduce((t,n)=>(n.filterable&&(t[n.field]=n),t),{})),X1t=sr(ec,e=>e.some(t=>t.colSpan!==void 0));function At(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}const Q1t=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","isValidating","debounceMs","isProcessingProps","onValueChange"],J1t=e=>{const{classes:t}=e;return vn({root:["editInputCell"]},bn,t)},Z1t=oe(Fv,{name:"MuiDataGrid",slot:"EditInputCell",overridesResolver:(e,t)=>t.editInputCell})(({theme:e})=>W({},e.typography.body2,{padding:"1px 0","& input":{padding:"0 16px",height:"100%"}})),eCt=y.forwardRef((e,t)=>{const n=xt(),{id:r,value:o,field:i,colDef:a,hasFocus:s,debounceMs:l=200,isProcessingProps:c,onValueChange:u}=e,d=At(e,Q1t),f=mn(),p=y.useRef(),[m,g]=y.useState(o),v=J1t(n),w=y.useCallback(async S=>{const P=S.target.value;u&&await u(S,P);const T=f.current.getColumn(i);let E=P;T.valueParser&&(E=T.valueParser(P,f.current.getRow(r),T,f)),g(E),f.current.setEditCellValue({id:r,field:i,value:E,debounceMs:l,unstable_skipValueParser:!0},S)},[f,l,i,r,u]),x=f.current.unstable_getEditCellMeta(r,i);return y.useEffect(()=>{(x==null?void 0:x.changeReason)!=="debouncedSetEditCellValue"&&g(o)},[x,o]),_o(()=>{s&&p.current.focus()},[s]),$.jsx(Z1t,W({ref:t,inputRef:p,className:v.root,ownerState:n,fullWidth:!0,type:a.type==="number"?a.type:"text",value:m??"",onChange:w,endAdornment:c?$.jsx(n.slots.loadIcon,{fontSize:"small",color:"action"}):void 0},d))}),tCt=e=>$.jsx(eCt,W({},e)),qle=(e,t)=>t&&e.length>1?[e[0]]:e,xq=(e,t)=>n=>W({},n,{sorting:W({},n.sorting,{sortModel:qle(e,t)})}),nCt=e=>e==="desc",rCt=(e,t)=>{const n=t.current.getColumn(e.field);if(!n||e.sort===null)return null;let r;return n.getSortComparator?r=n.getSortComparator(e.sort):r=nCt(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator,r?{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}:null},oCt=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],s=n.params[i];return r=o.comparator(a.value,s.value,a,s),r},0),iCt=(e,t)=>{const n=e.map(r=>rCt(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>oCt(n,o,i)).map(o=>o.node.id)},Sq=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},Rz=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,aCt=new Intl.Collator,sCt=(e,t)=>{const n=Rz(e,t);return n!==null?n:typeof e=="string"?aCt.compare(e.toString(),t.toString()):e-t},Kle=(e,t)=>{const n=Rz(e,t);return n!==null?n:Number(e)-Number(t)},Yle=(e,t)=>{const n=Rz(e,t);return n!==null?n:e>t?1:e{const{value:E}=T.target;m(String(E)),v(!0),f.start(x.filterDebounceMs,()=>{const O=W({},t,{value:r==="number"?Number(E):E,fromInput:w});n(O),v(!1)})},[f,x.filterDebounceMs,t,r,w,n]);return y.useEffect(()=>{(t.fromInput!==w||t.value===void 0)&&m(String(t.value??""))},[w,t]),$.jsx(x.slots.baseTextField,W({id:w,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:p,onChange:S,variant:u,type:r||"text",InputProps:W({},g||l?{endAdornment:g?$.jsx(x.slots.loadIcon,{fontSize:"small",color:"action"}):l}:{},{disabled:s},c,{inputProps:W({tabIndex:a},c==null?void 0:c.inputProps)}),InputLabelProps:{shrink:!0},inputRef:i},d,(P=x.slotProps)==null?void 0:P.baseTextField))}function cCt(e){return typeof e=="number"&&!Number.isNaN(e)}function Xle(e){return typeof e=="function"}function _z(e){return typeof e=="object"&&e!==null}function uCt(){try{const e="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}function yO(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}const Fc=(e,t,n)=>Math.max(t,Math.min(n,e));function Cq(e,t){return Array.from({length:t-e}).map((n,r)=>e+r)}function py(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){const o=e.length;if(o!==t.length)return!1;for(let i=0;i{let t=e+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}}function fCt(e){const t=dCt(e);return(n,r)=>n+(r-n)*t()}function Qle(e){return typeof structuredClone=="function"?structuredClone(e):JSON.parse(JSON.stringify(e))}const pCt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],hCt=["key"];function Jle(e){const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,color:a,error:s,helperText:l,size:c,variant:u="standard"}=e,d=At(e,pCt),f={color:a,error:s,helperText:l,size:c,variant:u},[p,m]=y.useState(t.value||[]),g=yo(),v=xt();y.useEffect(()=>{const x=t.value??[];m(x.map(String))},[t.value]);const w=y.useCallback((x,S)=>{m(S.map(String)),n(W({},t,{value:[...S.map(P=>r==="number"?Number(P):P)]}))},[n,t,r]);return $.jsx(oc,W({multiple:!0,freeSolo:!0,options:[],filterOptions:(x,S)=>{const{inputValue:P}=S;return P==null||P===""?[]:[P]},id:g,value:p,onChange:w,renderTags:(x,S)=>x.map((P,T)=>{const E=S({index:T}),{key:O}=E,k=At(E,hCt);return $.jsx(v.slots.baseChip,W({variant:"outlined",size:"small",label:P},k),O)}),renderInput:x=>{var S;return $.jsx(v.slots.baseTextField,W({},x,{label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},x.InputLabelProps,{shrink:!0}),inputRef:i,type:r||"text"},f,(S=v.slotProps)==null?void 0:S.baseTextField))}},d))}var Gc=function(e){return e.Cell="cell",e.Row="row",e}(Gc||{}),Zn=function(e){return e.Edit="edit",e.View="view",e}(Zn||{}),Bn=function(e){return e.Edit="edit",e.View="view",e}(Bn||{}),ji=function(e){return e.And="and",e.Or="or",e}(ji||{}),gu=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e.pasteKeyDown="pasteKeyDown",e}(gu||{}),_l=function(e){return e.cellFocusOut="cellFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}(_l||{}),Rd=function(e){return e.enterKeyDown="enterKeyDown",e.cellDoubleClick="cellDoubleClick",e.printableKeyDown="printableKeyDown",e.deleteKeyDown="deleteKeyDown",e}(Rd||{}),$l=function(e){return e.rowFocusOut="rowFocusOut",e.escapeKeyDown="escapeKeyDown",e.enterKeyDown="enterKeyDown",e.tabKeyDown="tabKeyDown",e.shiftTabKeyDown="shiftTabKeyDown",e}($l||{});function Zle(e){return e.field!==void 0}const Zx=()=>({items:[],logicOperator:ji.And,quickFilterValues:[],quickFilterLogicOperator:ji.And});function ece(e){return{current:e.current.getPublicApi()}}let k0;function mCt(){if(k0!==void 0)return k0;try{k0=new Function("return true")()}catch{k0=!1}return k0}const JN=(e,t)=>{const n=W({},e);if(n.id==null&&(n.id=Math.round(Math.random()*1e5)),n.operator==null){const r=dd(t)[n.field];n.operator=r&&r.filterOperators[0].value}return n},Dz=(e,t,n)=>{const r=e.items.length>1;let o;r&&t?o=[e.items[0]]:o=e.items;const i=r&&o.some(s=>s.id==null);return o.some(s=>s.operator==null)||i?W({},e,{items:o.map(s=>JN(s,n))}):e.items!==o?W({},e,{items:o}):e},Pq=(e,t,n)=>r=>W({},r,{filterModel:Dz(e,t,n)}),eS=e=>typeof e=="string"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e,tce=(e,t)=>{var u;if(!e.field||!e.operator)return null;const n=t.current.getColumn(e.field);if(!n)return null;let r;if(n.valueParser){const d=n.valueParser;r=Array.isArray(e.value)?(u=e.value)==null?void 0:u.map(f=>d(f,void 0,n,t)):d(e.value,void 0,n,t)}else r=e.value;const{ignoreDiacritics:o}=t.current.rootProps;o&&(r=eS(r));const i=W({},e,{value:r}),a=n.filterOperators;if(!(a!=null&&a.length))throw new Error(`MUI X: No filter operators found for column '${n.field}'.`);const s=a.find(d=>d.value===i.operator);if(!s)throw new Error(`MUI X: No filter operator found for column '${n.field}' and operator value '${i.operator}'.`);const l=ece(t),c=s.getApplyFilterFn(i,n);return typeof c!="function"?null:{item:i,fn:d=>{let f=t.current.getRowValue(d,n);return o&&(f=eS(f)),c(f,d,n,l)}}};let Tq=1;const gCt=(e,t,n)=>{const{items:r}=e,o=r.map(s=>tce(s,t)).filter(s=>!!s);if(o.length===0)return null;if(n||!mCt())return(s,l)=>{const c={};for(let u=0;u`const shouldApply${l} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(s.item.field)});`).join(` `)} @@ -435,30 +435,30 @@ ${o.map((s,l)=>` ${JSON.stringify(String(s.item.id))}: !shouldApply${l} ? false `)} }; -return result$$;`.replaceAll("$$",String(hq)));return hq+=1,(s,l)=>i(o,s,l)},Ble=e=>e.quickFilterExcludeHiddenColumns??!0,G1t=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=Ble(e)?yb(t):_u(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=Fle(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(d=>{const f=i?Gx(d):d;return{fn:u(f,c,a)}})})}),function(c,u){const d={};e:for(let f=0;f{const r=W1t(e,t,n),o=G1t(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},mq=e=>e!=null,K1t=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>jle(r,t)!==null)),e.cleanedFilterItems),Y1t=(e,t,n,r,o)=>{const i=K1t(o,r,n.items),a=e.filter(mq),s=t.filter(mq);if(a.length>0){const l=u=>a.some(d=>d[u.id]);if((n.logicOperator??Wx().logicOperator)===ji.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(d=>d[u]);if((n.quickFilterLogicOperator??Wx().quickFilterLogicOperator)===ji.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},X1t=e=>{if(!e)return null;const t=new RegExp(iO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=Gx(a)),a!=null?t.test(a.toString()):!1}},gq=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(iO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},yq=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},vq=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},Q1t=(e=!1)=>[{value:"contains",getApplyFilterFn:gq(e,!1),InputComponent:Ws},{value:"doesNotContain",getApplyFilterFn:gq(e,!0),InputComponent:Ws},{value:"equals",getApplyFilterFn:yq(e,!1),InputComponent:Ws},{value:"doesNotEqual",getApplyFilterFn:yq(e,!0),InputComponent:Ws},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${iO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ws},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${iO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ws},{value:"isEmpty",getApplyFilterFn:vq(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:vq(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:Nle}],Ql={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:N1t,type:"string",align:"left",filterOperators:Q1t(),renderEditCell:M1t,getApplyQuickFilterFn:X1t},J1t=["open","target","onClose","children","position","className","onExited"],Z1t=e=>{const{classes:t}=e;return gn({root:["menu"]},yn,t)},eCt=oe(Ff,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${se.menuList}`]:{outline:0}})),tCt={"bottom-start":"top left","bottom-end":"top right"};function zle(e){var g;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=At(e,J1t),c=hn(),u=xt(),d=Z1t(u),f=y.useRef(null);$o(()=>{var v,w;t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(v=f.current)==null?void 0:v.focus)==null||w.call(v),f.current=null)},[t]),y.useEffect(()=>{const v=t?"menuOpen":"menuClose";c.current.publishEvent(v,{target:n})},[c,t,n]);const h=v=>w=>{v&&v(),s&&s(w)},m=v=>{v.target&&(n===v.target||n!=null&&n.contains(v.target))||r(v)};return $.jsx(eCt,W({as:u.slots.basePopper,className:fe(d.root,a),ownerState:u,open:t,anchorEl:n,transition:!0,placement:i},l,(g=u.slotProps)==null?void 0:g.basePopper,{children:({TransitionProps:v,placement:w})=>$.jsx(NF,{onClickAway:m,mouseEvent:"onMouseDown",children:$.jsx(Tf,W({},v,{style:{transformOrigin:tCt[w]},onExited:h(v==null?void 0:v.onExited),children:$.jsx(co,{children:o})}))})}))}const nCt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],rCt=e=>typeof e.getActions=="function";function oCt(e){var _;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=At(e,nCt),[l,c]=y.useState(-1),[u,d]=y.useState(!1),f=hn(),h=y.useRef(null),m=y.useRef(null),g=y.useRef(!1),v=y.useRef({}),w=nr(),x=go(),S=go(),P=xt();if(!rCt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const T=t.getActions(f.current.getRowParams(n)),E=T.filter(D=>!D.props.showInMenu),O=T.filter(D=>D.props.showInMenu),k=E.length+(O.length?1:0);y.useLayoutEffect(()=>{r||Object.entries(v.current).forEach(([D,z])=>{z==null||z.stop({},()=>{delete v.current[D]})})},[r]),y.useEffect(()=>{if(l<0||!h.current||l>=h.current.children.length)return;h.current.children[l].focus({preventScroll:!0})},[l]),y.useEffect(()=>{r||(c(-1),g.current=!1)},[r]),y.useImperativeHandle(a,()=>({focus(){if(!g.current){const D=T.findIndex(z=>!z.props.disabled);c(D)}}}),[T]),y.useEffect(()=>{l>=k&&c(k-1)},[l,k]);const A=()=>{d(!0),c(k-1),g.current=!0},I=()=>{d(!1)},R=D=>z=>{v.current[D]=z},N=(D,z)=>F=>{c(D),g.current=!0,z&&z(F)},L=D=>{if(k<=1)return;const z=(H,U)=>{var ae;if(H<0||H>T.length)return H;const Y=(U==="left"?-1:1)*(w?-1:1);return(ae=T[H+Y])!=null&&ae.props.disabled?z(H+Y,U):H+Y};let F=l;D.key==="ArrowRight"?F=z(l,"right"):D.key==="ArrowLeft"&&(F=z(l,"left")),!(F<0||F>=k)&&F!==l&&(D.preventDefault(),D.stopPropagation(),c(F))},B=D=>{D.key==="Tab"&&D.preventDefault(),["Tab","Escape"].includes(D.key)&&I()};return $.jsxs("div",W({role:"menu",ref:h,tabIndex:-1,className:se.actionsCell,onKeyDown:L},s,{children:[E.map((D,z)=>y.cloneElement(D,{key:z,touchRippleRef:R(z),onClick:N(z,D.props.onClick),tabIndex:l===z?o:-1})),O.length>0&&S&&$.jsx(P.slots.baseIconButton,W({ref:m,id:S,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,role:"menuitem",size:"small",onClick:A,touchRippleRef:R(S),tabIndex:l===E.length?o:-1},(_=P.slotProps)==null?void 0:_.baseIconButton,{children:$.jsx(P.slots.moreActionsIcon,{fontSize:"small"})})),O.length>0&&$.jsx(zle,{open:u,target:m.current,position:i,onClose:I,children:$.jsx(xS,{id:x,className:se.menuList,onKeyDown:B,"aria-labelledby":S,variant:"menu",autoFocusItem:!0,children:O.map((D,z)=>y.cloneElement(D,{key:z,closeMenu:I}))})})]}))}const iCt=e=>$.jsx(oCt,W({},e)),eM="actions",aCt=W({},Ql,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:iCt,getApplyQuickFilterFn:void 0}),gl=e=>e.rows,tM=Dt(gl,e=>e.totalRowCount),sCt=Dt(gl,e=>e.loading),lCt=Dt(gl,e=>e.totalTopLevelRowCount),sf=Dt(gl,e=>e.dataRowIdToModelLookup),aO=Dt(gl,e=>e.dataRowIdToIdLookup),xi=Dt(gl,e=>e.tree),cCt=Dt(gl,e=>e.groupsToFetch),uCt=Dt(gl,e=>e.groupingName),bq=Dt(gl,e=>e.treeDepths),vb=sr(gl,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),oP=Dt(gl,e=>e.dataRowIds),dCt=Dt(gl,e=>e==null?void 0:e.additionalRowGroups),am=sr(dCt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),fCt=Dt(am,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),oi="auto-generated-group-node-root",iy=Symbol("mui.id_autogenerated"),pCt=()=>({type:"group",id:oi,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function hCt(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` -`))}const nM=(e,t,n)=>{const r=t?t(e):e.id;return hCt(r,e,n),r},zP=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s{const n=e[oi];return Math.max(t,n.children.length+(n.footerId==null?0:1))},Hle=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},W({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:Vle({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},gv=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,Oz=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=nM(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,W({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:W({},e.updates.idToActionLookup),groupKeys:r},a=W({},e.dataRowIdToModelLookup),s=W({},e.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d],delete s[d];return}const h=a[d];if(h){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=W({},h,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u,s[d]=d});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(h=>!f[h]))}return{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function mCt(e){var o,i;const t=am(e),n=((o=t==null?void 0:t.top)==null?void 0:o.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,r=((i=t==null?void 0:t.bottom)==null?void 0:i.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:n,bottom:r}}function Ule(e){return`var(--DataGrid-overlayHeight, ${2*li(e.current.state).rowHeight}px)`}function xq(e,t,n){const r=[];return t.forEach(o=>{const i=nM(o,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=W({},l,o))}else r.push(o)}),r}const Wle=(e,t,n)=>typeof e=="number"&&e>0?e:t,gCt="__tree_data_group__",Gle="__row_group_by_columns_group__",rM="__detail_panel_toggle__",yCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],vCt=e=>{const{classes:t}=e;return gn({root:["booleanCell"]},yn,t)};function bCt(e){const{value:t,rowNode:n}=e,r=At(e,yCt),o=hn(),i=xt(),a={classes:i.classes},s=vCt(a),c=Ye(o,vb)>0&&n.type==="group"&&i.treeData===!1,u=y.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:$.jsx(u,W({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const wCt=y.memo(bCt),xCt=e=>e.field!==Gle&&gv(e.rowNode)?"":$.jsx(wCt,W({},e)),SCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],CCt=e=>{const{classes:t}=e;return gn({root:["editBooleanCell"]},yn,t)};function PCt(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=At(e,SCt),l=hn(),c=y.useRef(null),u=go(),[d,f]=y.useState(n),h=xt(),m={classes:h.classes},g=CCt(m),v=y.useCallback(async x=>{const S=x.target.checked;a&&await a(x,S),f(S),await l.current.setEditCellValue({id:t,field:r,value:S},x)},[l,r,t,a]);return y.useEffect(()=>{f(n)},[n]),$o(()=>{i&&c.current.focus()},[i]),$.jsx("label",W({htmlFor:u,className:fe(g.root,o)},s,{children:$.jsx(h.slots.baseCheckbox,W({id:u,inputRef:c,checked:!!d,onChange:v,size:"small"},(w=h.slotProps)==null?void 0:w.baseCheckbox))}))}const TCt=e=>$.jsx(PCt,W({},e)),ECt=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],VP=e=>{if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1},OCt=oe("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function ICt(e){var P,T,E;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:a,label:s,variant:l="standard"}=e,c=At(e,ECt),[u,d]=y.useState(VP(t.value)),f=xt(),h=go(),m=go(),g=((P=f.slotProps)==null?void 0:P.baseSelect)||{},v=g.native??!1,w=((T=f.slotProps)==null?void 0:T.baseSelectOption)||{},x=y.useCallback(O=>{const k=VP(O.target.value);d(k),n(W({},t,{value:k}))},[n,t]);y.useEffect(()=>{d(VP(t.value))},[t.value]);const S=s??r.current.getLocaleText("filterPanelInputLabel");return $.jsxs(OCt,{children:[$.jsxs(f.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(f.slots.baseInputLabel,W({},(E=f.slotProps)==null?void 0:E.baseInputLabel,{id:h,shrink:!0,variant:l,children:S})),$.jsxs(f.slots.baseSelect,W({labelId:h,id:m,label:S,value:u===void 0?"":String(u),onChange:x,variant:l,notched:l==="outlined"?!0:void 0,native:v,displayEmpty:!0,inputProps:{ref:o,tabIndex:a}},c,g,{children:[$.jsx(f.slots.baseSelectOption,W({},w,{native:v,value:"",children:r.current.getLocaleText("filterValueAny")})),$.jsx(f.slots.baseSelectOption,W({},w,{native:v,value:"true",children:r.current.getLocaleText("filterValueTrue")})),$.jsx(f.slots.baseSelectOption,W({},w,{native:v,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const kCt=()=>[{value:"is",getApplyFilterFn:e=>{const t=VP(e.value);return t===void 0?null:n=>!!n===t},InputComponent:ICt}],MCt=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),ACt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},qle=W({},Ql,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:xCt,renderEditCell:TCt,sortComparator:$le,valueFormatter:MCt,filterOperators:kCt(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>ACt(e)}),Kle=e=>e.sorting,a1=Dt(Kle,e=>e.sortedRows),Iz=sr(a1,sf,xi,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];i&&r.push({id:o,model:i});const a=n[o];return a&&gv(a)&&r.push({id:o,model:{[iy]:o}}),r},[])),Fs=Dt(Kle,e=>e.sortModel),$Ct=sr(Fs,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),oM=e=>e.filter,ei=Dt(oM,e=>e.filterModel);Dt(ei,e=>e.quickFilterValues);const RCt=e=>e.visibleRowsLookup,bb=Dt(oM,e=>e.filteredRowsLookup);Dt(oM,e=>e.filteredChildrenCountLookup);Dt(oM,e=>e.filteredDescendantCountLookup);const Jf=sr(RCt,Iz,(e,t)=>t.filter(n=>e[n.id]!==!1)),ay=sr(Jf,e=>e.map(t=>t.id)),Yle=sr(bb,Iz,(e,t)=>t.filter(n=>e[n.id]!==!1)),Xle=sr(Yle,e=>e.map(t=>t.id));sr(ay,xi,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const Qle=sr(Jf,xi,vb,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),kz=Dt(Jf,e=>e.length),Mz=Dt(Qle,e=>e.length),_Ct=Dt(Yle,e=>e.length);Dt(_Ct,Mz,(e,t)=>e-t);const DCt=sr(ei,ud,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),NCt=sr(DCt,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),js=e=>e.rowSelection,LCt=Dt(js,e=>e.length),FCt=sr(js,sf,(e,t)=>new Map(e.map(n=>[n,t[n]]))),Du=sr(js,e=>e.reduce((t,n)=>(t[n]=n,t),{}));function Jle(e,t){var l;const n=xi(e),r=a1(e),o=bb(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;ci.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function jCt(e,t){return Dt(xi,a1,bb,Du,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(d=>d===e)+1;for(let d=c;da.depth;d+=1){const f=r[d];o[f]!==!1&&(s+=1,i[f]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}})}function Az(e){return e.signature===rl.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const BCt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==oi;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},zCt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a])},iP=(e,t,n,r,o,i)=>{const a=bb(e),s=Du(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&Jle(e,n).forEach(d=>{i(d),l.add(d)})}if(o){const c=d=>{if(s[d]!==d&&!l.has(d))return!1;const f=t[d];return(f==null?void 0:f.type)!=="group"?!0:f.children.every(c)},u=d=>{const f=zCt(t,a,d);if(f.length===0||f.every(c)){const m=t[d].parent;m!=null&&m!==oi&&e.current.isRowSelectable(m)&&(i(m),l.add(m),u(m))}};u(n)}}},Sq=(e,t,n,r,o,i)=>{const a=Du(e);if(!(!o&&!r)&&(o&&BCt(t,n).forEach(l=>{a[l]===l&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&Jle(e,n).forEach(c=>{i(c)})}},VCt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],HCt=e=>{const{classes:t}=e;return gn({root:["checkboxInput"]},yn,t)},UCt=y.forwardRef(function(t,n){var k,A;const{field:r,id:o,rowNode:i,hasFocus:a,tabIndex:s}=t,l=At(t,VCt),c=hn(),u=xt(),d={classes:u.classes},f=HCt(d),h=y.useRef(null),m=y.useRef(null),g=im(h,n),v=I=>{const R={value:I.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",R,I)};y.useLayoutEffect(()=>{if(s===0){const I=c.current.getCellElement(o,r);I&&(I.tabIndex=-1)}},[c,s,o,r]),y.useEffect(()=>{var I;if(a){const R=(I=h.current)==null?void 0:I.querySelector("input");R==null||R.focus({preventScroll:!0})}else m.current&&m.current.stop({})},[a]);const w=y.useCallback(I=>{I.key===" "&&I.stopPropagation()},[]),x=c.current.isRowSelectable(o),S=jCt(o,((k=u.rowSelectionPropagation)==null?void 0:k.parents)??!1),{isIndeterminate:P,isChecked:T}=Ye(c,S);if(i.type==="footer"||i.type==="pinnedRow")return null;const E=c.current.getLocaleText(T?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow"),O=u.indeterminateCheckboxAction==="select"?T&&!P:T;return $.jsx(u.slots.baseCheckbox,W({ref:g,tabIndex:s,checked:O,onChange:v,className:f.root,inputProps:{"aria-label":E},onKeyDown:w,indeterminate:P,disabled:!x,touchRippleRef:m},(A=u.slotProps)==null?void 0:A.baseCheckbox,l))}),WCt=UCt,iM=e=>e.focus,Fa=Dt(iM,e=>e.cell),GCt=Dt(iM,e=>e.columnHeader);Dt(iM,e=>e.columnHeaderFilter);const sO=Dt(iM,e=>e.columnGroupHeader),aM=e=>e.tabIndex,$z=Dt(aM,e=>e.cell),Zle=Dt(aM,e=>e.columnHeader);Dt(aM,e=>e.columnHeaderFilter);const qCt=Dt(aM,e=>e.columnGroupHeader);function Jt(e,t,n){const r=y.useRef(!0);$o(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function No(e,t){const n=y.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const ece=(e,t,n,r,o)=>{const i=No(e,"useNativeEventListener"),[a,s]=y.useState(!1),l=y.useRef(r),c=_le(t)?t():(t==null?void 0:t.current)??null,u=y.useCallback(d=>l.current&&l.current(d),[]);y.useEffect(()=>{l.current=r},[r]),y.useEffect(()=>{if(c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o),s(!0);const d=()=>{i.debug(`Clearing native ${n} event`),c.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",d)}},[c,u,n,a,i,o,e])},s1=e=>{const t=y.useRef(!0);t.current&&(t.current=!1,e())},KCt=()=>{},YCt=(e,t)=>{const n=y.useRef(!1);$o(()=>n.current||!e?KCt:(n.current=!0,t()),[n.current||e])},XCt=100,QCt=e=>e?0:100,tce=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,nce=e=>({page:0,pageSize:e?0:100}),JCt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),rce=(e,t)=>{if(t===rl.DataGrid&&e>XCt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`))},ZCt=-1,sM=e=>e.pagination,Fi=Dt(sM,e=>e.paginationModel),Dg=Dt(sM,e=>e.rowCount),U0=Dt(sM,e=>e.meta),ePt=Dt(Fi,e=>e.page),tPt=Dt(Fi,e=>e.pageSize),oce=Dt(Fi,Dg,(e,t)=>tce(t,e.pageSize,e.page)),Rz=sr(Fi,xi,vb,Jf,Qle,(e,t,n,r,o)=>{var h;const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=e.pageSize===ZCt?i-1:Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=r.findIndex(m=>m.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),g===0&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),nPt=sr(Jf,Rz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),ice=sr(ay,Rz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),rPt=["field","colDef"],oPt=e=>{const{classes:t}=e;return gn({root:["checkboxInput"]},yn,t)},iPt=y.forwardRef(function(t,n){var k;const r=At(t,rPt),[,o]=y.useState(!1),i=hn(),a=xt(),s={classes:a.classes},l=oPt(s),c=Ye(i,Zle),u=Ye(i,js),d=Ye(i,ay),f=Ye(i,ice),h=y.useMemo(()=>typeof a.isRowSelectable!="function"?u:u.filter(A=>i.current.getRow(A)?a.isRowSelectable(i.current.getRowParams(A)):!1),[i,a.isRowSelectable,u]),m=y.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?d:f).reduce((I,R)=>(I[R]=!0,I),{}),[a.pagination,a.checkboxSelectionVisibleOnly,f,d]),g=y.useMemo(()=>h.filter(A=>m[A]).length,[h,m]),v=g>0&&g0,x=A=>{const I={value:A.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",I)},S=c!==null&&c.field===t.field?0:-1;y.useLayoutEffect(()=>{const A=i.current.getColumnHeaderElement(t.field);S===0&&A&&(A.tabIndex=-1)},[S,i,t.field]);const P=y.useCallback(A=>{A.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),T=y.useCallback(()=>{o(A=>!A)},[]);y.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",T),[i,T]);const E=i.current.getLocaleText(w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows"),O=a.indeterminateCheckboxAction==="select"?w&&!v:w;return $.jsx(a.slots.baseCheckbox,W({ref:n,indeterminate:v,checked:O,onChange:x,className:l.root,inputProps:{"aria-label":E},tabIndex:S,onKeyDown:P,disabled:!Az(a)},(k=a.slotProps)==null?void 0:k.baseCheckbox,r))}),yu="__check__",wb=W({},qle,{type:"custom",field:yu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>{const o=Du(r),i=r.current.getRowId(t);return o[i]!==void 0},renderHeader:e=>$.jsx(iPt,W({},e)),renderCell:e=>$.jsx(WCt,W({},e))}),aPt=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function Cq(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function Ym(e){var S;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:a,clearButton:s,tabIndex:l,disabled:c}=e,u=At(e,aPt),d=gb(),[f,h]=y.useState(()=>Cq(t.value,r)),[m,g]=y.useState(!1),v=go(),w=xt(),x=y.useCallback(P=>{d.clear();const T=P.target.value;h(T),g(!0),d.start(w.filterDebounceMs,()=>{const E=new Date(T);n(W({},t,{value:Number.isNaN(E.getTime())?void 0:E})),g(!1)})},[n,t,w.filterDebounceMs,d]);return y.useEffect(()=>{const P=Cq(t.value,r);h(P)},[t.value,r]),$.jsx(w.slots.baseTextField,W({fullWidth:!0,id:v,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:x,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:W({},m||s?{endAdornment:m?$.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):s}:{},{disabled:c},a,{inputProps:W({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},a==null?void 0:a.inputProps)})},u,(S=w.slotProps)==null?void 0:S.baseTextField))}function Xm(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const ace=e=>[{value:"is",getApplyFilterFn:t=>Xm(t,(n,r)=>n===r,e),InputComponent:Ym,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>Xm(t,(n,r)=>n!==r,e),InputComponent:Ym,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>Xm(t,(n,r)=>n>r,e),InputComponent:Ym,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>Xm(t,(n,r)=>n>=r,e),InputComponent:Ym,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>Xm(t,(n,r)=>nXm(t,(n,r)=>n<=r,e),InputComponent:Ym,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],sPt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],lPt=oe(Ov)({fontSize:"inherit"}),cPt=e=>{const{classes:t}=e;return gn({root:["editInputCell"]},yn,t)};function uPt(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,l=At(e,sPt),c=o.type==="dateTime",u=hn(),d=y.useRef(),f=y.useMemo(()=>{let P;n==null?P=null:n instanceof Date?P=n:P=new Date((n??"").toString());let T;return P==null||Number.isNaN(P.getTime())?T="":T=new Date(P.getTime()-P.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:P,formatted:T}},[n,c]),[h,m]=y.useState(f),v={classes:xt().classes},w=cPt(v),x=y.useCallback(P=>{if(P==="")return null;const[T,E]=P.split("T"),[O,k,A]=T.split("-"),I=new Date;if(I.setFullYear(Number(O),Number(k)-1,Number(A)),I.setHours(0,0,0,0),E){const[R,N]=E.split(":");I.setHours(Number(R),Number(N),0,0)}return I},[]),S=y.useCallback(async P=>{const T=P.target.value,E=x(T);s&&await s(P,E),m({parsed:E,formatted:T}),u.current.setEditCellValue({id:t,field:r,value:E},P)},[u,r,t,s,x]);return y.useEffect(()=>{m(P=>{var T,E;return f.parsed!==P.parsed&&((T=f.parsed)==null?void 0:T.getTime())!==((E=P.parsed)==null?void 0:E.getTime())?f:P})},[f]),$o(()=>{i&&d.current.focus()},[i]),$.jsx(lPt,W({inputRef:d,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",inputProps:W({max:c?"9999-12-31T23:59":"9999-12-31"},a),value:h.formatted,onChange:S},l))}const sce=e=>$.jsx(uPt,W({},e));function lce({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` -`))}const dPt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return lce({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},fPt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return lce({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},pPt=W({},Ql,{type:"date",sortComparator:Rle,valueFormatter:dPt,filterOperators:ace(),renderEditCell:sce,pastedValueParser:e=>new Date(e)}),hPt=W({},Ql,{type:"dateTime",sortComparator:Rle,valueFormatter:fPt,filterOperators:ace(!0),renderEditCell:sce,pastedValueParser:e=>new Date(e)}),Ld=e=>e==null?null:Number(e),mPt=e=>e==null||Number.isNaN(e)||e===""?null:t=>Ld(t)===Ld(e),gPt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Ld(t)===e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>Ld(t)!==e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ld(t)>e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ld(t)>=e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ld(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:Ld(t)<=e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:Nle,InputComponentProps:{type:"number"}}],yPt=W({},Ql,{type:"number",align:"right",headerAlign:"right",sortComparator:$le,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>F1t(e)?e.toLocaleString():e||"",filterOperators:gPt(),getApplyQuickFilterFn:mPt});function yv(e){return(e==null?void 0:e.type)==="singleSelect"}function Mh(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(W({field:e.field},t)):e.valueOptions}function lO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const vPt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],bPt=["MenuProps"];function wPt(e){return!!e.key}function xPt(e){var N,L;const t=xt(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===Hc.Cell}=e,d=At(e,vPt),f=hn(),h=y.useRef(),m=y.useRef(),[g,v]=y.useState(u),x=(((N=t.slotProps)==null?void 0:N.baseSelect)||{}).native??!1,S=((L=t.slotProps)==null?void 0:L.baseSelect)||{},{MenuProps:P}=S,T=At(S,bPt);if($o(()=>{var B;s&&((B=m.current)==null||B.focus())},[s]),!yv(a))return null;const E=Mh(a,{id:n,row:i});if(!E)return null;const O=a.getOptionValue,k=a.getOptionLabel,A=async B=>{if(!yv(a)||!E)return;v(!1);const _=B.target,D=lO(_.value,E,O);c&&await c(B,D),await f.current.setEditCellValue({id:n,field:o,value:D},B)},I=(B,_)=>{if(t.editMode===Hc.Row){v(!1);return}if(_==="backdropClick"||B.key==="Escape"){const D=f.current.getCellParams(n,o);f.current.publishEvent("cellEditStop",W({},D,{reason:B.key==="Escape"?Ml.escapeKeyDown:Ml.cellFocusOut}))}},R=B=>{wPt(B)&&B.key==="Enter"||v(!0)};return!E||!a?null:$.jsx(t.slots.baseSelect,W({ref:h,inputRef:m,value:r,onChange:A,open:g,onOpen:R,MenuProps:W({onClose:I},P),error:l,native:x,fullWidth:!0},d,T,{children:E.map(B=>{var D;const _=O(B);return y.createElement(t.slots.baseSelectOption,W({},((D=t.slotProps)==null?void 0:D.baseSelectOption)||{},{native:x,key:_,value:_}),k(B))})}))}const SPt=e=>$.jsx(xPt,W({},e)),CPt=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],PPt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...Mh(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),y.createElement(t,W({},i,{native:o,key:l,value:l}),c)}),TPt=oe("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function Pq(e){var O,k,A,I,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:a,tabIndex:s,label:l,variant:c="standard",clearButton:u}=e,d=At(e,CPt),f=t.value??"",h=go(),m=go(),g=xt(),v=((k=(O=g.slotProps)==null?void 0:O.baseSelect)==null?void 0:k.native)??!1;let w=null;if(t.field){const N=o.current.getColumn(t.field);yv(N)&&(w=N)}const x=w==null?void 0:w.getOptionValue,S=w==null?void 0:w.getOptionLabel,P=y.useMemo(()=>Mh(w),[w]),T=y.useCallback(N=>{let L=N.target.value;L=lO(L,P,x),n(W({},t,{value:L}))},[P,x,n,t]);if(!yv(w))return null;const E=l??o.current.getLocaleText("filterPanelInputLabel");return $.jsxs(TPt,{children:[$.jsxs(g.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(g.slots.baseInputLabel,W({},(A=g.slotProps)==null?void 0:A.baseInputLabel,{id:m,htmlFor:h,shrink:!0,variant:c,children:E})),$.jsx(g.slots.baseSelect,W({id:h,label:E,labelId:m,value:f,onChange:T,variant:c,type:r||"text",inputProps:{tabIndex:s,ref:i,placeholder:a??o.current.getLocaleText("filterPanelInputPlaceholder")},native:v,notched:c==="outlined"?!0:void 0},d,(I=g.slotProps)==null?void 0:I.baseSelect,{children:PPt({column:w,OptionComponent:g.slots.baseSelectOption,getOptionLabel:S,getOptionValue:x,isSelectNative:v,baseSelectOptionProps:(R=g.slotProps)==null?void 0:R.baseSelectOption})}))]}),u]})}const EPt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],OPt=["key"],IPt=zJ();function kPt(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:a,helperText:s,size:l,variant:c="standard"}=e,u=At(e,EPt),d={color:i,error:a,helperText:s,size:l,variant:c},f=go(),h=xt();let m=null;if(t.field){const T=r.current.getColumn(t.field);yv(T)&&(m=T)}const g=m==null?void 0:m.getOptionValue,v=m==null?void 0:m.getOptionLabel,w=y.useCallback((T,E)=>g(T)===g(E),[g]),x=y.useMemo(()=>Mh(m)||[],[m]),S=y.useMemo(()=>Array.isArray(t.value)?t.value.reduce((T,E)=>{const O=x.find(k=>g(k)===E);return O!=null&&T.push(O),T},[]):[],[g,t.value,x]),P=y.useCallback((T,E)=>{n(W({},t,{value:E.map(g)}))},[n,t,g]);return $.jsx(ec,W({multiple:!0,options:x,isOptionEqualToValue:w,filterOptions:IPt,id:f,value:S,onChange:P,getOptionLabel:v,renderTags:(T,E)=>T.map((O,k)=>{const A=E({index:k}),{key:I}=A,R=At(A,OPt);return $.jsx(h.slots.baseChip,W({variant:"outlined",size:"small",label:v(O)},R),I)}),renderInput:T=>{var E;return $.jsx(h.slots.baseTextField,W({},T,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},T.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,(E=h.slotProps)==null?void 0:E.baseTextField))}},u))}const Qm=e=>e==null||!Tz(e)?e:e.value,MPt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Qm(t)===Qm(e.value),InputComponent:Pq},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>Qm(t)!==Qm(e.value),InputComponent:Pq},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(Qm);return n=>t.includes(Qm(n))},InputComponent:kPt}],APt=e=>typeof e[0]=="object",$Pt=e=>Tz(e)?e.value:e,RPt=e=>Tz(e)?e.label:String(e),_Pt=W({},Ql,{type:"singleSelect",getOptionLabel:RPt,getOptionValue:$Pt,valueFormatter(e,t,n,r){const o=r.current.getRowId(t);if(!yv(n))return"";const i=Mh(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!APt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:SPt,filterOperators:MPt(),pastedValueParser:(e,t,n)=>{const r=n,o=Mh(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),DPt="string",NPt=()=>({string:Ql,number:yPt,date:pPt,dateTime:hPt,boolean:qle,singleSelect:_Pt,[eM]:aCt,custom:Ql}),_z=e=>e.headerFiltering,LPt=Dt(_z,e=>(e==null?void 0:e.enabled)??!1),FPt=Dt(_z,e=>e.editing),jPt=Dt(_z,e=>e.menuOpen),lM=e=>e.columnGrouping,cce=sr(lM,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),uce=sr(lM,e=>(e==null?void 0:e.lookup)??{}),BPt=sr(lM,e=>(e==null?void 0:e.headerStructure)??[]),l1=Dt(lM,e=>(e==null?void 0:e.maxDepth)??0),dce=["maxWidth","minWidth","width","flex"],PR=NPt();function zPt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;ud.maxWidth&&(c+=d.maxWidth-h,h=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:h,flex:d.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const VN=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,d=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=Dc(c.width||Ql.width,c.minWidth||Ql.minWidth,c.maxWidth||Ql.maxWidth),o+=u),c.computedWidth!==u&&(c=W({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=zPt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return W({},e,{lookup:n})},VPt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u!i[u])],l=W({},e.lookup);for(let u=0;u{f[h]=m===-1?1/0:m}),l[d]=f}return W({},e,{orderedFields:s,lookup:l})};function Tq(e){let t=PR[DPt];return e&&PR[e]&&(t=PR[e]),t}const lg=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=Qs(e),keepOnlyColumnsToUpsert:o=!1})=>{var u,d;const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const f=_c(e.current.state);a={orderedFields:o?[]:[...f.orderedFields],lookup:W({},f.lookup),columnVisibilityModel:r}}let s={};o&&!i&&(s=Object.keys(a.lookup).reduce((f,h)=>W({},f,{[h]:!1}),{})),t.forEach(f=>{const{field:h}=f;s[h]=!0;let m=a.lookup[h];m==null?(m=W({},Tq(f.type),{field:h,hasBeenResized:!1}),a.orderedFields.push(h)):o&&a.orderedFields.push(h),m&&m.type!==f.type&&(m=W({},Tq(f.type),{field:h}));let g=m.hasBeenResized;dce.forEach(v=>{f[v]!==void 0&&(g=!0,f[v]===-1&&(f[v]=1/0))}),a.lookup[h]=Sle(m,W({},f,{hasBeenResized:g}))}),o&&!i&&Object.keys(a.lookup).forEach(f=>{s[f]||delete a.lookup[f]});const l=e.current.unstable_applyPipeProcessors("hydrateColumns",a),c=VPt(l,n);return VN(c,((d=(u=e.current).getRootDimensions)==null?void 0:d.call(u))??void 0)};function HPt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return gn(r,yn,n)},GPt=Xn("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${se["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${se["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${se["scrollArea--left"]}`]:{left:0},[`&.${se["scrollArea--right"]}`]:{right:0}}));function qPt(e){const{scrollDirection:t}=e,n=y.useRef(null),r=hn(),o=gb(),i=Ye(r,o1),a=Ye(r,Cz),s=Ye(r,li),l=y.useRef({left:0,top:0}),c=()=>{if(t==="left")return l.current.left>0;if(t==="right"){const k=a-s.viewportInnerSize.width;return l.current.left{l.current=k,h(c)},T=wr(k=>{let A;if(k.preventDefault(),t==="left")A=k.clientX-n.current.getBoundingClientRect().right;else if(t==="right")A=Math.max(1,k.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");A=(A-Eq)*UPt+Eq,o.start(0,()=>{r.current.scroll({left:l.current.left+A,top:l.current.top})})}),E=wr(()=>{d(!0)}),O=wr(()=>{d(!1)});return ht(r,"scrollPositionChange",P),ht(r,"columnHeaderDragStart",E),ht(r,"columnHeaderDragEnd",O),!u||!f?null:$.jsx(GPt,{ref:n,className:fe(v.root),ownerState:g,onDragOver:T,style:S})}const Oq=Xf(qPt),KPt=typeof window<"u"?y.useLayoutEffect:y.useEffect,YPt=()=>{};function XPt(e,t,n){const r=y.useRef(null);r.current=t,KPt(()=>{if(typeof ResizeObserver>"u")return YPt;const o=e.current,i=new ResizeObserver(a=>{r.current(a)});return o&&i.observe(o),()=>{i.disconnect()}},[e,n])}const fce=y.createContext(void 0);function yl(){const e=y.useContext(fce);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e}const sy=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=Rz(e),n=nPt(e)):(n=Jf(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},Zf=(e,t)=>{const n=sy(e,t);return y.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},QPt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",JPt=QPt.includes("firefox"),xb=e=>e.rowsMeta,cM=e=>e.virtualization;Dt(cM,e=>e.enabled);const Nz=Dt(cM,e=>e.enabledForColumns),ZPt=Dt(cM,e=>e.enabledForRows),uM=Dt(cM,e=>e.renderContext),eTt=sr(e=>e.virtualization.renderContext.firstColumnIndex,e=>e.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),pce={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},tTt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return W({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:pce}})};function nTt(e,t){const n=i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};Jt(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabledForColumns:i})}))}},"public"),y.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const Lz=e=>e.rowSpanning,hce=Dt(Lz,e=>e.hiddenCells),rTt=Dt(Lz,e=>e.spannedCells),oTt=Dt(Lz,e=>e.hiddenCellOriginMap),vv=e=>e.listViewColumn,TR=50;var io=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(io||{});const Iq={top:0,left:0},iTt=Object.freeze(new Map),aTt=(e,t,n,r,o)=>({direction:io.NONE,buffer:gce(e,io.NONE,t,n,r,o)});let HN=!1;try{typeof window<"u"&&(HN=/jsdom/.test(window.navigator.userAgent))}catch{}const sTt=()=>{const e=yl(),t=xt(),{unstable_listView:n}=t,r=Ye(e,()=>n?[vv(e.current.state)]:yo(e)),o=Ye(e,ZPt)&&!HN,i=Ye(e,Nz)&&!HN,a=Ye(e,li),s=a.viewportOuterSize,l=Ye(e,am),c=Ye(e,i1),u=n?{left:[],right:[]}:c,d=l.bottom.length>0,[f,h]=y.useState(iTt),m=nr(),g=Ye(e,Fa),v=Ye(e,$z),w=Ye(e,xb),x=Ye(e,Du),S=Zf(e,t),P=e.current.rootElementRef,T=e.current.mainElementRef,E=e.current.virtualScrollerRef,O=e.current.virtualScrollbarVerticalRef,k=e.current.virtualScrollbarHorizontalRef,A=a.contentSize.height,I=a.columnsTotalWidth,R=Ye(e,T1t);XPt(T,()=>e.current.resize());const N=y.useRef(Iq),L=y.useRef(Iq),B=y.useRef(pce),_=Ye(e,uM),D=gb(),z=y.useRef(void 0),F=Jc(()=>aTt(m,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,TR*6)).current,H={rowIndex:y.useMemo(()=>g?S.rows.findIndex(re=>re.id===g.id):-1,[g,S.rows]),columnIndex:y.useMemo(()=>g?r.findIndex(re=>re.field===g.field):-1,[g,r])},U=y.useCallback(re=>{if(uTt(re,e.current.state.virtualization.renderContext))return;const de=re.firstRowIndex!==B.current.firstRowIndex||re.lastRowIndex!==B.current.lastRowIndex;e.current.setState(ee=>W({},ee,{virtualization:W({},ee.virtualization,{renderContext:re})})),a.isReady&&de&&(B.current=re,e.current.publishEvent("renderedRowsIntervalChange",re)),L.current=N.current},[e,a.isReady]),q=wr(()=>{const re={top:E.current.scrollTop,left:E.current.scrollLeft},de=re.left-N.current.left,ee=re.top-N.current.top,ce=de!==0||ee!==0;N.current=re;const me=ce?dTt(de,ee):io.NONE,we=Math.abs(N.current.top-L.current.top),ge=Math.abs(N.current.left-L.current.left),Se=we>=a.rowHeight||ge>=TR,xe=F.direction!==me;if(!(Se||xe))return _;if(xe)switch(me){case io.NONE:case io.LEFT:case io.RIGHT:z.current=void 0;break;default:z.current=_;break}F.direction=me,F.buffer=gce(m,me,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,TR*6);const Re=ER(e,t,o,i),_e=OR(Re,N.current,F);return vI.flushSync(()=>{U(_e)}),D.start(1e3,q),_e}),Y=()=>{const re=ER(e,t,o,i),de=OR(re,N.current,F);z.current=void 0,U(de)},ae=wr(re=>{const{scrollTop:de,scrollLeft:ee}=re.currentTarget;if(de<0||!m&&ee<0||m&&ee>0)return;const ce=q();e.current.publishEvent("scrollPositionChange",{top:de,left:ee,renderContext:ce})}),Z=wr(re=>{e.current.publishEvent("virtualScrollerWheel",{},re)}),K=wr(re=>{e.current.publishEvent("virtualScrollerTouchMove",{},re)}),te=(re={})=>{var Te;if(!re.rows&&!S.range)return[];const de=re.renderContext??_,ee=!d&&re.position===void 0||d&&re.position==="bottom",ce=re.position!==void 0;let me;switch(re.position){case"top":me=0;break;case"bottom":me=l.top.length+S.rows.length;break;case void 0:me=l.top.length;break}const we=re.rows??S.rows,ge=de.firstRowIndex,Se=Math.min(de.lastRowIndex,we.length),xe=re.rows?fq(0,re.rows.length):fq(ge,Se);let Ie=-1;!ce&&H.rowIndex!==-1&&(H.rowIndex=Se&&(Ie=H.rowIndex,xe.push(Ie)));const Re=[],_e=(Te=t.slotProps)==null?void 0:Te.row,ye=Qf(e);return xe.forEach(Oe=>{var Fn,Un,Po;const{id:Me,model:Ue}=we[Oe],ze=(((Fn=S==null?void 0:S.range)==null?void 0:Fn.firstRowIndex)||0)+me+Oe;if(R){const qr=u.left.length,Ii=r.length-u.right.length;e.current.calculateColSpan({rowId:Me,minFirstColumn:qr,maxLastColumn:Ii,columns:r}),u.left.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:0,maxLastColumn:u.left.length,columns:r}),u.right.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:r.length-u.right.length,maxLastColumn:r.length,columns:r})}const Qe=(g==null?void 0:g.id)===Me,ct=e.current.rowHasAutoHeight(Me)?"auto":e.current.unstable_getRowHeight(Me);let nt;x[Me]==null?nt=!1:nt=e.current.isRowSelectable(Me);let et=!1;re.position===void 0&&(et=Oe===0);let yt=!1;const vn=Oe===we.length-1;if(ee)if(ce)yt=vn;else{const qr=S.rows.length-1;Oe===qr&&(yt=!0)}const $e=Oe===Ie;let Xe=null;v!==null&&v.id===Me&&(Xe=e.current.getCellParams(Me,v.field).cellMode==="view"?v.field:null);let bt=de;!ce&&z.current&&Oe>=z.current.firstRowIndex&&Oes.width,ie=y.useMemo(()=>({overflowX:!pe||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[pe,t.autoHeight,n]),le=y.useMemo(()=>{const re={width:pe?I:"auto",flexBasis:A,flexShrink:0};return t.autoHeight&&S.rows.length===0&&(re.flexBasis=Ule(e)),re},[e,I,A,pe,t.autoHeight,S.rows.length]);return y.useEffect(()=>{e.current.publishEvent("virtualScrollerContentSizeChange")},[e,le]),$o(()=>{e.current.resize()},[e,w.currentPageTotalHeight]),$o(()=>{i&&(E.current.scrollLeft=0),o&&(E.current.scrollTop=0)},[i,o,P,E]),$o(()=>{n&&(E.current.scrollLeft=0)},[n,E]),YCt(s.width!==0,()=>{const re=ER(e,t,o,i),de=OR(re,N.current,F);U(de),e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:de})}),e.current.register("private",{updateRenderContext:Y}),ht(e,"columnsChange",Y),ht(e,"filteredRowsSet",Y),ht(e,"rowExpansionChange",Y),{renderContext:_,setPanels:h,getRows:te,getContainerProps:()=>({ref:T}),getScrollerProps:()=>({ref:E,onScroll:ae,onWheel:Z,onTouchMove:K,style:ie,role:"presentation",tabIndex:JPt?-1:void 0}),getContentProps:()=>({style:le,role:"presentation"}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:O,role:"presentation"}),getScrollbarHorizontalProps:()=>({ref:k,role:"presentation"})}};function ER(e,t,n,r){const o=li(e.current.state),i=sy(e,t),a=t.unstable_listView?[vv(e.current.state)]:yo(e),s=oTt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:xb(e.current.state),columnPositions:Qf(e),rows:i.rows,range:i.range,pinnedColumns:i1(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1}}function OR(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(kq(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=e.autoHeight?l+e.rows.length:kq(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[d,f]=UN({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});for(let h=d;h=e.range.lastRowIndex);const i=Dc(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?Mf(t,e.rowsMeta.positions,n):cTt(t,e.rowsMeta.positions,i,n)}function lTt(e,t,n){const[r,o]=UN({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=UN({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=HPt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function Mf(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l=Math.abs(e)?t>0?io.DOWN:io.UP:e>0?io.RIGHT:io.LEFT}function gce(e,t,n,r,o,i){if(e)switch(t){case io.LEFT:t=io.RIGHT;break;case io.RIGHT:t=io.LEFT;break}switch(t){case io.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case io.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case io.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case io.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case io.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const fTt=()=>{var u,d;const e=hn(),t=xt(),n=Ye(e,tM),r=Ye(e,kz),o=n===0,i=Ye(e,sCt),a=!i&&o,s=!i&&n>0&&r===0;let l=null,c=null;return a&&(l="noRowsOverlay"),s&&(l="noResultsOverlay"),i&&(l="loadingOverlay",c=((d=(u=t.slotProps)==null?void 0:u.loadingOverlay)==null?void 0:d[o?"noRowsVariant":"variant"])||null),{overlayType:l,loadingOverlayVariant:c}},pTt=Xn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e,loadingOverlayVariant:t})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),hTt=Xn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),mTt=e=>{const{classes:t}=e;return gn({root:["overlayWrapper"],inner:["overlayWrapperInner"]},yn,t)};function gTt(e){const t=hn(),n=xt(),r=Zf(t,n),o=Ye(t,li);let i=o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0);(n.autoHeight&&r.rows.length===0||i===0)&&(i=Ule(t));const a=mTt(W({},e,{classes:n.classes}));return $.jsx(pTt,W({className:fe(a.root)},e,{children:$.jsx(hTt,W({className:fe(a.inner),style:{height:i,width:o.viewportOuterSize.width}},e))}))}function yTt(e){var i,a;const{overlayType:t}=e,n=xt();if(!t)return null;const r=(i=n.slots)==null?void 0:i[t],o=(a=n.slotProps)==null?void 0:a[t];return $.jsx(gTt,W({},e,{children:$.jsx(r,W({},o))}))}const HP=e=>e.columnMenu;function vTt(){var v;const e=yl(),t=xt(),n=Ye(e,yo),r=Ye(e,NCt),o=Ye(e,$Ct),i=Ye(e,Zle),a=Ye(e,$z),s=Ye(e,qCt),l=Ye(e,GCt),c=Ye(e,sO),u=Ye(e,l1),d=Ye(e,HP),f=Ye(e,Qs),h=Ye(e,BPt),m=!(s===null&&i===null&&a===null),g=e.current.columnHeadersContainerRef;return $.jsx(t.slots.columnHeaders,W({ref:g,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:m},(v=t.slotProps)==null?void 0:v.columnHeaders))}const bTt=Xf(vTt),yce=y.createContext(void 0),vce=()=>{const e=y.useContext(yce);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` -`));return e},wTt=Xn("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),xTt=Xn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),STt=y.forwardRef((e,t)=>{const n=xt(),o=vce().hooks.useGridAriaAttributes();return $.jsxs(xTt,W({ref:t,ownerState:n,className:e.className,tabIndex:-1},o,{children:[$.jsx(wTt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),CTt=()=>gn({root:["topContainer"]},yn,{}),PTt=Xn("div")({position:"sticky",zIndex:4,top:0});function TTt(e){const t=CTt();return $.jsx(PTt,W({},e,{className:fe(t.root,se["container--top"]),role:"presentation"}))}const ETt=()=>gn({root:["bottomContainer"]},yn,{}),OTt=Xn("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function ITt(e){const t=ETt();return $.jsx(OTt,W({},e,{className:fe(t.root,se["container--bottom"]),role:"presentation"}))}const kTt=(e,t)=>{const{classes:n}=e;return gn({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},yn,n)},MTt=Xn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),ATt=y.forwardRef(function(t,n){var a;const r=xt(),o=!r.autoHeight&&((a=t.style)==null?void 0:a.minHeight)==="auto",i=kTt(r,o);return $.jsx(MTt,W({ref:n},t,{ownerState:r,className:fe(i.root,t.className)}))}),$Tt=Xn("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),bce=Xn("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),RTt=Xn(bce)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),_Tt=Xn(bce)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),DTt=Xn("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function NTt({rowsLength:e}){const t=hn(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ye(t,li),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:$.jsxs($Tt,{className:se.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&$.jsx(RTt,{className:se["filler--pinnedLeft"],style:{width:s}}),$.jsx(DTt,{}),l>0&&$.jsx(_Tt,{className:se["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const LTt=Xf(NTt),FTt=["className"],jTt=e=>{const{classes:t}=e;return gn({root:["virtualScrollerRenderZone"]},yn,t)},BTt=Xn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),zTt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,FTt),i=hn(),a=xt(),s=jTt(a),l=Ye(i,()=>{const c=uM(i);return xb(i.current.state).positions[c.firstRowIndex]??0});return $.jsx(BTt,W({ref:n,className:fe(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o))}),VTt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1},Vo=e=>e.editRows,qx=e=>e.preferencePanel;var Ah=function(e){return e.filters="filters",e.columns="columns",e}(Ah||{});const HTt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return gn(r,yn,n)},wce=Xn("div")({position:"absolute",display:"inline-block",zIndex:6,"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),UTt=Xn(wce)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),WTt=Xn(wce)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),Mq=y.forwardRef(function(t,n){const r=yl(),o=xt(),i=y.useRef(!1),a=y.useRef(0),s=y.useRef(null),l=y.useRef(null),c=HTt(o,t.position),u=Ye(r,li),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",h=t.position==="vertical"?u.hasScrollX:u.hasScrollY,m=u.minimumSize[d]+(h?u.scrollbarSize:0),v=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(m/u.viewportOuterSize[d]),w=wr(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;if(!T||P[f]===a.current)return;if(a.current=P[f],i.current){i.current=!1;return}i.current=!0;const E=P[f]/m;T[f]=E*v}),x=wr(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;if(!T)return;if(i.current){i.current=!1;return}i.current=!0;const E=T[f]/v;P[f]=E*m});Zk(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;return P.addEventListener("scroll",w,{capture:!0}),T.addEventListener("scroll",x,{capture:!0}),()=>{P.removeEventListener("scroll",w,{capture:!0}),T.removeEventListener("scroll",x,{capture:!0})}}),y.useEffect(()=>{l.current.style.setProperty(d,`${v}px`)},[v,d]);const S=t.position==="vertical"?UTt:WTt;return $.jsx(S,{ref:im(n,s),className:c.root,style:t.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:$.jsx("div",{ref:l,className:c.content})})}),GTt=(e,t,n)=>{const{classes:r}=e,o={root:["main",t.rightPinnedWidth>0&&"main--hasPinnedRight",n==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",t.hasScrollX&&"virtualScroller--hasScrollX"]};return gn(o,yn,r)},qTt=Xn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0});function KTt(e){const t=hn(),n=xt(),r=Ye(t,li),o=fTt(),i=GTt(n,r,o.loadingOverlayVariant),a=sTt(),{getContainerProps:s,getScrollerProps:l,getContentProps:c,getRenderZoneProps:u,getScrollbarVerticalProps:d,getScrollbarHorizontalProps:f,getRows:h}=a,m=h();return $.jsxs(STt,W({className:i.root},s(),{children:[$.jsx(Oq,{scrollDirection:"left"}),$.jsx(Oq,{scrollDirection:"right"}),$.jsxs(qTt,W({className:i.scroller},l(),{ownerState:n,children:[$.jsxs(TTt,{children:[!n.unstable_listView&&$.jsx(bTt,{}),$.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:a})]}),$.jsx(yTt,W({},o)),$.jsx(ATt,W({},c(),{children:$.jsxs(zTt,W({},u(),{children:[m,$.jsx(n.slots.detailPanels,{virtualScroller:a})]}))})),$.jsx(LTt,{rowsLength:m.length}),$.jsx(ITt,{children:$.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:a})})]})),r.hasScrollY&&$.jsx(Mq,W({position:"vertical"},d())),r.hasScrollX&&!n.unstable_listView&&$.jsx(Mq,W({position:"horizontal"},f())),e.children]}))}function YTt(){var t;const e=xt();return e.hideFooter?null:$.jsx(e.slots.footer,W({},(t=e.slotProps)==null?void 0:t.footer))}let IR;function XTt(){return IR===void 0&&document.createElement("div").focus({get preventScroll(){return IR=!0,!1}}),IR}function QTt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function cO(e,t){return e.closest(`.${t}`)}function dd(e){return e.replace(/["\\]/g,"\\$&")}function JTt(e,t){return e.querySelector(`[role="columnheader"][data-field="${dd(t)}"]`)}function xce(e){return`.${se.row}[data-id="${dd(String(e))}"]`}function ZTt(e,t){return e.querySelector(xce(t))}function eEt(e,{id:t,field:n}){const r=xce(t),o=`.${se.cell}[data-field="${dd(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function c1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function tEt(e){return e.getAttribute("data-field")}function nEt(e,t){return e.querySelector(`[data-field="${dd(t)}"]`)}function rEt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function oEt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${dd(t)}-|"]`)??[])}function iEt(e,t){var a;if(!cO(e,se.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(Pce(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const d=s.querySelector(`[data-colindex="${c}"]`);d&&i.push(d)}),i):[]}function Aq(e,t){return e.rootElementRef.current.querySelector(`.${se[t]}`)}const Sce=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return Pce(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${se[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=Sb(s);l!==null&&r(l)&&o.push(s)})}),o};function aEt(e,t,n){const r=Sb(t);return Sce({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function sEt(e,t,n){const r=Sb(t);return Sce({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${se[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=Sb(a);s!==null&&r(s)&&o.push(a)}),o};function lEt(e,t,n){const r=Sb(t);return Cce({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function cEt(e,t,n){const r=Sb(t);return Cce({api:e,position:n?"left":"right",colIndex:r,filterFn:o=>n?o>r:o div > [data-field="${dd(t)}"][role="columnheader"]`)}function dEt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${dd(t)}"][role="gridcell"]`))}function Pce(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${se.row}`)}function Sb(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}class UP extends Error{}function fEt(e,t){const n=y.useCallback(f=>({field:f,colDef:e.current.getColumn(f)}),[e]),r=y.useCallback(f=>{const h=e.current.getRow(f);if(!h)throw new UP(`No row with id #${f} found`);return{id:f,columns:e.current.getAllColumns(),row:h}},[e]),o=y.useCallback((f,h)=>{const m=t.unstable_listView?vv(e.current.state):e.current.getColumn(h),g=e.current.getRow(f),v=e.current.getRowNode(f);if(!g||!v)throw new UP(`No row with id #${f} found`);const w=g[h],x=m!=null&&m.valueGetter?m.valueGetter(w,g,m,e):w,S=Fa(e),P=$z(e),T={id:f,field:h,row:g,rowNode:v,colDef:m,cellMode:e.current.getCellMode(f,h),hasFocus:S!==null&&S.field===h&&S.id===f,tabIndex:P&&P.field===h&&P.id===f?0:-1,value:x,formattedValue:x,isEditable:!1,api:{}};return m&&m.valueFormatter&&(T.formattedValue=m.valueFormatter(x,g,m,e)),T.isEditable=m&&e.current.isCellEditable(T),T},[e,t.unstable_listView]),i=y.useCallback((f,h)=>{const m=e.current.getColumn(h),g=e.current.getRow(f);if(!g)throw new UP(`No row with id #${f} found`);return!m||!m.valueGetter?g[h]:m.valueGetter(g[m.field],g,m,e)},[e]),a=y.useCallback((f,h)=>{const m=h.field;if(!h||!h.valueGetter)return f[m];const g=f[h.field];return h.valueGetter(g,f,h,e)},[e]),s=y.useCallback((f,h)=>{const m=a(f,h);return!h||!h.valueFormatter?m:h.valueFormatter(m,f,h,e)},[e,a]),l=y.useCallback(f=>e.current.rootElementRef.current?JTt(e.current.rootElementRef.current,f):null,[e]),c=y.useCallback(f=>e.current.rootElementRef.current?ZTt(e.current.rootElementRef.current,f):null,[e]),u=y.useCallback((f,h)=>e.current.rootElementRef.current?eEt(e.current.rootElementRef.current,{id:f,field:h}):null,[e]);Jt(e,{getCellValue:i,getCellParams:o,getCellElement:u,getRowValue:a,getRowFormattedValue:s,getRowParams:r,getRowElement:c,getColumnHeaderParams:n,getColumnHeaderElement:l},"public")}const dM=(e,t,n,r,o)=>{const i=t===n-1;return e===ur.LEFT&&i?!0:r?e===ur.LEFT?!0:e===ur.RIGHT?!i:!i||o:!1},fM=(e,t)=>e===ur.RIGHT&&t===0,pEt=["column","rowId","editCellState","align","children","colIndex","width","className","style","gridHasScrollX","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","sectionIndex","sectionLength","gridHasFiller","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],hEt=["changeReason","unstable_updateValueOnRender"];let fa=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const Tce={[fa.LEFT]:ur.LEFT,[fa.RIGHT]:ur.RIGHT,[fa.NONE]:void 0,[fa.VIRTUAL]:void 0},$q={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:Jn.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},mEt=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${r1(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===fa.LEFT&&"cell--pinnedLeft",o===fa.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return gn(c,yn,l)},gEt=y.forwardRef(function(t,n){var et,yt,vn;const{column:r,rowId:o,editCellState:i,align:a,colIndex:s,width:l,className:c,style:u,colSpan:d,disableDragEvents:f,isNotVisible:h,pinnedOffset:m,pinnedPosition:g,sectionIndex:v,sectionLength:w,gridHasFiller:x,onClick:S,onDoubleClick:P,onMouseDown:T,onMouseUp:E,onMouseOver:O,onKeyDown:k,onKeyUp:A,onDragEnter:I,onDragOver:R}=t,N=At(t,pEt),L=hn(),B=xt(),_=nr(),D=r.field,z=Ye(L,()=>{try{const Ke=L.current.getCellParams(o,D);return Ke.api=L.current,Ke}catch(Ke){if(Ke instanceof UP)return $q;throw Ke}},Ele),F=Ye(L,()=>L.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:o,field:D})),H=Ye(L,hce),U=Ye(L,rTt),{cellMode:q,hasFocus:Y,isEditable:ae=!1,value:Z}=z,K=r.type==="actions"&&((et=r.getActions)==null?void 0:et.call(r,L.current.getRowParams(o)).some(Ke=>!Ke.props.disabled)),te=(q==="view"||!ae)&&!K?z.tabIndex:-1,{classes:pe,getCellClassName:ie}=B,re=[Ye(L,()=>L.current.unstable_applyPipeProcessors("cellClassName",[],{id:o,field:D}).filter(Boolean).join(" "))];r.cellClassName&&re.push(typeof r.cellClassName=="function"?r.cellClassName(z):r.cellClassName),r.display==="flex"&&re.push(se["cell--flex"]),ie&&re.push(ie(z));const de=z.formattedValue??Z,ee=y.useRef(null),ce=im(n,ee),me=y.useRef(null),we=B.cellSelection??!1,ge=Tce[g],Se=fM(ge,v),xe=dM(ge,v,w,B.showCellVerticalBorder,x),Ie={align:a,showLeftBorder:Se,showRightBorder:xe,isEditable:ae,classes:B.classes,pinnedPosition:g,isSelected:F,isSelectionMode:we},Re=mEt(Ie),_e=y.useCallback(Ke=>$e=>{const Xe=L.current.getCellParams(o,D||"");L.current.publishEvent(Ke,Xe,$e),E&&E($e)},[L,D,E,o]),ye=y.useCallback(Ke=>$e=>{const Xe=L.current.getCellParams(o,D||"");L.current.publishEvent(Ke,Xe,$e),T&&T($e)},[L,D,T,o]),Te=y.useCallback((Ke,$e)=>Xe=>{if(!L.current.getRow(o))return;const bt=L.current.getCellParams(o,D||"");L.current.publishEvent(Ke,bt,Xe),$e&&$e(Xe)},[L,D,o]),Oe=((yt=H[o])==null?void 0:yt[D])??!1,Me=((vn=U[o])==null?void 0:vn[D])??1,Ue=y.useMemo(()=>{if(h)return{padding:0,opacity:0,width:0,border:0};const Ke=W({"--width":`${l}px`},u),$e=g===fa.LEFT,Xe=g===fa.RIGHT;if($e||Xe){let bt=$e?"left":"right";_&&(bt=$e?"right":"left"),Ke[bt]=m}return Me>1&&(Ke.height=`calc(var(--height) * ${Me})`,Ke.zIndex=5),Ke},[l,h,u,m,g,_,Me]);if(y.useEffect(()=>{if(!Y||q===Jn.Edit)return;const Ke=wf(L.current.rootElementRef.current);if(ee.current&&!ee.current.contains(Ke.activeElement)){const $e=ee.current.querySelector('[tabindex="0"]'),Xe=me.current||$e||ee.current;if(XTt())Xe.focus({preventScroll:!0});else{const bt=L.current.getScrollPosition();Xe.focus(),L.current.scroll(bt)}}},[Y,q,L]),Oe)return $.jsx("div",{"data-colindex":s,role:"presentation",style:W({width:"var(--width)"},Ue)});if(z===$q)return null;let ze=N.onFocus,Qe,ct;if(i===null&&r.renderCell&&(Qe=r.renderCell(z)),i!==null&&r.renderEditCell){const Ke=L.current.getRowWithUpdatedValues(o,r.field),$e=At(i,hEt),Xe=r.valueFormatter?r.valueFormatter(i.value,Ke,r,L):z.formattedValue,bt=W({},z,{row:Ke,formattedValue:Xe},$e);Qe=r.renderEditCell(bt),re.push(se["cell--editing"]),re.push(pe==null?void 0:pe["cell--editing"])}if(Qe===void 0){const Ke=de==null?void 0:de.toString();Qe=Ke,ct=Ke}y.isValidElement(Qe)&&K&&(Qe=y.cloneElement(Qe,{focusElementRef:me}));const nt=f?null:{onDragEnter:Te("cellDragEnter",I),onDragOver:Te("cellDragOver",R)};return $.jsx("div",W({ref:ce,className:fe(Re.root,re,c),role:"gridcell","data-field":D,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":Me,style:Ue,title:ct,tabIndex:te,onClick:Te("cellClick",S),onDoubleClick:Te("cellDoubleClick",P),onMouseOver:Te("cellMouseOver",O),onMouseDown:ye("cellMouseDown"),onMouseUp:_e("cellMouseUp"),onKeyDown:Te("cellKeyDown",k),onKeyUp:Te("cellKeyUp",A)},nt,N,{onFocus:ze,children:Qe}))}),yEt=Xf(gEt),vEt=["label","icon","showInMenu","onClick"],bEt=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],aP=y.forwardRef((e,t)=>{var u;const n=xt();if(!e.showInMenu){const{label:d,icon:f,onClick:h}=e,m=At(e,vEt),g=v=>{h==null||h(v)};return $.jsx(n.slots.baseIconButton,W({ref:t,size:"small",role:"menuitem","aria-label":d},m,{onClick:g},(u=n.slotProps)==null?void 0:u.baseIconButton,{children:y.cloneElement(f,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=At(e,bEt),c=d=>{i==null||i(d),a&&(s==null||s())};return $.jsxs(Yt,W({ref:t},l,{onClick:c,children:[o&&$.jsx(Gi,{children:o}),r]}))}),wEt=["field","type","align","width","height","empty","style","className"],Rq="1.3em",xEt="1.2em",_q=[40,80],SEt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},CEt=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?r1(t):"Left"}`,r&&"cellEmpty"]};return gn(o,yn,n)},PEt=z1t(12345);function TEt(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=At(e,wEt),d={classes:xt().classes,align:r,empty:a},f=CEt(d),h=y.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:Rq,height:Rq};const[g,v]=n?SEt[n]??_q:_q;return{variant:"text",width:`${Math.round(PEt(g,v))}%`,height:xEt}},[n]);return $.jsx("div",W({"data-field":t,className:fe(f.root,l),style:W({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&$.jsx(kP,W({},h))}))}const EEt=Xf(TEt);function OEt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?Bu(mt(e.palette.divider,1),.88):ju(mt(e.palette.divider,1),.68)}const Dq={[`& .${se.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${se.menuIcon}`]:{width:"auto",visibility:"visible"}},IEt=10,sP=-5,Jm=1,Nq={width:3,rx:1.5,x:10.5},kEt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",MEt=oe("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${se.autoHeight}`]:t.autoHeight},{[`&.${se.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${se["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${se["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${se["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${se.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${se["root--disableUserSelection"]} .${se.cell}`]:t["root--disableUserSelection"]},{[`&.${se.autosizing}`]:t.autosizing},{[`& .${se.editBooleanCell}`]:t.editBooleanCell},{[`& .${se.cell}`]:t.cell},{[`& .${se["cell--editing"]}`]:t["cell--editing"]},{[`& .${se["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${se["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${se["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${se["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${se["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${se["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${se["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${se["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${se.cellCheckbox}`]:t.cellCheckbox},{[`& .${se.cellSkeleton}`]:t.cellSkeleton},{[`& .${se.checkboxInput}`]:t.checkboxInput},{[`& .${se["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${se["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${se["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${se["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${se["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${se["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${se["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${se["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${se["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${se.columnHeader}`]:t.columnHeader},{[`& .${se.headerFilterRow}`]:t.headerFilterRow},{[`& .${se.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${se.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${se.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${se["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${se["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${se.columnSeparator}`]:t.columnSeparator},{[`& .${se.filterIcon}`]:t.filterIcon},{[`& .${se.iconSeparator}`]:t.iconSeparator},{[`& .${se.menuIcon}`]:t.menuIcon},{[`& .${se.menuIconButton}`]:t.menuIconButton},{[`& .${se.menuOpen}`]:t.menuOpen},{[`& .${se.menuList}`]:t.menuList},{[`& .${se["row--editable"]}`]:t["row--editable"]},{[`& .${se["row--editing"]}`]:t["row--editing"]},{[`& .${se["row--dragging"]}`]:t["row--dragging"]},{[`& .${se.row}`]:t.row},{[`& .${se.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${se.rowReorderCell}`]:t.rowReorderCell},{[`& .${se["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${se.sortIcon}`]:t.sortIcon},{[`& .${se.withBorderColor}`]:t.withBorderColor},{[`& .${se.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${se.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${se.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${se.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${se.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${se["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{var k,A;const t=yl(),n=Ye(t,li),r=OEt(e),o=e.shape.borderRadius,i=e.vars?e.vars.palette.background.default:((k=e.mixins.MuiDataGrid)==null?void 0:k.containerBackground)??e.palette.background.default,a=((A=e.mixins.MuiDataGrid)==null?void 0:A.pinnedBackground)??i,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:mt(e.palette.background.default,e.palette.action.disabledOpacity),l=(e.vars||e).palette.action.hoverOpacity,c=(e.vars||e).palette.action.hover,u=(e.vars||e).palette.action.selectedOpacity,d=e.vars?`calc(${l} + ${u})`:l+u,f=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${u})`:mt(e.palette.primary.main,u),h=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${d})`:mt(e.palette.primary.main,d),m=e.vars?REt:AEt,g=I=>({[`& .${se["cell--pinnedLeft"]}, & .${se["cell--pinnedRight"]}`]:{backgroundColor:I,"&.Mui-selected":{backgroundColor:m(I,f,u),"&:hover":{backgroundColor:m(I,f,d)}}}}),v=m(a,c,l),w=g(v),x=m(a,f,u),S=g(x),P=m(a,h,d),T=g(P),E={backgroundColor:f,"&:hover":{backgroundColor:h,"@media (hover: none)":{backgroundColor:f}}};return W({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":s,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":a,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${se.main} > *:first-child${kEt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${se.autoHeight}`]:{height:"auto"},[`&.${se.autosizing}`]:{[`& .${se.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${se.iconButtonContainer}`]:{width:"0 !important",visibility:"hidden !important"},[`& .${se.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${se.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${se.groupingCriteriaCell}`]:{width:"unset"},[`& .${se.treeDataGroupingCell}`]:{width:"unset"}},[`& .${se.columnHeader}, & .${se.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${se.columnHeader}:focus-within, & .${se.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:mt(e.palette.primary.main,.5)} ${Jm}px`,outlineOffset:Jm*-1},[`& .${se.columnHeader}:focus, & .${se.cell}:focus`]:{outline:`solid ${e.palette.primary.main} ${Jm}px`,outlineOffset:Jm*-1},[`& .${se.columnHeader}:focus, +return result$$;`.replaceAll("$$",String(Tq)));return Tq+=1,(s,l)=>i(o,s,l)},nce=e=>e.quickFilterExcludeHiddenColumns??!0,yCt=(e,t)=>{var s;const n=((s=e.quickFilterValues)==null?void 0:s.filter(Boolean))??[];if(n.length===0)return null;const r=nce(e)?Eb(t):Nu(t),o=[],{ignoreDiacritics:i}=t.current.rootProps,a=ece(t);return r.forEach(l=>{const c=t.current.getColumn(l),u=c==null?void 0:c.getApplyQuickFilterFn;u&&o.push({column:c,appliers:n.map(d=>{const f=i?eS(d):d;return{fn:u(f,c,a)}})})}),function(c,u){const d={};e:for(let f=0;f{const r=gCt(e,t,n),o=yCt(e,t);return function(a,s,l){l.passingFilterItems=(r==null?void 0:r(a,s))??null,l.passingQuickFilterValues=(o==null?void 0:o(a,s))??null}},Eq=e=>e!=null,bCt=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>tce(r,t)!==null)),e.cleanedFilterItems),wCt=(e,t,n,r,o)=>{const i=bCt(o,r,n.items),a=e.filter(Eq),s=t.filter(Eq);if(a.length>0){const l=u=>a.some(d=>d[u.id]);if((n.logicOperator??Zx().logicOperator)===ji.And){if(!i.every(l))return!1}else if(!i.some(l))return!1}if(s.length>0&&n.quickFilterValues!=null){const l=u=>s.some(d=>d[u]);if((n.quickFilterLogicOperator??Zx().quickFilterLogicOperator)===ji.And){if(!n.quickFilterValues.every(l))return!1}else if(!n.quickFilterValues.some(l))return!1}return!0},xCt=e=>{if(!e)return null;const t=new RegExp(yO(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=eS(a)),a!=null?t.test(a.toString()):!1}},Oq=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new RegExp(yO(r),"i");return i=>{if(i==null)return t;const a=o.test(String(i));return t?!a:a}},Iq=(e,t)=>n=>{if(!n.value)return null;const r=e?n.value:n.value.trim(),o=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return i=>{if(i==null)return t;const a=o.compare(r,i.toString())===0;return t?!a:a}},kq=e=>()=>t=>{const n=t===""||t==null;return e?!n:n},SCt=(e=!1)=>[{value:"contains",getApplyFilterFn:Oq(e,!1),InputComponent:Ws},{value:"doesNotContain",getApplyFilterFn:Oq(e,!0),InputComponent:Ws},{value:"equals",getApplyFilterFn:Iq(e,!1),InputComponent:Ws},{value:"doesNotEqual",getApplyFilterFn:Iq(e,!0),InputComponent:Ws},{value:"startsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${yO(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ws},{value:"endsWith",getApplyFilterFn:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${yO(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ws},{value:"isEmpty",getApplyFilterFn:kq(!1),requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:kq(!0),requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:Jle}],tc={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:sCt,type:"string",align:"left",filterOperators:SCt(),renderEditCell:tCt,getApplyQuickFilterFn:xCt},CCt=["open","target","onClose","children","position","className","onExited"],PCt=e=>{const{classes:t}=e;return vn({root:["menu"]},bn,t)},TCt=oe(Hf,{name:"MuiDataGrid",slot:"Menu",overridesResolver:(e,t)=>t.menu})(({theme:e})=>({zIndex:e.zIndex.modal,[`& .${se.menuList}`]:{outline:0}})),ECt={"bottom-start":"top left","bottom-end":"top right"};function rce(e){var g;const{open:t,target:n,onClose:r,children:o,position:i,className:a,onExited:s}=e,l=At(e,CCt),c=mn(),u=xt(),d=PCt(u),f=y.useRef(null);_o(()=>{var v,w;t?f.current=document.activeElement instanceof HTMLElement?document.activeElement:null:((w=(v=f.current)==null?void 0:v.focus)==null||w.call(v),f.current=null)},[t]),y.useEffect(()=>{const v=t?"menuOpen":"menuClose";c.current.publishEvent(v,{target:n})},[c,t,n]);const p=v=>w=>{v&&v(),s&&s(w)},m=v=>{v.target&&(n===v.target||n!=null&&n.contains(v.target))||r(v)};return $.jsx(TCt,W({as:u.slots.basePopper,className:de(d.root,a),ownerState:u,open:t,anchorEl:n,transition:!0,placement:i},l,(g=u.slotProps)==null?void 0:g.basePopper,{children:({TransitionProps:v,placement:w})=>$.jsx(qF,{onClickAway:m,mouseEvent:"onMouseDown",children:$.jsx(kf,W({},v,{style:{transformOrigin:ECt[w]},onExited:p(v==null?void 0:v.onExited),children:$.jsx(uo,{children:o})}))})}))}const OCt=["api","colDef","id","hasFocus","isEditable","field","value","formattedValue","row","rowNode","cellMode","tabIndex","position","focusElementRef"],ICt=e=>typeof e.getActions=="function";function kCt(e){var _;const{colDef:t,id:n,hasFocus:r,tabIndex:o,position:i="bottom-end",focusElementRef:a}=e,s=At(e,OCt),[l,c]=y.useState(-1),[u,d]=y.useState(!1),f=mn(),p=y.useRef(null),m=y.useRef(null),g=y.useRef(!1),v=y.useRef({}),w=nr(),x=yo(),S=yo(),P=xt();if(!ICt(t))throw new Error("MUI X: Missing the `getActions` property in the `GridColDef`.");const T=t.getActions(f.current.getRowParams(n)),E=T.filter(D=>!D.props.showInMenu),O=T.filter(D=>D.props.showInMenu),k=E.length+(O.length?1:0);y.useLayoutEffect(()=>{r||Object.entries(v.current).forEach(([D,z])=>{z==null||z.stop({},()=>{delete v.current[D]})})},[r]),y.useEffect(()=>{if(l<0||!p.current||l>=p.current.children.length)return;p.current.children[l].focus({preventScroll:!0})},[l]),y.useEffect(()=>{r||(c(-1),g.current=!1)},[r]),y.useImperativeHandle(a,()=>({focus(){if(!g.current){const D=T.findIndex(z=>!z.props.disabled);c(D)}}}),[T]),y.useEffect(()=>{l>=k&&c(k-1)},[l,k]);const A=()=>{d(!0),c(k-1),g.current=!0},I=()=>{d(!1)},R=D=>z=>{v.current[D]=z},N=(D,z)=>F=>{c(D),g.current=!0,z&&z(F)},L=D=>{if(k<=1)return;const z=(H,U)=>{var ae;if(H<0||H>T.length)return H;const X=(U==="left"?-1:1)*(w?-1:1);return(ae=T[H+X])!=null&&ae.props.disabled?z(H+X,U):H+X};let F=l;D.key==="ArrowRight"?F=z(l,"right"):D.key==="ArrowLeft"&&(F=z(l,"left")),!(F<0||F>=k)&&F!==l&&(D.preventDefault(),D.stopPropagation(),c(F))},j=D=>{D.key==="Tab"&&D.preventDefault(),["Tab","Escape"].includes(D.key)&&I()};return $.jsxs("div",W({role:"menu",ref:p,tabIndex:-1,className:se.actionsCell,onKeyDown:L},s,{children:[E.map((D,z)=>y.cloneElement(D,{key:z,touchRippleRef:R(z),onClick:N(z,D.props.onClick),tabIndex:l===z?o:-1})),O.length>0&&S&&$.jsx(P.slots.baseIconButton,W({ref:m,id:S,"aria-label":f.current.getLocaleText("actionsCellMore"),"aria-haspopup":"menu","aria-expanded":u,"aria-controls":u?x:void 0,role:"menuitem",size:"small",onClick:A,touchRippleRef:R(S),tabIndex:l===E.length?o:-1},(_=P.slotProps)==null?void 0:_.baseIconButton,{children:$.jsx(P.slots.moreActionsIcon,{fontSize:"small"})})),O.length>0&&$.jsx(rce,{open:u,target:m.current,position:i,onClose:I,children:$.jsx(kS,{id:x,className:se.menuList,onKeyDown:j,"aria-labelledby":S,variant:"menu",autoFocusItem:!0,children:O.map((D,z)=>y.cloneElement(D,{key:z,closeMenu:I}))})})]}))}const MCt=e=>$.jsx(kCt,W({},e)),uM="actions",ACt=W({},tc,{sortable:!1,filterable:!1,aggregable:!1,width:100,display:"flex",align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:MCt,getApplyQuickFilterFn:void 0}),wl=e=>e.rows,dM=Dt(wl,e=>e.totalRowCount),$Ct=Dt(wl,e=>e.loading),RCt=Dt(wl,e=>e.totalTopLevelRowCount),uf=Dt(wl,e=>e.dataRowIdToModelLookup),vO=Dt(wl,e=>e.dataRowIdToIdLookup),xi=Dt(wl,e=>e.tree),_Ct=Dt(wl,e=>e.groupsToFetch),DCt=Dt(wl,e=>e.groupingName),Mq=Dt(wl,e=>e.treeDepths),Ob=sr(wl,e=>{const t=Object.entries(e.treeDepths);return t.length===0?1:t.filter(([,n])=>n>0).map(([n])=>Number(n)).sort((n,r)=>r-n)[0]+1}),hP=Dt(wl,e=>e.dataRowIds),NCt=Dt(wl,e=>e==null?void 0:e.additionalRowGroups),mm=sr(NCt,e=>{var n,r;const t=e==null?void 0:e.pinnedRows;return{bottom:((n=t==null?void 0:t.bottom)==null?void 0:n.map(o=>({id:o.id,model:o.model??{}})))??[],top:((r=t==null?void 0:t.top)==null?void 0:r.map(o=>({id:o.id,model:o.model??{}})))??[]}}),LCt=Dt(mm,e=>{var t,n;return(((t=e==null?void 0:e.top)==null?void 0:t.length)||0)+(((n=e==null?void 0:e.bottom)==null?void 0:n.length)||0)}),oi="auto-generated-group-node-root",hy=Symbol("mui.id_autogenerated"),FCt=()=>({type:"group",id:oi,depth:-1,groupingField:null,groupingKey:null,isAutoGenerated:!0,children:[],childrenFromPath:{},childrenExpanded:!0,parent:null});function jCt(e,t,n="A row was provided without id in the rows prop:"){if(e==null)throw new Error(["MUI X: The Data Grid component requires all rows to have a unique `id` property.","Alternatively, you can use the `getRowId` prop to specify a custom id for each row.",n,JSON.stringify(t)].join(` +`))}const fM=(e,t,n)=>{const r=t?t(e):e.id;return jCt(r,e,n),r},JP=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let s=0;s{const n=e[oi];return Math.max(t,n.children.length+(n.footerId==null?0:1))},ice=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o,previousGroupsToFetch:i})=>{const a=e.current.caches.rows,{tree:s,treeDepths:l,dataRowIds:c,groupingName:u,groupsToFetch:d=[]}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:a.updates,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIdToModelLookup:a.dataRowIdToModelLookup,previousGroupsToFetch:i}),f=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:s,treeDepths:l,dataRowIdToIdLookup:a.dataRowIdToIdLookup,dataRowIds:c,dataRowIdToModelLookup:a.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},W({},f,{totalRowCount:Math.max(t,f.dataRowIds.length),totalTopLevelRowCount:oce({tree:f.tree,rowCountProp:t}),groupingName:u,loading:n,groupsToFetch:d})},Ov=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,Nz=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i{if(e.updates.type==="full")throw new Error("MUI X: Unable to prepare a partial update if a full update is not applied yet.");const o=new Map;n.forEach(u=>{const d=fM(u,t,"A row was provided without id when calling updateRows():");o.has(d)?o.set(d,W({},o.get(d),u)):o.set(d,u)});const i={type:"partial",actions:{insert:[...e.updates.actions.insert??[]],modify:[...e.updates.actions.modify??[]],remove:[...e.updates.actions.remove??[]]},idToActionLookup:W({},e.updates.idToActionLookup),groupKeys:r},a=W({},e.dataRowIdToModelLookup),s=W({},e.dataRowIdToIdLookup),l={insert:{},modify:{},remove:{}};o.forEach((u,d)=>{const f=i.idToActionLookup[d];if(u._action==="delete"){if(f==="remove"||!a[d])return;f!=null&&(l[f][d]=!0),i.actions.remove.push(d),delete a[d],delete s[d];return}const p=a[d];if(p){f==="remove"?(l.remove[d]=!0,i.actions.modify.push(d)):f==null&&i.actions.modify.push(d),a[d]=W({},p,u);return}f==="remove"?(l.remove[d]=!0,i.actions.insert.push(d)):f==null&&i.actions.insert.push(d),a[d]=u,s[d]=d});const c=Object.keys(l);for(let u=0;u0&&(i.actions[d]=i.actions[d].filter(p=>!f[p]))}return{dataRowIdToModelLookup:a,dataRowIdToIdLookup:s,updates:i,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function BCt(e){var o,i;const t=mm(e),n=((o=t==null?void 0:t.top)==null?void 0:o.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0,r=((i=t==null?void 0:t.bottom)==null?void 0:i.reduce((a,s)=>(a+=e.current.unstable_getRowHeight(s.id),a),0))||0;return{top:n,bottom:r}}function ace(e){return`var(--DataGrid-overlayHeight, ${2*li(e.current.state).rowHeight}px)`}function $q(e,t,n){const r=[];return t.forEach(o=>{const i=fM(o,n,"A row was provided without id when calling updateRows():"),a=e.current.getRowNode(i);if((a==null?void 0:a.type)==="pinnedRow"){const s=e.current.caches.pinnedRows,l=s.idLookup[i];l&&(s.idLookup[i]=W({},l,o))}else r.push(o)}),r}const sce=(e,t,n)=>typeof e=="number"&&e>0?e:t,zCt="__tree_data_group__",lce="__row_group_by_columns_group__",pM="__detail_panel_toggle__",VCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","hasFocus","tabIndex","hideDescendantCount"],HCt=e=>{const{classes:t}=e;return vn({root:["booleanCell"]},bn,t)};function UCt(e){const{value:t,rowNode:n}=e,r=At(e,VCt),o=mn(),i=xt(),a={classes:i.classes},s=HCt(a),c=Ye(o,Ob)>0&&n.type==="group"&&i.treeData===!1,u=y.useMemo(()=>t?i.slots.booleanCellTrueIcon:i.slots.booleanCellFalseIcon,[i.slots.booleanCellFalseIcon,i.slots.booleanCellTrueIcon,t]);return c&&t===void 0?null:$.jsx(u,W({fontSize:"small",className:s.root,titleAccess:o.current.getLocaleText(t?"booleanCellTrueLabel":"booleanCellFalseLabel"),"data-value":!!t},r))}const WCt=y.memo(UCt),GCt=e=>e.field!==lce&&Ov(e.rowNode)?"":$.jsx(WCt,W({},e)),qCt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange"],KCt=e=>{const{classes:t}=e;return vn({root:["editBooleanCell"]},bn,t)};function YCt(e){var w;const{id:t,value:n,field:r,className:o,hasFocus:i,onValueChange:a}=e,s=At(e,qCt),l=mn(),c=y.useRef(null),u=yo(),[d,f]=y.useState(n),p=xt(),m={classes:p.classes},g=KCt(m),v=y.useCallback(async x=>{const S=x.target.checked;a&&await a(x,S),f(S),await l.current.setEditCellValue({id:t,field:r,value:S},x)},[l,r,t,a]);return y.useEffect(()=>{f(n)},[n]),_o(()=>{i&&c.current.focus()},[i]),$.jsx("label",W({htmlFor:u,className:de(g.root,o)},s,{children:$.jsx(p.slots.baseCheckbox,W({id:u,inputRef:c,checked:!!d,onChange:v,size:"small"},(w=p.slotProps)==null?void 0:w.baseCheckbox))}))}const XCt=e=>$.jsx(YCt,W({},e)),QCt=["item","applyValue","apiRef","focusElementRef","isFilterActive","clearButton","tabIndex","label","variant","InputLabelProps"],ZP=e=>{if(String(e).toLowerCase()==="true")return!0;if(String(e).toLowerCase()==="false")return!1},JCt=oe("div")({display:"flex",alignItems:"center",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function ZCt(e){var P,T,E;const{item:t,applyValue:n,apiRef:r,focusElementRef:o,clearButton:i,tabIndex:a,label:s,variant:l="standard"}=e,c=At(e,QCt),[u,d]=y.useState(ZP(t.value)),f=xt(),p=yo(),m=yo(),g=((P=f.slotProps)==null?void 0:P.baseSelect)||{},v=g.native??!1,w=((T=f.slotProps)==null?void 0:T.baseSelectOption)||{},x=y.useCallback(O=>{const k=ZP(O.target.value);d(k),n(W({},t,{value:k}))},[n,t]);y.useEffect(()=>{d(ZP(t.value))},[t.value]);const S=s??r.current.getLocaleText("filterPanelInputLabel");return $.jsxs(JCt,{children:[$.jsxs(f.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(f.slots.baseInputLabel,W({},(E=f.slotProps)==null?void 0:E.baseInputLabel,{id:p,shrink:!0,variant:l,children:S})),$.jsxs(f.slots.baseSelect,W({labelId:p,id:m,label:S,value:u===void 0?"":String(u),onChange:x,variant:l,notched:l==="outlined"?!0:void 0,native:v,displayEmpty:!0,inputProps:{ref:o,tabIndex:a}},c,g,{children:[$.jsx(f.slots.baseSelectOption,W({},w,{native:v,value:"",children:r.current.getLocaleText("filterValueAny")})),$.jsx(f.slots.baseSelectOption,W({},w,{native:v,value:"true",children:r.current.getLocaleText("filterValueTrue")})),$.jsx(f.slots.baseSelectOption,W({},w,{native:v,value:"false",children:r.current.getLocaleText("filterValueFalse")}))]}))]}),i]})}const ePt=()=>[{value:"is",getApplyFilterFn:e=>{const t=ZP(e.value);return t===void 0?null:n=>!!n===t},InputComponent:ZCt}],tPt=(e,t,n,r)=>e?r.current.getLocaleText("booleanCellTrueLabel"):r.current.getLocaleText("booleanCellFalseLabel"),nPt=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},cce=W({},tc,{type:"boolean",display:"flex",align:"center",headerAlign:"center",renderCell:GCt,renderEditCell:XCt,sortComparator:Kle,valueFormatter:tPt,filterOperators:ePt(),getApplyQuickFilterFn:void 0,aggregable:!1,pastedValueParser:e=>nPt(e)}),uce=e=>e.sorting,g1=Dt(uce,e=>e.sortedRows),Lz=sr(g1,uf,xi,(e,t,n)=>e.reduce((r,o)=>{const i=t[o];i&&r.push({id:o,model:i});const a=n[o];return a&&Ov(a)&&r.push({id:o,model:{[hy]:o}}),r},[])),js=Dt(uce,e=>e.sortModel),rPt=sr(js,e=>e.reduce((n,r,o)=>(n[r.field]={sortDirection:r.sort,sortIndex:e.length>1?o+1:void 0},n),{})),hM=e=>e.filter,ti=Dt(hM,e=>e.filterModel);Dt(ti,e=>e.quickFilterValues);const oPt=e=>e.visibleRowsLookup,Ib=Dt(hM,e=>e.filteredRowsLookup);Dt(hM,e=>e.filteredChildrenCountLookup);Dt(hM,e=>e.filteredDescendantCountLookup);const ap=sr(oPt,Lz,(e,t)=>t.filter(n=>e[n.id]!==!1)),my=sr(ap,e=>e.map(t=>t.id)),dce=sr(Ib,Lz,(e,t)=>t.filter(n=>e[n.id]!==!1)),fce=sr(dce,e=>e.map(t=>t.id));sr(my,xi,(e,t)=>{const n={};let r=0;return e.reduce((o,i)=>{const a=t[i];return n[a.depth]||(n[a.depth]=0),a.depth>r&&(n[a.depth]=0),r=a.depth,n[a.depth]+=1,o[i]=n[a.depth],o},{})});const pce=sr(ap,xi,Ob,(e,t,n)=>n<2?e:e.filter(r=>{var o;return((o=t[r.id])==null?void 0:o.depth)===0})),Fz=Dt(ap,e=>e.length),jz=Dt(pce,e=>e.length),iPt=Dt(dce,e=>e.length);Dt(iPt,jz,(e,t)=>e-t);const aPt=sr(ti,dd,(e,t)=>{var n;return(n=e.items)==null?void 0:n.filter(r=>{var a,s;if(!r.field)return!1;const o=t[r.field];if(!(o!=null&&o.filterOperators)||((a=o==null?void 0:o.filterOperators)==null?void 0:a.length)===0)return!1;const i=o.filterOperators.find(l=>l.value===r.operator);return i?!i.InputComponent||r.value!=null&&((s=r.value)==null?void 0:s.toString())!=="":!1})}),sPt=sr(aPt,e=>e.reduce((n,r)=>(n[r.field]?n[r.field].push(r):n[r.field]=[r],n),{})),Bs=e=>e.rowSelection,lPt=Dt(Bs,e=>e.length),cPt=sr(Bs,uf,(e,t)=>new Map(e.map(n=>[n,t[n]]))),Lu=sr(Bs,e=>e.reduce((t,n)=>(t[n]=n,t),{}));function hce(e,t){var l;const n=xi(e),r=g1(e),o=Ib(e),i=n[t];if(!i||i.type!=="group")return[];const a=[],s=r.findIndex(c=>c===t)+1;for(let c=s;ci.depth;c+=1){const u=r[c];o[u]!==!1&&e.current.isRowSelectable(u)&&a.push(u)}return a}function uPt(e,t){return Dt(xi,g1,Ib,Lu,(n,r,o,i)=>{var u;const a=n[e];if(!a||a.type!=="group")return{isIndeterminate:!1,isChecked:i[e]===e};if(i[e]===e)return{isIndeterminate:!1,isChecked:!0};let s=0,l=0;const c=r.findIndex(d=>d===e)+1;for(let d=c;da.depth;d+=1){const f=r[d];o[f]!==!1&&(s+=1,i[f]!==void 0&&(l+=1))}return{isIndeterminate:l>0&&(l0:i[e]===e}})}function Bz(e){return e.signature===ol.DataGrid?e.checkboxSelection&&e.disableMultipleRowSelection!==!0:!e.disableMultipleRowSelection}const dPt=(e,t)=>{const n=[];let r=t;for(;r!=null&&r!==oi;){const o=e[r];if(!o)return n;n.push(r),r=o.parent}return n},fPt=(e,t,n)=>{const r=e[n];if(!r)return[];const o=r.parent;return o==null?[]:e[o].children.filter(a=>a!==n&&t[a])},mP=(e,t,n,r,o,i)=>{const a=Ib(e),s=Lu(e),l=new Set([]);if(!(!r&&!o)){if(r){const c=t[n];(c==null?void 0:c.type)==="group"&&hce(e,n).forEach(d=>{i(d),l.add(d)})}if(o){const c=d=>{if(s[d]!==d&&!l.has(d))return!1;const f=t[d];return(f==null?void 0:f.type)!=="group"?!0:f.children.every(c)},u=d=>{const f=fPt(t,a,d);if(f.length===0||f.every(c)){const m=t[d].parent;m!=null&&m!==oi&&e.current.isRowSelectable(m)&&(i(m),l.add(m),u(m))}};u(n)}}},Rq=(e,t,n,r,o,i)=>{const a=Lu(e);if(!(!o&&!r)&&(o&&dPt(t,n).forEach(l=>{a[l]===l&&i(l)}),r)){const s=t[n];(s==null?void 0:s.type)==="group"&&hce(e,n).forEach(c=>{i(c)})}},pPt=["field","id","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],hPt=e=>{const{classes:t}=e;return vn({root:["checkboxInput"]},bn,t)},mPt=y.forwardRef(function(t,n){var k,A;const{field:r,id:o,rowNode:i,hasFocus:a,tabIndex:s}=t,l=At(t,pPt),c=mn(),u=xt(),d={classes:u.classes},f=hPt(d),p=y.useRef(null),m=y.useRef(null),g=hm(p,n),v=I=>{const R={value:I.target.checked,id:o};c.current.publishEvent("rowSelectionCheckboxChange",R,I)};y.useLayoutEffect(()=>{if(s===0){const I=c.current.getCellElement(o,r);I&&(I.tabIndex=-1)}},[c,s,o,r]),y.useEffect(()=>{var I;if(a){const R=(I=p.current)==null?void 0:I.querySelector("input");R==null||R.focus({preventScroll:!0})}else m.current&&m.current.stop({})},[a]);const w=y.useCallback(I=>{I.key===" "&&I.stopPropagation()},[]),x=c.current.isRowSelectable(o),S=uPt(o,((k=u.rowSelectionPropagation)==null?void 0:k.parents)??!1),{isIndeterminate:P,isChecked:T}=Ye(c,S);if(i.type==="footer"||i.type==="pinnedRow")return null;const E=c.current.getLocaleText(T?"checkboxSelectionUnselectRow":"checkboxSelectionSelectRow"),O=u.indeterminateCheckboxAction==="select"?T&&!P:T;return $.jsx(u.slots.baseCheckbox,W({ref:g,tabIndex:s,checked:O,onChange:v,className:f.root,inputProps:{"aria-label":E},onKeyDown:w,indeterminate:P,disabled:!x,touchRippleRef:m},(A=u.slotProps)==null?void 0:A.baseCheckbox,l))}),gPt=mPt,mM=e=>e.focus,Fa=Dt(mM,e=>e.cell),yPt=Dt(mM,e=>e.columnHeader);Dt(mM,e=>e.columnHeaderFilter);const bO=Dt(mM,e=>e.columnGroupHeader),gM=e=>e.tabIndex,zz=Dt(gM,e=>e.cell),mce=Dt(gM,e=>e.columnHeader);Dt(gM,e=>e.columnHeaderFilter);const vPt=Dt(gM,e=>e.columnGroupHeader);function Jt(e,t,n){const r=y.useRef(!0);_o(()=>{r.current=!1,e.current.register(n,t)},[e,n,t]),r.current&&e.current.register(n,t)}function Lo(e,t){const n=y.useRef(null);if(n.current)return n.current;const r=e.current.getLogger(t);return n.current=r,r}const gce=(e,t,n,r,o)=>{const i=Lo(e,"useNativeEventListener"),[a,s]=y.useState(!1),l=y.useRef(r),c=Xle(t)?t():(t==null?void 0:t.current)??null,u=y.useCallback(d=>l.current&&l.current(d),[]);y.useEffect(()=>{l.current=r},[r]),y.useEffect(()=>{if(c&&n&&!a){i.debug(`Binding native ${n} event`),c.addEventListener(n,u,o),s(!0);const d=()=>{i.debug(`Clearing native ${n} event`),c.removeEventListener(n,u,o)};e.current.subscribeEvent("unmount",d)}},[c,u,n,a,i,o,e])},y1=e=>{const t=y.useRef(!0);t.current&&(t.current=!1,e())},bPt=()=>{},wPt=(e,t)=>{const n=y.useRef(!1);_o(()=>n.current||!e?bPt:(n.current=!0,t()),[n.current||e])},xPt=100,SPt=e=>e?0:100,yce=(e,t,n)=>t>0&&e>0?Math.ceil(e/t):e===-1?n+2:0,vce=e=>({page:0,pageSize:e?0:100}),CPt=(e,t=0)=>t===0?e:Math.max(Math.min(e,t-1),0),bce=(e,t)=>{if(t===ol.DataGrid&&e>xPt)throw new Error(["MUI X: `pageSize` cannot exceed 100 in the MIT version of the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`))},PPt=-1,yM=e=>e.pagination,Fi=Dt(yM,e=>e.paginationModel),Ug=Dt(yM,e=>e.rowCount),Z0=Dt(yM,e=>e.meta),TPt=Dt(Fi,e=>e.page),EPt=Dt(Fi,e=>e.pageSize),wce=Dt(Fi,Ug,(e,t)=>yce(t,e.pageSize,e.page)),Vz=sr(Fi,xi,Ob,ap,pce,(e,t,n,r,o)=>{var p;const i=o.length,a=Math.min(e.pageSize*e.page,i-1),s=e.pageSize===PPt?i-1:Math.min(a+e.pageSize-1,i-1);if(a===-1||s===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:s};const l=o[a],c=s-a+1,u=r.findIndex(m=>m.id===l.id);let d=u,f=0;for(;d0)&&(d+=1),g===0&&(f+=1))}return{firstRowIndex:u,lastRowIndex:d-1}}),OPt=sr(ap,Vz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),xce=sr(my,Vz,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),IPt=["field","colDef"],kPt=e=>{const{classes:t}=e;return vn({root:["checkboxInput"]},bn,t)},MPt=y.forwardRef(function(t,n){var k;const r=At(t,IPt),[,o]=y.useState(!1),i=mn(),a=xt(),s={classes:a.classes},l=kPt(s),c=Ye(i,mce),u=Ye(i,Bs),d=Ye(i,my),f=Ye(i,xce),p=y.useMemo(()=>typeof a.isRowSelectable!="function"?u:u.filter(A=>i.current.getRow(A)?a.isRowSelectable(i.current.getRowParams(A)):!1),[i,a.isRowSelectable,u]),m=y.useMemo(()=>(!a.pagination||!a.checkboxSelectionVisibleOnly?d:f).reduce((I,R)=>(I[R]=!0,I),{}),[a.pagination,a.checkboxSelectionVisibleOnly,f,d]),g=y.useMemo(()=>p.filter(A=>m[A]).length,[p,m]),v=g>0&&g0,x=A=>{const I={value:A.target.checked};i.current.publishEvent("headerSelectionCheckboxChange",I)},S=c!==null&&c.field===t.field?0:-1;y.useLayoutEffect(()=>{const A=i.current.getColumnHeaderElement(t.field);S===0&&A&&(A.tabIndex=-1)},[S,i,t.field]);const P=y.useCallback(A=>{A.key===" "&&i.current.publishEvent("headerSelectionCheckboxChange",{value:!w})},[i,w]),T=y.useCallback(()=>{o(A=>!A)},[]);y.useEffect(()=>i.current.subscribeEvent("rowSelectionChange",T),[i,T]);const E=i.current.getLocaleText(w?"checkboxSelectionUnselectAllRows":"checkboxSelectionSelectAllRows"),O=a.indeterminateCheckboxAction==="select"?w&&!v:w;return $.jsx(a.slots.baseCheckbox,W({ref:n,indeterminate:v,checked:O,onChange:x,className:l.root,inputProps:{"aria-label":E},tabIndex:S,onKeyDown:P,disabled:!Bz(a)},(k=a.slotProps)==null?void 0:k.baseCheckbox,r))}),bu="__check__",kb=W({},cce,{type:"custom",field:bu,width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,display:"flex",valueGetter:(e,t,n,r)=>{const o=Lu(r),i=r.current.getRowId(t);return o[i]!==void 0},renderHeader:e=>$.jsx(MPt,W({},e)),renderCell:e=>$.jsx(gPt,W({},e))}),APt=["item","applyValue","type","apiRef","focusElementRef","InputProps","isFilterActive","clearButton","tabIndex","disabled"];function _q(e,t){if(e==null)return"";const n=new Date(e);return Number.isNaN(n.getTime())?"":t==="date"?n.toISOString().substring(0,10):t==="datetime-local"?(n.setMinutes(n.getMinutes()-n.getTimezoneOffset()),n.toISOString().substring(0,19)):n.toISOString().substring(0,10)}function og(e){var S;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,InputProps:a,clearButton:s,tabIndex:l,disabled:c}=e,u=At(e,APt),d=Tb(),[f,p]=y.useState(()=>_q(t.value,r)),[m,g]=y.useState(!1),v=yo(),w=xt(),x=y.useCallback(P=>{d.clear();const T=P.target.value;p(T),g(!0),d.start(w.filterDebounceMs,()=>{const E=new Date(T);n(W({},t,{value:Number.isNaN(E.getTime())?void 0:E})),g(!1)})},[n,t,w.filterDebounceMs,d]);return y.useEffect(()=>{const P=_q(t.value,r);p(P)},[t.value,r]),$.jsx(w.slots.baseTextField,W({fullWidth:!0,id:v,label:o.current.getLocaleText("filterPanelInputLabel"),placeholder:o.current.getLocaleText("filterPanelInputPlaceholder"),value:f,onChange:x,variant:"standard",type:r||"text",InputLabelProps:{shrink:!0},inputRef:i,InputProps:W({},m||s?{endAdornment:m?$.jsx(w.slots.loadIcon,{fontSize:"small",color:"action"}):s}:{},{disabled:c},a,{inputProps:W({max:r==="datetime-local"?"9999-12-31T23:59":"9999-12-31",tabIndex:l},a==null?void 0:a.inputProps)})},u,(S=w.slotProps)==null?void 0:S.baseTextField))}function ig(e,t,n,r){if(!e.value)return null;const o=new Date(e.value);n?o.setSeconds(0,0):(o.setMinutes(o.getMinutes()+o.getTimezoneOffset()),o.setHours(0,0,0,0));const i=o.getTime();return a=>{if(!a)return!1;if(r)return t(a.getTime(),i);const s=new Date(a);return n?s.setSeconds(0,0):s.setHours(0,0,0,0),t(s.getTime(),i)}}const Sce=e=>[{value:"is",getApplyFilterFn:t=>ig(t,(n,r)=>n===r,e),InputComponent:og,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"not",getApplyFilterFn:t=>ig(t,(n,r)=>n!==r,e),InputComponent:og,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"after",getApplyFilterFn:t=>ig(t,(n,r)=>n>r,e),InputComponent:og,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"onOrAfter",getApplyFilterFn:t=>ig(t,(n,r)=>n>=r,e),InputComponent:og,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"before",getApplyFilterFn:t=>ig(t,(n,r)=>nig(t,(n,r)=>n<=r,e),InputComponent:og,InputComponentProps:{type:e?"datetime-local":"date"}},{value:"isEmpty",getApplyFilterFn:()=>t=>t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>t=>t!=null,requiresFilterValue:!1}],$Pt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","hasFocus","inputProps","isValidating","isProcessingProps","onValueChange"],RPt=oe(Fv)({fontSize:"inherit"}),_Pt=e=>{const{classes:t}=e;return vn({root:["editInputCell"]},bn,t)};function DPt(e){const{id:t,value:n,field:r,colDef:o,hasFocus:i,inputProps:a,onValueChange:s}=e,l=At(e,$Pt),c=o.type==="dateTime",u=mn(),d=y.useRef(),f=y.useMemo(()=>{let P;n==null?P=null:n instanceof Date?P=n:P=new Date((n??"").toString());let T;return P==null||Number.isNaN(P.getTime())?T="":T=new Date(P.getTime()-P.getTimezoneOffset()*60*1e3).toISOString().substr(0,c?16:10),{parsed:P,formatted:T}},[n,c]),[p,m]=y.useState(f),v={classes:xt().classes},w=_Pt(v),x=y.useCallback(P=>{if(P==="")return null;const[T,E]=P.split("T"),[O,k,A]=T.split("-"),I=new Date;if(I.setFullYear(Number(O),Number(k)-1,Number(A)),I.setHours(0,0,0,0),E){const[R,N]=E.split(":");I.setHours(Number(R),Number(N),0,0)}return I},[]),S=y.useCallback(async P=>{const T=P.target.value,E=x(T);s&&await s(P,E),m({parsed:E,formatted:T}),u.current.setEditCellValue({id:t,field:r,value:E},P)},[u,r,t,s,x]);return y.useEffect(()=>{m(P=>{var T,E;return f.parsed!==P.parsed&&((T=f.parsed)==null?void 0:T.getTime())!==((E=P.parsed)==null?void 0:E.getTime())?f:P})},[f]),_o(()=>{i&&d.current.focus()},[i]),$.jsx(RPt,W({inputRef:d,fullWidth:!0,className:w.root,type:c?"datetime-local":"date",inputProps:W({max:c?"9999-12-31T23:59":"9999-12-31"},a),value:p.formatted,onChange:S},l))}const Cce=e=>$.jsx(DPt,W({},e));function Pce({value:e,columnType:t,rowId:n,field:r}){if(!(e instanceof Date))throw new Error([`MUI X: \`${t}\` column type only accepts \`Date\` objects as values.`,"Use `valueGetter` to transform the value into a `Date` object.",`Row ID: ${n}, field: "${r}".`].join(` +`))}const NPt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Pce({value:e,columnType:"date",rowId:o,field:n.field}),e.toLocaleDateString()},LPt=(e,t,n,r)=>{if(!e)return"";const o=r.current.getRowId(t);return Pce({value:e,columnType:"dateTime",rowId:o,field:n.field}),e.toLocaleString()},FPt=W({},tc,{type:"date",sortComparator:Yle,valueFormatter:NPt,filterOperators:Sce(),renderEditCell:Cce,pastedValueParser:e=>new Date(e)}),jPt=W({},tc,{type:"dateTime",sortComparator:Yle,valueFormatter:LPt,filterOperators:Sce(!0),renderEditCell:Cce,pastedValueParser:e=>new Date(e)}),jd=e=>e==null?null:Number(e),BPt=e=>e==null||Number.isNaN(e)||e===""?null:t=>jd(t)===jd(e),zPt=()=>[{value:"=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>jd(t)===e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>jd(t)!==e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:jd(t)>e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:jd(t)>=e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFn:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:jd(t)e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:jd(t)<=e.value,InputComponent:Ws,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFn:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFn:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFn:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:Jle,InputComponentProps:{type:"number"}}],VPt=W({},tc,{type:"number",align:"right",headerAlign:"right",sortComparator:Kle,valueParser:e=>e===""?null:Number(e),valueFormatter:e=>cCt(e)?e.toLocaleString():e||"",filterOperators:zPt(),getApplyQuickFilterFn:BPt});function Iv(e){return(e==null?void 0:e.type)==="singleSelect"}function jh(e,t){if(e)return typeof e.valueOptions=="function"?e.valueOptions(W({field:e.field},t)):e.valueOptions}function wO(e,t,n){if(t===void 0)return;const r=t.find(o=>{const i=n(o);return String(i)===String(e)});return n(r)}const HPt=["id","value","formattedValue","api","field","row","rowNode","colDef","cellMode","isEditable","tabIndex","className","hasFocus","isValidating","isProcessingProps","error","onValueChange","initialOpen"],UPt=["MenuProps"];function WPt(e){return!!e.key}function GPt(e){var N,L;const t=xt(),{id:n,value:r,field:o,row:i,colDef:a,hasFocus:s,error:l,onValueChange:c,initialOpen:u=t.editMode===Gc.Cell}=e,d=At(e,HPt),f=mn(),p=y.useRef(),m=y.useRef(),[g,v]=y.useState(u),x=(((N=t.slotProps)==null?void 0:N.baseSelect)||{}).native??!1,S=((L=t.slotProps)==null?void 0:L.baseSelect)||{},{MenuProps:P}=S,T=At(S,UPt);if(_o(()=>{var j;s&&((j=m.current)==null||j.focus())},[s]),!Iv(a))return null;const E=jh(a,{id:n,row:i});if(!E)return null;const O=a.getOptionValue,k=a.getOptionLabel,A=async j=>{if(!Iv(a)||!E)return;v(!1);const _=j.target,D=wO(_.value,E,O);c&&await c(j,D),await f.current.setEditCellValue({id:n,field:o,value:D},j)},I=(j,_)=>{if(t.editMode===Gc.Row){v(!1);return}if(_==="backdropClick"||j.key==="Escape"){const D=f.current.getCellParams(n,o);f.current.publishEvent("cellEditStop",W({},D,{reason:j.key==="Escape"?_l.escapeKeyDown:_l.cellFocusOut}))}},R=j=>{WPt(j)&&j.key==="Enter"||v(!0)};return!E||!a?null:$.jsx(t.slots.baseSelect,W({ref:p,inputRef:m,value:r,onChange:A,open:g,onOpen:R,MenuProps:W({onClose:I},P),error:l,native:x,fullWidth:!0},d,T,{children:E.map(j=>{var D;const _=O(j);return y.createElement(t.slots.baseSelectOption,W({},((D=t.slotProps)==null?void 0:D.baseSelectOption)||{},{native:x,key:_,value:_}),k(j))})}))}const qPt=e=>$.jsx(GPt,W({},e)),KPt=["item","applyValue","type","apiRef","focusElementRef","placeholder","tabIndex","label","variant","isFilterActive","clearButton","InputLabelProps"],YPt=({column:e,OptionComponent:t,getOptionLabel:n,getOptionValue:r,isSelectNative:o,baseSelectOptionProps:i})=>["",...jh(e)||[]].map(s=>{const l=r(s);let c=n(s);return c===""&&(c=" "),y.createElement(t,W({},i,{native:o,key:l,value:l}),c)}),XPt=oe("div")({display:"flex",alignItems:"flex-end",width:"100%","& button":{margin:"auto 0px 5px 5px"}});function Dq(e){var O,k,A,I,R;const{item:t,applyValue:n,type:r,apiRef:o,focusElementRef:i,placeholder:a,tabIndex:s,label:l,variant:c="standard",clearButton:u}=e,d=At(e,KPt),f=t.value??"",p=yo(),m=yo(),g=xt(),v=((k=(O=g.slotProps)==null?void 0:O.baseSelect)==null?void 0:k.native)??!1;let w=null;if(t.field){const N=o.current.getColumn(t.field);Iv(N)&&(w=N)}const x=w==null?void 0:w.getOptionValue,S=w==null?void 0:w.getOptionLabel,P=y.useMemo(()=>jh(w),[w]),T=y.useCallback(N=>{let L=N.target.value;L=wO(L,P,x),n(W({},t,{value:L}))},[P,x,n,t]);if(!Iv(w))return null;const E=l??o.current.getLocaleText("filterPanelInputLabel");return $.jsxs(XPt,{children:[$.jsxs(g.slots.baseFormControl,{fullWidth:!0,children:[$.jsx(g.slots.baseInputLabel,W({},(A=g.slotProps)==null?void 0:A.baseInputLabel,{id:m,htmlFor:p,shrink:!0,variant:c,children:E})),$.jsx(g.slots.baseSelect,W({id:p,label:E,labelId:m,value:f,onChange:T,variant:c,type:r||"text",inputProps:{tabIndex:s,ref:i,placeholder:a??o.current.getLocaleText("filterPanelInputPlaceholder")},native:v,notched:c==="outlined"?!0:void 0},d,(I=g.slotProps)==null?void 0:I.baseSelect,{children:YPt({column:w,OptionComponent:g.slots.baseSelectOption,getOptionLabel:S,getOptionValue:x,isSelectNative:v,baseSelectOptionProps:(R=g.slotProps)==null?void 0:R.baseSelectOption})}))]}),u]})}const QPt=["item","applyValue","type","apiRef","focusElementRef","color","error","helperText","size","variant"],JPt=["key"],ZPt=JJ();function eTt(e){const{item:t,applyValue:n,apiRef:r,focusElementRef:o,color:i,error:a,helperText:s,size:l,variant:c="standard"}=e,u=At(e,QPt),d={color:i,error:a,helperText:s,size:l,variant:c},f=yo(),p=xt();let m=null;if(t.field){const T=r.current.getColumn(t.field);Iv(T)&&(m=T)}const g=m==null?void 0:m.getOptionValue,v=m==null?void 0:m.getOptionLabel,w=y.useCallback((T,E)=>g(T)===g(E),[g]),x=y.useMemo(()=>jh(m)||[],[m]),S=y.useMemo(()=>Array.isArray(t.value)?t.value.reduce((T,E)=>{const O=x.find(k=>g(k)===E);return O!=null&&T.push(O),T},[]):[],[g,t.value,x]),P=y.useCallback((T,E)=>{n(W({},t,{value:E.map(g)}))},[n,t,g]);return $.jsx(oc,W({multiple:!0,options:x,isOptionEqualToValue:w,filterOptions:ZPt,id:f,value:S,onChange:P,getOptionLabel:v,renderTags:(T,E)=>T.map((O,k)=>{const A=E({index:k}),{key:I}=A,R=At(A,JPt);return $.jsx(p.slots.baseChip,W({variant:"outlined",size:"small",label:v(O)},R),I)}),renderInput:T=>{var E;return $.jsx(p.slots.baseTextField,W({},T,{label:r.current.getLocaleText("filterPanelInputLabel"),placeholder:r.current.getLocaleText("filterPanelInputPlaceholder"),InputLabelProps:W({},T.InputLabelProps,{shrink:!0}),inputRef:o,type:"singleSelect"},d,(E=p.slotProps)==null?void 0:E.baseTextField))}},u))}const ag=e=>e==null||!_z(e)?e:e.value,tTt=()=>[{value:"is",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>ag(t)===ag(e.value),InputComponent:Dq},{value:"not",getApplyFilterFn:e=>e.value==null||e.value===""?null:t=>ag(t)!==ag(e.value),InputComponent:Dq},{value:"isAnyOf",getApplyFilterFn:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(ag);return n=>t.includes(ag(n))},InputComponent:eTt}],nTt=e=>typeof e[0]=="object",rTt=e=>_z(e)?e.value:e,oTt=e=>_z(e)?e.label:String(e),iTt=W({},tc,{type:"singleSelect",getOptionLabel:oTt,getOptionValue:rTt,valueFormatter(e,t,n,r){const o=r.current.getRowId(t);if(!Iv(n))return"";const i=jh(n,{id:o,row:t});if(e==null)return"";if(!i)return e;if(!nTt(i))return n.getOptionLabel(e);const a=i.find(s=>n.getOptionValue(s)===e);return a?n.getOptionLabel(a):""},renderEditCell:qPt,filterOperators:tTt(),pastedValueParser:(e,t,n)=>{const r=n,o=jh(r)||[],i=r.getOptionValue;if(o.find(s=>i(s)===e))return e}}),aTt="string",sTt=()=>({string:tc,number:VPt,date:FPt,dateTime:jPt,boolean:cce,singleSelect:iTt,[uM]:ACt,custom:tc}),Hz=e=>e.headerFiltering,lTt=Dt(Hz,e=>(e==null?void 0:e.enabled)??!1),cTt=Dt(Hz,e=>e.editing),uTt=Dt(Hz,e=>e.menuOpen),vM=e=>e.columnGrouping,Tce=sr(vM,e=>(e==null?void 0:e.unwrappedGroupingModel)??{}),Ece=sr(vM,e=>(e==null?void 0:e.lookup)??{}),dTt=sr(vM,e=>(e==null?void 0:e.headerStructure)??[]),v1=Dt(vM,e=>(e==null?void 0:e.maxDepth)??0),Oce=["maxWidth","minWidth","width","flex"],_R=sTt();function fTt({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const s=o.all[a];s&&s.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let s=e,l=t,c=0;o.frozenFields.forEach(u=>{s-=o.all[u].computedWidth,l-=o.all[u].flex});for(let u=0;ud.maxWidth&&(c+=d.maxWidth-p,p=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:p,flex:d.flex}}c<0?Object.keys(a.max).forEach(u=>{o.freeze(u)}):c>0?Object.keys(a.min).forEach(u=>{o.freeze(u)}):n.forEach(({field:u})=>{o.freeze(u)}),i()}return i(),o.all}const ZN=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{let c=e.lookup[l],u=0,d=!1;e.columnVisibilityModel[l]!==!1&&(c.flex&&c.flex>0?(r+=c.flex,d=!0):u=Fc(c.width||tc.width,c.minWidth||tc.minWidth,c.maxWidth||tc.maxWidth),o+=u),c.computedWidth!==u&&(c=W({},c,{computedWidth:u})),d&&i.push(c),n[l]=c});const a=t===void 0?0:t.viewportOuterSize.width-(t.hasScrollY?t.scrollbarSize:0),s=Math.max(a-o,0);if(r>0&&a>0){const l=fTt({initialFreeSpace:s,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(c=>{n[c].computedWidth=l[c].computedWidth})}return W({},e,{lookup:n})},pTt=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let u=0;u!i[u])],l=W({},e.lookup);for(let u=0;u{f[p]=m===-1?1/0:m}),l[d]=f}return W({},e,{orderedFields:s,lookup:l})};function Nq(e){let t=_R[aTt];return e&&_R[e]&&(t=_R[e]),t}const yg=({apiRef:e,columnsToUpsert:t,initialState:n,columnVisibilityModel:r=Qs(e),keepOnlyColumnsToUpsert:o=!1})=>{var u,d;const i=!e.current.state.columns;let a;if(i)a={orderedFields:[],lookup:{},columnVisibilityModel:r};else{const f=Lc(e.current.state);a={orderedFields:o?[]:[...f.orderedFields],lookup:W({},f.lookup),columnVisibilityModel:r}}let s={};o&&!i&&(s=Object.keys(a.lookup).reduce((f,p)=>W({},f,{[p]:!1}),{})),t.forEach(f=>{const{field:p}=f;s[p]=!0;let m=a.lookup[p];m==null?(m=W({},Nq(f.type),{field:p,hasBeenResized:!1}),a.orderedFields.push(p)):o&&a.orderedFields.push(p),m&&m.type!==f.type&&(m=W({},Nq(f.type),{field:p}));let g=m.hasBeenResized;Oce.forEach(v=>{f[v]!==void 0&&(g=!0,f[v]===-1&&(f[v]=1/0))}),a.lookup[p]=Fle(m,W({},f,{hasBeenResized:g}))}),o&&!i&&Object.keys(a.lookup).forEach(f=>{s[f]||delete a.lookup[f]});const l=e.current.unstable_applyPipeProcessors("hydrateColumns",a),c=pTt(l,n);return ZN(c,((d=(u=e.current).getRootDimensions)==null?void 0:d.call(u))??void 0)};function hTt({firstColumnToRender:e,apiRef:t,firstRowToRender:n,lastRowToRender:r,visibleRows:o}){let i=e;for(let a=n;a{const{scrollDirection:t,classes:n}=e,r={root:["scrollArea",`scrollArea--${t}`]};return vn(r,bn,n)},yTt=Qn("div",{name:"MuiDataGrid",slot:"ScrollArea",overridesResolver:(e,t)=>[{[`&.${se["scrollArea--left"]}`]:t["scrollArea--left"]},{[`&.${se["scrollArea--right"]}`]:t["scrollArea--right"]},t.scrollArea]})(()=>({position:"absolute",top:0,zIndex:101,width:20,bottom:0,[`&.${se["scrollArea--left"]}`]:{left:0},[`&.${se["scrollArea--right"]}`]:{right:0}}));function vTt(e){const{scrollDirection:t}=e,n=y.useRef(null),r=mn(),o=Tb(),i=Ye(r,h1),a=Ye(r,$z),s=Ye(r,li),l=y.useRef({left:0,top:0}),c=()=>{if(t==="left")return l.current.left>0;if(t==="right"){const k=a-s.viewportInnerSize.width;return l.current.left{l.current=k,p(c)},T=wr(k=>{let A;if(k.preventDefault(),t==="left")A=k.clientX-n.current.getBoundingClientRect().right;else if(t==="right")A=Math.max(1,k.clientX-n.current.getBoundingClientRect().left);else throw new Error("MUI X: Wrong drag direction");A=(A-Lq)*mTt+Lq,o.start(0,()=>{r.current.scroll({left:l.current.left+A,top:l.current.top})})}),E=wr(()=>{d(!0)}),O=wr(()=>{d(!1)});return ht(r,"scrollPositionChange",P),ht(r,"columnHeaderDragStart",E),ht(r,"columnHeaderDragEnd",O),!u||!f?null:$.jsx(yTt,{ref:n,className:de(v.root),ownerState:g,onDragOver:T,style:S})}const Fq=op(vTt),bTt=typeof window<"u"?y.useLayoutEffect:y.useEffect,wTt=()=>{};function xTt(e,t,n){const r=y.useRef(null);r.current=t,bTt(()=>{if(typeof ResizeObserver>"u")return wTt;const o=e.current,i=new ResizeObserver(a=>{r.current(a)});return o&&i.observe(o),()=>{i.disconnect()}},[e,n])}const Ice=y.createContext(void 0);function xl(){const e=y.useContext(Ice);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e}const gy=(e,t)=>{let n,r;return t.pagination&&t.paginationMode==="client"?(r=Vz(e),n=OPt(e)):(n=ap(e),n.length===0?r=null:r={firstRowIndex:0,lastRowIndex:n.length-1}),{rows:n,range:r}},sp=(e,t)=>{const n=gy(e,t);return y.useMemo(()=>({rows:n.rows,range:n.range}),[n.rows,n.range])},STt=typeof navigator<"u"?navigator.userAgent.toLowerCase():"empty",CTt=STt.includes("firefox"),Mb=e=>e.rowsMeta,bM=e=>e.virtualization;Dt(bM,e=>e.enabled);const Wz=Dt(bM,e=>e.enabledForColumns),PTt=Dt(bM,e=>e.enabledForRows),wM=Dt(bM,e=>e.renderContext),TTt=sr(e=>e.virtualization.renderContext.firstColumnIndex,e=>e.virtualization.renderContext.lastColumnIndex,(e,t)=>({firstColumnIndex:e,lastColumnIndex:t})),kce={firstRowIndex:0,lastRowIndex:0,firstColumnIndex:0,lastColumnIndex:0},ETt=(e,t)=>{const{disableVirtualization:n,autoHeight:r}=t;return W({},e,{virtualization:{enabled:!n,enabledForColumns:!n,enabledForRows:!n&&!r,renderContext:kce}})};function OTt(e,t){const n=i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabled:i,enabledForColumns:i,enabledForRows:i&&!t.autoHeight})}))};Jt(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>W({},a,{virtualization:W({},a.virtualization,{enabledForColumns:i})}))}},"public"),y.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization,t.autoHeight])}const Gz=e=>e.rowSpanning,Mce=Dt(Gz,e=>e.hiddenCells),ITt=Dt(Gz,e=>e.spannedCells),kTt=Dt(Gz,e=>e.hiddenCellOriginMap),kv=e=>e.listViewColumn,DR=50;var ao=function(e){return e[e.NONE=0]="NONE",e[e.UP=1]="UP",e[e.DOWN=2]="DOWN",e[e.LEFT=3]="LEFT",e[e.RIGHT=4]="RIGHT",e}(ao||{});const jq={top:0,left:0},MTt=Object.freeze(new Map),ATt=(e,t,n,r,o)=>({direction:ao.NONE,buffer:$ce(e,ao.NONE,t,n,r,o)});let eL=!1;try{typeof window<"u"&&(eL=/jsdom/.test(window.navigator.userAgent))}catch{}const $Tt=()=>{const e=xl(),t=xt(),{unstable_listView:n}=t,r=Ye(e,()=>n?[kv(e.current.state)]:vo(e)),o=Ye(e,PTt)&&!eL,i=Ye(e,Wz)&&!eL,a=Ye(e,li),s=a.viewportOuterSize,l=Ye(e,mm),c=Ye(e,m1),u=n?{left:[],right:[]}:c,d=l.bottom.length>0,[f,p]=y.useState(MTt),m=nr(),g=Ye(e,Fa),v=Ye(e,zz),w=Ye(e,Mb),x=Ye(e,Lu),S=sp(e,t),P=e.current.rootElementRef,T=e.current.mainElementRef,E=e.current.virtualScrollerRef,O=e.current.virtualScrollbarVerticalRef,k=e.current.virtualScrollbarHorizontalRef,A=a.contentSize.height,I=a.columnsTotalWidth,R=Ye(e,X1t);xTt(T,()=>e.current.resize());const N=y.useRef(jq),L=y.useRef(jq),j=y.useRef(kce),_=Ye(e,wM),D=Tb(),z=y.useRef(void 0),F=eu(()=>ATt(m,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,DR*6)).current,H={rowIndex:y.useMemo(()=>g?S.rows.findIndex(re=>re.id===g.id):-1,[g,S.rows]),columnIndex:y.useMemo(()=>g?r.findIndex(re=>re.field===g.field):-1,[g,r])},U=y.useCallback(re=>{if(DTt(re,e.current.state.virtualization.renderContext))return;const fe=re.firstRowIndex!==j.current.firstRowIndex||re.lastRowIndex!==j.current.lastRowIndex;e.current.setState(ee=>W({},ee,{virtualization:W({},ee.virtualization,{renderContext:re})})),a.isReady&&fe&&(j.current=re,e.current.publishEvent("renderedRowsIntervalChange",re)),L.current=N.current},[e,a.isReady]),q=wr(()=>{const re={top:E.current.scrollTop,left:E.current.scrollLeft},fe=re.left-N.current.left,ee=re.top-N.current.top,ce=fe!==0||ee!==0;N.current=re;const me=ce?NTt(fe,ee):ao.NONE,we=Math.abs(N.current.top-L.current.top),ge=Math.abs(N.current.left-L.current.left),Se=we>=a.rowHeight||ge>=DR,xe=F.direction!==me;if(!(Se||xe))return _;if(xe)switch(me){case ao.NONE:case ao.LEFT:case ao.RIGHT:z.current=void 0;break;default:z.current=_;break}F.direction=me,F.buffer=$ce(m,me,t.rowBufferPx,t.columnBufferPx,a.rowHeight*15,DR*6);const Re=NR(e,t,o,i),_e=LR(Re,N.current,F);return MI.flushSync(()=>{U(_e)}),D.start(1e3,q),_e}),X=()=>{const re=NR(e,t,o,i),fe=LR(re,N.current,F);z.current=void 0,U(fe)},ae=wr(re=>{const{scrollTop:fe,scrollLeft:ee}=re.currentTarget;if(fe<0||!m&&ee<0||m&&ee>0)return;const ce=q();e.current.publishEvent("scrollPositionChange",{top:fe,left:ee,renderContext:ce})}),Z=wr(re=>{e.current.publishEvent("virtualScrollerWheel",{},re)}),K=wr(re=>{e.current.publishEvent("virtualScrollerTouchMove",{},re)}),te=(re={})=>{var Te;if(!re.rows&&!S.range)return[];const fe=re.renderContext??_,ee=!d&&re.position===void 0||d&&re.position==="bottom",ce=re.position!==void 0;let me;switch(re.position){case"top":me=0;break;case"bottom":me=l.top.length+S.rows.length;break;case void 0:me=l.top.length;break}const we=re.rows??S.rows,ge=fe.firstRowIndex,Se=Math.min(fe.lastRowIndex,we.length),xe=re.rows?Cq(0,re.rows.length):Cq(ge,Se);let Ie=-1;!ce&&H.rowIndex!==-1&&(H.rowIndex=Se&&(Ie=H.rowIndex,xe.push(Ie)));const Re=[],_e=(Te=t.slotProps)==null?void 0:Te.row,ye=ip(e);return xe.forEach(Oe=>{var jn,Wn,Eo;const{id:Me,model:We}=we[Oe],Ve=(((jn=S==null?void 0:S.range)==null?void 0:jn.firstRowIndex)||0)+me+Oe;if(R){const Kr=u.left.length,Ii=r.length-u.right.length;e.current.calculateColSpan({rowId:Me,minFirstColumn:Kr,maxLastColumn:Ii,columns:r}),u.left.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:0,maxLastColumn:u.left.length,columns:r}),u.right.length>0&&e.current.calculateColSpan({rowId:Me,minFirstColumn:r.length-u.right.length,maxLastColumn:r.length,columns:r})}const Qe=(g==null?void 0:g.id)===Me,ut=e.current.rowHasAutoHeight(Me)?"auto":e.current.unstable_getRowHeight(Me);let nt;x[Me]==null?nt=!1:nt=e.current.isRowSelectable(Me);let et=!1;re.position===void 0&&(et=Oe===0);let yt=!1;const wn=Oe===we.length-1;if(ee)if(ce)yt=wn;else{const Kr=S.rows.length-1;Oe===Kr&&(yt=!0)}const $e=Oe===Ie;let Xe=null;v!==null&&v.id===Me&&(Xe=e.current.getCellParams(Me,v.field).cellMode==="view"?v.field:null);let bt=fe;!ce&&z.current&&Oe>=z.current.firstRowIndex&&Oes.width,ie=y.useMemo(()=>({overflowX:!pe||n?"hidden":void 0,overflowY:t.autoHeight?"hidden":void 0}),[pe,t.autoHeight,n]),le=y.useMemo(()=>{const re={width:pe?I:"auto",flexBasis:A,flexShrink:0};return t.autoHeight&&S.rows.length===0&&(re.flexBasis=ace(e)),re},[e,I,A,pe,t.autoHeight,S.rows.length]);return y.useEffect(()=>{e.current.publishEvent("virtualScrollerContentSizeChange")},[e,le]),_o(()=>{e.current.resize()},[e,w.currentPageTotalHeight]),_o(()=>{i&&(E.current.scrollLeft=0),o&&(E.current.scrollTop=0)},[i,o,P,E]),_o(()=>{n&&(E.current.scrollLeft=0)},[n,E]),wPt(s.width!==0,()=>{const re=NR(e,t,o,i),fe=LR(re,N.current,F);U(fe),e.current.publishEvent("scrollPositionChange",{top:N.current.top,left:N.current.left,renderContext:fe})}),e.current.register("private",{updateRenderContext:X}),ht(e,"columnsChange",X),ht(e,"filteredRowsSet",X),ht(e,"rowExpansionChange",X),{renderContext:_,setPanels:p,getRows:te,getContainerProps:()=>({ref:T}),getScrollerProps:()=>({ref:E,onScroll:ae,onWheel:Z,onTouchMove:K,style:ie,role:"presentation",tabIndex:CTt?-1:void 0}),getContentProps:()=>({style:le,role:"presentation"}),getRenderZoneProps:()=>({role:"rowgroup"}),getScrollbarVerticalProps:()=>({ref:O,role:"presentation"}),getScrollbarHorizontalProps:()=>({ref:k,role:"presentation"})}};function NR(e,t,n,r){const o=li(e.current.state),i=gy(e,t),a=t.unstable_listView?[kv(e.current.state)]:vo(e),s=kTt(e),l=e.current.state.rows.dataRowIds.at(-1),c=a.at(-1);return{enabledForRows:n,enabledForColumns:r,apiRef:e,autoHeight:t.autoHeight,rowBufferPx:t.rowBufferPx,columnBufferPx:t.columnBufferPx,leftPinnedWidth:o.leftPinnedWidth,columnsTotalWidth:o.columnsTotalWidth,viewportInnerWidth:o.viewportInnerSize.width,viewportInnerHeight:o.viewportInnerSize.height,lastRowHeight:l!==void 0?e.current.unstable_getRowHeight(l):0,lastColumnWidth:(c==null?void 0:c.computedWidth)??0,rowsMeta:Mb(e.current.state),columnPositions:ip(e),rows:i.rows,range:i.range,pinnedColumns:m1(e),visibleColumns:a,hiddenCellsOriginMap:s,listView:t.unstable_listView??!1}}function LR(e,t,n){const r={firstRowIndex:0,lastRowIndex:e.rows.length,firstColumnIndex:0,lastColumnIndex:e.visibleColumns.length},{top:o,left:i}=t,a=Math.abs(i)+e.leftPinnedWidth;if(e.enabledForRows){let l=Math.min(Bq(e,o,{atStart:!0,lastPosition:e.rowsMeta.positions[e.rowsMeta.positions.length-1]+e.lastRowHeight}),e.rowsMeta.positions.length-1);const c=e.hiddenCellsOriginMap[l];if(c){const d=Math.min(...Object.values(c));l=Math.min(l,d)}const u=e.autoHeight?l+e.rows.length:Bq(e,o+e.viewportInnerHeight);r.firstRowIndex=l,r.lastRowIndex=u}if(e.enabledForColumns){let l=0,c=e.columnPositions.length,u=!1;const[d,f]=tL({firstIndex:r.firstRowIndex,lastIndex:r.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight});for(let p=d;p=e.range.lastRowIndex);const i=Fc(r-(((s=e.range)==null?void 0:s.firstRowIndex)||0),0,e.rowsMeta.positions.length);return o||e.rowsMeta.positions[i]>=t?Df(t,e.rowsMeta.positions,n):_Tt(t,e.rowsMeta.positions,i,n)}function RTt(e,t,n){const[r,o]=tL({firstIndex:t.firstRowIndex,lastIndex:t.lastRowIndex,minFirstIndex:0,maxLastIndex:e.rows.length,bufferBefore:n.buffer.rowBefore,bufferAfter:n.buffer.rowAfter,positions:e.rowsMeta.positions,lastSize:e.lastRowHeight}),[i,a]=tL({firstIndex:t.firstColumnIndex,lastIndex:t.lastColumnIndex,minFirstIndex:e.pinnedColumns.left.length,maxLastIndex:e.visibleColumns.length-e.pinnedColumns.right.length,bufferBefore:n.buffer.columnBefore,bufferAfter:n.buffer.columnAfter,positions:e.columnPositions,lastSize:e.lastColumnWidth}),s=hTt({firstColumnToRender:i,apiRef:e.apiRef,firstRowToRender:r,lastRowToRender:o,visibleRows:e.rows});return{firstRowIndex:r,lastRowIndex:o,firstColumnIndex:s,lastColumnIndex:a}}function Df(e,t,n=void 0,r=0,o=t.length){if(t.length<=0)return-1;if(r>=o)return r;const i=r+Math.floor((o-r)/2),a=t[i];let s;if(n!=null&&n.atStart){const l=(i===t.length-1?n.lastPosition:t[i+1])-a;s=e-l=Math.abs(e)?t>0?ao.DOWN:ao.UP:e>0?ao.RIGHT:ao.LEFT}function $ce(e,t,n,r,o,i){if(e)switch(t){case ao.LEFT:t=ao.RIGHT;break;case ao.RIGHT:t=ao.LEFT;break}switch(t){case ao.NONE:return{rowAfter:n,rowBefore:n,columnAfter:r,columnBefore:r};case ao.LEFT:return{rowAfter:0,rowBefore:0,columnAfter:0,columnBefore:i};case ao.RIGHT:return{rowAfter:0,rowBefore:0,columnAfter:i,columnBefore:0};case ao.UP:return{rowAfter:0,rowBefore:o,columnAfter:0,columnBefore:0};case ao.DOWN:return{rowAfter:o,rowBefore:0,columnAfter:0,columnBefore:0};default:throw new Error("unreachable")}}const LTt=()=>{var u,d;const e=mn(),t=xt(),n=Ye(e,dM),r=Ye(e,Fz),o=n===0,i=Ye(e,$Ct),a=!i&&o,s=!i&&n>0&&r===0;let l=null,c=null;return a&&(l="noRowsOverlay"),s&&(l="noResultsOverlay"),i&&(l="loadingOverlay",c=((d=(u=t.slotProps)==null?void 0:u.loadingOverlay)==null?void 0:d[o?"noRowsVariant":"variant"])||null),{overlayType:l,loadingOverlayVariant:c}},FTt=Qn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e,loadingOverlayVariant:t})=>t!=="skeleton"?{position:"sticky",top:"var(--DataGrid-headersTotalHeight)",left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4}:{}),jTt=Qn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType"&&e!=="loadingOverlayVariant",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),BTt=e=>{const{classes:t}=e;return vn({root:["overlayWrapper"],inner:["overlayWrapperInner"]},bn,t)};function zTt(e){const t=mn(),n=xt(),r=sp(t,n),o=Ye(t,li);let i=o.viewportOuterSize.height-o.topContainerHeight-o.bottomContainerHeight-(o.hasScrollX?o.scrollbarSize:0);(n.autoHeight&&r.rows.length===0||i===0)&&(i=ace(t));const a=BTt(W({},e,{classes:n.classes}));return $.jsx(FTt,W({className:de(a.root)},e,{children:$.jsx(jTt,W({className:de(a.inner),style:{height:i,width:o.viewportOuterSize.width}},e))}))}function VTt(e){var i,a;const{overlayType:t}=e,n=xt();if(!t)return null;const r=(i=n.slots)==null?void 0:i[t],o=(a=n.slotProps)==null?void 0:a[t];return $.jsx(zTt,W({},e,{children:$.jsx(r,W({},o))}))}const eT=e=>e.columnMenu;function HTt(){var v;const e=xl(),t=xt(),n=Ye(e,vo),r=Ye(e,sPt),o=Ye(e,rPt),i=Ye(e,mce),a=Ye(e,zz),s=Ye(e,vPt),l=Ye(e,yPt),c=Ye(e,bO),u=Ye(e,v1),d=Ye(e,eT),f=Ye(e,Qs),p=Ye(e,dTt),m=!(s===null&&i===null&&a===null),g=e.current.columnHeadersContainerRef;return $.jsx(t.slots.columnHeaders,W({ref:g,visibleColumns:n,filterColumnLookup:r,sortColumnLookup:o,columnHeaderTabIndexState:i,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m},(v=t.slotProps)==null?void 0:v.columnHeaders))}const UTt=op(HTt),Rce=y.createContext(void 0),_ce=()=>{const e=y.useContext(Rce);if(e===void 0)throw new Error(["MUI X: Could not find the Data Grid configuration context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the Data Grid."].join(` +`));return e},WTt=Qn("div")({position:"absolute",top:"var(--DataGrid-headersTotalHeight)",left:0,width:"calc(100% - (var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize)))"}),GTt=Qn("div",{name:"MuiDataGrid",slot:"Main",overridesResolver:(e,t)=>t.main})({flexGrow:1,position:"relative",overflow:"hidden",display:"flex",flexDirection:"column"}),qTt=y.forwardRef((e,t)=>{const n=xt(),o=_ce().hooks.useGridAriaAttributes();return $.jsxs(GTt,W({ref:t,ownerState:n,className:e.className,tabIndex:-1},o,{children:[$.jsx(WTt,{role:"presentation","data-id":"gridPanelAnchor"}),e.children]}))}),KTt=()=>vn({root:["topContainer"]},bn,{}),YTt=Qn("div")({position:"sticky",zIndex:4,top:0});function XTt(e){const t=KTt();return $.jsx(YTt,W({},e,{className:de(t.root,se["container--top"]),role:"presentation"}))}const QTt=()=>vn({root:["bottomContainer"]},bn,{}),JTt=Qn("div")({position:"sticky",zIndex:4,bottom:"calc(var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize))"});function ZTt(e){const t=QTt();return $.jsx(JTt,W({},e,{className:de(t.root,se["container--bottom"]),role:"presentation"}))}const eEt=(e,t)=>{const{classes:n}=e;return vn({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},bn,n)},tEt=Qn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),nEt=y.forwardRef(function(t,n){var a;const r=xt(),o=!r.autoHeight&&((a=t.style)==null?void 0:a.minHeight)==="auto",i=eEt(r,o);return $.jsx(tEt,W({ref:n},t,{ownerState:r,className:de(i.root,t.className)}))}),rEt=Qn("div")({display:"flex",flexDirection:"row",width:"var(--DataGrid-rowWidth)",boxSizing:"border-box"}),Dce=Qn("div")({position:"sticky",height:"100%",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",backgroundColor:"var(--DataGrid-pinnedBackground)"}),oEt=Qn(Dce)({left:0,borderRight:"1px solid var(--rowBorderColor)"}),iEt=Qn(Dce)({right:0,borderLeft:"1px solid var(--rowBorderColor)"}),aEt=Qn("div")({flexGrow:1,borderTop:"1px solid var(--rowBorderColor)"});function sEt({rowsLength:e}){const t=mn(),{viewportOuterSize:n,minimumSize:r,hasScrollX:o,hasScrollY:i,scrollbarSize:a,leftPinnedWidth:s,rightPinnedWidth:l}=Ye(t,li),c=o?a:0,u=n.height-r.height>0;return c===0&&!u?null:$.jsxs(rEt,{className:se.filler,role:"presentation",style:{height:c,"--rowBorderColor":e===0?"transparent":"var(--DataGrid-rowBorderColor)"},children:[s>0&&$.jsx(oEt,{className:se["filler--pinnedLeft"],style:{width:s}}),$.jsx(aEt,{}),l>0&&$.jsx(iEt,{className:se["filler--pinnedRight"],style:{width:l+(i?a:0)}})]})}const lEt=op(sEt),cEt=["className"],uEt=e=>{const{classes:t}=e;return vn({root:["virtualScrollerRenderZone"]},bn,t)},dEt=Qn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),fEt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,cEt),i=mn(),a=xt(),s=uEt(a),l=Ye(i,()=>{const c=wM(i);return Mb(i.current.state).positions[c.firstRowIndex]??0});return $.jsx(dEt,W({ref:n,className:de(s.root,r),ownerState:a,style:{transform:`translate3d(0, ${l}px, 0)`}},o))}),pEt={includeHeaders:!0,includeOutliers:!1,outliersFactor:1.5,expand:!1},Ho=e=>e.editRows,tS=e=>e.preferencePanel;var Bh=function(e){return e.filters="filters",e.columns="columns",e}(Bh||{});const hEt=(e,t)=>{const{classes:n}=e,r={root:["scrollbar",`scrollbar--${t}`],content:["scrollbarContent"]};return vn(r,bn,n)},Nce=Qn("div")({position:"absolute",display:"inline-block",zIndex:6,"--size":"calc(max(var(--DataGrid-scrollbarSize), 14px))"}),mEt=Qn(Nce)({width:"var(--size)",height:"calc(var(--DataGrid-hasScrollY) * (100% - var(--DataGrid-topContainerHeight) - var(--DataGrid-bottomContainerHeight) - var(--DataGrid-hasScrollX) * var(--DataGrid-scrollbarSize)))",overflowY:"auto",overflowX:"hidden",outline:0,"& > div":{width:"var(--size)"},top:"var(--DataGrid-topContainerHeight)",right:"0px"}),gEt=Qn(Nce)({width:"100%",height:"var(--size)",overflowY:"hidden",overflowX:"auto",outline:0,"& > div":{height:"var(--size)"},bottom:"0px"}),zq=y.forwardRef(function(t,n){const r=xl(),o=xt(),i=y.useRef(!1),a=y.useRef(0),s=y.useRef(null),l=y.useRef(null),c=hEt(o,t.position),u=Ye(r,li),d=t.position==="vertical"?"height":"width",f=t.position==="vertical"?"scrollTop":"scrollLeft",p=t.position==="vertical"?u.hasScrollX:u.hasScrollY,m=u.minimumSize[d]+(p?u.scrollbarSize:0),v=(t.position==="vertical"?u.viewportInnerSize.height:u.viewportOuterSize.width)*(m/u.viewportOuterSize[d]),w=wr(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;if(!T||P[f]===a.current)return;if(a.current=P[f],i.current){i.current=!1;return}i.current=!0;const E=P[f]/m;T[f]=E*v}),x=wr(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;if(!T)return;if(i.current){i.current=!1;return}i.current=!0;const E=T[f]/v;P[f]=E*m});cM(()=>{const P=r.current.virtualScrollerRef.current,T=s.current;return P.addEventListener("scroll",w,{capture:!0}),T.addEventListener("scroll",x,{capture:!0}),()=>{P.removeEventListener("scroll",w,{capture:!0}),T.removeEventListener("scroll",x,{capture:!0})}}),y.useEffect(()=>{l.current.style.setProperty(d,`${v}px`)},[v,d]);const S=t.position==="vertical"?mEt:gEt;return $.jsx(S,{ref:hm(n,s),className:c.root,style:t.position==="vertical"&&o.unstable_listView?{height:"100%",top:0}:void 0,tabIndex:-1,"aria-hidden":"true",children:$.jsx("div",{ref:l,className:c.content})})}),yEt=(e,t,n)=>{const{classes:r}=e,o={root:["main",t.rightPinnedWidth>0&&"main--hasPinnedRight",n==="skeleton"&&"main--hasSkeletonLoadingOverlay"],scroller:["virtualScroller",t.hasScrollX&&"virtualScroller--hasScrollX"]};return vn(o,bn,r)},vEt=Qn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({position:"relative",height:"100%",flexGrow:1,overflow:"scroll",scrollbarWidth:"none",display:"flex",flexDirection:"column","&::-webkit-scrollbar":{display:"none"},"@media print":{overflow:"hidden"},zIndex:0});function bEt(e){const t=mn(),n=xt(),r=Ye(t,li),o=LTt(),i=yEt(n,r,o.loadingOverlayVariant),a=$Tt(),{getContainerProps:s,getScrollerProps:l,getContentProps:c,getRenderZoneProps:u,getScrollbarVerticalProps:d,getScrollbarHorizontalProps:f,getRows:p}=a,m=p();return $.jsxs(qTt,W({className:i.root},s(),{children:[$.jsx(Fq,{scrollDirection:"left"}),$.jsx(Fq,{scrollDirection:"right"}),$.jsxs(vEt,W({className:i.scroller},l(),{ownerState:n,children:[$.jsxs(XTt,{children:[!n.unstable_listView&&$.jsx(UTt,{}),$.jsx(n.slots.pinnedRows,{position:"top",virtualScroller:a})]}),$.jsx(VTt,W({},o)),$.jsx(nEt,W({},c(),{children:$.jsxs(fEt,W({},u(),{children:[m,$.jsx(n.slots.detailPanels,{virtualScroller:a})]}))})),$.jsx(lEt,{rowsLength:m.length}),$.jsx(ZTt,{children:$.jsx(n.slots.pinnedRows,{position:"bottom",virtualScroller:a})})]})),r.hasScrollY&&$.jsx(zq,W({position:"vertical"},d())),r.hasScrollX&&!n.unstable_listView&&$.jsx(zq,W({position:"horizontal"},f())),e.children]}))}function wEt(){var t;const e=xt();return e.hideFooter?null:$.jsx(e.slots.footer,W({},(t=e.slotProps)==null?void 0:t.footer))}let FR;function xEt(){return FR===void 0&&document.createElement("div").focus({get preventScroll(){return FR=!0,!1}}),FR}function SEt(e){return e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth}function xO(e,t){return e.closest(`.${t}`)}function fd(e){return e.replace(/["\\]/g,"\\$&")}function CEt(e,t){return e.querySelector(`[role="columnheader"][data-field="${fd(t)}"]`)}function Lce(e){return`.${se.row}[data-id="${fd(String(e))}"]`}function PEt(e,t){return e.querySelector(Lce(t))}function TEt(e,{id:t,field:n}){const r=Lce(t),o=`.${se.cell}[data-field="${fd(n)}"]`,i=`${r} ${o}`;return e.querySelector(i)}function b1(e){return e.target.nodeType===1&&!e.currentTarget.contains(e.target)}function EEt(e){return e.getAttribute("data-field")}function OEt(e,t){return e.querySelector(`[data-field="${fd(t)}"]`)}function IEt(e){return e.getAttribute("data-fields").slice(2,-2).split("-|-")}function kEt(e,t){return Array.from(e.querySelectorAll(`[data-fields*="|-${fd(t)}-|"]`)??[])}function MEt(e,t){var a;if(!xO(e,se.root))throw new Error("MUI X: The root element is not found.");const r=e.getAttribute("aria-colindex");if(!r)return[];const o=Number(r)-1,i=[];return(a=t.virtualScrollerRef)!=null&&a.current?(Bce(t).forEach(s=>{const l=s.getAttribute("data-id");if(!l)return;let c=o;const u=t.unstable_getCellColSpanInfo(l,o);u&&u.spannedByColSpan&&(c=u.leftVisibleCellIndex);const d=s.querySelector(`[data-colindex="${c}"]`);d&&i.push(d)}),i):[]}function Vq(e,t){return e.rootElementRef.current.querySelector(`.${se[t]}`)}const Fce=({api:e,colIndex:t,position:n,filterFn:r})=>{if(t===null)return[];const o=[];return Bce(e).forEach(i=>{i.getAttribute("data-id")&&i.querySelectorAll(`.${se[n==="left"?"cell--pinnedLeft":"cell--pinnedRight"]}`).forEach(s=>{const l=Ab(s);l!==null&&r(l)&&o.push(s)})}),o};function AEt(e,t,n){const r=Ab(t);return Fce({api:e,colIndex:r,position:n?"right":"left",filterFn:o=>n?or})}function $Et(e,t,n){const r=Ab(t);return Fce({api:e,colIndex:r,position:n?"left":"right",filterFn:o=>n?o>r:o{var i;if(!((i=e.columnHeadersContainerRef)!=null&&i.current))return[];if(t===null)return[];const o=[];return e.columnHeadersContainerRef.current.querySelectorAll(`.${se[n==="left"?"columnHeader--pinnedLeft":"columnHeader--pinnedRight"]}`).forEach(a=>{const s=Ab(a);s!==null&&r(s)&&o.push(a)}),o};function REt(e,t,n){const r=Ab(t);return jce({api:e,position:n?"right":"left",colIndex:r,filterFn:o=>n?or})}function _Et(e,t,n){const r=Ab(t);return jce({api:e,position:n?"left":"right",colIndex:r,filterFn:o=>n?o>r:o div > [data-field="${fd(t)}"][role="columnheader"]`)}function NEt(e,t){const n=e.virtualScrollerRef.current;return Array.from(n.querySelectorAll(`:scope > div > div > div > [data-field="${fd(t)}"][role="gridcell"]`))}function Bce(e){return e.virtualScrollerRef.current.querySelectorAll(`:scope > div > div > .${se.row}`)}function Ab(e){const t=e.getAttribute("aria-colindex");return t?Number(t)-1:null}class tT extends Error{}function LEt(e,t){const n=y.useCallback(f=>({field:f,colDef:e.current.getColumn(f)}),[e]),r=y.useCallback(f=>{const p=e.current.getRow(f);if(!p)throw new tT(`No row with id #${f} found`);return{id:f,columns:e.current.getAllColumns(),row:p}},[e]),o=y.useCallback((f,p)=>{const m=t.unstable_listView?kv(e.current.state):e.current.getColumn(p),g=e.current.getRow(f),v=e.current.getRowNode(f);if(!g||!v)throw new tT(`No row with id #${f} found`);const w=g[p],x=m!=null&&m.valueGetter?m.valueGetter(w,g,m,e):w,S=Fa(e),P=zz(e),T={id:f,field:p,row:g,rowNode:v,colDef:m,cellMode:e.current.getCellMode(f,p),hasFocus:S!==null&&S.field===p&&S.id===f,tabIndex:P&&P.field===p&&P.id===f?0:-1,value:x,formattedValue:x,isEditable:!1,api:{}};return m&&m.valueFormatter&&(T.formattedValue=m.valueFormatter(x,g,m,e)),T.isEditable=m&&e.current.isCellEditable(T),T},[e,t.unstable_listView]),i=y.useCallback((f,p)=>{const m=e.current.getColumn(p),g=e.current.getRow(f);if(!g)throw new tT(`No row with id #${f} found`);return!m||!m.valueGetter?g[p]:m.valueGetter(g[m.field],g,m,e)},[e]),a=y.useCallback((f,p)=>{const m=p.field;if(!p||!p.valueGetter)return f[m];const g=f[p.field];return p.valueGetter(g,f,p,e)},[e]),s=y.useCallback((f,p)=>{const m=a(f,p);return!p||!p.valueFormatter?m:p.valueFormatter(m,f,p,e)},[e,a]),l=y.useCallback(f=>e.current.rootElementRef.current?CEt(e.current.rootElementRef.current,f):null,[e]),c=y.useCallback(f=>e.current.rootElementRef.current?PEt(e.current.rootElementRef.current,f):null,[e]),u=y.useCallback((f,p)=>e.current.rootElementRef.current?TEt(e.current.rootElementRef.current,{id:f,field:p}):null,[e]);Jt(e,{getCellValue:i,getCellParams:o,getCellElement:u,getRowValue:a,getRowFormattedValue:s,getRowParams:r,getRowElement:c,getColumnHeaderParams:n,getColumnHeaderElement:l},"public")}const xM=(e,t,n,r,o)=>{const i=t===n-1;return e===ur.LEFT&&i?!0:r?e===ur.LEFT?!0:e===ur.RIGHT?!i:!i||o:!1},SM=(e,t)=>e===ur.RIGHT&&t===0,FEt=["column","rowId","editCellState","align","children","colIndex","width","className","style","gridHasScrollX","colSpan","disableDragEvents","isNotVisible","pinnedOffset","pinnedPosition","sectionIndex","sectionLength","gridHasFiller","onClick","onDoubleClick","onMouseDown","onMouseUp","onMouseOver","onKeyDown","onKeyUp","onDragEnter","onDragOver"],jEt=["changeReason","unstable_updateValueOnRender"];let fa=function(e){return e[e.NONE=0]="NONE",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.VIRTUAL=3]="VIRTUAL",e}({});const zce={[fa.LEFT]:ur.LEFT,[fa.RIGHT]:ur.RIGHT,[fa.NONE]:void 0,[fa.VIRTUAL]:void 0},Hq={id:-1,field:"__unset__",row:{},rowNode:{id:-1,depth:0,type:"leaf",parent:-1,groupingKey:null},colDef:{type:"string",field:"__unset__",computedWidth:0},cellMode:Zn.View,hasFocus:!1,tabIndex:-1,value:null,formattedValue:"__unset__",isEditable:!1,api:{}},BEt=e=>{const{align:t,showLeftBorder:n,showRightBorder:r,pinnedPosition:o,isEditable:i,isSelected:a,isSelectionMode:s,classes:l}=e,c={root:["cell",`cell--text${p1(t)}`,a&&"selected",i&&"cell--editable",n&&"cell--withLeftBorder",r&&"cell--withRightBorder",o===fa.LEFT&&"cell--pinnedLeft",o===fa.RIGHT&&"cell--pinnedRight",s&&!i&&"cell--selectionMode"]};return vn(c,bn,l)},zEt=y.forwardRef(function(t,n){var et,yt,wn;const{column:r,rowId:o,editCellState:i,align:a,colIndex:s,width:l,className:c,style:u,colSpan:d,disableDragEvents:f,isNotVisible:p,pinnedOffset:m,pinnedPosition:g,sectionIndex:v,sectionLength:w,gridHasFiller:x,onClick:S,onDoubleClick:P,onMouseDown:T,onMouseUp:E,onMouseOver:O,onKeyDown:k,onKeyUp:A,onDragEnter:I,onDragOver:R}=t,N=At(t,FEt),L=mn(),j=xt(),_=nr(),D=r.field,z=Ye(L,()=>{try{const Ke=L.current.getCellParams(o,D);return Ke.api=L.current,Ke}catch(Ke){if(Ke instanceof tT)return Hq;throw Ke}},Vle),F=Ye(L,()=>L.current.unstable_applyPipeProcessors("isCellSelected",!1,{id:o,field:D})),H=Ye(L,Mce),U=Ye(L,ITt),{cellMode:q,hasFocus:X,isEditable:ae=!1,value:Z}=z,K=r.type==="actions"&&((et=r.getActions)==null?void 0:et.call(r,L.current.getRowParams(o)).some(Ke=>!Ke.props.disabled)),te=(q==="view"||!ae)&&!K?z.tabIndex:-1,{classes:pe,getCellClassName:ie}=j,re=[Ye(L,()=>L.current.unstable_applyPipeProcessors("cellClassName",[],{id:o,field:D}).filter(Boolean).join(" "))];r.cellClassName&&re.push(typeof r.cellClassName=="function"?r.cellClassName(z):r.cellClassName),r.display==="flex"&&re.push(se["cell--flex"]),ie&&re.push(ie(z));const fe=z.formattedValue??Z,ee=y.useRef(null),ce=hm(n,ee),me=y.useRef(null),we=j.cellSelection??!1,ge=zce[g],Se=SM(ge,v),xe=xM(ge,v,w,j.showCellVerticalBorder,x),Ie={align:a,showLeftBorder:Se,showRightBorder:xe,isEditable:ae,classes:j.classes,pinnedPosition:g,isSelected:F,isSelectionMode:we},Re=BEt(Ie),_e=y.useCallback(Ke=>$e=>{const Xe=L.current.getCellParams(o,D||"");L.current.publishEvent(Ke,Xe,$e),E&&E($e)},[L,D,E,o]),ye=y.useCallback(Ke=>$e=>{const Xe=L.current.getCellParams(o,D||"");L.current.publishEvent(Ke,Xe,$e),T&&T($e)},[L,D,T,o]),Te=y.useCallback((Ke,$e)=>Xe=>{if(!L.current.getRow(o))return;const bt=L.current.getCellParams(o,D||"");L.current.publishEvent(Ke,bt,Xe),$e&&$e(Xe)},[L,D,o]),Oe=((yt=H[o])==null?void 0:yt[D])??!1,Me=((wn=U[o])==null?void 0:wn[D])??1,We=y.useMemo(()=>{if(p)return{padding:0,opacity:0,width:0,border:0};const Ke=W({"--width":`${l}px`},u),$e=g===fa.LEFT,Xe=g===fa.RIGHT;if($e||Xe){let bt=$e?"left":"right";_&&(bt=$e?"right":"left"),Ke[bt]=m}return Me>1&&(Ke.height=`calc(var(--height) * ${Me})`,Ke.zIndex=5),Ke},[l,p,u,m,g,_,Me]);if(y.useEffect(()=>{if(!X||q===Zn.Edit)return;const Ke=Pf(L.current.rootElementRef.current);if(ee.current&&!ee.current.contains(Ke.activeElement)){const $e=ee.current.querySelector('[tabindex="0"]'),Xe=me.current||$e||ee.current;if(xEt())Xe.focus({preventScroll:!0});else{const bt=L.current.getScrollPosition();Xe.focus(),L.current.scroll(bt)}}},[X,q,L]),Oe)return $.jsx("div",{"data-colindex":s,role:"presentation",style:W({width:"var(--width)"},We)});if(z===Hq)return null;let Ve=N.onFocus,Qe,ut;if(i===null&&r.renderCell&&(Qe=r.renderCell(z)),i!==null&&r.renderEditCell){const Ke=L.current.getRowWithUpdatedValues(o,r.field),$e=At(i,jEt),Xe=r.valueFormatter?r.valueFormatter(i.value,Ke,r,L):z.formattedValue,bt=W({},z,{row:Ke,formattedValue:Xe},$e);Qe=r.renderEditCell(bt),re.push(se["cell--editing"]),re.push(pe==null?void 0:pe["cell--editing"])}if(Qe===void 0){const Ke=fe==null?void 0:fe.toString();Qe=Ke,ut=Ke}y.isValidElement(Qe)&&K&&(Qe=y.cloneElement(Qe,{focusElementRef:me}));const nt=f?null:{onDragEnter:Te("cellDragEnter",I),onDragOver:Te("cellDragOver",R)};return $.jsx("div",W({ref:ce,className:de(Re.root,re,c),role:"gridcell","data-field":D,"data-colindex":s,"aria-colindex":s+1,"aria-colspan":d,"aria-rowspan":Me,style:We,title:ut,tabIndex:te,onClick:Te("cellClick",S),onDoubleClick:Te("cellDoubleClick",P),onMouseOver:Te("cellMouseOver",O),onMouseDown:ye("cellMouseDown"),onMouseUp:_e("cellMouseUp"),onKeyDown:Te("cellKeyDown",k),onKeyUp:Te("cellKeyUp",A)},nt,N,{onFocus:Ve,children:Qe}))}),VEt=op(zEt),HEt=["label","icon","showInMenu","onClick"],UEt=["label","icon","showInMenu","onClick","closeMenuOnClick","closeMenu"],gP=y.forwardRef((e,t)=>{var u;const n=xt();if(!e.showInMenu){const{label:d,icon:f,onClick:p}=e,m=At(e,HEt),g=v=>{p==null||p(v)};return $.jsx(n.slots.baseIconButton,W({ref:t,size:"small",role:"menuitem","aria-label":d},m,{onClick:g},(u=n.slotProps)==null?void 0:u.baseIconButton,{children:y.cloneElement(f,{fontSize:"small"})}))}const{label:r,icon:o,onClick:i,closeMenuOnClick:a=!0,closeMenu:s}=e,l=At(e,UEt),c=d=>{i==null||i(d),a&&(s==null||s())};return $.jsxs(Yt,W({ref:t},l,{onClick:c,children:[o&&$.jsx(Gi,{children:o}),r]}))}),WEt=["field","type","align","width","height","empty","style","className"],Uq="1.3em",GEt="1.2em",Wq=[40,80],qEt={number:[40,60],string:[40,80],date:[40,60],dateTime:[60,80],singleSelect:[40,80]},KEt=e=>{const{align:t,classes:n,empty:r}=e,o={root:["cell","cellSkeleton",`cell--text${t?p1(t):"Left"}`,r&&"cellEmpty"]};return vn(o,bn,n)},YEt=fCt(12345);function XEt(e){const{field:t,type:n,align:r,width:o,height:i,empty:a=!1,style:s,className:l}=e,c=At(e,WEt),d={classes:xt().classes,align:r,empty:a},f=KEt(d),p=y.useMemo(()=>{if(n==="boolean"||n==="actions")return{variant:"circular",width:Uq,height:Uq};const[g,v]=n?qEt[n]??Wq:Wq;return{variant:"text",width:`${Math.round(YEt(g,v))}%`,height:GEt}},[n]);return $.jsx("div",W({"data-field":t,className:de(f.root,l),style:W({height:i,maxWidth:o,minWidth:o},s)},c,{children:!a&&$.jsx(BP,W({},p))}))}const QEt=op(XEt);function JEt(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?Vu(mt(e.palette.divider,1),.88):zu(mt(e.palette.divider,1),.68)}const Gq={[`& .${se.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${se.menuIcon}`]:{width:"auto",visibility:"visible"}},ZEt=10,yP=-5,sg=1,qq={width:3,rx:1.5,x:10.5},eOt="/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */",tOt=oe("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${se.autoHeight}`]:t.autoHeight},{[`&.${se.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${se["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${se["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${se["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${se.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${se["root--disableUserSelection"]} .${se.cell}`]:t["root--disableUserSelection"]},{[`&.${se.autosizing}`]:t.autosizing},{[`& .${se.editBooleanCell}`]:t.editBooleanCell},{[`& .${se.cell}`]:t.cell},{[`& .${se["cell--editing"]}`]:t["cell--editing"]},{[`& .${se["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${se["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${se["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${se["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${se["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${se["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${se["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${se["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${se.cellCheckbox}`]:t.cellCheckbox},{[`& .${se.cellSkeleton}`]:t.cellSkeleton},{[`& .${se.checkboxInput}`]:t.checkboxInput},{[`& .${se["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${se["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${se["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${se["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${se["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${se["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${se["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${se["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${se["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${se.columnHeader}`]:t.columnHeader},{[`& .${se.headerFilterRow}`]:t.headerFilterRow},{[`& .${se.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${se.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${se.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${se["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${se["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${se.columnSeparator}`]:t.columnSeparator},{[`& .${se.filterIcon}`]:t.filterIcon},{[`& .${se.iconSeparator}`]:t.iconSeparator},{[`& .${se.menuIcon}`]:t.menuIcon},{[`& .${se.menuIconButton}`]:t.menuIconButton},{[`& .${se.menuOpen}`]:t.menuOpen},{[`& .${se.menuList}`]:t.menuList},{[`& .${se["row--editable"]}`]:t["row--editable"]},{[`& .${se["row--editing"]}`]:t["row--editing"]},{[`& .${se["row--dragging"]}`]:t["row--dragging"]},{[`& .${se.row}`]:t.row},{[`& .${se.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${se.rowReorderCell}`]:t.rowReorderCell},{[`& .${se["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${se.sortIcon}`]:t.sortIcon},{[`& .${se.withBorderColor}`]:t.withBorderColor},{[`& .${se.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${se.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${se.treeDataGroupingCellLoadingContainer}`]:t.treeDataGroupingCellLoadingContainer},{[`& .${se.groupingCriteriaCellLoadingContainer}`]:t.groupingCriteriaCellLoadingContainer},{[`& .${se.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${se["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{var k,A;const t=xl(),n=Ye(t,li),r=JEt(e),o=e.shape.borderRadius,i=e.vars?e.vars.palette.background.default:((k=e.mixins.MuiDataGrid)==null?void 0:k.containerBackground)??e.palette.background.default,a=((A=e.mixins.MuiDataGrid)==null?void 0:A.pinnedBackground)??i,s=e.vars?`rgba(${e.vars.palette.background.defaultChannel} / ${e.vars.palette.action.disabledOpacity})`:mt(e.palette.background.default,e.palette.action.disabledOpacity),l=(e.vars||e).palette.action.hoverOpacity,c=(e.vars||e).palette.action.hover,u=(e.vars||e).palette.action.selectedOpacity,d=e.vars?`calc(${l} + ${u})`:l+u,f=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${u})`:mt(e.palette.primary.main,u),p=e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${d})`:mt(e.palette.primary.main,d),m=e.vars?oOt:nOt,g=I=>({[`& .${se["cell--pinnedLeft"]}, & .${se["cell--pinnedRight"]}`]:{backgroundColor:I,"&.Mui-selected":{backgroundColor:m(I,f,u),"&:hover":{backgroundColor:m(I,f,d)}}}}),v=m(a,c,l),w=g(v),x=m(a,f,u),S=g(x),P=m(a,p,d),T=g(P),E={backgroundColor:f,"&:hover":{backgroundColor:p,"@media (hover: none)":{backgroundColor:f}}};return W({"--unstable_DataGrid-radius":typeof o=="number"?`${o}px`:o,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackground":s,"--DataGrid-containerBackground":i,"--DataGrid-pinnedBackground":a,"--DataGrid-rowBorderColor":r,"--DataGrid-cellOffsetMultiplier":2,"--DataGrid-width":"0px","--DataGrid-hasScrollX":"0","--DataGrid-hasScrollY":"0","--DataGrid-scrollbarSize":"10px","--DataGrid-rowWidth":"0px","--DataGrid-columnsTotalWidth":"0px","--DataGrid-leftPinnedWidth":"0px","--DataGrid-rightPinnedWidth":"0px","--DataGrid-headerHeight":"0px","--DataGrid-headersTotalHeight":"0px","--DataGrid-topContainerHeight":"0px","--DataGrid-bottomContainerHeight":"0px",flex:1,boxSizing:"border-box",position:"relative",borderWidth:"1px",borderStyle:"solid",borderColor:r,borderRadius:"var(--unstable_DataGrid-radius)",color:(e.vars||e).palette.text.primary},e.typography.body2,{outline:"none",height:"100%",display:"flex",minWidth:0,minHeight:0,flexDirection:"column",overflow:"hidden",overflowAnchor:"none",[`.${se.main} > *:first-child${eOt}`]:{borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"},[`&.${se.autoHeight}`]:{height:"auto"},[`&.${se.autosizing}`]:{[`& .${se.columnHeaderTitleContainerContent} > *`]:{overflow:"visible !important"},"@media (hover: hover)":{[`& .${se.iconButtonContainer}`]:{width:"0 !important",visibility:"hidden !important"},[`& .${se.menuIcon}`]:{width:"0 !important",visibility:"hidden !important"}},[`& .${se.cell}`]:{overflow:"visible !important",whiteSpace:"nowrap",minWidth:"max-content !important",maxWidth:"max-content !important"},[`& .${se.groupingCriteriaCell}`]:{width:"unset"},[`& .${se.treeDataGroupingCell}`]:{width:"unset"}},[`& .${se.columnHeader}, & .${se.cell}`]:{WebkitTapHighlightColor:"transparent",padding:"0 10px",boxSizing:"border-box"},[`& .${se.columnHeader}:focus-within, & .${se.cell}:focus-within`]:{outline:`solid ${e.vars?`rgba(${e.vars.palette.primary.mainChannel} / 0.5)`:mt(e.palette.primary.main,.5)} ${sg}px`,outlineOffset:sg*-1},[`& .${se.columnHeader}:focus, & .${se.cell}:focus`]:{outline:`solid ${e.palette.primary.main} ${sg}px`,outlineOffset:sg*-1},[`& .${se.columnHeader}:focus, & .${se["columnHeader--withLeftBorder"]}, & .${se["columnHeader--withRightBorder"]}, & .${se["columnHeader--siblingFocused"]}, & .${se["virtualScroller--hasScrollX"]} .${se["columnHeader--lastUnpinned"]}, & .${se["virtualScroller--hasScrollX"]} .${se["columnHeader--last"]} - `]:{[`& .${se.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${se["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${se["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${se["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${se["root--noToolbar"]} [aria-rowindex="1"] .${se["columnHeader--last"]}`]:{borderTopRightRadius:n.hasScrollX&&(!n.hasScrollY||n.scrollbarSize===0)?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${se.columnHeaderCheckbox}, & .${se.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${se.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${se["virtualScroller--hasScrollX"]} .${se["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${se["columnHeader--sorted"]} .${se.iconButtonContainer}, & .${se["columnHeader--filtered"]} .${se.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${se.columnHeader}:not(.${se["columnHeader--sorted"]}) .${se.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${se.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${se.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${se["columnHeader--filledGroup"]} .${se.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${se.sortIcon}, & .${se.filterIcon}`]:{fontSize:"inherit"},[`& .${se["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${se["columnHeader--alignCenter"]} .${se.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${se["columnHeader--alignRight"]} .${se.columnHeaderDraggableContainer}, & .${se["columnHeader--alignRight"]} .${se.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${se["columnHeader--alignCenter"]} .${se.menuIcon}`]:{marginLeft:"auto"},[`& .${se["columnHeader--alignRight"]} .${se.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${se["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${se["columnHeader--pinnedLeft"]}, & .${se["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${se.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:IEt,color:r},[`& .${se.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${se.columnHeader}:hover`]:Dq,[`& .${se.columnHeader}:not(.${se["columnHeader--sorted"]}):hover .${se.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${se.columnHeader}`]:Dq,[`& .${se.columnHeader}:focus, - & .${se["columnHeader--siblingFocused"]}`]:{[`.${se["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${se["columnSeparator--sideLeft"]}`]:{left:sP},[`& .${se["columnSeparator--sideRight"]}`]:{right:sP},[`& .${se["columnHeader--withRightBorder"]} .${se["columnSeparator--sideLeft"]}`]:{left:sP-.5},[`& .${se["columnHeader--withRightBorder"]} .${se["columnSeparator--sideRight"]}`]:{right:sP-.5},[`& .${se["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${se["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${se.iconSeparator} rect`]:Nq},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${se.iconSeparator} rect`]:Nq}},"& svg":{pointerEvents:"none"}},[`& .${se.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${se.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${se.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${se.headerFilterRow}`]:{[`& .${se.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${se["row--borderBottom"]} .${se.columnHeader}, + `]:{[`& .${se.columnSeparator}`]:{opacity:0},"@media (hover: none)":{[`& .${se["columnSeparator--resizable"]}`]:{opacity:1}},[`& .${se["columnSeparator--resizable"]}:hover`]:{opacity:1}},[`&.${se["root--noToolbar"]} [aria-rowindex="1"] [aria-colindex="1"]`]:{borderTopLeftRadius:"calc(var(--unstable_DataGrid-radius) - 1px)"},[`&.${se["root--noToolbar"]} [aria-rowindex="1"] .${se["columnHeader--last"]}`]:{borderTopRightRadius:n.hasScrollX&&(!n.hasScrollY||n.scrollbarSize===0)?"calc(var(--unstable_DataGrid-radius) - 1px)":void 0},[`& .${se.columnHeaderCheckbox}, & .${se.cellCheckbox}`]:{padding:0,justifyContent:"center",alignItems:"center"},[`& .${se.columnHeader}`]:{position:"relative",display:"flex",alignItems:"center"},[`& .${se["virtualScroller--hasScrollX"]} .${se["columnHeader--last"]}`]:{overflow:"hidden"},[`& .${se["columnHeader--sorted"]} .${se.iconButtonContainer}, & .${se["columnHeader--filtered"]} .${se.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${se.columnHeader}:not(.${se["columnHeader--sorted"]}) .${se.sortIcon}`]:{opacity:0,transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.shorter})},[`& .${se.columnHeaderTitleContainer}`]:{display:"flex",alignItems:"center",gap:e.spacing(.25),minWidth:0,flex:1,whiteSpace:"nowrap",overflow:"hidden"},[`& .${se.columnHeaderTitleContainerContent}`]:{overflow:"hidden",display:"flex",alignItems:"center"},[`& .${se["columnHeader--filledGroup"]} .${se.columnHeaderTitleContainer}`]:{borderBottomWidth:"1px",borderBottomStyle:"solid",boxSizing:"border-box"},[`& .${se.sortIcon}, & .${se.filterIcon}`]:{fontSize:"inherit"},[`& .${se["columnHeader--sortable"]}`]:{cursor:"pointer"},[`& .${se["columnHeader--alignCenter"]} .${se.columnHeaderTitleContainer}`]:{justifyContent:"center"},[`& .${se["columnHeader--alignRight"]} .${se.columnHeaderDraggableContainer}, & .${se["columnHeader--alignRight"]} .${se.columnHeaderTitleContainer}`]:{flexDirection:"row-reverse"},[`& .${se["columnHeader--alignCenter"]} .${se.menuIcon}`]:{marginLeft:"auto"},[`& .${se["columnHeader--alignRight"]} .${se.menuIcon}`]:{marginRight:"auto",marginLeft:-5},[`& .${se["columnHeader--moving"]}`]:{backgroundColor:(e.vars||e).palette.action.hover},[`& .${se["columnHeader--pinnedLeft"]}, & .${se["columnHeader--pinnedRight"]}`]:{position:"sticky",zIndex:4,background:"var(--DataGrid-pinnedBackground)"},[`& .${se.columnSeparator}`]:{position:"absolute",overflow:"hidden",zIndex:3,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",maxWidth:ZEt,color:r},[`& .${se.columnHeaders}`]:{width:"var(--DataGrid-rowWidth)"},"@media (hover: hover)":{[`& .${se.columnHeader}:hover`]:Gq,[`& .${se.columnHeader}:not(.${se["columnHeader--sorted"]}):hover .${se.sortIcon}`]:{opacity:.5}},"@media (hover: none)":{[`& .${se.columnHeader}`]:Gq,[`& .${se.columnHeader}:focus, + & .${se["columnHeader--siblingFocused"]}`]:{[`.${se["columnSeparator--resizable"]}`]:{color:(e.vars||e).palette.primary.main}}},[`& .${se["columnSeparator--sideLeft"]}`]:{left:yP},[`& .${se["columnSeparator--sideRight"]}`]:{right:yP},[`& .${se["columnHeader--withRightBorder"]} .${se["columnSeparator--sideLeft"]}`]:{left:yP-.5},[`& .${se["columnHeader--withRightBorder"]} .${se["columnSeparator--sideRight"]}`]:{right:yP-.5},[`& .${se["columnSeparator--resizable"]}`]:{cursor:"col-resize",touchAction:"none",[`&.${se["columnSeparator--resizing"]}`]:{color:(e.vars||e).palette.primary.main},"@media (hover: none)":{[`& .${se.iconSeparator} rect`]:qq},"@media (hover: hover)":{"&:hover":{color:(e.vars||e).palette.primary.main,[`& .${se.iconSeparator} rect`]:qq}},"& svg":{pointerEvents:"none"}},[`& .${se.iconSeparator}`]:{color:"inherit",transition:e.transitions.create(["color","width"],{duration:e.transitions.duration.shortest})},[`& .${se.menuIcon}`]:{width:0,visibility:"hidden",fontSize:20,marginRight:-5,display:"flex",alignItems:"center"},[`.${se.menuOpen}`]:{visibility:"visible",width:"auto"},[`& .${se.headerFilterRow}`]:{[`& .${se.columnHeader}`]:{boxSizing:"border-box",borderBottom:"1px solid var(--DataGrid-rowBorderColor)"}},[`& .${se["row--borderBottom"]} .${se.columnHeader}, & .${se["row--borderBottom"]} .${se.filler}, - & .${se["row--borderBottom"]} .${se.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${se["row--borderBottom"]} .${se.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${se.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${se["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${se.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":E},[`& .${se["container--top"]}, & .${se["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${se.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":E},[`& .${se["virtualScrollerContent--overflowed"]} .${se["row--lastVisible"]} .${se.cell}`]:{borderTopColor:"transparent"},[`& .${se["pinnedRows--top"]} :first-of-type`]:{[`& .${se.cell}, .${se.scrollbarFiller}`]:{borderTop:"none"}},[`&.${se["root--disableUserSelection"]} .${se.cell}`]:{userSelect:"none"},[`& .${se["row--dynamicHeight"]} > .${se.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${se.cellEmpty}`]:{padding:0,height:"unset"},[`& .${se.cell}.${se["cell--selectionMode"]}`]:{cursor:"default"},[`& .${se.cell}.${se["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`${Jm}px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:Jm*-1}},[`& .${se["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${se["row--editing"]} .${se.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${se.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${se.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${se.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${se.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${se.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${se["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${se.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${se.withBorderColor}`]:{borderColor:r},[`& .${se["cell--withLeftBorder"]}, & .${se["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${se["cell--withRightBorder"]}, & .${se["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${se["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${se["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${se["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${se["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${se["cell--pinnedLeft"]}, & .${se["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:x}},[`& .${se.virtualScrollerContent} .${se.row}`]:{"&:hover":w,"&.Mui-selected":S,"&.Mui-selected:hover":T},[`& .${se.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${se.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${se.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${se.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${se["columnHeader--dragging"]}, & .${se["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${se["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${se.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${se.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${se.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${se.treeDataGroupingCellLoadingContainer}, .${se.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${se.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${se.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${se.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${se["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${se["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${se["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${se.filler}`]:{flex:"1 0 auto"},[`& .${se["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${se["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${se.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${se["scrollbar--vertical"]}, & .${se.pinnedRows}, & .${se.virtualScroller} > .${se.filler}`]:{display:"none"}}})});function AEt(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=Nc(e),a=Nc(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return uS({type:"rgb",values:s})}const $Et=e=>`rgb(from ${e} r g b / 1)`;function REt(e,t,n){return`color-mix(in srgb,${e}, ${$Et(t)} calc(${n} * 100%))`}const _Et=["className"],DEt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${r1(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return gn(i,yn,r)},NEt=y.forwardRef(function(t,n){const r=xt(),{className:o}=t,i=At(t,_Et),a=yl(),s=Ye(a,_g),l=a.current.rootElementRef,c=im(l,n),u=r,d=DEt(u,s),[f,h]=y.useState(!1);return $o(()=>{h(!0)},[]),f?$.jsx(MEt,W({ref:c,className:fe(d.root,o),ownerState:u},i)):null}),LEt=["className"],FEt=e=>{const{classes:t}=e;return gn({root:["footerContainer","withBorderColor"]},yn,t)},jEt=Xn("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),BEt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,LEt),i=xt(),a=FEt(i);return $.jsx(jEt,W({ref:n,className:fe(a.root,r),ownerState:i},o))}),zEt=["className"],VEt=e=>{const{classes:t}=e;return gn({root:["overlay"]},yn,t)},HEt=Xn("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),Fz=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,zEt),i=xt(),a=VEt(i);return $.jsx(HEt,W({ref:n,className:fe(a.root,r),ownerState:i},o))}),UEt=e=>{const{classes:t,open:n}=e;return gn({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},yn,t)},WEt=y.memo(e=>{var d,f;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=hn(),s=xt(),l=W({},e,{classes:s.classes}),c=UEt(l),u=y.useCallback(h=>{h.preventDefault(),h.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]);return $.jsx("div",{className:c.root,children:$.jsx(s.slots.baseTooltip,W({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(d=s.slotProps)==null?void 0:d.baseTooltip,{children:$.jsx(s.slots.baseIconButton,W({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(f=s.slotProps)==null?void 0:f.baseIconButton,{children:$.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function GEt({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=hn(),c=l.current.getColumn(o),u=wr(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||l.current.hideColumnMenu()});return!a||!c?null:$.jsx(zle,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:$.jsx(n,W({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}const qEt=["className","aria-label"],KEt=e=>{const{classes:t}=e;return gn({root:["columnHeaderTitle"]},yn,t)},YEt=Xn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),XEt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,qEt),i=xt(),a=KEt(i);return $.jsx(YEt,W({ref:n,className:fe(a.root,r),ownerState:i},o))});function QEt(e){var l;const{label:t,description:n}=e,r=xt(),o=y.useRef(null),[i,a]=y.useState(""),s=y.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=QTt(o.current);a(c?t:"")}},[n,t]);return $.jsx(r.slots.baseTooltip,W({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:$.jsx(XEt,{onMouseOver:s,ref:o,children:t})}))}const JEt=["resizable","resizing","height","side"];var jz=function(e){return e.Left="left",e.Right="right",e}(jz||{});const ZEt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${r1(o)}`],icon:["iconSeparator"]};return gn(i,yn,r)};function eOt(e){const{height:t,side:n=jz.Right}=e,r=At(e,JEt),o=xt(),i=W({},e,{side:n,classes:o.classes}),a=ZEt(i),s=y.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return $.jsx("div",W({className:a.root,style:{minHeight:t}},r,{onClick:s,children:$.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const tOt=y.memo(eOt),nOt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],Ece=y.forwardRef(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:h,width:m,columnMenuIconButton:g=null,columnMenu:v=null,columnTitleIconButtons:w=null,headerClassName:x,label:S,resizable:P,draggableContainerProps:T,columnHeaderSeparatorProps:E,style:O}=t,k=At(t,nOt),A=yl(),I=xt(),R=y.useRef(null),N=im(R,n);let L="none";return s!=null&&(L=s==="asc"?"ascending":"descending"),y.useLayoutEffect(()=>{var _;const B=A.current.state.columnMenu;if(l&&!B.open){const z=R.current.querySelector('[tabindex="0"]')||R.current;z==null||z.focus(),(_=A.current.columnHeadersContainerRef)!=null&&_.current&&(A.current.columnHeadersContainerRef.current.scrollLeft=0)}},[A,l]),$.jsxs("div",W({ref:N,className:fe(r.root,x),style:W({},O,{height:i,width:m}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":L},k,{children:[$.jsxs("div",W({className:r.draggableContainer,draggable:d,role:"presentation"},T,{children:[$.jsxs("div",{className:r.titleContainer,role:"presentation",children:[$.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:$.jsx(QEt,{label:S,description:h,columnWidth:m})}),w]}),g]})),$.jsx(tOt,W({resizable:!I.disableColumnResize&&!!P,resizing:a,height:i,side:u},E)),v]}))}),rOt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=o!=null,f=s!=null&&s>0,h=t.type==="number",m={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",f&&"columnHeader--filtered",h&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return gn(m,yn,n)};function oOt(e){var le,re,de;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:h,style:m,pinnedPosition:g,indexInSection:v,sectionLength:w,gridHasFiller:x}=e,S=yl(),P=xt(),T=y.useRef(null),E=go(),O=go(),k=y.useRef(null),[A,I]=y.useState(n),R=y.useMemo(()=>!P.disableColumnReorder&&!f&&!t.disableReorder,[P.disableColumnReorder,f,t.disableReorder]);let N;t.renderHeader&&(N=t.renderHeader(S.current.getColumnHeaderParams(t.field)));const L=fM(g,v),B=dM(g,v,w,P.showColumnVerticalBorder,x),_=W({},e,{classes:P.classes,showRightBorder:B,showLeftBorder:L}),D=rOt(_),z=y.useCallback(ee=>ce=>{c1(ce)||S.current.publishEvent(ee,S.current.getColumnHeaderParams(t.field),ce)},[S,t.field]),F=y.useMemo(()=>({onClick:z("columnHeaderClick"),onContextMenu:z("columnHeaderContextMenu"),onDoubleClick:z("columnHeaderDoubleClick"),onMouseOver:z("columnHeaderOver"),onMouseOut:z("columnHeaderOut"),onMouseEnter:z("columnHeaderEnter"),onMouseLeave:z("columnHeaderLeave"),onKeyDown:z("columnHeaderKeyDown"),onFocus:z("columnHeaderFocus"),onBlur:z("columnHeaderBlur")}),[z]),H=y.useMemo(()=>R?{onDragStart:z("columnHeaderDragStart"),onDragEnter:z("columnHeaderDragEnter"),onDragOver:z("columnHeaderDragOver"),onDragEnd:z("columnHeaderDragEnd")}:{},[R,z]),U=y.useMemo(()=>({onMouseDown:z("columnSeparatorMouseDown"),onDoubleClick:z("columnSeparatorDoubleClick")}),[z]);y.useEffect(()=>{A||I(n)},[A,n]);const q=y.useCallback(()=>{I(!1)},[]),Y=!P.disableColumnMenu&&!t.disableColumnMenu&&$.jsx(WEt,{colDef:t,columnMenuId:E,columnMenuButtonId:O,open:A,iconButtonRef:k}),ae=$.jsx(GEt,{columnMenuId:E,columnMenuButtonId:O,field:t.field,open:n,target:k.current,ContentComponent:P.slots.columnMenu,contentComponentProps:(le=P.slotProps)==null?void 0:le.columnMenu,onExited:q}),Z=t.sortingOrder??P.sortingOrder,K=(t.sortable||s!=null)&&!t.hideSortIcons&&!P.disableColumnSorting,te=$.jsxs(y.Fragment,{children:[!P.disableColumnFilter&&$.jsx(P.slots.columnHeaderFilterIconButton,W({field:t.field,counter:c},(re=P.slotProps)==null?void 0:re.columnHeaderFilterIconButton)),K&&$.jsx(P.slots.columnHeaderSortIcon,W({field:t.field,direction:s,index:l,sortingOrder:Z,disabled:!t.sortable},(de=P.slotProps)==null?void 0:de.columnHeaderSortIcon))]});y.useLayoutEffect(()=>{var ce;const ee=S.current.state.columnMenu;if(u&&!ee.open){const we=T.current.querySelector('[tabindex="0"]')||T.current;we==null||we.focus(),(ce=S.current.columnHeadersContainerRef)!=null&&ce.current&&(S.current.columnHeadersContainerRef.current.scrollLeft=0)}},[S,u]);const pe=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,ie=t.headerName??t.field;return $.jsx(Ece,W({ref:T,classes:D,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:h,isDraggable:R,headerComponent:N,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:Y,columnTitleIconButtons:te,headerClassName:fe(pe,a&&se["columnHeader--last"]),label:ie,resizable:!P.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:ae,draggableContainerProps:H,columnHeaderSeparatorProps:U,style:m},F))}const iOt=Xf(oOt),aOt=["className"],sOt=e=>{const{classes:t}=e;return gn({root:["iconButtonContainer"]},yn,t)},lOt=Xn("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),Oce=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,aOt),i=xt(),a=sOt(i);return $.jsx(lOt,W({ref:n,className:fe(a.root,r),ownerState:i},o))}),cOt=["direction","index","sortingOrder","disabled"],uOt=e=>{const{classes:t}=e;return gn({icon:["sortIcon"]},yn,t)};function dOt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?$.jsx(o,W({fontSize:"small",className:n},i)):null}function fOt(e){var f;const{direction:t,index:n,sortingOrder:r,disabled:o}=e,i=At(e,cOt),a=hn(),s=xt(),l=W({},e,{classes:s.classes}),c=uOt(l),u=dOt(s.slots,t,c.icon,r);if(!u)return null;const d=$.jsx(s.slots.baseIconButton,W({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},(f=s.slotProps)==null?void 0:f.baseIconButton,i,{children:u}));return $.jsxs(Oce,{children:[n!=null&&$.jsx(s.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const pOt=y.memo(fOt),hOt=e=>{const{classes:t}=e;return gn({icon:["filterIcon"]},yn,t)};function mOt(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=hn(),i=xt(),a=W({},e,{classes:i.classes}),s=hOt(a),l=Ye(o,qx),c=go(),u=go(),d=y.useCallback(v=>{v.preventDefault(),v.stopPropagation();const{open:w,openedPanelValue:x}=qx(o.current.state);w&&x===Ah.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,c),r&&r(o.current.getColumnHeaderParams(n),v)},[o,n,r,u,c]);if(!t)return null;const f=l.open&&l.labelId===c,h=$.jsx(i.slots.baseIconButton,W({id:c,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:$.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return $.jsx(i.slots.baseTooltip,W({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:$.jsxs(Oce,{children:[t>1&&$.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:h}),t===1&&h]})}))}const Lq=st($.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Fq=st($.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),jq=st($.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Bq=st($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),gOt=st($.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),zq=st($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),yOt=st($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");st($.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");st($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const vOt=st($.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),bOt=st($.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),wOt=st($.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),xOt=st($.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),SOt=st($.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),COt=st($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),kR=st($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Vq=st($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),POt=st($.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),TOt=st($.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),Hq=st($.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),EOt=st($.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),OOt=st($.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),IOt=st($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),kOt=st($.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),MOt=st($.jsx("g",{children:$.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),AOt=st($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");st($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const $Ot=st($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function Ice(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const uO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",ROt=e=>!!e.key,_Ot=e=>e==="Tab"||e==="Escape";function kce(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function DOt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const NOt=["hideMenu","colDef","id","labelledby","className","children","open"],LOt=oe(xS)(()=>({minWidth:248})),FOt=y.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=At(t,NOt),u=y.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),_Ot(d.key)&&r(d)},[r]);return $.jsx(LOt,W({id:o,ref:n,className:fe(se.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{children:s}))}),jOt=["displayOrder"],BOt=e=>{const t=yl(),n=xt(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=y.useMemo(()=>W({},r,i),[r,i]),d=y.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const m=W({},a);return Object.entries(o).forEach(([g,v])=>{m[g]=W({},v,a[g]||{})}),m},[o,a]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),h=y.useMemo(()=>{const m=Object.keys(r);return Object.keys(i).filter(g=>!m.includes(g))},[i,r]);return y.useMemo(()=>{const v=Array.from(new Set([...f,...h])).filter(w=>u[w]!=null).sort((w,x)=>{const S=d[w],P=d[x],T=Number.isFinite(S==null?void 0:S.displayOrder)?S.displayOrder:100,E=Number.isFinite(P==null?void 0:P.displayOrder)?P.displayOrder:100;return T-E});return v.reduce((w,x,S)=>{let P={colDef:l,onClick:s};const T=d[x];if(T){const E=At(T,jOt);P=W({},P,E)}return c&&S!==v.length-1?[...w,[u[x],P],[n.slots.baseDivider,{}]]:[...w,[u[x],P]]},[])},[c,l,f,s,u,d,h,n.slots.baseDivider])};function zOt(e){const{colDef:t,onClick:n}=e,r=hn(),o=xt(),s=yo(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=y.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:$.jsxs(Yt,{onClick:l,disabled:s,children:[$.jsx(Gi,{children:$.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),$.jsx(bo,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function VOt(e){const{onClick:t}=e,n=hn(),r=xt(),o=y.useCallback(i=>{t(i),n.current.showPreferences(Ah.columns)},[n,t]);return r.disableColumnSelector?null:$.jsxs(Yt,{onClick:o,children:[$.jsx(Gi,{children:$.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),$.jsx(bo,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function HOt(e){return $.jsxs(y.Fragment,{children:[$.jsx(zOt,W({},e)),$.jsx(VOt,W({},e))]})}function UOt(e){const{colDef:t,onClick:n}=e,r=hn(),o=xt(),i=y.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:$.jsxs(Yt,{onClick:i,children:[$.jsx(Gi,{children:$.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),$.jsx(bo,{children:r.current.getLocaleText("columnMenuFilter")})]})}function WOt(e){const{colDef:t,onClick:n}=e,r=hn(),o=Ye(r,Fs),i=xt(),a=y.useMemo(()=>{if(!t)return null;const u=o.find(d=>d.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=y.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,d===a?null:d)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(t):d};return $.jsxs(y.Fragment,{children:[s.includes("asc")&&a!=="asc"?$.jsxs(Yt,{onClick:l,"data-value":"asc",children:[$.jsx(Gi,{children:$.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),$.jsx(bo,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&a!=="desc"?$.jsxs(Yt,{onClick:l,"data-value":"desc",children:[$.jsx(Gi,{children:$.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),$.jsx(bo,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&a!=null?$.jsxs(Yt,{onClick:l,children:[$.jsx(Gi,{}),$.jsx(bo,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const GOt=["defaultSlots","defaultSlotProps","slots","slotProps"],qOt={columnMenuSortItem:WOt,columnMenuFilterItem:UOt,columnMenuColumnsItem:HOt},KOt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},YOt=y.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=At(t,GOt),l=BOt(W({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return $.jsx(FOt,W({ref:n},s,{children:l.map(([c,u],d)=>$.jsx(c,W({},u),d))}))}),XOt=y.forwardRef(function(t,n){return $.jsx(YOt,W({},t,{ref:n,defaultSlots:qOt,defaultSlotProps:KOt}))}),QOt=["className","slotProps"],JOt=e=>{const{classes:t}=e;return gn({root:["panelWrapper"]},yn,t)},ZOt=oe("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),eIt=()=>!0,Mce=y.forwardRef(function(t,n){const{className:r,slotProps:o={}}=t,i=At(t,QOt),a=xt(),s=JOt(a);return $.jsx(LF,W({open:!0,disableEnforceFocus:!0,isEnabled:eIt},o.TrapFocus,{children:$.jsx(ZOt,W({ref:n,tabIndex:-1,className:fe(s.root,r),ownerState:a},i))}))}),tIt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},nIt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,rIt=e=>{const{classes:t}=e;return gn({root:["columnsManagement"],header:["columnsManagementHeader"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},yn,t)},Uq=new Intl.Collator;function Ace(e){var L,B,_;const t=hn(),n=y.useRef(null),r=Ye(t,Xl),o=Jc(()=>Qs(t)).current,i=Ye(t,Qs),a=xt(),[s,l]=y.useState(""),c=rIt(a),{sort:u,searchPredicate:d=nIt,autoFocusSearchField:f=!0,disableShowHideToggle:h=!1,disableResetButton:m=!1,toggleAllMode:g="all",getTogglableColumns:v}=e,w=y.useMemo(()=>tIt(i,o),[i,o]),x=y.useMemo(()=>{switch(u){case"asc":return[...r].sort((D,z)=>Uq.compare(D.headerName||D.field,z.headerName||z.field));case"desc":return[...r].sort((D,z)=>-Uq.compare(D.headerName||D.field,z.headerName||z.field));default:return r}},[r,u]),S=D=>{const{name:z}=D.target;t.current.setColumnVisibility(z,i[z]===!1)},P=y.useMemo(()=>{const D=v?v(x):null,z=D?x.filter(({field:F})=>D.includes(F)):x;return s?z.filter(F=>d(F,s.toLowerCase())):z},[x,s,d,v]),T=y.useCallback(D=>{const z=Qs(t),F=W({},z),H=v?v(r):null;return(g==="filteredOnly"?P:r).forEach(U=>{U.hideable&&(H==null||H.includes(U.field))&&(D?delete F[U.field]:F[U.field]=!1)}),t.current.setColumnVisibilityModel(F)},[t,r,v,g,P]),E=y.useCallback(D=>{l(D.target.value)},[]),O=y.useMemo(()=>P.filter(D=>D.hideable),[P]),k=y.useMemo(()=>O.every(D=>i[D.field]==null||i[D.field]!==!1),[i,O]),A=y.useMemo(()=>O.every(D=>i[D.field]===!1),[i,O]),I=y.useRef(null);y.useEffect(()=>{f?n.current.focus():I.current&&typeof I.current.focus=="function"&&I.current.focus()},[f]);let R=!1;const N=D=>R===!1&&D.hideable!==!1?(R=!0,!0):!1;return $.jsxs(y.Fragment,{children:[$.jsx(iIt,{className:c.header,ownerState:a,children:$.jsx(a.slots.baseTextField,W({placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,value:s,onChange:E,variant:"outlined",size:"small",InputProps:{startAdornment:$.jsx(a.slots.baseInputAdornment,{position:"start",children:$.jsx(a.slots.quickFilterIcon,{})}),sx:{pl:1.5}},fullWidth:!0},(L=a.slotProps)==null?void 0:L.baseTextField))}),$.jsxs(oIt,{className:c.root,ownerState:a,children:[P.map(D=>{var z;return $.jsx(Dy,{className:c.row,control:$.jsx(a.slots.baseCheckbox,W({disabled:D.hideable===!1,checked:i[D.field]!==!1,onClick:S,name:D.field,sx:{p:.5},inputRef:N(D)?I:void 0},(z=a.slotProps)==null?void 0:z.baseCheckbox)),label:D.headerName||D.field},D.field)}),P.length===0&&$.jsx(sIt,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),(!h||!m)&&P.length>0?$.jsxs(aIt,{ownerState:a,className:c.footer,children:[h?$.jsx("span",{}):$.jsx(Dy,{control:$.jsx(a.slots.baseCheckbox,W({disabled:O.length===0,checked:k,indeterminate:!k&&!A,onClick:()=>T(!k),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},(B=a.slotProps)==null?void 0:B.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),m?null:$.jsx(a.slots.baseButton,W({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:w},(_=a.slotProps)==null?void 0:_.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const oIt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})(({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),iIt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})(({theme:e})=>({padding:e.spacing(1.5,3)})),aIt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})(({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`})),sIt=oe("div")(({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]}));function lIt(e){var n;const t=xt();return $.jsx(Mce,W({},e,{children:$.jsx(Ace,W({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const cIt=["children","className","classes"],uIt=Ple("MuiDataGrid",["panel","paper"]),dIt=oe(Ff,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),fIt=oe(co,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"})),pIt=y.forwardRef((e,t)=>{const{children:n,className:r}=e,o=At(e,cIt),i=hn(),a=xt(),s=uIt,[l,c]=y.useState(!1),u=y.useCallback(()=>{i.current.hidePreferences()},[i]),d=y.useCallback(g=>{g.key==="Escape"&&i.current.hidePreferences()},[i]),f=y.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[h,m]=y.useState(null);return y.useEffect(()=>{var v,w;const g=(w=(v=i.current.rootElementRef)==null?void 0:v.current)==null?void 0:w.querySelector('[data-id="gridPanelAnchor"]');g&&m(g)},[i]),h?$.jsx(dIt,W({ref:t,placement:"bottom-start",className:fe(s.panel,r),ownerState:a,anchorEl:h,modifiers:f},o,{children:$.jsx(NF,{mouseEvent:"onMouseUp",onClickAway:u,children:$.jsx(fIt,{className:s.paper,ownerState:a,elevation:8,onKeyDown:d,children:l&&n})})})):null}),hIt=["className"],mIt=e=>{const{classes:t}=e;return gn({root:["panelContent"]},yn,t)},gIt=Xn("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function yIt(e){const{className:t}=e,n=At(e,hIt),r=xt(),o=mIt(r);return $.jsx(gIt,W({className:fe(o.root,t),ownerState:r},n))}const vIt=["className"],bIt=e=>{const{classes:t}=e;return gn({root:["panelFooter"]},yn,t)},wIt=Xn("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function xIt(e){const{className:t}=e,n=At(e,vIt),r=xt(),o=bIt(r);return $.jsx(wIt,W({className:fe(o.root,t),ownerState:r},n))}const SIt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],CIt=["InputComponentProps"],PIt=e=>{const{classes:t}=e;return gn({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},yn,t)},TIt=oe("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),EIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),OIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),IIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),kIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),MIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),AIt=e=>{switch(e){case ji.And:return"filterPanelOperatorAnd";case ji.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},x0=e=>e.headerName||e.field,Wq=new Intl.Collator,Gq=y.forwardRef(function(t,n){var we,ge,Se,xe,Ie,Re,_e,ye,Te;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[ji.And,ji.Or],columnsSort:f,filterColumns:h,deleteIconProps:m={},logicOperatorInputProps:g={},operatorInputProps:v={},columnInputProps:w={},valueInputProps:x={},readOnly:S}=t,P=At(t,SIt),T=hn(),E=Ye(T,ud),O=Ye(T,Mle),k=Ye(T,ei),A=go(),I=go(),R=go(),N=go(),L=xt(),B=PIt(L),_=y.useRef(null),D=y.useRef(null),z=k.logicOperator??ji.And,F=o&&d.length>0,H=((we=L.slotProps)==null?void 0:we.baseFormControl)||{},q=(((ge=L.slotProps)==null?void 0:ge.baseSelect)||{}).native??!1,Y=((Se=L.slotProps)==null?void 0:Se.baseInputLabel)||{},ae=((xe=L.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:Z}=x,K=At(x,CIt),{filteredColumns:te,selectedField:pe}=y.useMemo(()=>{let Oe=r.field;const Me=E[r.field].filterable===!1?E[r.field]:null;if(Me)return{filteredColumns:[Me],selectedField:Oe};if(h===void 0||typeof h!="function")return{filteredColumns:O,selectedField:Oe};const Ue=h({field:r.field,columns:O,currentFilters:(k==null?void 0:k.items)||[]});return{filteredColumns:O.filter(ze=>{const Qe=Ue.includes(ze.field);return ze.field===r.field&&!Qe&&(Oe=void 0),Qe}),selectedField:Oe}},[h,k==null?void 0:k.items,O,r.field,E]),ie=y.useMemo(()=>{switch(f){case"asc":return te.sort((Oe,Me)=>Wq.compare(x0(Oe),x0(Me)));case"desc":return te.sort((Oe,Me)=>-Wq.compare(x0(Oe),x0(Me)));default:return te}},[te,f]),le=r.field?T.current.getColumn(r.field):null,re=y.useMemo(()=>{var Oe;return!r.operator||!le?null:(Oe=le.filterOperators)==null?void 0:Oe.find(Me=>Me.value===r.operator)},[r,le]),de=y.useCallback(Oe=>{const Me=Oe.target.value,Ue=T.current.getColumn(Me);if(Ue.field===le.field)return;const ze=Ue.filterOperators.find(nt=>nt.value===r.operator)||Ue.filterOperators[0];let ct=!ze.InputComponent||ze.InputComponent!==(re==null?void 0:re.InputComponent)||Ue.type!==le.type?void 0:r.value;if(Ue.type==="singleSelect"&&ct!==void 0){const nt=Ue,et=Mh(nt);Array.isArray(ct)?ct=ct.filter(yt=>lO(yt,et,nt==null?void 0:nt.getOptionValue)!==void 0):lO(r.value,et,nt==null?void 0:nt.getOptionValue)===void 0&&(ct=void 0)}a(W({},r,{field:Me,operator:ze.value,value:ct}))},[T,a,r,le,re]),ee=y.useCallback(Oe=>{const Me=Oe.target.value,Ue=le==null?void 0:le.filterOperators.find(Qe=>Qe.value===Me),ze=!(Ue!=null&&Ue.InputComponent)||(Ue==null?void 0:Ue.InputComponent)!==(re==null?void 0:re.InputComponent);a(W({},r,{operator:Me,value:ze?void 0:r.value}))},[a,r,le,re]),ce=y.useCallback(Oe=>{const Me=Oe.target.value===ji.And.toString()?ji.And:ji.Or;c(Me)},[c]),me=()=>{i(r)};return y.useImperativeHandle(u,()=>({focus:()=>{var Oe;re!=null&&re.InputComponent?(Oe=_==null?void 0:_.current)==null||Oe.focus():D.current.focus()}}),[re]),$.jsxs(TIt,W({ref:n,className:B.root,"data-id":r.id,ownerState:L},P,{children:[$.jsx(EIt,W({variant:"standard",as:L.slots.baseFormControl},H,m,{className:fe(B.deleteIcon,H.className,m.className),ownerState:L,children:$.jsx(L.slots.baseIconButton,W({"aria-label":T.current.getLocaleText("filterPanelDeleteIconLabel"),title:T.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:me,size:"small",disabled:S},(Ie=L.slotProps)==null?void 0:Ie.baseIconButton,{children:$.jsx(L.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),$.jsx(OIt,W({variant:"standard",as:L.slots.baseFormControl},H,g,{sx:[F?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},H.sx,g.sx],className:fe(B.logicOperatorInput,H.className,g.className),ownerState:L,children:$.jsx(L.slots.baseSelect,W({inputProps:{"aria-label":T.current.getLocaleText("filterPanelLogicOperator")},value:z??"",onChange:ce,disabled:!!l||d.length===1,native:q},(Re=L.slotProps)==null?void 0:Re.baseSelect,{children:d.map(Oe=>y.createElement(L.slots.baseSelectOption,W({},ae,{native:q,key:Oe.toString(),value:Oe.toString()}),T.current.getLocaleText(AIt(Oe))))}))})),$.jsxs(IIt,W({variant:"standard",as:L.slots.baseFormControl},H,w,{className:fe(B.columnInput,H.className,w.className),ownerState:L,children:[$.jsx(L.slots.baseInputLabel,W({},Y,{htmlFor:A,id:I,children:T.current.getLocaleText("filterPanelColumns")})),$.jsx(L.slots.baseSelect,W({labelId:I,id:A,label:T.current.getLocaleText("filterPanelColumns"),value:pe??"",onChange:de,native:q,disabled:S},(_e=L.slotProps)==null?void 0:_e.baseSelect,{children:ie.map(Oe=>y.createElement(L.slots.baseSelectOption,W({},ae,{native:q,key:Oe.field,value:Oe.field}),x0(Oe)))}))]})),$.jsxs(kIt,W({variant:"standard",as:L.slots.baseFormControl},H,v,{className:fe(B.operatorInput,H.className,v.className),ownerState:L,children:[$.jsx(L.slots.baseInputLabel,W({},Y,{htmlFor:R,id:N,children:T.current.getLocaleText("filterPanelOperator")})),$.jsx(L.slots.baseSelect,W({labelId:N,label:T.current.getLocaleText("filterPanelOperator"),id:R,value:r.operator,onChange:ee,native:q,inputRef:D,disabled:S},(ye=L.slotProps)==null?void 0:ye.baseSelect,{children:(Te=le==null?void 0:le.filterOperators)==null?void 0:Te.map(Oe=>y.createElement(L.slots.baseSelectOption,W({},ae,{native:q,key:Oe.value,value:Oe.value}),Oe.label||T.current.getLocaleText(`filterOperator${r1(Oe.value)}`)))}))]})),$.jsx(MIt,W({variant:"standard",as:L.slots.baseFormControl},H,K,{className:fe(B.valueInput,H.className,K.className),ownerState:L,children:re!=null&&re.InputComponent?$.jsx(re.InputComponent,W({apiRef:T,item:r,applyValue:a,focusElementRef:_,disabled:S},re.InputComponentProps,Z),r.field):null}))]}))}),$It=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],qq=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),RIt=y.forwardRef(function(t,n){var N,L;const r=hn(),o=xt(),i=Ye(r,ei),a=Ye(r,Mle),s=Ye(r,P1t),l=y.useRef(null),c=y.useRef(null),{logicOperators:u=[ji.And,ji.Or],columnsSort:d,filterFormProps:f,getColumnForNewFilter:h,disableAddFilterButton:m=!1,disableRemoveAllButton:g=!1}=t,v=At(t,$It),w=r.current.upsertFilterItem,x=y.useCallback(B=>{r.current.setFilterLogicOperator(B)},[r]),S=y.useCallback(()=>{let B;if(h&&typeof h=="function"){const _=h({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(_===null)return null;B=a.find(({field:D})=>D===_)}else B=a.find(_=>{var D;return(D=_.filterOperators)==null?void 0:D.length});return B?qq(B):null},[i==null?void 0:i.items,a,h]),P=y.useCallback(()=>{if(h===void 0||typeof h!="function")return S();const B=i.items.length?i.items:[S()].filter(Boolean),_=h({currentFilters:B,columns:a});if(_===null)return null;const D=a.find(({field:z})=>z===_);return D?qq(D):null},[i.items,a,h,S]),T=y.useMemo(()=>i.items.length?i.items:(c.current||(c.current=S()),c.current?[c.current]:[]),[i.items,S]),E=T.length>1,{readOnlyFilters:O,validFilters:k}=y.useMemo(()=>T.reduce((B,_)=>(s[_.field]?B.validFilters.push(_):B.readOnlyFilters.push(_),B),{readOnlyFilters:[],validFilters:[]}),[T,s]),A=y.useCallback(()=>{const B=P();B&&r.current.upsertFilterItems([...T,B])},[r,P,T]),I=y.useCallback(B=>{const _=k.length===1;r.current.deleteFilterItem(B),_&&r.current.hideFilterPanel()},[r,k.length]),R=y.useCallback(()=>k.length===1&&k[0].value===void 0?(r.current.deleteFilterItem(k[0]),r.current.hideFilterPanel()):r.current.setFilterModel(W({},i,{items:O}),"removeAllFilterItems"),[r,O,i,k]);return y.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&x(u[0])},[u,x,i.logicOperator]),y.useEffect(()=>{k.length>0&&l.current.focus()},[k.length]),$.jsxs(Mce,W({ref:n},v,{children:[$.jsxs(yIt,{children:[O.map((B,_)=>$.jsx(Gq,W({item:B,applyFilterChanges:w,deleteFilter:I,hasMultipleFilters:E,showMultiFilterOperators:_>0,disableMultiFilterOperator:_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},f),B.id==null?_:B.id)),k.map((B,_)=>$.jsx(Gq,W({item:B,applyFilterChanges:w,deleteFilter:I,hasMultipleFilters:E,showMultiFilterOperators:O.length+_>0,disableMultiFilterOperator:O.length+_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:_===k.length-1?l:null,logicOperators:u,columnsSort:d},f),B.id==null?_+O.length:B.id))]}),!o.disableMultipleColumnsFiltering&&!(m&&g)?$.jsxs(xIt,{children:[m?$.jsx("span",{}):$.jsx(o.slots.baseButton,W({onClick:A,startIcon:$.jsx(o.slots.filterPanelAddIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!g&&k.length>0?$.jsx(o.slots.baseButton,W({onClick:R,startIcon:$.jsx(o.slots.filterPanelRemoveAllIcon,{})},(L=o.slotProps)==null?void 0:L.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),_It=["hideMenu","options"],DIt=["hideMenu","options"];function NIt(e){const t=hn(),{hideMenu:n,options:r}=e,o=At(e,_It);return $.jsx(Yt,W({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function LIt(e){const t=hn(),{hideMenu:n,options:r}=e,o=At(e,DIt);return $.jsx(Yt,W({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const FIt=["className","selectedRowCount"],jIt=e=>{const{classes:t}=e;return gn({root:["selectedRowCount"]},yn,t)},BIt=Xn("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),zIt=y.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=At(t,FIt),a=hn(),s=xt(),l=jIt(s),c=a.current.getLocaleText("footerRowSelected")(o);return $.jsx(BIt,W({ref:n,className:fe(l.root,r),ownerState:s},i,{children:c}))}),VIt=y.forwardRef(function(t,n){var d,f;const r=hn(),o=xt(),i=Ye(r,lCt),a=Ye(r,LCt),s=Ye(r,Mz),l=!o.hideFooterSelectedRowCount&&a>0?$.jsx(zIt,{selectedRowCount:a}):$.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?$.jsx(o.slots.footerRowCount,W({},(d=o.slotProps)==null?void 0:d.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&$.jsx(o.slots.pagination,W({},(f=o.slotProps)==null?void 0:f.pagination));return $.jsxs(BEt,W({ref:n},t,{children:[l,c,u]}))});function HIt(){var i,a;const e=hn(),t=Ye(e,Xl),n=xt(),r=Ye(e,qx),o=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Ah.filters);return $.jsx(n.slots.panel,W({as:n.slots.basePopper,open:t.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},(i=n.slotProps)==null?void 0:i.panel,(a=n.slotProps)==null?void 0:a.basePopper,{children:o}))}function UIt(){var t;const e=xt();return $.jsxs(y.Fragment,{children:[$.jsx(HIt,{}),e.slots.toolbar&&$.jsx(e.slots.toolbar,W({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const Bz=(e,t,n,r,o)=>{const i=o.hasScrollY?o.scrollbarSize:0;let a;switch(e){case ur.LEFT:a=r[n];break;case ur.RIGHT:a=o.columnsTotalWidth-r[n]-t+i;break;default:a=0;break}return a},S0={root:se.scrollbarFiller,header:se["scrollbarFiller--header"],borderTop:se["scrollbarFiller--borderTop"],borderBottom:se["scrollbarFiller--borderBottom"],pinnedRight:se["scrollbarFiller--pinnedRight"]};function zz({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return $.jsx("div",{role:"presentation",className:fe(S0.root,e&&S0.header,t&&S0.borderTop,n&&S0.borderBottom,r&&S0.pinnedRight)})}const WIt=Xn("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),GIt=e=>{const{classes:t}=e;return gn({root:["skeletonLoadingOverlay"]},yn,t)},Kq=e=>parseInt(e.getAttribute("data-colindex"),10),qIt=y.forwardRef(function(t,n){const r=xt(),{slots:o}=r,i=GIt({classes:r.classes}),a=y.useRef(null),s=im(a,n),l=hn(),c=Ye(l,li),u=(c==null?void 0:c.viewportInnerSize.height)??0,d=Math.ceil(u/c.rowHeight),f=Ye(l,Cz),h=Ye(l,Qf),m=y.useMemo(()=>h.filter(E=>E<=f).length,[f,h]),g=Ye(l,yo),v=y.useMemo(()=>g.slice(0,m),[g,m]),w=Ye(l,i1),x=y.useCallback((E,O,k)=>{const A=Bz(k,E,O,h,c);return{[k]:A}},[c,h]),S=y.useCallback(E=>{if(w.left.findIndex(O=>O.field===E)!==-1)return ur.LEFT;if(w.right.findIndex(O=>O.field===E)!==-1)return ur.RIGHT},[w.left,w.right]),P=y.useMemo(()=>{const E=[];for(let O=0;Ole.field===I.field):A-w.left.length,D=R&&x(I.computedWidth,A,R),z=c.columnsTotalWidth0},`skeleton-scrollbar-filler-${O}`))}E.push($.jsx("div",{className:fe(se.row,se.rowSkeleton,O===0&&se["row--firstVisible"]),children:k},`skeleton-row-${O}`))}return E},[o,v,w,d,r.showCellVerticalBorder,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,c.hasScrollY,c.scrollbarSize,S,x]);return ht(l,"columnResize",E=>{var D,z,F;const{colDef:O,width:k}=E,A=(D=a.current)==null?void 0:D.querySelectorAll(`[data-field="${dd(O.field)}"]`);if(!A)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const I=v.findIndex(H=>H.field===O.field),R=S(O.field),N=R===ur.LEFT,L=R===ur.RIGHT,B=getComputedStyle(A[0]).getPropertyValue("--width"),_=parseInt(B,10)-k;if(A&&A.forEach(H=>{H.style.setProperty("--width",`${k}px`)}),N){const H=(z=a.current)==null?void 0:z.querySelectorAll(`.${se["cell--pinnedLeft"]}`);H==null||H.forEach(U=>{Kq(U)>I&&(U.style.left=`${parseInt(getComputedStyle(U).left,10)-_}px`)})}if(L){const H=(F=a.current)==null?void 0:F.querySelectorAll(`.${se["cell--pinnedRight"]}`);H==null||H.forEach(U=>{Kq(U)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${eh.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${eh.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),ZIt=(e,t)=>({from:n,to:r,count:o,page:i})=>e({from:n,to:r,count:o,page:i,estimated:t}),ekt=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${n!==-1?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${n!==-1?n:`more than ${t}`}`,tkt=y.forwardRef(function(t,n){const r=hn(),o=xt(),i=Ye(r,Fi),a=Ye(r,Dg),s=Ye(r,oce),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=y.useMemo(()=>a===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,a]),f=y.useMemo(()=>Math.max(0,s-1),[s]),h=y.useMemo(()=>a===-1||i.page<=f?i.page:f,[f,i.page,a]),m=y.useCallback(P=>{const T=Number(P.target.value);r.current.setPageSize(T)},[r]),g=y.useCallback((P,T)=>{r.current.setPage(T)},[r]),w=(P=>{for(let T=0;T{const{classes:t}=e;return gn({root:["rowCount"]},yn,t)},okt=Xn("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),ikt=y.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=At(t,nkt),s=hn(),l=xt(),c=rkt(l);if(o===0)return null;const u=i=d.left.length&&g=m.lastColumnIndex,le=akt(B.classes,{root:["row",r&&"selected",K&&"row--editable",Z&&"row--editing",v&&"row--firstVisible",w&&"row--lastVisible",S&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),re=N.hooks.useGridRowAriaAttributes();y.useLayoutEffect(()=>{if(_.range){const nt=R.current.getRowIndexRelativeToVisibleRows(o);nt!==void 0&&R.current.unstable_setLastMeasuredRowIndex(nt)}if(L.current&&l==="auto")return R.current.observeRowHeight(L.current,o)},[R,_.range,l,o]);const de=y.useCallback((nt,et)=>yt=>{c1(yt)||R.current.getRow(o)&&(R.current.publishEvent(nt,R.current.getRowParams(o),yt),et&&et(yt))},[R,o]),ee=y.useCallback(nt=>{const et=cO(nt.target,se.cell),yt=et==null?void 0:et.getAttribute("data-field");if(yt){if(yt===wb.field||yt===rM||yt==="__reorder__"||R.current.getCellMode(o,yt)===Jn.Edit)return;const vn=R.current.getColumn(yt);if((vn==null?void 0:vn.type)===eM)return}de("rowClick",P)(nt)},[R,P,de,o]),{slots:ce,slotProps:me,disableColumnReorder:we}=B,ge=B.rowReordering,Se=Ye(R,()=>W({},R.current.getRowHeightEntry(o)),Ele),xe=y.useMemo(()=>{if(x)return{opacity:0,width:0,height:0};const nt=W({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(Se.spacingTop){const et=B.rowSpacingType==="border"?"borderTopWidth":"marginTop";nt[et]=Se.spacingTop}if(Se.spacingBottom){const et=B.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let yt=nt[et];typeof yt!="number"&&(yt=parseInt(yt||"0",10)),yt+=Se.spacingBottom,nt[et]=yt}return nt},[x,l,s,Se,B.rowSpacingType]),Ie=R.current.unstable_applyPipeProcessors("rowClassName",[],o),Re=q?re(q,a):void 0;if(typeof B.getRowClassName=="function"){const nt=a-(((ct=_.range)==null?void 0:ct.firstRowIndex)||0),et=W({},R.current.getRowParams(o),{isFirstVisible:nt===0,isLastVisible:nt===_.rows.length-1,indexRelativeToCurrentPage:nt});Ie.push(B.getRowClassName(et))}const _e=(nt,et,yt,vn,Ke=fa.NONE)=>{var gs;const $e=R.current.unstable_getCellColSpanInfo(o,yt);if($e!=null&&$e.spannedByColSpan)return null;const Xe=($e==null?void 0:$e.cellProps.width)??nt.computedWidth,bt=($e==null?void 0:$e.cellProps.colSpan)??1,zt=Bz(Tce[Ke],nt.computedWidth,yt,F,h);if((q==null?void 0:q.type)==="skeletonRow")return $.jsx(ce.skeletonCell,{type:nt.type,width:Xe,height:l,field:nt.field,align:nt.align},nt.field);const Ot=((gs=H[o])==null?void 0:gs[nt.field])??null,cn=nt.field==="__reorder__",Fn=Object.keys(H).length>0,Un=!(we||nt.disableReorder),Po=ge&&!D.length&&z<=1&&!Fn,qr=!(Un||cn&&Po),Ii=Ke===fa.VIRTUAL;return $.jsx(ce.cell,W({column:nt,width:Xe,rowId:o,align:nt.align||"left",colIndex:yt,colSpan:bt,disableDragEvents:qr,editCellState:Ot,isNotVisible:Ii,pinnedOffset:zt,pinnedPosition:Ke,sectionIndex:et,sectionLength:vn,gridHasFiller:ae},me==null?void 0:me.cell),nt.field)};if(!q)return null;const ye=d.left.map((nt,et)=>_e(nt,et,et,d.left.length,fa.LEFT)),Te=d.right.map((nt,et)=>{const yt=u.length-d.right.length+et;return _e(nt,et,yt,d.right.length,fa.RIGHT)}),Oe=u.length-d.left.length-d.right.length,Me=[];pe&&Me.push(_e(u[g],g-d.left.length,g,Oe,fa.VIRTUAL));for(let nt=m.firstColumnIndex;nt0&&$.jsx(lkt,{width:Qe}),Te.length>0&&$.jsx("div",{role:"presentation",className:se.filler}),Te,Y!==0&&$.jsx(zz,{pinnedRight:d.right.length>0})]}))}),ukt=Xf(ckt),dkt=()=>{const e=yl(),t=xt(),n=Ye(e,yo),r=Ye(e,kz),o=Ye(e,l1),i=Ye(e,fCt);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":Az(t)}},fkt=()=>{const e=yl(),t=Ye(e,Du),n=Ye(e,l1);return y.useCallback((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=t[r.id]!==void 0),i},[e,t,n])};function pkt({privateApiRef:e,configuration:t,props:n,children:r}){const o=y.useRef(e.current.getPublicApi());return $.jsx(yce.Provider,{value:t,children:$.jsx(xle.Provider,{value:n,children:$.jsx(fce.Provider,{value:e,children:$.jsx(wle.Provider,{value:o,children:r})})})})}const hkt=e=>{const t=y.useRef(null),n=y.useRef(null),r=y.useRef(null),o=y.useRef(null),i=y.useRef(null),a=y.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},mkt=e=>{const t=nr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=y.useRef(!0);y.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>W({},r,{isRtl:t}))},[e,t])},gkt=j1t()&&window.localStorage.getItem("DEBUG")!=null,W0=()=>{},ykt={debug:W0,info:W0,warn:W0,error:W0},Yq=["debug","info","warn","error"];function Xq(e,t,n=console){const r=Yq.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return Yq.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=W0,i),{})}const vkt=(e,t)=>{const n=y.useCallback(r=>gkt?Xq(r,"debug",t.logger):t.logLevel?Xq(r,t.logLevel.toString(),t.logger):ykt,[t.logLevel,t.logger]);Jt(e,{getLogger:n},"private")};class bkt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const $ce=Symbol("mui.api_private"),wkt=e=>e.isPropagationStopped!==void 0;let Qq=0;function xkt(e){var o;const t=(o=e.current)==null?void 0:o[$ce];if(t)return t;const n={},r={state:n,store:Vz.create(n),instanceId:{id:Qq}};return Qq+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,d=u[s];(d==null?void 0:d.spying)===!0?d.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new bkt}),r}function Skt(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[$ce]:e.current}}function Ckt(e,t){var a;const n=y.useRef(),r=y.useRef();r.current||(r.current=xkt(n)),n.current||(n.current=Skt(r));const o=y.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,wkt(u)&&u.isPropagationStopped())return;const d=t.signature===rl.DataGridPro||t.signature===rl.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,d)},[r,t.signature]),i=y.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return Jt(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),y.useImperativeHandle(e,()=>n.current,[n]),y.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const Pkt=(e,t)=>{const n=y.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};function Kx(e){"@babel/helpers - typeof";return Kx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kx(e)}function Tkt(e,t){if(Kx(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Kx(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Yx(e){var t=Tkt(e,"string");return Kx(t)=="symbol"?t:t+""}const Ekt=e=>{const t=y.useRef({}),n=y.useRef(!1),r=y.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=y.useCallback((u,d,f)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const h=t.current[u];return h.processors.get(d)!==f&&(h.processors.set(d,f),h.processorsAsArray=Array.from(t.current[u].processors.values()),r(h)),()=>{t.current[u].processors.delete(d),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=y.useCallback((u,d,f)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[d]=f,()=>{const h=t.current[u].appliers,m=At(h,[d].map(Yx));t.current[u].appliers=m}),[]),a=y.useCallback(u=>{r(t.current[u])},[r]),s=y.useCallback((...u)=>{const[d,f,h]=u;if(!t.current[d])return f;const m=t.current[d].processorsAsArray;let g=f;for(let v=0;v{const r=y.useRef(),o=y.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=y.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);s1(()=>{i()});const a=y.useRef(!0);y.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},Hz=(e,t,n)=>{const r=y.useRef(),o=y.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=y.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);s1(()=>{i()});const a=y.useRef(!0);y.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},dO=(e,t,n,r)=>{const o=y.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);s1(()=>{o()});const i=y.useRef(!0);y.useEffect(()=>{i.current?i.current=!1:o()},[o])},$h="none",Jq={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},Okt=e=>{const t=y.useRef(new Map),n=y.useRef({}),r=y.useCallback((l,c,u)=>{const d=()=>{const m=n.current[c],g=At(m,[l].map(Yx));n.current[c]=g};n.current[c]||(n.current[c]={});const f=n.current[c],h=f[l];return f[l]=u,!h||h===u||l===e.current.getActiveStrategy(Jq[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),d},[e]),o=y.useCallback((l,c)=>{const u=e.current.getActiveStrategy(Jq[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const f=d[u];return f(c)},[e]),i=y.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable());return(u==null?void 0:u[0])??$h},[]),a=y.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);Jt(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},Ikt=e=>{const t=y.useRef({}),[,n]=y.useState(),r=y.useCallback(c=>{t.current[c.stateId]=c},[]),o=y.useCallback((c,u)=>{let d;if(_le(c)?d=c(e.current.state):d=c,e.current.state===d)return!1;let f=!1;const h=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],v=g.stateSelector(e.current.state,e.current.instanceId),w=g.stateSelector(d,e.current.instanceId);w!==v&&(h.push({stateId:g.stateId,hasPropChanged:w!==g.propModel}),g.propModel!==void 0&&w!==g.propModel&&(f=!0))}),h.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${h[0].stateId}, therefore, you're not allowed to update ${h.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=d,e.current.publishEvent("stateChange",d),e.current.store.update(d)),h.length===1){const{stateId:m,hasPropChanged:g}=h[0],v=t.current[m],w=v.stateSelector(d,e.current.instanceId);v.propOnChange&&g&&v.propOnChange(w,{reason:u,api:e.current}),f||e.current.publishEvent(v.changeEvent,w,{reason:u})}return!f},[e]),i=y.useCallback((c,u,d)=>e.current.setState(f=>W({},f,{[c]:u(f[c])}),d),[e]),a=y.useCallback(()=>n(()=>e.current.state),[e]),s={setState:o,forceUpdate:a},l={updateControlState:i,registerControlState:r};Jt(e,s,"public"),Jt(e,l,"private")},kkt=(e,t)=>{const n=Ckt(e,t);return hkt(n),mkt(n),vkt(n,t),Ikt(n),Ekt(n),Okt(n),Pkt(n,t),n.current.register("private",{rootProps:t}),n},jo=(e,t,n)=>{const r=y.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function WN(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` -`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const Rce=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return WN(o,n)};class GN{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const Mkt=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new GN({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(Rce(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function Akt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((d,f)=>`${d}${Mkt({id:f,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r -`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(d=>d.field!==wb.field),l=[];if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let f=0;const h=s.reduce((m,g)=>{const v=i.current.getColumnGroupPath(g.field);return m[g.field]=v,f=Math.max(f,v.length),m},{});for(let m=0;m{const w=(h[v.field]||[])[m],x=d[w];g.addValue(x?x.headerName||x.groupId:"")})}}const c=new GN({csvOptions:r,sanitizeCellValue:WN});return s.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r + & .${se["row--borderBottom"]} .${se.scrollbarFiller}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${se["row--borderBottom"]} .${se.cell}`]:{borderBottom:"1px solid var(--rowBorderColor)"},[`.${se.row}`]:{display:"flex",width:"var(--DataGrid-rowWidth)",breakInside:"avoid","--rowBorderColor":"var(--DataGrid-rowBorderColor)",[`&.${se["row--firstVisible"]}`]:{"--rowBorderColor":"transparent"},"&:hover":{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${se.rowSkeleton}:hover`]:{backgroundColor:"transparent"},"&.Mui-selected":E},[`& .${se["container--top"]}, & .${se["container--bottom"]}`]:{"[role=row]":{background:"var(--DataGrid-containerBackground)"}},[`& .${se.cell}`]:{flex:"0 0 auto",height:"var(--height)",width:"var(--width)",lineHeight:"calc(var(--height) - 1px)",boxSizing:"border-box",borderTop:"1px solid var(--rowBorderColor)",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&.Mui-selected":E},[`& .${se["virtualScrollerContent--overflowed"]} .${se["row--lastVisible"]} .${se.cell}`]:{borderTopColor:"transparent"},[`& .${se["pinnedRows--top"]} :first-of-type`]:{[`& .${se.cell}, .${se.scrollbarFiller}`]:{borderTop:"none"}},[`&.${se["root--disableUserSelection"]} .${se.cell}`]:{userSelect:"none"},[`& .${se["row--dynamicHeight"]} > .${se.cell}`]:{whiteSpace:"initial",lineHeight:"inherit"},[`& .${se.cellEmpty}`]:{padding:0,height:"unset"},[`& .${se.cell}.${se["cell--selectionMode"]}`]:{cursor:"default"},[`& .${se.cell}.${se["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`${sg}px solid ${(e.vars||e).palette.primary.main}`,outlineOffset:sg*-1}},[`& .${se["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${se["row--editing"]} .${se.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${se.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${se.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${se.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${se.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${se.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${se["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${se.rowReorderCellContainer}`]:{padding:0,display:"flex",alignItems:"stretch"},[`.${se.withBorderColor}`]:{borderColor:r},[`& .${se["cell--withLeftBorder"]}, & .${se["columnHeader--withLeftBorder"]}`]:{borderLeftColor:"var(--DataGrid-rowBorderColor)",borderLeftWidth:"1px",borderLeftStyle:"solid"},[`& .${se["cell--withRightBorder"]}, & .${se["columnHeader--withRightBorder"]}`]:{borderRightColor:"var(--DataGrid-rowBorderColor)",borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${se["cell--flex"]}`]:{display:"flex",alignItems:"center",lineHeight:"inherit"},[`& .${se["cell--textLeft"]}`]:{textAlign:"left",justifyContent:"flex-start"},[`& .${se["cell--textRight"]}`]:{textAlign:"right",justifyContent:"flex-end"},[`& .${se["cell--textCenter"]}`]:{textAlign:"center",justifyContent:"center"},[`& .${se["cell--pinnedLeft"]}, & .${se["cell--pinnedRight"]}`]:{position:"sticky",zIndex:3,background:"var(--DataGrid-pinnedBackground)","&.Mui-selected":{backgroundColor:x}},[`& .${se.virtualScrollerContent} .${se.row}`]:{"&:hover":w,"&.Mui-selected":S,"&.Mui-selected:hover":T},[`& .${se.cellOffsetLeft}`]:{flex:"0 0 auto",display:"inline-block"},[`& .${se.cellSkeleton}`]:{flex:"0 0 auto",height:"100%",display:"inline-flex",alignItems:"center"},[`& .${se.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${se.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${se["columnHeader--dragging"]}, & .${se["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${se["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${se.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${se.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${se.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${se.treeDataGroupingCellLoadingContainer}, .${se.groupingCriteriaCellLoadingContainer}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},[`& .${se.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${se.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`.${se.scrollbarFiller}`]:{minWidth:"calc(var(--DataGrid-hasScrollY) * var(--DataGrid-scrollbarSize))",alignSelf:"stretch",[`&.${se["scrollbarFiller--borderTop"]}`]:{borderTop:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${se["scrollbarFiller--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`&.${se["scrollbarFiller--pinnedRight"]}`]:{backgroundColor:"var(--DataGrid-pinnedBackground)",position:"sticky",right:0}},[`& .${se.filler}`]:{flex:"1 0 auto"},[`& .${se["filler--borderBottom"]}`]:{borderBottom:"1px solid var(--DataGrid-rowBorderColor)"},[`& .${se["main--hasSkeletonLoadingOverlay"]}`]:{[`& .${se.virtualScrollerContent}`]:{position:"fixed",visibility:"hidden"},[`& .${se["scrollbar--vertical"]}, & .${se.pinnedRows}, & .${se.virtualScroller} > .${se.filler}`]:{display:"none"}}})});function nOt(e,t,n,r=1){const o=(l,c)=>Math.round((l**(1/r)*(1-n)+c**(1/r)*n)**r),i=jc(e),a=jc(t),s=[o(i.values[0],a.values[0]),o(i.values[1],a.values[1]),o(i.values[2],a.values[2])];return vS({type:"rgb",values:s})}const rOt=e=>`rgb(from ${e} r g b / 1)`;function oOt(e,t,n){return`color-mix(in srgb,${e}, ${rOt(t)} calc(${n} * 100%))`}const iOt=["className"],aOt=(e,t)=>{const{autoHeight:n,classes:r,showCellVerticalBorder:o}=e,i={root:["root",n&&"autoHeight",`root--density${p1(t)}`,e.slots.toolbar===null&&"root--noToolbar","withBorderColor",o&&"withVerticalBorder"]};return vn(i,bn,r)},sOt=y.forwardRef(function(t,n){const r=xt(),{className:o}=t,i=At(t,iOt),a=xl(),s=Ye(a,Hg),l=a.current.rootElementRef,c=hm(l,n),u=r,d=aOt(u,s),[f,p]=y.useState(!1);return _o(()=>{p(!0)},[]),f?$.jsx(tOt,W({ref:c,className:de(d.root,o),ownerState:u},i)):null}),lOt=["className"],cOt=e=>{const{classes:t}=e;return vn({root:["footerContainer","withBorderColor"]},bn,t)},uOt=Qn("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),dOt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,lOt),i=xt(),a=cOt(i);return $.jsx(uOt,W({ref:n,className:de(a.root,r),ownerState:i},o))}),fOt=["className"],pOt=e=>{const{classes:t}=e;return vn({root:["overlay"]},bn,t)},hOt=Qn("div",{name:"MuiDataGrid",slot:"Overlay",overridesResolver:(e,t)=>t.overlay})({width:"100%",height:"100%",display:"flex",alignSelf:"center",alignItems:"center",justifyContent:"center",backgroundColor:"var(--unstable_DataGrid-overlayBackground)"}),qz=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,fOt),i=xt(),a=pOt(i);return $.jsx(hOt,W({ref:n,className:de(a.root,r),ownerState:i},o))}),mOt=e=>{const{classes:t,open:n}=e;return vn({root:["menuIcon",n&&"menuOpen"],button:["menuIconButton"]},bn,t)},gOt=y.memo(e=>{var d,f;const{colDef:t,open:n,columnMenuId:r,columnMenuButtonId:o,iconButtonRef:i}=e,a=mn(),s=xt(),l=W({},e,{classes:s.classes}),c=mOt(l),u=y.useCallback(p=>{p.preventDefault(),p.stopPropagation(),a.current.toggleColumnMenu(t.field)},[a,t.field]);return $.jsx("div",{className:c.root,children:$.jsx(s.slots.baseTooltip,W({title:a.current.getLocaleText("columnMenuLabel"),enterDelay:1e3},(d=s.slotProps)==null?void 0:d.baseTooltip,{children:$.jsx(s.slots.baseIconButton,W({ref:i,tabIndex:-1,className:c.button,"aria-label":a.current.getLocaleText("columnMenuLabel"),size:"small",onClick:u,"aria-haspopup":"menu","aria-expanded":n,"aria-controls":n?r:void 0,id:o},(f=s.slotProps)==null?void 0:f.baseIconButton,{children:$.jsx(s.slots.columnMenuIcon,{fontSize:"inherit"})}))}))})});function yOt({columnMenuId:e,columnMenuButtonId:t,ContentComponent:n,contentComponentProps:r,field:o,open:i,target:a,onExited:s}){const l=mn(),c=l.current.getColumn(o),u=wr(d=>{d&&(d.stopPropagation(),a!=null&&a.contains(d.target))||l.current.hideColumnMenu()});return!a||!c?null:$.jsx(rce,{placement:`bottom-${c.align==="right"?"start":"end"}`,open:i,target:a,onClose:u,onExited:s,children:$.jsx(n,W({colDef:c,hideMenu:u,open:i,id:e,labelledby:t},r))})}const vOt=["className","aria-label"],bOt=e=>{const{classes:t}=e;return vn({root:["columnHeaderTitle"]},bn,t)},wOt=Qn("div",{name:"MuiDataGrid",slot:"ColumnHeaderTitle",overridesResolver:(e,t)=>t.columnHeaderTitle})({textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"var(--unstable_DataGrid-headWeight)",lineHeight:"normal"}),xOt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,vOt),i=xt(),a=bOt(i);return $.jsx(wOt,W({ref:n,className:de(a.root,r),ownerState:i},o))});function SOt(e){var l;const{label:t,description:n}=e,r=xt(),o=y.useRef(null),[i,a]=y.useState(""),s=y.useCallback(()=>{if(!n&&(o!=null&&o.current)){const c=SEt(o.current);a(c?t:"")}},[n,t]);return $.jsx(r.slots.baseTooltip,W({title:n||i},(l=r.slotProps)==null?void 0:l.baseTooltip,{children:$.jsx(xOt,{onMouseOver:s,ref:o,children:t})}))}const COt=["resizable","resizing","height","side"];var Kz=function(e){return e.Left="left",e.Right="right",e}(Kz||{});const POt=e=>{const{resizable:t,resizing:n,classes:r,side:o}=e,i={root:["columnSeparator",t&&"columnSeparator--resizable",n&&"columnSeparator--resizing",o&&`columnSeparator--side${p1(o)}`],icon:["iconSeparator"]};return vn(i,bn,r)};function TOt(e){const{height:t,side:n=Kz.Right}=e,r=At(e,COt),o=xt(),i=W({},e,{side:n,classes:o.classes}),a=POt(i),s=y.useCallback(l=>{l.preventDefault(),l.stopPropagation()},[]);return $.jsx("div",W({className:a.root,style:{minHeight:t}},r,{onClick:s,children:$.jsx(o.slots.columnResizeIcon,{className:a.icon})}))}const EOt=y.memo(TOt),OOt=["classes","columnMenuOpen","colIndex","height","isResizing","sortDirection","hasFocus","tabIndex","separatorSide","isDraggable","headerComponent","description","elementId","width","columnMenuIconButton","columnMenu","columnTitleIconButtons","headerClassName","label","resizable","draggableContainerProps","columnHeaderSeparatorProps","style"],Vce=y.forwardRef(function(t,n){const{classes:r,colIndex:o,height:i,isResizing:a,sortDirection:s,hasFocus:l,tabIndex:c,separatorSide:u,isDraggable:d,headerComponent:f,description:p,width:m,columnMenuIconButton:g=null,columnMenu:v=null,columnTitleIconButtons:w=null,headerClassName:x,label:S,resizable:P,draggableContainerProps:T,columnHeaderSeparatorProps:E,style:O}=t,k=At(t,OOt),A=xl(),I=xt(),R=y.useRef(null),N=hm(R,n);let L="none";return s!=null&&(L=s==="asc"?"ascending":"descending"),y.useLayoutEffect(()=>{var _;const j=A.current.state.columnMenu;if(l&&!j.open){const z=R.current.querySelector('[tabindex="0"]')||R.current;z==null||z.focus(),(_=A.current.columnHeadersContainerRef)!=null&&_.current&&(A.current.columnHeadersContainerRef.current.scrollLeft=0)}},[A,l]),$.jsxs("div",W({ref:N,className:de(r.root,x),style:W({},O,{height:i,width:m}),role:"columnheader",tabIndex:c,"aria-colindex":o+1,"aria-sort":L},k,{children:[$.jsxs("div",W({className:r.draggableContainer,draggable:d,role:"presentation"},T,{children:[$.jsxs("div",{className:r.titleContainer,role:"presentation",children:[$.jsx("div",{className:r.titleContainerContent,children:f!==void 0?f:$.jsx(SOt,{label:S,description:p,columnWidth:m})}),w]}),g]})),$.jsx(EOt,W({resizable:!I.disableColumnResize&&!!P,resizing:a,height:i,side:u},E)),v]}))}),IOt=e=>{const{colDef:t,classes:n,isDragging:r,sortDirection:o,showRightBorder:i,showLeftBorder:a,filterItemsCounter:s,pinnedPosition:l,isLastUnpinned:c,isSiblingFocused:u}=e,d=o!=null,f=s!=null&&s>0,p=t.type==="number",m={root:["columnHeader",t.headerAlign==="left"&&"columnHeader--alignLeft",t.headerAlign==="center"&&"columnHeader--alignCenter",t.headerAlign==="right"&&"columnHeader--alignRight",t.sortable&&"columnHeader--sortable",r&&"columnHeader--moving",d&&"columnHeader--sorted",f&&"columnHeader--filtered",p&&"columnHeader--numeric","withBorderColor",i&&"columnHeader--withRightBorder",a&&"columnHeader--withLeftBorder",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",c&&"columnHeader--lastUnpinned",u&&"columnHeader--siblingFocused"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer"],titleContainerContent:["columnHeaderTitleContainerContent"]};return vn(m,bn,n)};function kOt(e){var le,re,fe;const{colDef:t,columnMenuOpen:n,colIndex:r,headerHeight:o,isResizing:i,isLast:a,sortDirection:s,sortIndex:l,filterItemsCounter:c,hasFocus:u,tabIndex:d,disableReorder:f,separatorSide:p,style:m,pinnedPosition:g,indexInSection:v,sectionLength:w,gridHasFiller:x}=e,S=xl(),P=xt(),T=y.useRef(null),E=yo(),O=yo(),k=y.useRef(null),[A,I]=y.useState(n),R=y.useMemo(()=>!P.disableColumnReorder&&!f&&!t.disableReorder,[P.disableColumnReorder,f,t.disableReorder]);let N;t.renderHeader&&(N=t.renderHeader(S.current.getColumnHeaderParams(t.field)));const L=SM(g,v),j=xM(g,v,w,P.showColumnVerticalBorder,x),_=W({},e,{classes:P.classes,showRightBorder:j,showLeftBorder:L}),D=IOt(_),z=y.useCallback(ee=>ce=>{b1(ce)||S.current.publishEvent(ee,S.current.getColumnHeaderParams(t.field),ce)},[S,t.field]),F=y.useMemo(()=>({onClick:z("columnHeaderClick"),onContextMenu:z("columnHeaderContextMenu"),onDoubleClick:z("columnHeaderDoubleClick"),onMouseOver:z("columnHeaderOver"),onMouseOut:z("columnHeaderOut"),onMouseEnter:z("columnHeaderEnter"),onMouseLeave:z("columnHeaderLeave"),onKeyDown:z("columnHeaderKeyDown"),onFocus:z("columnHeaderFocus"),onBlur:z("columnHeaderBlur")}),[z]),H=y.useMemo(()=>R?{onDragStart:z("columnHeaderDragStart"),onDragEnter:z("columnHeaderDragEnter"),onDragOver:z("columnHeaderDragOver"),onDragEnd:z("columnHeaderDragEnd")}:{},[R,z]),U=y.useMemo(()=>({onMouseDown:z("columnSeparatorMouseDown"),onDoubleClick:z("columnSeparatorDoubleClick")}),[z]);y.useEffect(()=>{A||I(n)},[A,n]);const q=y.useCallback(()=>{I(!1)},[]),X=!P.disableColumnMenu&&!t.disableColumnMenu&&$.jsx(gOt,{colDef:t,columnMenuId:E,columnMenuButtonId:O,open:A,iconButtonRef:k}),ae=$.jsx(yOt,{columnMenuId:E,columnMenuButtonId:O,field:t.field,open:n,target:k.current,ContentComponent:P.slots.columnMenu,contentComponentProps:(le=P.slotProps)==null?void 0:le.columnMenu,onExited:q}),Z=t.sortingOrder??P.sortingOrder,K=(t.sortable||s!=null)&&!t.hideSortIcons&&!P.disableColumnSorting,te=$.jsxs(y.Fragment,{children:[!P.disableColumnFilter&&$.jsx(P.slots.columnHeaderFilterIconButton,W({field:t.field,counter:c},(re=P.slotProps)==null?void 0:re.columnHeaderFilterIconButton)),K&&$.jsx(P.slots.columnHeaderSortIcon,W({field:t.field,direction:s,index:l,sortingOrder:Z,disabled:!t.sortable},(fe=P.slotProps)==null?void 0:fe.columnHeaderSortIcon))]});y.useLayoutEffect(()=>{var ce;const ee=S.current.state.columnMenu;if(u&&!ee.open){const we=T.current.querySelector('[tabindex="0"]')||T.current;we==null||we.focus(),(ce=S.current.columnHeadersContainerRef)!=null&&ce.current&&(S.current.columnHeadersContainerRef.current.scrollLeft=0)}},[S,u]);const pe=typeof t.headerClassName=="function"?t.headerClassName({field:t.field,colDef:t}):t.headerClassName,ie=t.headerName??t.field;return $.jsx(Vce,W({ref:T,classes:D,columnMenuOpen:n,colIndex:r,height:o,isResizing:i,sortDirection:s,hasFocus:u,tabIndex:d,separatorSide:p,isDraggable:R,headerComponent:N,description:t.description,elementId:t.field,width:t.computedWidth,columnMenuIconButton:X,columnTitleIconButtons:te,headerClassName:de(pe,a&&se["columnHeader--last"]),label:ie,resizable:!P.disableColumnResize&&!!t.resizable,"data-field":t.field,columnMenu:ae,draggableContainerProps:H,columnHeaderSeparatorProps:U,style:m},F))}const MOt=op(kOt),AOt=["className"],$Ot=e=>{const{classes:t}=e;return vn({root:["iconButtonContainer"]},bn,t)},ROt=Qn("div",{name:"MuiDataGrid",slot:"IconButtonContainer",overridesResolver:(e,t)=>t.iconButtonContainer})(()=>({display:"flex",visibility:"hidden",width:0})),Hce=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,AOt),i=xt(),a=$Ot(i);return $.jsx(ROt,W({ref:n,className:de(a.root,r),ownerState:i},o))}),_Ot=["direction","index","sortingOrder","disabled"],DOt=e=>{const{classes:t}=e;return vn({icon:["sortIcon"]},bn,t)};function NOt(e,t,n,r){let o;const i={};return t==="asc"?o=e.columnSortedAscendingIcon:t==="desc"?o=e.columnSortedDescendingIcon:(o=e.columnUnsortedIcon,i.sortingOrder=r),o?$.jsx(o,W({fontSize:"small",className:n},i)):null}function LOt(e){var f;const{direction:t,index:n,sortingOrder:r,disabled:o}=e,i=At(e,_Ot),a=mn(),s=xt(),l=W({},e,{classes:s.classes}),c=DOt(l),u=NOt(s.slots,t,c.icon,r);if(!u)return null;const d=$.jsx(s.slots.baseIconButton,W({tabIndex:-1,"aria-label":a.current.getLocaleText("columnHeaderSortIconLabel"),title:a.current.getLocaleText("columnHeaderSortIconLabel"),size:"small",disabled:o},(f=s.slotProps)==null?void 0:f.baseIconButton,i,{children:u}));return $.jsxs(Hce,{children:[n!=null&&$.jsx(s.slots.baseBadge,{badgeContent:n,color:"default",overlap:"circular",children:d}),n==null&&d]})}const FOt=y.memo(LOt),jOt=e=>{const{classes:t}=e;return vn({icon:["filterIcon"]},bn,t)};function BOt(e){var m,g;const{counter:t,field:n,onClick:r}=e,o=mn(),i=xt(),a=W({},e,{classes:i.classes}),s=jOt(a),l=Ye(o,tS),c=yo(),u=yo(),d=y.useCallback(v=>{v.preventDefault(),v.stopPropagation();const{open:w,openedPanelValue:x}=tS(o.current.state);w&&x===Bh.filters?o.current.hideFilterPanel():o.current.showFilterPanel(void 0,u,c),r&&r(o.current.getColumnHeaderParams(n),v)},[o,n,r,u,c]);if(!t)return null;const f=l.open&&l.labelId===c,p=$.jsx(i.slots.baseIconButton,W({id:c,onClick:d,color:"default","aria-label":o.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":f,"aria-controls":f?u:void 0},(m=i.slotProps)==null?void 0:m.baseIconButton,{children:$.jsx(i.slots.columnFilteredIcon,{className:s.icon,fontSize:"small"})}));return $.jsx(i.slots.baseTooltip,W({title:o.current.getLocaleText("columnHeaderFiltersTooltipActive")(t),enterDelay:1e3},(g=i.slotProps)==null?void 0:g.baseTooltip,{children:$.jsxs(Hce,{children:[t>1&&$.jsx(i.slots.baseBadge,{badgeContent:t,color:"default",children:p}),t===1&&p]})}))}const Kq=lt($.jsx("path",{d:"M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"}),"ArrowUpward"),Yq=lt($.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward"),Xq=lt($.jsx("path",{d:"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"}),"KeyboardArrowRight"),Qq=lt($.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),zOt=lt($.jsx("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"}),"FilterList"),Jq=lt($.jsx("path",{d:"M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61z"}),"FilterAlt"),VOt=lt($.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"Search");lt($.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"Menu");lt($.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle");const HOt=lt($.jsx("path",{d:"M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"}),"ColumnIcon"),UOt=lt($.jsx("rect",{width:"1",height:"24",x:"11.5",rx:"0.5"}),"Separator"),WOt=lt($.jsx("path",{d:"M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"}),"ViewHeadline"),GOt=lt($.jsx("path",{d:"M21,8H3V4h18V8z M21,10H3v4h18V10z M21,16H3v4h18V16z"}),"TableRows"),qOt=lt($.jsx("path",{d:"M4 18h17v-6H4v6zM4 5v6h17V5H4z"}),"ViewStream"),KOt=lt($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"TripleDotsVertical"),jR=lt($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),Zq=lt($.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add"),YOt=lt($.jsx("path",{d:"M19 13H5v-2h14v2z"}),"Remove"),XOt=lt($.jsx("path",{d:"M12 4V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46C19.54 15.03 20 13.57 20 12c0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8L5.24 7.74C4.46 8.97 4 10.43 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4v3z"}),"Load"),eK=lt($.jsx("path",{d:"M11 18c0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2 2 .9 2 2zm-2-8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0-6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 4c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"Drag"),QOt=lt($.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),JOt=lt($.jsx("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"}),"Check"),ZOt=lt($.jsx("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreVert"),eIt=lt($.jsx("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"}),"VisibilityOff"),tIt=lt($.jsx("g",{children:$.jsx("path",{d:"M14.67,5v14H9.33V5H14.67z M15.67,19H21V5h-5.33V19z M8.33,19V5H3v14H8.33z"})}),"ViewColumn"),nIt=lt($.jsx("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear");lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");const rIt=lt($.jsx("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"}),"Delete");function Uce(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey}const SO=e=>e.indexOf("Arrow")===0||e.indexOf("Page")===0||e===" "||e==="Home"||e==="End",oIt=e=>!!e.key,iIt=e=>e==="Tab"||e==="Escape";function Wce(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="V"&&!e.shiftKey&&!e.altKey}function aIt(e){return(e.ctrlKey||e.metaKey)&&String.fromCharCode(e.keyCode)==="C"&&!e.shiftKey&&!e.altKey}const sIt=["hideMenu","colDef","id","labelledby","className","children","open"],lIt=oe(kS)(()=>({minWidth:248})),cIt=y.forwardRef(function(t,n){const{hideMenu:r,id:o,labelledby:i,className:a,children:s,open:l}=t,c=At(t,sIt),u=y.useCallback(d=>{d.key==="Tab"&&d.preventDefault(),iIt(d.key)&&r(d)},[r]);return $.jsx(lIt,W({id:o,ref:n,className:de(se.menuList,a),"aria-labelledby":i,onKeyDown:u,autoFocus:l},c,{children:s}))}),uIt=["displayOrder"],dIt=e=>{const t=xl(),n=xt(),{defaultSlots:r,defaultSlotProps:o,slots:i={},slotProps:a={},hideMenu:s,colDef:l,addDividers:c=!0}=e,u=y.useMemo(()=>W({},r,i),[r,i]),d=y.useMemo(()=>{if(!a||Object.keys(a).length===0)return o;const m=W({},a);return Object.entries(o).forEach(([g,v])=>{m[g]=W({},v,a[g]||{})}),m},[o,a]),f=t.current.unstable_applyPipeProcessors("columnMenu",[],e.colDef),p=y.useMemo(()=>{const m=Object.keys(r);return Object.keys(i).filter(g=>!m.includes(g))},[i,r]);return y.useMemo(()=>{const v=Array.from(new Set([...f,...p])).filter(w=>u[w]!=null).sort((w,x)=>{const S=d[w],P=d[x],T=Number.isFinite(S==null?void 0:S.displayOrder)?S.displayOrder:100,E=Number.isFinite(P==null?void 0:P.displayOrder)?P.displayOrder:100;return T-E});return v.reduce((w,x,S)=>{let P={colDef:l,onClick:s};const T=d[x];if(T){const E=At(T,uIt);P=W({},P,E)}return c&&S!==v.length-1?[...w,[u[x],P],[n.slots.baseDivider,{}]]:[...w,[u[x],P]]},[])},[c,l,f,s,u,d,p,n.slots.baseDivider])};function fIt(e){const{colDef:t,onClick:n}=e,r=mn(),o=xt(),s=vo(r).filter(c=>c.disableColumnMenu!==!0).length===1,l=y.useCallback(c=>{s||(r.current.setColumnVisibility(t.field,!1),n(c))},[r,t.field,n,s]);return o.disableColumnSelector||t.hideable===!1?null:$.jsxs(Yt,{onClick:l,disabled:s,children:[$.jsx(Gi,{children:$.jsx(o.slots.columnMenuHideIcon,{fontSize:"small"})}),$.jsx(wo,{children:r.current.getLocaleText("columnMenuHideColumn")})]})}function pIt(e){const{onClick:t}=e,n=mn(),r=xt(),o=y.useCallback(i=>{t(i),n.current.showPreferences(Bh.columns)},[n,t]);return r.disableColumnSelector?null:$.jsxs(Yt,{onClick:o,children:[$.jsx(Gi,{children:$.jsx(r.slots.columnMenuManageColumnsIcon,{fontSize:"small"})}),$.jsx(wo,{children:n.current.getLocaleText("columnMenuManageColumns")})]})}function hIt(e){return $.jsxs(y.Fragment,{children:[$.jsx(fIt,W({},e)),$.jsx(pIt,W({},e))]})}function mIt(e){const{colDef:t,onClick:n}=e,r=mn(),o=xt(),i=y.useCallback(a=>{n(a),r.current.showFilterPanel(t.field)},[r,t.field,n]);return o.disableColumnFilter||!t.filterable?null:$.jsxs(Yt,{onClick:i,children:[$.jsx(Gi,{children:$.jsx(o.slots.columnMenuFilterIcon,{fontSize:"small"})}),$.jsx(wo,{children:r.current.getLocaleText("columnMenuFilter")})]})}function gIt(e){const{colDef:t,onClick:n}=e,r=mn(),o=Ye(r,js),i=xt(),a=y.useMemo(()=>{if(!t)return null;const u=o.find(d=>d.field===t.field);return u==null?void 0:u.sort},[t,o]),s=t.sortingOrder??i.sortingOrder,l=y.useCallback(u=>{n(u);const d=u.currentTarget.getAttribute("data-value")||null;r.current.sortColumn(t.field,d===a?null:d)},[r,t,n,a]);if(i.disableColumnSorting||!t||!t.sortable||!s.some(u=>!!u))return null;const c=u=>{const d=r.current.getLocaleText(u);return typeof d=="function"?d(t):d};return $.jsxs(y.Fragment,{children:[s.includes("asc")&&a!=="asc"?$.jsxs(Yt,{onClick:l,"data-value":"asc",children:[$.jsx(Gi,{children:$.jsx(i.slots.columnMenuSortAscendingIcon,{fontSize:"small"})}),$.jsx(wo,{children:c("columnMenuSortAsc")})]}):null,s.includes("desc")&&a!=="desc"?$.jsxs(Yt,{onClick:l,"data-value":"desc",children:[$.jsx(Gi,{children:$.jsx(i.slots.columnMenuSortDescendingIcon,{fontSize:"small"})}),$.jsx(wo,{children:c("columnMenuSortDesc")})]}):null,s.includes(null)&&a!=null?$.jsxs(Yt,{onClick:l,children:[$.jsx(Gi,{}),$.jsx(wo,{children:r.current.getLocaleText("columnMenuUnsort")})]}):null]})}const yIt=["defaultSlots","defaultSlotProps","slots","slotProps"],vIt={columnMenuSortItem:gIt,columnMenuFilterItem:mIt,columnMenuColumnsItem:hIt},bIt={columnMenuSortItem:{displayOrder:10},columnMenuFilterItem:{displayOrder:20},columnMenuColumnsItem:{displayOrder:30}},wIt=y.forwardRef(function(t,n){const{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}=t,s=At(t,yIt),l=dIt(W({},s,{defaultSlots:r,defaultSlotProps:o,slots:i,slotProps:a}));return $.jsx(cIt,W({ref:n},s,{children:l.map(([c,u],d)=>$.jsx(c,W({},u),d))}))}),xIt=y.forwardRef(function(t,n){return $.jsx(wIt,W({},t,{ref:n,defaultSlots:vIt,defaultSlotProps:bIt}))}),SIt=["className","slotProps"],CIt=e=>{const{classes:t}=e;return vn({root:["panelWrapper"]},bn,t)},PIt=oe("div",{name:"MuiDataGrid",slot:"PanelWrapper",overridesResolver:(e,t)=>t.panelWrapper})({display:"flex",flexDirection:"column",flex:1,"&:focus":{outline:0}}),TIt=()=>!0,Gce=y.forwardRef(function(t,n){const{className:r,slotProps:o={}}=t,i=At(t,SIt),a=xt(),s=CIt(a);return $.jsx(KF,W({open:!0,disableEnforceFocus:!0,isEnabled:TIt},o.TrapFocus,{children:$.jsx(PIt,W({ref:n,tabIndex:-1,className:de(s.root,r),ownerState:a},i))}))}),EIt=(e,t)=>{const n=new Set(Object.keys(e).filter(i=>e[i]===!1)),r=new Set(Object.keys(t).filter(i=>t[i]===!1));if(n.size!==r.size)return!1;let o=!0;return n.forEach(i=>{r.has(i)||(o=!1)}),o},OIt=(e,t)=>(e.headerName||e.field).toLowerCase().indexOf(t)>-1,IIt=e=>{const{classes:t}=e;return vn({root:["columnsManagement"],header:["columnsManagementHeader"],footer:["columnsManagementFooter"],row:["columnsManagementRow"]},bn,t)},tK=new Intl.Collator;function qce(e){var L,j,_;const t=mn(),n=y.useRef(null),r=Ye(t,ec),o=eu(()=>Qs(t)).current,i=Ye(t,Qs),a=xt(),[s,l]=y.useState(""),c=IIt(a),{sort:u,searchPredicate:d=OIt,autoFocusSearchField:f=!0,disableShowHideToggle:p=!1,disableResetButton:m=!1,toggleAllMode:g="all",getTogglableColumns:v}=e,w=y.useMemo(()=>EIt(i,o),[i,o]),x=y.useMemo(()=>{switch(u){case"asc":return[...r].sort((D,z)=>tK.compare(D.headerName||D.field,z.headerName||z.field));case"desc":return[...r].sort((D,z)=>-tK.compare(D.headerName||D.field,z.headerName||z.field));default:return r}},[r,u]),S=D=>{const{name:z}=D.target;t.current.setColumnVisibility(z,i[z]===!1)},P=y.useMemo(()=>{const D=v?v(x):null,z=D?x.filter(({field:F})=>D.includes(F)):x;return s?z.filter(F=>d(F,s.toLowerCase())):z},[x,s,d,v]),T=y.useCallback(D=>{const z=Qs(t),F=W({},z),H=v?v(r):null;return(g==="filteredOnly"?P:r).forEach(U=>{U.hideable&&(H==null||H.includes(U.field))&&(D?delete F[U.field]:F[U.field]=!1)}),t.current.setColumnVisibilityModel(F)},[t,r,v,g,P]),E=y.useCallback(D=>{l(D.target.value)},[]),O=y.useMemo(()=>P.filter(D=>D.hideable),[P]),k=y.useMemo(()=>O.every(D=>i[D.field]==null||i[D.field]!==!1),[i,O]),A=y.useMemo(()=>O.every(D=>i[D.field]===!1),[i,O]),I=y.useRef(null);y.useEffect(()=>{f?n.current.focus():I.current&&typeof I.current.focus=="function"&&I.current.focus()},[f]);let R=!1;const N=D=>R===!1&&D.hideable!==!1?(R=!0,!0):!1;return $.jsxs(y.Fragment,{children:[$.jsx(MIt,{className:c.header,ownerState:a,children:$.jsx(a.slots.baseTextField,W({placeholder:t.current.getLocaleText("columnsManagementSearchTitle"),inputRef:n,value:s,onChange:E,variant:"outlined",size:"small",InputProps:{startAdornment:$.jsx(a.slots.baseInputAdornment,{position:"start",children:$.jsx(a.slots.quickFilterIcon,{})}),sx:{pl:1.5}},fullWidth:!0},(L=a.slotProps)==null?void 0:L.baseTextField))}),$.jsxs(kIt,{className:c.root,ownerState:a,children:[P.map(D=>{var z;return $.jsx(Uy,{className:c.row,control:$.jsx(a.slots.baseCheckbox,W({disabled:D.hideable===!1,checked:i[D.field]!==!1,onClick:S,name:D.field,sx:{p:.5},inputRef:N(D)?I:void 0},(z=a.slotProps)==null?void 0:z.baseCheckbox)),label:D.headerName||D.field},D.field)}),P.length===0&&$.jsx($It,{ownerState:a,children:t.current.getLocaleText("columnsManagementNoColumns")})]}),(!p||!m)&&P.length>0?$.jsxs(AIt,{ownerState:a,className:c.footer,children:[p?$.jsx("span",{}):$.jsx(Uy,{control:$.jsx(a.slots.baseCheckbox,W({disabled:O.length===0,checked:k,indeterminate:!k&&!A,onClick:()=>T(!k),name:t.current.getLocaleText("columnsManagementShowHideAllText"),sx:{p:.5}},(j=a.slotProps)==null?void 0:j.baseCheckbox)),label:t.current.getLocaleText("columnsManagementShowHideAllText")}),m?null:$.jsx(a.slots.baseButton,W({onClick:()=>t.current.setColumnVisibilityModel(o),disabled:w},(_=a.slotProps)==null?void 0:_.baseButton,{children:t.current.getLocaleText("columnsManagementReset")}))]}):null]})}const kIt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagement",overridesResolver:(e,t)=>t.columnsManagement})(({theme:e})=>({padding:e.spacing(0,3,1.5),display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400,alignItems:"flex-start"})),MIt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementHeader",overridesResolver:(e,t)=>t.columnsManagementHeader})(({theme:e})=>({padding:e.spacing(1.5,3)})),AIt=oe("div",{name:"MuiDataGrid",slot:"ColumnsManagementFooter",overridesResolver:(e,t)=>t.columnsManagementFooter})(({theme:e})=>({padding:e.spacing(.5,1,.5,3),display:"flex",justifyContent:"space-between",borderTop:`1px solid ${e.palette.divider}`})),$It=oe("div")(({theme:e})=>({padding:e.spacing(.5,0),color:e.palette.grey[500]}));function RIt(e){var n;const t=xt();return $.jsx(Gce,W({},e,{children:$.jsx(qce,W({},(n=t.slotProps)==null?void 0:n.columnsManagement))}))}const _It=["children","className","classes"],DIt=Ble("MuiDataGrid",["panel","paper"]),NIt=oe(Hf,{name:"MuiDataGrid",slot:"Panel",overridesResolver:(e,t)=>t.panel})(({theme:e})=>({zIndex:e.zIndex.modal})),LIt=oe(uo,{name:"MuiDataGrid",slot:"Paper",overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,minWidth:300,maxHeight:450,display:"flex",maxWidth:`calc(100vw - ${e.spacing(.5)})`,overflow:"auto"})),FIt=y.forwardRef((e,t)=>{const{children:n,className:r}=e,o=At(e,_It),i=mn(),a=xt(),s=DIt,[l,c]=y.useState(!1),u=y.useCallback(()=>{i.current.hidePreferences()},[i]),d=y.useCallback(g=>{g.key==="Escape"&&i.current.hidePreferences()},[i]),f=y.useMemo(()=>[{name:"flip",enabled:!0,options:{rootBoundary:"document"}},{name:"isPlaced",enabled:!0,phase:"main",fn:()=>{c(!0)},effect:()=>()=>{c(!1)}}],[]),[p,m]=y.useState(null);return y.useEffect(()=>{var v,w;const g=(w=(v=i.current.rootElementRef)==null?void 0:v.current)==null?void 0:w.querySelector('[data-id="gridPanelAnchor"]');g&&m(g)},[i]),p?$.jsx(NIt,W({ref:t,placement:"bottom-start",className:de(s.panel,r),ownerState:a,anchorEl:p,modifiers:f},o,{children:$.jsx(qF,{mouseEvent:"onMouseUp",onClickAway:u,children:$.jsx(LIt,{className:s.paper,ownerState:a,elevation:8,onKeyDown:d,children:l&&n})})})):null}),jIt=["className"],BIt=e=>{const{classes:t}=e;return vn({root:["panelContent"]},bn,t)},zIt=Qn("div",{name:"MuiDataGrid",slot:"PanelContent",overridesResolver:(e,t)=>t.panelContent})({display:"flex",flexDirection:"column",overflow:"auto",flex:"1 1",maxHeight:400});function VIt(e){const{className:t}=e,n=At(e,jIt),r=xt(),o=BIt(r);return $.jsx(zIt,W({className:de(o.root,t),ownerState:r},n))}const HIt=["className"],UIt=e=>{const{classes:t}=e;return vn({root:["panelFooter"]},bn,t)},WIt=Qn("div",{name:"MuiDataGrid",slot:"PanelFooter",overridesResolver:(e,t)=>t.panelFooter})(({theme:e})=>({padding:e.spacing(.5),display:"flex",justifyContent:"space-between"}));function GIt(e){const{className:t}=e,n=At(e,HIt),r=xt(),o=UIt(r);return $.jsx(WIt,W({className:de(o.root,t),ownerState:r},n))}const qIt=["item","hasMultipleFilters","deleteFilter","applyFilterChanges","showMultiFilterOperators","disableMultiFilterOperator","applyMultiFilterOperatorChanges","focusElementRef","logicOperators","columnsSort","filterColumns","deleteIconProps","logicOperatorInputProps","operatorInputProps","columnInputProps","valueInputProps","readOnly","children"],KIt=["InputComponentProps"],YIt=e=>{const{classes:t}=e;return vn({root:["filterForm"],deleteIcon:["filterFormDeleteIcon"],logicOperatorInput:["filterFormLogicOperatorInput"],columnInput:["filterFormColumnInput"],operatorInput:["filterFormOperatorInput"],valueInput:["filterFormValueInput"]},bn,t)},XIt=oe("div",{name:"MuiDataGrid",slot:"FilterForm",overridesResolver:(e,t)=>t.filterForm})(({theme:e})=>({display:"flex",padding:e.spacing(1)})),QIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormDeleteIcon",overridesResolver:(e,t)=>t.filterFormDeleteIcon})(({theme:e})=>({flexShrink:0,justifyContent:"flex-end",marginRight:e.spacing(.5),marginBottom:e.spacing(.2)})),JIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormLogicOperatorInput",overridesResolver:(e,t)=>t.filterFormLogicOperatorInput})({minWidth:55,marginRight:5,justifyContent:"end"}),ZIt=oe("div",{name:"MuiDataGrid",slot:"FilterFormColumnInput",overridesResolver:(e,t)=>t.filterFormColumnInput})({width:150}),ekt=oe("div",{name:"MuiDataGrid",slot:"FilterFormOperatorInput",overridesResolver:(e,t)=>t.filterFormOperatorInput})({width:150}),tkt=oe("div",{name:"MuiDataGrid",slot:"FilterFormValueInput",overridesResolver:(e,t)=>t.filterFormValueInput})({width:190}),nkt=e=>{switch(e){case ji.And:return"filterPanelOperatorAnd";case ji.Or:return"filterPanelOperatorOr";default:throw new Error("MUI X: Invalid `logicOperator` property in the `GridFilterPanel`.")}},M0=e=>e.headerName||e.field,nK=new Intl.Collator,rK=y.forwardRef(function(t,n){var we,ge,Se,xe,Ie,Re,_e,ye,Te;const{item:r,hasMultipleFilters:o,deleteFilter:i,applyFilterChanges:a,showMultiFilterOperators:s,disableMultiFilterOperator:l,applyMultiFilterOperatorChanges:c,focusElementRef:u,logicOperators:d=[ji.And,ji.Or],columnsSort:f,filterColumns:p,deleteIconProps:m={},logicOperatorInputProps:g={},operatorInputProps:v={},columnInputProps:w={},valueInputProps:x={},readOnly:S}=t,P=At(t,qIt),T=mn(),E=Ye(T,dd),O=Ye(T,Gle),k=Ye(T,ti),A=yo(),I=yo(),R=yo(),N=yo(),L=xt(),j=YIt(L),_=y.useRef(null),D=y.useRef(null),z=k.logicOperator??ji.And,F=o&&d.length>0,H=((we=L.slotProps)==null?void 0:we.baseFormControl)||{},q=(((ge=L.slotProps)==null?void 0:ge.baseSelect)||{}).native??!1,X=((Se=L.slotProps)==null?void 0:Se.baseInputLabel)||{},ae=((xe=L.slotProps)==null?void 0:xe.baseSelectOption)||{},{InputComponentProps:Z}=x,K=At(x,KIt),{filteredColumns:te,selectedField:pe}=y.useMemo(()=>{let Oe=r.field;const Me=E[r.field].filterable===!1?E[r.field]:null;if(Me)return{filteredColumns:[Me],selectedField:Oe};if(p===void 0||typeof p!="function")return{filteredColumns:O,selectedField:Oe};const We=p({field:r.field,columns:O,currentFilters:(k==null?void 0:k.items)||[]});return{filteredColumns:O.filter(Ve=>{const Qe=We.includes(Ve.field);return Ve.field===r.field&&!Qe&&(Oe=void 0),Qe}),selectedField:Oe}},[p,k==null?void 0:k.items,O,r.field,E]),ie=y.useMemo(()=>{switch(f){case"asc":return te.sort((Oe,Me)=>nK.compare(M0(Oe),M0(Me)));case"desc":return te.sort((Oe,Me)=>-nK.compare(M0(Oe),M0(Me)));default:return te}},[te,f]),le=r.field?T.current.getColumn(r.field):null,re=y.useMemo(()=>{var Oe;return!r.operator||!le?null:(Oe=le.filterOperators)==null?void 0:Oe.find(Me=>Me.value===r.operator)},[r,le]),fe=y.useCallback(Oe=>{const Me=Oe.target.value,We=T.current.getColumn(Me);if(We.field===le.field)return;const Ve=We.filterOperators.find(nt=>nt.value===r.operator)||We.filterOperators[0];let ut=!Ve.InputComponent||Ve.InputComponent!==(re==null?void 0:re.InputComponent)||We.type!==le.type?void 0:r.value;if(We.type==="singleSelect"&&ut!==void 0){const nt=We,et=jh(nt);Array.isArray(ut)?ut=ut.filter(yt=>wO(yt,et,nt==null?void 0:nt.getOptionValue)!==void 0):wO(r.value,et,nt==null?void 0:nt.getOptionValue)===void 0&&(ut=void 0)}a(W({},r,{field:Me,operator:Ve.value,value:ut}))},[T,a,r,le,re]),ee=y.useCallback(Oe=>{const Me=Oe.target.value,We=le==null?void 0:le.filterOperators.find(Qe=>Qe.value===Me),Ve=!(We!=null&&We.InputComponent)||(We==null?void 0:We.InputComponent)!==(re==null?void 0:re.InputComponent);a(W({},r,{operator:Me,value:Ve?void 0:r.value}))},[a,r,le,re]),ce=y.useCallback(Oe=>{const Me=Oe.target.value===ji.And.toString()?ji.And:ji.Or;c(Me)},[c]),me=()=>{i(r)};return y.useImperativeHandle(u,()=>({focus:()=>{var Oe;re!=null&&re.InputComponent?(Oe=_==null?void 0:_.current)==null||Oe.focus():D.current.focus()}}),[re]),$.jsxs(XIt,W({ref:n,className:j.root,"data-id":r.id,ownerState:L},P,{children:[$.jsx(QIt,W({variant:"standard",as:L.slots.baseFormControl},H,m,{className:de(j.deleteIcon,H.className,m.className),ownerState:L,children:$.jsx(L.slots.baseIconButton,W({"aria-label":T.current.getLocaleText("filterPanelDeleteIconLabel"),title:T.current.getLocaleText("filterPanelDeleteIconLabel"),onClick:me,size:"small",disabled:S},(Ie=L.slotProps)==null?void 0:Ie.baseIconButton,{children:$.jsx(L.slots.filterPanelDeleteIcon,{fontSize:"small"})}))})),$.jsx(JIt,W({variant:"standard",as:L.slots.baseFormControl},H,g,{sx:[F?{display:"flex"}:{display:"none"},s?{visibility:"visible"}:{visibility:"hidden"},H.sx,g.sx],className:de(j.logicOperatorInput,H.className,g.className),ownerState:L,children:$.jsx(L.slots.baseSelect,W({inputProps:{"aria-label":T.current.getLocaleText("filterPanelLogicOperator")},value:z??"",onChange:ce,disabled:!!l||d.length===1,native:q},(Re=L.slotProps)==null?void 0:Re.baseSelect,{children:d.map(Oe=>y.createElement(L.slots.baseSelectOption,W({},ae,{native:q,key:Oe.toString(),value:Oe.toString()}),T.current.getLocaleText(nkt(Oe))))}))})),$.jsxs(ZIt,W({variant:"standard",as:L.slots.baseFormControl},H,w,{className:de(j.columnInput,H.className,w.className),ownerState:L,children:[$.jsx(L.slots.baseInputLabel,W({},X,{htmlFor:A,id:I,children:T.current.getLocaleText("filterPanelColumns")})),$.jsx(L.slots.baseSelect,W({labelId:I,id:A,label:T.current.getLocaleText("filterPanelColumns"),value:pe??"",onChange:fe,native:q,disabled:S},(_e=L.slotProps)==null?void 0:_e.baseSelect,{children:ie.map(Oe=>y.createElement(L.slots.baseSelectOption,W({},ae,{native:q,key:Oe.field,value:Oe.field}),M0(Oe)))}))]})),$.jsxs(ekt,W({variant:"standard",as:L.slots.baseFormControl},H,v,{className:de(j.operatorInput,H.className,v.className),ownerState:L,children:[$.jsx(L.slots.baseInputLabel,W({},X,{htmlFor:R,id:N,children:T.current.getLocaleText("filterPanelOperator")})),$.jsx(L.slots.baseSelect,W({labelId:N,label:T.current.getLocaleText("filterPanelOperator"),id:R,value:r.operator,onChange:ee,native:q,inputRef:D,disabled:S},(ye=L.slotProps)==null?void 0:ye.baseSelect,{children:(Te=le==null?void 0:le.filterOperators)==null?void 0:Te.map(Oe=>y.createElement(L.slots.baseSelectOption,W({},ae,{native:q,key:Oe.value,value:Oe.value}),Oe.label||T.current.getLocaleText(`filterOperator${p1(Oe.value)}`)))}))]})),$.jsx(tkt,W({variant:"standard",as:L.slots.baseFormControl},H,K,{className:de(j.valueInput,H.className,K.className),ownerState:L,children:re!=null&&re.InputComponent?$.jsx(re.InputComponent,W({apiRef:T,item:r,applyValue:a,focusElementRef:_,disabled:S},re.InputComponentProps,Z),r.field):null}))]}))}),rkt=["logicOperators","columnsSort","filterFormProps","getColumnForNewFilter","children","disableAddFilterButton","disableRemoveAllButton"],oK=e=>({field:e.field,operator:e.filterOperators[0].value,id:Math.round(Math.random()*1e5)}),okt=y.forwardRef(function(t,n){var N,L;const r=mn(),o=xt(),i=Ye(r,ti),a=Ye(r,Gle),s=Ye(r,Y1t),l=y.useRef(null),c=y.useRef(null),{logicOperators:u=[ji.And,ji.Or],columnsSort:d,filterFormProps:f,getColumnForNewFilter:p,disableAddFilterButton:m=!1,disableRemoveAllButton:g=!1}=t,v=At(t,rkt),w=r.current.upsertFilterItem,x=y.useCallback(j=>{r.current.setFilterLogicOperator(j)},[r]),S=y.useCallback(()=>{let j;if(p&&typeof p=="function"){const _=p({currentFilters:(i==null?void 0:i.items)||[],columns:a});if(_===null)return null;j=a.find(({field:D})=>D===_)}else j=a.find(_=>{var D;return(D=_.filterOperators)==null?void 0:D.length});return j?oK(j):null},[i==null?void 0:i.items,a,p]),P=y.useCallback(()=>{if(p===void 0||typeof p!="function")return S();const j=i.items.length?i.items:[S()].filter(Boolean),_=p({currentFilters:j,columns:a});if(_===null)return null;const D=a.find(({field:z})=>z===_);return D?oK(D):null},[i.items,a,p,S]),T=y.useMemo(()=>i.items.length?i.items:(c.current||(c.current=S()),c.current?[c.current]:[]),[i.items,S]),E=T.length>1,{readOnlyFilters:O,validFilters:k}=y.useMemo(()=>T.reduce((j,_)=>(s[_.field]?j.validFilters.push(_):j.readOnlyFilters.push(_),j),{readOnlyFilters:[],validFilters:[]}),[T,s]),A=y.useCallback(()=>{const j=P();j&&r.current.upsertFilterItems([...T,j])},[r,P,T]),I=y.useCallback(j=>{const _=k.length===1;r.current.deleteFilterItem(j),_&&r.current.hideFilterPanel()},[r,k.length]),R=y.useCallback(()=>k.length===1&&k[0].value===void 0?(r.current.deleteFilterItem(k[0]),r.current.hideFilterPanel()):r.current.setFilterModel(W({},i,{items:O}),"removeAllFilterItems"),[r,O,i,k]);return y.useEffect(()=>{u.length>0&&i.logicOperator&&!u.includes(i.logicOperator)&&x(u[0])},[u,x,i.logicOperator]),y.useEffect(()=>{k.length>0&&l.current.focus()},[k.length]),$.jsxs(Gce,W({ref:n},v,{children:[$.jsxs(VIt,{children:[O.map((j,_)=>$.jsx(rK,W({item:j,applyFilterChanges:w,deleteFilter:I,hasMultipleFilters:E,showMultiFilterOperators:_>0,disableMultiFilterOperator:_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:null,readOnly:!0,logicOperators:u,columnsSort:d},f),j.id==null?_:j.id)),k.map((j,_)=>$.jsx(rK,W({item:j,applyFilterChanges:w,deleteFilter:I,hasMultipleFilters:E,showMultiFilterOperators:O.length+_>0,disableMultiFilterOperator:O.length+_!==1,applyMultiFilterOperatorChanges:x,focusElementRef:_===k.length-1?l:null,logicOperators:u,columnsSort:d},f),j.id==null?_+O.length:j.id))]}),!o.disableMultipleColumnsFiltering&&!(m&&g)?$.jsxs(GIt,{children:[m?$.jsx("span",{}):$.jsx(o.slots.baseButton,W({onClick:A,startIcon:$.jsx(o.slots.filterPanelAddIcon,{})},(N=o.slotProps)==null?void 0:N.baseButton,{children:r.current.getLocaleText("filterPanelAddFilter")})),!g&&k.length>0?$.jsx(o.slots.baseButton,W({onClick:R,startIcon:$.jsx(o.slots.filterPanelRemoveAllIcon,{})},(L=o.slotProps)==null?void 0:L.baseButton,{children:r.current.getLocaleText("filterPanelRemoveAll")})):null]}):null]}))}),ikt=["hideMenu","options"],akt=["hideMenu","options"];function skt(e){const t=mn(),{hideMenu:n,options:r}=e,o=At(e,ikt);return $.jsx(Yt,W({onClick:()=>{t.current.exportDataAsCsv(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportCSV")}))}function lkt(e){const t=mn(),{hideMenu:n,options:r}=e,o=At(e,akt);return $.jsx(Yt,W({onClick:()=>{t.current.exportDataAsPrint(r),n==null||n()}},o,{children:t.current.getLocaleText("toolbarExportPrint")}))}const ckt=["className","selectedRowCount"],ukt=e=>{const{classes:t}=e;return vn({root:["selectedRowCount"]},bn,t)},dkt=Qn("div",{name:"MuiDataGrid",slot:"SelectedRowCount",overridesResolver:(e,t)=>t.selectedRowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2),visibility:"hidden",width:0,height:0,[e.breakpoints.up("sm")]:{visibility:"visible",width:"auto",height:"auto"}})),fkt=y.forwardRef(function(t,n){const{className:r,selectedRowCount:o}=t,i=At(t,ckt),a=mn(),s=xt(),l=ukt(s),c=a.current.getLocaleText("footerRowSelected")(o);return $.jsx(dkt,W({ref:n,className:de(l.root,r),ownerState:s},i,{children:c}))}),pkt=y.forwardRef(function(t,n){var d,f;const r=mn(),o=xt(),i=Ye(r,RCt),a=Ye(r,lPt),s=Ye(r,jz),l=!o.hideFooterSelectedRowCount&&a>0?$.jsx(fkt,{selectedRowCount:a}):$.jsx("div",{}),c=!o.hideFooterRowCount&&!o.pagination?$.jsx(o.slots.footerRowCount,W({},(d=o.slotProps)==null?void 0:d.footerRowCount,{rowCount:i,visibleRowCount:s})):null,u=o.pagination&&!o.hideFooterPagination&&o.slots.pagination&&$.jsx(o.slots.pagination,W({},(f=o.slotProps)==null?void 0:f.pagination));return $.jsxs(dOt,W({ref:n},t,{children:[l,c,u]}))});function hkt(){var i,a;const e=mn(),t=Ye(e,ec),n=xt(),r=Ye(e,tS),o=e.current.unstable_applyPipeProcessors("preferencePanel",null,r.openedPanelValue??Bh.filters);return $.jsx(n.slots.panel,W({as:n.slots.basePopper,open:t.length>0&&r.open,id:r.panelId,"aria-labelledby":r.labelId},(i=n.slotProps)==null?void 0:i.panel,(a=n.slotProps)==null?void 0:a.basePopper,{children:o}))}function mkt(){var t;const e=xt();return $.jsxs(y.Fragment,{children:[$.jsx(hkt,{}),e.slots.toolbar&&$.jsx(e.slots.toolbar,W({},(t=e.slotProps)==null?void 0:t.toolbar))]})}const Yz=(e,t,n,r,o)=>{const i=o.hasScrollY?o.scrollbarSize:0;let a;switch(e){case ur.LEFT:a=r[n];break;case ur.RIGHT:a=o.columnsTotalWidth-r[n]-t+i;break;default:a=0;break}return a},A0={root:se.scrollbarFiller,header:se["scrollbarFiller--header"],borderTop:se["scrollbarFiller--borderTop"],borderBottom:se["scrollbarFiller--borderBottom"],pinnedRight:se["scrollbarFiller--pinnedRight"]};function Xz({header:e,borderTop:t=!0,borderBottom:n,pinnedRight:r}){return $.jsx("div",{role:"presentation",className:de(A0.root,e&&A0.header,t&&A0.borderTop,n&&A0.borderBottom,r&&A0.pinnedRight)})}const gkt=Qn("div",{name:"MuiDataGrid",slot:"SkeletonLoadingOverlay",overridesResolver:(e,t)=>t.skeletonLoadingOverlay})({minWidth:"100%",width:"max-content",height:"100%",overflow:"clip"}),ykt=e=>{const{classes:t}=e;return vn({root:["skeletonLoadingOverlay"]},bn,t)},iK=e=>parseInt(e.getAttribute("data-colindex"),10),vkt=y.forwardRef(function(t,n){const r=xt(),{slots:o}=r,i=ykt({classes:r.classes}),a=y.useRef(null),s=hm(a,n),l=mn(),c=Ye(l,li),u=(c==null?void 0:c.viewportInnerSize.height)??0,d=Math.ceil(u/c.rowHeight),f=Ye(l,$z),p=Ye(l,ip),m=y.useMemo(()=>p.filter(E=>E<=f).length,[f,p]),g=Ye(l,vo),v=y.useMemo(()=>g.slice(0,m),[g,m]),w=Ye(l,m1),x=y.useCallback((E,O,k)=>{const A=Yz(k,E,O,p,c);return{[k]:A}},[c,p]),S=y.useCallback(E=>{if(w.left.findIndex(O=>O.field===E)!==-1)return ur.LEFT;if(w.right.findIndex(O=>O.field===E)!==-1)return ur.RIGHT},[w.left,w.right]),P=y.useMemo(()=>{const E=[];for(let O=0;Ole.field===I.field):A-w.left.length,D=R&&x(I.computedWidth,A,R),z=c.columnsTotalWidth0},`skeleton-scrollbar-filler-${O}`))}E.push($.jsx("div",{className:de(se.row,se.rowSkeleton,O===0&&se["row--firstVisible"]),children:k},`skeleton-row-${O}`))}return E},[o,v,w,d,r.showCellVerticalBorder,c.columnsTotalWidth,c.viewportOuterSize.width,c.rowHeight,c.hasScrollY,c.scrollbarSize,S,x]);return ht(l,"columnResize",E=>{var D,z,F;const{colDef:O,width:k}=E,A=(D=a.current)==null?void 0:D.querySelectorAll(`[data-field="${fd(O.field)}"]`);if(!A)throw new Error("MUI X: Expected skeleton cells to be defined with `data-field` attribute.");const I=v.findIndex(H=>H.field===O.field),R=S(O.field),N=R===ur.LEFT,L=R===ur.RIGHT,j=getComputedStyle(A[0]).getPropertyValue("--width"),_=parseInt(j,10)-k;if(A&&A.forEach(H=>{H.style.setProperty("--width",`${k}px`)}),N){const H=(z=a.current)==null?void 0:z.querySelectorAll(`.${se["cell--pinnedLeft"]}`);H==null||H.forEach(U=>{iK(U)>I&&(U.style.left=`${parseInt(getComputedStyle(U).left,10)-_}px`)})}if(L){const H=(F=a.current)==null?void 0:F.querySelectorAll(`.${se["cell--pinnedRight"]}`);H==null||H.forEach(U=>{iK(U)({maxHeight:"calc(100% + 1px)",flexGrow:1,[`& .${ch.selectLabel}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"block"}},[`& .${ch.input}`]:{display:"none",[e.breakpoints.up("sm")]:{display:"inline-flex"}}})),Pkt=(e,t)=>({from:n,to:r,count:o,page:i})=>e({from:n,to:r,count:o,page:i,estimated:t}),Tkt=({from:e,to:t,count:n,estimated:r})=>r?`${e}–${t} of ${n!==-1?n:`more than ${r>t?r:t}`}`:`${e}–${t} of ${n!==-1?n:`more than ${t}`}`,Ekt=y.forwardRef(function(t,n){const r=mn(),o=xt(),i=Ye(r,Fi),a=Ye(r,Ug),s=Ye(r,wce),{paginationMode:l,loading:c,estimatedRowCount:u}=o,d=y.useMemo(()=>a===-1&&l==="server"&&c?{backIconButtonProps:{disabled:!0},nextIconButtonProps:{disabled:!0}}:{},[c,l,a]),f=y.useMemo(()=>Math.max(0,s-1),[s]),p=y.useMemo(()=>a===-1||i.page<=f?i.page:f,[f,i.page,a]),m=y.useCallback(P=>{const T=Number(P.target.value);r.current.setPageSize(T)},[r]),g=y.useCallback((P,T)=>{r.current.setPage(T)},[r]),w=(P=>{for(let T=0;T{const{classes:t}=e;return vn({root:["rowCount"]},bn,t)},kkt=Qn("div",{name:"MuiDataGrid",slot:"RowCount",overridesResolver:(e,t)=>t.rowCount})(({theme:e})=>({alignItems:"center",display:"flex",margin:e.spacing(0,2)})),Mkt=y.forwardRef(function(t,n){const{className:r,rowCount:o,visibleRowCount:i}=t,a=At(t,Okt),s=mn(),l=xt(),c=Ikt(l);if(o===0)return null;const u=i=d.left.length&&g=m.lastColumnIndex,le=Akt(j.classes,{root:["row",r&&"selected",K&&"row--editable",Z&&"row--editing",v&&"row--firstVisible",w&&"row--lastVisible",S&&"row--borderBottom",l==="auto"&&"row--dynamicHeight"]}),re=N.hooks.useGridRowAriaAttributes();y.useLayoutEffect(()=>{if(_.range){const nt=R.current.getRowIndexRelativeToVisibleRows(o);nt!==void 0&&R.current.unstable_setLastMeasuredRowIndex(nt)}if(L.current&&l==="auto")return R.current.observeRowHeight(L.current,o)},[R,_.range,l,o]);const fe=y.useCallback((nt,et)=>yt=>{b1(yt)||R.current.getRow(o)&&(R.current.publishEvent(nt,R.current.getRowParams(o),yt),et&&et(yt))},[R,o]),ee=y.useCallback(nt=>{const et=xO(nt.target,se.cell),yt=et==null?void 0:et.getAttribute("data-field");if(yt){if(yt===kb.field||yt===pM||yt==="__reorder__"||R.current.getCellMode(o,yt)===Zn.Edit)return;const wn=R.current.getColumn(yt);if((wn==null?void 0:wn.type)===uM)return}fe("rowClick",P)(nt)},[R,P,fe,o]),{slots:ce,slotProps:me,disableColumnReorder:we}=j,ge=j.rowReordering,Se=Ye(R,()=>W({},R.current.getRowHeightEntry(o)),Vle),xe=y.useMemo(()=>{if(x)return{opacity:0,width:0,height:0};const nt=W({},s,{maxHeight:l==="auto"?"none":l,minHeight:l,"--height":typeof l=="number"?`${l}px`:l});if(Se.spacingTop){const et=j.rowSpacingType==="border"?"borderTopWidth":"marginTop";nt[et]=Se.spacingTop}if(Se.spacingBottom){const et=j.rowSpacingType==="border"?"borderBottomWidth":"marginBottom";let yt=nt[et];typeof yt!="number"&&(yt=parseInt(yt||"0",10)),yt+=Se.spacingBottom,nt[et]=yt}return nt},[x,l,s,Se,j.rowSpacingType]),Ie=R.current.unstable_applyPipeProcessors("rowClassName",[],o),Re=q?re(q,a):void 0;if(typeof j.getRowClassName=="function"){const nt=a-(((ut=_.range)==null?void 0:ut.firstRowIndex)||0),et=W({},R.current.getRowParams(o),{isFirstVisible:nt===0,isLastVisible:nt===_.rows.length-1,indexRelativeToCurrentPage:nt});Ie.push(j.getRowClassName(et))}const _e=(nt,et,yt,wn,Ke=fa.NONE)=>{var ys;const $e=R.current.unstable_getCellColSpanInfo(o,yt);if($e!=null&&$e.spannedByColSpan)return null;const Xe=($e==null?void 0:$e.cellProps.width)??nt.computedWidth,bt=($e==null?void 0:$e.cellProps.colSpan)??1,Vt=Yz(zce[Ke],nt.computedWidth,yt,F,p);if((q==null?void 0:q.type)==="skeletonRow")return $.jsx(ce.skeletonCell,{type:nt.type,width:Xe,height:l,field:nt.field,align:nt.align},nt.field);const Ot=((ys=H[o])==null?void 0:ys[nt.field])??null,un=nt.field==="__reorder__",jn=Object.keys(H).length>0,Wn=!(we||nt.disableReorder),Eo=ge&&!D.length&&z<=1&&!jn,Kr=!(Wn||un&&Eo),Ii=Ke===fa.VIRTUAL;return $.jsx(ce.cell,W({column:nt,width:Xe,rowId:o,align:nt.align||"left",colIndex:yt,colSpan:bt,disableDragEvents:Kr,editCellState:Ot,isNotVisible:Ii,pinnedOffset:Vt,pinnedPosition:Ke,sectionIndex:et,sectionLength:wn,gridHasFiller:ae},me==null?void 0:me.cell),nt.field)};if(!q)return null;const ye=d.left.map((nt,et)=>_e(nt,et,et,d.left.length,fa.LEFT)),Te=d.right.map((nt,et)=>{const yt=u.length-d.right.length+et;return _e(nt,et,yt,d.right.length,fa.RIGHT)}),Oe=u.length-d.left.length-d.right.length,Me=[];pe&&Me.push(_e(u[g],g-d.left.length,g,Oe,fa.VIRTUAL));for(let nt=m.firstColumnIndex;nt0&&$.jsx(Rkt,{width:Qe}),Te.length>0&&$.jsx("div",{role:"presentation",className:se.filler}),Te,X!==0&&$.jsx(Xz,{pinnedRight:d.right.length>0})]}))}),Dkt=op(_kt),Nkt=()=>{const e=xl(),t=xt(),n=Ye(e,vo),r=Ye(e,Fz),o=Ye(e,v1),i=Ye(e,LCt);return{role:"grid","aria-colcount":n.length,"aria-rowcount":o+1+i+r,"aria-multiselectable":Bz(t)}},Lkt=()=>{const e=xl(),t=Ye(e,Lu),n=Ye(e,v1);return y.useCallback((r,o)=>{const i={},a=o+n+2;return i["aria-rowindex"]=a,e.current.isRowSelectable(r.id)&&(i["aria-selected"]=t[r.id]!==void 0),i},[e,t,n])};function Fkt({privateApiRef:e,configuration:t,props:n,children:r}){const o=y.useRef(e.current.getPublicApi());return $.jsx(Rce.Provider,{value:t,children:$.jsx(Lle.Provider,{value:n,children:$.jsx(Ice.Provider,{value:e,children:$.jsx(Nle.Provider,{value:o,children:r})})})})}const jkt=e=>{const t=y.useRef(null),n=y.useRef(null),r=y.useRef(null),o=y.useRef(null),i=y.useRef(null),a=y.useRef(null);e.current.register("public",{rootElementRef:t}),e.current.register("private",{mainElementRef:n,virtualScrollerRef:r,virtualScrollbarVerticalRef:o,virtualScrollbarHorizontalRef:i,columnHeadersContainerRef:a})},Bkt=e=>{const t=nr();e.current.state.isRtl===void 0&&(e.current.state.isRtl=t);const n=y.useRef(!0);y.useEffect(()=>{n.current?n.current=!1:e.current.setState(r=>W({},r,{isRtl:t}))},[e,t])},zkt=uCt()&&window.localStorage.getItem("DEBUG")!=null,ew=()=>{},Vkt={debug:ew,info:ew,warn:ew,error:ew},aK=["debug","info","warn","error"];function sK(e,t,n=console){const r=aK.indexOf(t);if(r===-1)throw new Error(`MUI X: Log level ${t} not recognized.`);return aK.reduce((i,a,s)=>(s>=r?i[a]=(...l)=>{const[c,...u]=l;n[a](`MUI X: ${e} - ${c}`,...u)}:i[a]=ew,i),{})}const Hkt=(e,t)=>{const n=y.useCallback(r=>zkt?sK(r,"debug",t.logger):t.logLevel?sK(r,t.logLevel.toString(),t.logger):Vkt,[t.logLevel,t.logger]);Jt(e,{getLogger:n},"private")};class Ukt{constructor(){this.maxListeners=20,this.warnOnce=!1,this.events={}}on(t,n,r={}){let o=this.events[t];o||(o={highPriority:new Map,regular:new Map},this.events[t]=o),r.isFirst?o.highPriority.set(n,!0):o.regular.set(n,!0)}removeListener(t,n){this.events[t]&&(this.events[t].regular.delete(n),this.events[t].highPriority.delete(n))}removeAllListeners(){this.events={}}emit(t,...n){const r=this.events[t];if(!r)return;const o=Array.from(r.highPriority.keys()),i=Array.from(r.regular.keys());for(let a=o.length-1;a>=0;a-=1){const s=o[a];r.highPriority.has(s)&&s.apply(this,n)}for(let a=0;a(this.listeners.add(n),()=>{this.listeners.delete(n)}),this.getSnapshot=()=>this.value,this.update=n=>{this.value=n,this.listeners.forEach(r=>r(n))},this.value=t,this.listeners=new Set}}const Kce=Symbol("mui.api_private"),Wkt=e=>e.isPropagationStopped!==void 0;let lK=0;function Gkt(e){var o;const t=(o=e.current)==null?void 0:o[Kce];if(t)return t;const n={},r={state:n,store:Qz.create(n),instanceId:{id:lK}};return lK+=1,r.getPublicApi=()=>e.current,r.register=(i,a)=>{Object.keys(a).forEach(s=>{const l=a[s],c=r[s];if((c==null?void 0:c.spying)===!0?c.target=l:r[s]=l,i==="public"){const u=e.current,d=u[s];(d==null?void 0:d.spying)===!0?d.target=l:u[s]=l}})},r.register("private",{caches:{},eventManager:new Ukt}),r}function qkt(e){return{get state(){return e.current.state},get store(){return e.current.store},get instanceId(){return e.current.instanceId},[Kce]:e.current}}function Kkt(e,t){var a;const n=y.useRef(),r=y.useRef();r.current||(r.current=Gkt(n)),n.current||(n.current=qkt(r));const o=y.useCallback((...s)=>{const[l,c,u={}]=s;if(u.defaultMuiPrevented=!1,Wkt(u)&&u.isPropagationStopped())return;const d=t.signature===ol.DataGridPro||t.signature===ol.DataGridPremium?{api:r.current.getPublicApi()}:{};r.current.eventManager.emit(l,c,u,d)},[r,t.signature]),i=y.useCallback((s,l,c)=>{r.current.eventManager.on(s,l,c);const u=r.current;return()=>{u.eventManager.removeListener(s,l)}},[r]);return Jt(r,{subscribeEvent:i,publishEvent:o},"public"),e&&!((a=e.current)!=null&&a.state)&&(e.current=n.current),y.useImperativeHandle(e,()=>n.current,[n]),y.useEffect(()=>{const s=r.current;return()=>{s.publishEvent("unmount")}},[r]),r}const Ykt=(e,t)=>{const n=y.useCallback(r=>{if(t.localeText[r]==null)throw new Error(`Missing translation for key ${r}.`);return t.localeText[r]},[t.localeText]);e.current.register("public",{getLocaleText:n})};function nS(e){"@babel/helpers - typeof";return nS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nS(e)}function Xkt(e,t){if(nS(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nS(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function rS(e){var t=Xkt(e,"string");return nS(t)=="symbol"?t:t+""}const Qkt=e=>{const t=y.useRef({}),n=y.useRef(!1),r=y.useCallback(u=>{n.current||!u||(n.current=!0,Object.values(u.appliers).forEach(d=>{d()}),n.current=!1)},[]),o=y.useCallback((u,d,f)=>{t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}});const p=t.current[u];return p.processors.get(d)!==f&&(p.processors.set(d,f),p.processorsAsArray=Array.from(t.current[u].processors.values()),r(p)),()=>{t.current[u].processors.delete(d),t.current[u].processorsAsArray=Array.from(t.current[u].processors.values())}},[r]),i=y.useCallback((u,d,f)=>(t.current[u]||(t.current[u]={processors:new Map,processorsAsArray:[],appliers:{}}),t.current[u].appliers[d]=f,()=>{const p=t.current[u].appliers,m=At(p,[d].map(rS));t.current[u].appliers=m}),[]),a=y.useCallback(u=>{r(t.current[u])},[r]),s=y.useCallback((...u)=>{const[d,f,p]=u;if(!t.current[d])return f;const m=t.current[d].processorsAsArray;let g=f;for(let v=0;v{const r=y.useRef(),o=y.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=y.useCallback(()=>{r.current=e.current.registerPipeProcessor(t,o.current,n)},[e,n,t]);y1(()=>{i()});const a=y.useRef(!0);y.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},Jz=(e,t,n)=>{const r=y.useRef(),o=y.useRef(`mui-${Math.round(Math.random()*1e9)}`),i=y.useCallback(()=>{r.current=e.current.registerPipeApplier(t,o.current,n)},[e,n,t]);y1(()=>{i()});const a=y.useRef(!0);y.useEffect(()=>(a.current?a.current=!1:i(),()=>{r.current&&(r.current(),r.current=null)}),[i])},CO=(e,t,n,r)=>{const o=y.useCallback(()=>{e.current.registerStrategyProcessor(t,n,r)},[e,r,n,t]);y1(()=>{o()});const i=y.useRef(!0);y.useEffect(()=>{i.current?i.current=!1:o()},[o])},zh="none",cK={rowTreeCreation:"rowTree",filtering:"rowTree",sorting:"rowTree",visibleRowsLookupCreation:"rowTree"},Jkt=e=>{const t=y.useRef(new Map),n=y.useRef({}),r=y.useCallback((l,c,u)=>{const d=()=>{const m=n.current[c],g=At(m,[l].map(rS));n.current[c]=g};n.current[c]||(n.current[c]={});const f=n.current[c],p=f[l];return f[l]=u,!p||p===u||l===e.current.getActiveStrategy(cK[c])&&e.current.publishEvent("activeStrategyProcessorChange",c),d},[e]),o=y.useCallback((l,c)=>{const u=e.current.getActiveStrategy(cK[l]);if(u==null)throw new Error("Can't apply a strategy processor before defining an active strategy");const d=n.current[l];if(!d||!d[u])throw new Error(`No processor found for processor "${l}" on strategy "${u}"`);const f=d[u];return f(c)},[e]),i=y.useCallback(l=>{const u=Array.from(t.current.entries()).find(([,d])=>d.group!==l?!1:d.isAvailable());return(u==null?void 0:u[0])??zh},[]),a=y.useCallback((l,c,u)=>{t.current.set(c,{group:l,isAvailable:u}),e.current.publishEvent("strategyAvailabilityChange")},[e]);Jt(e,{registerStrategyProcessor:r,applyStrategyProcessor:o,getActiveStrategy:i,setStrategyAvailability:a},"private")},Zkt=e=>{const t=y.useRef({}),[,n]=y.useState(),r=y.useCallback(c=>{t.current[c.stateId]=c},[]),o=y.useCallback((c,u)=>{let d;if(Xle(c)?d=c(e.current.state):d=c,e.current.state===d)return!1;let f=!1;const p=[];if(Object.keys(t.current).forEach(m=>{const g=t.current[m],v=g.stateSelector(e.current.state,e.current.instanceId),w=g.stateSelector(d,e.current.instanceId);w!==v&&(p.push({stateId:g.stateId,hasPropChanged:w!==g.propModel}),g.propModel!==void 0&&w!==g.propModel&&(f=!0))}),p.length>1)throw new Error(`You're not allowed to update several sub-state in one transaction. You already updated ${p[0].stateId}, therefore, you're not allowed to update ${p.map(m=>m.stateId).join(", ")} in the same transaction.`);if(f||(e.current.state=d,e.current.publishEvent("stateChange",d),e.current.store.update(d)),p.length===1){const{stateId:m,hasPropChanged:g}=p[0],v=t.current[m],w=v.stateSelector(d,e.current.instanceId);v.propOnChange&&g&&v.propOnChange(w,{reason:u,api:e.current}),f||e.current.publishEvent(v.changeEvent,w,{reason:u})}return!f},[e]),i=y.useCallback((c,u,d)=>e.current.setState(f=>W({},f,{[c]:u(f[c])}),d),[e]),a=y.useCallback(()=>n(()=>e.current.state),[e]),s={setState:o,forceUpdate:a},l={updateControlState:i,registerControlState:r};Jt(e,s,"public"),Jt(e,l,"private")},eMt=(e,t)=>{const n=Kkt(e,t);return jkt(n),Bkt(n),Hkt(n,t),Zkt(n),Qkt(n),Jkt(n),Ykt(n,t),n.current.register("private",{rootProps:t}),n},Bo=(e,t,n)=>{const r=y.useRef(!1);r.current||(t.current.state=e(t.current.state,n,t),r.current=!0)};function nL(e,t){if(e==null)return"";const n=typeof e=="string"?e:`${e}`;if(t.shouldAppendQuotes||t.escapeFormulas){const r=n.replace(/"/g,'""');return t.escapeFormulas&&["=","+","-","@"," ","\r"].includes(r[0])?`"'${r}"`:[t.delimiter,` +`,"\r",'"'].some(o=>n.includes(o))?`"${r}"`:r}return n}const Yce=(e,t)=>{var i,a;const{csvOptions:n,ignoreValueFormatter:r}=t;let o;if(r){const s=e.colDef.type;s==="number"?o=String(e.value):s==="date"||s==="dateTime"?o=(i=e.value)==null?void 0:i.toISOString():typeof((a=e.value)==null?void 0:a.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return nL(o,n)};class rL{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.csvOptions.delimiter),typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.csvOptions):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const tMt=({id:e,columns:t,getCellParams:n,csvOptions:r,ignoreValueFormatter:o})=>{const i=new rL({csvOptions:r});return t.forEach(a=>{const s=n(e,a.field);i.addValue(Yce(s,{ignoreValueFormatter:o,csvOptions:r}))}),i.getRowString()};function nMt(e){const{columns:t,rowIds:n,csvOptions:r,ignoreValueFormatter:o,apiRef:i}=e,a=n.reduce((d,f)=>`${d}${tMt({id:f,columns:t,getCellParams:i.current.getCellParams,ignoreValueFormatter:o,csvOptions:r})}\r +`,"").trim();if(!r.includeHeaders)return a;const s=t.filter(d=>d.field!==kb.field),l=[];if(r.includeColumnGroupsHeaders){const d=i.current.getAllGroupDetails();let f=0;const p=s.reduce((m,g)=>{const v=i.current.getColumnGroupPath(g.field);return m[g.field]=v,f=Math.max(f,v.length),m},{});for(let m=0;m{const w=(p[v.field]||[])[m],x=d[w];g.addValue(x?x.headerName||x.groupId:"")})}}const c=new rL({csvOptions:r,sanitizeCellValue:nL});return s.forEach(d=>{c.addValue(d.headerName||d.field)}),l.push(c),`${`${l.map(d=>d.getRowString()).join(`\r `)}\r -`}${a}`.trim()}function Zq(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function $kt(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{Zq(e)}):Zq(e)}function Rkt(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const _kt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=y.useCallback(a=>{if(!DOt(a)||Rkt(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=Fa(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=Rce(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&($kt(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);ece(e,e.current.rootElementRef,"keydown",i),lr(e,"clipboardCopy",t.onClipboardCopy)},Dkt=e=>W({},e,{columnMenu:{open:!1}}),Nkt=e=>{const t=No(e,"useGridColumnMenu"),n=y.useCallback(a=>{const s=HP(e.current.state),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),W({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=y.useCallback(()=>{const a=HP(e.current.state);if(a.field){const c=ud(e),u=Qs(e),d=_u(e);let f=a.field;if(c[f]||(f=d[0]),u[f]===!1){const h=d.filter(g=>g===f?!0:u[g]!==!1),m=h.indexOf(f);f=h[m+1]||h[m-1]}e.current.setColumnHeaderFocus(f)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&(e.current.setState(c=>(t.debug("Hiding Column Menu"),W({},c,{columnMenu:s}))),e.current.forceUpdate())},[e,t]),o=y.useCallback(a=>{t.debug("Toggle Column Menu");const s=HP(e.current.state);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);Jt(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),ht(e,"columnResizeStart",r),ht(e,"virtualScrollerWheel",e.current.hideColumnMenu),ht(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},Lkt=(e,t,n)=>{var o,i,a;const r=lg({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return W({},e,{columns:r,pinnedColumns:e.pinnedColumns??BN})};function Fkt(e,t){var I,R;const n=No(e,"useGridColumns"),r=y.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Qs,changeEvent:"columnVisibilityModelChange"});const o=y.useCallback(N=>{var L,B;n.debug("Updating columns state."),e.current.setState(eK(N)),e.current.publishEvent("columnsChange",N.orderedFields),(B=(L=e.current).updateRenderContext)==null||B.call(L),e.current.forceUpdate()},[n,e]),i=y.useCallback(N=>ud(e)[N],[e]),a=y.useCallback(()=>Xl(e),[e]),s=y.useCallback(()=>yo(e),[e]),l=y.useCallback((N,L=!0)=>(L?yo(e):Xl(e)).findIndex(_=>_.field===N),[e]),c=y.useCallback(N=>{const L=l(N);return Qf(e)[L]},[e,l]),u=y.useCallback(N=>{var B,_;Qs(e)!==N&&(e.current.setState(D=>W({},D,{columns:lg({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),(_=(B=e.current).updateRenderContext)==null||_.call(B),e.current.forceUpdate())},[e]),d=y.useCallback(N=>{const L=lg({apiRef:e,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(L)},[e,o]),f=y.useCallback((N,L)=>{const B=Qs(e),_=B[N]??!0;if(L!==_){const D=W({},B,{[N]:L});e.current.setColumnVisibilityModel(D)}},[e]),h=y.useCallback(N=>_u(e).findIndex(B=>B===N),[e]),m=y.useCallback((N,L)=>{const B=_u(e),_=h(N);if(_===L)return;n.debug(`Moving column ${N} to index ${L}`);const D=[...B],z=D.splice(_,1)[0];D.splice(L,0,z),o(W({},_c(e.current.state),{orderedFields:D}));const F={column:e.current.getColumn(N),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:_};e.current.publishEvent("columnIndexChange",F)},[e,n,o,h]),g=y.useCallback((N,L)=>{n.debug(`Updating column ${N} width to ${L}`);const B=_c(e.current.state),_=B.lookup[N],D=W({},_,{width:L,hasBeenResized:!0});o(VN(W({},B,{lookup:W({},B.lookup,{[N]:D})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(N),colDef:D,width:L})},[e,n,o]),v={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:h,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:g},w={setColumnIndex:m};Jt(e,v,"public"),Jt(e,w,t.signature===rl.DataGrid?"private":"public");const x=y.useCallback((N,L)=>{var H,U;const B={},_=Qs(e);(!L.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((U=(H=t.initialState)==null?void 0:H.columns)==null?void 0:U.columnVisibilityModel)??{}).length>0||Object.keys(_).length>0)&&(B.columnVisibilityModel=_),B.orderedFields=_u(e);const z=Xl(e),F={};return z.forEach(q=>{if(q.hasBeenResized){const Y={};dce.forEach(ae=>{let Z=q[ae];Z===1/0&&(Z=-1),Y[ae]=Z}),F[q.field]=Y}}),Object.keys(F).length>0&&(B.dimensions=F),W({},N,{columns:B})},[e,t.columnVisibilityModel,(I=t.initialState)==null?void 0:I.columns]),S=y.useCallback((N,L)=>{var z;const B=(z=L.stateToRestore.columns)==null?void 0:z.columnVisibilityModel,_=L.stateToRestore.columns;if(B==null&&_==null)return N;const D=lg({apiRef:e,columnsToUpsert:[],initialState:_,columnVisibilityModel:B,keepOnlyColumnsToUpsert:!1});return e.current.setState(eK(D)),_!=null&&e.current.publishEvent("columnsChange",D.orderedFields),N},[e]),P=y.useCallback((N,L)=>{var B;if(L===Ah.columns){const _=t.slots.columnsPanel;return $.jsx(_,W({},(B=t.slotProps)==null?void 0:B.columnsPanel))}return N},[t.slots.columnsPanel,(R=t.slotProps)==null?void 0:R.columnsPanel]),T=y.useCallback(N=>t.disableColumnSelector?N:[...N,"columnMenuColumnsItem"],[t.disableColumnSelector]);Ar(e,"columnMenu",T),Ar(e,"exportState",x),Ar(e,"restoreState",S),Ar(e,"preferencePanel",P);const E=y.useRef(null);ht(e,"viewportInnerSizeChange",N=>{E.current!==N.width&&(E.current=N.width,o(VN(_c(e.current.state),e.current.getRootDimensions())))});const k=y.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=lg({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,n,o]);Hz(e,"hydrateColumns",k);const A=y.useRef(!0);y.useEffect(()=>{if(A.current){A.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const N=lg({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});r.current=t.columns,o(N)},[n,e,o,t.columns]),y.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function eK(e){return t=>W({},t,{columns:e})}const jkt=(e,t)=>{var n;return W({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},Bkt=(e,t)=>{var s;const n=No(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:_g,changeEvent:"densityChange"});const o={setDensity:wr(l=>{_g(e.current.state)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>W({},u,{density:l})))})};Jt(e,o,"public");const i=y.useCallback((l,c)=>{var f;const u=_g(e.current.state);return!c.exportOnlyDirtyModels||t.density!=null||((f=t.initialState)==null?void 0:f.density)!=null?W({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=y.useCallback((l,c)=>{var d;const u=(d=c.stateToRestore)!=null&&d.density?c.stateToRestore.density:_g(e.current.state);return e.current.setState(f=>W({},f,{density:u})),l},[e]);Ar(e,"exportState",i),Ar(e,"restoreState",a),y.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function zkt(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const _ce=({apiRef:e,options:t})=>{const n=Xl(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:yo(e)).filter(o=>!o.disableExport)},Dce=({apiRef:e})=>{var l,c;const t=Xle(e),n=xi(e),r=e.current.getSelectedRows(),o=t.filter(u=>n[u].type!=="footer"),i=am(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter(u=>r.has(u)):o},Vkt=(e,t)=>{const n=No(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=y.useCallback((c={})=>{n.debug("Get data as CSV");const u=_ce({apiRef:e,options:c}),f=(c.getRowsToExport??Dce)({apiRef:e});return Akt({columns:u,rowIds:f,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=y.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});zkt(d,"csv",c==null?void 0:c.fileName)},[n,i]);Jt(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=y.useCallback((c,u)=>{var d;return(d=u.csvOptions)!=null&&d.disableToolbarButton?c:[...c,{component:$.jsx(NIt,{options:u.csvOptions}),componentName:"csvExport"}]},[]);Ar(e,"exportMenu",l)},WP=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=tce(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=JCt(r.page,s);return l!==r.page&&(r=W({},r,{page:l})),rce(r.pageSize,t),r},Hkt=(e,t)=>{var m,g;const n=No(e,"useGridPaginationModel"),r=Ye(e,o1),o=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Fi,changeEvent:"paginationModelChange"});const i=y.useCallback(v=>{const w=Fi(e);v!==w.page&&(n.debug(`Setting page to ${v}`),e.current.setPaginationModel({page:v,pageSize:w.pageSize}))},[e,n]),a=y.useCallback(v=>{const w=Fi(e);v!==w.pageSize&&(n.debug(`Setting page size to ${v}`),e.current.setPaginationModel({pageSize:v,page:w.page}))},[e,n]),s=y.useCallback(v=>{const w=Fi(e);v!==w&&(n.debug("Setting 'paginationModel' to",v),e.current.setState(x=>W({},x,{pagination:W({},x.pagination,{paginationModel:WP(x.pagination,t.signature,v)})})))},[e,n,t.signature]);Jt(e,{setPage:i,setPageSize:a,setPaginationModel:s},"public");const c=y.useCallback((v,w)=>{var P,T;const x=Fi(e);return!w.exportOnlyDirtyModels||t.paginationModel!=null||((T=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:T.paginationModel)!=null||x.page!==0&&x.pageSize!==QCt(t.autoPageSize)?W({},v,{pagination:W({},v.pagination,{paginationModel:x})}):v},[e,t.paginationModel,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.paginationModel,t.autoPageSize]),u=y.useCallback((v,w)=>{var S,P;const x=(S=w.stateToRestore.pagination)!=null&&S.paginationModel?W({},nce(t.autoPageSize),(P=w.stateToRestore.pagination)==null?void 0:P.paginationModel):Fi(e);return e.current.setState(T=>W({},T,{pagination:W({},T.pagination,{paginationModel:WP(T.pagination,t.signature,x)})})),v},[e,t.autoPageSize,t.signature]);Ar(e,"exportState",c),Ar(e,"restoreState",u);const d=()=>{var w;const v=Fi(e);(w=e.current.virtualScrollerRef)!=null&&w.current&&e.current.scrollToIndexes({rowIndex:v.page*v.pageSize})},f=y.useCallback(()=>{if(!t.autoPageSize)return;const v=e.current.getRootDimensions(),w=Math.floor(v.viewportInnerSize.height/o);e.current.setPageSize(w)},[e,t.autoPageSize,o]),h=y.useCallback(v=>{if(v==null)return;const w=Fi(e),x=oce(e);w.page>x-1&&e.current.setPage(Math.max(0,x-1))},[e]);ht(e,"viewportInnerSizeChange",f),ht(e,"paginationModelChange",d),ht(e,"rowCountChange",h),y.useEffect(()=>{e.current.setState(v=>W({},v,{pagination:W({},v.pagination,{paginationModel:WP(v.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),y.useEffect(f,[f])};function Ukt(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function Wkt(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const Gkt=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=No(e,"useGridPrintExport"),o=y.useRef(null),i=y.useRef(null),a=y.useRef({}),s=y.useRef([]),l=y.useRef();y.useEffect(()=>{o.current=wf(e.current.rootElementRef.current)},[e,n]);const c=y.useCallback((v,w,x)=>new Promise(S=>{const P=_ce({apiRef:e,options:{fields:v,allColumns:w}}).map(O=>O.field),T=Xl(e),E={};T.forEach(O=>{E[O.field]=P.includes(O.field)}),x&&(E[wb.field]=!0),e.current.setColumnVisibilityModel(E),S()}),[e]),u=y.useCallback(v=>{const x=v({apiRef:e}).reduce((S,P)=>{const T=e.current.getRow(P);return T[iy]||S.push(T),S},[]);e.current.setRows(x)},[e]),d=y.useCallback((v,w)=>{var B,_,D,z;const x=W({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),S=v.contentDocument;if(!S)return;const P=xb(e.current.state),T=e.current.rootElementRef.current,E=T.cloneNode(!0),O=E.querySelector(`.${se.main}`);O.style.overflow="visible",E.style.contain="size";let k=((B=T.querySelector(`.${se.toolbarContainer}`))==null?void 0:B.offsetHeight)||0,A=((_=T.querySelector(`.${se.footerContainer}`))==null?void 0:_.offsetHeight)||0;x.hideToolbar&&((D=E.querySelector(`.${se.toolbarContainer}`))==null||D.remove(),k=0),x.hideFooter&&((z=E.querySelector(`.${se.footerContainer}`))==null||z.remove(),A=0);const I=P.currentPageTotalHeight+Dz(e,t)+k+A;if(E.style.height=`${I}px`,E.style.boxSizing="content-box",!x.hideFooter){const F=E.querySelector(`.${se.footerContainer}`);F.style.position="absolute",F.style.width="100%",F.style.top=`${I-A}px`}const R=document.createElement("div");R.appendChild(E),S.body.style.marginTop="0px",S.body.innerHTML=R.innerHTML;const N=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof N=="string"){const F=S.createElement("style");F.appendChild(S.createTextNode(N)),S.head.appendChild(F)}x.bodyClassName&&S.body.classList.add(...x.bodyClassName.split(" "));const L=[];if(x.copyStyles){const F=T.getRootNode(),U=(F.constructor.name==="ShadowRoot"?F:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let q=0;q{ae.addEventListener("load",()=>Z())})),S.head.appendChild(ae)}}}Promise.all(L).then(()=>{v.contentWindow.print()})},[e,o,t]),f=y.useCallback(v=>{var w,x;o.current.body.removeChild(v),e.current.restoreState(i.current||{}),(x=(w=i.current)==null?void 0:w.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(S=>W({},S,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),m={exportDataAsPrint:y.useCallback(async v=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=Qs(e),s.current=e.current.getSortedRows().filter(x=>!x[iy]),t.pagination){const S={page:0,pageSize:kz(e)};e.current.setState(P=>W({},P,{pagination:W({},P.pagination,{paginationModel:WP(P.pagination,"DataGridPro",S)})}))}l.current=e.current.state.virtualization,e.current.setState(x=>W({},x,{virtualization:W({},x.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(v==null?void 0:v.fields,v==null?void 0:v.allColumns,v==null?void 0:v.includeCheckboxes),u((v==null?void 0:v.getRowsToExport)??Dce),await Ukt();const w=Wkt(v==null?void 0:v.fileName);w.onload=()=>{d(w,v),w.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&f(w)})},o.current.body.appendChild(w)},[t,r,e,d,f,c,u])};Jt(e,m,"public");const g=y.useCallback((v,w)=>{var x;return(x=w.printOptions)!=null&&x.disableToolbarButton?v:[...v,{component:$.jsx(LIt,{options:w.printOptions}),componentName:"printExport"}]},[]);Ar(e,"exportMenu",g)},qkt=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??Wx();return W({},e,{filter:{filterModel:Ez(r,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},Kkt=e=>e.filteredRowsLookup;function tK(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Ykt(){return Ole(Object.values)}const Xkt=(e,t)=>{var A,I,R;const n=No(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:ei,changeEvent:"filterModelChange"});const r=y.useCallback(()=>{e.current.setState(N=>{const L=ei(N,e.current.instanceId),B=e.current.getFilterState(L),_=W({},N,{filter:W({},N.filter,B)}),D=tK(e,_);return W({},_,{visibleRowsLookup:D})}),e.current.publishEvent("filteredRowsSet")},[e]),o=y.useCallback((N,L)=>L==null||L.filterable===!1||t.disableColumnFilter?N:[...N,"columnMenuFilterItem"],[t.disableColumnFilter]),i=y.useCallback(()=>{r(),e.current.forceUpdate()},[e,r]),a=y.useCallback(N=>{const L=ei(e),B=[...L.items],_=B.findIndex(D=>D.id===N.id);_===-1?B.push(N):B[_]=N,e.current.setFilterModel(W({},L,{items:B}),"upsertFilterItem")},[e]),s=y.useCallback(N=>{const L=ei(e),B=[...L.items];N.forEach(_=>{const D=B.findIndex(z=>z.id===_.id);D===-1?B.push(_):B[D]=_}),e.current.setFilterModel(W({},L,{items:B}),"upsertFilterItems")},[e]),l=y.useCallback(N=>{const L=ei(e),B=L.items.filter(_=>_.id!==N.id);B.length!==L.items.length&&e.current.setFilterModel(W({},L,{items:B}),"deleteFilterItem")},[e]),c=y.useCallback((N,L,B)=>{if(n.debug("Displaying filter panel"),N){const _=ei(e),D=_.items.filter(U=>{var Z;if(U.value!==void 0)return!(Array.isArray(U.value)&&U.value.length===0);const Y=(Z=e.current.getColumn(U.field).filterOperators)==null?void 0:Z.find(K=>K.value===U.operator);return!(typeof(Y==null?void 0:Y.requiresFilterValue)>"u"?!0:Y==null?void 0:Y.requiresFilterValue)});let z;const F=D.find(U=>U.field===N),H=e.current.getColumn(N);F?z=D:t.disableMultipleColumnsFiltering?z=[zN({field:N,operator:H.filterOperators[0].value},e)]:z=[...D,zN({field:N,operator:H.filterOperators[0].value},e)],e.current.setFilterModel(W({},_,{items:z}))}e.current.showPreferences(Ah.filters,L,B)},[e,n,t.disableMultipleColumnsFiltering]),u=y.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),d=y.useCallback(N=>{const L=ei(e);L.logicOperator!==N&&e.current.setFilterModel(W({},L,{logicOperator:N}),"changeLogicOperator")},[e]),f=y.useCallback(N=>{const L=ei(e);oy(L.quickFilterValues,N)||e.current.setFilterModel(W({},L,{quickFilterValues:[...N]}))},[e]),h=y.useCallback((N,L)=>{ei(e)!==N&&(n.debug("Setting filter model"),e.current.updateControlState("filter",pq(N,t.disableMultipleColumnsFiltering,e),L),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),m=y.useCallback(N=>{const L=Ez(N,t.disableMultipleColumnsFiltering,e),B=t.filterMode==="client"?q1t(L,e,t.disableEval):null,_=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:B,filterModel:L??Wx()});return W({},_,{filterModel:L})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:a,upsertFilterItems:s,setFilterModel:h,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};Jt(e,g,"public");const v=y.useCallback((N,L)=>{var D,z;const B=ei(e);return!L.exportOnlyDirtyModels||t.filterModel!=null||((z=(D=t.initialState)==null?void 0:D.filter)==null?void 0:z.filterModel)!=null||!oy(B,Wx())?W({},N,{filter:{filterModel:B}}):N},[e,t.filterModel,(I=(A=t.initialState)==null?void 0:A.filter)==null?void 0:I.filterModel]),w=y.useCallback((N,L)=>{var _;const B=(_=L.stateToRestore.filter)==null?void 0:_.filterModel;return B==null?N:(e.current.updateControlState("filter",pq(B,t.disableMultipleColumnsFiltering,e),"restoreState"),W({},N,{callbacks:[...N.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=y.useCallback((N,L)=>{var B;if(L===Ah.filters){const _=t.slots.filterPanel;return $.jsx(_,W({},(B=t.slotProps)==null?void 0:B.filterPanel))}return N},[t.slots.filterPanel,(R=t.slotProps)==null?void 0:R.filterPanel]),{getRowId:S}=t,P=Jc(Ykt),T=y.useCallback(N=>{if(t.filterMode!=="client"||!N.isRowMatchingFilters)return{filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}};const L=sf(e),B={},{isRowMatchingFilters:_}=N,D={},z={passingFilterItems:null,passingQuickFilterValues:null},F=P.current(e.current.state.rows.dataRowIdToModelLookup);for(let q=0;q{n.debug("onColUpdated - GridColumns changed, applying filters");const N=ei(e),L=ud(e),B=N.items.filter(_=>_.field&&L[_.field]);B.length{N==="filtering"&&e.current.unstable_applyFilters()},[e]),k=y.useCallback(()=>{e.current.setState(N=>W({},N,{visibleRowsLookup:tK(e,N)})),e.current.forceUpdate()},[e]);ht(e,"rowsSet",r),ht(e,"columnsChange",E),ht(e,"activeStrategyProcessorChange",O),ht(e,"rowExpansionChange",k),ht(e,"columnVisibilityModelChange",()=>{const N=ei(e);N.quickFilterValues&&Ble(N)&&e.current.unstable_applyFilters()}),s1(()=>{e.current.unstable_applyFilters()}),$o(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},Qkt=e=>W({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),Jkt=(e,t)=>{const n=No(e,"useGridFocus"),r=y.useRef(null),o=e.current.rootElementRef.current!==null,i=y.useCallback((k,A)=>{k&&e.current.getRow(k.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(k.id,k.field),A)},[e]),a=y.useCallback((k,A)=>{const I=Fa(e);(I==null?void 0:I.id)===k&&(I==null?void 0:I.field)===A||(e.current.setState(R=>(n.debug(`Focusing on cell with id=${k} and field=${A}`),W({},R,{tabIndex:{cell:{id:k,field:A},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:k,field:A},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(k)&&(I&&i(I,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(k,A))))},[e,n,i]),s=y.useCallback((k,A={})=>{const I=Fa(e);i(I,A),e.current.setState(R=>(n.debug(`Focusing on column header with colIndex=${k}`),W({},R,{tabIndex:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),l=y.useCallback((k,A={})=>{const I=Fa(e);i(I,A),e.current.setState(R=>(n.debug(`Focusing on column header filter with colIndex=${k}`),W({},R,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),c=y.useCallback((k,A,I={})=>{const R=Fa(e);R&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(R.id,R.field),I),e.current.setState(N=>W({},N,{tabIndex:{columnGroupHeader:{field:k,depth:A},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:k,depth:A},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=y.useCallback(()=>sO(e),[e]),d=y.useCallback((k,A,I)=>{let R=e.current.getColumnIndex(A);const N=yo(e),L=sy(e,{pagination:t.pagination,paginationMode:t.paginationMode}),B=am(e),_=[].concat(B.top||[],L.rows,B.bottom||[]);let D=_.findIndex(U=>U.id===k);I==="right"?R+=1:I==="left"?R-=1:D+=1,R>=N.length?(D+=1,D<_.length&&(R=0)):R<0&&(D-=1,D>=0&&(R=N.length-1)),D=Dc(D,0,_.length-1);const z=_[D];if(!z)return;const F=e.current.unstable_getCellColSpanInfo(z.id,R);F&&F.spannedByColSpan&&(I==="left"||I==="below"?R=F.leftVisibleCellIndex:I==="right"&&(R=F.rightVisibleCellIndex)),R=Dc(R,0,N.length-1);const H=N[R];e.current.setCellFocus(z.id,H.field)},[e,t.pagination,t.paginationMode]),f=y.useCallback(({id:k,field:A})=>{e.current.setCellFocus(k,A)},[e]),h=y.useCallback((k,A)=>{A.key==="Enter"||A.key==="Tab"||A.key==="Shift"||uO(A.key)||e.current.setCellFocus(k.id,k.field)},[e]),m=y.useCallback(({field:k},A)=>{A.target===A.currentTarget&&e.current.setColumnHeaderFocus(k,A)},[e]),g=y.useCallback(({fields:k,depth:A},I)=>{if(I.target!==I.currentTarget)return;const R=sO(e);R!==null&&R.depth===A&&k.includes(R.field)||e.current.setColumnGroupHeaderFocus(k[0],A,I)},[e]),v=y.useCallback((k,A)=>{var I,R;(R=(I=A.relatedTarget)==null?void 0:I.getAttribute("class"))!=null&&R.includes(se.columnHeader)||(n.debug("Clearing focus"),e.current.setState(N=>W({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=y.useCallback(k=>{r.current=k},[]),x=y.useCallback(k=>{const A=r.current;r.current=null;const I=Fa(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:k,cell:A}))return;if(!I){A&&e.current.setCellFocus(A.id,A.field);return}if((A==null?void 0:A.id)===I.id&&(A==null?void 0:A.field)===I.field)return;const N=e.current.getCellElement(I.id,I.field);N!=null&&N.contains(k.target)||(A?e.current.setCellFocus(A.id,A.field):(e.current.setState(L=>W({},L,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),i(I,k)))},[e,i]),S=y.useCallback(k=>{if(k.cellMode==="view")return;const A=Fa(e);((A==null?void 0:A.id)!==k.id||(A==null?void 0:A.field)!==k.field)&&e.current.setCellFocus(k.id,k.field)},[e]),P=y.useCallback(()=>{var A;const k=Fa(e);if(k&&!e.current.getRow(k.id)){const I=(A=Fa(e))==null?void 0:A.id;let R=null;if(typeof I<"u"){const N=e.current.getRowIndexRelativeToVisibleRows(I),L=sy(e,{pagination:t.pagination,paginationMode:t.paginationMode}),B=L.rows[Dc(N,0,L.rows.length-1)];R=(B==null?void 0:B.id)??null}e.current.setState(N=>W({},N,{focus:{cell:R===null?null:{id:R,field:k.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),T=wr(()=>{const k=Fa(e);if(!k)return;const A=sy(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(A.rows.find(N=>N.id===k.id))return;const R=yo(e);e.current.setState(N=>W({},N,{tabIndex:{cell:{id:A.rows[0].id,field:R[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),E={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},O={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};Jt(e,E,"public"),Jt(e,O,"private"),y.useEffect(()=>{const k=wf(e.current.rootElementRef.current);return k.addEventListener("mouseup",x),()=>{k.removeEventListener("mouseup",x)}},[e,o,x]),ht(e,"columnHeaderBlur",v),ht(e,"cellDoubleClick",f),ht(e,"cellMouseDown",w),ht(e,"cellKeyDown",h),ht(e,"cellModeChange",S),ht(e,"columnHeaderFocus",m),ht(e,"columnGroupHeaderFocus",g),ht(e,"rowsSet",P),ht(e,"paginationModelChange",T)},Zkt=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},eMt=e=>e===Gle||Zkt(e)!==null;function tMt(e,t){const n=am(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const MR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},AR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a{const n=No(e,"useGridKeyboardNavigation"),r=Zf(e,t).rows,o=nr(),i=t.unstable_listView,a=y.useMemo(()=>tMt(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.headerFilters,l=y.useCallback((x,S,P="left",T="up")=>{const E=Jf(e),O=e.current.unstable_getCellColSpanInfo(S,x);O&&O.spannedByColSpan&&(P==="left"?x=O.leftVisibleCellIndex:P==="right"&&(x=O.rightVisibleCellIndex));const k=i?vv(e.current.state).field:yb(e)[x],A=nMt(e,S,k,T),I=E.findIndex(R=>R.id===A);n.debug(`Navigating to cell row ${I}, col ${x}`),e.current.scrollToIndexes({colIndex:x,rowIndex:I}),e.current.setCellFocus(A,k)},[e,n,i]),c=y.useCallback((x,S)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFocus(P,S)},[e,n]),u=y.useCallback((x,S)=>{n.debug(`Navigating to header filter col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFilterFocus(P,S)},[e,n]),d=y.useCallback((x,S,P)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const{field:T}=e.current.getVisibleColumns()[x];e.current.setColumnGroupHeaderFocus(T,S,P)},[e,n]),f=y.useCallback(x=>{var S;return(S=a[x])==null?void 0:S.id},[a]),h=y.useCallback((x,S)=>{const P=S.currentTarget.querySelector(`.${se.columnHeaderTitleContainerContent}`);if(!!P&&P.contains(S.target)&&x.field!==wb.field)return;const E=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=a.length>0?0:null,A=a.length-1,I=0,R=yo(e).length-1,N=l1(e);let L=!0;switch(S.key){case"ArrowDown":{k!==null&&(s?u(O,S):l(O,f(k)));break}case"ArrowRight":{const B=AR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});B!==null&&c(B,S);break}case"ArrowLeft":{const B=MR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});B!==null&&c(B,S);break}case"ArrowUp":{N>0&&d(O,N-1,S);break}case"PageDown":{k!==null&&A!==null&&l(O,f(Math.min(k+E,A)));break}case"Home":{c(I,S);break}case"End":{c(R,S);break}case"Enter":{(S.ctrlKey||S.metaKey)&&e.current.toggleColumnMenu(x.field);break}case" ":break;default:L=!1}L&&S.preventDefault()},[e,a.length,s,u,l,f,o,c,d]),m=y.useCallback((x,S)=>{const P=FPt(e)===x.field,T=jPt(e)===x.field;if(P||T||!uO(S.key))return;const E=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=0,A=a.length-1,I=0,R=yo(e).length-1;let N=!0;switch(S.key){case"ArrowDown":{const L=f(k);L!=null&&l(O,L);break}case"ArrowRight":{const L=AR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});L!==null&&u(L,S);break}case"ArrowLeft":{const L=MR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});L!==null?u(L,S):e.current.setColumnHeaderFilterFocus(x.field,S);break}case"ArrowUp":{c(O,S);break}case"PageDown":{A!==null&&l(O,f(Math.min(k+E,A)));break}case"Home":{u(I,S);break}case"End":{u(R,S);break}case" ":break;default:N=!1}N&&S.preventDefault()},[e,a.length,u,o,c,l,f]),g=y.useCallback((x,S)=>{const P=sO(e);if(P===null)return;const{field:T,depth:E}=P,{fields:O,depth:k,maxDepth:A}=x,I=e.current.getViewportPageSize(),R=e.current.getColumnIndex(T),N=T?e.current.getColumnIndex(T):0,L=0,B=a.length-1,_=0,D=yo(e).length-1;let z=!0;switch(S.key){case"ArrowDown":{k===A-1?c(R,S):d(R,E+1,S);break}case"ArrowUp":{k>0&&d(R,E-1,S);break}case"ArrowRight":{const F=O.length-O.indexOf(T)-1;R+F+1<=D&&d(R+F+1,E,S);break}case"ArrowLeft":{const F=O.indexOf(T);R-F-1>=_&&d(R-F-1,E,S);break}case"PageDown":{B!==null&&l(N,f(Math.min(L+I,B)));break}case"Home":{d(_,E,S);break}case"End":{d(D,E,S);break}case" ":break;default:z=!1}z&&S.preventDefault()},[e,a.length,c,d,l,f]),v=y.useCallback((x,S)=>{if(c1(S))return;const P=e.current.getCellParams(x.id,x.field);if(P.cellMode===Jn.Edit||!uO(S.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:S,cell:P})||a.length===0)return;const E=e.current.getViewportPageSize(),O=i?()=>0:e.current.getColumnIndex,k=x.field?O(x.field):0,A=a.findIndex(D=>D.id===x.id),I=0,R=a.length-1,N=0,B=(i?[vv(e.current.state)]:yo(e)).length-1;let _=!0;switch(S.key){case"ArrowDown":{AI?l(k,f(A-1)):s?u(k,S):c(k,S);break}case"ArrowRight":{const D=AR({currentColIndex:k,firstColIndex:N,lastColIndex:B,isRtl:o});D!==null&&l(D,f(A),o?"left":"right");break}case"ArrowLeft":{const D=MR({currentColIndex:k,firstColIndex:N,lastColIndex:B,isRtl:o});D!==null&&l(D,f(A),o?"right":"left");break}case"Tab":{S.shiftKey&&k>N?l(k-1,f(A),"left"):!S.shiftKey&&k=I?l(k,f(D)):c(k,S);break}case"Home":{S.ctrlKey||S.metaKey||S.shiftKey?l(N,f(I)):l(N,f(A));break}case"End":{S.ctrlKey||S.metaKey||S.shiftKey?l(B,f(R)):l(B,f(A));break}default:_=!1}_&&S.preventDefault()},[e,a,o,l,f,s,u,c,i]),w=y.useCallback((x,{event:S})=>S.key===" "?!1:x,[]);Ar(e,"canStartEditing",w),ht(e,"columnHeaderKeyDown",h),ht(e,"headerFilterKeyDown",m),ht(e,"columnGroupHeaderKeyDown",g),ht(e,"cellKeyDown",v)},oMt=(e,t)=>{var m,g;const n=No(e,"useGridRowCount"),r=Ye(e,Mz),o=Ye(e,Dg),i=Ye(e,U0),a=Ye(e,Fi),s=Jc(()=>Fi(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Dg,changeEvent:"rowCountChange"});const c={setRowCount:y.useCallback(v=>{o!==v&&(n.debug("Setting 'rowCount' to",v),e.current.setState(w=>W({},w,{pagination:W({},w.pagination,{rowCount:v})})))},[e,n,o])};Jt(e,c,"public");const u=y.useCallback((v,w)=>{var P,T;const x=Dg(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((T=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:T.rowCount)!=null?W({},v,{pagination:W({},v.pagination,{rowCount:x})}):v},[e,t.rowCount,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.rowCount]),d=y.useCallback((v,w)=>{var S;const x=(S=w.stateToRestore.pagination)!=null&&S.rowCount?w.stateToRestore.pagination.rowCount:Dg(e);return e.current.setState(P=>W({},P,{pagination:W({},P.pagination,{rowCount:x})})),v},[e]);Ar(e,"exportState",u),Ar(e,"restoreState",d);const f=y.useCallback(v=>{t.paginationMode==="client"||!s.current||v.pageSize!==s.current&&(s.current=v.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);ht(e,"paginationModelChange",f),y.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const h=i.hasNextPage===!1;y.useEffect(()=>{h&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,h,o,a])},iMt=(e,t)=>{var l,c;const n=No(e,"useGridPaginationMeta"),r=Ye(e,U0);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:U0,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:y.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(d=>W({},d,{pagination:W({},d.pagination,{meta:u})})))},[e,n,r])};Jt(e,i,"public");const a=y.useCallback((u,d)=>{var m,g;const f=U0(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.meta)!=null?W({},u,{pagination:W({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=y.useCallback((u,d)=>{var h;const f=(h=d.stateToRestore.pagination)!=null&&h.meta?d.stateToRestore.pagination.meta:U0(e);return e.current.setState(m=>W({},m,{pagination:W({},m.pagination,{meta:f})})),u},[e]);Ar(e,"exportState",a),Ar(e,"restoreState",s),y.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},aMt=(e,t)=>{var i,a,s,l,c,u;const n=W({},nce(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));rce(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount),o=t.paginationMeta??((u=(c=t.initialState)==null?void 0:c.pagination)==null?void 0:u.meta)??{};return W({},e,{pagination:{paginationModel:n,rowCount:r,meta:o}})},sMt=(e,t)=>{iMt(e,t),Hkt(e,t),oMt(e,t)},lMt=(e,t)=>{var n;return W({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},cMt=(e,t)=>{var d;const n=No(e,"useGridPreferencesPanel"),r=y.useRef(),o=y.useRef(),i=y.useCallback(()=>{n.debug("Hiding Preferences Panel");const f=qx(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(h=>W({},h,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),a=y.useCallback(()=>{o.current=setTimeout(()=>clearTimeout(r.current),0)},[]),s=y.useCallback(()=>{r.current=setTimeout(i,100)},[i]),l=y.useCallback((f,h,m)=>{n.debug("Opening Preferences Panel"),a(),e.current.setState(g=>W({},g,{preferencePanel:W({},g.preferencePanel,{open:!0,openedPanelValue:f,panelId:h,labelId:m})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[n,a,e]);Jt(e,{showPreferences:l,hidePreferences:s},"public");const c=y.useCallback((f,h)=>{var v;const m=qx(e.current.state);return!h.exportOnlyDirtyModels||((v=t.initialState)==null?void 0:v.preferencePanel)!=null||m.open?W({},f,{preferencePanel:m}):f},[e,(d=t.initialState)==null?void 0:d.preferencePanel]),u=y.useCallback((f,h)=>{const m=h.stateToRestore.preferencePanel;return m!=null&&e.current.setState(g=>W({},g,{preferencePanel:m})),f},[e]);Ar(e,"exportState",c),Ar(e,"restoreState",u),y.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(o.current)},[])},qN=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},uMt=["id","field"],dMt=["id","field"],fMt=(e,t)=>{const[n,r]=y.useState({}),o=y.useRef(n),i=y.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=_=>(...D)=>{t.editMode===Hc.Cell&&_(...D)},d=y.useCallback((_,D)=>{const z=e.current.getCellParams(_,D);if(!e.current.isCellEditable(z))throw new Error(`MUI X: The cell with id=${_} and field=${D} is not editable.`)},[e]),f=y.useCallback((_,D,z)=>{if(e.current.getCellMode(_,D)!==z)throw new Error(`MUI X: The cell with id=${_} and field=${D} is not in ${z} mode.`)},[e]),h=y.useCallback((_,D)=>{if(!_.isEditable||_.cellMode===Jn.Edit)return;const z=W({},_,{reason:hu.cellDoubleClick});e.current.publishEvent("cellEditStart",z,D)},[e]),m=y.useCallback((_,D)=>{if(_.cellMode===Jn.View||e.current.getCellMode(_.id,_.field)===Jn.View)return;const z=W({},_,{reason:Ml.cellFocusOut});e.current.publishEvent("cellEditStop",z,D)},[e]),g=y.useCallback((_,D)=>{if(_.cellMode===Jn.Edit){if(D.which===229)return;let z;if(D.key==="Escape"?z=Ml.escapeKeyDown:D.key==="Enter"?z=Ml.enterKeyDown:D.key==="Tab"&&(z=D.shiftKey?Ml.shiftTabKeyDown:Ml.tabKeyDown,D.preventDefault()),z){const F=W({},_,{reason:z});e.current.publishEvent("cellEditStop",F,D)}}else if(_.isEditable){let z;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:D,cellParams:_,editMode:"cell"}))return;if(Ice(D)?z=hu.printableKeyDown:kce(D)?z=hu.pasteKeyDown:D.key==="Enter"?z=hu.enterKeyDown:(D.key==="Backspace"||D.key==="Delete")&&(z=hu.deleteKeyDown),z){const H=W({},_,{reason:z,key:D.key});e.current.publishEvent("cellEditStart",H,D)}}},[e]),v=y.useCallback(_=>{const{id:D,field:z,reason:F}=_,H={id:D,field:z};(F===hu.printableKeyDown||F===hu.deleteKeyDown||F===hu.pasteKeyDown)&&(H.deleteValue=!0),e.current.startCellEditMode(H)},[e]),w=y.useCallback(_=>{const{id:D,field:z,reason:F}=_;e.current.runPendingEditCellValueMutation(D,z);let H;F===Ml.enterKeyDown?H="below":F===Ml.tabKeyDown?H="right":F===Ml.shiftTabKeyDown&&(H="left");const U=F==="escapeKeyDown";e.current.stopCellEditMode({id:D,field:z,ignoreModifications:U,cellToFocusAfter:H})},[e]),x=_=>async(...D)=>{var z;if(_){const{id:F,field:H}=D[0];((z=e.current.state.editRows[F][H])==null?void 0:z.error)||_(...D)}};ht(e,"cellDoubleClick",u(h)),ht(e,"cellFocusOut",u(m)),ht(e,"cellKeyDown",u(g)),ht(e,"cellEditStart",u(v)),ht(e,"cellEditStop",u(w)),lr(e,"cellEditStart",t.onCellEditStart),lr(e,"cellEditStop",x(t.onCellEditStop));const S=y.useCallback((_,D)=>{const z=Vo(e.current.state);return z[_]&&z[_][D]?Jn.Edit:Jn.View},[e]),P=wr(_=>{const D=_!==t.cellModesModel;c&&D&&c(_,{api:e.current}),!(t.cellModesModel&&D)&&(r(_),o.current=_,e.current.publishEvent("cellModesModelChange",_))}),T=y.useCallback((_,D,z)=>{const F=W({},o.current);if(z!==null)F[_]=W({},F[_],{[D]:W({},z)});else{const H=F[_],U=At(H,[D].map(Yx));F[_]=U,Object.keys(F[_]).length===0&&delete F[_]}P(F)},[P]),E=y.useCallback((_,D,z)=>{e.current.setState(F=>{const H=W({},F.editRows);return z!==null?H[_]=W({},H[_],{[D]:W({},z)}):(delete H[_][D],Object.keys(H[_]).length===0&&delete H[_]),W({},F,{editRows:H})}),e.current.forceUpdate()},[e]),O=y.useCallback(_=>{const{id:D,field:z}=_,F=At(_,uMt);d(D,z),f(D,z,Jn.View),T(D,z,W({mode:Jn.Edit},F))},[d,f,T]),k=wr(async _=>{const{id:D,field:z,deleteValue:F,initialValue:H}=_,U=e.current.getCellValue(D,z);let q=U;F?q=qN(e.current.getColumn(z)):H&&(q=H);const Y=e.current.getColumn(z),ae=!!Y.preProcessEditCellProps&&F;let Z={value:q,error:!1,isProcessingProps:ae};if(E(D,z,Z),e.current.setCellFocus(D,z),ae&&(Z=await Promise.resolve(Y.preProcessEditCellProps({id:D,row:e.current.getRow(D),props:Z,hasChanged:q!==U})),e.current.getCellMode(D,z)===Jn.Edit)){const K=Vo(e.current.state);E(D,z,W({},Z,{value:K[D][z].value,isProcessingProps:!1}))}}),A=y.useCallback(_=>{const{id:D,field:z}=_,F=At(_,dMt);f(D,z,Jn.Edit),T(D,z,W({mode:Jn.View},F))},[f,T]),I=wr(async _=>{const{id:D,field:z,ignoreModifications:F,cellToFocusAfter:H="none"}=_;f(D,z,Jn.Edit),e.current.runPendingEditCellValueMutation(D,z);const U=()=>{E(D,z,null),T(D,z,null),H!=="none"&&e.current.moveFocusToRelativeCell(D,z,H)};if(F){U();return}const q=Vo(e.current.state),{error:Y,isProcessingProps:ae}=q[D][z];if(Y||ae){i.current[D][z].mode=Jn.Edit,T(D,z,{mode:Jn.Edit});return}const Z=e.current.getRowWithUpdatedValuesFromCellEditing(D,z);if(a){const K=te=>{i.current[D][z].mode=Jn.Edit,T(D,z,{mode:Jn.Edit}),s&&s(te)};try{const te=e.current.getRow(D);Promise.resolve(a(Z,te,{rowId:D})).then(pe=>{e.current.updateRows([pe]),U()}).catch(K)}catch(te){K(te)}}else e.current.updateRows([Z]),U()}),R=y.useCallback(async _=>{var te,pe;const{id:D,field:z,value:F,debounceMs:H,unstable_skipValueParser:U}=_;d(D,z),f(D,z,Jn.Edit);const q=e.current.getColumn(z),Y=e.current.getRow(D);let ae=F;q.valueParser&&!U&&(ae=q.valueParser(F,Y,q,e));let Z=Vo(e.current.state),K=W({},Z[D][z],{value:ae,changeReason:H?"debouncedSetEditCellValue":"setEditCellValue"});if(q.preProcessEditCellProps){const ie=F!==Z[D][z].value;K=W({},K,{isProcessingProps:!0}),E(D,z,K),K=await Promise.resolve(q.preProcessEditCellProps({id:D,row:Y,props:K,hasChanged:ie}))}return e.current.getCellMode(D,z)===Jn.View?!1:(Z=Vo(e.current.state),K=W({},K,{isProcessingProps:!1}),K.value=q.preProcessEditCellProps?Z[D][z].value:ae,E(D,z,K),Z=Vo(e.current.state),!((pe=(te=Z[D])==null?void 0:te[z])!=null&&pe.error))},[e,d,f,E]),N=y.useCallback((_,D)=>{const z=e.current.getColumn(D),F=Vo(e.current.state),H=e.current.getRow(_);if(!F[_]||!F[_][D])return e.current.getRow(_);const{value:U}=F[_][D];return z.valueSetter?z.valueSetter(U,H,z,e):W({},H,{[D]:U})},[e]),L={getCellMode:S,startCellEditMode:O,stopCellEditMode:A},B={setCellEditingEditCellValue:R,getRowWithUpdatedValuesFromCellEditing:N};Jt(e,L,"public"),Jt(e,B,"private"),y.useEffect(()=>{l&&P(l)},[l,P]),$o(()=>{const _=aO(e),D=i.current;i.current=Dle(n),Object.entries(n).forEach(([z,F])=>{Object.entries(F).forEach(([H,U])=>{var ae,Z;const q=((Z=(ae=D[z])==null?void 0:ae[H])==null?void 0:Z.mode)||Jn.View,Y=_[z]??z;U.mode===Jn.Edit&&q===Jn.View?k(W({id:Y,field:H},U)):U.mode===Jn.View&&q===Jn.Edit&&I(W({id:Y,field:H},U))})})},[e,n,k,I])},pMt=["id"],hMt=["id"],mMt=(e,t)=>{const[n,r]=y.useState({}),o=y.useRef(n),i=y.useRef({}),a=y.useRef(),s=y.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=t,f=H=>(...U)=>{t.editMode===Hc.Row&&H(...U)},h=y.useCallback((H,U)=>{const q=e.current.getCellParams(H,U);if(!e.current.isCellEditable(q))throw new Error(`MUI X: The cell with id=${H} and field=${U} is not editable.`)},[e]),m=y.useCallback((H,U)=>{if(e.current.getRowMode(H)!==U)throw new Error(`MUI X: The row with id=${H} is not in ${U} mode.`)},[e]),g=y.useCallback(H=>{const U=Vo(e.current.state);return Object.values(U[H]).some(q=>q.error)},[e]),v=y.useCallback((H,U)=>{if(!H.isEditable||e.current.getRowMode(H.id)===jn.Edit)return;const q=e.current.getRowParams(H.id),Y=W({},q,{field:H.field,reason:Ad.cellDoubleClick});e.current.publishEvent("rowEditStart",Y,U)},[e]),w=y.useCallback(H=>{s.current=H},[]),x=y.useCallback((H,U)=>{H.isEditable&&e.current.getRowMode(H.id)!==jn.View&&(s.current=null,a.current=setTimeout(()=>{var q;if(((q=s.current)==null?void 0:q.id)!==H.id){if(!e.current.getRow(H.id)||e.current.getRowMode(H.id)===jn.View||g(H.id))return;const Y=e.current.getRowParams(H.id),ae=W({},Y,{field:H.field,reason:Il.rowFocusOut});e.current.publishEvent("rowEditStop",ae,U)}}))},[e,g]);y.useEffect(()=>()=>{clearTimeout(a.current)},[]);const S=y.useCallback((H,U)=>{if(H.cellMode===jn.Edit){if(U.which===229)return;let q;if(U.key==="Escape")q=Il.escapeKeyDown;else if(U.key==="Enter")q=Il.enterKeyDown;else if(U.key==="Tab"){const Y=yb(e).filter(ae=>e.current.getColumn(ae).type===eM?!0:e.current.isCellEditable(e.current.getCellParams(H.id,ae)));if(U.shiftKey?H.field===Y[0]&&(q=Il.shiftTabKeyDown):H.field===Y[Y.length-1]&&(q=Il.tabKeyDown),U.preventDefault(),!q){const ae=Y.findIndex(K=>K===H.field),Z=Y[U.shiftKey?ae-1:ae+1];e.current.setCellFocus(H.id,Z)}}if(q){if(q!==Il.escapeKeyDown&&g(H.id))return;const Y=W({},e.current.getRowParams(H.id),{reason:q,field:H.field});e.current.publishEvent("rowEditStop",Y,U)}}else if(H.isEditable){let q;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:U,cellParams:H,editMode:"row"}))return;if(Ice(U)||kce(U)?q=Ad.printableKeyDown:U.key==="Enter"?q=Ad.enterKeyDown:(U.key==="Backspace"||U.key==="Delete")&&(q=Ad.deleteKeyDown),q){const ae=e.current.getRowParams(H.id),Z=W({},ae,{field:H.field,reason:q});e.current.publishEvent("rowEditStart",Z,U)}}},[e,g]),P=y.useCallback(H=>{const{id:U,field:q,reason:Y}=H,ae={id:U,fieldToFocus:q};(Y===Ad.printableKeyDown||Y===Ad.deleteKeyDown)&&(ae.deleteValue=!!q),e.current.startRowEditMode(ae)},[e]),T=y.useCallback(H=>{const{id:U,reason:q,field:Y}=H;e.current.runPendingEditCellValueMutation(U);let ae;q===Il.enterKeyDown?ae="below":q===Il.tabKeyDown?ae="right":q===Il.shiftTabKeyDown&&(ae="left");const Z=q==="escapeKeyDown";e.current.stopRowEditMode({id:U,ignoreModifications:Z,field:Y,cellToFocusAfter:ae})},[e]);ht(e,"cellDoubleClick",f(v)),ht(e,"cellFocusIn",f(w)),ht(e,"cellFocusOut",f(x)),ht(e,"cellKeyDown",f(S)),ht(e,"rowEditStart",f(P)),ht(e,"rowEditStop",f(T)),lr(e,"rowEditStart",t.onRowEditStart),lr(e,"rowEditStop",t.onRowEditStop);const E=y.useCallback(H=>{if(t.editMode===Hc.Cell)return jn.View;const U=Vo(e.current.state);return U[H]&&Object.keys(U[H]).length>0?jn.Edit:jn.View},[e,t.editMode]),O=wr(H=>{const U=H!==t.rowModesModel;d&&U&&d(H,{api:e.current}),!(t.rowModesModel&&U)&&(r(H),o.current=H,e.current.publishEvent("rowModesModelChange",H))}),k=y.useCallback((H,U)=>{const q=W({},o.current);U!==null?q[H]=W({},U):delete q[H],O(q)},[O]),A=y.useCallback((H,U)=>{e.current.setState(q=>{const Y=W({},q.editRows);return U!==null?Y[H]=U:delete Y[H],W({},q,{editRows:Y})}),e.current.forceUpdate()},[e]),I=y.useCallback((H,U,q)=>{e.current.setState(Y=>{const ae=W({},Y.editRows);return q!==null?ae[H]=W({},ae[H],{[U]:W({},q)}):(delete ae[H][U],Object.keys(ae[H]).length===0&&delete ae[H]),W({},Y,{editRows:ae})}),e.current.forceUpdate()},[e]),R=y.useCallback(H=>{const{id:U}=H,q=At(H,pMt);m(U,jn.View),k(U,W({mode:jn.Edit},q))},[m,k]),N=wr(H=>{const{id:U,fieldToFocus:q,deleteValue:Y,initialValue:ae}=H,Z=_u(e),K=Z.reduce((te,pe)=>{if(!e.current.getCellParams(U,pe).isEditable)return te;const le=e.current.getColumn(pe);let re=e.current.getCellValue(U,pe);return q===pe&&(Y||ae)&&(Y?re=qN(le):ae&&(re=ae)),te[pe]={value:re,error:!1,isProcessingProps:!!le.preProcessEditCellProps&&Y},te},{});A(U,K),q&&e.current.setCellFocus(U,q),Z.filter(te=>!!e.current.getColumn(te).preProcessEditCellProps&&Y).forEach(te=>{const pe=e.current.getColumn(te),ie=e.current.getCellValue(U,te),le=Y?qN(pe):ae??ie;Promise.resolve(pe.preProcessEditCellProps({id:U,row:e.current.getRow(U),props:K[te],hasChanged:le!==ie})).then(re=>{if(e.current.getRowMode(U)===jn.Edit){const de=Vo(e.current.state);I(U,te,W({},re,{value:de[U][te].value,isProcessingProps:!1}))}})})}),L=y.useCallback(H=>{const{id:U}=H,q=At(H,hMt);m(U,jn.Edit),k(U,W({mode:jn.View},q))},[m,k]),B=wr(H=>{const{id:U,ignoreModifications:q,field:Y,cellToFocusAfter:ae="none"}=H;e.current.runPendingEditCellValueMutation(U);const Z=()=>{ae!=="none"&&Y&&e.current.moveFocusToRelativeCell(U,Y,ae),A(U,null),k(U,null)};if(q){Z();return}const K=Vo(e.current.state),te=e.current.getRow(U);if(Object.values(K[U]).some(le=>le.isProcessingProps)){i.current[U].mode=jn.Edit;return}if(g(U)){i.current[U].mode=jn.Edit,k(U,{mode:jn.Edit});return}const ie=e.current.getRowWithUpdatedValuesFromRowEditing(U);if(l){const le=re=>{i.current[U].mode=jn.Edit,k(U,{mode:jn.Edit}),c&&c(re)};try{Promise.resolve(l(ie,te,{rowId:U})).then(re=>{e.current.updateRows([re]),Z()}).catch(le)}catch(re){le(re)}}else e.current.updateRows([ie]),Z()}),_=y.useCallback(H=>{const{id:U,field:q,value:Y,debounceMs:ae,unstable_skipValueParser:Z}=H;h(U,q);const K=e.current.getColumn(q),te=e.current.getRow(U);let pe=Y;K.valueParser&&!Z&&(pe=K.valueParser(Y,te,K,e));let ie=Vo(e.current.state),le=W({},ie[U][q],{value:pe,changeReason:ae?"debouncedSetEditCellValue":"setEditCellValue"});return K.preProcessEditCellProps||I(U,q,le),new Promise(re=>{const de=[];if(K.preProcessEditCellProps){const ee=le.value!==ie[U][q].value;le=W({},le,{isProcessingProps:!0}),I(U,q,le);const ce=ie[U],me=At(ce,[q].map(Yx)),we=Promise.resolve(K.preProcessEditCellProps({id:U,row:te,props:le,hasChanged:ee,otherFieldsProps:me})).then(ge=>{if(e.current.getRowMode(U)===jn.View){re(!1);return}ie=Vo(e.current.state),ge=W({},ge,{isProcessingProps:!1}),ge.value=K.preProcessEditCellProps?ie[U][q].value:pe,I(U,q,ge)});de.push(we)}Object.entries(ie[U]).forEach(([ee,ce])=>{if(ee===q)return;const me=e.current.getColumn(ee);if(!me.preProcessEditCellProps)return;ce=W({},ce,{isProcessingProps:!0}),I(U,ee,ce),ie=Vo(e.current.state);const we=ie[U],ge=At(we,[ee].map(Yx)),Se=Promise.resolve(me.preProcessEditCellProps({id:U,row:te,props:ce,hasChanged:!1,otherFieldsProps:ge})).then(xe=>{if(e.current.getRowMode(U)===jn.View){re(!1);return}xe=W({},xe,{isProcessingProps:!1}),I(U,ee,xe)});de.push(Se)}),Promise.all(de).then(()=>{e.current.getRowMode(U)===jn.Edit?(ie=Vo(e.current.state),re(!ie[U][q].error)):re(!1)})})},[e,h,I]),D=y.useCallback(H=>{const U=Vo(e.current.state),q=e.current.getRow(H);if(!U[H])return e.current.getRow(H);let Y=W({},q);return Object.entries(U[H]).forEach(([ae,Z])=>{const K=e.current.getColumn(ae);K.valueSetter?Y=K.valueSetter(Z.value,Y,K,e):Y[ae]=Z.value}),Y},[e]),z={getRowMode:E,startRowEditMode:R,stopRowEditMode:L},F={setRowEditingEditCellValue:_,getRowWithUpdatedValuesFromRowEditing:D};Jt(e,z,"public"),Jt(e,F,"private"),y.useEffect(()=>{u&&O(u)},[u,O]),$o(()=>{const H=aO(e),U=i.current;i.current=Dle(n);const q=new Set([...Object.keys(n),...Object.keys(U)]);Array.from(q).forEach(Y=>{var te;const ae=n[Y]??{mode:jn.View},Z=((te=U[Y])==null?void 0:te.mode)||jn.View,K=H[Y]??Y;ae.mode===jn.Edit&&Z===jn.View?N(W({id:K},ae)):ae.mode===jn.View&&Z===jn.Edit&&B(W({id:K},ae))})},[e,n,N,B])},gMt=e=>W({},e,{editRows:{}}),yMt=(e,t)=>{fMt(e,t),mMt(e,t);const n=y.useRef({}),{isCellEditable:r}=t,o=y.useCallback(f=>gv(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,h,m,g)=>{if(!m){g();return}if(n.current[f]||(n.current[f]={}),n.current[f][h]){const[x]=n.current[f][h];clearTimeout(x)}const v=()=>{const[x]=n.current[f][h];clearTimeout(x),g(),delete n.current[f][h]},w=setTimeout(()=>{g(),delete n.current[f][h]},m);n.current[f][h]=[w,v]};y.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([h,m])=>{Object.keys(m).forEach(g=>{const[v]=f[h][g];clearTimeout(v),delete f[h][g]})})}},[]);const a=y.useCallback((f,h)=>{if(n.current[f]){if(!h)Object.keys(n.current[f]).forEach(m=>{const[,g]=n.current[f][m];g()});else if(n.current[f][h]){const[,m]=n.current[f][h];m()}}},[]),s=y.useCallback(f=>{const{id:h,field:m,debounceMs:g}=f;return new Promise(v=>{i(h,m,g,async()=>{const w=t.editMode===Hc.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(h,m)===Jn.Edit){const x=await w(f);v(x)}})})},[e,t.editMode]),l=y.useCallback((f,h)=>t.editMode===Hc.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,h):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),c=y.useCallback((f,h)=>{var g;return((g=Vo(e.current.state)[f])==null?void 0:g[h])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:a};Jt(e,u,"public"),Jt(e,d,"private")},vMt=(e,t,n)=>{const r=!!t.unstable_dataSource;return n.current.caches.rows=zP({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W({},e,{rows:Hle({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},bMt=(e,t)=>{const n=No(e,"useGridRows"),r=Zf(e,t),o=y.useRef(Date.now()),i=y.useRef(t.rowCount),a=gb(),s=y.useCallback(F=>{const H=sf(e)[F];if(H)return H;const U=e.current.getRowNode(F);return U&&gv(U)?{[iy]:F}:null},[e]),l=t.getRowId,c=y.useCallback(F=>iy in F?F[iy]:l?l(F):F.id,[l]),u=y.useMemo(()=>r.rows.reduce((F,{id:H},U)=>(F[H]=U,F),{}),[r.rows]),d=y.useCallback(({cache:F,throttle:H})=>{const U=()=>{o.current=Date.now(),e.current.setState(Y=>W({},Y,{rows:Hle({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:xi(e),previousTreeDepths:bq(e),previousGroupsToFetch:cCt(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.clear(),e.current.caches.rows=F,!H){U();return}const q=t.throttleRowsMs-(Date.now()-o.current);if(q>0){a.start(q,U);return}U()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),f=y.useCallback(F=>{n.debug(`Updating all rows, new length ${F.length}`);const H=zP({rows:F,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),U=e.current.caches.rows;H.rowsBeforePartialUpdates=U.rowsBeforePartialUpdates,d({cache:H,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,d,e]),h=y.useCallback(F=>{if(t.signature===rl.DataGrid&&F.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`));const H=xq(e,F,t.getRowId),U=wq({updates:H,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:U,throttle:!0})},[t.signature,t.getRowId,d,e]),m=y.useCallback((F,H)=>{const U=xq(e,F,t.getRowId),q=wq({updates:U,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:H??[]});d({cache:q,throttle:!1})},[t.getRowId,d,e]),g=y.useCallback(F=>{F!==t.loading&&(n.debug(`Setting loading to ${F}`),e.current.setState(H=>W({},H,{rows:W({},H.rows,{loading:F})})),e.current.caches.rows.loadingPropBeforePartialUpdates=F)},[t.loading,e,n]),v=y.useCallback(()=>{const F=oP(e),H=sf(e);return new Map(F.map(U=>[U,H[U]??{}]))},[e]),w=y.useCallback(()=>tM(e),[e]),x=y.useCallback(()=>oP(e),[e]),S=y.useCallback(F=>u[F],[u]),P=y.useCallback((F,H)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const q=W({},U,{childrenExpanded:H});e.current.setState(Y=>W({},Y,{rows:W({},Y.rows,{tree:W({},Y.rows.tree,{[F]:q})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",q)},[e]),T=y.useCallback(F=>xi(e)[F]??null,[e]),E=y.useCallback(({skipAutoGeneratedRows:F=!0,groupId:H,applySorting:U,applyFiltering:q})=>{const Y=xi(e);let ae;if(U){const Z=Y[H];if(!Z)return[];const K=a1(e);ae=[];const te=K.findIndex(pe=>pe===H)+1;for(let pe=te;peZ.depth;pe+=1){const ie=K[pe];(!F||!gv(Y[ie]))&&ae.push(ie)}}else ae=Oz(Y,H,F);if(q){const Z=bb(e);ae=ae.filter(K=>Z[K]!==!1)}return ae},[e]),O=y.useCallback((F,H)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.parent!==oi)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(U.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(q=>{const Y=xi(q,e.current.instanceId)[oi],ae=Y.children,Z=ae.findIndex(te=>te===F);if(Z===-1||Z===H)return q;n.debug(`Moving row ${F} to index ${H}`);const K=[...ae];return K.splice(H,0,K.splice(Z,1)[0]),W({},q,{rows:W({},q.rows,{tree:W({},q.rows.tree,{[oi]:W({},Y,{children:K})})})})}),e.current.publishEvent("rowsSet")},[e,n]),k=y.useCallback((F,H)=>{if(t.signature===rl.DataGrid&&H.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` -`));if(H.length===0)return;if(vb(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const q=W({},xi(e)),Y=W({},sf(e)),ae=W({},aO(e)),Z=q[oi],K=[...Z.children],te=new Set;for(let ie=0;ie{var le;return((le=q[ie])==null?void 0:le.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=Y,e.current.caches.rows.dataRowIdToIdLookup=ae,e.current.setState(ie=>W({},ie,{rows:W({},ie.rows,{dataRowIdToModelLookup:Y,dataRowIdToIdLookup:ae,dataRowIds:pe,tree:q})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),A={getRow:s,setLoading:g,getRowId:c,getRowModels:v,getRowsCount:w,getAllRowIds:x,setRows:f,updateRows:h,getRowNode:T,getRowIndexRelativeToVisibleRows:S,unstable_replaceRows:k},I={setRowIndex:O,setRowChildrenExpansion:P,getRowGroupChildren:E},R={updateServerRows:m},N=y.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let F;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?F=W({},e.current.caches.rows,{updates:{type:"full",rows:oP(e)}}):F=zP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:F,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),L=Jc(()=>t.unstable_dataSource),B=y.useCallback(F=>{if(t.unstable_dataSource&&t.unstable_dataSource!==L.current){L.current=t.unstable_dataSource;return}F==="rowTreeCreation"&&N()},[N,L,t.unstable_dataSource]),_=y.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==uCt(e)&&N()},[e,N]);ht(e,"activeStrategyProcessorChange",B),ht(e,"strategyAvailabilityChange",_);const D=y.useCallback(()=>{e.current.setState(F=>{const H=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:xi(F,e.current.instanceId),treeDepths:bq(F,e.current.instanceId),dataRowIds:oP(F,e.current.instanceId),dataRowIdToModelLookup:sf(F,e.current.instanceId),dataRowIdToIdLookup:aO(F,e.current.instanceId)});return W({},F,{rows:W({},F.rows,H,{totalTopLevelRowCount:Vle({tree:H.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);Hz(e,"hydrateRows",D),Jt(e,A,"public"),Jt(e,I,t.signature===rl.DataGrid?"private":"public"),Jt(e,R,"private");const z=y.useRef(!0);y.useEffect(()=>{var Y;if(z.current){z.current=!1;return}let F=!1;t.rowCount!==i.current&&(F=!0,i.current=t.rowCount);const H=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,U=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,q=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;H&&(U||(e.current.setState(ae=>W({},ae,{rows:W({},ae.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),q||(e.current.setState(ae=>W({},ae,{rows:W({},ae.rows,{totalRowCount:Math.max(t.rowCount||0,ae.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,ae.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!F)||(n.debug(`Updating all rows, new length ${(Y=t.rows)==null?void 0:Y.length}`),d({cache:zP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,n,d,e])},wMt=e=>{const t={[oi]:W({},pCt(),{children:e})};for(let n=0;n{const n=W({},e),r={};for(let a=0;a!r[a])),n[oi]=W({},o,{children:i}),{groupingName:$h,tree:n,treeDepths:{0:i.length},dataRowIds:i}},SMt=e=>e.updates.type==="full"?wMt(e.updates.rows):xMt({previousTree:e.previousTree,actions:e.updates.actions}),CMt=e=>{dO(e,$h,"rowTreeCreation",SMt)},Nce=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],PMt=(e,t)=>W({},e,{rowSelection:t.rowSelection?Nce(t.rowSelectionModel)??[]:[]}),TMt=(e,t)=>{var z,F,H,U,q,Y,ae;const n=No(e,"useGridSelection"),r=y.useCallback(Z=>(...K)=>{t.rowSelection&&Z(...K)},[t.rowSelection]),o=t.signature!==rl.DataGrid&&(((z=t.rowSelectionPropagation)==null?void 0:z.parents)||((F=t.rowSelectionPropagation)==null?void 0:F.descendants)),i=y.useMemo(()=>Nce(t.rowSelectionModel,js(e.current.state)),[e,t.rowSelectionModel]),a=y.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:js,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=Az(t),d=Zf(e,t),f=Ye(e,xi),h=Ye(e,vb)>1,m=y.useCallback(Z=>{let K=Z;const te=a.current??Z,pe=e.current.isRowSelected(Z);if(pe){const ie=ay(e),le=ie.findIndex(de=>de===te),re=ie.findIndex(de=>de===K);if(le===re)return;le>re?K=ie[re+1]:K=ie[re-1]}a.current=Z,e.current.selectRowRange({startId:te,endId:K},!pe)},[e]),g=y.useCallback(Z=>{if(t.signature===rl.DataGrid&&!u&&Array.isArray(Z)&&Z.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` -`));js(e.current.state)!==Z&&(n.debug("Setting selection model"),e.current.setState(te=>W({},te,{rowSelection:t.rowSelection?Z:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,u]),v=y.useCallback(Z=>js(e.current.state).includes(Z),[e]),w=y.useCallback(Z=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(Z)))return!1;const K=e.current.getRowNode(Z);return!((K==null?void 0:K.type)==="footer"||(K==null?void 0:K.type)==="pinnedRow")},[e,t.rowSelection,c]),x=y.useCallback(()=>FCt(e),[e]),S=y.useCallback((Z,K=!0,te=!1)=>{var pe,ie,le,re,de,ee;if(e.current.isRowSelectable(Z))if(a.current=Z,te){n.debug(`Setting selection for row ${Z}`);const ce=[],me=we=>{ce.push(we)};K&&(me(Z),o&&iP(e,f,Z,((pe=t.rowSelectionPropagation)==null?void 0:pe.descendants)??!1,((ie=t.rowSelectionPropagation)==null?void 0:ie.parents)??!1,me)),e.current.setRowSelectionModel(ce)}else{n.debug(`Toggling selection for row ${Z}`);const ce=js(e.current.state),me=new Set(ce);me.delete(Z);const we=xe=>{me.add(xe)},ge=xe=>{me.delete(xe)};K?(we(Z),o&&iP(e,f,Z,((le=t.rowSelectionPropagation)==null?void 0:le.descendants)??!1,((re=t.rowSelectionPropagation)==null?void 0:re.parents)??!1,we)):o&&Sq(e,f,Z,((de=t.rowSelectionPropagation)==null?void 0:de.descendants)??!1,((ee=t.rowSelectionPropagation)==null?void 0:ee.parents)??!1,ge),(me.size<2||u)&&e.current.setRowSelectionModel(Array.from(me))}},[e,n,o,f,(H=t.rowSelectionPropagation)==null?void 0:H.descendants,(U=t.rowSelectionPropagation)==null?void 0:U.parents,u]),P=y.useCallback((Z,K=!0,te=!1)=>{n.debug("Setting selection for several rows");const pe=Z.filter(re=>e.current.isRowSelectable(re));let ie;if(te){if(K){if(ie=new Set(pe),o){const de=ee=>{ie.add(ee)};pe.forEach(ee=>{var ce,me;iP(e,f,ee,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((me=t.rowSelectionPropagation)==null?void 0:me.parents)??!1,de)})}}else ie=new Set;const re=Du(e);if(ie.size===Object.keys(re).length&&Array.from(ie).every(de=>re[de]===de))return}else{ie=new Set(Object.values(Du(e)));const re=ee=>{ie.add(ee)},de=ee=>{ie.delete(ee)};pe.forEach(ee=>{var ce,me,we,ge;K?(ie.add(ee),o&&iP(e,f,ee,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((me=t.rowSelectionPropagation)==null?void 0:me.parents)??!1,re)):(de(ee),o&&Sq(e,f,ee,((we=t.rowSelectionPropagation)==null?void 0:we.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,de))})}(ie.size<2||u)&&e.current.setRowSelectionModel(Array.from(ie))},[n,o,u,e,f,(q=t.rowSelectionPropagation)==null?void 0:q.descendants,(Y=t.rowSelectionPropagation)==null?void 0:Y.parents]),T=y.useCallback(({startId:Z,endId:K},te=!0,pe=!1)=>{if(!e.current.getRow(Z)||!e.current.getRow(K))return;n.debug(`Expanding selection from row ${Z} to row ${K}`);const ie=ay(e),le=ie.indexOf(Z),re=ie.indexOf(K),[de,ee]=le>re?[re,le]:[le,re],ce=ie.slice(de,ee+1);e.current.selectRows(ce,te,pe)},[e,n]),E={selectRow:S,setRowSelectionModel:g,getSelectedRows:x,isRowSelected:v,isRowSelectable:w},O={selectRows:P,selectRowRange:T};Jt(e,E,"public"),Jt(e,O,t.signature===rl.DataGrid?"private":"public");const k=y.useRef(!0),A=y.useCallback((Z=!1)=>{var ee;if(k.current)return;const K=js(e.current.state),te=sf(e),pe=bb(e),ie=W({},Du(e)),le=ce=>t.filterMode==="server"?!te[ce]:pe[ce]!==!0;let re=!1;K.forEach(ce=>{var we;if(le(ce)){if(t.keepNonExistentRowsSelected)return;delete ie[ce],re=!0;return}if(!((we=t.rowSelectionPropagation)!=null&&we.parents))return;const me=f[ce];if(me.type==="group"){if(me.isAutoGenerated){delete ie[ce],re=!0;return}me.children.every(Se=>pe[Se]===!1)||(delete ie[ce],re=!0)}});const de=h&&((ee=t.rowSelectionPropagation)==null?void 0:ee.parents)&&Object.keys(ie).length>0;if(re||de&&!Z){const ce=Object.values(ie);de?e.current.selectRows(ce,!0,!0):e.current.setRowSelectionModel(ce)}},[e,h,(ae=t.rowSelectionPropagation)==null?void 0:ae.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),I=y.useCallback((Z,K)=>{const te=K.metaKey||K.ctrlKey,pe=!s&&!te&&!ROt(K),ie=!u||pe,le=e.current.isRowSelected(Z);ie?e.current.selectRow(Z,pe?!0:!le,!0):e.current.selectRow(Z,!le,!1)},[e,u,s]),R=y.useCallback((Z,K)=>{var ie;if(l)return;const te=(ie=K.target.closest(`.${se.cell}`))==null?void 0:ie.getAttribute("data-field");if(te===wb.field||te===rM)return;if(te){const le=e.current.getColumn(te);if((le==null?void 0:le.type)===eM)return}e.current.getRowNode(Z.id).type!=="pinnedRow"&&(K.shiftKey&&u?m(Z.id):I(Z.id,K))},[l,u,e,m,I]),N=y.useCallback((Z,K)=>{var te;u&&K.shiftKey&&((te=window.getSelection())==null||te.removeAllRanges())},[u]),L=y.useCallback((Z,K)=>{u&&K.nativeEvent.shiftKey?m(Z.id):e.current.selectRow(Z.id,Z.value,!u)},[e,m,u]),B=y.useCallback(Z=>{const K=t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?ice(e):ay(e);e.current.selectRows(K,Z.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),_=y.useCallback((Z,K)=>{if(e.current.getCellMode(Z.id,Z.field)!==Jn.Edit&&!c1(K)){if(uO(K.key)&&K.shiftKey){const te=Fa(e);if(te&&te.id!==Z.id){K.preventDefault();const pe=e.current.isRowSelected(te.id);if(!u){e.current.selectRow(te.id,!pe,!0);return}const ie=e.current.getRowIndexRelativeToVisibleRows(te.id),le=e.current.getRowIndexRelativeToVisibleRows(Z.id);let re,de;ie>le?pe?(re=le,de=ie-1):(re=le,de=ie):pe?(re=ie+1,de=le):(re=ie,de=le);const ee=d.rows.slice(re,de+1).map(ce=>ce.id);e.current.selectRows(ee,!pe);return}}if(K.key===" "&&K.shiftKey){K.preventDefault(),I(Z.id,K);return}String.fromCharCode(K.keyCode)==="A"&&(K.ctrlKey||K.metaKey)&&(K.preventDefault(),P(e.current.getAllRowIds(),!0))}},[e,I,P,d.rows,u]);ht(e,"sortedRowsSet",r(()=>A(!0))),ht(e,"filteredRowsSet",r(A)),ht(e,"rowClick",r(R)),ht(e,"rowSelectionCheckboxChange",r(L)),ht(e,"headerSelectionCheckboxChange",B),ht(e,"cellMouseDown",r(N)),ht(e,"cellKeyDown",r(_)),y.useEffect(()=>{i!==void 0&&e.current.setRowSelectionModel(i)},[e,i,t.rowSelection]),y.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const D=i!=null;y.useEffect(()=>{if(D||!t.rowSelection)return;const Z=js(e.current.state);if(w){const K=Z.filter(te=>w(te));K.length{if(!t.rowSelection||D)return;const Z=js(e.current.state);!u&&Z.length>1&&e.current.setRowSelectionModel([])},[e,u,s,D,t.rowSelection]),y.useEffect(()=>{r(A)},[A,r]),y.useEffect(()=>{k.current&&(k.current=!1)},[])},EMt=e=>{const{classes:t}=e;return y.useMemo(()=>gn({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},yn,t),[t])},OMt=(e,t)=>{const n={classes:t.classes},r=EMt(n),o=y.useCallback(i=>{const a=W({},wb,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[yu]!=null;return s&&!l?(i.lookup[yu]=a,i.orderedFields=[yu,...i.orderedFields]):!s&&l?(delete i.lookup[yu],i.orderedFields=i.orderedFields.filter(c=>c!==yu)):s&&l&&(i.lookup[yu]=W({},a,i.lookup[yu])),i},[e,r,t.checkboxSelection]);Ar(e,"hydrateColumns",o)},IMt=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return W({},e,{sorting:{sortModel:Ale(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},kMt=(e,t)=>{var T,E;const n=No(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:Fs,changeEvent:"sortModelChange"});const r=y.useCallback((O,k)=>{const A=Fs(e),I=A.findIndex(N=>N.field===O);let R=[...A];return I>-1?(k==null?void 0:k.sort)==null?R.splice(I,1):R.splice(I,1,k):R=[...A,k],R},[e]),o=y.useCallback((O,k)=>{const I=Fs(e).find(R=>R.field===O.field);if(I){const R=k===void 0?dq(O.sortingOrder??t.sortingOrder,I.sort):k;return R===void 0?void 0:W({},I,{sort:R})}return{field:O.field,sort:k===void 0?dq(O.sortingOrder??t.sortingOrder):k}},[e,t.sortingOrder]),i=y.useCallback((O,k)=>k==null||k.sortable===!1||t.disableColumnSorting?O:(k.sortingOrder||t.sortingOrder).some(I=>!!I)?[...O,"columnMenuSortItem"]:O,[t.sortingOrder,t.disableColumnSorting]),a=y.useCallback(()=>{e.current.setState(O=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),W({},O,{sorting:W({},O.sorting,{sortedRows:Oz(xi(e),oi,!1)})});const k=Fs(O,e.current.instanceId),A=_1t(k,e),I=e.current.applyStrategyProcessor("sorting",{sortRowList:A});return W({},O,{sorting:W({},O.sorting,{sortedRows:I})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),s=y.useCallback(O=>{Fs(e)!==O&&(n.debug("Setting sort model"),e.current.setState(uq(O,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=y.useCallback((O,k,A)=>{const I=e.current.getColumn(O),R=o(I,k);let N;!A||t.disableMultipleColumnsSorting?N=(R==null?void 0:R.sort)==null?[]:[R]:N=r(I.field,R),e.current.setSortModel(N)},[e,r,o,t.disableMultipleColumnsSorting]),c=y.useCallback(()=>Fs(e),[e]),u=y.useCallback(()=>Iz(e).map(k=>k.model),[e]),d=y.useCallback(()=>a1(e),[e]),f=y.useCallback(O=>e.current.getSortedRowIds()[O],[e]);Jt(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:f,setSortModel:s,sortColumn:l,applySorting:a},"public");const m=y.useCallback((O,k)=>{var R,N;const A=Fs(e);return!k.exportOnlyDirtyModels||t.sortModel!=null||((N=(R=t.initialState)==null?void 0:R.sorting)==null?void 0:N.sortModel)!=null||A.length>0?W({},O,{sorting:{sortModel:A}}):O},[e,t.sortModel,(E=(T=t.initialState)==null?void 0:T.sorting)==null?void 0:E.sortModel]),g=y.useCallback((O,k)=>{var I;const A=(I=k.stateToRestore.sorting)==null?void 0:I.sortModel;return A==null?O:(e.current.setState(uq(A,t.disableMultipleColumnsSorting)),W({},O,{callbacks:[...O.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=y.useCallback(O=>{const k=xi(e),A=k[oi],I=O.sortRowList?O.sortRowList(A.children.map(R=>k[R])):[...A.children];return A.footerId!=null&&I.push(A.footerId),I},[e]);Ar(e,"exportState",m),Ar(e,"restoreState",g),dO(e,$h,"sorting",v);const w=y.useCallback(({field:O,colDef:k},A)=>{if(!k.sortable||t.disableColumnSorting)return;const I=A.shiftKey||A.metaKey||A.ctrlKey;l(O,void 0,I)},[l,t.disableColumnSorting]),x=y.useCallback(({field:O,colDef:k},A)=>{!k.sortable||t.disableColumnSorting||A.key==="Enter"&&!A.ctrlKey&&!A.metaKey&&l(O,void 0,A.shiftKey)},[l,t.disableColumnSorting]),S=y.useCallback(()=>{const O=Fs(e),k=ud(e);if(O.length>0){const A=O.filter(I=>k[I.field]);A.length{O==="sorting"&&e.current.applySorting()},[e]);Ar(e,"columnMenu",i),ht(e,"columnHeaderClick",w),ht(e,"columnHeaderKeyDown",x),ht(e,"rowsSet",e.current.applySorting),ht(e,"columnsChange",S),ht(e,"activeStrategyProcessorChange",P),s1(()=>{e.current.applySorting()}),$o(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function nK(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=nr(),r=No(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ye(e,Jf),s=y.useCallback(d=>{var w;const f=li(e.current.state),h=tM(e),m=t.unstable_listView?[vv(e.current.state)]:yo(e);if(!(d.rowIndex==null)&&h===0||m.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let v={};if(d.colIndex!==void 0){const x=Qf(e);let S;if(typeof d.rowIndex<"u"){const P=(w=a[d.rowIndex])==null?void 0:w.id,T=e.current.unstable_getCellColSpanInfo(P,d.colIndex);T&&!T.spannedByColSpan&&(S=T.cellProps.width)}typeof S>"u"&&(S=m[d.colIndex].computedWidth),v.left=nK({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:S,elementOffset:x[d.colIndex]})}if(d.rowIndex!==void 0){const x=xb(e.current.state),S=ePt(e),P=tPt(e),T=t.pagination?d.rowIndex-S*P:d.rowIndex,E=x.positions[T+1]?x.positions[T+1]-x.positions[T]:x.currentPageTotalHeight-x.positions[T];v.top=nK({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:E,elementOffset:x.positions[T]})}return v=e.current.unstable_applyPipeProcessors("scrollToIndexes",v,d),typeof v.left!==void 0||typeof v.top!==void 0?(e.current.scroll(v),!0):!1},[r,e,i,t.pagination,a,t.unstable_listView]),l=y.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=y.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);Jt(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function AMt(e,t){lr(e,"columnHeaderClick",t.onColumnHeaderClick),lr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),lr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),lr(e,"columnHeaderOver",t.onColumnHeaderOver),lr(e,"columnHeaderOut",t.onColumnHeaderOut),lr(e,"columnHeaderEnter",t.onColumnHeaderEnter),lr(e,"columnHeaderLeave",t.onColumnHeaderLeave),lr(e,"cellClick",t.onCellClick),lr(e,"cellDoubleClick",t.onCellDoubleClick),lr(e,"cellKeyDown",t.onCellKeyDown),lr(e,"preferencePanelClose",t.onPreferencePanelClose),lr(e,"preferencePanelOpen",t.onPreferencePanelOpen),lr(e,"menuOpen",t.onMenuOpen),lr(e,"menuClose",t.onMenuClose),lr(e,"rowDoubleClick",t.onRowDoubleClick),lr(e,"rowClick",t.onRowClick),lr(e,"stateChange",t.onStateChange)}function $Mt(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const KN={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Hc.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1},cg={width:0,height:0},RMt={isReady:!1,root:cg,viewportOuterSize:cg,viewportInnerSize:cg,contentSize:cg,minimumSize:cg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},_Mt=e=>W({},e,{dimensions:RMt});function DMt(e,t){const n=No(e,"useResizeContainer"),r=y.useRef(!1),o=y.useRef(cg),i=Ye(e,li),a=Ye(e,xb),s=Ye(e,i1),l=Ye(e,o1),c=y.useMemo(()=>Wle(t.rowHeight,KN.rowHeight),[t.rowHeight]),u=Math.floor(c*l),d=Math.floor(t.columnHeaderHeight*l),f=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*l),h=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*l),m=LMt(Cz(e),6),g=Dz(e,t),v=s.left.reduce((D,z)=>D+z.computedWidth,0),w=s.right.reduce((D,z)=>D+z.computedWidth,0),[x,S]=y.useState(),P=y.useMemo(()=>$Mt(S,t.resizeThrottleMs),[t.resizeThrottleMs]),T=y.useRef(),E=()=>e.current.state.dimensions,O=wr(D=>{e.current.setState(z=>W({},z,{dimensions:D}))}),k=y.useCallback(()=>{const D=e.current.mainElementRef.current;if(!D)return;const z=FSt(D).getComputedStyle(D),F={width:parseFloat(z.width)||0,height:parseFloat(z.height)||0};(!T.current||!rK(T.current,F))&&(e.current.publishEvent("resize",F),T.current=F)},[e]),A=y.useCallback(()=>{const D=li(e.current.state);if(!D.isReady)return 0;const z=sy(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const H=uM(e),U=H.lastRowIndex-H.firstRowIndex;return Math.min(U-1,z.rows.length)}const F=Math.floor(D.viewportInnerSize.height/u);return Math.min(F,z.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,u]),I=y.useCallback(()=>{var de,ee;const D=e.current.rootElementRef.current,z=mCt(e),F=NMt(D,m,t.scrollbarSize),H=g+z.top,U=z.bottom,Y={width:m-v-w,height:a.currentPageTotalHeight};let ae,Z,K=!1,te=!1;if(t.autoHeight)te=!1,K=Math.round(m)>Math.round(o.current.width),ae={width:o.current.width,height:H+U+Y.height},Z={width:Math.max(0,ae.width-(te?F:0)),height:Math.max(0,ae.height-(K?F:0))};else{ae={width:o.current.width,height:o.current.height},Z={width:Math.max(0,ae.width-v-w),height:Math.max(0,ae.height-H-U)};const ce=Y,me=Z,we=ce.width>me.width,ge=ce.height>me.height;(we||ge)&&(te=ge,K=ce.width+(te?F:0)>me.width,K&&(te=ce.height+F>me.height)),te&&(Z.width-=F),K&&(Z.height-=F)}const pe=Math.max(ae.width,m+(te?F:0)),ie={width:m,height:H+Y.height+U},le={isReady:!0,root:o.current,viewportOuterSize:ae,viewportInnerSize:Z,contentSize:Y,minimumSize:ie,hasScrollX:K,hasScrollY:te,scrollbarSize:F,headerHeight:d,groupHeaderHeight:f,headerFilterHeight:h,rowWidth:pe,rowHeight:u,columnsTotalWidth:m,leftPinnedWidth:v,rightPinnedWidth:w,headersTotalHeight:g,topContainerHeight:H,bottomContainerHeight:U},re=e.current.state.dimensions;O(le),rK(le.viewportInnerSize,re.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",le.viewportInnerSize),(ee=(de=e.current).updateRenderContext)==null||ee.call(de)},[e,O,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u,d,f,h,m,g,v,w]),R={resize:k,getRootDimensions:E},N={updateDimensions:I,getViewportPageSize:A};Jt(e,R,"public"),Jt(e,N,"private"),$o(()=>{x&&(I(),e.current.publishEvent("debouncedResize",o.current))},[e,x,I]);const L=e.current.rootElementRef.current;$o(()=>{if(!L)return;const D=(z,F)=>L.style.setProperty(z,F);D("--DataGrid-width",`${i.viewportOuterSize.width}px`),D("--DataGrid-hasScrollX",`${Number(i.hasScrollX)}`),D("--DataGrid-hasScrollY",`${Number(i.hasScrollY)}`),D("--DataGrid-scrollbarSize",`${i.scrollbarSize}px`),D("--DataGrid-rowWidth",`${i.rowWidth}px`),D("--DataGrid-columnsTotalWidth",`${i.columnsTotalWidth}px`),D("--DataGrid-leftPinnedWidth",`${i.leftPinnedWidth}px`),D("--DataGrid-rightPinnedWidth",`${i.rightPinnedWidth}px`),D("--DataGrid-headerHeight",`${i.headerHeight}px`),D("--DataGrid-headersTotalHeight",`${i.headersTotalHeight}px`),D("--DataGrid-topContainerHeight",`${i.topContainerHeight}px`),D("--DataGrid-bottomContainerHeight",`${i.bottomContainerHeight}px`),D("--height",`${i.rowHeight}px`)},[L,i]);const B=y.useRef(!0),_=y.useCallback(D=>{o.current=D;const z=/jsdom/.test(window.navigator.userAgent);if(D.height===0&&!r.current&&!t.autoHeight&&!z&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` +`}${a}`.trim()}function uK(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function rMt(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{uK(e)}):uK(e)}function oMt(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const iMt=(e,t)=>{const n=t.ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=y.useCallback(a=>{if(!aIt(a)||oMt(a.target))return;let s="";if(e.current.getSelectedRows().size>0)s=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1});else{const c=Fa(e);if(c){const u=e.current.getCellParams(c.id,c.field);s=Yce(u,{csvOptions:{delimiter:o,shouldAppendQuotes:!1,escapeFormulas:!1},ignoreValueFormatter:r})}}s=e.current.unstable_applyPipeProcessors("clipboardCopy",s),s&&(rMt(s),e.current.publishEvent("clipboardCopy",s))},[e,r,o]);gce(e,e.current.rootElementRef,"keydown",i),lr(e,"clipboardCopy",t.onClipboardCopy)},aMt=e=>W({},e,{columnMenu:{open:!1}}),sMt=e=>{const t=Lo(e,"useGridColumnMenu"),n=y.useCallback(a=>{const s=eT(e.current.state),l={open:!0,field:a};(l.open!==s.open||l.field!==s.field)&&(e.current.setState(u=>u.columnMenu.open&&u.columnMenu.field===a?u:(t.debug("Opening Column Menu"),W({},u,{columnMenu:{open:!0,field:a}}))),e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=y.useCallback(()=>{const a=eT(e.current.state);if(a.field){const c=dd(e),u=Qs(e),d=Nu(e);let f=a.field;if(c[f]||(f=d[0]),u[f]===!1){const p=d.filter(g=>g===f?!0:u[g]!==!1),m=p.indexOf(f);f=p[m+1]||p[m-1]}e.current.setColumnHeaderFocus(f)}const s={open:!1,field:void 0};(s.open!==a.open||s.field!==a.field)&&(e.current.setState(c=>(t.debug("Hiding Column Menu"),W({},c,{columnMenu:s}))),e.current.forceUpdate())},[e,t]),o=y.useCallback(a=>{t.debug("Toggle Column Menu");const s=eT(e.current.state);!s.open||s.field!==a?n(a):r()},[e,t,n,r]);Jt(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),ht(e,"columnResizeStart",r),ht(e,"virtualScrollerWheel",e.current.hideColumnMenu),ht(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},lMt=(e,t,n)=>{var o,i,a;const r=yg({apiRef:n,columnsToUpsert:t.columns,initialState:(o=t.initialState)==null?void 0:o.columns,columnVisibilityModel:t.columnVisibilityModel??((a=(i=t.initialState)==null?void 0:i.columns)==null?void 0:a.columnVisibilityModel)??{},keepOnlyColumnsToUpsert:!0});return W({},e,{columns:r,pinnedColumns:e.pinnedColumns??QN})};function cMt(e,t){var I,R;const n=Lo(e,"useGridColumns"),r=y.useRef(t.columns);e.current.registerControlState({stateId:"visibleColumns",propModel:t.columnVisibilityModel,propOnChange:t.onColumnVisibilityModelChange,stateSelector:Qs,changeEvent:"columnVisibilityModelChange"});const o=y.useCallback(N=>{var L,j;n.debug("Updating columns state."),e.current.setState(dK(N)),e.current.publishEvent("columnsChange",N.orderedFields),(j=(L=e.current).updateRenderContext)==null||j.call(L),e.current.forceUpdate()},[n,e]),i=y.useCallback(N=>dd(e)[N],[e]),a=y.useCallback(()=>ec(e),[e]),s=y.useCallback(()=>vo(e),[e]),l=y.useCallback((N,L=!0)=>(L?vo(e):ec(e)).findIndex(_=>_.field===N),[e]),c=y.useCallback(N=>{const L=l(N);return ip(e)[L]},[e,l]),u=y.useCallback(N=>{var j,_;Qs(e)!==N&&(e.current.setState(D=>W({},D,{columns:yg({apiRef:e,columnsToUpsert:[],initialState:void 0,columnVisibilityModel:N,keepOnlyColumnsToUpsert:!1})})),(_=(j=e.current).updateRenderContext)==null||_.call(j),e.current.forceUpdate())},[e]),d=y.useCallback(N=>{const L=yg({apiRef:e,columnsToUpsert:N,initialState:void 0,keepOnlyColumnsToUpsert:!1});o(L)},[e,o]),f=y.useCallback((N,L)=>{const j=Qs(e),_=j[N]??!0;if(L!==_){const D=W({},j,{[N]:L});e.current.setColumnVisibilityModel(D)}},[e]),p=y.useCallback(N=>Nu(e).findIndex(j=>j===N),[e]),m=y.useCallback((N,L)=>{const j=Nu(e),_=p(N);if(_===L)return;n.debug(`Moving column ${N} to index ${L}`);const D=[...j],z=D.splice(_,1)[0];D.splice(L,0,z),o(W({},Lc(e.current.state),{orderedFields:D}));const F={column:e.current.getColumn(N),targetIndex:e.current.getColumnIndexRelativeToVisibleColumns(N),oldIndex:_};e.current.publishEvent("columnIndexChange",F)},[e,n,o,p]),g=y.useCallback((N,L)=>{n.debug(`Updating column ${N} width to ${L}`);const j=Lc(e.current.state),_=j.lookup[N],D=W({},_,{width:L,hasBeenResized:!0});o(ZN(W({},j,{lookup:W({},j.lookup,{[N]:D})}),e.current.getRootDimensions())),e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(N),colDef:D,width:L})},[e,n,o]),v={getColumn:i,getAllColumns:a,getColumnIndex:l,getColumnPosition:c,getVisibleColumns:s,getColumnIndexRelativeToVisibleColumns:p,updateColumns:d,setColumnVisibilityModel:u,setColumnVisibility:f,setColumnWidth:g},w={setColumnIndex:m};Jt(e,v,"public"),Jt(e,w,t.signature===ol.DataGrid?"private":"public");const x=y.useCallback((N,L)=>{var H,U;const j={},_=Qs(e);(!L.exportOnlyDirtyModels||t.columnVisibilityModel!=null||Object.keys(((U=(H=t.initialState)==null?void 0:H.columns)==null?void 0:U.columnVisibilityModel)??{}).length>0||Object.keys(_).length>0)&&(j.columnVisibilityModel=_),j.orderedFields=Nu(e);const z=ec(e),F={};return z.forEach(q=>{if(q.hasBeenResized){const X={};Oce.forEach(ae=>{let Z=q[ae];Z===1/0&&(Z=-1),X[ae]=Z}),F[q.field]=X}}),Object.keys(F).length>0&&(j.dimensions=F),W({},N,{columns:j})},[e,t.columnVisibilityModel,(I=t.initialState)==null?void 0:I.columns]),S=y.useCallback((N,L)=>{var z;const j=(z=L.stateToRestore.columns)==null?void 0:z.columnVisibilityModel,_=L.stateToRestore.columns;if(j==null&&_==null)return N;const D=yg({apiRef:e,columnsToUpsert:[],initialState:_,columnVisibilityModel:j,keepOnlyColumnsToUpsert:!1});return e.current.setState(dK(D)),_!=null&&e.current.publishEvent("columnsChange",D.orderedFields),N},[e]),P=y.useCallback((N,L)=>{var j;if(L===Bh.columns){const _=t.slots.columnsPanel;return $.jsx(_,W({},(j=t.slotProps)==null?void 0:j.columnsPanel))}return N},[t.slots.columnsPanel,(R=t.slotProps)==null?void 0:R.columnsPanel]),T=y.useCallback(N=>t.disableColumnSelector?N:[...N,"columnMenuColumnsItem"],[t.disableColumnSelector]);$r(e,"columnMenu",T),$r(e,"exportState",x),$r(e,"restoreState",S),$r(e,"preferencePanel",P);const E=y.useRef(null);ht(e,"viewportInnerSizeChange",N=>{E.current!==N.width&&(E.current=N.width,o(ZN(Lc(e.current.state),e.current.getRootDimensions())))});const k=y.useCallback(()=>{n.info("Columns pipe processing have changed, regenerating the columns");const N=yg({apiRef:e,columnsToUpsert:[],initialState:void 0,keepOnlyColumnsToUpsert:!1});o(N)},[e,n,o]);Jz(e,"hydrateColumns",k);const A=y.useRef(!0);y.useEffect(()=>{if(A.current){A.current=!1;return}if(n.info(`GridColumns have changed, new length ${t.columns.length}`),r.current===t.columns)return;const N=yg({apiRef:e,initialState:void 0,columnsToUpsert:t.columns,keepOnlyColumnsToUpsert:!0});r.current=t.columns,o(N)},[n,e,o,t.columns]),y.useEffect(()=>{t.columnVisibilityModel!==void 0&&e.current.setColumnVisibilityModel(t.columnVisibilityModel)},[e,n,t.columnVisibilityModel])}function dK(e){return t=>W({},t,{columns:e})}const uMt=(e,t)=>{var n;return W({},e,{density:((n=t.initialState)==null?void 0:n.density)??t.density??"standard"})},dMt=(e,t)=>{var s;const n=Lo(e,"useDensity");e.current.registerControlState({stateId:"density",propModel:t.density,propOnChange:t.onDensityChange,stateSelector:Hg,changeEvent:"densityChange"});const o={setDensity:wr(l=>{Hg(e.current.state)!==l&&(n.debug(`Set grid density to ${l}`),e.current.setState(u=>W({},u,{density:l})))})};Jt(e,o,"public");const i=y.useCallback((l,c)=>{var f;const u=Hg(e.current.state);return!c.exportOnlyDirtyModels||t.density!=null||((f=t.initialState)==null?void 0:f.density)!=null?W({},l,{density:u}):l},[e,t.density,(s=t.initialState)==null?void 0:s.density]),a=y.useCallback((l,c)=>{var d;const u=(d=c.stateToRestore)!=null&&d.density?c.stateToRestore.density:Hg(e.current.state);return e.current.setState(f=>W({},f,{density:u})),l},[e]);$r(e,"exportState",i),$r(e,"restoreState",a),y.useEffect(()=>{t.density&&e.current.setDensity(t.density)},[e,t.density])};function fMt(e,t="csv",n=document.title||"untitled"){const r=`${n}.${t}`;if("download"in HTMLAnchorElement.prototype){const o=URL.createObjectURL(e),i=document.createElement("a");i.href=o,i.download=r,i.click(),setTimeout(()=>{URL.revokeObjectURL(o)});return}throw new Error("MUI X: exportAs not supported.")}const Xce=({apiRef:e,options:t})=>{const n=ec(e);return t.fields?t.fields.reduce((o,i)=>{const a=n.find(s=>s.field===i);return a&&o.push(a),o},[]):(t.allColumns?n:vo(e)).filter(o=>!o.disableExport)},Qce=({apiRef:e})=>{var l,c;const t=fce(e),n=xi(e),r=e.current.getSelectedRows(),o=t.filter(u=>n[u].type!=="footer"),i=mm(e),a=((l=i==null?void 0:i.top)==null?void 0:l.map(u=>u.id))||[],s=((c=i==null?void 0:i.bottom)==null?void 0:c.map(u=>u.id))||[];return o.unshift(...a),o.push(...s),r.size>0?o.filter(u=>r.has(u)):o},pMt=(e,t)=>{const n=Lo(e,"useGridCsvExport"),r=t.ignoreValueFormatterDuringExport,o=(typeof r=="object"?r==null?void 0:r.csvExport:r)||!1,i=y.useCallback((c={})=>{n.debug("Get data as CSV");const u=Xce({apiRef:e,options:c}),f=(c.getRowsToExport??Qce)({apiRef:e});return nMt({columns:u,rowIds:f,csvOptions:{delimiter:c.delimiter||",",shouldAppendQuotes:c.shouldAppendQuotes??!0,includeHeaders:c.includeHeaders??!0,includeColumnGroupsHeaders:c.includeColumnGroupsHeaders??!0,escapeFormulas:c.escapeFormulas??!0},ignoreValueFormatter:o,apiRef:e})},[n,e,o]),a=y.useCallback(c=>{n.debug("Export data as CSV");const u=i(c),d=new Blob([c!=null&&c.utf8WithBom?new Uint8Array([239,187,191]):"",u],{type:"text/csv"});fMt(d,"csv",c==null?void 0:c.fileName)},[n,i]);Jt(e,{getDataAsCsv:i,exportDataAsCsv:a},"public");const l=y.useCallback((c,u)=>{var d;return(d=u.csvOptions)!=null&&d.disableToolbarButton?c:[...c,{component:$.jsx(skt,{options:u.csvOptions}),componentName:"csvExport"}]},[]);$r(e,"exportMenu",l)},nT=(e,t,n)=>{let r=e.paginationModel;const o=e.rowCount,i=(n==null?void 0:n.pageSize)??r.pageSize,a=(n==null?void 0:n.page)??r.page,s=yce(o,i,a);n&&((n==null?void 0:n.page)!==r.page||(n==null?void 0:n.pageSize)!==r.pageSize)&&(r=n);const l=CPt(r.page,s);return l!==r.page&&(r=W({},r,{page:l})),bce(r.pageSize,t),r},hMt=(e,t)=>{var m,g;const n=Lo(e,"useGridPaginationModel"),r=Ye(e,h1),o=Math.floor(t.rowHeight*r);e.current.registerControlState({stateId:"paginationModel",propModel:t.paginationModel,propOnChange:t.onPaginationModelChange,stateSelector:Fi,changeEvent:"paginationModelChange"});const i=y.useCallback(v=>{const w=Fi(e);v!==w.page&&(n.debug(`Setting page to ${v}`),e.current.setPaginationModel({page:v,pageSize:w.pageSize}))},[e,n]),a=y.useCallback(v=>{const w=Fi(e);v!==w.pageSize&&(n.debug(`Setting page size to ${v}`),e.current.setPaginationModel({pageSize:v,page:w.page}))},[e,n]),s=y.useCallback(v=>{const w=Fi(e);v!==w&&(n.debug("Setting 'paginationModel' to",v),e.current.setState(x=>W({},x,{pagination:W({},x.pagination,{paginationModel:nT(x.pagination,t.signature,v)})})))},[e,n,t.signature]);Jt(e,{setPage:i,setPageSize:a,setPaginationModel:s},"public");const c=y.useCallback((v,w)=>{var P,T;const x=Fi(e);return!w.exportOnlyDirtyModels||t.paginationModel!=null||((T=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:T.paginationModel)!=null||x.page!==0&&x.pageSize!==SPt(t.autoPageSize)?W({},v,{pagination:W({},v.pagination,{paginationModel:x})}):v},[e,t.paginationModel,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.paginationModel,t.autoPageSize]),u=y.useCallback((v,w)=>{var S,P;const x=(S=w.stateToRestore.pagination)!=null&&S.paginationModel?W({},vce(t.autoPageSize),(P=w.stateToRestore.pagination)==null?void 0:P.paginationModel):Fi(e);return e.current.setState(T=>W({},T,{pagination:W({},T.pagination,{paginationModel:nT(T.pagination,t.signature,x)})})),v},[e,t.autoPageSize,t.signature]);$r(e,"exportState",c),$r(e,"restoreState",u);const d=()=>{var w;const v=Fi(e);(w=e.current.virtualScrollerRef)!=null&&w.current&&e.current.scrollToIndexes({rowIndex:v.page*v.pageSize})},f=y.useCallback(()=>{if(!t.autoPageSize)return;const v=e.current.getRootDimensions(),w=Math.floor(v.viewportInnerSize.height/o);e.current.setPageSize(w)},[e,t.autoPageSize,o]),p=y.useCallback(v=>{if(v==null)return;const w=Fi(e),x=wce(e);w.page>x-1&&e.current.setPage(Math.max(0,x-1))},[e]);ht(e,"viewportInnerSizeChange",f),ht(e,"paginationModelChange",d),ht(e,"rowCountChange",p),y.useEffect(()=>{e.current.setState(v=>W({},v,{pagination:W({},v.pagination,{paginationModel:nT(v.pagination,t.signature,t.paginationModel)})}))},[e,t.paginationModel,t.paginationMode,t.signature]),y.useEffect(f,[f])};function mMt(){return new Promise(e=>{requestAnimationFrame(()=>{e()})})}function gMt(e){const t=document.createElement("iframe");return t.style.position="absolute",t.style.width="0px",t.style.height="0px",t.title=e||document.title,t}const yMt=(e,t)=>{const n=e.current.rootElementRef.current!==null,r=Lo(e,"useGridPrintExport"),o=y.useRef(null),i=y.useRef(null),a=y.useRef({}),s=y.useRef([]),l=y.useRef();y.useEffect(()=>{o.current=Pf(e.current.rootElementRef.current)},[e,n]);const c=y.useCallback((v,w,x)=>new Promise(S=>{const P=Xce({apiRef:e,options:{fields:v,allColumns:w}}).map(O=>O.field),T=ec(e),E={};T.forEach(O=>{E[O.field]=P.includes(O.field)}),x&&(E[kb.field]=!0),e.current.setColumnVisibilityModel(E),S()}),[e]),u=y.useCallback(v=>{const x=v({apiRef:e}).reduce((S,P)=>{const T=e.current.getRow(P);return T[hy]||S.push(T),S},[]);e.current.setRows(x)},[e]),d=y.useCallback((v,w)=>{var j,_,D,z;const x=W({copyStyles:!0,hideToolbar:!1,hideFooter:!1,includeCheckboxes:!1},w),S=v.contentDocument;if(!S)return;const P=Mb(e.current.state),T=e.current.rootElementRef.current,E=T.cloneNode(!0),O=E.querySelector(`.${se.main}`);O.style.overflow="visible",E.style.contain="size";let k=((j=T.querySelector(`.${se.toolbarContainer}`))==null?void 0:j.offsetHeight)||0,A=((_=T.querySelector(`.${se.footerContainer}`))==null?void 0:_.offsetHeight)||0;x.hideToolbar&&((D=E.querySelector(`.${se.toolbarContainer}`))==null||D.remove(),k=0),x.hideFooter&&((z=E.querySelector(`.${se.footerContainer}`))==null||z.remove(),A=0);const I=P.currentPageTotalHeight+Uz(e,t)+k+A;if(E.style.height=`${I}px`,E.style.boxSizing="content-box",!x.hideFooter){const F=E.querySelector(`.${se.footerContainer}`);F.style.position="absolute",F.style.width="100%",F.style.top=`${I-A}px`}const R=document.createElement("div");R.appendChild(E),S.body.style.marginTop="0px",S.body.innerHTML=R.innerHTML;const N=typeof x.pageStyle=="function"?x.pageStyle():x.pageStyle;if(typeof N=="string"){const F=S.createElement("style");F.appendChild(S.createTextNode(N)),S.head.appendChild(F)}x.bodyClassName&&S.body.classList.add(...x.bodyClassName.split(" "));const L=[];if(x.copyStyles){const F=T.getRootNode(),U=(F.constructor.name==="ShadowRoot"?F:o.current).querySelectorAll("style, link[rel='stylesheet']");for(let q=0;q{ae.addEventListener("load",()=>Z())})),S.head.appendChild(ae)}}}Promise.all(L).then(()=>{v.contentWindow.print()})},[e,o,t]),f=y.useCallback(v=>{var w,x;o.current.body.removeChild(v),e.current.restoreState(i.current||{}),(x=(w=i.current)==null?void 0:w.columns)!=null&&x.columnVisibilityModel||e.current.setColumnVisibilityModel(a.current),e.current.setState(S=>W({},S,{virtualization:l.current})),e.current.setRows(s.current),i.current=null,a.current={},s.current=[]},[e]),m={exportDataAsPrint:y.useCallback(async v=>{if(r.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI X: No grid root element available.");if(i.current=e.current.exportState(),a.current=Qs(e),s.current=e.current.getSortedRows().filter(x=>!x[hy]),t.pagination){const S={page:0,pageSize:Fz(e)};e.current.setState(P=>W({},P,{pagination:W({},P.pagination,{paginationModel:nT(P.pagination,"DataGridPro",S)})}))}l.current=e.current.state.virtualization,e.current.setState(x=>W({},x,{virtualization:W({},x.virtualization,{enabled:!1,enabledForColumns:!1})})),await c(v==null?void 0:v.fields,v==null?void 0:v.allColumns,v==null?void 0:v.includeCheckboxes),u((v==null?void 0:v.getRowsToExport)??Qce),await mMt();const w=gMt(v==null?void 0:v.fileName);w.onload=()=>{d(w,v),w.contentWindow.matchMedia("print").addEventListener("change",S=>{S.matches===!1&&f(w)})},o.current.body.appendChild(w)},[t,r,e,d,f,c,u])};Jt(e,m,"public");const g=y.useCallback((v,w)=>{var x;return(x=w.printOptions)!=null&&x.disableToolbarButton?v:[...v,{component:$.jsx(lkt,{options:w.printOptions}),componentName:"printExport"}]},[]);$r(e,"exportMenu",g)},vMt=(e,t,n)=>{var o,i;const r=t.filterModel??((i=(o=t.initialState)==null?void 0:o.filter)==null?void 0:i.filterModel)??Zx();return W({},e,{filter:{filterModel:Dz(r,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},bMt=e=>e.filteredRowsLookup;function fK(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function wMt(){return Hle(Object.values)}const xMt=(e,t)=>{var A,I,R;const n=Lo(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:ti,changeEvent:"filterModelChange"});const r=y.useCallback(()=>{e.current.setState(N=>{const L=ti(N,e.current.instanceId),j=e.current.getFilterState(L),_=W({},N,{filter:W({},N.filter,j)}),D=fK(e,_);return W({},_,{visibleRowsLookup:D})}),e.current.publishEvent("filteredRowsSet")},[e]),o=y.useCallback((N,L)=>L==null||L.filterable===!1||t.disableColumnFilter?N:[...N,"columnMenuFilterItem"],[t.disableColumnFilter]),i=y.useCallback(()=>{r(),e.current.forceUpdate()},[e,r]),a=y.useCallback(N=>{const L=ti(e),j=[...L.items],_=j.findIndex(D=>D.id===N.id);_===-1?j.push(N):j[_]=N,e.current.setFilterModel(W({},L,{items:j}),"upsertFilterItem")},[e]),s=y.useCallback(N=>{const L=ti(e),j=[...L.items];N.forEach(_=>{const D=j.findIndex(z=>z.id===_.id);D===-1?j.push(_):j[D]=_}),e.current.setFilterModel(W({},L,{items:j}),"upsertFilterItems")},[e]),l=y.useCallback(N=>{const L=ti(e),j=L.items.filter(_=>_.id!==N.id);j.length!==L.items.length&&e.current.setFilterModel(W({},L,{items:j}),"deleteFilterItem")},[e]),c=y.useCallback((N,L,j)=>{if(n.debug("Displaying filter panel"),N){const _=ti(e),D=_.items.filter(U=>{var Z;if(U.value!==void 0)return!(Array.isArray(U.value)&&U.value.length===0);const X=(Z=e.current.getColumn(U.field).filterOperators)==null?void 0:Z.find(K=>K.value===U.operator);return!(typeof(X==null?void 0:X.requiresFilterValue)>"u"?!0:X==null?void 0:X.requiresFilterValue)});let z;const F=D.find(U=>U.field===N),H=e.current.getColumn(N);F?z=D:t.disableMultipleColumnsFiltering?z=[JN({field:N,operator:H.filterOperators[0].value},e)]:z=[...D,JN({field:N,operator:H.filterOperators[0].value},e)],e.current.setFilterModel(W({},_,{items:z}))}e.current.showPreferences(Bh.filters,L,j)},[e,n,t.disableMultipleColumnsFiltering]),u=y.useCallback(()=>{n.debug("Hiding filter panel"),e.current.hidePreferences()},[e,n]),d=y.useCallback(N=>{const L=ti(e);L.logicOperator!==N&&e.current.setFilterModel(W({},L,{logicOperator:N}),"changeLogicOperator")},[e]),f=y.useCallback(N=>{const L=ti(e);py(L.quickFilterValues,N)||e.current.setFilterModel(W({},L,{quickFilterValues:[...N]}))},[e]),p=y.useCallback((N,L)=>{ti(e)!==N&&(n.debug("Setting filter model"),e.current.updateControlState("filter",Pq(N,t.disableMultipleColumnsFiltering,e),L),e.current.unstable_applyFilters())},[e,n,t.disableMultipleColumnsFiltering]),m=y.useCallback(N=>{const L=Dz(N,t.disableMultipleColumnsFiltering,e),j=t.filterMode==="client"?vCt(L,e,t.disableEval):null,_=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:j,filterModel:L??Zx()});return W({},_,{filterModel:L})},[t.disableMultipleColumnsFiltering,t.filterMode,t.disableEval,e]),g={setFilterLogicOperator:d,unstable_applyFilters:i,deleteFilterItem:l,upsertFilterItem:a,upsertFilterItems:s,setFilterModel:p,showFilterPanel:c,hideFilterPanel:u,setQuickFilterValues:f,ignoreDiacritics:t.ignoreDiacritics,getFilterState:m};Jt(e,g,"public");const v=y.useCallback((N,L)=>{var D,z;const j=ti(e);return!L.exportOnlyDirtyModels||t.filterModel!=null||((z=(D=t.initialState)==null?void 0:D.filter)==null?void 0:z.filterModel)!=null||!py(j,Zx())?W({},N,{filter:{filterModel:j}}):N},[e,t.filterModel,(I=(A=t.initialState)==null?void 0:A.filter)==null?void 0:I.filterModel]),w=y.useCallback((N,L)=>{var _;const j=(_=L.stateToRestore.filter)==null?void 0:_.filterModel;return j==null?N:(e.current.updateControlState("filter",Pq(j,t.disableMultipleColumnsFiltering,e),"restoreState"),W({},N,{callbacks:[...N.callbacks,e.current.unstable_applyFilters]}))},[e,t.disableMultipleColumnsFiltering]),x=y.useCallback((N,L)=>{var j;if(L===Bh.filters){const _=t.slots.filterPanel;return $.jsx(_,W({},(j=t.slotProps)==null?void 0:j.filterPanel))}return N},[t.slots.filterPanel,(R=t.slotProps)==null?void 0:R.filterPanel]),{getRowId:S}=t,P=eu(wMt),T=y.useCallback(N=>{if(t.filterMode!=="client"||!N.isRowMatchingFilters)return{filteredRowsLookup:{},filteredChildrenCountLookup:{},filteredDescendantCountLookup:{}};const L=uf(e),j={},{isRowMatchingFilters:_}=N,D={},z={passingFilterItems:null,passingQuickFilterValues:null},F=P.current(e.current.state.rows.dataRowIdToModelLookup);for(let q=0;q{n.debug("onColUpdated - GridColumns changed, applying filters");const N=ti(e),L=dd(e),j=N.items.filter(_=>_.field&&L[_.field]);j.length{N==="filtering"&&e.current.unstable_applyFilters()},[e]),k=y.useCallback(()=>{e.current.setState(N=>W({},N,{visibleRowsLookup:fK(e,N)})),e.current.forceUpdate()},[e]);ht(e,"rowsSet",r),ht(e,"columnsChange",E),ht(e,"activeStrategyProcessorChange",O),ht(e,"rowExpansionChange",k),ht(e,"columnVisibilityModelChange",()=>{const N=ti(e);N.quickFilterValues&&nce(N)&&e.current.unstable_applyFilters()}),y1(()=>{e.current.unstable_applyFilters()}),_o(()=>{t.filterModel!==void 0&&e.current.setFilterModel(t.filterModel)},[e,n,t.filterModel])},SMt=e=>W({},e,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},tabIndex:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}),CMt=(e,t)=>{const n=Lo(e,"useGridFocus"),r=y.useRef(null),o=e.current.rootElementRef.current!==null,i=y.useCallback((k,A)=>{k&&e.current.getRow(k.id)&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(k.id,k.field),A)},[e]),a=y.useCallback((k,A)=>{const I=Fa(e);(I==null?void 0:I.id)===k&&(I==null?void 0:I.field)===A||(e.current.setState(R=>(n.debug(`Focusing on cell with id=${k} and field=${A}`),W({},R,{tabIndex:{cell:{id:k,field:A},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null},focus:{cell:{id:k,field:A},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))),e.current.forceUpdate(),e.current.getRow(k)&&(I&&i(I,{}),e.current.publishEvent("cellFocusIn",e.current.getCellParams(k,A))))},[e,n,i]),s=y.useCallback((k,A={})=>{const I=Fa(e);i(I,A),e.current.setState(R=>(n.debug(`Focusing on column header with colIndex=${k}`),W({},R,{tabIndex:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null},focus:{columnHeader:{field:k},columnHeaderFilter:null,cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),l=y.useCallback((k,A={})=>{const I=Fa(e);i(I,A),e.current.setState(R=>(n.debug(`Focusing on column header filter with colIndex=${k}`),W({},R,{tabIndex:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null},focus:{columnHeader:null,columnHeaderFilter:{field:k},cell:null,columnGroupHeader:null}}))),e.current.forceUpdate()},[e,n,i]),c=y.useCallback((k,A,I={})=>{const R=Fa(e);R&&e.current.publishEvent("cellFocusOut",e.current.getCellParams(R.id,R.field),I),e.current.setState(N=>W({},N,{tabIndex:{columnGroupHeader:{field:k,depth:A},columnHeader:null,columnHeaderFilter:null,cell:null},focus:{columnGroupHeader:{field:k,depth:A},columnHeader:null,columnHeaderFilter:null,cell:null}})),e.current.forceUpdate()},[e]),u=y.useCallback(()=>bO(e),[e]),d=y.useCallback((k,A,I)=>{let R=e.current.getColumnIndex(A);const N=vo(e),L=gy(e,{pagination:t.pagination,paginationMode:t.paginationMode}),j=mm(e),_=[].concat(j.top||[],L.rows,j.bottom||[]);let D=_.findIndex(U=>U.id===k);I==="right"?R+=1:I==="left"?R-=1:D+=1,R>=N.length?(D+=1,D<_.length&&(R=0)):R<0&&(D-=1,D>=0&&(R=N.length-1)),D=Fc(D,0,_.length-1);const z=_[D];if(!z)return;const F=e.current.unstable_getCellColSpanInfo(z.id,R);F&&F.spannedByColSpan&&(I==="left"||I==="below"?R=F.leftVisibleCellIndex:I==="right"&&(R=F.rightVisibleCellIndex)),R=Fc(R,0,N.length-1);const H=N[R];e.current.setCellFocus(z.id,H.field)},[e,t.pagination,t.paginationMode]),f=y.useCallback(({id:k,field:A})=>{e.current.setCellFocus(k,A)},[e]),p=y.useCallback((k,A)=>{A.key==="Enter"||A.key==="Tab"||A.key==="Shift"||SO(A.key)||e.current.setCellFocus(k.id,k.field)},[e]),m=y.useCallback(({field:k},A)=>{A.target===A.currentTarget&&e.current.setColumnHeaderFocus(k,A)},[e]),g=y.useCallback(({fields:k,depth:A},I)=>{if(I.target!==I.currentTarget)return;const R=bO(e);R!==null&&R.depth===A&&k.includes(R.field)||e.current.setColumnGroupHeaderFocus(k[0],A,I)},[e]),v=y.useCallback((k,A)=>{var I,R;(R=(I=A.relatedTarget)==null?void 0:I.getAttribute("class"))!=null&&R.includes(se.columnHeader)||(n.debug("Clearing focus"),e.current.setState(N=>W({},N,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})))},[n,e]),w=y.useCallback(k=>{r.current=k},[]),x=y.useCallback(k=>{const A=r.current;r.current=null;const I=Fa(e);if(!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:k,cell:A}))return;if(!I){A&&e.current.setCellFocus(A.id,A.field);return}if((A==null?void 0:A.id)===I.id&&(A==null?void 0:A.field)===I.field)return;const N=e.current.getCellElement(I.id,I.field);N!=null&&N.contains(k.target)||(A?e.current.setCellFocus(A.id,A.field):(e.current.setState(L=>W({},L,{focus:{cell:null,columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}})),e.current.forceUpdate(),i(I,k)))},[e,i]),S=y.useCallback(k=>{if(k.cellMode==="view")return;const A=Fa(e);((A==null?void 0:A.id)!==k.id||(A==null?void 0:A.field)!==k.field)&&e.current.setCellFocus(k.id,k.field)},[e]),P=y.useCallback(()=>{var A;const k=Fa(e);if(k&&!e.current.getRow(k.id)){const I=(A=Fa(e))==null?void 0:A.id;let R=null;if(typeof I<"u"){const N=e.current.getRowIndexRelativeToVisibleRows(I),L=gy(e,{pagination:t.pagination,paginationMode:t.paginationMode}),j=L.rows[Fc(N,0,L.rows.length-1)];R=(j==null?void 0:j.id)??null}e.current.setState(N=>W({},N,{focus:{cell:R===null?null:{id:R,field:k.field},columnHeader:null,columnHeaderFilter:null,columnGroupHeader:null}}))}},[e,t.pagination,t.paginationMode]),T=wr(()=>{const k=Fa(e);if(!k)return;const A=gy(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(A.rows.find(N=>N.id===k.id))return;const R=vo(e);e.current.setState(N=>W({},N,{tabIndex:{cell:{id:A.rows[0].id,field:R[0].field},columnGroupHeader:null,columnHeader:null,columnHeaderFilter:null}}))}),E={setCellFocus:a,setColumnHeaderFocus:s,setColumnHeaderFilterFocus:l},O={moveFocusToRelativeCell:d,setColumnGroupHeaderFocus:c,getColumnGroupHeaderFocus:u};Jt(e,E,"public"),Jt(e,O,"private"),y.useEffect(()=>{const k=Pf(e.current.rootElementRef.current);return k.addEventListener("mouseup",x),()=>{k.removeEventListener("mouseup",x)}},[e,o,x]),ht(e,"columnHeaderBlur",v),ht(e,"cellDoubleClick",f),ht(e,"cellMouseDown",w),ht(e,"cellKeyDown",p),ht(e,"cellModeChange",S),ht(e,"columnHeaderFocus",m),ht(e,"columnGroupHeaderFocus",g),ht(e,"rowsSet",P),ht(e,"paginationModelChange",T)},PMt=e=>{const t=e.match(/^__row_group_by_columns_group_(.*)__$/);return t?t[1]:null},TMt=e=>e===lce||PMt(e)!==null;function EMt(e,t){const n=mm(e)||{};return[...n.top||[],...t,...n.bottom||[]]}const BR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(et)return e-1;return null},zR=({currentColIndex:e,firstColIndex:t,lastColIndex:n,isRtl:r})=>{if(r){if(e>t)return e-1}else if(!r&&e=0&&a{const n=Lo(e,"useGridKeyboardNavigation"),r=sp(e,t).rows,o=nr(),i=t.unstable_listView,a=y.useMemo(()=>EMt(e,r),[e,r]),s=t.signature!=="DataGrid"&&t.headerFilters,l=y.useCallback((x,S,P="left",T="up")=>{const E=ap(e),O=e.current.unstable_getCellColSpanInfo(S,x);O&&O.spannedByColSpan&&(P==="left"?x=O.leftVisibleCellIndex:P==="right"&&(x=O.rightVisibleCellIndex));const k=i?kv(e.current.state).field:Eb(e)[x],A=OMt(e,S,k,T),I=E.findIndex(R=>R.id===A);n.debug(`Navigating to cell row ${I}, col ${x}`),e.current.scrollToIndexes({colIndex:x,rowIndex:I}),e.current.setCellFocus(A,k)},[e,n,i]),c=y.useCallback((x,S)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFocus(P,S)},[e,n]),u=y.useCallback((x,S)=>{n.debug(`Navigating to header filter col ${x}`),e.current.scrollToIndexes({colIndex:x});const P=e.current.getVisibleColumns()[x].field;e.current.setColumnHeaderFilterFocus(P,S)},[e,n]),d=y.useCallback((x,S,P)=>{n.debug(`Navigating to header col ${x}`),e.current.scrollToIndexes({colIndex:x});const{field:T}=e.current.getVisibleColumns()[x];e.current.setColumnGroupHeaderFocus(T,S,P)},[e,n]),f=y.useCallback(x=>{var S;return(S=a[x])==null?void 0:S.id},[a]),p=y.useCallback((x,S)=>{const P=S.currentTarget.querySelector(`.${se.columnHeaderTitleContainerContent}`);if(!!P&&P.contains(S.target)&&x.field!==kb.field)return;const E=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=a.length>0?0:null,A=a.length-1,I=0,R=vo(e).length-1,N=v1(e);let L=!0;switch(S.key){case"ArrowDown":{k!==null&&(s?u(O,S):l(O,f(k)));break}case"ArrowRight":{const j=zR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});j!==null&&c(j,S);break}case"ArrowLeft":{const j=BR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});j!==null&&c(j,S);break}case"ArrowUp":{N>0&&d(O,N-1,S);break}case"PageDown":{k!==null&&A!==null&&l(O,f(Math.min(k+E,A)));break}case"Home":{c(I,S);break}case"End":{c(R,S);break}case"Enter":{(S.ctrlKey||S.metaKey)&&e.current.toggleColumnMenu(x.field);break}case" ":break;default:L=!1}L&&S.preventDefault()},[e,a.length,s,u,l,f,o,c,d]),m=y.useCallback((x,S)=>{const P=cTt(e)===x.field,T=uTt(e)===x.field;if(P||T||!SO(S.key))return;const E=e.current.getViewportPageSize(),O=x.field?e.current.getColumnIndex(x.field):0,k=0,A=a.length-1,I=0,R=vo(e).length-1;let N=!0;switch(S.key){case"ArrowDown":{const L=f(k);L!=null&&l(O,L);break}case"ArrowRight":{const L=zR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});L!==null&&u(L,S);break}case"ArrowLeft":{const L=BR({currentColIndex:O,firstColIndex:I,lastColIndex:R,isRtl:o});L!==null?u(L,S):e.current.setColumnHeaderFilterFocus(x.field,S);break}case"ArrowUp":{c(O,S);break}case"PageDown":{A!==null&&l(O,f(Math.min(k+E,A)));break}case"Home":{u(I,S);break}case"End":{u(R,S);break}case" ":break;default:N=!1}N&&S.preventDefault()},[e,a.length,u,o,c,l,f]),g=y.useCallback((x,S)=>{const P=bO(e);if(P===null)return;const{field:T,depth:E}=P,{fields:O,depth:k,maxDepth:A}=x,I=e.current.getViewportPageSize(),R=e.current.getColumnIndex(T),N=T?e.current.getColumnIndex(T):0,L=0,j=a.length-1,_=0,D=vo(e).length-1;let z=!0;switch(S.key){case"ArrowDown":{k===A-1?c(R,S):d(R,E+1,S);break}case"ArrowUp":{k>0&&d(R,E-1,S);break}case"ArrowRight":{const F=O.length-O.indexOf(T)-1;R+F+1<=D&&d(R+F+1,E,S);break}case"ArrowLeft":{const F=O.indexOf(T);R-F-1>=_&&d(R-F-1,E,S);break}case"PageDown":{j!==null&&l(N,f(Math.min(L+I,j)));break}case"Home":{d(_,E,S);break}case"End":{d(D,E,S);break}case" ":break;default:z=!1}z&&S.preventDefault()},[e,a.length,c,d,l,f]),v=y.useCallback((x,S)=>{if(b1(S))return;const P=e.current.getCellParams(x.id,x.field);if(P.cellMode===Zn.Edit||!SO(S.key)||!e.current.unstable_applyPipeProcessors("canUpdateFocus",!0,{event:S,cell:P})||a.length===0)return;const E=e.current.getViewportPageSize(),O=i?()=>0:e.current.getColumnIndex,k=x.field?O(x.field):0,A=a.findIndex(D=>D.id===x.id),I=0,R=a.length-1,N=0,j=(i?[kv(e.current.state)]:vo(e)).length-1;let _=!0;switch(S.key){case"ArrowDown":{AI?l(k,f(A-1)):s?u(k,S):c(k,S);break}case"ArrowRight":{const D=zR({currentColIndex:k,firstColIndex:N,lastColIndex:j,isRtl:o});D!==null&&l(D,f(A),o?"left":"right");break}case"ArrowLeft":{const D=BR({currentColIndex:k,firstColIndex:N,lastColIndex:j,isRtl:o});D!==null&&l(D,f(A),o?"right":"left");break}case"Tab":{S.shiftKey&&k>N?l(k-1,f(A),"left"):!S.shiftKey&&k=I?l(k,f(D)):c(k,S);break}case"Home":{S.ctrlKey||S.metaKey||S.shiftKey?l(N,f(I)):l(N,f(A));break}case"End":{S.ctrlKey||S.metaKey||S.shiftKey?l(j,f(R)):l(j,f(A));break}default:_=!1}_&&S.preventDefault()},[e,a,o,l,f,s,u,c,i]),w=y.useCallback((x,{event:S})=>S.key===" "?!1:x,[]);$r(e,"canStartEditing",w),ht(e,"columnHeaderKeyDown",p),ht(e,"headerFilterKeyDown",m),ht(e,"columnGroupHeaderKeyDown",g),ht(e,"cellKeyDown",v)},kMt=(e,t)=>{var m,g;const n=Lo(e,"useGridRowCount"),r=Ye(e,jz),o=Ye(e,Ug),i=Ye(e,Z0),a=Ye(e,Fi),s=eu(()=>Fi(e).pageSize);e.current.registerControlState({stateId:"paginationRowCount",propModel:t.rowCount,propOnChange:t.onRowCountChange,stateSelector:Ug,changeEvent:"rowCountChange"});const c={setRowCount:y.useCallback(v=>{o!==v&&(n.debug("Setting 'rowCount' to",v),e.current.setState(w=>W({},w,{pagination:W({},w.pagination,{rowCount:v})})))},[e,n,o])};Jt(e,c,"public");const u=y.useCallback((v,w)=>{var P,T;const x=Ug(e);return!w.exportOnlyDirtyModels||t.rowCount!=null||((T=(P=t.initialState)==null?void 0:P.pagination)==null?void 0:T.rowCount)!=null?W({},v,{pagination:W({},v.pagination,{rowCount:x})}):v},[e,t.rowCount,(g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.rowCount]),d=y.useCallback((v,w)=>{var S;const x=(S=w.stateToRestore.pagination)!=null&&S.rowCount?w.stateToRestore.pagination.rowCount:Ug(e);return e.current.setState(P=>W({},P,{pagination:W({},P.pagination,{rowCount:x})})),v},[e]);$r(e,"exportState",u),$r(e,"restoreState",d);const f=y.useCallback(v=>{t.paginationMode==="client"||!s.current||v.pageSize!==s.current&&(s.current=v.pageSize,o===-1&&e.current.setPage(0))},[t.paginationMode,s,o,e]);ht(e,"paginationModelChange",f),y.useEffect(()=>{t.paginationMode==="client"?e.current.setRowCount(r):t.rowCount!=null&&e.current.setRowCount(t.rowCount)},[e,t.paginationMode,r,t.rowCount]);const p=i.hasNextPage===!1;y.useEffect(()=>{p&&o===-1&&e.current.setRowCount(a.pageSize*a.page+r)},[e,r,p,o,a])},MMt=(e,t)=>{var l,c;const n=Lo(e,"useGridPaginationMeta"),r=Ye(e,Z0);e.current.registerControlState({stateId:"paginationMeta",propModel:t.paginationMeta,propOnChange:t.onPaginationMetaChange,stateSelector:Z0,changeEvent:"paginationMetaChange"});const i={setPaginationMeta:y.useCallback(u=>{r!==u&&(n.debug("Setting 'paginationMeta' to",u),e.current.setState(d=>W({},d,{pagination:W({},d.pagination,{meta:u})})))},[e,n,r])};Jt(e,i,"public");const a=y.useCallback((u,d)=>{var m,g;const f=Z0(e);return!d.exportOnlyDirtyModels||t.paginationMeta!=null||((g=(m=t.initialState)==null?void 0:m.pagination)==null?void 0:g.meta)!=null?W({},u,{pagination:W({},u.pagination,{meta:f})}):u},[e,t.paginationMeta,(c=(l=t.initialState)==null?void 0:l.pagination)==null?void 0:c.meta]),s=y.useCallback((u,d)=>{var p;const f=(p=d.stateToRestore.pagination)!=null&&p.meta?d.stateToRestore.pagination.meta:Z0(e);return e.current.setState(m=>W({},m,{pagination:W({},m.pagination,{meta:f})})),u},[e]);$r(e,"exportState",a),$r(e,"restoreState",s),y.useEffect(()=>{t.paginationMeta&&e.current.setPaginationMeta(t.paginationMeta)},[e,t.paginationMeta])},AMt=(e,t)=>{var i,a,s,l,c,u;const n=W({},vce(t.autoPageSize),t.paginationModel??((a=(i=t.initialState)==null?void 0:i.pagination)==null?void 0:a.paginationModel));bce(n.pageSize,t.signature);const r=t.rowCount??((l=(s=t.initialState)==null?void 0:s.pagination)==null?void 0:l.rowCount),o=t.paginationMeta??((u=(c=t.initialState)==null?void 0:c.pagination)==null?void 0:u.meta)??{};return W({},e,{pagination:{paginationModel:n,rowCount:r,meta:o}})},$Mt=(e,t)=>{MMt(e,t),hMt(e,t),kMt(e,t)},RMt=(e,t)=>{var n;return W({},e,{preferencePanel:((n=t.initialState)==null?void 0:n.preferencePanel)??{open:!1}})},_Mt=(e,t)=>{var d;const n=Lo(e,"useGridPreferencesPanel"),r=y.useRef(),o=y.useRef(),i=y.useCallback(()=>{n.debug("Hiding Preferences Panel");const f=tS(e.current.state);f.openedPanelValue&&e.current.publishEvent("preferencePanelClose",{openedPanelValue:f.openedPanelValue}),e.current.setState(p=>W({},p,{preferencePanel:{open:!1}})),e.current.forceUpdate()},[e,n]),a=y.useCallback(()=>{o.current=setTimeout(()=>clearTimeout(r.current),0)},[]),s=y.useCallback(()=>{r.current=setTimeout(i,100)},[i]),l=y.useCallback((f,p,m)=>{n.debug("Opening Preferences Panel"),a(),e.current.setState(g=>W({},g,{preferencePanel:W({},g.preferencePanel,{open:!0,openedPanelValue:f,panelId:p,labelId:m})})),e.current.publishEvent("preferencePanelOpen",{openedPanelValue:f}),e.current.forceUpdate()},[n,a,e]);Jt(e,{showPreferences:l,hidePreferences:s},"public");const c=y.useCallback((f,p)=>{var v;const m=tS(e.current.state);return!p.exportOnlyDirtyModels||((v=t.initialState)==null?void 0:v.preferencePanel)!=null||m.open?W({},f,{preferencePanel:m}):f},[e,(d=t.initialState)==null?void 0:d.preferencePanel]),u=y.useCallback((f,p)=>{const m=p.stateToRestore.preferencePanel;return m!=null&&e.current.setState(g=>W({},g,{preferencePanel:m})),f},[e]);$r(e,"exportState",c),$r(e,"restoreState",u),y.useEffect(()=>()=>{clearTimeout(r.current),clearTimeout(o.current)},[])},oL=e=>{switch(e.type){case"boolean":return!1;case"date":case"dateTime":case"number":return;case"singleSelect":return null;case"string":default:return""}},DMt=["id","field"],NMt=["id","field"],LMt=(e,t)=>{const[n,r]=y.useState({}),o=y.useRef(n),i=y.useRef({}),{processRowUpdate:a,onProcessRowUpdateError:s,cellModesModel:l,onCellModesModelChange:c}=t,u=_=>(...D)=>{t.editMode===Gc.Cell&&_(...D)},d=y.useCallback((_,D)=>{const z=e.current.getCellParams(_,D);if(!e.current.isCellEditable(z))throw new Error(`MUI X: The cell with id=${_} and field=${D} is not editable.`)},[e]),f=y.useCallback((_,D,z)=>{if(e.current.getCellMode(_,D)!==z)throw new Error(`MUI X: The cell with id=${_} and field=${D} is not in ${z} mode.`)},[e]),p=y.useCallback((_,D)=>{if(!_.isEditable||_.cellMode===Zn.Edit)return;const z=W({},_,{reason:gu.cellDoubleClick});e.current.publishEvent("cellEditStart",z,D)},[e]),m=y.useCallback((_,D)=>{if(_.cellMode===Zn.View||e.current.getCellMode(_.id,_.field)===Zn.View)return;const z=W({},_,{reason:_l.cellFocusOut});e.current.publishEvent("cellEditStop",z,D)},[e]),g=y.useCallback((_,D)=>{if(_.cellMode===Zn.Edit){if(D.which===229)return;let z;if(D.key==="Escape"?z=_l.escapeKeyDown:D.key==="Enter"?z=_l.enterKeyDown:D.key==="Tab"&&(z=D.shiftKey?_l.shiftTabKeyDown:_l.tabKeyDown,D.preventDefault()),z){const F=W({},_,{reason:z});e.current.publishEvent("cellEditStop",F,D)}}else if(_.isEditable){let z;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:D,cellParams:_,editMode:"cell"}))return;if(Uce(D)?z=gu.printableKeyDown:Wce(D)?z=gu.pasteKeyDown:D.key==="Enter"?z=gu.enterKeyDown:(D.key==="Backspace"||D.key==="Delete")&&(z=gu.deleteKeyDown),z){const H=W({},_,{reason:z,key:D.key});e.current.publishEvent("cellEditStart",H,D)}}},[e]),v=y.useCallback(_=>{const{id:D,field:z,reason:F}=_,H={id:D,field:z};(F===gu.printableKeyDown||F===gu.deleteKeyDown||F===gu.pasteKeyDown)&&(H.deleteValue=!0),e.current.startCellEditMode(H)},[e]),w=y.useCallback(_=>{const{id:D,field:z,reason:F}=_;e.current.runPendingEditCellValueMutation(D,z);let H;F===_l.enterKeyDown?H="below":F===_l.tabKeyDown?H="right":F===_l.shiftTabKeyDown&&(H="left");const U=F==="escapeKeyDown";e.current.stopCellEditMode({id:D,field:z,ignoreModifications:U,cellToFocusAfter:H})},[e]),x=_=>async(...D)=>{var z;if(_){const{id:F,field:H}=D[0];((z=e.current.state.editRows[F][H])==null?void 0:z.error)||_(...D)}};ht(e,"cellDoubleClick",u(p)),ht(e,"cellFocusOut",u(m)),ht(e,"cellKeyDown",u(g)),ht(e,"cellEditStart",u(v)),ht(e,"cellEditStop",u(w)),lr(e,"cellEditStart",t.onCellEditStart),lr(e,"cellEditStop",x(t.onCellEditStop));const S=y.useCallback((_,D)=>{const z=Ho(e.current.state);return z[_]&&z[_][D]?Zn.Edit:Zn.View},[e]),P=wr(_=>{const D=_!==t.cellModesModel;c&&D&&c(_,{api:e.current}),!(t.cellModesModel&&D)&&(r(_),o.current=_,e.current.publishEvent("cellModesModelChange",_))}),T=y.useCallback((_,D,z)=>{const F=W({},o.current);if(z!==null)F[_]=W({},F[_],{[D]:W({},z)});else{const H=F[_],U=At(H,[D].map(rS));F[_]=U,Object.keys(F[_]).length===0&&delete F[_]}P(F)},[P]),E=y.useCallback((_,D,z)=>{e.current.setState(F=>{const H=W({},F.editRows);return z!==null?H[_]=W({},H[_],{[D]:W({},z)}):(delete H[_][D],Object.keys(H[_]).length===0&&delete H[_]),W({},F,{editRows:H})}),e.current.forceUpdate()},[e]),O=y.useCallback(_=>{const{id:D,field:z}=_,F=At(_,DMt);d(D,z),f(D,z,Zn.View),T(D,z,W({mode:Zn.Edit},F))},[d,f,T]),k=wr(async _=>{const{id:D,field:z,deleteValue:F,initialValue:H}=_,U=e.current.getCellValue(D,z);let q=U;F?q=oL(e.current.getColumn(z)):H&&(q=H);const X=e.current.getColumn(z),ae=!!X.preProcessEditCellProps&&F;let Z={value:q,error:!1,isProcessingProps:ae};if(E(D,z,Z),e.current.setCellFocus(D,z),ae&&(Z=await Promise.resolve(X.preProcessEditCellProps({id:D,row:e.current.getRow(D),props:Z,hasChanged:q!==U})),e.current.getCellMode(D,z)===Zn.Edit)){const K=Ho(e.current.state);E(D,z,W({},Z,{value:K[D][z].value,isProcessingProps:!1}))}}),A=y.useCallback(_=>{const{id:D,field:z}=_,F=At(_,NMt);f(D,z,Zn.Edit),T(D,z,W({mode:Zn.View},F))},[f,T]),I=wr(async _=>{const{id:D,field:z,ignoreModifications:F,cellToFocusAfter:H="none"}=_;f(D,z,Zn.Edit),e.current.runPendingEditCellValueMutation(D,z);const U=()=>{E(D,z,null),T(D,z,null),H!=="none"&&e.current.moveFocusToRelativeCell(D,z,H)};if(F){U();return}const q=Ho(e.current.state),{error:X,isProcessingProps:ae}=q[D][z];if(X||ae){i.current[D][z].mode=Zn.Edit,T(D,z,{mode:Zn.Edit});return}const Z=e.current.getRowWithUpdatedValuesFromCellEditing(D,z);if(a){const K=te=>{i.current[D][z].mode=Zn.Edit,T(D,z,{mode:Zn.Edit}),s&&s(te)};try{const te=e.current.getRow(D);Promise.resolve(a(Z,te,{rowId:D})).then(pe=>{e.current.updateRows([pe]),U()}).catch(K)}catch(te){K(te)}}else e.current.updateRows([Z]),U()}),R=y.useCallback(async _=>{var te,pe;const{id:D,field:z,value:F,debounceMs:H,unstable_skipValueParser:U}=_;d(D,z),f(D,z,Zn.Edit);const q=e.current.getColumn(z),X=e.current.getRow(D);let ae=F;q.valueParser&&!U&&(ae=q.valueParser(F,X,q,e));let Z=Ho(e.current.state),K=W({},Z[D][z],{value:ae,changeReason:H?"debouncedSetEditCellValue":"setEditCellValue"});if(q.preProcessEditCellProps){const ie=F!==Z[D][z].value;K=W({},K,{isProcessingProps:!0}),E(D,z,K),K=await Promise.resolve(q.preProcessEditCellProps({id:D,row:X,props:K,hasChanged:ie}))}return e.current.getCellMode(D,z)===Zn.View?!1:(Z=Ho(e.current.state),K=W({},K,{isProcessingProps:!1}),K.value=q.preProcessEditCellProps?Z[D][z].value:ae,E(D,z,K),Z=Ho(e.current.state),!((pe=(te=Z[D])==null?void 0:te[z])!=null&&pe.error))},[e,d,f,E]),N=y.useCallback((_,D)=>{const z=e.current.getColumn(D),F=Ho(e.current.state),H=e.current.getRow(_);if(!F[_]||!F[_][D])return e.current.getRow(_);const{value:U}=F[_][D];return z.valueSetter?z.valueSetter(U,H,z,e):W({},H,{[D]:U})},[e]),L={getCellMode:S,startCellEditMode:O,stopCellEditMode:A},j={setCellEditingEditCellValue:R,getRowWithUpdatedValuesFromCellEditing:N};Jt(e,L,"public"),Jt(e,j,"private"),y.useEffect(()=>{l&&P(l)},[l,P]),_o(()=>{const _=vO(e),D=i.current;i.current=Qle(n),Object.entries(n).forEach(([z,F])=>{Object.entries(F).forEach(([H,U])=>{var ae,Z;const q=((Z=(ae=D[z])==null?void 0:ae[H])==null?void 0:Z.mode)||Zn.View,X=_[z]??z;U.mode===Zn.Edit&&q===Zn.View?k(W({id:X,field:H},U)):U.mode===Zn.View&&q===Zn.Edit&&I(W({id:X,field:H},U))})})},[e,n,k,I])},FMt=["id"],jMt=["id"],BMt=(e,t)=>{const[n,r]=y.useState({}),o=y.useRef(n),i=y.useRef({}),a=y.useRef(),s=y.useRef(null),{processRowUpdate:l,onProcessRowUpdateError:c,rowModesModel:u,onRowModesModelChange:d}=t,f=H=>(...U)=>{t.editMode===Gc.Row&&H(...U)},p=y.useCallback((H,U)=>{const q=e.current.getCellParams(H,U);if(!e.current.isCellEditable(q))throw new Error(`MUI X: The cell with id=${H} and field=${U} is not editable.`)},[e]),m=y.useCallback((H,U)=>{if(e.current.getRowMode(H)!==U)throw new Error(`MUI X: The row with id=${H} is not in ${U} mode.`)},[e]),g=y.useCallback(H=>{const U=Ho(e.current.state);return Object.values(U[H]).some(q=>q.error)},[e]),v=y.useCallback((H,U)=>{if(!H.isEditable||e.current.getRowMode(H.id)===Bn.Edit)return;const q=e.current.getRowParams(H.id),X=W({},q,{field:H.field,reason:Rd.cellDoubleClick});e.current.publishEvent("rowEditStart",X,U)},[e]),w=y.useCallback(H=>{s.current=H},[]),x=y.useCallback((H,U)=>{H.isEditable&&e.current.getRowMode(H.id)!==Bn.View&&(s.current=null,a.current=setTimeout(()=>{var q;if(((q=s.current)==null?void 0:q.id)!==H.id){if(!e.current.getRow(H.id)||e.current.getRowMode(H.id)===Bn.View||g(H.id))return;const X=e.current.getRowParams(H.id),ae=W({},X,{field:H.field,reason:$l.rowFocusOut});e.current.publishEvent("rowEditStop",ae,U)}}))},[e,g]);y.useEffect(()=>()=>{clearTimeout(a.current)},[]);const S=y.useCallback((H,U)=>{if(H.cellMode===Bn.Edit){if(U.which===229)return;let q;if(U.key==="Escape")q=$l.escapeKeyDown;else if(U.key==="Enter")q=$l.enterKeyDown;else if(U.key==="Tab"){const X=Eb(e).filter(ae=>e.current.getColumn(ae).type===uM?!0:e.current.isCellEditable(e.current.getCellParams(H.id,ae)));if(U.shiftKey?H.field===X[0]&&(q=$l.shiftTabKeyDown):H.field===X[X.length-1]&&(q=$l.tabKeyDown),U.preventDefault(),!q){const ae=X.findIndex(K=>K===H.field),Z=X[U.shiftKey?ae-1:ae+1];e.current.setCellFocus(H.id,Z)}}if(q){if(q!==$l.escapeKeyDown&&g(H.id))return;const X=W({},e.current.getRowParams(H.id),{reason:q,field:H.field});e.current.publishEvent("rowEditStop",X,U)}}else if(H.isEditable){let q;if(!e.current.unstable_applyPipeProcessors("canStartEditing",!0,{event:U,cellParams:H,editMode:"row"}))return;if(Uce(U)||Wce(U)?q=Rd.printableKeyDown:U.key==="Enter"?q=Rd.enterKeyDown:(U.key==="Backspace"||U.key==="Delete")&&(q=Rd.deleteKeyDown),q){const ae=e.current.getRowParams(H.id),Z=W({},ae,{field:H.field,reason:q});e.current.publishEvent("rowEditStart",Z,U)}}},[e,g]),P=y.useCallback(H=>{const{id:U,field:q,reason:X}=H,ae={id:U,fieldToFocus:q};(X===Rd.printableKeyDown||X===Rd.deleteKeyDown)&&(ae.deleteValue=!!q),e.current.startRowEditMode(ae)},[e]),T=y.useCallback(H=>{const{id:U,reason:q,field:X}=H;e.current.runPendingEditCellValueMutation(U);let ae;q===$l.enterKeyDown?ae="below":q===$l.tabKeyDown?ae="right":q===$l.shiftTabKeyDown&&(ae="left");const Z=q==="escapeKeyDown";e.current.stopRowEditMode({id:U,ignoreModifications:Z,field:X,cellToFocusAfter:ae})},[e]);ht(e,"cellDoubleClick",f(v)),ht(e,"cellFocusIn",f(w)),ht(e,"cellFocusOut",f(x)),ht(e,"cellKeyDown",f(S)),ht(e,"rowEditStart",f(P)),ht(e,"rowEditStop",f(T)),lr(e,"rowEditStart",t.onRowEditStart),lr(e,"rowEditStop",t.onRowEditStop);const E=y.useCallback(H=>{if(t.editMode===Gc.Cell)return Bn.View;const U=Ho(e.current.state);return U[H]&&Object.keys(U[H]).length>0?Bn.Edit:Bn.View},[e,t.editMode]),O=wr(H=>{const U=H!==t.rowModesModel;d&&U&&d(H,{api:e.current}),!(t.rowModesModel&&U)&&(r(H),o.current=H,e.current.publishEvent("rowModesModelChange",H))}),k=y.useCallback((H,U)=>{const q=W({},o.current);U!==null?q[H]=W({},U):delete q[H],O(q)},[O]),A=y.useCallback((H,U)=>{e.current.setState(q=>{const X=W({},q.editRows);return U!==null?X[H]=U:delete X[H],W({},q,{editRows:X})}),e.current.forceUpdate()},[e]),I=y.useCallback((H,U,q)=>{e.current.setState(X=>{const ae=W({},X.editRows);return q!==null?ae[H]=W({},ae[H],{[U]:W({},q)}):(delete ae[H][U],Object.keys(ae[H]).length===0&&delete ae[H]),W({},X,{editRows:ae})}),e.current.forceUpdate()},[e]),R=y.useCallback(H=>{const{id:U}=H,q=At(H,FMt);m(U,Bn.View),k(U,W({mode:Bn.Edit},q))},[m,k]),N=wr(H=>{const{id:U,fieldToFocus:q,deleteValue:X,initialValue:ae}=H,Z=Nu(e),K=Z.reduce((te,pe)=>{if(!e.current.getCellParams(U,pe).isEditable)return te;const le=e.current.getColumn(pe);let re=e.current.getCellValue(U,pe);return q===pe&&(X||ae)&&(X?re=oL(le):ae&&(re=ae)),te[pe]={value:re,error:!1,isProcessingProps:!!le.preProcessEditCellProps&&X},te},{});A(U,K),q&&e.current.setCellFocus(U,q),Z.filter(te=>!!e.current.getColumn(te).preProcessEditCellProps&&X).forEach(te=>{const pe=e.current.getColumn(te),ie=e.current.getCellValue(U,te),le=X?oL(pe):ae??ie;Promise.resolve(pe.preProcessEditCellProps({id:U,row:e.current.getRow(U),props:K[te],hasChanged:le!==ie})).then(re=>{if(e.current.getRowMode(U)===Bn.Edit){const fe=Ho(e.current.state);I(U,te,W({},re,{value:fe[U][te].value,isProcessingProps:!1}))}})})}),L=y.useCallback(H=>{const{id:U}=H,q=At(H,jMt);m(U,Bn.Edit),k(U,W({mode:Bn.View},q))},[m,k]),j=wr(H=>{const{id:U,ignoreModifications:q,field:X,cellToFocusAfter:ae="none"}=H;e.current.runPendingEditCellValueMutation(U);const Z=()=>{ae!=="none"&&X&&e.current.moveFocusToRelativeCell(U,X,ae),A(U,null),k(U,null)};if(q){Z();return}const K=Ho(e.current.state),te=e.current.getRow(U);if(Object.values(K[U]).some(le=>le.isProcessingProps)){i.current[U].mode=Bn.Edit;return}if(g(U)){i.current[U].mode=Bn.Edit,k(U,{mode:Bn.Edit});return}const ie=e.current.getRowWithUpdatedValuesFromRowEditing(U);if(l){const le=re=>{i.current[U].mode=Bn.Edit,k(U,{mode:Bn.Edit}),c&&c(re)};try{Promise.resolve(l(ie,te,{rowId:U})).then(re=>{e.current.updateRows([re]),Z()}).catch(le)}catch(re){le(re)}}else e.current.updateRows([ie]),Z()}),_=y.useCallback(H=>{const{id:U,field:q,value:X,debounceMs:ae,unstable_skipValueParser:Z}=H;p(U,q);const K=e.current.getColumn(q),te=e.current.getRow(U);let pe=X;K.valueParser&&!Z&&(pe=K.valueParser(X,te,K,e));let ie=Ho(e.current.state),le=W({},ie[U][q],{value:pe,changeReason:ae?"debouncedSetEditCellValue":"setEditCellValue"});return K.preProcessEditCellProps||I(U,q,le),new Promise(re=>{const fe=[];if(K.preProcessEditCellProps){const ee=le.value!==ie[U][q].value;le=W({},le,{isProcessingProps:!0}),I(U,q,le);const ce=ie[U],me=At(ce,[q].map(rS)),we=Promise.resolve(K.preProcessEditCellProps({id:U,row:te,props:le,hasChanged:ee,otherFieldsProps:me})).then(ge=>{if(e.current.getRowMode(U)===Bn.View){re(!1);return}ie=Ho(e.current.state),ge=W({},ge,{isProcessingProps:!1}),ge.value=K.preProcessEditCellProps?ie[U][q].value:pe,I(U,q,ge)});fe.push(we)}Object.entries(ie[U]).forEach(([ee,ce])=>{if(ee===q)return;const me=e.current.getColumn(ee);if(!me.preProcessEditCellProps)return;ce=W({},ce,{isProcessingProps:!0}),I(U,ee,ce),ie=Ho(e.current.state);const we=ie[U],ge=At(we,[ee].map(rS)),Se=Promise.resolve(me.preProcessEditCellProps({id:U,row:te,props:ce,hasChanged:!1,otherFieldsProps:ge})).then(xe=>{if(e.current.getRowMode(U)===Bn.View){re(!1);return}xe=W({},xe,{isProcessingProps:!1}),I(U,ee,xe)});fe.push(Se)}),Promise.all(fe).then(()=>{e.current.getRowMode(U)===Bn.Edit?(ie=Ho(e.current.state),re(!ie[U][q].error)):re(!1)})})},[e,p,I]),D=y.useCallback(H=>{const U=Ho(e.current.state),q=e.current.getRow(H);if(!U[H])return e.current.getRow(H);let X=W({},q);return Object.entries(U[H]).forEach(([ae,Z])=>{const K=e.current.getColumn(ae);K.valueSetter?X=K.valueSetter(Z.value,X,K,e):X[ae]=Z.value}),X},[e]),z={getRowMode:E,startRowEditMode:R,stopRowEditMode:L},F={setRowEditingEditCellValue:_,getRowWithUpdatedValuesFromRowEditing:D};Jt(e,z,"public"),Jt(e,F,"private"),y.useEffect(()=>{u&&O(u)},[u,O]),_o(()=>{const H=vO(e),U=i.current;i.current=Qle(n);const q=new Set([...Object.keys(n),...Object.keys(U)]);Array.from(q).forEach(X=>{var te;const ae=n[X]??{mode:Bn.View},Z=((te=U[X])==null?void 0:te.mode)||Bn.View,K=H[X]??X;ae.mode===Bn.Edit&&Z===Bn.View?N(W({id:K},ae)):ae.mode===Bn.View&&Z===Bn.Edit&&j(W({id:K},ae))})},[e,n,N,j])},zMt=e=>W({},e,{editRows:{}}),VMt=(e,t)=>{LMt(e,t),BMt(e,t);const n=y.useRef({}),{isCellEditable:r}=t,o=y.useCallback(f=>Ov(f.rowNode)||!f.colDef.editable||!f.colDef.renderEditCell?!1:r?r(f):!0,[r]),i=(f,p,m,g)=>{if(!m){g();return}if(n.current[f]||(n.current[f]={}),n.current[f][p]){const[x]=n.current[f][p];clearTimeout(x)}const v=()=>{const[x]=n.current[f][p];clearTimeout(x),g(),delete n.current[f][p]},w=setTimeout(()=>{g(),delete n.current[f][p]},m);n.current[f][p]=[w,v]};y.useEffect(()=>{const f=n.current;return()=>{Object.entries(f).forEach(([p,m])=>{Object.keys(m).forEach(g=>{const[v]=f[p][g];clearTimeout(v),delete f[p][g]})})}},[]);const a=y.useCallback((f,p)=>{if(n.current[f]){if(!p)Object.keys(n.current[f]).forEach(m=>{const[,g]=n.current[f][m];g()});else if(n.current[f][p]){const[,m]=n.current[f][p];m()}}},[]),s=y.useCallback(f=>{const{id:p,field:m,debounceMs:g}=f;return new Promise(v=>{i(p,m,g,async()=>{const w=t.editMode===Gc.Row?e.current.setRowEditingEditCellValue:e.current.setCellEditingEditCellValue;if(e.current.getCellMode(p,m)===Zn.Edit){const x=await w(f);v(x)}})})},[e,t.editMode]),l=y.useCallback((f,p)=>t.editMode===Gc.Cell?e.current.getRowWithUpdatedValuesFromCellEditing(f,p):e.current.getRowWithUpdatedValuesFromRowEditing(f),[e,t.editMode]),c=y.useCallback((f,p)=>{var g;return((g=Ho(e.current.state)[f])==null?void 0:g[p])??null},[e]),u={isCellEditable:o,setEditCellValue:s,getRowWithUpdatedValues:l,unstable_getEditCellMeta:c},d={runPendingEditCellValueMutation:a};Jt(e,u,"public"),Jt(e,d,"private")},HMt=(e,t,n)=>{const r=!!t.unstable_dataSource;return n.current.caches.rows=JP({rows:r?[]:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),W({},e,{rows:ice({apiRef:n,rowCountProp:t.rowCount,loadingProp:r?!0:t.loading,previousTree:null,previousTreeDepths:null})})},UMt=(e,t)=>{const n=Lo(e,"useGridRows"),r=sp(e,t),o=y.useRef(Date.now()),i=y.useRef(t.rowCount),a=Tb(),s=y.useCallback(F=>{const H=uf(e)[F];if(H)return H;const U=e.current.getRowNode(F);return U&&Ov(U)?{[hy]:F}:null},[e]),l=t.getRowId,c=y.useCallback(F=>hy in F?F[hy]:l?l(F):F.id,[l]),u=y.useMemo(()=>r.rows.reduce((F,{id:H},U)=>(F[H]=U,F),{}),[r.rows]),d=y.useCallback(({cache:F,throttle:H})=>{const U=()=>{o.current=Date.now(),e.current.setState(X=>W({},X,{rows:ice({apiRef:e,rowCountProp:t.rowCount,loadingProp:t.loading,previousTree:xi(e),previousTreeDepths:Mq(e),previousGroupsToFetch:_Ct(e)})})),e.current.publishEvent("rowsSet"),e.current.forceUpdate()};if(a.clear(),e.current.caches.rows=F,!H){U();return}const q=t.throttleRowsMs-(Date.now()-o.current);if(q>0){a.start(q,U);return}U()},[t.throttleRowsMs,t.rowCount,t.loading,e,a]),f=y.useCallback(F=>{n.debug(`Updating all rows, new length ${F.length}`);const H=JP({rows:F,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),U=e.current.caches.rows;H.rowsBeforePartialUpdates=U.rowsBeforePartialUpdates,d({cache:H,throttle:!0})},[n,t.getRowId,t.loading,t.rowCount,d,e]),p=y.useCallback(F=>{if(t.signature===ol.DataGrid&&F.length>1)throw new Error(["MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));const H=$q(e,F,t.getRowId),U=Aq({updates:H,getRowId:t.getRowId,previousCache:e.current.caches.rows});d({cache:U,throttle:!0})},[t.signature,t.getRowId,d,e]),m=y.useCallback((F,H)=>{const U=$q(e,F,t.getRowId),q=Aq({updates:U,getRowId:t.getRowId,previousCache:e.current.caches.rows,groupKeys:H??[]});d({cache:q,throttle:!1})},[t.getRowId,d,e]),g=y.useCallback(F=>{F!==t.loading&&(n.debug(`Setting loading to ${F}`),e.current.setState(H=>W({},H,{rows:W({},H.rows,{loading:F})})),e.current.caches.rows.loadingPropBeforePartialUpdates=F)},[t.loading,e,n]),v=y.useCallback(()=>{const F=hP(e),H=uf(e);return new Map(F.map(U=>[U,H[U]??{}]))},[e]),w=y.useCallback(()=>dM(e),[e]),x=y.useCallback(()=>hP(e),[e]),S=y.useCallback(F=>u[F],[u]),P=y.useCallback((F,H)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.type!=="group")throw new Error("MUI X: Only group nodes can be expanded or collapsed.");const q=W({},U,{childrenExpanded:H});e.current.setState(X=>W({},X,{rows:W({},X.rows,{tree:W({},X.rows.tree,{[F]:q})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",q)},[e]),T=y.useCallback(F=>xi(e)[F]??null,[e]),E=y.useCallback(({skipAutoGeneratedRows:F=!0,groupId:H,applySorting:U,applyFiltering:q})=>{const X=xi(e);let ae;if(U){const Z=X[H];if(!Z)return[];const K=g1(e);ae=[];const te=K.findIndex(pe=>pe===H)+1;for(let pe=te;peZ.depth;pe+=1){const ie=K[pe];(!F||!Ov(X[ie]))&&ae.push(ie)}}else ae=Nz(X,H,F);if(q){const Z=Ib(e);ae=ae.filter(K=>Z[K]!==!1)}return ae},[e]),O=y.useCallback((F,H)=>{const U=e.current.getRowNode(F);if(!U)throw new Error(`MUI X: No row with id #${F} found.`);if(U.parent!==oi)throw new Error("MUI X: The row reordering do not support reordering of grouped rows yet.");if(U.type!=="leaf")throw new Error("MUI X: The row reordering do not support reordering of footer or grouping rows.");e.current.setState(q=>{const X=xi(q,e.current.instanceId)[oi],ae=X.children,Z=ae.findIndex(te=>te===F);if(Z===-1||Z===H)return q;n.debug(`Moving row ${F} to index ${H}`);const K=[...ae];return K.splice(H,0,K.splice(Z,1)[0]),W({},q,{rows:W({},q.rows,{tree:W({},q.rows.tree,{[oi]:W({},X,{children:K})})})})}),e.current.publishEvent("rowsSet")},[e,n]),k=y.useCallback((F,H)=>{if(t.signature===ol.DataGrid&&H.length>1)throw new Error(["MUI X: You cannot replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(` +`));if(H.length===0)return;if(Ob(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const q=W({},xi(e)),X=W({},uf(e)),ae=W({},vO(e)),Z=q[oi],K=[...Z.children],te=new Set;for(let ie=0;ie{var le;return((le=q[ie])==null?void 0:le.type)==="leaf"});e.current.caches.rows.dataRowIdToModelLookup=X,e.current.caches.rows.dataRowIdToIdLookup=ae,e.current.setState(ie=>W({},ie,{rows:W({},ie.rows,{dataRowIdToModelLookup:X,dataRowIdToIdLookup:ae,dataRowIds:pe,tree:q})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),A={getRow:s,setLoading:g,getRowId:c,getRowModels:v,getRowsCount:w,getAllRowIds:x,setRows:f,updateRows:p,getRowNode:T,getRowIndexRelativeToVisibleRows:S,unstable_replaceRows:k},I={setRowIndex:O,setRowChildrenExpansion:P,getRowGroupChildren:E},R={updateServerRows:m},N=y.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let F;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?F=W({},e.current.caches.rows,{updates:{type:"full",rows:hP(e)}}):F=JP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),d({cache:F,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,d]),L=eu(()=>t.unstable_dataSource),j=y.useCallback(F=>{if(t.unstable_dataSource&&t.unstable_dataSource!==L.current){L.current=t.unstable_dataSource;return}F==="rowTreeCreation"&&N()},[N,L,t.unstable_dataSource]),_=y.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==DCt(e)&&N()},[e,N]);ht(e,"activeStrategyProcessorChange",j),ht(e,"strategyAvailabilityChange",_);const D=y.useCallback(()=>{e.current.setState(F=>{const H=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:xi(F,e.current.instanceId),treeDepths:Mq(F,e.current.instanceId),dataRowIds:hP(F,e.current.instanceId),dataRowIdToModelLookup:uf(F,e.current.instanceId),dataRowIdToIdLookup:vO(F,e.current.instanceId)});return W({},F,{rows:W({},F.rows,H,{totalTopLevelRowCount:oce({tree:H.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);Jz(e,"hydrateRows",D),Jt(e,A,"public"),Jt(e,I,t.signature===ol.DataGrid?"private":"public"),Jt(e,R,"private");const z=y.useRef(!0);y.useEffect(()=>{var X;if(z.current){z.current=!1;return}let F=!1;t.rowCount!==i.current&&(F=!0,i.current=t.rowCount);const H=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,U=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,q=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;H&&(U||(e.current.setState(ae=>W({},ae,{rows:W({},ae.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),q||(e.current.setState(ae=>W({},ae,{rows:W({},ae.rows,{totalRowCount:Math.max(t.rowCount||0,ae.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,ae.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate()),!F)||(n.debug(`Updating all rows, new length ${(X=t.rows)==null?void 0:X.length}`),d({cache:JP({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1}))},[t.rows,t.rowCount,t.getRowId,t.loading,n,d,e])},WMt=e=>{const t={[oi]:W({},FCt(),{children:e})};for(let n=0;n{const n=W({},e),r={};for(let a=0;a!r[a])),n[oi]=W({},o,{children:i}),{groupingName:zh,tree:n,treeDepths:{0:i.length},dataRowIds:i}},qMt=e=>e.updates.type==="full"?WMt(e.updates.rows):GMt({previousTree:e.previousTree,actions:e.updates.actions}),KMt=e=>{CO(e,zh,"rowTreeCreation",qMt)},Jce=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],YMt=(e,t)=>W({},e,{rowSelection:t.rowSelection?Jce(t.rowSelectionModel)??[]:[]}),XMt=(e,t)=>{var z,F,H,U,q,X,ae;const n=Lo(e,"useGridSelection"),r=y.useCallback(Z=>(...K)=>{t.rowSelection&&Z(...K)},[t.rowSelection]),o=t.signature!==ol.DataGrid&&(((z=t.rowSelectionPropagation)==null?void 0:z.parents)||((F=t.rowSelectionPropagation)==null?void 0:F.descendants)),i=y.useMemo(()=>Jce(t.rowSelectionModel,Bs(e.current.state)),[e,t.rowSelectionModel]),a=y.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:i,propOnChange:t.onRowSelectionModelChange,stateSelector:Bs,changeEvent:"rowSelectionChange"});const{checkboxSelection:s,disableRowSelectionOnClick:l,isRowSelectable:c}=t,u=Bz(t),d=sp(e,t),f=Ye(e,xi),p=Ye(e,Ob)>1,m=y.useCallback(Z=>{let K=Z;const te=a.current??Z,pe=e.current.isRowSelected(Z);if(pe){const ie=my(e),le=ie.findIndex(fe=>fe===te),re=ie.findIndex(fe=>fe===K);if(le===re)return;le>re?K=ie[re+1]:K=ie[re-1]}a.current=Z,e.current.selectRowRange({startId:te,endId:K},!pe)},[e]),g=y.useCallback(Z=>{if(t.signature===ol.DataGrid&&!u&&Array.isArray(Z)&&Z.length>1)throw new Error(["MUI X: `rowSelectionModel` can only contain 1 item in DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection."].join(` +`));Bs(e.current.state)!==Z&&(n.debug("Setting selection model"),e.current.setState(te=>W({},te,{rowSelection:t.rowSelection?Z:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,u]),v=y.useCallback(Z=>Bs(e.current.state).includes(Z),[e]),w=y.useCallback(Z=>{if(t.rowSelection===!1||c&&!c(e.current.getRowParams(Z)))return!1;const K=e.current.getRowNode(Z);return!((K==null?void 0:K.type)==="footer"||(K==null?void 0:K.type)==="pinnedRow")},[e,t.rowSelection,c]),x=y.useCallback(()=>cPt(e),[e]),S=y.useCallback((Z,K=!0,te=!1)=>{var pe,ie,le,re,fe,ee;if(e.current.isRowSelectable(Z))if(a.current=Z,te){n.debug(`Setting selection for row ${Z}`);const ce=[],me=we=>{ce.push(we)};K&&(me(Z),o&&mP(e,f,Z,((pe=t.rowSelectionPropagation)==null?void 0:pe.descendants)??!1,((ie=t.rowSelectionPropagation)==null?void 0:ie.parents)??!1,me)),e.current.setRowSelectionModel(ce)}else{n.debug(`Toggling selection for row ${Z}`);const ce=Bs(e.current.state),me=new Set(ce);me.delete(Z);const we=xe=>{me.add(xe)},ge=xe=>{me.delete(xe)};K?(we(Z),o&&mP(e,f,Z,((le=t.rowSelectionPropagation)==null?void 0:le.descendants)??!1,((re=t.rowSelectionPropagation)==null?void 0:re.parents)??!1,we)):o&&Rq(e,f,Z,((fe=t.rowSelectionPropagation)==null?void 0:fe.descendants)??!1,((ee=t.rowSelectionPropagation)==null?void 0:ee.parents)??!1,ge),(me.size<2||u)&&e.current.setRowSelectionModel(Array.from(me))}},[e,n,o,f,(H=t.rowSelectionPropagation)==null?void 0:H.descendants,(U=t.rowSelectionPropagation)==null?void 0:U.parents,u]),P=y.useCallback((Z,K=!0,te=!1)=>{n.debug("Setting selection for several rows");const pe=Z.filter(re=>e.current.isRowSelectable(re));let ie;if(te){if(K){if(ie=new Set(pe),o){const fe=ee=>{ie.add(ee)};pe.forEach(ee=>{var ce,me;mP(e,f,ee,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((me=t.rowSelectionPropagation)==null?void 0:me.parents)??!1,fe)})}}else ie=new Set;const re=Lu(e);if(ie.size===Object.keys(re).length&&Array.from(ie).every(fe=>re[fe]===fe))return}else{ie=new Set(Object.values(Lu(e)));const re=ee=>{ie.add(ee)},fe=ee=>{ie.delete(ee)};pe.forEach(ee=>{var ce,me,we,ge;K?(ie.add(ee),o&&mP(e,f,ee,((ce=t.rowSelectionPropagation)==null?void 0:ce.descendants)??!1,((me=t.rowSelectionPropagation)==null?void 0:me.parents)??!1,re)):(fe(ee),o&&Rq(e,f,ee,((we=t.rowSelectionPropagation)==null?void 0:we.descendants)??!1,((ge=t.rowSelectionPropagation)==null?void 0:ge.parents)??!1,fe))})}(ie.size<2||u)&&e.current.setRowSelectionModel(Array.from(ie))},[n,o,u,e,f,(q=t.rowSelectionPropagation)==null?void 0:q.descendants,(X=t.rowSelectionPropagation)==null?void 0:X.parents]),T=y.useCallback(({startId:Z,endId:K},te=!0,pe=!1)=>{if(!e.current.getRow(Z)||!e.current.getRow(K))return;n.debug(`Expanding selection from row ${Z} to row ${K}`);const ie=my(e),le=ie.indexOf(Z),re=ie.indexOf(K),[fe,ee]=le>re?[re,le]:[le,re],ce=ie.slice(fe,ee+1);e.current.selectRows(ce,te,pe)},[e,n]),E={selectRow:S,setRowSelectionModel:g,getSelectedRows:x,isRowSelected:v,isRowSelectable:w},O={selectRows:P,selectRowRange:T};Jt(e,E,"public"),Jt(e,O,t.signature===ol.DataGrid?"private":"public");const k=y.useRef(!0),A=y.useCallback((Z=!1)=>{var ee;if(k.current)return;const K=Bs(e.current.state),te=uf(e),pe=Ib(e),ie=W({},Lu(e)),le=ce=>t.filterMode==="server"?!te[ce]:pe[ce]!==!0;let re=!1;K.forEach(ce=>{var we;if(le(ce)){if(t.keepNonExistentRowsSelected)return;delete ie[ce],re=!0;return}if(!((we=t.rowSelectionPropagation)!=null&&we.parents))return;const me=f[ce];if(me.type==="group"){if(me.isAutoGenerated){delete ie[ce],re=!0;return}me.children.every(Se=>pe[Se]===!1)||(delete ie[ce],re=!0)}});const fe=p&&((ee=t.rowSelectionPropagation)==null?void 0:ee.parents)&&Object.keys(ie).length>0;if(re||fe&&!Z){const ce=Object.values(ie);fe?e.current.selectRows(ce,!0,!0):e.current.setRowSelectionModel(ce)}},[e,p,(ae=t.rowSelectionPropagation)==null?void 0:ae.parents,t.keepNonExistentRowsSelected,t.filterMode,f]),I=y.useCallback((Z,K)=>{const te=K.metaKey||K.ctrlKey,pe=!s&&!te&&!oIt(K),ie=!u||pe,le=e.current.isRowSelected(Z);ie?e.current.selectRow(Z,pe?!0:!le,!0):e.current.selectRow(Z,!le,!1)},[e,u,s]),R=y.useCallback((Z,K)=>{var ie;if(l)return;const te=(ie=K.target.closest(`.${se.cell}`))==null?void 0:ie.getAttribute("data-field");if(te===kb.field||te===pM)return;if(te){const le=e.current.getColumn(te);if((le==null?void 0:le.type)===uM)return}e.current.getRowNode(Z.id).type!=="pinnedRow"&&(K.shiftKey&&u?m(Z.id):I(Z.id,K))},[l,u,e,m,I]),N=y.useCallback((Z,K)=>{var te;u&&K.shiftKey&&((te=window.getSelection())==null||te.removeAllRanges())},[u]),L=y.useCallback((Z,K)=>{u&&K.nativeEvent.shiftKey?m(Z.id):e.current.selectRow(Z.id,Z.value,!u)},[e,m,u]),j=y.useCallback(Z=>{const K=t.pagination&&t.checkboxSelectionVisibleOnly&&t.paginationMode==="client"?xce(e):my(e);e.current.selectRows(K,Z.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination,t.paginationMode]),_=y.useCallback((Z,K)=>{if(e.current.getCellMode(Z.id,Z.field)!==Zn.Edit&&!b1(K)){if(SO(K.key)&&K.shiftKey){const te=Fa(e);if(te&&te.id!==Z.id){K.preventDefault();const pe=e.current.isRowSelected(te.id);if(!u){e.current.selectRow(te.id,!pe,!0);return}const ie=e.current.getRowIndexRelativeToVisibleRows(te.id),le=e.current.getRowIndexRelativeToVisibleRows(Z.id);let re,fe;ie>le?pe?(re=le,fe=ie-1):(re=le,fe=ie):pe?(re=ie+1,fe=le):(re=ie,fe=le);const ee=d.rows.slice(re,fe+1).map(ce=>ce.id);e.current.selectRows(ee,!pe);return}}if(K.key===" "&&K.shiftKey){K.preventDefault(),I(Z.id,K);return}String.fromCharCode(K.keyCode)==="A"&&(K.ctrlKey||K.metaKey)&&(K.preventDefault(),P(e.current.getAllRowIds(),!0))}},[e,I,P,d.rows,u]);ht(e,"sortedRowsSet",r(()=>A(!0))),ht(e,"filteredRowsSet",r(A)),ht(e,"rowClick",r(R)),ht(e,"rowSelectionCheckboxChange",r(L)),ht(e,"headerSelectionCheckboxChange",j),ht(e,"cellMouseDown",r(N)),ht(e,"cellKeyDown",r(_)),y.useEffect(()=>{i!==void 0&&e.current.setRowSelectionModel(i)},[e,i,t.rowSelection]),y.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const D=i!=null;y.useEffect(()=>{if(D||!t.rowSelection)return;const Z=Bs(e.current.state);if(w){const K=Z.filter(te=>w(te));K.length{if(!t.rowSelection||D)return;const Z=Bs(e.current.state);!u&&Z.length>1&&e.current.setRowSelectionModel([])},[e,u,s,D,t.rowSelection]),y.useEffect(()=>{r(A)},[A,r]),y.useEffect(()=>{k.current&&(k.current=!1)},[])},QMt=e=>{const{classes:t}=e;return y.useMemo(()=>vn({cellCheckbox:["cellCheckbox"],columnHeaderCheckbox:["columnHeaderCheckbox"]},bn,t),[t])},JMt=(e,t)=>{const n={classes:t.classes},r=QMt(n),o=y.useCallback(i=>{const a=W({},kb,{cellClassName:r.cellCheckbox,headerClassName:r.columnHeaderCheckbox,headerName:e.current.getLocaleText("checkboxSelectionHeaderName")}),s=t.checkboxSelection,l=i.lookup[bu]!=null;return s&&!l?(i.lookup[bu]=a,i.orderedFields=[bu,...i.orderedFields]):!s&&l?(delete i.lookup[bu],i.orderedFields=i.orderedFields.filter(c=>c!==bu)):s&&l&&(i.lookup[bu]=W({},a,i.lookup[bu])),i},[e,r,t.checkboxSelection]);$r(e,"hydrateColumns",o)},ZMt=(e,t)=>{var r,o;const n=t.sortModel??((o=(r=t.initialState)==null?void 0:r.sorting)==null?void 0:o.sortModel)??[];return W({},e,{sorting:{sortModel:qle(n,t.disableMultipleColumnsSorting),sortedRows:[]}})},eAt=(e,t)=>{var T,E;const n=Lo(e,"useGridSorting");e.current.registerControlState({stateId:"sortModel",propModel:t.sortModel,propOnChange:t.onSortModelChange,stateSelector:js,changeEvent:"sortModelChange"});const r=y.useCallback((O,k)=>{const A=js(e),I=A.findIndex(N=>N.field===O);let R=[...A];return I>-1?(k==null?void 0:k.sort)==null?R.splice(I,1):R.splice(I,1,k):R=[...A,k],R},[e]),o=y.useCallback((O,k)=>{const I=js(e).find(R=>R.field===O.field);if(I){const R=k===void 0?Sq(O.sortingOrder??t.sortingOrder,I.sort):k;return R===void 0?void 0:W({},I,{sort:R})}return{field:O.field,sort:k===void 0?Sq(O.sortingOrder??t.sortingOrder):k}},[e,t.sortingOrder]),i=y.useCallback((O,k)=>k==null||k.sortable===!1||t.disableColumnSorting?O:(k.sortingOrder||t.sortingOrder).some(I=>!!I)?[...O,"columnMenuSortItem"]:O,[t.sortingOrder,t.disableColumnSorting]),a=y.useCallback(()=>{e.current.setState(O=>{if(t.sortingMode==="server")return n.debug("Skipping sorting rows as sortingMode = server"),W({},O,{sorting:W({},O.sorting,{sortedRows:Nz(xi(e),oi,!1)})});const k=js(O,e.current.instanceId),A=iCt(k,e),I=e.current.applyStrategyProcessor("sorting",{sortRowList:A});return W({},O,{sorting:W({},O.sorting,{sortedRows:I})})}),e.current.publishEvent("sortedRowsSet"),e.current.forceUpdate()},[e,n,t.sortingMode]),s=y.useCallback(O=>{js(e)!==O&&(n.debug("Setting sort model"),e.current.setState(xq(O,t.disableMultipleColumnsSorting)),e.current.forceUpdate(),e.current.applySorting())},[e,n,t.disableMultipleColumnsSorting]),l=y.useCallback((O,k,A)=>{const I=e.current.getColumn(O),R=o(I,k);let N;!A||t.disableMultipleColumnsSorting?N=(R==null?void 0:R.sort)==null?[]:[R]:N=r(I.field,R),e.current.setSortModel(N)},[e,r,o,t.disableMultipleColumnsSorting]),c=y.useCallback(()=>js(e),[e]),u=y.useCallback(()=>Lz(e).map(k=>k.model),[e]),d=y.useCallback(()=>g1(e),[e]),f=y.useCallback(O=>e.current.getSortedRowIds()[O],[e]);Jt(e,{getSortModel:c,getSortedRows:u,getSortedRowIds:d,getRowIdFromRowIndex:f,setSortModel:s,sortColumn:l,applySorting:a},"public");const m=y.useCallback((O,k)=>{var R,N;const A=js(e);return!k.exportOnlyDirtyModels||t.sortModel!=null||((N=(R=t.initialState)==null?void 0:R.sorting)==null?void 0:N.sortModel)!=null||A.length>0?W({},O,{sorting:{sortModel:A}}):O},[e,t.sortModel,(E=(T=t.initialState)==null?void 0:T.sorting)==null?void 0:E.sortModel]),g=y.useCallback((O,k)=>{var I;const A=(I=k.stateToRestore.sorting)==null?void 0:I.sortModel;return A==null?O:(e.current.setState(xq(A,t.disableMultipleColumnsSorting)),W({},O,{callbacks:[...O.callbacks,e.current.applySorting]}))},[e,t.disableMultipleColumnsSorting]),v=y.useCallback(O=>{const k=xi(e),A=k[oi],I=O.sortRowList?O.sortRowList(A.children.map(R=>k[R])):[...A.children];return A.footerId!=null&&I.push(A.footerId),I},[e]);$r(e,"exportState",m),$r(e,"restoreState",g),CO(e,zh,"sorting",v);const w=y.useCallback(({field:O,colDef:k},A)=>{if(!k.sortable||t.disableColumnSorting)return;const I=A.shiftKey||A.metaKey||A.ctrlKey;l(O,void 0,I)},[l,t.disableColumnSorting]),x=y.useCallback(({field:O,colDef:k},A)=>{!k.sortable||t.disableColumnSorting||A.key==="Enter"&&!A.ctrlKey&&!A.metaKey&&l(O,void 0,A.shiftKey)},[l,t.disableColumnSorting]),S=y.useCallback(()=>{const O=js(e),k=dd(e);if(O.length>0){const A=O.filter(I=>k[I.field]);A.length{O==="sorting"&&e.current.applySorting()},[e]);$r(e,"columnMenu",i),ht(e,"columnHeaderClick",w),ht(e,"columnHeaderKeyDown",x),ht(e,"rowsSet",e.current.applySorting),ht(e,"columnsChange",S),ht(e,"activeStrategyProcessorChange",P),y1(()=>{e.current.applySorting()}),_o(()=>{t.sortModel!==void 0&&e.current.setSortModel(t.sortModel)},[e,t.sortModel])};function pK(e){const{containerSize:t,scrollPosition:n,elementSize:r,elementOffset:o}=e,i=o+r;if(r>t)return o;if(i-t>n)return i-t;if(o{const n=nr(),r=Lo(e,"useGridScroll"),o=e.current.columnHeadersContainerRef,i=e.current.virtualScrollerRef,a=Ye(e,ap),s=y.useCallback(d=>{var w;const f=li(e.current.state),p=dM(e),m=t.unstable_listView?[kv(e.current.state)]:vo(e);if(!(d.rowIndex==null)&&p===0||m.length===0)return!1;r.debug(`Scrolling to cell at row ${d.rowIndex}, col: ${d.colIndex} `);let v={};if(d.colIndex!==void 0){const x=ip(e);let S;if(typeof d.rowIndex<"u"){const P=(w=a[d.rowIndex])==null?void 0:w.id,T=e.current.unstable_getCellColSpanInfo(P,d.colIndex);T&&!T.spannedByColSpan&&(S=T.cellProps.width)}typeof S>"u"&&(S=m[d.colIndex].computedWidth),v.left=pK({containerSize:f.viewportOuterSize.width,scrollPosition:Math.abs(i.current.scrollLeft),elementSize:S,elementOffset:x[d.colIndex]})}if(d.rowIndex!==void 0){const x=Mb(e.current.state),S=TPt(e),P=EPt(e),T=t.pagination?d.rowIndex-S*P:d.rowIndex,E=x.positions[T+1]?x.positions[T+1]-x.positions[T]:x.currentPageTotalHeight-x.positions[T];v.top=pK({containerSize:f.viewportInnerSize.height,scrollPosition:i.current.scrollTop,elementSize:E,elementOffset:x.positions[T]})}return v=e.current.unstable_applyPipeProcessors("scrollToIndexes",v,d),typeof v.left!==void 0||typeof v.top!==void 0?(e.current.scroll(v),!0):!1},[r,e,i,t.pagination,a,t.unstable_listView]),l=y.useCallback(d=>{if(i.current&&d.left!==void 0&&o.current){const f=n?-1:1;o.current.scrollLeft=d.left,i.current.scrollLeft=f*d.left,r.debug(`Scrolling left: ${d.left}`)}i.current&&d.top!==void 0&&(i.current.scrollTop=d.top,r.debug(`Scrolling top: ${d.top}`)),r.debug("Scrolling, updating container, and viewport")},[i,n,o,r]),c=y.useCallback(()=>i!=null&&i.current?{top:i.current.scrollTop,left:i.current.scrollLeft}:{top:0,left:0},[i]);Jt(e,{scroll:l,scrollToIndexes:s,getScrollPosition:c},"public")};function nAt(e,t){lr(e,"columnHeaderClick",t.onColumnHeaderClick),lr(e,"columnHeaderContextMenu",t.onColumnHeaderContextMenu),lr(e,"columnHeaderDoubleClick",t.onColumnHeaderDoubleClick),lr(e,"columnHeaderOver",t.onColumnHeaderOver),lr(e,"columnHeaderOut",t.onColumnHeaderOut),lr(e,"columnHeaderEnter",t.onColumnHeaderEnter),lr(e,"columnHeaderLeave",t.onColumnHeaderLeave),lr(e,"cellClick",t.onCellClick),lr(e,"cellDoubleClick",t.onCellDoubleClick),lr(e,"cellKeyDown",t.onCellKeyDown),lr(e,"preferencePanelClose",t.onPreferencePanelClose),lr(e,"preferencePanelOpen",t.onPreferencePanelOpen),lr(e,"menuOpen",t.onMenuOpen),lr(e,"menuClose",t.onMenuClose),lr(e,"rowDoubleClick",t.onRowDoubleClick),lr(e,"rowClick",t.onRowClick),lr(e,"stateChange",t.onStateChange)}function rAt(e,t=166){let n,r;const o=()=>{n=void 0,e(...r)};function i(...a){r=a,n===void 0&&(n=setTimeout(o,t))}return i.clear=()=>{clearTimeout(n),n=void 0},i}const iL={autoHeight:!1,autoPageSize:!1,autosizeOnMount:!1,checkboxSelection:!1,checkboxSelectionVisibleOnly:!1,clipboardCopyCellDelimiter:" ",columnBufferPx:150,columnHeaderHeight:56,disableAutosize:!1,disableColumnFilter:!1,disableColumnMenu:!1,disableColumnReorder:!1,disableColumnResize:!1,disableColumnSelector:!1,disableColumnSorting:!1,disableDensitySelector:!1,disableEval:!1,disableMultipleColumnsFiltering:!1,disableMultipleColumnsSorting:!1,disableMultipleRowSelection:!1,disableRowSelectionOnClick:!1,disableVirtualization:!1,editMode:Gc.Cell,filterDebounceMs:150,filterMode:"client",hideFooter:!1,hideFooterPagination:!1,hideFooterRowCount:!1,hideFooterSelectedRowCount:!1,ignoreDiacritics:!1,ignoreValueFormatterDuringExport:!1,indeterminateCheckboxAction:"deselect",keepColumnPositionIfDraggedOutside:!1,keepNonExistentRowsSelected:!1,loading:!1,logger:console,logLevel:"error",pageSizeOptions:[25,50,100],pagination:!1,paginationMode:"client",resizeThrottleMs:60,rowBufferPx:150,rowHeight:52,rowPositionsDebounceMs:166,rows:[],rowSelection:!0,rowSpacingType:"margin",showCellVerticalBorder:!1,showColumnVerticalBorder:!1,sortingMode:"client",sortingOrder:["asc","desc",null],throttleRowsMs:0,unstable_rowSpanning:!1},vg={width:0,height:0},oAt={isReady:!1,root:vg,viewportOuterSize:vg,viewportInnerSize:vg,contentSize:vg,minimumSize:vg,hasScrollX:!1,hasScrollY:!1,scrollbarSize:0,headerHeight:0,groupHeaderHeight:0,headerFilterHeight:0,rowWidth:0,rowHeight:0,columnsTotalWidth:0,leftPinnedWidth:0,rightPinnedWidth:0,headersTotalHeight:0,topContainerHeight:0,bottomContainerHeight:0},iAt=e=>W({},e,{dimensions:oAt});function aAt(e,t){const n=Lo(e,"useResizeContainer"),r=y.useRef(!1),o=y.useRef(vg),i=Ye(e,li),a=Ye(e,Mb),s=Ye(e,m1),l=Ye(e,h1),c=y.useMemo(()=>sce(t.rowHeight,iL.rowHeight),[t.rowHeight]),u=Math.floor(c*l),d=Math.floor(t.columnHeaderHeight*l),f=Math.floor((t.columnGroupHeaderHeight??t.columnHeaderHeight)*l),p=Math.floor((t.headerFilterHeight??t.columnHeaderHeight)*l),m=lAt($z(e),6),g=Uz(e,t),v=s.left.reduce((D,z)=>D+z.computedWidth,0),w=s.right.reduce((D,z)=>D+z.computedWidth,0),[x,S]=y.useState(),P=y.useMemo(()=>rAt(S,t.resizeThrottleMs),[t.resizeThrottleMs]),T=y.useRef(),E=()=>e.current.state.dimensions,O=wr(D=>{e.current.setState(z=>W({},z,{dimensions:D}))}),k=y.useCallback(()=>{const D=e.current.mainElementRef.current;if(!D)return;const z=c1t(D).getComputedStyle(D),F={width:parseFloat(z.width)||0,height:parseFloat(z.height)||0};(!T.current||!hK(T.current,F))&&(e.current.publishEvent("resize",F),T.current=F)},[e]),A=y.useCallback(()=>{const D=li(e.current.state);if(!D.isReady)return 0;const z=gy(e,{pagination:t.pagination,paginationMode:t.paginationMode});if(t.getRowHeight){const H=wM(e),U=H.lastRowIndex-H.firstRowIndex;return Math.min(U-1,z.rows.length)}const F=Math.floor(D.viewportInnerSize.height/u);return Math.min(F,z.rows.length)},[e,t.pagination,t.paginationMode,t.getRowHeight,u]),I=y.useCallback(()=>{var fe,ee;const D=e.current.rootElementRef.current,z=BCt(e),F=sAt(D,m,t.scrollbarSize),H=g+z.top,U=z.bottom,X={width:m-v-w,height:a.currentPageTotalHeight};let ae,Z,K=!1,te=!1;if(t.autoHeight)te=!1,K=Math.round(m)>Math.round(o.current.width),ae={width:o.current.width,height:H+U+X.height},Z={width:Math.max(0,ae.width-(te?F:0)),height:Math.max(0,ae.height-(K?F:0))};else{ae={width:o.current.width,height:o.current.height},Z={width:Math.max(0,ae.width-v-w),height:Math.max(0,ae.height-H-U)};const ce=X,me=Z,we=ce.width>me.width,ge=ce.height>me.height;(we||ge)&&(te=ge,K=ce.width+(te?F:0)>me.width,K&&(te=ce.height+F>me.height)),te&&(Z.width-=F),K&&(Z.height-=F)}const pe=Math.max(ae.width,m+(te?F:0)),ie={width:m,height:H+X.height+U},le={isReady:!0,root:o.current,viewportOuterSize:ae,viewportInnerSize:Z,contentSize:X,minimumSize:ie,hasScrollX:K,hasScrollY:te,scrollbarSize:F,headerHeight:d,groupHeaderHeight:f,headerFilterHeight:p,rowWidth:pe,rowHeight:u,columnsTotalWidth:m,leftPinnedWidth:v,rightPinnedWidth:w,headersTotalHeight:g,topContainerHeight:H,bottomContainerHeight:U},re=e.current.state.dimensions;O(le),hK(le.viewportInnerSize,re.viewportInnerSize)||e.current.publishEvent("viewportInnerSizeChange",le.viewportInnerSize),(ee=(fe=e.current).updateRenderContext)==null||ee.call(fe)},[e,O,t.scrollbarSize,t.autoHeight,a.currentPageTotalHeight,u,d,f,p,m,g,v,w]),R={resize:k,getRootDimensions:E},N={updateDimensions:I,getViewportPageSize:A};Jt(e,R,"public"),Jt(e,N,"private"),_o(()=>{x&&(I(),e.current.publishEvent("debouncedResize",o.current))},[e,x,I]);const L=e.current.rootElementRef.current;_o(()=>{if(!L)return;const D=(z,F)=>L.style.setProperty(z,F);D("--DataGrid-width",`${i.viewportOuterSize.width}px`),D("--DataGrid-hasScrollX",`${Number(i.hasScrollX)}`),D("--DataGrid-hasScrollY",`${Number(i.hasScrollY)}`),D("--DataGrid-scrollbarSize",`${i.scrollbarSize}px`),D("--DataGrid-rowWidth",`${i.rowWidth}px`),D("--DataGrid-columnsTotalWidth",`${i.columnsTotalWidth}px`),D("--DataGrid-leftPinnedWidth",`${i.leftPinnedWidth}px`),D("--DataGrid-rightPinnedWidth",`${i.rightPinnedWidth}px`),D("--DataGrid-headerHeight",`${i.headerHeight}px`),D("--DataGrid-headersTotalHeight",`${i.headersTotalHeight}px`),D("--DataGrid-topContainerHeight",`${i.topContainerHeight}px`),D("--DataGrid-bottomContainerHeight",`${i.bottomContainerHeight}px`),D("--height",`${i.rowHeight}px`)},[L,i]);const j=y.useRef(!0),_=y.useCallback(D=>{o.current=D;const z=/jsdom/.test(window.navigator.userAgent);if(D.height===0&&!r.current&&!t.autoHeight&&!z&&(n.error(["The parent DOM element of the Data Grid has an empty height.","Please make sure that this element has an intrinsic height.","The grid displays with a height of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` `)),r.current=!0),D.width===0&&!r.current&&!z&&(n.error(["The parent DOM element of the Data Grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(` -`)),r.current=!0),B.current){S(D),B.current=!1;return}P(D)},[t.autoHeight,P,n]);$o(I,[I]),lr(e,"sortedRowsSet",I),lr(e,"paginationModelChange",I),lr(e,"columnsChange",I),ht(e,"resize",_),lr(e,"debouncedResize",t.onResize)}function NMt(e,t,n){if(n!==void 0)return n;if(e===null||t===0)return 0;const o=wf(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),i}function LMt(e,t){return Math.round(e*10**t)/10**t}function rK(e,t){return e.width===t.width&&e.height===t.height}const FMt=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},jMt=(e,t,n)=>(n.current.caches.rowsMeta={heights:new Map},W({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),BMt=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=y.useRef(-1),s=y.useRef(!1),l=y.useRef(!1),c=Ye(e,o1),u=Ye(e,ei),d=Ye(e,sM),f=Ye(e,Fs),h=Zf(e,t),m=Ye(e,am),g=Ye(e,()=>li(e.current.state).rowHeight),v=L=>{let B=i.get(L);return B===void 0&&(B={content:g,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(L,B)),B},w=y.useCallback(L=>{const B=li(e.current.state).rowHeight,_=e.current.getRowHeightEntry(L.id);if(!n)_.content=B,_.needsFirstMeasurement=!1;else{const D=n(W({},L,{densityFactor:c}));if(D==="auto"){if(_.needsFirstMeasurement){const z=o?o(W({},L,{densityFactor:c})):B;_.content=z??B}s.current=!0,_.autoHeight=!0}else _.content=Wle(D,B),_.needsFirstMeasurement=!1,_.autoHeight=!1}if(r){const D=e.current.getRowIndexRelativeToVisibleRows(L.id),z=r(W({},L,{isFirstVisible:D===0,isLastVisible:D===h.rows.length-1,indexRelativeToCurrentPage:D}));_.spacingTop=z.top??0,_.spacingBottom=z.bottom??0}else _.spacingTop=0,_.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",_,L),_},[e,h.rows.length,n,o,g,r,c]),x=y.useCallback(()=>{s.current=!1,m.top.forEach(w),m.bottom.forEach(w);const L=[],B=h.rows.reduce((_,D)=>{L.push(_);const z=w(D),F=z.content+z.spacingTop+z.spacingBottom+z.detail;return _+F},0);s.current||(a.current=1/0),e.current.setState(_=>W({},_,{rowsMeta:{currentPageTotalHeight:B,positions:L}})),l.current=!0},[e,m,h.rows,w]),S=L=>{var B;return((B=i.get(L))==null?void 0:B.content)??g},P=(L,B)=>{const _=e.current.getRowHeightEntry(L),D=_.content!==B;_.needsFirstMeasurement=!1,_.content=B,l.current&&(l.current=!D)},T=L=>{var B;return((B=i.get(L))==null?void 0:B.autoHeight)??!1},E=()=>a.current,O=L=>{s.current&&L>a.current&&(a.current=L)},k=()=>{i.clear(),x()},A=Jc(()=>new FMt(L=>{for(let B=0;B0?_.borderBoxSize[0].blockSize:_.contentRect.height,z=_.target.__mui_id;e.current.unstable_storeRowHeightMeasurement(z,D)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,I=(L,B)=>(L.__mui_id=B,A.observe(L),()=>A.unobserve(L));Hz(e,"rowHeight",x),y.useEffect(()=>{x()},[u,d,f,x]);const R={unstable_getRowHeight:S,unstable_setLastMeasuredRowIndex:O,unstable_storeRowHeightMeasurement:P,resetRowHeights:k},N={hydrateRowsMeta:x,observeRowHeight:I,rowHasAutoHeight:T,getRowHeightEntry:v,getLastMeasuredRowIndex:E};Jt(e,R,"public"),Jt(e,N,"private")},zMt=e=>{const t=y.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=y.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);Jt(e,{exportState:t,restoreState:n},"public")},VMt=e=>{const t=y.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=y.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d1&&(d+=f.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};Jt(e,i,"public"),Jt(e,a,"private"),ht(e,"columnOrderChange",r)};function HMt(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),d=t.current.getRowValue(u,c),f=typeof c.colSpan=="function"?c.colSpan(d,u,c,t):c.colSpan;if(!f||f===1)return $R(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let h=c.computedWidth;for(let m=1;m=i&&g{if(Lle(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` -`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{Lce(i,[...t,r],n)})},YN=e=>{if(!e)return{};const t={};return e.forEach(n=>{Lce(n,[],t)}),t},XN=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>oy(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l{const f=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:f}];const h=u[u.length-1],m=h.columnFields[h.columnFields.length-1];return h.groupId!==f||!a(m,d,l)||s(m,d)?[...u,{columnFields:[d],groupId:f}]:[...u.slice(0,u.length-1),{columnFields:[...h.columnFields,d],groupId:f}]},[]);o.push(c)}return o},UMt=["groupId","children"],Uz=e=>{let t={};return e.forEach(n=>{if(Lle(n))return;const{groupId:r,children:o}=n,i=At(n,UMt);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=W({},i,{groupId:r}),s=Uz(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=W({},t,s,{[r]:a})}),W({},t)},WMt=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=_u(n),o=yb(n),i=Uz(t.columnGroupingModel??[]),a=YN(t.columnGroupingModel??[]),s=XN(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return W({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},GMt=(e,t)=>{const n=y.useCallback(s=>cce(e)[s]??[],[e]),r=y.useCallback(()=>uce(e),[e]);Jt(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=y.useCallback(()=>{const s=YN(t.columnGroupingModel??[]);e.current.setState(l=>{var f;const c=((f=l.columns)==null?void 0:f.orderedFields)??[],u=l.pinnedColumns??{},d=XN(c,s,u);return W({},l,{columnGrouping:W({},l.columnGrouping,{headerStructure:d})})})},[e,t.columnGroupingModel]),a=y.useCallback(s=>{var g,v;const l=((v=(g=e.current).getPinnedColumns)==null?void 0:v.call(g))??{},c=_u(e),u=yb(e),d=Uz(s??[]),f=YN(s??[]),h=XN(c,f,l),m=u.length===0?0:Math.max(...u.map(w=>{var x;return((x=f[w])==null?void 0:x.length)??0}));e.current.setState(w=>W({},w,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:h,maxDepth:m}}))},[e]);ht(e,"columnIndexChange",i),ht(e,"columnsChange",()=>{a(t.columnGroupingModel)}),ht(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),y.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function qMt(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function oK(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nNz(e),r=Ye(e,n);return y.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=qMt()}return t.current}}function JMt(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s{const s=dEt(e.current,i.field).map(m=>m.getBoundingClientRect().width??0),l=t.includeOutliers?s:JMt(s,t.outliersFactor);if(t.includeHeaders){const m=uEt(e.current,i.field);if(m){const g=m.querySelector(`.${se.columnHeaderTitle}`),v=m.querySelector(`.${se.columnHeaderTitleContainerContent}`),w=m.querySelector(`.${se.iconButtonContainer}`),x=m.querySelector(`.${se.menuIcon}`),S=g??v,P=window.getComputedStyle(m,null),T=parseInt(P.paddingLeft,10)+parseInt(P.paddingRight,10),O=S.scrollWidth+1+T+((w==null?void 0:w.clientWidth)??0)+((x==null?void 0:x.clientWidth)??0);l.push(O)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,f=u?i.maxWidth:1/0,h=l.length===0?0:Math.max(...l);r[i.field]=Dc(h,d,f)}),o.classList.remove(se.autosizing),r}const eAt=e=>W({},e,{columnResize:{resizingColumnField:""}});function tAt(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const nAt=(e,t)=>{const n=nr(),r=No(e,"useGridColumnResize"),o=Jc(tAt).current,i=y.useRef(),a=y.useRef(),s=gb(),l=y.useRef(),c=A=>{var D,z;r.debug(`Updating width to ${A} for col ${o.colDef.field}`);const I=o.columnHeaderElement.offsetWidth,R=A-I,N=A-o.initialColWidth,L=o.initialTotalWidth+N;(z=(D=e.current.rootElementRef)==null?void 0:D.current)==null||z.style.setProperty("--DataGrid-rowWidth",`${L}px`),o.colDef.computedWidth=A,o.colDef.width=A,o.colDef.flex=0,o.columnHeaderElement.style.width=`${A}px`;const B=o.headerFilterElement;B&&(B.style.width=`${A}px`),o.groupHeaderElements.forEach(F=>{const H=F;let U;H.getAttribute("aria-colspan")==="1"?U=`${A}px`:U=`${H.offsetWidth+R}px`,H.style.width=U}),o.cellElements.forEach(F=>{const H=F;let U;H.getAttribute("aria-colspan")==="1"?U=`${A}px`:U=`${H.offsetWidth+R}px`,H.style.setProperty("--width",U)});const _=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);_===ur.LEFT&&(Zm(o.fillerLeft,"width",R),o.leftPinnedCellsAfter.forEach(F=>{Zm(F,"left",R)}),o.leftPinnedHeadersAfter.forEach(F=>{Zm(F,"left",R)})),_===ur.RIGHT&&(Zm(o.fillerRight,"width",R),o.rightPinnedCellsBefore.forEach(F=>{Zm(F,"right",R)}),o.rightPinnedHeadersBefore.forEach(F=>{Zm(F,"right",R)}))},u=A=>{if(w(),o.previousMouseClickEvent){const I=o.previousMouseClickEvent,R=I.timeStamp,N=I.clientX,L=I.clientY;if(A.timeStamp-R<300&&A.clientX===N&&A.clientY===L){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,A);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const I=_c(e.current.state);o.groupHeaderElements.forEach(R=>{const N=rEt(R),L=R,_=`${N.reduce((D,z)=>I.columnVisibilityModel[z]!==!1?D+I.lookup[z].computedWidth:D,0)}px`;L.style.width=_})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,A)})},d=(A,I,R)=>{var _;const N=e.current.rootElementRef.current;o.initialColWidth=A.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=A,o.columnHeaderElement=nEt(e.current.columnHeadersContainerRef.current,A.field);const L=N.querySelector(`.${se.headerFilterRow} [data-field="${dd(A.field)}"]`);L&&(o.headerFilterElement=L),o.groupHeaderElements=oEt((_=e.current.columnHeadersContainerRef)==null?void 0:_.current,A.field),o.cellElements=iEt(o.columnHeaderElement,e.current),o.fillerLeft=Aq(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=Aq(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const B=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=B!==ur.LEFT?[]:aEt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=B!==ur.RIGHT?[]:sEt(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=B!==ur.LEFT?[]:lEt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=B!==ur.RIGHT?[]:cEt(e.current,o.columnHeaderElement,n),a.current=XMt(I,n),i.current=KMt(R,o.columnHeaderElement.getBoundingClientRect(),a.current)},f=wr(u),h=wr(A=>{if(A.buttons===0){f(A);return}let I=iK(i.current,A.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);I=Dc(I,o.colDef.minWidth,o.colDef.maxWidth),c(I);const R={element:o.columnHeaderElement,colDef:o.colDef,width:I};e.current.publishEvent("columnResize",R,A)}),m=wr(A=>{oK(A,l.current)&&u(A)}),g=wr(A=>{const I=oK(A,l.current);if(!I)return;if(A.type==="mousemove"&&A.buttons===0){m(A);return}let R=iK(i.current,I.x,o.columnHeaderElement.getBoundingClientRect(),a.current);R=Dc(R,o.colDef.minWidth,o.colDef.maxWidth),c(R);const N={element:o.columnHeaderElement,colDef:o.colDef,width:R};e.current.publishEvent("columnResize",N,A)}),v=wr(A=>{const I=cO(A.target,se["columnSeparator--resizable"]);if(!I)return;const R=A.changedTouches[0];R!=null&&(l.current=R.identifier);const N=cO(A.target,se.columnHeader),L=tEt(N),B=e.current.getColumn(L);r.debug(`Start Resize on col ${B.field}`),e.current.publishEvent("columnResizeStart",{field:L},A),d(B,I,R.clientX);const _=wf(A.currentTarget);_.addEventListener("touchmove",g),_.addEventListener("touchend",m)}),w=y.useCallback(()=>{const A=wf(e.current.rootElementRef.current);A.body.style.removeProperty("cursor"),A.removeEventListener("mousemove",h),A.removeEventListener("mouseup",f),A.removeEventListener("touchmove",g),A.removeEventListener("touchend",m),setTimeout(()=>{A.removeEventListener("click",aK,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,h,f,g,m]),x=y.useCallback(({field:A})=>{e.current.setState(I=>W({},I,{columnResize:W({},I.columnResize,{resizingColumnField:A})})),e.current.forceUpdate()},[e]),S=y.useCallback(()=>{e.current.setState(A=>W({},A,{columnResize:W({},A.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),P=wr(({colDef:A},I)=>{if(I.button!==0||!I.currentTarget.classList.contains(se["columnSeparator--resizable"]))return;I.preventDefault(),r.debug(`Start Resize on col ${A.field}`),e.current.publishEvent("columnResizeStart",{field:A.field},I),d(A,I.currentTarget,I.clientX);const R=wf(e.current.rootElementRef.current);R.body.style.cursor="col-resize",o.previousMouseClickEvent=I.nativeEvent,R.addEventListener("mousemove",h),R.addEventListener("mouseup",f),R.addEventListener("click",aK,!0)}),T=wr((A,I)=>{if(t.disableAutosize||I.button!==0)return;const R=e.current.state.columns.lookup[A.field];R.resizable!==!1&&e.current.autosizeColumns(W({},t.autosizeOptions,{columns:[R.field]}))}),E=QMt(e),O=y.useRef(!1),k=y.useCallback(async A=>{var B;if(!((B=e.current.rootElementRef)==null?void 0:B.current)||O.current)return;O.current=!0;const R=_c(e.current.state),N=W({},VTt,A,{columns:(A==null?void 0:A.columns)??R.orderedFields});N.columns=N.columns.filter(_=>R.columnVisibilityModel[_]!==!1);const L=N.columns.map(_=>e.current.state.columns.lookup[_]);try{e.current.unstable_setColumnVirtualization(!1),await E();const _=ZMt(e,N,L),D=L.map(z=>W({},z,{width:_[z.field],computedWidth:_[z.field]}));if(N.expand){const F=R.orderedFields.map(q=>R.lookup[q]).filter(q=>R.columnVisibilityModel[q.field]!==!1).reduce((q,Y)=>q+(_[Y.field]??Y.computedWidth??Y.width),0),U=e.current.getRootDimensions().viewportInnerSize.width-F;if(U>0){const q=U/(D.length||1);D.forEach(Y=>{Y.width+=q,Y.computedWidth+=q})}}e.current.updateColumns(D),D.forEach((z,F)=>{if(z.width!==L[F].width){const H=z.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(z.field),colDef:z,width:H})}})}finally{e.current.unstable_setColumnVirtualization(!0),O.current=!1}},[e,E]);y.useEffect(()=>w,[w]),Zk(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),ece(e,()=>{var A;return(A=e.current.columnHeadersContainerRef)==null?void 0:A.current},"touchstart",v,{passive:!0}),Jt(e,{autosizeColumns:k},"public"),ht(e,"columnResizeStop",S),ht(e,"columnResizeStart",x),ht(e,"columnSeparatorMouseDown",P),ht(e,"columnSeparatorDoubleClick",T),lr(e,"columnResize",t.onColumnResize),lr(e,"columnWidthChange",t.onColumnWidthChange)};function Zm(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function rAt(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},fO={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},Cw={firstRowIndex:0,lastRowIndex:0},iAt=new Set([yu,"__reorder__",rM]),Fce=20,jce=(e,t,n,r,o,i,a)=>{const s=i?{}:W({},e.current.state.rowSpanning.spannedCells),l=i?{}:W({},e.current.state.rowSpanning.hiddenCells),c=i?{}:W({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=Cw),t.forEach(u=>{var d;if(!iAt.has(u.field)){for(let f=o.firstRowIndex;f<=o.lastRowIndex;f+=1){const h=n[f];if((d=l[h.id])!=null&&d[u.field])continue;const m=RR(h.model,u,e);if(m==null)continue;let g=h.id,v=f,w=0;const x=[];if(f===o.firstRowIndex){let P=f-1;const T=n[P];for(;P>=r.firstRowIndex&&RR(T.model,u,e)===m;){const E=n[P+1];l[E.id]?l[E.id][u.field]=!0:l[E.id]={[u.field]:!0},x.push(f),w+=1,g=T.id,v=P,P-=1}}x.forEach(P=>{c[P]?c[P][u.field]=v:c[P]={[u.field]:v}});let S=f+1;for(;S<=r.lastRowIndex&&n[S]&&RR(n[S].model,u,e)===m;){const P=n[S];l[P.id]?l[P.id][u.field]=!0:l[P.id]={[u.field]:!0},c[S]?c[S][u.field]=v:c[S]={[u.field]:v},S+=1,w+=1}w>0&&(s[g]?s[g][u.field]=w+1:s[g]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},aAt=(e,t,n)=>{var r;if(t.unstable_rowSpanning){const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=!!e.filter.filterModel.items.length||!!((r=e.filter.filterModel.quickFilterValues)!=null&&r.length);if(!o.length||!i.length||!a||!s||l)return W({},e,{rowSpanning:fO});const c={firstRowIndex:0,lastRowIndex:Math.min(Fce-1,Math.max(o.length-1,0))},u=o.map(g=>({id:g,model:a[g]})),d=i.map(g=>s[g]),{spannedCells:f,hiddenCells:h,hiddenCellOriginMap:m}=jce(n,d,u,c,c,!0,Cw);return W({},e,{rowSpanning:{spannedCells:f,hiddenCells:h,hiddenCellOriginMap:m}})}return W({},e,{rowSpanning:fO})},sAt=(e,t)=>{const{range:n,rows:r}=Zf(e,t),o=Ye(e,uM),i=Ye(e,yo),a=Jc(()=>Object.keys(e.current.state.rowSpanning.spannedCells).length>0?{firstRowIndex:0,lastRowIndex:Math.min(Fce-1,Math.max(e.current.state.rows.dataRowIds.length-1,0))}:Cw),s=y.useRef(Cw),l=y.useCallback((f=!0)=>{if(!t.unstable_rowSpanning){e.current.state.rowSpanning!==fO&&e.current.setState(O=>W({},O,{rowSpanning:fO}));return}if(n===null||!oAt(o))return;f&&(a.current=Cw);const h=rAt({firstRowIndex:o.firstRowIndex,lastRowIndex:Math.min(o.lastRowIndex-1,n.lastRowIndex)},a.current);if(h===null)return;const{spannedCells:m,hiddenCells:g,hiddenCellOriginMap:v,processedRange:w}=jce(e,i,r,n,h,f,a.current);a.current=w;const x=Object.keys(m).length,S=Object.keys(g).length,P=Object.keys(e.current.state.rowSpanning.spannedCells).length,T=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(f||x!==P||S!==T)&&e.current.setState(O=>W({},O,{rowSpanning:{spannedCells:m,hiddenCells:g,hiddenCellOriginMap:v}}))},[e,t.unstable_rowSpanning,n,o,r,i,a]),c=y.useRef(o),u=y.useRef(!0),d=y.useRef(!1);y.useEffect(()=>{const f=u.current;if(u.current&&(u.current=!1),n&&s.current&&sK(n,s.current)&&(s.current=n,d.current=!0),!f&&c.current!==o){sK(c.current,o)&&(l(d.current),d.current=!1),c.current=o;return}l()},[l,o,n,s])},lAt=(e,t,n)=>W({},e,{listViewColumn:t.unstable_listColumn?W({},t.unstable_listColumn,{computedWidth:QN(n)}):void 0});function cAt(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?W({},i,{listViewColumn:W({},i.listViewColumn,{computedWidth:QN(e)})}):i)},r=y.useRef(null);ht(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),ht(e,"columnVisibilityModelChange",n),y.useEffect(()=>{const i=t.unstable_listColumn;i&&e.current.setState(a=>W({},a,{listViewColumn:W({},i,{computedWidth:QN(e)})}))},[e,t.unstable_listColumn]),y.useEffect(()=>{t.unstable_listView&&t.unstable_listColumn},[t.unstable_listView,t.unstable_listColumn])}function QN(e){return li(e.current.state).viewportInnerSize.width}const uAt=(e,t)=>{const n=kkt(e,t);return OMt(n,t),CMt(n),jo(_Mt,n,t),jo(PMt,n,t),jo(Lkt,n,t),jo(vMt,n,t),jo(gMt,n,t),jo(Qkt,n,t),jo(IMt,n,t),jo(lMt,n,t),jo(qkt,n,t),jo(aAt,n,t),jo(jkt,n,t),jo(eAt,n,t),jo(aMt,n,t),jo(jMt,n,t),jo(Dkt,n,t),jo(WMt,n,t),jo(tTt,n,t),jo(lAt,n,t),rMt(n,t),TMt(n,t),Fkt(n,t),bMt(n,t),sAt(n,t),fEt(n,t),VMt(n),GMt(n,t),yMt(n,t),Jkt(n,t),cMt(n,t),Xkt(n,t),kMt(n,t),Bkt(n,t),nAt(n,t),sMt(n,t),BMt(n,t),MMt(n,t),Nkt(n),Vkt(n,t),Gkt(n,t),_kt(n,t),DMt(n,t),AMt(n,t),zMt(n),nTt(n,t),cAt(n,t),n},dAt=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e;return gn({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},yn,t)};function fAt(e){var q;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,style:f,indexInSection:h,sectionLength:m,gridHasFiller:g}=e,v=xt(),w=y.useRef(null),x=hn(),S=Ye(x,uce),P=t?S[t]:{},{headerName:T=t??"",description:E="",headerAlign:O=void 0}=P;let k;const A=t&&((q=S[t])==null?void 0:q.renderHeaderGroup),I=y.useMemo(()=>({groupId:t,headerName:T,description:E,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,T,E,r,o,i,s,u]);t&&A&&(k=A(I));const R=fM(d,h),N=dM(d,h,m,v.showColumnVerticalBorder,g),L=W({},e,{classes:v.classes,showLeftBorder:R,showRightBorder:N,headerAlign:O,depth:r,isDragging:!1}),B=T??t,_=go(),D=t===null?`empty-group-cell-${_}`:t,z=dAt(L);y.useLayoutEffect(()=>{if(l){const ae=w.current.querySelector('[tabindex="0"]')||w.current;ae==null||ae.focus()}},[x,l]);const F=y.useCallback(Y=>ae=>{c1(ae)||x.current.publishEvent(Y,I,ae)},[x,I]),H=y.useMemo(()=>({onKeyDown:F("columnGroupHeaderKeyDown"),onFocus:F("columnGroupHeaderFocus"),onBlur:F("columnGroupHeaderBlur")}),[F]),U=typeof P.headerClassName=="function"?P.headerClassName(I):P.headerClassName;return $.jsx(Ece,W({ref:w,classes:z,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:k,headerClassName:U,description:E,elementId:D,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:B,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:f},H))}const lK=oe("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),pAt=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[h,m]=y.useState(""),[g,v]=y.useState(""),w=yl(),x=nr(),S=xt(),P=Ye(w,li),T=Ye(w,Nz),E=Ye(w,cce),O=Ye(w,Qf),k=Ye(w,eTt),A=Ye(w,i1),I=Ye(w,ud),R=mce(O,k,A.left.length),N=P.columnsTotalWidth{w.current.columnHeadersContainerRef.current&&(w.current.columnHeadersContainerRef.current.scrollLeft=0)},[w]);const L=y.useCallback(te=>v(te.field),[]),B=y.useCallback(()=>v(""),[]),_=y.useCallback(te=>m(te.field),[]),D=y.useCallback(()=>m(""),[]),z=y.useMemo(()=>A.left.length?{firstColumnIndex:0,lastColumnIndex:A.left.length}:null,[A.left.length]),F=y.useMemo(()=>A.right.length?{firstColumnIndex:t.length-A.right.length,lastColumnIndex:t.length}:null,[A.right.length,t.length]);ht(w,"columnResizeStart",L),ht(w,"columnResizeStop",B),ht(w,"columnHeaderDragStart",_),ht(w,"columnHeaderDragEnd",D);const H=te=>{const{renderContext:pe=k,maxLastColumn:ie=t.length}=te||{},le=pe.firstColumnIndex,re=T?pe.lastColumnIndex:ie;return{renderedColumns:t.slice(le,re),firstColumnToRender:le,lastColumnToRender:re}},U=(te,pe,ie,le=!1)=>{const re=(te==null?void 0:te.position)===ur.RIGHT,de=(te==null?void 0:te.position)===void 0,ee=A.right.length>0&&re||A.right.length===0&&de,ce=R-ie;return $.jsxs(y.Fragment,{children:[de&&$.jsx("div",{role:"presentation",style:{width:ce}}),pe,de&&$.jsx("div",{role:"presentation",className:fe(se.filler,le&&se["filler--borderBottom"])}),ee&&$.jsx(zz,{header:!0,pinnedRight:re,borderBottom:le,borderTop:!1})]})},q=({pinnedPosition:te,columnIndex:pe,computedWidth:ie})=>{let le;const re=te===ur.LEFT,de=te===ur.RIGHT;if(re||de){const ee=Bz(te,ie,pe,O,P);let ce=re?"left":"right";x&&(ce=re?"right":"left"),te==="left"&&(le={[ce]:ee}),te==="right"&&(le={[ce]:ee})}return le},Y=(te,pe={})=>{const{renderedColumns:ie,firstColumnToRender:le}=H(te),re=[];for(let de=0;de$.jsxs(lK,{role:"row","aria-rowindex":l+1,ownerState:S,className:se["row--borderBottom"],children:[z&&Y({position:ur.LEFT,renderContext:z,maxLastColumn:z.lastColumnIndex},{disableReorder:!0}),Y({renderContext:k,maxLastColumn:t.length-A.right.length}),F&&Y({position:ur.RIGHT,renderContext:F,maxLastColumn:F.lastColumnIndex},{disableReorder:!0,separatorSide:jz.Left})]}),Z=({depth:te,params:pe})=>{var Oe,Me;const ie=H(pe);if(ie.renderedColumns.length===0)return null;const{firstColumnToRender:le,lastColumnToRender:re}=ie,de=d[te],ee=t[le].field,ce=((Oe=E[ee])==null?void 0:Oe[te])??null,me=de.findIndex(({groupId:Ue,columnFields:ze})=>Ue===ce&&ze.includes(ee)),we=t[re-1].field,ge=((Me=E[we])==null?void 0:Me[te])??null,Se=de.findIndex(({groupId:Ue,columnFields:ze})=>Ue===ge&&ze.includes(we)),xe=de.slice(me,Se+1).map(Ue=>W({},Ue,{columnFields:Ue.columnFields.filter(ze=>u[ze]!==!1)})).filter(Ue=>Ue.columnFields.length>0),Ie=xe[0].columnFields.indexOf(ee),_e=xe[0].columnFields.slice(0,Ie).reduce((Ue,ze)=>{const Qe=I[ze];return Ue+(Qe.computedWidth??0)},0);let ye=le;const Te=xe.map(({groupId:Ue,columnFields:ze},Qe)=>{const ct=s!==null&&s.depth===te&&ze.includes(s.field),nt=i!==null&&i.depth===te&&ze.includes(i.field)?0:-1,et={groupId:Ue,width:ze.reduce(($e,Xe)=>$e+I[Xe].computedWidth,0),fields:ze,colIndex:ye,hasFocus:ct,tabIndex:nt},yt=pe.position,vn=q({pinnedPosition:yt,columnIndex:ye,computedWidth:et.width});ye+=ze.length;let Ke=Qe;return yt==="left"&&(Ke=ye-1),$.jsx(fAt,{groupId:Ue,width:et.width,fields:et.fields,colIndex:et.colIndex,depth:te,isLastColumn:et.colIndex===t.length-et.fields.length,maxDepth:l,height:P.groupHeaderHeight,hasFocus:ct,tabIndex:nt,pinnedPosition:yt,style:vn,indexInSection:Ke,sectionLength:de.length,gridHasFiller:N},Qe)});return U(pe,Te,_e)};return{renderContext:k,leftRenderContext:z,rightRenderContext:F,pinnedColumns:A,visibleColumns:t,getCellOffsetStyle:q,getFillers:U,getColumnHeadersRow:ae,getColumnsToRender:H,getColumnGroupHeadersRows:()=>{if(l===0)return null;const te=[];for(let pe=0;pe({role:"rowgroup"})}},hAt=["className"],mAt=e=>{const{classes:t}=e;return gn({root:["columnHeaders"]},yn,t)},gAt=Xn("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),yAt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,hAt),i=xt(),a=mAt(i);return $.jsx(gAt,W({ref:n,className:fe(a.root,r),ownerState:i},o,{role:"presentation"}))}),vAt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],bAt=y.forwardRef(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:m}=t,g=At(t,vAt),{getInnerProps:v,getColumnHeadersRow:w,getColumnGroupHeadersRows:x}=pAt({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:h,hasOtherElementInTabSequence:m});return $.jsxs(yAt,W({ref:n},g,v(),{children:[x(),w()]}))}),wAt=Xf(bAt);function xAt(e){return null}function SAt(e){return null}const CAt=y.forwardRef(function(t,n){const o=hn().current.getLocaleText("noResultsOverlayLabel");return $.jsx(Fz,W({ref:n},t,{children:o}))}),PAt=["sortingOrder"],TAt=y.memo(function(t){const{sortingOrder:n}=t,r=At(t,PAt),o=xt(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?$.jsx(a,W({},r)):null}),EAt=["native"];function OAt(e){let{native:t}=e,n=At(e,EAt);return t?$.jsx("option",W({},n)):$.jsx(Yt,W({},n))}const IAt={booleanCellTrueIcon:OOt,booleanCellFalseIcon:kR,columnMenuIcon:COt,openFilterButtonIcon:gOt,filterPanelDeleteIcon:kR,columnFilteredIcon:zq,columnSelectorIcon:vOt,columnUnsortedIcon:TAt,columnSortedAscendingIcon:Lq,columnSortedDescendingIcon:Fq,columnResizeIcon:bOt,densityCompactIcon:wOt,densityStandardIcon:xOt,densityComfortableIcon:SOt,exportIcon:EOt,moreActionsIcon:IOt,treeDataCollapseIcon:Bq,treeDataExpandIcon:jq,groupingCriteriaCollapseIcon:Bq,groupingCriteriaExpandIcon:jq,detailPanelExpandIcon:Vq,detailPanelCollapseIcon:POt,rowReorderIcon:Hq,quickFilterIcon:yOt,quickFilterClearIcon:kR,columnMenuHideIcon:kOt,columnMenuSortAscendingIcon:Lq,columnMenuSortDescendingIcon:Fq,columnMenuFilterIcon:zq,columnMenuManageColumnsIcon:MOt,columnMenuClearIcon:AOt,loadIcon:TOt,filterPanelAddIcon:Vq,filterPanelRemoveAllIcon:$Ot,columnReorderIcon:Hq},kAt=W({},IAt,{baseBadge:tEe,baseCheckbox:JEe,baseDivider:as,baseTextField:Cn,baseFormControl:Fh,baseSelect:zf,baseButton:gt,baseIconButton:kn,baseInputAdornment:fo,baseTooltip:nc,basePopper:Ff,baseInputLabel:jh,baseSelectOption:OAt,baseChip:wh}),MAt=W({},kAt,{cell:yEt,skeletonCell:EEt,columnHeaderFilterIconButton:mOt,columnHeaderSortIcon:pOt,columnMenu:XOt,columnHeaders:wAt,detailPanels:xAt,footer:VIt,footerRowCount:ikt,toolbar:null,pinnedRows:SAt,loadingOverlay:XIt,noResultsOverlay:CAt,noRowsOverlay:QIt,pagination:tkt,filterPanel:RIt,columnsPanel:lIt,columnsManagement:Ace,panel:pIt,row:ukt});function AAt({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=W({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function $At(e){const t=Object.keys(e);if(!t.some(o=>o.startsWith("aria-")||o.startsWith("data-")))return e;const n={},r=e.forwardedProps??{};for(let o=0;o$At(e),[e])}const _At={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},DAt=MAt,NAt=e=>{const t=RAt(Zt({props:e,name:"MuiDataGrid"})),n=y.useMemo(()=>W({},qSt,t.localeText),[t.localeText]),r=y.useMemo(()=>AAt({defaultSlots:DAt,slots:t.slots}),[t.slots]),o=y.useMemo(()=>Object.keys(KN).reduce((i,a)=>(i[a]=t[a]??KN[a],i),{}),[t]);return y.useMemo(()=>W({},t,o,{localeText:n,slots:r},_At),[t,n,r,o])},LAt={hooks:{useGridAriaAttributes:dkt,useGridRowAriaAttributes:fkt}},Bce=y.forwardRef(function(t,n){const r=NAt(t),o=uAt(r.apiRef,r);return $.jsx(pkt,{privateApiRef:o,configuration:LAt,props:r,children:$.jsxs(NEt,W({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[$.jsx(UIt,{}),$.jsx(KTt,{}),$.jsx(YTt,{})]}))})}),FAt=y.memo(Bce);Bce.propTypes={apiRef:j.shape({current:j.object.isRequired}),"aria-label":j.string,"aria-labelledby":j.string,autoHeight:j.bool,autoPageSize:j.bool,autosizeOnMount:j.bool,autosizeOptions:j.shape({columns:j.arrayOf(j.string),expand:j.bool,includeHeaders:j.bool,includeOutliers:j.bool,outliersFactor:j.number}),cellModesModel:j.object,checkboxSelection:j.bool,classes:j.object,clipboardCopyCellDelimiter:j.string,columnBufferPx:j.number,columnGroupHeaderHeight:j.number,columnGroupingModel:j.arrayOf(j.object),columnHeaderHeight:j.number,columns:j.arrayOf(j.object).isRequired,columnVisibilityModel:j.object,density:j.oneOf(["comfortable","compact","standard"]),disableAutosize:j.bool,disableColumnFilter:j.bool,disableColumnMenu:j.bool,disableColumnResize:j.bool,disableColumnSelector:j.bool,disableColumnSorting:j.bool,disableDensitySelector:j.bool,disableEval:j.bool,disableMultipleRowSelection:j.bool,disableRowSelectionOnClick:j.bool,disableVirtualization:j.bool,editMode:j.oneOf(["cell","row"]),estimatedRowCount:j.number,experimentalFeatures:j.shape({warnIfFocusStateIsNotSynced:j.bool}),filterDebounceMs:j.number,filterMode:j.oneOf(["client","server"]),filterModel:j.shape({items:j.arrayOf(j.shape({field:j.string.isRequired,id:j.oneOfType([j.number,j.string]),operator:j.string.isRequired,value:j.any})).isRequired,logicOperator:j.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:j.bool,quickFilterLogicOperator:j.oneOf(["and","or"]),quickFilterValues:j.array}),forwardedProps:j.object,getCellClassName:j.func,getDetailPanelContent:j.func,getEstimatedRowHeight:j.func,getRowClassName:j.func,getRowHeight:j.func,getRowId:j.func,getRowSpacing:j.func,hideFooter:j.bool,hideFooterPagination:j.bool,hideFooterSelectedRowCount:j.bool,ignoreDiacritics:j.bool,ignoreValueFormatterDuringExport:j.oneOfType([j.shape({clipboardExport:j.bool,csvExport:j.bool}),j.bool]),indeterminateCheckboxAction:j.oneOf(["deselect","select"]),initialState:j.object,isCellEditable:j.func,isRowSelectable:j.func,keepNonExistentRowsSelected:j.bool,loading:j.bool,localeText:j.object,logger:j.shape({debug:j.func.isRequired,error:j.func.isRequired,info:j.func.isRequired,warn:j.func.isRequired}),logLevel:j.oneOf(["debug","error","info","warn",!1]),nonce:j.string,onCellClick:j.func,onCellDoubleClick:j.func,onCellEditStart:j.func,onCellEditStop:j.func,onCellKeyDown:j.func,onCellModesModelChange:j.func,onClipboardCopy:j.func,onColumnHeaderClick:j.func,onColumnHeaderContextMenu:j.func,onColumnHeaderDoubleClick:j.func,onColumnHeaderEnter:j.func,onColumnHeaderLeave:j.func,onColumnHeaderOut:j.func,onColumnHeaderOver:j.func,onColumnOrderChange:j.func,onColumnResize:j.func,onColumnVisibilityModelChange:j.func,onColumnWidthChange:j.func,onDensityChange:j.func,onFilterModelChange:j.func,onMenuClose:j.func,onMenuOpen:j.func,onPaginationMetaChange:j.func,onPaginationModelChange:j.func,onPreferencePanelClose:j.func,onPreferencePanelOpen:j.func,onProcessRowUpdateError:j.func,onResize:j.func,onRowClick:j.func,onRowCountChange:j.func,onRowDoubleClick:j.func,onRowEditStart:j.func,onRowEditStop:j.func,onRowModesModelChange:j.func,onRowSelectionModelChange:j.func,onSortModelChange:j.func,onStateChange:j.func,pageSizeOptions:j.arrayOf(j.oneOfType([j.number,j.shape({label:j.string.isRequired,value:j.number.isRequired})]).isRequired),pagination:j.oneOf([!0]),paginationMeta:j.shape({hasNextPage:j.bool}),paginationMode:j.oneOf(["client","server"]),paginationModel:j.shape({page:j.number.isRequired,pageSize:j.number.isRequired}),processRowUpdate:j.func,resizeThrottleMs:j.number,rowBufferPx:j.number,rowCount:j.number,rowHeight:j.number,rowModesModel:j.object,rowPositionsDebounceMs:j.number,rows:j.arrayOf(j.object),rowSelection:j.bool,rowSelectionModel:j.oneOfType([j.arrayOf(j.oneOfType([j.number,j.string]).isRequired),j.number,j.string]),rowSpacingType:j.oneOf(["border","margin"]),scrollbarSize:j.number,showCellVerticalBorder:j.bool,showColumnVerticalBorder:j.bool,slotProps:j.object,slots:j.object,sortingMode:j.oneOf(["client","server"]),sortingOrder:j.arrayOf(j.oneOf(["asc","desc"])),sortModel:j.arrayOf(j.shape({field:j.string.isRequired,sort:j.oneOf(["asc","desc"])})),sx:j.oneOfType([j.arrayOf(j.oneOfType([j.func,j.object,j.bool])),j.func,j.object]),unstable_rowSpanning:j.bool};const jAt=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),BAt=e=>{const[t]=Ge(),n=jAt(e.category.entries),r=mle(),o=$St(),[i,a]=J.useState(n),[s,l]=J.useState({}),c=(x,S)=>{x.reason===Il.rowFocusOut&&(S.defaultMuiPrevented=!0)},u=x=>()=>{l({...s,[x]:{mode:jn.Edit}})},d=x=>()=>{l({...s,[x]:{mode:jn.View}})},f=x=>async()=>{console.log("deleting entry",x),o.mutate(parseInt(x.toString())),a(i.filter(S=>S.id!==x))},h=x=>()=>{l({...s,[x]:{mode:jn.View,ignoreModifications:!0}});const S=i.find(P=>P.id===x);(S==null?void 0:S.id)===null&&a(i.filter(P=>P.id!==x))},m=async x=>{r.mutate({id:x.id,categoryId:x.category,date:x.date,value:x.value,notes:x.notes});const S={...x,isNew:!1};return a(i.map(P=>P.id===x.id?S:P)),S},g=x=>{console.log(x)},v=x=>{l(x)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:x=>x==null?"":x+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:x=>x==null?"":It.fromJSDate(x).toLocaleString(It.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:x})=>{var P;return((P=s[x])==null?void 0:P.mode)===jn.Edit?[C(aP,{icon:C(Dyt,{}),label:"Save",sx:{color:"primary.main"},onClick:d(x)}),C(aP,{icon:C(PS,{}),label:"Cancel",className:"textPrimary",onClick:h(x),color:"inherit"})]:[C(aP,{icon:C(vse,{}),label:"Edit",className:"textPrimary",onClick:u(x),color:"inherit"}),C(aP,{icon:C(Eyt,{}),label:"Delete",onClick:f(x),color:"inherit"})]}}];return C(er,{sx:{width:"100%"},children:C(FAt,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:N3.pageSize}}},pageSizeOptions:N3.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:v,onRowEditStop:c,processRowUpdate:m,onProcessRowUpdateError:g,slotProps:{toolbar:{setRows:a,setRowModesModel:l}}})})},Wz=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=Ge();return C(kv,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:X(Ro,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(nd,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:C(PS,{onClick:i})}),C(xa,{children:C(dt,{variant:"body1",children:r})}),X(ps,{children:[C(gt,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),C(gt,{color:"primary",onClick:i,children:a("cancel")})]})]})})},zAt=e=>{const t=MSt(e.category.id),n=rm(),[r]=Ge(),[o,i]=J.useState(null),[a,s]=J.useState(!1),[l,c]=J.useState(!1),u=!!o,d=P=>{i(P.currentTarget)},f=()=>{h(),v()},h=()=>{i(null)},m=()=>{x(),i(null)},g=()=>{t.mutate(e.category.id),n(Tn(wn.MEASUREMENT_OVERVIEW))},v=()=>s(!0),w=()=>s(!1),x=()=>c(!0),S=()=>c(!1);return X("div",{children:[C(gt,{onClick:d,children:C(xse,{})}),X(hs,{anchorEl:o,open:u,onClose:h,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:f,children:r("edit")}),C(Yt,{onClick:m,children:r("delete")})]}),C(ta,{title:r("edit"),isOpen:a,closeFn:w,children:C(vle,{category:e.category,closeFn:w})}),C(Wz,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:S,deleteFn:g})]})},VAt=()=>{const e=om(),t=parseInt(e.categoryId),n=hle(t);return n.isLoading?C(_o,{}):C(mb,{title:n.data.name,optionsMenu:C(zAt,{category:n.data}),mainContent:X(Kt,{spacing:2,children:[C(yle,{category:n.data}),C(BAt,{category:n.data})]}),fab:C(NSt,{})})},HAt=e=>{const[t,n]=Ge(),[r,o]=J.useState(!1),i=()=>o(!0),a=()=>o(!1);return X(Mt,{children:[X(Ro,{children:[C(nd,{title:e.category.name,subheader:e.category.unit}),C(xa,{children:C(yle,{category:e.category})}),X(ps,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[C(gt,{size:"small",children:C(Yl,{to:Tn(wn.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),C(kn,{onClick:i,children:C(Ji,{})})]})]}),C(ta,{title:t("add"),isOpen:r,closeFn:a,children:C(ble,{closeFn:a,categoryId:e.category.id})})]})},cK=()=>{const e=OSt(),[t]=Ge();return e.isLoading?C(_o,{}):C(mb,{title:t("measurements.measurements"),mainContent:X(Kt,{spacing:2,children:[e.data.length===0&&C(kI,{}),e.data.map(n=>C(HAt,{category:n},n.id))]}),fab:C(DSt,{})})},UAt=e=>{var r,o,i,a;const[t,n]=Ge();return X(Qt,{children:[C(ke,{sx:{paddingX:1},children:C(tc,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:C(rd,{})})}),X(ke,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.item.nutritionalValues.energy,n.language),kj:bi(e.item.nutritionalValues.energyKj,n.language)})}),C(ke,{align:"right",sx:{paddingX:1},children:bn(e.item.nutritionalValues.protein,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:bn(e.item.nutritionalValues.carbohydrates,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:bn(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},JN=e=>{const[t,n]=Ge();return C(Xu,{children:X(Ku,{children:[C(Bh,{children:X(Qt,{children:[C(ke,{}),C(ke,{}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),X(Yu,{children:[e.items.map(r=>C(UAt,{item:r},r.id)),e.showSum&&X(Qt,{children:[C(ke,{sx:{paddingX:1},children:" "}),C(ke,{sx:{paddingX:1},children:t("total")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.values.energy,n.language),kj:bi(e.values.energyKj,n.language)})}),C(ke,{align:"right",sx:{paddingX:1},children:bn(e.values.protein,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:bn(e.values.carbohydrates,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:bn(e.values.fat,n.language)})]})]})]})})},WAt=e=>{const[t,n]=Ge();return C(Xu,{children:X(Ku,{size:"small",children:[C(Bh,{children:X(Qt,{children:[C(ke,{children:t("nutrition.macronutrient")}),C(ke,{align:"right",children:t("nutrition.planned")}),C(ke,{align:"right",children:t("nutrition.logged")}),C(ke,{align:"right",children:t("nutrition.difference")})]})}),X(Yu,{children:[X(Qt,{children:[C(ke,{children:t("nutrition.energy")}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.planned.energy,n.language),kj:bi(e.planned.energyKj,n.language)})}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.logged.energy,n.language),kj:bi(e.logged.energyKj,n.language)})}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.logged.energy-e.planned.energy,n.language),kj:bi(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),X(Qt,{children:[C(ke,{children:t("nutrition.protein")}),C(ke,{align:"right",children:bn(e.planned.protein,n.language)}),C(ke,{align:"right",children:bn(e.logged.protein,n.language)}),C(ke,{align:"right",children:bn(e.logged.protein-e.planned.protein,n.language)})]}),X(Qt,{children:[C(ke,{children:t("nutrition.carbohydrates")}),C(ke,{align:"right",children:bn(e.planned.carbohydrates,n.language)}),C(ke,{align:"right",children:bn(e.logged.carbohydrates,n.language)}),C(ke,{align:"right",children:bn(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),X(Qt,{children:[C(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(ke,{align:"right",children:bn(e.planned.carbohydratesSugar,n.language)}),C(ke,{align:"right",children:bn(e.logged.carbohydratesSugar,n.language)}),C(ke,{align:"right",children:bn(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),X(Qt,{children:[C(ke,{children:t("nutrition.fat")}),C(ke,{align:"right",children:bn(e.planned.fat,n.language)}),C(ke,{align:"right",children:bn(e.logged.fat,n.language)}),C(ke,{align:"right",children:bn(e.logged.fat-e.planned.fat,n.language)})]}),X(Qt,{children:[C(ke,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),C(ke,{align:"right",children:bn(e.planned.fatSaturated,n.language)}),C(ke,{align:"right",children:bn(e.logged.fatSaturated,n.language)}),C(ke,{align:"right",children:bn(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),X(Qt,{children:[C(ke,{children:t("nutrition.others")}),C(ke,{}),C(ke,{}),C(ke,{})]}),X(Qt,{children:[C(ke,{children:t("nutrition.fibres")}),C(ke,{align:"right",children:bn(e.planned.fiber,n.language)}),C(ke,{align:"right",children:bn(e.logged.fiber,n.language)}),C(ke,{align:"right",children:bn(e.logged.fiber-e.planned.fiber,n.language)})]}),X(Qt,{children:[C(ke,{children:t("nutrition.sodium")}),C(ke,{align:"right",children:bn(e.planned.sodium,n.language)}),C(ke,{align:"right",children:bn(e.logged.sodium,n.language)}),C(ke,{align:"right",children:bn(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},uK=()=>{const[e]=Ge(),t=om(),n=parseInt(t.planId),r=new Date(t.date),o=L_e(n,t.date);return o.isLoading?C(_o,{}):C(mb,{title:e("nutrition.nutritionalDiary"),mainContent:C(Mt,{children:X(Kt,{spacing:2,children:[C(dt,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),C(WAt,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),C(JN,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*pM(e){let t;e<=3?t=h_e:e<=5?t=p_e:t=f_e;for(const n of t)yield n}const GAt=e=>{const[t,n]=Ge(),r=pM(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return C(Hh,{width:"100%",height:300,children:X(Soe,{children:[C(qc,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:d,payload:f})=>{const h=u+(d-u)*.4,m=s+h*Math.cos(-c*i),g=l+h*Math.sin(-c*i);return C("text",{x:m,y:g,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:bn(f.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>C(Uv,{fill:r.next().value},`cell-${l}`))}),C(Mu,{})]})})},qAt=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=Ge(),a=pM(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return C(Hh,{width:"100%",height:300,children:X(xoe,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[C(Jv,{strokeDasharray:"3 4"}),C(Kc,{dataKey:"name"}),C(Yc,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),C(zs,{formatter:l=>bi(l,i.language)}),C(Mu,{}),e&&C(Rc,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),C(Rc,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),C(Rc,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},KAt=e=>{const[t,n]=Ge();return C(Xu,{children:X(Ku,{size:"small",children:[C(Bh,{children:X(Qt,{children:[C(ke,{children:t("date")}),C(ke,{align:"right",children:t("nutrition.logged")}),C(ke,{align:"right",children:t("nutrition.difference")})]})}),C(Yu,{children:Array.from(e.logged).map(([r])=>{var o,i;return X(Qt,{children:[C(ke,{children:C(Yl,{to:Tn(wn.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcal",{value:bi((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),C(ke,{align:"right",children:bi(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},YAt=()=>{const[e]=Ge(),[t,n]=J.useState(!1),r=()=>n(!0),o=()=>n(!1);return X("div",{children:[C(Lh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(rz,{closeFn:o})})]})},XAt=e=>{const[t]=Ge(),[n,r]=J.useState(!1),o=()=>r(!0),i=()=>r(!1);return X("div",{children:[C(Lh,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:C(CS,{})}),C(ta,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:C(nz,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},zce=({meal:e,planId:t,closeFn:n})=>{const[r,o]=Ge(),i=H_e(t),a=W_e(t),s=ml({name:Vc().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:XS().required()});return C(pl,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:D2e(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>C(ms,{children:X(Kt,{spacing:2,children:[C(Cn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),C(jS,{dateAdapter:jk,adapterLocale:o.language,children:C(zct,{label:r("timeOfDay"),value:l.values.time!==null?It.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),X(Kt,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&C(gt,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),C(gt,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},QAt=e=>{const[t]=Ge(),n=pM(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return C(Hh,{width:"100%",height:150,children:X(xoe,{data:r,layout:"vertical",margin:{left:60},children:[C(Jv,{strokeDasharray:"3 4"}),C(Kc,{type:"number",unit:"%"}),C(Yc,{type:"category",dataKey:"name"}),C(Rc,{dataKey:"value",unit:"%",fill:n.next().value})]})})},Vce=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=Ge(),i=Y_e(e),a=X_e(e),s=Q_e(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=ml({amount:pa().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:pa().required(o("forms.fieldRequired"))});return C(pl,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const d={...u,meal:n,weight_unit:null};t?a.mutate({...d,id:t.id}):i.mutate(d),r&&r()},children:u=>{var d;return C(ms,{children:X(Kt,{spacing:2,children:[C(zB,{callback:f=>u.setFieldValue("ingredient",f?f.data.id:null),initialIngredient:t?(d=t.ingredient)==null?void 0:d.name:null}),C(Cn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(fo,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),X(Kt,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&C(gt,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&C(gt,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),C(gt,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},JAt=e=>{const t=hee(e.planId),n=U_e(e.planId),[r]=Ge(),[o,i]=J.useState(!1),[a,s]=y.useState(null),[l,c]=y.useState(!1),[u,d]=y.useState(!1),f=!!a,h=k=>{s(k.currentTarget)},m=()=>{g(),x()},g=()=>{s(null)},v=()=>{P(),s(null)},w=()=>{n.mutate(e.meal.id)},x=()=>c(!0),S=()=>c(!1),P=()=>d(!0),T=()=>d(!1),E=(k,A)=>{A!=="clickaway"&&i(!1)},O=()=>{const k=e.meal.items.map(A=>({plan:e.planId,meal:e.meal.id,mealItem:A.id,ingredient:A.ingredientId,weight_unit:A.weightUnitId,datetime:new Date().toISOString(),amount:A.amount}));t.mutate(k),i(!0)};return X(Mt,{children:[!e.onlyLogging&&C(nc,{title:r("nutrition.logThisMeal"),children:C(kn,{"aria-label":"settings",onClick:O,children:C(CS,{})})}),C(kn,{"aria-label":"settings",onClick:h,children:C(JS,{})}),C(kn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?C(bse,{}):C(wse,{})}),X(hs,{anchorEl:a,open:f,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:m,children:r("edit")}),C(Yt,{onClick:v,children:r("delete")})]}),C(ta,{title:r("edit"),isOpen:l,closeFn:S,children:C(zce,{meal:e.meal,closeFn:S,planId:e.planId})}),C(Wz,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:T,deleteFn:w}),C(CZ,{open:o,autoHideDuration:lee,onClose:E,children:C(Wu,{onClose:E,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},ZAt=e=>{var o,i,a,s;const[t,n]=y.useState(!1),r=()=>n(!t);return X(Mt,{children:[X(ss,{children:[C(jF,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:C(tc,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:C(rd,{})})}),C(bo,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),C(Zs,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:C(ss,{children:C(bo,{children:C(Vce,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},dK=e=>{const t=Ei(),n=e.meal.id!==RP,[r]=Ge(),[o,i]=y.useState(!1),a=()=>i(!o),[s,l]=y.useState(!1),c=()=>{l(!s),d(!1)},[u,d]=y.useState(!1),f=()=>{d(!u),l(!1)};return X(Ro,{children:[C(nd,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==RP&&C(JAt,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),X(xa,{sx:{paddingY:0},children:[X(Zs,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&C(JN,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),C(dt,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&C(QAt,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),C(JN,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&C(dl,{children:e.meal.items.map(h=>C(ZAt,{mealItem:h,planId:e.planId,mealId:e.meal.id},h.id))})]}),X(ps,{children:[!e.onlyLogging&&C(nc,{title:r("nutrition.addMealItem"),children:C(kn,{onClick:c,children:C(Ji,{})})}),C(nc,{title:r("nutrition.addNutritionalDiary"),children:C(kn,{onClick:f,children:C(CS,{})})})]}),C(Zs,{in:s,timeout:"auto",unmountOnExit:!0,children:X(xa,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addMealItem")})}),C(Vce,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),C(Zs,{in:u,timeout:"auto",unmountOnExit:!0,children:X(xa,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addNutritionalDiary")})}),C(nz,{closeFn:f,planId:e.planId,mealId:e.meal.id!==RP?e.meal.id:null})]})})]})},fK=e=>{const[t,n]=Ge();return C(Xu,{children:X(Ku,{size:"small",children:[C(Bh,{children:X(Qt,{children:[C(ke,{children:t("nutrition.macronutrient")}),C(ke,{align:"right",children:t("total")}),C(ke,{align:"right",children:t("nutrition.percentEnergy")})]})}),X(Yu,{children:[X(Qt,{children:[C(ke,{children:t("nutrition.energy")}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.values.energy,n.language),kj:bi(e.values.energyKj,n.language)})}),C(ke,{align:"right"})]}),X(Qt,{children:[C(ke,{children:t("nutrition.protein")}),C(ke,{align:"right",children:bn(e.values.protein,n.language)}),C(ke,{align:"right",children:S$(e.values.percent.protein,n.language)})]}),X(Qt,{children:[C(ke,{children:t("nutrition.carbohydrates")}),C(ke,{align:"right",children:bn(e.values.carbohydrates,n.language)}),C(ke,{align:"right",children:S$(e.values.percent.carbohydrates,n.language)})]}),X(Qt,{children:[C(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(ke,{align:"right",children:bn(e.values.carbohydratesSugar,n.language)}),C(ke,{align:"right"})]}),X(Qt,{children:[C(ke,{children:t("nutrition.fat")}),C(ke,{align:"right",children:bn(e.values.fat,n.language)}),C(ke,{align:"right",children:S$(e.values.percent.fat,n.language)})]}),X(Qt,{children:[C(ke,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),C(ke,{align:"right",children:bn(e.values.fatSaturated,n.language)}),C(ke,{align:"right"})]}),X(Qt,{children:[C(ke,{children:t("nutrition.others")}),C(ke,{children:" "}),C(ke,{align:"right"})]}),X(Qt,{children:[C(ke,{children:t("nutrition.fibres")}),C(ke,{align:"right",children:bn(e.values.fiber,n.language)}),C(ke,{align:"right"})]}),X(Qt,{children:[C(ke,{children:t("nutrition.sodium")}),C(ke,{align:"right",children:bn(e.values.sodium,n.language)}),C(ke,{align:"right"})]})]})]})})},e$t=e=>{const t=j_e(e.plan.id),n=rm(),[r,o]=Ge(),[i,a]=J.useState(null),[s,l]=J.useState(!1),[c,u]=J.useState(!1),d=!!i,f=O=>{a(O.currentTarget)},h=()=>{m(),S()},m=()=>{a(null)},g=()=>{T(),a(null)},v=()=>{t.mutate(e.plan.id),n(Tn(wn.NUTRITION_OVERVIEW))},w=()=>window.location.href=Tn(wn.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),x=()=>window.location.href=Tn(wn.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),S=()=>l(!0),P=()=>l(!1),T=()=>u(!0),E=()=>u(!1);return X(Mt,{children:[C(gt,{onClick:f,children:C(xse,{})}),X(hs,{anchorEl:i,open:d,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:h,children:r("edit")}),C(Yt,{onClick:w,children:r("downloadAsPdf")}),C(Yt,{onClick:x,children:r("nutrition.copyPlan")}),C(Yt,{onClick:g,children:r("delete")})]}),C(ta,{title:r("edit"),isOpen:s,closeFn:P,children:C(rz,{plan:e.plan,closeFn:P})}),C(Wz,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:E,deleteFn:v})]})},t$t=e=>{const[t]=Ge(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return C(Mt,{children:X(Kt,{direction:"column",spacing:1,children:[C(dt,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),C(Kg,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),C(Kg,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),C(Kg,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},n$t=()=>{const[e]=Ge(),t=om(),n=parseInt(t.planId),r=N_e(n),[o,i]=y.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?C(_o,{}):C(mb,{title:s.description,optionsMenu:C(e$t,{plan:s}),mainContent:C(Mt,{children:X(Kt,{spacing:2,children:[s.meals.map(l=>C(dK,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),C(dK,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&X(Mt,{children:[C(nc,{title:e("nutrition.addMeal"),children:C(kn,{onClick:a,children:C(Ji,{})})}),X(Zs,{in:o,timeout:"auto",unmountOnExit:!0,children:[C("p",{children:C("b",{children:e("nutrition.addMeal")})}),C(zce,{planId:s.id,closeFn:a})]})]}),C(fK,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&C(GAt,{data:s.plannedNutritionalValues}),C(dt,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),C(qAt,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),C(fK,{values:s.loggedNutritionalValuesToday}),C(KAt,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:C(t$t,{plan:s}),fab:C(XAt,{plan:s})})},r$t=()=>{var n;const e=__e(),[t]=Ge();return e.isLoading?C(_o,{}):C(mb,{title:t("nutrition.plans"),mainContent:X(Kt,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&C(kI,{}),C(i$t,{plans:e.data})]}),fab:C(YAt,{})})},o$t=e=>{const[t,n]=Ge(),r=Tn(wn.NUTRITION_DETAIL,n.language,{id:e.plan.id});return X(Mt,{children:[C(ss,{sx:{p:0},children:X(Bf,{component:"a",href:r,children:[C(bo,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.creationDate.toLocaleDateString()}),C(yse,{})]})}),C(as,{component:"li"})]})},i$t=e=>C(co,{children:C(dl,{sx:{py:0},children:e.plans.map(t=>C(o$t,{plan:t},t.id))},"abc")}),a$t=e=>{var u;const[t,n]=Ge(),[r,o]=J.useState(null),i=!!r,a=d=>{o(d.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Tn(wn.ROUTINE_EDIT_LOG,n.language,{id:e.log.id}),c=()=>window.location.href=Tn(wn.ROUTINE_DELETE_LOG,n.language,{id:e.log.id});return X(Qt,{children:[C(ke,{component:"th",scope:"row",children:It.fromJSDate(e.log.date).toLocaleString(It.DATE_MED)}),C(ke,{children:e.log.reps}),X(ke,{children:[e.log.weight,(u=e.log.weightUnitObj)==null?void 0:u.name]}),C(ke,{children:e.log.rirString}),X(ke,{children:[C(kn,{"aria-label":"settings",onClick:a,children:C(JS,{fontSize:"small"})}),X(hs,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[X(Yt,{onClick:l,children:[C(vse,{}),t("edit")]}),X(Yt,{onClick:c,children:[C(oz,{}),t("delete")]})]})]})]},e.log.id)},s$t=e=>{let t=e.logEntries??[];const n=[5,10,20],[r,o]=J.useState(n[0]),[i,a]=J.useState(0),s=(c,u)=>{a(u)},l=c=>{o(parseInt(c.target.value,10)),a(0)};return X(Mt,{children:[C(dt,{variant:"h6",sx:{mt:4},children:e.exerciseId.getTranslation().name}),X(He,{container:!0,spacing:2,children:[C(He,{size:{xs:12,md:5},children:X(Xu,{children:[X(Ku,{"aria-label":"simple table",size:"small",children:[C(Bh,{children:X(Qt,{children:[C(ke,{children:"Date"}),C(ke,{children:"Reps"}),C(ke,{children:"Weight"}),C(ke,{children:"RiR"}),C(ke,{})]})}),C(Yu,{children:t.slice(i*r,i*r+r).map(c=>C(a$t,{log:c},c.id))})]}),C(VF,{rowsPerPageOptions:n,component:"div",count:t.length,rowsPerPage:r,page:i,onPageChange:s,onRowsPerPageChange:l})]})}),C(He,{size:{xs:12,md:7},children:C(u$t,{data:t},e.exerciseId.id)})]})]})},pK=()=>{const e=om(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Ge(),o=Lyt(t,!1),i=Sse(t),a=l=>window.location.href=Tn(wn.ROUTINE_ADD_LOG,r.language,{id:l});let s=new Map;return o.isSuccess&&(s=o.data.reduce(function(l,c){return l.set(c.exerciseId,l.get(c.exerciseId)||[]),[Q2e,J2e].includes(c.weightUnit)&&c.repetitionUnit===aee&&l.get(c.exerciseId).push(c),l},new Map)),C(Mt,{children:X(qu,{maxWidth:"lg",children:[C(dt,{variant:"h4",children:n("routines.logsHeader")}),C(dt,{variant:"body1",children:n("routines.logsFilterNote")}),o.isSuccess&&i.isSuccess?C(Mt,{children:i.data.days.map(l=>X("div",{children:[X(Kt,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[C(dt,{variant:"h4",children:l.description}),C(gt,{variant:"contained",onClick:()=>a(l.id),children:n("routines.addLogToDay")})]}),l.sets.map(c=>c.exercises.map(u=>C(s$t,{exerciseId:u,logEntries:s.get(u.id)},c.id+u.uuid)))]},l.id))}):C(_o,{})]})})},l$t=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),c$t=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),C(Ro,{children:X(xa,{children:[C(dt,{variant:"body1",children:It.fromMillis(t==null?void 0:t[0].value).toLocaleString(It.DATE_MED)}),X(dt,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.reps," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},u$t=e=>{let t;t=e.data.reduce(function(r,o){return r.set(o.reps,r.get(o.reps)||[]),r.get(o.reps).push(o),r},new Map);const n=pM(t.size);return C(er,{children:C(Hh,{width:"100%",height:250,children:X(qrt,{children:[C(Kc,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>It.fromMillis(r).toLocaleString(It.DATE_MED),type:"number"}),C(Yc,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=l$t(o);return C(FS,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r.toString()},r)}),C(zs,{content:C(c$t,{})}),C(Jv,{strokeDasharray:"3 3"}),C(Mu,{})]})})})},d$t=()=>C("div",{children:C(Lh,{color:"secondary","aria-label":"add",onClick:()=>window.location.href=Tn(wn.ROUTINE_ADD),sx:{position:"fixed",bottom:"5rem",right:t=>t.spacing(2),zIndex:9},children:C(Ji,{})})}),f$t=e=>{const[t,n]=Ge(),r=Tn(wn.ROUTINE_DETAIL,n.language,{id:e.routine.id});return X(Mt,{children:[C(ss,{sx:{p:0},children:X(Bf,{component:"a",href:r,children:[C(bo,{primary:e.routine.name!==""?e.routine.name:t("routines.routine"),secondary:e.routine.date.toLocaleDateString()}),C(yse,{})]})}),C(as,{component:"li"})]})},hK=()=>{const e=Fyt(),[t]=Ge();return X(qu,{maxWidth:"lg",children:[X(He,{container:!0,children:[X(He,{size:{xs:12,sm:8},children:[C(dt,{gutterBottom:!0,variant:"h3",component:"div",children:t("routines.routines")}),e.isLoading?C(_o,{}):C(co,{children:C(dl,{sx:{py:0},children:e.data.map(n=>C(f$t,{routine:n},n.id))},"abc")})]}),C(He,{size:{xs:12,sm:4}})]}),C(d$t,{})]})},_R=()=>C(Pxt,{}),Gz=()=>X(kvt,{children:[X(Nt,{path:"/:lang",children:[X(Nt,{path:"workout",children:[C(Nt,{path:"overview",element:C(fSt,{})}),C(Nt,{path:"schedule",element:C(pSt,{})}),C(Nt,{path:"calendar",children:C(Nt,{path:"user",element:C(Hxt,{})})}),C(Nt,{path:"gallery",element:C(Gxt,{})}),X(Nt,{path:"template",children:[C(Nt,{path:"overview",element:C(Jxt,{})}),C(Nt,{path:"public",element:C(Xxt,{})})]})]}),X(Nt,{path:"routine",children:[C(Nt,{index:!0,element:C(hK,{})}),C(Nt,{path:"overview",element:C(hK,{})}),C(Nt,{path:":routineId",element:C(I7,{}),children:C(Nt,{path:"view",element:C(I7,{})})}),C(Nt,{path:"log",children:C(Nt,{path:":routineId",element:C(pK,{}),children:C(Nt,{path:"view",element:C(pK,{})})})})]}),X(Nt,{path:"measurement",children:[C(Nt,{index:!0,element:C(cK,{})}),C(Nt,{path:"overview",element:C(cK,{})}),C(Nt,{path:"category/:categoryId",element:C(VAt,{})})]}),X(Nt,{path:"exercise",children:[C(Nt,{index:!0,element:C(eq,{})}),C(Nt,{path:"overview",element:C(eq,{})}),C(Nt,{path:":baseID",element:C(_R,{}),children:C(Nt,{path:"view-base",element:C(_R,{}),children:C(Nt,{path:":slug",element:C(_R,{})})})}),C(Nt,{path:"contribute",element:C(Bxt,{})})]}),X(Nt,{path:"weight",children:[C(Nt,{path:"overview",element:C(ule,{})}),C(Nt,{path:"add",element:C(zxt,{})})]}),X(Nt,{path:"nutrition",children:[C(Nt,{path:"overview",element:C(r$t,{})}),X(Nt,{path:":planId",children:[C(Nt,{path:"view",element:C(n$t,{})}),C(Nt,{path:":date",element:C(uK,{})}),C(Nt,{path:"diary",element:C(uK,{})})]}),X(Nt,{path:"calculator",children:[C(Nt,{path:"bmi",element:C(Vxt,{})}),C(Nt,{path:"calories",element:C(Uxt,{})})]}),C(Nt,{path:"ingredient",children:C(Nt,{path:"overview",element:C(qxt,{})})})]}),X(Nt,{path:"software",children:[C(Nt,{path:"about-us",element:C(twt,{})}),C(Nt,{path:"api",element:C(Qxt,{})}),C(Nt,{path:"equipment",element:C(Wxt,{})})]}),C(Nt,{path:"login",element:C(Kxt,{})}),C(Nt,{path:"user",children:C(Nt,{path:"preferences",element:C(Yxt,{})})})]}),C(Nt,{path:"/",element:C(hSt,{})}),C(Nt,{path:"*",element:C("main",{style:{padding:"1rem"},children:C("p",{children:"404, Page NOT FOUND"})})})]}),p$t="_notification_bbb61_1",mK={notification:p$t},h$t=()=>{const[e,t]=awt(),n=()=>{t(U7({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(U7({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?X(Wu,{className:mK.notification,severity:e.notification.severity,action:C(gt,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[C(IT,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):X(Wu,{className:mK.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[C(IT,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):null};function m$t(){return X(He,{container:!0,children:[C(He,{size:12,children:C(dSt,{})}),C(He,{size:12,children:C(h$t,{})}),C(He,{size:12,children:C(Gz,{})})]})}const qt=e=>typeof e=="string",C0=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},gK=e=>e==null?"":""+e,g$t=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},y$t=/###/g,yK=e=>e&&e.indexOf("###")>-1?e.replace(y$t,"."):e,vK=e=>!e||qt(e),Pw=(e,t,n)=>{const r=qt(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:o}=Pw(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=Pw(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Pw(e,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},v$t=(e,t,n,r)=>{const{obj:o,k:i}=Pw(e,t,Object);o[i]=o[i]||[],o[i].push(n)},pO=(e,t)=>{const{obj:n,k:r}=Pw(e,t);if(n)return n[r]},b$t=(e,t,n)=>{const r=pO(e,n);return r!==void 0?r:pO(t,n)},Hce=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?qt(e[r])||e[r]instanceof String||qt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Hce(e[r],t[r],n):e[r]=t[r]);return e},eg=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var w$t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const x$t=e=>qt(e)?e.replace(/[&<>"'\/]/g,t=>w$t[t]):e;class S$t{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const C$t=[" ",",","?","!",";"],P$t=new S$t(20),T$t=(e,t,n)=>{t=t||"",n=n||"";const r=C$t.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=P$t.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},ZN=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&le&&e.replace("_","-"),E$t={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class mO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||E$t,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[s,l]=a;for(let c=0;c{let[s,l]=a;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):qt(r)&&i?s.push(...r.split(i)):s.push(r)));const l=pO(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!qt(r)?l:ZN(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),bK(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(qt(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=pO(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Hce(l,r,i):l={...l,...r},bK(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var Uce={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const xK={};class gO extends hM{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),g$t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Tc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!T$t(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:qt(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:qt(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const P=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${P}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${P}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const h=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(f),v=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!qt(f)&&typeof f!="boolean"&&typeof f!="number";if(x&&f&&S&&v.indexOf(g)<0&&!(qt(w)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=P,d.usedParams=this.getUsedParamsDetails(n),d):P}if(i){const P=Array.isArray(f),T=P?[]:{},E=P?m:h;for(const O in f)if(Object.prototype.hasOwnProperty.call(f,O)){const k=`${E}${i}${O}`;T[O]=this.translate(k,{...n,joinArrays:!1,ns:s}),T[O]===k&&(T[O]=f[O])}f=T}}else if(x&&qt(w)&&Array.isArray(f))f=f.join(w),f&&(f=this.extendTranslation(f,t,n,r));else{let P=!1,T=!1;const E=n.count!==void 0&&!qt(n.count),O=gO.hasDefaultValue(n),k=E?this.pluralResolver.getSuffix(c,n.count,n):"",A=n.ordinal&&E?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",I=E&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),R=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&O&&(P=!0,f=R),this.isValidLookup(f)||(T=!0,f=a);const L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:f,B=O&&R!==f&&this.options.updateMissing;if(T||P||B){if(this.logger.log(B?"updateKey":"missingKey",c,l,a,B?R:f),i){const F=this.resolve(a,{...n,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let F=0;F{const q=O&&U!==f?U:L;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,H,q,B,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(F,l,H,q,B,n),this.emit("missingKey",F,l,H,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?_.forEach(F=>{const H=this.pluralResolver.getSuffixes(F,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(U=>{z([F],a+U,n[`defaultValue${U}`]||R)})}):z(_,a,R))}f=this.extendTranslation(f,t,n,d,r),T&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(T||P)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,P?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=qt(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!qt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),h=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return qt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!qt(n.count),h=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(qt(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{this.isValidLookup(r)||(s=v,!xK[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&(xK[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,w,v,n);else{let P;f&&(P=this.pluralResolver.getSuffix(w,n.count,n));const T=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+P),n.ordinal&&P.indexOf(E)===0&&x.push(u+P.replace(E,this.options.pluralSeparator)),h&&x.push(u+T)),m){const O=`${u}${this.options.contextSeparator}${n.context}`;x.push(O),f&&(x.push(O+P),n.ordinal&&P.indexOf(E)===0&&x.push(O+P.replace(E,this.options.pluralSeparator)),h&&x.push(O+T))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(w,v,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!qt(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const DR=e=>e.charAt(0).toUpperCase()+e.slice(1);class SK{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tc.create("languageUtils")}getScriptPartFromCode(t){if(t=hO(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=hO(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(qt(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=DR(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=DR(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=DR(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),qt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return qt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):qt(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let O$t=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],I$t={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const k$t=["v1","v2","v3"],M$t=["v4"],CK={zero:0,one:1,two:2,few:3,many:4,other:5},A$t=()=>{const e={};return O$t.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:I$t[t.fc]}})}),e};class $$t{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Tc.create("pluralResolver"),(!this.options.compatibilityJSON||M$t.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=A$t(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=hO(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const a=new Intl.PluralRules(r,{type:o});return this.pluralRulesCache[i]=a,a}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>CK[o]-CK[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!k$t.includes(this.options.compatibilityJSON)}}const PK=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=b$t(e,t,n);return!i&&o&&qt(n)&&(i=ZN(e,n,r),i===void 0&&(i=ZN(t,n,r))),i},NR=e=>e.replace(/\$/g,"$$$$");class R$t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tc.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:x$t,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?eg(i):a||"{{",this.suffix=s?eg(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?eg(f):h||eg("$t("),this.nestingSuffix=m?eg(m):g||eg(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=h=>{if(h.indexOf(this.formatSeparator)<0){const w=PK(n,l,h,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:h}):w}const m=h.split(this.formatSeparator),g=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(PK(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:g})};this.resetRegExp();const u=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:h=>NR(h)},{regex:this.regexp,safeValue:h=>this.escapeValue?NR(this.escape(h)):NR(h)}].forEach(h=>{for(s=0;i=h.regex.exec(t);){const m=i[1].trim();if(a=c(m),a===void 0)if(typeof u=="function"){const v=u(t,i,o);a=qt(v)?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!qt(a)&&!this.useRawValueToEscape&&(a=gK(a));const g=h.safeValue(a);if(t=t.replace(i[0],g),d?(h.regex.lastIndex+=a.length,h.regex.lastIndex-=i[0].length):h.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),m=f.match(/"/g);(h&&h.length%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!qt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!qt(i))return i;qt(i)||(i=gK(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const _$t=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},tg=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(hO(r),o),t[a]=s),s(n)}};class D$t{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tc.create("formatter"),this.options=t,this.formats={number:tg((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:tg((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:tg((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:tg((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:tg((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=tg(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:c,formatOptions:u}=_$t(l);if(this.formats[c]){let d=s;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},h=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[c](s,h,{...u,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const N$t=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class L$t extends hM{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Tc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{v$t(l.loaded,[i],a),N$t(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{s[c][d]===void 0&&(s[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();qt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),qt(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,o,l):u=c(t,n,r,o),u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,o,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const TK=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),qt(e[1])&&(t.defaultValue=e[1]),qt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),EK=e=>(qt(e.ns)&&(e.ns=[e.ns]),qt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),qt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),lP=()=>{},F$t=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class Xx extends hM{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=EK(t),this.services={},this.logger=Tc,this.modules={external:[]},F$t(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(qt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=TK();this.options={...o,...this.options,...EK(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?Tc.init(i(this.modules.logger),this.options):Tc.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=D$t);const d=new SK(this.options);this.store=new wK(this.options.resources,this.options);const f=this.services;f.logger=Tc,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new $$t(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new R$t(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new L$t(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(h){for(var m=arguments.length,g=new Array(m>1?m-1:0),v=1;v1?m-1:0),v=1;v{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,r||(r=lP),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=C0(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lP;const o=qt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=C0();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=lP),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&Uce.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=C0();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=qt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const i=function(a,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${m}`):h=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,o.t(h,l)};return qt(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=C0();return this.options.ns?(qt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=C0();qt(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new SK(TK());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Xx(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:lP;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new Xx(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new wK(this.store.data,o),i.services.resourceStore=i.store),i.translator=new gO(i.services,o),i.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const OK=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,V$t=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!OK.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!OK.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},IK={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=V$t(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let P0=null;const kK=()=>{if(P0!==null)return P0;try{P0=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{P0=!1}return P0};var W$t={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&kK())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&kK()&&window.localStorage.setItem(n,e)}};let T0=null;const MK=()=>{if(T0!==null)return T0;try{T0=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{T0=!1}return T0};var G$t={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&MK())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&MK()&&window.sessionStorage.setItem(n,e)}},q$t={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i0?t:void 0}},K$t={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Y$t={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},X$t={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function Q$t(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Wce{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=z$t(n,this.options||{},Q$t()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(H$t),this.addDetector(U$t),this.addDetector(W$t),this.addDetector(G$t),this.addDetector(q$t),this.addDetector(K$t),this.addDetector(Y$t),this.addDetector(X$t)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Wce.type="languageDetector";function eL(e){"@babel/helpers - typeof";return eL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},eL(e)}function Gce(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":eL(XMLHttpRequest))==="object"}function J$t(e){return!!e&&typeof e.then=="function"}function Z$t(e){return J$t(e)?e:Promise.resolve(e)}function eRt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var tL={exports:{}},cP={exports:{}},AK;function tRt(){return AK||(AK=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Bi<"u"&&Bi,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s=typeof i<"u"&&i||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(_){return _&&DataView.prototype.isPrototypeOf(_)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(_){return _&&u.indexOf(Object.prototype.toString.call(_))>-1};function f(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(_)||_==="")throw new TypeError('Invalid character in header field name: "'+_+'"');return _.toLowerCase()}function h(_){return typeof _!="string"&&(_=String(_)),_}function m(_){var D={next:function(){var z=_.shift();return{done:z===void 0,value:z}}};return l.iterable&&(D[Symbol.iterator]=function(){return D}),D}function g(_){this.map={},_ instanceof g?_.forEach(function(D,z){this.append(z,D)},this):Array.isArray(_)?_.forEach(function(D){this.append(D[0],D[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(D){this.append(D,_[D])},this)}g.prototype.append=function(_,D){_=f(_),D=h(D);var z=this.map[_];this.map[_]=z?z+", "+D:D},g.prototype.delete=function(_){delete this.map[f(_)]},g.prototype.get=function(_){return _=f(_),this.has(_)?this.map[_]:null},g.prototype.has=function(_){return this.map.hasOwnProperty(f(_))},g.prototype.set=function(_,D){this.map[f(_)]=h(D)},g.prototype.forEach=function(_,D){for(var z in this.map)this.map.hasOwnProperty(z)&&_.call(D,this.map[z],z,this)},g.prototype.keys=function(){var _=[];return this.forEach(function(D,z){_.push(z)}),m(_)},g.prototype.values=function(){var _=[];return this.forEach(function(D){_.push(D)}),m(_)},g.prototype.entries=function(){var _=[];return this.forEach(function(D,z){_.push([z,D])}),m(_)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function v(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function w(_){return new Promise(function(D,z){_.onload=function(){D(_.result)},_.onerror=function(){z(_.error)}})}function x(_){var D=new FileReader,z=w(D);return D.readAsArrayBuffer(_),z}function S(_){var D=new FileReader,z=w(D);return D.readAsText(_),z}function P(_){for(var D=new Uint8Array(_),z=new Array(D.length),F=0;F-1?D:_}function A(_,D){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D=D||{};var z=D.body;if(_ instanceof A){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,D.headers||(this.headers=new g(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!z&&_._bodyInit!=null&&(z=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=D.credentials||this.credentials||"same-origin",(D.headers||!this.headers)&&(this.headers=new g(D.headers)),this.method=k(D.method||this.method||"GET"),this.mode=D.mode||this.mode||null,this.signal=D.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(z),(this.method==="GET"||this.method==="HEAD")&&(D.cache==="no-store"||D.cache==="no-cache")){var F=/([?&])_=[^&]*/;if(F.test(this.url))this.url=this.url.replace(F,"$1_="+new Date().getTime());else{var H=/\?/;this.url+=(H.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function I(_){var D=new FormData;return _.trim().split("&").forEach(function(z){if(z){var F=z.split("="),H=F.shift().replace(/\+/g," "),U=F.join("=").replace(/\+/g," ");D.append(decodeURIComponent(H),decodeURIComponent(U))}}),D}function R(_){var D=new g,z=_.replace(/\r?\n[\t ]+/g," ");return z.split("\r").map(function(F){return F.indexOf(` -`)===0?F.substr(1,F.length):F}).forEach(function(F){var H=F.split(":"),U=H.shift().trim();if(U){var q=H.join(":").trim();D.append(U,q)}}),D}E.call(A.prototype);function N(_,D){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D||(D={}),this.type="default",this.status=D.status===void 0?200:D.status,this.ok=this.status>=200&&this.status<300,this.statusText=D.statusText===void 0?"":""+D.statusText,this.headers=new g(D.headers),this.url=D.url||"",this._initBody(_)}E.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},N.error=function(){var _=new N(null,{status:0,statusText:""});return _.type="error",_};var L=[301,302,303,307,308];N.redirect=function(_,D){if(L.indexOf(D)===-1)throw new RangeError("Invalid status code");return new N(null,{status:D,headers:{location:_}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(D,z){this.message=D,this.name=z;var F=Error(D);this.stack=F.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function B(_,D){return new Promise(function(z,F){var H=new A(_,D);if(H.signal&&H.signal.aborted)return F(new a.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function q(){U.abort()}U.onload=function(){var ae={status:U.status,statusText:U.statusText,headers:R(U.getAllResponseHeaders()||"")};ae.url="responseURL"in U?U.responseURL:ae.headers.get("X-Request-URL");var Z="response"in U?U.response:U.responseText;setTimeout(function(){z(new N(Z,ae))},0)},U.onerror=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.ontimeout=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.onabort=function(){setTimeout(function(){F(new a.DOMException("Aborted","AbortError"))},0)};function Y(ae){try{return ae===""&&s.location.href?s.location.href:ae}catch{return ae}}U.open(H.method,Y(H.url),!0),H.credentials==="include"?U.withCredentials=!0:H.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&(l.blob?U.responseType="blob":l.arrayBuffer&&H.headers.get("Content-Type")&&H.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(U.responseType="arraybuffer")),D&&typeof D.headers=="object"&&!(D.headers instanceof g)?Object.getOwnPropertyNames(D.headers).forEach(function(ae){U.setRequestHeader(ae,h(D.headers[ae]))}):H.headers.forEach(function(ae,Z){U.setRequestHeader(Z,ae)}),H.signal&&(H.signal.addEventListener("abort",q),U.onreadystatechange=function(){U.readyState===4&&H.signal.removeEventListener("abort",q)}),U.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return B.polyfill=!0,s.fetch||(s.fetch=B,s.Headers=g,s.Request=A,s.Response=N),a.Headers=g,a.Request=A,a.Response=N,a.fetch=B,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(cP,cP.exports)),cP.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Bi<"u"&&Bi.fetch?n=Bi.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof eRt<"u"&&typeof window>"u"){var r=n||tRt();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(tL,tL.exports);var qce=tL.exports;const Kce=Rn(qce),$K=tY({__proto__:null,default:Kce},[qce]);function RK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function _K(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=_K({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},NK?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{DK(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),DK(n,s,o,l),NK=!0}catch(u){o(u)}}},aRt=function(t,n,r,o){r&&Rh(r)==="object"&&(r=nL("",r).slice(1)),t.queryStringParams&&(n=nL(n,t.queryStringParams));try{var i;Qx?i=new Qx:i=new yO("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},sRt=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Nu&&n.indexOf("file:")!==0)return iRt(t,n,r,o);if(Gce()||typeof ActiveXObject=="function")return aRt(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function bv(e){"@babel/helpers - typeof";return bv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bv(e)}function LK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function LR(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};lRt(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return uRt(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=LR(LR(LR({},fRt()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);bv(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=Z$t(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&u&&u.message){var f=u.message.toLowerCase(),h=["failed","fetch","network","load"].find(function(v){return f.indexOf(v)>-1});if(h)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var m,g;try{typeof d.data=="string"?m=a.options.parse(d.data,o,i):m=d.data}catch{g="failed parsing "+n+" to json"}if(g)return r(g,!1);r(null,m)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],d=[];n.forEach(function(f){var h=s.options.addPath;typeof s.options.addPath=="function"&&(h=s.options.addPath(f,r));var m=s.services.interpolator.interpolate(h,{lng:f,ns:r});s.options.request(s.options,m,l,function(g,v){c+=1,u.push(g),d.push(v),c===n.length&&typeof a=="function"&&a(u,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(h){l.indexOf(h)<0&&l.push(h)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(d){o.read(u,d,"read",null,null,function(f,h){f&&a.warn("loading namespace ".concat(d," for language ").concat(u," failed"),f),!f&&h&&a.log("loaded namespace ".concat(d," for language ").concat(u),h),o.loaded("".concat(u,"|").concat(d),f,h)})})})}}}])}();Qce.type="backend";Oi.use(Qce).use(Wce).use(tRe).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});const sm=new Kwe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,cacheTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),qz=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=xY({key:"css",prepend:!0,container:o});cd(r).render(C(pve,{value:a,children:C(y.Suspense,{fallback:C(Ja,{}),children:C(sz,{children:C(Rf,{theme:_St(r),children:C(_h,{client:sm,children:C(Gz,{})})})})})}))},FK=document.getElementById("root");FK&&cd(FK).render(C(J.StrictMode,{children:C(y.Suspense,{fallback:C(Ja,{}),children:C(sz,{children:C(Rf,{theme:Yf,children:X(_h,{client:sm,children:[C(m$t,{}),C(uxe,{})]})})})})}));const jK=document.getElementById("react-weight-overview");jK&&cd(jK).render(C(y.Suspense,{fallback:C(Ja,{}),children:C(Rf,{theme:Yf,children:C(_h,{client:sm,children:C(ule,{})})})}));const BK=document.getElementById("react-weight-dashboard");BK&&cd(BK).render(C(y.Suspense,{fallback:C(Ja,{}),children:C(Rf,{theme:Yf,children:C(_h,{client:sm,children:C(ele,{})})})}));const zK=document.getElementById("react-nutrition-dashboard");zK&&cd(zK).render(C(y.Suspense,{fallback:C(Ja,{}),children:C(Rf,{theme:Yf,children:C(_h,{client:sm,children:C(mse,{})})})}));const VK=document.getElementById("react-routine-dashboard");VK&&cd(VK).render(C(y.Suspense,{fallback:C(Ja,{}),children:C(Rf,{theme:Yf,children:C(_h,{client:sm,children:C(Dse,{})})})}));qz("react-exercise-overview");qz("react-exercise-contribute");const HK=document.getElementById("react-exercise-detail");HK&&cd(HK).render(C(y.Suspense,{fallback:C(Ja,{}),children:C(sz,{children:C(Rf,{theme:Yf,children:C(_h,{client:sm,children:C(Gz,{})})})})}));qz("react-page");const UK=document.getElementById("react-ingredient-search");UK&&cd(UK).render(C(y.Suspense,{fallback:C(Ja,{}),children:C(Rf,{theme:Yf,children:C(ewt,{})})}))});export default pRt(); +`)),r.current=!0),j.current){S(D),j.current=!1;return}P(D)},[t.autoHeight,P,n]);_o(I,[I]),lr(e,"sortedRowsSet",I),lr(e,"paginationModelChange",I),lr(e,"columnsChange",I),ht(e,"resize",_),lr(e,"debouncedResize",t.onResize)}function sAt(e,t,n){if(n!==void 0)return n;if(e===null||t===0)return 0;const o=Pf(e).createElement("div");o.style.width="99px",o.style.height="99px",o.style.position="absolute",o.style.overflow="scroll",o.className="scrollDiv",e.appendChild(o);const i=o.offsetWidth-o.clientWidth;return e.removeChild(o),i}function lAt(e,t){return Math.round(e*10**t)/10**t}function hK(e,t){return e.width===t.width&&e.height===t.height}const cAt=typeof globalThis.ResizeObserver<"u"?globalThis.ResizeObserver:class{observe(){}unobserve(){}disconnect(){}},uAt=(e,t,n)=>(n.current.caches.rowsMeta={heights:new Map},W({},e,{rowsMeta:{currentPageTotalHeight:0,positions:[]}})),dAt=(e,t)=>{const{getRowHeight:n,getRowSpacing:r,getEstimatedRowHeight:o}=t,i=e.current.caches.rowsMeta.heights,a=y.useRef(-1),s=y.useRef(!1),l=y.useRef(!1),c=Ye(e,h1),u=Ye(e,ti),d=Ye(e,yM),f=Ye(e,js),p=sp(e,t),m=Ye(e,mm),g=Ye(e,()=>li(e.current.state).rowHeight),v=L=>{let j=i.get(L);return j===void 0&&(j={content:g,spacingTop:0,spacingBottom:0,detail:0,autoHeight:!1,needsFirstMeasurement:!0},i.set(L,j)),j},w=y.useCallback(L=>{const j=li(e.current.state).rowHeight,_=e.current.getRowHeightEntry(L.id);if(!n)_.content=j,_.needsFirstMeasurement=!1;else{const D=n(W({},L,{densityFactor:c}));if(D==="auto"){if(_.needsFirstMeasurement){const z=o?o(W({},L,{densityFactor:c})):j;_.content=z??j}s.current=!0,_.autoHeight=!0}else _.content=sce(D,j),_.needsFirstMeasurement=!1,_.autoHeight=!1}if(r){const D=e.current.getRowIndexRelativeToVisibleRows(L.id),z=r(W({},L,{isFirstVisible:D===0,isLastVisible:D===p.rows.length-1,indexRelativeToCurrentPage:D}));_.spacingTop=z.top??0,_.spacingBottom=z.bottom??0}else _.spacingTop=0,_.spacingBottom=0;return e.current.unstable_applyPipeProcessors("rowHeight",_,L),_},[e,p.rows.length,n,o,g,r,c]),x=y.useCallback(()=>{s.current=!1,m.top.forEach(w),m.bottom.forEach(w);const L=[],j=p.rows.reduce((_,D)=>{L.push(_);const z=w(D),F=z.content+z.spacingTop+z.spacingBottom+z.detail;return _+F},0);s.current||(a.current=1/0),e.current.setState(_=>W({},_,{rowsMeta:{currentPageTotalHeight:j,positions:L}})),l.current=!0},[e,m,p.rows,w]),S=L=>{var j;return((j=i.get(L))==null?void 0:j.content)??g},P=(L,j)=>{const _=e.current.getRowHeightEntry(L),D=_.content!==j;_.needsFirstMeasurement=!1,_.content=j,l.current&&(l.current=!D)},T=L=>{var j;return((j=i.get(L))==null?void 0:j.autoHeight)??!1},E=()=>a.current,O=L=>{s.current&&L>a.current&&(a.current=L)},k=()=>{i.clear(),x()},A=eu(()=>new cAt(L=>{for(let j=0;j0?_.borderBoxSize[0].blockSize:_.contentRect.height,z=_.target.__mui_id;e.current.unstable_storeRowHeightMeasurement(z,D)}l.current||e.current.requestPipeProcessorsApplication("rowHeight")})).current,I=(L,j)=>(L.__mui_id=j,A.observe(L),()=>A.unobserve(L));Jz(e,"rowHeight",x),y.useEffect(()=>{x()},[u,d,f,x]);const R={unstable_getRowHeight:S,unstable_setLastMeasuredRowIndex:O,unstable_storeRowHeightMeasurement:P,resetRowHeights:k},N={hydrateRowsMeta:x,observeRowHeight:I,rowHasAutoHeight:T,getRowHeightEntry:v,getLastMeasuredRowIndex:E};Jt(e,R,"public"),Jt(e,N,"private")},fAt=e=>{const t=y.useCallback((o={})=>e.current.unstable_applyPipeProcessors("exportState",{},o),[e]),n=y.useCallback(o=>{e.current.unstable_applyPipeProcessors("restoreState",{callbacks:[]},{stateToRestore:o}).callbacks.forEach(a=>{a()}),e.current.forceUpdate()},[e]);Jt(e,{exportState:t,restoreState:n},"public")},pAt=e=>{const t=y.useRef({}),n=(s,l)=>{var c;return(c=t.current[s])==null?void 0:c[l]},r=()=>{t.current={}},o=y.useCallback(({rowId:s,minFirstColumn:l,maxLastColumn:c,columns:u})=>{for(let d=l;d1&&(d+=f.colSpan-1)}},[e]),i={unstable_getCellColSpanInfo:n},a={resetColSpan:r,calculateColSpan:o};Jt(e,i,"public"),Jt(e,a,"private"),ht(e,"columnOrderChange",r)};function hAt(e){const{apiRef:t,lookup:n,columnIndex:r,rowId:o,minFirstColumnIndex:i,maxLastColumnIndex:a,columns:s}=e,l=s.length,c=s[r],u=t.current.getRow(o),d=t.current.getRowValue(u,c),f=typeof c.colSpan=="function"?c.colSpan(d,u,c,t):c.colSpan;if(!f||f===1)return VR(n,o,r,{spannedByColSpan:!1,cellProps:{colSpan:1,width:c.computedWidth}}),{colSpan:1};let p=c.computedWidth;for(let m=1;m=i&&g{if(Zle(e)){if(n[e.field]!==void 0)throw new Error(["MUI X: columnGroupingModel contains duplicated field",`column field ${e.field} occurs two times in the grouping model:`,`- ${n[e.field].join(" > ")}`,`- ${t.join(" > ")}`].join(` +`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{Zce(i,[...t,r],n)})},aL=e=>{if(!e)return{};const t={};return e.forEach(n=>{Zce(n,[],t)}),t},sL=(e,t,n)=>{const r=l=>t[l]??[],o=[],i=Math.max(...e.map(l=>r(l).length)),a=(l,c,u)=>py(r(l).slice(0,u+1),r(c).slice(0,u+1)),s=(l,c)=>!!(n!=null&&n.left&&n.left.includes(l)&&!n.left.includes(c)||n!=null&&n.right&&!n.right.includes(l)&&n.right.includes(c));for(let l=0;l{const f=r(d)[l]??null;if(u.length===0)return[{columnFields:[d],groupId:f}];const p=u[u.length-1],m=p.columnFields[p.columnFields.length-1];return p.groupId!==f||!a(m,d,l)||s(m,d)?[...u,{columnFields:[d],groupId:f}]:[...u.slice(0,u.length-1),{columnFields:[...p.columnFields,d],groupId:f}]},[]);o.push(c)}return o},mAt=["groupId","children"],Zz=e=>{let t={};return e.forEach(n=>{if(Zle(n))return;const{groupId:r,children:o}=n,i=At(n,mAt);if(!r)throw new Error("MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.");const a=W({},i,{groupId:r}),s=Zz(o);if(s[r]!==void 0||t[r]!==void 0)throw new Error(`MUI X: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=W({},t,s,{[r]:a})}),W({},t)},gAt=(e,t,n)=>{if(!t.columnGroupingModel)return e;const r=Nu(n),o=Eb(n),i=Zz(t.columnGroupingModel??[]),a=aL(t.columnGroupingModel??[]),s=sL(r,a,n.current.state.pinnedColumns??{}),l=o.length===0?0:Math.max(...o.map(c=>{var u;return((u=a[c])==null?void 0:u.length)??0}));return W({},e,{columnGrouping:{lookup:i,unwrappedGroupingModel:a,headerStructure:s,maxDepth:l}})},yAt=(e,t)=>{const n=y.useCallback(s=>Tce(e)[s]??[],[e]),r=y.useCallback(()=>Ece(e),[e]);Jt(e,{getColumnGroupPath:n,getAllGroupDetails:r},"public");const i=y.useCallback(()=>{const s=aL(t.columnGroupingModel??[]);e.current.setState(l=>{var f;const c=((f=l.columns)==null?void 0:f.orderedFields)??[],u=l.pinnedColumns??{},d=sL(c,s,u);return W({},l,{columnGrouping:W({},l.columnGrouping,{headerStructure:d})})})},[e,t.columnGroupingModel]),a=y.useCallback(s=>{var g,v;const l=((v=(g=e.current).getPinnedColumns)==null?void 0:v.call(g))??{},c=Nu(e),u=Eb(e),d=Zz(s??[]),f=aL(s??[]),p=sL(c,f,l),m=u.length===0?0:Math.max(...u.map(w=>{var x;return((x=f[w])==null?void 0:x.length)??0}));e.current.setState(w=>W({},w,{columnGrouping:{lookup:d,unwrappedGroupingModel:f,headerStructure:p,maxDepth:m}}))},[e]);ht(e,"columnIndexChange",i),ht(e,"columnsChange",()=>{a(t.columnGroupingModel)}),ht(e,"columnVisibilityModelChange",()=>{a(t.columnGroupingModel)}),y.useEffect(()=>{a(t.columnGroupingModel)},[a,t.columnGroupingModel])};function vAt(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function mK(e,t){if(t!==void 0&&e.changedTouches){for(let n=0;nWz(e),r=Ye(e,n);return y.useEffect(()=>{t.current&&r===!1&&(t.current.resolve(),t.current=void 0)}),()=>{if(!t.current){if(n()===!1)return Promise.resolve();t.current=vAt()}return t.current}}function CAt(e,t){if(e.length<4)return e;const n=e.slice();n.sort((s,l)=>s-l);const r=n[Math.floor(n.length*.25)],o=n[Math.floor(n.length*.75)-1],i=o-r,a=i<5?5:i*t;return n.filter(s=>s>r-a&&s{const s=NEt(e.current,i.field).map(m=>m.getBoundingClientRect().width??0),l=t.includeOutliers?s:CAt(s,t.outliersFactor);if(t.includeHeaders){const m=DEt(e.current,i.field);if(m){const g=m.querySelector(`.${se.columnHeaderTitle}`),v=m.querySelector(`.${se.columnHeaderTitleContainerContent}`),w=m.querySelector(`.${se.iconButtonContainer}`),x=m.querySelector(`.${se.menuIcon}`),S=g??v,P=window.getComputedStyle(m,null),T=parseInt(P.paddingLeft,10)+parseInt(P.paddingRight,10),O=S.scrollWidth+1+T+((w==null?void 0:w.clientWidth)??0)+((x==null?void 0:x.clientWidth)??0);l.push(O)}}const c=i.minWidth!==-1/0&&i.minWidth!==void 0,u=i.maxWidth!==1/0&&i.maxWidth!==void 0,d=c?i.minWidth:0,f=u?i.maxWidth:1/0,p=l.length===0?0:Math.max(...l);r[i.field]=Fc(p,d,f)}),o.classList.remove(se.autosizing),r}const TAt=e=>W({},e,{columnResize:{resizingColumnField:""}});function EAt(){return{colDef:void 0,initialColWidth:0,initialTotalWidth:0,previousMouseClickEvent:void 0,columnHeaderElement:void 0,headerFilterElement:void 0,groupHeaderElements:[],cellElements:[],leftPinnedCellsAfter:[],rightPinnedCellsBefore:[],fillerLeft:void 0,fillerRight:void 0,leftPinnedHeadersAfter:[],rightPinnedHeadersBefore:[]}}const OAt=(e,t)=>{const n=nr(),r=Lo(e,"useGridColumnResize"),o=eu(EAt).current,i=y.useRef(),a=y.useRef(),s=Tb(),l=y.useRef(),c=A=>{var D,z;r.debug(`Updating width to ${A} for col ${o.colDef.field}`);const I=o.columnHeaderElement.offsetWidth,R=A-I,N=A-o.initialColWidth,L=o.initialTotalWidth+N;(z=(D=e.current.rootElementRef)==null?void 0:D.current)==null||z.style.setProperty("--DataGrid-rowWidth",`${L}px`),o.colDef.computedWidth=A,o.colDef.width=A,o.colDef.flex=0,o.columnHeaderElement.style.width=`${A}px`;const j=o.headerFilterElement;j&&(j.style.width=`${A}px`),o.groupHeaderElements.forEach(F=>{const H=F;let U;H.getAttribute("aria-colspan")==="1"?U=`${A}px`:U=`${H.offsetWidth+R}px`,H.style.width=U}),o.cellElements.forEach(F=>{const H=F;let U;H.getAttribute("aria-colspan")==="1"?U=`${A}px`:U=`${H.offsetWidth+R}px`,H.style.setProperty("--width",U)});const _=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);_===ur.LEFT&&(lg(o.fillerLeft,"width",R),o.leftPinnedCellsAfter.forEach(F=>{lg(F,"left",R)}),o.leftPinnedHeadersAfter.forEach(F=>{lg(F,"left",R)})),_===ur.RIGHT&&(lg(o.fillerRight,"width",R),o.rightPinnedCellsBefore.forEach(F=>{lg(F,"right",R)}),o.rightPinnedHeadersBefore.forEach(F=>{lg(F,"right",R)}))},u=A=>{if(w(),o.previousMouseClickEvent){const I=o.previousMouseClickEvent,R=I.timeStamp,N=I.clientX,L=I.clientY;if(A.timeStamp-R<300&&A.clientX===N&&A.clientY===L){o.previousMouseClickEvent=void 0,e.current.publishEvent("columnResizeStop",null,A);return}}if(o.colDef){e.current.setColumnWidth(o.colDef.field,o.colDef.width),r.debug(`Updating col ${o.colDef.field} with new width: ${o.colDef.width}`);const I=Lc(e.current.state);o.groupHeaderElements.forEach(R=>{const N=IEt(R),L=R,_=`${N.reduce((D,z)=>I.columnVisibilityModel[z]!==!1?D+I.lookup[z].computedWidth:D,0)}px`;L.style.width=_})}s.start(0,()=>{e.current.publishEvent("columnResizeStop",null,A)})},d=(A,I,R)=>{var _;const N=e.current.rootElementRef.current;o.initialColWidth=A.computedWidth,o.initialTotalWidth=e.current.getRootDimensions().rowWidth,o.colDef=A,o.columnHeaderElement=OEt(e.current.columnHeadersContainerRef.current,A.field);const L=N.querySelector(`.${se.headerFilterRow} [data-field="${fd(A.field)}"]`);L&&(o.headerFilterElement=L),o.groupHeaderElements=kEt((_=e.current.columnHeadersContainerRef)==null?void 0:_.current,A.field),o.cellElements=MEt(o.columnHeaderElement,e.current),o.fillerLeft=Vq(e.current,n?"filler--pinnedRight":"filler--pinnedLeft"),o.fillerRight=Vq(e.current,n?"filler--pinnedLeft":"filler--pinnedRight");const j=e.current.unstable_applyPipeProcessors("isColumnPinned",!1,o.colDef.field);o.leftPinnedCellsAfter=j!==ur.LEFT?[]:AEt(e.current,o.columnHeaderElement,n),o.rightPinnedCellsBefore=j!==ur.RIGHT?[]:$Et(e.current,o.columnHeaderElement,n),o.leftPinnedHeadersAfter=j!==ur.LEFT?[]:REt(e.current,o.columnHeaderElement,n),o.rightPinnedHeadersBefore=j!==ur.RIGHT?[]:_Et(e.current,o.columnHeaderElement,n),a.current=xAt(I,n),i.current=bAt(R,o.columnHeaderElement.getBoundingClientRect(),a.current)},f=wr(u),p=wr(A=>{if(A.buttons===0){f(A);return}let I=gK(i.current,A.clientX,o.columnHeaderElement.getBoundingClientRect(),a.current);I=Fc(I,o.colDef.minWidth,o.colDef.maxWidth),c(I);const R={element:o.columnHeaderElement,colDef:o.colDef,width:I};e.current.publishEvent("columnResize",R,A)}),m=wr(A=>{mK(A,l.current)&&u(A)}),g=wr(A=>{const I=mK(A,l.current);if(!I)return;if(A.type==="mousemove"&&A.buttons===0){m(A);return}let R=gK(i.current,I.x,o.columnHeaderElement.getBoundingClientRect(),a.current);R=Fc(R,o.colDef.minWidth,o.colDef.maxWidth),c(R);const N={element:o.columnHeaderElement,colDef:o.colDef,width:R};e.current.publishEvent("columnResize",N,A)}),v=wr(A=>{const I=xO(A.target,se["columnSeparator--resizable"]);if(!I)return;const R=A.changedTouches[0];R!=null&&(l.current=R.identifier);const N=xO(A.target,se.columnHeader),L=EEt(N),j=e.current.getColumn(L);r.debug(`Start Resize on col ${j.field}`),e.current.publishEvent("columnResizeStart",{field:L},A),d(j,I,R.clientX);const _=Pf(A.currentTarget);_.addEventListener("touchmove",g),_.addEventListener("touchend",m)}),w=y.useCallback(()=>{const A=Pf(e.current.rootElementRef.current);A.body.style.removeProperty("cursor"),A.removeEventListener("mousemove",p),A.removeEventListener("mouseup",f),A.removeEventListener("touchmove",g),A.removeEventListener("touchend",m),setTimeout(()=>{A.removeEventListener("click",yK,!0)},100),o.columnHeaderElement&&(o.columnHeaderElement.style.pointerEvents="unset")},[e,o,p,f,g,m]),x=y.useCallback(({field:A})=>{e.current.setState(I=>W({},I,{columnResize:W({},I.columnResize,{resizingColumnField:A})})),e.current.forceUpdate()},[e]),S=y.useCallback(()=>{e.current.setState(A=>W({},A,{columnResize:W({},A.columnResize,{resizingColumnField:""})})),e.current.forceUpdate()},[e]),P=wr(({colDef:A},I)=>{if(I.button!==0||!I.currentTarget.classList.contains(se["columnSeparator--resizable"]))return;I.preventDefault(),r.debug(`Start Resize on col ${A.field}`),e.current.publishEvent("columnResizeStart",{field:A.field},I),d(A,I.currentTarget,I.clientX);const R=Pf(e.current.rootElementRef.current);R.body.style.cursor="col-resize",o.previousMouseClickEvent=I.nativeEvent,R.addEventListener("mousemove",p),R.addEventListener("mouseup",f),R.addEventListener("click",yK,!0)}),T=wr((A,I)=>{if(t.disableAutosize||I.button!==0)return;const R=e.current.state.columns.lookup[A.field];R.resizable!==!1&&e.current.autosizeColumns(W({},t.autosizeOptions,{columns:[R.field]}))}),E=SAt(e),O=y.useRef(!1),k=y.useCallback(async A=>{var j;if(!((j=e.current.rootElementRef)==null?void 0:j.current)||O.current)return;O.current=!0;const R=Lc(e.current.state),N=W({},pEt,A,{columns:(A==null?void 0:A.columns)??R.orderedFields});N.columns=N.columns.filter(_=>R.columnVisibilityModel[_]!==!1);const L=N.columns.map(_=>e.current.state.columns.lookup[_]);try{e.current.unstable_setColumnVirtualization(!1),await E();const _=PAt(e,N,L),D=L.map(z=>W({},z,{width:_[z.field],computedWidth:_[z.field]}));if(N.expand){const F=R.orderedFields.map(q=>R.lookup[q]).filter(q=>R.columnVisibilityModel[q.field]!==!1).reduce((q,X)=>q+(_[X.field]??X.computedWidth??X.width),0),U=e.current.getRootDimensions().viewportInnerSize.width-F;if(U>0){const q=U/(D.length||1);D.forEach(X=>{X.width+=q,X.computedWidth+=q})}}e.current.updateColumns(D),D.forEach((z,F)=>{if(z.width!==L[F].width){const H=z.width;e.current.publishEvent("columnWidthChange",{element:e.current.getColumnHeaderElement(z.field),colDef:z,width:H})}})}finally{e.current.unstable_setColumnVirtualization(!0),O.current=!1}},[e,E]);y.useEffect(()=>w,[w]),cM(()=>{t.autosizeOnMount&&Promise.resolve().then(()=>{e.current.autosizeColumns(t.autosizeOptions)})}),gce(e,()=>{var A;return(A=e.current.columnHeadersContainerRef)==null?void 0:A.current},"touchstart",v,{passive:!0}),Jt(e,{autosizeColumns:k},"public"),ht(e,"columnResizeStop",S),ht(e,"columnResizeStart",x),ht(e,"columnSeparatorMouseDown",P),ht(e,"columnSeparatorDoubleClick",T),lr(e,"columnResize",t.onColumnResize),lr(e,"columnWidthChange",t.onColumnWidthChange)};function lg(e,t,n){e&&(e.style[t]=`${parseInt(e.style[t],10)+n}px`)}function IAt(e,t){return e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex<=t.lastRowIndex?null:e.firstRowIndex>=t.firstRowIndex&&e.lastRowIndex>t.lastRowIndex?{firstRowIndex:t.lastRowIndex,lastRowIndex:e.lastRowIndex}:e.firstRowIndex{if(!e)return null;let r=e[t.field];const o=t.rowSpanValueGetter??t.valueGetter;return o&&(r=o(r,e,t,n)),r},PO={spannedCells:{},hiddenCells:{},hiddenCellOriginMap:{}},$w={firstRowIndex:0,lastRowIndex:0},MAt=new Set([bu,"__reorder__",pM]),eue=20,tue=(e,t,n,r,o,i,a)=>{const s=i?{}:W({},e.current.state.rowSpanning.spannedCells),l=i?{}:W({},e.current.state.rowSpanning.hiddenCells),c=i?{}:W({},e.current.state.rowSpanning.hiddenCellOriginMap);return i&&(a=$w),t.forEach(u=>{var d;if(!MAt.has(u.field)){for(let f=o.firstRowIndex;f<=o.lastRowIndex;f+=1){const p=n[f];if((d=l[p.id])!=null&&d[u.field])continue;const m=HR(p.model,u,e);if(m==null)continue;let g=p.id,v=f,w=0;const x=[];if(f===o.firstRowIndex){let P=f-1;const T=n[P];for(;P>=r.firstRowIndex&&HR(T.model,u,e)===m;){const E=n[P+1];l[E.id]?l[E.id][u.field]=!0:l[E.id]={[u.field]:!0},x.push(f),w+=1,g=T.id,v=P,P-=1}}x.forEach(P=>{c[P]?c[P][u.field]=v:c[P]={[u.field]:v}});let S=f+1;for(;S<=r.lastRowIndex&&n[S]&&HR(n[S].model,u,e)===m;){const P=n[S];l[P.id]?l[P.id][u.field]=!0:l[P.id]={[u.field]:!0},c[S]?c[S][u.field]=v:c[S]={[u.field]:v},S+=1,w+=1}w>0&&(s[g]?s[g][u.field]=w+1:s[g]={[u.field]:w+1})}a={firstRowIndex:Math.min(a.firstRowIndex,o.firstRowIndex),lastRowIndex:Math.max(a.lastRowIndex,o.lastRowIndex)}}}),{spannedCells:s,hiddenCells:l,hiddenCellOriginMap:c,processedRange:a}},AAt=(e,t,n)=>{var r;if(t.unstable_rowSpanning){const o=e.rows.dataRowIds||[],i=e.columns.orderedFields||[],a=e.rows.dataRowIdToModelLookup,s=e.columns.lookup,l=!!e.filter.filterModel.items.length||!!((r=e.filter.filterModel.quickFilterValues)!=null&&r.length);if(!o.length||!i.length||!a||!s||l)return W({},e,{rowSpanning:PO});const c={firstRowIndex:0,lastRowIndex:Math.min(eue-1,Math.max(o.length-1,0))},u=o.map(g=>({id:g,model:a[g]})),d=i.map(g=>s[g]),{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}=tue(n,d,u,c,c,!0,$w);return W({},e,{rowSpanning:{spannedCells:f,hiddenCells:p,hiddenCellOriginMap:m}})}return W({},e,{rowSpanning:PO})},$At=(e,t)=>{const{range:n,rows:r}=sp(e,t),o=Ye(e,wM),i=Ye(e,vo),a=eu(()=>Object.keys(e.current.state.rowSpanning.spannedCells).length>0?{firstRowIndex:0,lastRowIndex:Math.min(eue-1,Math.max(e.current.state.rows.dataRowIds.length-1,0))}:$w),s=y.useRef($w),l=y.useCallback((f=!0)=>{if(!t.unstable_rowSpanning){e.current.state.rowSpanning!==PO&&e.current.setState(O=>W({},O,{rowSpanning:PO}));return}if(n===null||!kAt(o))return;f&&(a.current=$w);const p=IAt({firstRowIndex:o.firstRowIndex,lastRowIndex:Math.min(o.lastRowIndex-1,n.lastRowIndex)},a.current);if(p===null)return;const{spannedCells:m,hiddenCells:g,hiddenCellOriginMap:v,processedRange:w}=tue(e,i,r,n,p,f,a.current);a.current=w;const x=Object.keys(m).length,S=Object.keys(g).length,P=Object.keys(e.current.state.rowSpanning.spannedCells).length,T=Object.keys(e.current.state.rowSpanning.hiddenCells).length;(f||x!==P||S!==T)&&e.current.setState(O=>W({},O,{rowSpanning:{spannedCells:m,hiddenCells:g,hiddenCellOriginMap:v}}))},[e,t.unstable_rowSpanning,n,o,r,i,a]),c=y.useRef(o),u=y.useRef(!0),d=y.useRef(!1);y.useEffect(()=>{const f=u.current;if(u.current&&(u.current=!1),n&&s.current&&vK(n,s.current)&&(s.current=n,d.current=!0),!f&&c.current!==o){vK(c.current,o)&&(l(d.current),d.current=!1),c.current=o;return}l()},[l,o,n,s])},RAt=(e,t,n)=>W({},e,{listViewColumn:t.unstable_listColumn?W({},t.unstable_listColumn,{computedWidth:lL(n)}):void 0});function _At(e,t){const n=()=>{e.current.setState(i=>i.listViewColumn?W({},i,{listViewColumn:W({},i.listViewColumn,{computedWidth:lL(e)})}):i)},r=y.useRef(null);ht(e,"viewportInnerSizeChange",i=>{r.current!==i.width&&(r.current=i.width,n())}),ht(e,"columnVisibilityModelChange",n),y.useEffect(()=>{const i=t.unstable_listColumn;i&&e.current.setState(a=>W({},a,{listViewColumn:W({},i,{computedWidth:lL(e)})}))},[e,t.unstable_listColumn]),y.useEffect(()=>{t.unstable_listView&&t.unstable_listColumn},[t.unstable_listView,t.unstable_listColumn])}function lL(e){return li(e.current.state).viewportInnerSize.width}const DAt=(e,t)=>{const n=eMt(e,t);return JMt(n,t),KMt(n),Bo(iAt,n,t),Bo(YMt,n,t),Bo(lMt,n,t),Bo(HMt,n,t),Bo(zMt,n,t),Bo(SMt,n,t),Bo(ZMt,n,t),Bo(RMt,n,t),Bo(vMt,n,t),Bo(AAt,n,t),Bo(uMt,n,t),Bo(TAt,n,t),Bo(AMt,n,t),Bo(uAt,n,t),Bo(aMt,n,t),Bo(gAt,n,t),Bo(ETt,n,t),Bo(RAt,n,t),IMt(n,t),XMt(n,t),cMt(n,t),UMt(n,t),$At(n,t),LEt(n,t),pAt(n),yAt(n,t),VMt(n,t),CMt(n,t),_Mt(n,t),xMt(n,t),eAt(n,t),dMt(n,t),OAt(n,t),$Mt(n,t),dAt(n,t),tAt(n,t),sMt(n),pMt(n,t),yMt(n,t),iMt(n,t),aAt(n,t),nAt(n,t),fAt(n),OTt(n,t),_At(n,t),n},NAt=e=>{const{classes:t,headerAlign:n,isDragging:r,isLastColumn:o,showLeftBorder:i,showRightBorder:a,groupId:s,pinnedPosition:l}=e;return vn({root:["columnHeader",n==="left"&&"columnHeader--alignLeft",n==="center"&&"columnHeader--alignCenter",n==="right"&&"columnHeader--alignRight",r&&"columnHeader--moving",a&&"columnHeader--withRightBorder",i&&"columnHeader--withLeftBorder","withBorderColor",s===null?"columnHeader--emptyGroup":"columnHeader--filledGroup",l==="left"&&"columnHeader--pinnedLeft",l==="right"&&"columnHeader--pinnedRight",o&&"columnHeader--last"],draggableContainer:["columnHeaderDraggableContainer"],titleContainer:["columnHeaderTitleContainer","withBorderColor"],titleContainerContent:["columnHeaderTitleContainerContent"]},bn,t)};function LAt(e){var q;const{groupId:t,width:n,depth:r,maxDepth:o,fields:i,height:a,colIndex:s,hasFocus:l,tabIndex:c,isLastColumn:u,pinnedPosition:d,style:f,indexInSection:p,sectionLength:m,gridHasFiller:g}=e,v=xt(),w=y.useRef(null),x=mn(),S=Ye(x,Ece),P=t?S[t]:{},{headerName:T=t??"",description:E="",headerAlign:O=void 0}=P;let k;const A=t&&((q=S[t])==null?void 0:q.renderHeaderGroup),I=y.useMemo(()=>({groupId:t,headerName:T,description:E,depth:r,maxDepth:o,fields:i,colIndex:s,isLastColumn:u}),[t,T,E,r,o,i,s,u]);t&&A&&(k=A(I));const R=SM(d,p),N=xM(d,p,m,v.showColumnVerticalBorder,g),L=W({},e,{classes:v.classes,showLeftBorder:R,showRightBorder:N,headerAlign:O,depth:r,isDragging:!1}),j=T??t,_=yo(),D=t===null?`empty-group-cell-${_}`:t,z=NAt(L);y.useLayoutEffect(()=>{if(l){const ae=w.current.querySelector('[tabindex="0"]')||w.current;ae==null||ae.focus()}},[x,l]);const F=y.useCallback(X=>ae=>{b1(ae)||x.current.publishEvent(X,I,ae)},[x,I]),H=y.useMemo(()=>({onKeyDown:F("columnGroupHeaderKeyDown"),onFocus:F("columnGroupHeaderFocus"),onBlur:F("columnGroupHeaderBlur")}),[F]),U=typeof P.headerClassName=="function"?P.headerClassName(I):P.headerClassName;return $.jsx(Vce,W({ref:w,classes:z,columnMenuOpen:!1,colIndex:s,height:a,isResizing:!1,sortDirection:null,hasFocus:!1,tabIndex:c,isDraggable:!1,headerComponent:k,headerClassName:U,description:E,elementId:D,width:n,columnMenuIconButton:null,columnTitleIconButtons:null,resizable:!1,label:j,"aria-colspan":i.length,"data-fields":`|-${i.join("-|-")}-|`,style:f},H))}const bK=oe("div",{name:"MuiDataGrid",slot:"ColumnHeaderRow",overridesResolver:(e,t)=>t.columnHeaderRow})({display:"flex"}),FAt=e=>{const{visibleColumns:t,sortColumnLookup:n,filterColumnLookup:r,columnHeaderTabIndexState:o,columnGroupHeaderTabIndexState:i,columnHeaderFocus:a,columnGroupHeaderFocus:s,headerGroupingMaxDepth:l,columnMenuState:c,columnVisibility:u,columnGroupsHeaderStructure:d,hasOtherElementInTabSequence:f}=e,[p,m]=y.useState(""),[g,v]=y.useState(""),w=xl(),x=nr(),S=xt(),P=Ye(w,li),T=Ye(w,Wz),E=Ye(w,Tce),O=Ye(w,ip),k=Ye(w,TTt),A=Ye(w,m1),I=Ye(w,dd),R=Ace(O,k,A.left.length),N=P.columnsTotalWidth{w.current.columnHeadersContainerRef.current&&(w.current.columnHeadersContainerRef.current.scrollLeft=0)},[w]);const L=y.useCallback(te=>v(te.field),[]),j=y.useCallback(()=>v(""),[]),_=y.useCallback(te=>m(te.field),[]),D=y.useCallback(()=>m(""),[]),z=y.useMemo(()=>A.left.length?{firstColumnIndex:0,lastColumnIndex:A.left.length}:null,[A.left.length]),F=y.useMemo(()=>A.right.length?{firstColumnIndex:t.length-A.right.length,lastColumnIndex:t.length}:null,[A.right.length,t.length]);ht(w,"columnResizeStart",L),ht(w,"columnResizeStop",j),ht(w,"columnHeaderDragStart",_),ht(w,"columnHeaderDragEnd",D);const H=te=>{const{renderContext:pe=k,maxLastColumn:ie=t.length}=te||{},le=pe.firstColumnIndex,re=T?pe.lastColumnIndex:ie;return{renderedColumns:t.slice(le,re),firstColumnToRender:le,lastColumnToRender:re}},U=(te,pe,ie,le=!1)=>{const re=(te==null?void 0:te.position)===ur.RIGHT,fe=(te==null?void 0:te.position)===void 0,ee=A.right.length>0&&re||A.right.length===0&&fe,ce=R-ie;return $.jsxs(y.Fragment,{children:[fe&&$.jsx("div",{role:"presentation",style:{width:ce}}),pe,fe&&$.jsx("div",{role:"presentation",className:de(se.filler,le&&se["filler--borderBottom"])}),ee&&$.jsx(Xz,{header:!0,pinnedRight:re,borderBottom:le,borderTop:!1})]})},q=({pinnedPosition:te,columnIndex:pe,computedWidth:ie})=>{let le;const re=te===ur.LEFT,fe=te===ur.RIGHT;if(re||fe){const ee=Yz(te,ie,pe,O,P);let ce=re?"left":"right";x&&(ce=re?"right":"left"),te==="left"&&(le={[ce]:ee}),te==="right"&&(le={[ce]:ee})}return le},X=(te,pe={})=>{const{renderedColumns:ie,firstColumnToRender:le}=H(te),re=[];for(let fe=0;fe$.jsxs(bK,{role:"row","aria-rowindex":l+1,ownerState:S,className:se["row--borderBottom"],children:[z&&X({position:ur.LEFT,renderContext:z,maxLastColumn:z.lastColumnIndex},{disableReorder:!0}),X({renderContext:k,maxLastColumn:t.length-A.right.length}),F&&X({position:ur.RIGHT,renderContext:F,maxLastColumn:F.lastColumnIndex},{disableReorder:!0,separatorSide:Kz.Left})]}),Z=({depth:te,params:pe})=>{var Oe,Me;const ie=H(pe);if(ie.renderedColumns.length===0)return null;const{firstColumnToRender:le,lastColumnToRender:re}=ie,fe=d[te],ee=t[le].field,ce=((Oe=E[ee])==null?void 0:Oe[te])??null,me=fe.findIndex(({groupId:We,columnFields:Ve})=>We===ce&&Ve.includes(ee)),we=t[re-1].field,ge=((Me=E[we])==null?void 0:Me[te])??null,Se=fe.findIndex(({groupId:We,columnFields:Ve})=>We===ge&&Ve.includes(we)),xe=fe.slice(me,Se+1).map(We=>W({},We,{columnFields:We.columnFields.filter(Ve=>u[Ve]!==!1)})).filter(We=>We.columnFields.length>0),Ie=xe[0].columnFields.indexOf(ee),_e=xe[0].columnFields.slice(0,Ie).reduce((We,Ve)=>{const Qe=I[Ve];return We+(Qe.computedWidth??0)},0);let ye=le;const Te=xe.map(({groupId:We,columnFields:Ve},Qe)=>{const ut=s!==null&&s.depth===te&&Ve.includes(s.field),nt=i!==null&&i.depth===te&&Ve.includes(i.field)?0:-1,et={groupId:We,width:Ve.reduce(($e,Xe)=>$e+I[Xe].computedWidth,0),fields:Ve,colIndex:ye,hasFocus:ut,tabIndex:nt},yt=pe.position,wn=q({pinnedPosition:yt,columnIndex:ye,computedWidth:et.width});ye+=Ve.length;let Ke=Qe;return yt==="left"&&(Ke=ye-1),$.jsx(LAt,{groupId:We,width:et.width,fields:et.fields,colIndex:et.colIndex,depth:te,isLastColumn:et.colIndex===t.length-et.fields.length,maxDepth:l,height:P.groupHeaderHeight,hasFocus:ut,tabIndex:nt,pinnedPosition:yt,style:wn,indexInSection:Ke,sectionLength:fe.length,gridHasFiller:N},Qe)});return U(pe,Te,_e)};return{renderContext:k,leftRenderContext:z,rightRenderContext:F,pinnedColumns:A,visibleColumns:t,getCellOffsetStyle:q,getFillers:U,getColumnHeadersRow:ae,getColumnsToRender:H,getColumnGroupHeadersRows:()=>{if(l===0)return null;const te=[];for(let pe=0;pe({role:"rowgroup"})}},jAt=["className"],BAt=e=>{const{classes:t}=e;return vn({root:["columnHeaders"]},bn,t)},zAt=Qn("div",{name:"MuiDataGrid",slot:"ColumnHeaders",overridesResolver:(e,t)=>t.columnHeaders})({display:"flex",flexDirection:"column",borderTopLeftRadius:"var(--unstable_DataGrid-radius)",borderTopRightRadius:"var(--unstable_DataGrid-radius)"}),VAt=y.forwardRef(function(t,n){const{className:r}=t,o=At(t,jAt),i=xt(),a=BAt(i);return $.jsx(zAt,W({ref:n,className:de(a.root,r),ownerState:i},o,{role:"presentation"}))}),HAt=["className","visibleColumns","sortColumnLookup","filterColumnLookup","columnHeaderTabIndexState","columnGroupHeaderTabIndexState","columnHeaderFocus","columnGroupHeaderFocus","headerGroupingMaxDepth","columnMenuState","columnVisibility","columnGroupsHeaderStructure","hasOtherElementInTabSequence"],UAt=y.forwardRef(function(t,n){const{visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m}=t,g=At(t,HAt),{getInnerProps:v,getColumnHeadersRow:w,getColumnGroupHeadersRows:x}=FAt({visibleColumns:r,sortColumnLookup:o,filterColumnLookup:i,columnHeaderTabIndexState:a,columnGroupHeaderTabIndexState:s,columnHeaderFocus:l,columnGroupHeaderFocus:c,headerGroupingMaxDepth:u,columnMenuState:d,columnVisibility:f,columnGroupsHeaderStructure:p,hasOtherElementInTabSequence:m});return $.jsxs(VAt,W({ref:n},g,v(),{children:[x(),w()]}))}),WAt=op(UAt);function GAt(e){return null}function qAt(e){return null}const KAt=y.forwardRef(function(t,n){const o=mn().current.getLocaleText("noResultsOverlayLabel");return $.jsx(qz,W({ref:n},t,{children:o}))}),YAt=["sortingOrder"],XAt=y.memo(function(t){const{sortingOrder:n}=t,r=At(t,YAt),o=xt(),[i]=n,a=i==="asc"?o.slots.columnSortedAscendingIcon:o.slots.columnSortedDescendingIcon;return a?$.jsx(a,W({},r)):null}),QAt=["native"];function JAt(e){let{native:t}=e,n=At(e,QAt);return t?$.jsx("option",W({},n)):$.jsx(Yt,W({},n))}const ZAt={booleanCellTrueIcon:JOt,booleanCellFalseIcon:jR,columnMenuIcon:KOt,openFilterButtonIcon:zOt,filterPanelDeleteIcon:jR,columnFilteredIcon:Jq,columnSelectorIcon:HOt,columnUnsortedIcon:XAt,columnSortedAscendingIcon:Kq,columnSortedDescendingIcon:Yq,columnResizeIcon:UOt,densityCompactIcon:WOt,densityStandardIcon:GOt,densityComfortableIcon:qOt,exportIcon:QOt,moreActionsIcon:ZOt,treeDataCollapseIcon:Qq,treeDataExpandIcon:Xq,groupingCriteriaCollapseIcon:Qq,groupingCriteriaExpandIcon:Xq,detailPanelExpandIcon:Zq,detailPanelCollapseIcon:YOt,rowReorderIcon:eK,quickFilterIcon:VOt,quickFilterClearIcon:jR,columnMenuHideIcon:eIt,columnMenuSortAscendingIcon:Kq,columnMenuSortDescendingIcon:Yq,columnMenuFilterIcon:Jq,columnMenuManageColumnsIcon:tIt,columnMenuClearIcon:nIt,loadIcon:XOt,filterPanelAddIcon:Zq,filterPanelRemoveAllIcon:rIt,columnReorderIcon:eK},e$t=W({},ZAt,{baseBadge:yEe,baseCheckbox:hOe,baseDivider:ss,baseTextField:yn,baseFormControl:qh,baseSelect:Gf,baseButton:gt,baseIconButton:kn,baseInputAdornment:po,baseTooltip:ac,basePopper:Hf,baseInputLabel:Kh,baseSelectOption:JAt,baseChip:kh}),t$t=W({},e$t,{cell:VEt,skeletonCell:QEt,columnHeaderFilterIconButton:BOt,columnHeaderSortIcon:FOt,columnMenu:xIt,columnHeaders:WAt,detailPanels:GAt,footer:pkt,footerRowCount:Mkt,toolbar:null,pinnedRows:qAt,loadingOverlay:xkt,noResultsOverlay:KAt,noRowsOverlay:Skt,pagination:Ekt,filterPanel:okt,columnsPanel:RIt,columnsManagement:qce,panel:FIt,row:Dkt});function n$t({defaultSlots:e,slots:t}){const n=t;if(!n||Object.keys(n).length===0)return e;const r=W({},e);return Object.keys(n).forEach(o=>{const i=o;n[i]!==void 0&&(r[i]=n[i])}),r}function r$t(e){const t=Object.keys(e);if(!t.some(o=>o.startsWith("aria-")||o.startsWith("data-")))return e;const n={},r=e.forwardedProps??{};for(let o=0;or$t(e),[e])}const i$t={disableMultipleColumnsFiltering:!0,disableMultipleColumnsSorting:!0,throttleRowsMs:void 0,hideFooterRowCount:!1,pagination:!0,checkboxSelectionVisibleOnly:!1,disableColumnReorder:!0,keepColumnPositionIfDraggedOutside:!1,signature:"DataGrid",unstable_listView:!1},a$t=t$t,s$t=e=>{const t=o$t(Zt({props:e,name:"MuiDataGrid"})),n=y.useMemo(()=>W({},v1t,t.localeText),[t.localeText]),r=y.useMemo(()=>n$t({defaultSlots:a$t,slots:t.slots}),[t.slots]),o=y.useMemo(()=>Object.keys(iL).reduce((i,a)=>(i[a]=t[a]??iL[a],i),{}),[t]);return y.useMemo(()=>W({},t,o,{localeText:n,slots:r},i$t),[t,n,r,o])},l$t={hooks:{useGridAriaAttributes:Nkt,useGridRowAriaAttributes:Lkt}},nue=y.forwardRef(function(t,n){const r=s$t(t),o=DAt(r.apiRef,r);return $.jsx(Fkt,{privateApiRef:o,configuration:l$t,props:r,children:$.jsxs(sOt,W({className:r.className,style:r.style,sx:r.sx,ref:n},r.forwardedProps,{children:[$.jsx(mkt,{}),$.jsx(bEt,{}),$.jsx(wEt,{})]}))})}),c$t=y.memo(nue);nue.propTypes={apiRef:B.shape({current:B.object.isRequired}),"aria-label":B.string,"aria-labelledby":B.string,autoHeight:B.bool,autoPageSize:B.bool,autosizeOnMount:B.bool,autosizeOptions:B.shape({columns:B.arrayOf(B.string),expand:B.bool,includeHeaders:B.bool,includeOutliers:B.bool,outliersFactor:B.number}),cellModesModel:B.object,checkboxSelection:B.bool,classes:B.object,clipboardCopyCellDelimiter:B.string,columnBufferPx:B.number,columnGroupHeaderHeight:B.number,columnGroupingModel:B.arrayOf(B.object),columnHeaderHeight:B.number,columns:B.arrayOf(B.object).isRequired,columnVisibilityModel:B.object,density:B.oneOf(["comfortable","compact","standard"]),disableAutosize:B.bool,disableColumnFilter:B.bool,disableColumnMenu:B.bool,disableColumnResize:B.bool,disableColumnSelector:B.bool,disableColumnSorting:B.bool,disableDensitySelector:B.bool,disableEval:B.bool,disableMultipleRowSelection:B.bool,disableRowSelectionOnClick:B.bool,disableVirtualization:B.bool,editMode:B.oneOf(["cell","row"]),estimatedRowCount:B.number,experimentalFeatures:B.shape({warnIfFocusStateIsNotSynced:B.bool}),filterDebounceMs:B.number,filterMode:B.oneOf(["client","server"]),filterModel:B.shape({items:B.arrayOf(B.shape({field:B.string.isRequired,id:B.oneOfType([B.number,B.string]),operator:B.string.isRequired,value:B.any})).isRequired,logicOperator:B.oneOf(["and","or"]),quickFilterExcludeHiddenColumns:B.bool,quickFilterLogicOperator:B.oneOf(["and","or"]),quickFilterValues:B.array}),forwardedProps:B.object,getCellClassName:B.func,getDetailPanelContent:B.func,getEstimatedRowHeight:B.func,getRowClassName:B.func,getRowHeight:B.func,getRowId:B.func,getRowSpacing:B.func,hideFooter:B.bool,hideFooterPagination:B.bool,hideFooterSelectedRowCount:B.bool,ignoreDiacritics:B.bool,ignoreValueFormatterDuringExport:B.oneOfType([B.shape({clipboardExport:B.bool,csvExport:B.bool}),B.bool]),indeterminateCheckboxAction:B.oneOf(["deselect","select"]),initialState:B.object,isCellEditable:B.func,isRowSelectable:B.func,keepNonExistentRowsSelected:B.bool,loading:B.bool,localeText:B.object,logger:B.shape({debug:B.func.isRequired,error:B.func.isRequired,info:B.func.isRequired,warn:B.func.isRequired}),logLevel:B.oneOf(["debug","error","info","warn",!1]),nonce:B.string,onCellClick:B.func,onCellDoubleClick:B.func,onCellEditStart:B.func,onCellEditStop:B.func,onCellKeyDown:B.func,onCellModesModelChange:B.func,onClipboardCopy:B.func,onColumnHeaderClick:B.func,onColumnHeaderContextMenu:B.func,onColumnHeaderDoubleClick:B.func,onColumnHeaderEnter:B.func,onColumnHeaderLeave:B.func,onColumnHeaderOut:B.func,onColumnHeaderOver:B.func,onColumnOrderChange:B.func,onColumnResize:B.func,onColumnVisibilityModelChange:B.func,onColumnWidthChange:B.func,onDensityChange:B.func,onFilterModelChange:B.func,onMenuClose:B.func,onMenuOpen:B.func,onPaginationMetaChange:B.func,onPaginationModelChange:B.func,onPreferencePanelClose:B.func,onPreferencePanelOpen:B.func,onProcessRowUpdateError:B.func,onResize:B.func,onRowClick:B.func,onRowCountChange:B.func,onRowDoubleClick:B.func,onRowEditStart:B.func,onRowEditStop:B.func,onRowModesModelChange:B.func,onRowSelectionModelChange:B.func,onSortModelChange:B.func,onStateChange:B.func,pageSizeOptions:B.arrayOf(B.oneOfType([B.number,B.shape({label:B.string.isRequired,value:B.number.isRequired})]).isRequired),pagination:B.oneOf([!0]),paginationMeta:B.shape({hasNextPage:B.bool}),paginationMode:B.oneOf(["client","server"]),paginationModel:B.shape({page:B.number.isRequired,pageSize:B.number.isRequired}),processRowUpdate:B.func,resizeThrottleMs:B.number,rowBufferPx:B.number,rowCount:B.number,rowHeight:B.number,rowModesModel:B.object,rowPositionsDebounceMs:B.number,rows:B.arrayOf(B.object),rowSelection:B.bool,rowSelectionModel:B.oneOfType([B.arrayOf(B.oneOfType([B.number,B.string]).isRequired),B.number,B.string]),rowSpacingType:B.oneOf(["border","margin"]),scrollbarSize:B.number,showCellVerticalBorder:B.bool,showColumnVerticalBorder:B.bool,slotProps:B.object,slots:B.object,sortingMode:B.oneOf(["client","server"]),sortingOrder:B.arrayOf(B.oneOf(["asc","desc"])),sortModel:B.arrayOf(B.shape({field:B.string.isRequired,sort:B.oneOf(["asc","desc"])})),sx:B.oneOfType([B.arrayOf(B.oneOfType([B.func,B.object,B.bool])),B.func,B.object]),unstable_rowSpanning:B.bool};const u$t=e=>e.map(t=>({id:t.id,category:t.category,date:t.date,value:t.value,notes:t.notes})),d$t=e=>{const[t]=Ue(),n=u$t(e.category.entries),r=Ale(),o=r1t(),[i,a]=Y.useState(n),[s,l]=Y.useState({}),c=(x,S)=>{x.reason===$l.rowFocusOut&&(S.defaultMuiPrevented=!0)},u=x=>()=>{l({...s,[x]:{mode:Bn.Edit}})},d=x=>()=>{l({...s,[x]:{mode:Bn.View}})},f=x=>async()=>{console.log("deleting entry",x),o.mutate(parseInt(x.toString())),a(i.filter(S=>S.id!==x))},p=x=>()=>{l({...s,[x]:{mode:Bn.View,ignoreModifications:!0}});const S=i.find(P=>P.id===x);(S==null?void 0:S.id)===null&&a(i.filter(P=>P.id!==x))},m=async x=>{r.mutate({id:x.id,categoryId:x.category,date:x.date,value:x.value,notes:x.notes});const S={...x,isNew:!1};return a(i.map(P=>P.id===x.id?S:P)),S},g=x=>{console.log(x)},v=x=>{l(x)},w=[{field:"value",headerName:t("value"),width:80,editable:!0,valueFormatter:x=>x==null?"":x+e.category.unit},{field:"date",headerName:t("date"),type:"date",width:120,editable:!0,valueFormatter:x=>x==null?"":It.fromJSDate(x).toLocaleString(It.DATE_MED)},{field:"notes",headerName:t("notes"),type:"string",flex:1,editable:!0},{field:"actions",type:"actions",headerName:t("actions"),width:100,cellClassName:"actions",getActions:({id:x})=>{var P;return((P=s[x])==null?void 0:P.mode)===Bn.Edit?[C(gP,{icon:C(svt,{}),label:"Save",sx:{color:"primary.main"},onClick:d(x)}),C(gP,{icon:C($S,{}),label:"Cancel",className:"textPrimary",onClick:p(x),color:"inherit"})]:[C(gP,{icon:C(_se,{}),label:"Edit",className:"textPrimary",onClick:u(x),color:"inherit"}),C(gP,{icon:C(Jyt,{}),label:"Delete",onClick:f(x),color:"inherit"})]}}];return C(Rn,{sx:{width:"100%"},children:C(c$t,{editMode:"row",rows:n,columns:w,initialState:{pagination:{paginationModel:{pageSize:WU.pageSize}}},pageSizeOptions:WU.pageSizeOptions,disableRowSelectionOnClick:!0,rowModesModel:s,onRowModesModelChange:v,onRowEditStop:c,processRowUpdate:m,onProcessRowUpdateError:g,slotProps:{toolbar:{setRows:a,setRowModesModel:l}}})})},eV=({title:e,subtitle:t,isOpen:n,message:r,deleteFn:o,closeFn:i})=>{const[a]=Ue();return C(Bv,{open:n,onClose:i,"aria-labelledby":"modal-modal-title","aria-describedby":"modal-modal-description",children:Q(Do,{sx:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",p:2,minWidth:"400px"},children:[C(od,{title:e,titleTypographyProps:{variant:"h6"},subheader:t,action:C($S,{onClick:i})}),C(xa,{children:C(ct,{variant:"body1",children:r})}),Q(hs,{children:[C(gt,{color:"error",variant:"contained",onClick:()=>{o(),i()},children:a("delete")}),C(gt,{color:"primary",onClick:i,children:a("cancel")})]})]})})},f$t=e=>{const t=t1t(e.category.id),n=dm(),[r]=Ue(),[o,i]=Y.useState(null),[a,s]=Y.useState(!1),[l,c]=Y.useState(!1),u=!!o,d=P=>{i(P.currentTarget)},f=()=>{p(),v()},p=()=>{i(null)},m=()=>{x(),i(null)},g=()=>{t.mutate(e.category.id),n(Tn(Sn.MEASUREMENT_OVERVIEW))},v=()=>s(!0),w=()=>s(!1),x=()=>c(!0),S=()=>c(!1);return Q("div",{children:[C(gt,{onClick:d,children:C(Lse,{})}),Q(ms,{anchorEl:o,open:u,onClose:p,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:f,children:r("edit")}),C(Yt,{onClick:m,children:r("delete")})]}),C(ta,{title:r("edit"),isOpen:a,closeFn:w,children:C(_le,{category:e.category,closeFn:w})}),C(eV,{title:r("deleteConfirmation",{name:e.category.name}),message:r("measurements.deleteInfo"),isOpen:l,closeFn:S,deleteFn:g})]})},p$t=()=>{const e=fm(),t=parseInt(e.categoryId),n=Mle(t);return n.isLoading?C(Po,{}):C(pm,{title:n.data.name,optionsMenu:C(f$t,{category:n.data}),mainContent:Q(Gt,{spacing:2,children:[C(Rle,{category:n.data}),C(d$t,{category:n.data})]}),fab:C(s1t,{})})},h$t=e=>{const[t,n]=Ue(),[r,o]=Y.useState(!1),i=()=>o(!0),a=()=>o(!1);return Q(Mt,{children:[Q(Do,{children:[C(od,{title:e.category.name,subheader:e.category.unit}),C(xa,{children:C(Rle,{category:e.category})}),Q(hs,{disableSpacing:!0,sx:{justifyContent:"space-between"},children:[C(gt,{size:"small",children:C(Zl,{to:Tn(Sn.MEASUREMENT_DETAIL,n.language,{id:e.category.id}),children:t("seeDetails")})}),C(kn,{onClick:i,children:C(Ji,{})})]})]}),C(ta,{title:t("add"),isOpen:r,closeFn:a,children:C(Dle,{closeFn:a,categoryId:e.category.id})})]})},wK=()=>{const e=JSt(),[t]=Ue();return e.isLoading?C(Po,{}):C(pm,{title:t("measurements.measurements"),mainContent:Q(Gt,{spacing:2,children:[e.data.length===0&&C(zI,{}),e.data.map(n=>C(h$t,{category:n},n.id))]}),fab:C(a1t,{})})},rT=[{range:"obese",color:"#FF5733",min:30,max:100},{range:"overweight",color:"#FFC107",min:25,max:30},{range:"normal",color:"#90EE90",min:18.5,max:25},{range:"underweight",color:"#FFC300",min:0,max:18.5}],vP=e=>{const t=rT.find(n=>n.range===e);return t?t.color:"gray"},m$t=()=>{const[e]=Ue(),t=oM(),n=Jc(),[r,o]=y.useState(),[i,a]=y.useState();y.useEffect(()=>{var u;if(t.data&&t.data.length>0){const d=t.data[0],f=(u=n.data)!=null&&u.useMetric?d.weight:d.weight*.453592;a(f)}},[t.data,n.data]),y.useEffect(()=>{var u;(u=n.data)!=null&&u.height&&o(n.data.height)},[n.data]);const l=(()=>{if(r&&i){const u=r/100;return i/(u*u)}return null})();if(t.isLoading||n.isLoading)return C(Po,{});const c=[];for(let u=140;u<=220;u+=10){const d=u/100,f={height:u};let p=0;rT.forEach((m,g)=>{const v=m.max>100?100:m.max;let w=v*d*d-p;w=Math.min(w,150-p),g===0?f[m.range]=w:f[m.range]=f[rT[g-1].range]+w,p=Math.min(v*d*d,150)}),c.push(f)}return C(pm,{title:e("bmi.calculator"),mainContent:C(Mt,{children:Q(Gt,{spacing:2,children:[Q(Be,{container:!0,spacing:2,children:[C(Be,{size:{xs:12,sm:6},children:C(yn,{label:e("height"),fullWidth:!0,slotProps:{input:{endAdornment:C(ct,{children:e("cm")})}},type:"number",value:r??"",onChange:u=>o(parseFloat(u.target.value))})}),C(Be,{size:{xs:12,sm:6},children:C(yn,{label:e("weight"),slotProps:{input:{endAdornment:C(ct,{children:e("server.kg")})}},fullWidth:!0,type:"number",value:i??"",onChange:u=>a(parseFloat(u.target.value))})})]}),l!==null&&C(ct,{variant:"h6",children:e("bmi.result",{value:l.toFixed(1)})}),C(Xf,{width:"100%",height:400,children:Q(bot,{data:c,children:[C(ml,{dataKey:"height",type:"number",domain:[140,220],unit:"cm"}),C(gl,{domain:[40,150],tickFormatter:u=>Math.round(u).toString(),unit:"kg"}),C(Zh,{strokeDasharray:"3 3"}),C(Ua,{formatter:(u,d)=>[Math.round(u),e("bmi."+d)]}),rT.map(u=>C(ep,{type:"monotone",dataKey:u.range,stroke:"black",fill:u.color,fillOpacity:.8},u.range)),l!==null&&C(GS,{x:r,y:i,r:8,fill:"black",stroke:"none"})]})}),Q(Gt,{direction:"row",justifyContent:"center",children:[C(Rn,{height:20,width:20,sx:{backgroundColor:vP("obese")}}),e("bmi.obese"),C(Rn,{height:20,width:20,sx:{backgroundColor:vP("overweight"),marginLeft:2}}),e("bmi.overweight"),C(Rn,{height:20,width:20,sx:{backgroundColor:vP("normal"),marginLeft:2}}),e("bmi.normal"),C(Rn,{height:20,width:20,sx:{backgroundColor:vP("underweight"),marginLeft:2}}),e("bmi.underweight")]})]})})})},g$t=e=>{var r,o,i,a;const[t,n]=Ue();return Q(Qt,{children:[C(ke,{sx:{paddingX:1},children:C(ic,{alt:(r=e.item.ingredient)==null?void 0:r.name,src:(i=(o=e.item.ingredient)==null?void 0:o.image)==null?void 0:i.url,sx:{width:45,height:45},children:C(id,{})})}),Q(ke,{sx:{paddingX:1},children:[e.item.amountString," ",(a=e.item.ingredient)==null?void 0:a.name]}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.item.nutritionalValues.energy,n.language),kj:bi(e.item.nutritionalValues.energyKj,n.language)})}),C(ke,{align:"right",sx:{paddingX:1},children:xn(e.item.nutritionalValues.protein,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:xn(e.item.nutritionalValues.carbohydrates,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:xn(e.item.nutritionalValues.fat,n.language)})]},e.item.id)},cL=e=>{const[t,n]=Ue();return C(Ju,{children:Q(Xu,{children:[C(Yh,{children:Q(Qt,{children:[C(ke,{}),C(ke,{}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.energy")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.protein")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.carbohydrates")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.fat")})]})}),Q(Qu,{children:[e.items.map(r=>C(g$t,{item:r},r.id)),e.showSum&&Q(Qt,{children:[C(ke,{sx:{paddingX:1},children:" "}),C(ke,{sx:{paddingX:1},children:t("total")}),C(ke,{align:"right",sx:{paddingX:1},children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.values.energy,n.language),kj:bi(e.values.energyKj,n.language)})}),C(ke,{align:"right",sx:{paddingX:1},children:xn(e.values.protein,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:xn(e.values.carbohydrates,n.language)}),C(ke,{align:"right",sx:{paddingX:1},children:xn(e.values.fat,n.language)})]})]})]})})},y$t=e=>{const[t,n]=Ue();return C(Ju,{children:Q(Xu,{size:"small",children:[C(Yh,{children:Q(Qt,{children:[C(ke,{children:t("nutrition.macronutrient")}),C(ke,{align:"right",children:t("nutrition.planned")}),C(ke,{align:"right",children:t("nutrition.logged")}),C(ke,{align:"right",children:t("nutrition.difference")})]})}),Q(Qu,{children:[Q(Qt,{children:[C(ke,{children:t("nutrition.energy")}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.planned.energy,n.language),kj:bi(e.planned.energyKj,n.language)})}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.logged.energy,n.language),kj:bi(e.logged.energyKj,n.language)})}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.logged.energy-e.planned.energy,n.language),kj:bi(e.logged.energyKj-e.planned.energyKj,n.language)})})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.protein")}),C(ke,{align:"right",children:xn(e.planned.protein,n.language)}),C(ke,{align:"right",children:xn(e.logged.protein,n.language)}),C(ke,{align:"right",children:xn(e.logged.protein-e.planned.protein,n.language)})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.carbohydrates")}),C(ke,{align:"right",children:xn(e.planned.carbohydrates,n.language)}),C(ke,{align:"right",children:xn(e.logged.carbohydrates,n.language)}),C(ke,{align:"right",children:xn(e.logged.carbohydrates-e.planned.carbohydrates,n.language)})]}),Q(Qt,{children:[C(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(ke,{align:"right",children:xn(e.planned.carbohydratesSugar,n.language)}),C(ke,{align:"right",children:xn(e.logged.carbohydratesSugar,n.language)}),C(ke,{align:"right",children:xn(e.logged.carbohydratesSugar-e.planned.carbohydratesSugar,n.language)})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.fat")}),C(ke,{align:"right",children:xn(e.planned.fat,n.language)}),C(ke,{align:"right",children:xn(e.logged.fat,n.language)}),C(ke,{align:"right",children:xn(e.logged.fat-e.planned.fat,n.language)})]}),Q(Qt,{children:[C(ke,{sx:{paddingLeft:5},children:t("nutrition.ofWhichSaturated")}),C(ke,{align:"right",children:xn(e.planned.fatSaturated,n.language)}),C(ke,{align:"right",children:xn(e.logged.fatSaturated,n.language)}),C(ke,{align:"right",children:xn(e.logged.fatSaturated-e.planned.fatSaturated,n.language)})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.others")}),C(ke,{}),C(ke,{}),C(ke,{})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.fibres")}),C(ke,{align:"right",children:xn(e.planned.fiber,n.language)}),C(ke,{align:"right",children:xn(e.logged.fiber,n.language)}),C(ke,{align:"right",children:xn(e.logged.fiber-e.planned.fiber,n.language)})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.sodium")}),C(ke,{align:"right",children:xn(e.planned.sodium,n.language)}),C(ke,{align:"right",children:xn(e.logged.sodium,n.language)}),C(ke,{align:"right",children:xn(e.logged.sodium-e.planned.sodium,n.language)})]})]})]})})},xK=()=>{const[e]=Ue(),t=fm(),n=parseInt(t.planId),r=new Date(t.date),o=Z_e(n,t.date);return o.isLoading?C(Po,{}):C(pm,{title:e("nutrition.nutritionalDiary"),mainContent:C(Mt,{children:Q(Gt,{spacing:2,children:[C(ct,{gutterBottom:!0,variant:"h4",children:r.toLocaleDateString()}),C(y$t,{logged:o.data.loggedNutritionalValuesDate(r),planned:o.data.plannedNutritionalValues}),C(cL,{values:o.data.loggedNutritionalValuesDate(r),items:o.data.loggedEntriesDate(r),showSum:!0})]})})})};function*CM(e){let t;e<=3?t=M_e:e<=5?t=k_e:t=I_e;for(const n of t)yield n}const v$t=e=>{const[t,n]=Ue(),r=CM(3),o=[{name:t("nutrition.carbohydrates"),value:e.data.carbohydrates},{name:t("nutrition.protein"),value:e.data.protein},{name:t("nutrition.fat"),value:e.data.fat}],i=Math.PI/180;return C(Xf,{width:"100%",height:300,children:Q(Foe,{children:[C(Xc,{data:o,labelLine:!1,label:({cx:s,cy:l,midAngle:c,innerRadius:u,outerRadius:d,payload:f})=>{const p=u+(d-u)*.4,m=s+p*Math.cos(-c*i),g=l+p*Math.sin(-c*i);return C("text",{x:m,y:g,fill:"white",textAnchor:"middle",dominantBaseline:"central",children:xn(f.value,n.language)})},fill:"#8884d8",dataKey:"value",children:o.map((s,l)=>C(nb,{fill:r.next().value},`cell-${l}`))}),C($u,{})]})})},b$t=({showPlanned:e,planned:t,today:n,avg7Days:r})=>{const[o,i]=Ue(),a=CM(3),s=[{name:o("nutrition.protein"),planned:t.protein,today:n.protein,avg7Days:r.protein},{name:o("nutrition.carbohydrates"),planned:t.carbohydrates,today:n.carbohydrates,avg7Days:r.carbohydrates},{name:o("nutrition.sugar"),planned:t.carbohydratesSugar,today:n.carbohydratesSugar,avg7Days:r.carbohydratesSugar},{name:o("nutrition.fat"),planned:t.fat,today:n.fat,avg7Days:r.fat},{name:o("nutrition.saturatedFat"),planned:t.fatSaturated,today:n.fatSaturated,avg7Days:r.fatSaturated}];return C(Xf,{width:"100%",height:300,children:Q(Loe,{data:s,margin:{top:20,right:30,left:20,bottom:5},children:[C(Zh,{strokeDasharray:"3 4"}),C(ml,{dataKey:"name"}),C(gl,{type:"number",orientation:"left",unit:o("nutrition.gramShort")}),C(Ua,{formatter:l=>bi(l,i.language)}),C($u,{}),e&&C(Nc,{dataKey:"planned",unit:o("nutrition.gramShort"),name:o("nutrition.planned"),fill:a.next().value}),C(Nc,{dataKey:"today",unit:o("nutrition.gramShort"),name:o("nutrition.today"),fill:a.next().value}),C(Nc,{dataKey:"avg7Days",unit:o("nutrition.gramShort"),name:o("nutrition.7dayAvg"),fill:a.next().value})]})})},w$t=e=>{const[t,n]=Ue();return C(Ju,{children:Q(Xu,{size:"small",children:[C(Yh,{children:Q(Qt,{children:[C(ke,{children:t("date")}),C(ke,{align:"right",children:t("nutrition.logged")}),C(ke,{align:"right",children:t("nutrition.difference")})]})}),C(Qu,{children:Array.from(e.logged).map(([r])=>{var o,i;return Q(Qt,{children:[C(ke,{children:C(Zl,{to:Tn(Sn.NUTRITION_DIARY,n.language,{id:e.planId,date:r}),children:new Date(r).toLocaleDateString(n.language)})}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcal",{value:bi((o=e.logged.get(r))==null?void 0:o.nutritionalValues.energy,n.language)})}),C(ke,{align:"right",children:bi(((i=e.logged.get(r))==null?void 0:i.nutritionalValues.energy)-e.planned.energy,n.language)})]},r)})})]})})},x$t=()=>{const[e]=Ue(),[t,n]=Y.useState(!1),r=()=>n(!0),o=()=>n(!1);return Q("div",{children:[C(Gh,{color:"secondary","aria-label":"add",onClick:r,sx:{position:"fixed",bottom:"5rem",right:i=>i.spacing(2),zIndex:9},children:C(Ji,{})}),C(ta,{title:e("add"),isOpen:t,closeFn:o,children:C(pz,{closeFn:o})})]})},S$t=e=>{const[t]=Ue(),[n,r]=Y.useState(!1),o=()=>r(!0),i=()=>r(!1);return Q("div",{children:[C(Gh,{color:"secondary","aria-label":"add",onClick:o,sx:{position:"fixed",bottom:"5rem",right:a=>a.spacing(2),zIndex:9},children:C(AS,{})}),C(ta,{title:t("nutrition.addNutritionalDiary"),isOpen:n,closeFn:i,children:C(fz,{closeFn:i,planId:e.plan.id,meals:e.plan.meals})})]})},rue=({meal:e,planId:t,closeFn:n})=>{const[r,o]=Ue(),i=iDe(t),a=sDe(t),s=bl({name:Wc().required().max(25,r("forms.maxLength",{chars:"25"})).min(3,r("forms.minLength",{chars:"3"})),time:a1().required()});return C(yl,{initialValues:{name:e?e.name:"",time:e?e.time:new Date},validationSchema:s,onSubmit:async l=>{l.time instanceof Date||(l.time=l.time.toJSDate());const c={...l,time:Q2e(l.time)};e?a.mutate({...c,plan:t,id:e.id}):i.mutate({...c,plan:t}),n&&n()},children:l=>C(gs,{children:Q(Gt,{spacing:2,children:[C(yn,{fullWidth:!0,id:"name",label:r("description"),error:l.touched.name&&!!l.errors.name,helperText:l.touched.name&&l.errors.name,...l.getFieldProps("name")}),C(YS,{dateAdapter:Kk,adapterLocale:o.language,children:C(put,{label:r("timeOfDay"),value:l.values.time!==null?It.fromJSDate(l.values.time):null,onChange:c=>l.setFieldValue("time",c)})}),Q(Gt,{direction:"row",justifyContent:"end",spacing:2,children:[n!==void 0&&C(gt,{color:"primary",variant:"outlined",onClick:()=>n(),children:r("close")}),C(gt,{disabled:i.isPending||a.isPending,color:"primary",variant:"contained",type:"submit",children:r("submit")})]})]})})})},C$t=e=>{const[t]=Ue(),n=CM(3),r=[{name:t("nutrition.energy"),value:e.logged.energy/e.planned.energy*100},{name:t("nutrition.protein"),value:e.logged.protein/e.planned.protein*100},{name:t("nutrition.carbohydrates"),value:e.logged.carbohydrates/e.planned.carbohydrates*100},{name:t("nutrition.fat"),value:e.logged.fat/e.planned.fat*100}];return C(Xf,{width:"100%",height:150,children:Q(Loe,{data:r,layout:"vertical",margin:{left:60},children:[C(Zh,{strokeDasharray:"3 4"}),C(ml,{type:"number",unit:"%"}),C(gl,{type:"category",dataKey:"name"}),C(Nc,{dataKey:"value",unit:"%",fill:n.next().value})]})})},oue=({planId:e,item:t,mealId:n,closeFn:r})=>{const[o]=Ue(),i=dDe(e),a=fDe(e),s=pDe(e),l=()=>{t&&s.mutate(t.id),r&&r()},c=bl({amount:pa().required(o("forms.fieldRequired")).max(1e3,o("forms.maxValue",{value:"1000"})).min(1,o("forms.minValue",{value:"1"})),ingredient:pa().required(o("forms.fieldRequired"))});return C(yl,{initialValues:{amount:t?t.amount:0,ingredient:t?t.ingredientId:0},validationSchema:c,onSubmit:async u=>{const d={...u,meal:n,weight_unit:null};t?a.mutate({...d,id:t.id}):i.mutate(d),r&&r()},children:u=>{var d;return C(gs,{children:Q(Gt,{spacing:2,children:[C(QB,{callback:f=>u.setFieldValue("ingredient",f?f.data.id:null),initialIngredient:t?(d=t.ingredient)==null?void 0:d.name:null}),C(yn,{fullWidth:!0,id:"amount",label:"amount",InputProps:{endAdornment:C(po,{position:"end",children:o("nutrition.gramShort")})},error:u.touched.amount&&!!u.errors.amount,helperText:u.touched.amount&&u.errors.amount,...u.getFieldProps("amount")}),Q(Gt,{direction:"row",justifyContent:"end",spacing:2,children:[r!==void 0&&t!==void 0&&C(gt,{color:"error",variant:"outlined",onClick:l,children:o("delete")}),r!==void 0&&C(gt,{color:"primary",variant:"outlined",onClick:()=>r(),children:o("close")}),C(gt,{color:"primary",variant:"contained",type:"submit",children:o("submit")})]})]})})}})},P$t=e=>{const t=Tee(e.planId),n=aDe(e.planId),[r]=Ue(),[o,i]=Y.useState(!1),[a,s]=y.useState(null),[l,c]=y.useState(!1),[u,d]=y.useState(!1),f=!!a,p=k=>{s(k.currentTarget)},m=()=>{g(),x()},g=()=>{s(null)},v=()=>{P(),s(null)},w=()=>{n.mutate(e.meal.id)},x=()=>c(!0),S=()=>c(!1),P=()=>d(!0),T=()=>d(!1),E=(k,A)=>{A!=="clickaway"&&i(!1)},O=()=>{const k=e.meal.items.map(A=>({plan:e.planId,meal:e.meal.id,mealItem:A.id,ingredient:A.ingredientId,weight_unit:A.weightUnitId,datetime:new Date().toISOString(),amount:A.amount}));t.mutate(k),i(!0)};return Q(Mt,{children:[!e.onlyLogging&&C(ac,{title:r("nutrition.logThisMeal"),children:C(kn,{"aria-label":"settings",onClick:O,children:C(AS,{})})}),C(kn,{"aria-label":"settings",onClick:p,children:C(l1,{})}),C(kn,{"aria-label":"settings",onClick:e.handleExpanded,children:e.isExpanded?C(Dse,{}):C(Nse,{})}),Q(ms,{anchorEl:a,open:f,onClose:g,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:m,children:r("edit")}),C(Yt,{onClick:v,children:r("delete")})]}),C(ta,{title:r("edit"),isOpen:l,closeFn:S,children:C(rue,{meal:e.meal,closeFn:S,planId:e.planId})}),C(eV,{title:r("deleteConfirmation",{name:e.meal.name}),message:r("nutrition.mealDeleteInfo"),isOpen:u,closeFn:T,deleteFn:w}),C(_Z,{open:o,autoHideDuration:bee,onClose:E,children:C(qu,{onClose:E,severity:"success",sx:{width:"100%"},children:r("nutrition.diaryEntrySaved")})})]})},T$t=e=>{var o,i,a,s;const[t,n]=y.useState(!1),r=()=>n(!t);return Q(Mt,{children:[Q(ls,{children:[C(XF,{onClick:r,sx:{"&:hover":{cursor:"pointer"}},children:C(ic,{alt:(o=e.mealItem.ingredient)==null?void 0:o.name,src:(a=(i=e.mealItem.ingredient)==null?void 0:i.image)==null?void 0:a.url,sx:{width:45,height:45},children:C(id,{})})}),C(wo,{primary:`${e.mealItem.amountString} ${(s=e.mealItem.ingredient)==null?void 0:s.name}`})]}),C(Zs,{in:t,timeout:"auto",unmountOnExit:!0,sx:{width:"100%"},children:C(ls,{children:C(wo,{children:C(oue,{planId:e.planId,mealId:e.mealId,item:e.mealItem,closeFn:r})})})})]})},SK=e=>{const t=Ei(),n=e.meal.id!==UP,[r]=Ue(),[o,i]=y.useState(!1),a=()=>i(!o),[s,l]=y.useState(!1),c=()=>{l(!s),d(!1)},[u,d]=y.useState(!1),f=()=>{d(!u),l(!1)};return Q(Do,{children:[C(od,{sx:{bgcolor:t.palette.grey[300]},action:e.meal.id!==UP&&C(P$t,{meal:e.meal,planId:e.planId,onlyLogging:e.onlyLogging,isExpanded:o,handleExpanded:a}),title:e.meal.name,subheader:e.meal.timeHHMMLocale}),Q(xa,{sx:{paddingY:0},children:[Q(Zs,{in:o,timeout:"auto",unmountOnExit:!0,children:[!e.onlyLogging&&C(cL,{showSum:n,items:e.meal.items,values:e.meal.plannedNutritionalValues}),C(ct,{gutterBottom:!0,variant:"h6",sx:{my:2},children:r("nutrition.loggedToday")}),!e.meal.plannedNutritionalValues.isEmpty&&C(C$t,{logged:e.meal.loggedNutritionalValuesToday,planned:e.meal.plannedNutritionalValues}),C(cL,{showSum:n,items:e.meal.diaryEntriesToday,values:e.meal.loggedNutritionalValuesToday})]}),!o&&C(pl,{children:e.meal.items.map(p=>C(T$t,{mealItem:p,planId:e.planId,mealId:e.meal.id},p.id))})]}),Q(hs,{children:[!e.onlyLogging&&C(ac,{title:r("nutrition.addMealItem"),children:C(kn,{onClick:c,children:C(Ji,{})})}),C(ac,{title:r("nutrition.addNutritionalDiary"),children:C(kn,{onClick:f,children:C(AS,{})})})]}),C(Zs,{in:s,timeout:"auto",unmountOnExit:!0,children:Q(xa,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addMealItem")})}),C(oue,{planId:e.planId,mealId:e.meal.id,closeFn:c})]})}),C(Zs,{in:u,timeout:"auto",unmountOnExit:!0,children:Q(xa,{sx:{paddingY:0},children:[C("p",{children:C("b",{children:r("nutrition.addNutritionalDiary")})}),C(fz,{closeFn:f,planId:e.planId,mealId:e.meal.id!==UP?e.meal.id:null})]})})]})},CK=e=>{const[t,n]=Ue();return C(Ju,{children:Q(Xu,{size:"small",children:[C(Yh,{children:Q(Qt,{children:[C(ke,{children:t("nutrition.macronutrient")}),C(ke,{align:"right",children:t("total")}),C(ke,{align:"right",children:t("nutrition.percentEnergy")})]})}),Q(Qu,{children:[Q(Qt,{children:[C(ke,{children:t("nutrition.energy")}),C(ke,{align:"right",children:t("nutrition.valueEnergyKcalKj",{kcal:bi(e.values.energy,n.language),kj:bi(e.values.energyKj,n.language)})}),C(ke,{align:"right"})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.protein")}),C(ke,{align:"right",children:xn(e.values.protein,n.language)}),C(ke,{align:"right",children:$$(e.values.percent.protein,n.language)})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.carbohydrates")}),C(ke,{align:"right",children:xn(e.values.carbohydrates,n.language)}),C(ke,{align:"right",children:$$(e.values.percent.carbohydrates,n.language)})]}),Q(Qt,{children:[C(ke,{sx:{pl:5},children:t("nutrition.ofWhichSugars")}),C(ke,{align:"right",children:xn(e.values.carbohydratesSugar,n.language)}),C(ke,{align:"right"})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.fat")}),C(ke,{align:"right",children:xn(e.values.fat,n.language)}),C(ke,{align:"right",children:$$(e.values.percent.fat,n.language)})]}),Q(Qt,{children:[C(ke,{sx:{pl:5},children:t("nutrition.ofWhichSaturated")}),C(ke,{align:"right",children:xn(e.values.fatSaturated,n.language)}),C(ke,{align:"right"})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.others")}),C(ke,{children:" "}),C(ke,{align:"right"})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.fibres")}),C(ke,{align:"right",children:xn(e.values.fiber,n.language)}),C(ke,{align:"right"})]}),Q(Qt,{children:[C(ke,{children:t("nutrition.sodium")}),C(ke,{align:"right",children:xn(e.values.sodium,n.language)}),C(ke,{align:"right"})]})]})]})})},E$t=e=>{const t=tDe(e.plan.id),n=dm(),[r,o]=Ue(),[i,a]=Y.useState(null),[s,l]=Y.useState(!1),[c,u]=Y.useState(!1),d=!!i,f=O=>{a(O.currentTarget)},p=()=>{m(),S()},m=()=>{a(null)},g=()=>{T(),a(null)},v=()=>{t.mutate(e.plan.id),n(Tn(Sn.NUTRITION_OVERVIEW))},w=()=>window.location.href=Tn(Sn.NUTRITION_PLAN_PDF,o.language,{id:e.plan.id}),x=()=>window.location.href=Tn(Sn.NUTRITION_PLAN_COPY,o.language,{id:e.plan.id}),S=()=>l(!0),P=()=>l(!1),T=()=>u(!0),E=()=>u(!1);return Q(Mt,{children:[C(gt,{onClick:f,children:C(Lse,{})}),Q(ms,{anchorEl:i,open:d,onClose:m,MenuListProps:{"aria-labelledby":"basic-button"},children:[C(Yt,{onClick:p,children:r("edit")}),C(Yt,{onClick:w,children:r("downloadAsPdf")}),C(Yt,{onClick:x,children:r("nutrition.copyPlan")}),C(Yt,{onClick:g,children:r("delete")})]}),C(ta,{title:r("edit"),isOpen:s,closeFn:P,children:C(pz,{plan:e.plan,closeFn:P})}),C(eV,{title:r("deleteConfirmation",{name:e.plan.description}),message:r("nutrition.planDeleteInfo"),isOpen:c,closeFn:E,deleteFn:v})]})},O$t=e=>{const[t]=Ue(),n=e.plan.plannedNutritionalValues,r=e.plan.loggedNutritionalValuesToday,o=e.plan.percentageValuesLoggedToday;return C(Mt,{children:Q(Gt,{direction:"column",spacing:1,children:[C(ct,{gutterBottom:!0,variant:"h6",children:t("nutrition.goalsTitle")}),C(ry,{title:t("nutrition.protein"),percentage:o.protein,logged:r.protein,planned:n.protein}),C(ry,{title:t("nutrition.carbohydrates"),percentage:o.carbohydrates,logged:r.carbohydrates,planned:n.carbohydrates}),C(ry,{title:t("nutrition.fat"),percentage:o.fat,logged:r.fat,planned:n.fat})]})})},I$t=()=>{const[e]=Ue(),t=fm(),n=parseInt(t.planId),r=J_e(n),[o,i]=y.useState(!1),a=()=>i(!o),s=r.data;return r.isLoading?C(Po,{}):C(pm,{title:s.description,optionsMenu:C(E$t,{plan:s}),mainContent:C(Mt,{children:Q(Gt,{spacing:2,children:[s.meals.map(l=>C(SK,{meal:l,planId:s.id,onlyLogging:s.onlyLogging},l.id)),C(SK,{meal:r.data.pseudoMealOthers(e("nutrition.pseudoMealTitle")),planId:s.id,onlyLogging:!0},-1),!s.onlyLogging&&Q(Mt,{children:[C(ac,{title:e("nutrition.addMeal"),children:C(kn,{onClick:a,children:C(Ji,{})})}),Q(Zs,{in:o,timeout:"auto",unmountOnExit:!0,children:[C("p",{children:C("b",{children:e("nutrition.addMeal")})}),C(rue,{planId:s.id,closeFn:a})]})]}),C(CK,{values:s.plannedNutritionalValues}),s.hasAnyPlanned&&C(v$t,{data:s.plannedNutritionalValues}),C(ct,{gutterBottom:!0,variant:"h4",children:e("nutrition.logged")}),C(b$t,{showPlanned:s.hasAnyPlanned,planned:s.plannedNutritionalValues,today:s.loggedNutritionalValuesToday,avg7Days:s.loggedNutritionalValues7DayAvg}),C(CK,{values:s.loggedNutritionalValuesToday}),C(w$t,{planId:s.id,logged:s.groupDiaryEntries,planned:s.plannedNutritionalValues})]})}),sideBar:C(O$t,{plan:s}),fab:C(S$t,{plan:s})})},k$t=()=>{var n;const e=X_e(),[t]=Ue();return e.isLoading?C(Po,{}):C(pm,{title:t("nutrition.plans"),mainContent:Q(Gt,{spacing:2,children:[((n=e.data)==null?void 0:n.length)===0&&C(zI,{}),C(A$t,{plans:e.data})]}),fab:C(x$t,{})})},M$t=e=>{const[t,n]=Ue(),r=Tn(Sn.NUTRITION_DETAIL,n.language,{id:e.plan.id});return Q(Mt,{children:[C(ls,{sx:{p:0},children:Q(Wf,{component:"a",href:r,children:[C(wo,{primary:e.plan.description!==""?e.plan.description:t("routines.routine"),secondary:e.plan.creationDate.toLocaleDateString()}),C(Rse,{})]})}),C(ss,{component:"li"})]})},A$t=e=>C(uo,{children:C(pl,{sx:{py:0},children:e.plans.map(t=>C(M$t,{plan:t},t.id))},"abc")}),$$t=e=>{var u;const[t,n]=Ue(),[r,o]=Y.useState(null),i=!!r,a=d=>{o(d.currentTarget)},s=()=>{o(null)},l=()=>window.location.href=Tn(Sn.ROUTINE_EDIT_LOG,n.language,{id:e.log.id}),c=()=>window.location.href=Tn(Sn.ROUTINE_DELETE_LOG,n.language,{id:e.log.id});return Q(Qt,{children:[C(ke,{component:"th",scope:"row",children:It.fromJSDate(e.log.date).toLocaleString(It.DATE_MED)}),C(ke,{children:e.log.reps}),Q(ke,{children:[e.log.weight,(u=e.log.weightUnitObj)==null?void 0:u.name]}),C(ke,{children:e.log.rirString}),Q(ke,{children:[C(kn,{"aria-label":"settings",onClick:a,children:C(l1,{fontSize:"small"})}),Q(ms,{id:"basic-menu",anchorEl:r,open:i,onClose:s,MenuListProps:{"aria-labelledby":"basic-button"},children:[Q(Yt,{onClick:l,children:[C(_se,{}),t("edit")]}),Q(Yt,{onClick:c,children:[C(hz,{}),t("delete")]})]})]})]},e.log.id)},R$t=e=>{let t=e.logEntries??[];const n=[5,10,20],[r,o]=Y.useState(n[0]),[i,a]=Y.useState(0),s=(c,u)=>{a(u)},l=c=>{o(parseInt(c.target.value,10)),a(0)};return Q(Mt,{children:[C(ct,{variant:"h6",sx:{mt:4},children:e.exerciseId.getTranslation().name}),Q(Be,{container:!0,spacing:2,children:[C(Be,{size:{xs:12,md:5},children:Q(Ju,{children:[Q(Xu,{"aria-label":"simple table",size:"small",children:[C(Yh,{children:Q(Qt,{children:[C(ke,{children:"Date"}),C(ke,{children:"Reps"}),C(ke,{children:"Weight"}),C(ke,{children:"RiR"}),C(ke,{})]})}),C(Qu,{children:t.slice(i*r,i*r+r).map(c=>C($$t,{log:c},c.id))})]}),C(ZF,{rowsPerPageOptions:n,component:"div",count:t.length,rowsPerPage:r,page:i,onPageChange:s,onRowsPerPageChange:l})]})}),C(Be,{size:{xs:12,md:7},children:C(N$t,{data:t},e.exerciseId.id)})]})]})},PK=()=>{const e=fm(),t=e.routineId?parseInt(e.routineId):0,[n,r]=Ue(),o=cvt(t,!1),i=Fse(t),a=l=>window.location.href=Tn(Sn.ROUTINE_ADD_LOG,r.language,{id:l});let s=new Map;return o.isSuccess&&(s=o.data.reduce(function(l,c){return l.set(c.exerciseId,l.get(c.exerciseId)||[]),[p_e,h_e].includes(c.weightUnit)&&c.repetitionUnit===yee&&l.get(c.exerciseId).push(c),l},new Map)),C(Mt,{children:Q(Yu,{maxWidth:"lg",children:[C(ct,{variant:"h4",children:n("routines.logsHeader")}),C(ct,{variant:"body1",children:n("routines.logsFilterNote")}),o.isSuccess&&i.isSuccess?C(Mt,{children:i.data.days.map(l=>Q("div",{children:[Q(Gt,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:"center",sx:{mt:4},children:[C(ct,{variant:"h4",children:l.description}),C(gt,{variant:"contained",onClick:()=>a(l.id),children:n("routines.addLogToDay")})]}),l.sets.map(c=>c.exercises.map(u=>C(R$t,{exerciseId:u,logEntries:s.get(u.id)},c.id+u.uuid)))]},l.id))}):C(Po,{})]})})},_$t=e=>e.map(t=>({id:t.id,value:t.weight,time:t.date.getTime(),entry:t})),D$t=({active:e,payload:t,label:n})=>{var r,o,i;if(e){let a="";return(r=t==null?void 0:t[1].payload)!=null&&r.entry.rir&&(a=`, ${(o=t==null?void 0:t[1].payload)==null?void 0:o.entry.rir} RiR`),C(Do,{children:Q(xa,{children:[C(ct,{variant:"body1",children:It.fromMillis(t==null?void 0:t[0].value).toLocaleString(It.DATE_MED)}),Q(ct,{variant:"body2",children:[(i=t==null?void 0:t[1].payload)==null?void 0:i.entry.reps," × ",t==null?void 0:t[1].value,t==null?void 0:t[1].unit,a]})]})})}return null},N$t=e=>{let t;t=e.data.reduce(function(r,o){return r.set(o.reps,r.get(o.reps)||[]),r.get(o.reps).push(o),r},new Map);const n=CM(t.size);return C(Rn,{children:C(Xf,{width:"100%",height:250,children:Q(vot,{children:[C(ml,{dataKey:"time",domain:["auto","auto"],name:"Time",tickFormatter:r=>It.fromMillis(r).toLocaleString(It.DATE_MED),type:"number"}),C(gl,{domain:["auto","auto"],dataKey:"value",name:"Value",unit:"kg"}),Array.from(t).map(([r,o])=>{const i=n.next().value,a=_$t(o);return C(qS,{data:a,fill:i,line:{stroke:i},lineType:"joint",lineJointType:"monotoneX",name:r.toString()},r)}),C(Ua,{content:C(D$t,{})}),C(Zh,{strokeDasharray:"3 3"}),C($u,{})]})})})},L$t=()=>C("div",{children:C(Gh,{color:"secondary","aria-label":"add",onClick:()=>window.location.href=Tn(Sn.ROUTINE_ADD),sx:{position:"fixed",bottom:"5rem",right:t=>t.spacing(2),zIndex:9},children:C(Ji,{})})}),F$t=e=>{const[t,n]=Ue(),r=Tn(Sn.ROUTINE_DETAIL,n.language,{id:e.routine.id});return Q(Mt,{children:[C(ls,{sx:{p:0},children:Q(Wf,{component:"a",href:r,children:[C(wo,{primary:e.routine.name!==""?e.routine.name:t("routines.routine"),secondary:e.routine.date.toLocaleDateString()}),C(Rse,{})]})}),C(ss,{component:"li"})]})},TK=()=>{const e=uvt(),[t]=Ue();return Q(Yu,{maxWidth:"lg",children:[Q(Be,{container:!0,children:[Q(Be,{size:{xs:12,sm:8},children:[C(ct,{gutterBottom:!0,variant:"h3",component:"div",children:t("routines.routines")}),e.isLoading?C(Po,{}):C(uo,{children:C(pl,{sx:{py:0},children:e.data.map(n=>C(F$t,{routine:n},n.id))},"abc")})]}),C(Be,{size:{xs:12,sm:4}})]}),C(L$t,{})]})},UR=()=>C(Xxt,{}),tV=()=>Q(tbt,{children:[Q(Nt,{path:"/:lang",children:[Q(Nt,{path:"workout",children:[C(Nt,{path:"overview",element:C(LSt,{})}),C(Nt,{path:"schedule",element:C(FSt,{})}),C(Nt,{path:"calendar",children:C(Nt,{path:"user",element:C(hSt,{})})}),C(Nt,{path:"gallery",element:C(ySt,{})}),Q(Nt,{path:"template",children:[C(Nt,{path:"overview",element:C(CSt,{})}),C(Nt,{path:"public",element:C(xSt,{})})]})]}),Q(Nt,{path:"routine",children:[C(Nt,{index:!0,element:C(TK,{})}),C(Nt,{path:"overview",element:C(TK,{})}),C(Nt,{path:":routineId",element:C(j7,{}),children:C(Nt,{path:"view",element:C(j7,{})})}),C(Nt,{path:"log",children:C(Nt,{path:":routineId",element:C(PK,{}),children:C(Nt,{path:"view",element:C(PK,{})})})})]}),Q(Nt,{path:"measurement",children:[C(Nt,{index:!0,element:C(wK,{})}),C(Nt,{path:"overview",element:C(wK,{})}),C(Nt,{path:"category/:categoryId",element:C(p$t,{})})]}),Q(Nt,{path:"exercise",children:[C(Nt,{index:!0,element:C(dq,{})}),C(Nt,{path:"overview",element:C(dq,{})}),C(Nt,{path:":baseID",element:C(UR,{}),children:C(Nt,{path:"view-base",element:C(UR,{}),children:C(Nt,{path:":slug",element:C(UR,{})})})}),C(Nt,{path:"contribute",element:C(fSt,{})})]}),Q(Nt,{path:"weight",children:[C(Nt,{path:"overview",element:C(Ele,{})}),C(Nt,{path:"add",element:C(pSt,{})})]}),Q(Nt,{path:"nutrition",children:[C(Nt,{path:"overview",element:C(k$t,{})}),Q(Nt,{path:":planId",children:[C(Nt,{path:"view",element:C(I$t,{})}),C(Nt,{path:":date",element:C(xK,{})}),C(Nt,{path:"diary",element:C(xK,{})})]}),Q(Nt,{path:"calculator",children:[C(Nt,{path:"bmi",element:C(m$t,{})}),C(Nt,{path:"calories",element:C(mSt,{})})]}),C(Nt,{path:"ingredient",children:C(Nt,{path:"overview",element:C(vSt,{})})})]}),Q(Nt,{path:"software",children:[C(Nt,{path:"about-us",element:C(Owt,{})}),C(Nt,{path:"api",element:C(SSt,{})}),C(Nt,{path:"equipment",element:C(gSt,{})})]}),C(Nt,{path:"login",element:C(bSt,{})}),C(Nt,{path:"user",children:C(Nt,{path:"preferences",element:C(wSt,{})})})]}),C(Nt,{path:"/",element:C(jSt,{})}),C(Nt,{path:"*",element:C("main",{style:{padding:"1rem"},children:C("p",{children:"404, Page NOT FOUND"})})})]}),j$t="_notification_bbb61_1",EK={notification:j$t},B$t=()=>{const[e,t]=$wt(),n=()=>{t(tq({notify:!1,message:"",severity:void 0,title:"",type:void 0}))},r=()=>{t(tq({notify:!1,message:"",severity:void 0,title:"",type:void 0,undo:!0}))};return e.notification.notify?e.notification.type==="delete"?Q(qu,{className:EK.notification,severity:e.notification.severity,action:C(gt,{color:"inherit",size:"small",onClick:r,children:"UNDO"}),variant:"filled",children:[C(BT,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):Q(qu,{className:EK.notification,severity:e.notification.severity,onClose:()=>n(),variant:"filled",children:[C(BT,{children:e.notification.title}),C("strong",{children:e.notification.message})]}):null};function z$t(){return Q(Be,{container:!0,children:[C(Be,{size:12,children:C(NSt,{})}),C(Be,{size:12,children:C(B$t,{})}),C(Be,{size:12,children:C(tV,{})})]})}const Kt=e=>typeof e=="string",$0=()=>{let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n},OK=e=>e==null?"":""+e,V$t=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},H$t=/###/g,IK=e=>e&&e.indexOf("###")>-1?e.replace(H$t,"."):e,kK=e=>!e||Kt(e),Rw=(e,t,n)=>{const r=Kt(t)?t.split("."):t;let o=0;for(;o{const{obj:r,k:o}=Rw(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let i=t[t.length-1],a=t.slice(0,t.length-1),s=Rw(e,a,Object);for(;s.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),s=Rw(e,a,Object),s&&s.obj&&typeof s.obj[`${s.k}.${i}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${i}`]=n},U$t=(e,t,n,r)=>{const{obj:o,k:i}=Rw(e,t,Object);o[i]=o[i]||[],o[i].push(n)},TO=(e,t)=>{const{obj:n,k:r}=Rw(e,t);if(n)return n[r]},W$t=(e,t,n)=>{const r=TO(e,n);return r!==void 0?r:TO(t,n)},iue=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?Kt(e[r])||e[r]instanceof String||Kt(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):iue(e[r],t[r],n):e[r]=t[r]);return e},cg=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var G$t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const q$t=e=>Kt(e)?e.replace(/[&<>"'\/]/g,t=>G$t[t]):e;class K$t{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Y$t=[" ",",","?","!",";"],X$t=new K$t(20),Q$t=(e,t,n)=>{t=t||"",n=n||"";const r=Y$t.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const o=X$t.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!o.test(e);if(!i){const a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i},uL=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let i=0;i-1&&le&&e.replace("_","-"),J$t={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class OO{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||J$t,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{let[s,l]=a;for(let c=0;c{let[s,l]=a;for(let c=0;c1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):Kt(r)&&i?s.push(...r.split(i)):s.push(r)));const l=TO(this.data,s);return!l&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),l||!a||!Kt(r)?l:uL(this.data&&this.data[t]&&this.data[t][n],r,i)}addResource(t,n,r,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),o=n,n=s[1]),this.addNamespaces(n),MK(this.data,s,o),i.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(Kt(r[i])||Array.isArray(r[i]))&&this.addResource(t,n,i,r[i],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),o=r,r=n,n=s[1]),this.addNamespaces(n);let l=TO(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?iue(l,r,i):l={...l,...r},MK(this.data,s,l),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var aue={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(i=>{this.processors[i]&&(t=this.processors[i].process(t,n,r,o))}),t}};const $K={};class IO extends PM{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),V$t(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=kc.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Q$t(t,r,o);if(a&&!s){const l=t.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:t,namespaces:Kt(i)?[i]:i};const c=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(c[0])>-1)&&(i=c.shift()),t=c.join(o)}return{key:t,namespaces:Kt(i)?[i]:i}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),l=s[s.length-1],c=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(u){const P=n.nsSeparator||this.options.nsSeparator;return o?{res:`${l}${P}${a}`,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${P}${a}`}return o?{res:a,usedKey:a,exactUsedKey:a,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:a}const d=this.resolve(t,n);let f=d&&d.res;const p=d&&d.usedKey||a,m=d&&d.exactUsedKey||a,g=Object.prototype.toString.apply(f),v=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!Kt(f)&&typeof f!="boolean"&&typeof f!="number";if(x&&f&&S&&v.indexOf(g)<0&&!(Kt(w)&&Array.isArray(f))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,f,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return o?(d.res=P,d.usedParams=this.getUsedParamsDetails(n),d):P}if(i){const P=Array.isArray(f),T=P?[]:{},E=P?m:p;for(const O in f)if(Object.prototype.hasOwnProperty.call(f,O)){const k=`${E}${i}${O}`;T[O]=this.translate(k,{...n,joinArrays:!1,ns:s}),T[O]===k&&(T[O]=f[O])}f=T}}else if(x&&Kt(w)&&Array.isArray(f))f=f.join(w),f&&(f=this.extendTranslation(f,t,n,r));else{let P=!1,T=!1;const E=n.count!==void 0&&!Kt(n.count),O=IO.hasDefaultValue(n),k=E?this.pluralResolver.getSuffix(c,n.count,n):"",A=n.ordinal&&E?this.pluralResolver.getSuffix(c,n.count,{ordinal:!1}):"",I=E&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),R=I&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${k}`]||n[`defaultValue${A}`]||n.defaultValue;!this.isValidLookup(f)&&O&&(P=!0,f=R),this.isValidLookup(f)||(T=!0,f=a);const L=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:f,j=O&&R!==f&&this.options.updateMissing;if(T||P||j){if(this.logger.log(j?"updateKey":"missingKey",c,l,a,j?R:f),i){const F=this.resolve(a,{...n,keySeparator:!1});F&&F.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let _=[];const D=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&D&&D[0])for(let F=0;F{const q=O&&U!==f?U:L;this.options.missingKeyHandler?this.options.missingKeyHandler(F,l,H,q,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(F,l,H,q,j,n),this.emit("missingKey",F,l,H,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?_.forEach(F=>{const H=this.pluralResolver.getSuffixes(F,n);I&&n[`defaultValue${this.options.pluralSeparator}zero`]&&H.indexOf(`${this.options.pluralSeparator}zero`)<0&&H.push(`${this.options.pluralSeparator}zero`),H.forEach(U=>{z([F],a+U,n[`defaultValue${U}`]||R)})}):z(_,a,R))}f=this.extendTranslation(f,t,n,d,r),T&&f===a&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${a}`),(T||P)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,P?f:void 0):f=this.options.parseMissingKeyHandler(f))}return o?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(t,n,r,o,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const c=Kt(t)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(c){const f=t.match(this.interpolator.nestingRegexp);u=f&&f.length}let d=r.replace&&!Kt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),t=this.interpolator.interpolate(t,d,r.lng||this.language||o.usedLng,r),c){const f=t.match(this.interpolator.nestingRegexp),p=f&&f.length;u1&&arguments[1]!==void 0?arguments[1]:{},r,o,i,a,s;return Kt(t)&&(t=[t]),t.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;o=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!Kt(n.count),p=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),m=n.context!==void 0&&(Kt(n.context)||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(v=>{this.isValidLookup(r)||(s=v,!$K[`${g[0]}-${v}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(s)&&($K[`${g[0]}-${v}`]=!0,this.logger.warn(`key "${o}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),g.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,u,w,v,n);else{let P;f&&(P=this.pluralResolver.getSuffix(w,n.count,n));const T=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(u+P),n.ordinal&&P.indexOf(E)===0&&x.push(u+P.replace(E,this.options.pluralSeparator)),p&&x.push(u+T)),m){const O=`${u}${this.options.contextSeparator}${n.context}`;x.push(O),f&&(x.push(O+P),n.ordinal&&P.indexOf(E)===0&&x.push(O+P.replace(E,this.options.pluralSeparator)),p&&x.push(O+T))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(i=S,r=this.getResource(w,v,S,n))}))})}),{res:r,usedKey:o,exactUsedKey:i,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!Kt(t.replace);let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const i of n)delete o[i]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}const WR=e=>e.charAt(0).toUpperCase()+e.slice(1);class RK{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=kc.create("languageUtils")}getScriptPartFromCode(t){if(t=EO(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=EO(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Kt(t)&&t.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let o=Intl.getCanonicalLocales(t)[0];if(o&&this.options.lowerCaseLng&&(o=o.toLowerCase()),o)return o}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=WR(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=WR(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=WR(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(i=>{if(i===o)return i;if(!(i.indexOf("-")<0&&o.indexOf("-")<0)&&(i.indexOf("-")>0&&o.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===o||i.indexOf(o)===0&&o.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Kt(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],i=a=>{a&&(this.isSupportedCode(a)?o.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return Kt(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(t))):Kt(t)&&i(this.formatLanguageCode(t)),r.forEach(a=>{o.indexOf(a)<0&&i(this.formatLanguageCode(a))}),o}}let Z$t=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],eRt={1:e=>+(e>1),2:e=>+(e!=1),3:e=>0,4:e=>e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,5:e=>e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5,6:e=>e==1?0:e>=2&&e<=4?1:2,7:e=>e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2,8:e=>e==1?0:e==2?1:e!=8&&e!=11?2:3,9:e=>+(e>=2),10:e=>e==1?0:e==2?1:e<7?2:e<11?3:4,11:e=>e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3,12:e=>+(e%10!=1||e%100==11),13:e=>+(e!==0),14:e=>e==1?0:e==2?1:e==3?2:3,15:e=>e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2,16:e=>e%10==1&&e%100!=11?0:e!==0?1:2,17:e=>e==1||e%10==1&&e%100!=11?0:1,18:e=>e==0?0:e==1?1:2,19:e=>e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3,20:e=>e==1?0:e==0||e%100>0&&e%100<20?1:2,21:e=>e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0,22:e=>e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3};const tRt=["v1","v2","v3"],nRt=["v4"],_K={zero:0,one:1,two:2,few:3,many:4,other:5},rRt=()=>{const e={};return Z$t.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:eRt[t.fc]}})}),e};class oRt{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=kc.create("pluralResolver"),(!this.options.compatibilityJSON||nRt.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=rRt(),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const r=EO(t==="dev"?"en":t),o=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:o});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];const a=new Intl.PluralRules(r,{type:o});return this.pluralRulesCache[i]=a,a}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,i)=>_K[o]-_K[i]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const i=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!tRt.includes(this.options.compatibilityJSON)}}const DK=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=W$t(e,t,n);return!i&&o&&Kt(n)&&(i=uL(e,n,r),i===void 0&&(i=uL(t,n,r))),i},GR=e=>e.replace(/\$/g,"$$$$");class iRt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=kc.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:i,prefixEscaped:a,suffix:s,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:g,nestingOptionsSeparator:v,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:q$t,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=i?cg(i):a||"{{",this.suffix=s?cg(s):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=f?cg(f):p||cg("$t("),this.nestingSuffix=m?cg(m):g||cg(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let i,a,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=p=>{if(p.indexOf(this.formatSeparator)<0){const w=DK(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...o,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),g=m.shift().trim(),v=m.join(this.formatSeparator).trim();return this.format(DK(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure),v,r,{...o,...n,interpolationkey:g})};this.resetRegExp();const u=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,d=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>GR(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?GR(this.escape(p)):GR(p)}].forEach(p=>{for(s=0;i=p.regex.exec(t);){const m=i[1].trim();if(a=c(m),a===void 0)if(typeof u=="function"){const v=u(t,i,o);a=Kt(v)?v:""}else if(o&&Object.prototype.hasOwnProperty.call(o,m))a="";else if(d){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!Kt(a)&&!this.useRawValueToEscape&&(a=OK(a));const g=p.safeValue(a);if(t=t.replace(i[0],g),d?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=i[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,i,a;const s=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const d=l.split(new RegExp(`${u}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const p=f.match(/'/g),m=f.match(/"/g);(p&&p.length%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;o=this.nestingRegexp.exec(t);){let l=[];a={...r},a=a.replace&&!Kt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const u=o[1].split(this.formatSeparator).map(d=>d.trim());o[1]=u.shift(),l=u,c=!0}if(i=n(s.call(this,o[1].trim(),a),a),i&&o[0]===t&&!Kt(i))return i;Kt(i)||(i=OK(i)),i||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),i=""),c&&(i=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:o[1].trim()}),i.trim())),t=t.replace(o[0],i),this.regexp.lastIndex=0}return t}}const aRt=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(a=>{if(a){const[s,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=s.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:t,formatOptions:n}},ug=e=>{const t={};return(n,r,o)=>{let i=o;o&&o.interpolationkey&&o.formatParams&&o.formatParams[o.interpolationkey]&&o[o.interpolationkey]&&(i={...i,[o.interpolationkey]:void 0});const a=r+JSON.stringify(i);let s=t[a];return s||(s=e(EO(r),o),t[a]=s),s(n)}};class sRt{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=kc.create("formatter"),this.options=t,this.formats={number:ug((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return i=>o.format(i)}),currency:ug((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>o.format(i)}),datetime:ug((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return i=>o.format(i)}),relativetime:ug((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return i=>o.format(i,r.range||"day")}),list:ug((n,r)=>{const o=new Intl.ListFormat(n,{...r});return i=>o.format(i)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=ug(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(s=>s.indexOf(")")>-1)){const s=i.findIndex(l=>l.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,s)].join(this.formatSeparator)}return i.reduce((s,l)=>{const{formatName:c,formatOptions:u}=aRt(l);if(this.formats[c]){let d=s;try{const f=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},p=f.locale||f.lng||o.locale||o.lng||r;d=this.formats[c](s,p,{...u,...o,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${c}`);return s},t)}}const lRt=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class cRt extends PM{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=kc.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const i={},a={},s={},l={};return t.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),i[f]===void 0&&(i[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(s[c]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(t,n,r){const o=t.split("|"),i=o[0],a=o[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(l=>{U$t(l.loaded,[i],a),lRt(l,t),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{s[c]||(s[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{s[c][d]===void 0&&(s[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:i,callback:a});return}this.readingCalls++;const s=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&o{this.read.call(this,t,n,r,o+1,i*2,a)},i);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(t,n);c&&typeof c.then=="function"?c.then(u=>s(null,u)).catch(s):s(null,c)}catch(c){s(c)}return}return l(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();Kt(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Kt(n)&&(n=[n]);const i=this.queueLoad(t,n,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${o} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${i} for language ${o}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,o,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(t,n,r,o,l):u=c(t,n,r,o),u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}else c(t,n,r,o,s,l)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}const NK=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Kt(e[1])&&(t.defaultValue=e[1]),Kt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),LK=e=>(Kt(e.ns)&&(e.ns=[e.ns]),Kt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Kt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),bP=()=>{},uRt=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class oS extends PM{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=LK(t),this.services={},this.logger=kc,this.modules={external:[]},uRt(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(Kt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=NK();this.options={...o,...this.options,...LK(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?kc.init(i(this.modules.logger),this.options):kc.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=sRt);const d=new RK(this.options);this.store=new AK(this.options.resources,this.options);const f=this.services;f.logger=kc,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new oRt(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(f.formatter=i(u),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new iRt(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new cRt(i(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(p){for(var m=arguments.length,g=new Array(m>1?m-1:0),v=1;v1?m-1:0),v=1;v{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=bP),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=function(){return t.store[u](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=function(){return t.store[u](...arguments),t}});const l=$0(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),r(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),l}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bP;const o=Kt(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(c=>{c!=="cimode"&&i.indexOf(c)<0&&i.push(c)})};o?a(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(s=>a(s)),this.services.backendConnector.load(i,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const o=$0();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=bP),this.services.backendConnector.reload(t,n,i=>{o.resolve(),r(i)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&aue.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=$0();this.emit("languageChanging",t);const i=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,c)=>{c?(i(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(l,function(){return r.t(...arguments)})},s=l=>{!t&&!l&&this.services.languageDetector&&(l=[]);const c=Kt(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,u=>{a(u,c)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),o}getFixedT(t,n,r){var o=this;const i=function(a,s){let l;if(typeof s!="object"){for(var c=arguments.length,u=new Array(c>2?c-2:0),d=2;d`${l.keyPrefix}${f}${m}`):p=l.keyPrefix?`${l.keyPrefix}${f}${a}`:a,o.t(p,l)};return Kt(t)?i.lng=t:i.lngs=t,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,l)=>{const c=this.services.backendConnector.state[`${s}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!o||a(i,t)))}loadNamespaces(t,n){const r=$0();return this.options.ns?(Kt(t)&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$0();Kt(t)&&(t=[t]);const o=this.options.preload||[],i=t.filter(a=>o.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=o.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new RK(NK());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new oS(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:bP;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},i=new oS(o);return(t.debug!==void 0||t.prefix!==void 0)&&(i.logger=i.logger.clone(t)),["store","services","language"].forEach(s=>{i[s]=this[s]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new AK(this.store.data,o),i.services.resourceStore=i.store),i.translator=new IO(i.services,o),i.translator.on("*",function(s){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const FK=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,hRt=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let i=`${e}=${o}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");i+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!FK.test(r.domain))throw new TypeError("option domain is invalid");i+=`; Domain=${r.domain}`}if(r.path){if(!FK.test(r.path))throw new TypeError("option path is invalid");i+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");i+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(i+="; HttpOnly"),r.secure&&(i+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:i+="; SameSite=Strict";break;case"lax":i+="; SameSite=Lax";break;case"strict":i+="; SameSite=Strict";break;case"none":i+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i},jK={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=hRt(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const a=o.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,l)===t&&(n=a[s].substring(l+1))}}return n}};let R0=null;const BK=()=>{if(R0!==null)return R0;try{R0=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{R0=!1}return R0};var yRt={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&BK())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&BK()&&window.localStorage.setItem(n,e)}};let _0=null;const zK=()=>{if(_0!==null)return _0;try{_0=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{_0=!1}return _0};var vRt={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&zK())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&zK()&&window.sessionStorage.setItem(n,e)}},bRt={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let i=0;i0?t:void 0}},wRt={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},xRt={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},SRt={name:"subdomain",lookup(e){var o,i;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((i=(o=window.location)==null?void 0:o.hostname)==null?void 0:i.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function CRt(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class sue{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=pRt(n,this.options||{},CRt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(mRt),this.addDetector(gRt),this.addDetector(yRt),this.addDetector(vRt),this.addDetector(bRt),this.addDetector(wRt),this.addDetector(xRt),this.addDetector(SRt)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}sue.type="languageDetector";function dL(e){"@babel/helpers - typeof";return dL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dL(e)}function lue(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":dL(XMLHttpRequest))==="object"}function PRt(e){return!!e&&typeof e.then=="function"}function TRt(e){return PRt(e)?e:Promise.resolve(e)}function ERt(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var fL={exports:{}},wP={exports:{}},VK;function ORt(){return VK||(VK=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Bi<"u"&&Bi,r=function(){function i(){this.fetch=!1,this.DOMException=n.DOMException}return i.prototype=n,new i}();(function(i){(function(a){var s=typeof i<"u"&&i||typeof self<"u"&&self||typeof s<"u"&&s,l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c(_){return _&&DataView.prototype.isPrototypeOf(_)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(_){return _&&u.indexOf(Object.prototype.toString.call(_))>-1};function f(_){if(typeof _!="string"&&(_=String(_)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(_)||_==="")throw new TypeError('Invalid character in header field name: "'+_+'"');return _.toLowerCase()}function p(_){return typeof _!="string"&&(_=String(_)),_}function m(_){var D={next:function(){var z=_.shift();return{done:z===void 0,value:z}}};return l.iterable&&(D[Symbol.iterator]=function(){return D}),D}function g(_){this.map={},_ instanceof g?_.forEach(function(D,z){this.append(z,D)},this):Array.isArray(_)?_.forEach(function(D){this.append(D[0],D[1])},this):_&&Object.getOwnPropertyNames(_).forEach(function(D){this.append(D,_[D])},this)}g.prototype.append=function(_,D){_=f(_),D=p(D);var z=this.map[_];this.map[_]=z?z+", "+D:D},g.prototype.delete=function(_){delete this.map[f(_)]},g.prototype.get=function(_){return _=f(_),this.has(_)?this.map[_]:null},g.prototype.has=function(_){return this.map.hasOwnProperty(f(_))},g.prototype.set=function(_,D){this.map[f(_)]=p(D)},g.prototype.forEach=function(_,D){for(var z in this.map)this.map.hasOwnProperty(z)&&_.call(D,this.map[z],z,this)},g.prototype.keys=function(){var _=[];return this.forEach(function(D,z){_.push(z)}),m(_)},g.prototype.values=function(){var _=[];return this.forEach(function(D){_.push(D)}),m(_)},g.prototype.entries=function(){var _=[];return this.forEach(function(D,z){_.push([z,D])}),m(_)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function v(_){if(_.bodyUsed)return Promise.reject(new TypeError("Already read"));_.bodyUsed=!0}function w(_){return new Promise(function(D,z){_.onload=function(){D(_.result)},_.onerror=function(){z(_.error)}})}function x(_){var D=new FileReader,z=w(D);return D.readAsArrayBuffer(_),z}function S(_){var D=new FileReader,z=w(D);return D.readAsText(_),z}function P(_){for(var D=new Uint8Array(_),z=new Array(D.length),F=0;F-1?D:_}function A(_,D){if(!(this instanceof A))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D=D||{};var z=D.body;if(_ instanceof A){if(_.bodyUsed)throw new TypeError("Already read");this.url=_.url,this.credentials=_.credentials,D.headers||(this.headers=new g(_.headers)),this.method=_.method,this.mode=_.mode,this.signal=_.signal,!z&&_._bodyInit!=null&&(z=_._bodyInit,_.bodyUsed=!0)}else this.url=String(_);if(this.credentials=D.credentials||this.credentials||"same-origin",(D.headers||!this.headers)&&(this.headers=new g(D.headers)),this.method=k(D.method||this.method||"GET"),this.mode=D.mode||this.mode||null,this.signal=D.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(z),(this.method==="GET"||this.method==="HEAD")&&(D.cache==="no-store"||D.cache==="no-cache")){var F=/([?&])_=[^&]*/;if(F.test(this.url))this.url=this.url.replace(F,"$1_="+new Date().getTime());else{var H=/\?/;this.url+=(H.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function I(_){var D=new FormData;return _.trim().split("&").forEach(function(z){if(z){var F=z.split("="),H=F.shift().replace(/\+/g," "),U=F.join("=").replace(/\+/g," ");D.append(decodeURIComponent(H),decodeURIComponent(U))}}),D}function R(_){var D=new g,z=_.replace(/\r?\n[\t ]+/g," ");return z.split("\r").map(function(F){return F.indexOf(` +`)===0?F.substr(1,F.length):F}).forEach(function(F){var H=F.split(":"),U=H.shift().trim();if(U){var q=H.join(":").trim();D.append(U,q)}}),D}E.call(A.prototype);function N(_,D){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');D||(D={}),this.type="default",this.status=D.status===void 0?200:D.status,this.ok=this.status>=200&&this.status<300,this.statusText=D.statusText===void 0?"":""+D.statusText,this.headers=new g(D.headers),this.url=D.url||"",this._initBody(_)}E.call(N.prototype),N.prototype.clone=function(){return new N(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},N.error=function(){var _=new N(null,{status:0,statusText:""});return _.type="error",_};var L=[301,302,303,307,308];N.redirect=function(_,D){if(L.indexOf(D)===-1)throw new RangeError("Invalid status code");return new N(null,{status:D,headers:{location:_}})},a.DOMException=s.DOMException;try{new a.DOMException}catch{a.DOMException=function(D,z){this.message=D,this.name=z;var F=Error(D);this.stack=F.stack},a.DOMException.prototype=Object.create(Error.prototype),a.DOMException.prototype.constructor=a.DOMException}function j(_,D){return new Promise(function(z,F){var H=new A(_,D);if(H.signal&&H.signal.aborted)return F(new a.DOMException("Aborted","AbortError"));var U=new XMLHttpRequest;function q(){U.abort()}U.onload=function(){var ae={status:U.status,statusText:U.statusText,headers:R(U.getAllResponseHeaders()||"")};ae.url="responseURL"in U?U.responseURL:ae.headers.get("X-Request-URL");var Z="response"in U?U.response:U.responseText;setTimeout(function(){z(new N(Z,ae))},0)},U.onerror=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.ontimeout=function(){setTimeout(function(){F(new TypeError("Network request failed"))},0)},U.onabort=function(){setTimeout(function(){F(new a.DOMException("Aborted","AbortError"))},0)};function X(ae){try{return ae===""&&s.location.href?s.location.href:ae}catch{return ae}}U.open(H.method,X(H.url),!0),H.credentials==="include"?U.withCredentials=!0:H.credentials==="omit"&&(U.withCredentials=!1),"responseType"in U&&(l.blob?U.responseType="blob":l.arrayBuffer&&H.headers.get("Content-Type")&&H.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(U.responseType="arraybuffer")),D&&typeof D.headers=="object"&&!(D.headers instanceof g)?Object.getOwnPropertyNames(D.headers).forEach(function(ae){U.setRequestHeader(ae,p(D.headers[ae]))}):H.headers.forEach(function(ae,Z){U.setRequestHeader(Z,ae)}),H.signal&&(H.signal.addEventListener("abort",q),U.onreadystatechange=function(){U.readyState===4&&H.signal.removeEventListener("abort",q)}),U.send(typeof H._bodyInit>"u"?null:H._bodyInit)})}return j.polyfill=!0,s.fetch||(s.fetch=j,s.Headers=g,s.Request=A,s.Response=N),a.Headers=g,a.Request=A,a.Response=N,a.fetch=j,a})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(wP,wP.exports)),wP.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Bi<"u"&&Bi.fetch?n=Bi.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof ERt<"u"&&typeof window>"u"){var r=n||ORt();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(fL,fL.exports);var cue=fL.exports;const uue=_n(cue),HK=fY({__proto__:null,default:uue},[cue]);function UK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function WK(e){for(var t=1;t"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(i["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(i["Content-Type"]="application/json");var a=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,s=WK({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:i},qK?{}:a),l=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{GK(n,s,o,l)}catch(c){if(!a||Object.keys(a).length===0||!c.message||c.message.indexOf("not implemented")<0)return o(c);try{Object.keys(a).forEach(function(u){delete s[u]}),GK(n,s,o,l),qK=!0}catch(u){o(u)}}},$Rt=function(t,n,r,o){r&&Vh(r)==="object"&&(r=pL("",r).slice(1)),t.queryStringParams&&(n=pL(n,t.queryStringParams));try{var i;iS?i=new iS:i=new kO("MSXML2.XMLHTTP.3.0"),i.open(r?"POST":"GET",n,1),t.crossDomain||i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.withCredentials=!!t.withCredentials,r&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.overrideMimeType&&i.overrideMimeType("application/json");var a=t.customHeaders;if(a=typeof a=="function"?a():a,a)for(var s in a)i.setRequestHeader(s,a[s]);i.onreadystatechange=function(){i.readyState>3&&o(i.status>=400?i.statusText:null,{status:i.status,data:i.responseText})},i.send(r)}catch(l){console&&console.log(l)}},RRt=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},Fu&&n.indexOf("file:")!==0)return ARt(t,n,r,o);if(lue()||typeof ActiveXObject=="function")return $Rt(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function Mv(e){"@babel/helpers - typeof";return Mv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mv(e)}function KK(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qR(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};_Rt(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return NRt(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=qR(qR(qR({},FRt()),this.options||{}),o),this.allOptions=i,this.services&&this.options.reloadInterval){var a=setInterval(function(){return r.reload()},this.options.reloadInterval);Mv(a)==="object"&&typeof a.unref=="function"&&a.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,i,a){var s=this,l=this.options.loadPath;typeof this.options.loadPath=="function"&&(l=this.options.loadPath(n,o)),l=TRt(l),l.then(function(c){if(!c)return a(null,{});var u=s.services.interpolator.interpolate(c,{lng:n.join("+"),ns:o.join("+")});s.loadUrl(u,a,r,i)})}},{key:"loadUrl",value:function(n,r,o,i){var a=this,s=typeof o=="string"?[o]:o,l=typeof i=="string"?[i]:i,c=this.options.parseLoadPayload(s,l);this.options.request(this.options,n,c,function(u,d){if(d&&(d.status>=500&&d.status<600||!d.status))return r("failed loading "+n+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return r("failed loading "+n+"; status code: "+d.status,!1);if(!d&&u&&u.message){var f=u.message.toLowerCase(),p=["failed","fetch","network","load"].find(function(v){return f.indexOf(v)>-1});if(p)return r("failed loading "+n+": "+u.message,!0)}if(u)return r(u,!1);var m,g;try{typeof d.data=="string"?m=a.options.parse(d.data,o,i):m=d.data}catch{g="failed parsing "+n+" to json"}if(g)return r(g,!1);r(null,m)})}},{key:"create",value:function(n,r,o,i,a){var s=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var l=this.options.parsePayload(r,o,i),c=0,u=[],d=[];n.forEach(function(f){var p=s.options.addPath;typeof s.options.addPath=="function"&&(p=s.options.addPath(f,r));var m=s.services.interpolator.interpolate(p,{lng:f,ns:r});s.options.request(s.options,m,l,function(g,v){c+=1,u.push(g),d.push(v),c===n.length&&typeof a=="function"&&a(u,d)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,i=r.languageUtils,a=r.logger,s=o.language;if(!(s&&s.toLowerCase()==="cimode")){var l=[],c=function(d){var f=i.toResolveHierarchy(d);f.forEach(function(p){l.indexOf(p)<0&&l.push(p)})};c(s),this.allOptions.preload&&this.allOptions.preload.forEach(function(u){return c(u)}),l.forEach(function(u){n.allOptions.ns.forEach(function(d){o.read(u,d,"read",null,null,function(f,p){f&&a.warn("loading namespace ".concat(d," for language ").concat(u," failed"),f),!f&&p&&a.log("loaded namespace ".concat(d," for language ").concat(u),p),o.loaded("".concat(u,"|").concat(d),f,p)})})})}}}])}();pue.type="backend";Oi.use(pue).use(sue).use(yRe).init({load:"languageOnly",detection:{order:["path","navigator","htmlTag"]},fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"/static/react/locales/{{lng}}/{{ns}}.json"}});const gm=new uxe({defaultOptions:{queries:{retry:3,staleTime:1e3*60*5,refetchOnMount:!0,refetchOnWindowFocus:!0,refetchOnReconnect:"always"}}}),nV=e=>{const t=document.getElementById(e);if(t===null)return;const n=t.attachShadow({mode:"open"}),r=document.createElement("div"),o=document.createElement("style"),i=document.getElementById("react-css");if(i){const l=document.createElement("link");l.setAttribute("rel","stylesheet"),l.setAttribute("href",i.href),n.appendChild(i)}n.appendChild(r),n.appendChild(o);const a=$Y({key:"css",prepend:!0,container:o});ud(r).render(C(kve,{value:a,children:C(y.Suspense,{fallback:C(Za,{}),children:C(yz,{children:C(Ff,{theme:i1t(r),children:C(Hh,{client:gm,children:C(tV,{})})})})})}))},YK=document.getElementById("root");YK&&ud(YK).render(C(Y.StrictMode,{children:C(y.Suspense,{fallback:C(Za,{}),children:C(yz,{children:C(Ff,{theme:rp,children:Q(Hh,{client:gm,children:[C(z$t,{}),C(Exe,{})]})})})})}));const XK=document.getElementById("react-weight-overview");XK&&ud(XK).render(C(y.Suspense,{fallback:C(Za,{}),children:C(Ff,{theme:rp,children:C(Hh,{client:gm,children:C(Ele,{})})})}));const QK=document.getElementById("react-weight-dashboard");QK&&ud(QK).render(C(y.Suspense,{fallback:C(Za,{}),children:C(Ff,{theme:rp,children:C(Hh,{client:gm,children:C(gle,{})})})}));const JK=document.getElementById("react-nutrition-dashboard");JK&&ud(JK).render(C(y.Suspense,{fallback:C(Za,{}),children:C(Ff,{theme:rp,children:C(Hh,{client:gm,children:C(Ase,{})})})}));const ZK=document.getElementById("react-routine-dashboard");ZK&&ud(ZK).render(C(y.Suspense,{fallback:C(Za,{}),children:C(Ff,{theme:rp,children:C(Hh,{client:gm,children:C(Qse,{})})})}));nV("react-exercise-overview");nV("react-exercise-contribute");const eY=document.getElementById("react-exercise-detail");eY&&ud(eY).render(C(y.Suspense,{fallback:C(Za,{}),children:C(yz,{children:C(Ff,{theme:rp,children:C(Hh,{client:gm,children:C(tV,{})})})})}));nV("react-page");const tY=document.getElementById("react-ingredient-search");tY&&ud(tY).render(C(y.Suspense,{fallback:C(Za,{}),children:C(Ff,{theme:rp,children:C(Ewt,{})})}))});export default jRt(); diff --git a/wger/nutrition/static/js/nutrition.js b/wger/nutrition/static/js/nutrition.js index 4efe2f2d9..71a38db4d 100644 --- a/wger/nutrition/static/js/nutrition.js +++ b/wger/nutrition/static/js/nutrition.js @@ -21,7 +21,7 @@ 'use strict'; function updateIngredientValue(url) { - var formData = $('#nutritional-values-form').serializeArray(); + let formData = $('#nutritional-values-form').serializeArray(); $.get(url, formData, function (data) { // Show any validation errors $('#calculator-errors').html(''); @@ -60,158 +60,20 @@ function wgerInitIngredientDetail(url) { } - -/* - * Draw the BMI chart - */ -function wgerRenderBodyMassIndex() { - var svg; - var area; - var nest; - var stack; - var yAxis; - var xAxis; - var z; - var y; - var x; - var margin; - var width; - var height; - var heightFactor; - var widthFactor; - - // Delete the other diagrams - d3.selectAll('svg').remove(); - - // Calculate the size - widthFactor = 600; - - heightFactor = (widthFactor / 600) * 300; - - margin = {top: 20, right: 80, bottom: 30, left: 50}; - width = widthFactor - margin.left - margin.right; - height = heightFactor - margin.top - margin.bottom; - - x = d3.scaleLinear() - .range([0, width]); - - y = d3.scaleLinear() - .range([height, 0]); - - z = d3.scaleOrdinal().range(['#000080', - '#0000ff', - '#00ffff', - '#00ff00', - '#ffff00', - '#ff7f2a', - '#ff0000', - '#800000']); - - xAxis = d3.axisBottom(x); - yAxis = d3.axisLeft(y); - stack = d3.stack(); - - area = d3.area() - .x(function (d) { - return x(d.height); - }) - .y1(function (d) { - return y(d.weight); - }); - - svg = d3.select('#bmi-chart').append('svg') - .attr('width', width + margin.left + margin.right) - .attr('height', height + margin.top + margin.bottom) - .append('g') - .attr('transform', 'translate(' + margin.left + ',' + margin.top + ')'); - - // Clip path, drawings outside are removed - svg.append('defs').append('clipPath') - .attr('id', 'clip') - .append('rect') - .attr('width', width) - .attr('height', height); - - d3.json('/nutrition/calculator/bmi/chart-data').then(function (data) { - var $bmiForm; - var url; - var layers; - stack.keys(['filler', - 'severe_thinness', - 'moderate_thinness', - 'mild_thinness', - 'normal_range', - 'pre_obese', - 'obese_class_2', - 'obese_class_3']); - layers = stack(d3.group(data, d => d.key)); - - // Manually set the domains - x.domain(data.map(function (d) { - return d.height; - })); - y.domain([d3.min(data, function (d) { - return d.weight; - }), d3.max(data, function (d) { - return d.weight; - })]); - - svg.selectAll('.layer') - .data(layers) - .enter().append('path') - .attr('class', 'layer') - .attr('id', function (d) { - return 'key-' + d.key; - }) - .attr('clip-path', 'url(#clip)') - .attr('d', function (d, i) { - return area(d[i].data.values); - }) - .style('fill', function (d, i) { - return z(i); - }) - .style('opacity', 1); - - svg.append('g') - .attr('class', 'x axis') - .attr('transform', 'translate(0,' + height + ')') - .call(xAxis); - - svg.append('g') - .attr('class', 'y axis') - .call(yAxis); - - $bmiForm = $('#bmi-form'); - url = $bmiForm.attr('action'); - - $.post(url, - $bmiForm.serialize(), - function (postData) { - $('#bmi-result-container').show(); - $('#bmi-result-value').html(postData.bmi); - svg.append('circle') - .attr('cx', x(postData.height)) - .attr('cy', y(postData.weight)) - .attr('fill', 'black') - .attr('r', 5); - }); - }); -} - /* * Calories calculator */ function wgerInitCaloriesCalculator() { $('#form-transfer-calories').click(function (e) { - var baseCalories; + let baseCalories; e.preventDefault(); baseCalories = Number($('#id_base_calories').html()); $('#id_calories').val(baseCalories); }); $('#add-calories-total').click(function (e) { - var additionalCalories; - var baseCalories; + let additionalCalories; + let baseCalories; e.preventDefault(); baseCalories = Number($('#id_base_calories').html()); additionalCalories = Number($('#id_additional_calories').val()); @@ -224,7 +86,7 @@ function wgerInitCaloriesCalculator() { // Get own ID and update the user profile $.get('/api/v2/userprofile', function () { }).done(function (userprofile) { - var totalCalories = $('#id_calories')[0].value; + let totalCalories = $('#id_calories')[0].value; $.ajax({ url: '/api/v2/userprofile/' + userprofile.results[0].user + '/', type: 'PATCH', @@ -234,8 +96,8 @@ function wgerInitCaloriesCalculator() { }); $('.calories-autoform').click(function (e) { - var $bmrForm; - var bmrUrl; + let $bmrForm; + let bmrUrl; e.preventDefault(); // BMR @@ -244,8 +106,8 @@ function wgerInitCaloriesCalculator() { $.post(bmrUrl, $bmrForm.serialize(), function (data) { - var $activitiesForm; - var activitiesUrl; + let $activitiesForm; + let activitiesUrl; $('#bmr-result-container').show(); $('#bmr-result-value').html(data.bmr); diff --git a/wger/nutrition/templates/bmi/form.html b/wger/nutrition/templates/bmi/form.html deleted file mode 100644 index e928df423..000000000 --- a/wger/nutrition/templates/bmi/form.html +++ /dev/null @@ -1,122 +0,0 @@ -{% extends "base.html" %} -{% load i18n %} -{% load static %} -{% load crispy_forms_tags %} - -{% block header %} - - - - - - - - -{% endblock %} - - -{% block title %}{% translate "BMI calculator" %}{% endblock %} - - - -{% block content %} - -{% crispy form %} - - - - - - -
- - -

{% translate "Legend" %}

-
-
-
 
-
{% translate "Adipositas III" %}
-
-
-
 
-
{% translate "Adipositas II" %}
-
-
-
 
-
{% translate "Adipositas I" %}
-
-
-
 
-
{% translate "Overweight" %}
-
-
-
 
-
{% translate "Normal weight" %}
-
-
-
 
-
{% translate "Slight underweight" %}
-
-
-
 
-
{% translate "Moderate underweight" %}
-
-
-
 
-
{% translate "Strong underweight" %}
-
-
- - -{% endblock %} - - - -{% block sidebar %} -

Info

-

-{% blocktranslate %}Use the form to calculate your BMI (Body Mass Index). -If you have entered data in the weight section, the last entry will -be used automatically. Otherwise the weight you enter here will be saved -in a new entry.{% endblocktranslate %} -

-{% endblock %} diff --git a/wger/nutrition/urls.py b/wger/nutrition/urls.py index 8ee4c952e..97c94c2ed 100644 --- a/wger/nutrition/urls.py +++ b/wger/nutrition/urls.py @@ -26,7 +26,6 @@ from django.urls import ( # wger from wger.core.views.react import ReactView from wger.nutrition.views import ( - bmi, calculator, ingredient, plan, @@ -140,19 +139,9 @@ patterns_unit_ingredient = [ patterns_bmi = [ path( '', - bmi.view, + ReactView.as_view(), name='view', ), - path( - 'calculate', - bmi.calculate, - name='calculate', - ), - path( - 'chart-data', - bmi.chart_data, - name='chart-data', - ), # JS ] # sub patterns for calories calculator diff --git a/wger/nutrition/views/bmi.py b/wger/nutrition/views/bmi.py deleted file mode 100644 index 9a2899abd..000000000 --- a/wger/nutrition/views/bmi.py +++ /dev/null @@ -1,159 +0,0 @@ -# -*- coding: utf-8 -*- - -# This file is part of wger Workout Manager. -# -# wger Workout Manager is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# wger Workout Manager is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Workout Manager. If not, see . - -# Standard Library -import json -import logging - -# Django -from django.contrib.auth.decorators import login_required -from django.http import HttpResponse -from django.shortcuts import render -from django.utils.translation import gettext as _ - -# wger -from wger.nutrition.forms import BmiForm -from wger.utils import helpers -from wger.utils.units import AbstractHeight - - -logger = logging.getLogger(__name__) -""" -BMI views -""" - - -@login_required -def view(request): - """ - The BMI calculator detail page - """ - - context = {} - form_data = { - 'height': request.user.userprofile.height, - 'weight': request.user.userprofile.weight, - 'use_metric': request.user.userprofile.use_metric, - } - context['form'] = BmiForm(initial=form_data) - return render(request, 'bmi/form.html', context) - - -@login_required -def calculate(request): - """ - Calculates the BMI - """ - - data = [] - - form = BmiForm(request.POST, instance=request.user.userprofile) - output_height = request.POST['height'] - - if not request.user.userprofile.use_metric: - request_copy = request.POST.copy() - output_height = request_copy['height'] - request_copy['height'] = AbstractHeight(request_copy['height'], mode='inches').cm - form = BmiForm(request_copy, instance=request.user.userprofile) - - if form.is_valid(): - form.save() - - # Create a new weight entry as needed - request.user.userprofile.user_bodyweight(form.cleaned_data['weight']) - - bmi = request.user.userprofile.calculate_bmi() - result = { - 'bmi': '{0:.2f}'.format(bmi), - 'weight': form.cleaned_data['weight'], - 'height': output_height, - } - data = json.dumps(result, cls=helpers.DecimalJsonEncoder) - response = HttpResponse(data, 'application/json') - else: - help_message = { - ('error'): _('Please make sure your height is within the appropriate range.'), - } - if request.user.userprofile.use_metric: - help_message['cm_range'] = _('140 to 230') - else: - help_message['in_range'] = _('56 to 90') - data = json.dumps(help_message) - response = HttpResponse(data, 'application/json') - response.status_code = 406 - # Return the results to the client - return response - - -def chart_data(request): - """ - Returns the data to render the BMI chart - - The individual values taken from - * http://apps.who.int/bmi/index.jsp?introPage=intro_3.html - * https://de.wikipedia.org/wiki/Body-Mass-Index - """ - - if request.user.userprofile.use_metric: - data = json.dumps( - [ - {'key': 'filler', 'height': 150, 'weight': 30}, - {'key': 'filler', 'height': 200, 'weight': 30}, - {'key': 'severe_thinness', 'height': 150, 'weight': 35.978}, - {'key': 'severe_thinness', 'height': 200, 'weight': 63.960}, - {'key': 'moderate_thinness', 'height': 150, 'weight': 38.228}, - {'key': 'moderate_thinness', 'height': 200, 'weight': 67.960}, - {'key': 'mild_thinness', 'height': 150, 'weight': 41.603}, - {'key': 'mild_thinness', 'height': 200, 'weight': 73.960}, - {'key': 'normal_range', 'height': 150, 'weight': 56.228}, - {'key': 'normal_range', 'height': 200, 'weight': 99.960}, - {'key': 'pre_obese', 'height': 150, 'weight': 67.478}, - {'key': 'pre_obese', 'height': 200, 'weight': 119.960}, - {'key': 'obese_class_1', 'height': 150, 'weight': 78.728}, - {'key': 'obese_class_1', 'height': 200, 'weight': 139.960}, - {'key': 'obese_class_2', 'height': 150, 'weight': 89.978}, - {'key': 'obese_class_2', 'height': 200, 'weight': 159.960}, - {'key': 'obese_class_3', 'height': 150, 'weight': 90}, - {'key': 'obese_class_3', 'height': 200, 'weight': 190}, - ] - ) - else: - data = json.dumps( - [ - {'key': 'filler', 'height': 150, 'weight': 66.139}, - {'key': 'filler', 'height': 200, 'weight': 66.139}, - {'key': 'severe_thinness', 'height': 150, 'weight': 79.317}, - {'key': 'severe_thinness', 'height': 200, 'weight': 141.008}, - {'key': 'moderate_thinness', 'height': 150, 'weight': 84.277}, - {'key': 'moderate_thinness', 'height': 200, 'weight': 149.826}, - {'key': 'mild_thinness', 'height': 150, 'weight': 91.718}, - {'key': 'mild_thinness', 'height': 200, 'weight': 163.054}, - {'key': 'normal_range', 'height': 150, 'weight': 123.960}, - {'key': 'normal_range', 'height': 200, 'weight': 220.374}, - {'key': 'pre_obese', 'height': 150, 'weight': 148.762}, - {'key': 'pre_obese', 'height': 200, 'weight': 264.467}, - {'key': 'obese_class_1', 'height': 150, 'weight': 173.564}, - {'key': 'obese_class_1', 'height': 200, 'weight': 308.559}, - {'key': 'obese_class_2', 'height': 150, 'weight': 198.366}, - {'key': 'obese_class_2', 'height': 200, 'weight': 352.651}, - {'key': 'obese_class_3', 'height': 150, 'weight': 198.416}, - {'key': 'obese_class_3', 'height': 200, 'weight': 352.740}, - ] - ) - - # Return the results to the client - return HttpResponse(data, 'application/json') diff --git a/yarn.lock b/yarn.lock index 33c55b00b..39335f2b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,269 +7,16 @@ resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-2.0.54.tgz#d7999245f77c3fab5d84e7d32b8a6c20bfd1f072" integrity sha512-D/PomKwNkDfSKD13DEVQT/pq2TUjN54c6uB341fEZanIzkjfGe7UaFuuaLZbpEiS5j7Wk2MUHAZqZIoECw29lg== -Sortable@RubaXa/Sortable#1.15.3: - version "1.15.3" - resolved "https://codeload.github.com/RubaXa/Sortable/tar.gz/dcb8f9e85b972292db1e0cab2ff9d7cd359ff352" - bootstrap@5.3.3: version "5.3.3" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-5.3.3.tgz#de35e1a765c897ac940021900fcbb831602bac38" integrity sha512-8HLCdWgyoMguSO9o+aH+iuZ+aht+mzW0u3HIMzVu7Srrpv7EBBxTnrFlSCskwdY1+EOFQSm7uMJhNQHkdPcmjg== -commander@7: - version "7.2.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" - integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== - components-font-awesome@5.9.0: version "5.9.0" resolved "https://registry.yarnpkg.com/components-font-awesome/-/components-font-awesome-5.9.0.tgz#02242f85946f0a6ab46870547f4c54d11e94ef75" integrity sha512-AjY5WwmKripvroQ1oYpCC4eK8efavSKUGN/ATgwcbyz/kRmojslH8l6Mrlxq071bdzBrZvCxi+RKgU5ao3bU+A== -"d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.0.tgz#15bf96cd9b7333e02eb8de8053d78962eafcff14" - integrity sha512-3yXFQo0oG3QCxbF06rMPFyGRMGJNS7NvsV1+2joOjbBE+9xvWQ8+GcMJAjRCzw06zQ3/arXeJgbPYcjUCuC+3g== - dependencies: - internmap "1 - 2" - -d3-axis@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" - integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== - -d3-brush@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" - integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "3" - d3-transition "3" - -d3-chord@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" - integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== - dependencies: - d3-path "1 - 3" - -"d3-color@1 - 3", d3-color@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.0.1.tgz#03316e595955d1fcd39d9f3610ad41bb90194d0a" - integrity sha512-6/SlHkDOBLyQSJ1j1Ghs82OIUXpKWlR0hCsw0XrLSQhuUPuCSmLQ1QPH98vpnQxMUQM2/gfAkUEWsupVpd9JGw== - -d3-contour@4: - version "4.0.0" - resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.0.tgz#5a1337c6da0d528479acdb5db54bc81a0ff2ec6b" - integrity sha512-7aQo0QHUTu/Ko3cP9YK9yUTxtoDEiDGwnBHyLxG5M4vqlBkO/uixMRele3nfsfj6UXOcuReVpVXzAboGraYIJw== - dependencies: - d3-array "^3.2.0" - -d3-delaunay@6: - version "6.0.2" - resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.2.tgz#7fd3717ad0eade2fc9939f4260acfb503f984e92" - integrity sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ== - dependencies: - delaunator "5" - -"d3-dispatch@1 - 3", d3-dispatch@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" - integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== - -"d3-drag@2 - 3", d3-drag@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" - integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== - dependencies: - d3-dispatch "1 - 3" - d3-selection "3" - -"d3-dsv@1 - 3", d3-dsv@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" - integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== - dependencies: - commander "7" - iconv-lite "0.6" - rw "1" - -"d3-ease@1 - 3", d3-ease@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" - integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== - -d3-fetch@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" - integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== - dependencies: - d3-dsv "1 - 3" - -d3-force@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" - integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== - dependencies: - d3-dispatch "1 - 3" - d3-quadtree "1 - 3" - d3-timer "1 - 3" - -"d3-format@1 - 3", d3-format@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.0.1.tgz#e41b81b2ab79277141ec1404aa5d05001da64084" - integrity sha512-hdL7+HBIohpgfolhBxr1KX47VMD6+vVD/oEFrxk5yhmzV2prk99EkFKYpXuhVkFpTgHdJ6/4bYcjdLPPXV4tIA== - -d3-geo@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e" - integrity sha512-Wt23xBych5tSy9IYAM1FR2rWIBFWa52B/oF/GYe5zbdHrg08FU8+BuI6X4PvTwPDdqdAdq04fuWJpELtsaEjeA== - dependencies: - d3-array "2.5.0 - 3" - -d3-hierarchy@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.0.1.tgz#0365342d54972e38ca05e9143e0ab1c60846b3b5" - integrity sha512-RlLTaofEoOrMK1JoXYIGhKTkJFI/6rFrYPgxy6QlZo2BcVc4HGTqEU0rPpzuMq5T/5XcMtAzv1XiLA3zRTfygw== - -"d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" - integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== - dependencies: - d3-color "1 - 3" - -"d3-path@1 - 3", d3-path@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e" - integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w== - -d3-polygon@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" - integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== - -"d3-quadtree@1 - 3", d3-quadtree@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" - integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== - -d3-random@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" - integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== - -d3-scale-chromatic@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#15b4ceb8ca2bb0dcb6d1a641ee03d59c3b62376a" - integrity sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g== - dependencies: - d3-color "1 - 3" - d3-interpolate "1 - 3" - -d3-scale@4: - version "4.0.0" - resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.0.tgz#294377ea1d7e5a31509ee648b98d7916ac0b34e3" - integrity sha512-foHQYKpWQcyndH1CGoHdUC4PECxTxonzwwBXGT8qu+Drb1FIc6ON6dG2P5f4hRRMkLiIKeWK7iFtdznDUrnuPQ== - dependencies: - d3-array "2.10.0 - 3" - d3-format "1 - 3" - d3-interpolate "1.2.0 - 3" - d3-time "2.1.1 - 3" - d3-time-format "2 - 4" - -"d3-selection@2 - 3", d3-selection@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" - integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== - -d3-shape@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.0.1.tgz#9ccdfb28fd9b0d12f2d8aec234cd5c4a9ea27931" - integrity sha512-HNZNEQoDhuCrDWEc/BMbF/hKtzMZVoe64TvisFLDp2Iyj0UShB/E6/lBsLlJTfBMbYgftHj90cXJ0SEitlE6Xw== - dependencies: - d3-path "1 - 3" - -"d3-time-format@2 - 4", d3-time-format@4: - version "4.0.0" - resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.0.0.tgz#930ded86a9de761702344760d8a25753467f28b7" - integrity sha512-nzaCwlj+ZVBIlFuVOT1RmU+6xb/7D5IcnhHzHQcBgS/aTa5K9fWZNN5LCXA27LgF5WxoSNJqKBbLcGMtM6Ca6A== - dependencies: - d3-time "1 - 3" - -"d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" - integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== - dependencies: - d3-array "2 - 3" - -"d3-timer@1 - 3", d3-timer@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" - integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== - -"d3-transition@2 - 3", d3-transition@3: - version "3.0.1" - resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" - integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== - dependencies: - d3-color "1 - 3" - d3-dispatch "1 - 3" - d3-ease "1 - 3" - d3-interpolate "1 - 3" - d3-timer "1 - 3" - -d3-zoom@3: - version "3.0.0" - resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" - integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== - dependencies: - d3-dispatch "1 - 3" - d3-drag "2 - 3" - d3-interpolate "1 - 3" - d3-selection "2 - 3" - d3-transition "2 - 3" - -d3@^7.9.0: - version "7.9.0" - resolved "https://registry.yarnpkg.com/d3/-/d3-7.9.0.tgz#579e7acb3d749caf8860bd1741ae8d371070cd5d" - integrity sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA== - dependencies: - d3-array "3" - d3-axis "3" - d3-brush "3" - d3-chord "3" - d3-color "3" - d3-contour "4" - d3-delaunay "6" - d3-dispatch "3" - d3-drag "3" - d3-dsv "3" - d3-ease "3" - d3-fetch "3" - d3-force "3" - d3-format "3" - d3-geo "3" - d3-hierarchy "3" - d3-interpolate "3" - d3-path "3" - d3-polygon "3" - d3-quadtree "3" - d3-random "3" - d3-scale "4" - d3-scale-chromatic "3" - d3-selection "3" - d3-shape "3" - d3-time "3" - d3-time-format "4" - d3-timer "3" - d3-transition "3" - d3-zoom "3" - datatables.net-bs5@^2.1.8: version "2.1.8" resolved "https://registry.yarnpkg.com/datatables.net-bs5/-/datatables.net-bs5-2.1.8.tgz#860717c4ee85ecb84812ba9a73fb1204aa2a68b6" @@ -285,13 +32,6 @@ datatables.net@2.1.8: dependencies: jquery ">=1.7" -delaunator@5: - version "5.0.0" - resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.0.tgz#60f052b28bd91c9b4566850ebf7756efe821d81b" - integrity sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw== - dependencies: - robust-predicates "^3.0.0" - desandro-matches-selector@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz#717beed4dc13e7d8f3762f707a6d58a6774218e1" @@ -322,18 +62,6 @@ get-size@^2.0.2: resolved "https://registry.yarnpkg.com/get-size/-/get-size-2.0.3.tgz#54a1d0256b20ea7ac646516756202769941ad2ef" integrity sha512-lXNzT/h/dTjTxRbm9BXb+SGxxzkm97h/PCIKtlN/CBCxxmkkIVV21udumMS93MuVTDX583gqc94v3RjuHmI+2Q== -iconv-lite@0.6: - version "0.6.3" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -"internmap@1 - 2": - version "2.0.1" - resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.1.tgz#33d0fa016185397549fb1a14ea3dbe5a2949d1cd" - integrity sha512-Ujwccrj9FkGqjbY3iVoxD1VV+KdZZeENx0rphrtzmRXbFvkFO88L80BL/zeSIguX/7T+y8k04xqtgWgS5vxwxw== - jquery@>=1.7, jquery@^3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/jquery/-/jquery-3.7.1.tgz#083ef98927c9a6a74d05a6af02806566d16274de" @@ -361,21 +89,6 @@ popper.js@^1.16.1: resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1.tgz#2a223cb3dc7b6213d740e40372be40de43e65b1b" integrity sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ== -robust-predicates@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" - integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== - -rw@1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" - integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= - -"safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - yarn@^1.22.22: version "1.22.22" resolved "https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz#ac34549e6aa8e7ead463a7407e1c7390f61a6610"