added my Recipes

This commit is contained in:
yocto committed 2024-07-11 14:16:35 +02:00
1 parent 38bc4f53ac
commit 09b621d929
7118 files changed
+525762 -3

No files matched your search

@@ -0,0 +1,76 @@
{
"files.associations": {
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"strstream": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"semaphore": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp"
}
}
@@ -0,0 +1,77 @@
{
"files.associations": {
"iostream": "cpp",
"string": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"csignal": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"any": "cpp",
"array": "cpp",
"atomic": "cpp",
"strstream": "cpp",
"bit": "cpp",
"bitset": "cpp",
"chrono": "cpp",
"codecvt": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"condition_variable": "cpp",
"cstdint": "cpp",
"deque": "cpp",
"forward_list": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"optional": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
"iosfwd": "cpp",
"istream": "cpp",
"limits": "cpp",
"mutex": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"ranges": "cpp",
"semaphore": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cfenv": "cpp",
"cinttypes": "cpp",
"typeindex": "cpp",
"typeinfo": "cpp",
"valarray": "cpp",
"variant": "cpp",
"fstream": "cpp"
}
}
@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.5)
project(rt_service)
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Find python and Boost - both are required dependencies
#find_package(Boost COMPONENTS filesystem chrono REQUIRED)
find_package(PythonLibs 3.10 REQUIRED)
find_package(Boost COMPONENTS python filesystem chrono REQUIRED)
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY /home/markus/git/vrpmdvweb/vrpmdvserver/extensions/rt_service)
file( GLOB LIB_SOURCES .src/*.cpp )
file( GLOB LIB_HEADERS lib/*.h )
set (RTSERVICEINCLUDE ./include)
# Add a shared module - modules are intended to be imported at runtime.
# - This is where you add the source files
#add_library(rt_service MODULE ./src/rt_service.cpp ./src/monitoringTask/RTSMonitoringTask.cpp ./src/utilities/RelGILLock.cpp ./src/utilities/GILLock.cpp ./src/utilities/RTSCoproHelper.cpp ./src/utilities/RTSPyLogging.cpp ./src/monitoringTask/RTSResult.cpp ./src/monitoringTask/RTSErrResult.cpp)
add_library(rt_service MODULE ./src/rt_service.cpp ./src/monitoringTask/RTSMonFrame.cpp ./src/monitoringTask/RTSMonitoringTask.cpp ./src/utilities/RelGILLock.cpp ./src/utilities/GILLock.cpp ./src/utilities/RTSCoproHelper.cpp ./src/monitoringTask/RTSErrResult.cpp ./src/monitoringTask/VibChannelDesc.cpp ./src/monitoringTask/VibSensorDesc.cpp)
# Set up the libraries and header search pathsfor this target
target_link_libraries(rt_service ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
target_include_directories(rt_service PRIVATE ${PYTHON_INCLUDE_DIRS} ${RTSERVICEINCLUDE})
set(MY_RESOURCE_FILE rt_service.so)
# install(TARGETS rt_service LIBRARY DESTINATION lib)
# install(TARGETS t tlib
# RUNTIME DESTINATION bin
# LIBRARY DESTINATION lib
# )
@@ -0,0 +1,38 @@
cmake_minimum_required(VERSION 3.5)
project(rt_service)
set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
# Find python and Boost - both are required dependencies
find_package(PythonLibs 3.10 REQUIRED)
find_package(Boost COMPONENTS python REQUIRED)
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY /home/markus/git/vrpmdvweb/vrpmdvserver/extensions/rt_service)
set (RTSERVICEINCLUDE ./include)
file( GLOB LIB_SOURCES .src/*.cpp )
file( GLOB LIB_HEADERS lib/*.h )
# Add a shared module - modules are intended to be imported at runtime.
# - This is where you add the source files
add_library(rt_service MODULE ./src/rt_service.cpp ./src/monitoringTask/RTSMonitoringTask.cpp ./src/utilities/RelGILLock.cpp ./src/utilities/GILLock.cpp ./src/utilities/RTSCoproHelper.cpp)
# Set up the libraries and header search pathsfor this target
target_link_libraries(rt_service ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
target_include_directories(rt_service PRIVATE ${PYTHON_INCLUDE_DIRS} ${RTSERVICEINCLUDE})
set(MY_RESOURCE_FILE rt_service.so)
install(TARGETS rt_service LIBRARY DESTINATION lib)
# install(TARGETS t tlib
# RUNTIME DESTINATION bin
# LIBRARY DESTINATION lib
# )
@@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.5)
project( rt_service CXX )
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7-a)
# set(TOOLCHAIN_PREFIX $ENV{SYSROOTS}/x86_64-ostl_sdk-linux/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-)
set(CMAKE_C_COMPILER "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/x86_64/gcc-cross-arm/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-gcc")
set(CMAKE_CXX_COMPILER "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/x86_64/gcc-cross-arm/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-g++")
# set(CMAKE_CXX_COMPILER "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/x86_64/gcc-cross-arm/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-g++")
# -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=<SDK installation directory>/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
set(COMPILER_FLAGS " -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -m32")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}")
set(PYTHON_INCLUDE_DIRS "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/cortexa7t2hf-neon-vfpv4/python3/usr/include")
set(Boost_INCLUDE "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/cortexa7t2hf-neon-vfpv4/boost/include")
set(Boost_LIBRARIES "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/cortexa7t2hf-neon-vfpv4/boost/lib")
set(PYTHON_LIBRARIES "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/cortexa7t2hf-neon-vfpv4/python3/usr/lib")
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
# Add a shared module - modules are intended to be imported at runtime.
# - This is where you add the source files
add_library(rt_service SHARED rt_service.cpp)
# add_library(rt_service MODULE rt_service.cpp)
set_target_properties(rt_service PROPERTIES LINKER_LANGUAGE CXX)
# Set up the libraries and header search paths for this target
target_link_libraries(rt_service ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
target_include_directories(rt_service PRIVATE ${PYTHON_INCLUDE_DIRS} ${Boost_INCLUDE})
@@ -0,0 +1,103 @@
cmake_minimum_required(VERSION 3.5)
project( rt_service NONE )
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7-a)
set(SYSROOTS home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/SDK/sysroots)
set(TOOLCHAIN_PREFIX $ENV{SYSROOTS}/x86_64-ostl_sdk-linux/usr/bin/arm-ostl-linux-gnueabi/arm-ostl-linux-gnueabi-)
set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
set(CMAKE_SYSROOT $ENV{SYSROOTS}/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi)
set(CMAKE_PREFIX_PATH ${CMAKE_SYSROOT}/usr/lib/cmake)
# set(OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{QT_BIN_PATH}) => only for QT not needed at the moment
set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=<SDK installation directory>/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
set(COMPILER_FLAGS " -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}" CACHE STRING "" FORCE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}" CACHE STRING "" FORCE)
list(APPEND CMAKE_MODULE_PATH "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/ cortexa7t2hf-neon-vfpv4/python3/usr")
list(APPEND CMAKE_MODULE_PATH "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/ cortexa7t2hf-neon-vfpv4/boost/usr")
# set(PYTHON_LIBRARIES "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/ cortexa7t2hf-neon-vfpv4/python3/usr/lib")
# set(PYTHON_INCLUDE_DIRS "home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/build-vrpmdv-stm32mp1/tmp-glibc/sysroots-components/cortexa7t2hf-neon-vfpv4/python3/usr/include")
# set(CMAKE_C_COMPILER_WORKS 1)
# set(CMAKE_CXX_COMPILER_WORKS 1)
# set(TOOLCHAIN_PREFIX home/markus/STM32MPU_workspace/STM32MP1-Ecosystem-V6.1.0/Distribution-Package-VRDevice/SDK/sysroots/x86_64-ostl_sdk-linux/usr/bin/arm-ostl-linux/)
# set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}gcc)
# set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}g++)
# set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")
# Find python and Boost - both are required dependencies
# find_package(PythonLibs REQUIRED)
# find_package(PythonLibs 3.10 REQUIRED)
# find_package(Boost REQUIRED)
# find_package(Boost COMPONENTS python REQUIRED)
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
# set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT})
# set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
# set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
#set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set (CMAKE_RUNTIME_OUTPUT_DIRECTORY /home/markus/git/vrpmdvweb/vrpmdvserver/extensions/rt_service)
# Add a shared module - modules are intended to be imported at runtime.
# - This is where you add the source files
add_library(rt_service MODULE rt_service.cpp)
set_target_properties(rt_service PROPERTIES LINKER_LANGUAGE CXX)
# this is probably unlikely to be needed, but just in case
set(CMAKE_CXX_FLAGS "-m32")
set(CMAKE_EXE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "executable linker flags" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "shared library linker flags" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "-m32 -L${LIB32}" CACHE STRING "module linker flags" FORCE)
# set_target_properties(rt_service PROPERTIES COMPILE_OPTIONS "-m32")
# Set up the libraries and header search paths for this target
target_link_libraries(rt_service ${Boost_LIBRARIES} ${PYTHON_LIBRARIES})
target_include_directories(rt_service PRIVATE ${PYTHON_INCLUDE_DIRS})
set(MY_RESOURCE_FILE rt_service.so)
#set_directory_properties(MY_EXTENSION_LIB /home/markus/git/vrpmwvweb/vrpmdvserver/extensions/)
#file(COPY ${CMAKE_CURRENT_BINARY_DIR}/${MY_RESOURCE_FILE}
# DESTINATION /home/markus/git/vrpmdvweb/vrpmdvserver/extensions/rt_service)
# location of the Python header files
#PYTHON_VERSION = 3.10
#PYTHON_INCLUDE = /usr/include/python$(PYTHON_VERSION)
# location of the Boost Python include files and library
#BOOST_INC = /usr/include
#BOOST_LIB = /usr/lib
# compile mesh classes
#TARGET = rt_service
#$(TARGET).so: $(TARGET).o g++ -shared -Wl,--export-dynamic $(TARGET).o -L$(BOOST_LIB) -lboost_python-$(PYTHON_VERSION) -L/usr/lib/python$(PYTHON_VERSION)/config -lpython$(PYTHON_VERSION) -o $(TARGET).so
#$(TARGET).o: $(TARGET).cpp g++ -I$(PYTHON_INCLUDE) -I$(BOOST_INC) -fPIC -c $(TARGET).cpp
@@ -0,0 +1,12 @@
CMake system name must be something like "Linux".
# This is important for cross-compiling.
set(CMAKE_SYSTEM_PROCESSOR )
set(CMAKE_C_COMPILER arm-poky-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER arm-poky-linux-gnueabi-g++)
set(CMAKE_C_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/home/moviloc/fsl-release-bsp/build_qt5/tmp/sysroots/imx6ulevk" CACHE STRING "CFLAGS")
set(CMAKE_CXX_FLAGS "-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/home/moviloc/fsl-release-bsp/build_qt5/tmp/sysroots/imx6ulevk -fpermissive" CACHE STRING "CXXFLAGS")
set(CMAKE_C_FLAGS_RELEASE "-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/home/moviloc/fsl-release-bsp/build_qt5/tmp/sysroots/imx6ulevk -DNDEBUG" CACHE STRING "CFLAGS for release")
set(CMAKE_CXX_FLAGS_RELEASE "-march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a7 --sysroot=/home/moviloc/fsl-release-bsp/build_qt5/tmp/sysroots/imx6ulevk -DNDEBUG" CACHE STRING "CXXFLAGS for release")
set(CMAKE_C_LINK_FLAGS "" CACHE STRING "LDFLAGS")
set(CMAKE_CXX_LINK_FLAGS "" CACHE STRING "LDFLAGS")
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.5)
project( rt_service CXX )
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR armv7-a)
# -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=<SDK installation directory>/SDK/sysroots/cortexa7t2hf-neon-vfpv4-ostl-linux-gnueabi
set(COMPILER_FLAGS " -march=armv7ve -mthumb -mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 -m32")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILER_FLAGS}")
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
# Add a shared module - modules are intended to be imported at runtime.
# - This is where you add the source files
add_library(rt_service SHARED rt_service.cpp)
@@ -0,0 +1,69 @@
#include <boost/python.hpp>
#include <boost/python/list.hpp>
#include <boost/python/extract.hpp>
#include <string>
//#include <sstream>
//#include <vector>
struct RTService
{
// private:
// /* data */
// public:
// RT_Service(/* args */) {}
// ~RT_Service() {}
bool createMonitoring(std::string id) {
//TODO ML: add this to the M4Core
return true;
}
bool deleteMonitoring(std::string id) {
//TODO ML: add this to the M4Core
return true;
}
std::string getMonitoringState(std::string id) {
//TODO ask the M4Core for the Monitpring Status
return "Start";
}
boost::python::list getMonitoringStates() {
//TODO ask the M4Core for the Monitpring Status
boost::python::list list;
return list;
}
bool setMonitoringStatus(std::string id, std::string status) {
//set the Status
return true;
}
};
using namespace boost::python;
BOOST_PYTHON_MODULE(rt_service)
{
class_<RTService>("RT_Service")
.def("createMonitoring", &RTService::createMonitoring)
.def("getMonitoringStatus", &RTService::getMonitoringState)
.def("getAllMonitoringStat", &RTService::getMonitoringStates)
.def("setMonitoringStatus", &RTService::setMonitoringStatus)
;
};
//examples
// long l = len(msgs);
// std::stringstream ss;
// for (long i = 0; i<l; ++i) {
// if (i>0) ss << ", ";
// std::string s = boost::python::extract<std::string>(msgs[i]);
// ss << s;
// }
// mMsg = ss.str();
@@ -0,0 +1,21 @@
#include <boost/python.hpp>
#include <boost/thread.hpp>
//Use this class in a c++ funktion that called into python : c++ => python
class PyLockGIL
{
public:
PyLockGIL();
~PyLockGIL();
PyLockGIL(const PyLockGIL&) = delete;
PyLockGIL& operator=(const PyLockGIL&) = delete;
private:
PyGILState_STATE m_gstate;
};
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_ICHANNELDESC_H_
#define RTS_INCLUDE_ICHANNELDESC_H_
#include <string>
#include <list>
enum VALUEFORMAT {
UINT32 = 0,
INT32,
FLOAT,
DOUBLE,
};
union rtsSensorValue
{
uint32_t vUINT32;
int32_t vINT32;
float vFLOAT;
double vDOUBLE;
};
static const std::string RTSMONCHANNELNAME("name");
static const std::string RTSMONCHANNELVALUE("value");
static const std::string RTSMONCHANNELVALUETYPE("valuetype");
class IChannelDesc
{
public:
virtual u_int32_t GetId() = 0;
virtual const std::string& GetName() = 0;
virtual VALUEFORMAT GetValueFormat() = 0;
/**
* return the length of the data that is neeeded for one value of the channel in UINT32
*
*/
virtual u_int32_t GetValueByteSpace() = 0;
};
#endif /* RTS_INCLUDE_ICHANNELDESC_H_ */
@@ -0,0 +1,35 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_ISENSORDESC_H_
#define RTS_INCLUDE_ISENSORDESC_H_
#include <string>
#include <list>
#include <json.hpp>
using json = nlohmann::json;
static const std::string RTSMONSENSOR("sensors");
static const std::string RTSMONCHANNELS("channels");
static const std::string RTSMONVALUES("values");
class ISensorDesc
{
public:
virtual int GetDescription() = 0;
virtual bool AddHW2Json(json& j) = 0;
virtual u_int32_t AddValues2Json(json& j, u_int32_t* values, u_int32_t actno, u_int32_t length) = 0;
};
#endif /* RTS_INCLUDE_ISENSORDESC_H_ */
@@ -0,0 +1,47 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_RTSCOPROHELPER_H_
#define RTS_INCLUDE_RTSCOPROHELPER_H_
#include <string>
class RTSCoproHelper
{
private:
/* data */
//lock Element
int mFdRpmsg[2] = {-1, -1};
public:
RTSCoproHelper(/* args */);
~RTSCoproHelper();
int Init(std::string fwPath, std::string fwName);
int Copro_isFwRunning(void);
int Copro_openTtyRpmsg(int ttyNb, int modeRaw);
int Copro_closeTtyRpmsg(int ttyNb);
int Copro_writeTtyRpmsg(int ttyNb, int len, char* pData);
int Copro_readTtyRpmsg(int ttyNb, int len, char* pData);
int Copro_stopFw(void);
int Copro_startFw(void);
private:
int Copro_getFwPath(char* pathStr);
int Copro_setFwPath(const char* pathStr);
int Copro_getFwName(char* pathStr);
int Copro_setFwName(const char* nameStr);
};
#endif /* RTS_INCLUDE_RTSCOPROHELPER_H_ */
@@ -0,0 +1,105 @@
/**
* @author
*/
#ifndef CM_INCLUDE_RTSERRRESULT_H_
#define CM_INCLUDE_RTSERRRESULT_H_
//#include <RTSResult.h>
#include <string>
#include <list>
#include <boost/python/dict.hpp>
//#include <boost/python/module.hpp>
// #include <boost/python/def.hpp>
//#include <boost/python/class.hpp>
// #include <boost/ref.hpp>
// #include <boost/python/ptr.hpp>
// #include <boost/python/return_value_policy.hpp>
// #include <boost/python/reference_existing_object.hpp>
// #include <boost/python/call.hpp>
// #include <boost/python/object.hpp>
//#define BOOST_ENABLE_ASSERT_HANDLER
//#include <boost/assert.hpp>
//using namespace boost::python;
struct RTSResult {
public:
RTSResult() : mResCode("")
{}
void setResCode(const std::string& resCode)
{
mResCode = resCode;
}
std::string getResCode()
{
return mResCode;
}
// boost::python::dict const& getProps()
// {
// return mProps;
// }
void setMsg(const std::string& newmsg)
{
msg = newmsg;
}
std::string getMsg()
{
return msg;
}
private:
std::string mResCode;
//boost::python::dict mProps;
std::string msg;
};
class RTSErrResult
{
private:
std::string mResCode;
std::list<std::string> msgs;
public:
RTSErrResult();
RTSErrResult(std::string rescode);
~RTSErrResult();
void setResCode(std::string resCode);
void format(const std::string fmt_str, ...);
RTSResult* getResult();
};
// class RTSErrResult : public RTSResult
// {
// private:
// /* data */
// std::string resCode;
// public:
// RTSErrResult(std::string rescode);
// ~RTSErrResult();
// void format(const std::string fmt_str, ...);
// };
#endif /* CM_INCLUDE_RTSERRRESULT_H_ */
@@ -0,0 +1,67 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_RTSMONFRAME_H_
#define RTS_INCLUDE_RTSMONFRAME_H_
#include <string>
#include <list>
#include <ISensorDesc.h>
using json = nlohmann::json;
struct vRCMDeviceData {
uint32_t packageNo; //current package Number
uint32_t packageCount; //complete package Number
uint32_t dataQuantity; //number of uint32_t in data
uint32_t data[]; //the data
};
class RTSMonFrame
{
private:
/* data */
std::string id;
std::string name;
int samplerate;
int sampleperiod;
int downtime;
std::list<std::shared_ptr<ISensorDesc>> mSenorDesriptions;
std::string path;
public:
RTSMonFrame(std::string id, std::string name, int samplerate, int sampleperiod, int downtime, const std::list<std::shared_ptr<ISensorDesc>>& sensDesc, std::string path);
~RTSMonFrame();
std::string GetId();
void SetName(const std::string& name);
const std::string& GetName();
void SetSampleRate(int samplerate);
int GetSampleRate();
void SetSamplePeriod(int sampleperiod);
int GetSamplePeriod();
void SetDownTime(int downtime);
int GetDownTime();
bool generate(u_int32_t* values, u_int32_t length);
};
#endif /* RTS_INCLUDE_RTSMONFRAME_H_ */
@@ -0,0 +1,146 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_RTSMONITORINGTASK_H_
#define RTS_INCLUDE_RTSMONITORINGTASK_H_
#include "RTSCoproHelper.h"
#include "RTSMonFrame.h"
#include <pthread.h>
#include <map>
#include <string>
#include <atomic>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/eventfd.h>
#include <sys/poll.h>
#include <fcntl.h>
#include <regex.h>
#include <sched.h>
#include <signal.h>
#include <inttypes.h>
#include <termios.h>
#include <stdlib.h>
#include <stdint.h>
#include <errno.h>
#include <error.h>
#include <signal.h>
#include <stdio.h>
#define NB_BUF 1
typedef struct
{
int bufferId, eventfd;
} rpmsg_sdb_ioctl_set_efd;
typedef struct
{
int bufferId;
uint32_t size;
} rpmsg_sdb_ioctl_get_data_size;
class RTSMonitoringTask
{
private:
/* data */
//lock Element
//std::map<int, RTSMonFrame*> rtsMonFrames;
pthread_t monThread;
/* The file descriptor used to manage our TTY over RPMSG */
int mFdRpmsg[2] = {-1, -1};
RTSCoproHelper coproHelper;
/* The file descriptor used to manage our SDB over RPMSG */
int mFdSdbRpmsg = -1;
rpmsg_sdb_ioctl_get_data_size q_get_data_size;
rpmsg_sdb_ioctl_set_efd q_set_efd;
int mefd[NB_BUF];
void* mmappedData[NB_BUF];
bool mfMappedData = false;
struct pollfd mfds[NB_BUF];
//uint8_t mDdrBuffAwaited = 1;
uint32_t mNbUncompData=0;
uint32_t mNbWrittenInFileData;
uint32_t mNbUncompMB=0;
uint32_t mNbPrevUncompMB=0;
uint32_t mNbTty0Frame=0;
char mByteBuffCpy[512];
struct timeval tval_before, tval_after, tval_result;
std::atomic_bool mRunThread= true;
public:
std::string id;
std::string monName;
int samplerate;
int sampleperiod;
int downtime;
std::string path;
public:
RTSMonitoringTask(std::string id, std::string name, int samplerate, int sampleperiod, int downtime, std::string path);
~RTSMonitoringTask();
//static RTSMonitoringTask& Instance();
bool Init();
//bool CreateMonitoring(int id, std::string name, int samplerate, int sampleperiod, int downtime, std::string status);
bool LoadFW();
bool Start();
bool Stop();
int Open(std::string monfilename);
bool Close();
std::string Read();
bool GetRunState();
void SetRunState(bool runThread);
std::string GetId();
void SetId(std::string id);
int GetRate();
void SetRate(int rate);
int GetPeriod();
void SetPeriod(int period);
int GetDowntime();
void SetDowntime(int downtime);
std::string GetPath();
void SetPath(std::string path);
private:
static void* Run(void *obj);
bool Load();
};
#endif /* RTS_INCLUDE_RTSMONITORINGTASK_H_ */
@@ -0,0 +1,51 @@
/**
* @author
*/
//#include <boost/python/detail/python_type.hpp>
#include <string>
//#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
//#include <boost/python/class.hpp>
#include <boost/ref.hpp>
#include <boost/python/ptr.hpp>
#include <boost/python/return_value_policy.hpp>
#include <boost/python/reference_existing_object.hpp>
#include <boost/python/call.hpp>
#include <boost/python/object.hpp>
//#define BOOST_ENABLE_ASSERT_HANDLER
//#include <boost/assert.hpp>
using namespace boost::python;
BOOST_STATIC_ASSERT(converter::is_object_manager<handle<> >::value);
// class RTSPyLoggingBase
// {
// public:
// virtual ~RTSPyLoggingBase();
// virtual void log(std::string msg) = 0;
// };
class RTSPyLogging // : RTSPyLoggingBase
{
private:
/* data */
//PyObject* const mplogging;
public:
// RTSPyLogging(PyObject* pPyLogging);
RTSPyLogging();
~RTSPyLogging();
void log(std::string msg, PyObject* f);
std::string format(const std::string fmt_str, ...);
};
@@ -0,0 +1,70 @@
/**
* @author Markus Lehr<markus@malehr.de>
*/
#ifndef CM_INCLUDE_RTSRESULT_H_
#define CM_INCLUDE_RTSRESULT_H_
#include <string>
// #include <boost/python/module.hpp>
// #include <boost/python/def.hpp>
//#include <boost/python/class.hpp>
// #include <boost/ref.hpp>
// #include <boost/python/ptr.hpp>
// #include <boost/python/return_value_policy.hpp>
// #include <boost/python/reference_existing_object.hpp>
// #include <boost/python/call.hpp>
// #include <boost/python/object.hpp>
#include <boost/python/dict.hpp>
using namespace boost::python;
std::string format(const std::string fmt_str, ...)
{
va_list ap;
char *fp = NULL;
va_start(ap, fmt_str);
vasprintf(&fp, fmt_str.c_str(), ap);
va_end(ap);
std::unique_ptr<char[]> formatted(fp);
return std::string(formatted.get());
}
struct RTSResult
{
RTSResult(std::string resCode) : mResCode(resCode){}
std::string getResCode() {return mResCode;}
boost::python::dict const& getProperties() {return mProp;}
private:
/* data */
std::string mResCode;
boost::python::dict mProp;
};
// class RTSResult
// {
// private:
// /* data */
// std::string mResCode;
// protected:
// boost::python::dict mProp;
// public:
// RTSResult(std::string resCode);
// ~RTSResult();
// std::string getResCode();
// boost::python::dict const& getProperties();
// };
#endif /* CM_INCLUDE_RTSRESULT_H_ */
@@ -0,0 +1,19 @@
#include <boost/python.hpp>
#include <boost/thread.hpp>
//Use this class in a c++ funktion that is called from python : python => c++
class PyRelinquishGIL
{
public:
PyRelinquishGIL();
~PyRelinquishGIL();
PyRelinquishGIL(const PyRelinquishGIL&) = delete;
PyRelinquishGIL& operator=(const PyRelinquishGIL&) = delete;
private:
PyThreadState* m_thread_state;
};
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_VIBCHANNELDESC_H_
#define RTS_INCLUDE_VIBCHANNELDESC_H_
#include <string>
#include <list>
#include <IChannelDesc.h>
class VibChannelDesc : public IChannelDesc
{
private:
u_int32_t id;
std::string name;
VALUEFORMAT valueFormat;
u_int32_t vByteSpace;
public:
VibChannelDesc(u_int32_t id, const std::string& name, VALUEFORMAT valueFormat, u_int32_t vByteSpace = 1);
u_int32_t GetId() override;
const std::string& GetName() override;
VALUEFORMAT GetValueFormat() override;
/**
* return the length of the data that is neeeded for one value of the channel in UINT32
*
*/
u_int32_t GetValueByteSpace() override;
};
#endif /* RTS_INCLUDE_VIBCHANNELDESC_H_ */
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2024 Markus Lehr.
*
*
* SPDX-License-Identifier: Owend property of Markus Lehr
*
*/
#ifndef RTS_INCLUDE_VIBSENSORDESC_H_
#define RTS_INCLUDE_VIBSENSORDESC_H_
#include <ISensorDesc.h>
#include <IChannelDesc.h>
#include <string>
#include <list>
#include <json.hpp>
using json = nlohmann::json;
class VibSensorDesc: public ISensorDesc
{
private:
std::string name;
std::list<std::shared_ptr<IChannelDesc>> mDescriptions;
public:
VibSensorDesc(const std::string& name);
int GetDescription() override;
bool AddHW2Json(json& j) override;
u_int32_t AddValues2Json(json& j, u_int32_t* values, u_int32_t actno, u_int32_t length) override;
};
#endif /* RTS_INCLUDE_VIBSENSORDESC_H_ */
@@ -0,0 +1,176 @@
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_
#define INCLUDE_NLOHMANN_JSON_FWD_HPP_
#include <cstdint> // int64_t, uint64_t
#include <map> // map
#include <memory> // allocator
#include <string> // string
#include <vector> // vector
// #include <nlohmann/detail/abi_macros.hpp>
// __ _____ _____ _____
// __| | __| | | | JSON for Modern C++
// | | |__ | | | | | | version 3.11.3
// |_____|_____|_____|_|___| https://github.com/nlohmann/json
//
// SPDX-FileCopyrightText: 2013-2023 Niels Lohmann <https://nlohmann.me>
// SPDX-License-Identifier: MIT
// This file contains all macro definitions affecting or depending on the ABI
#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK
#if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH)
#if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 11 || NLOHMANN_JSON_VERSION_PATCH != 3
#warning "Already included a different version of the library!"
#endif
#endif
#endif
#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_MINOR 11 // NOLINT(modernize-macro-to-enum)
#define NLOHMANN_JSON_VERSION_PATCH 3 // NOLINT(modernize-macro-to-enum)
#ifndef JSON_DIAGNOSTICS
#define JSON_DIAGNOSTICS 0
#endif
#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0
#endif
#if JSON_DIAGNOSTICS
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag
#else
#define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS
#endif
#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp
#else
#define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON
#endif
#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION
#define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0
#endif
// Construct the namespace ABI tags component
#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b) json_abi ## a ## b
#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b) \
NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b)
#define NLOHMANN_JSON_ABI_TAGS \
NLOHMANN_JSON_ABI_TAGS_CONCAT( \
NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \
NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON)
// Construct the namespace version component
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \
_v ## major ## _ ## minor ## _ ## patch
#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch)
#if NLOHMANN_JSON_NAMESPACE_NO_VERSION
#define NLOHMANN_JSON_NAMESPACE_VERSION
#else
#define NLOHMANN_JSON_NAMESPACE_VERSION \
NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \
NLOHMANN_JSON_VERSION_MINOR, \
NLOHMANN_JSON_VERSION_PATCH)
#endif
// Combine namespace components
#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b
#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \
NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b)
#ifndef NLOHMANN_JSON_NAMESPACE
#define NLOHMANN_JSON_NAMESPACE \
nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \
NLOHMANN_JSON_ABI_TAGS, \
NLOHMANN_JSON_NAMESPACE_VERSION)
#endif
#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN
#define NLOHMANN_JSON_NAMESPACE_BEGIN \
namespace nlohmann \
{ \
inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \
NLOHMANN_JSON_ABI_TAGS, \
NLOHMANN_JSON_NAMESPACE_VERSION) \
{
#endif
#ifndef NLOHMANN_JSON_NAMESPACE_END
#define NLOHMANN_JSON_NAMESPACE_END \
} /* namespace (inline namespace) NOLINT(readability/namespace) */ \
} // namespace nlohmann
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann
@since version 1.0.0
*/
NLOHMANN_JSON_NAMESPACE_BEGIN
/*!
@brief default JSONSerializer template argument
This serializer ignores the template arguments and uses ADL
([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl))
for serialization.
*/
template<typename T = void, typename SFINAE = void>
struct adl_serializer;
/// a class to store JSON values
/// @sa https://json.nlohmann.me/api/basic_json/
template<template<typename U, typename V, typename... Args> class ObjectType =
std::map,
template<typename U, typename... Args> class ArrayType = std::vector,
class StringType = std::string, class BooleanType = bool,
class NumberIntegerType = std::int64_t,
class NumberUnsignedType = std::uint64_t,
class NumberFloatType = double,
template<typename U> class AllocatorType = std::allocator,
template<typename T, typename SFINAE = void> class JSONSerializer =
adl_serializer,
class BinaryType = std::vector<std::uint8_t>, // cppcheck-suppress syntaxError
class CustomBaseClass = void>
class basic_json;
/// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document
/// @sa https://json.nlohmann.me/api/json_pointer/
template<typename RefStringType>
class json_pointer;
/*!
@brief default specialization
@sa https://json.nlohmann.me/api/json/
*/
using json = basic_json<>;
/// @brief a minimal map-like container that preserves insertion order
/// @sa https://json.nlohmann.me/api/ordered_map/
template<class Key, class T, class IgnoredLess, class Allocator>
struct ordered_map;
/// @brief specialization that maintains the insertion order of object keys
/// @sa https://json.nlohmann.me/api/ordered_json/
using ordered_json = basic_json<nlohmann::ordered_map>;
NLOHMANN_JSON_NAMESPACE_END
#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_
@@ -0,0 +1,23 @@
#include "../include/RTSMonitoringTask.h"
#include <chrono>
#include <thread>
int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv) {
RTSMonitoringTask rtMon;
if (rtMon.Init()) {
// idle
while(1)
{
rtMon.CreateMonitoring(1, "Test1", 3750, 2, 10, "stopped");
// sleep 100 ms
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}
return 0;
}
@@ -0,0 +1,130 @@
/**
*
*/
#include <RTSErrResult.h>
#include <GILLock.h>
#include <boost/python.hpp>
#include <boost/python/copy_const_reference.hpp>
#include <boost/python/return_value_policy.hpp>
RTSErrResult::RTSErrResult()
{
}
RTSErrResult::RTSErrResult(std::string resCode) : mResCode(resCode)
{
}
RTSErrResult::~RTSErrResult()
{
}
void RTSErrResult::setResCode(std::string resCode) {
this->mResCode = resCode;
}
void RTSErrResult::format(const std::string fmt_str, ...)
{
va_list ap;
char *fp = NULL;
va_start(ap, fmt_str);
vasprintf(&fp, fmt_str.c_str(), ap);
va_end(ap);
std::unique_ptr<char[]> formatted(fp);
this->msgs.push_back(formatted.get());
//this->mProp[std::wstring(L"msg")] = formatted.get();
//this->mProp[key] = formatted.get();
}
RTSResult* RTSErrResult::getResult() {
RTSResult* res = new RTSResult();
res->setResCode(this->mResCode);
std::string msgstr = std::string("msg"); //std::wstring msgstr = std::wstring(L"msg");
std::string msg = this->msgs.back();
res->setMsg(msg);
int i = 0;
// boost::python::dict d = res->getProps();
// for (std::string msgtext : this->msgs)
// {
// std::string newmsg = msgstr + std::to_string(i);
// d[newmsg]= msgtext;
// i = i + 1;
// }
return res;
}
// PyObject* RTSErrResult::getResult() {
// boost::python::dict d;
// d[std::string("rescode")] = this->mResCode;
// std::string msgstr = std::string("msg"); //std::wstring msgstr = std::wstring(L"msg");
// int i = 0;
// for (std::string msgtext : this->msgs)
// {
// std::string newmsg = msgstr + std::to_string(i);
// d[newmsg]= msgtext;
// i = i + 1;
// }
// return boost::python::incref(boost::python::object(d).ptr());
// }
using namespace boost::python;
// BOOST_PYTHON_MODULE(RTSResult)
// {
// class_<RTSResult>("RTSResult")
// .def("getResCode", &RTSResult::getResCode)
// .def("getProps", &RTSResult::getProps , return_value_policy<copy_const_reference>())
// ;
// }
// void RTSPyLogging::log(std::string msg, PyObject* f){
// // GIL state handler
// PyLockGIL gstate;
// // Python callback
// call_method<void>(f, "log", msg);
// // GIL handler release
// }
// std::string RTSErrResult::format(const std::string fmt_str, ...)
// {
// va_list ap;
// char *fp = NULL;
// va_start(ap, fmt_str);
// vasprintf(&fp, fmt_str.c_str(), ap);
// va_end(ap);
// std::unique_ptr<char[]> formatted(fp);
// return std::string(formatted.get());
// }
// BOOST_PYTHON_MODULE(RTSResult)
// {
// class_<RTSResult>("RTSResult", init<std::string>())
// .def("get_bar", &Foo::get_bar
// , return_value_policy<copy_const_reference>())
// ;
// }
@@ -0,0 +1,283 @@
/*
*/
#include <RTSMonFrame.h>
#include <json.hpp>
#include <fstream>
#include <string>
#include <iostream>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <boost/uuid/uuid_io.hpp>
static const std::string RTSMONFID("id");
static const std::string RTSMONID("monid");
static const std::string RTSMONNAME("name");
static const std::string RTSMONSRATE("samplerate");
static const std::string RTSMONSPERIOD("sampleperiod");
static const std::string RTSMONDTIME("downtime");
static const std::string RTSMONTIMESTAMP("timestamp");
static const std::string RTSMONSAMPLES("samples");
static const std::string RTSMONHW("hwdescription");
using namespace std::chrono;
RTSMonFrame::RTSMonFrame(std::string id, std::string name, int samplerate, int sampleperiod, int downtime, const std::list<std::shared_ptr<ISensorDesc>>& sensDesc, std::string path) {
this->id = id;
this->name = name;
this->samplerate = samplerate;
this->sampleperiod = sampleperiod;
this->downtime = downtime;
this->mSenorDesriptions.insert(this->mSenorDesriptions.end(), sensDesc.begin(), sensDesc.end());
this->path = path;
}
RTSMonFrame::~RTSMonFrame(){}
std::string RTSMonFrame::GetId() {
return this->id;
}
void RTSMonFrame::SetName(const std::string& name){
this->name = name;
}
const std::string& RTSMonFrame::GetName() {
return this->name;
}
void RTSMonFrame::SetSampleRate(int samplerate){
this->samplerate = samplerate;
}
int RTSMonFrame::GetSampleRate() {
return this->samplerate;
}
void RTSMonFrame::SetSamplePeriod(int sampleperiod){
this->sampleperiod= sampleperiod;
}
int RTSMonFrame::GetSamplePeriod(){
return this->sampleperiod;
}
void RTSMonFrame::SetDownTime(int downtime){
this->downtime= downtime;
}
int RTSMonFrame::GetDownTime(){
return this->downtime;
}
bool RTSMonFrame::generate([[maybe_unused]] u_int32_t* values, [[maybe_unused]] u_int32_t length){
// Example of the very popular RFC 3339 format UTC time
std::stringstream ss;
//build path
ss << this->path << this->id;
std::string monpath = ss.str();
boost::filesystem::path directory(monpath.c_str());
//check for directory
if (!boost::filesystem::exists(directory)){
boost::filesystem::create_directories(directory);
printf("CA7 : created dir %s.\n", monpath.c_str());
}
std::time_t time = std::time({});
char timeString[std::size("yyyy-mm-ddThh:mm:ss")];
std::strftime(std::data(timeString), std::size(timeString),"%FT%TZ", std::gmtime(&time));
ss << "/" << timeString << ".json";
std::string filename = ss.str();
printf("CA7 : filename %s.\n", filename.c_str());
auto unix_timestamp = duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
//generate header id, name, timestamp,samplerate, sampleperiod, downtime
json j;
json jsamples = json::array();
boost::uuids::random_generator gen;
boost::uuids::uuid u = gen();
std::string sampleid = to_string(u);
printf("CA7 : uuid %s.\n", sampleid.c_str());
j[RTSMONFID] = sampleid;
j[RTSMONID] = this->id;
j[RTSMONNAME] = this->name;
j[RTSMONSRATE] = this->samplerate;
j[RTSMONSPERIOD] = this->sampleperiod;
j[RTSMONDTIME] = this->downtime;
j[RTSMONTIMESTAMP] = unix_timestamp;
vRCMDeviceData* pDeviceData = (vRCMDeviceData*) values;
uint32_t pacCount = pDeviceData->packageCount;
uint32_t* packData = pDeviceData->data;
uint32_t actNo = 0;
json jsensors = json::array();
for (auto &&sensDesc : this->mSenorDesriptions)
{
actNo = sensDesc->AddHW2Json(jsensors);
}
j[RTSMONHW] = jsensors;
json jvalues = json::array();
printf("CA7 : start writing data %s.\n", monpath.c_str());
for (size_t actPacNo = 0; actPacNo <= pacCount; actPacNo++)
{
printf("CA7 : writing packing %d.\n", actPacNo);
//TODO ML: check that the maxNo is smaller than i
while (actNo < pDeviceData->dataQuantity)
{
//json jsample = json::object();
if (this->mSenorDesriptions.empty()) {
printf("CA7 : no sensor description.\n");
actPacNo = pacCount;
break;
}
for (auto &&sensDesc : this->mSenorDesriptions)
{
//actNo = sensDesc->Add2Json(jsample, values, actNo, pDeviceData->dataQuantity);
actNo = sensDesc->AddValues2Json(jvalues, packData, actNo, pDeviceData->dataQuantity);
}
// jsample[RTSMONVALUES] = jvalues;
// jsamples.push_back(jsample);
printf("CA7 : jsamples.push_back - actno[%d].\n", actNo);
}
//printf("CA7 : datpac written %d.\n", actPacNo);
//set the point to the new package
int dlength = actPacNo * (3 + pDeviceData->dataQuantity);
printf("CA7 : dlength = %d - actPacNo = %d - dataQuantity = %d.\n", dlength, actPacNo, pDeviceData->dataQuantity);
pDeviceData = (vRCMDeviceData*) (values + dlength);
packData = pDeviceData->data;
actNo = 0;
}
//j[RTSMONSAMPLES] = jsamples;
j[RTSMONVALUES] = jvalues;
printf("CA7 : end writing data %s.\n", monpath.c_str());
// write prettified JSON to another file
std::ofstream o(filename);
o << std::setw(4) << j << std::endl;
return true;
}
/*
uint64_t timeSinceEpochMillisec() {
using namespace std::chrono;
return duration_cast<milliseconds>(system_clock::now().time_since_epoch()).count();
}
*/
/*
// Example of the very popular RFC 3339 format UTC time
std::stringstream ss;
std::time_t time = std::time({});
char timeString[std::size("yyyy-mm-ddThh:mm:ssZ")];
std::strftime(std::data(timeString), std::size(timeString),"%FT%TZ", std::gmtime(&time));
ss << "/home/root/monfiles/" << timeString << ".txt";
std::string filename = ss.str();
printf("CA7 : filename %s.\n", filename.c_str());
//save to file
std::ofstream outfile (filename,std::ofstream::binary);
// if (outfile.write (mByteBuffCpy,this->q_get_data_size.size))
// {
// printf("CA7 : write file %s succesfully.\n", filename.c_str());
// result = std::string("CA7 : write file %s succesfully.\n") + filename;
// }
// else {
// result = std::string("CA7 : file could not be written.\n") + filename;
// printf("CA7 : file %s could not be written.\n", filename.c_str());
// }
outfile.close();
printf("CA7 : file %s closed.\n", filename.c_str());
*/
/** old impl */
//unsigned char* pData = (unsigned char*) this->mmappedData[i];
// save a copy of 1st data
//mByteBuffCpy[0] = *pData;
// printf("CA7 : filename pointer:%p , pno:%d, pcount:%d, dataCount:%d .\n"
// , pData
// , pData[0].packageNo
// , pData[0].packageCount
// , pData[0].dataQuantity);
// printf("CA7 : data[0]:%d , data[1]:%d data[2]:%d \n data[115]:%d , data[116]:%d data[117]:%d.\n"
// , pData[0].data[0]
// , pData[0].data[1]
// , pData[0].data[2]
// , pData[0].data[115]
// , pData[0].data[116]
// , pData[0].data[117]);
// int dlength = 1* (3 + pData->dataQuantity);
// pData = (vRCMDeviceData*) (u32Buff + dlength);
// printf("CA7 : u32Buff[%p] - pData[%p] - dlength=%d \n", u32Buff , pData, dlength);
// printf("CA7 : filename pointer:%p , pno:%d, pcount:%d, dataCount:%d, data[0]:%d , data[1]:%d data[2]:%d , data[3]:%d , data[4]:%d data[5]:%d.\n"
// , pData
// , pData->packageNo
// , pData->packageCount
// , pData->dataQuantity
// , pData->data[0]
// , pData->data[1]
// , pData->data[2]
// , pData->data[3]
// , pData->data[4]
// , pData->data[5]);
// Example of the very popular RFC 3339 format UTC time
// std::stringstream ss;
// std::time_t time = std::time({});
// char timeString[std::size("yyyy-mm-ddThh:mm:ssZ")];
// std::strftime(std::data(timeString), std::size(timeString),"%FT%TZ", std::gmtime(&time));
// ss << "/home/root/monfiles/" << timeString << ".txt";
// std::string filename = ss.str();
// printf("CA7 : filename %s.\n", filename.c_str());
// //save to file
// std::ofstream outfile (filename,std::ofstream::binary);
// // if (outfile.write (mByteBuffCpy,this->q_get_data_size.size))
// // {
// // printf("CA7 : write file %s succesfully.\n", filename.c_str());
// // result = std::string("CA7 : write file %s succesfully.\n") + filename;
// // }
// // else {
// // result = std::string("CA7 : file could not be written.\n") + filename;
// // printf("CA7 : file %s could not be written.\n", filename.c_str());
// // }
// outfile.close();
//printf("CA7 : file %s closed.\n", filename.c_str());
@@ -0,0 +1,332 @@
/*
*/
#include <RTSMonitoringTask.h>
#include <RTSErrResult.h>
#include <RelGILLock.h>
//#include "../../include/json.hpp"//((
//#include "../../include/json_fwd.hpp"
#include <string>
#include<iostream>
#include <memory>
#include<cstring>
#include <RTSMonFrame.h>
#include<ISensorDesc.h>
#include <chrono>
#include <sstream>
#include <fstream>
#include <VibSensorDesc.h>
// #define RPMSG_SDB_IOCTL_SET_EFD _IOW('R', 0x00, struct rpmsg_sdb_ioctl_set_efd *)
// #define RPMSG_SDB_IOCTL_GET_DATA_SIZE _IOWR('R', 0x01, struct rpmsg_sdb_ioctl_get_data_size *)
#define RPMSG_SDB_IOCTL_SET_EFD _IOW('R', 0x00, rpmsg_sdb_ioctl_set_efd *)
#define RPMSG_SDB_IOCTL_GET_DATA_SIZE _IOWR('R', 0x01, rpmsg_sdb_ioctl_get_data_size *)
#define DATA_BUF_POOL_SIZE 1024*1024 /* 1MB */
#define TIMEOUT 1 * 1000
RTSMonitoringTask::RTSMonitoringTask(std::string id, std::string name, int samplerate, int sampleperiod, int downtime, std::string path)
{
this->id = id;
this->monName = name;
this->samplerate = samplerate;
this->sampleperiod = sampleperiod;
this->downtime = downtime;
this->path = path;
}
RTSMonitoringTask::~RTSMonitoringTask()
{
}
bool RTSMonitoringTask::Load() {
//later load the file
//int id = 1;
return true;
}
bool RTSMonitoringTask::Init() {
const std::string fwPath = "home/root/elffile";
const std::string fwName = "zephyr_openamp_rsc_table.elf";
//check if the FWIsRunning
// if (coproHelper.Init(fwPath, fwName) >= 0) {
// printf("CA7 : Init success \n");
if (pthread_create( &monThread, NULL, &RTSMonitoringTask::Run, this) == 0) {
printf("CA7 : mon thread creation fails\n");
return true;
}
return false;
}
void* RTSMonitoringTask::Run(void *obj) {
RTSMonitoringTask* rtsMonTask = static_cast<RTSMonitoringTask*>(obj);
int fdSdbRpmsg = rtsMonTask->Open("/dev/mon-datafile");
if (fdSdbRpmsg > 0) {
while (rtsMonTask->GetRunState()) {
rtsMonTask->Read();
}
rtsMonTask->Close();
}
return 0;
}
bool RTSMonitoringTask::GetRunState() {
return mRunThread;
}
void RTSMonitoringTask::SetRunState(bool runThread) {
this->mRunThread.store(runThread) ;
}
int RTSMonitoringTask::Open(std::string monfilename){
//PyRelinquishGIL scoped;
this->mFdSdbRpmsg = open(monfilename.c_str(), O_RDWR);
if (this->mFdSdbRpmsg < 0) {
printf("CA7 : Err openening %s, ret=%d\n",monfilename.c_str(), this->mFdSdbRpmsg);
}
else {
printf("CA7 : Succes openening %s, ret=%d\n",monfilename.c_str(), this->mFdSdbRpmsg);
//this->log(this->format("CA7 : Success on openening %s, ret=%d\n",monfilename, this->mFdSdbRpmsg), f);
for (int i=0;i<NB_BUF;i++){
// Create the evenfd, and sent it to kernel driver, for notification of buffer full
this->mefd[i] = eventfd(0, 0);
if (this->mefd[i] == -1) {
printf("CA7 : failed to get eventfd:%d\n",i);
//this->mLogs.push_back("CA7 : failed to get eventfd:%d");
}
else {
printf("CA7 : Forward efd info for buf%d with mFdSdbRpmsg:%d and efd:%d\n",i,this->mFdSdbRpmsg,this->mefd[i]);
}
this->q_set_efd.bufferId = i;
this->q_set_efd.eventfd = this->mefd[i];
if(ioctl(mFdSdbRpmsg, RPMSG_SDB_IOCTL_SET_EFD, &(this->q_set_efd)) < 0) {
printf("CA7 :failed to set efd efd%d-mFdSdbRpmsg%d for :%d\n",i,this->mFdSdbRpmsg,this->mefd[i]);
}
else {
printf("CA7 : succes to set efd efd%d-mFdSdbRpmsg%d:%d\n",i,this->mFdSdbRpmsg,this->mefd[i]);
}
// watch eventfd for input
this->mfds[i].fd = this->mefd[i];
this->mfds[i].events = POLLIN;
printf("CA7 : start mapping buffer for efd:%d\n",i);
// opensuccess.format("CA7 : start mapping buffer for efd:%d",i);
// this->mLogs.push_back(this->format(u8"CA7 : start mapping buffer for efd:%d",i));
//this->mLogs.push_back("CA7 : start mapping buffer for efd");
mmappedData[i] = mmap(NULL,
DATA_BUF_POOL_SIZE,
PROT_READ | PROT_WRITE,
MAP_PRIVATE,
this->mFdSdbRpmsg,
0);
printf("CA7 : DBG mmappedData[%d]:%p\n", i, mmappedData[i]);
this->mfMappedData = true;
usleep(50000);
}
}
//assert(this->mFdSdbRpmsg != -1);
return this->mFdSdbRpmsg;
}
std::string RTSMonitoringTask::Read(){
//PyRelinquishGIL scoped;
std::string result;
std::list<std::shared_ptr<ISensorDesc>> sensDescs;
std::shared_ptr<ISensorDesc> sensorDesc = std::make_shared<VibSensorDesc>("RT850");
sensDescs.push_back(sensorDesc);
//std::string TEST = "Test";
RTSMonFrame frame(this->id,this->monName, this->samplerate, this->sampleperiod, this->downtime, sensDescs, this->path);
int ret, rc;
char buf[16];
char dbgmsg[80];
// wait till at least one buffer becomes available
//this->mLogs.push_back("CA7 : Start Polling.\n");
//printf("CA7 : Start Polling.\n");
ret = poll(this->mfds, NB_BUF, TIMEOUT); //ret = poll(fds, NB_BUF, TIMEOUT * 1000);
if (ret == -1) {
perror("poll()");
//this->mLogs.push_back("CA7 : Error Polling.\n");
printf("CA7 : Poll Error.\n");
return std::string("poll error");
}
else if (ret == 0){
printf("CA7 : No buffer data within %d msec.\n", TIMEOUT);
//this->mLogs.push_back("CA7 : No buffer data within 300 msec.\n");
return std::string("CA7 : No buffer data within %d msec.\n");
}
for (size_t i = 0; i < NB_BUF; i++)
{
int revent = this->mfds[i].revents;
printf("CA7 : try Reading Buffer %d, reevent=%d, POLLIN=%d.\n", i, revent, POLLIN);
if (this->mfds[i].revents & POLLIN) {
printf("CA7 : Start Reading Buffer %d.\n", i );
rc = read(this->mefd[i], buf, 16);
if (!rc) {
return std::string("CA7: stdin closed - Buffer:%d\n", i);
}
/* Get buffer data size*/
this->q_get_data_size.bufferId = i;
if(ioctl(this->mFdSdbRpmsg, RPMSG_SDB_IOCTL_GET_DATA_SIZE, &(this->q_get_data_size)) < 0) {
printf("CA7 : Failed to get data size.\n");
return std::string("Failed to get data size\n");
}
if (this->q_get_data_size.size) {
printf("CA7 : call generate frame - datasize:%d.\n", this->q_get_data_size.size);
mNbUncompMB++;
mNbUncompData += this->q_get_data_size.size;
u_int32_t* u32Buff = (u_int32_t*) this->mmappedData[i];
frame.generate(u32Buff, this->q_get_data_size.size);
this->mfds[i].revents = 0;
}
// else {
// result = std::string("CA7 : file could not be written.\n") + filename;
// //printf("CA7 : file %s could not be written.\n", filename);
// }
//outfile.close();
// gettimeofday(&tval_after, NULL);
// timersub(&tval_after, &tval_before, &tval_result);
//this->mLogs.push_back("CA7: mon_thread data EVENT mDdrBuffAwaited\n");
}
// else {
// //printf("CA7 : sdb_thread => buf[%d] is empty\n", mDdrBuffAwaited);
// //this->mLogs.push_back("CA7: buffer is empty\n");
// return std::string("CA7: buffer is empty\n");
// }
// mDdrBuffAwaited++;
// if (mDdrBuffAwaited >= NB_BUF) {
// mDdrBuffAwaited = 0;
// }
}
return result;
}
bool RTSMonitoringTask::Close(){
//PyRelinquishGIL scoped;
printf("CA7 : close of device \n");
if (this->mfMappedData) {
for (int i=0;i<NB_BUF;i++){
int rc = munmap(mmappedData[i], DATA_BUF_POOL_SIZE);
if (rc != 0) {
printf("CA7 : Buffer could not be unmapped\n");
}
}
this->mfMappedData = 0;
}
int res = close(this->mFdSdbRpmsg);
if (res != 0) {
printf("CA7 : close of device failed: %s\n", strerror(errno));
return false;
}
printf("CA7 : close of device done\n");
return true;
}
bool RTSMonitoringTask::Start(){
const std::string fwPath = "home/root/elffile";
const std::string fwName = "zephyr_openamp_rsc_table.elf";
if (pthread_create( &monThread, NULL, &RTSMonitoringTask::Run, this) == 0) {
printf("CA7 : mon thread creation success\n");
return true;
}
printf("CA7 : mon thread creation fails\n");
return false;
}
bool RTSMonitoringTask::Stop(){
this->SetRunState(false);
printf("CA7 : mon thread terminating\n");
pthread_join(monThread, NULL);
printf("CA7 : mon thread terminated\n");
return true;
}
std::string RTSMonitoringTask::GetId(){
return this->id;
}
void RTSMonitoringTask::SetId(std::string id){
this->id = id;
}
int RTSMonitoringTask::GetRate(){
return this->samplerate;
}
void RTSMonitoringTask::SetRate(int rate){
this->samplerate = rate;
}
int RTSMonitoringTask::GetPeriod(){
return this->sampleperiod;
}
void RTSMonitoringTask::SetPeriod(int period){
this->sampleperiod = period;
}
int RTSMonitoringTask::GetDowntime(){
return this->downtime;
}
void RTSMonitoringTask::SetDowntime(int downtime){
this->downtime = downtime;
}
std::string RTSMonitoringTask::GetPath(){
return this->path;
}
void RTSMonitoringTask::SetPath(std::string path){
this->path = path;
}
@@ -0,0 +1,47 @@
/**
*
*/
#include <RTSResult.h>
#include <GILLock.h>
RTSResult::RTSResult(std::string resCode) : mResCode(resCode)
{
}
RTSResult::~RTSResult()
{}
std::string RTSResult::getResCode(){
return mResCode;
}
boost::python::dict const& RTSResult::getProperties() {
return mProp;
}
// void RTSPyLogging::log(std::string msg, PyObject* f){
// // GIL state handler
// PyLockGIL gstate;
// // Python callback
// call_method<void>(f, "log", msg);
// // GIL handler release
// }
// BOOST_PYTHON_MODULE(RTSResult)
// {
// class_<RTSResult>("RTSResult", init<std::string>())
// .def("getResCode", &RTSResult::getResCode)
// .def("getProperties", &RTSResult::getProperties, return_value_policy<copy_const_reference>())
// ;
// }
@@ -0,0 +1,41 @@
/*
*/
#include <string>
#include <list>
#include <VibChannelDesc.h>
VibChannelDesc::VibChannelDesc(u_int32_t id, const std::string& name, VALUEFORMAT valueFormat, u_int32_t vByteSpace){
this->id = id;
this->name = name;
this->valueFormat = valueFormat;
this->vByteSpace = vByteSpace;
}
u_int32_t VibChannelDesc::GetId(){
return this->id;
}
const std::string& VibChannelDesc::GetName(){
return this->name;
}
VALUEFORMAT VibChannelDesc::GetValueFormat(){
return this->valueFormat;
}
/**
* return the length of the data that is neeeded for one value of the channel in UINT32
*
*/
u_int32_t VibChannelDesc::GetValueByteSpace(){
return this->vByteSpace;
}
@@ -0,0 +1,199 @@
/*
*/
#include <VibSensorDesc.h>
#include <string>
#include <list>
#include <VibChannelDesc.h>
static const std::string RTSMONERROR("error");
static const std::string RTSMONNAME("name");
static const std::string RTSMONUINT("UINT32");
static const std::string RTSMONINT("INT32");
static const std::string RTSMONFLOAT("FLOAT");
static const std::string RTSMONDOUBLE("DOUBLE");
VibSensorDesc::VibSensorDesc(const std::string& name){
//Init Vibrationsensor
this->name = name;
//u_int32_t id, const std::string& name, VALUEFORMAT valueFormat, u_int32_t vByteSpace = 1)
std::shared_ptr<IChannelDesc> channelDesc = std::make_shared<VibChannelDesc>(1, "vibration1", VALUEFORMAT::UINT32, 1);
this->mDescriptions.push_back(channelDesc);
channelDesc = std::make_shared<VibChannelDesc>(2, "vibration2", VALUEFORMAT::UINT32, 1);
this->mDescriptions.push_back(channelDesc);
channelDesc = std::make_shared<VibChannelDesc>(3, "vibration3", VALUEFORMAT::UINT32, 1);
this->mDescriptions.push_back(channelDesc);
}
int VibSensorDesc::GetDescription(){
return 0;
}
bool VibSensorDesc::AddHW2Json(json& j){
json jsensor = json::object();
jsensor[RTSMONNAME] = this->name;
if (this->mDescriptions.empty()) {
printf("CA7 : Error empty channel description name:%s.\n", this->name.c_str());
j[RTSMONERROR] = "Error empty channel description";
return false;
}
json jchannels = json::array();
for (auto &&chanDesc : this->mDescriptions)
{
json jchannel = json::object();
jchannel[RTSMONCHANNELNAME] = chanDesc->GetName();
switch (chanDesc->GetValueFormat())
{
case VALUEFORMAT::UINT32:
jchannel[RTSMONCHANNELVALUETYPE] = RTSMONUINT;
break;
case VALUEFORMAT::INT32:
jchannel[RTSMONCHANNELVALUETYPE] = RTSMONINT;
break;
case VALUEFORMAT::FLOAT:
jchannel[RTSMONCHANNELVALUETYPE] = RTSMONFLOAT;
break;
case VALUEFORMAT::DOUBLE:
jchannel[RTSMONCHANNELVALUETYPE] = RTSMONDOUBLE;
break;
default:
break;
}
jchannels.push_back(jchannel);
}
jsensor[RTSMONCHANNELS] = jchannels;
j.push_back(jsensor);
return true;
}
u_int32_t VibSensorDesc::AddValues2Json(json& j, u_int32_t* values, u_int32_t actno, u_int32_t length){
//sensor Object
json jsensor = json::object();
u_int32_t result = actno;
if (actno <= length) {
//iterate over the channels
rtsSensorValue value;
if (this->mDescriptions.empty()) {
printf("CA7 : Error empty channel description - actno[%d].\n", actno);
j[RTSMONERROR] = "Error empty channel description";
return length;
}
//json jchannels = json::array();
for (auto &&chanDesc : this->mDescriptions)
{
value.vUINT32 = values[result];
result = result +1;
//json jchannel = json::object();
switch (chanDesc->GetValueFormat())
{
case VALUEFORMAT::UINT32:
//j[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vUINT32);
j.push_back(json::number_unsigned_t(value.vUINT32));
break;
case VALUEFORMAT::INT32:
//j[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vINT32);
j.push_back(json::number_unsigned_t(value.vINT32));
break;
case VALUEFORMAT::FLOAT:
//j[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vFLOAT);
j.push_back(json::number_unsigned_t(value.vFLOAT));
break;
case VALUEFORMAT::DOUBLE:
//j[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vDOUBLE);
j.push_back(json::number_unsigned_t(value.vDOUBLE));
break;
default:
break;
}
//jchannels.push_back(jchannel);
}
//jsensor[RTSMONCHANNELS] = jchannels;
//j.push_back(jsensor);
}
//printf("CA7 : add2json-1 return actno %d.\n", actno);
return result;
}
/*
json jsensor = json::object();
jsensor[RTSMONNAME] = this->name;
u_int32_t result = actno;
if (actno <= length) {
//iterate over the channels
rtsSensorValue value;
if (this->mDescriptions.empty()) {
printf("CA7 : Error empty channel description - actno[%d].\n", actno);
j[RTSMONERROR] = "Error empty channel description";
return length;
}
json jchannels = json::array();
for (auto &&chanDesc : this->mDescriptions)
{
value.vUINT32 = values[result];
result = result +1;
//printf("CA7 : add2json-1 actno %d.\n", actno);
json jchannel = json::object();
switch (chanDesc->GetValueFormat())
{
case VALUEFORMAT::UINT32:
// j[chanDesc->GetName()] = json::number_unsigned_t(value.vUINT32);
jchannel[RTSMONCHANNELNAME] = chanDesc->GetName();
jchannel[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vUINT32);
break;
case VALUEFORMAT::INT32:
//j[chanDesc->GetName()] = json::number_integer_t(value.vINT32);
jchannel[RTSMONCHANNELNAME] = chanDesc->GetName();
jchannel[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vINT32);
break;
case VALUEFORMAT::FLOAT:
//j[chanDesc->GetName()] = json::number_float_t(value.vFLOAT);
jchannel[RTSMONCHANNELNAME] = chanDesc->GetName();
jchannel[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vFLOAT);
break;
case VALUEFORMAT::DOUBLE:
//j[chanDesc->GetName()] = json::number_float_t(value.vDOUBLE);
jchannel[RTSMONCHANNELNAME] = chanDesc->GetName();
jchannel[RTSMONCHANNELVALUE] = json::number_unsigned_t(value.vDOUBLE);
break;
default:
break;
}
jchannels.push_back(jchannel);
}
jsensor[RTSMONCHANNELS] = jchannels;
j.push_back(jsensor);
}
//printf("CA7 : add2json-1 return actno %d.\n", actno);
return result;
*/
@@ -0,0 +1,193 @@
#include <boost/python.hpp>
#include <boost/python/manage_new_object.hpp>
#include <boost/python/copy_const_reference.hpp>
#include <boost/python/return_value_policy.hpp>
#include <boost/python/extract.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <string>
#include <RTSMonitoringTask.h>
//#include <RTSResult.h>
#include <RTSErrResult.h>
#include <RelGILLock.h>
#include <GILLock.h>
struct RTService
{
private:
/* data */
//RTSMonitoringTask rtsMonTask;
RTSCoproHelper rtsCopro;
public:
// RT_Service(/* args */) {
// }
// ~RT_Service() {}
bool isCoproRunning(){
PyRelinquishGIL scoped;
return rtsCopro.Copro_isFwRunning();
}
bool initCoproFW(std::string fwPath, std::string fwName){
PyRelinquishGIL scoped;
return rtsCopro.Init(fwPath, fwName);
}
// bool initLogChannel(){
// PyRelinquishGIL scoped;
// return rtsCopro.Copro_initLogChannel();
// }
// bool openLogChannel(){
// PyRelinquishGIL scoped;
// return rtsCopro.Copro_initLogChannel();
// }
// bool writeLogChannel(){
// PyRelinquishGIL scoped;
// return rtsCopro.Copro_writeLogChannel();
// }
// std::string readLogChannel(){
// PyRelinquishGIL scoped;
// return rtsCopro.Copro_readLogChannel();
// }
// bool closeLogChannel(){
// PyRelinquishGIL scoped;
// return rtsCopro.Copro_closeLogChannel();
// }
// int openDataChannel(std::string monfilename){
// PyRelinquishGIL scoped;
// return rtsMonTask.Open(monfilename);
// }
// std::string readDataChannel(int fileDesc){
// PyRelinquishGIL scoped;
// return rtsMonTask.Read(fileDesc);
// }
// bool closeDataChannel(int fileDesc){
// PyRelinquishGIL scoped;
// return rtsMonTask.Close(fileDesc);
// }
boost::python::list getMonitoringStates() {
//TODO ask the M4Core for the Monitpring Status
PyRelinquishGIL scoped;
boost::python::list list;
return list;
}
// we need all parameters like id, samplerate, sampletime, downtime, later: HW-channels with the configurations
// bool startMonitoring(int samplerate, int sampleperiod, int downtime, std::string status) {
// PyRelinquishGIL scoped;
// //TODO ML: add this to the M4Core
// // if (rtsMonTask.Init()) {
// return rtsMonTask.Start(samplerate, sampleperiod, downtime);
// // }
// // return false;
// }
// we need all parameters like id, samplerate, sampletime, downtime, later: HW-channels with the configurations
// bool stopMonitoring(std::string id) {
// PyRelinquishGIL scoped;
// //TODO ML: add this to the M4Core
// // if (rtsMonTask.Init()) {
// return rtsMonTask.Stop(id);
// // }
// // return false;
// }
};
using namespace boost::python;
BOOST_PYTHON_MODULE(rt_service)
{
namespace python = boost::python;
// python::class_<RTSMonScript, boost::noncopyable>("RTSMonitoring", python::no_init)
// .add_property("id", &RTSMonitoring::GetId, &RTSMonitoring::SetId)
// .add_property("samplerate", &RTSMonitoring::GetSampleRate, &RTSMonitoring::SetId)
// .add_property("samplePeriod", &RTSMonitoring::GetSamplePeriod, &RTSMonitoring::SetId)
// .add_property("downtime", &RTSMonitoring::GetDownTime, &RTSMonitoring::SetId)
// .def("add2Script", pure_virtual(&RTSMonitoring::add2Script))
// ;
// class_<std::vector<RTSMonitoring*>>("RTSMonitoringList")
// .def(vector_indexing_suite<std::vector<RTSMonitoring*>>())
// ;
// def("add2Script", +[](RTSMonitoring* object) {
// return object->add2Script();
// });
//, python::init<PyObject*>()
class_<RTSMonitoringTask, boost::noncopyable>("RTSMonitoringTask", init<std::string, std::string, int, int, int, std::string>())
// .add_property("id", &RTSMonitoringTask::GetId, &RTSMonitoringTask::SetId)
// .add_property("samplerate", &RTSMonitoringTask::GetRate, &RTSMonitoringTask::SetRate)
// .add_property("samplePeriod", &RTSMonitoringTask::GetPeriod, &RTSMonitoringTask::SetPeriod)
// .add_property("downtime", &RTSMonitoringTask::GetDowntime, &RTSMonitoringTask::SetDowntime)
// .add_property("path", &RTSMonitoringTask::GetPath, &RTSMonitoringTask::SetPath)
.def("start", &RTSMonitoringTask::Start)
.def("stop", &RTSMonitoringTask::Stop)
.def_readonly("id", &RTSMonitoringTask::id)
.def_readonly("name", &RTSMonitoringTask::monName)
.def_readonly("samplerate", &RTSMonitoringTask::samplerate)
.def_readonly("sampleperiod", &RTSMonitoringTask::sampleperiod)
.def_readonly("downtime", &RTSMonitoringTask::downtime)
.def_readonly("path", &RTSMonitoringTask::path)
// .def("openChannel", &RTSMonitoringTask::Open) //, return_value_policy<manage_new_object>())
// .def("readChannel", &RTSMonitoringTask::Read)
// .def("closeChannel", &RTSMonitoringTask::Close)
// .def("getLogMsg", &RTSMonitoringTask::GetLogMsg) //, return_value_policy<manage_new_object>())
// .def("getExtError", &RTSMonitoringTask::GetExtError, return_value_policy<manage_new_object>())
;
class_<RTService>("RT_Service")
.def("isCoproRunning", &RTService::isCoproRunning)
.def("initCoproFW", &RTService::initCoproFW)
// .def("initLogChannel", &RTService::initLogChannel)
// .def("readLogChannel", &RTService::readLogChannel)
.def("getAllMonitoringStat", &RTService::getMonitoringStates)
// .def("startMonitoring", &RTService::startMonitoring)
// .def("stopMonitoring", &RTService::stopMonitoring)
// .def("openDataChannel", &RTService::openDataChannel)
// .def("readDataChannel", &RTService::readDataChannel)
// .def("closeDataChannel", &RTService::closeDataChannel)
;
class_<RTSResult>("RTSResult")
.def("getResCode", &RTSResult::getResCode)
.def("getMsg", &RTSResult::getMsg)
// .def("getProps", &RTSResult::getProps , return_value_policy<copy_const_reference>())
;
// class_<RTSResult, boost::noncopyable>("RTSResult", init<std::string>())
// .def("getResCode", &RTSResult::getResCode)
// .def("getProperties", &RTSResult::getProperties, return_value_policy<copy_const_reference>())
// ;
};
/**
* startmonitoring()
* stopmonitoring(id)
.def("createMonitoring", &RTService::createMonitoring)
.def("setMonitoringStatus", &RTService::setMonitoringStatus)
.def("getMonitoringStatus", &RTService::getMonitoringState)
*/
@@ -0,0 +1,14 @@
#include <GILLock.h>
//Use this class in a c++ funktion that called into python : c++ => python
PyLockGIL::PyLockGIL()
: m_gstate(PyGILState_Ensure()) {
}
PyLockGIL::~PyLockGIL() {
PyGILState_Release(m_gstate);
}
@@ -0,0 +1,430 @@
/*
*/
#include "../../include/RTSCoproHelper.h"
#include <signal.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <termios.h>
#include <fcntl.h>
#include <inttypes.h>
#include <time.h>
#include <pthread.h>
#include <unistd.h> // for usleep
#include <math.h>
#include <sys/ioctl.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/eventfd.h>
#include <sys/poll.h>
#include <regex.h>
#include <sched.h>
#include <assert.h>
#include <errno.h>
#include <error.h>
#define MAX_BUF 80
#define TTY_CTRL_OPTS (CS8 | CLOCAL | CREAD)
#define TTY_INPUT_OPTS IGNPAR
#define TTY_OUTPUT_OPTS 0
#define TTY_LOCAL_OPTS 0
#define CMDCHANNEL 0
#define DATACHANNEL 1
RTSCoproHelper::RTSCoproHelper(/* args */)
{
}
RTSCoproHelper::~RTSCoproHelper()
{
}
int RTSCoproHelper::Init(std::string fwPath, std::string fwName) {
int res = -1;
if (this->Copro_isFwRunning() != 0){
//copro is already Runnibng nothing TODO
//res = this->Copro_openTtyRpmsg(CMDCHANNEL, 0);
//this->Copro_stopFw();
//return res;
return 0;
}
//load Firmware
//set firmware path
res = this->Copro_setFwPath(fwPath.c_str());
if (res >= 0) {
printf("CA7 : Success setting the fwpath, res=%d\n", res);
res = this->Copro_setFwName(fwName.c_str());
if (res >= 0) {
printf("CA7 : Success setting the fwname, res=%d\n", res);
res = this->Copro_startFw();
if (res >= 0) {
printf("CA7 : Success starting Copro, err=%d\n", res);
}
else {
printf("CA7 : Error could not start the firmware, res=-%d\n", res);
}
}
else {
printf("CA7 : Error setting the fwName, err=-%d\n", res);
}
}
else {
printf("CA7 : Error setting the fwpath, err=-%d\n", res);
}
return res;
}
// bool RTSCoproHelper::Copro_initLogChannel(){
// int res = this->Copro_openTtyRpmsg(LOGCHANNEL, 1);
// if (res >= 0 ){
// printf("CA7 : Success opening Logchannel, err=%d\n", res);
// const char* firstCMD = "Test";
// res = this->Copro_writeTtyRpmsg(LOGCHANNEL, strlen(firstCMD), firstCMD);
// if (res >= 0 ){
// printf("CA7 : Success sending data to Logchannel, err=%d\n", res);
// res = 0;
// }
// else {
// printf("CA7 : Error sending to logchannel, err=%d\n", res);
// }
// }
// else {
// printf("CA7 : Error opening logchannel, err=%d\n", res);
// }
// return (res >=0);
// }
// bool RTSCoproHelper::Copro_closeLogChannel(){
// int res = this->Copro_closeTtyRpmsg(LOGCHANNEL);
// if (res >= 0 ){
// printf("CA7 : Success opening Logchannel, err=%d\n", res);
// const char* firstCMD = "Test";
// res = this->Copro_writeTtyRpmsg(LOGCHANNEL, strlen(firstCMD), firstCMD);
// if (res >= 0 ){
// printf("CA7 : Success sending data to Logchannel, err=%d\n", res);
// res = 0;
// }
// else {
// printf("CA7 : Error sending to logchannel, err=%d\n", res);
// }
// }
// else {
// printf("CA7 : Error opening logchannel, err=%d\n", res);
// }
// return (res >=0);
// }
/**
* read1 = copro_readTtyRpmsg(1, 512, mRxTraceBuffer);
mRxTraceBuffer[read1] = 0; // to be sure to get a end of string
if (read1 > 0) {
if (strcmp(mRxTraceBuffer, "CM4 : DMA TransferError") == 0) {
// sampling is aborted, refresh the UI
mErrorDetected = 1;
//mMachineState = STATE_READY;
//gdk_threads_add_idle (refreshUI_CB, window);
}
gettimeofday(&tval_after, NULL);
timersub(&tval_after, &tval_before, &tval_result);
if (mRxTraceBuffer[0] == 'C') {
printf("[%ld.%06ld] : %s\n",
(long int)tval_result.tv_sec, (long int)tval_result.tv_usec,
mRxTraceBuffer);
} else {
printf("[%ld.%06ld] : CA7 : tty1 got %d [%x] bytes\n",
(long int)tval_result.tv_sec, (long int)tval_result.tv_usec,
read1, mRxTraceBuffer[0]);
}
}
*/
// std::string RTSCoproHelper::Copro_readLogChannel(){
// char mRxTraceBuffer[513];
// int res = this->Copro_readTtyRpmsg(LOGCHANNEL, 512, mRxTraceBuffer);
// struct timeval tval_before, tval_after, tval_result;
// gettimeofday(&tval_after, NULL);
// timersub(&tval_after, &tval_before, &tval_result);
// if (res > 0 ){
// mRxTraceBuffer[res] = 0;
// printf("CA7 : Success receiving data to Logchannel, err=%d\n", res);
// printf("[%ld.%06ld] : %s\n",(long int)tval_result.tv_sec, (long int)tval_result.tv_usec, mRxTraceBuffer);
// return std::string(mRxTraceBuffer);
// }
// const char* errMsg = "noResult";
// printf("CA7 : Error sending to logchannel, err=%d\n", res);
// return std::string("Error no Result");
// }
/********************************************************************************
Copro functions allowing to manage a virtual TTY over RPMSG
*********************************************************************************/
int RTSCoproHelper::Copro_isFwRunning(void)
{
int fd;
size_t byte_read;
bool result = 0;
unsigned char bufRead[MAX_BUF];
// char *user = getenv("USER");
// if (user && strncmp(user, "root", 4)) {
// system("XTERM=xterm su root -c 'cat /sys/class/remoteproc/remoteproc0/state' > /tmp/remoteproc0_state");
// fd = open("/tmp/remoteproc0_state", O_RDONLY);
// } else {
fd = open("/sys/class/remoteproc/remoteproc0/state", O_RDONLY);
// }
if (fd < 0) {
printf("CA7 : Error opening remoteproc0/state, err=-%d\n", errno);
return (errno * -1);
}
byte_read = (size_t) read (fd, bufRead, MAX_BUF);
if (byte_read >= strlen("running")) {
char* pos = strstr((char*)bufRead, "running");
if(pos) {
result = 1;
}
}
close(fd);
return result;
}
int RTSCoproHelper::Copro_stopFw(void)
{
int fd;
// char *user = getenv("USER");
// if (user && strncmp(user, "root",4)) {
// system("su root -c 'echo stop > /sys/class/remoteproc/remoteproc0/state'");
// return 0;
// }
fd = open("/sys/class/remoteproc/remoteproc0/state", O_RDWR);
if (fd < 0) {
printf("CA7 : Error opening remoteproc0/state, err=-%d\n", errno);
return (errno * -1);
}
write(fd, "stop", strlen("stop"));
close(fd);
return 0;
}
int RTSCoproHelper::Copro_startFw(void)
{
int fd;
// char *user = getenv("USER");
// if (user && strncmp(user, "root",4)) {
// system("su root -c 'echo start > /sys/class/remoteproc/remoteproc0/state'");
// return 0;
// }
fd = open("/sys/class/remoteproc/remoteproc0/state", O_RDWR);
if (fd < 0) {
printf("CA7 : Error opening remoteproc0/state, err=-%d\n", errno);
return (errno * -1);
}
write(fd, "start", strlen("start"));
close(fd);
return 0;
}
int RTSCoproHelper::Copro_getFwPath(char* pathStr)
{
int fd;
int byte_read;
// char *user = getenv("USER");
// if (user && strncmp(user, "root",4)) {
// system("XTERM=xterm su root -c 'cat /sys/module/firmware_class/parameters/path' > /tmp/parameters_path");
// fd = open("/tmp/parameters_path", O_RDONLY);
// } else {
fd = open("/sys/module/firmware_class/parameters/path", O_RDONLY);
// }
if (fd < 0) {
printf("CA7 : Error opening firmware_class/parameters/path, err=-%d\n", errno);
return (errno * -1);
}
byte_read = read (fd, pathStr, MAX_BUF);
close(fd);
return byte_read;
}
int RTSCoproHelper::Copro_setFwPath(const char* pathStr)
{
int fd;
int result = 0;
// char *user = getenv("USER");
// if (user && strncmp(user, "root",4)) {
// char cmd[1024];
// snprintf(cmd, 1024, "echo %s > /sys/module/firmware_class/parameters/path", pathStr);
// //snprintf(cmd, 1024, "su root -c 'echo %s > /sys/module/firmware_class/parameters/path'", pathStr);
// system(cmd);
// return strlen(pathStr);
// }
fd = open("/sys/module/firmware_class/parameters/path", O_RDWR);
if (fd < 0) {
printf("CA7 : Error opening firmware_class/parameters/path, err=-%d\n", errno);
return (errno * -1);
}
result = write(fd, pathStr, strlen(pathStr));
close(fd);
return result;
}
int RTSCoproHelper::Copro_getFwName(char* pathStr)
{
int fd;
int byte_read;
// char *user = getenv("USER");
// if (user && strncmp(user, "root",4)) {
// system("XTERM=xterm su root -c 'cat /sys/class/remoteproc/remoteproc0/firmware' > /tmp/remoteproc0_firmware");
// fd = open("/tmp/remoteproc0_firmware", O_RDONLY);
// } else {
fd = open("/sys/class/remoteproc/remoteproc0/firmware", O_RDWR);
// }
if (fd < 0) {
printf("CA7 : Error opening remoteproc0/firmware, err=-%d\n", errno);
return (errno * -1);
}
byte_read = read (fd, pathStr, MAX_BUF);
close(fd);
return byte_read;
}
int RTSCoproHelper::Copro_setFwName(const char* nameStr)
{
int fd;
int result = 0;
// char *user = getenv("USER");
// if (user && strncmp(user, "root",4)) {
// char cmd[1024];
// snprintf(cmd, 1024, "su root -c 'echo %s > /sys/class/remoteproc/remoteproc0/firmware'", nameStr);
// system(cmd);
// return strlen(nameStr);
// }
fd = open("/sys/class/remoteproc/remoteproc0/firmware", O_RDWR);
if (fd < 0) {
printf("CA7 : Error opening remoteproc0/firmware, err=-%d\n", errno);
return (errno * -1);
}
result = write(fd, nameStr, strlen(nameStr));
close(fd);
return result;
}
int RTSCoproHelper::Copro_openTtyRpmsg(int ttyNb, [[maybe_unused]]int modeRaw)
{
//struct termios tiorpmsg;
char devName[50];
sprintf(devName, "/dev/ttyRPMSG%d", ttyNb%2);
mFdRpmsg[ttyNb%2] = open(devName, O_RDWR | O_NOCTTY | O_NONBLOCK);
// mFdRpmsg[ttyNb%2] = open("rpmsg-client-sample", O_RDWR | O_NOCTTY | O_NONBLOCK);
if (mFdRpmsg[ttyNb%2] < 0) {
printf("CA7 : Error opening ttyRPMSG%d, err=-%d\n", ttyNb%2, errno);
return (errno * -1);
}
printf("CA7 : Success opening ttyRPMSG%d \n", ttyNb%2);
// #if 1
// /* get current port settings */
// tcgetattr(mFdRpmsg[ttyNb%2],&tiorpmsg);
// if (modeRaw) {
// #if 0
// tiorpmsg.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
// | INLCR | IGNCR | ICRNL | IXON);
// tiorpmsg.c_oflag &= ~OPOST;
// tiorpmsg.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
// tiorpmsg.c_cflag &= ~(CSIZE | PARENB);
// tiorpmsg.c_cflag |= CS8;
// #else
// memset(&tiorpmsg, 0, sizeof(tiorpmsg));
// tiorpmsg.c_cflag = TTY_CTRL_OPTS;
// tiorpmsg.c_iflag = TTY_INPUT_OPTS;
// tiorpmsg.c_oflag = TTY_OUTPUT_OPTS;
// tiorpmsg.c_lflag = TTY_LOCAL_OPTS;
// tiorpmsg.c_cc[VTIME] = 0;
// tiorpmsg.c_cc[VMIN] = 1;
// cfmakeraw(&tiorpmsg);
// #endif
// } else {
// /* ECHO off, other bits unchanged */
// tiorpmsg.c_lflag &= ~ECHO;
// /*do not convert LF to CR LF */
// tiorpmsg.c_oflag &= ~ONLCR;
// }
// if (tcsetattr(mFdRpmsg[ttyNb%2], TCSANOW, &tiorpmsg) < 0) {
// printf("Error %d in copro_openTtyRpmsg(%d) tcsetattr\n", errno, ttyNb);
// return (errno * -1);
// }
// #endif
return 0;
}
int RTSCoproHelper::Copro_closeTtyRpmsg(int ttyNb)
{
close(mFdRpmsg[ttyNb%2]);
mFdRpmsg[ttyNb%2] = -1;
return 0;
}
int RTSCoproHelper::Copro_writeTtyRpmsg(int ttyNb, int len, char* pData)
{
int result = 0;
if (mFdRpmsg[ttyNb%2] < 0) {
printf("CA7 : Error writing ttyRPMSG%d, fileDescriptor is not set\n", ttyNb%2);
return mFdRpmsg[ttyNb%2];
}
result = write(mFdRpmsg[ttyNb%2], pData, len);
if (result >= 0) {
printf("CA7 : Succes writing ttyRPMSG%d, result=%d\n", ttyNb%2, result);
}
else {
printf("CA7 : Error writing ttyRPMSG%d, err=-%d\n", ttyNb%2, result);
}
return result;
}
int RTSCoproHelper::Copro_readTtyRpmsg(int ttyNb, int len, char* pData)
{
int byte_rd, byte_avail;
int result = 0;
if (mFdRpmsg[ttyNb%2] < 0) {
printf("CA7 : Error reading ttyRPMSG%d, fileDescriptor is not set\n", ttyNb%2);
return mFdRpmsg[ttyNb%2];
}
ioctl(mFdRpmsg[ttyNb%2], FIONREAD, &byte_avail);
if (byte_avail > 0) {
if (byte_avail >= len) {
byte_rd = read (mFdRpmsg[ttyNb%2], pData, len);
} else {
byte_rd = read (mFdRpmsg[ttyNb%2], pData, byte_avail);
}
//printf("CA7 : read successfully %d bytes to %p, [0]=0x%x\n", byte_rd, pData, pData[0]);
result = byte_rd;
} else {
result = 0;
}
return result;
}
/********************************************************************************
End of Copro functions
*********************************************************************************/
@@ -0,0 +1,36 @@
/**
*
*/
#include <RTSPyLogging.h>
#include <GILLock.h>
//RTSPyLogging::RTSPyLogging(PyObject* pPyLogging): mplogging(pPyLogging)
RTSPyLogging::RTSPyLogging()
{}
RTSPyLogging::~RTSPyLogging()
{}
void RTSPyLogging::log(std::string msg, PyObject* f){
// GIL state handler
PyLockGIL gstate;
// Python callback
call_method<void>(f, "log", msg);
// GIL handler release
}
std::string RTSPyLogging::format(const std::string fmt_str, ...)
{
va_list ap;
char *fp = NULL;
va_start(ap, fmt_str);
vasprintf(&fp, fmt_str.c_str(), ap);
va_end(ap);
std::unique_ptr<char[]> formatted(fp);
return std::string(formatted.get());
}
@@ -0,0 +1,16 @@
#include <RelGILLock.h>
//Use this class in a c++ funktion that is called from python : python => c++
PyRelinquishGIL::PyRelinquishGIL()
: m_thread_state(PyEval_SaveThread()) {
}
PyRelinquishGIL::~PyRelinquishGIL() {
PyEval_RestoreThread(m_thread_state);
m_thread_state= NULL;
}
@@ -0,0 +1,451 @@
var B3=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var PNe=B3((Ia,Oa)=>{function H3(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const i=Object.getOwnPropertyDescriptor(r,o);i&&Object.defineProperty(e,o,i.get?i:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Bo(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var BT={exports:{}},$v={},HT={exports:{}},ht={};/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Op=Symbol.for("react.element"),U3=Symbol.for("react.portal"),V3=Symbol.for("react.fragment"),W3=Symbol.for("react.strict_mode"),G3=Symbol.for("react.profiler"),q3=Symbol.for("react.provider"),K3=Symbol.for("react.context"),Q3=Symbol.for("react.forward_ref"),Y3=Symbol.for("react.suspense"),X3=Symbol.for("react.memo"),Z3=Symbol.for("react.lazy"),Ak=Symbol.iterator;function J3(e){return e===null||typeof e!="object"?null:(e=Ak&&e[Ak]||e["@@iterator"],typeof e=="function"?e:null)}var UT={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},VT=Object.assign,WT={};function ed(e,t,n){this.props=e,this.context=t,this.refs=WT,this.updater=n||UT}ed.prototype.isReactComponent={};ed.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ed.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function GT(){}GT.prototype=ed.prototype;function pC(e,t,n){this.props=e,this.context=t,this.refs=WT,this.updater=n||UT}var mC=pC.prototype=new GT;mC.constructor=pC;VT(mC,ed.prototype);mC.isPureReactComponent=!0;var Lk=Array.isArray,qT=Object.prototype.hasOwnProperty,hC={current:null},KT={key:!0,ref:!0,__self:!0,__source:!0};function QT(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)qT.call(t,r)&&!KT.hasOwnProperty(r)&&(o[r]=t[r]);var l=arguments.length-2;if(l===1)o.children=n;else if(1<l){for(var s=Array(l),u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)o[r]===void 0&&(o[r]=l[r]);return{$$typeof:Op,type:e,key:i,ref:a,props:o,_owner:hC.current}}function eB(e,t){return{$$typeof:Op,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gC(e){return typeof e=="object"&&e!==null&&e.$$typeof===Op}function tB(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Dk=/\/+/g;function G0(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tB(""+e.key):t.toString(36)}function Mh(e,t,n,r,o){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Op:case U3:a=!0}}if(a)return a=e,o=o(a),e=r===""?"."+G0(a,0):r,Lk(o)?(n="",e!=null&&(n=e.replace(Dk,"$&/")+"/"),Mh(o,t,n,"",function(u){return u})):o!=null&&(gC(o)&&(o=eB(o,n+(!o.key||a&&a.key===o.key?"":(""+o.key).replace(Dk,"$&/")+"/")+e)),t.push(o)),1;if(a=0,r=r===""?".":r+":",Lk(e))for(var l=0;l<e.length;l++){i=e[l];var s=r+G0(i,l);a+=Mh(i,t,n,s,o)}else if(s=J3(e),typeof s=="function")for(e=s.call(e),l=0;!(i=e.next()).done;)i=i.value,s=r+G0(i,l++),a+=Mh(i,t,n,s,o);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function Im(e,t,n){if(e==null)return e;var r=[],o=0;return Mh(e,r,"","",function(i){return t.call(n,i,o++)}),r}function nB(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Pr={current:null},Rh={transition:null},rB={ReactCurrentDispatcher:Pr,ReactCurrentBatchConfig:Rh,ReactCurrentOwner:hC};ht.Children={map:Im,forEach:function(e,t,n){Im(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Im(e,function(){t++}),t},toArray:function(e){return Im(e,function(t){return t})||[]},only:function(e){if(!gC(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ht.Component=ed;ht.Fragment=V3;ht.Profiler=G3;ht.PureComponent=pC;ht.StrictMode=W3;ht.Suspense=Y3;ht.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rB;ht.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=VT({},e.props),o=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=hC.current),t.key!==void 0&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(s in t)qT.call(t,s)&&!KT.hasOwnProperty(s)&&(r[s]=t[s]===void 0&&l!==void 0?l[s]:t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){l=Array(s);for(var u=0;u<s;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:Op,type:e.type,key:o,ref:i,props:r,_owner:a}};ht.createContext=function(e){return e={$$typeof:K3,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:q3,_conLine truncated
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var oB=v,iB=Symbol.for("react.element"),aB=Symbol.for("react.fragment"),lB=Object.prototype.hasOwnProperty,sB=oB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uB={key:!0,ref:!0,__self:!0,__source:!0};function YT(e,t,n){var r,o={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)lB.call(t,r)&&!uB.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:iB,type:e,key:i,ref:a,props:o,_owner:sB.current}}$v.Fragment=aB;$v.jsx=YT;$v.jsxs=YT;BT.exports=$v;var z=BT.exports,XT={exports:{}},so={},ZT={exports:{}},JT={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(e){function t(L,j){var B=L.length;L.push(j);e:for(;0<B;){var A=B-1>>>1,H=L[A];if(0<o(H,j))L[A]=j,L[B]=H,B=A;else break e}}function n(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var j=L[0],B=L.pop();if(B!==j){L[0]=B;e:for(var A=0,H=L.length,q=H>>>1;A<q;){var V=2*(A+1)-1,G=L[V],Y=V+1,re=L[Y];if(0>o(G,B))Y<H&&0>o(re,G)?(L[A]=re,L[Y]=B,A=Y):(L[A]=G,L[V]=B,A=V);else if(Y<H&&0>o(re,B))L[A]=re,L[Y]=B,A=Y;else break e}}return j}function o(L,j){var B=L.sortIndex-j.sortIndex;return B!==0?B:L.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var s=[],u=[],c=1,d=null,f=3,m=!1,p=!1,h=!1,y=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(L){for(var j=n(u);j!==null;){if(j.callback===null)r(u);else if(j.startTime<=L)r(u),j.sortIndex=j.expirationTime,t(s,j);else break;j=n(u)}}function w(L){if(h=!1,x(L),!p)if(n(s)!==null)p=!0,N(P);else{var j=n(u);j!==null&&k(w,j.startTime-L)}}function P(L,j){p=!1,h&&(h=!1,b(S),S=-1),m=!0;var B=f;try{for(x(j),d=n(s);d!==null&&(!(d.expirationTime>j)||L&&!M());){var A=d.callback;if(typeof A=="function"){d.callback=null,f=d.priorityLevel;var H=A(d.expirationTime<=j);j=e.unstable_now(),typeof H=="function"?d.callback=H:d===n(s)&&r(s),x(j)}else r(s);d=n(s)}if(d!==null)var q=!0;else{var V=n(u);V!==null&&k(w,V.startTime-j),q=!1}return q}finally{d=null,f=B,m=!1}}var C=!1,E=null,S=-1,R=5,I=-1;function M(){return!(e.unstable_now()-I<R)}function _(){if(E!==null){var L=e.unstable_now();I=L;var j=!0;try{j=E(!0,L)}finally{j?D():(C=!1,E=null)}}else C=!1}var D;if(typeof g=="function")D=function(){g(_)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,F=T.port2;T.port1.onmessage=_,D=function(){F.postMessage(null)}}else D=function(){y(_,0)};function N(L){E=L,C||(C=!0,D())}function k(L,j){S=y(function(){L(e.unstable_now())},j)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(L){L.callback=null},e.unstable_continueExecution=function(){p||m||(p=!0,N(P))},e.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<L?Math.floor(1e3/L):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(L){switch(f){case 1:case 2:case 3:var j=3;break;default:j=f}var B=f;f=j;try{return L()}finally{f=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(L,j){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var B=f;f=L;try{return j()}finally{f=B}},e.unstable_scheduleCallback=function(L,j,B){var A=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?A+B:A):B=A,L){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=B+H,L={id:c++,callback:j,priorityLevel:L,startTime:B,expirationTime:H,sortIndex:-1},B>A?(L.sortIndex=B,t(u,L),n(s)===null&&L===n(u)&&(h?(b(S),S=-1):h=!0,k(w,B-A))):(L.sortIndex=H,t(s,L),p||m||(p=!0,N(P))),L},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(L){var j=f;return function(){var B=f;f=j;try{return L.apply(this,arguments)}finally{f=B}}}})(JT);ZT.exports=JT;var cB=ZT.exports;/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var e_=v,io=cB;function Me(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var t_=new Set,Bf={};function cu(e,t){Ic(e,t),Ic(e+"Capture",t)}function Ic(e,t){for(Bf[e]=t,e=0;e<t.length;e++)t_.add(t[e])}var Aa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Z1=Object.prototype.hasOwnProperty,dB=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nk={},zk={};function fB(e){return Z1.call(zk,e)?!0:Z1.call(Nk,e)?!1:dB.test(e)?zk[e]=!0:(Nk[e]=!0,!1)}function pB(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mB(e,t,n,r){if(t===null||typeof t>"u"||pB(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function kr(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var nr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nr[e]=new kr(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nr[t]=new kr(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nr[e]=new kr(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nr[e]=new kr(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){nr[e]=new kr(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nr[e]=new kr(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nr[e]=new kr(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nr[e]=new kr(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nr[e]=new kr(e,5,!1,e.toLowerCase(),null,!1,!1)});var vC=/[\-:]([a-z])/g;function yC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(vC,yC);nr[t]=new kr(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(vC,yC);nr[t]=new kr(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(vC,yC);nr[t]=new kr(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nr[e]=new kr(e,1,!1,e.toLowerCase(),null,!1,!1)});nr.xlinkHref=new kr("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nr[e]=new kr(e,1,!1,e.toLowerCase(),null,!0,!0)});function bC(e,t,n,r){var o=nr.hasOwnProperty(t)?nr[t]:null;(o!==null?o.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!== Line truncated
`+q0+e}var K0=!1;function Q0(e,t){if(!e||K0)return"";K0=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var o=u.stack.split(`
`),i=r.stack.split(`
`),a=o.length-1,l=i.length-1;1<=a&&0<=l&&o[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(o[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||o[a]!==i[l]){var s=`
`+o[a].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=a&&0<=l);break}}}finally{K0=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?lf(e):""}function hB(e){switch(e.tag){case 5:return lf(e.type);case 16:return lf("Lazy");case 13:return lf("Suspense");case 19:return lf("SuspenseList");case 0:case 2:case 15:return e=Q0(e.type,!1),e;case 11:return e=Q0(e.type.render,!1),e;case 1:return e=Q0(e.type,!0),e;default:return""}}function nx(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Zu:return"Fragment";case Xu:return"Portal";case J1:return"Profiler";case xC:return"StrictMode";case ex:return"Suspense";case tx:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case r_:return(e.displayName||"Context")+".Consumer";case n_:return(e._context.displayName||"Context")+".Provider";case wC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case CC:return t=e.displayName||null,t!==null?t:nx(e.type)||"Memo";case hl:t=e._payload,e=e._init;try{return nx(e(t))}catch{}}return null}function gB(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return nx(t);case 8:return t===xC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ql(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function i_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vB(e){var t=i_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mm(e){e._valueTracker||(e._valueTracker=vB(e))}function a_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=i_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function rx(e,t){var n=t.checked;return sn({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Bk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ql(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function l_(e,t){t=t.checked,t!=null&&bC(e,"checked",t,!1)}function ox(e,t){l_(e,t);var n=ql(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ix(e,t.type,n):t.hasOwnProperty("defaultValue")&&ix(e,t.type,ql(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Hk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ix(e,t,n){(t!=="number"||dg(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var sf=Array.isArray;function pc(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ql(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,r&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ax(e,t){if(t.dan Line truncated
`).replace($H,"")}function Nm(e,t,n){if(t=d$(t),d$(e)!==t&&n)throw Error(Me(425))}function bg(){}var bx=null,xx=null;function wx(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Cx=typeof setTimeout=="function"?setTimeout:void 0,IH=typeof clearTimeout=="function"?clearTimeout:void 0,f$=typeof Promise=="function"?Promise:void 0,OH=typeof queueMicrotask=="function"?queueMicrotask:typeof f$<"u"?function(e){return f$.resolve(null).then(e).catch(MH)}:Cx;function MH(e){setTimeout(function(){throw e})}function sb(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(r===0){e.removeChild(o),Gf(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=o}while(n);Gf(t)}function Dl(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function p$(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var nd=Math.random().toString(36).slice(2),_i="__reactFiber$"+nd,Xf="__reactProps$"+nd,La="__reactContainer$"+nd,Sx="__reactEvents$"+nd,RH="__reactListeners$"+nd,TH="__reactHandles$"+nd;function $s(e){var t=e[_i];if(t)return t;for(var n=e.parentNode;n;){if(t=n[La]||n[_i]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=p$(e);e!==null;){if(n=e[_i])return n;e=p$(e)}return t}e=n,n=e.parentNode}return null}function Tp(e){return e=e[_i]||e[La],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function nc(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Me(33))}function Tv(e){return e[Xf]||null}var Ex=[],rc=-1;function es(e){return{current:e}}function Xt(e){0>rc||(e.current=Ex[rc],Ex[rc]=null,rc--)}function Ht(e,t){rc++,Ex[rc]=e.current,e.current=t}var Kl={},cr=es(Kl),_r=es(!1),Gs=Kl;function Oc(e,t){var n=e.type.contextTypes;if(!n)return Kl;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Fr(e){return e=e.childContextTypes,e!=null}function xg(){Xt(_r),Xt(cr)}function m$(e,t,n){if(cr.current!==Kl)throw Error(Me(168));Ht(cr,t),Ht(_r,n)}function Q_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(Me(108,gB(e)||"Unknown",o));return sn({},n,r)}function wg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Kl,Gs=cr.current,Ht(cr,e),Ht(_r,_r.current),!0}function h$(e,t,n){var r=e.stateNode;if(!r)throw Error(Me(169));n?(e=Q_(e,t,Gs),r.__reactInternalMemoizedMergedChildContext=e,Xt(_r),Xt(cr),Ht(cr,e)):Xt(_r),Ht(_r,n)}var wa=null,_v=!1,ub=!1;function Y_(e){wa===null?wa=[e]:wa.push(e)}function _H(e){_v=!0,Y_(e)}function ts(){if(!ub&&wa!==null){ub=!0;var e=0,t=Tt;try{var n=wa;for(Tt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}wa=null,_v=!1}catch(o){throw wa!==null&&(wa=wa.slice(e+1)),w_(EC,ts),o}finally{Tt=t,ub=!1}}return null}var oc=[],ic=0,Cg=null,Sg=0,ko=[],$o=0,qs=null,Ea=1,Pa="";function vs(e,t){oc[ic++]=Sg,oc[ic++]=Cg,Cg=e,Sg=t}function X_(e,t,n){ko[$o++]=Ea,ko[$o++]=Pa,ko[$o++]=qs,qs=e;var r=Ea;e=Pa;var o=32-ci(r)-1;r&=~(1<<o),n+=1;var i=32-ci(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Ea=1<<32-ci(t)+o|n<<o|r,Pa=i+e}else Ea=1<<i|n<<o|r,Pa=e}function _C(e){e.return!==null&&(vs(e,1),X_(e,1,0))}function FC(e){for(;e===Cg;)Cg=oc[--ic],oc[ic]=null,Sg=oc[--ic],oc[ic]=null;for(;e===qs;)qs=ko[--$o],ko[$o]=null,Pa=ko[--$o],ko[$o]=null,Ea=ko[--$o],ko[$o]=null}var ro=null,no=null,nn=!1,ai=null;function Z_(e,t){var n=Oo(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function g$(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ro=e,no=Dl(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ro=e,no=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=qs!==null?{id:Ea,overflow:Pa}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Oo(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ro=e,no=null,!0):!1;default:return!1}}function Px(e){return(e.mode&1)!==0&&(e.flags&128)===0}function kx(e){if(nn){var t=no;if(t){var n=t;if(!g$(e,t)){if(Px(e))throw Error(Me(418));t=Dl(n.nextSibling);var r=ro;t&&g$(e,t)?Z_(r,n):(e.flags=e.flags&-4097|2,nn=!1,ro=e)}}else{if(Px(e))throw Error(Me(418));e.flags=e.flags&-4097|2,nn=!1,ro=e}}}function v$(e){ Line truncated
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:o,digest:null}}function mb(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Mx(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var HH=typeof WeakMap=="function"?WeakMap:Map;function kF(e,t,n){n=Ma(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Rg||(Rg=!0,jx=r),Mx(e,t)},n}function $F(e,t,n){n=Ma(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){Mx(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Mx(e,t),typeof r!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function P$(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new HH;var o=new Set;r.set(t,o)}else o=r.get(t),o===void 0&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=n6.bind(null,e,t,n),t.then(e,e))}function k$(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $$(e,t,n,r,o){return e.mode&1?(e.flags|=65536,e.lanes=o,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ma(-1,1),t.tag=2,Nl(n,t,1))),n.lanes|=1),e)}var UH=Wa.ReactCurrentOwner,Tr=!1;function vr(e,t,n,r){t.child=e===null?iF(t,null,n,r):Rc(t,e.child,n,r)}function I$(e,t,n,r,o){n=n.render;var i=t.ref;return vc(t,o),r=WC(e,t,n,r,i,o),n=GC(),e!==null&&!Tr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Na(e,t,o)):(nn&&n&&_C(t),t.flags|=1,vr(e,t,r,o),t.child)}function O$(e,t,n,r,o){if(e===null){var i=n.type;return typeof i=="function"&&!nS(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,IF(e,t,i,r,o)):(e=Bh(n.type,null,r,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&o)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kf,n(a,r)&&e.ref===t.ref)return Na(e,t,o)}return t.flags|=1,e=Bl(i,r),e.ref=t.ref,e.return=t,t.child=e}function IF(e,t,n,r,o){if(e!==null){var i=e.memoizedProps;if(Kf(i,r)&&e.ref===t.ref)if(Tr=!1,t.pendingProps=r=i,(e.lanes&o)!==0)e.flags&131072&&(Tr=!0);else return t.lanes=e.lanes,Na(e,t,o)}return Rx(e,t,n,r,o)}function OF(e,t,n){var r=t.pendingProps,o=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ht(sc,Yr),Yr|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ht(sc,Yr),Yr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Ht(sc,Yr),Yr|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Ht(sc,Yr),Yr|=r;return vr(e,t,o,n),t.child}function MF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Rx(e,t,n,r,o){var i=Fr(n)?Gs:cr.current;return i=Oc(t,i),vc(t,o),n=WC(e,t,n,r,i,o),r=GC(),e!==null&&!Tr?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Na(e,t,o)):(nn&&r&&_C(t),t.flags|=1,vr(e,t,n,o),t.child)}function M$(e,t,n,r,o){if(Fr(n)){var i=!0;wg(t)}else i=!1;if(vc(t,o),t.stateNode===null)Nh(e,t),rF(t,n,r),Ox(t,n,r,o),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var s=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=Ao(u):(u=Fr(n)?Gs:cr.current,u=Oc(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||s!==u)&&w$(t,a,r,u),gl=!1;var f=t.memoizedState;a.state=f,kg(t,r,a,o),s=t.memoizedState,l!==r||f!==s||_r.current||gl?(typeof c=="function"&&(Ix(t,n,c,r),s=t.memoizedState),(l=gl||x$(t,n,l,r,f,s,u))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=u,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,tF(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:ti(t.type,l),a.props=u,d=t.pendingProps,f=a.context,s=n.contextType,typeof s=="object"&&s!==null?s=Ao(s):(s=Fr(n)?Gs:cr.current,s=Oc(t,s));var m=n.getDerivedStateFromProps;(c=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==d||f!==s)&&w$(t,a,r,s),gl=!1,f=t.memoizedState,a.state=f,kg(t,r,a,o);var p=t.memoizedS Line truncated
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ac=v;function R6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var T6=typeof Object.is=="function"?Object.is:R6,_6=Ac.useState,F6=Ac.useEffect,A6=Ac.useLayoutEffect,L6=Ac.useDebugValue;function D6(e,t){var n=t(),r=_6({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return A6(function(){o.value=n,o.getSnapshot=t,yb(o)&&i({inst:o})},[e,n,t]),F6(function(){return yb(o)&&i({inst:o}),e(function(){yb(o)&&i({inst:o})})},[e]),L6(n),n}function yb(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!T6(e,n)}catch{return!0}}function N6(e,t){return t()}var z6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?N6:D6;fA.useSyncExternalStore=Ac.useSyncExternalStore!==void 0?Ac.useSyncExternalStore:z6;dA.exports=fA;var j6=dA.exports;const pA=j6.useSyncExternalStore,J$=v.createContext(void 0),mA=v.createContext(!1);function hA(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=J$),window.ReactQueryClientContext):J$)}const Zi=({context:e}={})=>{const t=v.useContext(hA(e,v.useContext(mA)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},B6=({client:e,children:t,context:n,contextSharing:r=!1})=>{v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=hA(n,r);return v.createElement(mA.Provider,{value:!n&&r},v.createElement(o.Provider,{value:e},t))},gA=v.createContext(!1),H6=()=>v.useContext(gA);gA.Provider;function U6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const V6=v.createContext(U6()),W6=()=>v.useContext(V6);function vA(e,t){return typeof e=="function"?e(...t):!!e}const G6=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},q6=e=>{v.useEffect(()=>{e.clearReset()},[e])},K6=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&vA(n,[e.error,r]),Q6=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Y6=(e,t)=>e.isLoading&&e.isFetching&&!t,X6=(e,t,n)=>(e==null?void 0:e.suspense)&&Y6(t,n),Z6=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function yA(e,t){const n=Zi({context:e.context}),r=H6(),o=W6(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=pn.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=pn.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=pn.batchCalls(i.onSettled)),Q6(i),G6(i,o),q6(o);const[a]=v.useState(()=>new t(n,i)),l=a.getOptimisticResult(i);if(pA(v.useCallback(s=>{const u=r?()=>{}:a.subscribe(pn.batchCalls(s));return a.updateResult(),u},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),v.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),X6(i,l,r))throw Z6(i,a,o);if(K6({result:l,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw l.error;return i.notifyOnChangeProps?l:a.trackResult(l)}function Do(e,t,n){const r=uc(e,t,n);return yA(r,cA)}function bn(e,t,n){const r=m6(e,t,n),o=Zi({context:r.context}),[i]=v.useState(()=>new M6(o,r));v.useEffect(()=>{i.setOptions(r)},[i,r]);const a=pA(v.useCallback(s=>i.subscribe(pn.batchCalls(s)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=v.useCallback((s,u)=>{i.mutate(s,u).catch(J6)},[i]);if(a.error&&vA(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}function J6(){}function eU(e,t,n){const r=uc(e,t,n);return yA(r,O6)}var tU={exports:{}},bb={exports:{}},eI;function nU(){return eI||(eI=1,function(e,t){(function(n,r){e.exports=r()})(we,function(){function n(h){return!isNaN(parseFloat(h))&&isFinite(h)}function r(h){return h.charAt(0).toUpperCase()+h.substring(1)}function o(h){return function(){return this[h]}}var i=["isConstructor","isEval","isNative","isToplevel"],a=["columnNumber","lineNumber"],l=["fileName","functionName","source"],s=["args"],u=["evalOrigin"],c=i.concat(a,l,s,u);function d(h){if(h)for(var y=0;y<c.length;y++)h[c[y]]!==void 0&&this["set"+r(c[y])](h[c[y]])}d.prototype={getArgs:function(){return this.args},setArgs:function(h){if(Object.prototype.toString.call(h)!=="[object Array]")throw new TypeError("Args must be an Array");this.args=h},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(h){if(h instanceof d)this.evalOrigin=h;else if(h instanceof Object)this.evalOrigin=new d(h);else throw new TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){var h=this.getFileName()||"",y=this.getLineNumber()||"",b=this.getColumnNumber()||"",g=this.getFunctionName()||"";return this.getIsEval()?h?"[eval] ("+h+":"+y+":"+b+")":"[eval]:"+y+":"+b:g?g+" ("+h+":"+y+":"+b+")":h+":"+y+":"+b}},d.fromString=function(y){var b=y.indexOf("("),g=y.lastIndexOf(")"),x=y.substring(0,b),w=y.substring(b+1,g).split(","),P=y.substring(g+1);if(P.indexOf("@")===0)vaLine truncated
`).filter(function(c){return!!c.match(i)},this);return u.map(function(c){c.indexOf("(eval ")>-1&&(c=c.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var d=c.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),f=d.match(/ (\(.+\)$)/);d=f?d.replace(f[0],""):d;var m=this.extractLocation(f?f[1]:d),p=f&&d||void 0,h=["eval","<anonymous>"].indexOf(m[0])>-1?void 0:m[0];return new r({functionName:p,fileName:h,lineNumber:m[1],columnNumber:m[2],source:c})},this)},parseFFOrSafari:function(s){var u=s.stack.split(`
`).filter(function(c){return!c.match(a)},this);return u.map(function(c){if(c.indexOf(" > eval")>-1&&(c=c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),c.indexOf("@")===-1&&c.indexOf(":")===-1)return new r({functionName:c});var d=/((.*".+"[^@]*)?[^@]*)(?:@)/,f=c.match(d),m=f&&f[1]?f[1]:void 0,p=this.extractLocation(c.replace(d,""));return new r({functionName:m,fileName:p[0],lineNumber:p[1],columnNumber:p[2],source:c})},this)},parseOpera:function(s){return!s.stacktrace||s.message.indexOf(`
`)>-1&&s.message.split(`
`).length>s.stacktrace.split(`
`).length?this.parseOpera9(s):s.stack?this.parseOpera11(s):this.parseOpera10(s)},parseOpera9:function(s){for(var u=/Line (\d+).*script (?:in )?(\S+)/i,c=s.message.split(`
`),d=[],f=2,m=c.length;f<m;f+=2){var p=u.exec(c[f]);p&&d.push(new r({fileName:p[2],lineNumber:p[1],source:c[f]}))}return d},parseOpera10:function(s){for(var u=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,c=s.stacktrace.split(`
`),d=[],f=0,m=c.length;f<m;f+=2){var p=u.exec(c[f]);p&&d.push(new r({functionName:p[3]||void 0,fileName:p[2],lineNumber:p[1],source:c[f]}))}return d},parseOpera11:function(s){var u=s.stack.split(`
`).filter(function(c){return!!c.match(o)&&!c.match(/^Error created at/)},this);return u.map(function(c){var d=c.split("@"),f=this.extractLocation(d.pop()),m=d.shift()||"",p=m.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0,h;m.match(/\(([^)]*)\)/)&&(h=m.replace(/^[^(]+\(([^)]*)\)$/,"$1"));var y=h===void 0||h==="[arguments not available]"?void 0:h.split(",");return new r({functionName:p,args:y,fileName:f[0],lineNumber:f[1],columnNumber:f[2],source:c})},this)}}})})(tU);function bt(e,t){return{hookName:"",trace:[],resourcePath:null,legacyKey:!1}}var rU=Error,oU=EvalError,iU=RangeError,aU=ReferenceError,bA=SyntaxError,Ap=TypeError,lU=URIError,sU=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var o=42;t[n]=o;for(n in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,n);if(a.value!==o||a.enumerable!==!0)return!1}return!0},tI=typeof Symbol<"u"&&Symbol,uU=sU,cU=function(){return typeof tI!="function"||typeof Symbol!="function"||typeof tI("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:uU()},xb={__proto__:null,foo:{}},dU=Object,fU=function(){return{__proto__:xb}.foo===xb.foo&&!(xb instanceof dU)},pU="Function.prototype.bind called on incompatible ",mU=Object.prototype.toString,hU=Math.max,gU="[object Function]",nI=function(t,n){for(var r=[],o=0;o<t.length;o+=1)r[o]=t[o];for(var i=0;i<n.length;i+=1)r[i+t.length]=n[i];return r},vU=function(t,n){for(var r=[],o=n||0,i=0;o<t.length;o+=1,i+=1)r[i]=t[o];return r},yU=function(e,t){for(var n="",r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n},bU=function(t){var n=this;if(typeof n!="function"||mU.apply(n)!==gU)throw new TypeError(pU+n);for(var r=vU(arguments,1),o,i=function(){if(this instanceof o){var c=n.apply(this,nI(r,arguments));return Object(c)===c?c:this}return n.apply(t,nI(r,arguments))},a=hU(0,n.length-r.length),l=[],s=0;s<a;s++)l[s]="$"+s;if(o=Function("binder","return function ("+yU(l,",")+"){ return binder.apply(this,arguments); }")(i),n.prototype){var u=function(){};u.prototype=n.prototype,o.prototype=new u,u.prototype=null}return o},xU=bU,cS=Function.prototype.bind||xU,wU=Function.prototype.call,CU=Object.prototype.hasOwnProperty,SU=cS,EU=SU.call(wU,CU),mt,PU=rU,kU=oU,$U=iU,IU=aU,Lc=bA,bc=Ap,OU=lU,xA=Function,wb=function(e){try{return xA('"use strict"; return ('+e+").constructor;")()}catch{}},Ds=Object.getOwnPropertyDescriptor;if(Ds)try{Ds({},"")}catch{Ds=null}var Cb=function(){throw new bc},MU=Ds?function(){try{return arguments.callee,Cb}catch{try{return Ds(arguments,"callee").get}catch{return Cb}}}():Cb,Eu=cU(),RU=fU(),jn=Object.getPrototypeOf||(RU?function(e){return e.__proto__}:null),Wu={},TU=typeof Uint8Array>"u"||!jn?mt:jn(Uint8Array),Ns={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":Eu&&jn?jn([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":Wu,"%AsyncGenerator%":Wu,"%AsyncGeneratorFunction%":Wu,"%AsyncIteratorPrototype%":Wu,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":PU,"%eval%":eval,"%EvalError%":kU,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":xA,"%GeneratorFunction%":Wu,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Eu&&jn?jn(jn([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Eu||!jn?mt:jn(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":$U,"%ReferenceError%":IU,"%Reflect%":typeof Reflect>"u"?mt:Re Line truncated
`)>=0)return!1;return!0}function OV(e,t){var n;if(e.indent===" ")n=" ";else if(typeof e.indent=="number"&&e.indent>0)n=Oi.call(Array(e.indent+1)," ");else return null;return{base:n,prev:Oi.call(Array(t+1),n)}}function tw(e,t){if(e.length===0)return"";var n=`
`+t.prev+t.base;return n+Oi.call(e,","+n)+`
`+t.prev}function Gm(e,t){var n=ew(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=yl(e,o)?t(e[o],e):""}var i=typeof kb=="function"?kb(e):[],a;if(Dc){a={};for(var l=0;l<i.length;l++)a["$"+i[l]]=i[l]}for(var s in e)yl(e,s)&&(n&&String(Number(s))===s&&s<e.length||Dc&&a["$"+s]instanceof Symbol||(kA.call(/[^\w$]/,s)?r.push(t(s,e)+": "+t(e[s],e)):r.push(s+": "+t(e[s],e))));if(typeof kb=="function")for(var u=0;u<i.length;u++)$A.call(e,i[u])&&r.push("["+t(i[u])+"]: "+t(e[i[u]],e));return r}var TA=od,id=ZU,MV=dV,RV=Ap,qm=TA("%WeakMap%",!0),Km=TA("%Map%",!0),TV=id("WeakMap.prototype.get",!0),_V=id("WeakMap.prototype.set",!0),FV=id("WeakMap.prototype.has",!0),AV=id("Map.prototype.get",!0),LV=id("Map.prototype.set",!0),DV=id("Map.prototype.has",!0),hS=function(e,t){for(var n=e,r;(r=n.next)!==null;n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},NV=function(e,t){var n=hS(e,t);return n&&n.value},zV=function(e,t,n){var r=hS(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}},jV=function(e,t){return!!hS(e,t)},BV=function(){var t,n,r,o={assert:function(i){if(!o.has(i))throw new RV("Side channel does not contain "+MV(i))},get:function(i){if(qm&&i&&(typeof i=="object"||typeof i=="function")){if(t)return TV(t,i)}else if(Km){if(n)return AV(n,i)}else if(r)return NV(r,i)},has:function(i){if(qm&&i&&(typeof i=="object"||typeof i=="function")){if(t)return FV(t,i)}else if(Km){if(n)return DV(n,i)}else if(r)return jV(r,i);return!1},set:function(i,a){qm&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new qm),_V(t,i,a)):Km?(n||(n=new Km),LV(n,i,a)):(r||(r={key:{},next:null}),zV(r,i,a))}};return o},HV=String.prototype.replace,UV=/%20/g,Ib={RFC1738:"RFC1738",RFC3986:"RFC3986"},gS={default:Ib.RFC3986,formatters:{RFC1738:function(e){return HV.call(e,UV,"+")},RFC3986:function(e){return String(e)}},RFC1738:Ib.RFC1738,RFC3986:Ib.RFC3986},VV=gS,Ob=Object.prototype.hasOwnProperty,Ss=Array.isArray,Ci=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),WV=function(t){for(;t.length>1;){var n=t.pop(),r=n.obj[n.prop];if(Ss(r)){for(var o=[],i=0;i<r.length;++i)typeof r[i]<"u"&&o.push(r[i]);n.obj[n.prop]=o}}},_A=function(t,n){for(var r=n&&n.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(r[o]=t[o]);return r},GV=function e(t,n,r){if(!n)return t;if(typeof n!="object"){if(Ss(t))t.push(n);else if(t&&typeof t=="object")(r&&(r.plainObjects||r.allowPrototypes)||!Ob.call(Object.prototype,n))&&(t[n]=!0);else return[t,n];return t}if(!t||typeof t!="object")return[t].concat(n);var o=t;return Ss(t)&&!Ss(n)&&(o=_A(t,r)),Ss(t)&&Ss(n)?(n.forEach(function(i,a){if(Ob.call(t,a)){var l=t[a];l&&typeof l=="object"&&i&&typeof i=="object"?t[a]=e(l,i,r):t.push(i)}else t[a]=i}),t):Object.keys(n).reduce(function(i,a){var l=n[a];return Ob.call(i,a)?i[a]=e(i[a],l,r):i[a]=l,i},o)},qV=function(t,n){return Object.keys(n).reduce(function(r,o){return r[o]=n[o],r},t)},KV=function(e,t,n){var r=e.replace(/\+/g," ");if(n==="iso-8859-1")return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch{return r}},QV=function(t,n,r,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),r==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(c){return"%26%23"+parseInt(c.slice(2),16)+"%3B"});for(var l="",s=0;s<a.length;++s){var u=a.charCodeAt(s);if(u===45||u===46||u===95||u===126||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===VV.RFC1738&&(u===40||u===41)){l+=a.charAt(s);continue}if(u<128){l=l+Ci[u];continue}if(u<2048){l=l+(Ci[192|u>>6]+Ci[128|u&63]);continue}if(u<55296||u>=57344){l=l+(Ci[224|u>>12]+Ci[128|u>>6&63]+Ci[128|u&63]);continue}s+=1,u=65536+((u&1023)<<10|a.charCodeAt(s)&1023),l+=Ci[240|u>>18]+Ci[128|u>>12&63]+Ci[128|u>>6&63]+Ci[128|u&63]}return l},YV=function(t){for(var n=[{obj:{o:t},prop:"o"}],r=[],o=0;o<n.length;++o)for(var i=n[o],a=i.obj[i.prop],l=Object.keys(a),s=0;s<l.length;++s){var u=l[s],c=a[u];typeof c=="object"&&c!==null&&r.indexOf(c)===-1&&(n.push({obj:a,prop:u}),r.push(c))}return WV(n),t},XV=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},ZV=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},JV=function(t,n){return[].concat(t,n)},e8=function(t,n){if(Ss(t)){for(var r=[],o=0;o<t.length;o+=1)r.push(n(t[o]));return r}return n(t)},FA={arrayToObject:_A,assign:qV,combine:JV,compact:YV,decode:KV,encode:QV,isBuffer:ZV,isRegExp:XV,maybeMap:e8,merge:GV},AA=BV,Vh=FA,$f=gS,t8=Object.prototype.hasOwnProperty,LA={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,n){return t+"["+n+"]"},repeat:function(t){return t}},Ii=Array.isArray,n8=Array.prototype.push,DA=function(e,t){n8.apply(e,Ii(t)?t:[t])},r8=Date.prototype.toISOString,SI=$f.default,Tn={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&", Line truncated
Papa Parse
v5.4.1
https://github.com/mholt/PapaParse
License: MIT
*/(function(e,t){(function(n,r){e.exports=r()})(we,function n(){var r=typeof self<"u"?self:typeof window<"u"?window:r!==void 0?r:{},o=!r.document&&!!r.postMessage,i=r.IS_PAPA_WORKER||!1,a={},l=0,s={parse:function(S,R){var I=(R=R||{}).dynamicTyping||!1;if(E(I)&&(R.dynamicTypingFunction=I,I={}),R.dynamicTyping=I,R.transform=!!E(R.transform)&&R.transform,R.worker&&s.WORKERS_SUPPORTED){var M=function(){if(!s.WORKERS_SUPPORTED)return!1;var D=(F=r.URL||r.webkitURL||null,N=n.toString(),s.BLOB_URL||(s.BLOB_URL=F.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",N,")();"],{type:"text/javascript"})))),T=new r.Worker(D),F,N;return T.onmessage=g,T.id=l++,a[T.id]=T}();return M.userStep=R.step,M.userChunk=R.chunk,M.userComplete=R.complete,M.userError=R.error,R.step=E(R.step),R.chunk=E(R.chunk),R.complete=E(R.complete),R.error=E(R.error),delete R.worker,void M.postMessage({input:S,config:R,workerId:M.id})}var _=null;return s.NODE_STREAM_INPUT,typeof S=="string"?(S=function(D){return D.charCodeAt(0)===65279?D.slice(1):D}(S),_=R.download?new d(R):new m(R)):S.readable===!0&&E(S.read)&&E(S.on)?_=new p(R):(r.File&&S instanceof File||S instanceof Object)&&(_=new f(R)),_.stream(S)},unparse:function(S,R){var I=!1,M=!0,_=",",D=`\r
`,T='"',F=T+T,N=!1,k=null,L=!1;(function(){if(typeof R=="object"){if(typeof R.delimiter!="string"||s.BAD_DELIMITERS.filter(function(H){return R.delimiter.indexOf(H)!==-1}).length||(_=R.delimiter),(typeof R.quotes=="boolean"||typeof R.quotes=="function"||Array.isArray(R.quotes))&&(I=R.quotes),typeof R.skipEmptyLines!="boolean"&&typeof R.skipEmptyLines!="string"||(N=R.skipEmptyLines),typeof R.newline=="string"&&(D=R.newline),typeof R.quoteChar=="string"&&(T=R.quoteChar),typeof R.header=="boolean"&&(M=R.header),Array.isArray(R.columns)){if(R.columns.length===0)throw new Error("Option columns is empty");k=R.columns}R.escapeChar!==void 0&&(F=R.escapeChar+T),(typeof R.escapeFormulae=="boolean"||R.escapeFormulae instanceof RegExp)&&(L=R.escapeFormulae instanceof RegExp?R.escapeFormulae:/^[=+\-@\t\r].*$/)}})();var j=new RegExp(y(T),"g");if(typeof S=="string"&&(S=JSON.parse(S)),Array.isArray(S)){if(!S.length||Array.isArray(S[0]))return B(null,S,N);if(typeof S[0]=="object")return B(k||Object.keys(S[0]),S,N)}else if(typeof S=="object")return typeof S.data=="string"&&(S.data=JSON.parse(S.data)),Array.isArray(S.data)&&(S.fields||(S.fields=S.meta&&S.meta.fields||k),S.fields||(S.fields=Array.isArray(S.data[0])?S.fields:typeof S.data[0]=="object"?Object.keys(S.data[0]):[]),Array.isArray(S.data[0])||typeof S.data[0]=="object"||(S.data=[S.data])),B(S.fields||[],S.data||[],N);throw new Error("Unable to serialize unrecognized input");function B(H,q,V){var G="";typeof H=="string"&&(H=JSON.parse(H)),typeof q=="string"&&(q=JSON.parse(q));var Y=Array.isArray(H)&&0<H.length,re=!Array.isArray(q[0]);if(Y&&M){for(var le=0;le<H.length;le++)0<le&&(G+=_),G+=A(H[le],le);0<q.length&&(G+=D)}for(var J=0;J<q.length;J++){var oe=Y?H.length:q[J].length,ue=!1,ge=Y?Object.keys(q[J]).length===0:q[J].length===0;if(V&&!Y&&(ue=V==="greedy"?q[J].join("").trim()==="":q[J].length===1&&q[J][0].length===0),V==="greedy"&&Y){for(var me=[],ke=0;ke<oe;ke++){var be=re?H[ke]:ke;me.push(q[J][be])}ue=me.join("").trim()===""}if(!ue){for(var ie=0;ie<oe;ie++){0<ie&&!ge&&(G+=_);var ye=Y&&re?H[ie]:ie;G+=A(q[J][ye],ie)}J<q.length-1&&(!V||0<oe&&!ge)&&(G+=D)}}return G}function A(H,q){if(H==null)return"";if(H.constructor===Date)return JSON.stringify(H).slice(1,25);var V=!1;L&&typeof H=="string"&&L.test(H)&&(H="'"+H,V=!0);var G=H.toString().replace(j,F);return(V=V||I===!0||typeof I=="function"&&I(H,q)||Array.isArray(I)&&I[q]||function(Y,re){for(var le=0;le<re.length;le++)if(-1<Y.indexOf(re[le]))return!0;return!1}(G,s.BAD_DELIMITERS)||-1<G.indexOf(_)||G.charAt(0)===" "||G.charAt(G.length-1)===" ")?T+G+T:G}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\uFEFF",s.BAD_DELIMITERS=["\r",`
`,'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!o&&!!r.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=b,s.ParserHandle=h,s.NetworkStreamer=d,s.FileStreamer=f,s.StringStreamer=m,s.ReadableStreamStreamer=p,r.jQuery){var u=r.jQuery;u.fn.parse=function(S){var R=S.config||{},I=[];return this.each(function(D){if(!(u(this).prop("tagName").toUpperCase()==="INPUT"&&u(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var T=0;T<this.files.length;T++)I.push({file:this.files[T],inputElem:this,instanceConfig:u.extend({},R)})}),M(),this;function M(){if(I.length!==0){var D,T,F,N,k=I[0];if(E(S.before)){var L=S.before(k.file,k.inputElem);if(typeof L=="object"){if(L.action==="abort")return D="AbortError",T=k.file,F=k.inputElem,N=L.reason,void(E(S.error)&&S.error({name:D},T,F,N));if(L.action==="skip")return void _();typeof L.config=="object"&&(k.instanceConfig=u.extend(k.instanceConfig,L.config))}else if(L==="skip")return void _()}var j=k.instanceConfig.complete;k.instanceConfig.complete=function(B){E(j)&&j(B,k.file,k.inputElem),_()},s.parse(k.file,k.instanceConfig)}else E(S.complete)&&S.complete()}function _(){I.splice(0,1),M()}}}function c(S){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(R){var I=P(R);I.chunkSize=parseInt(I.chunkSize),R.step||R.chunk||(I.chunkSize=null),this._handle=new h(I),(this._handle.streamer=this)._config=I}).call(this,S),this.parseChunk=function(R,I){if(this.isFirstChunk&&E(this._config.beforeFirstChunk)){var M=this._config.beforeFirstChunk(R);M!==void 0&&(R=M)}this.isFirstChunk=!1,this._halted=!1;var _=this._partialLine+R;this._partialLine="";var D=this._handle.parse(_,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var T=D.meta.cursor;this._finished||(this._partialLine=_.substring(T-this._baseIndex),this._baseIndex=T),D&&D.data&&(this._rowCount+=D.data.length);var F=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)r.postMessage({results:D,workerId:s.WORKER_ID,finished:F});else if(E(this._config.chunk)&&!I){if(this._config.chunk(D,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);D=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(D.data),this._completeResults.errors=this._completeResults.errors.concat(D.errors),this._completeResults.meta=D.meta),this._completed||!F||!E(this._config.complete)||D&&D.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),F||D&&D.meta.paused||this._nextChunk(),D}this._halted=!0},this._sendError=function(R){E(this._config.error)?this._config.error(R):i&&this._config.error&&r.postMessage({workerId:s.WORKER_ID,error:R,finished:!1})}}function d(S){var R;(S=S||{}).chunkSize||(S.chunkSize=s.RemoteChunkSize),c.call(this,S),this._nextChunk=o?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(I){this._input=I,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(R=new XMLHttpRequest,this._config.withCredentials&&(R.withCredentials=this._config.withCredentials),o||(R.onload=C(this._chunkLoaded,this),R.onerror=C(this._chunkError,this)),R.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var I=this._config.downloadRequestHeaders;for(var M in I)R.setRequestHeader(M,I[M])}if(this._config.chunkSize){var _=this._start+this._config.chunkSize-1;R.setRequestHeader("Range","bytes="+this._start+"-"+_)}try{R.send(this._config.downloadRequestBody)}catch(D){this._chunkError(D.message)}o&&R.status===0&&this._chunkError()}},this._chunkLoaded=function(){R.readyState===4&&(R.status<200||400<=R.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:R.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(I){var M=I.getResponseHeader("Content-Range");return M===null?-1:parseInt(M.substring(M.lastIndexOf("/")+1))}(R),this.parseChunk(R.responseText)))},this._chunkError=function(I){var M=R.statusText||I;this._sendError(new Error(M))}}function f(S){var R,I;(S=S||{}).chunkSize||(S.chunkSize=s.LocalChunkSize),c.call(this,S);var M=typeof FileReader<"u";this.stream=function(_){this._input=_,I=_.slice||_.webkitSlice||_.mozSlice,M?((R=new FileReader).onload=C(this._chunkLoaded,this),R.onerror=C(this._chunkError,this)):R=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var _=this._input;if(this._config.chunkSize){v Line truncated
`),Z=1<Q.length&&Q[0].length<U[0].length;if(U.length===1||Z)return`
`;for(var ae=0,te=0;te<U.length;te++)U[te][0]===`
`&&ae++;return ae>=U.length/2?`\r
`:"\r"}(J,ge)),M=!1,S.delimiter)E(S.delimiter)&&(S.delimiter=S.delimiter(J),H.meta.delimiter=S.delimiter);else{var me=function(be,ie,ye,U,Q){var Z,ae,te,K;Q=Q||[","," ","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var ee=0;ee<Q.length;ee++){var se=Q[ee],Ce=0,_e=0,$e=0;te=void 0;for(var X=new b({comments:U,delimiter:se,newline:ie,preview:10}).parse(be),Ee=0;Ee<X.data.length;Ee++)if(ye&&V(X.data[Ee]))$e++;else{var Le=X.data[Ee].length;_e+=Le,te!==void 0?0<Le&&(Ce+=Math.abs(Le-te),te=Le):te=Le}0<X.data.length&&(_e/=X.data.length-$e),(ae===void 0||Ce<=ae)&&(K===void 0||K<_e)&&1.99<_e&&(ae=Ce,Z=se,K=_e)}return{successful:!!(S.delimiter=Z),bestDelimiter:Z}}(J,S.newline,S.skipEmptyLines,S.comments,S.delimitersToGuess);me.successful?S.delimiter=me.bestDelimiter:(M=!0,S.delimiter=s.DefaultDelimiter),H.meta.delimiter=S.delimiter}var ke=P(S);return S.preview&&S.header&&ke.preview++,R=J,I=new b(ke),H=I.parse(R,oe,ue),G(),j?{meta:{paused:!0}}:H||{meta:{paused:!1}}},this.paused=function(){return j},this.pause=function(){j=!0,I.abort(),R=E(S.chunk)?"":R.substring(I.getCharIndex())},this.resume=function(){N.streamer._halted?(j=!1,N.streamer.parseChunk(R,!0)):setTimeout(N.resume,3)},this.aborted=function(){return B},this.abort=function(){B=!0,I.abort(),H.meta.aborted=!0,E(S.complete)&&S.complete(H),R=""}}function y(S){return S.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function b(S){var R,I=(S=S||{}).delimiter,M=S.newline,_=S.comments,D=S.step,T=S.preview,F=S.fastMode,N=R=S.quoteChar===void 0||S.quoteChar===null?'"':S.quoteChar;if(S.escapeChar!==void 0&&(N=S.escapeChar),(typeof I!="string"||-1<s.BAD_DELIMITERS.indexOf(I))&&(I=","),_===I)throw new Error("Comment character same as delimiter");_===!0?_="#":(typeof _!="string"||-1<s.BAD_DELIMITERS.indexOf(_))&&(_=!1),M!==`
`&&M!=="\r"&&M!==`\r
`&&(M=`
`);var k=0,L=!1;this.parse=function(j,B,A){if(typeof j!="string")throw new Error("Input must be a string");var H=j.length,q=I.length,V=M.length,G=_.length,Y=E(D),re=[],le=[],J=[],oe=k=0;if(!j)return Te();if(S.header&&!B){var ue=j.split(M)[0].split(I),ge=[],me={},ke=!1;for(var be in ue){var ie=ue[be];E(S.transformHeader)&&(ie=S.transformHeader(ie,be));var ye=ie,U=me[ie]||0;for(0<U&&(ke=!0,ye=ie+"_"+U),me[ie]=U+1;ge.includes(ye);)ye=ye+"_"+U;ge.push(ye)}if(ke){var Q=j.split(M);Q[0]=ge.join(I),j=Q.join(M)}}if(F||F!==!1&&j.indexOf(R)===-1){for(var Z=j.split(M),ae=0;ae<Z.length;ae++){if(J=Z[ae],k+=J.length,ae!==Z.length-1)k+=M.length;else if(A)return Te();if(!_||J.substring(0,G)!==_){if(Y){if(re=[],$e(J.split(I)),Pe(),L)return Te()}else $e(J.split(I));if(T&&T<=ae)return re=re.slice(0,T),Te(!0)}}return Te()}for(var te=j.indexOf(I,k),K=j.indexOf(M,k),ee=new RegExp(y(N)+y(R),"g"),se=j.indexOf(R,k);;)if(j[k]!==R)if(_&&J.length===0&&j.substring(k,k+G)===_){if(K===-1)return Te();k=K+V,K=j.indexOf(M,k),te=j.indexOf(I,k)}else if(te!==-1&&(te<K||K===-1))J.push(j.substring(k,te)),k=te+q,te=j.indexOf(I,k);else{if(K===-1)break;if(J.push(j.substring(k,K)),Le(K+V),Y&&(Pe(),L))return Te();if(T&&re.length>=T)return Te(!0)}else for(se=k,k++;;){if((se=j.indexOf(R,se+1))===-1)return A||le.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:re.length,index:k}),Ee();if(se===H-1)return Ee(j.substring(k,se).replace(ee,R));if(R!==N||j[se+1]!==N){if(R===N||se===0||j[se-1]!==N){te!==-1&&te<se+1&&(te=j.indexOf(I,se+1)),K!==-1&&K<se+1&&(K=j.indexOf(M,se+1));var Ce=X(K===-1?te:Math.min(te,K));if(j.substr(se+1+Ce,q)===I){J.push(j.substring(k,se).replace(ee,R)),j[k=se+1+Ce+q]!==R&&(se=j.indexOf(R,k)),te=j.indexOf(I,k),K=j.indexOf(M,k);break}var _e=X(K);if(j.substring(se+1+_e,se+1+_e+V)===M){if(J.push(j.substring(k,se).replace(ee,R)),Le(se+1+_e+V),te=j.indexOf(I,k),se=j.indexOf(R,k),Y&&(Pe(),L))return Te();if(T&&re.length>=T)return Te(!0);break}le.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:re.length,index:k}),se++}}else se++}return Ee();function $e(Re){re.push(Re),oe=k}function X(Re){var He=0;if(Re!==-1){var it=j.substring(se+1,Re);it&&it.trim()===""&&(He=it.length)}return He}function Ee(Re){return A||(Re===void 0&&(Re=j.substring(k)),J.push(Re),k=H,$e(J),Y&&Pe()),Te()}function Le(Re){k=Re,$e(J),J=[],K=j.indexOf(M,k)}function Te(Re){return{data:re,errors:le,meta:{delimiter:I,linebreak:M,aborted:L,truncated:!!Re,cursor:oe+(B||0)}}}function Pe(){D(Te()),re=[],le=[]}},this.abort=function(){L=!0},this.getCharIndex=function(){return k}}function g(S){var R=S.data,I=a[R.workerId],M=!1;if(R.error)I.userError(R.error,R.file);else if(R.results&&R.results.data){var _={abort:function(){M=!0,x(R.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:w,resume:w};if(E(I.userStep)){for(var D=0;D<R.results.data.length&&(I.userStep({data:R.results.data[D],errors:R.results.errors,meta:R.results.meta},_),!M);D++);delete R.results}else E(I.userChunk)&&(I.userChunk(R.results,_,R.file),delete R.results)}R.finished&&!M&&x(R.workerId,R.results)}function x(S,R){var I=a[S];E(I.userComplete)&&I.userComplete(R),I.terminate(),delete a[S]}function w(){throw new Error("Not implemented.")}function P(S){if(typeof S!="object"||S===null)return S;var R=Array.isArray(S)?[]:{};for(var I in S)R[I]=P(S[I]);return R}function C(S,R){return function(){S.apply(R,arguments)}}function E(S){return typeof S=="function"}return i&&(r.onmessage=function(S){var R=S.data;if(s.WORKER_ID===void 0&&R&&(s.WORKER_ID=R.workerId),typeof R.input=="string")r.postMessage({workerId:s.WORKER_ID,results:s.parse(R.input,R.config),finished:!0});else if(r.File&&R.input instanceof File||R.input instanceof Object){var I=s.parse(R.input,R.config);I&&r.postMessage({workerId:s.WORKER_ID,results:I,finished:!0})}}),(d.prototype=Object.create(c.prototype)).constructor=d,(f.prototype=Object.create(c.prototype)).constructor=f,(m.prototype=Object.create(m.prototype)).constructor=m,(p.prototype=Object.create(c.prototype)).constructor=p,s})})(oL);var iL=oL.exports,Y7=function(){return Ji.Date.now()};const Fb=Y7;var X7=/\s/;function Z7(e){for(var t=e.length;t--&&X7.test(e.charAt(t)););return t}var J7=/^\s+/;function eG(e){return e&&e.slice(0,Z7(e)+1).replace(J7,"")}var tG="[object Symbol]";function qv(e){return typeof e=="symbol"||Zs(e)&&ad(e)==tG}var qI=0/0,nG=/^[-+]0x[0-9a-f]+$/i,rG=/^0b[01]+$/i,oG=/^0o[0-7]+$/i,iG=parseInt;function lw(e){if(typeof e=="number")return e;if(qv(e))return qI;if(Js(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Js(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=eG(e);var n=rG.test(e);return n||oG.test(e)?iG(e.slice(2),n?2:8):nG.test(e)?qI:+e}var aG="Expected a function",lG=Math.max,sG=Math.min;function aL(e,t,n){var r,o,i,a,l,s,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(aG);t=lw(t)||0,Js(n)&&(c=!!n.leading,d="maxWait"in n,i=d?lG(lw(n.maxWait)||0,t):i,f="trailing"in n?!!n.trailing Line truncated
For more information, see https://refine.dev/docs/advanced-tutorials/data-provider/handling-filters/#top-level-multiple-conditional-filters-usage`),kS(e,t,n,FL).filter(r=>r.value!==void 0&&r.value!==null&&(r.operator!=="or"||r.operator==="or"&&r.value.length!==0)&&(r.operator!=="and"||r.operator==="and"&&r.value.length!==0))),"unionFilters"),tO=W((e,t)=>kS(e,t,AL).filter(n=>n.order!==void 0&&n.order!==null),"unionSorters"),nO=W((e,t)=>[...Ol(t,e,FL),...e],"setInitialFilters"),rO=W((e,t)=>[...Ol(t,e,AL),...e],"setInitialSorters");W((e,t)=>{if(!t)return;let n=t.find(r=>r.field===e);if(n)return n.order},"getDefaultSortOrder");W((e,t,n="eq")=>{let r=t==null?void 0:t.find(o=>{if(o.operator!=="or"&&o.operator!=="and"&&"field"in o){let{operator:i,field:a}=o;return a===e&&i===n}});if(r)return r.value||[]},"getDefaultFilter");W(e=>new Promise((t,n)=>{let r=new FileReader,o=W(()=>{r.result&&(r.removeEventListener("load",o,!1),t(r.result))},"resultHandler");r.addEventListener("load",o,!1),r.readAsDataURL(e.originFileObj),r.onerror=i=>(r.removeEventListener("load",o,!1),n(i))}),"file2Base64");var Ut=W(()=>{let{options:{useNewQueryKeys:e}}=un();return{keys:xs,preferLegacyKeys:!e}},"useKeys");function pq({v3LegacyAuthProviderCompatible:e=!1,options:t,params:n}={}){let{getPermissions:r}=Ho(),{getPermissions:o}=hi(),{keys:i,preferLegacyKeys:a}=Ut(),l=Do({queryKey:i().auth().action("permissions").get(a),queryFn:o?()=>o(n):()=>Promise.resolve(void 0),enabled:!e&&!!o,...e?{}:t,meta:{...e?{}:t==null?void 0:t.meta,...bt()}}),s=Do({queryKey:[...i().auth().action("permissions").get(a),"v3LegacyAuthProviderCompatible"],queryFn:r?()=>r(n):()=>Promise.resolve(void 0),enabled:e&&!!r,...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...bt()}});return e?s:l}W(pq,"usePermissions");function ld({v3LegacyAuthProviderCompatible:e=!1,queryOptions:t}={}){let{getUserIdentity:n}=Ho(),{getIdentity:r}=hi(),{keys:o,preferLegacyKeys:i}=Ut(),a=Do({queryKey:o().auth().action("identity").get(i),queryFn:r??(()=>Promise.resolve({})),enabled:!e&&!!r,retry:!1,...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...bt()}}),l=Do({queryKey:[...o().auth().action("identity").get(i),"v3LegacyAuthProviderCompatible"],queryFn:n??(()=>Promise.resolve({})),enabled:e&&!!n,retry:!1,...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...bt()}});return e?l:a}W(ld,"useGetIdentity");var _S=W(()=>{let e=Zi(),{keys:t,preferLegacyKeys:n}=Ut();return W(async()=>{await Promise.all(["check","identity","permissions"].map(r=>e.invalidateQueries(t().auth().action(r).get(n))))},"invalidate")},"useInvalidateAuthStore");function Bc({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=_S(),r=st(),o=pr(),{push:i}=xn(),{open:a,close:l}=hu(),{logout:s}=Ho(),{logout:u}=hi(),{keys:c,preferLegacyKeys:d}=Ut(),f=bn({mutationKey:c().auth().action("logout").get(d),mutationFn:u,onSuccess:async(p,h)=>{let{success:y,error:b,redirectTo:g,successNotification:x}=p,{redirectPath:w}=h??{},P=w??g;y&&(l==null||l("useLogout-error"),x&&(a==null||a(mq(x)))),(b||!y)&&(a==null||a(Db(b))),P!==!1&&(r==="legacy"?i(P??"/login"):P&&o({to:P})),await n()},onError:p=>{a==null||a(Db(p))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...bt()}}),m=bn({mutationKey:[...c().auth().action("logout").get(d),"v3LegacyAuthProviderCompatible"],mutationFn:s,onSuccess:async(p,h)=>{let y=(h==null?void 0:h.redirectPath)??p;if(y!==!1){if(y){r==="legacy"?i(y):o({to:y});return}r==="legacy"?i("/login"):o({to:"/login"}),await n()}},onError:p=>{a==null||a(Db(p))},...e?t:{},meta:{...e?t==null?void 0:t.meta:{},...bt()}});return e?m:f}W(Bc,"useLogout");var Db=W(e=>({key:"useLogout-error",type:"error",message:(e==null?void 0:e.name)||"Logout Error",description:(e==null?void 0:e.message)||"Something went wrong during logout"}),"buildNotification"),mq=W(e=>({message:e.message,description:e.description,key:"logout-success",type:"success"}),"buildSuccessNotification");function Dp({v3LegacyAuthProviderCompatible:e,mutationOptions:t}={}){let n=_S(),r=st(),o=pr(),{replace:i}=xn(),a=Vo(),{useLocation:l}=zt(),{search:s}=l(),{close:u,open:c}=hu(),{login:d}=Ho(),{login:f}=hi(),{keys:m,preferLegacyKeys:p}=Ut(),h=$.useMemo(()=>{var g;return r==="legacy"?Xs.parse(s,{ignoreQueryPrefix:!0}).to:(g=a.params)==null?void 0:g.to},[r,a.params,s]),y=bn({mutationKey:m().auth().action("login").get(p),mutationFn:f,onSuccess:async({success:g,redirectTo:x,error:w,successNotification:P})=>{g&&(u==null||u("login-error"),P&&(c==null||c(hq(P)))),(w||!g)&&(c==null||c(Nb(w))),h&&g?r==="legacy"?i(h):o({to:h,type:"replace"}):x?r==="legacy"?i(x):o({to:x,type:"replace"}):r==="legacy"&&i("/"),await n()},onError:g=>{c==null||c(Nb(g))},...e===!0?{}:t,meta:{...e===!0?{}:t==null?void 0:t.meta,...bt()}}),b=bn({mutationKey:[...m().auth().action("login").get(p),"v3LegacyAuthProviderCompatible"],mutationFn:d,onSuccess:async g=>{h&&i(h),g!==!1&&!h&&(typeof g=="string"?r==="legacy"?i(g):o({to:g,type:"replace"}):r==="legacy"?i("/"):o({to:"/",type:"replace"})),await n(),u==null Line truncated
Both \`unparseConfig\` and \`exportOptions\` are set, \`unparseConfig\` will take precedence`);let D={filename:C,useKeysAsHeaders:!0,useBom:!0,title:"My Generated Report",quoteStrings:'"',...s};tu((s==null?void 0:s.decimalSeparator)!==void 0,`[useExport]: resource: "${P}"
Use of \`decimalSeparator\` no longer supported, please use \`mapData\` instead.
See https://refine.dev/docs/api-reference/core/hooks/import-export/useExport/`),_?u={quotes:!0,...u}:u={columns:D.useKeysAsHeaders?void 0:D.headers,delimiter:D.fieldSeparator,header:D.showLabels||D.useKeysAsHeaders,quoteChar:D.quoteStrings,quotes:!0};let T=iL.unparse(R.map(l),u);if(D.showTitle&&(T=`${D.title}\r
${T}`),typeof window<"u"&&T.length>0&&(p??!0)){let F=D.useTextFile?".txt":".csv",N=`text/${D.useTextFile?"plain":"csv"};charset=utf8;`,k=`${(D.filename??"download").replace(/ /g,"_")}${F}`;fq(k,`${D!=null&&D.useBom?"\uFEFF":""}${T}`,N)}return y(!1),T},"triggerExport")}},"useExport");var Aq=W(({resource:e,action:t,id:n,onMutationSuccess:r,onMutationError:o,redirect:i,successNotification:a,errorNotification:l,meta:s,metaData:u,queryMeta:c,mutationMeta:d,mutationMode:f,liveMode:m,onLiveEvent:p,liveParams:h,undoableTimeout:y,dataProviderName:b,invalidates:g,queryOptions:x,createMutationOptions:w,updateMutationOptions:P,overtimeOptions:C,autoSave:E,optimisticUpdateMap:S}={})=>{let R=ta(),{options:I}=un(),M=Gn(),{resource:_,id:D,action:T,identifier:F}=Je(e),{identifier:N}=Je(),k=W(()=>e&&e!==N?n:n??D,"getDefaultId")(),[L,j]=$.useState(k);$.useEffect(()=>{j(k)},[k]);let B=W(()=>t||(T==="edit"||T==="clone"?T:"create"),"getAction")(),A=M({resource:_,meta:Ae(s,u)}),{mutationMode:H}=mu(),q=f??H,V=B==="create",G=B==="edit",Y=B==="clone";tu((Y||G)&&!!e&&!n&&(x==null?void 0:x.enabled)!==!1,`[useForm]: action: "${B}", resource: "${F}", id: ${L}
If you don't use the \`setId\` method to set the \`id\`, you should pass the \`id\` prop to \`useForm\`. Otherwise, \`useForm\` will not be able to infer the \`id\` from the current URL.
See https://refine.dev/docs/api-reference/core/hooks/useForm/#resource`);let re=tq({redirectFromProps:i,action:B,redirectOptions:I.redirect}),le=NL({resource:F,id:L??"",queryOptions:{enabled:L!==void 0&&(G||Y),...x},liveMode:m,onLiveEvent:p,liveParams:h,meta:{...A,...c},metaData:{...A,...c},dataProviderName:b}),{isFetching:J}=le,oe=jL({mutationOptions:w}),{mutate:ue,isLoading:ge}=oe,me=oO({mutationOptions:P}),{mutate:ke,isLoading:be}=me,ie=oO({}),{setWarnWhen:ye}=Qa(),U=Lq(),Q=W(async ee=>{ye(!1);let se=W(Ce=>{U({redirect:re,resource:_,id:Ce,meta:Ae(s,u)})},"onSuccess");return q!=="pessimistic"&&setTimeout(()=>{se()}),new Promise((Ce,_e)=>{if(q!=="pessimistic"&&Ce(),!!_)return ue({values:ee,resource:F??_.name,successNotification:a,errorNotification:l,meta:{...A,...d},metaData:{...A,...d},dataProviderName:b,invalidates:g},{onSuccess:($e,X,Ee)=>{var Le;r&&r($e,ee,Ee);let Te=(Le=$e==null?void 0:$e.data)==null?void 0:Le.id;se(Te),Ce($e)},onError:($e,X,Ee)=>{if(o)return o($e,ee,Ee);_e()}})})},"onFinishCreate");$.useEffect(()=>()=>{E!=null&&E.invalidateOnUnmount&&ie.status==="success"&&R({id:L,invalidates:g||["list","many","detail"],dataProviderName:b,resource:F})},[E==null?void 0:E.invalidateOnUnmount,ie.status]);let Z=W(ee=>{if(!_||!G)return;let se={id:L??"",values:ee,resource:F??_.name,successNotification:!1,errorNotification:!1,meta:{...A,...d},metaData:{...A,...d},dataProviderName:b,invalidates:[],mutationMode:"pessimistic"};return ie.mutate(se,{onSuccess:(Ce,_e,$e)=>{r&&r(Ce,ee,$e,!0)},onError:(Ce,_e,$e)=>{if(o)return o(Ce,ee,$e,!0)}})},"onFinishAutoSaveMutation"),ae=aL(ee=>Z(ee),(E==null?void 0:E.debounce)||1e3),te=V||Y?{formLoading:J||ge,mutationResult:oe,onFinish:Q}:{formLoading:J||be,mutationResult:me,onFinish:W(async ee=>{if(ye(!1),!_)return;let se={id:L??"",values:ee,resource:F??_.name,mutationMode:q,undoableTimeout:y,successNotification:a,errorNotification:l,meta:{...A,...d},metaData:{...A,...d},dataProviderName:b,invalidates:g,optimisticUpdateMap:S},Ce=W(()=>{U({redirect:re,resource:_,id:L,meta:Ae(s,u)})},"onSuccess");return q!=="pessimistic"&&setTimeout(()=>{Ce()}),new Promise((_e,$e)=>(q!=="pessimistic"&&_e(),setTimeout(()=>{ke(se,{onSuccess:(X,Ee,Le)=>{r&&r(X,ee,Le),q==="pessimistic"&&Ce(),_e(X)},onError:(X,Ee,Le)=>{if(o)return o(X,ee,Le);$e()}})})))},"onFinishUpdate")},{elapsedTime:K}=fr({isLoading:te.mutationResult.isLoading||le.isFetching,interval:C==null?void 0:C.interval,onInterval:C==null?void 0:C.onInterval});return{...te,queryResult:le,onFinishAutoSave:ae,autoSaveProps:{status:ie.status,data:ie.data,error:ie.error},id:L,setId:j,redirect:(ee,se)=>{U({redirect:ee!==void 0?ee:G?"list":"edit",resource:_,id:se??L,meta:Ae(s,u)})},overtime:{elapsedTime:K}}},"useForm"),Lq=W(()=>{let{show:e,edit:t,list:n,create:r}=xn();return v.useCallback(({redirect:o,resource:i,id:a,meta:l={}})=>{if(o&&i)return i.show&&o==="show"&&a?e(i,a,void 0,l):i.edit&&o==="edit"&&a?t(i,a,void 0,l):i.create&&o==="create"?r(i,void 0,l):n(i,"push",l)},[])},"useRedirectionAfterSubmission"),Hp=W(()=>{let e=st(),{resource:t,resources:n}=Je(),r=Vo();return $.useCallback(({resource:o,action:i,meta:a})=>{var l;let s=o||t;if(!s)return;let u=(l=Qr(s,n,e==="legacy").find(c=>c.action===i))==null?void 0:l.route;return u?yo(u,s==null?void 0:s.meta,r,a):void 0},[n,t,r])},"useGetToPath"),pr=W(()=>{let e=v.useContext(jp),{select:t}=Je(),n=Hp(),r=$.useMemo(()=>(e==null?void 0:e.go)??(()=>()=>{}),[e==null?void 0:e.go])();return v.useCallback(o=>{if(typeof o.to!="object")return r({...o,to:o.to});let{resource:i}=t(o.to.resource);Dq(o.to,i);let a=n({resource:i,action:o.to.action,meta:{id:o.to.id,...o.to.meta}});return r({...o,to:a})},[t,r])},"useGo"),Dq=W((e,t)=>{if(!(e!=null&&e.action)||!(e!=null&&e.resource))throw new Error('[useGo]: "action" or "resource" is required.');if(["edit","show","clone"].includes(e==null?void 0:e.action)&&!e.id)throw new Error(`[useGo]: [action: ${e.action}] requires an "id" for resource [resource: ${e.resource}]`);if(!t[e.action])throw new Error(`[useGo]: [action: ${e.action}] is not defined for [resource: ${e.resource}]`)},"handleResourceErrors"),Jv=W(()=>{let e=v.useContext(jp);return $.useMemo(()=>(e==null?void 0:e.back)??(()=>()=>{}),[e==null?void 0:e.back])()},"useBack"),xn=W(()=>{let{resources:e}=Je(),t=st(),{useHistory:n}=zt(),r=n(),o=Vo(),i=pr(),a=Jv(),l=W((m,p="push")=>{t==="legacy"?r[p](m):i({to:m,type:p})},"handleUrl"),s=W((m,p={})=>{var h;if(t==="legacy"){let g=typeof m=="string"?sr(m,e,!0)??{name:m,route:m}:m,x=Qr(g,e,!0).find(w=>w.action==="create");return x?yo(x.route,g==null?void 0:g.meta,o,p):""}let y=typeof m=="string"?sr(m,e)??{name:m}:m,b=(h=Qr(y,e).find(g=>g.action==="create"))==null?void 0:h.route;return b?i({to:yo(b,y==null?void 0:y.meta,o,p),type:"path"}):""},"createUrl"),u=W((m,p,h={})=>{var y;let b=encodeURIComponent(p);if(t==="legacy"){let w=typeof m=="string"?sr(m,e,!0)??{name:m,route:m}:m,P=Qr(w,e,!0).find(C=>C.action==="edit");return P?yo(P.route,w==null?void 0:w.meta,o,{...h,id:b}):""} Line truncated
If you don't use the \`setShowId\` method to set the \`showId\`, you should pass the \`id\` prop to \`useShow\`. Otherwise, \`useShow\` will not be able to infer the \`id\` from the current URL.
See https://refine.dev/docs/api-reference/core/hooks/show/useShow/#resource`);let w=NL({resource:m,id:b??"",queryOptions:{enabled:b!==void 0,...u},successNotification:n,errorNotification:r,meta:x,metaData:x,liveMode:a,onLiveEvent:l,dataProviderName:s}),{elapsedTime:P}=fr({isLoading:w.isFetching,interval:c==null?void 0:c.interval,onInterval:c==null?void 0:c.onInterval});return{queryResult:w,showId:b,setShowId:g,overtime:{elapsedTime:P}}},"useShow");W(({resourceName:e,resource:t,mapData:n=W(c=>c,"mapData"),paparseOptions:r,batchSize:o=Number.MAX_SAFE_INTEGER,onFinish:i,meta:a,metaData:l,onProgress:s,dataProviderName:u}={})=>{let[c,d]=v.useState(0),[f,m]=v.useState(0),[p,h]=v.useState(!1),{resource:y,identifier:b}=Je(t??e),g=Gn(),x=Sq(),w=jL(),P=g({resource:y,meta:Ae(a,l)}),C;o===1?C=w:C=x;let E=W(()=>{m(0),d(0),h(!1)},"handleCleanup"),S=W(I=>{let M={succeeded:I.filter(_=>_.type==="success"),errored:I.filter(_=>_.type==="error")};i==null||i(M),h(!1)},"handleFinish");v.useEffect(()=>{s==null||s({totalAmount:f,processedAmount:c})},[f,c]);let R=W(({file:I})=>(E(),new Promise(M=>{h(!0),iL.parse(I,{complete:async({data:_})=>{let D=VG(_,n);if(m(D.length),o===1){let T=D.map(N=>W(async()=>({response:await w.mutateAsync({resource:b??"",values:N,successNotification:!1,errorNotification:!1,dataProviderName:u,meta:P,metaData:P}),value:N}),"fn")),F=await XI(T,({response:N,value:k})=>(d(L=>L+1),{response:[N.data],type:"success",request:[k]}),(N,k)=>({response:[N],type:"error",request:[D[k]]}));M(F)}else{let T=gG(D,o),F=T.map(k=>W(async()=>({response:await x.mutateAsync({resource:b??"",values:k,successNotification:!1,errorNotification:!1,dataProviderName:u,meta:P,metaData:P}),value:k,currentBatchLength:k.length}),"fn")),N=await XI(F,({response:k,currentBatchLength:L,value:j})=>(d(B=>B+L),{response:k.data,type:"success",request:j}),(k,L)=>({response:[k],type:"error",request:T[L]}));M(N)}},...r})}).then(M=>(S(M),M))),"handleChange");return{inputProps:{type:"file",accept:".csv",onChange:I=>{I.target.files&&I.target.files.length>0&&R({file:I.target.files[0]})}},mutationResult:C,isLoading:p,handleChange:R}},"useImport");var Nq=W(({defaultVisible:e=!1}={})=>{let[t,n]=v.useState(e),r=v.useCallback(()=>n(!0),[t]),o=v.useCallback(()=>n(!1),[t]);return{visible:t,show:r,close:o}},"useModal"),GL=W(({resource:e,action:t,meta:n,legacy:r})=>Hp()({resource:e,action:t,meta:n,legacy:r}),"useToPath"),Wn=W(()=>{let e=v.useContext(jp);return e!=null&&e.Link?e.Link:W(({to:t,...n})=>$.createElement("a",{href:t,...n}),"FallbackLink")},"useLink"),bl={useHistory:()=>!1,useLocation:()=>!1,useParams:()=>({}),Prompt:()=>null,Link:()=>null},zq=$.createContext(bl),zS=zq,jq=W(({children:e,useHistory:t,useLocation:n,useParams:r,Prompt:o,Link:i,routes:a})=>$.createElement(zS.Provider,{value:{useHistory:t??bl.useHistory,useLocation:n??bl.useLocation,useParams:r??bl.useParams,Prompt:o??bl.Prompt,Link:i??bl.Link,routes:a??bl.routes}},e),"LegacyRouterContextProvider"),zt=W(()=>{let e=v.useContext(zS),{useHistory:t,useLocation:n,useParams:r,Prompt:o,Link:i,routes:a}=e??bl;return{useHistory:t,useLocation:n,useParams:r,Prompt:o,Link:i,routes:a}},"useRouterContext"),na=$.createContext({options:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1}}}),Bq=W(({can:e,children:t,options:n})=>$.createElement(na.Provider,{value:{can:e,options:n?{...n,buttons:{enableAccessControl:!0,hideIfUnauthorized:!1,...n.buttons}}:{buttons:{enableAccessControl:!0,hideIfUnauthorized:!1},queryOptions:void 0}}},t),"AccessControlContextProvider"),jS=W(e=>{if(!e)return;let{icon:t,list:n,edit:r,create:o,show:i,clone:a,children:l,meta:s,options:u,...c}=e,{icon:d,...f}=s??{},{icon:m,...p}=u??{};return{...c,...s?{meta:f}:{},...u?{options:p}:{}}},"sanitizeResource"),gu=W(({action:e,resource:t,params:n,queryOptions:r})=>{let{can:o,options:i}=v.useContext(na),{keys:a,preferLegacyKeys:l}=Ut(),{queryOptions:s}=i||{},u={...s,...r},{resource:c,...d}=n??{},f=jS(c),m=Do({queryKey:a().access().resource(t).action(e).params({params:{...d,resource:f},enabled:u==null?void 0:u.enabled}).get(l),queryFn:()=>(o==null?void 0:o({action:e,resource:t,params:{...d,resource:f}}))??Promise.resolve({can:!0}),enabled:typeof o<"u",...u,meta:{...u==null?void 0:u.meta,...bt()},retry:!1});return typeof o>"u"?{data:{can:!0}}:m},"useCan"),Hq=W(()=>{let{can:e}=$.useContext(na);return{can:$.useMemo(()=>e?W(async({params:t,...n})=>{let r=t!=null&&t.resource?jS(t.resource):void 0;return e({...n,...t?{params:{...t,resource:r}}:{}})},"canWithSanitizedResource"):void 0,[e])}},"useCanWithoutCache"),Uq=W(e=>{let[t,n]=v.useState([]),[r,o]=v.useState([]),[i,a]=v.useState([]),{resource:l,sort:s,sorters:u,filters:c=[],optionLabel:d="title",optionValue:f="id",searchField:m=typeof d=="string"?d:"title",debounce:p=300,successNotification:h,errorNotification:y,defaultValueQueryOptions:b,queryOptions:g,fetchSize:x,pagination:w,hasPagination:P=!1,liveMode:C,defaultValue:E=[],onLiveEvent:S,onSearch:R,liveParams:I,meta:M,metaData:_,dataProviderN Line truncated
For more information, see https://refine.dev/docs/api-reference/core/hooks/useBreadcrumb/#i18n-support`),u.push({label:o(`buttons.${l}`,s.humanize(l))})):u.push({label:o(d,s.humanize(l))})}return{breadcrumbs:u}},"useBreadcrumb"),Gh=W((e,t,n=!1)=>{let r=[],o=Ql(e,t);for(;o;)r.push(o),o=Ql(o,t);return r.reverse(),`/${[...r,e].map(i=>za((n?i.route:void 0)??i.identifier??i.name)).join("/").replace(/^\//,"")}`},"createResourceKey"),Gq=W((e,t=!1)=>{let n={item:{name:"__root__"},children:{}};e.forEach(o=>{let i=[],a=Ql(o,e);for(;a;)i.push(a),a=Ql(a,e);i.reverse();let l=n;i.forEach(u=>{let c=(t?u.route:void 0)??u.identifier??u.name;l.children[c]||(l.children[c]={item:u,children:{}}),l=l.children[c]});let s=(t?o.route:void 0)??o.identifier??o.name;l.children[s]||(l.children[s]={item:o,children:{}})});let r=W(o=>{let i=[];return Object.keys(o.children).forEach(a=>{let l=Gh(o.children[a].item,e,t),s={...o.children[a].item,key:l,children:r(o.children[a])};i.push(s)}),i},"flatten");return r(n)},"createTree"),lO=W(e=>e.split("?")[0].split("#")[0].replace(/(.+)(\/$)/,"$1"),"getCleanPath"),BS=W(({meta:e,hideOnMissingParameter:t}={hideOnMissingParameter:!0})=>{let n=Qe(),r=Hp(),o=st(),{resource:i,resources:a}=Je(),{pathname:l}=Vo(),{useLocation:s}=zt(),{pathname:u}=s(),c=ea(),d=`/${((o==="legacy"?lO(u):l?lO(l):void 0)??"").replace(/^\//,"")}`,f=i?Gh(i,a,o==="legacy"):d??"",m=$.useMemo(()=>{if(!i)return[];let y=Ql(i,a),b=[Gh(i,a)];for(;y;)b.push(Gh(y,a)),y=Ql(y,a);return b},[]),p=$.useCallback(y=>{var b,g,x,w,P,C;if((((b=y==null?void 0:y.meta)==null?void 0:b.hide)??((g=y==null?void 0:y.options)==null?void 0:g.hide))||!(y!=null&&y.list)&&y.children.length===0)return;let E=y.list?r({resource:y,action:"list",legacy:o==="legacy",meta:e}):void 0;if(!(t&&E&&E.match(/(\/|^):(.+?)(\/|$){1}/)))return{...y,route:E,icon:Ae((x=y.meta)==null?void 0:x.icon,(w=y.options)==null?void 0:w.icon,y.icon),label:Ae((P=y==null?void 0:y.meta)==null?void 0:P.label,(C=y==null?void 0:y.options)==null?void 0:C.label)??n(`${y.name}.${y.name}`,c(y.name,"plural"))}},[o,e,r,n,t]),h=$.useMemo(()=>{let y=Gq(a,o==="legacy"),b=W(g=>g.flatMap(x=>{let w=b(x.children),P=p({...x,children:w});return P?[P]:[]}),"prepare");return b(y)},[a,o,p]);return{defaultOpenKeys:m,selectedKey:f,menuItems:h}},"useMenu"),Gn=W(()=>{let{params:e}=Vo();return W(({resource:t,meta:n}={})=>{let{meta:r}=jS(t)??{meta:{}},{filters:o,sorters:i,current:a,pageSize:l,...s}=e??{};return{...r,...s,...n}},"getMetaFn")},"useMeta");W(()=>{let[e,t]=v.useState(),n=Qe(),{push:r}=xn(),o=pr(),i=st(),{resource:a,action:l}=Je();return v.useEffect(()=>{a&&l&&t(n("pages.error.info",{action:l,resource:a.name},`You may have forgotten to add the "${l}" component to "${a.name}" resource.`))},[a,l]),$.createElement($.Fragment,null,$.createElement("h1",null,n("pages.error.404",void 0,"Sorry, the page you visited does not exist.")),e&&$.createElement("p",null,e),$.createElement("button",{onClick:()=>{i==="legacy"?r("/"):o({to:"/"})}},n("pages.error.backHome",void 0,"Back Home")))},"ErrorComponent");var qq=W(()=>{let[e,t]=v.useState(""),[n,r]=v.useState(""),o=Qe(),i=Nt(),{mutate:a}=Dp({v3LegacyAuthProviderCompatible:!!(i!=null&&i.isLegacy)});return $.createElement($.Fragment,null,$.createElement("h1",null,o("pages.login.title","Sign in your account")),$.createElement("form",{onSubmit:l=>{l.preventDefault(),a({username:e,password:n})}},$.createElement("table",null,$.createElement("tbody",null,$.createElement("tr",null,$.createElement("td",null,o("pages.login.username",void 0,"username"),":"),$.createElement("td",null,$.createElement("input",{type:"text",size:20,autoCorrect:"off",spellCheck:!1,autoCapitalize:"off",autoFocus:!0,required:!0,value:e,onChange:l=>t(l.target.value)}))),$.createElement("tr",null,$.createElement("td",null,o("pages.login.password",void 0,"password"),":"),$.createElement("td",null,$.createElement("input",{type:"password",required:!0,size:20,value:n,onChange:l=>r(l.target.value)}))))),$.createElement("br",null),$.createElement("input",{type:"submit",value:"login"})))},"LoginPage"),Kq=W(({providers:e,registerLink:t,forgotPasswordLink:n,rememberMe:r,contentProps:o,wrapperProps:i,renderContent:a,formProps:l,title:s=void 0,hideForm:u})=>{let c=st(),d=Wn(),{Link:f}=zt(),m=c==="legacy"?f:d,[p,h]=v.useState(""),[y,b]=v.useState(""),[g,x]=v.useState(!1),w=Qe(),P=Nt(),{mutate:C}=Dp({v3LegacyAuthProviderCompatible:!!(P!=null&&P.isLegacy)}),E=W((I,M)=>$.createElement(m,{to:I},M),"renderLink"),S=W(()=>e?e.map(I=>$.createElement("div",{key:I.name,style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"1rem"}},$.createElement("button",{onClick:()=>C({providerName:I.name}),style:{display:"flex",alignItems:"center"}},I==null?void 0:I.icon,I.label??$.createElement("label",null,I.label)))):null,"renderProviders"),R=$.createElement("div",{...o},$.createElement("h1",{style:{textAlign:"center"}},w("pages.login.title","Sign in to your account")),S(),!u&&$.createElement($.Fragment,null,$.creat Line truncated
`,`
`,$.createElement("span",{style:{color:"#FF7B72"}},"export")," ",$.createElement("span",{style:{color:"#FF7B72"}},"default")," ",$.createElement("span",null,$.createElement("span",{style:{color:"#FF7B72"}},"function")," ",$.createElement("span",{style:{color:"#FFA657"}},"App"),"(",$.createElement("span",{style:{color:"rgb(222, 147, 95)"}}),")"," "),"{",`
`," ",$.createElement("span",{style:{color:"#FF7B72"}},"return")," (",`
`," ",$.createElement("span",null,$.createElement("span",{style:{color:"#79C0FF"}},"<",$.createElement("span",{style:{color:"#79C0FF"}},"Refine"),`
`," ",$.createElement("span",{style:{color:"#E5ECF2",opacity:.6}},"// ",$.createElement("span",null,"...")),`
`," ",">"),`
`," ",$.createElement("span",{style:{opacity:.6}},"{","/* ... */","}"),`
`," ",$.createElement("span",{style:{color:"#79C0FF"}},"<",$.createElement("span",{style:{color:"#79C0FF"}},"WelcomePage")," />"),`
`," ",$.createElement("span",{style:{opacity:.6}},"{","/* ... */","}"),`
`," ",$.createElement("span",{style:{color:"#79C0FF"}},"</",$.createElement("span",{style:{color:"#79C0FF"}},"Refine"),">")),`
`," ",");",`
`,"}"),"ExampleImplementation"),oK=W(e=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:204,height:56,viewBox:"0 0 204 56",fill:"none",...e},$.createElement("path",{fill:"url(#welcome-page-error-gradient-a)",d:"M12 0H0v12L12 0Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-b)",d:"M28 0h-8L0 20v8L28 0Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-c)",d:"M36 0h8L0 44v-8L36 0Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-d)",d:"M60 0h-8L0 52v4h4L60 0Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-e)",d:"M68 0h8L20 56h-8L68 0Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-f)",d:"M92 0h-8L28 56h8L92 0Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-g)",d:"M100 0h8L52 56h-8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-h)",d:"M124 0h-8L60 56h8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-i)",d:"M140 0h-8L76 56h8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-j)",d:"M132 0h8L84 56h-8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-k)",d:"M156 0h-8L92 56h8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-l)",d:"M164 0h8l-56 56h-8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-m)",d:"M188 0h-8l-56 56h8l56-56Z"}),$.createElement("path",{fill:"url(#welcome-page-error-gradient-n)",d:"M204 0h-8l-56 56h8l56-56Z"}),$.createElement("defs",null,$.createElement("radialGradient",{id:"welcome-page-error-gradient-a",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-b",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-c",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-d",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-e",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-f",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-g",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-h",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-i",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-j",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-k",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-l",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#FF4C4D",stopOpacity:.1}),$.createElement("stop",{offset:1,stopColor:"#FF4C4D",stopOpacity:0})),$.createElement("radialGradient",{id:"welcome-page-error-gradient-m",cx:0,cy:0,r:1,gradientTransform:"scale(124)",gradientUnits:"userS Line truncated
.bg-top-announcement {
border-bottom: 1px solid rgba(71, 235, 235, 0.15);
background: radial-gradient(
218.19% 111.8% at 0% 0%,
rgba(71, 235, 235, 0.1) 0%,
rgba(71, 235, 235, 0.2) 100%
),
#14141f;
}
`,`
.top-announcement-mask {
mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg);
-webkit-mask-image: url(https://refine.ams3.cdn.digitaloceanspaces.com/website/static/assets/hexagon.svg);
mask-repeat: repeat;
-webkit-mask-repeat: repeat;
background: rgba(71, 235, 235, 0.25);
}
`,`
.banner {
display: flex;
@media (max-width: 1000px) {
display: none;
}
}`,`
.gh-link, .gh-link:hover, .gh-link:active, .gh-link:visited, .gh-link:focus {
text-decoration: none;
z-index: 9;
}
`,`
@keyframes top-announcement-glow {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
`],SK="If you find Refine useful, you can contribute to its growth by giving it a star on GitHub";W(()=>(v.useEffect(()=>{let e=document.createElement("style");document.head.appendChild(e),CK.forEach(t=>{var n;return(n=e.sheet)==null?void 0:n.insertRule(t,e.sheet.cssRules.length)})},[]),$.createElement("div",{className:"banner bg-top-announcement",style:{width:"100%",height:"48px"}},$.createElement("div",{style:{position:"relative",display:"flex",justifyContent:"center",alignItems:"center",paddingLeft:"200px",width:"100%",maxWidth:"100vw",height:"100%",borderBottom:"1px solid #47ebeb26"}},$.createElement("div",{className:"top-announcement-mask",style:{position:"absolute",left:0,top:0,width:"100%",height:"100%",borderBottom:"1px solid #47ebeb26"}},$.createElement("div",{style:{position:"relative",width:"960px",height:"100%",display:"flex",justifyContent:"space-between",margin:"0 auto"}},$.createElement("div",{style:{width:"calc(50% - 300px)",height:"100%",position:"relative"}},$.createElement(Xm,{style:{animationDelay:"1.5s",position:"absolute",top:"2px",right:"220px"},id:"1"}),$.createElement(Xm,{style:{animationDelay:"1s",position:"absolute",top:"8px",right:"100px",transform:"rotate(180deg)"},id:"2"}),$.createElement(sO,{style:{position:"absolute",right:"10px"},id:"3"})),$.createElement("div",{style:{width:"calc(50% - 300px)",height:"100%",position:"relative"}},$.createElement(Xm,{style:{animationDelay:"2s",position:"absolute",top:"6px",right:"180px",transform:"rotate(180deg)"},id:"4"}),$.createElement(Xm,{style:{animationDelay:"0.5s",transitionDelay:"1.3s",position:"absolute",top:"2px",right:"40px"},id:"5"}),$.createElement(sO,{style:{position:"absolute",right:"-70px"},id:"6"})))),$.createElement(EK,{text:SK})))),"GitHubBanner");var EK=W(({text:e})=>$.createElement("a",{className:"gh-link",href:"https://s.refine.dev/github-support",target:"_blank",rel:"noreferrer",style:{position:"absolute",height:"100%",padding:"0 60px",display:"flex",flexWrap:"nowrap",whiteSpace:"nowrap",justifyContent:"center",alignItems:"center",backgroundImage:"linear-gradient(90deg, rgba(31, 63, 72, 0.00) 0%, #1F3F48 10%, #1F3F48 90%, rgba(31, 63, 72, 0.00) 100%)"}},$.createElement("div",{style:{color:"#fff",display:"flex",flexDirection:"row",gap:"8px"}},$.createElement("span",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"}},"⭐️"),$.createElement("span",{className:"text",style:{fontSize:"16px",lineHeight:"24px"}},e),$.createElement("span",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"}},"⭐️"))),"Text"),Xm=W(({style:e,...t})=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:80,height:40,fill:"none",style:{opacity:1,animation:"top-announcement-glow 1s ease-in-out infinite alternate",...e}},$.createElement("circle",{cx:40,r:40,fill:`url(#${t.id}-a)`,fillOpacity:.5}),$.createElement("defs",null,$.createElement("radialGradient",{id:`${t.id}-a`,cx:0,cy:0,r:1,gradientTransform:"matrix(0 40 -40 0 40 0)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#47EBEB"}),$.createElement("stop",{offset:1,stopColor:"#47EBEB",stopOpacity:0})))),"GlowSmall"),sO=W(({style:e,...t})=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:120,height:48,fill:"none",...t,style:{opacity:1,animation:"top-announcement-glow 1s ease-in-out infinite alternate",...e}},$.createElement("circle",{cx:60,cy:24,r:60,fill:`url(#${t.id}-a)`,fillOpacity:.5}),$.createElement("defs",null,$.createElement("radialGradient",{id:`${t.id}-a`,cx:0,cy:0,r:1,gradientTransform:"matrix(0 60 -60 0 60 24)",gradientUnits:"userSpaceOnUse"},$.createElement("stop",{stopColor:"#47EBEB"}),$.createElement("stop",{offset:1,stopColor:"#47EBEB",stopOpacity:0})))),"GlowBig"),PK=W(({status:e,elements:{success:t=$.createElement(Zm,{key:"autoSave.success",defaultMessage:"saved"}),error:n=$.createElement(Zm,{key:"autoSave.error",defaultMessage:"auto save failure"}),loading:r=$.createElement(Zm,{key:"autoSave.loading",defaultMessage:"saving..."}),idle:o=$.createElement(Zm,{key:"autoSave.idle",defaultMessage:"waiting for changes"})}={}})=>{switch(e){case"success":return $.createElement($.Fragment,null,t);case"error":return $.createElement($.Fragment,null,n);case"loading":return $.createElement($.Fragment,null,r);default:return $.createElement($.Fragment,null,o)}},"AutoSaveIndicator"),Zm=W(({key:e,defaultMessage:t})=>{let n=Qe();return $.createElement("span",null,n(e,t))},"Message"),Xn={},Pt={},uw=we&&we.__assign||function(){return uw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},uw.apply(this,arguments)},kK=we&&we.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),$K=we&&we.__setModuleDefault||(Object.create?function(e,t){O Line truncated
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var qn=typeof Symbol=="function"&&Symbol.for,XS=qn?Symbol.for("react.element"):60103,ZS=qn?Symbol.for("react.portal"):60106,py=qn?Symbol.for("react.fragment"):60107,my=qn?Symbol.for("react.strict_mode"):60108,hy=qn?Symbol.for("react.profiler"):60114,gy=qn?Symbol.for("react.provider"):60109,vy=qn?Symbol.for("react.context"):60110,JS=qn?Symbol.for("react.async_mode"):60111,yy=qn?Symbol.for("react.concurrent_mode"):60111,by=qn?Symbol.for("react.forward_ref"):60112,xy=qn?Symbol.for("react.suspense"):60113,rZ=qn?Symbol.for("react.suspense_list"):60120,wy=qn?Symbol.for("react.memo"):60115,Cy=qn?Symbol.for("react.lazy"):60116,oZ=qn?Symbol.for("react.block"):60121,iZ=qn?Symbol.for("react.fundamental"):60117,aZ=qn?Symbol.for("react.responder"):60118,lZ=qn?Symbol.for("react.scope"):60119;function co(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case XS:switch(e=e.type,e){case JS:case yy:case py:case hy:case my:case xy:return e;default:switch(e=e&&e.$$typeof,e){case vy:case by:case Cy:case wy:case gy:return e;default:return t}}case ZS:return t}}}function AD(e){return co(e)===yy}Ft.AsyncMode=JS;Ft.ConcurrentMode=yy;Ft.ContextConsumer=vy;Ft.ContextProvider=gy;Ft.Element=XS;Ft.ForwardRef=by;Ft.Fragment=py;Ft.Lazy=Cy;Ft.Memo=wy;Ft.Portal=ZS;Ft.Profiler=hy;Ft.StrictMode=my;Ft.Suspense=xy;Ft.isAsyncMode=function(e){return AD(e)||co(e)===JS};Ft.isConcurrentMode=AD;Ft.isContextConsumer=function(e){return co(e)===vy};Ft.isContextProvider=function(e){return co(e)===gy};Ft.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===XS};Ft.isForwardRef=function(e){return co(e)===by};Ft.isFragment=function(e){return co(e)===py};Ft.isLazy=function(e){return co(e)===Cy};Ft.isMemo=function(e){return co(e)===wy};Ft.isPortal=function(e){return co(e)===ZS};Ft.isProfiler=function(e){return co(e)===hy};Ft.isStrictMode=function(e){return co(e)===my};Ft.isSuspense=function(e){return co(e)===xy};Ft.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===py||e===yy||e===hy||e===my||e===xy||e===rZ||typeof e=="object"&&e!==null&&(e.$$typeof===Cy||e.$$typeof===wy||e.$$typeof===gy||e.$$typeof===vy||e.$$typeof===by||e.$$typeof===iZ||e.$$typeof===aZ||e.$$typeof===lZ||e.$$typeof===oZ)};Ft.typeOf=co;FD.exports=Ft;var sZ=FD.exports,LD=sZ,uZ={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},cZ={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},DD={};DD[LD.ForwardRef]=uZ;DD[LD.Memo]=cZ;var dZ=!0;function fZ(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):r+=o+" "}),r}var ND=function(t,n,r){var o=t.key+"-"+n.name;(r===!1||dZ===!1)&&t.registered[o]===void 0&&(t.registered[o]=n.styles)},zD=function(t,n,r){ND(t,n,r);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function pZ(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mZ={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hZ=/[A-Z]|^ms/g,gZ=/_EMO_([^_]+?)_([^]*?)_EMO_/g,jD=function(t){return t.charCodeAt(1)===45},kO=function(t){return t!=null&&typeof t!="boolean"},Vb=PD(function(e){return jD(e)?e:e.replace(hZ,"-$&").toLowerCase()}),$O=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(gZ,function(r,o,i){return Ri={name:o,styles:i,next:Ri},o})}return mZ[t]!==1&&!jD(t)&&typeof n=="number"&&n!==0?n+"px":n};function fp(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Ri={name:n.name,styles:n.styles,next:Ri},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Ri={name:r.name,styles:r.styles,next:Ri},r=r.next;var o=n.styles+";";return o}return vZ(e,t,n)}case"function":{if(e!==void 0){var i=Ri,a=n(e);return Ri=i,fp(e,t,a)}break}}if(t==null)return n;Line truncated
* @mui/styled-engine v5.15.11
*
* @license MIT
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/function tE(e,t){return Sw(e,t)}const WD=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},OZ=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:VD,StyledEngineProvider:$Z,ThemeContext:Gp,css:Vc,default:tE,internal_processStyles:WD,keyframes:ls},Symbol.toStringTag,{value:"Module"}));function Sa(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function GD(e){if(!Sa(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=GD(e[n])}),t}function Er(e,t,n={clone:!0}){const r=n.clone?O({},e):e;return Sa(e)&&Sa(t)&&Object.keys(t).forEach(o=>{o!=="__proto__"&&(Sa(t[o])&&o in e&&Sa(e[o])?r[o]=Er(e[o],t[o],n):n.clone?r[o]=Sa(t[o])?GD(t[o]):t[o]:r[o]=t[o])}),r}const MZ=Object.freeze(Object.defineProperty({__proto__:null,default:Er,isPlainObject:Sa},Symbol.toStringTag,{value:"Module"})),RZ=["values","unit","step"],TZ=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>O({},n,{[r.key]:r.val}),{})};function qD(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,o=ce(e,RZ),i=TZ(t),a=Object.keys(i);function l(f){return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n})`}function s(f){return`@media (max-width:${(typeof t[f]=="number"?t[f]:f)-r/100}${n})`}function u(f,m){const p=a.indexOf(m);return`@media (min-width:${typeof t[f]=="number"?t[f]:f}${n}) and (max-width:${(p!==-1&&typeof t[a[p]]=="number"?t[a[p]]:m)-r/100}${n})`}function c(f){return a.indexOf(f)+1<a.length?u(f,a[a.indexOf(f)+1]):l(f)}function d(f){const m=a.indexOf(f);return m===0?l(a[1]):m===a.length-1?s(a[m]):u(f,a[a.indexOf(f)+1]).replace("@media","@media not all and")}return O({keys:a,values:i,up:l,down:s,between:u,only:c,not:d,unit:n},o)}const _Z={borderRadius:4},FZ=_Z;function Rf(e,t){return t?Er(e,t,{clone:!1}):e}const nE={xs:0,sm:600,md:900,lg:1200,xl:1536},TO={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${nE[e]}px)`};function Br(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const i=r.breakpoints||TO;return t.reduce((a,l,s)=>(a[i.up(i.keys[s])]=n(t[s]),a),{})}if(typeof t=="object"){const i=r.breakpoints||TO;return Object.keys(t).reduce((a,l)=>{if(Object.keys(i.values||nE).indexOf(l)!==-1){const s=i.up(l);a[s]=n(t[l],l)}else{const s=l;a[s]=t[s]}return a},{})}return n(t)}function KD(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,o)=>{const i=e.up(o);return r[i]={},r},{}))||{}}function QD(e,t){return e.reduce((n,r)=>{const o=n[r];return(!o||Object.keys(o).length===0)&&delete n[r],n},t)}function AZ(e,...t){const n=KD(e),r=[n,...t].reduce((o,i)=>Er(o,i),{});return QD(Object.keys(n),r)}function LZ(e,t){if(typeof e!="object")return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach((o,i)=>{i<e.length&&(n[o]=!0)}):r.forEach(o=>{e[o]!=null&&(n[o]=!0)}),n}function zs({values:e,breakpoints:t,base:n}){const r=n||LZ(e,t),o=Object.keys(r);if(o.length===0)return e;let i;return o.reduce((a,l,s)=>(Array.isArray(e)?(a[l]=e[s]!=null?e[s]:e[i],i=s):typeof e=="object"?(a[l]=e[l]!=null?e[l]:e[i],i=l):a[l]=e,a),{})}function pe(e){if(typeof e!="string")throw new Error(Ba(7));return e.charAt(0).toUpperCase()+e.slice(1)}const DZ=Object.freeze(Object.defineProperty({__proto__:null,default:pe},Symbol.toStringTag,{value:"Module"}));function Wc(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((o,i)=>o&&o[i]?o[i]:null,e);if(r!=null)return r}return t.split(".").reduce((r,o)=>r&&r[o]!=null?r[o]:null,e)}function Xg(e,t,n,r=n){let o;return typeof e=="function"?o=e(n):Array.isArray(e)?o=e[n]||r:o=Wc(e,n)||r,t&&(o=t(o,r,e)),o}function wn(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=a=>{if(a[t]==null)return null;const l=a[t],s=a.theme,u=Wc(s,r)||{};return Br(a,l,d=>{let f=Xg(u,o,d);return d===f&&typeof d=="string"&&(f=Xg(u,o,`${t}${d==="default"?"":pe(d)}`,d)),n===!1?f:{[n]:f}})};return i.propTypes={},i.filterProps=[t],i}function NZ(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const zZ={m:"margin",p:"padding"},jZ={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},_O={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},BZ=NZ(e=>{if(e.length>2)if(_O[e])e=_O[e];else return[e];const[t,n]=e.split(""),r=zZ[t],o=jZ[n]||"";return Array.isArray(o)?o.map(i=>r+i):[r+o]}),rE=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],oE=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...rE,...oE];function qp(e,t,n,Line truncated
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var sE=Symbol.for("react.element"),uE=Symbol.for("react.portal"),Oy=Symbol.for("react.fragment"),My=Symbol.for("react.strict_mode"),Ry=Symbol.for("react.profiler"),Ty=Symbol.for("react.provider"),_y=Symbol.for("react.context"),LJ=Symbol.for("react.server_context"),Fy=Symbol.for("react.forward_ref"),Ay=Symbol.for("react.suspense"),Ly=Symbol.for("react.suspense_list"),Dy=Symbol.for("react.memo"),Ny=Symbol.for("react.lazy"),DJ=Symbol.for("react.offscreen"),oN;oN=Symbol.for("react.module.reference");function qo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case sE:switch(e=e.type,e){case Oy:case Ry:case My:case Ay:case Ly:return e;default:switch(e=e&&e.$$typeof,e){case LJ:case _y:case Fy:case Ny:case Dy:case Ty:return e;default:return t}}case uE:return t}}}At.ContextConsumer=_y;At.ContextProvider=Ty;At.Element=sE;At.ForwardRef=Fy;At.Fragment=Oy;At.Lazy=Ny;At.Memo=Dy;At.Portal=uE;At.Profiler=Ry;At.StrictMode=My;At.Suspense=Ay;At.SuspenseList=Ly;At.isAsyncMode=function(){return!1};At.isConcurrentMode=function(){return!1};At.isContextConsumer=function(e){return qo(e)===_y};At.isContextProvider=function(e){return qo(e)===Ty};At.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===sE};At.isForwardRef=function(e){return qo(e)===Fy};At.isFragment=function(e){return qo(e)===Oy};At.isLazy=function(e){return qo(e)===Ny};At.isMemo=function(e){return qo(e)===Dy};At.isPortal=function(e){return qo(e)===uE};At.isProfiler=function(e){return qo(e)===Ry};At.isStrictMode=function(e){return qo(e)===My};At.isSuspense=function(e){return qo(e)===Ay};At.isSuspenseList=function(e){return qo(e)===Ly};At.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Oy||e===Ry||e===My||e===Ay||e===Ly||e===DJ||typeof e=="object"&&e!==null&&(e.$$typeof===Ny||e.$$typeof===Dy||e.$$typeof===Ty||e.$$typeof===_y||e.$$typeof===Fy||e.$$typeof===oN||e.getModuleId!==void 0)};At.typeOf=qo;rN.exports=At;var AO=rN.exports;const NJ=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function iN(e){const t=`${e}`.match(NJ);return t&&t[1]||""}function aN(e,t=""){return e.displayName||e.name||iN(e)||t}function LO(e,t,n){const r=aN(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function zJ(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return aN(e,"Component");if(typeof e=="object")switch(e.$$typeof){case AO.ForwardRef:return LO(e,e.render,"ForwardRef");case AO.Memo:return LO(e,e.type,"memo");default:return}}}const jJ=Object.freeze(Object.defineProperty({__proto__:null,default:zJ,getFunctionName:iN},Symbol.toStringTag,{value:"Module"})),BJ=["ownerState"],HJ=["variants"],UJ=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function VJ(e){return Object.keys(e).length===0}function WJ(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Wb(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const GJ=md(),qJ=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function nh({defaultTheme:e,theme:t,themeId:n}){return VJ(t)?e:t[n]||t}function KJ(e){return e?(t,n)=>n[e]:null}function Yh(e,t){let{ownerState:n}=t,r=ce(t,BJ);const o=typeof e=="function"?e(O({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap(i=>Yh(i,O({ownerState:n},r)));if(o&&typeof o=="object"&&Array.isArray(o.variants)){const{variants:i=[]}=o;let l=ce(o,HJ);return i.forEach(s=>{let u=!0;typeof s.props=="function"?u=s.props(O({ownerState:n},r,n)):Object.keys(s.props).forEach(c=>{(n==null?void 0:n[c])!==s.props[c]&&r[c]!==s.props[c]&&(u=!1)}),u&&(Array.isArray(l)||(l=[l]),l.push(typeof s.style=="function"?s.style(O({ownerState:n},r,n)):s.style))}),l}return o}function QJ(e={}){const{themeId:t,defaultTheme:n=GJ,rootShouldForwardProp:r=Wb,slotShouldForwardProp:o=Wb}=e,i=a=>Qp(O({},a,{theme:nh(O({},a,{defaultTheme:n,themeId:t}))}));return i.__mui_systemSx=!0,(a,l={})=>{WD(a,P=>P.filter(C=>!(C!=null&&C.__mui_systemSx)));const{name:s,slot:u,skipVariantsResolver:c,skipSx:d,overridesResolver:f=KJ(qJ(u))}=l,m=ce(l,UJ),p=c!==void 0?c:u&&u!=="Root"&&u!=="root"||!1,h=d||!1;let y,b=Wb;u==="Root"||u==="root"?b=r:u?b=o:WJ(a)&&(b=void 0);const g=tE(a,O({shouldForwardProp:b,label:y},m)),x=P=>typeof P=="function"&&P.__emotion_real!==P||Sa(P)?C=>Yh(P,O({},C,{theme:nh({theme:C.theme,defaultTheme:n,themeId:t})})):P,w=(P,...C)=>{let E=x(P);const S=C?C.map(x):[];s&&f&&S.push(M=>{const _=nh(O({},M,{defaultTheme:n,themeId:t}));if(!_.components||!_.components[s]||!_.components[s].styleOverrides)return null;const D=_.components[s].styleOverrides,T={};return Object.entries(D).forEach(([F,N])=>{T[F]=Yh(N,O({},M,{theme:_}))}),f(M,T)}),s&&!p&&S.push(M=>{var _;const D=nh(O({},M,{defaultTheme:n,themeId:t})),T=D==null||(_=D.components)==null||(_=_[s])==null?void 0:_.variants;return Yh({variants:T},O({},M,{theme:D}))}),h||S.push(i);const R=S.length-C.length;if(Array.isArray(P)&&R>0){const M=new Array(R).fill("");E=[...P,...M],E.raw=[...P.raw,...M]}const I=g(E,...S);return a.muiName&&(I.muiName=a.muiName),I};return g.withConfLine truncated
10.59L10 14.17L17.59 6.58L19 8L10 17Z`}))},Lne=function(t){return $.createElement(Xl,Object.assign({},t),$.createElement("path",{d:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"}))},Dne=function(t){return $.createElement(Xl,Object.assign({},t),$.createElement("path",{d:`M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,
6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,
13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z`}))},Nne=function(t){return $.createElement(Xl,Object.assign({},t),$.createElement("path",{d:`M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,
0 22,12A10,10 0 0,0 12,2Z`}))},ah={fontSize:20,marginInlineEnd:8},zne={default:void 0,success:$.createElement(Ane,{style:ah}),warning:$.createElement(Lne,{style:ah}),error:$.createElement(Dne,{style:ah}),info:$.createElement(Nne,{style:ah})};function Ff(e,t){return e.reduce(function(n,r){return r==null?n:function(){for(var i=arguments.length,a=new Array(i),l=0;l<i;l++)a[l]=arguments[l];var s=[].concat(a);t&&s.indexOf(t)===-1&&s.push(t),n.apply(this,s),r.apply(this,s)}},function(){})}var jne=typeof window<"u"?v.useLayoutEffect:v.useEffect;function rM(e){var t=v.useRef(e);return jne(function(){t.current=e}),v.useCallback(function(){return t.current.apply(void 0,arguments)},[])}var Bne=v.forwardRef(function(e,t){var n=e.children,r=e.autoHideDuration,o=e.ClickAwayListenerProps,i=e.disableWindowBlurListener,a=i===void 0?!1:i,l=e.onClose,s=e.onMouseEnter,u=e.onMouseLeave,c=e.open,d=e.resumeHideDuration,f=Vl(e,["children","autoHideDuration","ClickAwayListenerProps","disableWindowBlurListener","onClose","onMouseEnter","onMouseLeave","open","resumeHideDuration"]),m=v.useRef(),p=rM(function(){l&&l.apply(void 0,arguments)}),h=rM(function(P){!l||P==null||(clearTimeout(m.current),m.current=setTimeout(function(){p(null,El.TIMEOUT)},P))});v.useEffect(function(){return c&&h(r),function(){clearTimeout(m.current)}},[c,r,h]);var y=function(){clearTimeout(m.current)},b=v.useCallback(function(){r!=null&&h(d??r*.5)},[r,d,h]),g=function(C){s&&s(C),y()},x=function(C){u&&u(C),b()},w=function(C){l&&l(C,El.CLICKAWAY)};return v.useEffect(function(){if(!a&&c)return window.addEventListener("focus",b),window.addEventListener("blur",y),function(){window.removeEventListener("focus",b),window.removeEventListener("blur",y)}},[a,b,c]),v.createElement(xE,Yt({onClickAway:w},o),v.createElement("div",Yt({onMouseEnter:g,onMouseLeave:x,ref:t},f),n))}),pa="SnackbarItem",yr={contentRoot:pa+"-contentRoot",lessPadding:pa+"-lessPadding",variantSuccess:pa+"-variantSuccess",variantError:pa+"-variantError",variantInfo:pa+"-variantInfo",variantWarning:pa+"-variantWarning",message:pa+"-message",action:pa+"-action",wrappedRoot:pa+"-wrappedRoot"},Hne=fe(Bne)(function(e){var t,n=e.theme,r=n.palette.mode||n.palette.type,o=ree(n.palette.background.default,r==="light"?.8:.98);return t={},t["&."+yr.wrappedRoot]={position:"relative",transform:"translateX(0)",top:0,right:0,bottom:0,left:0},t["."+yr.contentRoot]=Yt({},n.typography.body2,{backgroundColor:o,color:n.palette.getContrastText(o),alignItems:"center",padding:"6px 16px",borderRadius:"4px",boxShadow:"0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)"}),t["."+yr.lessPadding]={paddingLeft:8*2.5},t["."+yr.variantSuccess]={backgroundColor:"#43a047",color:"#fff"},t["."+yr.variantError]={backgroundColor:"#d32f2f",color:"#fff"},t["."+yr.variantInfo]={backgroundColor:"#2196f3",color:"#fff"},t["."+yr.variantWarning]={backgroundColor:"#ff9800",color:"#fff"},t["."+yr.message]={display:"flex",alignItems:"center",padding:"8px 0"},t["."+yr.action]={display:"flex",alignItems:"center",marginLeft:"auto",paddingLeft:16,marginRight:-8},t}),Une=function(t){var n=t.classes,r=Vl(t,["classes"]),o=v.useRef(),i=v.useState(!0),a=i[0],l=i[1];v.useEffect(function(){return function(){o.current&&clearTimeout(o.current)}},[]);var s=Ff([r.snack.onClose,r.onClose],r.snack.key),u=function(){r.snack.requestClose&&s(null,El.INSTRCUTED)},c=function(){o.current=setTimeout(function(){l(!a)},125)},d=r.style,f=r.ariaAttributes,m=r.className,p=r.hideIconVariant,h=r.iconVariant,y=r.snack,b=r.action,g=r.content,x=r.TransitionComponent,w=r.TransitionProps,P=r.transitionDuration,C=Vl(r,["style","dense","ariaAttributes","className","hideIconVariant","iconVariant","snack","action","content","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),E=y.key,S=y.open,R=y.className,I=y.variant,M=y.content,_=y.action,D=y.ariaAttributes,T=y.anchorOrigin,F=y.message,N=y.TransitionComponent,k=y.TransitionProps,L=y.transitionDuration,j=Vl(y,["persist","key","open","entered","requestClose","className","variant","content","action","ariaAttributes","anchorOrigin","message","TransitionComponent","TransitionProps","transitionDuration","onEnter","onEntered","onEntering","onExit","onExited","onExiting"]),B=Yt({},zne,{},h)[I],A=Yt({"aria-describedby":"notistack-snackbar"},Qb(D,f)),H=N||x||_s.TransitionComponent,q=Qb(L,P,_s.transitionDuration),V=Yt({direction:Fne(T)},Qb(k,w)),G=_||b;typeof G=="function"&&(G=G(E));var Y=M||g;typeof Y=="function"&&(Y=Y(E,y.message));var re=["onEnter","onEntering","onEntered","onExit","onExiting","onExited"].reduce(function(le,J){var oe;return Yt({},le,(oe={},oe[J]=Ff([r.snack[J],r[J]],r.snack.key),oe))},{});return $.createElement(Wy,{unmountOnExit:!0,timeout:175,in:a,onExited:re.onExited},$.createElement(Hne,Object.assign({},C,j,{open:S,className:sp(n.root,yr.wrappedRoot,n[eg.toAnchorOrigin(T)]),onClose:s}),$.creat Line truncated
0% {
transform: scale(0);
opacity: 0.1;
}
100% {
transform: scale(1);
opacity: 0.3;
}
`)),ooe=ls(uM||(uM=Gy`
0% {
opacity: 1;
}
100% {
opacity: 0;
}
`)),ioe=ls(cM||(cM=Gy`
0% {
transform: scale(1);
}
50% {
transform: scale(0.92);
}
100% {
transform: scale(1);
}
`)),aoe=fe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),loe=fe(Jre,{name:"MuiTouchRipple",slot:"Ripple"})(dM||(dM=Gy`
opacity: 0;
position: absolute;
&.${0} {
opacity: 0.3;
transform: scale(1);
animation-name: ${0};
animation-duration: ${0}ms;
animation-timing-function: ${0};
}
&.${0} {
animation-duration: ${0}ms;
}
& .${0} {
opacity: 1;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
background-color: currentColor;
}
& .${0} {
opacity: 0;
animation-name: ${0};
animation-duration: ${0}ms;
animation-timing-function: ${0};
}
& .${0} {
position: absolute;
/* @noflip */
left: 0px;
top: 0;
animation-name: ${0};
animation-duration: 2500ms;
animation-timing-function: ${0};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
`),Eo.rippleVisible,roe,Iw,({theme:e})=>e.transitions.easing.easeInOut,Eo.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,Eo.child,Eo.childLeaving,ooe,Iw,({theme:e})=>e.transitions.easing.easeInOut,Eo.childPulsate,ioe,({theme:e})=>e.transitions.easing.easeInOut),soe=v.forwardRef(function(t,n){const r=qe({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a}=r,l=ce(r,toe),[s,u]=v.useState([]),c=v.useRef(0),d=v.useRef(null);v.useEffect(()=>{d.current&&(d.current(),d.current=null)},[s]);const f=v.useRef(!1),m=Ts(),p=v.useRef(null),h=v.useRef(null),y=v.useCallback(w=>{const{pulsate:P,rippleX:C,rippleY:E,rippleSize:S,cb:R}=w;u(I=>[...I,z.jsx(loe,{classes:{ripple:ve(i.ripple,Eo.ripple),rippleVisible:ve(i.rippleVisible,Eo.rippleVisible),ripplePulsate:ve(i.ripplePulsate,Eo.ripplePulsate),child:ve(i.child,Eo.child),childLeaving:ve(i.childLeaving,Eo.childLeaving),childPulsate:ve(i.childPulsate,Eo.childPulsate)},timeout:Iw,pulsate:P,rippleX:C,rippleY:E,rippleSize:S},c.current)]),c.current+=1,d.current=R},[i]),b=v.useCallback((w={},P={},C=()=>{})=>{const{pulsate:E=!1,center:S=o||P.pulsate,fakeElement:R=!1}=P;if((w==null?void 0:w.type)==="mousedown"&&f.current){f.current=!1;return}(w==null?void 0:w.type)==="touchstart"&&(f.current=!0);const I=R?null:h.current,M=I?I.getBoundingClientRect():{width:0,height:0,left:0,top:0};let _,D,T;if(S||w===void 0||w.clientX===0&&w.clientY===0||!w.clientX&&!w.touches)_=Math.round(M.width/2),D=Math.round(M.height/2);else{const{clientX:F,clientY:N}=w.touches&&w.touches.length>0?w.touches[0]:w;_=Math.round(F-M.left),D=Math.round(N-M.top)}if(S)T=Math.sqrt((2*M.width**2+M.height**2)/3),T%2===0&&(T+=1);else{const F=Math.max(Math.abs((I?I.clientWidth:0)-_),_)*2+2,N=Math.max(Math.abs((I?I.clientHeight:0)-D),D)*2+2;T=Math.sqrt(F**2+N**2)}w!=null&&w.touches?p.current===null&&(p.current=()=>{y({pulsate:E,rippleX:_,rippleY:D,rippleSize:T,cb:C})},m.start(noe,()=>{p.current&&(p.current(),p.current=null)})):y({pulsate:E,rippleX:_,rippleY:D,rippleSize:T,cb:C})},[o,y,m]),g=v.useCallback(()=>{b({},{pulsate:!0})},[b]),x=v.useCallback((w,P)=>{if(m.clear(),(w==null?void 0:w.type)==="touchend"&&p.current){p.current(),p.current=null,m.start(0,()=>{x(w,P)});return}p.current=null,u(C=>C.length>0?C.slice(1):C),d.current=P},[m]);return v.useImperativeHandle(n,()=>({pulsate:g,start:b,stop:x}),[g,b,x]),z.jsx(aoe,O({className:ve(Eo.root,i.root,a),ref:h},l,{children:z.jsx(EX,{component:null,exit:!0,children:s})}))}),uoe=soe;function coe(e){return We("MuiButtonBase",e)}const doe=Ge("MuiButtonBase",["root","disabled","focusVisible"]),foe=doe,poe=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],moe=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,a=Oe({root:["root",t&&"disabled",n&&"focusVisible"]},coe,o);return n&&r&&(a.root+=` ${r}`),a},hoe=fe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${foe.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),goe=v.forwardRef(function(t,n){const r=qe({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:l,component:s="button",disabled:u=!1,disableRipple:c=!1,disableTouchRipple:d=!1,focusRipple:f=!1,LinkComponent:m="a",onBlur:p,onClick:h,onContextMenu:y,onDragLeave:b,onFocus:g,onFocusVisible:x,onKeyDown:w,onKeyUp:P,onMouseDown:C,onMouseLeave:E,onMouseUp:S,onTouchEnd:R,onTouchMove:I,onTouchStart:M,tabIndex:_=0,TouchRippleProps:D,touchRippleRef:T,type:F}=r,N=ce(r,poe),k=v.useRef(null),L=v.useRef(null),j=xt(L,T),{isFocusVisibleRef:B,onFocus:A,onBlur:H,ref:q}=Hy(),[V,G]=v.useState(!1);u&&V&&G(!1),v.useImperativeHandle(o,()=>({focusVisible:()=>{G(!0),k.current.focus()}}),[]);const[Y,re]=v.useState(!1);v.useEffect(()=>{re(!0)},[]);const le=Y&&!c&&!u;v.useEffect(()=>{V&&f&&!c&&Y&&L.current.pulsate()},[c,f,V,Y]);function J(X,Ee,Le=d){return Zt(Te=>(Ee&&Ee(Te),!Le&&L.current&&L.current[X](Te),!0))}const oe=J("start",C),ue=J("stop",y),ge=J("stop",b),me=J("stop",S),ke=J("stop",X=>{V&&X.preventDefault(),E&&E(X)}),be=J("start",M),ie=J("stop",R),ye=J("stop",I),U=J("stop",X=>{H(X),B.current===!1&&G(!1),p&&p(X)},!1),Q=Zt(X=>{k.current||(k.current=X.currentTarget),A(X),B.current===!0&&(G(!0),x&&x(X)), Line truncated
`));return e}const i4=v.createContext(void 0),Be=()=>{const e=v.useContext(i4);if(!e)throw new Error("MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.");return e},a4=v.createContext(void 0);function us(){const e=v.useContext(a4);if(e===void 0)throw new Error(["MUI: Could not find the data grid private context.","It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.","This can also happen if you are bundling multiple versions of the data grid."].join(`
`));return e}const PM={};function HE(e,t){const n=v.useRef(PM);return n.current===PM&&(n.current=e(t)),n}const Zle=[];function l4(e){v.useEffect(e,Zle)}const ra=(e,t="warning")=>{let n=!1;const r=Array.isArray(e)?e.join(`
`):e;return()=>{n||(n=!0,t==="error"?console.error(r):console.warn(r))}},Jle=Object.is;function s4(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(const o in e)if(n+=1,!Jle(e[o],t[o])||!(o in t))return!1;for(const o in t)r+=1;return n===r}ra(["MUI: `useGridSelector` has been called before the initialization of the state.","This hook can only be used inside the context of the grid."]);function ese(e){return e.acceptsApiRef}function kM(e,t){return ese(t)?t(e):t(e.current.state)}const tse=Object.is,UE=s4,nse=()=>({state:null,equals:null,selector:null}),De=(e,t,n=tse)=>{const r=HE(nse),o=r.current.selector!==null,[i,a]=v.useState(o?null:kM(e,t));return r.current.state=i,r.current.equals=n,r.current.selector=t,l4(()=>e.current.store.subscribe(()=>{const l=kM(e,r.current.selector);r.current.equals(r.current.state,l)||(r.current.state=l,a(l))})),i};function ft(e){return We("MuiDataGrid",e)}const ne=Ge("MuiDataGrid",["actionsCell","aggregationColumnHeader","aggregationColumnHeader--alignLeft","aggregationColumnHeader--alignCenter","aggregationColumnHeader--alignRight","aggregationColumnHeaderLabel","autoHeight","autosizing","booleanCell","cell--editable","cell--editing","cell--textCenter","cell--textLeft","cell--textRight","cell--withRenderer","cell--rangeTop","cell--rangeBottom","cell--rangeLeft","cell--rangeRight","cell--selectionMode","cell","cellContent","cellCheckbox","cellSkeleton","checkboxInput","columnHeader--alignCenter","columnHeader--alignLeft","columnHeader--alignRight","columnHeader--dragging","columnHeader--moving","columnHeader--numeric","columnHeader--sortable","columnHeader--sorted","columnHeader--filtered","columnHeader","columnHeaderCheckbox","columnHeaderDraggableContainer","columnHeaderDropZone","columnHeaderTitle","columnHeaderTitleContainer","columnHeaderTitleContainerContent","columnGroupHeader","columnHeader--filledGroup","columnHeader--emptyGroup","columnHeader--showColumnBorder","columnHeaders","columnHeadersInner","columnHeadersInner--scrollable","columnSeparator--resizable","columnSeparator--resizing","columnSeparator--sideLeft","columnSeparator--sideRight","columnSeparator","columnsPanel","columnsPanelRow","detailPanel","detailPanels","detailPanelToggleCell","detailPanelToggleCell--expanded","footerCell","panel","panelHeader","panelWrapper","panelContent","panelFooter","paper","editBooleanCell","editInputCell","filterForm","filterFormDeleteIcon","filterFormLogicOperatorInput","filterFormColumnInput","filterFormOperatorInput","filterFormValueInput","filterIcon","footerContainer","headerFilterRow","iconButtonContainer","iconSeparator","main","menu","menuIcon","menuIconButton","menuOpen","menuList","overlay","overlayWrapper","overlayWrapperInner","root","root--densityStandard","root--densityComfortable","root--densityCompact","root--disableUserSelection","row","row--editable","row--editing","row--lastVisible","row--dragging","row--dynamicHeight","row--detailPanelExpanded","rowReorderCellPlaceholder","rowCount","rowReorderCellContainer","rowReorderCell","rowReorderCell--draggable","scrollArea--left","scrollArea--right","scrollArea","selectedRowCount","sortIcon","toolbarContainer","toolbarFilterList","virtualScroller","virtualScrollerContent","virtualScrollerContent--overflowed","virtualScrollerRenderZone","pinnedColumns","pinnedColumns--left","pinnedColumns--right","pinnedColumnHeaders","pinnedColumnHeaders--left","pinnedColumnHeaders--right","withBorderColor","cell--withRightBorder","columnHeader--withRightBorder","treeDataGroupingCell","treeDataGroupingCellToggle","groupingCriteriaCell","groupingCriteriaCellToggle","pinnedRows","pinnedRows--top","pinnedRows--bottom","pinnedRowsRenderZone"]);var nv="NOT_FOUND";function rse(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:nv},put:function(r,o){t={key:r,value:o}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function ose(e,t){var n=[];function r(l){var s=n.findIndex(function(c){return t(l,c.key)});if(s>-1){var u=n[s];return s>0&&(n.splice(s,1),n.unshift(u)),u.value}return nv}function o(l,s){r(l)===nv&&(n.unshift({key:l,value:s}),n.length>e&&n.pop())}function i(){return n}function a(){n=[]}return{get:r,put:o,getEntries:i,clear:a}}var ise=function(t,n){return t===n};function ase(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var o=n.length,i=0;i<o;i++)if(!e(n[i],r[i]))return!1;return!0}}function t0(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,o=r===void 0?ise:r,i=n.maxSize,a=i===void 0?1:i,l=n.resultEqualityCheck,s=ase(o),u=a===1?rse(s):ose(a,s);function c(){var d=u.get(arguments);if(d===nv){if(d=e.apply(null,arguments),l){var f=u.getEntries(),m=f.find(function(p){return l(p.value,d)});m&&(d=m.value)}u.put(arguments,d)}return d}return c.clearCache=function(){return u.clear()},c}function lse(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){ Line truncated
`))}const av=(e,t,n)=>{const r=t?t(e):e.id;return Fse(r,e,n),r},ng=({rows:e,getRowId:t,loading:n,rowCount:r})=>{const o={type:"full",rows:[]},i={},a={};for(let l=0;l<e.length;l+=1){const s=e[l],u=av(s,t);i[u]=s,a[u]=u,o.rows.push(u)}return{rowsBeforePartialUpdates:e,loadingPropBeforePartialUpdates:n,rowCountPropBeforePartialUpdates:r,updates:o,dataRowIdToIdLookup:a,dataRowIdToModelLookup:i}},v4=({tree:e,rowCountProp:t=0})=>{const n=e[wr];return Math.max(t,n.children.length+(n.footerId==null?0:1))},y4=({apiRef:e,rowCountProp:t=0,loadingProp:n,previousTree:r,previousTreeDepths:o})=>{const i=e.current.caches.rows,{tree:a,treeDepths:l,dataRowIds:s,groupingName:u}=e.current.applyStrategyProcessor("rowTreeCreation",{previousTree:r,previousTreeDepths:o,updates:i.updates,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIdToModelLookup:i.dataRowIdToModelLookup}),c=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:a,treeDepths:l,dataRowIdToIdLookup:i.dataRowIdToIdLookup,dataRowIds:s,dataRowIdToModelLookup:i.dataRowIdToModelLookup});return e.current.caches.rows.updates={type:"partial",actions:{insert:[],modify:[],remove:[]},idToActionLookup:{}},O({},c,{totalRowCount:Math.max(t,c.dataRowIds.length),totalTopLevelRowCount:v4({tree:c.tree,rowCountProp:t}),groupingName:u,loading:n})},bp=e=>e.type==="skeletonRow"||e.type==="footer"||e.type==="group"&&e.isAutoGenerated||e.type==="pinnedRow"&&e.isAutoGenerated,QE=(e,t,n)=>{const r=e[t];if(r.type!=="group")return[];const o=[];for(let i=0;i<r.children.length;i+=1){const a=r.children[i];(!n||!bp(e[a]))&&o.push(a);const l=QE(e,a,n);for(let s=0;s<l.length;s+=1)o.push(l[s])}return!n&&r.footerId!=null&&o.push(r.footerId),o},Ase=({previousCache:e,getRowId:t,updates:n})=>{var r,o,i;if(e.updates.type==="full")throw new Error("MUI: Unable to prepare a partial update if a full update is not applied yet");const a=new Map;n.forEach(f=>{const m=av(f,t,"A row was provided without id when calling updateRows():");a.has(m)?a.set(m,O({},a.get(m),f)):a.set(m,f)});const l={type:"partial",actions:{insert:[...(r=e.updates.actions.insert)!=null?r:[]],modify:[...(o=e.updates.actions.modify)!=null?o:[]],remove:[...(i=e.updates.actions.remove)!=null?i:[]]},idToActionLookup:O({},e.updates.idToActionLookup)},s=O({},e.dataRowIdToModelLookup),u=O({},e.dataRowIdToIdLookup),c={insert:{},modify:{},remove:{}};a.forEach((f,m)=>{const p=l.idToActionLookup[m];if(f._action==="delete"){if(p==="remove"||!s[m])return;p!=null&&(c[p][m]=!0),l.actions.remove.push(m),delete s[m],delete u[m];return}const h=s[m];if(h){p==="remove"?(c.remove[m]=!0,l.actions.modify.push(m)):p==null&&l.actions.modify.push(m),s[m]=O({},h,f);return}p==="remove"?(c.remove[m]=!0,l.actions.insert.push(m)):p==null&&l.actions.insert.push(m),s[m]=f,u[m]=m});const d=Object.keys(c);for(let f=0;f<d.length;f+=1){const m=d[f],p=c[m];Object.keys(p).length>0&&(l.actions[m]=l.actions[m].filter(h=>!p[h]))}return{dataRowIdToModelLookup:s,dataRowIdToIdLookup:u,updates:l,rowsBeforePartialUpdates:e.rowsBeforePartialUpdates,loadingPropBeforePartialUpdates:e.loadingPropBeforePartialUpdates,rowCountPropBeforePartialUpdates:e.rowCountPropBeforePartialUpdates}};function b4(e){var t,n;const r=yd(e),o=(r==null||(t=r.top)==null?void 0:t.reduce((a,l)=>(a+=e.current.unstable_getRowHeight(l.id),a),0))||0,i=(r==null||(n=r.bottom)==null?void 0:n.reduce((a,l)=>(a+=e.current.unstable_getRowHeight(l.id),a),0))||0;return{top:o,bottom:i}}function x4(e,t){const n=bd(e);return`var(--DataGrid-overlayHeight, ${2*Math.floor(t*n)}px)`}const Lse=Dn("div",{name:"MuiDataGrid",slot:"OverlayWrapper",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapper})(({overlayType:e})=>({position:"sticky",top:0,left:0,width:0,height:0,zIndex:e==="loadingOverlay"?5:4})),Dse=Dn("div",{name:"MuiDataGrid",slot:"OverlayWrapperInner",shouldForwardProp:e=>e!=="overlayType",overridesResolver:(e,t)=>t.overlayWrapperInner})({}),Nse=e=>{const{classes:t}=e;return Oe({root:["overlayWrapper"],inner:["overlayWrapperInner"]},ft,t)};function zse(e){var t,n;const r=dt(),o=Be(),[i,a]=v.useState(()=>{var c,d;return(c=(d=r.current.getRootDimensions())==null?void 0:d.viewportInnerSize)!=null?c:null}),l=v.useCallback(()=>{var c,d;a((c=(d=r.current.getRootDimensions())==null?void 0:d.viewportInnerSize)!=null?c:null)},[r]);_t(()=>r.current.subscribeEvent("viewportInnerSizeChange",l),[r,l]);let s=(t=i==null?void 0:i.height)!=null?t:0;o.autoHeight&&s===0&&(s=x4(r,o.rowHeight));const u=Nse(O({},e,{classes:o.classes}));return i?z.jsx(Lse,{className:ve(u.root),overlayType:e.overlayType,children:z.jsx(Dse,O({className:ve(u.inner),style:{height:s,width:(n=i==null?void 0:i.width)!=null?n:0}},e))}):null}function jse(){const e=dt(),t=Be(),n=De(e,o0),r=De(e,h4),o=De(e,mse),i=!o&&n===0,a=!o&&n>0&&r===0;let l=null,s="";if(i){var u;l=z.jsx(t.slots.noRowsOverlay,O({},(u=t.slotProps)==null?void 0:u.noRowsOverlay)),s="noRowsOverlay"}if(a){var c;l=z.jsx(t.slots.noResultsOverlay,O({},(c=t.slotProps)==null?void 0 Line truncated
`&&(x.value+=" ");const w=g.boxSizing,P=fh(g.paddingBottom)+fh(g.paddingTop),C=fh(g.borderBottomWidth)+fh(g.borderTopWidth),E=x.scrollHeight;x.value="x";const S=x.scrollHeight;let R=E;i&&(R=Math.max(Number(i)*S,R)),o&&(R=Math.min(Number(o)*S,R)),R=Math.max(R,S);const I=R+(w==="border-box"?P+C:0),M=Math.abs(R-E)<=1;return{outerHeightStyle:I,overflowing:M}},[o,i,t.placeholder]),p=v.useCallback(()=>{const y=m();if(pue(y))return;const b=c.current;b.style.height=`${y.outerHeightStyle}px`,b.style.overflow=y.overflowing?"hidden":""},[m]);_t(()=>{const y=()=>{p()};let b;const g=fd(y),x=c.current,w=mi(x);w.addEventListener("resize",g);let P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(y),P.observe(x)),()=>{g.clear(),cancelAnimationFrame(b),w.removeEventListener("resize",g),P&&P.disconnect()}},[m,p]),_t(()=>{p()});const h=y=>{u||p(),r&&r(y)};return z.jsxs(v.Fragment,{children:[z.jsx("textarea",O({value:l,onChange:h,ref:d,rows:i,style:a},s)),z.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:f,tabIndex:-1,style:O({},fue.shadow,a,{paddingTop:0,paddingBottom:0})})]})});function IM(e){return typeof e.normalize<"u"?e.normalize("NFD").replace(/[\u0300-\u036f]/g,""):e}function S4(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:o="any",stringify:i,trim:a=!1}=e;return(l,{inputValue:s,getOptionLabel:u})=>{let c=a?s.trim():s;n&&(c=c.toLowerCase()),t&&(c=IM(c));const d=c?l.filter(f=>{let m=(i||u)(f);return n&&(m=m.toLowerCase()),t&&(m=IM(m)),o==="start"?m.indexOf(c)===0:m.indexOf(c)>-1}):l;return typeof r=="number"?d.slice(0,r):d}}function ph(e,t){for(let n=0;n<e.length;n+=1)if(t(e[n]))return n;return-1}const hue=S4(),OM=5,gue=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))};function vue(e){const{unstable_isActiveElementInListbox:t=gue,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:o=!1,autoSelect:i=!1,blurOnSelect:a=!1,clearOnBlur:l=!e.freeSolo,clearOnEscape:s=!1,componentName:u="useAutocomplete",defaultValue:c=e.multiple?[]:null,disableClearable:d=!1,disableCloseOnSelect:f=!1,disabled:m,disabledItemsFocusable:p=!1,disableListWrap:h=!1,filterOptions:y=hue,filterSelectedOptions:b=!1,freeSolo:g=!1,getOptionDisabled:x,getOptionKey:w,getOptionLabel:P=xe=>{var he;return(he=xe.label)!=null?he:xe},groupBy:C,handleHomeEndKeys:E=!e.freeSolo,id:S,includeInputInList:R=!1,inputValue:I,isOptionEqualToValue:M=(xe,he)=>xe===he,multiple:_=!1,onChange:D,onClose:T,onHighlightChange:F,onInputChange:N,onOpen:k,open:L,openOnFocus:j=!1,options:B,readOnly:A=!1,selectOnFocus:H=!e.freeSolo,value:q}=e,V=Rt(S);let G=P;G=xe=>{const he=P(xe);return typeof he!="string"?String(he):he};const Y=v.useRef(!1),re=v.useRef(!0),le=v.useRef(null),J=v.useRef(null),[oe,ue]=v.useState(null),[ge,me]=v.useState(-1),ke=o?0:-1,be=v.useRef(ke),[ie,ye]=Ul({controlled:q,default:c,name:u}),[U,Q]=Ul({controlled:I,default:"",name:u,state:"inputValue"}),[Z,ae]=v.useState(!1),te=v.useCallback((xe,he)=>{if(!(_?ie.length<he.length:he!==null)&&!l)return;let Fe;if(_)Fe="";else if(he==null)Fe="";else{const Ze=G(he);Fe=typeof Ze=="string"?Ze:""}U!==Fe&&(Q(Fe),N&&N(xe,Fe,"reset"))},[G,U,_,N,Q,l,ie]),[K,ee]=Ul({controlled:L,default:!1,name:u,state:"open"}),[se,Ce]=v.useState(!0),_e=!_&&ie!=null&&U===G(ie),$e=K&&!A,X=$e?y(B.filter(xe=>!(b&&(_?ie:[ie]).some(he=>he!==null&&M(xe,he)))),{inputValue:_e&&se?"":U,getOptionLabel:G}):[],Ee=pE({filteredOptions:X,value:ie,inputValue:U});v.useEffect(()=>{const xe=ie!==Ee.value;Z&&!xe||g&&!xe||te(null,ie)},[ie,te,Z,Ee.value,g]);const Le=K&&X.length>0&&!A,Te=Zt(xe=>{xe===-1?le.current.focus():oe.querySelector(`[data-tag-index="${xe}"]`).focus()});v.useEffect(()=>{_&&ge>ie.length-1&&(me(-1),Te(-1))},[ie,_,ge,Te]);function Pe(xe,he){if(!J.current||xe<0||xe>=X.length)return-1;let Ne=xe;for(;;){const Fe=J.current.querySelector(`[data-option-index="${Ne}"]`),Ze=p?!1:!Fe||Fe.disabled||Fe.getAttribute("aria-disabled")==="true";if(Fe&&Fe.hasAttribute("tabindex")&&!Ze)return Ne;if(he==="next"?Ne=(Ne+1)%X.length:Ne=(Ne-1+X.length)%X.length,Ne===xe)return-1}}const Re=Zt(({event:xe,index:he,reason:Ne="auto"})=>{if(be.current=he,he===-1?le.current.removeAttribute("aria-activedescendant"):le.current.setAttribute("aria-activedescendant",`${V}-option-${he}`),F&&F(xe,he===-1?null:X[he],Ne),!J.current)return;const Fe=J.current.querySelector(`[role="option"].${n}-focused`);Fe&&(Fe.classList.remove(`${n}-focused`),Fe.classList.remove(`${n}-focusVisible`));let Ze=J.current;if(J.current.getAttribute("role")!=="listbox"&&(Ze=J.current.parentElement.querySelector('[role="listbox"]')),!Ze)return;if(he===-1){Ze.scrollTop=0;return}const je=J.current.querySelector(`[data-option-index="${he}"]`);if(je&&(je.classList.add(`${n}-focused`),Ne==="keyboard"&&je.classList.add(`${n}-focusVisible`),Ze.scrollHeight>Ze.clientHeight&&Ne!=="mouse"&&Ne!=="touch")){const gt=je,xi=Ze.clientHeight+Ze.scrollTop,Fk=gt.offsetTop+gt.offsetHeight;Fk>xi?Ze.scrollTop=Fk-Ze. Line truncated
0% {
opacity: 1;
}
50% {
opacity: 0.4;
}
100% {
opacity: 1;
}
`)),yce=ls(FM||(FM=dv`
0% {
transform: translateX(-100%);
}
50% {
/* +0.5s of delay between each loop */
transform: translateX(100%);
}
100% {
transform: translateX(100%);
}
`)),bce=fe("span",{name:"MuiSkeleton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],n.animation!==!1&&t[n.animation],n.hasChildren&&t.withChildren,n.hasChildren&&!n.width&&t.fitContent,n.hasChildren&&!n.height&&t.heightAuto]}})(({theme:e,ownerState:t})=>{const n=pne(e.shape.borderRadius)||"px",r=mne(e.shape.borderRadius);return O({display:"block",backgroundColor:e.vars?e.vars.palette.Skeleton.bg:ni(e.palette.text.primary,e.palette.mode==="light"?.11:.13),height:"1.2em"},t.variant==="text"&&{marginTop:0,marginBottom:0,height:"auto",transformOrigin:"0 55%",transform:"scale(1, 0.60)",borderRadius:`${r}${n}/${Math.round(r/.6*10)/10}${n}`,"&:empty:before":{content:'"\\00a0"'}},t.variant==="circular"&&{borderRadius:"50%"},t.variant==="rounded"&&{borderRadius:(e.vars||e).shape.borderRadius},t.hasChildren&&{"& > *":{visibility:"hidden"}},t.hasChildren&&!t.width&&{maxWidth:"fit-content"},t.hasChildren&&!t.height&&{height:"auto"})},({ownerState:e})=>e.animation==="pulse"&&Vc(AM||(AM=dv`
animation: ${0} 2s ease-in-out 0.5s infinite;
`),vce),({ownerState:e,theme:t})=>e.animation==="wave"&&Vc(LM||(LM=dv`
position: relative;
overflow: hidden;
/* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
-webkit-mask-image: -webkit-radial-gradient(white, black);
&::after {
animation: ${0} 2s linear 0.5s infinite;
background: linear-gradient(
90deg,
transparent,
${0},
transparent
);
content: '';
position: absolute;
transform: translateX(-100%); /* Avoid flash during server-side hydration */
bottom: 0;
left: 0;
right: 0;
top: 0;
}
`),yce,(t.vars||t).palette.action.hover)),xce=v.forwardRef(function(t,n){const r=qe({props:t,name:"MuiSkeleton"}),{animation:o="pulse",className:i,component:a="span",height:l,style:s,variant:u="text",width:c}=r,d=ce(r,hce),f=O({},r,{animation:o,component:a,variant:u,hasChildren:!!d.children}),m=gce(f);return z.jsx(bce,O({as:a,ref:n,className:ve(m.root,i),ownerState:f},d,{style:O({width:c,height:l},s)}))}),wce=xce,Cce=["field","align","width","contentWidth"],Sce=e=>{const{align:t,classes:n}=e,r={root:["cell","cellSkeleton",`cell--text${pe(t)}`,"withBorderColor"]};return Oe(r,ft,n)};function Ece(e){const{align:t,width:n,contentWidth:r}=e,o=ce(e,Cce),a={classes:Be().classes,align:t},l=Sce(a);return z.jsx("div",O({className:l.root,style:{width:n}},o,{children:z.jsx(wce,{width:`${r}%`})}))}function Pce(e){return e.vars?e.vars.palette.TableCell.border:e.palette.mode==="light"?sN(ni(e.palette.divider,1),.88):Tf(ni(e.palette.divider,1),.68)}const DM={[`.${ne.columnSeparator}, .${ne["columnSeparator--resizing"]}`]:{visibility:"visible",width:"auto"}},NM={[`& .${ne.iconButtonContainer}`]:{visibility:"visible",width:"auto"},[`& .${ne.menuIcon}`]:{width:"auto",visibility:"visible"}},kce=fe("div",{name:"MuiDataGrid",slot:"Root",overridesResolver:(e,t)=>[{[`&.${ne.autoHeight}`]:t.autoHeight},{[`&.${ne.aggregationColumnHeader}`]:t.aggregationColumnHeader},{[`&.${ne["aggregationColumnHeader--alignLeft"]}`]:t["aggregationColumnHeader--alignLeft"]},{[`&.${ne["aggregationColumnHeader--alignCenter"]}`]:t["aggregationColumnHeader--alignCenter"]},{[`&.${ne["aggregationColumnHeader--alignRight"]}`]:t["aggregationColumnHeader--alignRight"]},{[`&.${ne.aggregationColumnHeaderLabel}`]:t.aggregationColumnHeaderLabel},{[`&.${ne["root--disableUserSelection"]} .${ne.cell}`]:t["root--disableUserSelection"]},{[`&.${ne.autosizing}`]:t.autosizing},{[`& .${ne.editBooleanCell}`]:t.editBooleanCell},{[`& .${ne["cell--editing"]}`]:t["cell--editing"]},{[`& .${ne["cell--textCenter"]}`]:t["cell--textCenter"]},{[`& .${ne["cell--textLeft"]}`]:t["cell--textLeft"]},{[`& .${ne["cell--textRight"]}`]:t["cell--textRight"]},{[`& .${ne["cell--withRenderer"]}`]:t["cell--withRenderer"]},{[`& .${ne.cell}`]:t.cell},{[`& .${ne["cell--rangeTop"]}`]:t["cell--rangeTop"]},{[`& .${ne["cell--rangeBottom"]}`]:t["cell--rangeBottom"]},{[`& .${ne["cell--rangeLeft"]}`]:t["cell--rangeLeft"]},{[`& .${ne["cell--rangeRight"]}`]:t["cell--rangeRight"]},{[`& .${ne["cell--withRightBorder"]}`]:t["cell--withRightBorder"]},{[`& .${ne.cellContent}`]:t.cellContent},{[`& .${ne.cellCheckbox}`]:t.cellCheckbox},{[`& .${ne.cellSkeleton}`]:t.cellSkeleton},{[`& .${ne.checkboxInput}`]:t.checkboxInput},{[`& .${ne["columnHeader--alignCenter"]}`]:t["columnHeader--alignCenter"]},{[`& .${ne["columnHeader--alignLeft"]}`]:t["columnHeader--alignLeft"]},{[`& .${ne["columnHeader--alignRight"]}`]:t["columnHeader--alignRight"]},{[`& .${ne["columnHeader--dragging"]}`]:t["columnHeader--dragging"]},{[`& .${ne["columnHeader--moving"]}`]:t["columnHeader--moving"]},{[`& .${ne["columnHeader--numeric"]}`]:t["columnHeader--numeric"]},{[`& .${ne["columnHeader--sortable"]}`]:t["columnHeader--sortable"]},{[`& .${ne["columnHeader--sorted"]}`]:t["columnHeader--sorted"]},{[`& .${ne["columnHeader--withRightBorder"]}`]:t["columnHeader--withRightBorder"]},{[`& .${ne.columnHeader}`]:t.columnHeader},{[`& .${ne.headerFilterRow}`]:t.headerFilterRow},{[`& .${ne.columnHeaderCheckbox}`]:t.columnHeaderCheckbox},{[`& .${ne.columnHeaderDraggableContainer}`]:t.columnHeaderDraggableContainer},{[`& .${ne.columnHeaderTitleContainer}`]:t.columnHeaderTitleContainer},{[`& .${ne["columnSeparator--resizable"]}`]:t["columnSeparator--resizable"]},{[`& .${ne["columnSeparator--resizing"]}`]:t["columnSeparator--resizing"]},{[`& .${ne.columnSeparator}`]:t.columnSeparator},{[`& .${ne.filterIcon}`]:t.filterIcon},{[`& .${ne.iconSeparator}`]:t.iconSeparator},{[`& .${ne.menuIcon}`]:t.menuIcon},{[`& .${ne.menuIconButton}`]:t.menuIconButton},{[`& .${ne.menuOpen}`]:t.menuOpen},{[`& .${ne.menuList}`]:t.menuList},{[`& .${ne["row--editable"]}`]:t["row--editable"]},{[`& .${ne["row--editing"]}`]:t["row--editing"]},{[`& .${ne["row--dragging"]}`]:t["row--dragging"]},{[`& .${ne.row}`]:t.row},{[`& .${ne.rowReorderCellPlaceholder}`]:t.rowReorderCellPlaceholder},{[`& .${ne.rowReorderCell}`]:t.rowReorderCell},{[`& .${ne["rowReorderCell--draggable"]}`]:t["rowReorderCell--draggable"]},{[`& .${ne.sortIcon}`]:t.sortIcon},{[`& .${ne.withBorderColor}`]:t.withBorderColor},{[`& .${ne.treeDataGroupingCell}`]:t.treeDataGroupingCell},{[`& .${ne.treeDataGroupingCellToggle}`]:t.treeDataGroupingCellToggle},{[`& .${ne.detailPanelToggleCell}`]:t.detailPanelToggleCell},{[`& .${ne["detailPanelToggleCell--expanded"]}`]:t["detailPanelToggleCell--expanded"]},t.root]})(({theme:e})=>{const t=Pce(e),n=e.shape.borderRadius;return O({"--unstable_DataGrid-radius":typeof n=="number"?`${n}px`:n,"--unstable_DataGrid-headWeight":e.typography.fontWeightMedium,"--unstable_DataGrid-overlayBackgrou Line truncated
${e.vars.palette.action.selectedOpacity} +
${e.vars.palette.action.hoverOpacity}
))`:ni(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:ni(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`& .${ne.cell}`]:{display:"flex",alignItems:"center",borderBottom:"1px solid","&.Mui-selected":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:ni(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover, &.Mui-hovered":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity+e.palette.action.hoverOpacity})`:ni(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:ni(e.palette.primary.main,e.palette.action.selectedOpacity)}}}},[`&.${ne["root--disableUserSelection"]} .${ne.cell}`]:{userSelect:"none"},[`& .${ne.row}:not(.${ne["row--dynamicHeight"]}) > .${ne.cell}`]:{overflow:"hidden",whiteSpace:"nowrap"},[`& .${ne.cellContent}`]:{overflow:"hidden",textOverflow:"ellipsis"},[`& .${ne.cell}.${ne["cell--selectionMode"]}`]:{cursor:"default"},[`& .${ne.cell}.${ne["cell--editing"]}`]:{padding:1,display:"flex",boxShadow:e.shadows[2],backgroundColor:(e.vars||e).palette.background.paper,"&:focus-within":{outline:`solid ${(e.vars||e).palette.primary.main} 1px`,outlineOffset:"-1px"}},[`& .${ne["row--editing"]}`]:{boxShadow:e.shadows[2]},[`& .${ne["row--editing"]} .${ne.cell}`]:{boxShadow:e.shadows[0],backgroundColor:(e.vars||e).palette.background.paper},[`& .${ne.editBooleanCell}`]:{display:"flex",height:"100%",width:"100%",alignItems:"center",justifyContent:"center"},[`& .${ne.booleanCell}[data-value="true"]`]:{color:(e.vars||e).palette.text.secondary},[`& .${ne.booleanCell}[data-value="false"]`]:{color:(e.vars||e).palette.text.disabled},[`& .${ne.actionsCell}`]:{display:"inline-flex",alignItems:"center",gridGap:e.spacing(1)},[`& .${ne.rowReorderCell}`]:{display:"inline-flex",flex:1,alignItems:"center",justifyContent:"center",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ne["rowReorderCell--draggable"]}`]:{cursor:"move",opacity:1},[`& .${ne.rowReorderCellContainer}`]:{padding:0,alignItems:"stretch"},[`.${ne.withBorderColor}`]:{borderColor:t},[`& .${ne["cell--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ne["columnHeader--withRightBorder"]}`]:{borderRightWidth:"1px",borderRightStyle:"solid"},[`& .${ne["cell--textLeft"]}`]:{justifyContent:"flex-start"},[`& .${ne["cell--textRight"]}`]:{justifyContent:"flex-end"},[`& .${ne["cell--textCenter"]}`]:{justifyContent:"center"},[`& .${ne.columnHeaderDraggableContainer}`]:{display:"flex",width:"100%",height:"100%"},[`& .${ne.rowReorderCellPlaceholder}`]:{display:"none"},[`& .${ne["columnHeader--dragging"]}, & .${ne["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity},[`& .${ne["row--dragging"]}`]:{background:(e.vars||e).palette.background.paper,padding:"0 12px",borderRadius:"var(--unstable_DataGrid-radius)",opacity:(e.vars||e).palette.action.disabledOpacity,[`& .${ne.rowReorderCellPlaceholder}`]:{display:"flex"}},[`& .${ne.treeDataGroupingCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ne.treeDataGroupingCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)},[`& .${ne.groupingCriteriaCell}`]:{display:"flex",alignItems:"center",width:"100%"},[`& .${ne.groupingCriteriaCellToggle}`]:{flex:"0 0 28px",alignSelf:"stretch",marginRight:e.spacing(2)}})}),$ce=["children","className"],Ice=e=>{const{autoHeight:t,density:n,classes:r}=e,o={root:["root",t&&"autoHeight",`root--density${pe(n)}`,"withBorderColor"]};return Oe(o,ft,r)},Oce=v.forwardRef(function(t,n){var r;const o=Be(),{children:i,className:a}=t,l=ce(t,$ce),s=us(),u=De(s,Mse),c=v.useRef(null),d=xt(c,n),f=(r=o.experimentalFeatures)!=null&&r.ariaV7?null:d4,m=typeof f=="function"?f():null,p=O({},o,{density:u}),h=Ice(p);s.current.register("public",{rootElementRef:c});const[y,b]=v.useState(!1);return _t(()=>{b(!0)},[]),y?z.jsx(kce,O({ref:d,className:ve(a,h.root),ownerState:p},m,l,{children:i})):null}),Mce=["className"],Rce=e=>{const{classes:t}=e;return Oe({root:["footerContainer","withBorderColor"]},ft,t)},Tce=Dn("div",{name:"MuiDataGrid",slot:"FooterContainer",overridesResolver:(e,t)=>t.footerContainer})({display:"flex",justifyContent:"space-between",alignItems:"center",minHeight:52,borderTop:"1px solid"}),_ce=v.forwardRef(function(t,n){const{className:r}=t,o=ce(t,Mce),i=Be(),a=Rce(i);return z.jsx(Tce,O({ref:n,className:ve(a.root,r),ownerState:i},o))}),Fce=["className"],Ace=e=>{const{classes:t}=e;return Oe({root:["overlay"]},ft,t)},Lc Line truncated
`))},j4=e=>e.pagination,Po=tt(j4,e=>e.paginationModel),$de=tt(Po,e=>e.page),Ide=tt(Po,e=>e.pageSize);tt(Po,a0,(e,t)=>D4(t,e.pageSize));const nP=Jt(Po,li,i0,cs,m4,(e,t,n,r,o)=>{const i=o.length,a=Math.min(e.pageSize*e.page,i-1),l=Math.min(a+e.pageSize-1,i-1);if(a===-1||l===-1)return null;if(n<2)return{firstRowIndex:a,lastRowIndex:l};const s=o[a],u=l-a+1,c=r.findIndex(p=>p.id===s.id);let d=c,f=0;for(;d<r.length&&f<=u;){var m;const p=r[d],h=(m=t[p.id])==null?void 0:m.depth;h===void 0?d+=1:((f<u||h>0)&&(d+=1),h===0&&(f+=1))}return{firstRowIndex:c,lastRowIndex:d-1}}),Ode=Jt(cs,nP,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),B4=Jt(Nf,nP,(e,t)=>t?e.slice(t.firstRowIndex,t.lastRowIndex+1):[]),wp=e=>e.preferencePanel;var su=function(e){return e.filters="filters",e.columns="columns",e}(su||{});const Cp=e=>e.rowsMeta,Co=e=>e.rowSelection,Mde=tt(Co,e=>e.length),Rde=Jt(Co,$a,(e,t)=>new Map(e.map(n=>[n,t[n]]))),fv=Jt(Co,e=>e.reduce((t,n)=>(t[n]=n,t),{})),Tde=ra(["MUI: The `sortModel` can only contain a single item when the `disableMultipleColumnsSorting` prop is set to `true`.","If you are using the community version of the `DataGrid`, this prop is always `true`."],"error"),H4=(e,t)=>t&&e.length>1?(Tde(),[e[0]]):e,jM=(e,t)=>n=>O({},n,{sorting:O({},n.sorting,{sortModel:H4(e,t)})}),_de=e=>e==="desc",Fde=(e,t)=>{const n=t.current.getColumn(e.field);if(!n)return null;const r=_de(e.sort)?(...i)=>-1*n.sortComparator(...i):n.sortComparator;return{getSortCellParams:i=>({id:i,field:n.field,rowNode:t.current.getRowNode(i),value:t.current.getCellValue(i,n.field),api:t.current}),comparator:r}},Ade=(e,t,n)=>e.reduce((r,o,i)=>{if(r!==0)return r;const a=t.params[i],l=n.params[i];return r=o.comparator(a.value,l.value,a,l),r},0),Lde=(e,t)=>{const n=e.map(r=>Fde(r,t)).filter(r=>!!r);return n.length===0?null:r=>r.map(o=>({node:o,params:n.map(i=>i.getSortCellParams(o.id))})).sort((o,i)=>Ade(n,o,i)).map(o=>o.node.id)},BM=(e,t)=>{const n=e.indexOf(t);return!t||n===-1||n+1===e.length?e[0]:e[n+1]},rP=(e,t)=>e==null&&t!=null?-1:t==null&&e!=null?1:e==null&&t==null?0:null,Dde=new Intl.Collator,Nde=(e,t)=>{const n=rP(e,t);return n!==null?n:typeof e=="string"?Dde.compare(e.toString(),t.toString()):e-t},U4=(e,t)=>{const n=rP(e,t);return n!==null?n:Number(e)-Number(t)},V4=(e,t)=>{const n=rP(e,t);return n!==null?n:e>t?1:e<t?-1:0},W4=e=>e.headerFiltering,zde=tt(W4,e=>e.editing),jde=tt(W4,e=>e.menuOpen),Bde=(e,t)=>{const n={enabled:!t.disableVirtualization,enabledForColumns:!0};return O({},e,{virtualization:n})};function Hde(e,t){const n=i=>{e.current.setState(a=>O({},a,{virtualization:O({},a.virtualization,{enabled:i})}))};ot(e,{unstable_setVirtualization:n,unstable_setColumnVirtualization:i=>{e.current.setState(a=>O({},a,{virtualization:O({},a.virtualization,{enabledForColumns:i})}))}},"public"),v.useEffect(()=>{n(!t.disableVirtualization)},[t.disableVirtualization])}const G4=e=>e.virtualization,Ude=tt(G4,e=>e.enabled),q4=tt(G4,e=>e.enabledForColumns),Vde=e=>{const{classes:t}=e;return Oe({icon:["filterIcon"]},ft,t)};function Wde(e){var t,n;const{counter:r,field:o,onClick:i}=e,a=dt(),l=Be(),s=O({},e,{classes:l.classes}),u=Vde(s),c=De(a,wp),d=Rt(),f=Rt(),m=v.useCallback(y=>{y.preventDefault(),y.stopPropagation();const{open:b,openedPanelValue:g}=wp(a.current.state);b&&g===su.filters?a.current.hideFilterPanel():a.current.showFilterPanel(void 0,f,d),i&&i(a.current.getColumnHeaderParams(o),y)},[a,o,i,f,d]);if(!r)return null;const p=c.open&&c.labelId===d,h=z.jsx(l.slots.baseIconButton,O({id:d,onClick:m,color:"default","aria-label":a.current.getLocaleText("columnHeaderFiltersLabel"),size:"small",tabIndex:-1,"aria-haspopup":"menu","aria-expanded":p,"aria-controls":p?f:void 0},(t=l.slotProps)==null?void 0:t.baseIconButton,{children:z.jsx(l.slots.columnFilteredIcon,{className:u.icon,fontSize:"small"})}));return z.jsx(l.slots.baseTooltip,O({title:a.current.getLocaleText("columnHeaderFiltersTooltipActive")(r),enterDelay:1e3},(n=l.slotProps)==null?void 0:n.baseTooltip,{children:z.jsxs(T4,{children:[r>1&&z.jsx(R4,{badgeContent:r,color:"default",children:h}),r===1&&h]})}))}const Gde=["field","id","value","formattedValue","row","rowNode","colDef","isEditable","cellMode","hasFocus","tabIndex","api"],qde=e=>{const{classes:t}=e;return Oe({root:["checkboxInput"]},ft,t)},Kde=v.forwardRef(function(t,n){var r;const{field:o,id:i,value:a,rowNode:l,hasFocus:s,tabIndex:u}=t,c=ce(t,Gde),d=dt(),f=Be(),m={classes:f.classes},p=qde(m),h=v.useRef(null),y=v.useRef(null),b=xt(h,n),g=d.current.getCellElement(i,o),x=E=>{const S={value:E.target.checked,id:i};d.current.publishEvent("rowSelectionCheckboxChange",S,E)};v.useLayoutEffect(()=>{u===0&&g&&(g.tabIndex=-1)},[g,u]),v.useEffect(()=>{if(s){var E;const S=(E=h.current)==null?void 0:E.querySelector("input");S==null||S.focus({preventScroll:!0})}else y.current&&y.current.stop({})},[s]);const w=v.useCallback(E=>{k4(E.key)&&E.stopPropagation()},[]);if(l.type==="footer"||l.type==="pinnedRow")return null;const P=d.current.isRowSelecta Line truncated
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
`)),_ge=ls(dR||(dR=h0`
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
}
50% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -15px;
}
100% {
stroke-dasharray: 100px, 200px;
stroke-dashoffset: -125px;
}
`)),Fge=e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,i={root:["root",n,`color${pe(r)}`],svg:["svg"],circle:["circle",`circle${pe(n)}`,o&&"circleDisableShrink"]};return Oe(i,Mge,t)},Age=fe("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${pe(n.color)}`]]}})(({ownerState:e,theme:t})=>O({display:"inline-block"},e.variant==="determinate"&&{transition:t.transitions.create("transform")},e.color!=="inherit"&&{color:(t.vars||t).palette[e.color].main}),({ownerState:e})=>e.variant==="indeterminate"&&Vc(fR||(fR=h0`
animation: ${0} 1.4s linear infinite;
`),Tge)),Lge=fe("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),Dge=fe("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${pe(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(({ownerState:e,theme:t})=>O({stroke:"currentColor"},e.variant==="determinate"&&{transition:t.transitions.create("stroke-dashoffset")},e.variant==="indeterminate"&&{strokeDasharray:"80px, 200px",strokeDashoffset:0}),({ownerState:e})=>e.variant==="indeterminate"&&!e.disableShrink&&Vc(pR||(pR=h0`
animation: ${0} 1.4s ease-in-out infinite;
`),_ge)),Nge=v.forwardRef(function(t,n){const r=qe({props:t,name:"MuiCircularProgress"}),{className:o,color:i="primary",disableShrink:a=!1,size:l=40,style:s,thickness:u=3.6,value:c=0,variant:d="indeterminate"}=r,f=ce(r,Rge),m=O({},r,{color:i,disableShrink:a,size:l,thickness:u,value:c,variant:d}),p=Fge(m),h={},y={},b={};if(d==="determinate"){const g=2*Math.PI*((cl-u)/2);h.strokeDasharray=g.toFixed(3),b["aria-valuenow"]=Math.round(c),h.strokeDashoffset=`${((100-c)/100*g).toFixed(3)}px`,y.transform="rotate(-90deg)"}return z.jsx(Age,O({className:ve(p.root,o),style:O({width:l,height:l},y,s),ownerState:m,ref:n,role:"progressbar"},b,f,{children:z.jsx(Lge,{className:p.svg,ownerState:m,viewBox:`${cl/2} ${cl/2} ${cl} ${cl}`,children:z.jsx(Dge,{className:p.circle,style:h,ownerState:m,cx:cl,cy:cl,r:(cl-u)/2,fill:"none",strokeWidth:u})})}))}),dP=Nge,zge=v.forwardRef(function(t,n){return z.jsx(eP,O({ref:n},t,{children:z.jsx(dP,{})}))}),jge=v.forwardRef(function(t,n){const o=dt().current.getLocaleText("noRowsLabel");return z.jsx(eP,O({ref:n},t,{children:o}))}),Bge=v.createContext(),Hge=Bge,Uge=v.createContext(),Vge=Uge;function Wge(e){return We("MuiTableCell",e)}const Gge=Ge("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),qge=Gge,Kge=["align","className","component","padding","scope","size","sortDirection","variant"],Qge=e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e,l={root:["root",n,a&&"stickyHeader",r!=="inherit"&&`align${pe(r)}`,o!=="normal"&&`padding${pe(o)}`,`size${pe(i)}`]};return Oe(l,Wge,t)},Yge=fe("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${pe(n.size)}`],n.padding!=="normal"&&t[`padding${pe(n.padding)}`],n.align!=="inherit"&&t[`align${pe(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(({theme:e,ownerState:t})=>O({},e.typography.body2,{display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid
${e.palette.mode==="light"?hE(lt(e.palette.divider,1),.88):mE(lt(e.palette.divider,1),.68)}`,textAlign:"left",padding:16},t.variant==="head"&&{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium},t.variant==="body"&&{color:(e.vars||e).palette.text.primary},t.variant==="footer"&&{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)},t.size==="small"&&{padding:"6px 16px",[`&.${qge.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}},t.padding==="checkbox"&&{width:48,padding:"0 0 0 4px"},t.padding==="none"&&{padding:0},t.align==="left"&&{textAlign:"left"},t.align==="center"&&{textAlign:"center"},t.align==="right"&&{textAlign:"right",flexDirection:"row-reverse"},t.align==="justify"&&{textAlign:"justify"},t.stickyHeader&&{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default})),Xge=v.forwardRef(function(t,n){const r=qe({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:l,scope:s,size:u,sortDirection:c,variant:d}=r,f=ce(r,Kge),m=v.useContext(Hge),p=v.useContext(Vge),h=p&&p.variant==="head";let y;a?y=a:y=h?"th":"td";let b=s;y==="td"?b=void 0:!b&&h&&(b="col");const g=d||p&&p.variant,x=O({},r,{align:o,component:y,padding:l||(m&&m.padding?m.padding:"normal"),size:u||(m&&m.size?m.size:"medium"),sortDirection:c,stickyHeader:g==="head"&&m&&m.stickyHeader,variant:g}),w=Qge(x);let P=null;return c&&(P=c==="asc"?"ascending":"descending"),z.jsx(Yge,O({as:y,ref:n,className:ve(w.root,i),"aria-sort":P,scope:b,ownerState:x},f))}),Lw=Xge,Zge=rt(z.jsx("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Jge=rt(z.jsx("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight"),eve=rt(z.jsx("path",{d:"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"}),"LastPage"),tve=rt(z.jsx("path",{d:"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"}),"FirstPage"),nve=["backIconButtonProps","count","disabled","getItemAriaLabel","nextIconButtonProps","onPageChange","page","rowsPerPage","showFirstButton","showLastButton","slots","slotProps"],rve=v.forwardRef(function(t,n){var r,o,i,a,l,s,u,c;const{backIconButtonProps:d,count:f,disabled:m=!1,getItemAriaLabel:p,nextIconButtonProps:h,onPageChange:y,page:b,rowsPerPage:g,showFirstButton:x,showLastButton:w,slots:P={},slotProps:C={}}=t,E=ce(t,nve),S=Uy(),R=J=>{y(J,0)},I=J=>{y(J,b-1)},M=J=>{y(J,b+1)},_=J=>{y(J,Math.max(0,Math.ceil(f/g)-1))},D=(r=P.firstButton)!=null?r:An,T=(o=P.lastButton)!=null?o:An,F=(i=P.nextButton)!=null?i:An,N=(a=P.previousButton)!=null?a:An,k=(l=P.firstButtonIcon)!=null?l:tve,L=(s=P.lastButtonIcon)!=null?s:eve,j=(u=P.nextButtonIcon)!=null?u:Jge,B=(c=P.previousButtonIcon)!=null?c:Zge,A=S?T:D,H=S?F:N,q=S?N:F,V=S?D:T,G=S?C.lastButton:C.firstButton,Y=S?C.nextButton:C.previousButton,re=S?C.previousButton:C.nextButton,le=S?C.firstButton:C.lastButton;return z.jsxs("div",O({ref:n},E,{children:[x&&z.jsx(A,O({onClick:R,disabled:m||b===0,"aria-label":p("first",b),title:p("first",b)},G,{children:S?z.jsx(L,O({},C.lastButtonIcon)):z.jsx(k,O({},C.firstButtonIcon))})),z.jsx(H,O({onClick:I,disabled:m||b===0,color:"inherit","aria-label":p("previous",b),title:p("previous",b)},Y??d,{children:S?z.jsx(j,O({},C.nextButtonIcon)):z.jsx(B,O({},C.previousButtonIcon))})),z.jsx(q,O({onClick:M,disabled:m||(f!==-1?b>=Math.ceil(f/g)-1:!1),color:"inherit","aria-label":p("next",b),title:p("next",b)},re??h,{children:S?z.jsx(B,O({},C.previousButtonIcon)):z.jsx(j,O({},C.nextButtonIcon))})),w&&z.jsx(V,O({onClick:_,disabled:m||b>=Math.ceil(f/g)-1,"aria-label":p("last",b),title:p("last",b)},le,{children:S?z.jsx(k,O({},C.firstButtonIcon)):z.jsx(L,O({},C.lastButtonIcon))}))]}))}),ove=rve;function ive(e){return We("MuiTablePagination",e)}const ave=Ge("MuiTablePagination",["root","toolbar","spacer","selectLabel","selectRoot","select","selectIcon","input","menuItem","displayedRows","actions"]),Vs=ave;var mR;const lve=["ActionsComponent","backIconButtonProps","className","colSpan","component","count","disabled","getItemAriaLabel","labelDisplayedRows","labelRowsPerPage","nextIconButtonProps","onPageChange","onRowsPerPageChange","page","rowsPerPage","rowsPerPageOptions","SelectProps","showFirstButton","showLastButton","slotProps","slots"],sve=fe(Lw,{name:"MuiTablePagination",slot:"Root",overridesResolver:(e,t)=>t.root})(({theme:e})=>({overflow:"auto",color:(e.vars||e).palette.text.primary,fontSize:e.typography.pxToRem(14),"&:last-child":{padding:0}})),uve=fe(tm,{name:"MuiTablePagination",slot:"Toolbar",overridesResolver:(e,t)=>O({[`& .${Vs.actions}`]:t.actions},t.toolbar)})(({theme:e})=>({minHeight:52,paddingRight:2,[`${e.breakpoints.up("xs")} and (orientation: landscape)`]:{minHeight:52},[e.breakpoints.up("sm")]:{minHeight:52,paddingRight:2},[`& .${Vs.actions}`]:{flexShrink:0,marginLeft:20}})),cve=fe("div",{name:"MuiTablePagination",slot:"Spac Line truncated
${o.map((l,s)=>`const shouldApply${s} = !shouldApplyFilter || shouldApplyFilter(${JSON.stringify(l.item.field)});`).join(`
`)}
const result$$ = {
${o.map((l,s)=>` ${JSON.stringify(String(l.item.id))}: !shouldApply${s}
? false
: ${l.v7?`appliers[${s}].fn(row)`:`appliers[${s}].fn(getRowId(row))`},`).join(`
`)}
};
return result$$;`.replaceAll("$$",String(gR)));return gR+=1,(l,s)=>i(t.current.getRowId,o,l,s)},Tve=(e,t)=>{var n,r,o;const i=(n=(r=e.quickFilterValues)==null?void 0:r.filter(Boolean))!=null?n:[];if(i.length===0)return null;const l=((o=e.quickFilterExcludeHiddenColumns)!=null?o:!1)?n0(t):_a(t),s=[],{ignoreDiacritics:u}=t.current.rootProps,c=hz(t);return l.forEach(d=>{const f=t.current.getColumn(d),m=f==null?void 0:f.getApplyQuickFilterFn,p=f==null?void 0:f.getApplyQuickFilterFnV7,h=!mv(m),y=!mv(p);p&&!(h&&!y)?s.push({column:f,appliers:i.map(b=>{const g=u?Rl(b):b;return{v7:!0,fn:p(g,f,c)}})}):m&&s.push({column:f,appliers:i.map(b=>{const g=u?Rl(b):b;return{v7:!1,fn:m(g,f,c)}})})}),function(f,m){const p={},h={};e:for(let b=0;b<i.length;b+=1){const g=i[b];for(let x=0;x<s.length;x+=1){const{column:w,appliers:P}=s[x],{field:C}=w;if(m&&!m(C))continue;const E=P[b];let S=t.current.getRowValue(f,w);if(E.fn!==null)if(E.v7){if(u&&(S=Rl(S)),E.fn(S,f,w,c)){p[g]=!0;continue e}}else{var y;const R=(y=h[C])!=null?y:t.current.getCellParams(t.current.getRowId(f),C);if(u&&(R.value=Rl(R.value)),h[C]=R,E.fn(R)){p[g]=!0;continue e}}}p[g]=!1}return p}},_ve=(e,t,n)=>{const r=Rve(e,t,n),o=Tve(e,t);return function(a,l,s){var u,c;s.passingFilterItems=(u=r==null?void 0:r(a,l))!=null?u:null,s.passingQuickFilterValues=(c=o==null?void 0:o(a,l))!=null?c:null}},vR=e=>e!=null,Fve=(e,t,n)=>(e.cleanedFilterItems||(e.cleanedFilterItems=n.filter(r=>vz(r,t)!==null)),e.cleanedFilterItems),Ave=(e,t,n,r,o)=>{const i=Fve(o,r,n.items),a=e.filter(vR),l=t.filter(vR);if(a.length>0){var s;const c=f=>a.some(m=>m[f.id]);if(((s=n.logicOperator)!=null?s:xp().logicOperator)===Jn.And){if(!i.every(c))return!1}else if(!i.some(c))return!1}if(l.length>0&&n.quickFilterValues!=null){var u;const c=f=>l.some(m=>m[f]);if(((u=n.quickFilterLogicOperator)!=null?u:xp().quickFilterLogicOperator)===Jn.And){if(!n.quickFilterValues.every(c))return!1}else if(!n.quickFilterValues.some(c))return!1}return!0},yR=im(e=>{if(!e)return null;const t=new RegExp(rg(e),"i");return(n,r,o,i)=>{let a=i.current.getRowFormattedValue(r,o);return i.current.ignoreDiacritics&&(a=Rl(a)),a!=null?t.test(a.toString()):!1}}),Lve=(e=!1)=>am([{value:"contains",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(rg(n),"i");return o=>o!=null?r.test(String(o)):!1},InputComponent:Ti},{value:"equals",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?r.compare(n,o.toString())===0:!1},InputComponent:Ti},{value:"startsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`^${rg(n)}.*$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ti},{value:"endsWith",getApplyFilterFnV7:t=>{if(!t.value)return null;const n=e?t.value:t.value.trim(),r=new RegExp(`.*${rg(n)}$`,"i");return o=>o!=null?r.test(o.toString()):!1},InputComponent:Ti},{value:"isEmpty",getApplyFilterFnV7:()=>t=>t===""||t==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>t=>t!==""&&t!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:t=>{if(!Array.isArray(t.value)||t.value.length===0)return null;const n=e?t.value:t.value.map(o=>o.trim()),r=new Intl.Collator(void 0,{sensitivity:"base",usage:"search"});return o=>o!=null?n.some(i=>r.compare(i,o.toString()||"")===0):!1},InputComponent:nz}]),fi={width:100,minWidth:50,maxWidth:1/0,hideable:!0,sortable:!0,resizable:!0,filterable:!0,groupable:!0,pinnable:!0,aggregable:!0,editable:!1,sortComparator:Nde,type:"string",align:"left",filterOperators:Lve(),renderEditCell:Fue,getApplyQuickFilterFn:mz(yR),getApplyQuickFilterFnV7:yR},Dve=()=>am([{value:"is",getApplyFilterFnV7:e=>{if(!e.value)return null;const t=e.value==="true";return n=>!!n===t},InputComponent:Zpe}]);function Nve({value:e,api:t}){return e?t.getLocaleText("booleanCellTrueLabel"):t.getLocaleText("booleanCellFalseLabel")}const zve=e=>{switch(e.toLowerCase().trim()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case"null":case"undefined":return!1;default:return}},yz=O({},fi,{type:"boolean",align:"center",headerAlign:"center",renderCell:iue,renderEditCell:uue,sortComparator:U4,valueFormatter:Nve,filterOperators:Dve(),getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,aggregable:!1,pastedValueParser:e=>zve(e)}),ml="__check__",wd=O({},yz,{field:ml,type:"checkboxSelection",width:50,resizable:!1,sortable:!1,filterable:!1,aggregable:!1,disableColumnMenu:!0,disableReorder:!0,disableExport:!0,getApplyQuickFilterFn:void 0,getApplyQuickFilterFnV7:void 0,valueGetter:e=>fv(e.api.state,e.api.instanceId)[e.id]!==void 0,renderHeader:e=>z.jsx(Zde,O({},e)),renderCell:e=>z.jsx(Qde,O({},e))}),g0="actions",jve=O({},fi,{sortable:!1,filterable:!1,aggregable:!1,width:100,align:"center",headerAlign:"center",headerName:"",disableColumnMenu:!0,disableExport:!0,renderCell:tce,getApplyQuickFilterFn:void 0,getApplyQ Line truncated
`))}function sye({value:e,field:t,id:n}){return e?(wz({value:e,columnType:"date",rowId:n,field:t}),e.toLocaleDateString()):""}function uye({value:e,field:t,id:n}){return e?(wz({value:e,columnType:"dateTime",rowId:n,field:t}),e.toLocaleString()):""}const cye=O({},fi,{type:"date",sortComparator:V4,valueFormatter:sye,filterOperators:xz(),renderEditCell:E4,pastedValueParser:e=>new Date(e)}),dye=O({},fi,{type:"dateTime",sortComparator:V4,valueFormatter:uye,filterOperators:xz(!0),renderEditCell:E4,pastedValueParser:e=>new Date(e)}),xl=e=>e==null?null:Number(e),SR=im(e=>e==null||Number.isNaN(e)||e===""?null:t=>xl(t)===xl(e)),fye=()=>am([{value:"=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>xl(t)===e.value,InputComponent:Ti,InputComponentProps:{type:"number"}},{value:"!=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>xl(t)!==e.value,InputComponent:Ti,InputComponentProps:{type:"number"}},{value:">",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:xl(t)>e.value,InputComponent:Ti,InputComponentProps:{type:"number"}},{value:">=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:xl(t)>=e.value,InputComponent:Ti,InputComponentProps:{type:"number"}},{value:"<",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:xl(t)<e.value,InputComponent:Ti,InputComponentProps:{type:"number"}},{value:"<=",getApplyFilterFnV7:e=>e.value==null||Number.isNaN(e.value)?null:t=>t==null?!1:xl(t)<=e.value,InputComponent:Ti,InputComponentProps:{type:"number"}},{value:"isEmpty",getApplyFilterFnV7:()=>e=>e==null,requiresFilterValue:!1},{value:"isNotEmpty",getApplyFilterFnV7:()=>e=>e!=null,requiresFilterValue:!1},{value:"isAnyOf",getApplyFilterFnV7:e=>!Array.isArray(e.value)||e.value.length===0?null:t=>t!=null&&e.value.includes(Number(t)),InputComponent:nz,InputComponentProps:{type:"number"}}]),pye=O({},fi,{type:"number",align:"right",headerAlign:"right",sortComparator:U4,valueParser:e=>e===""?null:Number(e),valueFormatter:({value:e})=>bde(e)?e.toLocaleString():e||"",filterOperators:fye(),getApplyQuickFilterFn:mz(SR),getApplyQuickFilterFnV7:SR}),Lu=e=>e==null||!tP(e)?e:e.value,mye=()=>am([{value:"is",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>Lu(t)===Lu(e.value),InputComponent:XM},{value:"not",getApplyFilterFnV7:e=>e.value==null||e.value===""?null:t=>Lu(t)!==Lu(e.value),InputComponent:XM},{value:"isAnyOf",getApplyFilterFnV7:e=>{if(!Array.isArray(e.value)||e.value.length===0)return null;const t=e.value.map(Lu);return n=>t.includes(Lu(n))},InputComponent:Bme}]),hye=e=>typeof e[0]=="object",gye=e=>tP(e)?e.value:e,vye=e=>tP(e)?e.label:String(e),yye=O({},fi,{type:"singleSelect",getOptionLabel:vye,getOptionValue:gye,valueFormatter(e){const{id:t,field:n,value:r,api:o}=e,i=e.api.getColumn(n);if(!Hs(i))return"";let a;if(typeof i.valueOptions=="function"?a=i.valueOptions({id:t,row:t?o.getRow(t):null,field:n}):a=i.valueOptions,r==null)return"";if(!a)return r;if(!hye(a))return i.getOptionLabel(r);const l=a.find(s=>i.getOptionValue(s)===r);return l?i.getOptionLabel(l):""},renderEditCell:Wue,filterOperators:mye(),pastedValueParser:(e,t)=>{const n=t.colDef,r=n.valueOptions,o=typeof r=="function"?r({field:n.field}):r||[],i=n.getOptionValue;if(o.find(l=>i(l)===e))return e}}),Cz="__default__",bye=()=>({string:fi,number:pye,date:cye,dateTime:dye,boolean:yz,singleSelect:yye,[g0]:jve,[Cz]:fi});function zw(e,t){return typeof e=="string"&&[t,`
`,"\r",'"'].some(n=>e.includes(n))?`"${e.replace(/"/g,'""')}"`:e}const Sz=(e,t)=>{const{delimiterCharacter:n,ignoreValueFormatter:r}=t;let o;if(r){var i;const l=e.colDef.type;if(l==="number")o=String(e.value);else if(l==="date"||l==="dateTime"){var a;o=(a=e.value)==null?void 0:a.toISOString()}else typeof((i=e.value)==null?void 0:i.toString)=="function"?o=e.value.toString():o=e.value}else o=e.formattedValue;return zw(o,n)};ra(["MUI: When the value of a field is an object or a `renderCell` is provided, the CSV export might not display the value correctly.","You can provide a `valueFormatter` with a string representation to be used."]);class jw{constructor(t){this.options=void 0,this.rowString="",this.isEmpty=!0,this.options=t}addValue(t){this.isEmpty||(this.rowString+=this.options.delimiterCharacter),t==null?this.rowString+="":typeof this.options.sanitizeCellValue=="function"?this.rowString+=this.options.sanitizeCellValue(t,this.options.delimiterCharacter):this.rowString+=t,this.isEmpty=!1}getRowString(){return this.rowString}}const xye=({id:e,columns:t,getCellParams:n,delimiterCharacter:r,ignoreValueFormatter:o})=>{const i=new jw({delimiterCharacter:r});return t.forEach(a=>{const l=n(e,a.field);i.addValue(Sz(l,{delimiterCharacter:r,ignoreValueFormatter:o}))}),i.getRowString()};function wye(e){const{columns:t,rowIds:n,delimiterCharacter:r,includeHeaders:o,includeColumnGroupsHeaders:i,ignoreValueFormatter:a,apiRef:l}=e,s=n.reduce((m,p)=>`${m}${xye({id:p,columns:t,getCellParams:l.current.getCellParams,delimiterCharacter:r,ignoreValueFormatter:a})}\r
`,"").trim();if(!o)return s;const u=t.filter(m=>m.field!==wd.field),c=[];if(i){const m=l.current.unstable_getAllGroupDetails();let p=0;const h=u.reduce((y,b)=>{const g=l.current.unstable_getColumnGroupPath(b.field);return y[b.field]=g,p=Math.max(p,g.length),y},{});for(let y=0;y<p;y+=1){const b=new jw({delimiterCharacter:r,sanitizeCellValue:zw});c.push(b),u.forEach(g=>{const x=(h[g.field]||[])[y],w=m[x];b.addValue(w?w.headerName||w.groupId:"")})}}const d=new jw({delimiterCharacter:r,sanitizeCellValue:zw});return u.forEach(m=>{d.addValue(m.headerName||m.field)}),c.push(d),`${`${c.map(m=>m.getRowString()).join(`\r
`)}\r
`}${s}`.trim()}function ER(e){const t=document.createElement("span");t.style.whiteSpace="pre",t.style.userSelect="all",t.style.opacity="0px",t.textContent=e,document.body.appendChild(t);const n=document.createRange();n.selectNode(t);const r=window.getSelection();r.removeAllRanges(),r.addRange(n);try{document.execCommand("copy")}finally{document.body.removeChild(t)}}function Cye(e){navigator.clipboard?navigator.clipboard.writeText(e).catch(()=>{ER(e)}):ER(e)}function Sye(e){var t;return!!((t=window.getSelection())!=null&&t.toString()||e&&(e.selectionEnd||0)-(e.selectionStart||0)>0)}const Eye=(e,t)=>{const n=t.unstable_ignoreValueFormatterDuringExport,r=(typeof n=="object"?n==null?void 0:n.clipboardExport:n)||!1,o=t.clipboardCopyCellDelimiter,i=v.useCallback(a=>{if(!((a.ctrlKey||a.metaKey)&&a.key==="c")||Sye(a.target))return;let l="";if(e.current.getSelectedRows().size>0)l=e.current.getDataAsCsv({includeHeaders:!1,delimiter:o});else{const u=Xr(e);if(u){const c=e.current.getCellParams(u.id,u.field);l=Sz(c,{delimiterCharacter:o,ignoreValueFormatter:r})}}l=e.current.unstable_applyPipeProcessors("clipboardCopy",l),l&&(Cye(l),e.current.publishEvent("clipboardCopy",l))},[e,r,o]);Sde(e,e.current.rootElementRef,"keydown",i),Kt(e,"clipboardCopy",t.onClipboardCopy)},Pye=e=>O({},e,{columnMenu:{open:!1}}),kye=e=>{const t=hr(e,"useGridColumnMenu"),n=v.useCallback(a=>{e.current.setState(s=>s.columnMenu.open&&s.columnMenu.field===a?s:(t.debug("Opening Column Menu"),O({},s,{columnMenu:{open:!0,field:a}})))&&(e.current.hidePreferences(),e.current.forceUpdate())},[e,t]),r=v.useCallback(()=>{const a=_w(e.current.state);if(a.field){const s=vd(e),u=ui(e),c=_a(e);let d=a.field;if(s[d]||(d=c[0]),u[d]===!1){const f=c.filter(p=>p===d?!0:u[p]!==!1),m=f.indexOf(d);d=f[m+1]||f[m-1]}e.current.setColumnHeaderFocus(d)}e.current.setState(s=>!s.columnMenu.open&&s.columnMenu.field===void 0?s:(t.debug("Hiding Column Menu"),O({},s,{columnMenu:O({},s.columnMenu,{open:!1,field:void 0})})))&&e.current.forceUpdate()},[e,t]),o=v.useCallback(a=>{t.debug("Toggle Column Menu");const l=_w(e.current.state);!l.open||l.field!==a?n(a):r()},[e,t,n,r]);ot(e,{showColumnMenu:n,hideColumnMenu:r,toggleColumnMenu:o},"public"),Ve(e,"columnResizeStart",r),Ve(e,"virtualScrollerWheel",e.current.hideColumnMenu),Ve(e,"virtualScrollerTouchMove",e.current.hideColumnMenu)},Ez=["maxWidth","minWidth","width","flex"];function $ye({initialFreeSpace:e,totalFlexUnits:t,flexColumns:n}){const r=new Set(n.map(a=>a.field)),o={all:{},frozenFields:[],freeze:a=>{const l=o.all[a];l&&l.frozen!==!0&&(o.all[a].frozen=!0,o.frozenFields.push(a))}};function i(){if(o.frozenFields.length===r.size)return;const a={min:{},max:{}};let l=e,s=t,u=0;o.frozenFields.forEach(c=>{l-=o.all[c].computedWidth,s-=o.all[c].flex});for(let c=0;c<n.length;c+=1){const d=n[c];if(o.all[d.field]&&o.all[d.field].frozen===!0)continue;let m=l/s*d.flex;m<d.minWidth?(u+=d.minWidth-m,m=d.minWidth,a.min[d.field]=!0):m>d.maxWidth&&(u+=d.maxWidth-m,m=d.maxWidth,a.max[d.field]=!0),o.all[d.field]={frozen:!1,computedWidth:m,flex:d.flex}}u<0?Object.keys(a.max).forEach(c=>{o.freeze(c)}):u>0?Object.keys(a.min).forEach(c=>{o.freeze(c)}):n.forEach(({field:c})=>{o.freeze(c)}),i()}return i(),o.all}const Bw=(e,t)=>{const n={};let r=0,o=0;const i=[];e.orderedFields.forEach(l=>{const s=O({},e.lookup[l]);if(e.columnVisibilityModel[l]===!1)s.computedWidth=0;else{let u;s.flex&&s.flex>0?(r+=s.flex,u=0,i.push(s)):u=Zc(s.width||fi.width,s.minWidth||fi.minWidth,s.maxWidth||fi.maxWidth),o+=u,s.computedWidth=u}n[l]=s});const a=Math.max(t-o,0);if(r>0&&t>0){const l=$ye({initialFreeSpace:a,totalFlexUnits:r,flexColumns:i});Object.keys(l).forEach(s=>{n[s].computedWidth=l[s].computedWidth})}return O({},e,{lookup:n})},Iye=(e,t)=>{if(!t)return e;const{orderedFields:n=[],dimensions:r={}}=t,o=Object.keys(r);if(o.length===0&&n.length===0)return e;const i={},a=[];for(let c=0;c<n.length;c+=1){const d=n[c];e.lookup[d]&&(i[d]=!0,a.push(d))}const l=a.length===0?e.orderedFields:[...a,...e.orderedFields.filter(c=>!i[c])],s=O({},e.lookup);for(let c=0;c<o.length;c+=1){const d=o[c],f=O({},s[d],{hasBeenResized:!0});Object.entries(r[d]).forEach(([m,p])=>{f[m]=p===-1?1/0:p}),s[d]=f}return O({},e,{orderedFields:l,lookup:s})};function PR(e,t){let n=e[Cz];return t&&e[t]&&(n=e[t]),n}const Qu=({apiRef:e,columnsToUpsert:t,initialState:n,columnTypes:r,columnVisibilityModel:o=ui(e),keepOnlyColumnsToUpsert:i=!1})=>{var a,l,s;const u=!e.current.state.columns;let c;if(u)c={orderedFields:[],lookup:{},columnVisibilityModel:o};else{const p=Bs(e.current.state);c={orderedFields:i?[]:[...p.orderedFields],lookup:O({},p.lookup),columnVisibilityModel:o}}let d={};i&&!u&&(d=Object.keys(c.lookup).reduce((p,h)=>O({},p,{[h]:!1}),{})),t.forEach(p=>{const{field:h}=p;d[h]=!0;let y=c.lookup[h];y==null?(y=O({},PR(r,p.type),{field:h,hasBeenResized:!1}),c.orderedFields.push(h)):i&&c.orderedFields.push(h),y&&y.type!==p.type&&(y=O({},PR(r,p.type),{field:h}));let b=y.hasBeenResized;Ez.forEach(g=>{p[g]!==vLine truncated
`);q.appendChild(x.createTextNode(G)),x.head.appendChild(q)}}else if(H.getAttribute("href")){const q=x.createElement(H.tagName);for(let V=0;V<H.attributes.length;V+=1){const G=H.attributes[V];G&&q.setAttribute(G.nodeName,G.nodeValue||"")}k.push(new Promise(V=>{q.addEventListener("load",()=>V())})),x.head.appendChild(q)}}}Promise.all(k).then(()=>{p.contentWindow.print()})},[e,r,t.columnHeaderHeight]),c=v.useCallback(p=>{var h;r.current.body.removeChild(p),e.current.restoreState(o.current||{}),(h=o.current)!=null&&(h=h.columns)!=null&&h.columnVisibilityModel||e.current.setColumnVisibilityModel(i.current),e.current.unstable_setVirtualization(!0),e.current.setRows(a.current),o.current=null,i.current={},a.current=[]},[e]),f={exportDataAsPrint:v.useCallback(async p=>{if(n.debug("Export data as Print"),!e.current.rootElementRef.current)throw new Error("MUI: No grid root element available.");o.current=e.current.exportState(),i.current=ui(e);const h=$a(e);if(a.current=ff(e).map(b=>h[b]),t.pagination){const b=h4(e),g={page:0,pageSize:b};e.current.updateControlState("pagination",og(b,"DataGridPro",g)),e.current.forceUpdate()}await l(p==null?void 0:p.fields,p==null?void 0:p.allColumns,p==null?void 0:p.includeCheckboxes),p!=null&&p.getRowsToExport&&s(p.getRowsToExport),e.current.unstable_setVirtualization(!1),await Bye();const y=Hye(p==null?void 0:p.fileName);y.onload=()=>{u(y,p),y.contentWindow.matchMedia("print").addEventListener("change",g=>{g.matches===!1&&c(y)})},r.current.body.appendChild(y)},[t,n,e,u,c,l,s])};ot(e,f,"public");const m=v.useCallback((p,h)=>{var y;return(y=h.printOptions)!=null&&y.disableToolbarButton?p:[...p,{component:z.jsx(Wme,{options:h.printOptions}),componentName:"printExport"}]},[]);Ln(e,"exportMenu",m)},Vye=(e,t,n)=>{var r,o,i;const a=(r=(o=t.filterModel)!=null?o:(i=t.initialState)==null||(i=i.filter)==null?void 0:i.filterModel)!=null?r:xp();return O({},e,{filter:{filterModel:gz(a,t.disableMultipleColumnsFiltering,n),filteredRowsLookup:{},filteredDescendantCountLookup:{}},visibleRowsLookup:{}})},Wye=e=>e.filteredRowsLookup;function $R(e,t){return e.current.applyStrategyProcessor("visibleRowsLookupCreation",{tree:t.rows.tree,filteredRowsLookup:t.filter.filteredRowsLookup})}function Gye(){return t0(Object.values)}const qye=(e,t)=>{var n,r;const o=hr(e,"useGridFilter");e.current.registerControlState({stateId:"filter",propModel:t.filterModel,propOnChange:t.onFilterModelChange,stateSelector:Yn,changeEvent:"filterModelChange"});const i=v.useCallback(()=>{e.current.setState(I=>{const M=Yn(I,e.current.instanceId),_=t.filterMode==="client"?_ve(M,e,t.disableEval):null,D=e.current.applyStrategyProcessor("filtering",{isRowMatchingFilters:_,filterModel:M??xp()}),T=O({},I,{filter:O({},I.filter,D)}),F=$R(e,T);return O({},T,{visibleRowsLookup:F})}),e.current.publishEvent("filteredRowsSet")},[e,t.filterMode,t.disableEval]),a=v.useCallback((I,M)=>M==null||M.filterable===!1||t.disableColumnFilter?I:[...I,"columnMenuFilterItem"],[t.disableColumnFilter]),l=v.useCallback(()=>{i(),e.current.forceUpdate()},[e,i]),s=v.useCallback(I=>{const M=Yn(e),_=[...M.items],D=_.findIndex(T=>T.id===I.id);D===-1?_.push(I):_[D]=I,e.current.setFilterModel(O({},M,{items:_}),"upsertFilterItem")},[e]),u=v.useCallback(I=>{const M=Yn(e),_=[...M.items];I.forEach(D=>{const T=I.findIndex(F=>F.id===D.id);T===-1?_.push(D):_[T]=D}),e.current.setFilterModel(O({},M,{items:I}),"upsertFilterItems")},[e]),c=v.useCallback(I=>{const M=Yn(e),_=M.items.filter(D=>D.id!==I.id);_.length!==M.items.length&&e.current.setFilterModel(O({},M,{items:_}),"deleteFilterItem")},[e]),d=v.useCallback((I,M,_)=>{if(o.debug("Displaying filter panel"),I){const D=Yn(e),T=D.items.filter(L=>{var j;if(L.value!==void 0)return!(Array.isArray(L.value)&&L.value.length===0);const A=(j=e.current.getColumn(L.field).filterOperators)==null?void 0:j.find(q=>q.value===L.operator);return!(typeof(A==null?void 0:A.requiresFilterValue)>"u"?!0:A==null?void 0:A.requiresFilterValue)});let F;const N=T.find(L=>L.field===I),k=e.current.getColumn(I);N?F=T:t.disableMultipleColumnsFiltering?F=[Nw({field:I,operator:k.filterOperators[0].value},e)]:F=[...T,Nw({field:I,operator:k.filterOperators[0].value},e)],e.current.setFilterModel(O({},D,{items:F}))}e.current.showPreferences(su.filters,M,_)},[e,o,t.disableMultipleColumnsFiltering]),f=v.useCallback(()=>{o.debug("Hiding filter panel"),e.current.hidePreferences()},[e,o]),m=v.useCallback(I=>{const M=Yn(e);M.logicOperator!==I&&e.current.setFilterModel(O({},M,{logicOperator:I}),"changeLogicOperator")},[e]),p=v.useCallback(I=>{const M=Yn(e);Us(M.quickFilterValues,I)||e.current.setFilterModel(O({},M,{quickFilterValues:[...I]}))},[e]),h=v.useCallback((I,M)=>{Yn(e)!==I&&(o.debug("Setting filter model"),e.current.updateControlState("filter",hR(I,t.disableMultipleColumnsFiltering,e),M),e.current.unstable_applyFilters())},[e,o,t.disableMultipleColumnsFiltering]),y={setFilterLogicOperator:m,unstable_applyFilters:l,deleteFilterItem:c,upsertFilterItem:s,upsertFilt Line truncated
`));const T=[];D.forEach(N=>{const k=av(N,t.getRowId,"A row was provided without id when calling updateRows():"),L=e.current.getRowNode(k);if((L==null?void 0:L.type)==="pinnedRow"){const j=e.current.caches.pinnedRows,B=j.idLookup[k];B&&(j.idLookup[k]=O({},B,N))}else T.push(N)});const F=Ase({updates:T,getRowId:t.getRowId,previousCache:e.current.caches.rows});c({cache:F,throttle:!0})},[t.signature,t.getRowId,c,e]),m=v.useCallback(()=>{const D=ff(e),T=$a(e);return new Map(D.map(F=>{var N;return[F,(N=T[F])!=null?N:{}]}))},[e]),p=v.useCallback(()=>o0(e),[e]),h=v.useCallback(()=>ff(e),[e]),y=v.useCallback(D=>u[D],[u]),b=v.useCallback((D,T)=>{const F=e.current.getRowNode(D);if(!F)throw new Error(`MUI: No row with id #${D} found`);if(F.type!=="group")throw new Error("MUI: Only group nodes can be expanded or collapsed");const N=O({},F,{childrenExpanded:T});e.current.setState(k=>O({},k,{rows:O({},k.rows,{tree:O({},k.rows.tree,{[D]:N})})})),e.current.forceUpdate(),e.current.publishEvent("rowExpansionChange",N)},[e]),g=v.useCallback(D=>{var T;return(T=li(e)[D])!=null?T:null},[e]),x=v.useCallback(({skipAutoGeneratedRows:D=!0,groupId:T,applySorting:F,applyFiltering:N})=>{const k=li(e);let L;if(F){const j=k[T];if(!j)return[];const B=WE(e);L=[];const A=B.findIndex(H=>H===T)+1;for(let H=A;H<B.length&&k[B[H]].depth>j.depth;H+=1){const q=B[H];(!D||!bp(k[q]))&&L.push(q)}}else L=QE(k,T,D);if(N){const j=p4(e);L=L.filter(B=>j[B]!==!1)}return L},[e]),w=v.useCallback((D,T)=>{const F=e.current.getRowNode(D);if(!F)throw new Error(`MUI: No row with id #${D} found`);if(F.parent!==wr)throw new Error("MUI: The row reordering do not support reordering of grouped rows yet");if(F.type!=="leaf")throw new Error("MUI: The row reordering do not support reordering of footer or grouping rows");e.current.setState(N=>{const k=li(N,e.current.instanceId)[wr],L=k.children,j=L.findIndex(A=>A===D);if(j===-1||j===T)return N;n.debug(`Moving row ${D} to index ${T}`);const B=[...L];return B.splice(T,0,B.splice(j,1)[0]),O({},N,{rows:O({},N.rows,{tree:O({},N.rows.tree,{[wr]:O({},k,{children:B})})})})}),e.current.publishEvent("rowsSet")},[e,n]),P=v.useCallback((D,T)=>{if(t.signature===Ui.DataGrid&&T.length>1)throw new Error(["MUI: You can't replace rows using `apiRef.current.unstable_replaceRows` on the DataGrid.","You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature."].join(`
`));if(T.length===0)return;if(i0(e)>1)throw new Error("`apiRef.current.unstable_replaceRows` is not compatible with tree data and row grouping");const N=O({},li(e)),k=O({},$a(e)),L=O({},rv(e)),j=N[wr],B=[...j.children],A=new Set;for(let q=0;q<T.length;q+=1){const V=T[q],G=av(V,t.getRowId,"A row was provided without id when calling replaceRows()."),[Y]=B.splice(D+q,1,G);A.has(Y)||(delete k[Y],delete L[Y],delete N[Y]);const re={id:G,depth:0,parent:wr,type:"leaf",groupingKey:null};k[G]=V,L[G]=G,N[G]=re,A.add(G)}N[wr]=O({},j,{children:B});const H=B.filter(q=>N[q].type==="leaf");e.current.caches.rows.dataRowIdToModelLookup=k,e.current.caches.rows.dataRowIdToIdLookup=L,e.current.setState(q=>O({},q,{rows:O({},q.rows,{dataRowIdToModelLookup:k,dataRowIdToIdLookup:L,dataRowIds:H,tree:N})})),e.current.publishEvent("rowsSet")},[e,t.signature,t.getRowId]),C={getRow:a,getRowId:s,getRowModels:m,getRowsCount:p,getAllRowIds:h,setRows:d,updateRows:f,getRowNode:g,getRowIndexRelativeToVisibleRows:y,unstable_replaceRows:P},E={setRowIndex:w,setRowChildrenExpansion:b,getRowGroupChildren:x},S=v.useCallback(()=>{n.info("Row grouping pre-processing have changed, regenerating the row tree");let D;e.current.caches.rows.rowsBeforePartialUpdates===t.rows?D=O({},e.current.caches.rows,{updates:{type:"full",rows:ff(e)}}):D=ng({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),c({cache:D,throttle:!1})},[n,e,t.rows,t.getRowId,t.loading,t.rowCount,c]),R=v.useCallback(D=>{D==="rowTreeCreation"&&S()},[S]),I=v.useCallback(()=>{e.current.getActiveStrategy("rowTree")!==gse(e)&&S()},[e,S]);Ve(e,"activeStrategyProcessorChange",R),Ve(e,"strategyAvailabilityChange",I);const M=v.useCallback(()=>{e.current.setState(D=>{const T=e.current.unstable_applyPipeProcessors("hydrateRows",{tree:li(D,e.current.instanceId),treeDepths:$M(D,e.current.instanceId),dataRowIds:ff(D,e.current.instanceId),dataRowIdToModelLookup:$a(D,e.current.instanceId),dataRowIdToIdLookup:rv(D,e.current.instanceId)});return O({},D,{rows:O({},D.rows,T,{totalTopLevelRowCount:v4({tree:T.tree,rowCountProp:t.rowCount})})})}),e.current.publishEvent("rowsSet"),e.current.forceUpdate()},[e,t.rowCount]);mP(e,"hydrateRows",M),ot(e,C,"public"),ot(e,E,t.signature===Ui.DataGrid?"private":"public");const _=v.useRef(!0);v.useEffect(()=>{if(_.current){_.current=!1;return}const D=e.current.caches.rows.rowsBeforePartialUpdates===t.rows,T=e.current.caches.rows.loadingPropBeforePartialUpdates===t.loading,F=e.current.caches.rows.rowCountPropBeforePartialUpdates===t.rowCount;if(D){T||(e.current.setState(N=>O({},N,{rows:O({},N.rows,{loading:t.loading})})),e.current.caches.rows.loadingPropBeforePartialUpdates=t.loading,e.current.forceUpdate()),F||(e.current.setState(N=>O({},N,{rows:O({},N.rows,{totalRowCount:Math.max(t.rowCount||0,N.rows.totalRowCount),totalTopLevelRowCount:Math.max(t.rowCount||0,N.rows.totalTopLevelRowCount)})})),e.current.caches.rows.rowCountPropBeforePartialUpdates=t.rowCount,e.current.forceUpdate());return}n.debug(`Updating all rows, new length ${t.rows.length}`),c({cache:ng({rows:t.rows,getRowId:t.getRowId,loading:t.loading,rowCount:t.rowCount}),throttle:!1})},[t.rows,t.rowCount,t.getRowId,t.loading,n,c,e])},f0e=e=>{const t={[wr]:O({},_se(),{children:e})};for(let n=0;n<e.length;n+=1){const r=e[n];t[r]={id:r,depth:0,parent:wr,type:"leaf",groupingKey:null}}return{groupingName:uu,tree:t,treeDepths:{0:e.length},dataRowIds:e}},p0e=({previousTree:e,actions:t})=>{const n=O({},e),r={};for(let a=0;a<t.remove.length;a+=1){const l=t.remove[a];r[l]=!0,delete n[l]}for(let a=0;a<t.insert.length;a+=1){const l=t.insert[a];n[l]={id:l,depth:0,parent:wr,type:"leaf",groupingKey:null}}const o=n[wr];let i=[...o.children,...t.insert];return Object.values(r).length&&(i=i.filter(a=>!r[a])),n[wr]=O({},o,{children:i}),{groupingName:uu,tree:n,treeDepths:{0:i.length},dataRowIds:i}},m0e=e=>e.updates.type==="full"?f0e(e.updates.rows):p0e({previousTree:e.previousTree,actions:e.updates.actions}),h0e=e=>{hv(e,uu,"rowTreeCreation",m0e)},Iz=(e,t)=>e==null||Array.isArray(e)?e:t&&t[0]===e?t:[e],g0e=(e,t)=>{var n;return O({},e,{rowSelection:t.rowSelection?(n=Iz(t.rowSelectionModel))!=null?n:[]:[]})},v0e=(e,t)=>{const n=hr(e,"useGridSelection"),r=T=>(...F)=>{t.rowSelection&&T(...F)},o=v.useMemo(()=>Iz(t.rowSelectionModel,Co(e.current.state)),[e,t.rowSelectionModel]),i=v.useRef(null);e.current.registerControlState({stateId:"rowSelection",propModel:o,propOnChange:t.onRowSelectionModelChange,stateSelector:Co,changeEvent:"rowSelectionChange"});const{checkboxSelection:a,disableMultipleRowSelection:l,disableRowSelectionOnClick:s,isRowSelectable:u}=t,c=!l||a,d=xu(e,t),f=v.useCallback(T=>{var F;let N=T;const k=(F=i.current)!=null?F:T,L=e.current.isRowSelected(T);if(L){const j=Nf(e),B=j.findIndex(H=>H===k),A=j.findIndex(H=>H===N);if(B===A)return;B>A?N=j[A+1]:N=j[A-1]}i.current=T,e.current.selectRowRange({startId:k,endId:N},!L)},[e]),m=v.useCallback(T=>{if(t.signature===Ui.DataGrid&&!t.checkboxSelection&&Array.isArra Line truncated
`));Co(e.current.state)!==T&&(n.debug("Setting selection model"),e.current.setState(N=>O({},N,{rowSelection:t.rowSelection?T:[]})),e.current.forceUpdate())},[e,n,t.rowSelection,t.signature,t.checkboxSelection]),p=v.useCallback(T=>Co(e.current.state).includes(T),[e]),h=v.useCallback(T=>{if(u&&!u(e.current.getRowParams(T)))return!1;const F=e.current.getRowNode(T);return!((F==null?void 0:F.type)==="footer"||(F==null?void 0:F.type)==="pinnedRow")},[e,u]),y=v.useCallback(()=>Rde(e),[e]),b=v.useCallback((T,F=!0,N=!1)=>{if(e.current.isRowSelectable(T))if(i.current=T,N)n.debug(`Setting selection for row ${T}`),e.current.setRowSelectionModel(F?[T]:[]);else{n.debug(`Toggling selection for row ${T}`);const L=Co(e.current.state).filter(B=>B!==T);F&&L.push(T),(L.length<2||c)&&e.current.setRowSelectionModel(L)}},[e,n,c]),g=v.useCallback((T,F=!0,N=!1)=>{n.debug("Setting selection for several rows");const k=T.filter(B=>e.current.isRowSelectable(B));let L;if(N)L=F?k:[];else{const B=O({},fv(e));k.forEach(A=>{F?B[A]=A:delete B[A]}),L=Object.values(B)}(L.length<2||c)&&e.current.setRowSelectionModel(L)},[e,n,c]),x=v.useCallback(({startId:T,endId:F},N=!0,k=!1)=>{if(!e.current.getRow(T)||!e.current.getRow(F))return;n.debug(`Expanding selection from row ${T} to row ${F}`);const L=Nf(e),j=L.indexOf(T),B=L.indexOf(F),[A,H]=j>B?[B,j]:[j,B],q=L.slice(A,H+1);e.current.selectRows(q,N,k)},[e,n]),w={selectRow:b,setRowSelectionModel:m,getSelectedRows:y,isRowSelected:p,isRowSelectable:h},P={selectRows:g,selectRowRange:x};ot(e,w,"public"),ot(e,P,t.signature===Ui.DataGrid?"private":"public");const C=v.useCallback(()=>{if(t.keepNonExistentRowsSelected)return;const T=Co(e.current.state),F=$a(e),N=O({},fv(e));let k=!1;T.forEach(L=>{F[L]||(delete N[L],k=!0)}),k&&e.current.setRowSelectionModel(Object.values(N))},[e,t.keepNonExistentRowsSelected]),E=v.useCallback((T,F)=>{const N=F.metaKey||F.ctrlKey,k=!a&&!N&&!zue(F),L=!c||k,j=e.current.isRowSelected(T);L?e.current.selectRow(T,k?!0:!j,!0):e.current.selectRow(T,!j,!1)},[e,c,a]),S=v.useCallback((T,F)=>{var N;if(s)return;const k=(N=F.target.closest(`.${ne.cell}`))==null?void 0:N.getAttribute("data-field");if(k===wd.field||k===fP)return;if(k){const j=e.current.getColumn(k);if((j==null?void 0:j.type)===g0)return}e.current.getRowNode(T.id).type!=="pinnedRow"&&(F.shiftKey&&(c||a)?f(T.id):E(T.id,F))},[s,c,a,e,f,E]),R=v.useCallback((T,F)=>{if(c&&F.shiftKey){var N;(N=window.getSelection())==null||N.removeAllRanges()}},[c]),I=v.useCallback((T,F)=>{F.nativeEvent.shiftKey?f(T.id):e.current.selectRow(T.id,T.value)},[e,f]),M=v.useCallback(T=>{const N=t.checkboxSelectionVisibleOnly&&t.pagination?B4(e):Nf(e);e.current.selectRows(N,T.value)},[e,t.checkboxSelectionVisibleOnly,t.pagination]),_=v.useCallback((T,F)=>{if(e.current.getCellMode(T.id,T.field)!==Mt.Edit&&!rm(F)){if(cv(F.key)&&F.shiftKey){const N=Xr(e);if(N&&N.id!==T.id){F.preventDefault();const k=e.current.isRowSelected(N.id);if(!c){e.current.selectRow(N.id,!k,!0);return}const L=e.current.getRowIndexRelativeToVisibleRows(N.id),j=e.current.getRowIndexRelativeToVisibleRows(T.id);let B,A;L>j?k?(B=j,A=L-1):(B=j,A=L):k?(B=L+1,A=j):(B=L,A=j);const H=d.rows.slice(B,A+1).map(q=>q.id);e.current.selectRows(H,!k);return}}if(F.key===" "&&F.shiftKey){F.preventDefault(),E(T.id,F);return}F.key==="a"&&(F.ctrlKey||F.metaKey)&&(F.preventDefault(),g(e.current.getAllRowIds(),!0))}},[e,E,g,d.rows,c]);Ve(e,"sortedRowsSet",r(C)),Ve(e,"rowClick",r(S)),Ve(e,"rowSelectionCheckboxChange",r(I)),Ve(e,"headerSelectionCheckboxChange",M),Ve(e,"cellMouseDown",r(R)),Ve(e,"cellKeyDown",r(_)),v.useEffect(()=>{o!==void 0&&e.current.setRowSelectionModel(o)},[e,o,t.rowSelection]),v.useEffect(()=>{t.rowSelection||e.current.setRowSelectionModel([])},[e,t.rowSelection]);const D=o!=null;v.useEffect(()=>{if(D||!t.rowSelection)return;const T=Co(e.current.state);if(h){const F=T.filter(N=>h(N));F.length<T.length&&e.current.setRowSelectionModel(F)}},[e,h,D,t.rowSelection]),v.useEffect(()=>{if(!t.rowSelection||D)return;const T=Co(e.current.state);!c&&T.length>1&&e.current.setRowSelectionModel([])},[e,c,a,D,t.rowSelection])},y0e={noRowsLabel:"No rows",noResultsOverlayLabel:"No results found.",toolbarDensity:"Density",toolbarDensityLabel:"Density",toolbarDensityCompact:"Compact",toolbarDensityStandard:"Standard",toolbarDensityComfortable:"Comfortable",toolbarColumns:"Columns",toolbarColumnsLabel:"Select columns",toolbarFilters:"Filters",toolbarFiltersLabel:"Show filters",toolbarFiltersTooltipHide:"Hide filters",toolbarFiltersTooltipShow:"Show filters",toolbarFiltersTooltipActive:e=>e!==1?`${e} active filters`:`${e} active filter`,toolbarQuickFilterPlaceholder:"Search…",toolbarQuickFilterLabel:"Search",toolbarQuickFilterDeleteIconLabel:"Clear",toolbarExport:"Export",toolbarExportLabel:"Export",toolbarExportCSV:"Download as CSV",toolbarExportPrint:"Print",toolbarExportExcel:"Download as Excel",columnsPanelTextFieldLabel:"Find column",columnsPanelTextFieldPlaceholder:"Column title",columnsPanelDragIconLabel: Line truncated
`)),r.current=!0),E.width===0&&!r.current&&!S&&(n.error(["The parent DOM element of the data grid has an empty width.","Please make sure that this element has an intrinsic width.","The grid displays with a width of 0px.","","More details: https://mui.com/r/x-data-grid-no-dimensions."].join(`
`)),r.current=!0),P.current){f(E),P.current=!1;return}m(E)},[t.autoHeight,m,n]);_t(()=>c(),[c]),Kt(e,"sortedRowsSet",c),Kt(e,"paginationModelChange",c),Kt(e,"columnsChange",c),Ve(e,"resize",C),Kt(e,"debouncedResize",t.onResize)}const $0e=["style"],I0e=["style"];function Ec(e,t,n=0,r=t.length){if(t.length<=0)return-1;if(n>=r)return n;const o=n+Math.floor((r-n)/2),i=t[o];return e<=i?Ec(e,t,n,o):Ec(e,t,o+1,r)}function O0e(e,t,n){let r=1;for(;n<t.length&&Math.abs(t[n])<e;)n+=r,r*=2;return Ec(e,t,Math.floor(n/2),Math.min(n,t.length))}const wl=({firstIndex:e,lastIndex:t,buffer:n,minFirstIndex:r,maxLastIndex:o})=>[Zc(e-n,r,o),Zc(t+n,r,o)],Oz=(e,t)=>e===t?!0:e.firstRowIndex===t.firstRowIndex&&e.lastRowIndex===t.lastRowIndex&&e.firstColumnIndex===t.firstColumnIndex&&e.lastColumnIndex===t.lastColumnIndex,M0e={maxSize:3},R0e=e=>{var t,n;const r=us(),o=Be(),i=De(r,er),a=De(r,Ude),l=De(r,q4),{ref:s,onRenderZonePositioning:u,renderZoneMinColumnIndex:c=0,renderZoneMaxColumnIndex:d=i.length,getRowProps:f}=e,m=Ur(),p=De(r,Xc),h=De(r,VE),y=De(r,Xr),b=De(r,iv),g=De(r,Cp),x=De(r,fv),w=xu(r,o),P=v.useRef(null),C=v.useRef(null),E=xt(s,C),[S,R]=v.useState(null),I=v.useRef(S),M=v.useRef({top:0,left:0}),[_,D]=v.useState({width:null,height:null}),T=v.useRef(h),[F,N]=v.useState(null),k=v.useRef(Object.create(null)),L=v.useRef(),j=v.useRef(),B=v.useRef(t0((ie,ye,U,Q,Z,ae)=>{let te;const K=ie.slice(ye,U);return ae>-1&&(ye>ae&&ae>=Q||U<ae&&ae<Z)&&(te=ae),{focusedCellColumnIndexNotInRange:te,renderedColumns:K}},M0e)),A=v.useMemo(()=>y!==null?i.findIndex(ie=>ie.field===y.field):-1,[y,i]),H=v.useCallback(ie=>{var ye,U;const Q=r.current.getLastMeasuredRowIndex();let Z=Q===1/0;(ye=w.range)!=null&&ye.lastRowIndex&&!Z&&(Z=Q>=w.range.lastRowIndex);const ae=Zc(Q-(((U=w.range)==null?void 0:U.firstRowIndex)||0),0,g.positions.length);return Z||g.positions[ae]>=ie?Ec(ie,g.positions):O0e(ie,g.positions,ae)},[r,(t=w.range)==null?void 0:t.firstRowIndex,(n=w.range)==null?void 0:n.lastRowIndex,g.positions]),q=v.useCallback(()=>{if(!a)return{firstRowIndex:0,lastRowIndex:w.rows.length,firstColumnIndex:0,lastColumnIndex:i.length};const{top:ie,left:ye}=M.current,U=Math.min(H(ie),g.positions.length-1),Q=o.autoHeight?U+w.rows.length:H(ie+_.height);let Z=0,ae=p.length;if(l){let te=!1;const[K,ee]=wl({firstIndex:U,lastIndex:Q,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});for(let se=K;se<ee&&!te;se+=1){const Ce=w.rows[se];te=r.current.rowHasAutoHeight(Ce.id)}te||(Z=Ec(Math.abs(ye),p),ae=Ec(Math.abs(ye)+_.width,p))}return{firstRowIndex:U,lastRowIndex:Q,firstColumnIndex:Z,lastColumnIndex:ae}},[a,l,H,g.positions.length,o.autoHeight,o.rowBuffer,w.rows,p,i.length,r,_]);_t(()=>{a?(C.current.scrollLeft=0,C.current.scrollTop=0):P.current.style.transform="translate3d(0px, 0px, 0px)"},[a]),_t(()=>{D({width:C.current.clientWidth,height:C.current.clientHeight})},[g.currentPageTotalHeight]);const V=v.useCallback(()=>{C.current&&D({width:C.current.clientWidth,height:C.current.clientHeight})},[]);Ve(r,"debouncedResize",V);const G=v.useCallback(ie=>{const[ye,U]=wl({firstIndex:ie.firstRowIndex,lastIndex:ie.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer}),[Q]=wl({firstIndex:ie.firstColumnIndex,lastIndex:ie.lastColumnIndex,minFirstIndex:c,maxLastIndex:d,buffer:o.columnBuffer}),Z=Hw({firstColumnToRender:Q,apiRef:r,firstRowToRender:ye,lastRowToRender:U,visibleRows:w.rows}),ae=m.direction==="ltr"?1:-1,te=Cp(r.current.state).positions[ye],K=ae*Xc(r)[Z];P.current.style.transform=`translate3d(${K}px, ${te}px, 0px)`,typeof u=="function"&&u({top:te,left:K})},[r,w.rows,u,c,d,o.columnBuffer,o.rowBuffer,m.direction]),Y=v.useCallback(()=>I.current,[]),re=v.useCallback(ie=>{if(I.current&&Oz(ie,I.current)){G(ie);return}R(ie),G(ie);const[ye,U]=wl({firstIndex:ie.firstRowIndex,lastIndex:ie.lastRowIndex,minFirstIndex:0,maxLastIndex:w.rows.length,buffer:o.rowBuffer});r.current.publishEvent("renderedRowsIntervalChange",{firstRowToRender:ye,lastRowToRender:U}),I.current=ie},[r,R,I,w.rows.length,o.rowBuffer,G]);_t(()=>{if(_.width==null)return;const ie=q();re(ie);const{top:ye,left:U}=M.current,Q={top:ye,left:U,renderContext:ie};r.current.publishEvent("scrollPositionChange",Q)},[r,q,_.width,re]);const le=Zt(ie=>{const{scrollTop:ye,scrollLeft:U}=ie.currentTarget;if(M.current.top=ye,M.current.left=U,!I.current||ye<0||m.direction==="ltr"&&U<0||m.direction==="rtl"&&U>0)return;const Q=a?q():I.current,Z=Math.abs(Q.firstRowIndex-I.current.firstRowIndex),ae=Math.abs(Q.lastRowIndex-I.current.lastRowIndex),te=Math.abs(Q.firstColumnIndex-I.current.firstColumnIndex),K=Math.abs(Q.lastColumnIndex-I.current.lastColumnIndex),ee=Z>=o.rowThreshold||ae>=o.rowThreshold||te>=o.columnThreshold||K>=o.columnThreshold||T.current!==h;r.current.publishEvent("scrollPositionChange",{top:ye,left:U,renderContext:ee?Q:I.current},ie),ee&&(ns.flushSync(()=>{re(Q)}),T.current=h)}),J=Zt(ie=>{r.current.publishEvent("virtualScrollerWheel",{},ie)}),oe=Zt(ie=>{r.current.publishEvent("virtualScroller Line truncated
`));n[e.field]=t;return}const{groupId:r,children:o}=e;o.forEach(i=>{Rz(i,[...t,r],n)})},Uw=e=>{if(!e)return{};const t={};return e.forEach(n=>{Rz(n,[],t)}),t},Vw=(e,t,n)=>{const r=s=>{var u;return(u=t[s])!=null?u:[]},o=[],i=Math.max(...e.map(s=>r(s).length)),a=(s,u,c)=>Us(r(s).slice(0,c+1),r(u).slice(0,c+1)),l=(s,u)=>!!(n!=null&&n.left&&n.left.includes(s)&&!n.left.includes(u)||n!=null&&n.right&&!n.right.includes(s)&&n.right.includes(u));for(let s=0;s<i;s+=1){const u=e.reduce((c,d)=>{var f;const m=(f=r(d)[s])!=null?f:null;if(c.length===0)return[{columnFields:[d],groupId:m}];const p=c[c.length-1],h=p.columnFields[p.columnFields.length-1];return p.groupId!==m||!a(h,d,s)||l(h,d)?[...c,{columnFields:[d],groupId:m}]:[...c.slice(0,c.length-1),{columnFields:[...p.columnFields,d],groupId:m}]},[]);o.push(u)}return o},Tbe=["groupId","children"],vP=e=>{let t={};return e.forEach(n=>{if(w4(n))return;const{groupId:r,children:o}=n,i=ce(n,Tbe);if(!r)throw new Error("MUI: An element of the columnGroupingModel does not have either `field` or `groupId`.");o||console.warn(`MUI: group groupId=${r} has no children.`);const a=O({},i,{groupId:r}),l=vP(o);if(l[r]!==void 0||t[r]!==void 0)throw new Error(`MUI: The groupId ${r} is used multiple times in the columnGroupingModel.`);t=O({},t,l,{[r]:a})}),O({},t)},_be=(e,t,n)=>{var r,o,i,a;if(!((r=t.experimentalFeatures)!=null&&r.columnGrouping))return e;const l=_a(n),s=n0(n),u=vP((o=t.columnGroupingModel)!=null?o:[]),c=Uw((i=t.columnGroupingModel)!=null?i:[]),d=Vw(l,c,(a=n.current.state.pinnedColumns)!=null?a:{}),f=s.length===0?0:Math.max(...s.map(m=>{var p,h;return(p=(h=c[m])==null?void 0:h.length)!=null?p:0}));return O({},e,{columnGrouping:{lookup:u,unwrappedGroupingModel:c,headerStructure:d,maxDepth:f}})},Fbe=(e,t)=>{var n;const r=v.useCallback(s=>{var u;return(u=fse(e)[s])!=null?u:[]},[e]),o=v.useCallback(()=>c4(e),[e]);ot(e,{unstable_getColumnGroupPath:r,unstable_getAllGroupDetails:o},"public");const a=v.useCallback(()=>{var s;const u=Uw((s=t.columnGroupingModel)!=null?s:[]);e.current.setState(c=>{var d,f,m;const p=(d=(f=c.columns)==null?void 0:f.orderedFields)!=null?d:[],h=(m=c.pinnedColumns)!=null?m:{},y=Vw(p,u,h);return O({},c,{columnGrouping:O({},c.columnGrouping,{headerStructure:y})})})},[e,t.columnGroupingModel]),l=v.useCallback(s=>{var u,c,d,f;if(!((u=t.experimentalFeatures)!=null&&u.columnGrouping))return;const m=(c=(d=(f=e.current).getPinnedColumns)==null?void 0:d.call(f))!=null?c:{},p=_a(e),h=n0(e),y=vP(s??[]),b=Uw(s??[]),g=Vw(p,b,m),x=h.length===0?0:Math.max(...h.map(w=>{var P,C;return(P=(C=b[w])==null?void 0:C.length)!=null?P:0}));e.current.setState(w=>O({},w,{columnGrouping:{lookup:y,unwrappedGroupingModel:b,headerStructure:g,maxDepth:x}}))},[e,(n=t.experimentalFeatures)==null?void 0:n.columnGrouping]);Ve(e,"columnIndexChange",a),Ve(e,"columnsChange",()=>{l(t.columnGroupingModel)}),Ve(e,"columnVisibilityModelChange",()=>{l(t.columnGroupingModel)}),v.useEffect(()=>{l(t.columnGroupingModel)},[l,t.columnGroupingModel])},Abe=(e,t)=>{const n=iye(e,t);return x0e(n,t),h0e(n),Ir(g0e,n,t),Ir(Mye,n,t),Ir(c0e,n,t),Ir(s0e,n,t),Ir(Kye,n,t),Ir(w0e,n,t),Ir(Zye,n,t),Ir(Vye,n,t),Ir(Fye,n,t),Ir(zye,n,t),Ir(Ibe,n,t),Ir(Pye,n,t),Ir(_be,n,t),Ir(Bde,n,t),Xye(n,t),v0e(n,t),Rye(n,t),d0e(n,t),qse(n,t),Rbe(n),Fbe(n,t),u0e(n,t),Qye(n,t),Jye(n,t),qye(n,t),C0e(n,t),Aye(n,t),jye(n,t),Obe(n,t),S0e(n,t),kye(n),Nye(n,t),Uye(n,t),Eye(n,t),k0e(n,t),E0e(n,t),Mbe(n),Hde(n,t),n},Lbe=e=>{const{classes:t}=e;return Oe({root:["virtualScroller"]},ft,t)},Dbe=Dn("div",{name:"MuiDataGrid",slot:"VirtualScroller",overridesResolver:(e,t)=>t.virtualScroller})({overflow:"auto",height:"100%",position:"relative","@media print":{overflow:"hidden"},zIndex:0}),Nbe=v.forwardRef(function(t,n){const r=Be(),o=Lbe(r);return z.jsx(Dbe,O({ref:n},t,{className:ve(o.root,t.className),ownerState:r}))}),zbe=(e,t)=>{const{classes:n}=e;return Oe({root:["virtualScrollerContent",t&&"virtualScrollerContent--overflowed"]},ft,n)},jbe=Dn("div",{name:"MuiDataGrid",slot:"VirtualScrollerContent",overridesResolver:(e,t)=>t.virtualScrollerContent})({}),Bbe=v.forwardRef(function(t,n){var r;const o=Be(),i=!o.autoHeight&&((r=t.style)==null?void 0:r.minHeight)==="auto",a=zbe(o,i);return z.jsx(jbe,O({ref:n},t,{ownerState:o,className:ve(a.root,t.className)}))}),Hbe=["className"],Ube=e=>{const{classes:t}=e;return Oe({root:["virtualScrollerRenderZone"]},ft,t)},Vbe=Dn("div",{name:"MuiDataGrid",slot:"VirtualScrollerRenderZone",overridesResolver:(e,t)=>t.virtualScrollerRenderZone})({position:"absolute",display:"flex",flexDirection:"column"}),Wbe=v.forwardRef(function(t,n){const{className:r}=t,o=ce(t,Hbe),i=Be(),a=Ube(i);return z.jsx(Vbe,O({ref:n,className:ve(a.root,r),ownerState:i},o))}),Gbe=["className"],qbe=v.forwardRef(function(t,n){const{className:r}=t,o=ce(t,Gbe),{getRootProps:i,getContentProps:a,getRenderZoneProps:l,getRows:s}=R0e({ref:n});return z.jsxs(Nbe,O({className:r},i(o),{children:[z.jsx(jse,{}),z.jsx(Bbe,O({},a(),{children:z.jsx(Wbe,O({},l(),{chil Line truncated
`)):null,paginationMode:de.oneOf(["client","server"]),paginationModel:de.shape({page:de.number.isRequired,pageSize:de.number.isRequired}),processRowUpdate:de.func,rowBuffer:de.number,rowCount:de.number,rowHeight:de.number,rowModesModel:de.object,rowPositionsDebounceMs:de.number,rows:de.arrayOf(de.object).isRequired,rowSelection:de.bool,rowSelectionModel:de.oneOfType([de.arrayOf(de.oneOfType([de.number,de.string]).isRequired),de.number,de.string]),rowSpacingType:de.oneOf(["border","margin"]),rowThreshold:de.number,scrollbarSize:de.number,showCellVerticalBorder:de.bool,showColumnVerticalBorder:de.bool,slotProps:de.object,slots:de.object,sortingMode:de.oneOf(["client","server"]),sortingOrder:de.arrayOf(de.oneOf(["asc","desc"])),sortModel:de.arrayOf(de.shape({field:de.string.isRequired,sort:de.oneOf(["asc","desc"])})),sx:de.oneOfType([de.arrayOf(de.oneOfType([de.func,de.object,de.bool])),de.func,de.object]),unstable_ignoreValueFormatterDuringExport:de.oneOfType([de.shape({clipboardExport:de.bool,csvExport:de.bool}),de.bool])};var Qbe=Object.prototype,Ybe=Qbe.hasOwnProperty;function Xbe(e,t){return e!=null&&Ybe.call(e,t)}function Zbe(e,t){return e!=null&&fL(e,t,Xbe)}var lm=e=>e.type==="checkbox",fc=e=>e instanceof Date,br=e=>e==null;const _z=e=>typeof e=="object";var On=e=>!br(e)&&!Array.isArray(e)&&_z(e)&&!fc(e),Jbe=e=>On(e)&&e.target?lm(e.target)?e.target.checked:e.target.value:e,e1e=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,t1e=(e,t)=>e.has(e1e(t)),n1e=e=>{const t=e.constructor&&e.constructor.prototype;return On(t)&&t.hasOwnProperty("isPrototypeOf")},yP=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function go(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(yP&&(e instanceof Blob||e instanceof FileList))&&(n||On(e)))if(t=n?[]:{},!n&&!n1e(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=go(e[r]));else return e;return t}var sm=e=>Array.isArray(e)?e.filter(Boolean):[],gn=e=>e===void 0,Ue=(e,t,n)=>{if(!t||!On(e))return n;const r=sm(t.split(/[,[\].]+?/)).reduce((o,i)=>br(o)?o:o[i],e);return gn(r)||r===e?gn(e[t])?n:e[t]:r},Ca=e=>typeof e=="boolean";const _R={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},si={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},ma={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},r1e=$.createContext(null),o1e=e=>{const{children:t,...n}=e;return $.createElement(r1e.Provider,{value:n},t)};var i1e=(e,t,n,r=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==si.all&&(t._proxyFormState[a]=!r||si.all),n&&(n[a]=!0),e[a]}});return o},So=e=>On(e)&&!Object.keys(e).length,a1e=(e,t,n,r)=>{n(e);const{name:o,...i}=e;return So(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!r||si.all))},c1=e=>Array.isArray(e)?e:[e];function l1e(e){const t=$.useRef(e);t.current=e,$.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ai=e=>typeof e=="string",s1e=(e,t,n,r,o)=>Ai(e)?(r&&t.watch.add(e),Ue(n,e,o)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Ue(n,i))):(r&&(t.watchAll=!0),n),bP=e=>/^\w*$/.test(e),Fz=e=>sm(e.replace(/["|']|\]/g,"").split(/\.|\[/)),qt=(e,t,n)=>{let r=-1;const o=bP(t)?[t]:Fz(t),i=o.length,a=i-1;for(;++r<i;){const l=o[r];let s=n;if(r!==a){const u=e[l];s=On(u)||Array.isArray(u)?u:isNaN(+o[r+1])?{}:[]}e[l]=s,e=e[l]}return e},u1e=(e,t,n,r,o)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:o||!0}}:{},FR=e=>({isOnSubmit:!e||e===si.onSubmit,isOnBlur:e===si.onBlur,isOnChange:e===si.onChange,isOnAll:e===si.all,isOnTouch:e===si.onTouched}),AR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const jf=(e,t,n,r)=>{for(const o of n||Object.keys(e)){const i=Ue(e,o);if(i){const{_f:a,...l}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!r)break;if(a.ref&&t(a.ref,a.name)&&!r)break;jf(l,t)}else On(l)&&jf(l,t)}}};var c1e=(e,t,n)=>{const r=sm(Ue(e,n));return qt(r,"root",t[n]),qt(e,n,r),e},xP=e=>e.type==="file",Tl=e=>typeof e=="function",gv=e=>{if(!yP)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},ig=e=>Ai(e),wP=e=>e.type==="radio",vv=e=>e instanceof RegExp;const LR={value:!1,isValid:!1},DR={value:!0,isValid:!0};var Az=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!gn(e[0].attributes.value)?gn(e[0].value)||e[0].value===""?DR:{value:e[0].value,isValid:!0}:DR:LR}return LR};const NR={isValid:!1,value:null};var Lz=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value} Line truncated
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var Fwe=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)},Qi=Cd,Awe=Yz,Lwe=Fwe,Dwe=Va,Nwe={}.hasOwnProperty,h1=["history","path","basename","stem","extname","dirname"];Va.prototype.toString=Qwe;Object.defineProperty(Va.prototype,"path",{get:zwe,set:jwe});Object.defineProperty(Va.prototype,"dirname",{get:Bwe,set:Hwe});Object.defineProperty(Va.prototype,"basename",{get:Uwe,set:Vwe});Object.defineProperty(Va.prototype,"extname",{get:Wwe,set:Gwe});Object.defineProperty(Va.prototype,"stem",{get:qwe,set:Kwe});function Va(e){var t,n;if(!e)e={};else if(typeof e=="string"||Lwe(e))e={contents:e};else if("message"in e&&"messages"in e)return e;if(!(this instanceof Va))return new Va(e);for(this.data={},this.messages=[],this.history=[],this.cwd=Awe.cwd(),n=-1;++n<h1.length;)t=h1[n],Nwe.call(e,t)&&(this[t]=e[t]);for(t in e)h1.indexOf(t)<0&&(this[t]=e[t])}function zwe(){return this.history[this.history.length-1]}function jwe(e){DP(e,"path"),this.path!==e&&this.history.push(e)}function Bwe(){return typeof this.path=="string"?Qi.dirname(this.path):void 0}function Hwe(e){Xz(this.path,"dirname"),this.path=Qi.join(e||"",this.basename)}function Uwe(){return typeof this.path=="string"?Qi.basename(this.path):void 0}function Vwe(e){DP(e,"basename"),LP(e,"basename"),this.path=Qi.join(this.dirname||"",e)}function Wwe(){return typeof this.path=="string"?Qi.extname(this.path):void 0}function Gwe(e){if(LP(e,"extname"),Xz(this.path,"extname"),e){if(e.charCodeAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.indexOf(".",1)>-1)throw new Error("`extname` cannot contain multiple dots")}this.path=Qi.join(this.dirname,this.stem+(e||""))}function qwe(){return typeof this.path=="string"?Qi.basename(this.path,this.extname):void 0}function Kwe(e){DP(e,"stem"),LP(e,"stem"),this.path=Qi.join(this.dirname||"",e+(this.extname||""))}function Qwe(e){return(this.contents||"").toString(e)}function LP(e,t){if(e&&e.indexOf(Qi.sep)>-1)throw new Error("`"+t+"` cannot be a path: did not expect `"+Qi.sep+"`")}function DP(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Xz(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}var Ywe=Pwe,w0=Dwe,Xwe=w0;w0.prototype.message=Zwe;w0.prototype.info=eCe;w0.prototype.fail=Jwe;function Zwe(e,t,n){var r=new Ywe(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}function Jwe(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e}function eCe(){var e=this.message.apply(this,arguments);return e.fatal=null,e}var Zz=Xwe,tCe=nCe;function nCe(e){if(e)throw e}/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/var rCe=function(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)},ag=Object.prototype.hasOwnProperty,Jz=Object.prototype.toString,GR=Object.defineProperty,qR=Object.getOwnPropertyDescriptor,KR=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Jz.call(t)==="[object Array]"},QR=function(t){if(!t||Jz.call(t)!=="[object Object]")return!1;var n=ag.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ag.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||ag.call(t,o)},YR=function(t,n){GR&&n.name==="__proto__"?GR(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},XR=function(t,n){if(n==="__proto__")if(ag.call(t,n)){if(qR)return qR(t,n).value}else return;return t[n]},oCe=function e(){var t,n,r,o,i,a,l=arguments[0],s=1,u=arguments.length,c=!1;for(typeof l=="boolean"&&(c=l,l=arguments[1]||{},s=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});s<u;++s)if(t=arguments[s],t!=null)for(n in t)r=XR(l,n),o=XR(t,n),l!==o&&(c&&o&&(QR(o)||(i=KR(o)))?(i?(i=!1,a=r&&KR(r)?r:[]):a=r&&QR(r)?r:{},YR(l,{name:n,newValue:e(c,a,o)})):typeof o<"u"&&YR(l,{name:n,newValue:o}));return l},iCe=e=>{if(Object.prototype.toString.call(e)!=="[object Object]")return!1;const t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},aCe=[].slice,lCe=sCe;function sCe(e,t){var n;return r;function r(){var a=aCe.call(arguments,0),l=e.length>a.length,s;l&&a.push(o);try{s=e.apply(null,a)}catch(u){if(l&&n)throw u;return o(u)}l||(s&&typeof s.then=="function"?s.then(i,o):s instanceof Error?o(s):i(s))}function o(){n||(n=!0,t.apply(null,arguments))}function i(a){o(null,a)}}var e5=lCe,uCe=t5;t5.wrap=e5;var ZR=[].slice;function t5(){var e=[],t={};return t.run=n,t.use=r,t;function n(){var o=-1,i=ZR.call(arguments,0,-1),a=arguments[arguments.length-1];if(typeof a!="function")throw new Error("Expected function as last argument, not "+a);l.apply(null,[null].concat(i));function l(s){var u=e[++o],c=ZR.call(arguments,0),d=c.slice(1),f=i.length,m=-1;if(s){a(s);return}for(;++m<f;)(d[m]===null||d[m]===void 0)&&(d[m]=i[m]);i=d,u?e5(u,l).apply(null,i):a.apply(null,[null].concat(i))}}function r(o){if(typeof o!="function")throw new Error("Expected `fn` to be a function, not "+o);return e.push(o),t}}var JR=tCe,cCe=rCe,hh=oCe,e2=iCe,n5=uCe,ef=Zz,dCe=r5().freeze(),fCe=[].slice,pCe={}.hasOwnProperty,mCe=n5().use(hCe).use(gCe).use(vCe);function hCe(e,t){t.tree=e.parse(t.file)}function gCe(e,t,n){e.run(t.tree,t.file,r);function r(o,i,a){o?n(o):(t.tree=i,t.file=a,n())}}function vCe(e,t){var n=e.stringify(t.tree,t.file);n==null||(typeof n=="string"||cCe(n)?("value"in t.file&&(t.file.value=n),t.file.contents=n):t.file.result=n)}function r5(){var e=[],t=n5(),n={},r=-1,o;return i.data=l,i.freeze=a,i.attachers=e,i.use=s,i.parse=c,i.stringify=m,i.run=d,i.runSync=f,i.process=p,i.processSync=h,i;function i(){for(var y=r5(),b=-1;++b<e.length;)y.use.apply(null,e[b]);return y.data(hh(!0,{},n)),y}function a(){var y,b;if(o)return i;for(;++r<e.length;)y=e[r],y[1]!==!1&&(y[1]===!0&&(y[1]=void 0),b=y[0].apply(i,y.slice(1)),typeof b=="function"&&t.use(b));return o=!0,r=1/0,i}function l(y,b){return typeof y=="string"?arguments.length===2?(y1("data",o),n[y]=b,i):pCe.call(n,y)&&n[y]||null:y?(y1("data",o),n=y,i):n}function s(y){var b;if(y1("use",o),y!=null)if(typeof y=="function")P.apply(null,arguments);else if(typeof y=="object")"length"in y?w(y):g(y);else throw new Error("Expected usable value, not `"+y+"`");return b&&(n.settings=hh(n.settings||{},b)),i;function g(C){w(C.plugins),C.settings&&(b=hh(b||{},C.settings))}function x(C){if(typeof C=="function")P(C);else if(typeof C=="object")"length"in C?P.apply(null,C):g(C);else throw new Error("Expected usable value, not `"+C+"`")}function w(C){var E=-1;if(C!=null)if(typeof C=="object"&&"length"in C)for(;++E<C.length;)x(C[E]);else throw new Error("Expected a list of plugins, not `"+C+"`")}function P(C,E){var S=u(C);S?(e2(S[1])&&e2(E)&&(E=hh(!0,S[1],E)),S[1]=E):e.push(fCe.call(arguments))}}function u(y){for(var b=-1;++b<e.length;)if(e[b][0]===y)return e[b]}function c(y){var b=ef(y),g;return a(),g=i.Parser,g1("parse",g),t2(g,"parse")?new g(String(b),b).parse():g(String(b),b)}function d(y,b,g){if(n2(y),a(),!g&&typeof b=="function"&&(g=b,b=null),!g)return new Promise(x);x(null,g);function x(w,P){t.run(y,ef(b),C);function C(E,S,R){S=S||y,E?P(E):w?w(S):g(null,S,R)}}}function f(y,b){var g,x;return d(y,b,w),r2("runSync","run",x),g;function w(P,C){x=!0,g=C,JR(P)}}function m(y,b){var g=ef(b),x;return a(),x=i.Compiler,v1("stringify",x),n2(y),t2(x,"compile")?new x(y,g).compile():x(y,g)}function p(y,b){if(a(),g1("process",i.Parser),v1("process",i.Compiler),!b)return new Promise(g);g(null,b);function g(x,w){var P=ef(y);mCe.run(i,{file:P},C);function C(E){E?w(E):x?x(P):b(null,P)}}}function h(y){var b,g;return a(),g1("processSync",i.Parser),v1("processSLine truncated
`;else if(r===-3)o=`\r
`;else if(r===-2)o=" ";else if(r===-1){if(i)continue;o=" "}else o=RSe(r);i=r===-2,n.push(o)}return n.join("")}var _Se=TSe;function FSe(e,t){var n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex,a;return n===o?a=[e[n].slice(r,i)]:(a=e.slice(n,o),r>-1&&(a[0]=a[0].slice(r)),i>0&&a.push(e[o].slice(0,i))),a}var ASe=FSe,LSe=fm,DSe=Rn,NSe=UP,zSe=nl,w1=HP,jSe=E0,BSe=_Se,s2=wu,HSe=ASe;function USe(e,t,n){var r=n?s2(n):{line:1,column:1,offset:0},o={},i=[],a=[],l=[],s={consume:g,enter:x,exit:w,attempt:E(P),check:E(C),interrupt:E(C,{interrupt:!0}),lazy:E(C,{lazy:!0})},u={previous:null,events:[],parser:e,sliceStream:m,sliceSerialize:f,now:p,defineSkip:h,write:d},c=t.tokenize.call(u,s);return t.resolveAll&&i.push(t),r._index=0,r._bufferIndex=-1,u;function d(M){return a=NSe(a,M),y(),a[a.length-1]!==null?[]:(S(t,0),u.events=jSe(i,u.events,u),u.events)}function f(M){return BSe(m(M))}function m(M){return HSe(a,M)}function p(){return s2(r)}function h(M){o[M.line]=M.column,I()}function y(){for(var M,_;r._index<a.length;)if(_=a[r._index],typeof _=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<_.length;)b(_.charCodeAt(r._bufferIndex));else b(_)}function b(M){c=c(M)}function g(M){DSe(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,I()):M!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=M}function x(M,_){var D=_||{};return D.type=M,D.start=p(),u.events.push(["enter",D,u]),l.push(D),D}function w(M){var _=l.pop();return _.end=p(),u.events.push(["exit",_,u]),_}function P(M,_){S(M,_.from)}function C(M,_){_.restore()}function E(M,_){return D;function D(T,F,N){var k,L,j,B;return T.tokenize||"length"in T?H(w1(T)):A;function A(Y){return Y in T||null in T?H(T.null?w1(T[Y]).concat(w1(T.null)):T[Y])(Y):N(Y)}function H(Y){return k=Y,L=0,q(Y[L])}function q(Y){return re;function re(le){return B=R(),j=Y,Y.partial||(u.currentConstruct=Y),Y.name&&u.parser.constructs.disable.null.indexOf(Y.name)>-1?G():Y.tokenize.call(_?LSe({},u,_):u,s,V,G)(le)}}function V(Y){return M(j,B),F}function G(Y){return B.restore(),++L<k.length?q(k[L]):N}}}function S(M,_){M.resolveAll&&i.indexOf(M)<0&&i.push(M),M.resolve&&zSe(u.events,_,u.events.length-_,M.resolve(u.events.slice(_),u)),M.resolveTo&&(u.events=M.resolveTo(u.events,u))}function R(){var M=p(),_=u.previous,D=u.currentConstruct,T=u.events.length,F=Array.from(l);return{restore:N,from:T};function N(){r=M,u.previous=_,u.currentConstruct=D,u.events.length=T,l=F,I()}}function I(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}var VSe=USe,ia={};function WSe(e){return e<0||e===32}var rl=WSe,GSe=/[!-\/:-@\[-`\{-~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]/,qSe=GSe,KSe=C0;function QSe(e){return t;function t(n){return e.test(KSe(n))}}var fs=QSe,YSe=qSe,XSe=fs,ZSe=XSe(YSe),VP=ZSe,JSe=fs,eEe=JSe(/\s/),WP=eEe,tEe=rl,nEe=VP,rEe=WP;function oEe(e){if(e===null||tEe(e)||rEe(e))return 1;if(nEe(e))return 2}var m5=oEe;function iEe(e,t){return e.column+=t,e.offset+=t,e._bufferIndex+=t,e}var aEe=iEe,tf=UP,lEe=nl,u2=m5,c2=aEe,sEe=E0,Ei=wu,uEe={name:"attention",tokenize:dEe,resolveAll:cEe};function cEe(e,t){for(var n=-1,r,o,i,a,l,s,u,c;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,a={type:s>1Line truncated
`));++r<o;)r&&n.push(T1("text",`
`)),n.push(e[r]);return t&&e.length>0&&n.push(T1("text",`
`)),n}var V5=kIe,EIe=hm,PIe=Vr();function kIe(e,t){var n={},r=t.ordered?"ol":"ul",o,i=-1,a;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start),o=PIe(e,t),a=o.length;++i<a;)if(o[i].properties.className&&o[i].properties.className.indexOf("task-list-item")!==-1){n.className=["contains-task-list"];break}return e(t,r,n,EIe(o,!0))}var $Ie=RIe,IIe=U5,OIe=V5,MIe=hm;function RIe(e){for(var t=e.footnoteById,n=e.footnoteOrder,r=n.length,o=-1,i=[],a,l,s,u;++o<r;)a=t[n[o].toUpperCase()],a&&(s=a.children.concat(),u=s[s.length-1],l={type:"link",url:"#fnref-"+a.identifier,data:{hProperties:{className:["footnote-backref"]}},children:[{type:"text",value:"↩"}]},(!u||u.type!=="paragraph")&&(u={type:"paragraph",children:[]},s.push(u)),u.children.push(l),i.push({type:"listItem",data:{hProperties:{id:"fn-"+a.identifier}},children:s,position:a.position}));return i.length===0?null:e(null,"div",{className:["footnotes"]},MIe([IIe(e),OIe(e,{type:"list",ordered:!0,children:i})],!0))}var TIe=AIe,_Ie=hm,FIe=Vr();function AIe(e,t){return e(t,"blockquote",_Ie(FIe(e,t),!0))}var LIe=NIe,DIe=Qo;function NIe(e,t){return[e(t,"br"),DIe("text",`
`)]}var zIe=BIe,jIe=Qo;function BIe(e,t){var n=t.value?t.value+`
`:"",r=t.lang&&t.lang.match(/^[^ \t]+(?=[ \t]|$)/),o={},i;return r&&(o.className=["language-"+r]),i=e(t,"code",o,[jIe("text",n)]),t.meta&&(i.data={meta:t.meta}),e(t.position,"pre",[i])}var HIe=VIe,UIe=Vr();function VIe(e,t){return e(t,"del",UIe(e,t))}var WIe=qIe,GIe=Vr();function qIe(e,t){return e(t,"em",GIe(e,t))}var W5=QIe,KIe=Qo;function QIe(e,t){var n=e.footnoteOrder,r=String(t.identifier);return n.indexOf(r)===-1&&n.push(r),e(t.position,"sup",{id:"fnref-"+r},[e(t,"a",{href:"#fn-"+r,className:["footnote-ref"]},[KIe("text",t.label||r)])])}var YIe=ZIe,XIe=W5;function ZIe(e,t){for(var n=e.footnoteById,r=e.footnoteOrder,o=1;o in n;)o++;return o=String(o),r.push(o),n[o]={type:"footnoteDefinition",identifier:o,children:[{type:"paragraph",children:t.children}],position:t.position},XIe(e,{type:"footnoteReference",identifier:o,position:t.position})}var JIe=tOe,eOe=Vr();function tOe(e,t){return e(t,"h"+t.depth,eOe(e,t))}var nOe=oOe,rOe=Qo;function oOe(e,t){return e.dangerous?e.augment(t,rOe("raw",t.value)):null}var R2={};function iOe(e){var t,n,r=R2[e];if(r)return r;for(r=R2[e]=[],t=0;t<128;t++)n=String.fromCharCode(t),/^[0-9a-z]$/i.test(n)?r.push(n):r.push("%"+("0"+t.toString(16).toUpperCase()).slice(-2));for(t=0;t<e.length;t++)r[e.charCodeAt(t)]=e[t];return r}function O0(e,t,n){var r,o,i,a,l,s="";for(typeof t!="string"&&(n=t,t=O0.defaultChars),typeof n>"u"&&(n=!0),l=iOe(t),r=0,o=e.length;r<o;r++){if(i=e.charCodeAt(r),n&&i===37&&r+2<o&&/^[0-9a-f]{2}$/i.test(e.slice(r+1,r+3))){s+=e.slice(r,r+3),r+=2;continue}if(i<128){s+=l[i];continue}if(i>=55296&&i<=57343){if(i>=55296&&i<=56319&&r+1<o&&(a=e.charCodeAt(r+1),a>=56320&&a<=57343)){s+=encodeURIComponent(e[r]+e[r+1]),r++;continue}s+="%EF%BF%BD";continue}s+=encodeURIComponent(e[r])}return s}O0.defaultChars=";/?:@&=+$,-_.!~*'()#";O0.componentChars="-_.!~*'()";var M0=O0,G5=lOe,_1=Qo,aOe=Vr();function lOe(e,t){var n=t.referenceType,r="]",o,i,a;return n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference"?_1("text","!["+t.alt+r):(o=aOe(e,t),i=o[0],i&&i.type==="text"?i.value="["+i.value:o.unshift(_1("text","[")),a=o[o.length-1],a&&a.type==="text"?a.value+=r:o.push(_1("text",r)),o)}var sOe=dOe,uOe=M0,cOe=G5;function dOe(e,t){var n=e.definition(t.identifier),r;return n?(r={src:uOe(n.url||""),alt:t.alt},n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"img",r)):cOe(e,t)}var fOe=M0,pOe=mOe;function mOe(e,t){var n={src:fOe(t.url),alt:t.alt};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"img",n)}var hOe=vOe,gOe=Qo;function vOe(e,t){var n=t.value.replace(/\r?\n|\r/g," ");return e(t,"code",[gOe("text",n)])}var yOe=COe,bOe=M0,xOe=G5,wOe=Vr();function COe(e,t){var n=e.definition(t.identifier),r;return n?(r={href:bOe(n.url||"")},n.title!==null&&n.title!==void 0&&(r.title=n.title),e(t,"a",r,wOe(e,t))):xOe(e,t)}var SOe=M0,EOe=Vr(),POe=kOe;function kOe(e,t){var n={href:SOe(t.url)};return t.title!==null&&t.title!==void 0&&(n.title=t.title),e(t,"a",n,EOe(e,t))}var $Oe=OOe,F1=Qo,IOe=Vr();function OOe(e,t,n){var r=IOe(e,t),o=r[0],i=n?MOe(n):q5(t),a={},l=[],s,u,c;for(typeof t.checked=="boolean"&&((!o||o.tagName!=="p")&&(o=e(null,"p",[]),r.unshift(o)),o.children.length>0&&o.children.unshift(F1("text"," ")),o.children.unshift(e(null,"input",{type:"checkbox",checked:t.checked,disabled:!0})),a.className=["task-list-item"]),s=r.length,u=-1;++u<s;)c=r[u],(i||u!==0||c.tagName!=="p")&&l.push(F1("text",`
`)),c.tagName==="p"&&!i?l=l.concat(c.children):l.push(c);return s&&(i||c.tagName!=="p")&&l.push(F1("text",`
`)),e(t,"li",a,l)}function MOe(e){for(var t=e.spread,n=e.children,r=n.length,o=-1;!t&&++o<r;)t=q5(n[o]);return t}function q5(e){var t=e.spread;return t??e.children.length>1}var ROe=_Oe,TOe=Vr();function _Oe(e,t){return e(t,"p",TOe(e,t))}var FOe=NOe,AOe=Qo,LOe=hm,DOe=Vr();function NOe(e,t){return e.augment(t,AOe("root",LOe(DOe(e,t))))}var zOe=BOe,jOe=Vr();function BOe(e,t){return e(t,"strong",jOe(e,t))}var HOe=VOe,T2=N5,Ch=hm,UOe=Vr();function VOe(e,t){for(var n=t.children,r=n.length,o=t.align||[],i=o.length,a=[],l,s,u,c,d;r--;){for(s=n[r].children,c=r===0?"th":"td",l=i||s.length,u=[];l--;)d=s[l],u[l]=e(d,c,{align:o[l]},d?UOe(e,d):[]);a[r]=e(n[r],"tr",Ch(u,!0))}return e(t,"table",Ch([e(a[0].position,"thead",Ch([a[0]],!0))].concat(a[1]?e({start:T2.start(a[1]),end:T2.end(a[a.length-1])},"tbody",Ch(a.slice(1),!0)):[]),!0))}var WOe=qOe,GOe=Qo;function qOe(e,t){return e.augment(t,GOe("text",String(t.value).replace(/[ \t]*(\r?\n|\r)[ \t]*/g,"$1")))}var KOe={blockquote:TIe,break:LIe,code:zIe,delete:HIe,emphasis:WIe,footnoteReference:W5,footnote:YIe,heading:JIe,html:nOe,imageReference:sOe,image:pOe,inlineCode:hOe,linkReference:yOe,link:POe,listItem:$Oe,list:V5,paragraph:ROe,root:FOe,strong:zOe,table:HOe,text:WOe,thematicBreak:U5,toml:Sh,yaml:Sh,definition:Sh,footnoteDefinition:Sh};function Sh(){return null}var QOe=iMe,YOe=Qo,XOe=YP,_2=N5,ZOe=hIe,JOe=yIe,eMe=H5(),tMe=$Ie,nMe=KOe,rMe={}.hasOwnProperty,F2=!1;function oMe(e,t){var n=t||{};n.allowDangerousHTML!==void 0&&!F2&&(F2=!0,console.warn("mdast-util-to-hast: deprecation: `allowDangerousHTML` is nonstandard, use `allowDangerousHtml` instead"));var r=n.allowDangerousHtml||n.allowDangerousHTML,o={};return a.dangerous=r,a.definition=JOe(e),a.footnoteById=o,a.footnoteOrder=[],a.augment=i,a.handlers=Object.assign({},nMe,n.handlers),a.unknownHandler=n.unknownHandler,a.passThrough=n.passThrough,XOe(e,"footnoteDefinition",l),a;function i(s,u){var c,d;return s&&s.data&&(c=s.data,c.hName&&(u.type!=="element"&&(u={type:"element",tagName:"",properties:{},children:[]}),u.tagName=c.hName),u.type==="element"&&c.hProperties&&(u.properties=Object.assign({},u.properties,c.hProperties)),u.children&&c.hChildren&&(u.children=c.hChildren)),d=s&&s.position?s:{position:s},ZOe(d)||(u.position={start:_2.start(d),end:_2.end(d)}),u}function a(s,u,c,d){return d==null&&typeof c=="object"&&"length"in c&&(d=c,c={}),i(s,{type:"element",tagName:u,properties:c||{},children:d||[]})}function l(s){var u=String(s.identifier).toUpperCase();rMe.call(o,u)||(o[u]=s)}}function iMe(e,t){var n=oMe(e,t),r=eMe(n,e),o=tMe(n);return o&&(r.children=r.children.concat(YOe("text",`
`),o)),r}var aMe=QOe,K5=aMe,lMe=sMe;function sMe(e,t){return e&&!e.process&&(t=e,e=null),e?uMe(e,t):cMe(t)}function uMe(e,t){return n;function n(r,o,i){e.run(K5(r,t),o,a);function a(l){i(l)}}}function cMe(e){return t;function t(n){return K5(n,e)}}var dMe=pMe,fMe=Object.prototype.hasOwnProperty;function pMe(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)fMe.call(n,r)&&(e[r]=n[r])}return e}var Q5=Y5,ZP=Y5.prototype;ZP.space=null;ZP.normal={};ZP.property={};function Y5(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}var A2=dMe,mMe=Q5,X5=hMe;function hMe(e){for(var t=e.length,n=[],r=[],o=-1,i,a;++o<t;)i=e[o],n.push(i.property),r.push(i.normal),a=i.space;return new mMe(A2.apply(null,n),A2.apply(null,r),a)}var Z5=gMe;function gMe(e){return e.toLowerCase()}var J5=ej,Yo=ej.prototype;Yo.space=null;Yo.attribute=null;Yo.property=null;Yo.boolean=!1;Yo.booleanish=!1;Yo.overloadedBoolean=!1;Yo.number=!1;Yo.commaSeparated=!1;Yo.spaceSeparated=!1;Yo.commaOrSpaceSeparated=!1;Yo.mustUseProperty=!1;Yo.defined=!1;function ej(e,t){this.property=e,this.attribute=t}var vi={},vMe=0;vi.boolean=Cu();vi.booleanish=Cu();vi.overloadedBoolean=Cu();vi.number=Cu();vi.spaceSeparated=Cu();vi.commaSeparated=Cu();vi.commaOrSpaceSeparated=Cu();function Cu(){return Math.pow(2,++vMe)}var tj=J5,L2=vi,nj=JP;JP.prototype=new tj;JP.prototype.defined=!0;var rj=["boolean","booleanish","overloadedBoolean","number","commaSeparated","spaceSeparated","commaOrSpaceSeparated"],yMe=rj.length;function JP(e,t,n,r){var o=-1,i;for(D2(this,"space",r),tj.call(this,e,t);++o<yMe;)i=rj[o],D2(this,i,(n&L2[i])===L2[i])}function D2(e,t,n){n&&(e[t]=n)}var N2=Z5,bMe=Q5,xMe=nj,Ed=wMe;function wMe(e){var t=e.space,n=e.mustUseProperty||[],r=e.attributes||{},o=e.properties,i=e.transform,a={},l={},s,u;for(s in o)u=new xMe(s,i(r,s),o[s],t),n.indexOf(s)!==-1&&(u.mustUseProperty=!0),a[s]=u,l[N2(s)]=s,l[N2(u.attribute)]=s;return new bMe(a,l,t)}var CMe=Ed,oj=CMe({space:"xlink",transform:SMe,properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}});function SMe(e,t){return"xlink:"+t.slice(5).toLowerCase()}var EMe=Ed,ij=EMe({space:"xml",transform:PMe,properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function PMe(e,t){return"xml:"+t.slice(3).toLowerCase()}var aj=kMe;function kMe(e,t){return t in e?e[t]:t}var $Me=aj,lj=IMe;function IMe(e,t){return $Me(e,t.toLowerCase())}var OMe=Ed,MMe=lj,sj=OMe({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:MMe,properties:{xmlns:null,xmlnsXLink:null}}),ek=vi,RMe=Ed,Or=ek.booleanish,mo=ek.number,ms=ek.spaceSeparated,uj=RMe({transform:TMe,properties:{ariaActiveDescendant:null,ariaAtomic:Or,ariaAutoComplete:null,ariaBusy:Or,ariaChecked:Or,ariaColCount:mo,ariaColIndex:mo,ariaColSpan:mo,ariaControls:ms,ariaCurrent:null,ariaDescribedBy:ms,ariaDetails:null,ariaDisabled:Or,ariaDropEffect:ms,ariaErrorMessage:null,ariaExpanded:Or,ariaFlowTo:ms,ariaGrabbed:Or,ariaHasPopup:null,ariaHidden:Or,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ms,ariaLevel:mo,ariaLive:null,ariaModal:Or,ariaMultiLine:Or,ariaMultiSelectable:Or,ariaOrientation:null,ariaOwns:ms,ariaPlaceholder:null,ariaPosInSet:mo,ariaPressed:Or,ariaReadOnly:Or,ariaRelevant:null,ariaRequired:Or,ariaRoleDescription:ms,ariaRowCount:mo,ariaRowIndex:mo,ariaRowSpan:mo,ariaSelected:Or,ariaSetSize:mo,ariaSort:null,ariaValueMax:mo,ariaValueMin:mo,ariaValueNow:mo,ariaValueText:null,role:null}});function TMe(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}var Pd=vi,_Me=Ed,FMe=lj,at=Pd.boolean,AMe=Pd.overloadedBoolean,of=Pd.booleanish,Wt=Pd.number,gr=Pd.spaceSeparated,Eh=Pd.commaSeparated,LMe=_Me({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:FMe,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Eh,acceptCharset:gr,accessKey:gr,action:null,allow:null,allowFullScreen:at,allowPaymentRequest:at,allowUserMedia:at,alt:null,as:null,async:at,autoCapitalize:null,autoComplete:gr,autoFocus:at,autoPlay:at,capture:at,charSet:null,checked:at,cite:null,className:gr,cols:Wt,colSpan:null,content:null,contentEditable:of,controls:at,controlsList:gr,coords:Wt|Eh,crossOrigin:null,data:null,dateTime:null,decoding:null,default:at,defer:at,dir:null,dirName:null,disabled:at,download:AMe,draggable:of,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:at,formTarget:null,headers:gr,height:Wt,hidden:at,high:Wt,href:null,hrefLang:null,htmlFor:gr,httpEquiv:gr,id:null,imageSizes:null,imageSrcSet:Eh,inputMode:null,integrity:null,is:null,isMap:at,itemId:null,itemProp:gr,itemRef:gr,itemScope:at,itemType:gr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:at,low:Wt,manifest:null,max:null,maxLength:Wt,media:null,method:null,min:null,minLength:Wt,multiple:at,muted:at,name:null,nonce:null,noModule:at,noValidate Line truncated
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var R0=60103,T0=60106,gm=60107,vm=60108,ym=60114,bm=60109,xm=60110,wm=60112,Cm=60113,nk=60120,Sm=60115,Em=60116,dj=60121,fj=60122,pj=60117,mj=60129,hj=60131;if(typeof Symbol=="function"&&Symbol.for){var Kn=Symbol.for;R0=Kn("react.element"),T0=Kn("react.portal"),gm=Kn("react.fragment"),vm=Kn("react.strict_mode"),ym=Kn("react.profiler"),bm=Kn("react.provider"),xm=Kn("react.context"),wm=Kn("react.forward_ref"),Cm=Kn("react.suspense"),nk=Kn("react.suspense_list"),Sm=Kn("react.memo"),Em=Kn("react.lazy"),dj=Kn("react.block"),fj=Kn("react.server.block"),pj=Kn("react.fundamental"),mj=Kn("react.debug_trace_mode"),hj=Kn("react.legacy_hidden")}function yi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case R0:switch(e=e.type,e){case gm:case ym:case vm:case Cm:case nk:return e;default:switch(e=e&&e.$$typeof,e){case xm:case wm:case Em:case Sm:case bm:return e;default:return t}}case T0:return t}}}var QMe=bm,YMe=R0,XMe=wm,ZMe=gm,JMe=Em,eRe=Sm,tRe=T0,nRe=ym,rRe=vm,oRe=Cm;jt.ContextConsumer=xm;jt.ContextProvider=QMe;jt.Element=YMe;jt.ForwardRef=XMe;jt.Fragment=ZMe;jt.Lazy=JMe;jt.Memo=eRe;jt.Portal=tRe;jt.Profiler=nRe;jt.StrictMode=rRe;jt.Suspense=oRe;jt.isAsyncMode=function(){return!1};jt.isConcurrentMode=function(){return!1};jt.isContextConsumer=function(e){return yi(e)===xm};jt.isContextProvider=function(e){return yi(e)===bm};jt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===R0};jt.isForwardRef=function(e){return yi(e)===wm};jt.isFragment=function(e){return yi(e)===gm};jt.isLazy=function(e){return yi(e)===Em};jt.isMemo=function(e){return yi(e)===Sm};jt.isPortal=function(e){return yi(e)===T0};jt.isProfiler=function(e){return yi(e)===ym};jt.isStrictMode=function(e){return yi(e)===vm};jt.isSuspense=function(e){return yi(e)===Cm};jt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gm||e===ym||e===mj||e===vm||e===Cm||e===nk||e===hj||typeof e=="object"&&e!==null&&(e.$$typeof===Em||e.$$typeof===Sm||e.$$typeof===bm||e.$$typeof===xm||e.$$typeof===wm||e.$$typeof===pj||e.$$typeof===dj||e[0]===fj)};jt.typeOf=yi;cj.exports=jt;var iRe=cj.exports,Pm=vi,aRe=Ed,lRe=aj,sRe=Pm.boolean,Ye=Pm.number,j2=Pm.spaceSeparated,A1=Pm.commaSeparated,ho=Pm.commaOrSpaceSeparated,uRe=aRe({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPLine truncated
`,V2="/",W2="*",ks="",a2e="comment",l2e="declaration",s2e=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(p){var h=p.match(ZRe);h&&(n+=h.length);var y=p.lastIndexOf(i2e);r=~y?p.length-y:r+p.length}function i(){var p={line:n,column:r};return function(h){return h.position=new a(p),u(),h}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function l(p){var h=new Error(t.source+":"+n+":"+r+": "+p);if(h.reason=p,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function s(p){var h=p.exec(e);if(h){var y=h[0];return o(y),e=e.slice(y.length),h}}function u(){s(JRe)}function c(p){var h;for(p=p||[];h=d();)h!==!1&&p.push(h);return p}function d(){var p=i();if(!(V2!=e.charAt(0)||W2!=e.charAt(1))){for(var h=2;ks!=e.charAt(h)&&(W2!=e.charAt(h)||V2!=e.charAt(h+1));)++h;if(h+=2,ks===e.charAt(h-1))return l("End of comment missing");var y=e.slice(2,h-2);return r+=2,o(y),e=e.slice(h),r+=2,p({type:a2e,comment:y})}}function f(){var p=i(),h=s(e2e);if(h){if(d(),!s(t2e))return l("property missing ':'");var y=s(n2e),b=p({type:l2e,property:G2(h[0].replace(U2,ks)),value:y?G2(y[0].replace(U2,ks)):ks});return s(r2e),b}}function m(){var p=[];c(p);for(var h;h=f();)h!==!1&&(p.push(h),c(p));return p}return u(),m()};function G2(e){return e?e.replace(o2e,ks):ks}var u2e=s2e;function c2e(e,t){var n=null;if(!e||typeof e!="string")return n;for(var r,o=u2e(e),i=typeof t=="function",a,l,s=0,u=o.length;s<u;s++)r=o[s],a=r.property,l=r.value,i?t(a,l,r):l&&(n||(n={}),n[a]=l);return n}var d2e=c2e;const L1=v,f2e=iRe,p2e=gRe,m2e=xRe,q2=WRe,h2e=ok,g2e=ik,v2e=d2e;tk.hastToReact=yj;tk.hastChildrenToReact=vj;const nC={}.hasOwnProperty,y2e=new Set(["table","thead","tbody","tfoot","tr"]);function vj(e,t){const n=[];let r=-1,o;for(;++r<t.children.length;)o=t.children[r],o.type==="element"?n.push(yj(e,o,r,t)):o.type==="text"?(t.type!=="element"||!y2e.has(t.tagName)||o.value!==`
`)&&n.push(o.value):o.type==="raw"&&!e.options.skipHtml&&n.push(o.value);return n}function yj(e,t,n,r){const o=e.options,i=e.schema,a=t.tagName,l={};let s=i,u;if(i.space==="html"&&a==="svg"&&(s=p2e,e.schema=s),t.properties)for(u in t.properties)nC.call(t.properties,u)&&x2e(l,u,t.properties[u],e);(a==="ol"||a==="ul")&&e.listDepth++;const c=vj(e,t);(a==="ol"||a==="ul")&&e.listDepth--,e.schema=i;const d=t.position||{start:{line:null,column:null,offset:null},end:{line:null,column:null,offset:null}},f=o.components&&nC.call(o.components,a)?o.components[a]:a,m=typeof f=="string"||f===L1.Fragment;if(!f2e.isValidElementType(f))throw new TypeError(`Component for name \`${a}\` not defined or is not renderable`);if(l.key=[a,d.start.line,d.start.column,n].join("-"),a==="a"&&o.linkTarget&&(l.target=typeof o.linkTarget=="function"?o.linkTarget(l.href,t.children,l.title):o.linkTarget),a==="a"&&o.transformLinkUri&&(l.href=o.transformLinkUri(l.href,t.children,l.title)),!m&&a==="code"&&r.type==="element"&&r.tagName!=="pre"&&(l.inline=!0),!m&&(a==="h1"||a==="h2"||a==="h3"||a==="h4"||a==="h5"||a==="h6")&&(l.level=parseInt(a.charAt(1),10)),a==="img"&&o.transformImageUri&&(l.src=o.transformImageUri(l.src,l.alt,l.title)),!m&&a==="li"&&r.type==="element"){const p=b2e(t);l.checked=p&&p.properties?!!p.properties.checked:null,l.index=D1(r,t),l.ordered=r.tagName==="ol"}return!m&&(a==="ol"||a==="ul")&&(l.ordered=a==="ol",l.depth=e.listDepth),(a==="td"||a==="th")&&(l.align&&(l.style||(l.style={}),l.style.textAlign=l.align,delete l.align),m||(l.isHeader=a==="th")),!m&&a==="tr"&&r.type==="element"&&(l.isHeader=r.tagName==="thead"),o.sourcePos&&(l["data-sourcepos"]=S2e(d)),!m&&o.rawSourcePos&&(l.sourcePosition=t.position),!m&&o.includeElementIndex&&(l.index=D1(r,t),l.siblingCount=D1(r)),m||(l.node=t),c.length>0?L1.createElement(f,l,c):L1.createElement(f,l)}function b2e(e){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n.type==="element"&&n.tagName==="input")return n}return null}function D1(e,t){let n=-1,r=0;for(;++n<e.children.length&&e.children[n]!==t;)e.children[n].type==="element"&&r++;return r}function x2e(e,t,n,r){const o=m2e(r.schema,t);let i=n;i==null||i!==i||(i&&typeof i=="object"&&"length"in i&&(i=(o.commaSeparated?g2e:h2e).stringify(i)),o.property==="style"&&typeof i=="string"&&(i=w2e(i)),o.space&&o.property?e[nC.call(q2,o.property)?q2[o.property]:o.property]=i:o.attribute&&(e[o.attribute]=i))}function w2e(e){const t={};try{v2e(e,n)}catch{}return t;function n(r,o){const i=r.slice(0,4)==="-ms-"?`ms-${r.slice(4)}`:r;t[i.replace(/-([a-z])/g,C2e)]=o}}function C2e(e,t){return t.toUpperCase()}function S2e(e){return[e.start.line,":",e.start.column,"-",e.end.line,":",e.end.column].map(t=>String(t)).join("")}const N1=v,K2=Zz,E2e=dCe,P2e=J$e,k2e=lMe,pt=SD,$2e=UMe,I2e=WMe,bj=qMe,O2e=tk.hastChildrenToReact;var M2e=_0;const Q2={}.hasOwnProperty,R2e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ph={renderers:{to:"components",id:"change-renderers-to-components"},astPlugins:{id:"remove-buggy-html-in-markdown-parser"},allowDangerousHtml:{id:"remove-buggy-html-in-markdown-parser"},escapeHtml:{id:"remove-buggy-html-in-markdown-parser"},source:{to:"children",id:"change-source-to-children"},allowNode:{to:"allowElement",id:"replace-allownode-allowedtypes-and-disallowedtypes"},allowedTypes:{to:"allowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},disallowedTypes:{to:"disallowedElements",id:"replace-allownode-allowedtypes-and-disallowedtypes"},includeNodeIndex:{to:"includeElementIndex",id:"change-includenodeindex-to-includeelementindex"}};function _0(e){for(const i in Ph)if(Q2.call(Ph,i)&&Q2.call(e,i)){const a=Ph[i];console.warn(`[react-markdown] Warning: please ${a.to?`use \`${a.to}\` instead of`:"remove"} \`${i}\` (see <${R2e}#${a.id}> for more info)`),delete Ph[i]}const t=E2e().use(P2e).use(e.remarkPlugins||e.plugins||[]).use(k2e,{allowDangerousHtml:!0}).use(e.rehypePlugins||[]).use(I2e,e);let n;typeof e.children=="string"?n=K2(e.children):(e.children!==void 0&&e.children!==null&&console.warn(`[react-markdown] Warning: please pass a string as \`children\` (not: \`${e.children}\`)`),n=K2());const r=t.runSync(t.parse(n),n);if(r.type!=="root")throw new TypeError("Expected a `root` node");let o=N1.createElement(N1.Fragment,{},O2e({options:e,schema:$2e,listDepth:0},r));return e.className&&(o=N1.createElement("div",{className:e.className},o)),o}_0.defaultProps={transformLinkUri:bj};_0.propTypes={children:pt.string,className:pt.string,allowElement:pt.func,allowedElements:pt.arrayOf(pt.string),disallowedElements:pt.arrayOf(pt.string),unwrapDisallowed:pt.bool,remarkPlugins:pt.arrayOf(pt.oneOfType([pt.object,pt.func,pt.arrayOf(pt.oneOfType([pt.object,pt.func]))])),rehypePlugins:pt.arrayOf(pt.oneOfType([pt.object,pt.func,pt.arrayOf(pt.oneOfType([pt.object,pt.func]))])),sourcePos:pt.bool,rawSourcePos:pt.bool,skipHtml:pt.bool,includeElementIndex:pt.bool,transformLinkUri:pt.oneOfType([pt.func,pt.bool]),linLine truncated
`)&&u.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" "),o.push(t.handle(u,e,t,{before:a,after:l})),a=o[o.length-1].slice(-1);return o.join("")}var e_e=zj;ck.unsafe=[{character:"~",inConstruct:"phrasing"}];ck.handlers={delete:jj};jj.peek=t_e;function jj(e,t,n){var r=n.enter("emphasis"),o=e_e(e,n,{before:"~",after:"~"});return r(),"~~"+o+"~~"}function t_e(){return"~"}var n_e=r_e;function r_e(e){var t,n;return e._compiled||(t=e.before?"(?:"+e.before+")":"",n=e.after?"(?:"+e.after+")":"",e.atBreak&&(t="[\\r\\n][\\t ]*"+t),e._compiled=new RegExp((t?"("+t+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(e.character)?"\\":"")+e.character+(n||""),"g")),e._compiled}var o_e=Bj;Bj.peek=a_e;var i_e=n_e;function Bj(e,t,n){for(var r=e.value||"",o="`",i=-1,a,l,s,u;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/[ \r\n`]/.test(r.charAt(0))||/[ \r\n`]/.test(r.charAt(r.length-1)))&&(r=" "+r+" ");++i<n.unsafe.length;)if(a=n.unsafe[i],!!a.atBreak)for(l=i_e(a);s=l.exec(r);)u=s.index,r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(s.index+1);return o+r+o}function a_e(){return"`"}/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/var va="",W1,dk=l_e;function l_e(e,t){if(typeof e!="string")throw new TypeError("expected a string");if(t===1)return e;if(t===2)return e+e;var n=e.length*t;if(W1!==e||typeof W1>"u")W1=e,va="";else if(va.length>=n)return va.substr(0,n);for(;n>va.length&&t>1;)t&1&&(va+=e),t>>=1,e+=e;return va+=e,va=va.substr(0,n),va}var Vu=dk,s_e=h_e,u_e=/ +$/,gs=" ",c_e=`
`,d_e="-",$h=":",iT="|",aT=0,f_e=67,p_e=76,m_e=82,wv=99,rC=108,Cv=114;function h_e(e,t){for(var n=t||{},r=n.padding!==!1,o=n.delimiterStart!==!1,i=n.delimiterEnd!==!1,a=(n.align||[]).concat(),l=n.alignDelimiters!==!1,s=[],u=n.stringLength||v_e,c=-1,d=e.length,f=[],m=[],p=[],h=[],y=[],b=0,g,x,w,P,C,E,S,R,I,M,_;++c<d;){for(g=e[c],x=-1,w=g.length,p=[],h=[],w>b&&(b=w);++x<w;)E=g_e(g[x]),l===!0&&(C=u(E),h[x]=C,P=y[x],(P===void 0||C>P)&&(y[x]=C)),p.push(E);f[c]=p,m[c]=h}if(x=-1,w=b,typeof a=="object"&&"length"in a)for(;++x<w;)s[x]=lT(a[x]);else for(_=lT(a);++x<w;)s[x]=_;for(x=-1,w=b,p=[],h=[];++x<w;)_=s[x],I="",M="",_===rC?I=$h:_===Cv?M=$h:_===wv&&(I=$h,M=$h),C=l?Math.max(1,y[x]-I.length-M.length):1,E=I+Vu(d_e,C)+M,l===!0&&(C=I.length+C+M.length,C>y[x]&&(y[x]=C),h[x]=C),p[x]=E;for(f.splice(1,0,p),m.splice(1,0,h),c=-1,d=f.length,S=[];++c<d;){for(p=f[c],h=m[c],x=-1,w=b,R=[];++x<w;)E=p[x]||"",I="",M="",l===!0&&(C=y[x]-(h[x]||0),_=s[x],_===Cv?I=Vu(gs,C):_===wv?C%2===0?(I=Vu(gs,C/2),M=I):(I=Vu(gs,C/2+.5),M=Vu(gs,C/2-.5)):M=Vu(gs,C)),o===!0&&x===0&&R.push(iT),r===!0&&!(l===!1&&E==="")&&(o===!0||x!==0)&&R.push(gs),l===!0&&R.push(I),R.push(E),l===!0&&R.push(M),r===!0&&R.push(gs),(i===!0||x!==w-1)&&R.push(iT);R=R.join(""),i===!1&&(R=R.replace(u_e,"")),S.push(R)}return S.join(c_e)}function g_e(e){return e==null?"":String(e)}function v_e(e){return e.length}function lT(e){var t=typeof e=="string"?e.charCodeAt(0):aT;return t===p_e||t===rC?rC:t===m_e||t===Cv?Cv:t===f_e||t===wv?wv:aT}var y_e=zj,b_e=o_e,x_e=s_e,w_e=C_e;function C_e(e){var t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:a,tableRow:l,tableCell:s,inlineCode:f}};function a(m,p,h){return u(c(m,h),m.align)}function l(m,p,h){var y=d(m,h),b=u([y]);return b.slice(0,b.indexOf(`
`))}function s(m,p,h){var y=h.enter("tableCell"),b=y_e(m,h,{before:i,after:i});return y(),b}function u(m,p){return x_e(m,{align:p,alignDelimiters:r,padding:n,stringLength:o})}function c(m,p){for(var h=m.children,y=-1,b=h.length,g=[],x=p.enter("table");++y<b;)g[y]=d(h[y],p);return x(),g}function d(m,p){for(var h=m.children,y=-1,b=h.length,g=[],x=p.enter("tableRow");++y<b;)g[y]=s(h[y],m,p);return x(),g}function f(m,p,h){var y=b_e(m,p,h);return h.stack.indexOf("tableCell")!==-1&&(y=y.replace(/\|/g,"\\$&")),y}}var fk={},S_e=E_e;function E_e(e){var t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}var P_e=k_e;function k_e(e){var t=e.options.listItemIndent||"tab";if(t===1||t==="1")return"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}var $_e=O_e,I_e=dk;function O_e(e,t){for(var n=e.children||[],r=[],o=-1,i;++o<n.length;)i=n[o],r.push(t.handle(i,e,t,{before:`
`,after:`
`})),o+1<n.length&&r.push(a(i,n[o+1]));return r.join("");function a(l,s){for(var u=-1,c;++u<t.join.length&&(c=t.join[u](l,s,e,t),!(c===!0||c===1));){if(typeof c=="number")return I_e(`
`,1+Number(c));if(c===!1)return`
<!---->
`}return`
`}}var M_e=T_e,R_e=/\r?\n|\r/g;function T_e(e,t){for(var n=[],r=0,o=0,i;i=R_e.exec(e);)a(e.slice(r,i.index)),n.push(i[0]),r=i.index+i[0].length,o++;return a(e.slice(r)),n.join("");function a(l){n.push(t(l,o,!l))}}var __e=N_e,sT=dk,F_e=S_e,A_e=P_e,L_e=$_e,D_e=M_e;function N_e(e,t,n){var r=F_e(n),o=A_e(n),i,a,l;return t&&t.ordered&&(r=(t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+"."),i=r.length+1,(o==="tab"||o==="mixed"&&(t&&t.spread||e.spread))&&(i=Math.ceil(i/4)*4),l=n.enter("listItem"),a=D_e(L_e(e,n),s),l(),a;function s(u,c,d){return c?(d?"":sT(" ",i))+u:(d?r:r+sT(" ",i-r.length))+u}}var z_e=__e;fk.unsafe=[{atBreak:!0,character:"-",after:"[:|-]"}];fk.handlers={listItem:j_e};function j_e(e,t,n){var r=z_e(e,t,n),o=e.children[0];return typeof e.checked=="boolean"&&o&&o.type==="paragraph"&&(r=r.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,i)),r;function i(a){return a+"["+(e.checked?"x":" ")+"] "}}var B_e=Hj;function Hj(e,t){var n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Hj(e,t.extensions[n]);for(r in t)r==="extensions"||(r==="unsafe"||r==="join"?e[r]=e[r].concat(t[r]||[]):r==="handlers"?e[r]=Object.assign(e[r],t[r]||{}):e.options[r]=t[r]);return e}var H_e=Nj,U_e=ck,V_e=w_e,W_e=fk,G_e=B_e,q_e=K_e;function K_e(e){var t=G_e({handlers:{},join:[],unsafe:[],options:{}},{extensions:[H_e,U_e,V_e(e),W_e]});return Object.assign(t.options,{handlers:t.handlers,join:t.join,unsafe:t.unsafe})}var Q_e=pTe,Y_e=YTe,X_e=q_e,uT,Z_e=J_e;function J_e(e){var t=this.data();!uT&&(this.Parser&&this.Parser.prototype&&this.Parser.prototype.blockTokenizers||this.Compiler&&this.Compiler.prototype&&this.Compiler.prototype.visitors)&&(uT=!0,console.warn("[remark-gfm] Warning: please upgrade to remark 13 to use this plugin")),n("micromarkExtensions",Q_e(e)),n("fromMarkdownExtensions",Y_e),n("toMarkdownExtensions",X_e(e));function n(r,o){t[r]?t[r].push(o):t[r]=[o]}}const eFe=Xi(Z_e),tFe=rt(z.jsx("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"}),"MoreHoriz"),nFe=["slots","slotProps"],rFe=fe(Zl)(({theme:e})=>O({display:"flex",marginLeft:`calc(${e.spacing(1)} * 0.5)`,marginRight:`calc(${e.spacing(1)} * 0.5)`},e.palette.mode==="light"?{backgroundColor:e.palette.grey[100],color:e.palette.grey[700]}:{backgroundColor:e.palette.grey[700],color:e.palette.grey[100]},{borderRadius:2,"&:hover, &:focus":O({},e.palette.mode==="light"?{backgroundColor:e.palette.grey[200]}:{backgroundColor:e.palette.grey[600]}),"&:active":O({boxShadow:e.shadows[0]},e.palette.mode==="light"?{backgroundColor:HO(e.palette.grey[200],.12)}:{backgroundColor:HO(e.palette.grey[600],.12)})})),oFe=fe(tFe)({width:24,height:16});function iFe(e){const{slots:t={},slotProps:n={}}=e,r=ce(e,nFe),o=e;return z.jsx("li",{children:z.jsx(rFe,O({focusRipple:!0},r,{ownerState:o,children:z.jsx(oFe,O({as:t.CollapsedIcon,ownerState:o},n.collapsedIcon))}))})}function aFe(e){return We("MuiBreadcrumbs",e)}const lFe=Ge("MuiBreadcrumbs",["root","ol","li","separator"]),sFe=lFe,uFe=["children","className","component","slots","slotProps","expandText","itemsAfterCollapse","itemsBeforeCollapse","maxItems","separator"],cFe=e=>{const{classes:t}=e;return Oe({root:["root"],li:["li"],ol:["ol"],separator:["separator"]},aFe,t)},dFe=fe(Xe,{name:"MuiBreadcrumbs",slot:"Root",overridesResolver:(e,t)=>[{[`& .${sFe.li}`]:t.li},t.root]})({}),fFe=fe("ol",{name:"MuiBreadcrumbs",slot:"Ol",overridesResolver:(e,t)=>t.ol})({display:"flex",flexWrap:"wrap",alignItems:"center",padding:0,margin:0,listStyle:"none"}),pFe=fe("li",{name:"MuiBreadcrumbs",slot:"Separator",overridesResolver:(e,t)=>t.separator})({display:"flex",userSelect:"none",marginLeft:8,marginRight:8});function mFe(e,t,n,r){return e.reduce((o,i,a)=>(a<e.length-1?o=o.concat(i,z.jsx(pFe,{"aria-hidden":!0,className:t,ownerState:r,children:n},`separator-${a}`)):o.push(i),o),[])}const hFe=v.forwardRef(function(t,n){const r=qe({props:t,name:"MuiBreadcrumbs"}),{children:o,className:i,component:a="nav",slots:l={},slotProps:s={},expandText:u="Show path",itemsAfterCollapse:c=1,itemsBeforeCollapse:d=1,maxItems:f=8,separator:m="/"}=r,p=ce(r,uFe),[h,y]=v.useState(!1),b=O({},r,{component:a,expanded:h,expandText:u,itemsAfterCollapse:c,itemsBeforeCollapse:d,maxItems:f,separator:m}),g=cFe(b),x=Gi({elementType:l.CollapsedIcon,externalSlotProps:s.collapsedIcon,ownerState:b}),w=v.useRef(null),P=E=>{const S=()=>{y(!0);const R=w.current.querySelector("a[href],button,[tabindex]");R&&R.focus()};return d+c>=E.length?E:[...E.slice(0,d),z.jsx(iFe,{"aria-label":u,slots:{CollapsedIcon:l.CollapsedIcon},slotProps:{collapsedIcon:x},onClick:S},"ellipsis"),...E.slice(E.length-c,E.length)]},C=v.Children.toArray(o).filter(E=>v.isValidElement(E)).map((E,S)=>z.jsx("li",{className:g.li,children:E},`child-${S}`));return z.jsx(dFe,O({ref:n,component:a,color:"text.secondary",className:ve(g.root,i),ownerState:b},p,{children:z.jsx(fFe,{className:g.ol,ref:w,ow Line truncated
&.SnackbarItem-contentRoot {
background-color: ${e=>e.theme.palette.background.default};
color: ${e=>e.theme.palette.primary.main};
}
&.SnackbarItem-variantSuccess {
background-color: ${e=>e.theme.palette.success.main};
color: ${e=>e.theme.palette.success.contrastText};
}
&.SnackbarItem-variantError {
background-color: ${e=>e.theme.palette.error.main};
color: ${e=>e.theme.palette.error.contrastText};
}
&.SnackbarItem-variantInfo {
background-color: ${e=>e.theme.palette.info.main};
color: ${e=>e.theme.palette.info.contrastText};
}
&.SnackbarItem-variantWarning {
background-color: ${e=>e.theme.palette.warning.main};
color: ${e=>e.theme.palette.warning.contrastText};
}
`;const wAe=(e,t)=>O({WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",boxSizing:"border-box",WebkitTextSizeAdjust:"100%"},t&&!e.vars&&{colorScheme:e.palette.mode}),CAe=e=>O({color:(e.vars||e).palette.text.primary},e.typography.body1,{backgroundColor:(e.vars||e).palette.background.default,"@media print":{backgroundColor:(e.vars||e).palette.common.white}}),SAe=(e,t=!1)=>{var n;const r={};t&&e.colorSchemes&&Object.entries(e.colorSchemes).forEach(([a,l])=>{var s;r[e.getColorSchemeSelector(a).replace(/\s*&/,"")]={colorScheme:(s=l.palette)==null?void 0:s.mode}});let o=O({html:wAe(e,t),"*, *::before, *::after":{boxSizing:"inherit"},"strong, b":{fontWeight:e.typography.fontWeightBold},body:O({margin:0},CAe(e),{"&::backdrop":{backgroundColor:(e.vars||e).palette.background.default}})},r);const i=(n=e.components)==null||(n=n.MuiCssBaseline)==null?void 0:n.styleOverrides;return i&&(o=[o,i]),o};function EAe(e){const t=qe({props:e,name:"MuiCssBaseline"}),{children:n,enableColorScheme:r=!1}=t;return z.jsxs(v.Fragment,{children:[z.jsx(XE,{styles:o=>SAe(o,r)}),n]})}/**
* @remix-run/router v1.15.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function kp(){return kp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kp.apply(this,arguments)}var _l;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(_l||(_l={}));const mT="popstate";function PAe(e){e===void 0&&(e={});function t(r,o){let{pathname:i,search:a,hash:l}=r.location;return oC("",{pathname:i,search:a,hash:l},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function n(r,o){return typeof o=="string"?o:Sv(o)}return $Ae(t,n,null,e)}function yn(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function o3(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kAe(){return Math.random().toString(36).substr(2,8)}function hT(e,t){return{usr:e.state,key:e.key,idx:t}}function oC(e,t,n,r){return n===void 0&&(n=null),kp({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?kd(t):t,{state:n,key:t&&t.key||r||kAe()})}function Sv(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function kd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function $Ae(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,l=_l.Pop,s=null,u=c();u==null&&(u=0,a.replaceState(kp({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){l=_l.Pop;let y=c(),b=y==null?null:y-u;u=y,s&&s({action:l,location:h.location,delta:b})}function f(y,b){l=_l.Push;let g=oC(h.location,y,b);n&&n(g,y),u=c()+1;let x=hT(g,u),w=h.createHref(g);try{a.pushState(x,"",w)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(w)}i&&s&&s({action:l,location:h.location,delta:1})}function m(y,b){l=_l.Replace;let g=oC(h.location,y,b);n&&n(g,y),u=c();let x=hT(g,u),w=h.createHref(g);a.replaceState(x,"",w),i&&s&&s({action:l,location:h.location,delta:0})}function p(y){let b=o.location.origin!=="null"?o.location.origin:o.location.href,g=typeof y=="string"?y:Sv(y);return g=g.replace(/ $/,"%20"),yn(b,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,b)}let h={get action(){return l},get location(){return e(o,a)},listen(y){if(s)throw new Error("A history only accepts one active listener");return o.addEventListener(mT,d),s=y,()=>{o.removeEventListener(mT,d),s=null}},createHref(y){return t(o,y)},createURL:p,encodeLocation(y){let b=p(y);return{pathname:b.pathname,search:b.search,hash:b.hash}},push:f,replace:m,go(y){return a.go(y)}};return h}var gT;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(gT||(gT={}));function IAe(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?kd(t):t,o=Ck(r.pathname||"/",n);if(o==null)return null;let i=i3(e);OAe(i);let a=null;for(let l=0;a==null&&l<i.length;++l){let s=jAe(o);a=NAe(i[l],s)}return a}function i3(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(i,a,l)=>{let s={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};s.relativePath.startsWith("/")&&(yn(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=Gl([r,s.relativePath]),c=n.concat(s);i.children&&i.children.length>0&&(yn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),i3(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:LAe(u,i.index),routesMeta:c})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))o(i,a);else for(let s of a3(i.path))o(i,a,s)}),t}function a3(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=a3(r.join("/")),l=[];return l.push(...a.map(s=>s===""?i:[i,s].join("/"))),o&&l.push(...a),l.map(s=>e.startsWith("/")&&s===""?"/":s)}function OAe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:DAe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const MAe=/^:[\w-]+$/,RAe=3,TAe=2,_Ae=1,FAe=10,AAe=-2,vT=e=>e==="*";function LAe(e,t){let n=e.split("/"),r=n.length;return n.some(vT)&&(r+=AAe),t&&(r+=TAe),n.filter(o=>!vT(o)).reduce((o,i)=>o+(MAe.test(i)?RAe:i===""?_Ae:FAe),r)}function DAe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function NAe(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a<n.length;++a){let l=n[a],s=a===n.length-1,u=o==="/"?t:t.slice(o.length)||"/",c=l3({path:l.relativePath,caseSensitive:lLine truncated
* React Router v6.22.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$p.apply(this,arguments)}const Pk=v.createContext(null),QAe=v.createContext(null),al=v.createContext(null),z0=v.createContext(null),la=v.createContext({outlet:null,matches:[],isDataRoute:!1}),u3=v.createContext(null);function YAe(e,t){let{relative:n}=t===void 0?{}:t;$d()||yn(!1);let{basename:r,navigator:o}=v.useContext(al),{hash:i,pathname:a,search:l}=d3(e,{relative:n}),s=a;return r!=="/"&&(s=a==="/"?r:Gl([r,a])),o.createHref({pathname:s,search:l,hash:i})}function $d(){return v.useContext(z0)!=null}function Yi(){return $d()||yn(!1),v.useContext(z0).location}function c3(e){v.useContext(al).static||v.useLayoutEffect(e)}function Ev(){let{isDataRoute:e}=v.useContext(la);return e?fLe():XAe()}function XAe(){$d()||yn(!1);let e=v.useContext(Pk),{basename:t,future:n,navigator:r}=v.useContext(al),{matches:o}=v.useContext(la),{pathname:i}=Yi(),a=JSON.stringify(Sk(o,n.v7_relativeSplatPath)),l=v.useRef(!1);return c3(()=>{l.current=!0}),v.useCallback(function(u,c){if(c===void 0&&(c={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let d=Ek(u,JSON.parse(a),i,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Gl([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,a,i,e])}const ZAe=v.createContext(null);function JAe(e){let t=v.useContext(la).outlet;return t&&v.createElement(ZAe.Provider,{value:e},t)}function eLe(){let{matches:e}=v.useContext(la),t=e[e.length-1];return t?t.params:{}}function d3(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(al),{matches:o}=v.useContext(la),{pathname:i}=Yi(),a=JSON.stringify(Sk(o,r.v7_relativeSplatPath));return v.useMemo(()=>Ek(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function tLe(e,t){return nLe(e,t)}function nLe(e,t,n,r){$d()||yn(!1);let{navigator:o}=v.useContext(al),{matches:i}=v.useContext(la),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:"/";a&&a.route;let u=Yi(),c;if(t){var d;let y=typeof t=="string"?kd(t):t;s==="/"||(d=y.pathname)!=null&&d.startsWith(s)||yn(!1),c=y}else c=u;let f=c.pathname||"/",m=f;if(s!=="/"){let y=s.replace(/^\//,"").split("/");m="/"+f.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=IAe(e,{pathname:m}),h=lLe(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:Gl([s,o.encodeLocation?o.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?s:Gl([s,o.encodeLocation?o.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,r);return t&&h?v.createElement(z0.Provider,{value:{location:$p({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:_l.Pop}},h):h}function rLe(){let e=dLe(),t=qAe(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:o},n):null,i)}const oLe=v.createElement(rLe,null);class iLe extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?v.createElement(la.Provider,{value:this.props.routeContext},v.createElement(u3.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function aLe(e){let{routeContext:t,match:n,children:r}=e,o=v.useContext(Pk);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(la.Provider,{value:t},r)}function lLe(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let a=e,l=(o=n)==null?void 0:o.errors;if(l!=null){let c=a.findIndex(d=>d.route.id&&(l==null?void 0:l[d.route.id]));c>=0||yn(!1),a=a.slice(0,Math.min(a.length,c+1))}let s=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<a.length;c++){let d=a[c];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(u=c),d.route.id){let{loaderData:f,errors:m}=n,p=d.route.loader&&f[d.route.id]===void 0&&(!m||m[d.route.id]===void 0);if(d.route.lazy||p){s=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((c,d,f)=>{let m,p=!1,h=null,y=null;Line truncated
* React Router DOM v6.22.3
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function aC(){return aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},aC.apply(this,arguments)}function gLe(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function vLe(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function yLe(e,t){return e.button===0&&(!t||t==="_self")&&!vLe(e)}const bLe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],xLe="6";try{window.__reactRouterVersion=xLe}catch{}const wLe="startTransition",xT=cg[wLe];function CLe(e){let{basename:t,children:n,future:r,window:o}=e,i=v.useRef();i.current==null&&(i.current=PAe({window:o,v5Compat:!0}));let a=i.current,[l,s]=v.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=v.useCallback(d=>{u&&xT?xT(()=>s(d)):s(d)},[s,u]);return v.useLayoutEffect(()=>a.listen(c),[a,c]),v.createElement(mLe,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const SLe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ELe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,PLe=v.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:l,target:s,to:u,preventScrollReset:c,unstable_viewTransition:d}=t,f=gLe(t,bLe),{basename:m}=v.useContext(al),p,h=!1;if(typeof u=="string"&&ELe.test(u)&&(p=u,SLe))try{let x=new URL(window.location.href),w=u.startsWith("//")?new URL(x.protocol+u):new URL(u),P=Ck(w.pathname,m);w.origin===x.origin&&P!=null?u=P+w.search+w.hash:h=!0}catch{}let y=YAe(u,{relative:o}),b=kLe(u,{replace:a,state:l,target:s,preventScrollReset:c,relative:o,unstable_viewTransition:d});function g(x){r&&r(x),x.defaultPrevented||b(x)}return v.createElement("a",aC({},f,{href:p||y,onClick:h||i?r:g,ref:n,target:s}))});var wT;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(wT||(wT={}));var CT;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(CT||(CT={}));function kLe(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l}=t===void 0?{}:t,s=Ev(),u=Yi(),c=d3(e,{relative:a});return v.useCallback(d=>{if(yLe(d,n)){d.preventDefault();let f=r!==void 0?r:Sv(u)===Sv(c);s(e,{replace:f,state:o,preventScrollReset:i,relative:a,unstable_viewTransition:l})}},[u,s,c,r,o,n,e,i,a,l])}var ST=e=>{if(typeof e>"u")return e;let t=Number(e);return`${t}`===e?t:e},$Le={addQueryPrefix:!0,skipNulls:!0,arrayFormat:"indices",encode:!1,encodeValuesOnly:!0},ILe={go:()=>{let{search:e,hash:t}=Yi(),n=Ev();return v.useCallback(({to:r,type:o,query:i,hash:a,options:{keepQuery:l,keepHash:s}={}})=>{let u={...l&&e&&Wh.parse(e,{ignoreQueryPrefix:!0}),...i};u.to&&(u.to=encodeURIComponent(`${u.to}`));let c=Object.keys(u).length>0,d=`#${(a||s&&t||"").replace(/^#/,"")}`,f=d.length>1,m=`${r||""}${c?Wh.stringify(u,$Le):""}${f?d:""}`;return o==="path"?m:n(m,{replace:o==="replace"})},[t,e,n])},back:()=>{let e=Ev();return v.useCallback(()=>{e(-1)},[e])},parse:()=>{var e;let t=eLe(),{pathname:n,search:r}=Yi(),{resources:o}=v.useContext(zp),{resource:i,action:a,matchedRoute:l}=$.useMemo(()=>PL(n,o),[o,n]);return Object.entries(t).length===0&&l&&(t=((e=l3(l,n))==null?void 0:e.params)||{}),v.useCallback(()=>{let s=Wh.parse(r,{ignoreQueryPrefix:!0}),u={...t,...s};return{...i&&{resource:i},...a&&{action:a},...(t==null?void 0:t.id)&&{id:decodeURIComponent(t.id)},pathname:n,params:{...u,current:ST(u.current),pageSize:ST(u.pageSize),to:u.to?decodeURIComponent(u.to):void 0}}},[n,r,t,i,a])},Link:$.forwardRef(function(e,t){return $.createElement(PLe,{...e,ref:t})})},ET=({resource:e,meta:t})=>{let n=Hp(),{resource:r,resources:o}=Je(e),i=r||o.find(a=>a.list);if(i){let a=n({resource:i,action:"list",meta:t});return a?$.createElement(m3,{to:a}):(console.warn("No resource is found to navigate to."),null)}return console.warn("No resource is found to navigate to."),null};function OLe(e,t=!0){let{navigator:n}=$.useContext(al);$.useEffect(()=>{if(!t)return;let r=n.go,o=n.push;return n.push=(...i)=>{e()!==!1&&o(...i)},n.go=(...i)=>{e()!==!1&&r(...i)},()=>{n.push=o,n.go=r}},[n,e,t])}function MLe(e,t=!0,n,r=!1){let o=$.useCallback(a=>(a.preventDefault(),a.returnValue=e,a.returnValue),[e]);$.useEffect(()=>(t&&!r&&window.addEventListener("beforeunload",o),()=>{window.removeEventListener("beforeunload",o)}),[o,t,r]);let i=$.useCallback(()=>{let a=window.confirm(e);return a&&n&&n(),a},[e]);OLe(i,t)}var RLe=({translationKey:e="warnWhenUnsavedChanges",message:t="Are you sure you want to leave? You have unsaved changes."})=>{let n=Qe(),{pathname:r}=Yi(),{warnWhen:o,setWarnWhen:i}=Qa();$.useEffect(()=>()=>i==nLine truncated
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&DDe[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},FT=Symbol("internals");function af(e){return e&&String(e).trim().toLowerCase()}function sg(e){return e===!1||e==null?e:Se.isArray(e)?e.map(sg):String(e)}function zDe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const jDe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Q1(e,t,n,r,o){if(Se.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Se.isString(t)){if(Se.isString(r))return t.indexOf(r)!==-1;if(Se.isRegExp(r))return r.test(t)}}function BDe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function HDe(e,t){const n=Se.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,i,a){return this[r].call(this,t,o,i,a)},configurable:!0})})}class V0{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function i(l,s,u){const c=af(s);if(!c)throw new Error("header name must be a non-empty string");const d=Se.findKey(o,c);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(o[d||s]=sg(l))}const a=(l,s)=>Se.forEach(l,(u,c)=>i(u,c,s));return Se.isPlainObject(t)||t instanceof this.constructor?a(t,n):Se.isString(t)&&(t=t.trim())&&!jDe(t)?a(NDe(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=af(t),t){const r=Se.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return zDe(o);if(Se.isFunction(n))return n.call(this,o,r);if(Se.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=af(t),t){const r=Se.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Q1(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function i(a){if(a=af(a),a){const l=Se.findKey(r,a);l&&(!n||Q1(r,r[l],l,n))&&(delete r[l],o=!0)}}return Se.isArray(t)?t.forEach(i):i(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!t||Q1(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const n=this,r={};return Se.forEach(this,(o,i)=>{const a=Se.findKey(r,i);if(a){n[a]=sg(o),delete n[i];return}const l=t?BDe(i):String(i).trim();l!==i&&delete n[i],n[l]=sg(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Se.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Se.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[FT]=this[FT]={accessors:{}}).accessors,o=this.prototype;function i(a){const l=af(a);r[l]||(HDe(o,a),r[l]=!0)}return Se.isArray(t)?t.forEach(i):i(t),this}}V0.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Se.reduceDescriptors(V0.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Se.freezeMethods(V0);const Fa=V0;function Y1(e,t){const n=this||Ok,r=t||n,o=Fa.from(r.headers);let i=r.data;return Se.forEach(e,function(l){i=l.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function T3(e){return!!(e&&e.__CANCEL__)}function $m(e,t,n){vt.call(this,e??"canceled",vt.ERR_CANCELED,t,n),this.name="CanceledError"}Se.inherits($m,vt,{__CANCEL__:!0});function UDe(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new vt("Request failed with status code "+n.status,[vt.ERR_BAD_REQUEST,vt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const VDe=Li.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Se.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Se.isString(r)&&a.push("path="+r),Se.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function WDe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function GDe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function _3(e,t){return e&&!WDe(t)?GDe(e,t):t}const qDe=Li.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let a=i;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(a){const l=Se.isString(a)?o(a):a;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function KDe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function QDe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[i];a||(a=u),n[o]=s,r[o]=u;let d=i,f=0;for(;d!==o;)f+=n[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),u-a<t)return;const m=c&&u-c;return m?Math.round(f*1e3/m):void 0}}function AT(e,t){let n=0;const r=QDe(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,l=i-n,s=r(l),u=i<=a;n=i;const c={loaded:i,total:a,progress:a?i/a:void 0,bytes:l,rate:s||void 0,estimated:s&&a&&u?(a-i)/s:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const YDe=typeof XMLHttpRequest<"u",XDe=YDe&&function(e){return new Promise(function(n,r){let o=e.data;const i=Fa.from(e.headers).normalize();let{responseType:a,withXSRFToken:l}=e,s;function u(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}let c;if(Se.isFormData(o)){if(Li.hasStandardBrowserEnv||Li.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[h,...y]=c?c.split(";").map(b=>b.trim()).filter(Boolean):[];i.setContentType([h||"multipart/form-data",...y].join("; "))}}let d=new XMLHttpRequest;if(e.auth){const h=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(h+":"+y))}const f=_3(e.baseURL,e.url);d.open(e.method.toUpperCase(),I3(f,e.params,e.paramsSerializer),!0),d.timeout=e.timeout;function m(){if(!d)return;const h=Fa.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),b={data:!a||a==="text"||a==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:h,config:e,request:d};UDe(function(x){n(x),u()},function(x){r(x),u()},b),d=null}if("onloadend"in d?d.onloadend=m:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(m)},d.onabort=function(){d&&(r(new vt("Request aborted",vt.ECONNABORTED,e,d)),d=null)},d.onerror=function(){r(new vt("Network Error",vt.ERR_NETWORK,e,d)),d=null},d.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||O3;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new vt(y,b.clarifyTimeoutError?vt.ETIMEDOUT:vt.ECONNABORTED,e,d)),d=null},Li.hasStandardBrowserEnv&&(l&&Se.isFunction(l)&&(l=l(e)),l||l!==!1&&qDe(f))){const h=e.xsrfHeaderName&&e. Line truncated
`+i.map(LT).join(`
`):" "+LT(i[0]):"as no adapter specified";throw new vt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:cC};function X1(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $m(null,e)}function DT(e){return X1(e),e.headers=Fa.from(e.headers),e.data=Y1.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),F3.getAdapter(e.adapter||Ok.adapter)(e).then(function(r){return X1(e),r.data=Y1.call(e,e.transformResponse,r),r.headers=Fa.from(r.headers),r},function(r){return T3(r)||(X1(e),r&&r.response&&(r.response.data=Y1.call(e,e.transformResponse,r.response),r.response.headers=Fa.from(r.response.headers))),Promise.reject(r)})}const NT=e=>e instanceof Fa?e.toJSON():e;function Jc(e,t){t=t||{};const n={};function r(u,c,d){return Se.isPlainObject(u)&&Se.isPlainObject(c)?Se.merge.call({caseless:d},u,c):Se.isPlainObject(c)?Se.merge({},c):Se.isArray(c)?c.slice():c}function o(u,c,d){if(Se.isUndefined(c)){if(!Se.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function i(u,c){if(!Se.isUndefined(c))return r(void 0,c)}function a(u,c){if(Se.isUndefined(c)){if(!Se.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const s={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:l,headers:(u,c)=>o(NT(u),NT(c),!0)};return Se.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||o,f=d(e[c],t[c],c);Se.isUndefined(f)&&d!==l||(n[c]=f)}),n}const A3="1.6.7",Mk={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Mk[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const zT={};Mk.transitional=function(t,n,r){function o(i,a){return"[Axios v"+A3+"] Transitional option '"+i+"'"+a+(r?". "+r:"")}return(i,a,l)=>{if(t===!1)throw new vt(o(a," has been removed"+(n?" in "+n:"")),vt.ERR_DEPRECATED);return n&&!zT[a]&&(zT[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,a,l):!0}};function JDe(e,t,n){if(typeof e!="object")throw new vt("options must be an object",vt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const l=e[i],s=l===void 0||a(l,i,e);if(s!==!0)throw new vt("option "+i+" must be "+s,vt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new vt("Unknown option "+i,vt.ERR_BAD_OPTION)}}const dC={assertOptions:JDe,validators:Mk},dl=dC.validators;class kv{constructor(t){this.defaults=t,this.interceptors={request:new _T,response:new _T}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+i):r.stack=i}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Jc(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&dC.assertOptions(r,{silentJSONParsing:dl.transitional(dl.boolean),forcedJSONParsing:dl.transitional(dl.boolean),clarifyTimeoutError:dl.transitional(dl.boolean)},!1),o!=null&&(Se.isFunction(o)?n.paramsSerializer={serialize:o}:dC.assertOptions(o,{encode:dl.function,serialize:dl.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=i&&Se.merge(i.common,i[n.method]);i&&Se.forEach(["delete","get","head","post","put","patch","common"],p=>{delete i[p]}),n.headers=Fa.concat(a,i);const l=[];let s=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(s=s&&h.synchronous,l.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,d=0,f;if(!s){const p=[DT.bind(this),void 0];for(p.unshift.apply(p,l),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=l.length;let m=n;for(d=0;d<f;){const p=l[d++],h=l[d++];try{m=p(m)}catch(y){h.call(this,y);break}}try{c=DT.call(this,m)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(t){t=Jc(this.defaults,t);const n=_3(t.baseURL,t.url);return I3(n,t.params,t.paramsSerializer)}}Se.forEach(["delete","get","head","options"],function(t){kv.prototype[t]=function(n,r){return this.request(Jc(r||{},{method:t,url:n,data:(r||{}).data}))}});Se.forEach(["post","put","patch"],function(t){function n(r){return function(i,a,l){return this.request(Jc(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}kv.prototype[t]=n(),kv.prototype[t+"Form"]=n(!0)});const ug=kv;class Rk{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(o=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(l=>{r.subscribe(l),i=l}).then(o);return a.cancel=function(){r.unsubscribe(i)},a},t(function(i,a,l){r.reason||(r.reason=new $m(i,a,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Rk(function(o){t=o}),cancel:t}}}const eNe=Rk;function tNe(e){return function(n){return e.apply(null,n)}}function nNe(e){return Se.isObject(e)&&e.isAxiosError===!0}const fC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(fC).forEach(([e,t])=>{fC[t]=e});const rNe=fC;function L3(e){const t=new ug(e),n=g3(ug.prototype.request,t);return Se.extend(n,ug.prototype,t,{allOwnKeys:!0}),Se.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return L3(Jc(e,o))},n}const Mn=L3(Ok);Mn.Axios=ug;Mn.CanceledError=$m;Mn.CancelToken=eNe;Mn.isCancel=T3;Mn.VERSION=A3;Mn.toFormData=U0;Mn.AxiosError=vt;Mn.Cancel=Mn.CanceledError;Mn.all=function(t){return Promise.all(t)};Mn.spread=tNe;Mn.isAxiosError=nNe;Mn.mergeConfig=Jc;Mn.AxiosHeaders=Fa;Mn.formToJSON=e=>R3(Se.isHTMLForm(e)?new FormData(e):e);Mn.getAdapter=F3.getAdapter;Mn.HttpStatusCode=rNe;Mn.default=Mn;const oNe=Mn,D3=oNe.create();D3.interceptors.response.use(e=>e,e=>{var n,r,o;const t={...e,message:(r=(n=e.response)==null?void 0:n.data)==null?void 0:r.message,statusCode:(o=e.response)==null?void 0:o.status};return Promise.reject(t)});const jT=(e,t=D3)=>({getList:async({resource:n,pagination:r,filters:o,sorters:i,meta:a})=>{const l=`${e}/${n}`,{current:s=1,pageSi Line truncated
Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Markus Lehr | VR Predictive Maintenance Device."
/>
<meta
data-rh="true"
property="og:image"
content="https://refine.dev/img/refine_social.png"
/>
<meta
data-rh="true"
name="twitter:image"
content="https://refine.dev/img/refine_social.png"
/>
<title>
Markus Lehr | VR Predictive Maintenance Device.
</title>
<script type="module" crossorigin src="/assets/index-952960a4.js"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm dev` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
@@ -0,0 +1,11 @@
class VRPMDV_CreateMonCmd:
def __init__(self, samplerate, sampleperiod, downtime) :
self.cmdid = 1
self.samplerate = samplerate
self.sampleperiod = sampleperiod
self.downtime = downtime
@@ -0,0 +1,50 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, post_dump
from vrpmdvcreatemoncmd import VRPMDV_CreateMonCmd
# class VRPMDV_CreateMonSchema(Schema):
# cmdid = fields.Integer()
# id = fields.UUID()
# samplerate = fields.Integer()
# sampleperiod = fields.Integer()
# downtime = fields.Integer()
# status = fields.String()
# #monstate = fields.Enum(VRPMDVMonitoringState)
# # def get_envelope_key(self, many):
# # """Helper to get the envelope key."""
# # key = self.__envelope__["many"] if many else self.__envelope__["single"]
# # assert key is not None, "Envelope key undefined"
# # return key
# # @post_dump(pass_many=True)
# # def wrap_with_envelope(self, data, many, **kwargs):
# # key = self.get_envelope_key(many)
# # return {key: data}
# @post_load
# def make_vrpmdv_Monitoring(self, data, **kwargs):
# mon = VRPMDV_Monitoring(**data)
# return mon
class VRPMDV_CreateMonSchema(Schema):
cmdid = fields.Integer()
samplerate = fields.Integer()
sampleperiod = fields.Integer()
downtime = fields.Integer()
@post_load
def make_vrpmdv_CreateMonitoring(self, data, **kwargs):
mon = VRPMDV_CreateMonCmd(**data)
return mon
@@ -0,0 +1,485 @@
import os
import time
from uuid import uuid4
import uuid
from flask import jsonify
import json
from marshmallow import EXCLUDE, ValidationError
#from vrpmdvcreatemoncmd import VRPMDV_CreateMonCmd
#from vrpmdvcreatemonschema import VRPMDV_CreateMonSchema
#from vrpmdvdeletemoncmd import VRPMDV_DeleteMonCmd
#from vrpmdvdeletemonschema import VRPMDV_DeleteMonSchema
from vrpmdvmonfilescompleteschema import VRPMDV_MonfilesCompleteSchema
from vrpmdvmonfilter import VRPMDV_MonFilter
from vrpmdvmonfilterschema import VRPMDV_MonFilterSchema
from vrpmdvmonsensorschema import VRPMDV_MonSensorSchema
from vrpmdvmonchannelschema import VRPMDV_MonChannelSchema
from vrpmdvmonfilesschema import VRPMDV_MonfilesSchema
from vrpmdvmonitoring import VRPMDV_Monitoring
from vrpmdvmonitoringschema import VRPMDV_MonitoringSchema
from vrpmdvmonreqschema import VRPMDV_MonReqSchema
# from vrpmdvntlink import trySend
from extensions.rt_service import rt_service as rts
from vrpmdvmonitoringState import VRPMDVMonitoringState
#from vrpmdvlogging import createCoproLoggingTask
import logging
class VRPMDV_Data:
def __init__(self):
#self.loaded = False
format = "%(asctime)s: %(message)s"
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
self.mons:list = []
#TODO ML: uncomment this lines
self.rtservice = rts.RT_Service()
if (self.rtservice != None):
logging.info("init: initCoproFW")
self.rtservice.initCoproFW("home/root/elffile","zephyr_openamp_rsc_table.elf")
self.logTask = None #createCoproLoggingTask()
self.loaded = self.loadFile()
self.monfilespath = '/home/root/monfiles/'
#start the monitorings
time.sleep(1)
self.startMons();
def loadFile(self):
try:
with open('./mons.json', 'r') as f:
fmons = f.read()
if not fmons:
# return no Item
return True
else:
# data = json.loads(fmons)
schema = VRPMDV_MonitoringSchema(many=True)
#res = schema.loads(fmons) # data
self.mons = schema.loads(fmons) # .append(res)
return True
except:
#nothing todo ML we should create a file later the database
print("file not found")
def saveFile(self):
try:
with open('./mons.json', 'w') as f:
schema = VRPMDV_MonitoringSchema()
result = schema.dumps(self.mons, many=True)
f.write(result)
return True
except:
#nothing todo
print("could not write file")
def startMons(self):
try:
logging.info("MainThread: startMons")
# for i, val in enumerate(self.mons):
# if (val.status == 'started') :
# val.startMonitoring()
except:
print("could not start monitorings")
def findMon(mon):
return mon
def getMonitorings(self):
# 1st time read file
# if not self.loaded :
# self.loaded = self.loadFile()
schema = VRPMDV_MonitoringSchema()
result = schema.dumps(self.mons, many=True)
return result
def getMonitoring(self, vrpmid):
try:
matched_obj = next(x for x in self.mons if str(x.id) == vrpmid)
except:
return "no Item found"
# we find it and we return it
schema = VRPMDV_MonitoringSchema()
return schema.dumps(matched_obj)
def setMonitoring(self, id, request):
try:
matched_obj = next(x for x in self.mons if str(x.id) == id)
except:
return "no Item found"
if 'name' in request : matched_obj.name = request['name']
if 'samplerate' in request : matched_obj.samplerate = request['samplerate']
if 'sampleperiod' in request : matched_obj.sampleperiod = request['sampleperiod']
if 'downtime' in request : matched_obj.downtime = request['downtime']
if 'status' in request :
if (request['status'] == 'started'):
if (matched_obj.status == VRPMDVMonitoringState.STOPPED):
logging.info("MainThread: started %s", matched_obj.id)
matched_obj.startMonitoring()
# matched_obj.setStatus(self.createMonOnDevice(matched_obj))
elif (matched_obj.status == 'started') :
logging.info("MainThread: stopped %s", matched_obj.id)
# matched_obj.setStatus(self._stopMonitoring(matched_obj))
matched_obj.stopMonitoring()
self.saveFile()
# we find it and we return it
schema = VRPMDV_MonitoringSchema()
return schema.dumps(matched_obj)
def createMonitoring(self, request):
id = uuid.uuid4()
createjson = request.get_json()
vrpmreq = VRPMDV_MonReqSchema().load(createjson)
mon = VRPMDV_Monitoring(0, id, vrpmreq.name, vrpmreq.samplerate, vrpmreq.sampleperiod, vrpmreq.downtime, vrpmreq.status, vrpmreq.owner)
logging.info("Monitoring %s: creating", str(id))
# create Monitoring on the realtime side
if (vrpmreq.status == 'started'):
logging.info("Monitoring %s: createMonOnDevice", str(id))
mon.startMonitoring()
# status = self.createMonOnDevice(mon)
# logging.info("Monitoring %s: _start executed. status:%s", str(id), str(status))
# mon.status = status
self.mons.append(mon)
#save to file
self.saveFile()
#create result Object in json
schema = VRPMDV_MonitoringSchema()
return schema.dumps(mon)
def deleteMonitoring(self, vrpmid):
# if not self.loaded :
# self.loaded = self.loadFile()
# find monitoring with uuid
#result = filter(lambda mon: str(mon.uuid) == vrpmid["uuid"], self.mons)
try:
matched_obj = next(x for x in self.mons if str(x.id) == vrpmid)
except:
return "no Item found"
# we find it, delete on realtime side and now remove from list
matched_obj.stopMonitoring()
self.mons.remove(matched_obj)
#save the list
self.saveFile()
#make result
schema = VRPMDV_MonitoringSchema()
return schema.dump(matched_obj)
# internal helper function
# ML: transfer to Monitoring class
# def createMonOnDevice(self, monitoring):
# #call the start API of the c++ driver
# try:
# logging.info("MainThread: createMonOnDevice => before vrpmdCreateCmd samplerate:%d, samplerate:%d, samplerate:%d", monitoring.samplerate, monitoring.sampleperiod, monitoring.downtime)
# vrpmdCreateCmd = VRPMDV_CreateMonCmd(monitoring.samplerate, monitoring.sampleperiod, monitoring.downtime)
# logging.info("MainThread: createMonOnDevice => before schemaCreateCmd")
# schemaCreateCmd = VRPMDV_CreateMonSchema()
# logging.info("MainThread: try send start monitoring starting %s", schemaCreateCmd.dumps(vrpmdCreateCmd))
# #res = trySend(schemaCreateCmd.dumps(vrpmdCreateCmd))
# #logging.info("MainThread: try send start monitoring done %s", res)
# self.status = "started"
# # set status if we have a success TODO
# except:
# self.status = "stopped"
# return "stopped"
# return "started"
# def _stopMonitoring(self, monitoring):
# #call the stop API of the c++ driver
# try:
# logging.info("MainThread: stop monitoring")
# vrpmdDeleteCmd = VRPMDV_DeleteMonCmd(2, monitoring.id)
# schemaDeleteCmd = VRPMDV_DeleteMonSchema()
# #trySend(schemaDeleteCmd.dumps(vrpmdDeleteCmd))
# self.status = "stopped"
# logging.info("MainThread: stop monitoring done")
# except:
# self.status = "started"
# return "started"
# return monitoring.status
# old impl ML
#
# def createMonitoring(self, request):
# id = uuid.uuid4()
# createjson = request.get_json()
# vrpmreq = VRPMDV_MonReqSchema().load(createjson)
# vrpmdCreateCmd = VRPMDV_CreateMonCmd(1, id , vrpmreq.samplerate, vrpmreq.sampleperiod, vrpmreq.downtime, vrpmreq.status)
# schemaCreateCmd = VRPMDV_CreateMonSchema()
# valstr = schemaCreateCmd.dumps(vrpmdCreateCmd)
# trySend(schemaCreateCmd.dumps(vrpmdCreateCmd))
# mon = VRPMDV_Monitoring(id, vrpmreq.name, vrpmreq.samplerate, vrpmreq.sampleperiod, vrpmreq.downtime, vrpmreq.status, vrpmreq.owner)
# logging.info("Monitoring %s: starting", str(id))
# mon.startMonitoring()
# self.mons.append(mon)
# #save to file
# self.saveFile()
# #create result Object in json
# schema = VRPMDV_MonitoringSchema()
# return schema.dumps(mon)
# def createMonitoring(self, request):
# id = uuid.uuid4()
# createjson = request.get_json()
# vrpmreq = VRPMDV_MonReqSchema().load(createjson)
# vrpmdCreateCmd = VRPMDV_CreateMonCmd(1, id , vrpmreq.samplerate, vrpmreq.sampleperiod, vrpmreq.downtime, vrpmreq.status)
# schemaCreateCmd = VRPMDV_CreateMonSchema()
# valstr = schemaCreateCmd.dumps(vrpmdCreateCmd)
# trySend(schemaCreateCmd.dumps(vrpmdCreateCmd))
# mon = VRPMDV_Monitoring(id, vrpmreq.name, vrpmreq.samplerate, vrpmreq.sampleperiod, vrpmreq.downtime, vrpmreq.status, vrpmreq.owner)
# logging.info("Monitoring %s: starting", str(id))
# mon.startMonitoring()
# self.mons.append(mon)
# #save to file
# self.saveFile()
# #create result Object in json
# schema = VRPMDV_MonitoringSchema()
# return schema.dumps(mon)
# def deleteMonitoring(self, vrpmid):
# # if not self.loaded :
# # self.loaded = self.loadFile()
# # find monitoring with uuid
# #result = filter(lambda mon: str(mon.uuid) == vrpmid["uuid"], self.mons)
# try:
# matched_obj = next(x for x in self.mons if str(x.id) == vrpmid)
# except:
# return "no Item found"
# # we find it, delete on realtime side and now remove from list
# #matched_obj.deleteMonitoring()
# self.mons.remove(matched_obj)
# #save the list
# self.saveFile()
# #make result
# schema = VRPMDV_MonitoringSchema()
# return schema.dump(matched_obj)
# def startMonitoring(self, vrpmid):
# # if not self.loaded :
# # self.loaded = self.loadFile()
# #call the start API of the c++ driver
# try:
# matched_obj = next(x for x in self.mons if str(x.id) == vrpmid)
# except:
# return "no Item found"
# if matched_obj.startMonitoring() :
# #TODO ML return the state
# return "started"
# return "created"
# def stopMonitoring(self, vrpmid):
# # if not self.loaded :
# # self.loaded = self.loadFile()
# #call the stop API of the c++ driver
# try:
# matched_obj = next(x for x in self.mons if str(x.id) == vrpmid)
# logging.info("MainThread: stop monitoring starting")
# vrpmdDeleteCmd = VRPMDV_DeleteMonCmd(2, matched_obj.id)
# schemaDeleteCmd = VRPMDV_DeleteMonSchema()
# valstr = schemaDeleteCmd.dumps(vrpmdDeleteCmd)
# trySend(schemaDeleteCmd.dumps(vrpmdDeleteCmd))
# logging.info("MainThread: stop monitoring done")
# except:
# return "no Item found"
# matched_obj.stopMonitoring()
# return matched_obj.monstate.name
def setStatus(self, id, vrpmStatus):
if 'status' in vrpmStatus :
# matched_obj = self.findMonitoring(id)
#call the start API of the c++ driver
if (vrpmStatus['status'] == 'started'):
return self.startMonitoring(id)
else :
return self.stopMonitoring(id)
# return matched_obj.status
# return ""
def findMonitoring(self, id):
try:
return next(x for x in self.mons if str(x.id) == id)
except:
return None #"no Item found"
def getMonitoring2files(self):
#search in the given directory
dirs = [d for d in os.listdir(self.monfilespath) if os.path.isdir(d)]
#return for the filter
def getMonitoringfiles(self, id, params):
#search in the given directory
monId = params.get('monId')
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
logging.info("getMonitoringfiles: monId:%s", monId)
if (monId == None):
return None
complete = False
mons = self.getMonofMonfiles(monId)
logging.info("getMonitoringfiles: mons.length:%d", len(mons))
if (len(mons) == 0) :
return None
else :
#TODO ML: only one monitoring
monId = mons[0].id
#TODO ML change to array
#for file in files:
filename = self.monfilespath + str(monId) + '/'
monfiles = self.loadMonfiles(filename, complete)
schema = VRPMDV_MonfilesSchema()
result = schema.dumps(monfiles, many=True)
return result
def loadMonfiles(self, id, complete):
#files = [f for f in os.listdir() if os.path.isfile(f)]
logging.info("loadMonfiles: monId:%s", id)
completeMonPath = os.path.dirname(id)
monfiles = []
for f in os.listdir(completeMonPath) :
# if (os.path.isfile(f)) :
try:
completeFilepath = id + str(f)
with open(completeFilepath, 'r') as f:
logging.info("loadMonfiles: before fmonfile:%s", completeFilepath)
fmonfile = f.read()
logging.info("loadMonfiles: after fmonfile:%s", completeFilepath)
if fmonfile:
# if (complete):
# schema = VRPMDV_MonfilesCompleteSchema()
# else :
logging.info("loadMonfiles: before schemaload")
if (complete):
schema = VRPMDV_MonfilesCompleteSchema()
else:
schema = VRPMDV_MonfilesSchema()
try:
monfile = schema.loads(fmonfile, unknown=EXCLUDE)
except ValidationError as err:
logging.info("SchemaError: %s",err.messages) # => {"email": ['"foo" is not a valid email address.']}
logging.info("Data: %s",err.valid_data) # => {"name": "John"}
monfiles.append(monfile)
except:
#nothing todo ML we should create a file later the database
print("file not found")
logging.info("loadMonfiles: file not found:%s", completeFilepath)
return monfiles
def getMonsDFAvalable(self):
monfilters = []
mons = self.getMonofMonfiles(0)
if (len(mons) == 0):
return None
else:
schema = VRPMDV_MonFilterSchema()
for mon in mons:
monfilter = VRPMDV_MonFilter(str(mon.id), mon.name)
monfilters.append(monfilter)
return schema.dumps(monfilters, many=True)
def getMonofMonfiles(self, monId) :
dirname = os.path.dirname(self.monfilespath)
dirs = []
for d in os.listdir(dirname) :
path_file = self.monfilespath + d #os.sep.join([self.monfilespath, d])
if os.path.isdir(path_file) :
dirs.append(d)
mons = []
for dir in dirs:
mon = self.findMonitoring(dir)
if ((mon != None) and ((monId == 0 ) or (monId == str(mon.id)))):
mons.append(mon)
# monId = mon.id
# else:
# return None
return mons
def getMFDownload(self, params):
#search in the given directory
monId = params.get('monId')
if (monId == None):
return None
fileId = params.get('fileid')
mons = self.getMonofMonfiles(monId)
#TODO ML change to array
#for file in files:
filename = self.monfilespath + str(monId) + '/'
monfiles = self.loadMonfiles(filename, True)
schema = VRPMDV_MonfilesCompleteSchema()
result = schema.dumps(monfiles, many=True)
return result
# This is to get the directory that the program
# is currently running in.
# dir_path = os.path.dirname(os.path.realpath(__file__))
# for root, dirs, files in os.walk(dir_path):
# for file in files:
# # change the extension from '.mp3' to
# # the one of your choice.
# if file.endswith('.mp3'):
# print (root+'/'+str(file))
@@ -0,0 +1,10 @@
import datetime as dt
class VRPMDV_DeleteMonCmd:
def __init__(self, id ) :
self.cmdid = 2
self.id = id
@@ -0,0 +1,23 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, post_dump
from vrpmdvdeletemoncmd import VRPMDV_DeleteMonCmd
class VRPMDV_DeleteMonSchema(Schema):
cmdid = fields.Integer()
id = fields.UUID()
@post_load
def make_vrpmdv_DeleteMonitoring(self, data, **kwargs):
mon = VRPMDV_DeleteMonCmd(**data)
return mon
@@ -0,0 +1,10 @@
import datetime as dt
# generic command for delete, start, stop of the monitoring
class VRPMDV_GenericMonCmd:
def __init__(self, id , cmdId) :
self.id = id
self.cmdId = cmdId
@@ -0,0 +1,34 @@
from extensions.rt_service import rt_service as rts
import logging
import threading
import time
def thread_function(name):
logging.info("Thread %s: starting", name)
rtserv = rts.RT_Service()
isok = rtserv.initLogChannel()
if (not isok):
logging.info("Thread %s: could not open the logport", name)
while (isok):
msg = rtserv.readLogChannel()
logging.info(msg)
if (msg == 'noResult'):
break
logging.info("Thread %s: finishing", name)
def createCoproLoggingTask():
format = "%(asctime)s: %(message)s"
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
x = threading.Thread(target=thread_function, args=(1,))
x.start()
return x
@@ -0,0 +1,9 @@
import datetime as dt
class VRPMDV_MonChannels:
def __init__(self, name , valuetype):
self.name = name
self.valuetype = valuetype
@@ -0,0 +1,18 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, EXCLUDE
from vrpmdvmonchannels import VRPMDV_MonChannels
class VRPMDV_MonChannelSchema(Schema):
name = fields.String()
valuetype = fields.String()
#value = fields.Number()
@post_load
def make_vrpmdv_MonfilesChannelSchema(self, data, **kwargs):
return VRPMDV_MonChannels(**data)
@@ -0,0 +1,35 @@
from extensions.rt_service import rt_service as rts
import logging
import threading
import time
def thread_function(name):
logging.info("MonThread %s: starting", name)
rtserv = rts.RT_Service()
isok = rtserv.openDataChannel('/dev/mon-datafile')
if (not isok):
logging.info("MonThread %s: could not open the logport", name)
while (isok):
msg = rtserv.readDataChannel()
logging.info(msg)
if (msg == 'noResult'):
break
logging.info("MonThread %s: finishing", name)
rtserv.closeDataChannel()
def createCoproLoggingTask():
format = "%(asctime)s: %(message)s"
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
x = threading.Thread(target=thread_function, args=(1,))
x.start()
return x
@@ -0,0 +1,15 @@
import datetime as dt
class VRPMDV_Monfiles:
def __init__(self, id, monid, name , samplerate, sampleperiod, downtime, timestamp, hwdescription) :
self.id = id
self.monid = monid
self.name = name
self.samplerate = samplerate
self.sampleperiod = sampleperiod
self.downtime = downtime
self.timestamp = timestamp
self.hwdescription = hwdescription
@@ -0,0 +1,19 @@
import datetime as dt
from vrpmdvmonfiles import VRPMDV_Monfiles
class VRPMDV_MonfilesComplete(VRPMDV_Monfiles):
def __init__(self, id, monid, name , samplerate, sampleperiod, downtime, timestamp, hwdescription, values) :
self.id = id
self.monid = monid
self.name = name
self.samplerate = samplerate
self.sampleperiod = sampleperiod
self.downtime = downtime
self.timestamp = timestamp
self.hwdescription = hwdescription
self.values = values
@@ -0,0 +1,39 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, EXCLUDE
from utilities.union import UnionField
from vrpmdvmonfilescomplete import VRPMDV_MonfilesComplete
from vrpmdvmonfilesschema import VRPMDV_MonfilesSchema
# books = fields.List(fields.Nested("BookSchema", exclude=("author",)))
class VRPMDV_MonfilesCompleteSchema(Schema):
id = fields.String(required=True)
monid = fields.String(required=True)
name = fields.String(required=True)
samplerate = fields.Integer(required=True)
sampleperiod = fields.Integer(required=True)
downtime = fields.Integer(required=True)
timestamp = fields.Integer(required=True)
hwdescription = fields.List(fields.Nested("VRPMDV_MonSensorSchema"))
values = fields.List(UnionField(
types=[int, float],
metadata={
"description": "Multiple types.",
},
))
@post_load
def make_vrpmdv_MonfilesCompleteSchema(self, data, **kwargs):
return VRPMDV_MonfilesComplete(**data)
# some_field = UnionField(
# types=[str, int, float, dict, list, bool, set, tuple],
# metadata={
# "description": "Multiple types.",
# },
# )
@@ -0,0 +1,24 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, EXCLUDE
from vrpmdvmonfiles import VRPMDV_Monfiles
class VRPMDV_MonfilesSchema(Schema):
id = fields.String(required=True)
monid = fields.String(required=True)
name = fields.String(required=True)
samplerate = fields.Integer(required=True)
sampleperiod = fields.Integer(required=True)
downtime = fields.Integer(required=True)
timestamp = fields.Integer(required=True)
hwdescription = fields.List(fields.Nested("VRPMDV_MonSensorSchema"))
@post_load
def make_vrpmdv_Monfiles(self, data, **kwargs):
return VRPMDV_Monfiles(**data)
@@ -0,0 +1,10 @@
import datetime as dt
class VRPMDV_MonFilter:
def __init__(self, id, name ) :
self.id = id
self.name = name
@@ -0,0 +1,16 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load
from vrpmdvmonfilter import VRPMDV_MonFilter
class VRPMDV_MonFilterSchema(Schema):
id = fields.String()
name = fields.String()
@post_load
def make_vrpmdv_MonFilter(self, data, **kwargs):
return VRPMDV_MonFilter(**data)
@@ -0,0 +1,223 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load
from vrpmdvcreatemoncmd import VRPMDV_CreateMonCmd
from vrpmdvcreatemonschema import VRPMDV_CreateMonSchema
from vrpmdvdeletemoncmd import VRPMDV_DeleteMonCmd
from vrpmdvdeletemonschema import VRPMDV_DeleteMonSchema
from vrpmdvmonreq import VRPMDV_MonReq
from extensions.rt_service import rt_service as rts
from vrpmdvmonitoringState import VRPMDVMonitoringState
from vrpmdvmondata import createCoproLoggingTask
# from vrpmdvntlink import trySend
import logging
import threading
import time
import io
import fcntl
import mmap
from vrpmdvntlink import trySend
from vrpmdvstatusmoncmd import VRPMDV_StatusMonCmd
from vrpmdvstatusmonschema import VRPMDV_StatusMonSchema
# def thread_function(name):
# logging.info("MonThread %s: starting", name)
# fdesc = -1
# rtMon = rts.RTSMonitoringTask()
# fdesc = rtMon.openChannel('/dev/mon-datafile')
# # write loginfos to Buffer
# msg = rtMon.getLogMsg()
# for msgstr in msg:
# logging.info(str(msgstr))
# while ((fdesc >= 0) && ()):
# msg = rtMon.readChannel(fdesc)
# # write loginfos to Buffer
# logmsg = rtMon.getLogMsg()
# for msgstr in logmsg:
# logging.info(str(msgstr))
# logging.info(msg)
# if (msg == 'noResult'):
# break
# logging.info("MonThread %s: finishing", name)
# rtMon.closeChannel(fdesc)
# if (res):
# props = res.getMsg()
# #props = res.getProps()
# if (res.getResCode() == 'error'):
# try:
# logging.info(props)
# # for key, value in props.items():
# # logging.info(key+" "+ str(value))
# except:
# logging.info("MonThread %s: could not open the channel", name)
# else:
# try:
# logging.info(props)
# # for key, value in props.items():
# # logging.info(key+" "+ str(value))
# except:
# logging.info("MonThread %s: could read fdesc of the channel", name)
# else :
# logging.info("MonThread %s: result = None", name)
class VRPMDV_Monitoring(VRPMDV_MonReq):
def __init__(self, no, id, name , samplerate, sampleperiod, downtime, status, owner="None", created_at=dt.datetime.now()) :
self.no = no
self.id = id
self.created_at = created_at
#TODO ML: uncomment
self.rtservice = None #rts.RT_Service()
self.rtMon = None
self.monTask = None
self.run_thread = False
self.fdesc = -1
super().__init__(name, samplerate, sampleperiod, downtime, owner, status)
def startMonitoring(self) :
#send create command to M4
try :
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
logging.info("MainThread: createMonOnDevice => before vrpmdCreateCmd samplerate:%d, samplerate:%d, samplerate:%d", self.samplerate, self.sampleperiod, self.downtime)
vrpmdCreateCmd = VRPMDV_CreateMonCmd(self.samplerate, self.sampleperiod, self.downtime)
logging.info("MainThread: createMonOnDevice => before schemaCreateCmd")
schemaCreateCmd = VRPMDV_CreateMonSchema()
logging.info("MainThread: try send start monitoring starting %s", schemaCreateCmd.dumps(vrpmdCreateCmd))
# TODO ML: uncomment this
res = trySend(schemaCreateCmd.dumps(vrpmdCreateCmd))
#res = 'Test'
logging.info("MainThread: try send start monitoring done %s", res)
# start the receiving thread
logging.info("MainThread %s: open", str(self.id))
# self.fdesc = self.rtMon.openChannel('/dev/mon-datafile')
# self.run_thread = True
# self.monTask = threading.Thread(target=self.run, args=())
# self.monTask.start()
# logging.info("MainThread: strated Mon Thread %s started", self.id)
logging.info("startmonitoring: create RTSMonitoringTask")
strid = str(self.id)
logging.info("rts.RTSMonitoringTask: self.id:%s", strid)
self.rtMon = rts.RTSMonitoringTask(str(self.id), str(self.name), self.samplerate, self.sampleperiod, self.downtime, '/home/root/monfiles/')
# self.rtMon.id = self.id
# self.rtMon.name = self.name
# self.rtMon.samplerate = self.samplerate
# self.rtMon.samplePeriod = self.sampleperiod
# self.rtMon.downtime = self.downtime
# self.rtMon.path = '/home/root/monfiles'
#logging.info("startmonitoring: created RTSMonitoringTask: id:%s name:%s samplerate:%d sampleperiod:%d downtime:%d path:%s", self.rtMon.id, self.rtMon.name, self.rtMon.samplerate, self.rtMon.samplePeriod, self.rtMon.downtime, self.rtMon.path)
##new ML 09.07.2024
if (self.rtMon.start()) :
logging.info("startmonitoring - self.rtMon.start(): Monitoring started")
self.status = 'started'
else :
self.status = 'stopped'
return self.status
except :
self.status = "stopped"
self.rtMon = None
return self.status
def stopMonitoring(self) :
# isstopped = self.rtservice.setMonitoringState(str(self.id), VRPMDVMonitoringState.stopped)
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")#
logging.info("MainThread: stopping Mon Thread %s ", self.id)
#send delete cmd to M4
#logging.info("MainThread: stop monitoring")
# if (self.monTask != None) :
# set the value Runthread to fals that the thread terminate
# self.run_thread = False
# self.monTask.join(None)
##new ML 09.07.2024
if (self.rtMon != None) :
self.rtMon.stop()
# self.monTask = None
# logging.info("MonThread %s: closing fdesc=%s", str(self.id), str(self.fdesc))
# # self.rtMon.closeChannel(self.fdesc)
# logging.info("MonThread %s: closed fdesc=%s", str(self.id), str(self.fdesc))
logging.info("MainThread: stopped Mon Thread %s ", self.id)
vrpmdDeleteCmd = VRPMDV_DeleteMonCmd(self.no)
schemaDeleteCmd = VRPMDV_DeleteMonSchema()
# TODO ML: uncomment this
res = trySend(schemaDeleteCmd.dumps(vrpmdDeleteCmd))
#res = 'Stopped'
logging.info("MainThread: try send stop monitoring done %s", res)
self.rtMon = None
# if (isstopped) :
self.status = 'stopped'
return self.status
# def setStatus(self, status) :
# # isStatusSet = self.rtservice.setMonitoringStatus(str(self.id), status)
# logging.info("MainThread: set status ")
# return True
def run(self):
# logging.info("MonThread %s: starting", str(self.id))
# fdesc = -1
# rtMon = rts.RTSMonitoringTask()
# fdesc = rtMon.openChannel('/dev/mon-datafile')
# write loginfos to Buffer
# msg = rtMon.getLogMsg()
# for msgstr in msg:
# logging.info(str(msgstr))
count = 0;
if (self.fdesc >= 0) :
while (self.run_thread):
# check if the thread is running
# if (count == 50):
# vrpmdStatusCmd = VRPMDV_StatusMonCmd(self.no)
# schemaStatusCmd = VRPMDV_StatusMonSchema()
# res = trySend(schemaStatusCmd.dumps(vrpmdStatusCmd))
# logging.info("MainThread: try send stop monitoring done %s", res)
# count = 0
#count = count +1
msg = self.rtMon.readChannel(self.fdesc)
logging.info("MonThread %s: running", str(self.id))
logging.info("Result: %s", msg)
#time.sleep(1)
# write loginfos to Buffer
# logmsg = rtMon.getLogMsg()
# for msgstr in logmsg:
# logging.info(str(msgstr))
# logging.info(msg)
# if (msg == 'noResult'):
# break
# logging.info("MonThread %s: finishing", str(self.id))
# rtMon.closeChannel(fdesc)
logging.info("MonThread %s: finished", str(self.id))
# msg = rtMon.getLogMsg()
# for msgstr in msg:
# logging.info(str(msgstr))
else:
logging.info("MonThread %s: opening failed fdesc <= 0", str(self.id))
@@ -0,0 +1,30 @@
#from enum import Enum
from marshmallow import Schema, fields, post_load
class VRPMDVMonitoringState():
STARTED = 'started'
STOPPED = 'stopped'
NCREATE = 0
NDELETE = 1
def __init__(self, state = STOPPED):
self.state = state
def get(self) :
if (self.state == self.STARTED) :
return self.NCREATE
else :
return self.NDELETE
# class VRPMDVMonitoringState(Enum):
# off = 1
# created = 2
# started = 3
# stopped = 4
@@ -0,0 +1,29 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, post_dump
from vrpmdvmonitoring import VRPMDV_Monitoring
class VRPMDV_MonitoringSchema(Schema):
no = fields.Integer()
id = fields.UUID()
created_at = fields.DateTime("%m/%d/%Y, %H:%M")
name = fields.String()
samplerate = fields.Integer()
sampleperiod = fields.Integer()
downtime = fields.Integer()
owner = fields.String()
status = fields.String()
@post_load
def make_vrpmdv_Monitoring(self, data, **kwargs):
mon = VRPMDV_Monitoring(**data)
#create the monitoring on the realtime side
# mon.createMonitoring()
return mon
@@ -0,0 +1,14 @@
import datetime as dt
class VRPMDV_MonReq:
def __init__(self, name , samplerate, sampleperiod, downtime, owner, status) :
self.name = name
self.samplerate = samplerate
self.sampleperiod = sampleperiod
self.downtime = downtime
self.owner = owner
self.status = status
@@ -0,0 +1,20 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load
from vrpmdvmonreq import VRPMDV_MonReq
class VRPMDV_MonReqSchema(Schema):
name = fields.String()
samplerate = fields.Integer()
sampleperiod = fields.Integer()
downtime = fields.Integer()
owner = fields.String()
status = fields.String()
@post_load
def make_vrpmdv_MonitoringReq(self, data, **kwargs):
return VRPMDV_MonReq(**data)
@@ -0,0 +1,11 @@
import datetime as dt
class VRPMDV_MonSensor:
def __init__(self, name , channels):
self.name = name
self.channels = channels
@@ -0,0 +1,16 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, EXCLUDE
from vrpmdvmonsensor import VRPMDV_MonSensor
class VRPMDV_MonSensorSchema(Schema):
name = fields.String()
channels = fields.List(fields.Nested("VRPMDV_MonChannelSchema"))
@post_load
def make_vrpmdv_MonfilesSensorSchema(self, data, **kwargs):
return VRPMDV_MonSensor(**data)
@@ -0,0 +1,53 @@
#!/usr/bin/env python3
import traceback
from pyroute2.netlink import NLM_F_REQUEST
from pyroute2.netlink import genlmsg
from pyroute2.netlink.generic import GenericNetlinkSocket
import sys
RLINK_CMD_UNSPEC = 0
RLINK_CMD_REQ = 1
class rcmd(genlmsg):
'''
Message class that will be used to communicate
with the kernel module
'''
nla_map = (
('RLINK_ATTR_UNSPEC', 'none'),
('RLINK_ATTR_DATA', 'asciiz'),
)
class Rlink(GenericNetlinkSocket):
def send_data(self, data):
msg = rcmd()
msg['cmd'] = RLINK_CMD_REQ
msg['version'] = 1
msg['attrs'] = [('RLINK_ATTR_DATA', data)]
ret = self.nlm_request(msg, self.prid, msg_flags=NLM_F_REQUEST)[0]
return ret.get_attr('RLINK_ATTR_DATA')
def trySend(data):
# if __name__ == '__main__':
try:
# create protocol instance
rlink = Rlink()
rlink.bind('gnl-vrpmdv-mcmd', rcmd)
#rlink.send_data(data)
# request a method
res = rlink.send_data(data)
if res :
print(res, file=sys.stdout)
sys.stdout.flush()
except:
# if there was an error, log it to the console
traceback.print_exc()
finally:
# finally -- release the instance
rlink.close()
return res
@@ -0,0 +1,176 @@
# from vrpmdv-server/vrpmdv-main import application
import logging
import os
import sys
import json
from flask import Flask, request , send_from_directory , Response
from flask_cors import CORS
from vrpmdvdata import VRPMDV_Data
from vrpmdvmonreqschema import VRPMDV_MonReqSchema
# import ecal.core.core as ecal_core
# from proto_messages.RTService_pb2 import _RTSERVICE as rtservice
app = Flask(__name__, static_url_path='', static_folder='./build')
#app = Flask(__name__, static_url_path='/public', static_folder='../build')
#app = Flask(__name__)
CORS(app) #comment this on deployment
vrpmdvdata = VRPMDV_Data()
@app.route("/", defaults={'path':''})
#@app.route("/")
@app.route('/<path:path>')
def serve(path):
logging.basicConfig(format=format, level=logging.INFO, datefmt="%H:%M:%S")
logging.info("vrpmdvserver: path:%s", path)
# path_dir = os.path.abspath("../build") #path react build
# if path != "" and os.path.exists(os.path.join(path_dir, path)):
# return send_from_directory(os.path.join(path_dir), path)
# else:
# return send_from_directory(os.path.join(path_dir),'index.html')
return send_from_directory(app.static_folder,'index.html')
@app.errorhandler(404)
def not_found(e):
return app.send_static_file('index.html')
@app.route('/vrpmdvapi/1_0/monitorings', methods=['GET'])
def get_monitorings():
data = vrpmdvdata.getMonitorings()
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitorings/<id>', methods=['GET'])
def get_monitoring(id):
data = vrpmdvdata.getMonitoring(id)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitorings/<id>', methods=['PATCH'])
def set_monitoring(id):
# vrpmreq = VRPMDV_MonReqSchema().load(request.get_json())
vrpmreq = request.get_json()
data = vrpmdvdata.setMonitoring(id, vrpmreq)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitorings', methods=['POST'])
def create_monitoring():
#vrpmreq = VRPMDV_MonReqSchema().load(request.get_json())
#data = vrpmdvdata.createMonitoring(vrpmreq)
data = vrpmdvdata.createMonitoring(request)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitorings/<id>', methods=['DELETE'])
def delete_monitoring(id):
data = vrpmdvdata.deleteMonitoring(id)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitorings/start', methods=['PATCH'])
def start_monitoring():
vrpmid = request.get_json()
data = vrpmdvdata.startMonitoring(vrpmid)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitorings/stop/', methods=['PATCH'])
def stop_monitoring():
vrpmid = request.get_json()
data = vrpmdvdata.stopMonitoring(vrpmid)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitoringstatus/<id>', methods=['PATCH'])
def setStatus(id):
vrpmStatus = request.get_json()
data = vrpmdvdata.setStatus(id, vrpmStatus)
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitoring/mondfaivalable', methods=['GET'])
def get_mondfaivalable():
data = vrpmdvdata.getMonsDFAvalable()
if (data == None):
resp = Response("no Item found", status=404, mimetype='application/json')
else:
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitoringfiles', methods=['GET'])
def get_monitoringfiles():
vrpmreqjson = request.args
#vrpmreq = VRPMDV_MonReqSchema().load(request.get_json())
#data = vrpmdvdata.createMonitoring(vrpmreq)
data = vrpmdvdata.getMonitoringfiles(0, request.args)
if (data == None):
resp = Response("no Item found", status=404, mimetype='application/json')
else:
resp = Response(data, status=200, mimetype='application/json')
return resp
@app.route('/vrpmdvapi/1_0/monitoringfiles/download', methods=['GET'])
def get_mfDownload():
vrpmreqjson = request.args
data = vrpmdvdata.getMFDownload(request.args)
if (data == None):
resp = Response("no Item found", status=404, mimetype='application/json')
else:
resp = Response(data, status=200, mimetype='application/json')
return resp
if __name__ == "__main__":
# initialize eCAL API. The name of our Process will be
# "Python Protobuf Subscriber"
#ecal_core.initialize(sys.argv, "Python Protobuf Subscriber")
app.run()
# if __name__ == "__main__":
# # Create a Protobuf Publisher that publishes on the topic
# # "hello_world_python_protobuf_topic". The second parameter tells eCAL which
# # datatype we are expecting to receive on that topic.
# sub = ProtoSubscriber("hello_world_python_protobuf_topic"
# , hello_world_pb2.HelloWorld)
# # Set the Callback
# sub.set_callback(callback)
# # Just don't exit
# while ecal_core.ok():
# time.sleep(0.5)
# # finalize eCAL API
# ecal_core.finalize()
@@ -0,0 +1,10 @@
import datetime as dt
class VRPMDV_StatusMonCmd:
def __init__(self, id ) :
self.cmdid = 3
self.id = id
@@ -0,0 +1,23 @@
import uuid
import datetime as dt
from marshmallow import Schema, fields, post_load, post_dump
from vrpmdvstatusmoncmd import VRPMDV_StatusMonCmd
class VRPMDV_StatusMonSchema(Schema):
cmdid = fields.Integer()
id = fields.UUID()
@post_load
def make_vrpmdv_StatusMonitoring(self, data, **kwargs):
mon = VRPMDV_StatusMonCmd(**data)
return mon