From 071ca1cf4e2140587e57de7e2de0ab35de95af2e Mon Sep 17 00:00:00 2001 From: Martin Ziegler Date: Wed, 3 Dec 2025 11:36:08 +0100 Subject: [PATCH] Wiring up print options: first try. needs mofre reverse engineering for sync process --- .gitignore | 1 + backend/app/api/routes/printers.py | 92 ++ backend/app/schemas/printer.py | 23 + backend/app/services/bambu_mqtt.py | 392 ++++++++- frontend/public/icons/ams-settings.svg | 3 +- frontend/public/icons/chamber.svg | 2 +- frontend/public/icons/hotend.svg | 3 +- frontend/public/icons/lamp.svg | 5 +- frontend/public/icons/temperature.svg | 5 +- frontend/public/icons/ventilation.svg | 5 +- frontend/src/api/client.ts | 47 + .../components/control/PrintOptionsModal.tsx | 393 +++++++++ frontend/src/pages/ControlPage.tsx | 16 +- .../{index-DVDHG02m.js => index-DKrE4YAX.js} | 816 +++++++++--------- static/assets/index-DaEsKk03.css | 1 - static/assets/index-OvloHYxf.css | 1 + static/icons/ams-settings.svg | 3 +- static/icons/chamber.svg | 2 +- static/icons/hotend.svg | 3 +- static/icons/lamp.svg | 5 +- static/icons/temperature.svg | 5 +- static/icons/ventilation.svg | 5 +- static/index.html | 4 +- 23 files changed, 1401 insertions(+), 431 deletions(-) create mode 100644 frontend/src/components/control/PrintOptionsModal.tsx rename static/assets/{index-DVDHG02m.js => index-DKrE4YAX.js} (70%) delete mode 100644 static/assets/index-DaEsKk03.css create mode 100644 static/assets/index-OvloHYxf.css diff --git a/.gitignore b/.gitignore index 8049ee9f9..024b01e20 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ archive/ # Logs *.log logs/ +*.log* diff --git a/backend/app/api/routes/printers.py b/backend/app/api/routes/printers.py index 0c9a01e2e..31a87444f 100644 --- a/backend/app/api/routes/printers.py +++ b/backend/app/api/routes/printers.py @@ -22,6 +22,7 @@ from backend.app.schemas.printer import ( AMSUnit, AMSTray, NozzleInfoResponse, + PrintOptionsResponse, ) from backend.app.services.printer_manager import printer_manager from backend.app.services.bambu_ftp import ( @@ -193,6 +194,25 @@ async def get_printer_status(printer_id: int, db: AsyncSession = Depends(get_db) for n in (state.nozzles or []) ] + # Convert print options to response format + print_options = PrintOptionsResponse( + spaghetti_detector=state.print_options.spaghetti_detector, + print_halt=state.print_options.print_halt, + halt_print_sensitivity=state.print_options.halt_print_sensitivity, + first_layer_inspector=state.print_options.first_layer_inspector, + printing_monitor=state.print_options.printing_monitor, + buildplate_marker_detector=state.print_options.buildplate_marker_detector, + allow_skip_parts=state.print_options.allow_skip_parts, + nozzle_clumping_detector=state.print_options.nozzle_clumping_detector, + nozzle_clumping_sensitivity=state.print_options.nozzle_clumping_sensitivity, + pileup_detector=state.print_options.pileup_detector, + pileup_sensitivity=state.print_options.pileup_sensitivity, + airprint_detector=state.print_options.airprint_detector, + airprint_sensitivity=state.print_options.airprint_sensitivity, + auto_recovery_step_loss=state.print_options.auto_recovery_step_loss, + filament_tangle_detect=state.print_options.filament_tangle_detect, + ) + return PrinterStatus( id=printer_id, name=printer.name, @@ -212,9 +232,11 @@ async def get_printer_status(printer_id: int, db: AsyncSession = Depends(get_db) ams_exists=ams_exists, vt_tray=vt_tray, sdcard=state.sdcard, + store_to_sdcard=state.store_to_sdcard, timelapse=state.timelapse, ipcam=state.ipcam, nozzles=nozzles, + print_options=print_options, ) @@ -542,3 +564,73 @@ async def clear_mqtt_logs(printer_id: int, db: AsyncSession = Depends(get_db)): printer_manager.clear_logs(printer_id) return {"status": "cleared"} + + +# ============================================ +# Print Options (AI Detection) Endpoints +# ============================================ + +@router.post("/{printer_id}/print-options") +async def set_print_option( + printer_id: int, + module_name: str, + enabled: bool, + print_halt: bool = True, + sensitivity: str = "medium", + db: AsyncSession = Depends(get_db), +): + """Set an AI detection / print option on the printer. + + Valid module_name values: + - spaghetti_detector: Spaghetti detection + - first_layer_inspector: First layer inspection + - printing_monitor: AI print quality monitoring + - buildplate_marker_detector: Build plate marker detection + - allow_skip_parts: Allow skipping failed parts + """ + result = await db.execute(select(Printer).where(Printer.id == printer_id)) + printer = result.scalar_one_or_none() + if not printer: + raise HTTPException(404, "Printer not found") + + client = printer_manager.get_client(printer_id) + if not client or not client.state.connected: + raise HTTPException(400, "Printer not connected") + + # Validate module_name + valid_modules = [ + "spaghetti_detector", + "first_layer_inspector", + "printing_monitor", + "buildplate_marker_detector", + "allow_skip_parts", + "pileup_detector", + "clump_detector", + "airprint_detector", + "auto_recovery_step_loss", + ] + if module_name not in valid_modules: + raise HTTPException(400, f"Invalid module_name. Must be one of: {valid_modules}") + + # Validate sensitivity + valid_sensitivities = ["low", "medium", "high", "never_halt"] + if sensitivity not in valid_sensitivities: + raise HTTPException(400, f"Invalid sensitivity. Must be one of: {valid_sensitivities}") + + success = client.set_xcam_option( + module_name=module_name, + enabled=enabled, + print_halt=print_halt, + sensitivity=sensitivity, + ) + + if not success: + raise HTTPException(500, "Failed to send command to printer") + + return { + "success": True, + "module_name": module_name, + "enabled": enabled, + "print_halt": print_halt, + "sensitivity": sensitivity, + } diff --git a/backend/app/schemas/printer.py b/backend/app/schemas/printer.py index 2547c9aa0..61af3b024 100644 --- a/backend/app/schemas/printer.py +++ b/backend/app/schemas/printer.py @@ -63,6 +63,27 @@ class NozzleInfoResponse(BaseModel): nozzle_diameter: str = "" # e.g., "0.4" +class PrintOptionsResponse(BaseModel): + """AI detection and print options from xcam data.""" + # Core AI detectors + spaghetti_detector: bool = False + print_halt: bool = False + halt_print_sensitivity: str = "medium" # Spaghetti sensitivity + first_layer_inspector: bool = False + printing_monitor: bool = False + buildplate_marker_detector: bool = False + allow_skip_parts: bool = False + # Additional AI detectors (decoded from cfg bitmask) + nozzle_clumping_detector: bool = True + nozzle_clumping_sensitivity: str = "medium" + pileup_detector: bool = True + pileup_sensitivity: str = "medium" + airprint_detector: bool = True + airprint_sensitivity: str = "medium" + auto_recovery_step_loss: bool = True + filament_tangle_detect: bool = False + + class PrinterStatus(BaseModel): id: int name: str @@ -82,6 +103,8 @@ class PrinterStatus(BaseModel): ams_exists: bool = False vt_tray: AMSTray | None = None # Virtual tray / external spool sdcard: bool = False # SD card inserted + store_to_sdcard: bool = False # Store sent files on SD card timelapse: bool = False # Timelapse recording active ipcam: bool = False # Live view enabled nozzles: list[NozzleInfoResponse] = [] # Nozzle hardware info (index 0=left/primary, 1=right) + print_options: PrintOptionsResponse | None = None # AI detection and print options diff --git a/backend/app/services/bambu_mqtt.py b/backend/app/services/bambu_mqtt.py index f5e7d4cf1..b18b50b8d 100644 --- a/backend/app/services/bambu_mqtt.py +++ b/backend/app/services/bambu_mqtt.py @@ -54,6 +54,28 @@ class NozzleInfo: nozzle_diameter: str = "" # e.g., "0.4" +@dataclass +class PrintOptions: + """AI detection and print options from xcam data.""" + # Core AI detectors + spaghetti_detector: bool = False + print_halt: bool = False + halt_print_sensitivity: str = "medium" # Spaghetti sensitivity + first_layer_inspector: bool = False + printing_monitor: bool = False # AI print quality monitoring + buildplate_marker_detector: bool = False + allow_skip_parts: bool = False + # Additional AI detectors - decoded from cfg bitmask + nozzle_clumping_detector: bool = True + nozzle_clumping_sensitivity: str = "medium" + pileup_detector: bool = True + pileup_sensitivity: str = "medium" + airprint_detector: bool = True + airprint_sensitivity: str = "medium" + auto_recovery_step_loss: bool = True # Uses print.print_option command + filament_tangle_detect: bool = False + + @dataclass class PrinterState: connected: bool = False @@ -71,10 +93,13 @@ class PrinterState: hms_errors: list = field(default_factory=list) # List of HMSError kprofiles: list = field(default_factory=list) # List of KProfile sdcard: bool = False # SD card inserted + store_to_sdcard: bool = False # Store sent files on SD card (home_flag bit 11) timelapse: bool = False # Timelapse recording active ipcam: bool = False # Live view / camera streaming enabled # Nozzle hardware info (for dual nozzle printers, index 0 = left, 1 = right) nozzles: list = field(default_factory=lambda: [NozzleInfo(), NozzleInfo()]) + # AI detection and print options + print_options: PrintOptions = field(default_factory=PrintOptions) class BambuMQTTClient: @@ -117,6 +142,11 @@ class BambuMQTTClient: self._pending_kprofile_response: asyncio.Event | None = None self._kprofile_response_data: list | None = None + # Xcam hold timers - OrcaSlicer pattern: ignore incoming data for 3 seconds after command + # Key: module_name, Value: timestamp when command was sent + self._xcam_hold_start: dict[str, float] = {} + self._xcam_hold_time: float = 3.0 # Ignore incoming data for 3 seconds after command + @property def topic_subscribe(self) -> str: return f"device/{self.serial_number}/report" @@ -184,15 +214,14 @@ class BambuMQTTClient: except Exception as e: logger.error(f"[{self.serial_number}] Error handling AMS data: {e}") - # Handle xcam data (camera settings) at top level + # Handle xcam data (camera settings and AI detection) at top level if "xcam" in payload: xcam_data = payload["xcam"] - logger.debug(f"[{self.serial_number}] Received xcam data: {xcam_data}") - if isinstance(xcam_data, dict): - if "ipcam_record" in xcam_data: - self.state.ipcam = xcam_data.get("ipcam_record") == "enable" - if "timelapse" in xcam_data: - self.state.timelapse = xcam_data.get("timelapse") == "enable" + logger.info(f"[{self.serial_number}] Received xcam data at top level: {xcam_data}") + self._parse_xcam_data(xcam_data) + # Fire state change callback for top-level xcam (not nested in "print") + if "print" not in payload and self.on_state_change: + self.on_state_change(self.state) # Handle system responses (accessories info, etc.) if "system" in payload: @@ -202,6 +231,12 @@ class BambuMQTTClient: if "print" in payload: print_data = payload["print"] + + # Check if xcam is nested inside print data + if "xcam" in print_data: + logger.info(f"[{self.serial_number}] Found xcam inside print data: {print_data['xcam']}") + self._parse_xcam_data(print_data["xcam"]) + # Log when we see gcode_state changes if "gcode_state" in print_data: logger.info( @@ -244,6 +279,195 @@ class BambuMQTTClient: # actual nozzle is 'HH01' hardened steel high-flow) logger.info(f"[{self.serial_number}] Accessories response (not used for nozzle data): {data}") + def _parse_xcam_data(self, xcam_data): + """Parse xcam data for camera settings and AI detection options.""" + if not isinstance(xcam_data, dict): + return + + current_time = time.time() + + # Helper to check if we should accept incoming value for a module + # OrcaSlicer pattern: simple hold timer, ignore ALL data for 3 seconds after command + def should_accept_value(module_name: str, incoming_value: bool) -> bool: + """Check if we should accept an incoming xcam value. + + OrcaSlicer pattern: After sending a command, ignore incoming data + for 3 seconds. After that, accept whatever the printer sends. + """ + if module_name not in self._xcam_hold_start: + return True # No hold timer, accept incoming + + hold_start = self._xcam_hold_start[module_name] + elapsed = current_time - hold_start + + if elapsed > self._xcam_hold_time: + # Hold timer expired - accept incoming and clear hold + del self._xcam_hold_start[module_name] + logger.debug( + f"[{self.serial_number}] Hold expired for {module_name}, accepting {incoming_value}" + ) + return True + + # Within hold period - ignore incoming data + logger.debug( + f"[{self.serial_number}] Ignoring {module_name}={incoming_value} " + f"(hold active, {elapsed:.1f}s < {self._xcam_hold_time}s)" + ) + return False + + # Log all xcam fields for debugging + logger.debug(f"[{self.serial_number}] Parsing xcam data - all fields: {list(xcam_data.keys())}") + + # The cfg bitmask contains the ACTUAL detector states - the individual boolean + # fields (spaghetti_detector, etc.) are often stale/cached. + # CFG bitmask structure (each detector uses 3 bits: [sens_low, sens_high, enabled]): + # - Bits 5-7: spaghetti_detector (sens in 5-6, enabled in 7) + # - Bits 8-10: pileup_detector (sens in 8-9, enabled in 10) + # - Bits 11-13: clump_detector/nozzle_clumping (sens in 11-12, enabled in 13) + # - Bits 14-16: airprint_detector (sens in 14-15, enabled in 16) + # Sensitivity values: 0=low, 1=medium, 2=high + if "cfg" in xcam_data: + cfg = xcam_data["cfg"] + logger.debug(f"[{self.serial_number}] xcam cfg bitmask: {cfg} (binary: {bin(cfg)})") + + def decode_detector(start_bit): + """Decode a detector from cfg: returns (enabled, sensitivity_str)""" + sens_bits = (cfg >> start_bit) & 0x3 + enabled = bool((cfg >> (start_bit + 2)) & 1) + sensitivity = {0: "low", 1: "medium", 2: "high"}.get(sens_bits, "medium") + return enabled, sensitivity + + # Spaghetti detector (bits 5-7) + cfg_spaghetti, cfg_sensitivity = decode_detector(5) + if should_accept_value("spaghetti_detector", cfg_spaghetti): + old_value = self.state.print_options.spaghetti_detector + if cfg_spaghetti != old_value: + logger.info(f"[{self.serial_number}] spaghetti_detector changed (from cfg): {old_value} -> {cfg_spaghetti}") + self.state.print_options.spaghetti_detector = cfg_spaghetti + + # Check hold timer for sensitivity before accepting + if "halt_print_sensitivity" not in self._xcam_hold_start: + if cfg_sensitivity != self.state.print_options.halt_print_sensitivity: + logger.info( + f"[{self.serial_number}] Sensitivity changed (from cfg): " + f"{self.state.print_options.halt_print_sensitivity} -> {cfg_sensitivity}" + ) + self.state.print_options.halt_print_sensitivity = cfg_sensitivity + else: + hold_start = self._xcam_hold_start["halt_print_sensitivity"] + elapsed = current_time - hold_start + if elapsed <= self._xcam_hold_time: + logger.debug( + f"[{self.serial_number}] Ignoring cfg sensitivity={cfg_sensitivity} " + f"(hold active, {elapsed:.1f}s < {self._xcam_hold_time}s)" + ) + else: + # Hold expired - accept from cfg + if cfg_sensitivity != self.state.print_options.halt_print_sensitivity: + logger.info( + f"[{self.serial_number}] Sensitivity synced (from cfg after hold): " + f"{self.state.print_options.halt_print_sensitivity} -> {cfg_sensitivity}" + ) + self.state.print_options.halt_print_sensitivity = cfg_sensitivity + del self._xcam_hold_start["halt_print_sensitivity"] + + # Pileup detector (bits 8-10) + cfg_pileup, cfg_pileup_sens = decode_detector(8) + if should_accept_value("pileup_detector", cfg_pileup): + if cfg_pileup != self.state.print_options.pileup_detector: + logger.info(f"[{self.serial_number}] pileup_detector changed (from cfg): {self.state.print_options.pileup_detector} -> {cfg_pileup}") + self.state.print_options.pileup_detector = cfg_pileup + # Pileup sensitivity with hold timer + if "pileup_sensitivity" not in self._xcam_hold_start: + if cfg_pileup_sens != self.state.print_options.pileup_sensitivity: + logger.info(f"[{self.serial_number}] pileup_sensitivity changed (from cfg): {self.state.print_options.pileup_sensitivity} -> {cfg_pileup_sens}") + self.state.print_options.pileup_sensitivity = cfg_pileup_sens + else: + hold_start = self._xcam_hold_start["pileup_sensitivity"] + elapsed = current_time - hold_start + if elapsed > self._xcam_hold_time: + if cfg_pileup_sens != self.state.print_options.pileup_sensitivity: + logger.info(f"[{self.serial_number}] pileup_sensitivity synced (from cfg after hold): {self.state.print_options.pileup_sensitivity} -> {cfg_pileup_sens}") + self.state.print_options.pileup_sensitivity = cfg_pileup_sens + del self._xcam_hold_start["pileup_sensitivity"] + + # Clump/nozzle clumping detector (bits 11-13) + cfg_clump, cfg_clump_sens = decode_detector(11) + if should_accept_value("clump_detector", cfg_clump): + if cfg_clump != self.state.print_options.nozzle_clumping_detector: + logger.info(f"[{self.serial_number}] nozzle_clumping_detector changed (from cfg): {self.state.print_options.nozzle_clumping_detector} -> {cfg_clump}") + self.state.print_options.nozzle_clumping_detector = cfg_clump + # Clump sensitivity with hold timer + if "nozzle_clumping_sensitivity" not in self._xcam_hold_start: + if cfg_clump_sens != self.state.print_options.nozzle_clumping_sensitivity: + logger.info(f"[{self.serial_number}] nozzle_clumping_sensitivity changed (from cfg): {self.state.print_options.nozzle_clumping_sensitivity} -> {cfg_clump_sens}") + self.state.print_options.nozzle_clumping_sensitivity = cfg_clump_sens + else: + hold_start = self._xcam_hold_start["nozzle_clumping_sensitivity"] + elapsed = current_time - hold_start + if elapsed > self._xcam_hold_time: + if cfg_clump_sens != self.state.print_options.nozzle_clumping_sensitivity: + logger.info(f"[{self.serial_number}] nozzle_clumping_sensitivity synced (from cfg after hold): {self.state.print_options.nozzle_clumping_sensitivity} -> {cfg_clump_sens}") + self.state.print_options.nozzle_clumping_sensitivity = cfg_clump_sens + del self._xcam_hold_start["nozzle_clumping_sensitivity"] + + # Airprint detector (bits 14-16) + cfg_airprint, cfg_airprint_sens = decode_detector(14) + if should_accept_value("airprint_detector", cfg_airprint): + if cfg_airprint != self.state.print_options.airprint_detector: + logger.info(f"[{self.serial_number}] airprint_detector changed (from cfg): {self.state.print_options.airprint_detector} -> {cfg_airprint}") + self.state.print_options.airprint_detector = cfg_airprint + # Airprint sensitivity with hold timer + if "airprint_sensitivity" not in self._xcam_hold_start: + if cfg_airprint_sens != self.state.print_options.airprint_sensitivity: + logger.info(f"[{self.serial_number}] airprint_sensitivity changed (from cfg): {self.state.print_options.airprint_sensitivity} -> {cfg_airprint_sens}") + self.state.print_options.airprint_sensitivity = cfg_airprint_sens + else: + hold_start = self._xcam_hold_start["airprint_sensitivity"] + elapsed = current_time - hold_start + if elapsed > self._xcam_hold_time: + if cfg_airprint_sens != self.state.print_options.airprint_sensitivity: + logger.info(f"[{self.serial_number}] airprint_sensitivity synced (from cfg after hold): {self.state.print_options.airprint_sensitivity} -> {cfg_airprint_sens}") + self.state.print_options.airprint_sensitivity = cfg_airprint_sens + del self._xcam_hold_start["airprint_sensitivity"] + + # Camera settings + if "ipcam_record" in xcam_data: + self.state.ipcam = xcam_data.get("ipcam_record") == "enable" + if "timelapse" in xcam_data: + self.state.timelapse = xcam_data.get("timelapse") == "enable" + + # Skip spaghetti_detector boolean field - we read from cfg bitmask above + if "print_halt" in xcam_data: + self.state.print_options.print_halt = bool(xcam_data.get("print_halt")) + # Skip halt_print_sensitivity field - it's always stale ("medium") + # We read the actual sensitivity from cfg bits 5-6 above + if "first_layer_inspector" in xcam_data: + new_value = bool(xcam_data.get("first_layer_inspector")) + if should_accept_value("first_layer_inspector", new_value): + self.state.print_options.first_layer_inspector = new_value + if "printing_monitor" in xcam_data: + new_value = bool(xcam_data.get("printing_monitor")) + if should_accept_value("printing_monitor", new_value): + self.state.print_options.printing_monitor = new_value + if "buildplate_marker_detector" in xcam_data: + new_value = bool(xcam_data.get("buildplate_marker_detector")) + if should_accept_value("buildplate_marker_detector", new_value): + self.state.print_options.buildplate_marker_detector = new_value + if "allow_skip_parts" in xcam_data: + new_value = bool(xcam_data.get("allow_skip_parts")) + if should_accept_value("allow_skip_parts", new_value): + self.state.print_options.allow_skip_parts = new_value + + # Additional AI detectors - these are decoded from cfg bitmask above, not from + # individual boolean fields (which are not sent by the printer) + # pileup_detector, nozzle_clumping_detector, airprint_detector - from cfg + # auto_recovery_step_loss and filament_tangle_detect - tracked locally only + if "auto_recovery_step_loss" in xcam_data: + self.state.print_options.auto_recovery_step_loss = bool(xcam_data.get("auto_recovery_step_loss")) + if "filament_tangle_detect" in xcam_data: + self.state.print_options.filament_tangle_detect = bool(xcam_data.get("filament_tangle_detect")) + def _handle_ams_data(self, ams_data): """Handle AMS data changes for Spoolman integration. @@ -380,6 +604,18 @@ class BambuMQTTClient: if "sdcard" in data: self.state.sdcard = data["sdcard"] is True + # Parse home_flag for "Store Sent Files on External Storage" setting (bit 11) + if "home_flag" in data: + home_flag = data["home_flag"] + # Bit 11 controls "Store Sent Files on External Storage" + # Convert to unsigned 32-bit if negative + if home_flag < 0: + home_flag = home_flag & 0xFFFFFFFF + store_to_sdcard = bool((home_flag >> 11) & 1) + if store_to_sdcard != self.state.store_to_sdcard: + logger.info(f"[{self.serial_number}] store_to_sdcard changed: {self.state.store_to_sdcard} -> {store_to_sdcard}") + self.state.store_to_sdcard = store_to_sdcard + # Parse timelapse status (recording active during print) if "timelapse" in data: logger.debug(f"[{self.serial_number}] timelapse field: {data['timelapse']}") @@ -651,6 +887,148 @@ class BambuMQTTClient: return True return False + def set_xcam_option( + self, + module_name: str, + enabled: bool, + print_halt: bool = True, + sensitivity: str = "medium" + ) -> bool: + """Set an xcam (AI detection) option on the printer. + + Args: + module_name: The xcam module to control (e.g., "spaghetti_detector", + "first_layer_inspector", "printing_monitor", "buildplate_marker_detector") + enabled: Whether to enable or disable the feature + print_halt: Whether to halt print on detection (only applies to some detectors) + sensitivity: Sensitivity level ("low", "medium", "high", or "never_halt") + + Returns: + True if command was sent, False if not connected + """ + if not self._client or not self.state.connected: + return False + + # auto_recovery_step_loss uses a different command format (print.print_option) + if module_name == "auto_recovery_step_loss": + return self._set_print_option("auto_recovery", enabled) + + self._sequence_id += 1 + + # Build the xcam control command (exact OrcaSlicer format) + # Key findings from OrcaSlicer source: + # - Uses "xcam" wrapper (not "print") + # - print_halt is ALWAYS true (legacy protocol requirement) + # - Both "control" and "enable" are set to the same value + # - halt_print_sensitivity controls actual halt behavior + command = { + "xcam": { + "command": "xcam_control_set", + "sequence_id": str(self._sequence_id), + "module_name": module_name, + "control": enabled, + "enable": enabled, # old protocol compatibility + "print_halt": True, # ALWAYS true per OrcaSlicer + } + } + + # Only add sensitivity if not "never_halt" + # OrcaSlicer uses halt_print_sensitivity for ALL detectors + # The module_name field determines which detector's sensitivity is being set + if sensitivity and sensitivity != "never_halt": + command["xcam"]["halt_print_sensitivity"] = sensitivity + + command_json = json.dumps(command) + self._client.publish(self.topic_publish, command_json, qos=1) + logger.info(f"[{self.serial_number}] Set xcam option: {module_name}={enabled}, sensitivity={sensitivity}") + logger.debug(f"[{self.serial_number}] MQTT command sent: {command_json}") + + # OrcaSlicer pattern: Set hold timer to ignore incoming data for 3 seconds + # This prevents stale MQTT data from immediately overwriting our change + self._xcam_hold_start[module_name] = time.time() + + # Update local state immediately for responsive UI + # NOTE: Spaghetti and Pileup sensitivities are linked in firmware + # When spaghetti_detector sensitivity is changed, pileup also changes + if module_name == "spaghetti_detector": + self.state.print_options.spaghetti_detector = enabled + self.state.print_options.print_halt = print_halt + if sensitivity and sensitivity != "never_halt": + # spaghetti_detector controls BOTH spaghetti and pileup sensitivities + self.state.print_options.halt_print_sensitivity = sensitivity + self.state.print_options.pileup_sensitivity = sensitivity + self._xcam_hold_start["halt_print_sensitivity"] = time.time() + self._xcam_hold_start["pileup_sensitivity"] = time.time() + elif module_name == "first_layer_inspector": + self.state.print_options.first_layer_inspector = enabled + elif module_name == "printing_monitor": + self.state.print_options.printing_monitor = enabled + elif module_name == "buildplate_marker_detector": + self.state.print_options.buildplate_marker_detector = enabled + elif module_name == "allow_skip_parts": + self.state.print_options.allow_skip_parts = enabled + elif module_name == "pileup_detector": + self.state.print_options.pileup_detector = enabled + # Pileup sensitivity is linked to spaghetti - both are set via spaghetti_detector + elif module_name == "clump_detector": + self.state.print_options.nozzle_clumping_detector = enabled + if sensitivity and sensitivity != "never_halt": + self.state.print_options.nozzle_clumping_sensitivity = sensitivity + self._xcam_hold_start["nozzle_clumping_sensitivity"] = time.time() + elif module_name == "airprint_detector": + self.state.print_options.airprint_detector = enabled + if sensitivity and sensitivity != "never_halt": + self.state.print_options.airprint_sensitivity = sensitivity + self._xcam_hold_start["airprint_sensitivity"] = time.time() + elif module_name == "auto_recovery_step_loss": + self.state.print_options.auto_recovery_step_loss = enabled + + return True + + def _set_print_option(self, option_name: str, enabled: bool) -> bool: + """Set a print option using the print.print_option command. + + This is different from xcam_control_set and is used for options like: + - auto_recovery + - air_print_detect + - filament_tangle_detect + - nozzle_blob_detect + - sound_enable + + Args: + option_name: The option to control (e.g., "auto_recovery") + enabled: Whether to enable or disable the option + + Returns: + True if command was sent, False if not connected + """ + if not self._client or not self.state.connected: + return False + + self._sequence_id += 1 + + command = { + "print": { + "command": "print_option", + "sequence_id": str(self._sequence_id), + option_name: enabled, + } + } + + command_json = json.dumps(command) + self._client.publish(self.topic_publish, command_json, qos=1) + logger.info(f"[{self.serial_number}] Set print option: {option_name}={enabled}") + + # Set hold timer + hold_key = f"print_option_{option_name}" + self._xcam_hold_start[hold_key] = time.time() + + # Update local state immediately + if option_name == "auto_recovery": + self.state.print_options.auto_recovery_step_loss = enabled + + return True + def disconnect(self): """Disconnect from the printer.""" if self._client: diff --git a/frontend/public/icons/ams-settings.svg b/frontend/public/icons/ams-settings.svg index 7578d938e..8c4ac4736 100644 --- a/frontend/public/icons/ams-settings.svg +++ b/frontend/public/icons/ams-settings.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/frontend/public/icons/chamber.svg b/frontend/public/icons/chamber.svg index 35c805812..8c3e510c2 100644 --- a/frontend/public/icons/chamber.svg +++ b/frontend/public/icons/chamber.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/public/icons/hotend.svg b/frontend/public/icons/hotend.svg index 4898efb77..fcf541a90 100644 --- a/frontend/public/icons/hotend.svg +++ b/frontend/public/icons/hotend.svg @@ -1 +1,2 @@ - \ No newline at end of file + + diff --git a/frontend/public/icons/lamp.svg b/frontend/public/icons/lamp.svg index e0b714d49..534049051 100644 --- a/frontend/public/icons/lamp.svg +++ b/frontend/public/icons/lamp.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/frontend/public/icons/temperature.svg b/frontend/public/icons/temperature.svg index 1c36dd1dc..d6dd95436 100644 --- a/frontend/public/icons/temperature.svg +++ b/frontend/public/icons/temperature.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/frontend/public/icons/ventilation.svg b/frontend/public/icons/ventilation.svg index 689089968..4b6a734e4 100644 --- a/frontend/public/icons/ventilation.svg +++ b/frontend/public/icons/ventilation.svg @@ -1 +1,4 @@ - \ No newline at end of file + + + + diff --git a/frontend/src/api/client.ts b/frontend/src/api/client.ts index 462a89a66..772ae1c83 100644 --- a/frontend/src/api/client.ts +++ b/frontend/src/api/client.ts @@ -61,6 +61,26 @@ export interface NozzleInfo { nozzle_diameter: string; // e.g., "0.4" } +export interface PrintOptions { + // Core AI detectors + spaghetti_detector: boolean; + print_halt: boolean; + halt_print_sensitivity: string; // "low", "medium", "high" - spaghetti sensitivity + first_layer_inspector: boolean; + printing_monitor: boolean; + buildplate_marker_detector: boolean; + allow_skip_parts: boolean; + // Additional AI detectors (decoded from cfg bitmask) + nozzle_clumping_detector: boolean; + nozzle_clumping_sensitivity: string; // "low", "medium", "high" + pileup_detector: boolean; + pileup_sensitivity: string; // "low", "medium", "high" + airprint_detector: boolean; + airprint_sensitivity: string; // "low", "medium", "high" + auto_recovery_step_loss: boolean; + filament_tangle_detect: boolean; +} + export interface PrinterStatus { id: number; name: string; @@ -86,9 +106,11 @@ export interface PrinterStatus { ams_exists: boolean; vt_tray: AMSTray | null; // Virtual tray / external spool sdcard: boolean; // SD card inserted + store_to_sdcard: boolean; // Store sent files on SD card timelapse: boolean; // Timelapse recording active ipcam: boolean; // Live view enabled nozzles: NozzleInfo[]; // Nozzle hardware info (index 0=left/primary, 1=right) + print_options: PrintOptions | null; // AI detection and print options } export interface PrinterCreate { @@ -1188,4 +1210,29 @@ export const api = { request(`/printers/${printerId}/control/refresh`, { method: 'POST', }), + + // Print Options (AI Detection) + setPrintOption: ( + printerId: number, + moduleName: string, + enabled: boolean, + printHalt = true, + sensitivity = 'medium' + ) => { + const params = new URLSearchParams({ + module_name: moduleName, + enabled: String(enabled), + print_halt: String(printHalt), + sensitivity, + }); + return request<{ + success: boolean; + module_name: string; + enabled: boolean; + print_halt: boolean; + sensitivity: string; + }>(`/printers/${printerId}/print-options?${params}`, { + method: 'POST', + }); + }, }; diff --git a/frontend/src/components/control/PrintOptionsModal.tsx b/frontend/src/components/control/PrintOptionsModal.tsx new file mode 100644 index 000000000..1f6643994 --- /dev/null +++ b/frontend/src/components/control/PrintOptionsModal.tsx @@ -0,0 +1,393 @@ +import { useEffect, useState } from 'react'; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { api } from '../../api/client'; +import type { Printer, PrinterStatus } from '../../api/client'; +import { X, Loader2, AlertTriangle, ChevronDown } from 'lucide-react'; +import { Card, CardContent } from '../Card'; + +interface PrintOptionsModalProps { + printer: Printer; + status: PrinterStatus | null | undefined; + onClose: () => void; +} + +// Checkbox component matching Bambu Studio style +function Checkbox({ + checked, + onChange, + disabled, + loading, +}: { + checked: boolean; + onChange: (checked: boolean) => void; + disabled?: boolean; + loading?: boolean; +}) { + return ( + + ); +} + +// Sensitivity dropdown component +function SensitivityDropdown({ + value, + onChange, + disabled, + loading, +}: { + value: string; + onChange: (value: string) => void; + disabled?: boolean; + loading?: boolean; +}) { + const [isOpen, setIsOpen] = useState(false); + const options = ['Low', 'Medium', 'High']; + + const displayValue = value.charAt(0).toUpperCase() + value.slice(1).toLowerCase(); + const isDisabled = disabled || loading; + + return ( +
+ + {isOpen && !isDisabled && ( + <> +
setIsOpen(false)} /> +
+ {options.map((option) => ( + + ))} +
+ + )} +
+ ); +} + +export function PrintOptionsModal({ printer, status, onClose }: PrintOptionsModalProps) { + const queryClient = useQueryClient(); + const printOptions = status?.print_options; + const isConnected = status?.connected ?? false; + + // Close on Escape key + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if (e.key === 'Escape') onClose(); + }; + window.addEventListener('keydown', handleKeyDown); + return () => window.removeEventListener('keydown', handleKeyDown); + }, [onClose]); + + // Set print option mutation - track both UI and API module names + const setOptionMutation = useMutation({ + mutationFn: ({ + apiModuleName, + enabled, + printHalt, + sensitivity, + }: { + uiModuleName: string; // The module name from the UI (for loading state) - accessed via variables + apiModuleName: string; // The module name sent to API (may differ due to firmware quirk) + enabled: boolean; + printHalt?: boolean; + sensitivity?: string; + }) => api.setPrintOption(printer.id, apiModuleName, enabled, printHalt, sensitivity), + onSuccess: () => { + queryClient.invalidateQueries({ queryKey: ['printerStatuses'] }); + }, + }); + + const handleToggle = (moduleName: string, enabled: boolean, sensitivity?: string) => { + const printHalt = enabled && sensitivity !== undefined && sensitivity !== 'never_halt'; + setOptionMutation.mutate({ + uiModuleName: moduleName, + apiModuleName: moduleName, + enabled, + printHalt, + sensitivity: sensitivity ?? 'medium' + }); + }; + + const handleSensitivityChange = (moduleName: string, sensitivity: string) => { + // Spaghetti and Pileup sensitivities are linked in firmware + // For pileup, we send spaghetti_detector to set the shared sensitivity + // All other detectors use their own module name + let apiModuleName = moduleName; + if (moduleName === 'pileup_detector') { + // Pileup sensitivity is linked to spaghetti - use spaghetti_detector + apiModuleName = 'spaghetti_detector'; + } + + setOptionMutation.mutate({ + uiModuleName: moduleName, + apiModuleName, + enabled: true, + printHalt: true, + sensitivity + }); + }; + + // Check loading state using the UI module name (not API module name) + const isToggling = (moduleName: string) => + setOptionMutation.isPending && setOptionMutation.variables?.uiModuleName === moduleName; + + // Check if sensitivity is being changed for a specific detector + // This also returns true for linked detectors (e.g., spaghetti loading shows for pileup too) + const isSensitivityLoading = (moduleName: string) => { + if (!setOptionMutation.isPending || !setOptionMutation.variables?.sensitivity) return false; + const uiModule = setOptionMutation.variables.uiModuleName; + // Direct match + if (uiModule === moduleName) return true; + // Linked: spaghetti and pileup share sensitivity + if ((uiModule === 'spaghetti_detector' && moduleName === 'pileup_detector') || + (uiModule === 'pileup_detector' && moduleName === 'spaghetti_detector')) return true; + return false; + }; + + return ( +
+ e.stopPropagation()}> + + {/* Header */} +
+ Print Options + +
+ + {/* Content - Scrollable */} +
+ {!isConnected && ( +
+ + Printer not connected. Options cannot be changed. +
+ )} + + {!printOptions ? ( +
+ + Print options not available. Try refreshing. +
+ ) : ( + <> + {/* AI Detections Section */} +
+

AI Detections

+

+ Printer will send assistant message or pause printing if any of the following problem is detected. +

+
+ {/* Spaghetti Detection */} +
+
+ handleToggle('spaghetti_detector', checked, printOptions.halt_print_sensitivity)} + disabled={!isConnected} + loading={isToggling('spaghetti_detector')} + /> + Spaghetti Detection +
+

+ Detects spaghetti failure (scattered loose filament). +

+
+ Pausing Sensitivity: + handleSensitivityChange('spaghetti_detector', value)} + disabled={!isConnected || !printOptions.spaghetti_detector} + loading={isSensitivityLoading('spaghetti_detector')} + /> +
+
+ + {/* Purge Chute Pile-Up Detection */} +
+
+ handleToggle('pileup_detector', checked, printOptions.pileup_sensitivity)} + disabled={!isConnected} + loading={isToggling('pileup_detector')} + /> + Purge Chute Pile-Up Detection +
+

+ Monitors if the waste is piled up in the purge chute. +

+
+ Pausing Sensitivity: + handleSensitivityChange('pileup_detector', value)} + disabled={!isConnected || !printOptions.pileup_detector} + loading={isSensitivityLoading('pileup_detector')} + /> +
+
+ + {/* Nozzle Clumping Detection */} +
+
+ handleToggle('clump_detector', checked, printOptions.nozzle_clumping_sensitivity)} + disabled={!isConnected} + loading={isToggling('clump_detector')} + /> + Nozzle Clumping Detection +
+

+ Checks if the nozzle is clumping by filaments or other foreign objects. +

+
+ Pausing Sensitivity: + handleSensitivityChange('clump_detector', value)} + disabled={!isConnected || !printOptions.nozzle_clumping_detector} + loading={isSensitivityLoading('clump_detector')} + /> +
+
+ + {/* Air Printing Detection */} +
+
+ handleToggle('airprint_detector', checked, printOptions.airprint_sensitivity)} + disabled={!isConnected} + loading={isToggling('airprint_detector')} + /> + Air Printing Detection +
+

+ Detects air printing caused by nozzle clogging or filament grinding. +

+
+ Pausing Sensitivity: + handleSensitivityChange('airprint_detector', value)} + disabled={!isConnected || !printOptions.airprint_detector} + loading={isSensitivityLoading('airprint_detector')} + /> +
+
+
+
+ +
+ + {/* Build Plate Detection Section */} +
+

Build Plate Detection

+

+ Ensures the build plate type and placement are correct. +

+
+
+ handleToggle('buildplate_marker_detector', checked)} + disabled={!isConnected} + loading={isToggling('buildplate_marker_detector')} + /> + Type Detection +
+

+ Pauses printing when the detected build plate type does not match the selected one. +

+
+
+ +
+ + {/* Other Options */} +
+ {/* Auto-recover from step loss */} +
+ handleToggle('auto_recovery_step_loss', checked)} + disabled={!isConnected} + loading={isToggling('auto_recovery_step_loss')} + /> + Auto-recover from step loss +
+ + {/* Store Sent Files on External Storage - Read-only (no MQTT command available) */} +
+
+ {}} + disabled={true} + /> + Store Sent Files on External Storage + (read-only) +
+

+ Save the printing files initiated from Bambu Studio, Bambu Handy and MakerWorld on External Storage. + This option can only be changed on the printer's touchscreen. +

+
+
+ + )} +
+ +
+
+
+ ); +} diff --git a/frontend/src/pages/ControlPage.tsx b/frontend/src/pages/ControlPage.tsx index ec27558b8..b88e22ddb 100644 --- a/frontend/src/pages/ControlPage.tsx +++ b/frontend/src/pages/ControlPage.tsx @@ -12,6 +12,7 @@ import { ExtruderControls } from '../components/control/ExtruderControls'; import { AMSSectionDual } from '../components/control/AMSSectionDual'; import { CameraSettingsModal } from '../components/control/CameraSettingsModal'; import { PrinterPartsModal } from '../components/control/PrinterPartsModal'; +import { PrintOptionsModal } from '../components/control/PrintOptionsModal'; import { Loader2, WifiOff, Video, Webcam, Settings } from 'lucide-react'; export function ControlPage() { @@ -19,6 +20,7 @@ export function ControlPage() { const [selectedPrinterId, setSelectedPrinterId] = useState(null); const [showCameraSettings, setShowCameraSettings] = useState(false); const [showPrinterParts, setShowPrinterParts] = useState(false); + const [showPrintOptions, setShowPrintOptions] = useState(false); // Fetch all printers const { data: printers, isLoading: loadingPrinters } = useQuery({ @@ -178,7 +180,10 @@ export function ControlPage() { > Printer Parts -
); } diff --git a/static/assets/index-DVDHG02m.js b/static/assets/index-DKrE4YAX.js similarity index 70% rename from static/assets/index-DVDHG02m.js rename to static/assets/index-DKrE4YAX.js index 0e643955f..44b730e0c 100644 --- a/static/assets/index-DVDHG02m.js +++ b/static/assets/index-DKrE4YAX.js @@ -1,18 +1,18 @@ -function Bte(t,e){for(var n=0;ni[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var Sy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var mA={exports:{}},Sg={};var IU;function Hte(){if(IU)return Sg;IU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,a){var s=null;if(a!==void 0&&(s=""+a),r.key!==void 0&&(s=""+r.key),"key"in r){a={};for(var o in r)o!=="key"&&(a[o]=r[o])}else a=r;return r=a.ref,{$$typeof:t,type:i,key:s,ref:r!==void 0?r:null,props:a}}return Sg.Fragment=e,Sg.jsx=n,Sg.jsxs=n,Sg}var jU;function Vte(){return jU||(jU=1,mA.exports=Hte()),mA.exports}var p=Vte(),gA={exports:{}},Kt={};var UU;function $te(){if(UU)return Kt;UU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function x(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||y}x.prototype.isReactComponent={},x.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},x.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=x.prototype;function w(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||y}var E=w.prototype=new M;E.constructor=w,_(E,x.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function P(){}var N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function C(B,X,ae){var ce=ae.ref;return{$$typeof:t,type:B,key:X,ref:ce!==void 0?ce:null,props:ae}}function k(B,X){return C(B.type,X,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function I(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ae){return X[ae]})}var q=/\/+/g;function L(B,X){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):X.toString(36)}function H(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(P,P):(B.status="pending",B.then(function(X){B.status==="pending"&&(B.status="fulfilled",B.value=X)},function(X){B.status==="pending"&&(B.status="rejected",B.reason=X)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function V(B,X,ae,ce,xe){var ie=typeof B;(ie==="undefined"||ie==="boolean")&&(B=null);var ve=!1;if(B===null)ve=!0;else switch(ie){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(B.$$typeof){case t:case e:ve=!0;break;case u:return ve=B._init,V(ve(B._payload),X,ae,ce,xe)}}if(ve)return xe=xe(B),ve=ce===""?"."+L(B,0):ce,T(xe)?(ae="",ve!=null&&(ae=ve.replace(q,"$&/")+"/"),V(xe,X,ae,"",function(we){return we})):xe!=null&&(F(xe)&&(xe=k(xe,ae+(xe.key==null||B&&B.key===xe.key?"":(""+xe.key).replace(q,"$&/")+"/")+ve)),X.push(xe)),1;ve=0;var Pe=ce===""?".":ce+":";if(T(B))for(var pe=0;pe>>1,se=V[Z];if(0>>1;Zr(ae,K))cer(xe,ae)?(V[Z]=xe,V[ce]=K,Z=ce):(V[Z]=ae,V[X]=K,Z=X);else if(cer(xe,K))V[Z]=xe,V[ce]=K,Z=ce;else break e}}return G}function r(V,G){var K=V.sortIndex-G.sortIndex;return K!==0?K:V.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,f=null,m=3,g=!1,y=!1,_=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var G=n(c);G!==null;){if(G.callback===null)i(c);else if(G.startTime<=V)i(c),G.sortIndex=G.expirationTime,e(l,G);else break;G=n(c)}}function T(V){if(_=!1,E(V),!y)if(n(l)!==null)y=!0,P||(P=!0,I());else{var G=n(c);G!==null&&H(T,G.startTime-V)}}var P=!1,N=-1,j=5,C=-1;function k(){return v?!0:!(t.unstable_now()-CV&&k());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,m=f.priorityLevel;var se=Z(f.expirationTime<=V);if(V=t.unstable_now(),typeof se=="function"){f.callback=se,E(V),G=!0;break t}f===n(l)&&i(l),E(V)}else i(l);f=n(l)}if(f!==null)G=!0;else{var B=n(c);B!==null&&H(T,B.startTime-V),G=!1}}break e}finally{f=null,m=K,g=!1}G=void 0}}finally{G?I():P=!1}}}var I;if(typeof w=="function")I=function(){w(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,L=q.port2;q.port1.onmessage=F,I=function(){L.postMessage(null)}}else I=function(){x(F,0)};function H(V,G){N=x(function(){V(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125Z?(V.sortIndex=K,e(c,V),n(l)===null&&V===n(c)&&(_?(M(N),N=-1):_=!0,H(T,K-Z))):(V.sortIndex=se,e(l,V),y||g||(y=!0,P||(P=!0,I()))),V},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(V){var G=m;return function(){var K=m;m=G;try{return V.apply(this,arguments)}finally{m=K}}}})(yA)),yA}var BU;function qte(){return BU||(BU=1,vA.exports=Wte()),vA.exports}var bA={exports:{}},qr={};var HU;function Xte(){if(HU)return qr;HU=1;var t=um();function e(l){var c="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),bA.exports=Xte(),bA.exports}var $U;function Kte(){if($U)return wg;$U=1;var t=qte(),e=um(),n=nG();function i(d){var h="https://react.dev/errors/"+d;if(1se||(d.current=Z[se],Z[se]=null,se--)}function ae(d,h){se++,Z[se]=d.current,d.current=h}var ce=B(null),xe=B(null),ie=B(null),ve=B(null);function Pe(d,h){switch(ae(ie,h),ae(xe,d),ae(ce,null),h.nodeType){case 9:case 11:d=(d=h.documentElement)&&(d=d.namespaceURI)?aU(d):0;break;default:if(d=h.tagName,h=h.namespaceURI)h=aU(h),d=sU(h,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}X(ce),ae(ce,d)}function pe(){X(ce),X(xe),X(ie)}function we(d){d.memoizedState!==null&&ae(ve,d);var h=ce.current,b=sU(h,d.type);h!==b&&(ae(xe,d),ae(ce,b))}function ze(d){xe.current===d&&(X(ce),X(xe)),ve.current===d&&(X(ve),vg._currentValue=K)}var ue,ht;function z(d){if(ue===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);ue=h&&h[1]||"",ht=-1i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const s of a.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();var wy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ys(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var xA={exports:{}},Mg={};var UU;function $te(){if(UU)return Mg;UU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,a){var s=null;if(a!==void 0&&(s=""+a),r.key!==void 0&&(s=""+r.key),"key"in r){a={};for(var o in r)o!=="key"&&(a[o]=r[o])}else a=r;return r=a.ref,{$$typeof:t,type:i,key:s,ref:r!==void 0?r:null,props:a}}return Mg.Fragment=e,Mg.jsx=n,Mg.jsxs=n,Mg}var FU;function Gte(){return FU||(FU=1,xA.exports=$te()),xA.exports}var p=Gte(),vA={exports:{}},Kt={};var zU;function Wte(){if(zU)return Kt;zU=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),m=Symbol.iterator;function g(B){return B===null||typeof B!="object"?null:(B=m&&B[m]||B["@@iterator"],typeof B=="function"?B:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function x(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||y}x.prototype.isReactComponent={},x.prototype.setState=function(B,X){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,X,"setState")},x.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function M(){}M.prototype=x.prototype;function w(B,X,ae){this.props=B,this.context=X,this.refs=v,this.updater=ae||y}var E=w.prototype=new M;E.constructor=w,_(E,x.prototype),E.isPureReactComponent=!0;var T=Array.isArray;function P(){}var N={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function C(B,X,ae){var ce=ae.ref;return{$$typeof:t,type:B,key:X,ref:ce!==void 0?ce:null,props:ae}}function k(B,X){return C(B.type,X,B.props)}function F(B){return typeof B=="object"&&B!==null&&B.$$typeof===t}function I(B){var X={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(ae){return X[ae]})}var q=/\/+/g;function L(B,X){return typeof B=="object"&&B!==null&&B.key!=null?I(""+B.key):X.toString(36)}function H(B){switch(B.status){case"fulfilled":return B.value;case"rejected":throw B.reason;default:switch(typeof B.status=="string"?B.then(P,P):(B.status="pending",B.then(function(X){B.status==="pending"&&(B.status="fulfilled",B.value=X)},function(X){B.status==="pending"&&(B.status="rejected",B.reason=X)})),B.status){case"fulfilled":return B.value;case"rejected":throw B.reason}}throw B}function V(B,X,ae,ce,xe){var ie=typeof B;(ie==="undefined"||ie==="boolean")&&(B=null);var ve=!1;if(B===null)ve=!0;else switch(ie){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(B.$$typeof){case t:case e:ve=!0;break;case u:return ve=B._init,V(ve(B._payload),X,ae,ce,xe)}}if(ve)return xe=xe(B),ve=ce===""?"."+L(B,0):ce,T(xe)?(ae="",ve!=null&&(ae=ve.replace(q,"$&/")+"/"),V(xe,X,ae,"",function(we){return we})):xe!=null&&(F(xe)&&(xe=k(xe,ae+(xe.key==null||B&&B.key===xe.key?"":(""+xe.key).replace(q,"$&/")+"/")+ve)),X.push(xe)),1;ve=0;var Pe=ce===""?".":ce+":";if(T(B))for(var pe=0;pe>>1,se=V[Z];if(0>>1;Zr(ae,K))cer(xe,ae)?(V[Z]=xe,V[ce]=K,Z=ce):(V[Z]=ae,V[X]=K,Z=X);else if(cer(xe,K))V[Z]=xe,V[ce]=K,Z=ce;else break e}}return G}function r(V,G){var K=V.sortIndex-G.sortIndex;return K!==0?K:V.id-G.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,o=s.now();t.unstable_now=function(){return s.now()-o}}var l=[],c=[],u=1,f=null,m=3,g=!1,y=!1,_=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var G=n(c);G!==null;){if(G.callback===null)i(c);else if(G.startTime<=V)i(c),G.sortIndex=G.expirationTime,e(l,G);else break;G=n(c)}}function T(V){if(_=!1,E(V),!y)if(n(l)!==null)y=!0,P||(P=!0,I());else{var G=n(c);G!==null&&H(T,G.startTime-V)}}var P=!1,N=-1,j=5,C=-1;function k(){return v?!0:!(t.unstable_now()-CV&&k());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,m=f.priorityLevel;var se=Z(f.expirationTime<=V);if(V=t.unstable_now(),typeof se=="function"){f.callback=se,E(V),G=!0;break t}f===n(l)&&i(l),E(V)}else i(l);f=n(l)}if(f!==null)G=!0;else{var B=n(c);B!==null&&H(T,B.startTime-V),G=!1}}break e}finally{f=null,m=K,g=!1}G=void 0}}finally{G?I():P=!1}}}var I;if(typeof w=="function")I=function(){w(F)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,L=q.port2;q.port1.onmessage=F,I=function(){L.postMessage(null)}}else I=function(){x(F,0)};function H(V,G){N=x(function(){V(t.unstable_now())},G)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(V){V.callback=null},t.unstable_forceFrameRate=function(V){0>V||125Z?(V.sortIndex=K,e(c,V),n(l)===null&&V===n(c)&&(_?(M(N),N=-1):_=!0,H(T,K-Z))):(V.sortIndex=se,e(l,V),y||g||(y=!0,P||(P=!0,I()))),V},t.unstable_shouldYield=k,t.unstable_wrapCallback=function(V){var G=m;return function(){var K=m;m=G;try{return V.apply(this,arguments)}finally{m=K}}}})(_A)),_A}var VU;function Kte(){return VU||(VU=1,bA.exports=Xte()),bA.exports}var SA={exports:{}},qr={};var $U;function Yte(){if($U)return qr;$U=1;var t=dm();function e(l){var c="https://react.dev/errors/"+l;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),SA.exports=Yte(),SA.exports}var WU;function Zte(){if(WU)return Eg;WU=1;var t=Kte(),e=dm(),n=rG();function i(d){var h="https://react.dev/errors/"+d;if(1se||(d.current=Z[se],Z[se]=null,se--)}function ae(d,h){se++,Z[se]=d.current,d.current=h}var ce=B(null),xe=B(null),ie=B(null),ve=B(null);function Pe(d,h){switch(ae(ie,h),ae(xe,d),ae(ce,null),h.nodeType){case 9:case 11:d=(d=h.documentElement)&&(d=d.namespaceURI)?oU(d):0;break;default:if(d=h.tagName,h=h.namespaceURI)h=oU(h),d=lU(h,d);else switch(d){case"svg":d=1;break;case"math":d=2;break;default:d=0}}X(ce),ae(ce,d)}function pe(){X(ce),X(xe),X(ie)}function we(d){d.memoizedState!==null&&ae(ve,d);var h=ce.current,b=lU(h,d.type);h!==b&&(ae(xe,d),ae(ce,b))}function ze(d){xe.current===d&&(X(ce),X(xe)),ve.current===d&&(X(ve),bg._currentValue=K)}var ue,ht;function z(d){if(ue===void 0)try{throw Error()}catch(b){var h=b.stack.trim().match(/\n( *(at )?)/);ue=h&&h[1]||"",ht=-1)":-1R||_e[S]!==Fe[R]){var Je=` `+_e[S].replace(" at new "," at ");return d.displayName&&Je.includes("")&&(Je=Je.replace("",d.displayName)),Je}while(1<=S&&0<=R);break}}}finally{W=!1,Error.prepareStackTrace=b}return(b=d?d.displayName||d.name:"")?z(b):""}function J(d,h){switch(d.tag){case 26:case 27:case 5:return z(d.type);case 16:return z("Lazy");case 13:return d.child!==h&&h!==null?z("Suspense Fallback"):z("Suspense");case 19:return z("SuspenseList");case 0:case 15:return re(d.type,!1);case 11:return re(d.type.render,!1);case 1:return re(d.type,!0);case 31:return z("Activity");default:return""}}function ee(d){try{var h="",b=null;do h+=J(d,b),b=d,d=d.return;while(d);return h}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,te=t.unstable_shouldYield,U=t.unstable_requestPaint,O=t.unstable_now,Y=t.unstable_getCurrentPriorityLevel,me=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,he=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Xe=t.log,at=t.unstable_setDisableYieldValue,Ie=null,Re=null;function pt(d){if(typeof Xe=="function"&&at(d),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(Ie,d)}catch{}}var tt=Math.clz32?Math.clz32:de,et=Math.log,ut=Math.LN2;function de(d){return d>>>=0,d===0?32:31-(et(d)/ut|0)|0}var nt=256,fe=262144,Oe=4194304;function Me(d){var h=d&42;if(h!==0)return h;switch(d&-d){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return d&261888;case 262144:case 524288:case 1048576:case 2097152:return d&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function ge(d,h,b){var S=d.pendingLanes;if(S===0)return 0;var R=0,D=d.suspendedLanes,$=d.pingedLanes;d=d.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~D,S!==0?R=Me(S):($&=ne,$!==0?R=Me($):b||(b=ne&~d,b!==0&&(R=Me(b))))):(ne=S&~D,ne!==0?R=Me(ne):$!==0?R=Me($):b||(b=S&~d,b!==0&&(R=Me(b)))),R===0?0:h!==0&&h!==R&&(h&D)===0&&(D=R&-R,b=h&-h,D>=b||D===32&&(b&4194048)!==0)?h:R}function Be(d,h){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&h)===0}function ct(d,h){switch(d){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32: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 h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bt(){var d=Oe;return Oe<<=1,(Oe&62914560)===0&&(Oe=4194304),d}function Rt(d){for(var h=[],b=0;31>b;b++)h.push(d);return h}function on(d,h){d.pendingLanes|=h,h!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function Dt(d,h,b,S,R,D){var $=d.pendingLanes;d.pendingLanes=b,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=b,d.entangledLanes&=b,d.errorRecoveryDisabledLanes&=b,d.shellSuspendCounter=0;var ne=d.entanglements,_e=d.expirationTimes,Fe=d.hiddenUpdates;for(b=$&~b;0"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var Ti=/[\n"\\]/g;function Nn(d){return d.replace(Ti,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Js(d,h,b,S,R,D,$,ne){d.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?d.type=$:d.removeAttribute("type"),h!=null?$==="number"?(h===0&&d.value===""||d.value!=h)&&(d.value=""+un(h)):d.value!==""+un(h)&&(d.value=""+un(h)):$!=="submit"&&$!=="reset"||d.removeAttribute("value"),h!=null?gr(d,$,un(h)):b!=null?gr(d,$,un(b)):S!=null&&d.removeAttribute("value"),R==null&&D!=null&&(d.defaultChecked=!!D),R!=null&&(d.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?d.name=""+un(ne):d.removeAttribute("name")}function Pn(d,h,b,S,R,D,$,ne){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(d.type=D),h!=null||b!=null){if(!(D!=="submit"&&D!=="reset"||h!=null)){Xt(d);return}b=b!=null?""+un(b):"",h=h!=null?""+un(h):b,ne||h===d.value||(d.value=h),d.defaultValue=h}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,d.checked=ne?d.checked:!!S,d.defaultChecked=!!S,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(d.name=$),Xt(d)}function gr(d,h,b){h==="number"&&yi(d.ownerDocument)===d||d.defaultValue===""+b||(d.defaultValue=""+b)}function Qi(d,h,b,S){if(d=d.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mM=!1;if(cl)try{var Im={};Object.defineProperty(Im,"passive",{get:function(){mM=!0}}),window.addEventListener("test",Im,Im),window.removeEventListener("test",Im,Im)}catch{mM=!1}var kc=null,gM=null,pv=null;function sL(){if(pv)return pv;var d,h=gM,b=h.length,S,R="value"in kc?kc.value:kc.textContent,D=R.length;for(d=0;d=Fm),fL=" ",hL=!1;function pL(d,h){switch(d){case"keyup":return cee.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mL(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var Xf=!1;function dee(d,h){switch(d){case"compositionend":return mL(h);case"keypress":return h.which!==32?null:(hL=!0,fL);case"textInput":return d=h.data,d===fL&&hL?null:d;default:return null}}function fee(d,h){if(Xf)return d==="compositionend"||!_M&&pL(d,h)?(d=sL(),pv=gM=kc=null,Xf=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:b,offset:h-d};d=S}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=wL(b)}}function EL(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?EL(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function AL(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var h=yi(d.document);h instanceof d.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)d=h.contentWindow;else break;h=yi(d.document)}return h}function MM(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}var bee=cl&&"documentMode"in document&&11>=document.documentMode,Kf=null,EM=null,Vm=null,AM=!1;function TL(d,h,b){var S=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;AM||Kf==null||Kf!==yi(S)||(S=Kf,"selectionStart"in S&&MM(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Vm&&Hm(Vm,S)||(Vm=S,S=oy(EM,"onSelect"),0>=$,R-=$,To=1<<32-tt(h)+R|b<Jt?(xn=kt,kt=null):xn=kt.sibling;var wn=Ve(De,kt,Ue[Jt],rt);if(wn===null){kt===null&&(kt=xn);break}d&&kt&&wn.alternate===null&&h(De,kt),Ee=D(wn,Ee,Jt),Sn===null?It=wn:Sn.sibling=wn,Sn=wn,kt=xn}if(Jt===Ue.length)return b(De,kt),yn&&dl(De,Jt),It;if(kt===null){for(;JtJt?(xn=kt,kt=null):xn=kt.sibling;var eu=Ve(De,kt,wn.value,rt);if(eu===null){kt===null&&(kt=xn);break}d&&kt&&eu.alternate===null&&h(De,kt),Ee=D(eu,Ee,Jt),Sn===null?It=eu:Sn.sibling=eu,Sn=eu,kt=xn}if(wn.done)return b(De,kt),yn&&dl(De,Jt),It;if(kt===null){for(;!wn.done;Jt++,wn=Ue.next())wn=st(De,wn.value,rt),wn!==null&&(Ee=D(wn,Ee,Jt),Sn===null?It=wn:Sn.sibling=wn,Sn=wn);return yn&&dl(De,Jt),It}for(kt=S(kt);!wn.done;Jt++,wn=Ue.next())wn=Ye(kt,De,Jt,wn.value,rt),wn!==null&&(d&&wn.alternate!==null&&kt.delete(wn.key===null?Jt:wn.key),Ee=D(wn,Ee,Jt),Sn===null?It=wn:Sn.sibling=wn,Sn=wn);return d&&kt.forEach(function(zte){return h(De,zte)}),yn&&dl(De,Jt),It}function Un(De,Ee,Ue,rt){if(typeof Ue=="object"&&Ue!==null&&Ue.type===_&&Ue.key===null&&(Ue=Ue.props.children),typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case g:e:{for(var It=Ue.key;Ee!==null;){if(Ee.key===It){if(It=Ue.type,It===_){if(Ee.tag===7){b(De,Ee.sibling),rt=R(Ee,Ue.props.children),rt.return=De,De=rt;break e}}else if(Ee.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===j&&bd(It)===Ee.type){b(De,Ee.sibling),rt=R(Ee,Ue.props),Km(rt,Ue),rt.return=De,De=rt;break e}b(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}Ue.type===_?(rt=md(Ue.props.children,De.mode,rt,Ue.key),rt.return=De,De=rt):(rt=Mv(Ue.type,Ue.key,Ue.props,null,De.mode,rt),Km(rt,Ue),rt.return=De,De=rt)}return $(De);case y:e:{for(It=Ue.key;Ee!==null;){if(Ee.key===It)if(Ee.tag===4&&Ee.stateNode.containerInfo===Ue.containerInfo&&Ee.stateNode.implementation===Ue.implementation){b(De,Ee.sibling),rt=R(Ee,Ue.children||[]),rt.return=De,De=rt;break e}else{b(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}rt=DM(Ue,De.mode,rt),rt.return=De,De=rt}return $(De);case j:return Ue=bd(Ue),Un(De,Ee,Ue,rt)}if(H(Ue))return Nt(De,Ee,Ue,rt);if(I(Ue)){if(It=I(Ue),typeof It!="function")throw Error(i(150));return Ue=It.call(Ue),Bt(De,Ee,Ue,rt)}if(typeof Ue.then=="function")return Un(De,Ee,Pv(Ue),rt);if(Ue.$$typeof===w)return Un(De,Ee,Tv(De,Ue),rt);kv(De,Ue)}return typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint"?(Ue=""+Ue,Ee!==null&&Ee.tag===6?(b(De,Ee.sibling),rt=R(Ee,Ue),rt.return=De,De=rt):(b(De,Ee),rt=kM(Ue,De.mode,rt),rt.return=De,De=rt),$(De)):b(De,Ee)}return function(De,Ee,Ue,rt){try{Xm=0;var It=Un(De,Ee,Ue,rt);return sh=null,It}catch(kt){if(kt===ah||kt===Nv)throw kt;var Sn=Wa(29,kt,null,De.mode);return Sn.lanes=rt,Sn.return=De,Sn}finally{}}}var Sd=YL(!0),ZL=YL(!1),jc=!1;function GM(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function WM(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function Uc(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function Fc(d,h,b){var S=d.updateQueue;if(S===null)return null;if(S=S.shared,(Cn&2)!==0){var R=S.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),S.pending=h,h=wv(d),OL(d,null,b),h}return Sv(d,S,h,b),wv(d)}function Ym(d,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194048)!==0)){var S=h.lanes;S&=d.pendingLanes,b|=S,h.lanes=b,Wn(d,b)}}function qM(d,h){var b=d.updateQueue,S=d.alternate;if(S!==null&&(S=S.updateQueue,b===S)){var R=null,D=null;if(b=b.firstBaseUpdate,b!==null){do{var $={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};D===null?R=D=$:D=D.next=$,b=b.next}while(b!==null);D===null?R=D=h:D=D.next=h}else R=D=h;b={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},d.updateQueue=b;return}d=b.lastBaseUpdate,d===null?b.firstBaseUpdate=h:d.next=h,b.lastBaseUpdate=h}var XM=!1;function Zm(){if(XM){var d=rh;if(d!==null)throw d}}function Qm(d,h,b,S){XM=!1;var R=d.updateQueue;jc=!1;var D=R.firstBaseUpdate,$=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var _e=ne,Fe=_e.next;_e.next=null,$===null?D=Fe:$.next=Fe,$=_e;var Je=d.alternate;Je!==null&&(Je=Je.updateQueue,ne=Je.lastBaseUpdate,ne!==$&&(ne===null?Je.firstBaseUpdate=Fe:ne.next=Fe,Je.lastBaseUpdate=_e))}if(D!==null){var st=R.baseState;$=0,Je=Fe=_e=null,ne=D;do{var Ve=ne.lane&-536870913,Ye=Ve!==ne.lane;if(Ye?(gn&Ve)===Ve:(S&Ve)===Ve){Ve!==0&&Ve===ih&&(XM=!0),Je!==null&&(Je=Je.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Nt=d,Bt=ne;Ve=h;var Un=b;switch(Bt.tag){case 1:if(Nt=Bt.payload,typeof Nt=="function"){st=Nt.call(Un,st,Ve);break e}st=Nt;break e;case 3:Nt.flags=Nt.flags&-65537|128;case 0:if(Nt=Bt.payload,Ve=typeof Nt=="function"?Nt.call(Un,st,Ve):Nt,Ve==null)break e;st=f({},st,Ve);break e;case 2:jc=!0}}Ve=ne.callback,Ve!==null&&(d.flags|=64,Ye&&(d.flags|=8192),Ye=R.callbacks,Ye===null?R.callbacks=[Ve]:Ye.push(Ve))}else Ye={lane:Ve,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Je===null?(Fe=Je=Ye,_e=st):Je=Je.next=Ye,$|=Ve;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;Ye=ne,ne=Ye.next,Ye.next=null,R.lastBaseUpdate=Ye,R.shared.pending=null}}while(!0);Je===null&&(_e=st),R.baseState=_e,R.firstBaseUpdate=Fe,R.lastBaseUpdate=Je,D===null&&(R.shared.lanes=0),$c|=$,d.lanes=$,d.memoizedState=st}}function QL(d,h){if(typeof d!="function")throw Error(i(191,d));d.call(h)}function JL(d,h){var b=d.callbacks;if(b!==null)for(d.callbacks=null,d=0;dD?D:8;var $=V.T,ne={};V.T=ne,hE(d,!1,h,b);try{var _e=R(),Fe=V.S;if(Fe!==null&&Fe(ne,_e),_e!==null&&typeof _e=="object"&&typeof _e.then=="function"){var Je=Nee(_e,S);tg(d,h,Je,Za(d))}else tg(d,h,S,Za(d))}catch(st){tg(d,h,{then:function(){},status:"rejected",reason:st},Za())}finally{G.p=D,$!==null&&ne.types!==null&&($.types=ne.types),V.T=$}}function Lee(){}function dE(d,h,b,S){if(d.tag!==5)throw Error(i(476));var R=PI(d).queue;RI(d,R,h,K,b===null?Lee:function(){return kI(d),b(S)})}function PI(d){var h=d.memoizedState;if(h!==null)return h;h={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:K},next:null};var b={};return h.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ml,lastRenderedState:b},next:null},d.memoizedState=h,d=d.alternate,d!==null&&(d.memoizedState=h),h}function kI(d){var h=PI(d);h.next===null&&(h=d.alternate.memoizedState),tg(d,h.next.queue,{},Za())}function fE(){return Dr(vg)}function DI(){return Ni().memoizedState}function OI(){return Ni().memoizedState}function Iee(d){for(var h=d.return;h!==null;){switch(h.tag){case 24:case 3:var b=Za();d=Uc(b);var S=Fc(h,d,b);S!==null&&(Na(S,h,b),Ym(S,h,b)),h={cache:BM()},d.payload=h;return}h=h.return}}function jee(d,h,b){var S=Za();b={lane:S,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Hv(d)?II(h,b):(b=RM(d,h,b,S),b!==null&&(Na(b,d,S),jI(b,h,S)))}function LI(d,h,b){var S=Za();tg(d,h,b,S)}function tg(d,h,b,S){var R={lane:S,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null};if(Hv(d))II(h,R);else{var D=d.alternate;if(d.lanes===0&&(D===null||D.lanes===0)&&(D=h.lastRenderedReducer,D!==null))try{var $=h.lastRenderedState,ne=D($,b);if(R.hasEagerState=!0,R.eagerState=ne,Ga(ne,$))return Sv(d,h,R,0),qn===null&&_v(),!1}catch{}finally{}if(b=RM(d,h,R,S),b!==null)return Na(b,d,S),jI(b,h,S),!0}return!1}function hE(d,h,b,S){if(S={lane:2,revertLane:GE(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Hv(d)){if(h)throw Error(i(479))}else h=RM(d,b,S,2),h!==null&&Na(h,d,2)}function Hv(d){var h=d.alternate;return d===Qt||h!==null&&h===Qt}function II(d,h){lh=Lv=!0;var b=d.pending;b===null?h.next=h:(h.next=b.next,b.next=h),d.pending=h}function jI(d,h,b){if((b&4194048)!==0){var S=h.lanes;S&=d.pendingLanes,b|=S,h.lanes=b,Wn(d,b)}}var ng={readContext:Dr,use:Uv,useCallback:bi,useContext:bi,useEffect:bi,useImperativeHandle:bi,useLayoutEffect:bi,useInsertionEffect:bi,useMemo:bi,useReducer:bi,useRef:bi,useState:bi,useDebugValue:bi,useDeferredValue:bi,useTransition:bi,useSyncExternalStore:bi,useId:bi,useHostTransitionStatus:bi,useFormState:bi,useActionState:bi,useOptimistic:bi,useMemoCache:bi,useCacheRefresh:bi};ng.useEffectEvent=bi;var UI={readContext:Dr,use:Uv,useCallback:function(d,h){return la().memoizedState=[d,h===void 0?null:h],d},useContext:Dr,useEffect:_I,useImperativeHandle:function(d,h,b){b=b!=null?b.concat([d]):null,zv(4194308,4,EI.bind(null,h,d),b)},useLayoutEffect:function(d,h){return zv(4194308,4,d,h)},useInsertionEffect:function(d,h){zv(4,2,d,h)},useMemo:function(d,h){var b=la();h=h===void 0?null:h;var S=d();if(wd){pt(!0);try{d()}finally{pt(!1)}}return b.memoizedState=[S,h],S},useReducer:function(d,h,b){var S=la();if(b!==void 0){var R=b(h);if(wd){pt(!0);try{b(h)}finally{pt(!1)}}}else R=h;return S.memoizedState=S.baseState=R,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:R},S.queue=d,d=d.dispatch=jee.bind(null,Qt,d),[S.memoizedState,d]},useRef:function(d){var h=la();return d={current:d},h.memoizedState=d},useState:function(d){d=sE(d);var h=d.queue,b=LI.bind(null,Qt,h);return h.dispatch=b,[d.memoizedState,b]},useDebugValue:cE,useDeferredValue:function(d,h){var b=la();return uE(b,d,h)},useTransition:function(){var d=sE(!1);return d=RI.bind(null,Qt,d.queue,!0,!1),la().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,h,b){var S=Qt,R=la();if(yn){if(b===void 0)throw Error(i(407));b=b()}else{if(b=h(),qn===null)throw Error(i(349));(gn&127)!==0||aI(S,h,b)}R.memoizedState=b;var D={value:b,getSnapshot:h};return R.queue=D,_I(oI.bind(null,S,D,d),[d]),S.flags|=2048,uh(9,{destroy:void 0},sI.bind(null,S,D,b,h),null),b},useId:function(){var d=la(),h=qn.identifierPrefix;if(yn){var b=Co,S=To;b=(S&~(1<<32-tt(S)-1)).toString(32)+b,h="_"+h+"R_"+b,b=Iv++,0<\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof S.is=="string"?$.createElement("select",{is:S.is}):$.createElement("select"),S.multiple?D.multiple=!0:S.size&&(D.size=S.size);break;default:D=typeof S.is=="string"?$.createElement(R,{is:S.is}):$.createElement(R)}}D[hi]=h,D[Ai]=S;e:for($=h.child;$!==null;){if($.tag===5||$.tag===6)D.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===h)break e;for(;$.sibling===null;){if($.return===null||$.return===h)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}h.stateNode=D;e:switch(Lr(D,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&xl(h)}}return ni(h),TE(h,h.type,d===null?null:d.memoizedProps,h.pendingProps,b),null;case 6:if(d&&h.stateNode!=null)d.memoizedProps!==S&&xl(h);else{if(typeof S!="string"&&h.stateNode===null)throw Error(i(166));if(d=ie.current,th(h)){if(d=h.stateNode,b=h.memoizedProps,S=null,R=kr,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}d[hi]=h,d=!!(d.nodeValue===b||S!==null&&S.suppressHydrationWarning===!0||iU(d.nodeValue,b)),d||Lc(h,!0)}else d=ly(d).createTextNode(S),d[hi]=h,h.stateNode=d}return ni(h),null;case 31:if(b=h.memoizedState,d===null||d.memoizedState!==null){if(S=th(h),b!==null){if(d===null){if(!S)throw Error(i(318));if(d=h.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(557));d[hi]=h}else gd(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;ni(h),d=!1}else b=jM(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=b),d=!0;if(!d)return h.flags&256?(Xa(h),h):(Xa(h),null);if((h.flags&128)!==0)throw Error(i(558))}return ni(h),null;case 13:if(S=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(R=th(h),S!==null&&S.dehydrated!==null){if(d===null){if(!R)throw Error(i(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(i(317));R[hi]=h}else gd(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;ni(h),R=!1}else R=jM(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Xa(h),h):(Xa(h),null)}return Xa(h),(h.flags&128)!==0?(h.lanes=b,h):(b=S!==null,d=d!==null&&d.memoizedState!==null,b&&(S=h.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),D=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(D=S.memoizedState.cachePool.pool),D!==R&&(S.flags|=2048)),b!==d&&b&&(h.child.flags|=8192),qv(h,h.updateQueue),ni(h),null);case 4:return pe(),d===null&&KE(h.stateNode.containerInfo),ni(h),null;case 10:return hl(h.type),ni(h),null;case 19:if(X(Ci),S=h.memoizedState,S===null)return ni(h),null;if(R=(h.flags&128)!==0,D=S.rendering,D===null)if(R)rg(S,!1);else{if(_i!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(D=Ov(d),D!==null){for(h.flags|=128,rg(S,!1),d=D.updateQueue,h.updateQueue=d,qv(h,d),h.subtreeFlags=0,d=b,b=h.child;b!==null;)LL(b,d),b=b.sibling;return ae(Ci,Ci.current&1|2),yn&&dl(h,S.treeForkCount),h.child}d=d.sibling}S.tail!==null&&O()>Qv&&(h.flags|=128,R=!0,rg(S,!1),h.lanes=4194304)}else{if(!R)if(d=Ov(D),d!==null){if(h.flags|=128,R=!0,d=d.updateQueue,h.updateQueue=d,qv(h,d),rg(S,!0),S.tail===null&&S.tailMode==="hidden"&&!D.alternate&&!yn)return ni(h),null}else 2*O()-S.renderingStartTime>Qv&&b!==536870912&&(h.flags|=128,R=!0,rg(S,!1),h.lanes=4194304);S.isBackwards?(D.sibling=h.child,h.child=D):(d=S.last,d!==null?d.sibling=D:h.child=D,S.last=D)}return S.tail!==null?(d=S.tail,S.rendering=d,S.tail=d.sibling,S.renderingStartTime=O(),d.sibling=null,b=Ci.current,ae(Ci,R?b&1|2:b&1),yn&&dl(h,S.treeForkCount),d):(ni(h),null);case 22:case 23:return Xa(h),YM(),S=h.memoizedState!==null,d!==null?d.memoizedState!==null!==S&&(h.flags|=8192):S&&(h.flags|=8192),S?(b&536870912)!==0&&(h.flags&128)===0&&(ni(h),h.subtreeFlags&6&&(h.flags|=8192)):ni(h),b=h.updateQueue,b!==null&&qv(h,b.retryQueue),b=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),S=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(S=h.memoizedState.cachePool.pool),S!==b&&(h.flags|=2048),d!==null&&X(yd),null;case 24:return b=null,d!==null&&(b=d.memoizedState.cache),h.memoizedState.cache!==b&&(h.flags|=2048),hl(Ii),ni(h),null;case 25:return null;case 30:return null}throw Error(i(156,h.tag))}function Hee(d,h){switch(LM(h),h.tag){case 1:return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return hl(Ii),pe(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 26:case 27:case 5:return ze(h),null;case 31:if(h.memoizedState!==null){if(Xa(h),h.alternate===null)throw Error(i(340));gd()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 13:if(Xa(h),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(i(340));gd()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return X(Ci),null;case 4:return pe(),null;case 10:return hl(h.type),null;case 22:case 23:return Xa(h),YM(),d!==null&&X(yd),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 24:return hl(Ii),null;case 25:return null;default:return null}}function lj(d,h){switch(LM(h),h.tag){case 3:hl(Ii),pe();break;case 26:case 27:case 5:ze(h);break;case 4:pe();break;case 31:h.memoizedState!==null&&Xa(h);break;case 13:Xa(h);break;case 19:X(Ci);break;case 10:hl(h.type);break;case 22:case 23:Xa(h),YM(),d!==null&&X(yd);break;case 24:hl(Ii)}}function ag(d,h){try{var b=h.updateQueue,S=b!==null?b.lastEffect:null;if(S!==null){var R=S.next;b=R;do{if((b.tag&d)===d){S=void 0;var D=b.create,$=b.inst;S=D(),$.destroy=S}b=b.next}while(b!==R)}}catch(ne){Dn(h,h.return,ne)}}function Hc(d,h,b){try{var S=h.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var D=R.next;S=D;do{if((S.tag&d)===d){var $=S.inst,ne=$.destroy;if(ne!==void 0){$.destroy=void 0,R=h;var _e=b,Fe=ne;try{Fe()}catch(Je){Dn(R,_e,Je)}}}S=S.next}while(S!==D)}}catch(Je){Dn(h,h.return,Je)}}function cj(d){var h=d.updateQueue;if(h!==null){var b=d.stateNode;try{JL(h,b)}catch(S){Dn(d,d.return,S)}}}function uj(d,h,b){b.props=Md(d.type,d.memoizedProps),b.state=d.memoizedState;try{b.componentWillUnmount()}catch(S){Dn(d,h,S)}}function sg(d,h){try{var b=d.ref;if(b!==null){switch(d.tag){case 26:case 27:case 5:var S=d.stateNode;break;case 30:S=d.stateNode;break;default:S=d.stateNode}typeof b=="function"?d.refCleanup=b(S):b.current=S}}catch(R){Dn(d,h,R)}}function No(d,h){var b=d.ref,S=d.refCleanup;if(b!==null)if(typeof S=="function")try{S()}catch(R){Dn(d,h,R)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch(R){Dn(d,h,R)}else b.current=null}function dj(d){var h=d.type,b=d.memoizedProps,S=d.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":b.autoFocus&&S.focus();break e;case"img":b.src?S.src=b.src:b.srcSet&&(S.srcset=b.srcSet)}}catch(R){Dn(d,d.return,R)}}function CE(d,h,b){try{var S=d.stateNode;ute(S,d.type,b,h),S[Ai]=h}catch(R){Dn(d,d.return,R)}}function fj(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&Kc(d.type)||d.tag===4}function NE(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||fj(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&Kc(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function RE(d,h,b){var S=d.tag;if(S===5||S===6)d=d.stateNode,h?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(d,h):(h=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,h.appendChild(d),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=ll));else if(S!==4&&(S===27&&Kc(d.type)&&(b=d.stateNode,h=null),d=d.child,d!==null))for(RE(d,h,b),d=d.sibling;d!==null;)RE(d,h,b),d=d.sibling}function Xv(d,h,b){var S=d.tag;if(S===5||S===6)d=d.stateNode,h?b.insertBefore(d,h):b.appendChild(d);else if(S!==4&&(S===27&&Kc(d.type)&&(b=d.stateNode),d=d.child,d!==null))for(Xv(d,h,b),d=d.sibling;d!==null;)Xv(d,h,b),d=d.sibling}function hj(d){var h=d.stateNode,b=d.memoizedProps;try{for(var S=d.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);Lr(h,S,b),h[hi]=d,h[Ai]=b}catch(D){Dn(d,d.return,D)}}var vl=!1,Fi=!1,PE=!1,pj=typeof WeakSet=="function"?WeakSet:Set,vr=null;function Vee(d,h){if(d=d.containerInfo,QE=my,d=AL(d),MM(d)){if("selectionStart"in d)var b={start:d.selectionStart,end:d.selectionEnd};else e:{b=(b=d.ownerDocument)&&b.defaultView||window;var S=b.getSelection&&b.getSelection();if(S&&S.rangeCount!==0){b=S.anchorNode;var R=S.anchorOffset,D=S.focusNode;S=S.focusOffset;try{b.nodeType,D.nodeType}catch{b=null;break e}var $=0,ne=-1,_e=-1,Fe=0,Je=0,st=d,Ve=null;t:for(;;){for(var Ye;st!==b||R!==0&&st.nodeType!==3||(ne=$+R),st!==D||S!==0&&st.nodeType!==3||(_e=$+S),st.nodeType===3&&($+=st.nodeValue.length),(Ye=st.firstChild)!==null;)Ve=st,st=Ye;for(;;){if(st===d)break t;if(Ve===b&&++Fe===R&&(ne=$),Ve===D&&++Je===S&&(_e=$),(Ye=st.nextSibling)!==null)break;st=Ve,Ve=st.parentNode}st=Ye}b=ne===-1||_e===-1?null:{start:ne,end:_e}}else b=null}b=b||{start:0,end:0}}else b=null;for(JE={focusedElem:d,selectionRange:b},my=!1,vr=h;vr!==null;)if(h=vr,d=h.child,(h.subtreeFlags&1028)!==0&&d!==null)d.return=h,vr=d;else for(;vr!==null;){switch(h=vr,D=h.alternate,d=h.flags,h.tag){case 0:if((d&4)!==0&&(d=h.updateQueue,d=d!==null?d.events:null,d!==null))for(b=0;b title"))),Lr(D,S,b),D[hi]=d,Te(D),S=D;break e;case"link":var $=bU("link","href",R).get(S+(b.href||""));if($){for(var ne=0;ne<$.length;ne++)if(D=$[ne],D.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&D.getAttribute("rel")===(b.rel==null?null:b.rel)&&D.getAttribute("title")===(b.title==null?null:b.title)&&D.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){$.splice(ne,1);break t}}D=R.createElement(S),Lr(D,S,b),R.head.appendChild(D);break;case"meta":if($=bU("meta","content",R).get(S+(b.content||""))){for(ne=0;ne<$.length;ne++)if(D=$[ne],D.getAttribute("content")===(b.content==null?null:""+b.content)&&D.getAttribute("name")===(b.name==null?null:b.name)&&D.getAttribute("property")===(b.property==null?null:b.property)&&D.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&D.getAttribute("charset")===(b.charSet==null?null:b.charSet)){$.splice(ne,1);break t}}D=R.createElement(S),Lr(D,S,b),R.head.appendChild(D);break;default:throw Error(i(468,S))}D[hi]=d,Te(D),S=D}d.stateNode=S}else _U(R,d.type,d.stateNode);else d.stateNode=yU(R,S,d.memoizedProps);else D!==S?(D===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):D.count--,S===null?_U(R,d.type,d.stateNode):yU(R,S,d.memoizedProps)):S===null&&d.stateNode!==null&&CE(d,d.memoizedProps,b.memoizedProps)}break;case 27:Aa(h,d),Ta(d),S&512&&(Fi||b===null||No(b,b.return)),b!==null&&S&4&&CE(d,d.memoizedProps,b.memoizedProps);break;case 5:if(Aa(h,d),Ta(d),S&512&&(Fi||b===null||No(b,b.return)),d.flags&32){R=d.stateNode;try{Ao(R,"")}catch(Nt){Dn(d,d.return,Nt)}}S&4&&d.stateNode!=null&&(R=d.memoizedProps,CE(d,R,b!==null?b.memoizedProps:R)),S&1024&&(PE=!0);break;case 6:if(Aa(h,d),Ta(d),S&4){if(d.stateNode===null)throw Error(i(162));S=d.memoizedProps,b=d.stateNode;try{b.nodeValue=S}catch(Nt){Dn(d,d.return,Nt)}}break;case 3:if(dy=null,R=to,to=cy(h.containerInfo),Aa(h,d),to=R,Ta(d),S&4&&b!==null&&b.memoizedState.isDehydrated)try{Sh(h.containerInfo)}catch(Nt){Dn(d,d.return,Nt)}PE&&(PE=!1,_j(d));break;case 4:S=to,to=cy(d.stateNode.containerInfo),Aa(h,d),Ta(d),to=S;break;case 12:Aa(h,d),Ta(d);break;case 31:Aa(h,d),Ta(d),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Kv(d,S)));break;case 13:Aa(h,d),Ta(d),d.child.flags&8192&&d.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(Zv=O()),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Kv(d,S)));break;case 22:R=d.memoizedState!==null;var _e=b!==null&&b.memoizedState!==null,Fe=vl,Je=Fi;if(vl=Fe||R,Fi=Je||_e,Aa(h,d),Fi=Je,vl=Fe,Ta(d),S&8192)e:for(h=d.stateNode,h._visibility=R?h._visibility&-2:h._visibility|1,R&&(b===null||_e||vl||Fi||Ed(d)),b=null,h=d;;){if(h.tag===5||h.tag===26){if(b===null){_e=b=h;try{if(D=_e.stateNode,R)$=D.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{ne=_e.stateNode;var st=_e.memoizedProps.style,Ve=st!=null&&st.hasOwnProperty("display")?st.display:null;ne.style.display=Ve==null||typeof Ve=="boolean"?"":(""+Ve).trim()}}catch(Nt){Dn(_e,_e.return,Nt)}}}else if(h.tag===6){if(b===null){_e=h;try{_e.stateNode.nodeValue=R?"":_e.memoizedProps}catch(Nt){Dn(_e,_e.return,Nt)}}}else if(h.tag===18){if(b===null){_e=h;try{var Ye=_e.stateNode;R?uU(Ye,!0):uU(_e.stateNode,!1)}catch(Nt){Dn(_e,_e.return,Nt)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;b===h&&(b=null),h=h.return}b===h&&(b=null),h.sibling.return=h.return,h=h.sibling}S&4&&(S=d.updateQueue,S!==null&&(b=S.retryQueue,b!==null&&(S.retryQueue=null,Kv(d,b))));break;case 19:Aa(h,d),Ta(d),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Kv(d,S)));break;case 30:break;case 21:break;default:Aa(h,d),Ta(d)}}function Ta(d){var h=d.flags;if(h&2){try{for(var b,S=d.return;S!==null;){if(fj(S)){b=S;break}S=S.return}if(b==null)throw Error(i(160));switch(b.tag){case 27:var R=b.stateNode,D=NE(d);Xv(d,D,R);break;case 5:var $=b.stateNode;b.flags&32&&(Ao($,""),b.flags&=-33);var ne=NE(d);Xv(d,ne,$);break;case 3:case 4:var _e=b.stateNode.containerInfo,Fe=NE(d);RE(d,Fe,_e);break;default:throw Error(i(161))}}catch(Je){Dn(d,d.return,Je)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function _j(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var h=d;_j(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),d=d.sibling}}function bl(d,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)mj(d,h.alternate,h),h=h.sibling}function Ed(d){for(d=d.child;d!==null;){var h=d;switch(h.tag){case 0:case 11:case 14:case 15:Hc(4,h,h.return),Ed(h);break;case 1:No(h,h.return);var b=h.stateNode;typeof b.componentWillUnmount=="function"&&uj(h,h.return,b),Ed(h);break;case 27:mg(h.stateNode);case 26:case 5:No(h,h.return),Ed(h);break;case 22:h.memoizedState===null&&Ed(h);break;case 30:Ed(h);break;default:Ed(h)}d=d.sibling}}function _l(d,h,b){for(b=b&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var S=h.alternate,R=d,D=h,$=D.flags;switch(D.tag){case 0:case 11:case 15:_l(R,D,b),ag(4,D);break;case 1:if(_l(R,D,b),S=D,R=S.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(Fe){Dn(S,S.return,Fe)}if(S=D,R=S.updateQueue,R!==null){var ne=S.stateNode;try{var _e=R.shared.hiddenCallbacks;if(_e!==null)for(R.shared.hiddenCallbacks=null,R=0;R<_e.length;R++)QL(_e[R],ne)}catch(Fe){Dn(S,S.return,Fe)}}b&&$&64&&cj(D),sg(D,D.return);break;case 27:hj(D);case 26:case 5:_l(R,D,b),b&&S===null&&$&4&&dj(D),sg(D,D.return);break;case 12:_l(R,D,b);break;case 31:_l(R,D,b),b&&$&4&&vj(R,D);break;case 13:_l(R,D,b),b&&$&4&&yj(R,D);break;case 22:D.memoizedState===null&&_l(R,D,b),sg(D,D.return);break;case 30:break;default:_l(R,D,b)}h=h.sibling}}function kE(d,h){var b=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),d=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(d=h.memoizedState.cachePool.pool),d!==b&&(d!=null&&d.refCount++,b!=null&&Wm(b))}function DE(d,h){d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&Wm(d))}function no(d,h,b,S){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)Sj(d,h,b,S),h=h.sibling}function Sj(d,h,b,S){var R=h.flags;switch(h.tag){case 0:case 11:case 15:no(d,h,b,S),R&2048&&ag(9,h);break;case 1:no(d,h,b,S);break;case 3:no(d,h,b,S),R&2048&&(d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&Wm(d)));break;case 12:if(R&2048){no(d,h,b,S),d=h.stateNode;try{var D=h.memoizedProps,$=D.id,ne=D.onPostCommit;typeof ne=="function"&&ne($,h.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(_e){Dn(h,h.return,_e)}}else no(d,h,b,S);break;case 31:no(d,h,b,S);break;case 13:no(d,h,b,S);break;case 23:break;case 22:D=h.stateNode,$=h.alternate,h.memoizedState!==null?D._visibility&2?no(d,h,b,S):og(d,h):D._visibility&2?no(d,h,b,S):(D._visibility|=2,dh(d,h,b,S,(h.subtreeFlags&10256)!==0||!1)),R&2048&&kE($,h);break;case 24:no(d,h,b,S),R&2048&&DE(h.alternate,h);break;default:no(d,h,b,S)}}function dh(d,h,b,S,R){for(R=R&&((h.subtreeFlags&10256)!==0||!1),h=h.child;h!==null;){var D=d,$=h,ne=b,_e=S,Fe=$.flags;switch($.tag){case 0:case 11:case 15:dh(D,$,ne,_e,R),ag(8,$);break;case 23:break;case 22:var Je=$.stateNode;$.memoizedState!==null?Je._visibility&2?dh(D,$,ne,_e,R):og(D,$):(Je._visibility|=2,dh(D,$,ne,_e,R)),R&&Fe&2048&&kE($.alternate,$);break;case 24:dh(D,$,ne,_e,R),R&&Fe&2048&&DE($.alternate,$);break;default:dh(D,$,ne,_e,R)}h=h.sibling}}function og(d,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var b=d,S=h,R=S.flags;switch(S.tag){case 22:og(b,S),R&2048&&kE(S.alternate,S);break;case 24:og(b,S),R&2048&&DE(S.alternate,S);break;default:og(b,S)}h=h.sibling}}var lg=8192;function fh(d,h,b){if(d.subtreeFlags&lg)for(d=d.child;d!==null;)wj(d,h,b),d=d.sibling}function wj(d,h,b){switch(d.tag){case 26:fh(d,h,b),d.flags&lg&&d.memoizedState!==null&&Rte(b,to,d.memoizedState,d.memoizedProps);break;case 5:fh(d,h,b);break;case 3:case 4:var S=to;to=cy(d.stateNode.containerInfo),fh(d,h,b),to=S;break;case 22:d.memoizedState===null&&(S=d.alternate,S!==null&&S.memoizedState!==null?(S=lg,lg=16777216,fh(d,h,b),lg=S):fh(d,h,b));break;default:fh(d,h,b)}}function Mj(d){var h=d.alternate;if(h!==null&&(d=h.child,d!==null)){h.child=null;do h=d.sibling,d.sibling=null,d=h;while(d!==null)}}function cg(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var b=0;bUn&&($=Un,Un=Bt,Bt=$);var De=ML(ne,Bt),Ee=ML(ne,Un);if(De&&Ee&&(Ye.rangeCount!==1||Ye.anchorNode!==De.node||Ye.anchorOffset!==De.offset||Ye.focusNode!==Ee.node||Ye.focusOffset!==Ee.offset)){var Ue=st.createRange();Ue.setStart(De.node,De.offset),Ye.removeAllRanges(),Bt>Un?(Ye.addRange(Ue),Ye.extend(Ee.node,Ee.offset)):(Ue.setEnd(Ee.node,Ee.offset),Ye.addRange(Ue))}}}}for(st=[],Ye=ne;Ye=Ye.parentNode;)Ye.nodeType===1&&st.push({element:Ye,left:Ye.scrollLeft,top:Ye.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neb?32:b,V.T=null,b=UE,UE=null;var D=Wc,$=wl;if(Ji=0,mh=Wc=null,wl=0,(Cn&6)!==0)throw Error(i(331));var ne=Cn;if(Cn|=4,Ej(D.current),Sj(D,D.current,$,b),Cn=ne,fg(0,!1),Re&&typeof Re.onPostCommitFiberRoot=="function")try{Re.onPostCommitFiberRoot(Ie,D)}catch{}return!0}finally{G.p=R,V.T=S,Vj(d,h)}}function Gj(d,h,b){h=gs(b,h),h=xE(d.stateNode,h,2),d=Fc(d,h,2),d!==null&&(on(d,2),Ro(d))}function Dn(d,h,b){if(d.tag===3)Gj(d,d,b);else for(;h!==null;){if(h.tag===3){Gj(h,d,b);break}else if(h.tag===1){var S=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Gc===null||!Gc.has(S))){d=gs(b,d),b=WI(2),S=Fc(h,b,2),S!==null&&(qI(b,S,h,d),on(S,2),Ro(S));break}}h=h.return}}function HE(d,h,b){var S=d.pingCache;if(S===null){S=d.pingCache=new Wee;var R=new Set;S.set(h,R)}else R=S.get(h),R===void 0&&(R=new Set,S.set(h,R));R.has(b)||(OE=!0,R.add(b),d=Zee.bind(null,d,h,b),h.then(d,d))}function Zee(d,h,b){var S=d.pingCache;S!==null&&S.delete(h),d.pingedLanes|=d.suspendedLanes&b,d.warmLanes&=~b,qn===d&&(gn&b)===b&&(_i===4||_i===3&&(gn&62914560)===gn&&300>O()-Zv?(Cn&2)===0&&gh(d,0):LE|=b,ph===gn&&(ph=0)),Ro(d)}function Wj(d,h){h===0&&(h=bt()),d=pd(d,h),d!==null&&(on(d,h),Ro(d))}function Qee(d){var h=d.memoizedState,b=0;h!==null&&(b=h.retryLane),Wj(d,b)}function Jee(d,h){var b=0;switch(d.tag){case 31:case 13:var S=d.stateNode,R=d.memoizedState;R!==null&&(b=R.retryLane);break;case 19:S=d.stateNode;break;case 22:S=d.stateNode._retryCache;break;default:throw Error(i(314))}S!==null&&S.delete(h),Wj(d,b)}function ete(d,h){return ke(d,h)}var ry=null,vh=null,VE=!1,ay=!1,$E=!1,Xc=0;function Ro(d){d!==vh&&d.next===null&&(vh===null?ry=vh=d:vh=vh.next=d),ay=!0,VE||(VE=!0,nte())}function fg(d,h){if(!$E&&ay){$E=!0;do for(var b=!1,S=ry;S!==null;){if(d!==0){var R=S.pendingLanes;if(R===0)var D=0;else{var $=S.suspendedLanes,ne=S.pingedLanes;D=(1<<31-tt(42|d)+1)-1,D&=R&~($&~ne),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(b=!0,Yj(S,D))}else D=gn,D=ge(S,S===qn?D:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(D&3)===0||Be(S,D)||(b=!0,Yj(S,D));S=S.next}while(b);$E=!1}}function tte(){qj()}function qj(){ay=VE=!1;var d=0;Xc!==0&&fte()&&(d=Xc);for(var h=O(),b=null,S=ry;S!==null;){var R=S.next,D=Xj(S,h);D===0?(S.next=null,b===null?ry=R:b.next=R,R===null&&(vh=b)):(b=S,(d!==0||(D&3)!==0)&&(ay=!0)),S=R}Ji!==0&&Ji!==5||fg(d),Xc!==0&&(Xc=0)}function Xj(d,h){for(var b=d.suspendedLanes,S=d.pingedLanes,R=d.expirationTimes,D=d.pendingLanes&-62914561;0ne)break;var Je=_e.transferSize,st=_e.initiatorType;Je&&rU(st)&&(_e=_e.responseEnd,$+=Je*(_e"u"?null:document;function gU(d,h,b){var S=yh;if(S&&typeof h=="string"&&h){var R=Nn(h);R='link[rel="'+d+'"][href="'+R+'"]',typeof b=="string"&&(R+='[crossorigin="'+b+'"]'),mU.has(R)||(mU.add(R),d={rel:d,crossOrigin:b,href:h},S.querySelector(R)===null&&(h=S.createElement("link"),Lr(h,"link",d),Te(h),S.head.appendChild(h)))}}function _te(d){Ml.D(d),gU("dns-prefetch",d,null)}function Ste(d,h){Ml.C(d,h),gU("preconnect",d,h)}function wte(d,h,b){Ml.L(d,h,b);var S=yh;if(S&&d&&h){var R='link[rel="preload"][as="'+Nn(h)+'"]';h==="image"&&b&&b.imageSrcSet?(R+='[imagesrcset="'+Nn(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&(R+='[imagesizes="'+Nn(b.imageSizes)+'"]')):R+='[href="'+Nn(d)+'"]';var D=R;switch(h){case"style":D=bh(d);break;case"script":D=_h(d)}Ss.has(D)||(d=f({rel:"preload",href:h==="image"&&b&&b.imageSrcSet?void 0:d,as:h},b),Ss.set(D,d),S.querySelector(R)!==null||h==="style"&&S.querySelector(gg(D))||h==="script"&&S.querySelector(xg(D))||(h=S.createElement("link"),Lr(h,"link",d),Te(h),S.head.appendChild(h)))}}function Mte(d,h){Ml.m(d,h);var b=yh;if(b&&d){var S=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Nn(S)+'"][href="'+Nn(d)+'"]',D=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=_h(d)}if(!Ss.has(D)&&(d=f({rel:"modulepreload",href:d},h),Ss.set(D,d),b.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(xg(D)))return}S=b.createElement("link"),Lr(S,"link",d),Te(S),b.head.appendChild(S)}}}function Ete(d,h,b){Ml.S(d,h,b);var S=yh;if(S&&d){var R=Ce(S).hoistableStyles,D=bh(d);h=h||"default";var $=R.get(D);if(!$){var ne={loading:0,preload:null};if($=S.querySelector(gg(D)))ne.loading=5;else{d=f({rel:"stylesheet",href:d,"data-precedence":h},b),(b=Ss.get(D))&&sA(d,b);var _e=$=S.createElement("link");Te(_e),Lr(_e,"link",d),_e._p=new Promise(function(Fe,Je){_e.onload=Fe,_e.onerror=Je}),_e.addEventListener("load",function(){ne.loading|=1}),_e.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,uy($,h,S)}$={type:"stylesheet",instance:$,count:1,state:ne},R.set(D,$)}}}function Ate(d,h){Ml.X(d,h);var b=yh;if(b&&d){var S=Ce(b).hoistableScripts,R=_h(d),D=S.get(R);D||(D=b.querySelector(xg(R)),D||(d=f({src:d,async:!0},h),(h=Ss.get(R))&&oA(d,h),D=b.createElement("script"),Te(D),Lr(D,"link",d),b.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(R,D))}}function Tte(d,h){Ml.M(d,h);var b=yh;if(b&&d){var S=Ce(b).hoistableScripts,R=_h(d),D=S.get(R);D||(D=b.querySelector(xg(R)),D||(d=f({src:d,async:!0,type:"module"},h),(h=Ss.get(R))&&oA(d,h),D=b.createElement("script"),Te(D),Lr(D,"link",d),b.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(R,D))}}function xU(d,h,b,S){var R=(R=ie.current)?cy(R):null;if(!R)throw Error(i(446));switch(d){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(h=bh(b.href),b=Ce(R).hoistableStyles,S=b.get(h),S||(S={type:"style",instance:null,count:0,state:null},b.set(h,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){d=bh(b.href);var D=Ce(R).hoistableStyles,$=D.get(d);if($||(R=R.ownerDocument||R,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(d,$),(D=R.querySelector(gg(d)))&&!D._p&&($.instance=D,$.state.loading=5),Ss.has(d)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},Ss.set(d,b),D||Cte(R,d,b,$.state))),h&&S===null)throw Error(i(528,""));return $}if(h&&S!==null)throw Error(i(529,""));return null;case"script":return h=b.async,b=b.src,typeof b=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=_h(b),b=Ce(R).hoistableScripts,S=b.get(h),S||(S={type:"script",instance:null,count:0,state:null},b.set(h,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,d))}}function bh(d){return'href="'+Nn(d)+'"'}function gg(d){return'link[rel="stylesheet"]['+d+"]"}function vU(d){return f({},d,{"data-precedence":d.precedence,precedence:null})}function Cte(d,h,b,S){d.querySelector('link[rel="preload"][as="style"]['+h+"]")?S.loading=1:(h=d.createElement("link"),S.preload=h,h.addEventListener("load",function(){return S.loading|=1}),h.addEventListener("error",function(){return S.loading|=2}),Lr(h,"link",b),Te(h),d.head.appendChild(h))}function _h(d){return'[src="'+Nn(d)+'"]'}function xg(d){return"script[async]"+d}function yU(d,h,b){if(h.count++,h.instance===null)switch(h.type){case"style":var S=d.querySelector('style[data-href~="'+Nn(b.href)+'"]');if(S)return h.instance=S,Te(S),S;var R=f({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return S=(d.ownerDocument||d).createElement("style"),Te(S),Lr(S,"style",R),uy(S,b.precedence,d),h.instance=S;case"stylesheet":R=bh(b.href);var D=d.querySelector(gg(R));if(D)return h.state.loading|=4,h.instance=D,Te(D),D;S=vU(b),(R=Ss.get(R))&&sA(S,R),D=(d.ownerDocument||d).createElement("link"),Te(D);var $=D;return $._p=new Promise(function(ne,_e){$.onload=ne,$.onerror=_e}),Lr(D,"link",S),h.state.loading|=4,uy(D,b.precedence,d),h.instance=D;case"script":return D=_h(b.src),(R=d.querySelector(xg(D)))?(h.instance=R,Te(R),R):(S=b,(R=Ss.get(D))&&(S=f({},b),oA(S,R)),d=d.ownerDocument||d,R=d.createElement("script"),Te(R),Lr(R,"link",S),d.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(i(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(S=h.instance,h.state.loading|=4,uy(S,b.precedence,d));return h.instance}function uy(d,h,b){for(var S=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,D=R,$=0;$ title"):null)}function Nte(d,h,b){if(b===1||h.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return d=h.disabled,typeof h.precedence=="string"&&d==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function SU(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}function Rte(d,h,b,S){if(b.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(b.state.loading&4)===0){if(b.instance===null){var R=bh(S.href),D=h.querySelector(gg(R));if(D){h=D._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(d.count++,d=fy.bind(d),h.then(d,d)),b.state.loading|=4,b.instance=D,Te(D);return}D=h.ownerDocument||h,S=vU(S),(R=Ss.get(R))&&sA(S,R),D=D.createElement("link"),Te(D);var $=D;$._p=new Promise(function(ne,_e){$.onload=ne,$.onerror=_e}),Lr(D,"link",S),b.instance=D}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(b,h),(h=b.state.preload)&&(b.state.loading&3)===0&&(d.count++,b=fy.bind(d),h.addEventListener("load",b),h.addEventListener("error",b))}}var lA=0;function Pte(d,h){return d.stylesheets&&d.count===0&&py(d,d.stylesheets),0lA?50:800)+h);return d.unsuspend=b,function(){d.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function fy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)py(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var hy=null;function py(d,h){d.stylesheets=null,d.unsuspend!==null&&(d.count++,hy=new Map,h.forEach(kte,d),hy=null,fy.call(d))}function kte(d,h){if(!(h.state.loading&4)){var b=hy.get(d);if(b)var S=b.get(null);else{b=new Map,hy.set(d,b);for(var R=d.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),xA.exports=Kte(),xA.exports}var Zte=Yte();const Vt=t=>typeof t=="string",Mg=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},WU=t=>t==null?"":""+t,Qte=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},Jte=/###/g,qU=t=>t&&t.indexOf("###")>-1?t.replace(Jte,"."):t,XU=t=>!t||Vt(t),ox=(t,e,n)=>{const i=Vt(e)?e.split("."):e;let r=0;for(;r{const{obj:i,k:r}=ox(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=ox(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=ox(t,s,Object),o?.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n},ene=(t,e,n,i)=>{const{obj:r,k:a}=ox(t,e,Object);r[a]=r[a]||[],r[a].push(n)},T_=(t,e)=>{const{obj:n,k:i}=ox(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},tne=(t,e,n)=>{const i=T_(t,n);return i!==void 0?i:T_(e,n)},iG=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?Vt(t[i])||t[i]instanceof String||Vt(e[i])||e[i]instanceof String?n&&(t[i]=e[i]):iG(t[i],e[i],n):t[i]=e[i]);return t},wh=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var nne={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ine=t=>Vt(t)?t.replace(/[&<>"'\/]/g,e=>nne[e]):t;class rne{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const ane=[" ",",","?","!",";"],sne=new rne(20),one=(t,e,n)=>{e=e||"",n=n||"";const i=ane.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=sne.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a},sN=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const i=e.split(n);let r=t;for(let a=0;a-1&&lt?.replace("_","-"),lne={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class C_{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||lne,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(Vt(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new C_(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new C_(this.logger,e)}}var Bo=new C_;let jS=class{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,a])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(e,n,i,r={}){const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):Vt(i)&&a?o.push(...i.split(a)):o.push(i)));const l=T_(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||!Vt(i)?l:sN(this.data?.[e]?.[n],i,a)}addResource(e,n,i,r,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),KU(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i,r={silent:!1}){for(const a in i)(Vt(i[a])||Array.isArray(i[a]))&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a,s={silent:!1,skipCopy:!1}){let o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=T_(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?iG(l,i,a):l={...l,...i},KU(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var rG={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{e=this.processors[a]?.process(e,n,i,r)??e}),e}};const aG=Symbol("i18next/PATH_KEY");function cne(){const t=[],e=Object.create(null);let n;return e.get=(i,r)=>(n?.revoke?.(),r===aG?t:(t.push(r),n=Proxy.revocable(i,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function oN(t,e){const{[aG]:n}=t(cne());return n.join(e?.keySeparator??".")}const ZU={},_A=t=>!Vt(t)&&typeof t!="boolean"&&typeof t!="number";class N_ extends jS{constructor(e,n={}){super(),Qte(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Bo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const i={...n};if(e==null)return!1;const r=this.resolve(e,i);if(r?.res===void 0)return!1;const a=_A(r.res);return!(i.returnObjects===!1&&a)}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!one(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:Vt(a)?[a]:a};const c=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(r)}return{key:e,namespaces:Vt(a)?[a]:a}}translate(e,n,i){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=oN(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],r),c=l[l.length-1];let u=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=r.lng||this.language,m=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${u}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:o;const g=this.resolve(e,r);let y=g?.res;const _=g?.usedKey||o,v=g?.exactUsedKey||o,x=["[object Number]","[object Function]","[object RegExp]"],M=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E=r.count!==void 0&&!Vt(r.count),T=N_.hasDefaultValue(r),P=E?this.pluralResolver.getSuffix(f,r.count,r):"",N=r.ordinal&&E?this.pluralResolver.getSuffix(f,r.count,{ordinal:!1}):"",j=E&&!r.ordinal&&r.count===0,C=j&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${P}`]||r[`defaultValue${N}`]||r.defaultValue;let k=y;w&&!y&&T&&(k=C);const F=_A(k),I=Object.prototype.toString.apply(k);if(w&&k&&F&&x.indexOf(I)<0&&!(Vt(M)&&Array.isArray(k))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,k,{...r,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(g.res=q,g.usedParams=this.getUsedParamsDetails(r),g):q}if(s){const q=Array.isArray(k),L=q?[]:{},H=q?v:_;for(const V in k)if(Object.prototype.hasOwnProperty.call(k,V)){const G=`${H}${s}${V}`;T&&!y?L[V]=this.translate(G,{...r,defaultValue:_A(C)?C[V]:void 0,joinArrays:!1,ns:l}):L[V]=this.translate(G,{...r,joinArrays:!1,ns:l}),L[V]===G&&(L[V]=k[V])}y=L}}else if(w&&Vt(M)&&Array.isArray(y))y=y.join(M),y&&(y=this.extendTranslation(y,e,r,i));else{let q=!1,L=!1;!this.isValidLookup(y)&&T&&(q=!0,y=C),this.isValidLookup(y)||(L=!0,y=o);const V=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:y,G=T&&C!==y&&this.options.updateMissing;if(L||q||G){if(this.logger.log(G?"updateKey":"missingKey",f,c,o,G?C:y),s){const B=this.resolve(o,{...r,keySeparator:!1});B&&B.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 K=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let B=0;B{const ce=T&&ae!==y?ae:V;this.options.missingKeyHandler?this.options.missingKeyHandler(B,c,X,ce,G,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(B,c,X,ce,G,r),this.emit("missingKey",B,c,X,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?K.forEach(B=>{const X=this.pluralResolver.getSuffixes(B,r);j&&r[`defaultValue${this.options.pluralSeparator}zero`]&&X.indexOf(`${this.options.pluralSeparator}zero`)<0&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(ae=>{se([B],o+ae,r[`defaultValue${ae}`]||C)})}):se(K,o,C))}y=this.extendTranslation(y,e,r,g,i),L&&y===o&&this.options.appendNamespaceToMissingKey&&(y=`${c}${u}${o}`),(L||q)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,q?y:void 0,r))}return a?(g.res=y,g.usedParams=this.getUsedParamsDetails(r),g):y}extendTranslation(e,n,i,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=Vt(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let u=i.replace&&!Vt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,i.lng||this.language||r.usedLng,i),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;ca?.[0]===f[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),i)),i.interpolation&&this.interpolator.reset()}const s=i.postProcess||this.options.postProcess,o=Vt(s)?[s]:s;return e!=null&&o?.length&&i.applyPostProcessor!==!1&&(e=rG.handle(o,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,n={}){let i,r,a,s,o;return Vt(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(l,n),u=c.key;r=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Vt(n.count),g=m&&!n.ordinal&&n.count===0,y=n.context!==void 0&&(Vt(n.context)||typeof n.context=="number")&&n.context!=="",_=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{this.isValidLookup(i)||(o=v,!ZU[`${_[0]}-${v}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(ZU[`${_[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${_.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),_.forEach(x=>{if(this.isValidLookup(i))return;s=x;const M=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(M,u,x,v,n);else{let E;m&&(E=this.pluralResolver.getSuffix(x,n.count,n));const T=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&E.indexOf(P)===0&&M.push(u+E.replace(P,this.options.pluralSeparator)),M.push(u+E),g&&M.push(u+T)),y){const N=`${u}${this.options.contextSeparator||"_"}${n.context}`;M.push(N),m&&(n.ordinal&&E.indexOf(P)===0&&M.push(N+E.replace(P,this.options.pluralSeparator)),M.push(N+E),g&&M.push(N+T))}}let w;for(;w=M.pop();)this.isValidLookup(i)||(a=w,i=this.getResource(x,v,w,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!Vt(e.replace);let r=i?e.replace:e;if(i&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}class QU{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Bo.create("languageUtils")}getScriptPartFromCode(e){if(e=Rx(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Rx(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Vt(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return n=r;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&(s.indexOf("-")>0&&a.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===a||s.indexOf(a)===0&&a.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Vt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Vt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Vt(e)&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}const JU={zero:0,one:1,two:2,few:3,many:4,other:5},e4={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class une{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Bo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const i=Rx(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(i,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),e4;if(!e.match(/-|_/))return e4;const l=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(l,n)}return this.pluralRulesCache[a]=s,s}needsPlural(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,i={}){return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((r,a)=>JU[r]-JU[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,n,i={}){const r=this.getRule(e,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,i))}}const t4=(t,e,n,i=".",r=!0)=>{let a=tne(t,e,n);return!a&&r&&Vt(n)&&(a=sN(t,n,i),a===void 0&&(a=sN(e,n,i))),a},SA=t=>t.replace(/\$/g,"$$$$");class dne{constructor(e={}){this.logger=Bo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:a,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:y,nestingSuffixEscaped:_,nestingOptionsSeparator:v,maxReplaces:x,alwaysFormat:M}=e.interpolation;this.escape=n!==void 0?n:ine,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=a?wh(a):s||"{{",this.suffix=o?wh(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=m?wh(m):g||wh("$t("),this.nestingSuffix=y?wh(y):_||wh(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=x||1e3,this.alwaysFormat=M!==void 0?M:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n?.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const x=t4(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...r,...n,interpolationkey:g}):x}const y=g.split(this.formatSeparator),_=y.shift().trim(),v=y.join(this.formatSeparator).trim();return this.format(t4(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),v,i,{...r,...n,interpolationkey:_})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>SA(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?SA(this.escape(g)):SA(g)}].forEach(g=>{for(o=0;a=g.regex.exec(e);){const y=a[1].trim();if(s=c(y),s===void 0)if(typeof u=="function"){const v=u(e,a,r);s=Vt(v)?v:""}else if(r&&Object.prototype.hasOwnProperty.call(r,y))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),s="";else!Vt(s)&&!this.useRawValueToEscape&&(s=WU(s));const _=g.safeValue(s);if(e=e.replace(a[0],_),f?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n,i={}){let r,a,s;const o=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,s);const g=m.match(/'/g),y=m.match(/"/g);((g?.length??0)%2===0&&!y||y.length%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),c&&(s={...c,...s})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,_),`${l}${u}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&!Vt(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(l=r[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&!Vt(a))return a;Vt(a)||(a=WU(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((u,f)=>this.format(u,f,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const fne=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.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:e,formatOptions:n}},n4=t=>{const e={};return(n,i,r)=>{let a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a={...a,[r.interpolationkey]:void 0});const s=i+JSON.stringify(a);let o=e[s];return o||(o=t(Rx(i),r),e[s]=o),o(n)}},hne=t=>(e,n,i)=>t(Rx(n),i)(e);class pne{constructor(e={}){this.logger=Bo.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?n4:hne;this.formats={number:i((r,a)=>{const s=new Intl.NumberFormat(r,{...a});return o=>s.format(o)}),currency:i((r,a)=>{const s=new Intl.NumberFormat(r,{...a,style:"currency"});return o=>s.format(o)}),datetime:i((r,a)=>{const s=new Intl.DateTimeFormat(r,{...a});return o=>s.format(o)}),relativetime:i((r,a)=>{const s=new Intl.RelativeTimeFormat(r,{...a});return o=>s.format(o,a.range||"day")}),list:i((r,a)=>{const s=new Intl.ListFormat(r,{...a});return o=>s.format(o)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=n4(n)}format(e,n,i,r={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(o=>o.indexOf(")")>-1)){const o=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,l)=>{const{formatName:c,formatOptions:u}=fne(l);if(this.formats[c]){let f=o;try{const m=r?.formatParams?.[r.interpolationkey]||{},g=m.locale||m.lng||r.locale||r.lng||i;f=this.formats[c](o,g,{...u,...r,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const mne=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class gne extends jS{constructor(e,n,i,r={}){super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Bo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(c=>{let u=!0;n.forEach(f=>{const m=`${c}|${f}`;!i.reload&&this.store.hasResourceBundle(c,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,u=!1,s[m]===void 0&&(s[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(o[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),!n&&i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{ene(l.loaded,[a],s),mne(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{o[c][f]===void 0&&(o[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i,r=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&r{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(c,u)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const c=l(e,n);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,n,o)}prepareLoading(e,n,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Vt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Vt(n)&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e,n=""){const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a,s={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" 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(!(i==null||i==="")){if(this.backend?.create){const l={...s,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,n,i,r,l):u=c(e,n,i,r),u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}else c(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const i4=()=>({debug:!1,initAsync:!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:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Vt(t[1])&&(e.defaultValue=t[1]),Vt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),r4=t=>(Vt(t.ns)&&(t.ns=[t.ns]),Vt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Vt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),wy=()=>{},xne=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class lx extends jS{constructor(e={},n){if(super(),this.options=r4(e),this.services={},this.logger=Bo,this.modules={external:[]},xne(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(Vt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=i4();this.options={...i,...this.options,...r4(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Bo.init(r(this.modules.logger),this.options):Bo.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=pne;const u=new QU(this.options);this.store=new YU(this.options.resources,this.options);const f=this.services;f.logger=Bo,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new une(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=r(c),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new dne(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new gne(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(g,...y)=>{this.emit(g,...y)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new N_(this.services,this.options),this.translator.on("*",(g,...y)=>{this.emit(g,...y)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=wy),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const o=Mg(),l=()=>{const c=(u,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),o.resolve(f),n(u,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,n=wy){let i=n;const r=Vt(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload?.forEach?.(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=Mg();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=wy),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&rG.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const i=Mg();this.emit("languageChanging",e);const r=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{!e&&!o&&this.services.languageDetector&&(o=[]);const l=Vt(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Vt(o)?[o]:o);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{a(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&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(e),i}getFixedT(e,n,i){const r=(a,s,...o)=>{let l;typeof s!="object"?l=this.options.overloadTranslationOptionHandler([a,s].concat(o)):l={...s},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||r.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(a)?u=a.map(f=>(typeof f=="function"&&(f=oN(f,{...this.options,...s})),`${l.keyPrefix}${c}${f}`)):(typeof a=="function"&&(a=oN(a,{...this.options,...s})),u=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a),this.t(u,l)};return Vt(e)?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=i,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){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 i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=Mg();return this.options.ns?(Vt(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Mg();Vt(e)&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const a=r.getTextInfo();if(a&&a.direction)return a.direction}}catch{}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"],i=this.services?.languageUtils||new QU(i4());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const i=new lx(e,n);return i.createInstance=lx.createInstance,i}cloneInstance(e={},n=wy){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new lx(r);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,f)=>(u[f]={...l[c][f]},u),l[c]),l),{});a.store=new YU(o,r),a.services.resourceStore=a.store}return a.translator=new N_(a.services,r),a.translator.on("*",(o,...l)=>{a.emit(o,...l)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const wa=lx.createInstance();wa.createInstance;wa.dir;wa.init;wa.loadResources;wa.reloadResources;wa.use;wa.changeLanguage;wa.getFixedT;wa.t;wa.exists;wa.setDefaultNamespace;wa.hasLoadedNamespace;wa.loadNamespaces;wa.loadLanguages;const vne=(t,e,n,i)=>{const r=[n,{code:e,...i||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(r,"warn","react-i18next::",!0);vf(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...r):console?.warn&&console.warn(...r)},a4={},sG=(t,e,n,i)=>{vf(n)&&a4[n]||(vf(n)&&(a4[n]=new Date),vne(t,e,n,i))},oG=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},lN=(t,e,n)=>{t.loadNamespaces(e,oG(t,n))},s4=(t,e,n,i)=>{if(vf(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return lN(t,n,i);n.forEach(r=>{t.options.ns.indexOf(r)<0&&t.options.ns.push(r)}),t.loadLanguages(e,oG(t,i))},yne=(t,e,n={})=>!e.languages||!e.languages.length?(sG(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(i,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,t))return!1}}),vf=t=>typeof t=="string",bne=t=>typeof t=="object"&&t!==null,_ne=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Sne={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},wne=t=>Sne[t],Mne=t=>t.replace(_ne,wne);let cN={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Mne};const Ene=(t={})=>{cN={...cN,...t}},Ane=()=>cN;let lG;const Tne=t=>{lG=t},Cne=()=>lG,Nne={type:"3rdParty",init(t){Ene(t.options.react),Tne(t)}},Rne=A.createContext();class Pne{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var wA={exports:{}},MA={};var o4;function kne(){if(o4)return MA;o4=1;var t=um();function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,r=t.useEffect,a=t.useLayoutEffect,s=t.useDebugValue;function o(f,m){var g=m(),y=i({inst:{value:g,getSnapshot:m}}),_=y[0].inst,v=y[1];return a(function(){_.value=g,_.getSnapshot=m,l(_)&&v({inst:_})},[f,g,m]),r(function(){return l(_)&&v({inst:_}),f(function(){l(_)&&v({inst:_})})},[f]),s(g),g}function l(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!n(f,g)}catch{return!0}}function c(f,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return MA.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,MA}var l4;function cG(){return l4||(l4=1,wA.exports=kne()),wA.exports}var pP=cG();const Dne=(t,e)=>vf(e)?e:bne(e)&&vf(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,One={t:Dne,ready:!1},Lne=()=>()=>{},mP=(t,e={})=>{const{i18n:n}=e,{i18n:i,defaultNS:r}=A.useContext(Rne)||{},a=n||i||Cne();a&&!a.reportNamespaces&&(a.reportNamespaces=new Pne),a||sG(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>({...Ane(),...a?.options?.react,...e}),[a,e]),{useSuspense:o,keyPrefix:l}=s,c=r||a?.options?.defaultNS,u=vf(c)?[c]:c||["translation"],f=A.useMemo(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=A.useRef(0),g=A.useCallback(C=>{if(!a)return Lne;const{bindI18n:k,bindI18nStore:F}=s,I=()=>{m.current+=1,C()};return k&&a.on(k,I),F&&a.store.on(F,I),()=>{k&&k.split(" ").forEach(q=>a.off(q,I)),F&&F.split(" ").forEach(q=>a.store.off(q,I))}},[a,s]),y=A.useRef(),_=A.useCallback(()=>{if(!a)return One;const C=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(H=>yne(H,a,s)),k=e.lng||a.language,F=m.current,I=y.current;if(I&&I.ready===C&&I.lng===k&&I.keyPrefix===l&&I.revision===F)return I;const L={t:a.getFixedT(k,s.nsMode==="fallback"?f:f[0],l),ready:C,lng:k,keyPrefix:l,revision:F};return y.current=L,L},[a,f,l,s,e.lng]),[v,x]=A.useState(0),{t:M,ready:w}=pP.useSyncExternalStore(g,_,_);A.useEffect(()=>{if(a&&!w&&!o){const C=()=>x(k=>k+1);e.lng?s4(a,e.lng,f,C):lN(a,f,C)}},[a,e.lng,f,w,o,v]);const E=a||{},T=A.useRef(null),P=A.useRef(),N=C=>{const k=Object.getOwnPropertyDescriptors(C);k.__original&&delete k.__original;const F=Object.create(Object.getPrototypeOf(C),k);if(!Object.prototype.hasOwnProperty.call(F,"__original"))try{Object.defineProperty(F,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return F},j=A.useMemo(()=>{const C=E,k=C?.language;let F=C;C&&(T.current&&T.current.__original===C?P.current!==k?(F=N(C),T.current=F,P.current=k):F=T.current:(F=N(C),T.current=F,P.current=k));const I=[M,F,w];return I.t=M,I.i18n=F,I.ready=w,I},[M,E,w,E.resolvedLanguage,E.language,E.languages]);if(a&&o&&!w)throw new Promise(C=>{const k=()=>C();e.lng?s4(a,e.lng,f,k):lN(a,f,k)});return j},{slice:Ine,forEach:jne}=[];function Une(t){return jne.call(Ine.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function Fne(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const c4=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,zne=function(t,e){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e);let a=`${t}=${r}`;if(i.maxAge>0){const s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(i.domain){if(!c4.test(i.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${i.domain}`}if(i.path){if(!c4.test(i.path))throw new TypeError("option path is invalid");a+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(a+="; Partitioned"),a},u4={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=zne(t,e,r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,o)===e&&(n=a[s].substring(o+1))}}return n}},Vne={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,i;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const a=r.substring(1);if(e){const s=a.split("&");for(let o=0;o0&&s[o].substring(0,l)===e&&(i=s[o].substring(l+1))}}if(i)return i;if(!i&&n>-1){const s=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return i}};let Mh=null;const d4=()=>{if(Mh!==null)return Mh;try{if(Mh=typeof window<"u"&&window.localStorage!==null,!Mh)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Mh=!1}return Mh};var $ne={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&d4())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&d4()&&window.localStorage.setItem(n,t)}};let Eh=null;const f4=()=>{if(Eh!==null)return Eh;try{if(Eh=typeof window<"u"&&window.sessionStorage!==null,!Eh)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Eh=!1}return Eh};var Gne={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&f4())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&f4()&&window.sessionStorage.setItem(n,t)}},Wne={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let a=0;a0?e:void 0}},qne={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},Xne={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},Kne={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};let uG=!1;try{document.cookie,uG=!0}catch{}const dG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];uG||dG.splice(1,1);const Yne=()=>({order:dG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class fG{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Une(n,this.options||{},Yne()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Bne),this.addDetector(Hne),this.addDetector($ne),this.addDetector(Gne),this.addDetector(Wne),this.addDetector(qne),this.addDetector(Xne),this.addDetector(Kne),this.addDetector(Vne)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.filter(i=>i!=null&&!Fne(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}fG.type="languageDetector";const Zne={nav:{printers:"Printers",control:"Control",archives:"Archives",queue:"Queue",stats:"Statistics",profiles:"Profiles",maintenance:"Maintenance",settings:"Settings",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",update:"Update",updateAvailable:"Update available: v{{version}}",viewOnGithub:"View on GitHub",keyboardShortcuts:"Keyboard shortcuts (?)",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"},common:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",close:"Close",confirm:"Confirm",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",enabled:"Enabled",disabled:"Disabled",yes:"Yes",no:"No",on:"On",off:"Off",all:"All",none:"None",search:"Search",filter:"Filter",sort:"Sort",refresh:"Refresh",download:"Download",upload:"Upload",actions:"Actions",status:"Status",name:"Name",description:"Description",date:"Date",time:"Time",hours:"hours",minutes:"minutes",seconds:"seconds",noPrinters:"No printers configured",noData:"No data available",required:"Required",optional:"Optional"},printers:{title:"Printers",addPrinter:"Add Printer",editPrinter:"Edit Printer",deletePrinter:"Delete Printer",printerName:"Printer Name",serialNumber:"Serial Number",ipAddress:"IP Address",accessCode:"Access Code",model:"Model",nozzleCount:"Nozzle Count",autoArchive:"Auto Archive",status:{idle:"Idle",printing:"Printing",paused:"Paused",offline:"Offline",error:"Error",finished:"Finished",unknown:"Unknown"},temperatures:{nozzle:"Nozzle",bed:"Bed",chamber:"Chamber"},progress:"{{percent}}% complete",timeRemaining:"{{time}} remaining",deleteConfirm:'Are you sure you want to delete "{{name}}"?',maintenanceOk:"Maintenance OK",maintenanceWarning:"{{count}} warning",maintenanceWarning_plural:"{{count}} warnings",maintenanceDue:"{{count}} due",maintenanceDue_plural:"{{count}} due"},archives:{title:"Print Archives",searchPlaceholder:"Search archives...",filterByPrinter:"Filter by printer",filterByStatus:"Filter by status",sortBy:"Sort by",sortNewest:"Newest first",sortOldest:"Oldest first",sortName:"Name",sortDuration:"Duration",noArchives:"No archives found",printTime:"Print Time",filamentUsed:"Filament Used",cost:"Cost",reprint:"Reprint",preview:"Preview",deleteArchive:"Delete Archive",deleteConfirm:"Are you sure you want to delete this archive?",favorite:"Favorite",unfavorite:"Remove from favorites",viewDetails:"View Details",status:{completed:"Completed",failed:"Failed",stopped:"Stopped"}},queue:{title:"Print Queue",addToQueue:"Add to Queue",clearQueue:"Clear Queue",emptyQueue:"Queue is empty",position:"Position",scheduledTime:"Scheduled Time",moveUp:"Move Up",moveDown:"Move Down",remove:"Remove",startNow:"Start Now",status:{pending:"Pending",printing:"Printing",completed:"Completed",failed:"Failed",cancelled:"Cancelled"}},stats:{title:"Statistics",overview:"Overview",totalPrints:"Total Prints",successRate:"Success Rate",totalPrintTime:"Total Print Time",totalFilament:"Total Filament Used",totalCost:"Total Cost",averagePrintTime:"Average Print Time",printsPerDay:"Prints per Day",byPrinter:"By Printer",byMaterial:"By Material",byMonth:"By Month",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",allTime:"All Time"},profiles:{title:"Filament Profiles",addProfile:"Add Profile",editProfile:"Edit Profile",deleteProfile:"Delete Profile",material:"Material",brand:"Brand",color:"Color",diameter:"Diameter",density:"Density",costPerKg:"Cost per kg",spoolWeight:"Spool Weight",noProfiles:"No profiles configured",deleteConfirm:"Are you sure you want to delete this profile?"},maintenance:{title:"Maintenance",overview:"Overview",allOk:"All maintenance up to date",dueCount:"{{count}} item due",dueCount_plural:"{{count}} items due",warningCount:"{{count}} warning",warningCount_plural:"{{count}} warnings",totalPrintTime:"Total Print Time",nextMaintenance:"Next Maintenance",nothingDue:"Nothing due",tasks:"Tasks",lastPerformed:"Last performed",interval:"Interval",hoursRemaining:"{{hours}}h remaining",hoursOverdue:"{{hours}}h overdue",markDone:"Mark as Done",performMaintenance:"Perform Maintenance",history:"History",noHistory:"No maintenance history",editPrintHours:"Edit Print Hours",currentHours:"Current Hours",types:{lubricateRails:"Lubricate Linear Rails",cleanNozzle:"Clean Nozzle/Hotend",checkBelts:"Check Belt Tension",cleanBuildPlate:"Clean Build Plate",checkExtruder:"Check Extruder Gears",checkCooling:"Check Cooling Fans",generalInspection:"General Inspection"}},settings:{title:"Settings",general:"General",appearance:"Appearance",notifications:"Notifications",smartPlugs:"Smart Plugs",spoolman:"Spoolman",updates:"Updates",language:"Language",languageDescription:"Select your preferred language",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",defaultView:"Default View",defaultViewDescription:"Page to show when opening the app",checkForUpdates:"Check for Updates",autoUpdate:"Auto Update",currentVersion:"Current Version",latestVersion:"Latest Version",upToDate:"You are up to date",updateAvailable:"Update available",notificationLanguage:"Notification Language",notificationLanguageDescription:"Language for push notifications",notificationProviders:"Notification Providers",addProvider:"Add Provider",editProvider:"Edit Provider",providerType:"Provider Type",testNotification:"Test Notification",testSuccess:"Test notification sent successfully",testFailed:"Failed to send test notification",quietHours:"Quiet Hours",quietHoursDescription:"Do not disturb during these hours",quietHoursStart:"Start",quietHoursEnd:"End",events:{title:"Notification Events",printStart:"Print Started",printComplete:"Print Completed",printFailed:"Print Failed",printStopped:"Print Stopped",printProgress:"Progress Milestones",printProgressDescription:"Notify at 25%, 50%, 75%",printerOffline:"Printer Offline",printerError:"Printer Error",filamentLow:"Low Filament",maintenanceDue:"Maintenance Due",maintenanceDueDescription:"Notify when maintenance is needed"},smartPlug:{title:"Smart Plugs",add:"Add Smart Plug",edit:"Edit Smart Plug",name:"Name",ipAddress:"IP Address",linkedPrinter:"Linked Printer",autoOn:"Auto Power On",autoOnDescription:"Turn on when print starts",autoOff:"Auto Power Off",autoOffDescription:"Turn off after print completes",offDelay:"Off Delay",offDelayMinutes:"Minutes after print",offDelayTemp:"When nozzle below temperature",currentState:"Current State",turnOn:"Turn On",turnOff:"Turn Off"},spoolmanEnabled:"Enable Spoolman Integration",spoolmanUrl:"Spoolman URL",spoolmanConnected:"Connected",spoolmanDisconnected:"Disconnected"},notification:{printStarted:{title:"Print Started",body:"{{printer}}: {{filename}} has started printing"},printCompleted:{title:"Print Completed",body:"{{printer}}: {{filename}} completed successfully"},printFailed:{title:"Print Failed",body:"{{printer}}: {{filename}} has failed"},printStopped:{title:"Print Stopped",body:"{{printer}}: {{filename}} was stopped"},printProgress:{title:"Print Progress",body:"{{printer}}: {{filename}} is {{percent}}% complete"},printerOffline:{title:"Printer Offline",body:"{{printer}} is offline"},printerError:{title:"Printer Error",body:"{{printer}}: {{error}}"},filamentLow:{title:"Low Filament",body:"{{printer}}: Filament is running low"},maintenanceDue:{title:"Maintenance Due",body:"{{printer}}: {{items}} need attention"}},errors:{generic:"Something went wrong",networkError:"Network error. Please check your connection.",notFound:"Not found",unauthorized:"Unauthorized",serverError:"Server error",validationError:"Please check your input",printerConnectionFailed:"Failed to connect to printer",saveFailed:"Failed to save changes",deleteFailed:"Failed to delete",loadFailed:"Failed to load data"},confirm:{delete:"Are you sure you want to delete this?",unsavedChanges:"You have unsaved changes. Are you sure you want to leave?",clearQueue:"Are you sure you want to clear the queue?"}},Qne={nav:{printers:"Drucker",control:"Steuerung",archives:"Archiv",queue:"Warteschlange",stats:"Statistiken",profiles:"Profile",maintenance:"Wartung",settings:"Einstellungen",collapseSidebar:"Seitenleiste einklappen",expandSidebar:"Seitenleiste ausklappen",update:"Update",updateAvailable:"Update verfügbar: v{{version}}",viewOnGithub:"Auf GitHub ansehen",keyboardShortcuts:"Tastaturkürzel (?)",switchToLight:"Zum hellen Modus wechseln",switchToDark:"Zum dunklen Modus wechseln"},common:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",confirm:"Bestätigen",loading:"Lädt...",error:"Fehler",success:"Erfolg",warning:"Warnung",enabled:"Aktiviert",disabled:"Deaktiviert",yes:"Ja",no:"Nein",on:"An",off:"Aus",all:"Alle",none:"Keine",search:"Suchen",filter:"Filtern",sort:"Sortieren",refresh:"Aktualisieren",download:"Herunterladen",upload:"Hochladen",actions:"Aktionen",status:"Status",name:"Name",description:"Beschreibung",date:"Datum",time:"Zeit",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden",noPrinters:"Keine Drucker konfiguriert",noData:"Keine Daten verfügbar",required:"Erforderlich",optional:"Optional"},printers:{title:"Drucker",addPrinter:"Drucker hinzufügen",editPrinter:"Drucker bearbeiten",deletePrinter:"Drucker löschen",printerName:"Druckername",serialNumber:"Seriennummer",ipAddress:"IP-Adresse",accessCode:"Zugangscode",model:"Modell",nozzleCount:"Düsenanzahl",autoArchive:"Automatische Archivierung",status:{idle:"Bereit",printing:"Druckt",paused:"Pausiert",offline:"Offline",error:"Fehler",finished:"Fertig",unknown:"Unbekannt"},temperatures:{nozzle:"Düse",bed:"Druckbett",chamber:"Kammer"},progress:"{{percent}}% abgeschlossen",timeRemaining:"Noch {{time}}",deleteConfirm:'Möchten Sie "{{name}}" wirklich löschen?',maintenanceOk:"Wartung OK",maintenanceWarning:"{{count}} Warnung",maintenanceWarning_plural:"{{count}} Warnungen",maintenanceDue:"{{count}} fällig",maintenanceDue_plural:"{{count}} fällig"},archives:{title:"Druckarchiv",searchPlaceholder:"Archiv durchsuchen...",filterByPrinter:"Nach Drucker filtern",filterByStatus:"Nach Status filtern",sortBy:"Sortieren nach",sortNewest:"Neueste zuerst",sortOldest:"Älteste zuerst",sortName:"Name",sortDuration:"Dauer",noArchives:"Keine Archive gefunden",printTime:"Druckzeit",filamentUsed:"Verbrauchtes Filament",cost:"Kosten",reprint:"Erneut drucken",preview:"Vorschau",deleteArchive:"Archiv löschen",deleteConfirm:"Möchten Sie dieses Archiv wirklich löschen?",favorite:"Favorit",unfavorite:"Aus Favoriten entfernen",viewDetails:"Details anzeigen",status:{completed:"Abgeschlossen",failed:"Fehlgeschlagen",stopped:"Gestoppt"}},queue:{title:"Druckwarteschlange",addToQueue:"Zur Warteschlange hinzufügen",clearQueue:"Warteschlange leeren",emptyQueue:"Warteschlange ist leer",position:"Position",scheduledTime:"Geplante Zeit",moveUp:"Nach oben",moveDown:"Nach unten",remove:"Entfernen",startNow:"Jetzt starten",status:{pending:"Ausstehend",printing:"Druckt",completed:"Abgeschlossen",failed:"Fehlgeschlagen",cancelled:"Abgebrochen"}},stats:{title:"Statistiken",overview:"Übersicht",totalPrints:"Gesamtdrucke",successRate:"Erfolgsrate",totalPrintTime:"Gesamtdruckzeit",totalFilament:"Gesamtverbrauch Filament",totalCost:"Gesamtkosten",averagePrintTime:"Durchschnittliche Druckzeit",printsPerDay:"Drucke pro Tag",byPrinter:"Nach Drucker",byMaterial:"Nach Material",byMonth:"Nach Monat",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",last90Days:"Letzte 90 Tage",allTime:"Gesamt"},profiles:{title:"Filament-Profile",addProfile:"Profil hinzufügen",editProfile:"Profil bearbeiten",deleteProfile:"Profil löschen",material:"Material",brand:"Marke",color:"Farbe",diameter:"Durchmesser",density:"Dichte",costPerKg:"Kosten pro kg",spoolWeight:"Spulengewicht",noProfiles:"Keine Profile konfiguriert",deleteConfirm:"Möchten Sie dieses Profil wirklich löschen?"},maintenance:{title:"Wartung",overview:"Übersicht",allOk:"Alle Wartungen aktuell",dueCount:"{{count}} Aufgabe fällig",dueCount_plural:"{{count}} Aufgaben fällig",warningCount:"{{count}} Warnung",warningCount_plural:"{{count}} Warnungen",totalPrintTime:"Gesamtdruckzeit",nextMaintenance:"Nächste Wartung",nothingDue:"Nichts fällig",tasks:"Aufgaben",lastPerformed:"Zuletzt durchgeführt",interval:"Intervall",hoursRemaining:"{{hours}}h verbleibend",hoursOverdue:"{{hours}}h überfällig",markDone:"Als erledigt markieren",performMaintenance:"Wartung durchführen",history:"Verlauf",noHistory:"Kein Wartungsverlauf",editPrintHours:"Druckstunden bearbeiten",currentHours:"Aktuelle Stunden",types:{lubricateRails:"Linearschienen schmieren",cleanNozzle:"Düse/Hotend reinigen",checkBelts:"Riemenspannung prüfen",cleanBuildPlate:"Druckbett reinigen",checkExtruder:"Extruderzahnräder prüfen",checkCooling:"Kühlungslüfter prüfen",generalInspection:"Allgemeine Inspektion"}},settings:{title:"Einstellungen",general:"Allgemein",appearance:"Erscheinungsbild",notifications:"Benachrichtigungen",smartPlugs:"Smart Plugs",spoolman:"Spoolman",updates:"Updates",language:"Sprache",languageDescription:"Wählen Sie Ihre bevorzugte Sprache",theme:"Design",themeLight:"Hell",themeDark:"Dunkel",themeSystem:"System",defaultView:"Standardansicht",defaultViewDescription:"Seite, die beim Öffnen der App angezeigt wird",checkForUpdates:"Nach Updates suchen",autoUpdate:"Automatische Updates",currentVersion:"Aktuelle Version",latestVersion:"Neueste Version",upToDate:"Sie sind auf dem neuesten Stand",updateAvailable:"Update verfügbar",notificationLanguage:"Benachrichtigungssprache",notificationLanguageDescription:"Sprache für Push-Benachrichtigungen",notificationProviders:"Benachrichtigungsanbieter",addProvider:"Anbieter hinzufügen",editProvider:"Anbieter bearbeiten",providerType:"Anbietertyp",testNotification:"Testbenachrichtigung",testSuccess:"Testbenachrichtigung erfolgreich gesendet",testFailed:"Testbenachrichtigung konnte nicht gesendet werden",quietHours:"Ruhezeiten",quietHoursDescription:"Keine Störungen während dieser Zeiten",quietHoursStart:"Beginn",quietHoursEnd:"Ende",events:{title:"Benachrichtigungsereignisse",printStart:"Druck gestartet",printComplete:"Druck abgeschlossen",printFailed:"Druck fehlgeschlagen",printStopped:"Druck gestoppt",printProgress:"Fortschrittsmeldungen",printProgressDescription:"Bei 25%, 50%, 75% benachrichtigen",printerOffline:"Drucker offline",printerError:"Druckerfehler",filamentLow:"Filament niedrig",maintenanceDue:"Wartung fällig",maintenanceDueDescription:"Benachrichtigen, wenn Wartung erforderlich"},smartPlug:{title:"Smart Plugs",add:"Smart Plug hinzufügen",edit:"Smart Plug bearbeiten",name:"Name",ipAddress:"IP-Adresse",linkedPrinter:"Verknüpfter Drucker",autoOn:"Automatisch einschalten",autoOnDescription:"Einschalten beim Druckstart",autoOff:"Automatisch ausschalten",autoOffDescription:"Ausschalten nach Druckende",offDelay:"Ausschaltverzögerung",offDelayMinutes:"Minuten nach Druck",offDelayTemp:"Wenn Düse unter Temperatur",currentState:"Aktueller Status",turnOn:"Einschalten",turnOff:"Ausschalten"},spoolmanEnabled:"Spoolman-Integration aktivieren",spoolmanUrl:"Spoolman URL",spoolmanConnected:"Verbunden",spoolmanDisconnected:"Nicht verbunden"},notification:{printStarted:{title:"Druck gestartet",body:"{{printer}}: {{filename}} wird gedruckt"},printCompleted:{title:"Druck abgeschlossen",body:"{{printer}}: {{filename}} erfolgreich abgeschlossen"},printFailed:{title:"Druck fehlgeschlagen",body:"{{printer}}: {{filename}} ist fehlgeschlagen"},printStopped:{title:"Druck gestoppt",body:"{{printer}}: {{filename}} wurde gestoppt"},printProgress:{title:"Druckfortschritt",body:"{{printer}}: {{filename}} ist zu {{percent}}% abgeschlossen"},printerOffline:{title:"Drucker offline",body:"{{printer}} ist offline"},printerError:{title:"Druckerfehler",body:"{{printer}}: {{error}}"},filamentLow:{title:"Filament niedrig",body:"{{printer}}: Filament geht zur Neige"},maintenanceDue:{title:"Wartung fällig",body:"{{printer}}: {{items}} benötigen Aufmerksamkeit"}},errors:{generic:"Etwas ist schiefgelaufen",networkError:"Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung.",notFound:"Nicht gefunden",unauthorized:"Nicht autorisiert",serverError:"Serverfehler",validationError:"Bitte überprüfen Sie Ihre Eingabe",printerConnectionFailed:"Verbindung zum Drucker fehlgeschlagen",saveFailed:"Speichern fehlgeschlagen",deleteFailed:"Löschen fehlgeschlagen",loadFailed:"Laden der Daten fehlgeschlagen"},confirm:{delete:"Möchten Sie dies wirklich löschen?",unsavedChanges:"Sie haben ungespeicherte Änderungen. Möchten Sie wirklich verlassen?",clearQueue:"Möchten Sie die Warteschlange wirklich leeren?"}},Jne={en:{translation:Zne},de:{translation:Qne}};wa.use(fG).use(Nne).init({resources:Jne,fallbackLng:"en",supportedLngs:["en","de"],detection:{order:["localStorage","navigator","htmlTag"],lookupLocalStorage:"bambutrack_language",caches:["localStorage"]},interpolation:{escapeValue:!1},react:{useSuspense:!1}});const h4=[{code:"en",name:"English",nativeName:"English"},{code:"de",name:"German",nativeName:"Deutsch"}];var p4="popstate";function eie(t={}){function e(i,r){let{pathname:a,search:s,hash:o}=i.location;return uN("",{pathname:a,search:s,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:Px(r)}return nie(e,n,null,t)}function mi(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ws(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function tie(){return Math.random().toString(36).substring(2,10)}function m4(t,e){return{usr:t.state,key:t.key,idx:e}}function uN(t,e,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?dm(e):e,state:n,key:e&&e.key||i||tie()}}function Px({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function dm(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function nie(t,e,n,i={}){let{window:r=document.defaultView,v5Compat:a=!1}=i,s=r.history,o="POP",l=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function f(){o="POP";let v=u(),x=v==null?null:v-c;c=v,l&&l({action:o,location:_.location,delta:x})}function m(v,x){o="PUSH";let M=uN(_.location,v,x);c=u()+1;let w=m4(M,c),E=_.createHref(M);try{s.pushState(w,"",E)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;r.location.assign(E)}a&&l&&l({action:o,location:_.location,delta:1})}function g(v,x){o="REPLACE";let M=uN(_.location,v,x);c=u();let w=m4(M,c),E=_.createHref(M);s.replaceState(w,"",E),a&&l&&l({action:o,location:_.location,delta:0})}function y(v){return iie(v)}let _={get action(){return o},get location(){return t(r,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(p4,f),l=v,()=>{r.removeEventListener(p4,f),l=null}},createHref(v){return e(r,v)},createURL:y,encodeLocation(v){let x=y(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(v){return s.go(v)}};return _}function iie(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mi(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Px(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function hG(t,e,n="/"){return rie(t,e,n,!1)}function rie(t,e,n,i){let r=typeof e=="string"?dm(e):e,a=cc(r.pathname||"/",n);if(a==null)return null;let s=pG(t);aie(s);let o=null;for(let l=0;o==null&&l{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(i)&&l)return;mi(u.relativePath.startsWith(i),`Absolute route path "${u.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(i.length)}let f=tc([i,u.relativePath]),m=n.concat(u);s.children&&s.children.length>0&&(mi(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),pG(s.children,e,m,f,l)),!(s.path==null&&!s.index)&&e.push({path:f,score:fie(f,s.index),routesMeta:m})};return t.forEach((s,o)=>{if(s.path===""||!s.path?.includes("?"))a(s,o);else for(let l of mG(s.path))a(s,o,!0,l)}),e}function mG(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return r?[a,""]:[a];let s=mG(i.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),r&&o.push(...s),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function aie(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:hie(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var sie=/^:[\w-]+$/,oie=3,lie=2,cie=1,uie=10,die=-2,g4=t=>t==="*";function fie(t,e){let n=t.split("/"),i=n.length;return n.some(g4)&&(i+=die),e&&(i+=lie),n.filter(r=>!g4(r)).reduce((r,a)=>r+(sie.test(a)?oie:a===""?cie:uie),i)}function hie(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function pie(t,e,n=!1){let{routesMeta:i}=t,r={},a="/",s=[];for(let o=0;o{if(u==="*"){let y=o[m]||"";s=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const g=o[m];return f&&!g?c[u]=void 0:c[u]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:t}}function mie(t,e=!1,n=!0){Ws(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(i.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function gie(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ws(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function cc(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var xie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vie=t=>xie.test(t);function yie(t,e="/"){let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?dm(t):t,a;if(n)if(vie(n))a=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Ws(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?a=x4(n.substring(1),"/"):a=x4(n,e)}else a=e;return{pathname:a,search:Sie(i),hash:wie(r)}}function x4(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function EA(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}]. 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 bie(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function gG(t){let e=bie(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function xG(t,e,n,i=!1){let r;typeof t=="string"?r=dm(t):(r={...t},mi(!r.pathname||!r.pathname.includes("?"),EA("?","pathname","search",r)),mi(!r.pathname||!r.pathname.includes("#"),EA("#","pathname","hash",r)),mi(!r.search||!r.search.includes("#"),EA("#","search","hash",r)));let a=t===""||r.pathname==="",s=a?"/":r.pathname,o;if(s==null)o=n;else{let f=e.length-1;if(!i&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;r.pathname=m.join("/")}o=f>=0?e[f]:"/"}let l=yie(r,o),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var tc=t=>t.join("/").replace(/\/\/+/g,"/"),_ie=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Sie=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,wie=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Mie(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vG=["POST","PUT","PATCH","DELETE"];new Set(vG);var Eie=["GET",...vG];new Set(Eie);var fm=A.createContext(null);fm.displayName="DataRouter";var US=A.createContext(null);US.displayName="DataRouterState";A.createContext(!1);var yG=A.createContext({isTransitioning:!1});yG.displayName="ViewTransition";var Aie=A.createContext(new Map);Aie.displayName="Fetchers";var Tie=A.createContext(null);Tie.displayName="Await";var rl=A.createContext(null);rl.displayName="Navigation";var M0=A.createContext(null);M0.displayName="Location";var al=A.createContext({outlet:null,matches:[],isDataRoute:!1});al.displayName="Route";var gP=A.createContext(null);gP.displayName="RouteError";function Cie(t,{relative:e}={}){mi(E0(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:i}=A.useContext(rl),{hash:r,pathname:a,search:s}=A0(t,{relative:e}),o=a;return n!=="/"&&(o=a==="/"?n:tc([n,a])),i.createHref({pathname:o,search:s,hash:r})}function E0(){return A.useContext(M0)!=null}function Sc(){return mi(E0(),"useLocation() may be used only in the context of a component."),A.useContext(M0).location}var bG="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function _G(t){A.useContext(rl).static||A.useLayoutEffect(t)}function FS(){let{isDataRoute:t}=A.useContext(al);return t?Vie():Nie()}function Nie(){mi(E0(),"useNavigate() may be used only in the context of a component.");let t=A.useContext(fm),{basename:e,navigator:n}=A.useContext(rl),{matches:i}=A.useContext(al),{pathname:r}=Sc(),a=JSON.stringify(gG(i)),s=A.useRef(!1);return _G(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(Ws(s.current,bG),!s.current)return;if(typeof l=="number"){n.go(l);return}let u=xG(l,JSON.parse(a),r,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:tc([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,a,r,t])}var Rie=A.createContext(null);function Pie(t){let e=A.useContext(al).outlet;return A.useMemo(()=>e&&A.createElement(Rie.Provider,{value:t},e),[e,t])}function A0(t,{relative:e}={}){let{matches:n}=A.useContext(al),{pathname:i}=Sc(),r=JSON.stringify(gG(n));return A.useMemo(()=>xG(t,JSON.parse(r),i,e==="path"),[t,r,i,e])}function kie(t,e){return SG(t,e)}function SG(t,e,n,i,r){mi(E0(),"useRoutes() may be used only in the context of a component.");let{navigator:a}=A.useContext(rl),{matches:s}=A.useContext(al),o=s[s.length-1],l=o?o.params:{},c=o?o.pathname:"/",u=o?o.pathnameBase:"/",f=o&&o.route;{let M=f&&f.path||"";wG(c,!f||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. +`+S.stack}}var oe=Object.prototype.hasOwnProperty,ke=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,te=t.unstable_shouldYield,U=t.unstable_requestPaint,O=t.unstable_now,Y=t.unstable_getCurrentPriorityLevel,me=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,he=t.unstable_NormalPriority,Ze=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Xe=t.log,at=t.unstable_setDisableYieldValue,Ie=null,Re=null;function pt(d){if(typeof Xe=="function"&&at(d),Re&&typeof Re.setStrictMode=="function")try{Re.setStrictMode(Ie,d)}catch{}}var tt=Math.clz32?Math.clz32:de,et=Math.log,ut=Math.LN2;function de(d){return d>>>=0,d===0?32:31-(et(d)/ut|0)|0}var nt=256,fe=262144,Oe=4194304;function Me(d){var h=d&42;if(h!==0)return h;switch(d&-d){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return d&261888;case 262144:case 524288:case 1048576:case 2097152:return d&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return d&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return d}}function ge(d,h,b){var S=d.pendingLanes;if(S===0)return 0;var R=0,D=d.suspendedLanes,$=d.pingedLanes;d=d.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~D,S!==0?R=Me(S):($&=ne,$!==0?R=Me($):b||(b=ne&~d,b!==0&&(R=Me(b))))):(ne=S&~D,ne!==0?R=Me(ne):$!==0?R=Me($):b||(b=S&~d,b!==0&&(R=Me(b)))),R===0?0:h!==0&&h!==R&&(h&D)===0&&(D=R&-R,b=h&-h,D>=b||D===32&&(b&4194048)!==0)?h:R}function Be(d,h){return(d.pendingLanes&~(d.suspendedLanes&~d.pingedLanes)&h)===0}function ct(d,h){switch(d){case 1:case 2:case 4:case 8:case 64:return h+250;case 16:case 32: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 h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bt(){var d=Oe;return Oe<<=1,(Oe&62914560)===0&&(Oe=4194304),d}function Rt(d){for(var h=[],b=0;31>b;b++)h.push(d);return h}function ln(d,h){d.pendingLanes|=h,h!==268435456&&(d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0)}function Dt(d,h,b,S,R,D){var $=d.pendingLanes;d.pendingLanes=b,d.suspendedLanes=0,d.pingedLanes=0,d.warmLanes=0,d.expiredLanes&=b,d.entangledLanes&=b,d.errorRecoveryDisabledLanes&=b,d.shellSuspendCounter=0;var ne=d.entanglements,_e=d.expirationTimes,Fe=d.hiddenUpdates;for(b=$&~b;0"u")return null;try{return d.activeElement||d.body}catch{return d.body}}var Ti=/[\n"\\]/g;function Nn(d){return d.replace(Ti,function(h){return"\\"+h.charCodeAt(0).toString(16)+" "})}function Js(d,h,b,S,R,D,$,ne){d.name="",$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"?d.type=$:d.removeAttribute("type"),h!=null?$==="number"?(h===0&&d.value===""||d.value!=h)&&(d.value=""+un(h)):d.value!==""+un(h)&&(d.value=""+un(h)):$!=="submit"&&$!=="reset"||d.removeAttribute("value"),h!=null?gr(d,$,un(h)):b!=null?gr(d,$,un(b)):S!=null&&d.removeAttribute("value"),R==null&&D!=null&&(d.defaultChecked=!!D),R!=null&&(d.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?d.name=""+un(ne):d.removeAttribute("name")}function Pn(d,h,b,S,R,D,$,ne){if(D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(d.type=D),h!=null||b!=null){if(!(D!=="submit"&&D!=="reset"||h!=null)){Xt(d);return}b=b!=null?""+un(b):"",h=h!=null?""+un(h):b,ne||h===d.value||(d.value=h),d.defaultValue=h}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,d.checked=ne?d.checked:!!S,d.defaultChecked=!!S,$!=null&&typeof $!="function"&&typeof $!="symbol"&&typeof $!="boolean"&&(d.name=$),Xt(d)}function gr(d,h,b){h==="number"&&yi(d.ownerDocument)===d||d.defaultValue===""+b||(d.defaultValue=""+b)}function Qi(d,h,b,S){if(d=d.options,h){h={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xM=!1;if(ul)try{var Um={};Object.defineProperty(Um,"passive",{get:function(){xM=!0}}),window.addEventListener("test",Um,Um),window.removeEventListener("test",Um,Um)}catch{xM=!1}var Dc=null,vM=null,mv=null;function lL(){if(mv)return mv;var d,h=vM,b=h.length,S,R="value"in Dc?Dc.value:Dc.textContent,D=R.length;for(d=0;d=Bm),pL=" ",mL=!1;function gL(d,h){switch(d){case"keyup":return dee.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xL(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var Kf=!1;function hee(d,h){switch(d){case"compositionend":return xL(h);case"keypress":return h.which!==32?null:(mL=!0,pL);case"textInput":return d=h.data,d===pL&&mL?null:d;default:return null}}function pee(d,h){if(Kf)return d==="compositionend"||!wM&&gL(d,h)?(d=lL(),mv=vM=Dc=null,Kf=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1=h)return{node:b,offset:h-d};d=S}e:{for(;b;){if(b.nextSibling){b=b.nextSibling;break e}b=b.parentNode}b=void 0}b=EL(b)}}function TL(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?TL(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function CL(d){d=d!=null&&d.ownerDocument!=null&&d.ownerDocument.defaultView!=null?d.ownerDocument.defaultView:window;for(var h=yi(d.document);h instanceof d.HTMLIFrameElement;){try{var b=typeof h.contentWindow.location.href=="string"}catch{b=!1}if(b)d=h.contentWindow;else break;h=yi(d.document)}return h}function AM(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}var See=ul&&"documentMode"in document&&11>=document.documentMode,Yf=null,TM=null,Gm=null,CM=!1;function NL(d,h,b){var S=b.window===b?b.document:b.nodeType===9?b:b.ownerDocument;CM||Yf==null||Yf!==yi(S)||(S=Yf,"selectionStart"in S&&AM(S)?S={start:S.selectionStart,end:S.selectionEnd}:(S=(S.ownerDocument&&S.ownerDocument.defaultView||window).getSelection(),S={anchorNode:S.anchorNode,anchorOffset:S.anchorOffset,focusNode:S.focusNode,focusOffset:S.focusOffset}),Gm&&$m(Gm,S)||(Gm=S,S=ly(TM,"onSelect"),0>=$,R-=$,To=1<<32-tt(h)+R|b<Jt?(xn=kt,kt=null):xn=kt.sibling;var Mn=Ve(De,kt,Ue[Jt],rt);if(Mn===null){kt===null&&(kt=xn);break}d&&kt&&Mn.alternate===null&&h(De,kt),Ee=D(Mn,Ee,Jt),wn===null?It=Mn:wn.sibling=Mn,wn=Mn,kt=xn}if(Jt===Ue.length)return b(De,kt),yn&&fl(De,Jt),It;if(kt===null){for(;JtJt?(xn=kt,kt=null):xn=kt.sibling;var tu=Ve(De,kt,Mn.value,rt);if(tu===null){kt===null&&(kt=xn);break}d&&kt&&tu.alternate===null&&h(De,kt),Ee=D(tu,Ee,Jt),wn===null?It=tu:wn.sibling=tu,wn=tu,kt=xn}if(Mn.done)return b(De,kt),yn&&fl(De,Jt),It;if(kt===null){for(;!Mn.done;Jt++,Mn=Ue.next())Mn=st(De,Mn.value,rt),Mn!==null&&(Ee=D(Mn,Ee,Jt),wn===null?It=Mn:wn.sibling=Mn,wn=Mn);return yn&&fl(De,Jt),It}for(kt=S(kt);!Mn.done;Jt++,Mn=Ue.next())Mn=Ye(kt,De,Jt,Mn.value,rt),Mn!==null&&(d&&Mn.alternate!==null&&kt.delete(Mn.key===null?Jt:Mn.key),Ee=D(Mn,Ee,Jt),wn===null?It=Mn:wn.sibling=Mn,wn=Mn);return d&&kt.forEach(function(Hte){return h(De,Hte)}),yn&&fl(De,Jt),It}function Un(De,Ee,Ue,rt){if(typeof Ue=="object"&&Ue!==null&&Ue.type===_&&Ue.key===null&&(Ue=Ue.props.children),typeof Ue=="object"&&Ue!==null){switch(Ue.$$typeof){case g:e:{for(var It=Ue.key;Ee!==null;){if(Ee.key===It){if(It=Ue.type,It===_){if(Ee.tag===7){b(De,Ee.sibling),rt=R(Ee,Ue.props.children),rt.return=De,De=rt;break e}}else if(Ee.elementType===It||typeof It=="object"&&It!==null&&It.$$typeof===j&&bd(It)===Ee.type){b(De,Ee.sibling),rt=R(Ee,Ue.props),Zm(rt,Ue),rt.return=De,De=rt;break e}b(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}Ue.type===_?(rt=md(Ue.props.children,De.mode,rt,Ue.key),rt.return=De,De=rt):(rt=Ev(Ue.type,Ue.key,Ue.props,null,De.mode,rt),Zm(rt,Ue),rt.return=De,De=rt)}return $(De);case y:e:{for(It=Ue.key;Ee!==null;){if(Ee.key===It)if(Ee.tag===4&&Ee.stateNode.containerInfo===Ue.containerInfo&&Ee.stateNode.implementation===Ue.implementation){b(De,Ee.sibling),rt=R(Ee,Ue.children||[]),rt.return=De,De=rt;break e}else{b(De,Ee);break}else h(De,Ee);Ee=Ee.sibling}rt=LM(Ue,De.mode,rt),rt.return=De,De=rt}return $(De);case j:return Ue=bd(Ue),Un(De,Ee,Ue,rt)}if(H(Ue))return Nt(De,Ee,Ue,rt);if(I(Ue)){if(It=I(Ue),typeof It!="function")throw Error(i(150));return Ue=It.call(Ue),Bt(De,Ee,Ue,rt)}if(typeof Ue.then=="function")return Un(De,Ee,kv(Ue),rt);if(Ue.$$typeof===w)return Un(De,Ee,Cv(De,Ue),rt);Dv(De,Ue)}return typeof Ue=="string"&&Ue!==""||typeof Ue=="number"||typeof Ue=="bigint"?(Ue=""+Ue,Ee!==null&&Ee.tag===6?(b(De,Ee.sibling),rt=R(Ee,Ue),rt.return=De,De=rt):(b(De,Ee),rt=OM(Ue,De.mode,rt),rt.return=De,De=rt),$(De)):b(De,Ee)}return function(De,Ee,Ue,rt){try{Ym=0;var It=Un(De,Ee,Ue,rt);return oh=null,It}catch(kt){if(kt===sh||kt===Rv)throw kt;var wn=Wa(29,kt,null,De.mode);return wn.lanes=rt,wn.return=De,wn}finally{}}}var Sd=QL(!0),JL=QL(!1),Uc=!1;function qM(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function XM(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,callbacks:null})}function Fc(d){return{lane:d,tag:0,payload:null,callback:null,next:null}}function zc(d,h,b){var S=d.updateQueue;if(S===null)return null;if(S=S.shared,(Cn&2)!==0){var R=S.pending;return R===null?h.next=h:(h.next=R.next,R.next=h),S.pending=h,h=Mv(d),IL(d,null,b),h}return wv(d,S,h,b),Mv(d)}function Qm(d,h,b){if(h=h.updateQueue,h!==null&&(h=h.shared,(b&4194048)!==0)){var S=h.lanes;S&=d.pendingLanes,b|=S,h.lanes=b,qn(d,b)}}function KM(d,h){var b=d.updateQueue,S=d.alternate;if(S!==null&&(S=S.updateQueue,b===S)){var R=null,D=null;if(b=b.firstBaseUpdate,b!==null){do{var $={lane:b.lane,tag:b.tag,payload:b.payload,callback:null,next:null};D===null?R=D=$:D=D.next=$,b=b.next}while(b!==null);D===null?R=D=h:D=D.next=h}else R=D=h;b={baseState:S.baseState,firstBaseUpdate:R,lastBaseUpdate:D,shared:S.shared,callbacks:S.callbacks},d.updateQueue=b;return}d=b.lastBaseUpdate,d===null?b.firstBaseUpdate=h:d.next=h,b.lastBaseUpdate=h}var YM=!1;function Jm(){if(YM){var d=ah;if(d!==null)throw d}}function eg(d,h,b,S){YM=!1;var R=d.updateQueue;Uc=!1;var D=R.firstBaseUpdate,$=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var _e=ne,Fe=_e.next;_e.next=null,$===null?D=Fe:$.next=Fe,$=_e;var Je=d.alternate;Je!==null&&(Je=Je.updateQueue,ne=Je.lastBaseUpdate,ne!==$&&(ne===null?Je.firstBaseUpdate=Fe:ne.next=Fe,Je.lastBaseUpdate=_e))}if(D!==null){var st=R.baseState;$=0,Je=Fe=_e=null,ne=D;do{var Ve=ne.lane&-536870913,Ye=Ve!==ne.lane;if(Ye?(gn&Ve)===Ve:(S&Ve)===Ve){Ve!==0&&Ve===rh&&(YM=!0),Je!==null&&(Je=Je.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var Nt=d,Bt=ne;Ve=h;var Un=b;switch(Bt.tag){case 1:if(Nt=Bt.payload,typeof Nt=="function"){st=Nt.call(Un,st,Ve);break e}st=Nt;break e;case 3:Nt.flags=Nt.flags&-65537|128;case 0:if(Nt=Bt.payload,Ve=typeof Nt=="function"?Nt.call(Un,st,Ve):Nt,Ve==null)break e;st=f({},st,Ve);break e;case 2:Uc=!0}}Ve=ne.callback,Ve!==null&&(d.flags|=64,Ye&&(d.flags|=8192),Ye=R.callbacks,Ye===null?R.callbacks=[Ve]:Ye.push(Ve))}else Ye={lane:Ve,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Je===null?(Fe=Je=Ye,_e=st):Je=Je.next=Ye,$|=Ve;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;Ye=ne,ne=Ye.next,Ye.next=null,R.lastBaseUpdate=Ye,R.shared.pending=null}}while(!0);Je===null&&(_e=st),R.baseState=_e,R.firstBaseUpdate=Fe,R.lastBaseUpdate=Je,D===null&&(R.shared.lanes=0),Gc|=$,d.lanes=$,d.memoizedState=st}}function eI(d,h){if(typeof d!="function")throw Error(i(191,d));d.call(h)}function tI(d,h){var b=d.callbacks;if(b!==null)for(d.callbacks=null,d=0;dD?D:8;var $=V.T,ne={};V.T=ne,mE(d,!1,h,b);try{var _e=R(),Fe=V.S;if(Fe!==null&&Fe(ne,_e),_e!==null&&typeof _e=="object"&&typeof _e.then=="function"){var Je=Pee(_e,S);ig(d,h,Je,Za(d))}else ig(d,h,S,Za(d))}catch(st){ig(d,h,{then:function(){},status:"rejected",reason:st},Za())}finally{G.p=D,$!==null&&ne.types!==null&&($.types=ne.types),V.T=$}}function jee(){}function hE(d,h,b,S){if(d.tag!==5)throw Error(i(476));var R=DI(d).queue;kI(d,R,h,K,b===null?jee:function(){return OI(d),b(S)})}function DI(d){var h=d.memoizedState;if(h!==null)return h;h={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:K},next:null};var b={};return h.next={memoizedState:b,baseState:b,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gl,lastRenderedState:b},next:null},d.memoizedState=h,d=d.alternate,d!==null&&(d.memoizedState=h),h}function OI(d){var h=DI(d);h.next===null&&(h=d.alternate.memoizedState),ig(d,h.next.queue,{},Za())}function pE(){return Dr(bg)}function LI(){return Ni().memoizedState}function II(){return Ni().memoizedState}function Uee(d){for(var h=d.return;h!==null;){switch(h.tag){case 24:case 3:var b=Za();d=Fc(b);var S=zc(h,d,b);S!==null&&(Na(S,h,b),Qm(S,h,b)),h={cache:VM()},d.payload=h;return}h=h.return}}function Fee(d,h,b){var S=Za();b={lane:S,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null},Vv(d)?UI(h,b):(b=kM(d,h,b,S),b!==null&&(Na(b,d,S),FI(b,h,S)))}function jI(d,h,b){var S=Za();ig(d,h,b,S)}function ig(d,h,b,S){var R={lane:S,revertLane:0,gesture:null,action:b,hasEagerState:!1,eagerState:null,next:null};if(Vv(d))UI(h,R);else{var D=d.alternate;if(d.lanes===0&&(D===null||D.lanes===0)&&(D=h.lastRenderedReducer,D!==null))try{var $=h.lastRenderedState,ne=D($,b);if(R.hasEagerState=!0,R.eagerState=ne,Ga(ne,$))return wv(d,h,R,0),Xn===null&&Sv(),!1}catch{}finally{}if(b=kM(d,h,R,S),b!==null)return Na(b,d,S),FI(b,h,S),!0}return!1}function mE(d,h,b,S){if(S={lane:2,revertLane:qE(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},Vv(d)){if(h)throw Error(i(479))}else h=kM(d,b,S,2),h!==null&&Na(h,d,2)}function Vv(d){var h=d.alternate;return d===Qt||h!==null&&h===Qt}function UI(d,h){ch=Iv=!0;var b=d.pending;b===null?h.next=h:(h.next=b.next,b.next=h),d.pending=h}function FI(d,h,b){if((b&4194048)!==0){var S=h.lanes;S&=d.pendingLanes,b|=S,h.lanes=b,qn(d,b)}}var rg={readContext:Dr,use:Fv,useCallback:bi,useContext:bi,useEffect:bi,useImperativeHandle:bi,useLayoutEffect:bi,useInsertionEffect:bi,useMemo:bi,useReducer:bi,useRef:bi,useState:bi,useDebugValue:bi,useDeferredValue:bi,useTransition:bi,useSyncExternalStore:bi,useId:bi,useHostTransitionStatus:bi,useFormState:bi,useActionState:bi,useOptimistic:bi,useMemoCache:bi,useCacheRefresh:bi};rg.useEffectEvent=bi;var zI={readContext:Dr,use:Fv,useCallback:function(d,h){return la().memoizedState=[d,h===void 0?null:h],d},useContext:Dr,useEffect:wI,useImperativeHandle:function(d,h,b){b=b!=null?b.concat([d]):null,Bv(4194308,4,TI.bind(null,h,d),b)},useLayoutEffect:function(d,h){return Bv(4194308,4,d,h)},useInsertionEffect:function(d,h){Bv(4,2,d,h)},useMemo:function(d,h){var b=la();h=h===void 0?null:h;var S=d();if(wd){pt(!0);try{d()}finally{pt(!1)}}return b.memoizedState=[S,h],S},useReducer:function(d,h,b){var S=la();if(b!==void 0){var R=b(h);if(wd){pt(!0);try{b(h)}finally{pt(!1)}}}else R=h;return S.memoizedState=S.baseState=R,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:R},S.queue=d,d=d.dispatch=Fee.bind(null,Qt,d),[S.memoizedState,d]},useRef:function(d){var h=la();return d={current:d},h.memoizedState=d},useState:function(d){d=lE(d);var h=d.queue,b=jI.bind(null,Qt,h);return h.dispatch=b,[d.memoizedState,b]},useDebugValue:dE,useDeferredValue:function(d,h){var b=la();return fE(b,d,h)},useTransition:function(){var d=lE(!1);return d=kI.bind(null,Qt,d.queue,!0,!1),la().memoizedState=d,[!1,d]},useSyncExternalStore:function(d,h,b){var S=Qt,R=la();if(yn){if(b===void 0)throw Error(i(407));b=b()}else{if(b=h(),Xn===null)throw Error(i(349));(gn&127)!==0||oI(S,h,b)}R.memoizedState=b;var D={value:b,getSnapshot:h};return R.queue=D,wI(cI.bind(null,S,D,d),[d]),S.flags|=2048,dh(9,{destroy:void 0},lI.bind(null,S,D,b,h),null),b},useId:function(){var d=la(),h=Xn.identifierPrefix;if(yn){var b=Co,S=To;b=(S&~(1<<32-tt(S)-1)).toString(32)+b,h="_"+h+"R_"+b,b=jv++,0<\/script>",D=D.removeChild(D.firstChild);break;case"select":D=typeof S.is=="string"?$.createElement("select",{is:S.is}):$.createElement("select"),S.multiple?D.multiple=!0:S.size&&(D.size=S.size);break;default:D=typeof S.is=="string"?$.createElement(R,{is:S.is}):$.createElement(R)}}D[hi]=h,D[Ai]=S;e:for($=h.child;$!==null;){if($.tag===5||$.tag===6)D.appendChild($.stateNode);else if($.tag!==4&&$.tag!==27&&$.child!==null){$.child.return=$,$=$.child;continue}if($===h)break e;for(;$.sibling===null;){if($.return===null||$.return===h)break e;$=$.return}$.sibling.return=$.return,$=$.sibling}h.stateNode=D;e:switch(Lr(D,R,S),R){case"button":case"input":case"select":case"textarea":S=!!S.autoFocus;break e;case"img":S=!0;break e;default:S=!1}S&&vl(h)}}return ni(h),NE(h,h.type,d===null?null:d.memoizedProps,h.pendingProps,b),null;case 6:if(d&&h.stateNode!=null)d.memoizedProps!==S&&vl(h);else{if(typeof S!="string"&&h.stateNode===null)throw Error(i(166));if(d=ie.current,nh(h)){if(d=h.stateNode,b=h.memoizedProps,S=null,R=kr,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}d[hi]=h,d=!!(d.nodeValue===b||S!==null&&S.suppressHydrationWarning===!0||aU(d.nodeValue,b)),d||Ic(h,!0)}else d=cy(d).createTextNode(S),d[hi]=h,h.stateNode=d}return ni(h),null;case 31:if(b=h.memoizedState,d===null||d.memoizedState!==null){if(S=nh(h),b!==null){if(d===null){if(!S)throw Error(i(318));if(d=h.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(i(557));d[hi]=h}else gd(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;ni(h),d=!1}else b=FM(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=b),d=!0;if(!d)return h.flags&256?(Xa(h),h):(Xa(h),null);if((h.flags&128)!==0)throw Error(i(558))}return ni(h),null;case 13:if(S=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(R=nh(h),S!==null&&S.dehydrated!==null){if(d===null){if(!R)throw Error(i(318));if(R=h.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(i(317));R[hi]=h}else gd(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;ni(h),R=!1}else R=FM(),d!==null&&d.memoizedState!==null&&(d.memoizedState.hydrationErrors=R),R=!0;if(!R)return h.flags&256?(Xa(h),h):(Xa(h),null)}return Xa(h),(h.flags&128)!==0?(h.lanes=b,h):(b=S!==null,d=d!==null&&d.memoizedState!==null,b&&(S=h.child,R=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(R=S.alternate.memoizedState.cachePool.pool),D=null,S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(D=S.memoizedState.cachePool.pool),D!==R&&(S.flags|=2048)),b!==d&&b&&(h.child.flags|=8192),Xv(h,h.updateQueue),ni(h),null);case 4:return pe(),d===null&&ZE(h.stateNode.containerInfo),ni(h),null;case 10:return pl(h.type),ni(h),null;case 19:if(X(Ci),S=h.memoizedState,S===null)return ni(h),null;if(R=(h.flags&128)!==0,D=S.rendering,D===null)if(R)sg(S,!1);else{if(_i!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(D=Lv(d),D!==null){for(h.flags|=128,sg(S,!1),d=D.updateQueue,h.updateQueue=d,Xv(h,d),h.subtreeFlags=0,d=b,b=h.child;b!==null;)jL(b,d),b=b.sibling;return ae(Ci,Ci.current&1|2),yn&&fl(h,S.treeForkCount),h.child}d=d.sibling}S.tail!==null&&O()>Jv&&(h.flags|=128,R=!0,sg(S,!1),h.lanes=4194304)}else{if(!R)if(d=Lv(D),d!==null){if(h.flags|=128,R=!0,d=d.updateQueue,h.updateQueue=d,Xv(h,d),sg(S,!0),S.tail===null&&S.tailMode==="hidden"&&!D.alternate&&!yn)return ni(h),null}else 2*O()-S.renderingStartTime>Jv&&b!==536870912&&(h.flags|=128,R=!0,sg(S,!1),h.lanes=4194304);S.isBackwards?(D.sibling=h.child,h.child=D):(d=S.last,d!==null?d.sibling=D:h.child=D,S.last=D)}return S.tail!==null?(d=S.tail,S.rendering=d,S.tail=d.sibling,S.renderingStartTime=O(),d.sibling=null,b=Ci.current,ae(Ci,R?b&1|2:b&1),yn&&fl(h,S.treeForkCount),d):(ni(h),null);case 22:case 23:return Xa(h),QM(),S=h.memoizedState!==null,d!==null?d.memoizedState!==null!==S&&(h.flags|=8192):S&&(h.flags|=8192),S?(b&536870912)!==0&&(h.flags&128)===0&&(ni(h),h.subtreeFlags&6&&(h.flags|=8192)):ni(h),b=h.updateQueue,b!==null&&Xv(h,b.retryQueue),b=null,d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),S=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(S=h.memoizedState.cachePool.pool),S!==b&&(h.flags|=2048),d!==null&&X(yd),null;case 24:return b=null,d!==null&&(b=d.memoizedState.cache),h.memoizedState.cache!==b&&(h.flags|=2048),pl(Ii),ni(h),null;case 25:return null;case 30:return null}throw Error(i(156,h.tag))}function $ee(d,h){switch(jM(h),h.tag){case 1:return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return pl(Ii),pe(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 26:case 27:case 5:return ze(h),null;case 31:if(h.memoizedState!==null){if(Xa(h),h.alternate===null)throw Error(i(340));gd()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 13:if(Xa(h),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(i(340));gd()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return X(Ci),null;case 4:return pe(),null;case 10:return pl(h.type),null;case 22:case 23:return Xa(h),QM(),d!==null&&X(yd),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 24:return pl(Ii),null;case 25:return null;default:return null}}function uj(d,h){switch(jM(h),h.tag){case 3:pl(Ii),pe();break;case 26:case 27:case 5:ze(h);break;case 4:pe();break;case 31:h.memoizedState!==null&&Xa(h);break;case 13:Xa(h);break;case 19:X(Ci);break;case 10:pl(h.type);break;case 22:case 23:Xa(h),QM(),d!==null&&X(yd);break;case 24:pl(Ii)}}function og(d,h){try{var b=h.updateQueue,S=b!==null?b.lastEffect:null;if(S!==null){var R=S.next;b=R;do{if((b.tag&d)===d){S=void 0;var D=b.create,$=b.inst;S=D(),$.destroy=S}b=b.next}while(b!==R)}}catch(ne){Dn(h,h.return,ne)}}function Vc(d,h,b){try{var S=h.updateQueue,R=S!==null?S.lastEffect:null;if(R!==null){var D=R.next;S=D;do{if((S.tag&d)===d){var $=S.inst,ne=$.destroy;if(ne!==void 0){$.destroy=void 0,R=h;var _e=b,Fe=ne;try{Fe()}catch(Je){Dn(R,_e,Je)}}}S=S.next}while(S!==D)}}catch(Je){Dn(h,h.return,Je)}}function dj(d){var h=d.updateQueue;if(h!==null){var b=d.stateNode;try{tI(h,b)}catch(S){Dn(d,d.return,S)}}}function fj(d,h,b){b.props=Md(d.type,d.memoizedProps),b.state=d.memoizedState;try{b.componentWillUnmount()}catch(S){Dn(d,h,S)}}function lg(d,h){try{var b=d.ref;if(b!==null){switch(d.tag){case 26:case 27:case 5:var S=d.stateNode;break;case 30:S=d.stateNode;break;default:S=d.stateNode}typeof b=="function"?d.refCleanup=b(S):b.current=S}}catch(R){Dn(d,h,R)}}function No(d,h){var b=d.ref,S=d.refCleanup;if(b!==null)if(typeof S=="function")try{S()}catch(R){Dn(d,h,R)}finally{d.refCleanup=null,d=d.alternate,d!=null&&(d.refCleanup=null)}else if(typeof b=="function")try{b(null)}catch(R){Dn(d,h,R)}else b.current=null}function hj(d){var h=d.type,b=d.memoizedProps,S=d.stateNode;try{e:switch(h){case"button":case"input":case"select":case"textarea":b.autoFocus&&S.focus();break e;case"img":b.src?S.src=b.src:b.srcSet&&(S.srcset=b.srcSet)}}catch(R){Dn(d,d.return,R)}}function RE(d,h,b){try{var S=d.stateNode;fte(S,d.type,b,h),S[Ai]=h}catch(R){Dn(d,d.return,R)}}function pj(d){return d.tag===5||d.tag===3||d.tag===26||d.tag===27&&Yc(d.type)||d.tag===4}function PE(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||pj(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.tag===27&&Yc(d.type)||d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function kE(d,h,b){var S=d.tag;if(S===5||S===6)d=d.stateNode,h?(b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b).insertBefore(d,h):(h=b.nodeType===9?b.body:b.nodeName==="HTML"?b.ownerDocument.body:b,h.appendChild(d),b=b._reactRootContainer,b!=null||h.onclick!==null||(h.onclick=cl));else if(S!==4&&(S===27&&Yc(d.type)&&(b=d.stateNode,h=null),d=d.child,d!==null))for(kE(d,h,b),d=d.sibling;d!==null;)kE(d,h,b),d=d.sibling}function Kv(d,h,b){var S=d.tag;if(S===5||S===6)d=d.stateNode,h?b.insertBefore(d,h):b.appendChild(d);else if(S!==4&&(S===27&&Yc(d.type)&&(b=d.stateNode),d=d.child,d!==null))for(Kv(d,h,b),d=d.sibling;d!==null;)Kv(d,h,b),d=d.sibling}function mj(d){var h=d.stateNode,b=d.memoizedProps;try{for(var S=d.type,R=h.attributes;R.length;)h.removeAttributeNode(R[0]);Lr(h,S,b),h[hi]=d,h[Ai]=b}catch(D){Dn(d,d.return,D)}}var yl=!1,Fi=!1,DE=!1,gj=typeof WeakSet=="function"?WeakSet:Set,vr=null;function Gee(d,h){if(d=d.containerInfo,eA=gy,d=CL(d),AM(d)){if("selectionStart"in d)var b={start:d.selectionStart,end:d.selectionEnd};else e:{b=(b=d.ownerDocument)&&b.defaultView||window;var S=b.getSelection&&b.getSelection();if(S&&S.rangeCount!==0){b=S.anchorNode;var R=S.anchorOffset,D=S.focusNode;S=S.focusOffset;try{b.nodeType,D.nodeType}catch{b=null;break e}var $=0,ne=-1,_e=-1,Fe=0,Je=0,st=d,Ve=null;t:for(;;){for(var Ye;st!==b||R!==0&&st.nodeType!==3||(ne=$+R),st!==D||S!==0&&st.nodeType!==3||(_e=$+S),st.nodeType===3&&($+=st.nodeValue.length),(Ye=st.firstChild)!==null;)Ve=st,st=Ye;for(;;){if(st===d)break t;if(Ve===b&&++Fe===R&&(ne=$),Ve===D&&++Je===S&&(_e=$),(Ye=st.nextSibling)!==null)break;st=Ve,Ve=st.parentNode}st=Ye}b=ne===-1||_e===-1?null:{start:ne,end:_e}}else b=null}b=b||{start:0,end:0}}else b=null;for(tA={focusedElem:d,selectionRange:b},gy=!1,vr=h;vr!==null;)if(h=vr,d=h.child,(h.subtreeFlags&1028)!==0&&d!==null)d.return=h,vr=d;else for(;vr!==null;){switch(h=vr,D=h.alternate,d=h.flags,h.tag){case 0:if((d&4)!==0&&(d=h.updateQueue,d=d!==null?d.events:null,d!==null))for(b=0;b title"))),Lr(D,S,b),D[hi]=d,Te(D),S=D;break e;case"link":var $=SU("link","href",R).get(S+(b.href||""));if($){for(var ne=0;ne<$.length;ne++)if(D=$[ne],D.getAttribute("href")===(b.href==null||b.href===""?null:b.href)&&D.getAttribute("rel")===(b.rel==null?null:b.rel)&&D.getAttribute("title")===(b.title==null?null:b.title)&&D.getAttribute("crossorigin")===(b.crossOrigin==null?null:b.crossOrigin)){$.splice(ne,1);break t}}D=R.createElement(S),Lr(D,S,b),R.head.appendChild(D);break;case"meta":if($=SU("meta","content",R).get(S+(b.content||""))){for(ne=0;ne<$.length;ne++)if(D=$[ne],D.getAttribute("content")===(b.content==null?null:""+b.content)&&D.getAttribute("name")===(b.name==null?null:b.name)&&D.getAttribute("property")===(b.property==null?null:b.property)&&D.getAttribute("http-equiv")===(b.httpEquiv==null?null:b.httpEquiv)&&D.getAttribute("charset")===(b.charSet==null?null:b.charSet)){$.splice(ne,1);break t}}D=R.createElement(S),Lr(D,S,b),R.head.appendChild(D);break;default:throw Error(i(468,S))}D[hi]=d,Te(D),S=D}d.stateNode=S}else wU(R,d.type,d.stateNode);else d.stateNode=_U(R,S,d.memoizedProps);else D!==S?(D===null?b.stateNode!==null&&(b=b.stateNode,b.parentNode.removeChild(b)):D.count--,S===null?wU(R,d.type,d.stateNode):_U(R,S,d.memoizedProps)):S===null&&d.stateNode!==null&&RE(d,d.memoizedProps,b.memoizedProps)}break;case 27:Aa(h,d),Ta(d),S&512&&(Fi||b===null||No(b,b.return)),b!==null&&S&4&&RE(d,d.memoizedProps,b.memoizedProps);break;case 5:if(Aa(h,d),Ta(d),S&512&&(Fi||b===null||No(b,b.return)),d.flags&32){R=d.stateNode;try{Ao(R,"")}catch(Nt){Dn(d,d.return,Nt)}}S&4&&d.stateNode!=null&&(R=d.memoizedProps,RE(d,R,b!==null?b.memoizedProps:R)),S&1024&&(DE=!0);break;case 6:if(Aa(h,d),Ta(d),S&4){if(d.stateNode===null)throw Error(i(162));S=d.memoizedProps,b=d.stateNode;try{b.nodeValue=S}catch(Nt){Dn(d,d.return,Nt)}}break;case 3:if(fy=null,R=to,to=uy(h.containerInfo),Aa(h,d),to=R,Ta(d),S&4&&b!==null&&b.memoizedState.isDehydrated)try{wh(h.containerInfo)}catch(Nt){Dn(d,d.return,Nt)}DE&&(DE=!1,wj(d));break;case 4:S=to,to=uy(d.stateNode.containerInfo),Aa(h,d),Ta(d),to=S;break;case 12:Aa(h,d),Ta(d);break;case 31:Aa(h,d),Ta(d),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Yv(d,S)));break;case 13:Aa(h,d),Ta(d),d.child.flags&8192&&d.memoizedState!==null!=(b!==null&&b.memoizedState!==null)&&(Qv=O()),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Yv(d,S)));break;case 22:R=d.memoizedState!==null;var _e=b!==null&&b.memoizedState!==null,Fe=yl,Je=Fi;if(yl=Fe||R,Fi=Je||_e,Aa(h,d),Fi=Je,yl=Fe,Ta(d),S&8192)e:for(h=d.stateNode,h._visibility=R?h._visibility&-2:h._visibility|1,R&&(b===null||_e||yl||Fi||Ed(d)),b=null,h=d;;){if(h.tag===5||h.tag===26){if(b===null){_e=b=h;try{if(D=_e.stateNode,R)$=D.style,typeof $.setProperty=="function"?$.setProperty("display","none","important"):$.display="none";else{ne=_e.stateNode;var st=_e.memoizedProps.style,Ve=st!=null&&st.hasOwnProperty("display")?st.display:null;ne.style.display=Ve==null||typeof Ve=="boolean"?"":(""+Ve).trim()}}catch(Nt){Dn(_e,_e.return,Nt)}}}else if(h.tag===6){if(b===null){_e=h;try{_e.stateNode.nodeValue=R?"":_e.memoizedProps}catch(Nt){Dn(_e,_e.return,Nt)}}}else if(h.tag===18){if(b===null){_e=h;try{var Ye=_e.stateNode;R?fU(Ye,!0):fU(_e.stateNode,!1)}catch(Nt){Dn(_e,_e.return,Nt)}}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===d)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break e;for(;h.sibling===null;){if(h.return===null||h.return===d)break e;b===h&&(b=null),h=h.return}b===h&&(b=null),h.sibling.return=h.return,h=h.sibling}S&4&&(S=d.updateQueue,S!==null&&(b=S.retryQueue,b!==null&&(S.retryQueue=null,Yv(d,b))));break;case 19:Aa(h,d),Ta(d),S&4&&(S=d.updateQueue,S!==null&&(d.updateQueue=null,Yv(d,S)));break;case 30:break;case 21:break;default:Aa(h,d),Ta(d)}}function Ta(d){var h=d.flags;if(h&2){try{for(var b,S=d.return;S!==null;){if(pj(S)){b=S;break}S=S.return}if(b==null)throw Error(i(160));switch(b.tag){case 27:var R=b.stateNode,D=PE(d);Kv(d,D,R);break;case 5:var $=b.stateNode;b.flags&32&&(Ao($,""),b.flags&=-33);var ne=PE(d);Kv(d,ne,$);break;case 3:case 4:var _e=b.stateNode.containerInfo,Fe=PE(d);kE(d,Fe,_e);break;default:throw Error(i(161))}}catch(Je){Dn(d,d.return,Je)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function wj(d){if(d.subtreeFlags&1024)for(d=d.child;d!==null;){var h=d;wj(h),h.tag===5&&h.flags&1024&&h.stateNode.reset(),d=d.sibling}}function _l(d,h){if(h.subtreeFlags&8772)for(h=h.child;h!==null;)xj(d,h.alternate,h),h=h.sibling}function Ed(d){for(d=d.child;d!==null;){var h=d;switch(h.tag){case 0:case 11:case 14:case 15:Vc(4,h,h.return),Ed(h);break;case 1:No(h,h.return);var b=h.stateNode;typeof b.componentWillUnmount=="function"&&fj(h,h.return,b),Ed(h);break;case 27:xg(h.stateNode);case 26:case 5:No(h,h.return),Ed(h);break;case 22:h.memoizedState===null&&Ed(h);break;case 30:Ed(h);break;default:Ed(h)}d=d.sibling}}function Sl(d,h,b){for(b=b&&(h.subtreeFlags&8772)!==0,h=h.child;h!==null;){var S=h.alternate,R=d,D=h,$=D.flags;switch(D.tag){case 0:case 11:case 15:Sl(R,D,b),og(4,D);break;case 1:if(Sl(R,D,b),S=D,R=S.stateNode,typeof R.componentDidMount=="function")try{R.componentDidMount()}catch(Fe){Dn(S,S.return,Fe)}if(S=D,R=S.updateQueue,R!==null){var ne=S.stateNode;try{var _e=R.shared.hiddenCallbacks;if(_e!==null)for(R.shared.hiddenCallbacks=null,R=0;R<_e.length;R++)eI(_e[R],ne)}catch(Fe){Dn(S,S.return,Fe)}}b&&$&64&&dj(D),lg(D,D.return);break;case 27:mj(D);case 26:case 5:Sl(R,D,b),b&&S===null&&$&4&&hj(D),lg(D,D.return);break;case 12:Sl(R,D,b);break;case 31:Sl(R,D,b),b&&$&4&&bj(R,D);break;case 13:Sl(R,D,b),b&&$&4&&_j(R,D);break;case 22:D.memoizedState===null&&Sl(R,D,b),lg(D,D.return);break;case 30:break;default:Sl(R,D,b)}h=h.sibling}}function OE(d,h){var b=null;d!==null&&d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),d=null,h.memoizedState!==null&&h.memoizedState.cachePool!==null&&(d=h.memoizedState.cachePool.pool),d!==b&&(d!=null&&d.refCount++,b!=null&&Xm(b))}function LE(d,h){d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&Xm(d))}function no(d,h,b,S){if(h.subtreeFlags&10256)for(h=h.child;h!==null;)Mj(d,h,b,S),h=h.sibling}function Mj(d,h,b,S){var R=h.flags;switch(h.tag){case 0:case 11:case 15:no(d,h,b,S),R&2048&&og(9,h);break;case 1:no(d,h,b,S);break;case 3:no(d,h,b,S),R&2048&&(d=null,h.alternate!==null&&(d=h.alternate.memoizedState.cache),h=h.memoizedState.cache,h!==d&&(h.refCount++,d!=null&&Xm(d)));break;case 12:if(R&2048){no(d,h,b,S),d=h.stateNode;try{var D=h.memoizedProps,$=D.id,ne=D.onPostCommit;typeof ne=="function"&&ne($,h.alternate===null?"mount":"update",d.passiveEffectDuration,-0)}catch(_e){Dn(h,h.return,_e)}}else no(d,h,b,S);break;case 31:no(d,h,b,S);break;case 13:no(d,h,b,S);break;case 23:break;case 22:D=h.stateNode,$=h.alternate,h.memoizedState!==null?D._visibility&2?no(d,h,b,S):cg(d,h):D._visibility&2?no(d,h,b,S):(D._visibility|=2,fh(d,h,b,S,(h.subtreeFlags&10256)!==0||!1)),R&2048&&OE($,h);break;case 24:no(d,h,b,S),R&2048&&LE(h.alternate,h);break;default:no(d,h,b,S)}}function fh(d,h,b,S,R){for(R=R&&((h.subtreeFlags&10256)!==0||!1),h=h.child;h!==null;){var D=d,$=h,ne=b,_e=S,Fe=$.flags;switch($.tag){case 0:case 11:case 15:fh(D,$,ne,_e,R),og(8,$);break;case 23:break;case 22:var Je=$.stateNode;$.memoizedState!==null?Je._visibility&2?fh(D,$,ne,_e,R):cg(D,$):(Je._visibility|=2,fh(D,$,ne,_e,R)),R&&Fe&2048&&OE($.alternate,$);break;case 24:fh(D,$,ne,_e,R),R&&Fe&2048&&LE($.alternate,$);break;default:fh(D,$,ne,_e,R)}h=h.sibling}}function cg(d,h){if(h.subtreeFlags&10256)for(h=h.child;h!==null;){var b=d,S=h,R=S.flags;switch(S.tag){case 22:cg(b,S),R&2048&&OE(S.alternate,S);break;case 24:cg(b,S),R&2048&&LE(S.alternate,S);break;default:cg(b,S)}h=h.sibling}}var ug=8192;function hh(d,h,b){if(d.subtreeFlags&ug)for(d=d.child;d!==null;)Ej(d,h,b),d=d.sibling}function Ej(d,h,b){switch(d.tag){case 26:hh(d,h,b),d.flags&ug&&d.memoizedState!==null&&kte(b,to,d.memoizedState,d.memoizedProps);break;case 5:hh(d,h,b);break;case 3:case 4:var S=to;to=uy(d.stateNode.containerInfo),hh(d,h,b),to=S;break;case 22:d.memoizedState===null&&(S=d.alternate,S!==null&&S.memoizedState!==null?(S=ug,ug=16777216,hh(d,h,b),ug=S):hh(d,h,b));break;default:hh(d,h,b)}}function Aj(d){var h=d.alternate;if(h!==null&&(d=h.child,d!==null)){h.child=null;do h=d.sibling,d.sibling=null,d=h;while(d!==null)}}function dg(d){var h=d.deletions;if((d.flags&16)!==0){if(h!==null)for(var b=0;bUn&&($=Un,Un=Bt,Bt=$);var De=AL(ne,Bt),Ee=AL(ne,Un);if(De&&Ee&&(Ye.rangeCount!==1||Ye.anchorNode!==De.node||Ye.anchorOffset!==De.offset||Ye.focusNode!==Ee.node||Ye.focusOffset!==Ee.offset)){var Ue=st.createRange();Ue.setStart(De.node,De.offset),Ye.removeAllRanges(),Bt>Un?(Ye.addRange(Ue),Ye.extend(Ee.node,Ee.offset)):(Ue.setEnd(Ee.node,Ee.offset),Ye.addRange(Ue))}}}}for(st=[],Ye=ne;Ye=Ye.parentNode;)Ye.nodeType===1&&st.push({element:Ye,left:Ye.scrollLeft,top:Ye.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neb?32:b,V.T=null,b=zE,zE=null;var D=qc,$=Ml;if(Ji=0,gh=qc=null,Ml=0,(Cn&6)!==0)throw Error(i(331));var ne=Cn;if(Cn|=4,Tj(D.current),Mj(D,D.current,$,b),Cn=ne,pg(0,!1),Re&&typeof Re.onPostCommitFiberRoot=="function")try{Re.onPostCommitFiberRoot(Ie,D)}catch{}return!0}finally{G.p=R,V.T=S,Gj(d,h)}}function qj(d,h,b){h=gs(b,h),h=yE(d.stateNode,h,2),d=zc(d,h,2),d!==null&&(ln(d,2),Ro(d))}function Dn(d,h,b){if(d.tag===3)qj(d,d,b);else for(;h!==null;){if(h.tag===3){qj(h,d,b);break}else if(h.tag===1){var S=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(Wc===null||!Wc.has(S))){d=gs(b,d),b=XI(2),S=zc(h,b,2),S!==null&&(KI(b,S,h,d),ln(S,2),Ro(S));break}}h=h.return}}function $E(d,h,b){var S=d.pingCache;if(S===null){S=d.pingCache=new Xee;var R=new Set;S.set(h,R)}else R=S.get(h),R===void 0&&(R=new Set,S.set(h,R));R.has(b)||(IE=!0,R.add(b),d=Jee.bind(null,d,h,b),h.then(d,d))}function Jee(d,h,b){var S=d.pingCache;S!==null&&S.delete(h),d.pingedLanes|=d.suspendedLanes&b,d.warmLanes&=~b,Xn===d&&(gn&b)===b&&(_i===4||_i===3&&(gn&62914560)===gn&&300>O()-Qv?(Cn&2)===0&&xh(d,0):jE|=b,mh===gn&&(mh=0)),Ro(d)}function Xj(d,h){h===0&&(h=bt()),d=pd(d,h),d!==null&&(ln(d,h),Ro(d))}function ete(d){var h=d.memoizedState,b=0;h!==null&&(b=h.retryLane),Xj(d,b)}function tte(d,h){var b=0;switch(d.tag){case 31:case 13:var S=d.stateNode,R=d.memoizedState;R!==null&&(b=R.retryLane);break;case 19:S=d.stateNode;break;case 22:S=d.stateNode._retryCache;break;default:throw Error(i(314))}S!==null&&S.delete(h),Xj(d,b)}function nte(d,h){return ke(d,h)}var ay=null,yh=null,GE=!1,sy=!1,WE=!1,Kc=0;function Ro(d){d!==yh&&d.next===null&&(yh===null?ay=yh=d:yh=yh.next=d),sy=!0,GE||(GE=!0,rte())}function pg(d,h){if(!WE&&sy){WE=!0;do for(var b=!1,S=ay;S!==null;){if(d!==0){var R=S.pendingLanes;if(R===0)var D=0;else{var $=S.suspendedLanes,ne=S.pingedLanes;D=(1<<31-tt(42|d)+1)-1,D&=R&~($&~ne),D=D&201326741?D&201326741|1:D?D|2:0}D!==0&&(b=!0,Qj(S,D))}else D=gn,D=ge(S,S===Xn?D:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(D&3)===0||Be(S,D)||(b=!0,Qj(S,D));S=S.next}while(b);WE=!1}}function ite(){Kj()}function Kj(){sy=GE=!1;var d=0;Kc!==0&&pte()&&(d=Kc);for(var h=O(),b=null,S=ay;S!==null;){var R=S.next,D=Yj(S,h);D===0?(S.next=null,b===null?ay=R:b.next=R,R===null&&(yh=b)):(b=S,(d!==0||(D&3)!==0)&&(sy=!0)),S=R}Ji!==0&&Ji!==5||pg(d),Kc!==0&&(Kc=0)}function Yj(d,h){for(var b=d.suspendedLanes,S=d.pingedLanes,R=d.expirationTimes,D=d.pendingLanes&-62914561;0ne)break;var Je=_e.transferSize,st=_e.initiatorType;Je&&sU(st)&&(_e=_e.responseEnd,$+=Je*(_e"u"?null:document;function vU(d,h,b){var S=bh;if(S&&typeof h=="string"&&h){var R=Nn(h);R='link[rel="'+d+'"][href="'+R+'"]',typeof b=="string"&&(R+='[crossorigin="'+b+'"]'),xU.has(R)||(xU.add(R),d={rel:d,crossOrigin:b,href:h},S.querySelector(R)===null&&(h=S.createElement("link"),Lr(h,"link",d),Te(h),S.head.appendChild(h)))}}function wte(d){El.D(d),vU("dns-prefetch",d,null)}function Mte(d,h){El.C(d,h),vU("preconnect",d,h)}function Ete(d,h,b){El.L(d,h,b);var S=bh;if(S&&d&&h){var R='link[rel="preload"][as="'+Nn(h)+'"]';h==="image"&&b&&b.imageSrcSet?(R+='[imagesrcset="'+Nn(b.imageSrcSet)+'"]',typeof b.imageSizes=="string"&&(R+='[imagesizes="'+Nn(b.imageSizes)+'"]')):R+='[href="'+Nn(d)+'"]';var D=R;switch(h){case"style":D=_h(d);break;case"script":D=Sh(d)}Ss.has(D)||(d=f({rel:"preload",href:h==="image"&&b&&b.imageSrcSet?void 0:d,as:h},b),Ss.set(D,d),S.querySelector(R)!==null||h==="style"&&S.querySelector(vg(D))||h==="script"&&S.querySelector(yg(D))||(h=S.createElement("link"),Lr(h,"link",d),Te(h),S.head.appendChild(h)))}}function Ate(d,h){El.m(d,h);var b=bh;if(b&&d){var S=h&&typeof h.as=="string"?h.as:"script",R='link[rel="modulepreload"][as="'+Nn(S)+'"][href="'+Nn(d)+'"]',D=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":D=Sh(d)}if(!Ss.has(D)&&(d=f({rel:"modulepreload",href:d},h),Ss.set(D,d),b.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(b.querySelector(yg(D)))return}S=b.createElement("link"),Lr(S,"link",d),Te(S),b.head.appendChild(S)}}}function Tte(d,h,b){El.S(d,h,b);var S=bh;if(S&&d){var R=Ce(S).hoistableStyles,D=_h(d);h=h||"default";var $=R.get(D);if(!$){var ne={loading:0,preload:null};if($=S.querySelector(vg(D)))ne.loading=5;else{d=f({rel:"stylesheet",href:d,"data-precedence":h},b),(b=Ss.get(D))&&lA(d,b);var _e=$=S.createElement("link");Te(_e),Lr(_e,"link",d),_e._p=new Promise(function(Fe,Je){_e.onload=Fe,_e.onerror=Je}),_e.addEventListener("load",function(){ne.loading|=1}),_e.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,dy($,h,S)}$={type:"stylesheet",instance:$,count:1,state:ne},R.set(D,$)}}}function Cte(d,h){El.X(d,h);var b=bh;if(b&&d){var S=Ce(b).hoistableScripts,R=Sh(d),D=S.get(R);D||(D=b.querySelector(yg(R)),D||(d=f({src:d,async:!0},h),(h=Ss.get(R))&&cA(d,h),D=b.createElement("script"),Te(D),Lr(D,"link",d),b.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(R,D))}}function Nte(d,h){El.M(d,h);var b=bh;if(b&&d){var S=Ce(b).hoistableScripts,R=Sh(d),D=S.get(R);D||(D=b.querySelector(yg(R)),D||(d=f({src:d,async:!0,type:"module"},h),(h=Ss.get(R))&&cA(d,h),D=b.createElement("script"),Te(D),Lr(D,"link",d),b.head.appendChild(D)),D={type:"script",instance:D,count:1,state:null},S.set(R,D))}}function yU(d,h,b,S){var R=(R=ie.current)?uy(R):null;if(!R)throw Error(i(446));switch(d){case"meta":case"title":return null;case"style":return typeof b.precedence=="string"&&typeof b.href=="string"?(h=_h(b.href),b=Ce(R).hoistableStyles,S=b.get(h),S||(S={type:"style",instance:null,count:0,state:null},b.set(h,S)),S):{type:"void",instance:null,count:0,state:null};case"link":if(b.rel==="stylesheet"&&typeof b.href=="string"&&typeof b.precedence=="string"){d=_h(b.href);var D=Ce(R).hoistableStyles,$=D.get(d);if($||(R=R.ownerDocument||R,$={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},D.set(d,$),(D=R.querySelector(vg(d)))&&!D._p&&($.instance=D,$.state.loading=5),Ss.has(d)||(b={rel:"preload",as:"style",href:b.href,crossOrigin:b.crossOrigin,integrity:b.integrity,media:b.media,hrefLang:b.hrefLang,referrerPolicy:b.referrerPolicy},Ss.set(d,b),D||Rte(R,d,b,$.state))),h&&S===null)throw Error(i(528,""));return $}if(h&&S!==null)throw Error(i(529,""));return null;case"script":return h=b.async,b=b.src,typeof b=="string"&&h&&typeof h!="function"&&typeof h!="symbol"?(h=Sh(b),b=Ce(R).hoistableScripts,S=b.get(h),S||(S={type:"script",instance:null,count:0,state:null},b.set(h,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,d))}}function _h(d){return'href="'+Nn(d)+'"'}function vg(d){return'link[rel="stylesheet"]['+d+"]"}function bU(d){return f({},d,{"data-precedence":d.precedence,precedence:null})}function Rte(d,h,b,S){d.querySelector('link[rel="preload"][as="style"]['+h+"]")?S.loading=1:(h=d.createElement("link"),S.preload=h,h.addEventListener("load",function(){return S.loading|=1}),h.addEventListener("error",function(){return S.loading|=2}),Lr(h,"link",b),Te(h),d.head.appendChild(h))}function Sh(d){return'[src="'+Nn(d)+'"]'}function yg(d){return"script[async]"+d}function _U(d,h,b){if(h.count++,h.instance===null)switch(h.type){case"style":var S=d.querySelector('style[data-href~="'+Nn(b.href)+'"]');if(S)return h.instance=S,Te(S),S;var R=f({},b,{"data-href":b.href,"data-precedence":b.precedence,href:null,precedence:null});return S=(d.ownerDocument||d).createElement("style"),Te(S),Lr(S,"style",R),dy(S,b.precedence,d),h.instance=S;case"stylesheet":R=_h(b.href);var D=d.querySelector(vg(R));if(D)return h.state.loading|=4,h.instance=D,Te(D),D;S=bU(b),(R=Ss.get(R))&&lA(S,R),D=(d.ownerDocument||d).createElement("link"),Te(D);var $=D;return $._p=new Promise(function(ne,_e){$.onload=ne,$.onerror=_e}),Lr(D,"link",S),h.state.loading|=4,dy(D,b.precedence,d),h.instance=D;case"script":return D=Sh(b.src),(R=d.querySelector(yg(D)))?(h.instance=R,Te(R),R):(S=b,(R=Ss.get(D))&&(S=f({},b),cA(S,R)),d=d.ownerDocument||d,R=d.createElement("script"),Te(R),Lr(R,"link",S),d.head.appendChild(R),h.instance=R);case"void":return null;default:throw Error(i(443,h.type))}else h.type==="stylesheet"&&(h.state.loading&4)===0&&(S=h.instance,h.state.loading|=4,dy(S,b.precedence,d));return h.instance}function dy(d,h,b){for(var S=b.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),R=S.length?S[S.length-1]:null,D=R,$=0;$ title"):null)}function Pte(d,h,b){if(b===1||h.itemProp!=null)return!1;switch(d){case"meta":case"title":return!0;case"style":if(typeof h.precedence!="string"||typeof h.href!="string"||h.href==="")break;return!0;case"link":if(typeof h.rel!="string"||typeof h.href!="string"||h.href===""||h.onLoad||h.onError)break;switch(h.rel){case"stylesheet":return d=h.disabled,typeof h.precedence=="string"&&d==null;default:return!0}case"script":if(h.async&&typeof h.async!="function"&&typeof h.async!="symbol"&&!h.onLoad&&!h.onError&&h.src&&typeof h.src=="string")return!0}return!1}function MU(d){return!(d.type==="stylesheet"&&(d.state.loading&3)===0)}function kte(d,h,b,S){if(b.type==="stylesheet"&&(typeof S.media!="string"||matchMedia(S.media).matches!==!1)&&(b.state.loading&4)===0){if(b.instance===null){var R=_h(S.href),D=h.querySelector(vg(R));if(D){h=D._p,h!==null&&typeof h=="object"&&typeof h.then=="function"&&(d.count++,d=hy.bind(d),h.then(d,d)),b.state.loading|=4,b.instance=D,Te(D);return}D=h.ownerDocument||h,S=bU(S),(R=Ss.get(R))&&lA(S,R),D=D.createElement("link"),Te(D);var $=D;$._p=new Promise(function(ne,_e){$.onload=ne,$.onerror=_e}),Lr(D,"link",S),b.instance=D}d.stylesheets===null&&(d.stylesheets=new Map),d.stylesheets.set(b,h),(h=b.state.preload)&&(b.state.loading&3)===0&&(d.count++,b=hy.bind(d),h.addEventListener("load",b),h.addEventListener("error",b))}}var uA=0;function Dte(d,h){return d.stylesheets&&d.count===0&&my(d,d.stylesheets),0uA?50:800)+h);return d.unsuspend=b,function(){d.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function hy(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)my(this,this.stylesheets);else if(this.unsuspend){var d=this.unsuspend;this.unsuspend=null,d()}}}var py=null;function my(d,h){d.stylesheets=null,d.unsuspend!==null&&(d.count++,py=new Map,h.forEach(Ote,d),py=null,hy.call(d))}function Ote(d,h){if(!(h.state.loading&4)){var b=py.get(d);if(b)var S=b.get(null);else{b=new Map,py.set(d,b);for(var R=d.querySelectorAll("link[data-precedence],style[data-precedence]"),D=0;D"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),yA.exports=Zte(),yA.exports}var Jte=Qte();const Vt=t=>typeof t=="string",Ag=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},XU=t=>t==null?"":""+t,ene=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},tne=/###/g,KU=t=>t&&t.indexOf("###")>-1?t.replace(tne,"."):t,YU=t=>!t||Vt(t),cx=(t,e,n)=>{const i=Vt(e)?e.split("."):e;let r=0;for(;r{const{obj:i,k:r}=cx(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=cx(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=cx(t,s,Object),o?.obj&&typeof o.obj[`${o.k}.${a}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n},nne=(t,e,n,i)=>{const{obj:r,k:a}=cx(t,e,Object);r[a]=r[a]||[],r[a].push(n)},N_=(t,e)=>{const{obj:n,k:i}=cx(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},ine=(t,e,n)=>{const i=N_(t,n);return i!==void 0?i:N_(e,n)},aG=(t,e,n)=>{for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?Vt(t[i])||t[i]instanceof String||Vt(e[i])||e[i]instanceof String?n&&(t[i]=e[i]):aG(t[i],e[i],n):t[i]=e[i]);return t},Mh=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var rne={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const ane=t=>Vt(t)?t.replace(/[&<>"'\/]/g,e=>rne[e]):t;class sne{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const one=[" ",",","?","!",";"],lne=new sne(20),cne=(t,e,n)=>{e=e||"",n=n||"";const i=one.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=lne.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a},lN=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const i=e.split(n);let r=t;for(let a=0;a-1&&lt?.replace("_","-"),une={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console?.[t]?.apply?.(console,e)}};class R_{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||une,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(Vt(e[0])&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new R_(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new R_(this.logger,e)}}var Bo=new R_;let FS=class{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([r,a])=>{for(let s=0;s{for(let s=0;s-1&&this.options.ns.splice(n,1)}getResource(e,n,i,r={}){const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):Vt(i)&&a?o.push(...i.split(a)):o.push(i)));const l=N_(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||!Vt(i)?l:lN(this.data?.[e]?.[n],i,a)}addResource(e,n,i,r,a={silent:!1}){const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),ZU(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i,r={silent:!1}){for(const a in i)(Vt(i[a])||Array.isArray(i[a]))&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a,s={silent:!1,skipCopy:!1}){let o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=N_(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?aG(l,i,a):l={...l,...i},ZU(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var sG={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{e=this.processors[a]?.process(e,n,i,r)??e}),e}};const oG=Symbol("i18next/PATH_KEY");function dne(){const t=[],e=Object.create(null);let n;return e.get=(i,r)=>(n?.revoke?.(),r===oG?t:(t.push(r),n=Proxy.revocable(i,e),n.proxy)),Proxy.revocable(Object.create(null),e).proxy}function cN(t,e){const{[oG]:n}=t(dne());return n.join(e?.keySeparator??".")}const JU={},wA=t=>!Vt(t)&&typeof t!="boolean"&&typeof t!="number";class P_ extends FS{constructor(e,n={}){super(),ene(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Bo.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const i={...n};if(e==null)return!1;const r=this.resolve(e,i);if(r?.res===void 0)return!1;const a=wA(r.res);return!(i.returnObjects===!1&&a)}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!cne(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:Vt(a)?[a]:a};const c=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(c[0])>-1)&&(a=c.shift()),e=c.join(r)}return{key:e,namespaces:Vt(a)?[a]:a}}translate(e,n,i){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),e==null)return"";typeof e=="function"&&(e=cN(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);const a=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],r),c=l[l.length-1];let u=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const f=r.lng||this.language,m=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(f?.toLowerCase()==="cimode")return m?a?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:`${c}${u}${o}`:a?{res:o,usedKey:o,exactUsedKey:o,usedLng:f,usedNS:c,usedParams:this.getUsedParamsDetails(r)}:o;const g=this.resolve(e,r);let y=g?.res;const _=g?.usedKey||o,v=g?.exactUsedKey||o,x=["[object Number]","[object Function]","[object RegExp]"],M=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,w=!this.i18nFormat||this.i18nFormat.handleAsObject,E=r.count!==void 0&&!Vt(r.count),T=P_.hasDefaultValue(r),P=E?this.pluralResolver.getSuffix(f,r.count,r):"",N=r.ordinal&&E?this.pluralResolver.getSuffix(f,r.count,{ordinal:!1}):"",j=E&&!r.ordinal&&r.count===0,C=j&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${P}`]||r[`defaultValue${N}`]||r.defaultValue;let k=y;w&&!y&&T&&(k=C);const F=wA(k),I=Object.prototype.toString.apply(k);if(w&&k&&F&&x.indexOf(I)<0&&!(Vt(M)&&Array.isArray(k))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const q=this.options.returnedObjectHandler?this.options.returnedObjectHandler(_,k,{...r,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return a?(g.res=q,g.usedParams=this.getUsedParamsDetails(r),g):q}if(s){const q=Array.isArray(k),L=q?[]:{},H=q?v:_;for(const V in k)if(Object.prototype.hasOwnProperty.call(k,V)){const G=`${H}${s}${V}`;T&&!y?L[V]=this.translate(G,{...r,defaultValue:wA(C)?C[V]:void 0,joinArrays:!1,ns:l}):L[V]=this.translate(G,{...r,joinArrays:!1,ns:l}),L[V]===G&&(L[V]=k[V])}y=L}}else if(w&&Vt(M)&&Array.isArray(y))y=y.join(M),y&&(y=this.extendTranslation(y,e,r,i));else{let q=!1,L=!1;!this.isValidLookup(y)&&T&&(q=!0,y=C),this.isValidLookup(y)||(L=!0,y=o);const V=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:y,G=T&&C!==y&&this.options.updateMissing;if(L||q||G){if(this.logger.log(G?"updateKey":"missingKey",f,c,o,G?C:y),s){const B=this.resolve(o,{...r,keySeparator:!1});B&&B.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 K=[];const Z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Z&&Z[0])for(let B=0;B{const ce=T&&ae!==y?ae:V;this.options.missingKeyHandler?this.options.missingKeyHandler(B,c,X,ce,G,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(B,c,X,ce,G,r),this.emit("missingKey",B,c,X,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?K.forEach(B=>{const X=this.pluralResolver.getSuffixes(B,r);j&&r[`defaultValue${this.options.pluralSeparator}zero`]&&X.indexOf(`${this.options.pluralSeparator}zero`)<0&&X.push(`${this.options.pluralSeparator}zero`),X.forEach(ae=>{se([B],o+ae,r[`defaultValue${ae}`]||C)})}):se(K,o,C))}y=this.extendTranslation(y,e,r,g,i),L&&y===o&&this.options.appendNamespaceToMissingKey&&(y=`${c}${u}${o}`),(L||q)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,q?y:void 0,r))}return a?(g.res=y,g.usedParams=this.getUsedParamsDetails(r),g):y}extendTranslation(e,n,i,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const l=Vt(e)&&(i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let u=i.replace&&!Vt(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),e=this.interpolator.interpolate(e,u,i.lng||this.language||r.usedLng,i),l){const f=e.match(this.interpolator.nestingRegexp),m=f&&f.length;ca?.[0]===f[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):this.translate(...f,n),i)),i.interpolation&&this.interpolator.reset()}const s=i.postProcess||this.options.postProcess,o=Vt(s)?[s]:s;return e!=null&&o?.length&&i.applyPostProcessor!==!1&&(e=sG.handle(o,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e,n={}){let i,r,a,s,o;return Vt(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const c=this.extractFromKey(l,n),u=c.key;r=u;let f=c.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const m=n.count!==void 0&&!Vt(n.count),g=m&&!n.ordinal&&n.count===0,y=n.context!==void 0&&(Vt(n.context)||typeof n.context=="number")&&n.context!=="",_=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{this.isValidLookup(i)||(o=v,!JU[`${_[0]}-${v}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(JU[`${_[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${_.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),_.forEach(x=>{if(this.isValidLookup(i))return;s=x;const M=[u];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(M,u,x,v,n);else{let E;m&&(E=this.pluralResolver.getSuffix(x,n.count,n));const T=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(m&&(n.ordinal&&E.indexOf(P)===0&&M.push(u+E.replace(P,this.options.pluralSeparator)),M.push(u+E),g&&M.push(u+T)),y){const N=`${u}${this.options.contextSeparator||"_"}${n.context}`;M.push(N),m&&(n.ordinal&&E.indexOf(P)===0&&M.push(N+E.replace(P,this.options.pluralSeparator)),M.push(N+E),g&&M.push(N+T))}}let w;for(;w=M.pop();)this.isValidLookup(i)||(a=w,i=this.getResource(x,v,w,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&!Vt(e.replace);let r=i?e.replace:e;if(i&&typeof e.count<"u"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}class e4{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Bo.create("languageUtils")}getScriptPartFromCode(e){if(e=kx(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=kx(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(Vt(e)&&e.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return n=r;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(s=>{if(s===a)return s;if(!(s.indexOf("-")<0&&a.indexOf("-")<0)&&(s.indexOf("-")>0&&a.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===a||s.indexOf(a)===0&&a.length>1))return s})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),Vt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return Vt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):Vt(e)&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}const t4={zero:0,one:1,two:2,few:3,many:4,other:5},n4={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class fne{constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=Bo.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const i=kx(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let s;try{s=new Intl.PluralRules(i,{type:r})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),n4;if(!e.match(/-|_/))return n4;const l=this.languageUtils.getLanguagePartFromCode(e);s=this.getRule(l,n)}return this.pluralRulesCache[a]=s,s}needsPlural(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,n,i={}){return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e,n={}){let i=this.getRule(e,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((r,a)=>t4[r]-t4[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(e,n,i={}){const r=this.getRule(e,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,i))}}const i4=(t,e,n,i=".",r=!0)=>{let a=ine(t,e,n);return!a&&r&&Vt(n)&&(a=lN(t,n,i),a===void 0&&(a=lN(e,n,i))),a},MA=t=>t.replace(/\$/g,"$$$$");class hne{constructor(e={}){this.logger=Bo.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:a,prefixEscaped:s,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:f,nestingPrefix:m,nestingPrefixEscaped:g,nestingSuffix:y,nestingSuffixEscaped:_,nestingOptionsSeparator:v,maxReplaces:x,alwaysFormat:M}=e.interpolation;this.escape=n!==void 0?n:ane,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=a?Mh(a):s||"{{",this.suffix=o?Mh(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=m?Mh(m):g||Mh("$t("),this.nestingSuffix=y?Mh(y):_||Mh(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=x||1e3,this.alwaysFormat=M!==void 0?M:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n?.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=g=>{if(g.indexOf(this.formatSeparator)<0){const x=i4(n,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...r,...n,interpolationkey:g}):x}const y=g.split(this.formatSeparator),_=y.shift().trim(),v=y.join(this.formatSeparator).trim();return this.format(i4(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),v,i,{...r,...n,interpolationkey:_})};this.resetRegExp();const u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>MA(g)},{regex:this.regexp,safeValue:g=>this.escapeValue?MA(this.escape(g)):MA(g)}].forEach(g=>{for(o=0;a=g.regex.exec(e);){const y=a[1].trim();if(s=c(y),s===void 0)if(typeof u=="function"){const v=u(e,a,r);s=Vt(v)?v:""}else if(r&&Object.prototype.hasOwnProperty.call(r,y))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`),s="";else!Vt(s)&&!this.useRawValueToEscape&&(s=XU(s));const _=g.safeValue(s);if(e=e.replace(a[0],_),f?(g.regex.lastIndex+=s.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n,i={}){let r,a,s;const o=(l,c)=>{const u=this.nestingOptionsSeparator;if(l.indexOf(u)<0)return l;const f=l.split(new RegExp(`${u}[ ]*{`));let m=`{${f[1]}`;l=f[0],m=this.interpolate(m,s);const g=m.match(/'/g),y=m.match(/"/g);((g?.length??0)%2===0&&!y||y.length%2!==0)&&(m=m.replace(/'/g,'"'));try{s=JSON.parse(m),c&&(s={...c,...s})}catch(_){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,_),`${l}${u}${m}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l};for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&!Vt(s.replace)?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;const c=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(l=r[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&!Vt(a))return a;Vt(a)||(a=XU(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((u,f)=>this.format(u,f,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const pne=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(s){const[o,...l]=s.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.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:e,formatOptions:n}},r4=t=>{const e={};return(n,i,r)=>{let a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a={...a,[r.interpolationkey]:void 0});const s=i+JSON.stringify(a);let o=e[s];return o||(o=t(kx(i),r),e[s]=o),o(n)}},mne=t=>(e,n,i)=>t(kx(n),i)(e);class gne{constructor(e={}){this.logger=Bo.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?r4:mne;this.formats={number:i((r,a)=>{const s=new Intl.NumberFormat(r,{...a});return o=>s.format(o)}),currency:i((r,a)=>{const s=new Intl.NumberFormat(r,{...a,style:"currency"});return o=>s.format(o)}),datetime:i((r,a)=>{const s=new Intl.DateTimeFormat(r,{...a});return o=>s.format(o)}),relativetime:i((r,a)=>{const s=new Intl.RelativeTimeFormat(r,{...a});return o=>s.format(o,a.range||"day")}),list:i((r,a)=>{const s=new Intl.ListFormat(r,{...a});return o=>s.format(o)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=r4(n)}format(e,n,i,r={}){const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(o=>o.indexOf(")")>-1)){const o=a.findIndex(l=>l.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,o)].join(this.formatSeparator)}return a.reduce((o,l)=>{const{formatName:c,formatOptions:u}=pne(l);if(this.formats[c]){let f=o;try{const m=r?.formatParams?.[r.interpolationkey]||{},g=m.locale||m.lng||r.locale||r.lng||i;f=this.formats[c](o,g,{...u,...r,...m})}catch(m){this.logger.warn(m)}return f}else this.logger.warn(`there was no format function for ${c}`);return o},e)}}const xne=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class vne extends FS{constructor(e,n,i,r={}){super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=Bo.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(c=>{let u=!0;n.forEach(f=>{const m=`${c}|${f}`;!i.reload&&this.store.hasResourceBundle(c,f)?this.state[m]=2:this.state[m]<0||(this.state[m]===1?s[m]===void 0&&(s[m]=!0):(this.state[m]=1,u=!1,s[m]===void 0&&(s[m]=!0),a[m]===void 0&&(a[m]=!0),l[f]===void 0&&(l[f]=!0)))}),u||(o[c]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),!n&&i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const o={};this.queue.forEach(l=>{nne(l.loaded,[a],s),xne(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const u=l.loaded[c];u.length&&u.forEach(f=>{o[c][f]===void 0&&(o[c][f]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i,r=0,a=this.retryTimeout,s){if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(c&&u&&r{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(c,u)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const c=l(e,n);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,n,o)}prepareLoading(e,n,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Vt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),Vt(n)&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e,n=""){const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a,s={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${i}" 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(!(i==null||i==="")){if(this.backend?.create){const l={...s,isUpdate:a},c=this.backend.create.bind(this.backend);if(c.length<6)try{let u;c.length===5?u=c(e,n,i,r,l):u=c(e,n,i,r),u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}else c(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const a4=()=>({debug:!1,initAsync:!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:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),Vt(t[1])&&(e.defaultValue=t[1]),Vt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),s4=t=>(Vt(t.ns)&&(t.ns=[t.ns]),Vt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),Vt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs?.indexOf?.("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t),My=()=>{},yne=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class ux extends FS{constructor(e={},n){if(super(),this.options=s4(e),this.services={},this.logger=Bo,this.modules={external:[]},yne(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(Vt(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const i=a4();this.options={...i,...this.options,...s4(e)},this.options.interpolation={...i.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator);const r=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?Bo.init(r(this.modules.logger),this.options):Bo.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=gne;const u=new e4(this.options);this.store=new QU(this.options.resources,this.options);const f=this.services;f.logger=Bo,f.resourceStore=this.store,f.languageUtils=u,f.pluralResolver=new fne(u,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==i.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(f.formatter=r(c),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new hne(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new vne(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(g,...y)=>{this.emit(g,...y)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new P_(this.services,this.options),this.translator.on("*",(g,...y)=>{this.emit(g,...y)}),this.modules.external.forEach(g=>{g.init&&g.init(this)})}if(this.format=this.options.interpolation.format,n||(n=My),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const o=Ag(),l=()=>{const c=(u,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),o.resolve(f),n(u,f)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,n=My){let i=n;const r=Vt(e)?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(c=>{c!=="cimode"&&a.indexOf(c)<0&&a.push(c)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload?.forEach?.(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=Ag();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=My),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&sG.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const i=Ag();this.emit("languageChanging",e);const r=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},a=(o,l)=>{l?this.isLanguageChangingTo===e&&(r(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},s=o=>{!e&&!o&&this.services.languageDetector&&(o=[]);const l=Vt(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(Vt(o)?[o]:o);c&&(this.language||r(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector?.cacheUserLanguage?.(c)),this.loadResources(c,u=>{a(u,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!e&&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(e),i}getFixedT(e,n,i){const r=(a,s,...o)=>{let l;typeof s!="object"?l=this.options.overloadTranslationOptionHandler([a,s].concat(o)):l={...s},l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||i||r.keyPrefix);const c=this.options.keySeparator||".";let u;return l.keyPrefix&&Array.isArray(a)?u=a.map(f=>(typeof f=="function"&&(f=cN(f,{...this.options,...s})),`${l.keyPrefix}${c}${f}`)):(typeof a=="function"&&(a=cN(a,{...this.options,...s})),u=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a),this.t(u,l)};return Vt(e)?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=i,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){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 i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=Ag();return this.options.ns?(Vt(e)&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Ag();Vt(e)&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{const r=new Intl.Locale(e);if(r&&r.getTextInfo){const a=r.getTextInfo();if(a&&a.direction)return a.direction}}catch{}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"],i=this.services?.languageUtils||new e4(a4());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const i=new ux(e,n);return i.createInstance=ux.createInstance,i}cloneInstance(e={},n=My){const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new ux(r);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,f)=>(u[f]={...l[c][f]},u),l[c]),l),{});a.store=new QU(o,r),a.services.resourceStore=a.store}return a.translator=new P_(a.services,r),a.translator.on("*",(o,...l)=>{a.emit(o,...l)}),a.init(r,n),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const wa=ux.createInstance();wa.createInstance;wa.dir;wa.init;wa.loadResources;wa.reloadResources;wa.use;wa.changeLanguage;wa.getFixedT;wa.t;wa.exists;wa.setDefaultNamespace;wa.hasLoadedNamespace;wa.loadNamespaces;wa.loadLanguages;const bne=(t,e,n,i)=>{const r=[n,{code:e,...i||{}}];if(t?.services?.logger?.forward)return t.services.logger.forward(r,"warn","react-i18next::",!0);yf(r[0])&&(r[0]=`react-i18next:: ${r[0]}`),t?.services?.logger?.warn?t.services.logger.warn(...r):console?.warn&&console.warn(...r)},o4={},lG=(t,e,n,i)=>{yf(n)&&o4[n]||(yf(n)&&(o4[n]=new Date),bne(t,e,n,i))},cG=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},uN=(t,e,n)=>{t.loadNamespaces(e,cG(t,n))},l4=(t,e,n,i)=>{if(yf(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return uN(t,n,i);n.forEach(r=>{t.options.ns.indexOf(r)<0&&t.options.ns.push(r)}),t.loadLanguages(e,cG(t,i))},_ne=(t,e,n={})=>!e.languages||!e.languages.length?(lG(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(i,r)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,t))return!1}}),yf=t=>typeof t=="string",Sne=t=>typeof t=="object"&&t!==null,wne=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Mne={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ene=t=>Mne[t],Ane=t=>t.replace(wne,Ene);let dN={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Ane};const Tne=(t={})=>{dN={...dN,...t}},Cne=()=>dN;let uG;const Nne=t=>{uG=t},Rne=()=>uG,Pne={type:"3rdParty",init(t){Tne(t.options.react),Nne(t)}},kne=A.createContext();class Dne{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var EA={exports:{}},AA={};var c4;function One(){if(c4)return AA;c4=1;var t=dm();function e(f,m){return f===m&&(f!==0||1/f===1/m)||f!==f&&m!==m}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,r=t.useEffect,a=t.useLayoutEffect,s=t.useDebugValue;function o(f,m){var g=m(),y=i({inst:{value:g,getSnapshot:m}}),_=y[0].inst,v=y[1];return a(function(){_.value=g,_.getSnapshot=m,l(_)&&v({inst:_})},[f,g,m]),r(function(){return l(_)&&v({inst:_}),f(function(){l(_)&&v({inst:_})})},[f]),s(g),g}function l(f){var m=f.getSnapshot;f=f.value;try{var g=m();return!n(f,g)}catch{return!0}}function c(f,m){return m()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;return AA.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:u,AA}var u4;function dG(){return u4||(u4=1,EA.exports=One()),EA.exports}var gP=dG();const Lne=(t,e)=>yf(e)?e:Sne(e)&&yf(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,Ine={t:Lne,ready:!1},jne=()=>()=>{},xP=(t,e={})=>{const{i18n:n}=e,{i18n:i,defaultNS:r}=A.useContext(kne)||{},a=n||i||Rne();a&&!a.reportNamespaces&&(a.reportNamespaces=new Dne),a||lG(a,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const s=A.useMemo(()=>({...Cne(),...a?.options?.react,...e}),[a,e]),{useSuspense:o,keyPrefix:l}=s,c=r||a?.options?.defaultNS,u=yf(c)?[c]:c||["translation"],f=A.useMemo(()=>u,u);a?.reportNamespaces?.addUsedNamespaces?.(f);const m=A.useRef(0),g=A.useCallback(C=>{if(!a)return jne;const{bindI18n:k,bindI18nStore:F}=s,I=()=>{m.current+=1,C()};return k&&a.on(k,I),F&&a.store.on(F,I),()=>{k&&k.split(" ").forEach(q=>a.off(q,I)),F&&F.split(" ").forEach(q=>a.store.off(q,I))}},[a,s]),y=A.useRef(),_=A.useCallback(()=>{if(!a)return Ine;const C=!!(a.isInitialized||a.initializedStoreOnce)&&f.every(H=>_ne(H,a,s)),k=e.lng||a.language,F=m.current,I=y.current;if(I&&I.ready===C&&I.lng===k&&I.keyPrefix===l&&I.revision===F)return I;const L={t:a.getFixedT(k,s.nsMode==="fallback"?f:f[0],l),ready:C,lng:k,keyPrefix:l,revision:F};return y.current=L,L},[a,f,l,s,e.lng]),[v,x]=A.useState(0),{t:M,ready:w}=gP.useSyncExternalStore(g,_,_);A.useEffect(()=>{if(a&&!w&&!o){const C=()=>x(k=>k+1);e.lng?l4(a,e.lng,f,C):uN(a,f,C)}},[a,e.lng,f,w,o,v]);const E=a||{},T=A.useRef(null),P=A.useRef(),N=C=>{const k=Object.getOwnPropertyDescriptors(C);k.__original&&delete k.__original;const F=Object.create(Object.getPrototypeOf(C),k);if(!Object.prototype.hasOwnProperty.call(F,"__original"))try{Object.defineProperty(F,"__original",{value:C,writable:!1,enumerable:!1,configurable:!1})}catch{}return F},j=A.useMemo(()=>{const C=E,k=C?.language;let F=C;C&&(T.current&&T.current.__original===C?P.current!==k?(F=N(C),T.current=F,P.current=k):F=T.current:(F=N(C),T.current=F,P.current=k));const I=[M,F,w];return I.t=M,I.i18n=F,I.ready=w,I},[M,E,w,E.resolvedLanguage,E.language,E.languages]);if(a&&o&&!w)throw new Promise(C=>{const k=()=>C();e.lng?l4(a,e.lng,f,k):uN(a,f,k)});return j},{slice:Une,forEach:Fne}=[];function zne(t){return Fne.call(Une.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function Bne(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const d4=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hne=function(t,e){const i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},r=encodeURIComponent(e);let a=`${t}=${r}`;if(i.maxAge>0){const s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(i.domain){if(!d4.test(i.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${i.domain}`}if(i.path){if(!d4.test(i.path))throw new TypeError("option path is invalid");a+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return i.partitioned&&(a+="; Partitioned"),a},f4={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=Hne(t,e,r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let s=0;s0&&a[s].substring(0,o)===e&&(n=a[s].substring(o+1))}}return n}},Gne={name:"hash",lookup(t){let{lookupHash:e,lookupFromHashIndex:n}=t,i;if(typeof window<"u"){const{hash:r}=window.location;if(r&&r.length>2){const a=r.substring(1);if(e){const s=a.split("&");for(let o=0;o0&&s[o].substring(0,l)===e&&(i=s[o].substring(l+1))}}if(i)return i;if(!i&&n>-1){const s=r.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?s[typeof n=="number"?n:0]?.replace("/",""):void 0}}}return i}};let Eh=null;const h4=()=>{if(Eh!==null)return Eh;try{if(Eh=typeof window<"u"&&window.localStorage!==null,!Eh)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Eh=!1}return Eh};var Wne={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&h4())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&h4()&&window.localStorage.setItem(n,t)}};let Ah=null;const p4=()=>{if(Ah!==null)return Ah;try{if(Ah=typeof window<"u"&&window.sessionStorage!==null,!Ah)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Ah=!1}return Ah};var qne={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&p4())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&p4()&&window.sessionStorage.setItem(n,t)}},Xne={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let a=0;a0?e:void 0}},Kne={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document<"u"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},Yne={name:"path",lookup(t){let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof e=="number"?e:0]?.replace("/",""):void 0}},Zne={name:"subdomain",lookup(t){let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};let fG=!1;try{document.cookie,fG=!0}catch{}const hG=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];fG||hG.splice(1,1);const Qne=()=>({order:hG,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class pG{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=zne(n,this.options||{},Qne()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Vne),this.addDetector($ne),this.addDetector(Wne),this.addDetector(qne),this.addDetector(Xne),this.addDetector(Kne),this.addDetector(Yne),this.addDetector(Zne),this.addDetector(Gne)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.filter(i=>i!=null&&!Bne(i)).map(i=>this.options.convertDetectedLanguage(i)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}pG.type="languageDetector";const Jne={nav:{printers:"Printers",control:"Control",archives:"Archives",queue:"Queue",stats:"Statistics",profiles:"Profiles",maintenance:"Maintenance",settings:"Settings",collapseSidebar:"Collapse sidebar",expandSidebar:"Expand sidebar",update:"Update",updateAvailable:"Update available: v{{version}}",viewOnGithub:"View on GitHub",keyboardShortcuts:"Keyboard shortcuts (?)",switchToLight:"Switch to light mode",switchToDark:"Switch to dark mode"},common:{save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",add:"Add",close:"Close",confirm:"Confirm",loading:"Loading...",error:"Error",success:"Success",warning:"Warning",enabled:"Enabled",disabled:"Disabled",yes:"Yes",no:"No",on:"On",off:"Off",all:"All",none:"None",search:"Search",filter:"Filter",sort:"Sort",refresh:"Refresh",download:"Download",upload:"Upload",actions:"Actions",status:"Status",name:"Name",description:"Description",date:"Date",time:"Time",hours:"hours",minutes:"minutes",seconds:"seconds",noPrinters:"No printers configured",noData:"No data available",required:"Required",optional:"Optional"},printers:{title:"Printers",addPrinter:"Add Printer",editPrinter:"Edit Printer",deletePrinter:"Delete Printer",printerName:"Printer Name",serialNumber:"Serial Number",ipAddress:"IP Address",accessCode:"Access Code",model:"Model",nozzleCount:"Nozzle Count",autoArchive:"Auto Archive",status:{idle:"Idle",printing:"Printing",paused:"Paused",offline:"Offline",error:"Error",finished:"Finished",unknown:"Unknown"},temperatures:{nozzle:"Nozzle",bed:"Bed",chamber:"Chamber"},progress:"{{percent}}% complete",timeRemaining:"{{time}} remaining",deleteConfirm:'Are you sure you want to delete "{{name}}"?',maintenanceOk:"Maintenance OK",maintenanceWarning:"{{count}} warning",maintenanceWarning_plural:"{{count}} warnings",maintenanceDue:"{{count}} due",maintenanceDue_plural:"{{count}} due"},archives:{title:"Print Archives",searchPlaceholder:"Search archives...",filterByPrinter:"Filter by printer",filterByStatus:"Filter by status",sortBy:"Sort by",sortNewest:"Newest first",sortOldest:"Oldest first",sortName:"Name",sortDuration:"Duration",noArchives:"No archives found",printTime:"Print Time",filamentUsed:"Filament Used",cost:"Cost",reprint:"Reprint",preview:"Preview",deleteArchive:"Delete Archive",deleteConfirm:"Are you sure you want to delete this archive?",favorite:"Favorite",unfavorite:"Remove from favorites",viewDetails:"View Details",status:{completed:"Completed",failed:"Failed",stopped:"Stopped"}},queue:{title:"Print Queue",addToQueue:"Add to Queue",clearQueue:"Clear Queue",emptyQueue:"Queue is empty",position:"Position",scheduledTime:"Scheduled Time",moveUp:"Move Up",moveDown:"Move Down",remove:"Remove",startNow:"Start Now",status:{pending:"Pending",printing:"Printing",completed:"Completed",failed:"Failed",cancelled:"Cancelled"}},stats:{title:"Statistics",overview:"Overview",totalPrints:"Total Prints",successRate:"Success Rate",totalPrintTime:"Total Print Time",totalFilament:"Total Filament Used",totalCost:"Total Cost",averagePrintTime:"Average Print Time",printsPerDay:"Prints per Day",byPrinter:"By Printer",byMaterial:"By Material",byMonth:"By Month",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",allTime:"All Time"},profiles:{title:"Filament Profiles",addProfile:"Add Profile",editProfile:"Edit Profile",deleteProfile:"Delete Profile",material:"Material",brand:"Brand",color:"Color",diameter:"Diameter",density:"Density",costPerKg:"Cost per kg",spoolWeight:"Spool Weight",noProfiles:"No profiles configured",deleteConfirm:"Are you sure you want to delete this profile?"},maintenance:{title:"Maintenance",overview:"Overview",allOk:"All maintenance up to date",dueCount:"{{count}} item due",dueCount_plural:"{{count}} items due",warningCount:"{{count}} warning",warningCount_plural:"{{count}} warnings",totalPrintTime:"Total Print Time",nextMaintenance:"Next Maintenance",nothingDue:"Nothing due",tasks:"Tasks",lastPerformed:"Last performed",interval:"Interval",hoursRemaining:"{{hours}}h remaining",hoursOverdue:"{{hours}}h overdue",markDone:"Mark as Done",performMaintenance:"Perform Maintenance",history:"History",noHistory:"No maintenance history",editPrintHours:"Edit Print Hours",currentHours:"Current Hours",types:{lubricateRails:"Lubricate Linear Rails",cleanNozzle:"Clean Nozzle/Hotend",checkBelts:"Check Belt Tension",cleanBuildPlate:"Clean Build Plate",checkExtruder:"Check Extruder Gears",checkCooling:"Check Cooling Fans",generalInspection:"General Inspection"}},settings:{title:"Settings",general:"General",appearance:"Appearance",notifications:"Notifications",smartPlugs:"Smart Plugs",spoolman:"Spoolman",updates:"Updates",language:"Language",languageDescription:"Select your preferred language",theme:"Theme",themeLight:"Light",themeDark:"Dark",themeSystem:"System",defaultView:"Default View",defaultViewDescription:"Page to show when opening the app",checkForUpdates:"Check for Updates",autoUpdate:"Auto Update",currentVersion:"Current Version",latestVersion:"Latest Version",upToDate:"You are up to date",updateAvailable:"Update available",notificationLanguage:"Notification Language",notificationLanguageDescription:"Language for push notifications",notificationProviders:"Notification Providers",addProvider:"Add Provider",editProvider:"Edit Provider",providerType:"Provider Type",testNotification:"Test Notification",testSuccess:"Test notification sent successfully",testFailed:"Failed to send test notification",quietHours:"Quiet Hours",quietHoursDescription:"Do not disturb during these hours",quietHoursStart:"Start",quietHoursEnd:"End",events:{title:"Notification Events",printStart:"Print Started",printComplete:"Print Completed",printFailed:"Print Failed",printStopped:"Print Stopped",printProgress:"Progress Milestones",printProgressDescription:"Notify at 25%, 50%, 75%",printerOffline:"Printer Offline",printerError:"Printer Error",filamentLow:"Low Filament",maintenanceDue:"Maintenance Due",maintenanceDueDescription:"Notify when maintenance is needed"},smartPlug:{title:"Smart Plugs",add:"Add Smart Plug",edit:"Edit Smart Plug",name:"Name",ipAddress:"IP Address",linkedPrinter:"Linked Printer",autoOn:"Auto Power On",autoOnDescription:"Turn on when print starts",autoOff:"Auto Power Off",autoOffDescription:"Turn off after print completes",offDelay:"Off Delay",offDelayMinutes:"Minutes after print",offDelayTemp:"When nozzle below temperature",currentState:"Current State",turnOn:"Turn On",turnOff:"Turn Off"},spoolmanEnabled:"Enable Spoolman Integration",spoolmanUrl:"Spoolman URL",spoolmanConnected:"Connected",spoolmanDisconnected:"Disconnected"},notification:{printStarted:{title:"Print Started",body:"{{printer}}: {{filename}} has started printing"},printCompleted:{title:"Print Completed",body:"{{printer}}: {{filename}} completed successfully"},printFailed:{title:"Print Failed",body:"{{printer}}: {{filename}} has failed"},printStopped:{title:"Print Stopped",body:"{{printer}}: {{filename}} was stopped"},printProgress:{title:"Print Progress",body:"{{printer}}: {{filename}} is {{percent}}% complete"},printerOffline:{title:"Printer Offline",body:"{{printer}} is offline"},printerError:{title:"Printer Error",body:"{{printer}}: {{error}}"},filamentLow:{title:"Low Filament",body:"{{printer}}: Filament is running low"},maintenanceDue:{title:"Maintenance Due",body:"{{printer}}: {{items}} need attention"}},errors:{generic:"Something went wrong",networkError:"Network error. Please check your connection.",notFound:"Not found",unauthorized:"Unauthorized",serverError:"Server error",validationError:"Please check your input",printerConnectionFailed:"Failed to connect to printer",saveFailed:"Failed to save changes",deleteFailed:"Failed to delete",loadFailed:"Failed to load data"},confirm:{delete:"Are you sure you want to delete this?",unsavedChanges:"You have unsaved changes. Are you sure you want to leave?",clearQueue:"Are you sure you want to clear the queue?"}},eie={nav:{printers:"Drucker",control:"Steuerung",archives:"Archiv",queue:"Warteschlange",stats:"Statistiken",profiles:"Profile",maintenance:"Wartung",settings:"Einstellungen",collapseSidebar:"Seitenleiste einklappen",expandSidebar:"Seitenleiste ausklappen",update:"Update",updateAvailable:"Update verfügbar: v{{version}}",viewOnGithub:"Auf GitHub ansehen",keyboardShortcuts:"Tastaturkürzel (?)",switchToLight:"Zum hellen Modus wechseln",switchToDark:"Zum dunklen Modus wechseln"},common:{save:"Speichern",cancel:"Abbrechen",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",confirm:"Bestätigen",loading:"Lädt...",error:"Fehler",success:"Erfolg",warning:"Warnung",enabled:"Aktiviert",disabled:"Deaktiviert",yes:"Ja",no:"Nein",on:"An",off:"Aus",all:"Alle",none:"Keine",search:"Suchen",filter:"Filtern",sort:"Sortieren",refresh:"Aktualisieren",download:"Herunterladen",upload:"Hochladen",actions:"Aktionen",status:"Status",name:"Name",description:"Beschreibung",date:"Datum",time:"Zeit",hours:"Stunden",minutes:"Minuten",seconds:"Sekunden",noPrinters:"Keine Drucker konfiguriert",noData:"Keine Daten verfügbar",required:"Erforderlich",optional:"Optional"},printers:{title:"Drucker",addPrinter:"Drucker hinzufügen",editPrinter:"Drucker bearbeiten",deletePrinter:"Drucker löschen",printerName:"Druckername",serialNumber:"Seriennummer",ipAddress:"IP-Adresse",accessCode:"Zugangscode",model:"Modell",nozzleCount:"Düsenanzahl",autoArchive:"Automatische Archivierung",status:{idle:"Bereit",printing:"Druckt",paused:"Pausiert",offline:"Offline",error:"Fehler",finished:"Fertig",unknown:"Unbekannt"},temperatures:{nozzle:"Düse",bed:"Druckbett",chamber:"Kammer"},progress:"{{percent}}% abgeschlossen",timeRemaining:"Noch {{time}}",deleteConfirm:'Möchten Sie "{{name}}" wirklich löschen?',maintenanceOk:"Wartung OK",maintenanceWarning:"{{count}} Warnung",maintenanceWarning_plural:"{{count}} Warnungen",maintenanceDue:"{{count}} fällig",maintenanceDue_plural:"{{count}} fällig"},archives:{title:"Druckarchiv",searchPlaceholder:"Archiv durchsuchen...",filterByPrinter:"Nach Drucker filtern",filterByStatus:"Nach Status filtern",sortBy:"Sortieren nach",sortNewest:"Neueste zuerst",sortOldest:"Älteste zuerst",sortName:"Name",sortDuration:"Dauer",noArchives:"Keine Archive gefunden",printTime:"Druckzeit",filamentUsed:"Verbrauchtes Filament",cost:"Kosten",reprint:"Erneut drucken",preview:"Vorschau",deleteArchive:"Archiv löschen",deleteConfirm:"Möchten Sie dieses Archiv wirklich löschen?",favorite:"Favorit",unfavorite:"Aus Favoriten entfernen",viewDetails:"Details anzeigen",status:{completed:"Abgeschlossen",failed:"Fehlgeschlagen",stopped:"Gestoppt"}},queue:{title:"Druckwarteschlange",addToQueue:"Zur Warteschlange hinzufügen",clearQueue:"Warteschlange leeren",emptyQueue:"Warteschlange ist leer",position:"Position",scheduledTime:"Geplante Zeit",moveUp:"Nach oben",moveDown:"Nach unten",remove:"Entfernen",startNow:"Jetzt starten",status:{pending:"Ausstehend",printing:"Druckt",completed:"Abgeschlossen",failed:"Fehlgeschlagen",cancelled:"Abgebrochen"}},stats:{title:"Statistiken",overview:"Übersicht",totalPrints:"Gesamtdrucke",successRate:"Erfolgsrate",totalPrintTime:"Gesamtdruckzeit",totalFilament:"Gesamtverbrauch Filament",totalCost:"Gesamtkosten",averagePrintTime:"Durchschnittliche Druckzeit",printsPerDay:"Drucke pro Tag",byPrinter:"Nach Drucker",byMaterial:"Nach Material",byMonth:"Nach Monat",last7Days:"Letzte 7 Tage",last30Days:"Letzte 30 Tage",last90Days:"Letzte 90 Tage",allTime:"Gesamt"},profiles:{title:"Filament-Profile",addProfile:"Profil hinzufügen",editProfile:"Profil bearbeiten",deleteProfile:"Profil löschen",material:"Material",brand:"Marke",color:"Farbe",diameter:"Durchmesser",density:"Dichte",costPerKg:"Kosten pro kg",spoolWeight:"Spulengewicht",noProfiles:"Keine Profile konfiguriert",deleteConfirm:"Möchten Sie dieses Profil wirklich löschen?"},maintenance:{title:"Wartung",overview:"Übersicht",allOk:"Alle Wartungen aktuell",dueCount:"{{count}} Aufgabe fällig",dueCount_plural:"{{count}} Aufgaben fällig",warningCount:"{{count}} Warnung",warningCount_plural:"{{count}} Warnungen",totalPrintTime:"Gesamtdruckzeit",nextMaintenance:"Nächste Wartung",nothingDue:"Nichts fällig",tasks:"Aufgaben",lastPerformed:"Zuletzt durchgeführt",interval:"Intervall",hoursRemaining:"{{hours}}h verbleibend",hoursOverdue:"{{hours}}h überfällig",markDone:"Als erledigt markieren",performMaintenance:"Wartung durchführen",history:"Verlauf",noHistory:"Kein Wartungsverlauf",editPrintHours:"Druckstunden bearbeiten",currentHours:"Aktuelle Stunden",types:{lubricateRails:"Linearschienen schmieren",cleanNozzle:"Düse/Hotend reinigen",checkBelts:"Riemenspannung prüfen",cleanBuildPlate:"Druckbett reinigen",checkExtruder:"Extruderzahnräder prüfen",checkCooling:"Kühlungslüfter prüfen",generalInspection:"Allgemeine Inspektion"}},settings:{title:"Einstellungen",general:"Allgemein",appearance:"Erscheinungsbild",notifications:"Benachrichtigungen",smartPlugs:"Smart Plugs",spoolman:"Spoolman",updates:"Updates",language:"Sprache",languageDescription:"Wählen Sie Ihre bevorzugte Sprache",theme:"Design",themeLight:"Hell",themeDark:"Dunkel",themeSystem:"System",defaultView:"Standardansicht",defaultViewDescription:"Seite, die beim Öffnen der App angezeigt wird",checkForUpdates:"Nach Updates suchen",autoUpdate:"Automatische Updates",currentVersion:"Aktuelle Version",latestVersion:"Neueste Version",upToDate:"Sie sind auf dem neuesten Stand",updateAvailable:"Update verfügbar",notificationLanguage:"Benachrichtigungssprache",notificationLanguageDescription:"Sprache für Push-Benachrichtigungen",notificationProviders:"Benachrichtigungsanbieter",addProvider:"Anbieter hinzufügen",editProvider:"Anbieter bearbeiten",providerType:"Anbietertyp",testNotification:"Testbenachrichtigung",testSuccess:"Testbenachrichtigung erfolgreich gesendet",testFailed:"Testbenachrichtigung konnte nicht gesendet werden",quietHours:"Ruhezeiten",quietHoursDescription:"Keine Störungen während dieser Zeiten",quietHoursStart:"Beginn",quietHoursEnd:"Ende",events:{title:"Benachrichtigungsereignisse",printStart:"Druck gestartet",printComplete:"Druck abgeschlossen",printFailed:"Druck fehlgeschlagen",printStopped:"Druck gestoppt",printProgress:"Fortschrittsmeldungen",printProgressDescription:"Bei 25%, 50%, 75% benachrichtigen",printerOffline:"Drucker offline",printerError:"Druckerfehler",filamentLow:"Filament niedrig",maintenanceDue:"Wartung fällig",maintenanceDueDescription:"Benachrichtigen, wenn Wartung erforderlich"},smartPlug:{title:"Smart Plugs",add:"Smart Plug hinzufügen",edit:"Smart Plug bearbeiten",name:"Name",ipAddress:"IP-Adresse",linkedPrinter:"Verknüpfter Drucker",autoOn:"Automatisch einschalten",autoOnDescription:"Einschalten beim Druckstart",autoOff:"Automatisch ausschalten",autoOffDescription:"Ausschalten nach Druckende",offDelay:"Ausschaltverzögerung",offDelayMinutes:"Minuten nach Druck",offDelayTemp:"Wenn Düse unter Temperatur",currentState:"Aktueller Status",turnOn:"Einschalten",turnOff:"Ausschalten"},spoolmanEnabled:"Spoolman-Integration aktivieren",spoolmanUrl:"Spoolman URL",spoolmanConnected:"Verbunden",spoolmanDisconnected:"Nicht verbunden"},notification:{printStarted:{title:"Druck gestartet",body:"{{printer}}: {{filename}} wird gedruckt"},printCompleted:{title:"Druck abgeschlossen",body:"{{printer}}: {{filename}} erfolgreich abgeschlossen"},printFailed:{title:"Druck fehlgeschlagen",body:"{{printer}}: {{filename}} ist fehlgeschlagen"},printStopped:{title:"Druck gestoppt",body:"{{printer}}: {{filename}} wurde gestoppt"},printProgress:{title:"Druckfortschritt",body:"{{printer}}: {{filename}} ist zu {{percent}}% abgeschlossen"},printerOffline:{title:"Drucker offline",body:"{{printer}} ist offline"},printerError:{title:"Druckerfehler",body:"{{printer}}: {{error}}"},filamentLow:{title:"Filament niedrig",body:"{{printer}}: Filament geht zur Neige"},maintenanceDue:{title:"Wartung fällig",body:"{{printer}}: {{items}} benötigen Aufmerksamkeit"}},errors:{generic:"Etwas ist schiefgelaufen",networkError:"Netzwerkfehler. Bitte überprüfen Sie Ihre Verbindung.",notFound:"Nicht gefunden",unauthorized:"Nicht autorisiert",serverError:"Serverfehler",validationError:"Bitte überprüfen Sie Ihre Eingabe",printerConnectionFailed:"Verbindung zum Drucker fehlgeschlagen",saveFailed:"Speichern fehlgeschlagen",deleteFailed:"Löschen fehlgeschlagen",loadFailed:"Laden der Daten fehlgeschlagen"},confirm:{delete:"Möchten Sie dies wirklich löschen?",unsavedChanges:"Sie haben ungespeicherte Änderungen. Möchten Sie wirklich verlassen?",clearQueue:"Möchten Sie die Warteschlange wirklich leeren?"}},tie={en:{translation:Jne},de:{translation:eie}};wa.use(pG).use(Pne).init({resources:tie,fallbackLng:"en",supportedLngs:["en","de"],detection:{order:["localStorage","navigator","htmlTag"],lookupLocalStorage:"bambutrack_language",caches:["localStorage"]},interpolation:{escapeValue:!1},react:{useSuspense:!1}});const m4=[{code:"en",name:"English",nativeName:"English"},{code:"de",name:"German",nativeName:"Deutsch"}];var g4="popstate";function nie(t={}){function e(i,r){let{pathname:a,search:s,hash:o}=i.location;return fN("",{pathname:a,search:s,hash:o},r.state&&r.state.usr||null,r.state&&r.state.key||"default")}function n(i,r){return typeof r=="string"?r:Dx(r)}return rie(e,n,null,t)}function mi(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function Ws(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function iie(){return Math.random().toString(36).substring(2,10)}function x4(t,e){return{usr:t.state,key:t.key,idx:e}}function fN(t,e,n=null,i){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof e=="string"?fm(e):e,state:n,key:e&&e.key||i||iie()}}function Dx({pathname:t="/",search:e="",hash:n=""}){return e&&e!=="?"&&(t+=e.charAt(0)==="?"?e:"?"+e),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function fm(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substring(n),t=t.substring(0,n));let i=t.indexOf("?");i>=0&&(e.search=t.substring(i),t=t.substring(0,i)),t&&(e.pathname=t)}return e}function rie(t,e,n,i={}){let{window:r=document.defaultView,v5Compat:a=!1}=i,s=r.history,o="POP",l=null,c=u();c==null&&(c=0,s.replaceState({...s.state,idx:c},""));function u(){return(s.state||{idx:null}).idx}function f(){o="POP";let v=u(),x=v==null?null:v-c;c=v,l&&l({action:o,location:_.location,delta:x})}function m(v,x){o="PUSH";let M=fN(_.location,v,x);c=u()+1;let w=x4(M,c),E=_.createHref(M);try{s.pushState(w,"",E)}catch(T){if(T instanceof DOMException&&T.name==="DataCloneError")throw T;r.location.assign(E)}a&&l&&l({action:o,location:_.location,delta:1})}function g(v,x){o="REPLACE";let M=fN(_.location,v,x);c=u();let w=x4(M,c),E=_.createHref(M);s.replaceState(w,"",E),a&&l&&l({action:o,location:_.location,delta:0})}function y(v){return aie(v)}let _={get action(){return o},get location(){return t(r,s)},listen(v){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(g4,f),l=v,()=>{r.removeEventListener(g4,f),l=null}},createHref(v){return e(r,v)},createURL:y,encodeLocation(v){let x=y(v);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:m,replace:g,go(v){return s.go(v)}};return _}function aie(t,e=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),mi(n,"No window.location.(origin|href) available to create URL");let i=typeof t=="string"?t:Dx(t);return i=i.replace(/ $/,"%20"),!e&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function mG(t,e,n="/"){return sie(t,e,n,!1)}function sie(t,e,n,i){let r=typeof e=="string"?fm(e):e,a=uc(r.pathname||"/",n);if(a==null)return null;let s=gG(t);oie(s);let o=null;for(let l=0;o==null&&l{let u={relativePath:c===void 0?s.path||"":c,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};if(u.relativePath.startsWith("/")){if(!u.relativePath.startsWith(i)&&l)return;mi(u.relativePath.startsWith(i),`Absolute route path "${u.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),u.relativePath=u.relativePath.slice(i.length)}let f=nc([i,u.relativePath]),m=n.concat(u);s.children&&s.children.length>0&&(mi(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),gG(s.children,e,m,f,l)),!(s.path==null&&!s.index)&&e.push({path:f,score:pie(f,s.index),routesMeta:m})};return t.forEach((s,o)=>{if(s.path===""||!s.path?.includes("?"))a(s,o);else for(let l of xG(s.path))a(s,o,!0,l)}),e}function xG(t){let e=t.split("/");if(e.length===0)return[];let[n,...i]=e,r=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return r?[a,""]:[a];let s=xG(i.join("/")),o=[];return o.push(...s.map(l=>l===""?a:[a,l].join("/"))),r&&o.push(...s),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function oie(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:mie(e.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var lie=/^:[\w-]+$/,cie=3,uie=2,die=1,fie=10,hie=-2,v4=t=>t==="*";function pie(t,e){let n=t.split("/"),i=n.length;return n.some(v4)&&(i+=hie),e&&(i+=uie),n.filter(r=>!v4(r)).reduce((r,a)=>r+(lie.test(a)?cie:a===""?die:fie),i)}function mie(t,e){return t.length===e.length&&t.slice(0,-1).every((i,r)=>i===e[r])?t[t.length-1]-e[e.length-1]:0}function gie(t,e,n=!1){let{routesMeta:i}=t,r={},a="/",s=[];for(let o=0;o{if(u==="*"){let y=o[m]||"";s=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const g=o[m];return f&&!g?c[u]=void 0:c[u]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:s,pattern:t}}function xie(t,e=!1,n=!0){Ws(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let i=[],r="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(i.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(i.push({paramName:"*"}),r+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?r+="\\/*$":t!==""&&t!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function vie(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Ws(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),t}}function uc(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,i=t.charAt(n);return i&&i!=="/"?null:t.slice(n)||"/"}var yie=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bie=t=>yie.test(t);function _ie(t,e="/"){let{pathname:n,search:i="",hash:r=""}=typeof t=="string"?fm(t):t,a;if(n)if(bie(n))a=n;else{if(n.includes("//")){let s=n;n=n.replace(/\/\/+/g,"/"),Ws(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${n}`)}n.startsWith("/")?a=y4(n.substring(1),"/"):a=y4(n,e)}else a=e;return{pathname:a,search:Mie(i),hash:Eie(r)}}function y4(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(r=>{r===".."?n.length>1&&n.pop():r!=="."&&n.push(r)}),n.length>1?n.join("/"):"/"}function TA(t,e,n,i){return`Cannot include a '${t}' character in a manually specified \`to.${e}\` field [${JSON.stringify(i)}]. 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 Sie(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function vG(t){let e=Sie(t);return e.map((n,i)=>i===e.length-1?n.pathname:n.pathnameBase)}function yG(t,e,n,i=!1){let r;typeof t=="string"?r=fm(t):(r={...t},mi(!r.pathname||!r.pathname.includes("?"),TA("?","pathname","search",r)),mi(!r.pathname||!r.pathname.includes("#"),TA("#","pathname","hash",r)),mi(!r.search||!r.search.includes("#"),TA("#","search","hash",r)));let a=t===""||r.pathname==="",s=a?"/":r.pathname,o;if(s==null)o=n;else{let f=e.length-1;if(!i&&s.startsWith("..")){let m=s.split("/");for(;m[0]==="..";)m.shift(),f-=1;r.pathname=m.join("/")}o=f>=0?e[f]:"/"}let l=_ie(r,o),c=s&&s!=="/"&&s.endsWith("/"),u=(a||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}var nc=t=>t.join("/").replace(/\/\/+/g,"/"),wie=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),Mie=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Eie=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function Aie(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var bG=["POST","PUT","PATCH","DELETE"];new Set(bG);var Tie=["GET",...bG];new Set(Tie);var hm=A.createContext(null);hm.displayName="DataRouter";var zS=A.createContext(null);zS.displayName="DataRouterState";A.createContext(!1);var _G=A.createContext({isTransitioning:!1});_G.displayName="ViewTransition";var Cie=A.createContext(new Map);Cie.displayName="Fetchers";var Nie=A.createContext(null);Nie.displayName="Await";var al=A.createContext(null);al.displayName="Navigation";var A0=A.createContext(null);A0.displayName="Location";var sl=A.createContext({outlet:null,matches:[],isDataRoute:!1});sl.displayName="Route";var vP=A.createContext(null);vP.displayName="RouteError";function Rie(t,{relative:e}={}){mi(T0(),"useHref() may be used only in the context of a component.");let{basename:n,navigator:i}=A.useContext(al),{hash:r,pathname:a,search:s}=C0(t,{relative:e}),o=a;return n!=="/"&&(o=a==="/"?n:nc([n,a])),i.createHref({pathname:o,search:s,hash:r})}function T0(){return A.useContext(A0)!=null}function wc(){return mi(T0(),"useLocation() may be used only in the context of a component."),A.useContext(A0).location}var SG="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function wG(t){A.useContext(al).static||A.useLayoutEffect(t)}function BS(){let{isDataRoute:t}=A.useContext(sl);return t?Gie():Pie()}function Pie(){mi(T0(),"useNavigate() may be used only in the context of a component.");let t=A.useContext(hm),{basename:e,navigator:n}=A.useContext(al),{matches:i}=A.useContext(sl),{pathname:r}=wc(),a=JSON.stringify(vG(i)),s=A.useRef(!1);return wG(()=>{s.current=!0}),A.useCallback((l,c={})=>{if(Ws(s.current,SG),!s.current)return;if(typeof l=="number"){n.go(l);return}let u=yG(l,JSON.parse(a),r,c.relative==="path");t==null&&e!=="/"&&(u.pathname=u.pathname==="/"?e:nc([e,u.pathname])),(c.replace?n.replace:n.push)(u,c.state,c)},[e,n,a,r,t])}var kie=A.createContext(null);function Die(t){let e=A.useContext(sl).outlet;return A.useMemo(()=>e&&A.createElement(kie.Provider,{value:t},e),[e,t])}function C0(t,{relative:e}={}){let{matches:n}=A.useContext(sl),{pathname:i}=wc(),r=JSON.stringify(vG(n));return A.useMemo(()=>yG(t,JSON.parse(r),i,e==="path"),[t,r,i,e])}function Oie(t,e){return MG(t,e)}function MG(t,e,n,i,r){mi(T0(),"useRoutes() may be used only in the context of a component.");let{navigator:a}=A.useContext(al),{matches:s}=A.useContext(sl),o=s[s.length-1],l=o?o.params:{},c=o?o.pathname:"/",u=o?o.pathnameBase:"/",f=o&&o.route;{let M=f&&f.path||"";EG(c,!f||M.endsWith("*")||M.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${c}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let m=Sc(),g;if(e){let M=typeof e=="string"?dm(e):e;mi(u==="/"||M.pathname?.startsWith(u),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${M.pathname}" was given in the \`location\` prop.`),g=M}else g=m;let y=g.pathname||"/",_=y;if(u!=="/"){let M=u.replace(/^\//,"").split("/");_="/"+y.replace(/^\//,"").split("/").slice(M.length).join("/")}let v=hG(t,{pathname:_});Ws(f||v!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ws(v==null||v[v.length-1].route.element!==void 0||v[v.length-1].route.Component!==void 0||v[v.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let x=jie(v&&v.map(M=>Object.assign({},M,{params:Object.assign({},l,M.params),pathname:tc([u,a.encodeLocation?a.encodeLocation(M.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathname]),pathnameBase:M.pathnameBase==="/"?u:tc([u,a.encodeLocation?a.encodeLocation(M.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:M.pathnameBase])})),s,n,i,r);return e&&x?A.createElement(M0.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},x):x}function Die(){let t=Hie(),e=Mie(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i="rgba(200,200,200, 0.5)",r={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},s=null;return console.error("Error handled by React Router default ErrorBoundary:",t),s=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:a},"ErrorBoundary")," or"," ",A.createElement("code",{style:a},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},e),n?A.createElement("pre",{style:r},n):null,s)}var Oie=A.createElement(Die,null),Lie=class extends A.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,e){return e.location!==t.location||e.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:e.error,location:e.location,revalidation:t.revalidation||e.revalidation}}componentDidCatch(t,e){this.props.onError?this.props.onError(t,e):console.error("React Router caught the following error during render",t)}render(){return this.state.error!==void 0?A.createElement(al.Provider,{value:this.props.routeContext},A.createElement(gP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Iie({routeContext:t,match:e,children:n}){let i=A.useContext(fm);return i&&i.static&&i.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=e.route.id),A.createElement(al.Provider,{value:t},n)}function jie(t,e=[],n=null,i=null,r=null){if(t==null){if(!n)return null;if(n.errors)t=n.matches;else if(e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,s=n?.errors;if(s!=null){let u=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);mi(u>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),a=a.slice(0,Math.min(a.length,u+1))}let o=!1,l=-1;if(n)for(let u=0;u=0?a=a.slice(0,l+1):a=[a[0]];break}}}let c=n&&i?(u,f)=>{i(u,{location:n.location,params:n.matches?.[0]?.params??{},errorInfo:f})}:void 0;return a.reduceRight((u,f,m)=>{let g,y=!1,_=null,v=null;n&&(g=s&&f.route.id?s[f.route.id]:void 0,_=f.route.errorElement||Oie,o&&(l<0&&m===0?(wG("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,v=null):l===m&&(y=!0,v=f.route.hydrateFallbackElement||null)));let x=e.concat(a.slice(0,m+1)),M=()=>{let w;return g?w=_:y?w=v:f.route.Component?w=A.createElement(f.route.Component,null):f.route.element?w=f.route.element:w=u,A.createElement(Iie,{match:f,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:w})};return n&&(f.route.ErrorBoundary||f.route.errorElement||m===0)?A.createElement(Lie,{location:n.location,revalidation:n.revalidation,component:_,error:g,children:M(),routeContext:{outlet:null,matches:x,isDataRoute:!0},onError:c}):M()},null)}function xP(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Uie(t){let e=A.useContext(fm);return mi(e,xP(t)),e}function Fie(t){let e=A.useContext(US);return mi(e,xP(t)),e}function zie(t){let e=A.useContext(al);return mi(e,xP(t)),e}function vP(t){let e=zie(t),n=e.matches[e.matches.length-1];return mi(n.route.id,`${t} can only be used on routes that contain a unique "id"`),n.route.id}function Bie(){return vP("useRouteId")}function Hie(){let t=A.useContext(gP),e=Fie("useRouteError"),n=vP("useRouteError");return t!==void 0?t:e.errors?.[n]}function Vie(){let{router:t}=Uie("useNavigate"),e=vP("useNavigate"),n=A.useRef(!1);return _G(()=>{n.current=!0}),A.useCallback(async(r,a={})=>{Ws(n.current,bG),n.current&&(typeof r=="number"?t.navigate(r):await t.navigate(r,{fromRouteId:e,...a}))},[t,e])}var v4={};function wG(t,e,n){!e&&!v4[t]&&(v4[t]=!0,Ws(!1,n))}A.memo($ie);function $ie({routes:t,future:e,state:n,unstable_onError:i}){return SG(t,void 0,n,i,e)}function Gie(t){return Pie(t.context)}function Oo(t){mi(!1,"A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .")}function Wie({basename:t="/",children:e=null,location:n,navigationType:i="POP",navigator:r,static:a=!1}){mi(!E0(),"You cannot render a inside another . You should never have more than one in your app.");let s=t.replace(/^\/*/,"/"),o=A.useMemo(()=>({basename:s,navigator:r,static:a,future:{}}),[s,r,a]);typeof n=="string"&&(n=dm(n));let{pathname:l="/",search:c="",hash:u="",state:f=null,key:m="default"}=n,g=A.useMemo(()=>{let y=cc(l,s);return y==null?null:{location:{pathname:y,search:c,hash:u,state:f,key:m},navigationType:i}},[s,l,c,u,f,m,i]);return Ws(g!=null,` is not able to match the URL "${l}${c}${u}" because it does not start with the basename, so the won't render anything.`),g==null?null:A.createElement(rl.Provider,{value:o},A.createElement(M0.Provider,{children:e,value:g}))}function qie({children:t,location:e}){return kie(dN(t),e)}function dN(t,e=[]){let n=[];return A.Children.forEach(t,(i,r)=>{if(!A.isValidElement(i))return;let a=[...e,r];if(i.type===A.Fragment){n.push.apply(n,dN(i.props.children,a));return}mi(i.type===Oo,`[${typeof i.type=="string"?i.type:i.type.name}] is not a component. All component children of must be a or `),mi(!i.props.index||!i.props.children,"An index route cannot have child routes.");let s={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(s.children=dN(i.props.children,a)),n.push(s)}),n}var n_="get",i_="application/x-www-form-urlencoded";function zS(t){return t!=null&&typeof t.tagName=="string"}function Xie(t){return zS(t)&&t.tagName.toLowerCase()==="button"}function Kie(t){return zS(t)&&t.tagName.toLowerCase()==="form"}function Yie(t){return zS(t)&&t.tagName.toLowerCase()==="input"}function Zie(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function Qie(t,e){return t.button===0&&(!e||e==="_self")&&!Zie(t)}function fN(t=""){return new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let i=t[n];return e.concat(Array.isArray(i)?i.map(r=>[n,r]):[[n,i]])},[]))}function Jie(t,e){let n=fN(t);return e&&e.forEach((i,r)=>{n.has(r)||e.getAll(r).forEach(a=>{n.append(r,a)})}),n}var My=null;function ere(){if(My===null)try{new FormData(document.createElement("form"),0),My=!1}catch{My=!0}return My}var tre=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function AA(t){return t!=null&&!tre.has(t)?(Ws(!1,`"${t}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${i_}"`),null):t}function nre(t,e){let n,i,r,a,s;if(Kie(t)){let o=t.getAttribute("action");i=o?cc(o,e):null,n=t.getAttribute("method")||n_,r=AA(t.getAttribute("enctype"))||i_,a=new FormData(t)}else if(Xie(t)||Yie(t)&&(t.type==="submit"||t.type==="image")){let o=t.form;if(o==null)throw new Error('Cannot submit a