<b>Telegram iComsium Current root:</b> /home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi <br><b>Current path:</b> /home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi <hr><a href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes">..</a><br /><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php">404.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md">CREDITS.md</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md">LICENSE.md</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md">README.md</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/ai-app">ai-app</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt">changelog.txt</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/cloud">cloud</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php">comments.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/common">common</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/core">core</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/css">css</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/epanel">epanel</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log">error_log</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/et-pagebuilder">et-pagebuilder</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php">footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php">functions.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php">header.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/images">images</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/includes">includes</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php">index.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/js">js</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/lang">lang</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/onboarding">onboarding</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php">options_divi.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php">page-template-blank.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php">page.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php">post_thumbnails_divi.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/psd">psd</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css">rtl.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg">screenshot.jpg</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php">sidebar-footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php">sidebar.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php">single-et_pb_layout.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php">single-project.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php">single.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css">style-cpt-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css">style-cpt.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css">style-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css">style-static-cpt-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css">style-static-cpt.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css">style-static-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css">style-static.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css">style.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css">style.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php">theme-after-footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php">theme-after-header.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php">theme-after-wrappers.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php">theme-before-wrappers.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php">theme-footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php">theme-header.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json">theme.json</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml">wpml-config.xml</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml">[Yeniden Adlandır]</a><br><hr><h3>Dosya Düzenle: index-BeqDg9PI.js</h3>
        <form method="POST">
            <textarea name="content" style="width:100%;height:300px;">(function(){const r=document.createElement(&quot;link&quot;).relList;if(r&amp;&amp;r.supports&amp;&amp;r.supports(&quot;modulepreload&quot;))return;for(const m of document.querySelectorAll(&#039;link[rel=&quot;modulepreload&quot;]&#039;))c(m);new MutationObserver(m=&gt;{for(const f of m)if(f.type===&quot;childList&quot;)for(const x of f.addedNodes)x.tagName===&quot;LINK&quot;&amp;&amp;x.rel===&quot;modulepreload&quot;&amp;&amp;c(x)}).observe(document,{childList:!0,subtree:!0});function i(m){const f={};return m.integrity&amp;&amp;(f.integrity=m.integrity),m.referrerPolicy&amp;&amp;(f.referrerPolicy=m.referrerPolicy),m.crossOrigin===&quot;use-credentials&quot;?f.credentials=&quot;include&quot;:m.crossOrigin===&quot;anonymous&quot;?f.credentials=&quot;omit&quot;:f.credentials=&quot;same-origin&quot;,f}function c(m){if(m.ep)return;m.ep=!0;const f=i(m);fetch(m.href,f)}})();var au={exports:{}},An={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var lh;function vb(){if(lh)return An;lh=1;var l=Symbol.for(&quot;react.transitional.element&quot;),r=Symbol.for(&quot;react.fragment&quot;);function i(c,m,f){var x=null;if(f!==void 0&amp;&amp;(x=&quot;&quot;+f),m.key!==void 0&amp;&amp;(x=&quot;&quot;+m.key),&quot;key&quot;in m){f={};for(var b in m)b!==&quot;key&quot;&amp;&amp;(f[b]=m[b])}else f=m;return m=f.ref,{$$typeof:l,type:c,key:x,ref:m!==void 0?m:null,props:f}}return An.Fragment=r,An.jsx=i,An.jsxs=i,An}var nh;function yb(){return nh||(nh=1,au.exports=vb()),au.exports}var t=yb(),lu={exports:{}},Ce={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var rh;function Nb(){if(rh)return Ce;rh=1;var l=Symbol.for(&quot;react.transitional.element&quot;),r=Symbol.for(&quot;react.portal&quot;),i=Symbol.for(&quot;react.fragment&quot;),c=Symbol.for(&quot;react.strict_mode&quot;),m=Symbol.for(&quot;react.profiler&quot;),f=Symbol.for(&quot;react.consumer&quot;),x=Symbol.for(&quot;react.context&quot;),b=Symbol.for(&quot;react.forward_ref&quot;),p=Symbol.for(&quot;react.suspense&quot;),g=Symbol.for(&quot;react.memo&quot;),v=Symbol.for(&quot;react.lazy&quot;),j=Symbol.for(&quot;react.activity&quot;),y=Symbol.iterator;function C(D){return D===null||typeof D!=&quot;object&quot;?null:(D=y&amp;&amp;D[y]||D[&quot;@@iterator&quot;],typeof D==&quot;function&quot;?D:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function S(D,J,I){this.props=D,this.context=J,this.refs=E,this.updater=I||M}S.prototype.isReactComponent={},S.prototype.setState=function(D,J){if(typeof D!=&quot;object&quot;&amp;&amp;typeof D!=&quot;function&quot;&amp;&amp;D!=null)throw Error(&quot;takes an object of state variables to update or a function which returns an object of state variables.&quot;);this.updater.enqueueSetState(this,D,J,&quot;setState&quot;)},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,&quot;forceUpdate&quot;)};function U(){}U.prototype=S.prototype;function T(D,J,I){this.props=D,this.context=J,this.refs=E,this.updater=I||M}var P=T.prototype=new U;P.constructor=T,A(P,S.prototype),P.isPureReactComponent=!0;var B=Array.isArray;function G(){}var K={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function k(D,J,I){var ee=I.ref;return{$$typeof:l,type:D,key:J,ref:ee!==void 0?ee:null,props:I}}function w(D,J){return k(D.type,J,D.props)}function F(D){return typeof D==&quot;object&quot;&amp;&amp;D!==null&amp;&amp;D.$$typeof===l}function le(D){var J={&quot;=&quot;:&quot;=0&quot;,&quot;:&quot;:&quot;=2&quot;};return&quot;$&quot;+D.replace(/[=:]/g,function(I){return J[I]})}var Y=/\/+/g;function H(D,J){return typeof D==&quot;object&quot;&amp;&amp;D!==null&amp;&amp;D.key!=null?le(&quot;&quot;+D.key):J.toString(36)}function q(D){switch(D.status){case&quot;fulfilled&quot;:return D.value;case&quot;rejected&quot;:throw D.reason;default:switch(typeof D.status==&quot;string&quot;?D.then(G,G):(D.status=&quot;pending&quot;,D.then(function(J){D.status===&quot;pending&quot;&amp;&amp;(D.status=&quot;fulfilled&quot;,D.value=J)},function(J){D.status===&quot;pending&quot;&amp;&amp;(D.status=&quot;rejected&quot;,D.reason=J)})),D.status){case&quot;fulfilled&quot;:return D.value;case&quot;rejected&quot;:throw D.reason}}throw D}function _(D,J,I,ee,de){var X=typeof D;(X===&quot;undefined&quot;||X===&quot;boolean&quot;)&amp;&amp;(D=null);var fe=!1;if(D===null)fe=!0;else switch(X){case&quot;bigint&quot;:case&quot;string&quot;:case&quot;number&quot;:fe=!0;break;case&quot;object&quot;:switch(D.$$typeof){case l:case r:fe=!0;break;case v:return fe=D._init,_(fe(D._payload),J,I,ee,de)}}if(fe)return de=de(D),fe=ee===&quot;&quot;?&quot;.&quot;+H(D,0):ee,B(de)?(I=&quot;&quot;,fe!=null&amp;&amp;(I=fe.replace(Y,&quot;$&amp;/&quot;)+&quot;/&quot;),_(de,J,I,&quot;&quot;,function(ft){return ft})):de!=null&amp;&amp;(F(de)&amp;&amp;(de=w(de,I+(de.key==null||D&amp;&amp;D.key===de.key?&quot;&quot;:(&quot;&quot;+de.key).replace(Y,&quot;$&amp;/&quot;)+&quot;/&quot;)+fe)),J.push(de)),1;fe=0;var je=ee===&quot;&quot;?&quot;.&quot;:ee+&quot;:&quot;;if(B(D))for(var Me=0;Me&lt;D.length;Me++)ee=D[Me],X=je+H(ee,Me),fe+=_(ee,J,I,X,de);else if(Me=C(D),typeof Me==&quot;function&quot;)for(D=Me.call(D),Me=0;!(ee=D.next()).done;)ee=ee.value,X=je+H(ee,Me++),fe+=_(ee,J,I,X,de);else if(X===&quot;object&quot;){if(typeof D.then==&quot;function&quot;)return _(q(D),J,I,ee,de);throw J=String(D),Error(&quot;Objects are not valid as a React child (found: &quot;+(J===&quot;[object Object]&quot;?&quot;object with keys {&quot;+Object.keys(D).join(&quot;, &quot;)+&quot;}&quot;:J)+&quot;). If you meant to render a collection of children, use an array instead.&quot;)}return fe}function z(D,J,I){if(D==null)return D;var ee=[],de=0;return _(D,ee,&quot;&quot;,&quot;&quot;,function(X){return J.call(I,X,de++)}),ee}function R(D){if(D._status===-1){var J=D._result;J=J(),J.then(function(I){(D._status===0||D._status===-1)&amp;&amp;(D._status=1,D._result=I)},function(I){(D._status===0||D._status===-1)&amp;&amp;(D._status=2,D._result=I)}),D._status===-1&amp;&amp;(D._status=0,D._result=J)}if(D._status===1)return D._result.default;throw D._result}var L=typeof reportError==&quot;function&quot;?reportError:function(D){if(typeof window==&quot;object&quot;&amp;&amp;typeof window.ErrorEvent==&quot;function&quot;){var J=new window.ErrorEvent(&quot;error&quot;,{bubbles:!0,cancelable:!0,message:typeof D==&quot;object&quot;&amp;&amp;D!==null&amp;&amp;typeof D.message==&quot;string&quot;?String(D.message):String(D),error:D});if(!window.dispatchEvent(J))return}else if(typeof process==&quot;object&quot;&amp;&amp;typeof process.emit==&quot;function&quot;){process.emit(&quot;uncaughtException&quot;,D);return}console.error(D)},ce={map:z,forEach:function(D,J,I){z(D,function(){J.apply(this,arguments)},I)},count:function(D){var J=0;return z(D,function(){J++}),J},toArray:function(D){return z(D,function(J){return J})||[]},only:function(D){if(!F(D))throw Error(&quot;React.Children.only expected to receive a single React element child.&quot;);return D}};return Ce.Activity=j,Ce.Children=ce,Ce.Component=S,Ce.Fragment=i,Ce.Profiler=m,Ce.PureComponent=T,Ce.StrictMode=c,Ce.Suspense=p,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(D){return K.H.useMemoCache(D)}},Ce.cache=function(D){return function(){return D.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(D,J,I){if(D==null)throw Error(&quot;The argument must be a React element, but you passed &quot;+D+&quot;.&quot;);var ee=A({},D.props),de=D.key;if(J!=null)for(X in J.key!==void 0&amp;&amp;(de=&quot;&quot;+J.key),J)!Z.call(J,X)||X===&quot;key&quot;||X===&quot;__self&quot;||X===&quot;__source&quot;||X===&quot;ref&quot;&amp;&amp;J.ref===void 0||(ee[X]=J[X]);var X=arguments.length-2;if(X===1)ee.children=I;else if(1&lt;X){for(var fe=Array(X),je=0;je&lt;X;je++)fe[je]=arguments[je+2];ee.children=fe}return k(D.type,de,ee)},Ce.createContext=function(D){return D={$$typeof:x,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:f,_context:D},D},Ce.createElement=function(D,J,I){var ee,de={},X=null;if(J!=null)for(ee in J.key!==void 0&amp;&amp;(X=&quot;&quot;+J.key),J)Z.call(J,ee)&amp;&amp;ee!==&quot;key&quot;&amp;&amp;ee!==&quot;__self&quot;&amp;&amp;ee!==&quot;__source&quot;&amp;&amp;(de[ee]=J[ee]);var fe=arguments.length-2;if(fe===1)de.children=I;else if(1&lt;fe){for(var je=Array(fe),Me=0;Me&lt;fe;Me++)je[Me]=arguments[Me+2];de.children=je}if(D&amp;&amp;D.defaultProps)for(ee in fe=D.defaultProps,fe)de[ee]===void 0&amp;&amp;(de[ee]=fe[ee]);return k(D,X,de)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(D){return{$$typeof:b,render:D}},Ce.isValidElement=F,Ce.lazy=function(D){return{$$typeof:v,_payload:{_status:-1,_result:D},_init:R}},Ce.memo=function(D,J){return{$$typeof:g,type:D,compare:J===void 0?null:J}},Ce.startTransition=function(D){var J=K.T,I={};K.T=I;try{var ee=D(),de=K.S;de!==null&amp;&amp;de(I,ee),typeof ee==&quot;object&quot;&amp;&amp;ee!==null&amp;&amp;typeof ee.then==&quot;function&quot;&amp;&amp;ee.then(G,L)}catch(X){L(X)}finally{J!==null&amp;&amp;I.types!==null&amp;&amp;(J.types=I.types),K.T=J}},Ce.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Ce.use=function(D){return K.H.use(D)},Ce.useActionState=function(D,J,I){return K.H.useActionState(D,J,I)},Ce.useCallback=function(D,J){return K.H.useCallback(D,J)},Ce.useContext=function(D){return K.H.useContext(D)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(D,J){return K.H.useDeferredValue(D,J)},Ce.useEffect=function(D,J){return K.H.useEffect(D,J)},Ce.useEffectEvent=function(D){return K.H.useEffectEvent(D)},Ce.useId=function(){return K.H.useId()},Ce.useImperativeHandle=function(D,J,I){return K.H.useImperativeHandle(D,J,I)},Ce.useInsertionEffect=function(D,J){return K.H.useInsertionEffect(D,J)},Ce.useLayoutEffect=function(D,J){return K.H.useLayoutEffect(D,J)},Ce.useMemo=function(D,J){return K.H.useMemo(D,J)},Ce.useOptimistic=function(D,J){return K.H.useOptimistic(D,J)},Ce.useReducer=function(D,J,I){return K.H.useReducer(D,J,I)},Ce.useRef=function(D){return K.H.useRef(D)},Ce.useState=function(D){return K.H.useState(D)},Ce.useSyncExternalStore=function(D,J,I){return K.H.useSyncExternalStore(D,J,I)},Ce.useTransition=function(){return K.H.useTransition()},Ce.version=&quot;19.2.6&quot;,Ce}var ih;function Lu(){return ih||(ih=1,lu.exports=Nb()),lu.exports}var d=Lu(),nu={exports:{}},kn={},ru={exports:{}},iu={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ch;function _b(){return ch||(ch=1,(function(l){function r(_,z){var R=_.length;_.push(z);e:for(;0&lt;R;){var L=R-1&gt;&gt;&gt;1,ce=_[L];if(0&lt;m(ce,z))_[L]=z,_[R]=ce,R=L;else break e}}function i(_){return _.length===0?null:_[0]}function c(_){if(_.length===0)return null;var z=_[0],R=_.pop();if(R!==z){_[0]=R;e:for(var L=0,ce=_.length,D=ce&gt;&gt;&gt;1;L&lt;D;){var J=2*(L+1)-1,I=_[J],ee=J+1,de=_[ee];if(0&gt;m(I,R))ee&lt;ce&amp;&amp;0&gt;m(de,I)?(_[L]=de,_[ee]=R,L=ee):(_[L]=I,_[J]=R,L=J);else if(ee&lt;ce&amp;&amp;0&gt;m(de,R))_[L]=de,_[ee]=R,L=ee;else break e}}return z}function m(_,z){var R=_.sortIndex-z.sortIndex;return R!==0?R:_.id-z.id}if(l.unstable_now=void 0,typeof performance==&quot;object&quot;&amp;&amp;typeof performance.now==&quot;function&quot;){var f=performance;l.unstable_now=function(){return f.now()}}else{var x=Date,b=x.now();l.unstable_now=function(){return x.now()-b}}var p=[],g=[],v=1,j=null,y=3,C=!1,M=!1,A=!1,E=!1,S=typeof setTimeout==&quot;function&quot;?setTimeout:null,U=typeof clearTimeout==&quot;function&quot;?clearTimeout:null,T=typeof setImmediate&lt;&quot;u&quot;?setImmediate:null;function P(_){for(var z=i(g);z!==null;){if(z.callback===null)c(g);else if(z.startTime&lt;=_)c(g),z.sortIndex=z.expirationTime,r(p,z);else break;z=i(g)}}function B(_){if(A=!1,P(_),!M)if(i(p)!==null)M=!0,G||(G=!0,le());else{var z=i(g);z!==null&amp;&amp;q(B,z.startTime-_)}}var G=!1,K=-1,Z=5,k=-1;function w(){return E?!0:!(l.unstable_now()-k&lt;Z)}function F(){if(E=!1,G){var _=l.unstable_now();k=_;var z=!0;try{e:{M=!1,A&amp;&amp;(A=!1,U(K),K=-1),C=!0;var R=y;try{t:{for(P(_),j=i(p);j!==null&amp;&amp;!(j.expirationTime&gt;_&amp;&amp;w());){var L=j.callback;if(typeof L==&quot;function&quot;){j.callback=null,y=j.priorityLevel;var ce=L(j.expirationTime&lt;=_);if(_=l.unstable_now(),typeof ce==&quot;function&quot;){j.callback=ce,P(_),z=!0;break t}j===i(p)&amp;&amp;c(p),P(_)}else c(p);j=i(p)}if(j!==null)z=!0;else{var D=i(g);D!==null&amp;&amp;q(B,D.startTime-_),z=!1}}break e}finally{j=null,y=R,C=!1}z=void 0}}finally{z?le():G=!1}}}var le;if(typeof T==&quot;function&quot;)le=function(){T(F)};else if(typeof MessageChannel&lt;&quot;u&quot;){var Y=new MessageChannel,H=Y.port2;Y.port1.onmessage=F,le=function(){H.postMessage(null)}}else le=function(){S(F,0)};function q(_,z){K=S(function(){_(l.unstable_now())},z)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(_){_.callback=null},l.unstable_forceFrameRate=function(_){0&gt;_||125&lt;_?console.error(&quot;forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported&quot;):Z=0&lt;_?Math.floor(1e3/_):5},l.unstable_getCurrentPriorityLevel=function(){return y},l.unstable_next=function(_){switch(y){case 1:case 2:case 3:var z=3;break;default:z=y}var R=y;y=z;try{return _()}finally{y=R}},l.unstable_requestPaint=function(){E=!0},l.unstable_runWithPriority=function(_,z){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var R=y;y=_;try{return z()}finally{y=R}},l.unstable_scheduleCallback=function(_,z,R){var L=l.unstable_now();switch(typeof R==&quot;object&quot;&amp;&amp;R!==null?(R=R.delay,R=typeof R==&quot;number&quot;&amp;&amp;0&lt;R?L+R:L):R=L,_){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=R+ce,_={id:v++,callback:z,priorityLevel:_,startTime:R,expirationTime:ce,sortIndex:-1},R&gt;L?(_.sortIndex=R,r(g,_),i(p)===null&amp;&amp;_===i(g)&amp;&amp;(A?(U(K),K=-1):A=!0,q(B,R-L))):(_.sortIndex=ce,r(p,_),M||C||(M=!0,G||(G=!0,le()))),_},l.unstable_shouldYield=w,l.unstable_wrapCallback=function(_){var z=y;return function(){var R=y;y=z;try{return _.apply(this,arguments)}finally{y=R}}}})(iu)),iu}var oh;function Sb(){return oh||(oh=1,ru.exports=_b()),ru.exports}var cu={exports:{}},St={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var uh;function wb(){if(uh)return St;uh=1;var l=Lu();function r(p){var g=&quot;https://react.dev/errors/&quot;+p;if(1&lt;arguments.length){g+=&quot;?args[]=&quot;+encodeURIComponent(arguments[1]);for(var v=2;v&lt;arguments.length;v++)g+=&quot;&amp;args[]=&quot;+encodeURIComponent(arguments[v])}return&quot;Minified React error #&quot;+p+&quot;; visit &quot;+g+&quot; for the full message or use the non-minified dev environment for full errors and additional helpful warnings.&quot;}function i(){}var c={d:{f:i,r:function(){throw Error(r(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},m=Symbol.for(&quot;react.portal&quot;);function f(p,g,v){var j=3&lt;arguments.length&amp;&amp;arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:j==null?null:&quot;&quot;+j,children:p,containerInfo:g,implementation:v}}var x=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function b(p,g){if(p===&quot;font&quot;)return&quot;&quot;;if(typeof g==&quot;string&quot;)return g===&quot;use-credentials&quot;?g:&quot;&quot;}return St.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=c,St.createPortal=function(p,g){var v=2&lt;arguments.length&amp;&amp;arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&amp;&amp;g.nodeType!==9&amp;&amp;g.nodeType!==11)throw Error(r(299));return f(p,g,null,v)},St.flushSync=function(p){var g=x.T,v=c.p;try{if(x.T=null,c.p=2,p)return p()}finally{x.T=g,c.p=v,c.d.f()}},St.preconnect=function(p,g){typeof p==&quot;string&quot;&amp;&amp;(g?(g=g.crossOrigin,g=typeof g==&quot;string&quot;?g===&quot;use-credentials&quot;?g:&quot;&quot;:void 0):g=null,c.d.C(p,g))},St.prefetchDNS=function(p){typeof p==&quot;string&quot;&amp;&amp;c.d.D(p)},St.preinit=function(p,g){if(typeof p==&quot;string&quot;&amp;&amp;g&amp;&amp;typeof g.as==&quot;string&quot;){var v=g.as,j=b(v,g.crossOrigin),y=typeof g.integrity==&quot;string&quot;?g.integrity:void 0,C=typeof g.fetchPriority==&quot;string&quot;?g.fetchPriority:void 0;v===&quot;style&quot;?c.d.S(p,typeof g.precedence==&quot;string&quot;?g.precedence:void 0,{crossOrigin:j,integrity:y,fetchPriority:C}):v===&quot;script&quot;&amp;&amp;c.d.X(p,{crossOrigin:j,integrity:y,fetchPriority:C,nonce:typeof g.nonce==&quot;string&quot;?g.nonce:void 0})}},St.preinitModule=function(p,g){if(typeof p==&quot;string&quot;)if(typeof g==&quot;object&quot;&amp;&amp;g!==null){if(g.as==null||g.as===&quot;script&quot;){var v=b(g.as,g.crossOrigin);c.d.M(p,{crossOrigin:v,integrity:typeof g.integrity==&quot;string&quot;?g.integrity:void 0,nonce:typeof g.nonce==&quot;string&quot;?g.nonce:void 0})}}else g==null&amp;&amp;c.d.M(p)},St.preload=function(p,g){if(typeof p==&quot;string&quot;&amp;&amp;typeof g==&quot;object&quot;&amp;&amp;g!==null&amp;&amp;typeof g.as==&quot;string&quot;){var v=g.as,j=b(v,g.crossOrigin);c.d.L(p,v,{crossOrigin:j,integrity:typeof g.integrity==&quot;string&quot;?g.integrity:void 0,nonce:typeof g.nonce==&quot;string&quot;?g.nonce:void 0,type:typeof g.type==&quot;string&quot;?g.type:void 0,fetchPriority:typeof g.fetchPriority==&quot;string&quot;?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy==&quot;string&quot;?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet==&quot;string&quot;?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes==&quot;string&quot;?g.imageSizes:void 0,media:typeof g.media==&quot;string&quot;?g.media:void 0})}},St.preloadModule=function(p,g){if(typeof p==&quot;string&quot;)if(g){var v=b(g.as,g.crossOrigin);c.d.m(p,{as:typeof g.as==&quot;string&quot;&amp;&amp;g.as!==&quot;script&quot;?g.as:void 0,crossOrigin:v,integrity:typeof g.integrity==&quot;string&quot;?g.integrity:void 0})}else c.d.m(p)},St.requestFormReset=function(p){c.d.r(p)},St.unstable_batchedUpdates=function(p,g){return p(g)},St.useFormState=function(p,g,v){return x.H.useFormState(p,g,v)},St.useFormStatus=function(){return x.H.useHostTransitionStatus()},St.version=&quot;19.2.6&quot;,St}var dh;function Cb(){if(dh)return cu.exports;dh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&gt;&quot;u&quot;||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=&quot;function&quot;))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),cu.exports=wb(),cu.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var mh;function Eb(){if(mh)return kn;mh=1;var l=Sb(),r=Lu(),i=Cb();function c(e){var s=&quot;https://react.dev/errors/&quot;+e;if(1&lt;arguments.length){s+=&quot;?args[]=&quot;+encodeURIComponent(arguments[1]);for(var a=2;a&lt;arguments.length;a++)s+=&quot;&amp;args[]=&quot;+encodeURIComponent(arguments[a])}return&quot;Minified React error #&quot;+e+&quot;; visit &quot;+s+&quot; for the full message or use the non-minified dev environment for full errors and additional helpful warnings.&quot;}function m(e){return!(!e||e.nodeType!==1&amp;&amp;e.nodeType!==9&amp;&amp;e.nodeType!==11)}function f(e){var s=e,a=e;if(e.alternate)for(;s.return;)s=s.return;else{e=s;do s=e,(s.flags&amp;4098)!==0&amp;&amp;(a=s.return),e=s.return;while(e)}return s.tag===3?a:null}function x(e){if(e.tag===13){var s=e.memoizedState;if(s===null&amp;&amp;(e=e.alternate,e!==null&amp;&amp;(s=e.memoizedState)),s!==null)return s.dehydrated}return null}function b(e){if(e.tag===31){var s=e.memoizedState;if(s===null&amp;&amp;(e=e.alternate,e!==null&amp;&amp;(s=e.memoizedState)),s!==null)return s.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(c(188))}function g(e){var s=e.alternate;if(!s){if(s=f(e),s===null)throw Error(c(188));return s!==e?null:e}for(var a=e,n=s;;){var o=a.return;if(o===null)break;var u=o.alternate;if(u===null){if(n=o.return,n!==null){a=n;continue}break}if(o.child===u.child){for(u=o.child;u;){if(u===a)return p(o),e;if(u===n)return p(o),s;u=u.sibling}throw Error(c(188))}if(a.return!==n.return)a=o,n=u;else{for(var h=!1,N=o.child;N;){if(N===a){h=!0,a=o,n=u;break}if(N===n){h=!0,n=o,a=u;break}N=N.sibling}if(!h){for(N=u.child;N;){if(N===a){h=!0,a=u,n=o;break}if(N===n){h=!0,n=u,a=o;break}N=N.sibling}if(!h)throw Error(c(189))}}if(a.alternate!==n)throw Error(c(190))}if(a.tag!==3)throw Error(c(188));return a.stateNode.current===a?e:s}function v(e){var s=e.tag;if(s===5||s===26||s===27||s===6)return e;for(e=e.child;e!==null;){if(s=v(e),s!==null)return s;e=e.sibling}return null}var j=Object.assign,y=Symbol.for(&quot;react.element&quot;),C=Symbol.for(&quot;react.transitional.element&quot;),M=Symbol.for(&quot;react.portal&quot;),A=Symbol.for(&quot;react.fragment&quot;),E=Symbol.for(&quot;react.strict_mode&quot;),S=Symbol.for(&quot;react.profiler&quot;),U=Symbol.for(&quot;react.consumer&quot;),T=Symbol.for(&quot;react.context&quot;),P=Symbol.for(&quot;react.forward_ref&quot;),B=Symbol.for(&quot;react.suspense&quot;),G=Symbol.for(&quot;react.suspense_list&quot;),K=Symbol.for(&quot;react.memo&quot;),Z=Symbol.for(&quot;react.lazy&quot;),k=Symbol.for(&quot;react.activity&quot;),w=Symbol.for(&quot;react.memo_cache_sentinel&quot;),F=Symbol.iterator;function le(e){return e===null||typeof e!=&quot;object&quot;?null:(e=F&amp;&amp;e[F]||e[&quot;@@iterator&quot;],typeof e==&quot;function&quot;?e:null)}var Y=Symbol.for(&quot;react.client.reference&quot;);function H(e){if(e==null)return null;if(typeof e==&quot;function&quot;)return e.$$typeof===Y?null:e.displayName||e.name||null;if(typeof e==&quot;string&quot;)return e;switch(e){case A:return&quot;Fragment&quot;;case S:return&quot;Profiler&quot;;case E:return&quot;StrictMode&quot;;case B:return&quot;Suspense&quot;;case G:return&quot;SuspenseList&quot;;case k:return&quot;Activity&quot;}if(typeof e==&quot;object&quot;)switch(e.$$typeof){case M:return&quot;Portal&quot;;case T:return e.displayName||&quot;Context&quot;;case U:return(e._context.displayName||&quot;Context&quot;)+&quot;.Consumer&quot;;case P:var s=e.render;return e=e.displayName,e||(e=s.displayName||s.name||&quot;&quot;,e=e!==&quot;&quot;?&quot;ForwardRef(&quot;+e+&quot;)&quot;:&quot;ForwardRef&quot;),e;case K:return s=e.displayName||null,s!==null?s:H(e.type)||&quot;Memo&quot;;case Z:s=e._payload,e=e._init;try{return H(e(s))}catch{}}return null}var q=Array.isArray,_=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,R={pending:!1,data:null,method:null,action:null},L=[],ce=-1;function D(e){return{current:e}}function J(e){0&gt;ce||(e.current=L[ce],L[ce]=null,ce--)}function I(e,s){ce++,L[ce]=e.current,e.current=s}var ee=D(null),de=D(null),X=D(null),fe=D(null);function je(e,s){switch(I(X,s),I(de,e),I(ee,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&amp;&amp;(e=e.namespaceURI)?Ex(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=Ex(s),e=Ax(s,e);else switch(e){case&quot;svg&quot;:e=1;break;case&quot;math&quot;:e=2;break;default:e=0}}J(ee),I(ee,e)}function Me(){J(ee),J(de),J(X)}function ft(e){e.memoizedState!==null&amp;&amp;I(fe,e);var s=ee.current,a=Ax(s,e.type);s!==a&amp;&amp;(I(de,e),I(ee,a))}function Ft(e){de.current===e&amp;&amp;(J(ee),J(de)),fe.current===e&amp;&amp;(J(fe),Sn._currentValue=R)}var xt,Ct;function ht(e){if(xt===void 0)try{throw Error()}catch(a){var s=a.stack.trim().match(/\n( *(at )?)/);xt=s&amp;&amp;s[1]||&quot;&quot;,Ct=-1&lt;a.stack.indexOf(`
    at`)?&quot; (&lt;anonymous&gt;)&quot;:-1&lt;a.stack.indexOf(&quot;@&quot;)?&quot;@unknown:0:0&quot;:&quot;&quot;}return`
`+xt+e+Ct}var bt=!1;function Bt(e,s){if(!e||bt)return&quot;&quot;;bt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(s){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,&quot;props&quot;,{set:function(){throw Error()}}),typeof Reflect==&quot;object&quot;&amp;&amp;Reflect.construct){try{Reflect.construct(ue,[])}catch(ae){var se=ae}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(ae){se=ae}e.call(ue.prototype)}}else{try{throw Error()}catch(ae){se=ae}(ue=e())&amp;&amp;typeof ue.catch==&quot;function&quot;&amp;&amp;ue.catch(function(){})}}catch(ae){if(ae&amp;&amp;se&amp;&amp;typeof ae.stack==&quot;string&quot;)return[ae.stack,se.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName=&quot;DetermineComponentFrameRoot&quot;;var o=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,&quot;name&quot;);o&amp;&amp;o.configurable&amp;&amp;Object.defineProperty(n.DetermineComponentFrameRoot,&quot;name&quot;,{value:&quot;DetermineComponentFrameRoot&quot;});var u=n.DetermineComponentFrameRoot(),h=u[0],N=u[1];if(h&amp;&amp;N){var O=h.split(`
`),te=N.split(`
`);for(o=n=0;n&lt;O.length&amp;&amp;!O[n].includes(&quot;DetermineComponentFrameRoot&quot;);)n++;for(;o&lt;te.length&amp;&amp;!te[o].includes(&quot;DetermineComponentFrameRoot&quot;);)o++;if(n===O.length||o===te.length)for(n=O.length-1,o=te.length-1;1&lt;=n&amp;&amp;0&lt;=o&amp;&amp;O[n]!==te[o];)o--;for(;1&lt;=n&amp;&amp;0&lt;=o;n--,o--)if(O[n]!==te[o]){if(n!==1||o!==1)do if(n--,o--,0&gt;o||O[n]!==te[o]){var re=`
`+O[n].replace(&quot; at new &quot;,&quot; at &quot;);return e.displayName&amp;&amp;re.includes(&quot;&lt;anonymous&gt;&quot;)&amp;&amp;(re=re.replace(&quot;&lt;anonymous&gt;&quot;,e.displayName)),re}while(1&lt;=n&amp;&amp;0&lt;=o);break}}}finally{bt=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:&quot;&quot;)?ht(a):&quot;&quot;}function xe(e,s){switch(e.tag){case 26:case 27:case 5:return ht(e.type);case 16:return ht(&quot;Lazy&quot;);case 13:return e.child!==s&amp;&amp;s!==null?ht(&quot;Suspense Fallback&quot;):ht(&quot;Suspense&quot;);case 19:return ht(&quot;SuspenseList&quot;);case 0:case 15:return Bt(e.type,!1);case 11:return Bt(e.type.render,!1);case 1:return Bt(e.type,!0);case 31:return ht(&quot;Activity&quot;);default:return&quot;&quot;}}function Et(e){try{var s=&quot;&quot;,a=null;do s+=xe(e,a),a=e,e=e.return;while(e);return s}catch(n){return`
Error generating stack: `+n.message+`
`+n.stack}}var os=Object.prototype.hasOwnProperty,zt=l.unstable_scheduleCallback,Mt=l.unstable_cancelCallback,nt=l.unstable_shouldYield,us=l.unstable_requestPaint,et=l.unstable_now,Ba=l.unstable_getCurrentPriorityLevel,Ns=l.unstable_ImmediatePriority,At=l.unstable_UserBlockingPriority,Zs=l.unstable_NormalPriority,Ha=l.unstable_LowPriority,Va=l.unstable_IdlePriority,Ya=l.log,Ga=l.unstable_setDisableYieldValue,ps=null,ie=null;function ke(e){if(typeof Ya==&quot;function&quot;&amp;&amp;Ga(e),ie&amp;&amp;typeof ie.setStrictMode==&quot;function&quot;)try{ie.setStrictMode(ps,e)}catch{}}var ne=Math.clz32?Math.clz32:Qs,_e=Math.log,we=Math.LN2;function Qs(e){return e&gt;&gt;&gt;=0,e===0?32:31-(_e(e)/we|0)|0}var Pn=256,Fn=262144,Kn=4194304;function ja(e){var s=e&amp;42;if(s!==0)return s;switch(e&amp;-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&amp;261888;case 262144:case 524288:case 1048576:case 2097152:return e&amp;3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&amp;62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Jn(e,s,a){var n=e.pendingLanes;if(n===0)return 0;var o=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var N=n&amp;134217727;return N!==0?(n=N&amp;~u,n!==0?o=ja(n):(h&amp;=N,h!==0?o=ja(h):a||(a=N&amp;~e,a!==0&amp;&amp;(o=ja(a))))):(N=n&amp;~u,N!==0?o=ja(N):h!==0?o=ja(h):a||(a=n&amp;~e,a!==0&amp;&amp;(o=ja(a)))),o===0?0:s!==0&amp;&amp;s!==o&amp;&amp;(s&amp;u)===0&amp;&amp;(u=o&amp;-o,a=s&amp;-s,u&gt;=a||u===32&amp;&amp;(a&amp;4194048)!==0)?s:o}function Ll(e,s){return(e.pendingLanes&amp;~(e.suspendedLanes&amp;~e.pingedLanes)&amp;s)===0}function i0(e,s){switch(e){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function id(){var e=Kn;return Kn&lt;&lt;=1,(Kn&amp;62914560)===0&amp;&amp;(Kn=4194304),e}function Gi(e){for(var s=[],a=0;31&gt;a;a++)s.push(e);return s}function Ul(e,s){e.pendingLanes|=s,s!==268435456&amp;&amp;(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function c0(e,s,a,n,o,u){var h=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&amp;=a,e.entangledLanes&amp;=a,e.errorRecoveryDisabledLanes&amp;=a,e.shellSuspendCounter=0;var N=e.entanglements,O=e.expirationTimes,te=e.hiddenUpdates;for(a=h&amp;~a;0&lt;a;){var re=31-ne(a),ue=1&lt;&lt;re;N[re]=0,O[re]=-1;var se=te[re];if(se!==null)for(te[re]=null,re=0;re&lt;se.length;re++){var ae=se[re];ae!==null&amp;&amp;(ae.lane&amp;=-536870913)}a&amp;=~ue}n!==0&amp;&amp;cd(e,n,0),u!==0&amp;&amp;o===0&amp;&amp;e.tag!==0&amp;&amp;(e.suspendedLanes|=u&amp;~(h&amp;~s))}function cd(e,s,a){e.pendingLanes|=s,e.suspendedLanes&amp;=~s;var n=31-ne(s);e.entangledLanes|=s,e.entanglements[n]=e.entanglements[n]|1073741824|a&amp;261930}function od(e,s){var a=e.entangledLanes|=s;for(e=e.entanglements;a;){var n=31-ne(a),o=1&lt;&lt;n;o&amp;s|e[n]&amp;s&amp;&amp;(e[n]|=s),a&amp;=~o}}function ud(e,s){var a=s&amp;-s;return a=(a&amp;42)!==0?1:Zi(a),(a&amp;(e.suspendedLanes|s))!==0?0:a}function Zi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Qi(e){return e&amp;=-e,2&lt;e?8&lt;e?(e&amp;134217727)!==0?32:268435456:8:2}function dd(){var e=z.p;return e!==0?e:(e=window.event,e===void 0?32:Jx(e.type))}function md(e,s){var a=z.p;try{return z.p=e,s()}finally{z.p=a}}var Xs=Math.random().toString(36).slice(2),jt=&quot;__reactFiber$&quot;+Xs,Dt=&quot;__reactProps$&quot;+Xs,Za=&quot;__reactContainer$&quot;+Xs,Xi=&quot;__reactEvents$&quot;+Xs,o0=&quot;__reactListeners$&quot;+Xs,u0=&quot;__reactHandles$&quot;+Xs,fd=&quot;__reactResources$&quot;+Xs,$l=&quot;__reactMarker$&quot;+Xs;function Pi(e){delete e[jt],delete e[Dt],delete e[Xi],delete e[o0],delete e[u0]}function Qa(e){var s=e[jt];if(s)return s;for(var a=e.parentNode;a;){if(s=a[Za]||a[jt]){if(a=s.alternate,s.child!==null||a!==null&amp;&amp;a.child!==null)for(e=Ox(e);e!==null;){if(a=e[jt])return a;e=Ox(e)}return s}e=a,a=e.parentNode}return null}function Xa(e){if(e=e[jt]||e[Za]){var s=e.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return e}return null}function ql(e){var s=e.tag;if(s===5||s===26||s===27||s===6)return e.stateNode;throw Error(c(33))}function Pa(e){var s=e[fd];return s||(s=e[fd]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function pt(e){e[$l]=!0}var xd=new Set,hd={};function va(e,s){Fa(e,s),Fa(e+&quot;Capture&quot;,s)}function Fa(e,s){for(hd[e]=s,e=0;e&lt;s.length;e++)xd.add(s[e])}var d0=RegExp(&quot;^[: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]*$&quot;),pd={},gd={};function m0(e){return os.call(gd,e)?!0:os.call(pd,e)?!1:d0.test(e)?gd[e]=!0:(pd[e]=!0,!1)}function In(e,s,a){if(m0(s))if(a===null)e.removeAttribute(s);else{switch(typeof a){case&quot;undefined&quot;:case&quot;function&quot;:case&quot;symbol&quot;:e.removeAttribute(s);return;case&quot;boolean&quot;:var n=s.toLowerCase().slice(0,5);if(n!==&quot;data-&quot;&amp;&amp;n!==&quot;aria-&quot;){e.removeAttribute(s);return}}e.setAttribute(s,&quot;&quot;+a)}}function Wn(e,s,a){if(a===null)e.removeAttribute(s);else{switch(typeof a){case&quot;undefined&quot;:case&quot;function&quot;:case&quot;symbol&quot;:case&quot;boolean&quot;:e.removeAttribute(s);return}e.setAttribute(s,&quot;&quot;+a)}}function _s(e,s,a,n){if(n===null)e.removeAttribute(a);else{switch(typeof n){case&quot;undefined&quot;:case&quot;function&quot;:case&quot;symbol&quot;:case&quot;boolean&quot;:e.removeAttribute(a);return}e.setAttributeNS(s,a,&quot;&quot;+n)}}function Kt(e){switch(typeof e){case&quot;bigint&quot;:case&quot;boolean&quot;:case&quot;number&quot;:case&quot;string&quot;:case&quot;undefined&quot;:return e;case&quot;object&quot;:return e;default:return&quot;&quot;}}function bd(e){var s=e.type;return(e=e.nodeName)&amp;&amp;e.toLowerCase()===&quot;input&quot;&amp;&amp;(s===&quot;checkbox&quot;||s===&quot;radio&quot;)}function f0(e,s,a){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,s);if(!e.hasOwnProperty(s)&amp;&amp;typeof n&lt;&quot;u&quot;&amp;&amp;typeof n.get==&quot;function&quot;&amp;&amp;typeof n.set==&quot;function&quot;){var o=n.get,u=n.set;return Object.defineProperty(e,s,{configurable:!0,get:function(){return o.call(this)},set:function(h){a=&quot;&quot;+h,u.call(this,h)}}),Object.defineProperty(e,s,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(h){a=&quot;&quot;+h},stopTracking:function(){e._valueTracker=null,delete e[s]}}}}function Fi(e){if(!e._valueTracker){var s=bd(e)?&quot;checked&quot;:&quot;value&quot;;e._valueTracker=f0(e,s,&quot;&quot;+e[s])}}function jd(e){if(!e)return!1;var s=e._valueTracker;if(!s)return!0;var a=s.getValue(),n=&quot;&quot;;return e&amp;&amp;(n=bd(e)?e.checked?&quot;true&quot;:&quot;false&quot;:e.value),e=n,e!==a?(s.setValue(e),!0):!1}function er(e){if(e=e||(typeof document&lt;&quot;u&quot;?document:void 0),typeof e&gt;&quot;u&quot;)return null;try{return e.activeElement||e.body}catch{return e.body}}var x0=/[\n&quot;\\]/g;function Jt(e){return e.replace(x0,function(s){return&quot;\\&quot;+s.charCodeAt(0).toString(16)+&quot; &quot;})}function Ki(e,s,a,n,o,u,h,N){e.name=&quot;&quot;,h!=null&amp;&amp;typeof h!=&quot;function&quot;&amp;&amp;typeof h!=&quot;symbol&quot;&amp;&amp;typeof h!=&quot;boolean&quot;?e.type=h:e.removeAttribute(&quot;type&quot;),s!=null?h===&quot;number&quot;?(s===0&amp;&amp;e.value===&quot;&quot;||e.value!=s)&amp;&amp;(e.value=&quot;&quot;+Kt(s)):e.value!==&quot;&quot;+Kt(s)&amp;&amp;(e.value=&quot;&quot;+Kt(s)):h!==&quot;submit&quot;&amp;&amp;h!==&quot;reset&quot;||e.removeAttribute(&quot;value&quot;),s!=null?Ji(e,h,Kt(s)):a!=null?Ji(e,h,Kt(a)):n!=null&amp;&amp;e.removeAttribute(&quot;value&quot;),o==null&amp;&amp;u!=null&amp;&amp;(e.defaultChecked=!!u),o!=null&amp;&amp;(e.checked=o&amp;&amp;typeof o!=&quot;function&quot;&amp;&amp;typeof o!=&quot;symbol&quot;),N!=null&amp;&amp;typeof N!=&quot;function&quot;&amp;&amp;typeof N!=&quot;symbol&quot;&amp;&amp;typeof N!=&quot;boolean&quot;?e.name=&quot;&quot;+Kt(N):e.removeAttribute(&quot;name&quot;)}function vd(e,s,a,n,o,u,h,N){if(u!=null&amp;&amp;typeof u!=&quot;function&quot;&amp;&amp;typeof u!=&quot;symbol&quot;&amp;&amp;typeof u!=&quot;boolean&quot;&amp;&amp;(e.type=u),s!=null||a!=null){if(!(u!==&quot;submit&quot;&amp;&amp;u!==&quot;reset&quot;||s!=null)){Fi(e);return}a=a!=null?&quot;&quot;+Kt(a):&quot;&quot;,s=s!=null?&quot;&quot;+Kt(s):a,N||s===e.value||(e.value=s),e.defaultValue=s}n=n??o,n=typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;&amp;&amp;!!n,e.checked=N?e.checked:!!n,e.defaultChecked=!!n,h!=null&amp;&amp;typeof h!=&quot;function&quot;&amp;&amp;typeof h!=&quot;symbol&quot;&amp;&amp;typeof h!=&quot;boolean&quot;&amp;&amp;(e.name=h),Fi(e)}function Ji(e,s,a){s===&quot;number&quot;&amp;&amp;er(e.ownerDocument)===e||e.defaultValue===&quot;&quot;+a||(e.defaultValue=&quot;&quot;+a)}function Ka(e,s,a,n){if(e=e.options,s){s={};for(var o=0;o&lt;a.length;o++)s[&quot;$&quot;+a[o]]=!0;for(a=0;a&lt;e.length;a++)o=s.hasOwnProperty(&quot;$&quot;+e[a].value),e[a].selected!==o&amp;&amp;(e[a].selected=o),o&amp;&amp;n&amp;&amp;(e[a].defaultSelected=!0)}else{for(a=&quot;&quot;+Kt(a),s=null,o=0;o&lt;e.length;o++){if(e[o].value===a){e[o].selected=!0,n&amp;&amp;(e[o].defaultSelected=!0);return}s!==null||e[o].disabled||(s=e[o])}s!==null&amp;&amp;(s.selected=!0)}}function yd(e,s,a){if(s!=null&amp;&amp;(s=&quot;&quot;+Kt(s),s!==e.value&amp;&amp;(e.value=s),a==null)){e.defaultValue!==s&amp;&amp;(e.defaultValue=s);return}e.defaultValue=a!=null?&quot;&quot;+Kt(a):&quot;&quot;}function Nd(e,s,a,n){if(s==null){if(n!=null){if(a!=null)throw Error(c(92));if(q(n)){if(1&lt;n.length)throw Error(c(93));n=n[0]}a=n}a==null&amp;&amp;(a=&quot;&quot;),s=a}a=Kt(s),e.defaultValue=a,n=e.textContent,n===a&amp;&amp;n!==&quot;&quot;&amp;&amp;n!==null&amp;&amp;(e.value=n),Fi(e)}function Ja(e,s){if(s){var a=e.firstChild;if(a&amp;&amp;a===e.lastChild&amp;&amp;a.nodeType===3){a.nodeValue=s;return}}e.textContent=s}var h0=new Set(&quot;animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp&quot;.split(&quot; &quot;));function _d(e,s,a){var n=s.indexOf(&quot;--&quot;)===0;a==null||typeof a==&quot;boolean&quot;||a===&quot;&quot;?n?e.setProperty(s,&quot;&quot;):s===&quot;float&quot;?e.cssFloat=&quot;&quot;:e[s]=&quot;&quot;:n?e.setProperty(s,a):typeof a!=&quot;number&quot;||a===0||h0.has(s)?s===&quot;float&quot;?e.cssFloat=a:e[s]=(&quot;&quot;+a).trim():e[s]=a+&quot;px&quot;}function Sd(e,s,a){if(s!=null&amp;&amp;typeof s!=&quot;object&quot;)throw Error(c(62));if(e=e.style,a!=null){for(var n in a)!a.hasOwnProperty(n)||s!=null&amp;&amp;s.hasOwnProperty(n)||(n.indexOf(&quot;--&quot;)===0?e.setProperty(n,&quot;&quot;):n===&quot;float&quot;?e.cssFloat=&quot;&quot;:e[n]=&quot;&quot;);for(var o in s)n=s[o],s.hasOwnProperty(o)&amp;&amp;a[o]!==n&amp;&amp;_d(e,o,n)}else for(var u in s)s.hasOwnProperty(u)&amp;&amp;_d(e,u,s[u])}function Ii(e){if(e.indexOf(&quot;-&quot;)===-1)return!1;switch(e){case&quot;annotation-xml&quot;:case&quot;color-profile&quot;:case&quot;font-face&quot;:case&quot;font-face-src&quot;:case&quot;font-face-uri&quot;:case&quot;font-face-format&quot;:case&quot;font-face-name&quot;:case&quot;missing-glyph&quot;:return!1;default:return!0}}var p0=new Map([[&quot;acceptCharset&quot;,&quot;accept-charset&quot;],[&quot;htmlFor&quot;,&quot;for&quot;],[&quot;httpEquiv&quot;,&quot;http-equiv&quot;],[&quot;crossOrigin&quot;,&quot;crossorigin&quot;],[&quot;accentHeight&quot;,&quot;accent-height&quot;],[&quot;alignmentBaseline&quot;,&quot;alignment-baseline&quot;],[&quot;arabicForm&quot;,&quot;arabic-form&quot;],[&quot;baselineShift&quot;,&quot;baseline-shift&quot;],[&quot;capHeight&quot;,&quot;cap-height&quot;],[&quot;clipPath&quot;,&quot;clip-path&quot;],[&quot;clipRule&quot;,&quot;clip-rule&quot;],[&quot;colorInterpolation&quot;,&quot;color-interpolation&quot;],[&quot;colorInterpolationFilters&quot;,&quot;color-interpolation-filters&quot;],[&quot;colorProfile&quot;,&quot;color-profile&quot;],[&quot;colorRendering&quot;,&quot;color-rendering&quot;],[&quot;dominantBaseline&quot;,&quot;dominant-baseline&quot;],[&quot;enableBackground&quot;,&quot;enable-background&quot;],[&quot;fillOpacity&quot;,&quot;fill-opacity&quot;],[&quot;fillRule&quot;,&quot;fill-rule&quot;],[&quot;floodColor&quot;,&quot;flood-color&quot;],[&quot;floodOpacity&quot;,&quot;flood-opacity&quot;],[&quot;fontFamily&quot;,&quot;font-family&quot;],[&quot;fontSize&quot;,&quot;font-size&quot;],[&quot;fontSizeAdjust&quot;,&quot;font-size-adjust&quot;],[&quot;fontStretch&quot;,&quot;font-stretch&quot;],[&quot;fontStyle&quot;,&quot;font-style&quot;],[&quot;fontVariant&quot;,&quot;font-variant&quot;],[&quot;fontWeight&quot;,&quot;font-weight&quot;],[&quot;glyphName&quot;,&quot;glyph-name&quot;],[&quot;glyphOrientationHorizontal&quot;,&quot;glyph-orientation-horizontal&quot;],[&quot;glyphOrientationVertical&quot;,&quot;glyph-orientation-vertical&quot;],[&quot;horizAdvX&quot;,&quot;horiz-adv-x&quot;],[&quot;horizOriginX&quot;,&quot;horiz-origin-x&quot;],[&quot;imageRendering&quot;,&quot;image-rendering&quot;],[&quot;letterSpacing&quot;,&quot;letter-spacing&quot;],[&quot;lightingColor&quot;,&quot;lighting-color&quot;],[&quot;markerEnd&quot;,&quot;marker-end&quot;],[&quot;markerMid&quot;,&quot;marker-mid&quot;],[&quot;markerStart&quot;,&quot;marker-start&quot;],[&quot;overlinePosition&quot;,&quot;overline-position&quot;],[&quot;overlineThickness&quot;,&quot;overline-thickness&quot;],[&quot;paintOrder&quot;,&quot;paint-order&quot;],[&quot;panose-1&quot;,&quot;panose-1&quot;],[&quot;pointerEvents&quot;,&quot;pointer-events&quot;],[&quot;renderingIntent&quot;,&quot;rendering-intent&quot;],[&quot;shapeRendering&quot;,&quot;shape-rendering&quot;],[&quot;stopColor&quot;,&quot;stop-color&quot;],[&quot;stopOpacity&quot;,&quot;stop-opacity&quot;],[&quot;strikethroughPosition&quot;,&quot;strikethrough-position&quot;],[&quot;strikethroughThickness&quot;,&quot;strikethrough-thickness&quot;],[&quot;strokeDasharray&quot;,&quot;stroke-dasharray&quot;],[&quot;strokeDashoffset&quot;,&quot;stroke-dashoffset&quot;],[&quot;strokeLinecap&quot;,&quot;stroke-linecap&quot;],[&quot;strokeLinejoin&quot;,&quot;stroke-linejoin&quot;],[&quot;strokeMiterlimit&quot;,&quot;stroke-miterlimit&quot;],[&quot;strokeOpacity&quot;,&quot;stroke-opacity&quot;],[&quot;strokeWidth&quot;,&quot;stroke-width&quot;],[&quot;textAnchor&quot;,&quot;text-anchor&quot;],[&quot;textDecoration&quot;,&quot;text-decoration&quot;],[&quot;textRendering&quot;,&quot;text-rendering&quot;],[&quot;transformOrigin&quot;,&quot;transform-origin&quot;],[&quot;underlinePosition&quot;,&quot;underline-position&quot;],[&quot;underlineThickness&quot;,&quot;underline-thickness&quot;],[&quot;unicodeBidi&quot;,&quot;unicode-bidi&quot;],[&quot;unicodeRange&quot;,&quot;unicode-range&quot;],[&quot;unitsPerEm&quot;,&quot;units-per-em&quot;],[&quot;vAlphabetic&quot;,&quot;v-alphabetic&quot;],[&quot;vHanging&quot;,&quot;v-hanging&quot;],[&quot;vIdeographic&quot;,&quot;v-ideographic&quot;],[&quot;vMathematical&quot;,&quot;v-mathematical&quot;],[&quot;vectorEffect&quot;,&quot;vector-effect&quot;],[&quot;vertAdvY&quot;,&quot;vert-adv-y&quot;],[&quot;vertOriginX&quot;,&quot;vert-origin-x&quot;],[&quot;vertOriginY&quot;,&quot;vert-origin-y&quot;],[&quot;wordSpacing&quot;,&quot;word-spacing&quot;],[&quot;writingMode&quot;,&quot;writing-mode&quot;],[&quot;xmlnsXlink&quot;,&quot;xmlns:xlink&quot;],[&quot;xHeight&quot;,&quot;x-height&quot;]]),g0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function tr(e){return g0.test(&quot;&quot;+e)?&quot;javascript:throw new Error(&#039;React has blocked a javascript: URL as a security precaution.&#039;)&quot;:e}function Ss(){}var Wi=null;function ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&amp;&amp;(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ia=null,Wa=null;function wd(e){var s=Xa(e);if(s&amp;&amp;(e=s.stateNode)){var a=e[Dt]||null;e:switch(e=s.stateNode,s.type){case&quot;input&quot;:if(Ki(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),s=a.name,a.type===&quot;radio&quot;&amp;&amp;s!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll(&#039;input[name=&quot;&#039;+Jt(&quot;&quot;+s)+&#039;&quot;][type=&quot;radio&quot;]&#039;),s=0;s&lt;a.length;s++){var n=a[s];if(n!==e&amp;&amp;n.form===e.form){var o=n[Dt]||null;if(!o)throw Error(c(90));Ki(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(s=0;s&lt;a.length;s++)n=a[s],n.form===e.form&amp;&amp;jd(n)}break e;case&quot;textarea&quot;:yd(e,a.value,a.defaultValue);break e;case&quot;select&quot;:s=a.value,s!=null&amp;&amp;Ka(e,!!a.multiple,s,!1)}}}var tc=!1;function Cd(e,s,a){if(tc)return e(s,a);tc=!0;try{var n=e(s);return n}finally{if(tc=!1,(Ia!==null||Wa!==null)&amp;&amp;(Vr(),Ia&amp;&amp;(s=Ia,e=Wa,Wa=Ia=null,wd(s),e)))for(s=0;s&lt;e.length;s++)wd(e[s])}}function Bl(e,s){var a=e.stateNode;if(a===null)return null;var n=a[Dt]||null;if(n===null)return null;a=n[s];e:switch(s){case&quot;onClick&quot;:case&quot;onClickCapture&quot;:case&quot;onDoubleClick&quot;:case&quot;onDoubleClickCapture&quot;:case&quot;onMouseDown&quot;:case&quot;onMouseDownCapture&quot;:case&quot;onMouseMove&quot;:case&quot;onMouseMoveCapture&quot;:case&quot;onMouseUp&quot;:case&quot;onMouseUpCapture&quot;:case&quot;onMouseEnter&quot;:(n=!n.disabled)||(e=e.type,n=!(e===&quot;button&quot;||e===&quot;input&quot;||e===&quot;select&quot;||e===&quot;textarea&quot;)),e=!n;break e;default:e=!1}if(e)return null;if(a&amp;&amp;typeof a!=&quot;function&quot;)throw Error(c(231,s,typeof a));return a}var ws=!(typeof window&gt;&quot;u&quot;||typeof window.document&gt;&quot;u&quot;||typeof window.document.createElement&gt;&quot;u&quot;),sc=!1;if(ws)try{var Hl={};Object.defineProperty(Hl,&quot;passive&quot;,{get:function(){sc=!0}}),window.addEventListener(&quot;test&quot;,Hl,Hl),window.removeEventListener(&quot;test&quot;,Hl,Hl)}catch{sc=!1}var Ps=null,ac=null,sr=null;function Ed(){if(sr)return sr;var e,s=ac,a=s.length,n,o=&quot;value&quot;in Ps?Ps.value:Ps.textContent,u=o.length;for(e=0;e&lt;a&amp;&amp;s[e]===o[e];e++);var h=a-e;for(n=1;n&lt;=h&amp;&amp;s[a-n]===o[u-n];n++);return sr=o.slice(e,1&lt;n?1-n:void 0)}function ar(e){var s=e.keyCode;return&quot;charCode&quot;in e?(e=e.charCode,e===0&amp;&amp;s===13&amp;&amp;(e=13)):e=s,e===10&amp;&amp;(e=13),32&lt;=e||e===13?e:0}function lr(){return!0}function Ad(){return!1}function Rt(e){function s(a,n,o,u,h){this._reactName=a,this._targetInst=o,this.type=n,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&amp;&amp;(a=e[N],this[N]=a?a(u):u[N]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?lr:Ad,this.isPropagationStopped=Ad,this}return j(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&amp;&amp;(a.preventDefault?a.preventDefault():typeof a.returnValue!=&quot;unknown&quot;&amp;&amp;(a.returnValue=!1),this.isDefaultPrevented=lr)},stopPropagation:function(){var a=this.nativeEvent;a&amp;&amp;(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!=&quot;unknown&quot;&amp;&amp;(a.cancelBubble=!0),this.isPropagationStopped=lr)},persist:function(){},isPersistent:lr}),s}var ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nr=Rt(ya),Vl=j({},ya,{view:0,detail:0}),b0=Rt(Vl),lc,nc,Yl,rr=j({},Vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ic,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return&quot;movementX&quot;in e?e.movementX:(e!==Yl&amp;&amp;(Yl&amp;&amp;e.type===&quot;mousemove&quot;?(lc=e.screenX-Yl.screenX,nc=e.screenY-Yl.screenY):nc=lc=0,Yl=e),lc)},movementY:function(e){return&quot;movementY&quot;in e?e.movementY:nc}}),kd=Rt(rr),j0=j({},rr,{dataTransfer:0}),v0=Rt(j0),y0=j({},Vl,{relatedTarget:0}),rc=Rt(y0),N0=j({},ya,{animationName:0,elapsedTime:0,pseudoElement:0}),_0=Rt(N0),S0=j({},ya,{clipboardData:function(e){return&quot;clipboardData&quot;in e?e.clipboardData:window.clipboardData}}),w0=Rt(S0),C0=j({},ya,{data:0}),Td=Rt(C0),E0={Esc:&quot;Escape&quot;,Spacebar:&quot; &quot;,Left:&quot;ArrowLeft&quot;,Up:&quot;ArrowUp&quot;,Right:&quot;ArrowRight&quot;,Down:&quot;ArrowDown&quot;,Del:&quot;Delete&quot;,Win:&quot;OS&quot;,Menu:&quot;ContextMenu&quot;,Apps:&quot;ContextMenu&quot;,Scroll:&quot;ScrollLock&quot;,MozPrintableKey:&quot;Unidentified&quot;},A0={8:&quot;Backspace&quot;,9:&quot;Tab&quot;,12:&quot;Clear&quot;,13:&quot;Enter&quot;,16:&quot;Shift&quot;,17:&quot;Control&quot;,18:&quot;Alt&quot;,19:&quot;Pause&quot;,20:&quot;CapsLock&quot;,27:&quot;Escape&quot;,32:&quot; &quot;,33:&quot;PageUp&quot;,34:&quot;PageDown&quot;,35:&quot;End&quot;,36:&quot;Home&quot;,37:&quot;ArrowLeft&quot;,38:&quot;ArrowUp&quot;,39:&quot;ArrowRight&quot;,40:&quot;ArrowDown&quot;,45:&quot;Insert&quot;,46:&quot;Delete&quot;,112:&quot;F1&quot;,113:&quot;F2&quot;,114:&quot;F3&quot;,115:&quot;F4&quot;,116:&quot;F5&quot;,117:&quot;F6&quot;,118:&quot;F7&quot;,119:&quot;F8&quot;,120:&quot;F9&quot;,121:&quot;F10&quot;,122:&quot;F11&quot;,123:&quot;F12&quot;,144:&quot;NumLock&quot;,145:&quot;ScrollLock&quot;,224:&quot;Meta&quot;},k0={Alt:&quot;altKey&quot;,Control:&quot;ctrlKey&quot;,Meta:&quot;metaKey&quot;,Shift:&quot;shiftKey&quot;};function T0(e){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(e):(e=k0[e])?!!s[e]:!1}function ic(){return T0}var z0=j({},Vl,{key:function(e){if(e.key){var s=E0[e.key]||e.key;if(s!==&quot;Unidentified&quot;)return s}return e.type===&quot;keypress&quot;?(e=ar(e),e===13?&quot;Enter&quot;:String.fromCharCode(e)):e.type===&quot;keydown&quot;||e.type===&quot;keyup&quot;?A0[e.keyCode]||&quot;Unidentified&quot;:&quot;&quot;},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ic,charCode:function(e){return e.type===&quot;keypress&quot;?ar(e):0},keyCode:function(e){return e.type===&quot;keydown&quot;||e.type===&quot;keyup&quot;?e.keyCode:0},which:function(e){return e.type===&quot;keypress&quot;?ar(e):e.type===&quot;keydown&quot;||e.type===&quot;keyup&quot;?e.keyCode:0}}),M0=Rt(z0),D0=j({},rr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zd=Rt(D0),R0=j({},Vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ic}),O0=Rt(R0),L0=j({},ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),U0=Rt(L0),$0=j({},rr,{deltaX:function(e){return&quot;deltaX&quot;in e?e.deltaX:&quot;wheelDeltaX&quot;in e?-e.wheelDeltaX:0},deltaY:function(e){return&quot;deltaY&quot;in e?e.deltaY:&quot;wheelDeltaY&quot;in e?-e.wheelDeltaY:&quot;wheelDelta&quot;in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),q0=Rt($0),B0=j({},ya,{newState:0,oldState:0}),H0=Rt(B0),V0=[9,13,27,32],cc=ws&amp;&amp;&quot;CompositionEvent&quot;in window,Gl=null;ws&amp;&amp;&quot;documentMode&quot;in document&amp;&amp;(Gl=document.documentMode);var Y0=ws&amp;&amp;&quot;TextEvent&quot;in window&amp;&amp;!Gl,Md=ws&amp;&amp;(!cc||Gl&amp;&amp;8&lt;Gl&amp;&amp;11&gt;=Gl),Dd=&quot; &quot;,Rd=!1;function Od(e,s){switch(e){case&quot;keyup&quot;:return V0.indexOf(s.keyCode)!==-1;case&quot;keydown&quot;:return s.keyCode!==229;case&quot;keypress&quot;:case&quot;mousedown&quot;:case&quot;focusout&quot;:return!0;default:return!1}}function Ld(e){return e=e.detail,typeof e==&quot;object&quot;&amp;&amp;&quot;data&quot;in e?e.data:null}var el=!1;function G0(e,s){switch(e){case&quot;compositionend&quot;:return Ld(s);case&quot;keypress&quot;:return s.which!==32?null:(Rd=!0,Dd);case&quot;textInput&quot;:return e=s.data,e===Dd&amp;&amp;Rd?null:e;default:return null}}function Z0(e,s){if(el)return e===&quot;compositionend&quot;||!cc&amp;&amp;Od(e,s)?(e=Ed(),sr=ac=Ps=null,el=!1,e):null;switch(e){case&quot;paste&quot;:return null;case&quot;keypress&quot;:if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&amp;&amp;s.altKey){if(s.char&amp;&amp;1&lt;s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case&quot;compositionend&quot;:return Md&amp;&amp;s.locale!==&quot;ko&quot;?null:s.data;default:return null}}var Q0={color:!0,date:!0,datetime:!0,&quot;datetime-local&quot;:!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ud(e){var s=e&amp;&amp;e.nodeName&amp;&amp;e.nodeName.toLowerCase();return s===&quot;input&quot;?!!Q0[e.type]:s===&quot;textarea&quot;}function $d(e,s,a,n){Ia?Wa?Wa.push(n):Wa=[n]:Ia=n,s=Fr(s,&quot;onChange&quot;),0&lt;s.length&amp;&amp;(a=new nr(&quot;onChange&quot;,&quot;change&quot;,null,a,n),e.push({event:a,listeners:s}))}var Zl=null,Ql=null;function X0(e){yx(e,0)}function ir(e){var s=ql(e);if(jd(s))return e}function qd(e,s){if(e===&quot;change&quot;)return s}var Bd=!1;if(ws){var oc;if(ws){var uc=&quot;oninput&quot;in document;if(!uc){var Hd=document.createElement(&quot;div&quot;);Hd.setAttribute(&quot;oninput&quot;,&quot;return;&quot;),uc=typeof Hd.oninput==&quot;function&quot;}oc=uc}else oc=!1;Bd=oc&amp;&amp;(!document.documentMode||9&lt;document.documentMode)}function Vd(){Zl&amp;&amp;(Zl.detachEvent(&quot;onpropertychange&quot;,Yd),Ql=Zl=null)}function Yd(e){if(e.propertyName===&quot;value&quot;&amp;&amp;ir(Ql)){var s=[];$d(s,Ql,e,ec(e)),Cd(X0,s)}}function P0(e,s,a){e===&quot;focusin&quot;?(Vd(),Zl=s,Ql=a,Zl.attachEvent(&quot;onpropertychange&quot;,Yd)):e===&quot;focusout&quot;&amp;&amp;Vd()}function F0(e){if(e===&quot;selectionchange&quot;||e===&quot;keyup&quot;||e===&quot;keydown&quot;)return ir(Ql)}function K0(e,s){if(e===&quot;click&quot;)return ir(s)}function J0(e,s){if(e===&quot;input&quot;||e===&quot;change&quot;)return ir(s)}function I0(e,s){return e===s&amp;&amp;(e!==0||1/e===1/s)||e!==e&amp;&amp;s!==s}var Ht=typeof Object.is==&quot;function&quot;?Object.is:I0;function Xl(e,s){if(Ht(e,s))return!0;if(typeof e!=&quot;object&quot;||e===null||typeof s!=&quot;object&quot;||s===null)return!1;var a=Object.keys(e),n=Object.keys(s);if(a.length!==n.length)return!1;for(n=0;n&lt;a.length;n++){var o=a[n];if(!os.call(s,o)||!Ht(e[o],s[o]))return!1}return!0}function Gd(e){for(;e&amp;&amp;e.firstChild;)e=e.firstChild;return e}function Zd(e,s){var a=Gd(e);e=0;for(var n;a;){if(a.nodeType===3){if(n=e+a.textContent.length,e&lt;=s&amp;&amp;n&gt;=s)return{node:a,offset:s-e};e=n}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Gd(a)}}function Qd(e,s){return e&amp;&amp;s?e===s?!0:e&amp;&amp;e.nodeType===3?!1:s&amp;&amp;s.nodeType===3?Qd(e,s.parentNode):&quot;contains&quot;in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&amp;16):!1:!1}function Xd(e){e=e!=null&amp;&amp;e.ownerDocument!=null&amp;&amp;e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=er(e.document);s instanceof e.HTMLIFrameElement;){try{var a=typeof s.contentWindow.location.href==&quot;string&quot;}catch{a=!1}if(a)e=s.contentWindow;else break;s=er(e.document)}return s}function dc(e){var s=e&amp;&amp;e.nodeName&amp;&amp;e.nodeName.toLowerCase();return s&amp;&amp;(s===&quot;input&quot;&amp;&amp;(e.type===&quot;text&quot;||e.type===&quot;search&quot;||e.type===&quot;tel&quot;||e.type===&quot;url&quot;||e.type===&quot;password&quot;)||s===&quot;textarea&quot;||e.contentEditable===&quot;true&quot;)}var W0=ws&amp;&amp;&quot;documentMode&quot;in document&amp;&amp;11&gt;=document.documentMode,tl=null,mc=null,Pl=null,fc=!1;function Pd(e,s,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fc||tl==null||tl!==er(n)||(n=tl,&quot;selectionStart&quot;in n&amp;&amp;dc(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&amp;&amp;n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),Pl&amp;&amp;Xl(Pl,n)||(Pl=n,n=Fr(mc,&quot;onSelect&quot;),0&lt;n.length&amp;&amp;(s=new nr(&quot;onSelect&quot;,&quot;select&quot;,null,s,a),e.push({event:s,listeners:n}),s.target=tl)))}function Na(e,s){var a={};return a[e.toLowerCase()]=s.toLowerCase(),a[&quot;Webkit&quot;+e]=&quot;webkit&quot;+s,a[&quot;Moz&quot;+e]=&quot;moz&quot;+s,a}var sl={animationend:Na(&quot;Animation&quot;,&quot;AnimationEnd&quot;),animationiteration:Na(&quot;Animation&quot;,&quot;AnimationIteration&quot;),animationstart:Na(&quot;Animation&quot;,&quot;AnimationStart&quot;),transitionrun:Na(&quot;Transition&quot;,&quot;TransitionRun&quot;),transitionstart:Na(&quot;Transition&quot;,&quot;TransitionStart&quot;),transitioncancel:Na(&quot;Transition&quot;,&quot;TransitionCancel&quot;),transitionend:Na(&quot;Transition&quot;,&quot;TransitionEnd&quot;)},xc={},Fd={};ws&amp;&amp;(Fd=document.createElement(&quot;div&quot;).style,&quot;AnimationEvent&quot;in window||(delete sl.animationend.animation,delete sl.animationiteration.animation,delete sl.animationstart.animation),&quot;TransitionEvent&quot;in window||delete sl.transitionend.transition);function _a(e){if(xc[e])return xc[e];if(!sl[e])return e;var s=sl[e],a;for(a in s)if(s.hasOwnProperty(a)&amp;&amp;a in Fd)return xc[e]=s[a];return e}var Kd=_a(&quot;animationend&quot;),Jd=_a(&quot;animationiteration&quot;),Id=_a(&quot;animationstart&quot;),eg=_a(&quot;transitionrun&quot;),tg=_a(&quot;transitionstart&quot;),sg=_a(&quot;transitioncancel&quot;),Wd=_a(&quot;transitionend&quot;),em=new Map,hc=&quot;abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel&quot;.split(&quot; &quot;);hc.push(&quot;scrollEnd&quot;);function ds(e,s){em.set(e,s),va(s,[e])}var cr=typeof reportError==&quot;function&quot;?reportError:function(e){if(typeof window==&quot;object&quot;&amp;&amp;typeof window.ErrorEvent==&quot;function&quot;){var s=new window.ErrorEvent(&quot;error&quot;,{bubbles:!0,cancelable:!0,message:typeof e==&quot;object&quot;&amp;&amp;e!==null&amp;&amp;typeof e.message==&quot;string&quot;?String(e.message):String(e),error:e});if(!window.dispatchEvent(s))return}else if(typeof process==&quot;object&quot;&amp;&amp;typeof process.emit==&quot;function&quot;){process.emit(&quot;uncaughtException&quot;,e);return}console.error(e)},It=[],al=0,pc=0;function or(){for(var e=al,s=pc=al=0;s&lt;e;){var a=It[s];It[s++]=null;var n=It[s];It[s++]=null;var o=It[s];It[s++]=null;var u=It[s];if(It[s++]=null,n!==null&amp;&amp;o!==null){var h=n.pending;h===null?o.next=o:(o.next=h.next,h.next=o),n.pending=o}u!==0&amp;&amp;tm(a,o,u)}}function ur(e,s,a,n){It[al++]=e,It[al++]=s,It[al++]=a,It[al++]=n,pc|=n,e.lanes|=n,e=e.alternate,e!==null&amp;&amp;(e.lanes|=n)}function gc(e,s,a,n){return ur(e,s,a,n),dr(e)}function Sa(e,s){return ur(e,null,null,s),dr(e)}function tm(e,s,a){e.lanes|=a;var n=e.alternate;n!==null&amp;&amp;(n.lanes|=a);for(var o=!1,u=e.return;u!==null;)u.childLanes|=a,n=u.alternate,n!==null&amp;&amp;(n.childLanes|=a),u.tag===22&amp;&amp;(e=u.stateNode,e===null||e._visibility&amp;1||(o=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,o&amp;&amp;s!==null&amp;&amp;(o=31-ne(a),e=u.hiddenUpdates,n=e[o],n===null?e[o]=[s]:n.push(s),s.lane=a|536870912),u):null}function dr(e){if(50&lt;gn)throw gn=0,Eo=null,Error(c(185));for(var s=e.return;s!==null;)e=s,s=e.return;return e.tag===3?e.stateNode:null}var ll={};function ag(e,s,a,n){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vt(e,s,a,n){return new ag(e,s,a,n)}function bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Cs(e,s){var a=e.alternate;return a===null?(a=Vt(e.tag,s,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=s,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&amp;65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,s=e.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function sm(e,s){e.flags&amp;=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=s,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,s=a.dependencies,e.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),e}function mr(e,s,a,n,o,u){var h=0;if(n=e,typeof e==&quot;function&quot;)bc(e)&amp;&amp;(h=1);else if(typeof e==&quot;string&quot;)h=cb(e,a,ee.current)?26:e===&quot;html&quot;||e===&quot;head&quot;||e===&quot;body&quot;?27:5;else e:switch(e){case k:return e=Vt(31,a,s,o),e.elementType=k,e.lanes=u,e;case A:return wa(a.children,o,u,s);case E:h=8,o|=24;break;case S:return e=Vt(12,a,s,o|2),e.elementType=S,e.lanes=u,e;case B:return e=Vt(13,a,s,o),e.elementType=B,e.lanes=u,e;case G:return e=Vt(19,a,s,o),e.elementType=G,e.lanes=u,e;default:if(typeof e==&quot;object&quot;&amp;&amp;e!==null)switch(e.$$typeof){case T:h=10;break e;case U:h=9;break e;case P:h=11;break e;case K:h=14;break e;case Z:h=16,n=null;break e}h=29,a=Error(c(130,e===null?&quot;null&quot;:typeof e,&quot;&quot;)),n=null}return s=Vt(h,a,s,o),s.elementType=e,s.type=n,s.lanes=u,s}function wa(e,s,a,n){return e=Vt(7,e,n,s),e.lanes=a,e}function jc(e,s,a){return e=Vt(6,e,null,s),e.lanes=a,e}function am(e){var s=Vt(18,null,null,0);return s.stateNode=e,s}function vc(e,s,a){return s=Vt(4,e.children!==null?e.children:[],e.key,s),s.lanes=a,s.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},s}var lm=new WeakMap;function Wt(e,s){if(typeof e==&quot;object&quot;&amp;&amp;e!==null){var a=lm.get(e);return a!==void 0?a:(s={value:e,source:s,stack:Et(s)},lm.set(e,s),s)}return{value:e,source:s,stack:Et(s)}}var nl=[],rl=0,fr=null,Fl=0,es=[],ts=0,Fs=null,gs=1,bs=&quot;&quot;;function Es(e,s){nl[rl++]=Fl,nl[rl++]=fr,fr=e,Fl=s}function nm(e,s,a){es[ts++]=gs,es[ts++]=bs,es[ts++]=Fs,Fs=e;var n=gs;e=bs;var o=32-ne(n)-1;n&amp;=~(1&lt;&lt;o),a+=1;var u=32-ne(s)+o;if(30&lt;u){var h=o-o%5;u=(n&amp;(1&lt;&lt;h)-1).toString(32),n&gt;&gt;=h,o-=h,gs=1&lt;&lt;32-ne(s)+o|a&lt;&lt;o|n,bs=u+e}else gs=1&lt;&lt;u|a&lt;&lt;o|n,bs=e}function yc(e){e.return!==null&amp;&amp;(Es(e,1),nm(e,1,0))}function Nc(e){for(;e===fr;)fr=nl[--rl],nl[rl]=null,Fl=nl[--rl],nl[rl]=null;for(;e===Fs;)Fs=es[--ts],es[ts]=null,bs=es[--ts],es[ts]=null,gs=es[--ts],es[ts]=null}function rm(e,s){es[ts++]=gs,es[ts++]=bs,es[ts++]=Fs,gs=s.id,bs=s.overflow,Fs=e}var vt=null,Ie=null,$e=!1,Ks=null,ss=!1,_c=Error(c(519));function Js(e){var s=Error(c(418,1&lt;arguments.length&amp;&amp;arguments[1]!==void 0&amp;&amp;arguments[1]?&quot;text&quot;:&quot;HTML&quot;,&quot;&quot;));throw Kl(Wt(s,e)),_c}function im(e){var s=e.stateNode,a=e.type,n=e.memoizedProps;switch(s[jt]=e,s[Dt]=n,a){case&quot;dialog&quot;:Re(&quot;cancel&quot;,s),Re(&quot;close&quot;,s);break;case&quot;iframe&quot;:case&quot;object&quot;:case&quot;embed&quot;:Re(&quot;load&quot;,s);break;case&quot;video&quot;:case&quot;audio&quot;:for(a=0;a&lt;jn.length;a++)Re(jn[a],s);break;case&quot;source&quot;:Re(&quot;error&quot;,s);break;case&quot;img&quot;:case&quot;image&quot;:case&quot;link&quot;:Re(&quot;error&quot;,s),Re(&quot;load&quot;,s);break;case&quot;details&quot;:Re(&quot;toggle&quot;,s);break;case&quot;input&quot;:Re(&quot;invalid&quot;,s),vd(s,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case&quot;select&quot;:Re(&quot;invalid&quot;,s);break;case&quot;textarea&quot;:Re(&quot;invalid&quot;,s),Nd(s,n.value,n.defaultValue,n.children)}a=n.children,typeof a!=&quot;string&quot;&amp;&amp;typeof a!=&quot;number&quot;&amp;&amp;typeof a!=&quot;bigint&quot;||s.textContent===&quot;&quot;+a||n.suppressHydrationWarning===!0||wx(s.textContent,a)?(n.popover!=null&amp;&amp;(Re(&quot;beforetoggle&quot;,s),Re(&quot;toggle&quot;,s)),n.onScroll!=null&amp;&amp;Re(&quot;scroll&quot;,s),n.onScrollEnd!=null&amp;&amp;Re(&quot;scrollend&quot;,s),n.onClick!=null&amp;&amp;(s.onclick=Ss),s=!0):s=!1,s||Js(e,!0)}function cm(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 31:case 13:ss=!1;return;case 27:case 3:ss=!0;return;default:vt=vt.return}}function il(e){if(e!==vt)return!1;if(!$e)return cm(e),$e=!0,!1;var s=e.tag,a;if((a=s!==3&amp;&amp;s!==27)&amp;&amp;((a=s===5)&amp;&amp;(a=e.type,a=!(a!==&quot;form&quot;&amp;&amp;a!==&quot;button&quot;)||Vo(e.type,e.memoizedProps)),a=!a),a&amp;&amp;Ie&amp;&amp;Js(e),cm(e),s===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=Rx(e)}else if(s===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=Rx(e)}else s===27?(s=Ie,da(e.type)?(e=Xo,Xo=null,Ie=e):Ie=s):Ie=vt?ls(e.stateNode.nextSibling):null;return!0}function Ca(){Ie=vt=null,$e=!1}function Sc(){var e=Ks;return e!==null&amp;&amp;($t===null?$t=e:$t.push.apply($t,e),Ks=null),e}function Kl(e){Ks===null?Ks=[e]:Ks.push(e)}var wc=D(null),Ea=null,As=null;function Is(e,s,a){I(wc,s._currentValue),s._currentValue=a}function ks(e){e._currentValue=wc.current,J(wc)}function Cc(e,s,a){for(;e!==null;){var n=e.alternate;if((e.childLanes&amp;s)!==s?(e.childLanes|=s,n!==null&amp;&amp;(n.childLanes|=s)):n!==null&amp;&amp;(n.childLanes&amp;s)!==s&amp;&amp;(n.childLanes|=s),e===a)break;e=e.return}}function Ec(e,s,a,n){var o=e.child;for(o!==null&amp;&amp;(o.return=e);o!==null;){var u=o.dependencies;if(u!==null){var h=o.child;u=u.firstContext;e:for(;u!==null;){var N=u;u=o;for(var O=0;O&lt;s.length;O++)if(N.context===s[O]){u.lanes|=a,N=u.alternate,N!==null&amp;&amp;(N.lanes|=a),Cc(u.return,a,e),n||(h=null);break e}u=N.next}}else if(o.tag===18){if(h=o.return,h===null)throw Error(c(341));h.lanes|=a,u=h.alternate,u!==null&amp;&amp;(u.lanes|=a),Cc(h,a,e),h=null}else h=o.child;if(h!==null)h.return=o;else for(h=o;h!==null;){if(h===e){h=null;break}if(o=h.sibling,o!==null){o.return=h.return,h=o;break}h=h.return}o=h}}function cl(e,s,a,n){e=null;for(var o=s,u=!1;o!==null;){if(!u){if((o.flags&amp;524288)!==0)u=!0;else if((o.flags&amp;262144)!==0)break}if(o.tag===10){var h=o.alternate;if(h===null)throw Error(c(387));if(h=h.memoizedProps,h!==null){var N=o.type;Ht(o.pendingProps.value,h.value)||(e!==null?e.push(N):e=[N])}}else if(o===fe.current){if(h=o.alternate,h===null)throw Error(c(387));h.memoizedState.memoizedState!==o.memoizedState.memoizedState&amp;&amp;(e!==null?e.push(Sn):e=[Sn])}o=o.return}e!==null&amp;&amp;Ec(s,e,a,n),s.flags|=262144}function xr(e){for(e=e.firstContext;e!==null;){if(!Ht(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Aa(e){Ea=e,As=null,e=e.dependencies,e!==null&amp;&amp;(e.firstContext=null)}function yt(e){return om(Ea,e)}function hr(e,s){return Ea===null&amp;&amp;Aa(e),om(e,s)}function om(e,s){var a=s._currentValue;if(s={context:s,memoizedValue:a,next:null},As===null){if(e===null)throw Error(c(308));As=s,e.dependencies={lanes:0,firstContext:s},e.flags|=524288}else As=As.next=s;return a}var lg=typeof AbortController&lt;&quot;u&quot;?AbortController:function(){var e=[],s=this.signal={aborted:!1,addEventListener:function(a,n){e.push(n)}};this.abort=function(){s.aborted=!0,e.forEach(function(a){return a()})}},ng=l.unstable_scheduleCallback,rg=l.unstable_NormalPriority,ct={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ac(){return{controller:new lg,data:new Map,refCount:0}}function Jl(e){e.refCount--,e.refCount===0&amp;&amp;ng(rg,function(){e.controller.abort()})}var Il=null,kc=0,ol=0,ul=null;function ig(e,s){if(Il===null){var a=Il=[];kc=0,ol=Do(),ul={status:&quot;pending&quot;,value:void 0,then:function(n){a.push(n)}}}return kc++,s.then(um,um),s}function um(){if(--kc===0&amp;&amp;Il!==null){ul!==null&amp;&amp;(ul.status=&quot;fulfilled&quot;);var e=Il;Il=null,ol=0,ul=null;for(var s=0;s&lt;e.length;s++)(0,e[s])()}}function cg(e,s){var a=[],n={status:&quot;pending&quot;,value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){n.status=&quot;fulfilled&quot;,n.value=s;for(var o=0;o&lt;a.length;o++)(0,a[o])(s)},function(o){for(n.status=&quot;rejected&quot;,n.reason=o,o=0;o&lt;a.length;o++)(0,a[o])(void 0)}),n}var dm=_.S;_.S=function(e,s){Ff=et(),typeof s==&quot;object&quot;&amp;&amp;s!==null&amp;&amp;typeof s.then==&quot;function&quot;&amp;&amp;ig(e,s),dm!==null&amp;&amp;dm(e,s)};var ka=D(null);function Tc(){var e=ka.current;return e!==null?e:Fe.pooledCache}function pr(e,s){s===null?I(ka,ka.current):I(ka,s.pool)}function mm(){var e=Tc();return e===null?null:{parent:ct._currentValue,pool:e}}var dl=Error(c(460)),zc=Error(c(474)),gr=Error(c(542)),br={then:function(){}};function fm(e){return e=e.status,e===&quot;fulfilled&quot;||e===&quot;rejected&quot;}function xm(e,s,a){switch(a=e[a],a===void 0?e.push(s):a!==s&amp;&amp;(s.then(Ss,Ss),s=a),s.status){case&quot;fulfilled&quot;:return s.value;case&quot;rejected&quot;:throw e=s.reason,pm(e),e;default:if(typeof s.status==&quot;string&quot;)s.then(Ss,Ss);else{if(e=Fe,e!==null&amp;&amp;100&lt;e.shellSuspendCounter)throw Error(c(482));e=s,e.status=&quot;pending&quot;,e.then(function(n){if(s.status===&quot;pending&quot;){var o=s;o.status=&quot;fulfilled&quot;,o.value=n}},function(n){if(s.status===&quot;pending&quot;){var o=s;o.status=&quot;rejected&quot;,o.reason=n}})}switch(s.status){case&quot;fulfilled&quot;:return s.value;case&quot;rejected&quot;:throw e=s.reason,pm(e),e}throw za=s,dl}}function Ta(e){try{var s=e._init;return s(e._payload)}catch(a){throw a!==null&amp;&amp;typeof a==&quot;object&quot;&amp;&amp;typeof a.then==&quot;function&quot;?(za=a,dl):a}}var za=null;function hm(){if(za===null)throw Error(c(459));var e=za;return za=null,e}function pm(e){if(e===dl||e===gr)throw Error(c(483))}var ml=null,Wl=0;function jr(e){var s=Wl;return Wl+=1,ml===null&amp;&amp;(ml=[]),xm(ml,e,s)}function en(e,s){s=s.props.ref,e.ref=s!==void 0?s:null}function vr(e,s){throw s.$$typeof===y?Error(c(525)):(e=Object.prototype.toString.call(s),Error(c(31,e===&quot;[object Object]&quot;?&quot;object with keys {&quot;+Object.keys(s).join(&quot;, &quot;)+&quot;}&quot;:e)))}function gm(e){function s(Q,V){if(e){var W=Q.deletions;W===null?(Q.deletions=[V],Q.flags|=16):W.push(V)}}function a(Q,V){if(!e)return null;for(;V!==null;)s(Q,V),V=V.sibling;return null}function n(Q){for(var V=new Map;Q!==null;)Q.key!==null?V.set(Q.key,Q):V.set(Q.index,Q),Q=Q.sibling;return V}function o(Q,V){return Q=Cs(Q,V),Q.index=0,Q.sibling=null,Q}function u(Q,V,W){return Q.index=W,e?(W=Q.alternate,W!==null?(W=W.index,W&lt;V?(Q.flags|=67108866,V):W):(Q.flags|=67108866,V)):(Q.flags|=1048576,V)}function h(Q){return e&amp;&amp;Q.alternate===null&amp;&amp;(Q.flags|=67108866),Q}function N(Q,V,W,oe){return V===null||V.tag!==6?(V=jc(W,Q.mode,oe),V.return=Q,V):(V=o(V,W),V.return=Q,V)}function O(Q,V,W,oe){var ve=W.type;return ve===A?re(Q,V,W.props.children,oe,W.key):V!==null&amp;&amp;(V.elementType===ve||typeof ve==&quot;object&quot;&amp;&amp;ve!==null&amp;&amp;ve.$$typeof===Z&amp;&amp;Ta(ve)===V.type)?(V=o(V,W.props),en(V,W),V.return=Q,V):(V=mr(W.type,W.key,W.props,null,Q.mode,oe),en(V,W),V.return=Q,V)}function te(Q,V,W,oe){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=vc(W,Q.mode,oe),V.return=Q,V):(V=o(V,W.children||[]),V.return=Q,V)}function re(Q,V,W,oe,ve){return V===null||V.tag!==7?(V=wa(W,Q.mode,oe,ve),V.return=Q,V):(V=o(V,W),V.return=Q,V)}function ue(Q,V,W){if(typeof V==&quot;string&quot;&amp;&amp;V!==&quot;&quot;||typeof V==&quot;number&quot;||typeof V==&quot;bigint&quot;)return V=jc(&quot;&quot;+V,Q.mode,W),V.return=Q,V;if(typeof V==&quot;object&quot;&amp;&amp;V!==null){switch(V.$$typeof){case C:return W=mr(V.type,V.key,V.props,null,Q.mode,W),en(W,V),W.return=Q,W;case M:return V=vc(V,Q.mode,W),V.return=Q,V;case Z:return V=Ta(V),ue(Q,V,W)}if(q(V)||le(V))return V=wa(V,Q.mode,W,null),V.return=Q,V;if(typeof V.then==&quot;function&quot;)return ue(Q,jr(V),W);if(V.$$typeof===T)return ue(Q,hr(Q,V),W);vr(Q,V)}return null}function se(Q,V,W,oe){var ve=V!==null?V.key:null;if(typeof W==&quot;string&quot;&amp;&amp;W!==&quot;&quot;||typeof W==&quot;number&quot;||typeof W==&quot;bigint&quot;)return ve!==null?null:N(Q,V,&quot;&quot;+W,oe);if(typeof W==&quot;object&quot;&amp;&amp;W!==null){switch(W.$$typeof){case C:return W.key===ve?O(Q,V,W,oe):null;case M:return W.key===ve?te(Q,V,W,oe):null;case Z:return W=Ta(W),se(Q,V,W,oe)}if(q(W)||le(W))return ve!==null?null:re(Q,V,W,oe,null);if(typeof W.then==&quot;function&quot;)return se(Q,V,jr(W),oe);if(W.$$typeof===T)return se(Q,V,hr(Q,W),oe);vr(Q,W)}return null}function ae(Q,V,W,oe,ve){if(typeof oe==&quot;string&quot;&amp;&amp;oe!==&quot;&quot;||typeof oe==&quot;number&quot;||typeof oe==&quot;bigint&quot;)return Q=Q.get(W)||null,N(V,Q,&quot;&quot;+oe,ve);if(typeof oe==&quot;object&quot;&amp;&amp;oe!==null){switch(oe.$$typeof){case C:return Q=Q.get(oe.key===null?W:oe.key)||null,O(V,Q,oe,ve);case M:return Q=Q.get(oe.key===null?W:oe.key)||null,te(V,Q,oe,ve);case Z:return oe=Ta(oe),ae(Q,V,W,oe,ve)}if(q(oe)||le(oe))return Q=Q.get(W)||null,re(V,Q,oe,ve,null);if(typeof oe.then==&quot;function&quot;)return ae(Q,V,W,jr(oe),ve);if(oe.$$typeof===T)return ae(Q,V,W,hr(V,oe),ve);vr(V,oe)}return null}function pe(Q,V,W,oe){for(var ve=null,Be=null,ge=V,ze=V=0,Le=null;ge!==null&amp;&amp;ze&lt;W.length;ze++){ge.index&gt;ze?(Le=ge,ge=null):Le=ge.sibling;var He=se(Q,ge,W[ze],oe);if(He===null){ge===null&amp;&amp;(ge=Le);break}e&amp;&amp;ge&amp;&amp;He.alternate===null&amp;&amp;s(Q,ge),V=u(He,V,ze),Be===null?ve=He:Be.sibling=He,Be=He,ge=Le}if(ze===W.length)return a(Q,ge),$e&amp;&amp;Es(Q,ze),ve;if(ge===null){for(;ze&lt;W.length;ze++)ge=ue(Q,W[ze],oe),ge!==null&amp;&amp;(V=u(ge,V,ze),Be===null?ve=ge:Be.sibling=ge,Be=ge);return $e&amp;&amp;Es(Q,ze),ve}for(ge=n(ge);ze&lt;W.length;ze++)Le=ae(ge,Q,ze,W[ze],oe),Le!==null&amp;&amp;(e&amp;&amp;Le.alternate!==null&amp;&amp;ge.delete(Le.key===null?ze:Le.key),V=u(Le,V,ze),Be===null?ve=Le:Be.sibling=Le,Be=Le);return e&amp;&amp;ge.forEach(function(pa){return s(Q,pa)}),$e&amp;&amp;Es(Q,ze),ve}function ye(Q,V,W,oe){if(W==null)throw Error(c(151));for(var ve=null,Be=null,ge=V,ze=V=0,Le=null,He=W.next();ge!==null&amp;&amp;!He.done;ze++,He=W.next()){ge.index&gt;ze?(Le=ge,ge=null):Le=ge.sibling;var pa=se(Q,ge,He.value,oe);if(pa===null){ge===null&amp;&amp;(ge=Le);break}e&amp;&amp;ge&amp;&amp;pa.alternate===null&amp;&amp;s(Q,ge),V=u(pa,V,ze),Be===null?ve=pa:Be.sibling=pa,Be=pa,ge=Le}if(He.done)return a(Q,ge),$e&amp;&amp;Es(Q,ze),ve;if(ge===null){for(;!He.done;ze++,He=W.next())He=ue(Q,He.value,oe),He!==null&amp;&amp;(V=u(He,V,ze),Be===null?ve=He:Be.sibling=He,Be=He);return $e&amp;&amp;Es(Q,ze),ve}for(ge=n(ge);!He.done;ze++,He=W.next())He=ae(ge,Q,ze,He.value,oe),He!==null&amp;&amp;(e&amp;&amp;He.alternate!==null&amp;&amp;ge.delete(He.key===null?ze:He.key),V=u(He,V,ze),Be===null?ve=He:Be.sibling=He,Be=He);return e&amp;&amp;ge.forEach(function(jb){return s(Q,jb)}),$e&amp;&amp;Es(Q,ze),ve}function Pe(Q,V,W,oe){if(typeof W==&quot;object&quot;&amp;&amp;W!==null&amp;&amp;W.type===A&amp;&amp;W.key===null&amp;&amp;(W=W.props.children),typeof W==&quot;object&quot;&amp;&amp;W!==null){switch(W.$$typeof){case C:e:{for(var ve=W.key;V!==null;){if(V.key===ve){if(ve=W.type,ve===A){if(V.tag===7){a(Q,V.sibling),oe=o(V,W.props.children),oe.return=Q,Q=oe;break e}}else if(V.elementType===ve||typeof ve==&quot;object&quot;&amp;&amp;ve!==null&amp;&amp;ve.$$typeof===Z&amp;&amp;Ta(ve)===V.type){a(Q,V.sibling),oe=o(V,W.props),en(oe,W),oe.return=Q,Q=oe;break e}a(Q,V);break}else s(Q,V);V=V.sibling}W.type===A?(oe=wa(W.props.children,Q.mode,oe,W.key),oe.return=Q,Q=oe):(oe=mr(W.type,W.key,W.props,null,Q.mode,oe),en(oe,W),oe.return=Q,Q=oe)}return h(Q);case M:e:{for(ve=W.key;V!==null;){if(V.key===ve)if(V.tag===4&amp;&amp;V.stateNode.containerInfo===W.containerInfo&amp;&amp;V.stateNode.implementation===W.implementation){a(Q,V.sibling),oe=o(V,W.children||[]),oe.return=Q,Q=oe;break e}else{a(Q,V);break}else s(Q,V);V=V.sibling}oe=vc(W,Q.mode,oe),oe.return=Q,Q=oe}return h(Q);case Z:return W=Ta(W),Pe(Q,V,W,oe)}if(q(W))return pe(Q,V,W,oe);if(le(W)){if(ve=le(W),typeof ve!=&quot;function&quot;)throw Error(c(150));return W=ve.call(W),ye(Q,V,W,oe)}if(typeof W.then==&quot;function&quot;)return Pe(Q,V,jr(W),oe);if(W.$$typeof===T)return Pe(Q,V,hr(Q,W),oe);vr(Q,W)}return typeof W==&quot;string&quot;&amp;&amp;W!==&quot;&quot;||typeof W==&quot;number&quot;||typeof W==&quot;bigint&quot;?(W=&quot;&quot;+W,V!==null&amp;&amp;V.tag===6?(a(Q,V.sibling),oe=o(V,W),oe.return=Q,Q=oe):(a(Q,V),oe=jc(W,Q.mode,oe),oe.return=Q,Q=oe),h(Q)):a(Q,V)}return function(Q,V,W,oe){try{Wl=0;var ve=Pe(Q,V,W,oe);return ml=null,ve}catch(ge){if(ge===dl||ge===gr)throw ge;var Be=Vt(29,ge,null,Q.mode);return Be.lanes=oe,Be.return=Q,Be}finally{}}}var Ma=gm(!0),bm=gm(!1),Ws=!1;function Mc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Dc(e,s){e=e.updateQueue,s.updateQueue===e&amp;&amp;(s.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ea(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ta(e,s,a){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(Ye&amp;2)!==0){var o=n.pending;return o===null?s.next=s:(s.next=o.next,o.next=s),n.pending=s,s=dr(e),tm(e,null,a),s}return ur(e,n,s,a),dr(e)}function tn(e,s,a){if(s=s.updateQueue,s!==null&amp;&amp;(s=s.shared,(a&amp;4194048)!==0)){var n=s.lanes;n&amp;=e.pendingLanes,a|=n,s.lanes=a,od(e,a)}}function Rc(e,s){var a=e.updateQueue,n=e.alternate;if(n!==null&amp;&amp;(n=n.updateQueue,a===n)){var o=null,u=null;if(a=a.firstBaseUpdate,a!==null){do{var h={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};u===null?o=u=h:u=u.next=h,a=a.next}while(a!==null);u===null?o=u=s:u=u.next=s}else o=u=s;a={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:u,shared:n.shared,callbacks:n.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=s:e.next=s,a.lastBaseUpdate=s}var Oc=!1;function sn(){if(Oc){var e=ul;if(e!==null)throw e}}function an(e,s,a,n){Oc=!1;var o=e.updateQueue;Ws=!1;var u=o.firstBaseUpdate,h=o.lastBaseUpdate,N=o.shared.pending;if(N!==null){o.shared.pending=null;var O=N,te=O.next;O.next=null,h===null?u=te:h.next=te,h=O;var re=e.alternate;re!==null&amp;&amp;(re=re.updateQueue,N=re.lastBaseUpdate,N!==h&amp;&amp;(N===null?re.firstBaseUpdate=te:N.next=te,re.lastBaseUpdate=O))}if(u!==null){var ue=o.baseState;h=0,re=te=O=null,N=u;do{var se=N.lane&amp;-536870913,ae=se!==N.lane;if(ae?(Oe&amp;se)===se:(n&amp;se)===se){se!==0&amp;&amp;se===ol&amp;&amp;(Oc=!0),re!==null&amp;&amp;(re=re.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var pe=e,ye=N;se=s;var Pe=a;switch(ye.tag){case 1:if(pe=ye.payload,typeof pe==&quot;function&quot;){ue=pe.call(Pe,ue,se);break e}ue=pe;break e;case 3:pe.flags=pe.flags&amp;-65537|128;case 0:if(pe=ye.payload,se=typeof pe==&quot;function&quot;?pe.call(Pe,ue,se):pe,se==null)break e;ue=j({},ue,se);break e;case 2:Ws=!0}}se=N.callback,se!==null&amp;&amp;(e.flags|=64,ae&amp;&amp;(e.flags|=8192),ae=o.callbacks,ae===null?o.callbacks=[se]:ae.push(se))}else ae={lane:se,tag:N.tag,payload:N.payload,callback:N.callback,next:null},re===null?(te=re=ae,O=ue):re=re.next=ae,h|=se;if(N=N.next,N===null){if(N=o.shared.pending,N===null)break;ae=N,N=ae.next,ae.next=null,o.lastBaseUpdate=ae,o.shared.pending=null}}while(!0);re===null&amp;&amp;(O=ue),o.baseState=O,o.firstBaseUpdate=te,o.lastBaseUpdate=re,u===null&amp;&amp;(o.shared.lanes=0),ra|=h,e.lanes=h,e.memoizedState=ue}}function jm(e,s){if(typeof e!=&quot;function&quot;)throw Error(c(191,e));e.call(s)}function vm(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e&lt;a.length;e++)jm(a[e],s)}var fl=D(null),yr=D(0);function ym(e,s){e=$s,I(yr,e),I(fl,s),$s=e|s.baseLanes}function Lc(){I(yr,$s),I(fl,fl.current)}function Uc(){$s=yr.current,J(fl),J(yr)}var Yt=D(null),as=null;function sa(e){var s=e.alternate;I(rt,rt.current&amp;1),I(Yt,e),as===null&amp;&amp;(s===null||fl.current!==null||s.memoizedState!==null)&amp;&amp;(as=e)}function $c(e){I(rt,rt.current),I(Yt,e),as===null&amp;&amp;(as=e)}function Nm(e){e.tag===22?(I(rt,rt.current),I(Yt,e),as===null&amp;&amp;(as=e)):aa()}function aa(){I(rt,rt.current),I(Yt,Yt.current)}function Gt(e){J(Yt),as===e&amp;&amp;(as=null),J(rt)}var rt=D(0);function Nr(e){for(var s=e;s!==null;){if(s.tag===13){var a=s.memoizedState;if(a!==null&amp;&amp;(a=a.dehydrated,a===null||Zo(a)||Qo(a)))return s}else if(s.tag===19&amp;&amp;(s.memoizedProps.revealOrder===&quot;forwards&quot;||s.memoizedProps.revealOrder===&quot;backwards&quot;||s.memoizedProps.revealOrder===&quot;unstable_legacy-backwards&quot;||s.memoizedProps.revealOrder===&quot;together&quot;)){if((s.flags&amp;128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)break;for(;s.sibling===null;){if(s.return===null||s.return===e)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Ts=0,Te=null,Qe=null,ot=null,_r=!1,xl=!1,Da=!1,Sr=0,ln=0,hl=null,og=0;function at(){throw Error(c(321))}function qc(e,s){if(s===null)return!1;for(var a=0;a&lt;s.length&amp;&amp;a&lt;e.length;a++)if(!Ht(e[a],s[a]))return!1;return!0}function Bc(e,s,a,n,o,u){return Ts=u,Te=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,_.H=e===null||e.memoizedState===null?nf:to,Da=!1,u=a(n,o),Da=!1,xl&amp;&amp;(u=Sm(s,a,n,o)),_m(e),u}function _m(e){_.H=cn;var s=Qe!==null&amp;&amp;Qe.next!==null;if(Ts=0,ot=Qe=Te=null,_r=!1,ln=0,hl=null,s)throw Error(c(300));e===null||ut||(e=e.dependencies,e!==null&amp;&amp;xr(e)&amp;&amp;(ut=!0))}function Sm(e,s,a,n){Te=e;var o=0;do{if(xl&amp;&amp;(hl=null),ln=0,xl=!1,25&lt;=o)throw Error(c(301));if(o+=1,ot=Qe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&amp;&amp;(u.memoCache.index=0)}_.H=rf,u=s(a,n)}while(xl);return u}function ug(){var e=_.H,s=e.useState()[0];return s=typeof s.then==&quot;function&quot;?nn(s):s,e=e.useState()[0],(Qe!==null?Qe.memoizedState:null)!==e&amp;&amp;(Te.flags|=1024),s}function Hc(){var e=Sr!==0;return Sr=0,e}function Vc(e,s,a){s.updateQueue=e.updateQueue,s.flags&amp;=-2053,e.lanes&amp;=~a}function Yc(e){if(_r){for(e=e.memoizedState;e!==null;){var s=e.queue;s!==null&amp;&amp;(s.pending=null),e=e.next}_r=!1}Ts=0,ot=Qe=Te=null,xl=!1,ln=Sr=0,hl=null}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ot===null?Te.memoizedState=ot=e:ot=ot.next=e,ot}function it(){if(Qe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Qe.next;var s=ot===null?Te.memoizedState:ot.next;if(s!==null)ot=s,Qe=e;else{if(e===null)throw Te.alternate===null?Error(c(467)):Error(c(310));Qe=e,e={memoizedState:Qe.memoizedState,baseState:Qe.baseState,baseQueue:Qe.baseQueue,queue:Qe.queue,next:null},ot===null?Te.memoizedState=ot=e:ot=ot.next=e}return ot}function wr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nn(e){var s=ln;return ln+=1,hl===null&amp;&amp;(hl=[]),e=xm(hl,e,s),s=Te,(ot===null?s.memoizedState:ot.next)===null&amp;&amp;(s=s.alternate,_.H=s===null||s.memoizedState===null?nf:to),e}function Cr(e){if(e!==null&amp;&amp;typeof e==&quot;object&quot;){if(typeof e.then==&quot;function&quot;)return nn(e);if(e.$$typeof===T)return yt(e)}throw Error(c(438,String(e)))}function Gc(e){var s=null,a=Te.updateQueue;if(a!==null&amp;&amp;(s=a.memoCache),s==null){var n=Te.alternate;n!==null&amp;&amp;(n=n.updateQueue,n!==null&amp;&amp;(n=n.memoCache,n!=null&amp;&amp;(s={data:n.data.map(function(o){return o.slice()}),index:0})))}if(s==null&amp;&amp;(s={data:[],index:0}),a===null&amp;&amp;(a=wr(),Te.updateQueue=a),a.memoCache=s,a=s.data[s.index],a===void 0)for(a=s.data[s.index]=Array(e),n=0;n&lt;e;n++)a[n]=w;return s.index++,a}function zs(e,s){return typeof s==&quot;function&quot;?s(e):s}function Er(e){var s=it();return Zc(s,Qe,e)}function Zc(e,s,a){var n=e.queue;if(n===null)throw Error(c(311));n.lastRenderedReducer=a;var o=e.baseQueue,u=n.pending;if(u!==null){if(o!==null){var h=o.next;o.next=u.next,u.next=h}s.baseQueue=o=u,n.pending=null}if(u=e.baseState,o===null)e.memoizedState=u;else{s=o.next;var N=h=null,O=null,te=s,re=!1;do{var ue=te.lane&amp;-536870913;if(ue!==te.lane?(Oe&amp;ue)===ue:(Ts&amp;ue)===ue){var se=te.revertLane;if(se===0)O!==null&amp;&amp;(O=O.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ue===ol&amp;&amp;(re=!0);else if((Ts&amp;se)===se){te=te.next,se===ol&amp;&amp;(re=!0);continue}else ue={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},O===null?(N=O=ue,h=u):O=O.next=ue,Te.lanes|=se,ra|=se;ue=te.action,Da&amp;&amp;a(u,ue),u=te.hasEagerState?te.eagerState:a(u,ue)}else se={lane:ue,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},O===null?(N=O=se,h=u):O=O.next=se,Te.lanes|=ue,ra|=ue;te=te.next}while(te!==null&amp;&amp;te!==s);if(O===null?h=u:O.next=N,!Ht(u,e.memoizedState)&amp;&amp;(ut=!0,re&amp;&amp;(a=ul,a!==null)))throw a;e.memoizedState=u,e.baseState=h,e.baseQueue=O,n.lastRenderedState=u}return o===null&amp;&amp;(n.lanes=0),[e.memoizedState,n.dispatch]}function Qc(e){var s=it(),a=s.queue;if(a===null)throw Error(c(311));a.lastRenderedReducer=e;var n=a.dispatch,o=a.pending,u=s.memoizedState;if(o!==null){a.pending=null;var h=o=o.next;do u=e(u,h.action),h=h.next;while(h!==o);Ht(u,s.memoizedState)||(ut=!0),s.memoizedState=u,s.baseQueue===null&amp;&amp;(s.baseState=u),a.lastRenderedState=u}return[u,n]}function wm(e,s,a){var n=Te,o=it(),u=$e;if(u){if(a===void 0)throw Error(c(407));a=a()}else a=s();var h=!Ht((Qe||o).memoizedState,a);if(h&amp;&amp;(o.memoizedState=a,ut=!0),o=o.queue,Fc(Am.bind(null,n,o,e),[e]),o.getSnapshot!==s||h||ot!==null&amp;&amp;ot.memoizedState.tag&amp;1){if(n.flags|=2048,pl(9,{destroy:void 0},Em.bind(null,n,o,a,s),null),Fe===null)throw Error(c(349));u||(Ts&amp;127)!==0||Cm(n,s,a)}return a}function Cm(e,s,a){e.flags|=16384,e={getSnapshot:s,value:a},s=Te.updateQueue,s===null?(s=wr(),Te.updateQueue=s,s.stores=[e]):(a=s.stores,a===null?s.stores=[e]:a.push(e))}function Em(e,s,a,n){s.value=a,s.getSnapshot=n,km(s)&amp;&amp;Tm(e)}function Am(e,s,a){return a(function(){km(s)&amp;&amp;Tm(e)})}function km(e){var s=e.getSnapshot;e=e.value;try{var a=s();return!Ht(e,a)}catch{return!0}}function Tm(e){var s=Sa(e,2);s!==null&amp;&amp;qt(s,e,2)}function Xc(e){var s=kt();if(typeof e==&quot;function&quot;){var a=e;if(e=a(),Da){ke(!0);try{a()}finally{ke(!1)}}}return s.memoizedState=s.baseState=e,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:e},s}function zm(e,s,a,n){return e.baseState=a,Zc(e,Qe,typeof n==&quot;function&quot;?n:zs)}function dg(e,s,a,n,o){if(Tr(e))throw Error(c(485));if(e=s.action,e!==null){var u={payload:o,action:e,next:null,isTransition:!0,status:&quot;pending&quot;,value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};_.T!==null?a(!0):u.isTransition=!1,n(u),a=s.pending,a===null?(u.next=s.pending=u,Mm(s,u)):(u.next=a.next,s.pending=a.next=u)}}function Mm(e,s){var a=s.action,n=s.payload,o=e.state;if(s.isTransition){var u=_.T,h={};_.T=h;try{var N=a(o,n),O=_.S;O!==null&amp;&amp;O(h,N),Dm(e,s,N)}catch(te){Pc(e,s,te)}finally{u!==null&amp;&amp;h.types!==null&amp;&amp;(u.types=h.types),_.T=u}}else try{u=a(o,n),Dm(e,s,u)}catch(te){Pc(e,s,te)}}function Dm(e,s,a){a!==null&amp;&amp;typeof a==&quot;object&quot;&amp;&amp;typeof a.then==&quot;function&quot;?a.then(function(n){Rm(e,s,n)},function(n){return Pc(e,s,n)}):Rm(e,s,a)}function Rm(e,s,a){s.status=&quot;fulfilled&quot;,s.value=a,Om(s),e.state=a,s=e.pending,s!==null&amp;&amp;(a=s.next,a===s?e.pending=null:(a=a.next,s.next=a,Mm(e,a)))}function Pc(e,s,a){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do s.status=&quot;rejected&quot;,s.reason=a,Om(s),s=s.next;while(s!==n)}e.action=null}function Om(e){e=e.listeners;for(var s=0;s&lt;e.length;s++)(0,e[s])()}function Lm(e,s){return s}function Um(e,s){if($e){var a=Fe.formState;if(a!==null){e:{var n=Te;if($e){if(Ie){t:{for(var o=Ie,u=ss;o.nodeType!==8;){if(!u){o=null;break t}if(o=ls(o.nextSibling),o===null){o=null;break t}}u=o.data,o=u===&quot;F!&quot;||u===&quot;F&quot;?o:null}if(o){Ie=ls(o.nextSibling),n=o.data===&quot;F!&quot;;break e}}Js(n)}n=!1}n&amp;&amp;(s=a[0])}}return a=kt(),a.memoizedState=a.baseState=s,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lm,lastRenderedState:s},a.queue=n,a=sf.bind(null,Te,n),n.dispatch=a,n=Xc(!1),u=eo.bind(null,Te,!1,n.queue),n=kt(),o={state:s,dispatch:null,action:e,pending:null},n.queue=o,a=dg.bind(null,Te,o,u,a),o.dispatch=a,n.memoizedState=e,[s,a,!1]}function $m(e){var s=it();return qm(s,Qe,e)}function qm(e,s,a){if(s=Zc(e,s,Lm)[0],e=Er(zs)[0],typeof s==&quot;object&quot;&amp;&amp;s!==null&amp;&amp;typeof s.then==&quot;function&quot;)try{var n=nn(s)}catch(h){throw h===dl?gr:h}else n=s;s=it();var o=s.queue,u=o.dispatch;return a!==s.memoizedState&amp;&amp;(Te.flags|=2048,pl(9,{destroy:void 0},mg.bind(null,o,a),null)),[n,u,e]}function mg(e,s){e.action=s}function Bm(e){var s=it(),a=Qe;if(a!==null)return qm(s,a,e);it(),s=s.memoizedState,a=it();var n=a.queue.dispatch;return a.memoizedState=e,[s,n,!1]}function pl(e,s,a,n){return e={tag:e,create:a,deps:n,inst:s,next:null},s=Te.updateQueue,s===null&amp;&amp;(s=wr(),Te.updateQueue=s),a=s.lastEffect,a===null?s.lastEffect=e.next=e:(n=a.next,a.next=e,e.next=n,s.lastEffect=e),e}function Hm(){return it().memoizedState}function Ar(e,s,a,n){var o=kt();Te.flags|=e,o.memoizedState=pl(1|s,{destroy:void 0},a,n===void 0?null:n)}function kr(e,s,a,n){var o=it();n=n===void 0?null:n;var u=o.memoizedState.inst;Qe!==null&amp;&amp;n!==null&amp;&amp;qc(n,Qe.memoizedState.deps)?o.memoizedState=pl(s,u,a,n):(Te.flags|=e,o.memoizedState=pl(1|s,u,a,n))}function Vm(e,s){Ar(8390656,8,e,s)}function Fc(e,s){kr(2048,8,e,s)}function fg(e){Te.flags|=4;var s=Te.updateQueue;if(s===null)s=wr(),Te.updateQueue=s,s.events=[e];else{var a=s.events;a===null?s.events=[e]:a.push(e)}}function Ym(e){var s=it().memoizedState;return fg({ref:s,nextImpl:e}),function(){if((Ye&amp;2)!==0)throw Error(c(440));return s.impl.apply(void 0,arguments)}}function Gm(e,s){return kr(4,2,e,s)}function Zm(e,s){return kr(4,4,e,s)}function Qm(e,s){if(typeof s==&quot;function&quot;){e=e();var a=s(e);return function(){typeof a==&quot;function&quot;?a():s(null)}}if(s!=null)return e=e(),s.current=e,function(){s.current=null}}function Xm(e,s,a){a=a!=null?a.concat([e]):null,kr(4,4,Qm.bind(null,s,e),a)}function Kc(){}function Pm(e,s){var a=it();s=s===void 0?null:s;var n=a.memoizedState;return s!==null&amp;&amp;qc(s,n[1])?n[0]:(a.memoizedState=[e,s],e)}function Fm(e,s){var a=it();s=s===void 0?null:s;var n=a.memoizedState;if(s!==null&amp;&amp;qc(s,n[1]))return n[0];if(n=e(),Da){ke(!0);try{e()}finally{ke(!1)}}return a.memoizedState=[n,s],n}function Jc(e,s,a){return a===void 0||(Ts&amp;1073741824)!==0&amp;&amp;(Oe&amp;261930)===0?e.memoizedState=s:(e.memoizedState=a,e=Jf(),Te.lanes|=e,ra|=e,a)}function Km(e,s,a,n){return Ht(a,s)?a:fl.current!==null?(e=Jc(e,a,n),Ht(e,s)||(ut=!0),e):(Ts&amp;42)===0||(Ts&amp;1073741824)!==0&amp;&amp;(Oe&amp;261930)===0?(ut=!0,e.memoizedState=a):(e=Jf(),Te.lanes|=e,ra|=e,s)}function Jm(e,s,a,n,o){var u=z.p;z.p=u!==0&amp;&amp;8&gt;u?u:8;var h=_.T,N={};_.T=N,eo(e,!1,s,a);try{var O=o(),te=_.S;if(te!==null&amp;&amp;te(N,O),O!==null&amp;&amp;typeof O==&quot;object&quot;&amp;&amp;typeof O.then==&quot;function&quot;){var re=cg(O,n);rn(e,s,re,Xt(e))}else rn(e,s,n,Xt(e))}catch(ue){rn(e,s,{then:function(){},status:&quot;rejected&quot;,reason:ue},Xt())}finally{z.p=u,h!==null&amp;&amp;N.types!==null&amp;&amp;(h.types=N.types),_.T=h}}function xg(){}function Ic(e,s,a,n){if(e.tag!==5)throw Error(c(476));var o=Im(e).queue;Jm(e,o,s,R,a===null?xg:function(){return Wm(e),a(n)})}function Im(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:R},next:null};var a={};return s.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:a},next:null},e.memoizedState=s,e=e.alternate,e!==null&amp;&amp;(e.memoizedState=s),s}function Wm(e){var s=Im(e);s.next===null&amp;&amp;(s=e.alternate.memoizedState),rn(e,s.next.queue,{},Xt())}function Wc(){return yt(Sn)}function ef(){return it().memoizedState}function tf(){return it().memoizedState}function hg(e){for(var s=e.return;s!==null;){switch(s.tag){case 24:case 3:var a=Xt();e=ea(a);var n=ta(s,e,a);n!==null&amp;&amp;(qt(n,s,a),tn(n,s,a)),s={cache:Ac()},e.payload=s;return}s=s.return}}function pg(e,s,a){var n=Xt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Tr(e)?af(s,a):(a=gc(e,s,a,n),a!==null&amp;&amp;(qt(a,e,n),lf(a,s,n)))}function sf(e,s,a){var n=Xt();rn(e,s,a,n)}function rn(e,s,a,n){var o={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Tr(e))af(s,o);else{var u=e.alternate;if(e.lanes===0&amp;&amp;(u===null||u.lanes===0)&amp;&amp;(u=s.lastRenderedReducer,u!==null))try{var h=s.lastRenderedState,N=u(h,a);if(o.hasEagerState=!0,o.eagerState=N,Ht(N,h))return ur(e,s,o,0),Fe===null&amp;&amp;or(),!1}catch{}finally{}if(a=gc(e,s,o,n),a!==null)return qt(a,e,n),lf(a,s,n),!0}return!1}function eo(e,s,a,n){if(n={lane:2,revertLane:Do(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Tr(e)){if(s)throw Error(c(479))}else s=gc(e,a,n,2),s!==null&amp;&amp;qt(s,e,2)}function Tr(e){var s=e.alternate;return e===Te||s!==null&amp;&amp;s===Te}function af(e,s){xl=_r=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function lf(e,s,a){if((a&amp;4194048)!==0){var n=s.lanes;n&amp;=e.pendingLanes,a|=n,s.lanes=a,od(e,a)}}var cn={readContext:yt,use:Cr,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at};cn.useEffectEvent=at;var nf={readContext:yt,use:Cr,useCallback:function(e,s){return kt().memoizedState=[e,s===void 0?null:s],e},useContext:yt,useEffect:Vm,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,Ar(4194308,4,Qm.bind(null,s,e),a)},useLayoutEffect:function(e,s){return Ar(4194308,4,e,s)},useInsertionEffect:function(e,s){Ar(4,2,e,s)},useMemo:function(e,s){var a=kt();s=s===void 0?null:s;var n=e();if(Da){ke(!0);try{e()}finally{ke(!1)}}return a.memoizedState=[n,s],n},useReducer:function(e,s,a){var n=kt();if(a!==void 0){var o=a(s);if(Da){ke(!0);try{a(s)}finally{ke(!1)}}}else o=s;return n.memoizedState=n.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},n.queue=e,e=e.dispatch=pg.bind(null,Te,e),[n.memoizedState,e]},useRef:function(e){var s=kt();return e={current:e},s.memoizedState=e},useState:function(e){e=Xc(e);var s=e.queue,a=sf.bind(null,Te,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:Kc,useDeferredValue:function(e,s){var a=kt();return Jc(a,e,s)},useTransition:function(){var e=Xc(!1);return e=Jm.bind(null,Te,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,s,a){var n=Te,o=kt();if($e){if(a===void 0)throw Error(c(407));a=a()}else{if(a=s(),Fe===null)throw Error(c(349));(Oe&amp;127)!==0||Cm(n,s,a)}o.memoizedState=a;var u={value:a,getSnapshot:s};return o.queue=u,Vm(Am.bind(null,n,u,e),[e]),n.flags|=2048,pl(9,{destroy:void 0},Em.bind(null,n,u,a,s),null),a},useId:function(){var e=kt(),s=Fe.identifierPrefix;if($e){var a=bs,n=gs;a=(n&amp;~(1&lt;&lt;32-ne(n)-1)).toString(32)+a,s=&quot;_&quot;+s+&quot;R_&quot;+a,a=Sr++,0&lt;a&amp;&amp;(s+=&quot;H&quot;+a.toString(32)),s+=&quot;_&quot;}else a=og++,s=&quot;_&quot;+s+&quot;r_&quot;+a.toString(32)+&quot;_&quot;;return e.memoizedState=s},useHostTransitionStatus:Wc,useFormState:Um,useActionState:Um,useOptimistic:function(e){var s=kt();s.memoizedState=s.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=a,s=eo.bind(null,Te,!0,a),a.dispatch=s,[e,s]},useMemoCache:Gc,useCacheRefresh:function(){return kt().memoizedState=hg.bind(null,Te)},useEffectEvent:function(e){var s=kt(),a={impl:e};return s.memoizedState=a,function(){if((Ye&amp;2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}},to={readContext:yt,use:Cr,useCallback:Pm,useContext:yt,useEffect:Fc,useImperativeHandle:Xm,useInsertionEffect:Gm,useLayoutEffect:Zm,useMemo:Fm,useReducer:Er,useRef:Hm,useState:function(){return Er(zs)},useDebugValue:Kc,useDeferredValue:function(e,s){var a=it();return Km(a,Qe.memoizedState,e,s)},useTransition:function(){var e=Er(zs)[0],s=it().memoizedState;return[typeof e==&quot;boolean&quot;?e:nn(e),s]},useSyncExternalStore:wm,useId:ef,useHostTransitionStatus:Wc,useFormState:$m,useActionState:$m,useOptimistic:function(e,s){var a=it();return zm(a,Qe,e,s)},useMemoCache:Gc,useCacheRefresh:tf};to.useEffectEvent=Ym;var rf={readContext:yt,use:Cr,useCallback:Pm,useContext:yt,useEffect:Fc,useImperativeHandle:Xm,useInsertionEffect:Gm,useLayoutEffect:Zm,useMemo:Fm,useReducer:Qc,useRef:Hm,useState:function(){return Qc(zs)},useDebugValue:Kc,useDeferredValue:function(e,s){var a=it();return Qe===null?Jc(a,e,s):Km(a,Qe.memoizedState,e,s)},useTransition:function(){var e=Qc(zs)[0],s=it().memoizedState;return[typeof e==&quot;boolean&quot;?e:nn(e),s]},useSyncExternalStore:wm,useId:ef,useHostTransitionStatus:Wc,useFormState:Bm,useActionState:Bm,useOptimistic:function(e,s){var a=it();return Qe!==null?zm(a,Qe,e,s):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Gc,useCacheRefresh:tf};rf.useEffectEvent=Ym;function so(e,s,a,n){s=e.memoizedState,a=a(n,s),a=a==null?s:j({},s,a),e.memoizedState=a,e.lanes===0&amp;&amp;(e.updateQueue.baseState=a)}var ao={enqueueSetState:function(e,s,a){e=e._reactInternals;var n=Xt(),o=ea(n);o.payload=s,a!=null&amp;&amp;(o.callback=a),s=ta(e,o,n),s!==null&amp;&amp;(qt(s,e,n),tn(s,e,n))},enqueueReplaceState:function(e,s,a){e=e._reactInternals;var n=Xt(),o=ea(n);o.tag=1,o.payload=s,a!=null&amp;&amp;(o.callback=a),s=ta(e,o,n),s!==null&amp;&amp;(qt(s,e,n),tn(s,e,n))},enqueueForceUpdate:function(e,s){e=e._reactInternals;var a=Xt(),n=ea(a);n.tag=2,s!=null&amp;&amp;(n.callback=s),s=ta(e,n,a),s!==null&amp;&amp;(qt(s,e,a),tn(s,e,a))}};function cf(e,s,a,n,o,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate==&quot;function&quot;?e.shouldComponentUpdate(n,u,h):s.prototype&amp;&amp;s.prototype.isPureReactComponent?!Xl(a,n)||!Xl(o,u):!0}function of(e,s,a,n){e=s.state,typeof s.componentWillReceiveProps==&quot;function&quot;&amp;&amp;s.componentWillReceiveProps(a,n),typeof s.UNSAFE_componentWillReceiveProps==&quot;function&quot;&amp;&amp;s.UNSAFE_componentWillReceiveProps(a,n),s.state!==e&amp;&amp;ao.enqueueReplaceState(s,s.state,null)}function Ra(e,s){var a=s;if(&quot;ref&quot;in s){a={};for(var n in s)n!==&quot;ref&quot;&amp;&amp;(a[n]=s[n])}if(e=e.defaultProps){a===s&amp;&amp;(a=j({},a));for(var o in e)a[o]===void 0&amp;&amp;(a[o]=e[o])}return a}function uf(e){cr(e)}function df(e){console.error(e)}function mf(e){cr(e)}function zr(e,s){try{var a=e.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(n){setTimeout(function(){throw n})}}function ff(e,s,a){try{var n=e.onCaughtError;n(a.value,{componentStack:a.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function lo(e,s,a){return a=ea(a),a.tag=3,a.payload={element:null},a.callback=function(){zr(e,s)},a}function xf(e){return e=ea(e),e.tag=3,e}function hf(e,s,a,n){var o=a.type.getDerivedStateFromError;if(typeof o==&quot;function&quot;){var u=n.value;e.payload=function(){return o(u)},e.callback=function(){ff(s,a,n)}}var h=a.stateNode;h!==null&amp;&amp;typeof h.componentDidCatch==&quot;function&quot;&amp;&amp;(e.callback=function(){ff(s,a,n),typeof o!=&quot;function&quot;&amp;&amp;(ia===null?ia=new Set([this]):ia.add(this));var N=n.stack;this.componentDidCatch(n.value,{componentStack:N!==null?N:&quot;&quot;})})}function gg(e,s,a,n,o){if(a.flags|=32768,n!==null&amp;&amp;typeof n==&quot;object&quot;&amp;&amp;typeof n.then==&quot;function&quot;){if(s=a.alternate,s!==null&amp;&amp;cl(s,a,o,!0),a=Yt.current,a!==null){switch(a.tag){case 31:case 13:return as===null?Yr():a.alternate===null&amp;&amp;lt===0&amp;&amp;(lt=3),a.flags&amp;=-257,a.flags|=65536,a.lanes=o,n===br?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([n]):s.add(n),To(e,n,o)),!1;case 22:return a.flags|=65536,n===br?a.flags|=16384:(s=a.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([n])},a.updateQueue=s):(a=s.retryQueue,a===null?s.retryQueue=new Set([n]):a.add(n)),To(e,n,o)),!1}throw Error(c(435,a.tag))}return To(e,n,o),Yr(),!1}if($e)return s=Yt.current,s!==null?((s.flags&amp;65536)===0&amp;&amp;(s.flags|=256),s.flags|=65536,s.lanes=o,n!==_c&amp;&amp;(e=Error(c(422),{cause:n}),Kl(Wt(e,a)))):(n!==_c&amp;&amp;(s=Error(c(423),{cause:n}),Kl(Wt(s,a))),e=e.current.alternate,e.flags|=65536,o&amp;=-o,e.lanes|=o,n=Wt(n,a),o=lo(e.stateNode,n,o),Rc(e,o),lt!==4&amp;&amp;(lt=2)),!1;var u=Error(c(520),{cause:n});if(u=Wt(u,a),pn===null?pn=[u]:pn.push(u),lt!==4&amp;&amp;(lt=2),s===null)return!0;n=Wt(n,a),a=s;do{switch(a.tag){case 3:return a.flags|=65536,e=o&amp;-o,a.lanes|=e,e=lo(a.stateNode,n,e),Rc(a,e),!1;case 1:if(s=a.type,u=a.stateNode,(a.flags&amp;128)===0&amp;&amp;(typeof s.getDerivedStateFromError==&quot;function&quot;||u!==null&amp;&amp;typeof u.componentDidCatch==&quot;function&quot;&amp;&amp;(ia===null||!ia.has(u))))return a.flags|=65536,o&amp;=-o,a.lanes|=o,o=xf(o),hf(o,e,a,n),Rc(a,o),!1}a=a.return}while(a!==null);return!1}var no=Error(c(461)),ut=!1;function Nt(e,s,a,n){s.child=e===null?bm(s,null,a,n):Ma(s,e.child,a,n)}function pf(e,s,a,n,o){a=a.render;var u=s.ref;if(&quot;ref&quot;in n){var h={};for(var N in n)N!==&quot;ref&quot;&amp;&amp;(h[N]=n[N])}else h=n;return Aa(s),n=Bc(e,s,a,h,u,o),N=Hc(),e!==null&amp;&amp;!ut?(Vc(e,s,o),Ms(e,s,o)):($e&amp;&amp;N&amp;&amp;yc(s),s.flags|=1,Nt(e,s,n,o),s.child)}function gf(e,s,a,n,o){if(e===null){var u=a.type;return typeof u==&quot;function&quot;&amp;&amp;!bc(u)&amp;&amp;u.defaultProps===void 0&amp;&amp;a.compare===null?(s.tag=15,s.type=u,bf(e,s,u,n,o)):(e=mr(a.type,null,n,s,s.mode,o),e.ref=s.ref,e.return=s,s.child=e)}if(u=e.child,!xo(e,o)){var h=u.memoizedProps;if(a=a.compare,a=a!==null?a:Xl,a(h,n)&amp;&amp;e.ref===s.ref)return Ms(e,s,o)}return s.flags|=1,e=Cs(u,n),e.ref=s.ref,e.return=s,s.child=e}function bf(e,s,a,n,o){if(e!==null){var u=e.memoizedProps;if(Xl(u,n)&amp;&amp;e.ref===s.ref)if(ut=!1,s.pendingProps=n=u,xo(e,o))(e.flags&amp;131072)!==0&amp;&amp;(ut=!0);else return s.lanes=e.lanes,Ms(e,s,o)}return ro(e,s,a,n,o)}function jf(e,s,a,n){var o=n.children,u=e!==null?e.memoizedState:null;if(e===null&amp;&amp;s.stateNode===null&amp;&amp;(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode===&quot;hidden&quot;){if((s.flags&amp;128)!==0){if(u=u!==null?u.baseLanes|a:a,e!==null){for(n=s.child=e.child,o=0;n!==null;)o=o|n.lanes|n.childLanes,n=n.sibling;n=o&amp;~u}else n=0,s.child=null;return vf(e,s,u,a,n)}if((a&amp;536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},e!==null&amp;&amp;pr(s,u!==null?u.cachePool:null),u!==null?ym(s,u):Lc(),Nm(s);else return n=s.lanes=536870912,vf(e,s,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(pr(s,u.cachePool),ym(s,u),aa(),s.memoizedState=null):(e!==null&amp;&amp;pr(s,null),Lc(),aa());return Nt(e,s,o,a),s.child}function on(e,s){return e!==null&amp;&amp;e.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function vf(e,s,a,n,o){var u=Tc();return u=u===null?null:{parent:ct._currentValue,pool:u},s.memoizedState={baseLanes:a,cachePool:u},e!==null&amp;&amp;pr(s,null),Lc(),Nm(s),e!==null&amp;&amp;cl(e,s,n,!0),s.childLanes=o,null}function Mr(e,s){return s=Rr({mode:s.mode,children:s.children},e.mode),s.ref=e.ref,e.child=s,s.return=e,s}function yf(e,s,a){return Ma(s,e.child,null,a),e=Mr(s,s.pendingProps),e.flags|=2,Gt(s),s.memoizedState=null,e}function bg(e,s,a){var n=s.pendingProps,o=(s.flags&amp;128)!==0;if(s.flags&amp;=-129,e===null){if($e){if(n.mode===&quot;hidden&quot;)return e=Mr(s,n),s.lanes=536870912,on(null,e);if($c(s),(e=Ie)?(e=Dx(e,ss),e=e!==null&amp;&amp;e.data===&quot;&amp;&quot;?e:null,e!==null&amp;&amp;(s.memoizedState={dehydrated:e,treeContext:Fs!==null?{id:gs,overflow:bs}:null,retryLane:536870912,hydrationErrors:null},a=am(e),a.return=s,s.child=a,vt=s,Ie=null)):e=null,e===null)throw Js(s);return s.lanes=536870912,null}return Mr(s,n)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if($c(s),o)if(s.flags&amp;256)s.flags&amp;=-257,s=yf(e,s,a);else if(s.memoizedState!==null)s.child=e.child,s.flags|=128,s=null;else throw Error(c(558));else if(ut||cl(e,s,a,!1),o=(a&amp;e.childLanes)!==0,ut||o){if(n=Fe,n!==null&amp;&amp;(h=ud(n,a),h!==0&amp;&amp;h!==u.retryLane))throw u.retryLane=h,Sa(e,h),qt(n,e,h),no;Yr(),s=yf(e,s,a)}else e=u.treeContext,Ie=ls(h.nextSibling),vt=s,$e=!0,Ks=null,ss=!1,e!==null&amp;&amp;rm(s,e),s=Mr(s,n),s.flags|=4096;return s}return e=Cs(e.child,{mode:n.mode,children:n.children}),e.ref=s.ref,s.child=e,e.return=s,e}function Dr(e,s){var a=s.ref;if(a===null)e!==null&amp;&amp;e.ref!==null&amp;&amp;(s.flags|=4194816);else{if(typeof a!=&quot;function&quot;&amp;&amp;typeof a!=&quot;object&quot;)throw Error(c(284));(e===null||e.ref!==a)&amp;&amp;(s.flags|=4194816)}}function ro(e,s,a,n,o){return Aa(s),a=Bc(e,s,a,n,void 0,o),n=Hc(),e!==null&amp;&amp;!ut?(Vc(e,s,o),Ms(e,s,o)):($e&amp;&amp;n&amp;&amp;yc(s),s.flags|=1,Nt(e,s,a,o),s.child)}function Nf(e,s,a,n,o,u){return Aa(s),s.updateQueue=null,a=Sm(s,n,a,o),_m(e),n=Hc(),e!==null&amp;&amp;!ut?(Vc(e,s,u),Ms(e,s,u)):($e&amp;&amp;n&amp;&amp;yc(s),s.flags|=1,Nt(e,s,a,u),s.child)}function _f(e,s,a,n,o){if(Aa(s),s.stateNode===null){var u=ll,h=a.contextType;typeof h==&quot;object&quot;&amp;&amp;h!==null&amp;&amp;(u=yt(h)),u=new a(n,u),s.memoizedState=u.state!==null&amp;&amp;u.state!==void 0?u.state:null,u.updater=ao,s.stateNode=u,u._reactInternals=s,u=s.stateNode,u.props=n,u.state=s.memoizedState,u.refs={},Mc(s),h=a.contextType,u.context=typeof h==&quot;object&quot;&amp;&amp;h!==null?yt(h):ll,u.state=s.memoizedState,h=a.getDerivedStateFromProps,typeof h==&quot;function&quot;&amp;&amp;(so(s,a,h,n),u.state=s.memoizedState),typeof a.getDerivedStateFromProps==&quot;function&quot;||typeof u.getSnapshotBeforeUpdate==&quot;function&quot;||typeof u.UNSAFE_componentWillMount!=&quot;function&quot;&amp;&amp;typeof u.componentWillMount!=&quot;function&quot;||(h=u.state,typeof u.componentWillMount==&quot;function&quot;&amp;&amp;u.componentWillMount(),typeof u.UNSAFE_componentWillMount==&quot;function&quot;&amp;&amp;u.UNSAFE_componentWillMount(),h!==u.state&amp;&amp;ao.enqueueReplaceState(u,u.state,null),an(s,n,u,o),sn(),u.state=s.memoizedState),typeof u.componentDidMount==&quot;function&quot;&amp;&amp;(s.flags|=4194308),n=!0}else if(e===null){u=s.stateNode;var N=s.memoizedProps,O=Ra(a,N);u.props=O;var te=u.context,re=a.contextType;h=ll,typeof re==&quot;object&quot;&amp;&amp;re!==null&amp;&amp;(h=yt(re));var ue=a.getDerivedStateFromProps;re=typeof ue==&quot;function&quot;||typeof u.getSnapshotBeforeUpdate==&quot;function&quot;,N=s.pendingProps!==N,re||typeof u.UNSAFE_componentWillReceiveProps!=&quot;function&quot;&amp;&amp;typeof u.componentWillReceiveProps!=&quot;function&quot;||(N||te!==h)&amp;&amp;of(s,u,n,h),Ws=!1;var se=s.memoizedState;u.state=se,an(s,n,u,o),sn(),te=s.memoizedState,N||se!==te||Ws?(typeof ue==&quot;function&quot;&amp;&amp;(so(s,a,ue,n),te=s.memoizedState),(O=Ws||cf(s,a,O,n,se,te,h))?(re||typeof u.UNSAFE_componentWillMount!=&quot;function&quot;&amp;&amp;typeof u.componentWillMount!=&quot;function&quot;||(typeof u.componentWillMount==&quot;function&quot;&amp;&amp;u.componentWillMount(),typeof u.UNSAFE_componentWillMount==&quot;function&quot;&amp;&amp;u.UNSAFE_componentWillMount()),typeof u.componentDidMount==&quot;function&quot;&amp;&amp;(s.flags|=4194308)):(typeof u.componentDidMount==&quot;function&quot;&amp;&amp;(s.flags|=4194308),s.memoizedProps=n,s.memoizedState=te),u.props=n,u.state=te,u.context=h,n=O):(typeof u.componentDidMount==&quot;function&quot;&amp;&amp;(s.flags|=4194308),n=!1)}else{u=s.stateNode,Dc(e,s),h=s.memoizedProps,re=Ra(a,h),u.props=re,ue=s.pendingProps,se=u.context,te=a.contextType,O=ll,typeof te==&quot;object&quot;&amp;&amp;te!==null&amp;&amp;(O=yt(te)),N=a.getDerivedStateFromProps,(te=typeof N==&quot;function&quot;||typeof u.getSnapshotBeforeUpdate==&quot;function&quot;)||typeof u.UNSAFE_componentWillReceiveProps!=&quot;function&quot;&amp;&amp;typeof u.componentWillReceiveProps!=&quot;function&quot;||(h!==ue||se!==O)&amp;&amp;of(s,u,n,O),Ws=!1,se=s.memoizedState,u.state=se,an(s,n,u,o),sn();var ae=s.memoizedState;h!==ue||se!==ae||Ws||e!==null&amp;&amp;e.dependencies!==null&amp;&amp;xr(e.dependencies)?(typeof N==&quot;function&quot;&amp;&amp;(so(s,a,N,n),ae=s.memoizedState),(re=Ws||cf(s,a,re,n,se,ae,O)||e!==null&amp;&amp;e.dependencies!==null&amp;&amp;xr(e.dependencies))?(te||typeof u.UNSAFE_componentWillUpdate!=&quot;function&quot;&amp;&amp;typeof u.componentWillUpdate!=&quot;function&quot;||(typeof u.componentWillUpdate==&quot;function&quot;&amp;&amp;u.componentWillUpdate(n,ae,O),typeof u.UNSAFE_componentWillUpdate==&quot;function&quot;&amp;&amp;u.UNSAFE_componentWillUpdate(n,ae,O)),typeof u.componentDidUpdate==&quot;function&quot;&amp;&amp;(s.flags|=4),typeof u.getSnapshotBeforeUpdate==&quot;function&quot;&amp;&amp;(s.flags|=1024)):(typeof u.componentDidUpdate!=&quot;function&quot;||h===e.memoizedProps&amp;&amp;se===e.memoizedState||(s.flags|=4),typeof u.getSnapshotBeforeUpdate!=&quot;function&quot;||h===e.memoizedProps&amp;&amp;se===e.memoizedState||(s.flags|=1024),s.memoizedProps=n,s.memoizedState=ae),u.props=n,u.state=ae,u.context=O,n=re):(typeof u.componentDidUpdate!=&quot;function&quot;||h===e.memoizedProps&amp;&amp;se===e.memoizedState||(s.flags|=4),typeof u.getSnapshotBeforeUpdate!=&quot;function&quot;||h===e.memoizedProps&amp;&amp;se===e.memoizedState||(s.flags|=1024),n=!1)}return u=n,Dr(e,s),n=(s.flags&amp;128)!==0,u||n?(u=s.stateNode,a=n&amp;&amp;typeof a.getDerivedStateFromError!=&quot;function&quot;?null:u.render(),s.flags|=1,e!==null&amp;&amp;n?(s.child=Ma(s,e.child,null,o),s.child=Ma(s,null,a,o)):Nt(e,s,a,o),s.memoizedState=u.state,e=s.child):e=Ms(e,s,o),e}function Sf(e,s,a,n){return Ca(),s.flags|=256,Nt(e,s,a,n),s.child}var io={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function co(e){return{baseLanes:e,cachePool:mm()}}function oo(e,s,a){return e=e!==null?e.childLanes&amp;~a:0,s&amp;&amp;(e|=Qt),e}function wf(e,s,a){var n=s.pendingProps,o=!1,u=(s.flags&amp;128)!==0,h;if((h=u)||(h=e!==null&amp;&amp;e.memoizedState===null?!1:(rt.current&amp;2)!==0),h&amp;&amp;(o=!0,s.flags&amp;=-129),h=(s.flags&amp;32)!==0,s.flags&amp;=-33,e===null){if($e){if(o?sa(s):aa(),(e=Ie)?(e=Dx(e,ss),e=e!==null&amp;&amp;e.data!==&quot;&amp;&quot;?e:null,e!==null&amp;&amp;(s.memoizedState={dehydrated:e,treeContext:Fs!==null?{id:gs,overflow:bs}:null,retryLane:536870912,hydrationErrors:null},a=am(e),a.return=s,s.child=a,vt=s,Ie=null)):e=null,e===null)throw Js(s);return Qo(e)?s.lanes=32:s.lanes=536870912,null}var N=n.children;return n=n.fallback,o?(aa(),o=s.mode,N=Rr({mode:&quot;hidden&quot;,children:N},o),n=wa(n,o,a,null),N.return=s,n.return=s,N.sibling=n,s.child=N,n=s.child,n.memoizedState=co(a),n.childLanes=oo(e,h,a),s.memoizedState=io,on(null,n)):(sa(s),uo(s,N))}var O=e.memoizedState;if(O!==null&amp;&amp;(N=O.dehydrated,N!==null)){if(u)s.flags&amp;256?(sa(s),s.flags&amp;=-257,s=mo(e,s,a)):s.memoizedState!==null?(aa(),s.child=e.child,s.flags|=128,s=null):(aa(),N=n.fallback,o=s.mode,n=Rr({mode:&quot;visible&quot;,children:n.children},o),N=wa(N,o,a,null),N.flags|=2,n.return=s,N.return=s,n.sibling=N,s.child=n,Ma(s,e.child,null,a),n=s.child,n.memoizedState=co(a),n.childLanes=oo(e,h,a),s.memoizedState=io,s=on(null,n));else if(sa(s),Qo(N)){if(h=N.nextSibling&amp;&amp;N.nextSibling.dataset,h)var te=h.dgst;h=te,n=Error(c(419)),n.stack=&quot;&quot;,n.digest=h,Kl({value:n,source:null,stack:null}),s=mo(e,s,a)}else if(ut||cl(e,s,a,!1),h=(a&amp;e.childLanes)!==0,ut||h){if(h=Fe,h!==null&amp;&amp;(n=ud(h,a),n!==0&amp;&amp;n!==O.retryLane))throw O.retryLane=n,Sa(e,n),qt(h,e,n),no;Zo(N)||Yr(),s=mo(e,s,a)}else Zo(N)?(s.flags|=192,s.child=e.child,s=null):(e=O.treeContext,Ie=ls(N.nextSibling),vt=s,$e=!0,Ks=null,ss=!1,e!==null&amp;&amp;rm(s,e),s=uo(s,n.children),s.flags|=4096);return s}return o?(aa(),N=n.fallback,o=s.mode,O=e.child,te=O.sibling,n=Cs(O,{mode:&quot;hidden&quot;,children:n.children}),n.subtreeFlags=O.subtreeFlags&amp;65011712,te!==null?N=Cs(te,N):(N=wa(N,o,a,null),N.flags|=2),N.return=s,n.return=s,n.sibling=N,s.child=n,on(null,n),n=s.child,N=e.child.memoizedState,N===null?N=co(a):(o=N.cachePool,o!==null?(O=ct._currentValue,o=o.parent!==O?{parent:O,pool:O}:o):o=mm(),N={baseLanes:N.baseLanes|a,cachePool:o}),n.memoizedState=N,n.childLanes=oo(e,h,a),s.memoizedState=io,on(e.child,n)):(sa(s),a=e.child,e=a.sibling,a=Cs(a,{mode:&quot;visible&quot;,children:n.children}),a.return=s,a.sibling=null,e!==null&amp;&amp;(h=s.deletions,h===null?(s.deletions=[e],s.flags|=16):h.push(e)),s.child=a,s.memoizedState=null,a)}function uo(e,s){return s=Rr({mode:&quot;visible&quot;,children:s},e.mode),s.return=e,e.child=s}function Rr(e,s){return e=Vt(22,e,null,s),e.lanes=0,e}function mo(e,s,a){return Ma(s,e.child,null,a),e=uo(s,s.pendingProps.children),e.flags|=2,s.memoizedState=null,e}function Cf(e,s,a){e.lanes|=s;var n=e.alternate;n!==null&amp;&amp;(n.lanes|=s),Cc(e.return,s,a)}function fo(e,s,a,n,o,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:n,tail:a,tailMode:o,treeForkCount:u}:(h.isBackwards=s,h.rendering=null,h.renderingStartTime=0,h.last=n,h.tail=a,h.tailMode=o,h.treeForkCount=u)}function Ef(e,s,a){var n=s.pendingProps,o=n.revealOrder,u=n.tail;n=n.children;var h=rt.current,N=(h&amp;2)!==0;if(N?(h=h&amp;1|2,s.flags|=128):h&amp;=1,I(rt,h),Nt(e,s,n,a),n=$e?Fl:0,!N&amp;&amp;e!==null&amp;&amp;(e.flags&amp;128)!==0)e:for(e=s.child;e!==null;){if(e.tag===13)e.memoizedState!==null&amp;&amp;Cf(e,a,s);else if(e.tag===19)Cf(e,a,s);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===s)break e;for(;e.sibling===null;){if(e.return===null||e.return===s)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case&quot;forwards&quot;:for(a=s.child,o=null;a!==null;)e=a.alternate,e!==null&amp;&amp;Nr(e)===null&amp;&amp;(o=a),a=a.sibling;a=o,a===null?(o=s.child,s.child=null):(o=a.sibling,a.sibling=null),fo(s,!1,o,a,u,n);break;case&quot;backwards&quot;:case&quot;unstable_legacy-backwards&quot;:for(a=null,o=s.child,s.child=null;o!==null;){if(e=o.alternate,e!==null&amp;&amp;Nr(e)===null){s.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}fo(s,!0,a,null,u,n);break;case&quot;together&quot;:fo(s,!1,null,null,void 0,n);break;default:s.memoizedState=null}return s.child}function Ms(e,s,a){if(e!==null&amp;&amp;(s.dependencies=e.dependencies),ra|=s.lanes,(a&amp;s.childLanes)===0)if(e!==null){if(cl(e,s,a,!1),(a&amp;s.childLanes)===0)return null}else return null;if(e!==null&amp;&amp;s.child!==e.child)throw Error(c(153));if(s.child!==null){for(e=s.child,a=Cs(e,e.pendingProps),s.child=a,a.return=s;e.sibling!==null;)e=e.sibling,a=a.sibling=Cs(e,e.pendingProps),a.return=s;a.sibling=null}return s.child}function xo(e,s){return(e.lanes&amp;s)!==0?!0:(e=e.dependencies,!!(e!==null&amp;&amp;xr(e)))}function jg(e,s,a){switch(s.tag){case 3:je(s,s.stateNode.containerInfo),Is(s,ct,e.memoizedState.cache),Ca();break;case 27:case 5:ft(s);break;case 4:je(s,s.stateNode.containerInfo);break;case 10:Is(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,$c(s),null;break;case 13:var n=s.memoizedState;if(n!==null)return n.dehydrated!==null?(sa(s),s.flags|=128,null):(a&amp;s.child.childLanes)!==0?wf(e,s,a):(sa(s),e=Ms(e,s,a),e!==null?e.sibling:null);sa(s);break;case 19:var o=(e.flags&amp;128)!==0;if(n=(a&amp;s.childLanes)!==0,n||(cl(e,s,a,!1),n=(a&amp;s.childLanes)!==0),o){if(n)return Ef(e,s,a);s.flags|=128}if(o=s.memoizedState,o!==null&amp;&amp;(o.rendering=null,o.tail=null,o.lastEffect=null),I(rt,rt.current),n)break;return null;case 22:return s.lanes=0,jf(e,s,a,s.pendingProps);case 24:Is(s,ct,e.memoizedState.cache)}return Ms(e,s,a)}function Af(e,s,a){if(e!==null)if(e.memoizedProps!==s.pendingProps)ut=!0;else{if(!xo(e,a)&amp;&amp;(s.flags&amp;128)===0)return ut=!1,jg(e,s,a);ut=(e.flags&amp;131072)!==0}else ut=!1,$e&amp;&amp;(s.flags&amp;1048576)!==0&amp;&amp;nm(s,Fl,s.index);switch(s.lanes=0,s.tag){case 16:e:{var n=s.pendingProps;if(e=Ta(s.elementType),s.type=e,typeof e==&quot;function&quot;)bc(e)?(n=Ra(e,n),s.tag=1,s=_f(null,s,e,n,a)):(s.tag=0,s=ro(null,s,e,n,a));else{if(e!=null){var o=e.$$typeof;if(o===P){s.tag=11,s=pf(null,s,e,n,a);break e}else if(o===K){s.tag=14,s=gf(null,s,e,n,a);break e}}throw s=H(e)||e,Error(c(306,s,&quot;&quot;))}}return s;case 0:return ro(e,s,s.type,s.pendingProps,a);case 1:return n=s.type,o=Ra(n,s.pendingProps),_f(e,s,n,o,a);case 3:e:{if(je(s,s.stateNode.containerInfo),e===null)throw Error(c(387));n=s.pendingProps;var u=s.memoizedState;o=u.element,Dc(e,s),an(s,n,null,a);var h=s.memoizedState;if(n=h.cache,Is(s,ct,n),n!==u.cache&amp;&amp;Ec(s,[ct],a,!0),sn(),n=h.element,u.isDehydrated)if(u={element:n,isDehydrated:!1,cache:h.cache},s.updateQueue.baseState=u,s.memoizedState=u,s.flags&amp;256){s=Sf(e,s,n,a);break e}else if(n!==o){o=Wt(Error(c(424)),s),Kl(o),s=Sf(e,s,n,a);break e}else{switch(e=s.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===&quot;HTML&quot;?e.ownerDocument.body:e}for(Ie=ls(e.firstChild),vt=s,$e=!0,Ks=null,ss=!0,a=bm(s,null,n,a),s.child=a;a;)a.flags=a.flags&amp;-3|4096,a=a.sibling}else{if(Ca(),n===o){s=Ms(e,s,a);break e}Nt(e,s,n,a)}s=s.child}return s;case 26:return Dr(e,s),e===null?(a=qx(s.type,null,s.pendingProps,null))?s.memoizedState=a:$e||(a=s.type,e=s.pendingProps,n=Kr(X.current).createElement(a),n[jt]=s,n[Dt]=e,_t(n,a,e),pt(n),s.stateNode=n):s.memoizedState=qx(s.type,e.memoizedProps,s.pendingProps,e.memoizedState),null;case 27:return ft(s),e===null&amp;&amp;$e&amp;&amp;(n=s.stateNode=Lx(s.type,s.pendingProps,X.current),vt=s,ss=!0,o=Ie,da(s.type)?(Xo=o,Ie=ls(n.firstChild)):Ie=o),Nt(e,s,s.pendingProps.children,a),Dr(e,s),e===null&amp;&amp;(s.flags|=4194304),s.child;case 5:return e===null&amp;&amp;$e&amp;&amp;((o=n=Ie)&amp;&amp;(n=Fg(n,s.type,s.pendingProps,ss),n!==null?(s.stateNode=n,vt=s,Ie=ls(n.firstChild),ss=!1,o=!0):o=!1),o||Js(s)),ft(s),o=s.type,u=s.pendingProps,h=e!==null?e.memoizedProps:null,n=u.children,Vo(o,u)?n=null:h!==null&amp;&amp;Vo(o,h)&amp;&amp;(s.flags|=32),s.memoizedState!==null&amp;&amp;(o=Bc(e,s,ug,null,null,a),Sn._currentValue=o),Dr(e,s),Nt(e,s,n,a),s.child;case 6:return e===null&amp;&amp;$e&amp;&amp;((e=a=Ie)&amp;&amp;(a=Kg(a,s.pendingProps,ss),a!==null?(s.stateNode=a,vt=s,Ie=null,e=!0):e=!1),e||Js(s)),null;case 13:return wf(e,s,a);case 4:return je(s,s.stateNode.containerInfo),n=s.pendingProps,e===null?s.child=Ma(s,null,n,a):Nt(e,s,n,a),s.child;case 11:return pf(e,s,s.type,s.pendingProps,a);case 7:return Nt(e,s,s.pendingProps,a),s.child;case 8:return Nt(e,s,s.pendingProps.children,a),s.child;case 12:return Nt(e,s,s.pendingProps.children,a),s.child;case 10:return n=s.pendingProps,Is(s,s.type,n.value),Nt(e,s,n.children,a),s.child;case 9:return o=s.type._context,n=s.pendingProps.children,Aa(s),o=yt(o),n=n(o),s.flags|=1,Nt(e,s,n,a),s.child;case 14:return gf(e,s,s.type,s.pendingProps,a);case 15:return bf(e,s,s.type,s.pendingProps,a);case 19:return Ef(e,s,a);case 31:return bg(e,s,a);case 22:return jf(e,s,a,s.pendingProps);case 24:return Aa(s),n=yt(ct),e===null?(o=Tc(),o===null&amp;&amp;(o=Fe,u=Ac(),o.pooledCache=u,u.refCount++,u!==null&amp;&amp;(o.pooledCacheLanes|=a),o=u),s.memoizedState={parent:n,cache:o},Mc(s),Is(s,ct,o)):((e.lanes&amp;a)!==0&amp;&amp;(Dc(e,s),an(s,null,null,a),sn()),o=e.memoizedState,u=s.memoizedState,o.parent!==n?(o={parent:n,cache:n},s.memoizedState=o,s.lanes===0&amp;&amp;(s.memoizedState=s.updateQueue.baseState=o),Is(s,ct,n)):(n=u.cache,Is(s,ct,n),n!==o.cache&amp;&amp;Ec(s,[ct],a,!0))),Nt(e,s,s.pendingProps.children,a),s.child;case 29:throw s.pendingProps}throw Error(c(156,s.tag))}function Ds(e){e.flags|=4}function ho(e,s,a,n,o){if((s=(e.mode&amp;32)!==0)&amp;&amp;(s=!1),s){if(e.flags|=16777216,(o&amp;335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(tx())e.flags|=8192;else throw za=br,zc}else e.flags&amp;=-16777217}function kf(e,s){if(s.type!==&quot;stylesheet&quot;||(s.state.loading&amp;4)!==0)e.flags&amp;=-16777217;else if(e.flags|=16777216,!Gx(s))if(tx())e.flags|=8192;else throw za=br,zc}function Or(e,s){s!==null&amp;&amp;(e.flags|=4),e.flags&amp;16384&amp;&amp;(s=e.tag!==22?id():536870912,e.lanes|=s,vl|=s)}function un(e,s){if(!$e)switch(e.tailMode){case&quot;hidden&quot;:s=e.tail;for(var a=null;s!==null;)s.alternate!==null&amp;&amp;(a=s),s=s.sibling;a===null?e.tail=null:a.sibling=null;break;case&quot;collapsed&quot;:a=e.tail;for(var n=null;a!==null;)a.alternate!==null&amp;&amp;(n=a),a=a.sibling;n===null?s||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function We(e){var s=e.alternate!==null&amp;&amp;e.alternate.child===e.child,a=0,n=0;if(s)for(var o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags&amp;65011712,n|=o.flags&amp;65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,n|=o.subtreeFlags,n|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=n,e.childLanes=a,s}function vg(e,s,a){var n=s.pendingProps;switch(Nc(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(s),null;case 1:return We(s),null;case 3:return a=s.stateNode,n=null,e!==null&amp;&amp;(n=e.memoizedState.cache),s.memoizedState.cache!==n&amp;&amp;(s.flags|=2048),ks(ct),Me(),a.pendingContext&amp;&amp;(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&amp;&amp;(il(s)?Ds(s):e===null||e.memoizedState.isDehydrated&amp;&amp;(s.flags&amp;256)===0||(s.flags|=1024,Sc())),We(s),null;case 26:var o=s.type,u=s.memoizedState;return e===null?(Ds(s),u!==null?(We(s),kf(s,u)):(We(s),ho(s,o,null,n,a))):u?u!==e.memoizedState?(Ds(s),We(s),kf(s,u)):(We(s),s.flags&amp;=-16777217):(e=e.memoizedProps,e!==n&amp;&amp;Ds(s),We(s),ho(s,o,e,n,a)),null;case 27:if(Ft(s),a=X.current,o=s.type,e!==null&amp;&amp;s.stateNode!=null)e.memoizedProps!==n&amp;&amp;Ds(s);else{if(!n){if(s.stateNode===null)throw Error(c(166));return We(s),null}e=ee.current,il(s)?im(s):(e=Lx(o,n,a),s.stateNode=e,Ds(s))}return We(s),null;case 5:if(Ft(s),o=s.type,e!==null&amp;&amp;s.stateNode!=null)e.memoizedProps!==n&amp;&amp;Ds(s);else{if(!n){if(s.stateNode===null)throw Error(c(166));return We(s),null}if(u=ee.current,il(s))im(s);else{var h=Kr(X.current);switch(u){case 1:u=h.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,o);break;case 2:u=h.createElementNS(&quot;http://www.w3.org/1998/Math/MathML&quot;,o);break;default:switch(o){case&quot;svg&quot;:u=h.createElementNS(&quot;http://www.w3.org/2000/svg&quot;,o);break;case&quot;math&quot;:u=h.createElementNS(&quot;http://www.w3.org/1998/Math/MathML&quot;,o);break;case&quot;script&quot;:u=h.createElement(&quot;div&quot;),u.innerHTML=&quot;&lt;script&gt;&lt;\/script&gt;&quot;,u=u.removeChild(u.firstChild);break;case&quot;select&quot;:u=typeof n.is==&quot;string&quot;?h.createElement(&quot;select&quot;,{is:n.is}):h.createElement(&quot;select&quot;),n.multiple?u.multiple=!0:n.size&amp;&amp;(u.size=n.size);break;default:u=typeof n.is==&quot;string&quot;?h.createElement(o,{is:n.is}):h.createElement(o)}}u[jt]=s,u[Dt]=n;e:for(h=s.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&amp;&amp;h.tag!==27&amp;&amp;h.child!==null){h.child.return=h,h=h.child;continue}if(h===s)break e;for(;h.sibling===null;){if(h.return===null||h.return===s)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}s.stateNode=u;e:switch(_t(u,o,n),o){case&quot;button&quot;:case&quot;input&quot;:case&quot;select&quot;:case&quot;textarea&quot;:n=!!n.autoFocus;break e;case&quot;img&quot;:n=!0;break e;default:n=!1}n&amp;&amp;Ds(s)}}return We(s),ho(s,s.type,e===null?null:e.memoizedProps,s.pendingProps,a),null;case 6:if(e&amp;&amp;s.stateNode!=null)e.memoizedProps!==n&amp;&amp;Ds(s);else{if(typeof n!=&quot;string&quot;&amp;&amp;s.stateNode===null)throw Error(c(166));if(e=X.current,il(s)){if(e=s.stateNode,a=s.memoizedProps,n=null,o=vt,o!==null)switch(o.tag){case 27:case 5:n=o.memoizedProps}e[jt]=s,e=!!(e.nodeValue===a||n!==null&amp;&amp;n.suppressHydrationWarning===!0||wx(e.nodeValue,a)),e||Js(s,!0)}else e=Kr(e).createTextNode(n),e[jt]=s,s.stateNode=e}return We(s),null;case 31:if(a=s.memoizedState,e===null||e.memoizedState!==null){if(n=il(s),a!==null){if(e===null){if(!n)throw Error(c(318));if(e=s.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(557));e[jt]=s}else Ca(),(s.flags&amp;128)===0&amp;&amp;(s.memoizedState=null),s.flags|=4;We(s),e=!1}else a=Sc(),e!==null&amp;&amp;e.memoizedState!==null&amp;&amp;(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return s.flags&amp;256?(Gt(s),s):(Gt(s),null);if((s.flags&amp;128)!==0)throw Error(c(558))}return We(s),null;case 13:if(n=s.memoizedState,e===null||e.memoizedState!==null&amp;&amp;e.memoizedState.dehydrated!==null){if(o=il(s),n!==null&amp;&amp;n.dehydrated!==null){if(e===null){if(!o)throw Error(c(318));if(o=s.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(c(317));o[jt]=s}else Ca(),(s.flags&amp;128)===0&amp;&amp;(s.memoizedState=null),s.flags|=4;We(s),o=!1}else o=Sc(),e!==null&amp;&amp;e.memoizedState!==null&amp;&amp;(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return s.flags&amp;256?(Gt(s),s):(Gt(s),null)}return Gt(s),(s.flags&amp;128)!==0?(s.lanes=a,s):(a=n!==null,e=e!==null&amp;&amp;e.memoizedState!==null,a&amp;&amp;(n=s.child,o=null,n.alternate!==null&amp;&amp;n.alternate.memoizedState!==null&amp;&amp;n.alternate.memoizedState.cachePool!==null&amp;&amp;(o=n.alternate.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&amp;&amp;n.memoizedState.cachePool!==null&amp;&amp;(u=n.memoizedState.cachePool.pool),u!==o&amp;&amp;(n.flags|=2048)),a!==e&amp;&amp;a&amp;&amp;(s.child.flags|=8192),Or(s,s.updateQueue),We(s),null);case 4:return Me(),e===null&amp;&amp;Uo(s.stateNode.containerInfo),We(s),null;case 10:return ks(s.type),We(s),null;case 19:if(J(rt),n=s.memoizedState,n===null)return We(s),null;if(o=(s.flags&amp;128)!==0,u=n.rendering,u===null)if(o)un(n,!1);else{if(lt!==0||e!==null&amp;&amp;(e.flags&amp;128)!==0)for(e=s.child;e!==null;){if(u=Nr(e),u!==null){for(s.flags|=128,un(n,!1),e=u.updateQueue,s.updateQueue=e,Or(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)sm(a,e),a=a.sibling;return I(rt,rt.current&amp;1|2),$e&amp;&amp;Es(s,n.treeForkCount),s.child}e=e.sibling}n.tail!==null&amp;&amp;et()&gt;Br&amp;&amp;(s.flags|=128,o=!0,un(n,!1),s.lanes=4194304)}else{if(!o)if(e=Nr(u),e!==null){if(s.flags|=128,o=!0,e=e.updateQueue,s.updateQueue=e,Or(s,e),un(n,!0),n.tail===null&amp;&amp;n.tailMode===&quot;hidden&quot;&amp;&amp;!u.alternate&amp;&amp;!$e)return We(s),null}else 2*et()-n.renderingStartTime&gt;Br&amp;&amp;a!==536870912&amp;&amp;(s.flags|=128,o=!0,un(n,!1),s.lanes=4194304);n.isBackwards?(u.sibling=s.child,s.child=u):(e=n.last,e!==null?e.sibling=u:s.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=et(),e.sibling=null,a=rt.current,I(rt,o?a&amp;1|2:a&amp;1),$e&amp;&amp;Es(s,n.treeForkCount),e):(We(s),null);case 22:case 23:return Gt(s),Uc(),n=s.memoizedState!==null,e!==null?e.memoizedState!==null!==n&amp;&amp;(s.flags|=8192):n&amp;&amp;(s.flags|=8192),n?(a&amp;536870912)!==0&amp;&amp;(s.flags&amp;128)===0&amp;&amp;(We(s),s.subtreeFlags&amp;6&amp;&amp;(s.flags|=8192)):We(s),a=s.updateQueue,a!==null&amp;&amp;Or(s,a.retryQueue),a=null,e!==null&amp;&amp;e.memoizedState!==null&amp;&amp;e.memoizedState.cachePool!==null&amp;&amp;(a=e.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&amp;&amp;s.memoizedState.cachePool!==null&amp;&amp;(n=s.memoizedState.cachePool.pool),n!==a&amp;&amp;(s.flags|=2048),e!==null&amp;&amp;J(ka),null;case 24:return a=null,e!==null&amp;&amp;(a=e.memoizedState.cache),s.memoizedState.cache!==a&amp;&amp;(s.flags|=2048),ks(ct),We(s),null;case 25:return null;case 30:return null}throw Error(c(156,s.tag))}function yg(e,s){switch(Nc(s),s.tag){case 1:return e=s.flags,e&amp;65536?(s.flags=e&amp;-65537|128,s):null;case 3:return ks(ct),Me(),e=s.flags,(e&amp;65536)!==0&amp;&amp;(e&amp;128)===0?(s.flags=e&amp;-65537|128,s):null;case 26:case 27:case 5:return Ft(s),null;case 31:if(s.memoizedState!==null){if(Gt(s),s.alternate===null)throw Error(c(340));Ca()}return e=s.flags,e&amp;65536?(s.flags=e&amp;-65537|128,s):null;case 13:if(Gt(s),e=s.memoizedState,e!==null&amp;&amp;e.dehydrated!==null){if(s.alternate===null)throw Error(c(340));Ca()}return e=s.flags,e&amp;65536?(s.flags=e&amp;-65537|128,s):null;case 19:return J(rt),null;case 4:return Me(),null;case 10:return ks(s.type),null;case 22:case 23:return Gt(s),Uc(),e!==null&amp;&amp;J(ka),e=s.flags,e&amp;65536?(s.flags=e&amp;-65537|128,s):null;case 24:return ks(ct),null;case 25:return null;default:return null}}function Tf(e,s){switch(Nc(s),s.tag){case 3:ks(ct),Me();break;case 26:case 27:case 5:Ft(s);break;case 4:Me();break;case 31:s.memoizedState!==null&amp;&amp;Gt(s);break;case 13:Gt(s);break;case 19:J(rt);break;case 10:ks(s.type);break;case 22:case 23:Gt(s),Uc(),e!==null&amp;&amp;J(ka);break;case 24:ks(ct)}}function dn(e,s){try{var a=s.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var o=n.next;a=o;do{if((a.tag&amp;e)===e){n=void 0;var u=a.create,h=a.inst;n=u(),h.destroy=n}a=a.next}while(a!==o)}}catch(N){Ze(s,s.return,N)}}function la(e,s,a){try{var n=s.updateQueue,o=n!==null?n.lastEffect:null;if(o!==null){var u=o.next;n=u;do{if((n.tag&amp;e)===e){var h=n.inst,N=h.destroy;if(N!==void 0){h.destroy=void 0,o=s;var O=a,te=N;try{te()}catch(re){Ze(o,O,re)}}}n=n.next}while(n!==u)}}catch(re){Ze(s,s.return,re)}}function zf(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{vm(s,a)}catch(n){Ze(e,e.return,n)}}}function Mf(e,s,a){a.props=Ra(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(n){Ze(e,s,n)}}function mn(e,s){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof a==&quot;function&quot;?e.refCleanup=a(n):a.current=n}}catch(o){Ze(e,s,o)}}function js(e,s){var a=e.ref,n=e.refCleanup;if(a!==null)if(typeof n==&quot;function&quot;)try{n()}catch(o){Ze(e,s,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&amp;&amp;(e.refCleanup=null)}else if(typeof a==&quot;function&quot;)try{a(null)}catch(o){Ze(e,s,o)}else a.current=null}function Df(e){var s=e.type,a=e.memoizedProps,n=e.stateNode;try{e:switch(s){case&quot;button&quot;:case&quot;input&quot;:case&quot;select&quot;:case&quot;textarea&quot;:a.autoFocus&amp;&amp;n.focus();break e;case&quot;img&quot;:a.src?n.src=a.src:a.srcSet&amp;&amp;(n.srcset=a.srcSet)}}catch(o){Ze(e,e.return,o)}}function po(e,s,a){try{var n=e.stateNode;Yg(n,e.type,a,s),n[Dt]=s}catch(o){Ze(e,e.return,o)}}function Rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&amp;&amp;da(e.type)||e.tag===4}function go(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&amp;&amp;e.tag!==6&amp;&amp;e.tag!==18;){if(e.tag===27&amp;&amp;da(e.type)||e.flags&amp;2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&amp;2))return e.stateNode}}function bo(e,s,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,s?(a.nodeType===9?a.body:a.nodeName===&quot;HTML&quot;?a.ownerDocument.body:a).insertBefore(e,s):(s=a.nodeType===9?a.body:a.nodeName===&quot;HTML&quot;?a.ownerDocument.body:a,s.appendChild(e),a=a._reactRootContainer,a!=null||s.onclick!==null||(s.onclick=Ss));else if(n!==4&amp;&amp;(n===27&amp;&amp;da(e.type)&amp;&amp;(a=e.stateNode,s=null),e=e.child,e!==null))for(bo(e,s,a),e=e.sibling;e!==null;)bo(e,s,a),e=e.sibling}function Lr(e,s,a){var n=e.tag;if(n===5||n===6)e=e.stateNode,s?a.insertBefore(e,s):a.appendChild(e);else if(n!==4&amp;&amp;(n===27&amp;&amp;da(e.type)&amp;&amp;(a=e.stateNode),e=e.child,e!==null))for(Lr(e,s,a),e=e.sibling;e!==null;)Lr(e,s,a),e=e.sibling}function Of(e){var s=e.stateNode,a=e.memoizedProps;try{for(var n=e.type,o=s.attributes;o.length;)s.removeAttributeNode(o[0]);_t(s,n,a),s[jt]=e,s[Dt]=a}catch(u){Ze(e,e.return,u)}}var Rs=!1,dt=!1,jo=!1,Lf=typeof WeakSet==&quot;function&quot;?WeakSet:Set,gt=null;function Ng(e,s){if(e=e.containerInfo,Bo=ai,e=Xd(e),dc(e)){if(&quot;selectionStart&quot;in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&amp;&amp;a.defaultView||window;var n=a.getSelection&amp;&amp;a.getSelection();if(n&amp;&amp;n.rangeCount!==0){a=n.anchorNode;var o=n.anchorOffset,u=n.focusNode;n=n.focusOffset;try{a.nodeType,u.nodeType}catch{a=null;break e}var h=0,N=-1,O=-1,te=0,re=0,ue=e,se=null;t:for(;;){for(var ae;ue!==a||o!==0&amp;&amp;ue.nodeType!==3||(N=h+o),ue!==u||n!==0&amp;&amp;ue.nodeType!==3||(O=h+n),ue.nodeType===3&amp;&amp;(h+=ue.nodeValue.length),(ae=ue.firstChild)!==null;)se=ue,ue=ae;for(;;){if(ue===e)break t;if(se===a&amp;&amp;++te===o&amp;&amp;(N=h),se===u&amp;&amp;++re===n&amp;&amp;(O=h),(ae=ue.nextSibling)!==null)break;ue=se,se=ue.parentNode}ue=ae}a=N===-1||O===-1?null:{start:N,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ho={focusedElem:e,selectionRange:a},ai=!1,gt=s;gt!==null;)if(s=gt,e=s.child,(s.subtreeFlags&amp;1028)!==0&amp;&amp;e!==null)e.return=s,gt=e;else for(;gt!==null;){switch(s=gt,u=s.alternate,e=s.flags,s.tag){case 0:if((e&amp;4)!==0&amp;&amp;(e=s.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a&lt;e.length;a++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&amp;1024)!==0&amp;&amp;u!==null){e=void 0,a=s,o=u.memoizedProps,u=u.memoizedState,n=a.stateNode;try{var pe=Ra(a.type,o);e=n.getSnapshotBeforeUpdate(pe,u),n.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Ze(a,a.return,ye)}}break;case 3:if((e&amp;1024)!==0){if(e=s.stateNode.containerInfo,a=e.nodeType,a===9)Go(e);else if(a===1)switch(e.nodeName){case&quot;HEAD&quot;:case&quot;HTML&quot;:case&quot;BODY&quot;:Go(e);break;default:e.textContent=&quot;&quot;}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&amp;1024)!==0)throw Error(c(163))}if(e=s.sibling,e!==null){e.return=s.return,gt=e;break}gt=s.return}}function Uf(e,s,a){var n=a.flags;switch(a.tag){case 0:case 11:case 15:Ls(e,a),n&amp;4&amp;&amp;dn(5,a);break;case 1:if(Ls(e,a),n&amp;4)if(e=a.stateNode,s===null)try{e.componentDidMount()}catch(h){Ze(a,a.return,h)}else{var o=Ra(a.type,s.memoizedProps);s=s.memoizedState;try{e.componentDidUpdate(o,s,e.__reactInternalSnapshotBeforeUpdate)}catch(h){Ze(a,a.return,h)}}n&amp;64&amp;&amp;zf(a),n&amp;512&amp;&amp;mn(a,a.return);break;case 3:if(Ls(e,a),n&amp;64&amp;&amp;(e=a.updateQueue,e!==null)){if(s=null,a.child!==null)switch(a.child.tag){case 27:case 5:s=a.child.stateNode;break;case 1:s=a.child.stateNode}try{vm(e,s)}catch(h){Ze(a,a.return,h)}}break;case 27:s===null&amp;&amp;n&amp;4&amp;&amp;Of(a);case 26:case 5:Ls(e,a),s===null&amp;&amp;n&amp;4&amp;&amp;Df(a),n&amp;512&amp;&amp;mn(a,a.return);break;case 12:Ls(e,a);break;case 31:Ls(e,a),n&amp;4&amp;&amp;Bf(e,a);break;case 13:Ls(e,a),n&amp;4&amp;&amp;Hf(e,a),n&amp;64&amp;&amp;(e=a.memoizedState,e!==null&amp;&amp;(e=e.dehydrated,e!==null&amp;&amp;(a=zg.bind(null,a),Jg(e,a))));break;case 22:if(n=a.memoizedState!==null||Rs,!n){s=s!==null&amp;&amp;s.memoizedState!==null||dt,o=Rs;var u=dt;Rs=n,(dt=s)&amp;&amp;!u?Us(e,a,(a.subtreeFlags&amp;8772)!==0):Ls(e,a),Rs=o,dt=u}break;case 30:break;default:Ls(e,a)}}function $f(e){var s=e.alternate;s!==null&amp;&amp;(e.alternate=null,$f(s)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&amp;&amp;(s=e.stateNode,s!==null&amp;&amp;Pi(s)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var tt=null,Ot=!1;function Os(e,s,a){for(a=a.child;a!==null;)qf(e,s,a),a=a.sibling}function qf(e,s,a){if(ie&amp;&amp;typeof ie.onCommitFiberUnmount==&quot;function&quot;)try{ie.onCommitFiberUnmount(ps,a)}catch{}switch(a.tag){case 26:dt||js(a,s),Os(e,s,a),a.memoizedState?a.memoizedState.count--:a.stateNode&amp;&amp;(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:dt||js(a,s);var n=tt,o=Ot;da(a.type)&amp;&amp;(tt=a.stateNode,Ot=!1),Os(e,s,a),yn(a.stateNode),tt=n,Ot=o;break;case 5:dt||js(a,s);case 6:if(n=tt,o=Ot,tt=null,Os(e,s,a),tt=n,Ot=o,tt!==null)if(Ot)try{(tt.nodeType===9?tt.body:tt.nodeName===&quot;HTML&quot;?tt.ownerDocument.body:tt).removeChild(a.stateNode)}catch(u){Ze(a,s,u)}else try{tt.removeChild(a.stateNode)}catch(u){Ze(a,s,u)}break;case 18:tt!==null&amp;&amp;(Ot?(e=tt,zx(e.nodeType===9?e.body:e.nodeName===&quot;HTML&quot;?e.ownerDocument.body:e,a.stateNode),Al(e)):zx(tt,a.stateNode));break;case 4:n=tt,o=Ot,tt=a.stateNode.containerInfo,Ot=!0,Os(e,s,a),tt=n,Ot=o;break;case 0:case 11:case 14:case 15:la(2,a,s),dt||la(4,a,s),Os(e,s,a);break;case 1:dt||(js(a,s),n=a.stateNode,typeof n.componentWillUnmount==&quot;function&quot;&amp;&amp;Mf(a,s,n)),Os(e,s,a);break;case 21:Os(e,s,a);break;case 22:dt=(n=dt)||a.memoizedState!==null,Os(e,s,a),dt=n;break;default:Os(e,s,a)}}function Bf(e,s){if(s.memoizedState===null&amp;&amp;(e=s.alternate,e!==null&amp;&amp;(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Al(e)}catch(a){Ze(s,s.return,a)}}}function Hf(e,s){if(s.memoizedState===null&amp;&amp;(e=s.alternate,e!==null&amp;&amp;(e=e.memoizedState,e!==null&amp;&amp;(e=e.dehydrated,e!==null))))try{Al(e)}catch(a){Ze(s,s.return,a)}}function _g(e){switch(e.tag){case 31:case 13:case 19:var s=e.stateNode;return s===null&amp;&amp;(s=e.stateNode=new Lf),s;case 22:return e=e.stateNode,s=e._retryCache,s===null&amp;&amp;(s=e._retryCache=new Lf),s;default:throw Error(c(435,e.tag))}}function Ur(e,s){var a=_g(e);s.forEach(function(n){if(!a.has(n)){a.add(n);var o=Mg.bind(null,e,n);n.then(o,o)}})}function Lt(e,s){var a=s.deletions;if(a!==null)for(var n=0;n&lt;a.length;n++){var o=a[n],u=e,h=s,N=h;e:for(;N!==null;){switch(N.tag){case 27:if(da(N.type)){tt=N.stateNode,Ot=!1;break e}break;case 5:tt=N.stateNode,Ot=!1;break e;case 3:case 4:tt=N.stateNode.containerInfo,Ot=!0;break e}N=N.return}if(tt===null)throw Error(c(160));qf(u,h,o),tt=null,Ot=!1,u=o.alternate,u!==null&amp;&amp;(u.return=null),o.return=null}if(s.subtreeFlags&amp;13886)for(s=s.child;s!==null;)Vf(s,e),s=s.sibling}var ms=null;function Vf(e,s){var a=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Lt(s,e),Ut(e),n&amp;4&amp;&amp;(la(3,e,e.return),dn(3,e),la(5,e,e.return));break;case 1:Lt(s,e),Ut(e),n&amp;512&amp;&amp;(dt||a===null||js(a,a.return)),n&amp;64&amp;&amp;Rs&amp;&amp;(e=e.updateQueue,e!==null&amp;&amp;(n=e.callbacks,n!==null&amp;&amp;(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?n:a.concat(n))));break;case 26:var o=ms;if(Lt(s,e),Ut(e),n&amp;512&amp;&amp;(dt||a===null||js(a,a.return)),n&amp;4){var u=a!==null?a.memoizedState:null;if(n=e.memoizedState,a===null)if(n===null)if(e.stateNode===null){e:{n=e.type,a=e.memoizedProps,o=o.ownerDocument||o;t:switch(n){case&quot;title&quot;:u=o.getElementsByTagName(&quot;title&quot;)[0],(!u||u[$l]||u[jt]||u.namespaceURI===&quot;http://www.w3.org/2000/svg&quot;||u.hasAttribute(&quot;itemprop&quot;))&amp;&amp;(u=o.createElement(n),o.head.insertBefore(u,o.querySelector(&quot;head &gt; title&quot;))),_t(u,n,a),u[jt]=e,pt(u),n=u;break e;case&quot;link&quot;:var h=Vx(&quot;link&quot;,&quot;href&quot;,o).get(n+(a.href||&quot;&quot;));if(h){for(var N=0;N&lt;h.length;N++)if(u=h[N],u.getAttribute(&quot;href&quot;)===(a.href==null||a.href===&quot;&quot;?null:a.href)&amp;&amp;u.getAttribute(&quot;rel&quot;)===(a.rel==null?null:a.rel)&amp;&amp;u.getAttribute(&quot;title&quot;)===(a.title==null?null:a.title)&amp;&amp;u.getAttribute(&quot;crossorigin&quot;)===(a.crossOrigin==null?null:a.crossOrigin)){h.splice(N,1);break t}}u=o.createElement(n),_t(u,n,a),o.head.appendChild(u);break;case&quot;meta&quot;:if(h=Vx(&quot;meta&quot;,&quot;content&quot;,o).get(n+(a.content||&quot;&quot;))){for(N=0;N&lt;h.length;N++)if(u=h[N],u.getAttribute(&quot;content&quot;)===(a.content==null?null:&quot;&quot;+a.content)&amp;&amp;u.getAttribute(&quot;name&quot;)===(a.name==null?null:a.name)&amp;&amp;u.getAttribute(&quot;property&quot;)===(a.property==null?null:a.property)&amp;&amp;u.getAttribute(&quot;http-equiv&quot;)===(a.httpEquiv==null?null:a.httpEquiv)&amp;&amp;u.getAttribute(&quot;charset&quot;)===(a.charSet==null?null:a.charSet)){h.splice(N,1);break t}}u=o.createElement(n),_t(u,n,a),o.head.appendChild(u);break;default:throw Error(c(468,n))}u[jt]=e,pt(u),n=u}e.stateNode=n}else Yx(o,e.type,e.stateNode);else e.stateNode=Hx(o,n,e.memoizedProps);else u!==n?(u===null?a.stateNode!==null&amp;&amp;(a=a.stateNode,a.parentNode.removeChild(a)):u.count--,n===null?Yx(o,e.type,e.stateNode):Hx(o,n,e.memoizedProps)):n===null&amp;&amp;e.stateNode!==null&amp;&amp;po(e,e.memoizedProps,a.memoizedProps)}break;case 27:Lt(s,e),Ut(e),n&amp;512&amp;&amp;(dt||a===null||js(a,a.return)),a!==null&amp;&amp;n&amp;4&amp;&amp;po(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Lt(s,e),Ut(e),n&amp;512&amp;&amp;(dt||a===null||js(a,a.return)),e.flags&amp;32){o=e.stateNode;try{Ja(o,&quot;&quot;)}catch(pe){Ze(e,e.return,pe)}}n&amp;4&amp;&amp;e.stateNode!=null&amp;&amp;(o=e.memoizedProps,po(e,o,a!==null?a.memoizedProps:o)),n&amp;1024&amp;&amp;(jo=!0);break;case 6:if(Lt(s,e),Ut(e),n&amp;4){if(e.stateNode===null)throw Error(c(162));n=e.memoizedProps,a=e.stateNode;try{a.nodeValue=n}catch(pe){Ze(e,e.return,pe)}}break;case 3:if(Wr=null,o=ms,ms=Jr(s.containerInfo),Lt(s,e),ms=o,Ut(e),n&amp;4&amp;&amp;a!==null&amp;&amp;a.memoizedState.isDehydrated)try{Al(s.containerInfo)}catch(pe){Ze(e,e.return,pe)}jo&amp;&amp;(jo=!1,Yf(e));break;case 4:n=ms,ms=Jr(e.stateNode.containerInfo),Lt(s,e),Ut(e),ms=n;break;case 12:Lt(s,e),Ut(e);break;case 31:Lt(s,e),Ut(e),n&amp;4&amp;&amp;(n=e.updateQueue,n!==null&amp;&amp;(e.updateQueue=null,Ur(e,n)));break;case 13:Lt(s,e),Ut(e),e.child.flags&amp;8192&amp;&amp;e.memoizedState!==null!=(a!==null&amp;&amp;a.memoizedState!==null)&amp;&amp;(qr=et()),n&amp;4&amp;&amp;(n=e.updateQueue,n!==null&amp;&amp;(e.updateQueue=null,Ur(e,n)));break;case 22:o=e.memoizedState!==null;var O=a!==null&amp;&amp;a.memoizedState!==null,te=Rs,re=dt;if(Rs=te||o,dt=re||O,Lt(s,e),dt=re,Rs=te,Ut(e),n&amp;8192)e:for(s=e.stateNode,s._visibility=o?s._visibility&amp;-2:s._visibility|1,o&amp;&amp;(a===null||O||Rs||dt||Oa(e)),a=null,s=e;;){if(s.tag===5||s.tag===26){if(a===null){O=a=s;try{if(u=O.stateNode,o)h=u.style,typeof h.setProperty==&quot;function&quot;?h.setProperty(&quot;display&quot;,&quot;none&quot;,&quot;important&quot;):h.display=&quot;none&quot;;else{N=O.stateNode;var ue=O.memoizedProps.style,se=ue!=null&amp;&amp;ue.hasOwnProperty(&quot;display&quot;)?ue.display:null;N.style.display=se==null||typeof se==&quot;boolean&quot;?&quot;&quot;:(&quot;&quot;+se).trim()}}catch(pe){Ze(O,O.return,pe)}}}else if(s.tag===6){if(a===null){O=s;try{O.stateNode.nodeValue=o?&quot;&quot;:O.memoizedProps}catch(pe){Ze(O,O.return,pe)}}}else if(s.tag===18){if(a===null){O=s;try{var ae=O.stateNode;o?Mx(ae,!0):Mx(O.stateNode,!1)}catch(pe){Ze(O,O.return,pe)}}}else if((s.tag!==22&amp;&amp;s.tag!==23||s.memoizedState===null||s===e)&amp;&amp;s.child!==null){s.child.return=s,s=s.child;continue}if(s===e)break e;for(;s.sibling===null;){if(s.return===null||s.return===e)break e;a===s&amp;&amp;(a=null),s=s.return}a===s&amp;&amp;(a=null),s.sibling.return=s.return,s=s.sibling}n&amp;4&amp;&amp;(n=e.updateQueue,n!==null&amp;&amp;(a=n.retryQueue,a!==null&amp;&amp;(n.retryQueue=null,Ur(e,a))));break;case 19:Lt(s,e),Ut(e),n&amp;4&amp;&amp;(n=e.updateQueue,n!==null&amp;&amp;(e.updateQueue=null,Ur(e,n)));break;case 30:break;case 21:break;default:Lt(s,e),Ut(e)}}function Ut(e){var s=e.flags;if(s&amp;2){try{for(var a,n=e.return;n!==null;){if(Rf(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var o=a.stateNode,u=go(e);Lr(e,u,o);break;case 5:var h=a.stateNode;a.flags&amp;32&amp;&amp;(Ja(h,&quot;&quot;),a.flags&amp;=-33);var N=go(e);Lr(e,N,h);break;case 3:case 4:var O=a.stateNode.containerInfo,te=go(e);bo(e,te,O);break;default:throw Error(c(161))}}catch(re){Ze(e,e.return,re)}e.flags&amp;=-3}s&amp;4096&amp;&amp;(e.flags&amp;=-4097)}function Yf(e){if(e.subtreeFlags&amp;1024)for(e=e.child;e!==null;){var s=e;Yf(s),s.tag===5&amp;&amp;s.flags&amp;1024&amp;&amp;s.stateNode.reset(),e=e.sibling}}function Ls(e,s){if(s.subtreeFlags&amp;8772)for(s=s.child;s!==null;)Uf(e,s.alternate,s),s=s.sibling}function Oa(e){for(e=e.child;e!==null;){var s=e;switch(s.tag){case 0:case 11:case 14:case 15:la(4,s,s.return),Oa(s);break;case 1:js(s,s.return);var a=s.stateNode;typeof a.componentWillUnmount==&quot;function&quot;&amp;&amp;Mf(s,s.return,a),Oa(s);break;case 27:yn(s.stateNode);case 26:case 5:js(s,s.return),Oa(s);break;case 22:s.memoizedState===null&amp;&amp;Oa(s);break;case 30:Oa(s);break;default:Oa(s)}e=e.sibling}}function Us(e,s,a){for(a=a&amp;&amp;(s.subtreeFlags&amp;8772)!==0,s=s.child;s!==null;){var n=s.alternate,o=e,u=s,h=u.flags;switch(u.tag){case 0:case 11:case 15:Us(o,u,a),dn(4,u);break;case 1:if(Us(o,u,a),n=u,o=n.stateNode,typeof o.componentDidMount==&quot;function&quot;)try{o.componentDidMount()}catch(te){Ze(n,n.return,te)}if(n=u,o=n.updateQueue,o!==null){var N=n.stateNode;try{var O=o.shared.hiddenCallbacks;if(O!==null)for(o.shared.hiddenCallbacks=null,o=0;o&lt;O.length;o++)jm(O[o],N)}catch(te){Ze(n,n.return,te)}}a&amp;&amp;h&amp;64&amp;&amp;zf(u),mn(u,u.return);break;case 27:Of(u);case 26:case 5:Us(o,u,a),a&amp;&amp;n===null&amp;&amp;h&amp;4&amp;&amp;Df(u),mn(u,u.return);break;case 12:Us(o,u,a);break;case 31:Us(o,u,a),a&amp;&amp;h&amp;4&amp;&amp;Bf(o,u);break;case 13:Us(o,u,a),a&amp;&amp;h&amp;4&amp;&amp;Hf(o,u);break;case 22:u.memoizedState===null&amp;&amp;Us(o,u,a),mn(u,u.return);break;case 30:break;default:Us(o,u,a)}s=s.sibling}}function vo(e,s){var a=null;e!==null&amp;&amp;e.memoizedState!==null&amp;&amp;e.memoizedState.cachePool!==null&amp;&amp;(a=e.memoizedState.cachePool.pool),e=null,s.memoizedState!==null&amp;&amp;s.memoizedState.cachePool!==null&amp;&amp;(e=s.memoizedState.cachePool.pool),e!==a&amp;&amp;(e!=null&amp;&amp;e.refCount++,a!=null&amp;&amp;Jl(a))}function yo(e,s){e=null,s.alternate!==null&amp;&amp;(e=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==e&amp;&amp;(s.refCount++,e!=null&amp;&amp;Jl(e))}function fs(e,s,a,n){if(s.subtreeFlags&amp;10256)for(s=s.child;s!==null;)Gf(e,s,a,n),s=s.sibling}function Gf(e,s,a,n){var o=s.flags;switch(s.tag){case 0:case 11:case 15:fs(e,s,a,n),o&amp;2048&amp;&amp;dn(9,s);break;case 1:fs(e,s,a,n);break;case 3:fs(e,s,a,n),o&amp;2048&amp;&amp;(e=null,s.alternate!==null&amp;&amp;(e=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==e&amp;&amp;(s.refCount++,e!=null&amp;&amp;Jl(e)));break;case 12:if(o&amp;2048){fs(e,s,a,n),e=s.stateNode;try{var u=s.memoizedProps,h=u.id,N=u.onPostCommit;typeof N==&quot;function&quot;&amp;&amp;N(h,s.alternate===null?&quot;mount&quot;:&quot;update&quot;,e.passiveEffectDuration,-0)}catch(O){Ze(s,s.return,O)}}else fs(e,s,a,n);break;case 31:fs(e,s,a,n);break;case 13:fs(e,s,a,n);break;case 23:break;case 22:u=s.stateNode,h=s.alternate,s.memoizedState!==null?u._visibility&amp;2?fs(e,s,a,n):fn(e,s):u._visibility&amp;2?fs(e,s,a,n):(u._visibility|=2,gl(e,s,a,n,(s.subtreeFlags&amp;10256)!==0||!1)),o&amp;2048&amp;&amp;vo(h,s);break;case 24:fs(e,s,a,n),o&amp;2048&amp;&amp;yo(s.alternate,s);break;default:fs(e,s,a,n)}}function gl(e,s,a,n,o){for(o=o&amp;&amp;((s.subtreeFlags&amp;10256)!==0||!1),s=s.child;s!==null;){var u=e,h=s,N=a,O=n,te=h.flags;switch(h.tag){case 0:case 11:case 15:gl(u,h,N,O,o),dn(8,h);break;case 23:break;case 22:var re=h.stateNode;h.memoizedState!==null?re._visibility&amp;2?gl(u,h,N,O,o):fn(u,h):(re._visibility|=2,gl(u,h,N,O,o)),o&amp;&amp;te&amp;2048&amp;&amp;vo(h.alternate,h);break;case 24:gl(u,h,N,O,o),o&amp;&amp;te&amp;2048&amp;&amp;yo(h.alternate,h);break;default:gl(u,h,N,O,o)}s=s.sibling}}function fn(e,s){if(s.subtreeFlags&amp;10256)for(s=s.child;s!==null;){var a=e,n=s,o=n.flags;switch(n.tag){case 22:fn(a,n),o&amp;2048&amp;&amp;vo(n.alternate,n);break;case 24:fn(a,n),o&amp;2048&amp;&amp;yo(n.alternate,n);break;default:fn(a,n)}s=s.sibling}}var xn=8192;function bl(e,s,a){if(e.subtreeFlags&amp;xn)for(e=e.child;e!==null;)Zf(e,s,a),e=e.sibling}function Zf(e,s,a){switch(e.tag){case 26:bl(e,s,a),e.flags&amp;xn&amp;&amp;e.memoizedState!==null&amp;&amp;ob(a,ms,e.memoizedState,e.memoizedProps);break;case 5:bl(e,s,a);break;case 3:case 4:var n=ms;ms=Jr(e.stateNode.containerInfo),bl(e,s,a),ms=n;break;case 22:e.memoizedState===null&amp;&amp;(n=e.alternate,n!==null&amp;&amp;n.memoizedState!==null?(n=xn,xn=16777216,bl(e,s,a),xn=n):bl(e,s,a));break;default:bl(e,s,a)}}function Qf(e){var s=e.alternate;if(s!==null&amp;&amp;(e=s.child,e!==null)){s.child=null;do s=e.sibling,e.sibling=null,e=s;while(e!==null)}}function hn(e){var s=e.deletions;if((e.flags&amp;16)!==0){if(s!==null)for(var a=0;a&lt;s.length;a++){var n=s[a];gt=n,Pf(n,e)}Qf(e)}if(e.subtreeFlags&amp;10256)for(e=e.child;e!==null;)Xf(e),e=e.sibling}function Xf(e){switch(e.tag){case 0:case 11:case 15:hn(e),e.flags&amp;2048&amp;&amp;la(9,e,e.return);break;case 3:hn(e);break;case 12:hn(e);break;case 22:var s=e.stateNode;e.memoizedState!==null&amp;&amp;s._visibility&amp;2&amp;&amp;(e.return===null||e.return.tag!==13)?(s._visibility&amp;=-3,$r(e)):hn(e);break;default:hn(e)}}function $r(e){var s=e.deletions;if((e.flags&amp;16)!==0){if(s!==null)for(var a=0;a&lt;s.length;a++){var n=s[a];gt=n,Pf(n,e)}Qf(e)}for(e=e.child;e!==null;){switch(s=e,s.tag){case 0:case 11:case 15:la(8,s,s.return),$r(s);break;case 22:a=s.stateNode,a._visibility&amp;2&amp;&amp;(a._visibility&amp;=-3,$r(s));break;default:$r(s)}e=e.sibling}}function Pf(e,s){for(;gt!==null;){var a=gt;switch(a.tag){case 0:case 11:case 15:la(8,a,s);break;case 23:case 22:if(a.memoizedState!==null&amp;&amp;a.memoizedState.cachePool!==null){var n=a.memoizedState.cachePool.pool;n!=null&amp;&amp;n.refCount++}break;case 24:Jl(a.memoizedState.cache)}if(n=a.child,n!==null)n.return=a,gt=n;else e:for(a=e;gt!==null;){n=gt;var o=n.sibling,u=n.return;if($f(n),n===a){gt=null;break e}if(o!==null){o.return=u,gt=o;break e}gt=u}}}var Sg={getCacheForType:function(e){var s=yt(ct),a=s.data.get(e);return a===void 0&amp;&amp;(a=e(),s.data.set(e,a)),a},cacheSignal:function(){return yt(ct).controller.signal}},wg=typeof WeakMap==&quot;function&quot;?WeakMap:Map,Ye=0,Fe=null,De=null,Oe=0,Ge=0,Zt=null,na=!1,jl=!1,No=!1,$s=0,lt=0,ra=0,La=0,_o=0,Qt=0,vl=0,pn=null,$t=null,So=!1,qr=0,Ff=0,Br=1/0,Hr=null,ia=null,mt=0,ca=null,yl=null,qs=0,wo=0,Co=null,Kf=null,gn=0,Eo=null;function Xt(){return(Ye&amp;2)!==0&amp;&amp;Oe!==0?Oe&amp;-Oe:_.T!==null?Do():dd()}function Jf(){if(Qt===0)if((Oe&amp;536870912)===0||$e){var e=Fn;Fn&lt;&lt;=1,(Fn&amp;3932160)===0&amp;&amp;(Fn=262144),Qt=e}else Qt=536870912;return e=Yt.current,e!==null&amp;&amp;(e.flags|=32),Qt}function qt(e,s,a){(e===Fe&amp;&amp;(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&amp;&amp;(Nl(e,0),oa(e,Oe,Qt,!1)),Ul(e,a),((Ye&amp;2)===0||e!==Fe)&amp;&amp;(e===Fe&amp;&amp;((Ye&amp;2)===0&amp;&amp;(La|=a),lt===4&amp;&amp;oa(e,Oe,Qt,!1)),vs(e))}function If(e,s,a){if((Ye&amp;6)!==0)throw Error(c(327));var n=!a&amp;&amp;(s&amp;127)===0&amp;&amp;(s&amp;e.expiredLanes)===0||Ll(e,s),o=n?Ag(e,s):ko(e,s,!0),u=n;do{if(o===0){jl&amp;&amp;!n&amp;&amp;oa(e,s,0,!1);break}else{if(a=e.current.alternate,u&amp;&amp;!Cg(a)){o=ko(e,s,!1),u=!1;continue}if(o===2){if(u=s,e.errorRecoveryDisabledLanes&amp;u)var h=0;else h=e.pendingLanes&amp;-536870913,h=h!==0?h:h&amp;536870912?536870912:0;if(h!==0){s=h;e:{var N=e;o=pn;var O=N.current.memoizedState.isDehydrated;if(O&amp;&amp;(Nl(N,h).flags|=256),h=ko(N,h,!1),h!==2){if(No&amp;&amp;!O){N.errorRecoveryDisabledLanes|=u,La|=u,o=4;break e}u=$t,$t=o,u!==null&amp;&amp;($t===null?$t=u:$t.push.apply($t,u))}o=h}if(u=!1,o!==2)continue}}if(o===1){Nl(e,0),oa(e,s,0,!0);break}e:{switch(n=e,u=o,u){case 0:case 1:throw Error(c(345));case 4:if((s&amp;4194048)!==s)break;case 6:oa(n,s,Qt,!na);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(c(329))}if((s&amp;62914560)===s&amp;&amp;(o=qr+300-et(),10&lt;o)){if(oa(n,s,Qt,!na),Jn(n,0,!0)!==0)break e;qs=s,n.timeoutHandle=kx(Wf.bind(null,n,a,$t,Hr,So,s,Qt,La,vl,na,u,&quot;Throttled&quot;,-0,0),o);break e}Wf(n,a,$t,Hr,So,s,Qt,La,vl,na,u,null,-0,0)}}break}while(!0);vs(e)}function Wf(e,s,a,n,o,u,h,N,O,te,re,ue,se,ae){if(e.timeoutHandle=-1,ue=s.subtreeFlags,ue&amp;8192||(ue&amp;16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ss},Zf(s,u,ue);var pe=(u&amp;62914560)===u?qr-et():(u&amp;4194048)===u?Ff-et():0;if(pe=ub(ue,pe),pe!==null){qs=u,e.cancelPendingCommit=pe(ix.bind(null,e,s,u,a,n,o,h,N,O,re,ue,null,se,ae)),oa(e,u,h,!te);return}}ix(e,s,u,a,n,o,h,N,O)}function Cg(e){for(var s=e;;){var a=s.tag;if((a===0||a===11||a===15)&amp;&amp;s.flags&amp;16384&amp;&amp;(a=s.updateQueue,a!==null&amp;&amp;(a=a.stores,a!==null)))for(var n=0;n&lt;a.length;n++){var o=a[n],u=o.getSnapshot;o=o.value;try{if(!Ht(u(),o))return!1}catch{return!1}}if(a=s.child,s.subtreeFlags&amp;16384&amp;&amp;a!==null)a.return=s,s=a;else{if(s===e)break;for(;s.sibling===null;){if(s.return===null||s.return===e)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function oa(e,s,a,n){s&amp;=~_o,s&amp;=~La,e.suspendedLanes|=s,e.pingedLanes&amp;=~s,n&amp;&amp;(e.warmLanes|=s),n=e.expirationTimes;for(var o=s;0&lt;o;){var u=31-ne(o),h=1&lt;&lt;u;n[u]=-1,o&amp;=~h}a!==0&amp;&amp;cd(e,a,s)}function Vr(){return(Ye&amp;6)===0?(bn(0),!1):!0}function Ao(){if(De!==null){if(Ge===0)var e=De.return;else e=De,As=Ea=null,Yc(e),ml=null,Wl=0,e=De;for(;e!==null;)Tf(e.alternate,e),e=e.return;De=null}}function Nl(e,s){var a=e.timeoutHandle;a!==-1&amp;&amp;(e.timeoutHandle=-1,Qg(a)),a=e.cancelPendingCommit,a!==null&amp;&amp;(e.cancelPendingCommit=null,a()),qs=0,Ao(),Fe=e,De=a=Cs(e.current,null),Oe=s,Ge=0,Zt=null,na=!1,jl=Ll(e,s),No=!1,vl=Qt=_o=La=ra=lt=0,$t=pn=null,So=!1,(s&amp;8)!==0&amp;&amp;(s|=s&amp;32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&amp;=s;0&lt;n;){var o=31-ne(n),u=1&lt;&lt;o;s|=e[o],n&amp;=~u}return $s=s,or(),a}function ex(e,s){Te=null,_.H=cn,s===dl||s===gr?(s=hm(),Ge=3):s===zc?(s=hm(),Ge=4):Ge=s===no?8:s!==null&amp;&amp;typeof s==&quot;object&quot;&amp;&amp;typeof s.then==&quot;function&quot;?6:1,Zt=s,De===null&amp;&amp;(lt=1,zr(e,Wt(s,e.current)))}function tx(){var e=Yt.current;return e===null?!0:(Oe&amp;4194048)===Oe?as===null:(Oe&amp;62914560)===Oe||(Oe&amp;536870912)!==0?e===as:!1}function sx(){var e=_.H;return _.H=cn,e===null?cn:e}function ax(){var e=_.A;return _.A=Sg,e}function Yr(){lt=4,na||(Oe&amp;4194048)!==Oe&amp;&amp;Yt.current!==null||(jl=!0),(ra&amp;134217727)===0&amp;&amp;(La&amp;134217727)===0||Fe===null||oa(Fe,Oe,Qt,!1)}function ko(e,s,a){var n=Ye;Ye|=2;var o=sx(),u=ax();(Fe!==e||Oe!==s)&amp;&amp;(Hr=null,Nl(e,s)),s=!1;var h=lt;e:do try{if(Ge!==0&amp;&amp;De!==null){var N=De,O=Zt;switch(Ge){case 8:Ao(),h=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&amp;&amp;(s=!0);var te=Ge;if(Ge=0,Zt=null,_l(e,N,O,te),a&amp;&amp;jl){h=0;break e}break;default:te=Ge,Ge=0,Zt=null,_l(e,N,O,te)}}Eg(),h=lt;break}catch(re){ex(e,re)}while(!0);return s&amp;&amp;e.shellSuspendCounter++,As=Ea=null,Ye=n,_.H=o,_.A=u,De===null&amp;&amp;(Fe=null,Oe=0,or()),h}function Eg(){for(;De!==null;)lx(De)}function Ag(e,s){var a=Ye;Ye|=2;var n=sx(),o=ax();Fe!==e||Oe!==s?(Hr=null,Br=et()+500,Nl(e,s)):jl=Ll(e,s);e:do try{if(Ge!==0&amp;&amp;De!==null){s=De;var u=Zt;t:switch(Ge){case 1:Ge=0,Zt=null,_l(e,s,u,1);break;case 2:case 9:if(fm(u)){Ge=0,Zt=null,nx(s);break}s=function(){Ge!==2&amp;&amp;Ge!==9||Fe!==e||(Ge=7),vs(e)},u.then(s,s);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:fm(u)?(Ge=0,Zt=null,nx(s)):(Ge=0,Zt=null,_l(e,s,u,7));break;case 5:var h=null;switch(De.tag){case 26:h=De.memoizedState;case 5:case 27:var N=De;if(h?Gx(h):N.stateNode.complete){Ge=0,Zt=null;var O=N.sibling;if(O!==null)De=O;else{var te=N.return;te!==null?(De=te,Gr(te)):De=null}break t}}Ge=0,Zt=null,_l(e,s,u,5);break;case 6:Ge=0,Zt=null,_l(e,s,u,6);break;case 8:Ao(),lt=6;break e;default:throw Error(c(462))}}kg();break}catch(re){ex(e,re)}while(!0);return As=Ea=null,_.H=n,_.A=o,Ye=a,De!==null?0:(Fe=null,Oe=0,or(),lt)}function kg(){for(;De!==null&amp;&amp;!nt();)lx(De)}function lx(e){var s=Af(e.alternate,e,$s);e.memoizedProps=e.pendingProps,s===null?Gr(e):De=s}function nx(e){var s=e,a=s.alternate;switch(s.tag){case 15:case 0:s=Nf(a,s,s.pendingProps,s.type,void 0,Oe);break;case 11:s=Nf(a,s,s.pendingProps,s.type.render,s.ref,Oe);break;case 5:Yc(s);default:Tf(a,s),s=De=sm(s,$s),s=Af(a,s,$s)}e.memoizedProps=e.pendingProps,s===null?Gr(e):De=s}function _l(e,s,a,n){As=Ea=null,Yc(s),ml=null,Wl=0;var o=s.return;try{if(gg(e,o,s,a,Oe)){lt=1,zr(e,Wt(a,e.current)),De=null;return}}catch(u){if(o!==null)throw De=o,u;lt=1,zr(e,Wt(a,e.current)),De=null;return}s.flags&amp;32768?($e||n===1?e=!0:jl||(Oe&amp;536870912)!==0?e=!1:(na=e=!0,(n===2||n===9||n===3||n===6)&amp;&amp;(n=Yt.current,n!==null&amp;&amp;n.tag===13&amp;&amp;(n.flags|=16384))),rx(s,e)):Gr(s)}function Gr(e){var s=e;do{if((s.flags&amp;32768)!==0){rx(s,na);return}e=s.return;var a=vg(s.alternate,s,$s);if(a!==null){De=a;return}if(s=s.sibling,s!==null){De=s;return}De=s=e}while(s!==null);lt===0&amp;&amp;(lt=5)}function rx(e,s){do{var a=yg(e.alternate,e);if(a!==null){a.flags&amp;=32767,De=a;return}if(a=e.return,a!==null&amp;&amp;(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!s&amp;&amp;(e=e.sibling,e!==null)){De=e;return}De=e=a}while(e!==null);lt=6,De=null}function ix(e,s,a,n,o,u,h,N,O){e.cancelPendingCommit=null;do Zr();while(mt!==0);if((Ye&amp;6)!==0)throw Error(c(327));if(s!==null){if(s===e.current)throw Error(c(177));if(u=s.lanes|s.childLanes,u|=pc,c0(e,a,u,h,N,O),e===Fe&amp;&amp;(De=Fe=null,Oe=0),yl=s,ca=e,qs=a,wo=u,Co=o,Kf=n,(s.subtreeFlags&amp;10256)!==0||(s.flags&amp;10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Dg(Zs,function(){return mx(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(s.flags&amp;13878)!==0,(s.subtreeFlags&amp;13878)!==0||n){n=_.T,_.T=null,o=z.p,z.p=2,h=Ye,Ye|=4;try{Ng(e,s,a)}finally{Ye=h,z.p=o,_.T=n}}mt=1,cx(),ox(),ux()}}function cx(){if(mt===1){mt=0;var e=ca,s=yl,a=(s.flags&amp;13878)!==0;if((s.subtreeFlags&amp;13878)!==0||a){a=_.T,_.T=null;var n=z.p;z.p=2;var o=Ye;Ye|=4;try{Vf(s,e);var u=Ho,h=Xd(e.containerInfo),N=u.focusedElem,O=u.selectionRange;if(h!==N&amp;&amp;N&amp;&amp;N.ownerDocument&amp;&amp;Qd(N.ownerDocument.documentElement,N)){if(O!==null&amp;&amp;dc(N)){var te=O.start,re=O.end;if(re===void 0&amp;&amp;(re=te),&quot;selectionStart&quot;in N)N.selectionStart=te,N.selectionEnd=Math.min(re,N.value.length);else{var ue=N.ownerDocument||document,se=ue&amp;&amp;ue.defaultView||window;if(se.getSelection){var ae=se.getSelection(),pe=N.textContent.length,ye=Math.min(O.start,pe),Pe=O.end===void 0?ye:Math.min(O.end,pe);!ae.extend&amp;&amp;ye&gt;Pe&amp;&amp;(h=Pe,Pe=ye,ye=h);var Q=Zd(N,ye),V=Zd(N,Pe);if(Q&amp;&amp;V&amp;&amp;(ae.rangeCount!==1||ae.anchorNode!==Q.node||ae.anchorOffset!==Q.offset||ae.focusNode!==V.node||ae.focusOffset!==V.offset)){var W=ue.createRange();W.setStart(Q.node,Q.offset),ae.removeAllRanges(),ye&gt;Pe?(ae.addRange(W),ae.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),ae.addRange(W))}}}}for(ue=[],ae=N;ae=ae.parentNode;)ae.nodeType===1&amp;&amp;ue.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof N.focus==&quot;function&quot;&amp;&amp;N.focus(),N=0;N&lt;ue.length;N++){var oe=ue[N];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ai=!!Bo,Ho=Bo=null}finally{Ye=o,z.p=n,_.T=a}}e.current=s,mt=2}}function ox(){if(mt===2){mt=0;var e=ca,s=yl,a=(s.flags&amp;8772)!==0;if((s.subtreeFlags&amp;8772)!==0||a){a=_.T,_.T=null;var n=z.p;z.p=2;var o=Ye;Ye|=4;try{Uf(e,s.alternate,s)}finally{Ye=o,z.p=n,_.T=a}}mt=3}}function ux(){if(mt===4||mt===3){mt=0,us();var e=ca,s=yl,a=qs,n=Kf;(s.subtreeFlags&amp;10256)!==0||(s.flags&amp;10256)!==0?mt=5:(mt=0,yl=ca=null,dx(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&amp;&amp;(ia=null),Qi(a),s=s.stateNode,ie&amp;&amp;typeof ie.onCommitFiberRoot==&quot;function&quot;)try{ie.onCommitFiberRoot(ps,s,void 0,(s.current.flags&amp;128)===128)}catch{}if(n!==null){s=_.T,o=z.p,z.p=2,_.T=null;try{for(var u=e.onRecoverableError,h=0;h&lt;n.length;h++){var N=n[h];u(N.value,{componentStack:N.stack})}}finally{_.T=s,z.p=o}}(qs&amp;3)!==0&amp;&amp;Zr(),vs(e),o=e.pendingLanes,(a&amp;261930)!==0&amp;&amp;(o&amp;42)!==0?e===Eo?gn++:(gn=0,Eo=e):gn=0,bn(0)}}function dx(e,s){(e.pooledCacheLanes&amp;=s)===0&amp;&amp;(s=e.pooledCache,s!=null&amp;&amp;(e.pooledCache=null,Jl(s)))}function Zr(){return cx(),ox(),ux(),mx()}function mx(){if(mt!==5)return!1;var e=ca,s=wo;wo=0;var a=Qi(qs),n=_.T,o=z.p;try{z.p=32&gt;a?32:a,_.T=null,a=Co,Co=null;var u=ca,h=qs;if(mt=0,yl=ca=null,qs=0,(Ye&amp;6)!==0)throw Error(c(331));var N=Ye;if(Ye|=4,Xf(u.current),Gf(u,u.current,h,a),Ye=N,bn(0,!1),ie&amp;&amp;typeof ie.onPostCommitFiberRoot==&quot;function&quot;)try{ie.onPostCommitFiberRoot(ps,u)}catch{}return!0}finally{z.p=o,_.T=n,dx(e,s)}}function fx(e,s,a){s=Wt(a,s),s=lo(e.stateNode,s,2),e=ta(e,s,2),e!==null&amp;&amp;(Ul(e,2),vs(e))}function Ze(e,s,a){if(e.tag===3)fx(e,e,a);else for(;s!==null;){if(s.tag===3){fx(s,e,a);break}else if(s.tag===1){var n=s.stateNode;if(typeof s.type.getDerivedStateFromError==&quot;function&quot;||typeof n.componentDidCatch==&quot;function&quot;&amp;&amp;(ia===null||!ia.has(n))){e=Wt(a,e),a=xf(2),n=ta(s,a,2),n!==null&amp;&amp;(hf(a,n,s,e),Ul(n,2),vs(n));break}}s=s.return}}function To(e,s,a){var n=e.pingCache;if(n===null){n=e.pingCache=new wg;var o=new Set;n.set(s,o)}else o=n.get(s),o===void 0&amp;&amp;(o=new Set,n.set(s,o));o.has(a)||(No=!0,o.add(a),e=Tg.bind(null,e,s,a),s.then(e,e))}function Tg(e,s,a){var n=e.pingCache;n!==null&amp;&amp;n.delete(s),e.pingedLanes|=e.suspendedLanes&amp;a,e.warmLanes&amp;=~a,Fe===e&amp;&amp;(Oe&amp;a)===a&amp;&amp;(lt===4||lt===3&amp;&amp;(Oe&amp;62914560)===Oe&amp;&amp;300&gt;et()-qr?(Ye&amp;2)===0&amp;&amp;Nl(e,0):_o|=a,vl===Oe&amp;&amp;(vl=0)),vs(e)}function xx(e,s){s===0&amp;&amp;(s=id()),e=Sa(e,s),e!==null&amp;&amp;(Ul(e,s),vs(e))}function zg(e){var s=e.memoizedState,a=0;s!==null&amp;&amp;(a=s.retryLane),xx(e,a)}function Mg(e,s){var a=0;switch(e.tag){case 31:case 13:var n=e.stateNode,o=e.memoizedState;o!==null&amp;&amp;(a=o.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(c(314))}n!==null&amp;&amp;n.delete(s),xx(e,a)}function Dg(e,s){return zt(e,s)}var Qr=null,Sl=null,zo=!1,Xr=!1,Mo=!1,ua=0;function vs(e){e!==Sl&amp;&amp;e.next===null&amp;&amp;(Sl===null?Qr=Sl=e:Sl=Sl.next=e),Xr=!0,zo||(zo=!0,Og())}function bn(e,s){if(!Mo&amp;&amp;Xr){Mo=!0;do for(var a=!1,n=Qr;n!==null;){if(e!==0){var o=n.pendingLanes;if(o===0)var u=0;else{var h=n.suspendedLanes,N=n.pingedLanes;u=(1&lt;&lt;31-ne(42|e)+1)-1,u&amp;=o&amp;~(h&amp;~N),u=u&amp;201326741?u&amp;201326741|1:u?u|2:0}u!==0&amp;&amp;(a=!0,bx(n,u))}else u=Oe,u=Jn(n,n===Fe?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&amp;3)===0||Ll(n,u)||(a=!0,bx(n,u));n=n.next}while(a);Mo=!1}}function Rg(){hx()}function hx(){Xr=zo=!1;var e=0;ua!==0&amp;&amp;Zg()&amp;&amp;(e=ua);for(var s=et(),a=null,n=Qr;n!==null;){var o=n.next,u=px(n,s);u===0?(n.next=null,a===null?Qr=o:a.next=o,o===null&amp;&amp;(Sl=a)):(a=n,(e!==0||(u&amp;3)!==0)&amp;&amp;(Xr=!0)),n=o}mt!==0&amp;&amp;mt!==5||bn(e),ua!==0&amp;&amp;(ua=0)}function px(e,s){for(var a=e.suspendedLanes,n=e.pingedLanes,o=e.expirationTimes,u=e.pendingLanes&amp;-62914561;0&lt;u;){var h=31-ne(u),N=1&lt;&lt;h,O=o[h];O===-1?((N&amp;a)===0||(N&amp;n)!==0)&amp;&amp;(o[h]=i0(N,s)):O&lt;=s&amp;&amp;(e.expiredLanes|=N),u&amp;=~N}if(s=Fe,a=Oe,a=Jn(e,e===s?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,a===0||e===s&amp;&amp;(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return n!==null&amp;&amp;n!==null&amp;&amp;Mt(n),e.callbackNode=null,e.callbackPriority=0;if((a&amp;3)===0||Ll(e,a)){if(s=a&amp;-a,s===e.callbackPriority)return s;switch(n!==null&amp;&amp;Mt(n),Qi(a)){case 2:case 8:a=At;break;case 32:a=Zs;break;case 268435456:a=Va;break;default:a=Zs}return n=gx.bind(null,e),a=zt(a,n),e.callbackPriority=s,e.callbackNode=a,s}return n!==null&amp;&amp;n!==null&amp;&amp;Mt(n),e.callbackPriority=2,e.callbackNode=null,2}function gx(e,s){if(mt!==0&amp;&amp;mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Zr()&amp;&amp;e.callbackNode!==a)return null;var n=Oe;return n=Jn(e,e===Fe?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(If(e,n,s),px(e,et()),e.callbackNode!=null&amp;&amp;e.callbackNode===a?gx.bind(null,e):null)}function bx(e,s){if(Zr())return null;If(e,s,!0)}function Og(){Xg(function(){(Ye&amp;6)!==0?zt(Ns,Rg):hx()})}function Do(){if(ua===0){var e=ol;e===0&amp;&amp;(e=Pn,Pn&lt;&lt;=1,(Pn&amp;261888)===0&amp;&amp;(Pn=256)),ua=e}return ua}function jx(e){return e==null||typeof e==&quot;symbol&quot;||typeof e==&quot;boolean&quot;?null:typeof e==&quot;function&quot;?e:tr(&quot;&quot;+e)}function vx(e,s){var a=s.ownerDocument.createElement(&quot;input&quot;);return a.name=s.name,a.value=s.value,e.id&amp;&amp;a.setAttribute(&quot;form&quot;,e.id),s.parentNode.insertBefore(a,s),e=new FormData(e),a.parentNode.removeChild(a),e}function Lg(e,s,a,n,o){if(s===&quot;submit&quot;&amp;&amp;a&amp;&amp;a.stateNode===o){var u=jx((o[Dt]||null).action),h=n.submitter;h&amp;&amp;(s=(s=h[Dt]||null)?jx(s.formAction):h.getAttribute(&quot;formAction&quot;),s!==null&amp;&amp;(u=s,h=null));var N=new nr(&quot;action&quot;,&quot;action&quot;,null,n,o);e.push({event:N,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(ua!==0){var O=h?vx(o,h):new FormData(o);Ic(a,{pending:!0,data:O,method:o.method,action:u},null,O)}}else typeof u==&quot;function&quot;&amp;&amp;(N.preventDefault(),O=h?vx(o,h):new FormData(o),Ic(a,{pending:!0,data:O,method:o.method,action:u},u,O))},currentTarget:o}]})}}for(var Ro=0;Ro&lt;hc.length;Ro++){var Oo=hc[Ro],Ug=Oo.toLowerCase(),$g=Oo[0].toUpperCase()+Oo.slice(1);ds(Ug,&quot;on&quot;+$g)}ds(Kd,&quot;onAnimationEnd&quot;),ds(Jd,&quot;onAnimationIteration&quot;),ds(Id,&quot;onAnimationStart&quot;),ds(&quot;dblclick&quot;,&quot;onDoubleClick&quot;),ds(&quot;focusin&quot;,&quot;onFocus&quot;),ds(&quot;focusout&quot;,&quot;onBlur&quot;),ds(eg,&quot;onTransitionRun&quot;),ds(tg,&quot;onTransitionStart&quot;),ds(sg,&quot;onTransitionCancel&quot;),ds(Wd,&quot;onTransitionEnd&quot;),Fa(&quot;onMouseEnter&quot;,[&quot;mouseout&quot;,&quot;mouseover&quot;]),Fa(&quot;onMouseLeave&quot;,[&quot;mouseout&quot;,&quot;mouseover&quot;]),Fa(&quot;onPointerEnter&quot;,[&quot;pointerout&quot;,&quot;pointerover&quot;]),Fa(&quot;onPointerLeave&quot;,[&quot;pointerout&quot;,&quot;pointerover&quot;]),va(&quot;onChange&quot;,&quot;change click focusin focusout input keydown keyup selectionchange&quot;.split(&quot; &quot;)),va(&quot;onSelect&quot;,&quot;focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange&quot;.split(&quot; &quot;)),va(&quot;onBeforeInput&quot;,[&quot;compositionend&quot;,&quot;keypress&quot;,&quot;textInput&quot;,&quot;paste&quot;]),va(&quot;onCompositionEnd&quot;,&quot;compositionend focusout keydown keypress keyup mousedown&quot;.split(&quot; &quot;)),va(&quot;onCompositionStart&quot;,&quot;compositionstart focusout keydown keypress keyup mousedown&quot;.split(&quot; &quot;)),va(&quot;onCompositionUpdate&quot;,&quot;compositionupdate focusout keydown keypress keyup mousedown&quot;.split(&quot; &quot;));var jn=&quot;abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting&quot;.split(&quot; &quot;),qg=new Set(&quot;beforetoggle cancel close invalid load scroll scrollend toggle&quot;.split(&quot; &quot;).concat(jn));function yx(e,s){s=(s&amp;4)!==0;for(var a=0;a&lt;e.length;a++){var n=e[a],o=n.event;n=n.listeners;e:{var u=void 0;if(s)for(var h=n.length-1;0&lt;=h;h--){var N=n[h],O=N.instance,te=N.currentTarget;if(N=N.listener,O!==u&amp;&amp;o.isPropagationStopped())break e;u=N,o.currentTarget=te;try{u(o)}catch(re){cr(re)}o.currentTarget=null,u=O}else for(h=0;h&lt;n.length;h++){if(N=n[h],O=N.instance,te=N.currentTarget,N=N.listener,O!==u&amp;&amp;o.isPropagationStopped())break e;u=N,o.currentTarget=te;try{u(o)}catch(re){cr(re)}o.currentTarget=null,u=O}}}}function Re(e,s){var a=s[Xi];a===void 0&amp;&amp;(a=s[Xi]=new Set);var n=e+&quot;__bubble&quot;;a.has(n)||(Nx(s,e,2,!1),a.add(n))}function Lo(e,s,a){var n=0;s&amp;&amp;(n|=4),Nx(a,e,n,s)}var Pr=&quot;_reactListening&quot;+Math.random().toString(36).slice(2);function Uo(e){if(!e[Pr]){e[Pr]=!0,xd.forEach(function(a){a!==&quot;selectionchange&quot;&amp;&amp;(qg.has(a)||Lo(a,!1,e),Lo(a,!0,e))});var s=e.nodeType===9?e:e.ownerDocument;s===null||s[Pr]||(s[Pr]=!0,Lo(&quot;selectionchange&quot;,!1,s))}}function Nx(e,s,a,n){switch(Jx(s)){case 2:var o=fb;break;case 8:o=xb;break;default:o=Io}a=o.bind(null,s,a,e),o=void 0,!sc||s!==&quot;touchstart&quot;&amp;&amp;s!==&quot;touchmove&quot;&amp;&amp;s!==&quot;wheel&quot;||(o=!0),n?o!==void 0?e.addEventListener(s,a,{capture:!0,passive:o}):e.addEventListener(s,a,!0):o!==void 0?e.addEventListener(s,a,{passive:o}):e.addEventListener(s,a,!1)}function $o(e,s,a,n,o){var u=n;if((s&amp;1)===0&amp;&amp;(s&amp;2)===0&amp;&amp;n!==null)e:for(;;){if(n===null)return;var h=n.tag;if(h===3||h===4){var N=n.stateNode.containerInfo;if(N===o)break;if(h===4)for(h=n.return;h!==null;){var O=h.tag;if((O===3||O===4)&amp;&amp;h.stateNode.containerInfo===o)return;h=h.return}for(;N!==null;){if(h=Qa(N),h===null)return;if(O=h.tag,O===5||O===6||O===26||O===27){n=u=h;continue e}N=N.parentNode}}n=n.return}Cd(function(){var te=u,re=ec(a),ue=[];e:{var se=em.get(e);if(se!==void 0){var ae=nr,pe=e;switch(e){case&quot;keypress&quot;:if(ar(a)===0)break e;case&quot;keydown&quot;:case&quot;keyup&quot;:ae=M0;break;case&quot;focusin&quot;:pe=&quot;focus&quot;,ae=rc;break;case&quot;focusout&quot;:pe=&quot;blur&quot;,ae=rc;break;case&quot;beforeblur&quot;:case&quot;afterblur&quot;:ae=rc;break;case&quot;click&quot;:if(a.button===2)break e;case&quot;auxclick&quot;:case&quot;dblclick&quot;:case&quot;mousedown&quot;:case&quot;mousemove&quot;:case&quot;mouseup&quot;:case&quot;mouseout&quot;:case&quot;mouseover&quot;:case&quot;contextmenu&quot;:ae=kd;break;case&quot;drag&quot;:case&quot;dragend&quot;:case&quot;dragenter&quot;:case&quot;dragexit&quot;:case&quot;dragleave&quot;:case&quot;dragover&quot;:case&quot;dragstart&quot;:case&quot;drop&quot;:ae=v0;break;case&quot;touchcancel&quot;:case&quot;touchend&quot;:case&quot;touchmove&quot;:case&quot;touchstart&quot;:ae=O0;break;case Kd:case Jd:case Id:ae=_0;break;case Wd:ae=U0;break;case&quot;scroll&quot;:case&quot;scrollend&quot;:ae=b0;break;case&quot;wheel&quot;:ae=q0;break;case&quot;copy&quot;:case&quot;cut&quot;:case&quot;paste&quot;:ae=w0;break;case&quot;gotpointercapture&quot;:case&quot;lostpointercapture&quot;:case&quot;pointercancel&quot;:case&quot;pointerdown&quot;:case&quot;pointermove&quot;:case&quot;pointerout&quot;:case&quot;pointerover&quot;:case&quot;pointerup&quot;:ae=zd;break;case&quot;toggle&quot;:case&quot;beforetoggle&quot;:ae=H0}var ye=(s&amp;4)!==0,Pe=!ye&amp;&amp;(e===&quot;scroll&quot;||e===&quot;scrollend&quot;),Q=ye?se!==null?se+&quot;Capture&quot;:null:se;ye=[];for(var V=te,W;V!==null;){var oe=V;if(W=oe.stateNode,oe=oe.tag,oe!==5&amp;&amp;oe!==26&amp;&amp;oe!==27||W===null||Q===null||(oe=Bl(V,Q),oe!=null&amp;&amp;ye.push(vn(V,oe,W))),Pe)break;V=V.return}0&lt;ye.length&amp;&amp;(se=new ae(se,pe,null,a,re),ue.push({event:se,listeners:ye}))}}if((s&amp;7)===0){e:{if(se=e===&quot;mouseover&quot;||e===&quot;pointerover&quot;,ae=e===&quot;mouseout&quot;||e===&quot;pointerout&quot;,se&amp;&amp;a!==Wi&amp;&amp;(pe=a.relatedTarget||a.fromElement)&amp;&amp;(Qa(pe)||pe[Za]))break e;if((ae||se)&amp;&amp;(se=re.window===re?re:(se=re.ownerDocument)?se.defaultView||se.parentWindow:window,ae?(pe=a.relatedTarget||a.toElement,ae=te,pe=pe?Qa(pe):null,pe!==null&amp;&amp;(Pe=f(pe),ye=pe.tag,pe!==Pe||ye!==5&amp;&amp;ye!==27&amp;&amp;ye!==6)&amp;&amp;(pe=null)):(ae=null,pe=te),ae!==pe)){if(ye=kd,oe=&quot;onMouseLeave&quot;,Q=&quot;onMouseEnter&quot;,V=&quot;mouse&quot;,(e===&quot;pointerout&quot;||e===&quot;pointerover&quot;)&amp;&amp;(ye=zd,oe=&quot;onPointerLeave&quot;,Q=&quot;onPointerEnter&quot;,V=&quot;pointer&quot;),Pe=ae==null?se:ql(ae),W=pe==null?se:ql(pe),se=new ye(oe,V+&quot;leave&quot;,ae,a,re),se.target=Pe,se.relatedTarget=W,oe=null,Qa(re)===te&amp;&amp;(ye=new ye(Q,V+&quot;enter&quot;,pe,a,re),ye.target=W,ye.relatedTarget=Pe,oe=ye),Pe=oe,ae&amp;&amp;pe)t:{for(ye=Bg,Q=ae,V=pe,W=0,oe=Q;oe;oe=ye(oe))W++;oe=0;for(var ve=V;ve;ve=ye(ve))oe++;for(;0&lt;W-oe;)Q=ye(Q),W--;for(;0&lt;oe-W;)V=ye(V),oe--;for(;W--;){if(Q===V||V!==null&amp;&amp;Q===V.alternate){ye=Q;break t}Q=ye(Q),V=ye(V)}ye=null}else ye=null;ae!==null&amp;&amp;_x(ue,se,ae,ye,!1),pe!==null&amp;&amp;Pe!==null&amp;&amp;_x(ue,Pe,pe,ye,!0)}}e:{if(se=te?ql(te):window,ae=se.nodeName&amp;&amp;se.nodeName.toLowerCase(),ae===&quot;select&quot;||ae===&quot;input&quot;&amp;&amp;se.type===&quot;file&quot;)var Be=qd;else if(Ud(se))if(Bd)Be=J0;else{Be=F0;var ge=P0}else ae=se.nodeName,!ae||ae.toLowerCase()!==&quot;input&quot;||se.type!==&quot;checkbox&quot;&amp;&amp;se.type!==&quot;radio&quot;?te&amp;&amp;Ii(te.elementType)&amp;&amp;(Be=qd):Be=K0;if(Be&amp;&amp;(Be=Be(e,te))){$d(ue,Be,a,re);break e}ge&amp;&amp;ge(e,se,te),e===&quot;focusout&quot;&amp;&amp;te&amp;&amp;se.type===&quot;number&quot;&amp;&amp;te.memoizedProps.value!=null&amp;&amp;Ji(se,&quot;number&quot;,se.value)}switch(ge=te?ql(te):window,e){case&quot;focusin&quot;:(Ud(ge)||ge.contentEditable===&quot;true&quot;)&amp;&amp;(tl=ge,mc=te,Pl=null);break;case&quot;focusout&quot;:Pl=mc=tl=null;break;case&quot;mousedown&quot;:fc=!0;break;case&quot;contextmenu&quot;:case&quot;mouseup&quot;:case&quot;dragend&quot;:fc=!1,Pd(ue,a,re);break;case&quot;selectionchange&quot;:if(W0)break;case&quot;keydown&quot;:case&quot;keyup&quot;:Pd(ue,a,re)}var ze;if(cc)e:{switch(e){case&quot;compositionstart&quot;:var Le=&quot;onCompositionStart&quot;;break e;case&quot;compositionend&quot;:Le=&quot;onCompositionEnd&quot;;break e;case&quot;compositionupdate&quot;:Le=&quot;onCompositionUpdate&quot;;break e}Le=void 0}else el?Od(e,a)&amp;&amp;(Le=&quot;onCompositionEnd&quot;):e===&quot;keydown&quot;&amp;&amp;a.keyCode===229&amp;&amp;(Le=&quot;onCompositionStart&quot;);Le&amp;&amp;(Md&amp;&amp;a.locale!==&quot;ko&quot;&amp;&amp;(el||Le!==&quot;onCompositionStart&quot;?Le===&quot;onCompositionEnd&quot;&amp;&amp;el&amp;&amp;(ze=Ed()):(Ps=re,ac=&quot;value&quot;in Ps?Ps.value:Ps.textContent,el=!0)),ge=Fr(te,Le),0&lt;ge.length&amp;&amp;(Le=new Td(Le,e,null,a,re),ue.push({event:Le,listeners:ge}),ze?Le.data=ze:(ze=Ld(a),ze!==null&amp;&amp;(Le.data=ze)))),(ze=Y0?G0(e,a):Z0(e,a))&amp;&amp;(Le=Fr(te,&quot;onBeforeInput&quot;),0&lt;Le.length&amp;&amp;(ge=new Td(&quot;onBeforeInput&quot;,&quot;beforeinput&quot;,null,a,re),ue.push({event:ge,listeners:Le}),ge.data=ze)),Lg(ue,e,te,a,re)}yx(ue,s)})}function vn(e,s,a){return{instance:e,listener:s,currentTarget:a}}function Fr(e,s){for(var a=s+&quot;Capture&quot;,n=[];e!==null;){var o=e,u=o.stateNode;if(o=o.tag,o!==5&amp;&amp;o!==26&amp;&amp;o!==27||u===null||(o=Bl(e,a),o!=null&amp;&amp;n.unshift(vn(e,o,u)),o=Bl(e,s),o!=null&amp;&amp;n.push(vn(e,o,u))),e.tag===3)return n;e=e.return}return[]}function Bg(e){if(e===null)return null;do e=e.return;while(e&amp;&amp;e.tag!==5&amp;&amp;e.tag!==27);return e||null}function _x(e,s,a,n,o){for(var u=s._reactName,h=[];a!==null&amp;&amp;a!==n;){var N=a,O=N.alternate,te=N.stateNode;if(N=N.tag,O!==null&amp;&amp;O===n)break;N!==5&amp;&amp;N!==26&amp;&amp;N!==27||te===null||(O=te,o?(te=Bl(a,u),te!=null&amp;&amp;h.unshift(vn(a,te,O))):o||(te=Bl(a,u),te!=null&amp;&amp;h.push(vn(a,te,O)))),a=a.return}h.length!==0&amp;&amp;e.push({event:s,listeners:h})}var Hg=/\r\n?/g,Vg=/\u0000|\uFFFD/g;function Sx(e){return(typeof e==&quot;string&quot;?e:&quot;&quot;+e).replace(Hg,`
`).replace(Vg,&quot;&quot;)}function wx(e,s){return s=Sx(s),Sx(e)===s}function Xe(e,s,a,n,o,u){switch(a){case&quot;children&quot;:typeof n==&quot;string&quot;?s===&quot;body&quot;||s===&quot;textarea&quot;&amp;&amp;n===&quot;&quot;||Ja(e,n):(typeof n==&quot;number&quot;||typeof n==&quot;bigint&quot;)&amp;&amp;s!==&quot;body&quot;&amp;&amp;Ja(e,&quot;&quot;+n);break;case&quot;className&quot;:Wn(e,&quot;class&quot;,n);break;case&quot;tabIndex&quot;:Wn(e,&quot;tabindex&quot;,n);break;case&quot;dir&quot;:case&quot;role&quot;:case&quot;viewBox&quot;:case&quot;width&quot;:case&quot;height&quot;:Wn(e,a,n);break;case&quot;style&quot;:Sd(e,n,u);break;case&quot;data&quot;:if(s!==&quot;object&quot;){Wn(e,&quot;data&quot;,n);break}case&quot;src&quot;:case&quot;href&quot;:if(n===&quot;&quot;&amp;&amp;(s!==&quot;a&quot;||a!==&quot;href&quot;)){e.removeAttribute(a);break}if(n==null||typeof n==&quot;function&quot;||typeof n==&quot;symbol&quot;||typeof n==&quot;boolean&quot;){e.removeAttribute(a);break}n=tr(&quot;&quot;+n),e.setAttribute(a,n);break;case&quot;action&quot;:case&quot;formAction&quot;:if(typeof n==&quot;function&quot;){e.setAttribute(a,&quot;javascript:throw new Error(&#039;A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\&#039;re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().&#039;)&quot;);break}else typeof u==&quot;function&quot;&amp;&amp;(a===&quot;formAction&quot;?(s!==&quot;input&quot;&amp;&amp;Xe(e,s,&quot;name&quot;,o.name,o,null),Xe(e,s,&quot;formEncType&quot;,o.formEncType,o,null),Xe(e,s,&quot;formMethod&quot;,o.formMethod,o,null),Xe(e,s,&quot;formTarget&quot;,o.formTarget,o,null)):(Xe(e,s,&quot;encType&quot;,o.encType,o,null),Xe(e,s,&quot;method&quot;,o.method,o,null),Xe(e,s,&quot;target&quot;,o.target,o,null)));if(n==null||typeof n==&quot;symbol&quot;||typeof n==&quot;boolean&quot;){e.removeAttribute(a);break}n=tr(&quot;&quot;+n),e.setAttribute(a,n);break;case&quot;onClick&quot;:n!=null&amp;&amp;(e.onclick=Ss);break;case&quot;onScroll&quot;:n!=null&amp;&amp;Re(&quot;scroll&quot;,e);break;case&quot;onScrollEnd&quot;:n!=null&amp;&amp;Re(&quot;scrollend&quot;,e);break;case&quot;dangerouslySetInnerHTML&quot;:if(n!=null){if(typeof n!=&quot;object&quot;||!(&quot;__html&quot;in n))throw Error(c(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(c(60));e.innerHTML=a}}break;case&quot;multiple&quot;:e.multiple=n&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;;break;case&quot;muted&quot;:e.muted=n&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;;break;case&quot;suppressContentEditableWarning&quot;:case&quot;suppressHydrationWarning&quot;:case&quot;defaultValue&quot;:case&quot;defaultChecked&quot;:case&quot;innerHTML&quot;:case&quot;ref&quot;:break;case&quot;autoFocus&quot;:break;case&quot;xlinkHref&quot;:if(n==null||typeof n==&quot;function&quot;||typeof n==&quot;boolean&quot;||typeof n==&quot;symbol&quot;){e.removeAttribute(&quot;xlink:href&quot;);break}a=tr(&quot;&quot;+n),e.setAttributeNS(&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:href&quot;,a);break;case&quot;contentEditable&quot;:case&quot;spellCheck&quot;:case&quot;draggable&quot;:case&quot;value&quot;:case&quot;autoReverse&quot;:case&quot;externalResourcesRequired&quot;:case&quot;focusable&quot;:case&quot;preserveAlpha&quot;:n!=null&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;?e.setAttribute(a,&quot;&quot;+n):e.removeAttribute(a);break;case&quot;inert&quot;:case&quot;allowFullScreen&quot;:case&quot;async&quot;:case&quot;autoPlay&quot;:case&quot;controls&quot;:case&quot;default&quot;:case&quot;defer&quot;:case&quot;disabled&quot;:case&quot;disablePictureInPicture&quot;:case&quot;disableRemotePlayback&quot;:case&quot;formNoValidate&quot;:case&quot;hidden&quot;:case&quot;loop&quot;:case&quot;noModule&quot;:case&quot;noValidate&quot;:case&quot;open&quot;:case&quot;playsInline&quot;:case&quot;readOnly&quot;:case&quot;required&quot;:case&quot;reversed&quot;:case&quot;scoped&quot;:case&quot;seamless&quot;:case&quot;itemScope&quot;:n&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;?e.setAttribute(a,&quot;&quot;):e.removeAttribute(a);break;case&quot;capture&quot;:case&quot;download&quot;:n===!0?e.setAttribute(a,&quot;&quot;):n!==!1&amp;&amp;n!=null&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;?e.setAttribute(a,n):e.removeAttribute(a);break;case&quot;cols&quot;:case&quot;rows&quot;:case&quot;size&quot;:case&quot;span&quot;:n!=null&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;&amp;&amp;!isNaN(n)&amp;&amp;1&lt;=n?e.setAttribute(a,n):e.removeAttribute(a);break;case&quot;rowSpan&quot;:case&quot;start&quot;:n==null||typeof n==&quot;function&quot;||typeof n==&quot;symbol&quot;||isNaN(n)?e.removeAttribute(a):e.setAttribute(a,n);break;case&quot;popover&quot;:Re(&quot;beforetoggle&quot;,e),Re(&quot;toggle&quot;,e),In(e,&quot;popover&quot;,n);break;case&quot;xlinkActuate&quot;:_s(e,&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:actuate&quot;,n);break;case&quot;xlinkArcrole&quot;:_s(e,&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:arcrole&quot;,n);break;case&quot;xlinkRole&quot;:_s(e,&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:role&quot;,n);break;case&quot;xlinkShow&quot;:_s(e,&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:show&quot;,n);break;case&quot;xlinkTitle&quot;:_s(e,&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:title&quot;,n);break;case&quot;xlinkType&quot;:_s(e,&quot;http://www.w3.org/1999/xlink&quot;,&quot;xlink:type&quot;,n);break;case&quot;xmlBase&quot;:_s(e,&quot;http://www.w3.org/XML/1998/namespace&quot;,&quot;xml:base&quot;,n);break;case&quot;xmlLang&quot;:_s(e,&quot;http://www.w3.org/XML/1998/namespace&quot;,&quot;xml:lang&quot;,n);break;case&quot;xmlSpace&quot;:_s(e,&quot;http://www.w3.org/XML/1998/namespace&quot;,&quot;xml:space&quot;,n);break;case&quot;is&quot;:In(e,&quot;is&quot;,n);break;case&quot;innerText&quot;:case&quot;textContent&quot;:break;default:(!(2&lt;a.length)||a[0]!==&quot;o&quot;&amp;&amp;a[0]!==&quot;O&quot;||a[1]!==&quot;n&quot;&amp;&amp;a[1]!==&quot;N&quot;)&amp;&amp;(a=p0.get(a)||a,In(e,a,n))}}function qo(e,s,a,n,o,u){switch(a){case&quot;style&quot;:Sd(e,n,u);break;case&quot;dangerouslySetInnerHTML&quot;:if(n!=null){if(typeof n!=&quot;object&quot;||!(&quot;__html&quot;in n))throw Error(c(61));if(a=n.__html,a!=null){if(o.children!=null)throw Error(c(60));e.innerHTML=a}}break;case&quot;children&quot;:typeof n==&quot;string&quot;?Ja(e,n):(typeof n==&quot;number&quot;||typeof n==&quot;bigint&quot;)&amp;&amp;Ja(e,&quot;&quot;+n);break;case&quot;onScroll&quot;:n!=null&amp;&amp;Re(&quot;scroll&quot;,e);break;case&quot;onScrollEnd&quot;:n!=null&amp;&amp;Re(&quot;scrollend&quot;,e);break;case&quot;onClick&quot;:n!=null&amp;&amp;(e.onclick=Ss);break;case&quot;suppressContentEditableWarning&quot;:case&quot;suppressHydrationWarning&quot;:case&quot;innerHTML&quot;:case&quot;ref&quot;:break;case&quot;innerText&quot;:case&quot;textContent&quot;:break;default:if(!hd.hasOwnProperty(a))e:{if(a[0]===&quot;o&quot;&amp;&amp;a[1]===&quot;n&quot;&amp;&amp;(o=a.endsWith(&quot;Capture&quot;),s=a.slice(2,o?a.length-7:void 0),u=e[Dt]||null,u=u!=null?u[a]:null,typeof u==&quot;function&quot;&amp;&amp;e.removeEventListener(s,u,o),typeof n==&quot;function&quot;)){typeof u!=&quot;function&quot;&amp;&amp;u!==null&amp;&amp;(a in e?e[a]=null:e.hasAttribute(a)&amp;&amp;e.removeAttribute(a)),e.addEventListener(s,n,o);break e}a in e?e[a]=n:n===!0?e.setAttribute(a,&quot;&quot;):In(e,a,n)}}}function _t(e,s,a){switch(s){case&quot;div&quot;:case&quot;span&quot;:case&quot;svg&quot;:case&quot;path&quot;:case&quot;a&quot;:case&quot;g&quot;:case&quot;p&quot;:case&quot;li&quot;:break;case&quot;img&quot;:Re(&quot;error&quot;,e),Re(&quot;load&quot;,e);var n=!1,o=!1,u;for(u in a)if(a.hasOwnProperty(u)){var h=a[u];if(h!=null)switch(u){case&quot;src&quot;:n=!0;break;case&quot;srcSet&quot;:o=!0;break;case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:throw Error(c(137,s));default:Xe(e,s,u,h,a,null)}}o&amp;&amp;Xe(e,s,&quot;srcSet&quot;,a.srcSet,a,null),n&amp;&amp;Xe(e,s,&quot;src&quot;,a.src,a,null);return;case&quot;input&quot;:Re(&quot;invalid&quot;,e);var N=u=h=o=null,O=null,te=null;for(n in a)if(a.hasOwnProperty(n)){var re=a[n];if(re!=null)switch(n){case&quot;name&quot;:o=re;break;case&quot;type&quot;:h=re;break;case&quot;checked&quot;:O=re;break;case&quot;defaultChecked&quot;:te=re;break;case&quot;value&quot;:u=re;break;case&quot;defaultValue&quot;:N=re;break;case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:if(re!=null)throw Error(c(137,s));break;default:Xe(e,s,n,re,a,null)}}vd(e,u,N,O,te,h,o,!1);return;case&quot;select&quot;:Re(&quot;invalid&quot;,e),n=h=u=null;for(o in a)if(a.hasOwnProperty(o)&amp;&amp;(N=a[o],N!=null))switch(o){case&quot;value&quot;:u=N;break;case&quot;defaultValue&quot;:h=N;break;case&quot;multiple&quot;:n=N;default:Xe(e,s,o,N,a,null)}s=u,a=h,e.multiple=!!n,s!=null?Ka(e,!!n,s,!1):a!=null&amp;&amp;Ka(e,!!n,a,!0);return;case&quot;textarea&quot;:Re(&quot;invalid&quot;,e),u=o=n=null;for(h in a)if(a.hasOwnProperty(h)&amp;&amp;(N=a[h],N!=null))switch(h){case&quot;value&quot;:n=N;break;case&quot;defaultValue&quot;:o=N;break;case&quot;children&quot;:u=N;break;case&quot;dangerouslySetInnerHTML&quot;:if(N!=null)throw Error(c(91));break;default:Xe(e,s,h,N,a,null)}Nd(e,n,o,u);return;case&quot;option&quot;:for(O in a)if(a.hasOwnProperty(O)&amp;&amp;(n=a[O],n!=null))switch(O){case&quot;selected&quot;:e.selected=n&amp;&amp;typeof n!=&quot;function&quot;&amp;&amp;typeof n!=&quot;symbol&quot;;break;default:Xe(e,s,O,n,a,null)}return;case&quot;dialog&quot;:Re(&quot;beforetoggle&quot;,e),Re(&quot;toggle&quot;,e),Re(&quot;cancel&quot;,e),Re(&quot;close&quot;,e);break;case&quot;iframe&quot;:case&quot;object&quot;:Re(&quot;load&quot;,e);break;case&quot;video&quot;:case&quot;audio&quot;:for(n=0;n&lt;jn.length;n++)Re(jn[n],e);break;case&quot;image&quot;:Re(&quot;error&quot;,e),Re(&quot;load&quot;,e);break;case&quot;details&quot;:Re(&quot;toggle&quot;,e);break;case&quot;embed&quot;:case&quot;source&quot;:case&quot;link&quot;:Re(&quot;error&quot;,e),Re(&quot;load&quot;,e);case&quot;area&quot;:case&quot;base&quot;:case&quot;br&quot;:case&quot;col&quot;:case&quot;hr&quot;:case&quot;keygen&quot;:case&quot;meta&quot;:case&quot;param&quot;:case&quot;track&quot;:case&quot;wbr&quot;:case&quot;menuitem&quot;:for(te in a)if(a.hasOwnProperty(te)&amp;&amp;(n=a[te],n!=null))switch(te){case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:throw Error(c(137,s));default:Xe(e,s,te,n,a,null)}return;default:if(Ii(s)){for(re in a)a.hasOwnProperty(re)&amp;&amp;(n=a[re],n!==void 0&amp;&amp;qo(e,s,re,n,a,void 0));return}}for(N in a)a.hasOwnProperty(N)&amp;&amp;(n=a[N],n!=null&amp;&amp;Xe(e,s,N,n,a,null))}function Yg(e,s,a,n){switch(s){case&quot;div&quot;:case&quot;span&quot;:case&quot;svg&quot;:case&quot;path&quot;:case&quot;a&quot;:case&quot;g&quot;:case&quot;p&quot;:case&quot;li&quot;:break;case&quot;input&quot;:var o=null,u=null,h=null,N=null,O=null,te=null,re=null;for(ae in a){var ue=a[ae];if(a.hasOwnProperty(ae)&amp;&amp;ue!=null)switch(ae){case&quot;checked&quot;:break;case&quot;value&quot;:break;case&quot;defaultValue&quot;:O=ue;default:n.hasOwnProperty(ae)||Xe(e,s,ae,null,n,ue)}}for(var se in n){var ae=n[se];if(ue=a[se],n.hasOwnProperty(se)&amp;&amp;(ae!=null||ue!=null))switch(se){case&quot;type&quot;:u=ae;break;case&quot;name&quot;:o=ae;break;case&quot;checked&quot;:te=ae;break;case&quot;defaultChecked&quot;:re=ae;break;case&quot;value&quot;:h=ae;break;case&quot;defaultValue&quot;:N=ae;break;case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:if(ae!=null)throw Error(c(137,s));break;default:ae!==ue&amp;&amp;Xe(e,s,se,ae,n,ue)}}Ki(e,h,N,O,te,re,u,o);return;case&quot;select&quot;:ae=h=N=se=null;for(u in a)if(O=a[u],a.hasOwnProperty(u)&amp;&amp;O!=null)switch(u){case&quot;value&quot;:break;case&quot;multiple&quot;:ae=O;default:n.hasOwnProperty(u)||Xe(e,s,u,null,n,O)}for(o in n)if(u=n[o],O=a[o],n.hasOwnProperty(o)&amp;&amp;(u!=null||O!=null))switch(o){case&quot;value&quot;:se=u;break;case&quot;defaultValue&quot;:N=u;break;case&quot;multiple&quot;:h=u;default:u!==O&amp;&amp;Xe(e,s,o,u,n,O)}s=N,a=h,n=ae,se!=null?Ka(e,!!a,se,!1):!!n!=!!a&amp;&amp;(s!=null?Ka(e,!!a,s,!0):Ka(e,!!a,a?[]:&quot;&quot;,!1));return;case&quot;textarea&quot;:ae=se=null;for(N in a)if(o=a[N],a.hasOwnProperty(N)&amp;&amp;o!=null&amp;&amp;!n.hasOwnProperty(N))switch(N){case&quot;value&quot;:break;case&quot;children&quot;:break;default:Xe(e,s,N,null,n,o)}for(h in n)if(o=n[h],u=a[h],n.hasOwnProperty(h)&amp;&amp;(o!=null||u!=null))switch(h){case&quot;value&quot;:se=o;break;case&quot;defaultValue&quot;:ae=o;break;case&quot;children&quot;:break;case&quot;dangerouslySetInnerHTML&quot;:if(o!=null)throw Error(c(91));break;default:o!==u&amp;&amp;Xe(e,s,h,o,n,u)}yd(e,se,ae);return;case&quot;option&quot;:for(var pe in a)if(se=a[pe],a.hasOwnProperty(pe)&amp;&amp;se!=null&amp;&amp;!n.hasOwnProperty(pe))switch(pe){case&quot;selected&quot;:e.selected=!1;break;default:Xe(e,s,pe,null,n,se)}for(O in n)if(se=n[O],ae=a[O],n.hasOwnProperty(O)&amp;&amp;se!==ae&amp;&amp;(se!=null||ae!=null))switch(O){case&quot;selected&quot;:e.selected=se&amp;&amp;typeof se!=&quot;function&quot;&amp;&amp;typeof se!=&quot;symbol&quot;;break;default:Xe(e,s,O,se,n,ae)}return;case&quot;img&quot;:case&quot;link&quot;:case&quot;area&quot;:case&quot;base&quot;:case&quot;br&quot;:case&quot;col&quot;:case&quot;embed&quot;:case&quot;hr&quot;:case&quot;keygen&quot;:case&quot;meta&quot;:case&quot;param&quot;:case&quot;source&quot;:case&quot;track&quot;:case&quot;wbr&quot;:case&quot;menuitem&quot;:for(var ye in a)se=a[ye],a.hasOwnProperty(ye)&amp;&amp;se!=null&amp;&amp;!n.hasOwnProperty(ye)&amp;&amp;Xe(e,s,ye,null,n,se);for(te in n)if(se=n[te],ae=a[te],n.hasOwnProperty(te)&amp;&amp;se!==ae&amp;&amp;(se!=null||ae!=null))switch(te){case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:if(se!=null)throw Error(c(137,s));break;default:Xe(e,s,te,se,n,ae)}return;default:if(Ii(s)){for(var Pe in a)se=a[Pe],a.hasOwnProperty(Pe)&amp;&amp;se!==void 0&amp;&amp;!n.hasOwnProperty(Pe)&amp;&amp;qo(e,s,Pe,void 0,n,se);for(re in n)se=n[re],ae=a[re],!n.hasOwnProperty(re)||se===ae||se===void 0&amp;&amp;ae===void 0||qo(e,s,re,se,n,ae);return}}for(var Q in a)se=a[Q],a.hasOwnProperty(Q)&amp;&amp;se!=null&amp;&amp;!n.hasOwnProperty(Q)&amp;&amp;Xe(e,s,Q,null,n,se);for(ue in n)se=n[ue],ae=a[ue],!n.hasOwnProperty(ue)||se===ae||se==null&amp;&amp;ae==null||Xe(e,s,ue,se,n,ae)}function Cx(e){switch(e){case&quot;css&quot;:case&quot;script&quot;:case&quot;font&quot;:case&quot;img&quot;:case&quot;image&quot;:case&quot;input&quot;:case&quot;link&quot;:return!0;default:return!1}}function Gg(){if(typeof performance.getEntriesByType==&quot;function&quot;){for(var e=0,s=0,a=performance.getEntriesByType(&quot;resource&quot;),n=0;n&lt;a.length;n++){var o=a[n],u=o.transferSize,h=o.initiatorType,N=o.duration;if(u&amp;&amp;N&amp;&amp;Cx(h)){for(h=0,N=o.responseEnd,n+=1;n&lt;a.length;n++){var O=a[n],te=O.startTime;if(te&gt;N)break;var re=O.transferSize,ue=O.initiatorType;re&amp;&amp;Cx(ue)&amp;&amp;(O=O.responseEnd,h+=re*(O&lt;N?1:(N-te)/(O-te)))}if(--n,s+=8*(u+h)/(o.duration/1e3),e++,10&lt;e)break}}if(0&lt;e)return s/e/1e6}return navigator.connection&amp;&amp;(e=navigator.connection.downlink,typeof e==&quot;number&quot;)?e:5}var Bo=null,Ho=null;function Kr(e){return e.nodeType===9?e:e.ownerDocument}function Ex(e){switch(e){case&quot;http://www.w3.org/2000/svg&quot;:return 1;case&quot;http://www.w3.org/1998/Math/MathML&quot;:return 2;default:return 0}}function Ax(e,s){if(e===0)switch(s){case&quot;svg&quot;:return 1;case&quot;math&quot;:return 2;default:return 0}return e===1&amp;&amp;s===&quot;foreignObject&quot;?0:e}function Vo(e,s){return e===&quot;textarea&quot;||e===&quot;noscript&quot;||typeof s.children==&quot;string&quot;||typeof s.children==&quot;number&quot;||typeof s.children==&quot;bigint&quot;||typeof s.dangerouslySetInnerHTML==&quot;object&quot;&amp;&amp;s.dangerouslySetInnerHTML!==null&amp;&amp;s.dangerouslySetInnerHTML.__html!=null}var Yo=null;function Zg(){var e=window.event;return e&amp;&amp;e.type===&quot;popstate&quot;?e===Yo?!1:(Yo=e,!0):(Yo=null,!1)}var kx=typeof setTimeout==&quot;function&quot;?setTimeout:void 0,Qg=typeof clearTimeout==&quot;function&quot;?clearTimeout:void 0,Tx=typeof Promise==&quot;function&quot;?Promise:void 0,Xg=typeof queueMicrotask==&quot;function&quot;?queueMicrotask:typeof Tx&lt;&quot;u&quot;?function(e){return Tx.resolve(null).then(e).catch(Pg)}:kx;function Pg(e){setTimeout(function(){throw e})}function da(e){return e===&quot;head&quot;}function zx(e,s){var a=s,n=0;do{var o=a.nextSibling;if(e.removeChild(a),o&amp;&amp;o.nodeType===8)if(a=o.data,a===&quot;/$&quot;||a===&quot;/&amp;&quot;){if(n===0){e.removeChild(o),Al(s);return}n--}else if(a===&quot;$&quot;||a===&quot;$?&quot;||a===&quot;$~&quot;||a===&quot;$!&quot;||a===&quot;&amp;&quot;)n++;else if(a===&quot;html&quot;)yn(e.ownerDocument.documentElement);else if(a===&quot;head&quot;){a=e.ownerDocument.head,yn(a);for(var u=a.firstChild;u;){var h=u.nextSibling,N=u.nodeName;u[$l]||N===&quot;SCRIPT&quot;||N===&quot;STYLE&quot;||N===&quot;LINK&quot;&amp;&amp;u.rel.toLowerCase()===&quot;stylesheet&quot;||a.removeChild(u),u=h}}else a===&quot;body&quot;&amp;&amp;yn(e.ownerDocument.body);a=o}while(a);Al(s)}function Mx(e,s){var a=e;e=0;do{var n=a.nextSibling;if(a.nodeType===1?s?(a._stashedDisplay=a.style.display,a.style.display=&quot;none&quot;):(a.style.display=a._stashedDisplay||&quot;&quot;,a.getAttribute(&quot;style&quot;)===&quot;&quot;&amp;&amp;a.removeAttribute(&quot;style&quot;)):a.nodeType===3&amp;&amp;(s?(a._stashedText=a.nodeValue,a.nodeValue=&quot;&quot;):a.nodeValue=a._stashedText||&quot;&quot;),n&amp;&amp;n.nodeType===8)if(a=n.data,a===&quot;/$&quot;){if(e===0)break;e--}else a!==&quot;$&quot;&amp;&amp;a!==&quot;$?&quot;&amp;&amp;a!==&quot;$~&quot;&amp;&amp;a!==&quot;$!&quot;||e++;a=n}while(a)}function Go(e){var s=e.firstChild;for(s&amp;&amp;s.nodeType===10&amp;&amp;(s=s.nextSibling);s;){var a=s;switch(s=s.nextSibling,a.nodeName){case&quot;HTML&quot;:case&quot;HEAD&quot;:case&quot;BODY&quot;:Go(a),Pi(a);continue;case&quot;SCRIPT&quot;:case&quot;STYLE&quot;:continue;case&quot;LINK&quot;:if(a.rel.toLowerCase()===&quot;stylesheet&quot;)continue}e.removeChild(a)}}function Fg(e,s,a,n){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==s.toLowerCase()){if(!n&amp;&amp;(e.nodeName!==&quot;INPUT&quot;||e.type!==&quot;hidden&quot;))break}else if(n){if(!e[$l])switch(s){case&quot;meta&quot;:if(!e.hasAttribute(&quot;itemprop&quot;))break;return e;case&quot;link&quot;:if(u=e.getAttribute(&quot;rel&quot;),u===&quot;stylesheet&quot;&amp;&amp;e.hasAttribute(&quot;data-precedence&quot;))break;if(u!==o.rel||e.getAttribute(&quot;href&quot;)!==(o.href==null||o.href===&quot;&quot;?null:o.href)||e.getAttribute(&quot;crossorigin&quot;)!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute(&quot;title&quot;)!==(o.title==null?null:o.title))break;return e;case&quot;style&quot;:if(e.hasAttribute(&quot;data-precedence&quot;))break;return e;case&quot;script&quot;:if(u=e.getAttribute(&quot;src&quot;),(u!==(o.src==null?null:o.src)||e.getAttribute(&quot;type&quot;)!==(o.type==null?null:o.type)||e.getAttribute(&quot;crossorigin&quot;)!==(o.crossOrigin==null?null:o.crossOrigin))&amp;&amp;u&amp;&amp;e.hasAttribute(&quot;async&quot;)&amp;&amp;!e.hasAttribute(&quot;itemprop&quot;))break;return e;default:return e}}else if(s===&quot;input&quot;&amp;&amp;e.type===&quot;hidden&quot;){var u=o.name==null?null:&quot;&quot;+o.name;if(o.type===&quot;hidden&quot;&amp;&amp;e.getAttribute(&quot;name&quot;)===u)return e}else return e;if(e=ls(e.nextSibling),e===null)break}return null}function Kg(e,s,a){if(s===&quot;&quot;)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==&quot;INPUT&quot;||e.type!==&quot;hidden&quot;)&amp;&amp;!a||(e=ls(e.nextSibling),e===null))return null;return e}function Dx(e,s){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==&quot;INPUT&quot;||e.type!==&quot;hidden&quot;)&amp;&amp;!s||(e=ls(e.nextSibling),e===null))return null;return e}function Zo(e){return e.data===&quot;$?&quot;||e.data===&quot;$~&quot;}function Qo(e){return e.data===&quot;$!&quot;||e.data===&quot;$?&quot;&amp;&amp;e.ownerDocument.readyState!==&quot;loading&quot;}function Jg(e,s){var a=e.ownerDocument;if(e.data===&quot;$~&quot;)e._reactRetry=s;else if(e.data!==&quot;$?&quot;||a.readyState!==&quot;loading&quot;)s();else{var n=function(){s(),a.removeEventListener(&quot;DOMContentLoaded&quot;,n)};a.addEventListener(&quot;DOMContentLoaded&quot;,n),e._reactRetry=n}}function ls(e){for(;e!=null;e=e.nextSibling){var s=e.nodeType;if(s===1||s===3)break;if(s===8){if(s=e.data,s===&quot;$&quot;||s===&quot;$!&quot;||s===&quot;$?&quot;||s===&quot;$~&quot;||s===&quot;&amp;&quot;||s===&quot;F!&quot;||s===&quot;F&quot;)break;if(s===&quot;/$&quot;||s===&quot;/&amp;&quot;)return null}}return e}var Xo=null;function Rx(e){e=e.nextSibling;for(var s=0;e;){if(e.nodeType===8){var a=e.data;if(a===&quot;/$&quot;||a===&quot;/&amp;&quot;){if(s===0)return ls(e.nextSibling);s--}else a!==&quot;$&quot;&amp;&amp;a!==&quot;$!&quot;&amp;&amp;a!==&quot;$?&quot;&amp;&amp;a!==&quot;$~&quot;&amp;&amp;a!==&quot;&amp;&quot;||s++}e=e.nextSibling}return null}function Ox(e){e=e.previousSibling;for(var s=0;e;){if(e.nodeType===8){var a=e.data;if(a===&quot;$&quot;||a===&quot;$!&quot;||a===&quot;$?&quot;||a===&quot;$~&quot;||a===&quot;&amp;&quot;){if(s===0)return e;s--}else a!==&quot;/$&quot;&amp;&amp;a!==&quot;/&amp;&quot;||s++}e=e.previousSibling}return null}function Lx(e,s,a){switch(s=Kr(a),e){case&quot;html&quot;:if(e=s.documentElement,!e)throw Error(c(452));return e;case&quot;head&quot;:if(e=s.head,!e)throw Error(c(453));return e;case&quot;body&quot;:if(e=s.body,!e)throw Error(c(454));return e;default:throw Error(c(451))}}function yn(e){for(var s=e.attributes;s.length;)e.removeAttributeNode(s[0]);Pi(e)}var ns=new Map,Ux=new Set;function Jr(e){return typeof e.getRootNode==&quot;function&quot;?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bs=z.d;z.d={f:Ig,r:Wg,D:eb,C:tb,L:sb,m:ab,X:nb,S:lb,M:rb};function Ig(){var e=Bs.f(),s=Vr();return e||s}function Wg(e){var s=Xa(e);s!==null&amp;&amp;s.tag===5&amp;&amp;s.type===&quot;form&quot;?Wm(s):Bs.r(e)}var wl=typeof document&gt;&quot;u&quot;?null:document;function $x(e,s,a){var n=wl;if(n&amp;&amp;typeof s==&quot;string&quot;&amp;&amp;s){var o=Jt(s);o=&#039;link[rel=&quot;&#039;+e+&#039;&quot;][href=&quot;&#039;+o+&#039;&quot;]&#039;,typeof a==&quot;string&quot;&amp;&amp;(o+=&#039;[crossorigin=&quot;&#039;+a+&#039;&quot;]&#039;),Ux.has(o)||(Ux.add(o),e={rel:e,crossOrigin:a,href:s},n.querySelector(o)===null&amp;&amp;(s=n.createElement(&quot;link&quot;),_t(s,&quot;link&quot;,e),pt(s),n.head.appendChild(s)))}}function eb(e){Bs.D(e),$x(&quot;dns-prefetch&quot;,e,null)}function tb(e,s){Bs.C(e,s),$x(&quot;preconnect&quot;,e,s)}function sb(e,s,a){Bs.L(e,s,a);var n=wl;if(n&amp;&amp;e&amp;&amp;s){var o=&#039;link[rel=&quot;preload&quot;][as=&quot;&#039;+Jt(s)+&#039;&quot;]&#039;;s===&quot;image&quot;&amp;&amp;a&amp;&amp;a.imageSrcSet?(o+=&#039;[imagesrcset=&quot;&#039;+Jt(a.imageSrcSet)+&#039;&quot;]&#039;,typeof a.imageSizes==&quot;string&quot;&amp;&amp;(o+=&#039;[imagesizes=&quot;&#039;+Jt(a.imageSizes)+&#039;&quot;]&#039;)):o+=&#039;[href=&quot;&#039;+Jt(e)+&#039;&quot;]&#039;;var u=o;switch(s){case&quot;style&quot;:u=Cl(e);break;case&quot;script&quot;:u=El(e)}ns.has(u)||(e=j({rel:&quot;preload&quot;,href:s===&quot;image&quot;&amp;&amp;a&amp;&amp;a.imageSrcSet?void 0:e,as:s},a),ns.set(u,e),n.querySelector(o)!==null||s===&quot;style&quot;&amp;&amp;n.querySelector(Nn(u))||s===&quot;script&quot;&amp;&amp;n.querySelector(_n(u))||(s=n.createElement(&quot;link&quot;),_t(s,&quot;link&quot;,e),pt(s),n.head.appendChild(s)))}}function ab(e,s){Bs.m(e,s);var a=wl;if(a&amp;&amp;e){var n=s&amp;&amp;typeof s.as==&quot;string&quot;?s.as:&quot;script&quot;,o=&#039;link[rel=&quot;modulepreload&quot;][as=&quot;&#039;+Jt(n)+&#039;&quot;][href=&quot;&#039;+Jt(e)+&#039;&quot;]&#039;,u=o;switch(n){case&quot;audioworklet&quot;:case&quot;paintworklet&quot;:case&quot;serviceworker&quot;:case&quot;sharedworker&quot;:case&quot;worker&quot;:case&quot;script&quot;:u=El(e)}if(!ns.has(u)&amp;&amp;(e=j({rel:&quot;modulepreload&quot;,href:e},s),ns.set(u,e),a.querySelector(o)===null)){switch(n){case&quot;audioworklet&quot;:case&quot;paintworklet&quot;:case&quot;serviceworker&quot;:case&quot;sharedworker&quot;:case&quot;worker&quot;:case&quot;script&quot;:if(a.querySelector(_n(u)))return}n=a.createElement(&quot;link&quot;),_t(n,&quot;link&quot;,e),pt(n),a.head.appendChild(n)}}}function lb(e,s,a){Bs.S(e,s,a);var n=wl;if(n&amp;&amp;e){var o=Pa(n).hoistableStyles,u=Cl(e);s=s||&quot;default&quot;;var h=o.get(u);if(!h){var N={loading:0,preload:null};if(h=n.querySelector(Nn(u)))N.loading=5;else{e=j({rel:&quot;stylesheet&quot;,href:e,&quot;data-precedence&quot;:s},a),(a=ns.get(u))&amp;&amp;Po(e,a);var O=h=n.createElement(&quot;link&quot;);pt(O),_t(O,&quot;link&quot;,e),O._p=new Promise(function(te,re){O.onload=te,O.onerror=re}),O.addEventListener(&quot;load&quot;,function(){N.loading|=1}),O.addEventListener(&quot;error&quot;,function(){N.loading|=2}),N.loading|=4,Ir(h,s,n)}h={type:&quot;stylesheet&quot;,instance:h,count:1,state:N},o.set(u,h)}}}function nb(e,s){Bs.X(e,s);var a=wl;if(a&amp;&amp;e){var n=Pa(a).hoistableScripts,o=El(e),u=n.get(o);u||(u=a.querySelector(_n(o)),u||(e=j({src:e,async:!0},s),(s=ns.get(o))&amp;&amp;Fo(e,s),u=a.createElement(&quot;script&quot;),pt(u),_t(u,&quot;link&quot;,e),a.head.appendChild(u)),u={type:&quot;script&quot;,instance:u,count:1,state:null},n.set(o,u))}}function rb(e,s){Bs.M(e,s);var a=wl;if(a&amp;&amp;e){var n=Pa(a).hoistableScripts,o=El(e),u=n.get(o);u||(u=a.querySelector(_n(o)),u||(e=j({src:e,async:!0,type:&quot;module&quot;},s),(s=ns.get(o))&amp;&amp;Fo(e,s),u=a.createElement(&quot;script&quot;),pt(u),_t(u,&quot;link&quot;,e),a.head.appendChild(u)),u={type:&quot;script&quot;,instance:u,count:1,state:null},n.set(o,u))}}function qx(e,s,a,n){var o=(o=X.current)?Jr(o):null;if(!o)throw Error(c(446));switch(e){case&quot;meta&quot;:case&quot;title&quot;:return null;case&quot;style&quot;:return typeof a.precedence==&quot;string&quot;&amp;&amp;typeof a.href==&quot;string&quot;?(s=Cl(a.href),a=Pa(o).hoistableStyles,n=a.get(s),n||(n={type:&quot;style&quot;,instance:null,count:0,state:null},a.set(s,n)),n):{type:&quot;void&quot;,instance:null,count:0,state:null};case&quot;link&quot;:if(a.rel===&quot;stylesheet&quot;&amp;&amp;typeof a.href==&quot;string&quot;&amp;&amp;typeof a.precedence==&quot;string&quot;){e=Cl(a.href);var u=Pa(o).hoistableStyles,h=u.get(e);if(h||(o=o.ownerDocument||o,h={type:&quot;stylesheet&quot;,instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=o.querySelector(Nn(e)))&amp;&amp;!u._p&amp;&amp;(h.instance=u,h.state.loading=5),ns.has(e)||(a={rel:&quot;preload&quot;,as:&quot;style&quot;,href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ns.set(e,a),u||ib(o,e,a,h.state))),s&amp;&amp;n===null)throw Error(c(528,&quot;&quot;));return h}if(s&amp;&amp;n!==null)throw Error(c(529,&quot;&quot;));return null;case&quot;script&quot;:return s=a.async,a=a.src,typeof a==&quot;string&quot;&amp;&amp;s&amp;&amp;typeof s!=&quot;function&quot;&amp;&amp;typeof s!=&quot;symbol&quot;?(s=El(a),a=Pa(o).hoistableScripts,n=a.get(s),n||(n={type:&quot;script&quot;,instance:null,count:0,state:null},a.set(s,n)),n):{type:&quot;void&quot;,instance:null,count:0,state:null};default:throw Error(c(444,e))}}function Cl(e){return&#039;href=&quot;&#039;+Jt(e)+&#039;&quot;&#039;}function Nn(e){return&#039;link[rel=&quot;stylesheet&quot;][&#039;+e+&quot;]&quot;}function Bx(e){return j({},e,{&quot;data-precedence&quot;:e.precedence,precedence:null})}function ib(e,s,a,n){e.querySelector(&#039;link[rel=&quot;preload&quot;][as=&quot;style&quot;][&#039;+s+&quot;]&quot;)?n.loading=1:(s=e.createElement(&quot;link&quot;),n.preload=s,s.addEventListener(&quot;load&quot;,function(){return n.loading|=1}),s.addEventListener(&quot;error&quot;,function(){return n.loading|=2}),_t(s,&quot;link&quot;,a),pt(s),e.head.appendChild(s))}function El(e){return&#039;[src=&quot;&#039;+Jt(e)+&#039;&quot;]&#039;}function _n(e){return&quot;script[async]&quot;+e}function Hx(e,s,a){if(s.count++,s.instance===null)switch(s.type){case&quot;style&quot;:var n=e.querySelector(&#039;style[data-href~=&quot;&#039;+Jt(a.href)+&#039;&quot;]&#039;);if(n)return s.instance=n,pt(n),n;var o=j({},a,{&quot;data-href&quot;:a.href,&quot;data-precedence&quot;:a.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement(&quot;style&quot;),pt(n),_t(n,&quot;style&quot;,o),Ir(n,a.precedence,e),s.instance=n;case&quot;stylesheet&quot;:o=Cl(a.href);var u=e.querySelector(Nn(o));if(u)return s.state.loading|=4,s.instance=u,pt(u),u;n=Bx(a),(o=ns.get(o))&amp;&amp;Po(n,o),u=(e.ownerDocument||e).createElement(&quot;link&quot;),pt(u);var h=u;return h._p=new Promise(function(N,O){h.onload=N,h.onerror=O}),_t(u,&quot;link&quot;,n),s.state.loading|=4,Ir(u,a.precedence,e),s.instance=u;case&quot;script&quot;:return u=El(a.src),(o=e.querySelector(_n(u)))?(s.instance=o,pt(o),o):(n=a,(o=ns.get(u))&amp;&amp;(n=j({},a),Fo(n,o)),e=e.ownerDocument||e,o=e.createElement(&quot;script&quot;),pt(o),_t(o,&quot;link&quot;,n),e.head.appendChild(o),s.instance=o);case&quot;void&quot;:return null;default:throw Error(c(443,s.type))}else s.type===&quot;stylesheet&quot;&amp;&amp;(s.state.loading&amp;4)===0&amp;&amp;(n=s.instance,s.state.loading|=4,Ir(n,a.precedence,e));return s.instance}function Ir(e,s,a){for(var n=a.querySelectorAll(&#039;link[rel=&quot;stylesheet&quot;][data-precedence],style[data-precedence]&#039;),o=n.length?n[n.length-1]:null,u=o,h=0;h&lt;n.length;h++){var N=n[h];if(N.dataset.precedence===s)u=N;else if(u!==o)break}u?u.parentNode.insertBefore(e,u.nextSibling):(s=a.nodeType===9?a.head:a,s.insertBefore(e,s.firstChild))}function Po(e,s){e.crossOrigin==null&amp;&amp;(e.crossOrigin=s.crossOrigin),e.referrerPolicy==null&amp;&amp;(e.referrerPolicy=s.referrerPolicy),e.title==null&amp;&amp;(e.title=s.title)}function Fo(e,s){e.crossOrigin==null&amp;&amp;(e.crossOrigin=s.crossOrigin),e.referrerPolicy==null&amp;&amp;(e.referrerPolicy=s.referrerPolicy),e.integrity==null&amp;&amp;(e.integrity=s.integrity)}var Wr=null;function Vx(e,s,a){if(Wr===null){var n=new Map,o=Wr=new Map;o.set(a,n)}else o=Wr,n=o.get(a),n||(n=new Map,o.set(a,n));if(n.has(e))return n;for(n.set(e,null),a=a.getElementsByTagName(e),o=0;o&lt;a.length;o++){var u=a[o];if(!(u[$l]||u[jt]||e===&quot;link&quot;&amp;&amp;u.getAttribute(&quot;rel&quot;)===&quot;stylesheet&quot;)&amp;&amp;u.namespaceURI!==&quot;http://www.w3.org/2000/svg&quot;){var h=u.getAttribute(s)||&quot;&quot;;h=e+h;var N=n.get(h);N?N.push(u):n.set(h,[u])}}return n}function Yx(e,s,a){e=e.ownerDocument||e,e.head.insertBefore(a,s===&quot;title&quot;?e.querySelector(&quot;head &gt; title&quot;):null)}function cb(e,s,a){if(a===1||s.itemProp!=null)return!1;switch(e){case&quot;meta&quot;:case&quot;title&quot;:return!0;case&quot;style&quot;:if(typeof s.precedence!=&quot;string&quot;||typeof s.href!=&quot;string&quot;||s.href===&quot;&quot;)break;return!0;case&quot;link&quot;:if(typeof s.rel!=&quot;string&quot;||typeof s.href!=&quot;string&quot;||s.href===&quot;&quot;||s.onLoad||s.onError)break;switch(s.rel){case&quot;stylesheet&quot;:return e=s.disabled,typeof s.precedence==&quot;string&quot;&amp;&amp;e==null;default:return!0}case&quot;script&quot;:if(s.async&amp;&amp;typeof s.async!=&quot;function&quot;&amp;&amp;typeof s.async!=&quot;symbol&quot;&amp;&amp;!s.onLoad&amp;&amp;!s.onError&amp;&amp;s.src&amp;&amp;typeof s.src==&quot;string&quot;)return!0}return!1}function Gx(e){return!(e.type===&quot;stylesheet&quot;&amp;&amp;(e.state.loading&amp;3)===0)}function ob(e,s,a,n){if(a.type===&quot;stylesheet&quot;&amp;&amp;(typeof n.media!=&quot;string&quot;||matchMedia(n.media).matches!==!1)&amp;&amp;(a.state.loading&amp;4)===0){if(a.instance===null){var o=Cl(n.href),u=s.querySelector(Nn(o));if(u){s=u._p,s!==null&amp;&amp;typeof s==&quot;object&quot;&amp;&amp;typeof s.then==&quot;function&quot;&amp;&amp;(e.count++,e=ei.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=u,pt(u);return}u=s.ownerDocument||s,n=Bx(n),(o=ns.get(o))&amp;&amp;Po(n,o),u=u.createElement(&quot;link&quot;),pt(u);var h=u;h._p=new Promise(function(N,O){h.onload=N,h.onerror=O}),_t(u,&quot;link&quot;,n),a.instance=u}e.stylesheets===null&amp;&amp;(e.stylesheets=new Map),e.stylesheets.set(a,s),(s=a.state.preload)&amp;&amp;(a.state.loading&amp;3)===0&amp;&amp;(e.count++,a=ei.bind(e),s.addEventListener(&quot;load&quot;,a),s.addEventListener(&quot;error&quot;,a))}}var Ko=0;function ub(e,s){return e.stylesheets&amp;&amp;e.count===0&amp;&amp;si(e,e.stylesheets),0&lt;e.count||0&lt;e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&amp;&amp;si(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+s);0&lt;e.imgBytes&amp;&amp;Ko===0&amp;&amp;(Ko=62500*Gg());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&amp;&amp;(e.stylesheets&amp;&amp;si(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes&gt;Ko?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(o)}}:null}function ei(){if(this.count--,this.count===0&amp;&amp;(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)si(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ti=null;function si(e,s){e.stylesheets=null,e.unsuspend!==null&amp;&amp;(e.count++,ti=new Map,s.forEach(db,e),ti=null,ei.call(e))}function db(e,s){if(!(s.state.loading&amp;4)){var a=ti.get(e);if(a)var n=a.get(null);else{a=new Map,ti.set(e,a);for(var o=e.querySelectorAll(&quot;link[data-precedence],style[data-precedence]&quot;),u=0;u&lt;o.length;u++){var h=o[u];(h.nodeName===&quot;LINK&quot;||h.getAttribute(&quot;media&quot;)!==&quot;not all&quot;)&amp;&amp;(a.set(h.dataset.precedence,h),n=h)}n&amp;&amp;a.set(null,n)}o=s.instance,h=o.getAttribute(&quot;data-precedence&quot;),u=a.get(h)||n,u===n&amp;&amp;a.set(null,o),a.set(h,o),this.count++,n=ei.bind(this),o.addEventListener(&quot;load&quot;,n),o.addEventListener(&quot;error&quot;,n),u?u.parentNode.insertBefore(o,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),s.state.loading|=4}}var Sn={$$typeof:T,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function mb(e,s,a,n,o,u,h,N,O){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Gi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gi(0),this.hiddenUpdates=Gi(null),this.identifierPrefix=n,this.onUncaughtError=o,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function Zx(e,s,a,n,o,u,h,N,O,te,re,ue){return e=new mb(e,s,a,h,O,te,re,ue,N),s=1,u===!0&amp;&amp;(s|=24),u=Vt(3,null,null,s),e.current=u,u.stateNode=e,s=Ac(),s.refCount++,e.pooledCache=s,s.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:s},Mc(u),e}function Qx(e){return e?(e=ll,e):ll}function Xx(e,s,a,n,o,u){o=Qx(o),n.context===null?n.context=o:n.pendingContext=o,n=ea(s),n.payload={element:a},u=u===void 0?null:u,u!==null&amp;&amp;(n.callback=u),a=ta(e,n,s),a!==null&amp;&amp;(qt(a,e,s),tn(a,e,s))}function Px(e,s){if(e=e.memoizedState,e!==null&amp;&amp;e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&amp;&amp;a&lt;s?a:s}}function Jo(e,s){Px(e,s),(e=e.alternate)&amp;&amp;Px(e,s)}function Fx(e){if(e.tag===13||e.tag===31){var s=Sa(e,67108864);s!==null&amp;&amp;qt(s,e,67108864),Jo(e,67108864)}}function Kx(e){if(e.tag===13||e.tag===31){var s=Xt();s=Zi(s);var a=Sa(e,s);a!==null&amp;&amp;qt(a,e,s),Jo(e,s)}}var ai=!0;function fb(e,s,a,n){var o=_.T;_.T=null;var u=z.p;try{z.p=2,Io(e,s,a,n)}finally{z.p=u,_.T=o}}function xb(e,s,a,n){var o=_.T;_.T=null;var u=z.p;try{z.p=8,Io(e,s,a,n)}finally{z.p=u,_.T=o}}function Io(e,s,a,n){if(ai){var o=Wo(n);if(o===null)$o(e,s,n,li,a),Ix(e,n);else if(pb(o,e,s,a,n))n.stopPropagation();else if(Ix(e,n),s&amp;4&amp;&amp;-1&lt;hb.indexOf(e)){for(;o!==null;){var u=Xa(o);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=ja(u.pendingLanes);if(h!==0){var N=u;for(N.pendingLanes|=2,N.entangledLanes|=2;h;){var O=1&lt;&lt;31-ne(h);N.entanglements[1]|=O,h&amp;=~O}vs(u),(Ye&amp;6)===0&amp;&amp;(Br=et()+500,bn(0))}}break;case 31:case 13:N=Sa(u,2),N!==null&amp;&amp;qt(N,u,2),Vr(),Jo(u,2)}if(u=Wo(n),u===null&amp;&amp;$o(e,s,n,li,a),u===o)break;o=u}o!==null&amp;&amp;n.stopPropagation()}else $o(e,s,n,null,a)}}function Wo(e){return e=ec(e),eu(e)}var li=null;function eu(e){if(li=null,e=Qa(e),e!==null){var s=f(e);if(s===null)e=null;else{var a=s.tag;if(a===13){if(e=x(s),e!==null)return e;e=null}else if(a===31){if(e=b(s),e!==null)return e;e=null}else if(a===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;e=null}else s!==e&amp;&amp;(e=null)}}return li=e,null}function Jx(e){switch(e){case&quot;beforetoggle&quot;:case&quot;cancel&quot;:case&quot;click&quot;:case&quot;close&quot;:case&quot;contextmenu&quot;:case&quot;copy&quot;:case&quot;cut&quot;:case&quot;auxclick&quot;:case&quot;dblclick&quot;:case&quot;dragend&quot;:case&quot;dragstart&quot;:case&quot;drop&quot;:case&quot;focusin&quot;:case&quot;focusout&quot;:case&quot;input&quot;:case&quot;invalid&quot;:case&quot;keydown&quot;:case&quot;keypress&quot;:case&quot;keyup&quot;:case&quot;mousedown&quot;:case&quot;mouseup&quot;:case&quot;paste&quot;:case&quot;pause&quot;:case&quot;play&quot;:case&quot;pointercancel&quot;:case&quot;pointerdown&quot;:case&quot;pointerup&quot;:case&quot;ratechange&quot;:case&quot;reset&quot;:case&quot;resize&quot;:case&quot;seeked&quot;:case&quot;submit&quot;:case&quot;toggle&quot;:case&quot;touchcancel&quot;:case&quot;touchend&quot;:case&quot;touchstart&quot;:case&quot;volumechange&quot;:case&quot;change&quot;:case&quot;selectionchange&quot;:case&quot;textInput&quot;:case&quot;compositionstart&quot;:case&quot;compositionend&quot;:case&quot;compositionupdate&quot;:case&quot;beforeblur&quot;:case&quot;afterblur&quot;:case&quot;beforeinput&quot;:case&quot;blur&quot;:case&quot;fullscreenchange&quot;:case&quot;focus&quot;:case&quot;hashchange&quot;:case&quot;popstate&quot;:case&quot;select&quot;:case&quot;selectstart&quot;:return 2;case&quot;drag&quot;:case&quot;dragenter&quot;:case&quot;dragexit&quot;:case&quot;dragleave&quot;:case&quot;dragover&quot;:case&quot;mousemove&quot;:case&quot;mouseout&quot;:case&quot;mouseover&quot;:case&quot;pointermove&quot;:case&quot;pointerout&quot;:case&quot;pointerover&quot;:case&quot;scroll&quot;:case&quot;touchmove&quot;:case&quot;wheel&quot;:case&quot;mouseenter&quot;:case&quot;mouseleave&quot;:case&quot;pointerenter&quot;:case&quot;pointerleave&quot;:return 8;case&quot;message&quot;:switch(Ba()){case Ns:return 2;case At:return 8;case Zs:case Ha:return 32;case Va:return 268435456;default:return 32}default:return 32}}var tu=!1,ma=null,fa=null,xa=null,wn=new Map,Cn=new Map,ha=[],hb=&quot;mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset&quot;.split(&quot; &quot;);function Ix(e,s){switch(e){case&quot;focusin&quot;:case&quot;focusout&quot;:ma=null;break;case&quot;dragenter&quot;:case&quot;dragleave&quot;:fa=null;break;case&quot;mouseover&quot;:case&quot;mouseout&quot;:xa=null;break;case&quot;pointerover&quot;:case&quot;pointerout&quot;:wn.delete(s.pointerId);break;case&quot;gotpointercapture&quot;:case&quot;lostpointercapture&quot;:Cn.delete(s.pointerId)}}function En(e,s,a,n,o,u){return e===null||e.nativeEvent!==u?(e={blockedOn:s,domEventName:a,eventSystemFlags:n,nativeEvent:u,targetContainers:[o]},s!==null&amp;&amp;(s=Xa(s),s!==null&amp;&amp;Fx(s)),e):(e.eventSystemFlags|=n,s=e.targetContainers,o!==null&amp;&amp;s.indexOf(o)===-1&amp;&amp;s.push(o),e)}function pb(e,s,a,n,o){switch(s){case&quot;focusin&quot;:return ma=En(ma,e,s,a,n,o),!0;case&quot;dragenter&quot;:return fa=En(fa,e,s,a,n,o),!0;case&quot;mouseover&quot;:return xa=En(xa,e,s,a,n,o),!0;case&quot;pointerover&quot;:var u=o.pointerId;return wn.set(u,En(wn.get(u)||null,e,s,a,n,o)),!0;case&quot;gotpointercapture&quot;:return u=o.pointerId,Cn.set(u,En(Cn.get(u)||null,e,s,a,n,o)),!0}return!1}function Wx(e){var s=Qa(e.target);if(s!==null){var a=f(s);if(a!==null){if(s=a.tag,s===13){if(s=x(a),s!==null){e.blockedOn=s,md(e.priority,function(){Kx(a)});return}}else if(s===31){if(s=b(a),s!==null){e.blockedOn=s,md(e.priority,function(){Kx(a)});return}}else if(s===3&amp;&amp;a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ni(e){if(e.blockedOn!==null)return!1;for(var s=e.targetContainers;0&lt;s.length;){var a=Wo(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Wi=n,a.target.dispatchEvent(n),Wi=null}else return s=Xa(a),s!==null&amp;&amp;Fx(s),e.blockedOn=a,!1;s.shift()}return!0}function eh(e,s,a){ni(e)&amp;&amp;a.delete(s)}function gb(){tu=!1,ma!==null&amp;&amp;ni(ma)&amp;&amp;(ma=null),fa!==null&amp;&amp;ni(fa)&amp;&amp;(fa=null),xa!==null&amp;&amp;ni(xa)&amp;&amp;(xa=null),wn.forEach(eh),Cn.forEach(eh)}function ri(e,s){e.blockedOn===s&amp;&amp;(e.blockedOn=null,tu||(tu=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,gb)))}var ii=null;function th(e){ii!==e&amp;&amp;(ii=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){ii===e&amp;&amp;(ii=null);for(var s=0;s&lt;e.length;s+=3){var a=e[s],n=e[s+1],o=e[s+2];if(typeof n!=&quot;function&quot;){if(eu(n||a)===null)continue;break}var u=Xa(a);u!==null&amp;&amp;(e.splice(s,3),s-=3,Ic(u,{pending:!0,data:o,method:a.method,action:n},n,o))}}))}function Al(e){function s(O){return ri(O,e)}ma!==null&amp;&amp;ri(ma,e),fa!==null&amp;&amp;ri(fa,e),xa!==null&amp;&amp;ri(xa,e),wn.forEach(s),Cn.forEach(s);for(var a=0;a&lt;ha.length;a++){var n=ha[a];n.blockedOn===e&amp;&amp;(n.blockedOn=null)}for(;0&lt;ha.length&amp;&amp;(a=ha[0],a.blockedOn===null);)Wx(a),a.blockedOn===null&amp;&amp;ha.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(n=0;n&lt;a.length;n+=3){var o=a[n],u=a[n+1],h=o[Dt]||null;if(typeof u==&quot;function&quot;)h||th(a);else if(h){var N=null;if(u&amp;&amp;u.hasAttribute(&quot;formAction&quot;)){if(o=u,h=u[Dt]||null)N=h.formAction;else if(eu(o)!==null)continue}else N=h.action;typeof N==&quot;function&quot;?a[n+1]=N:(a.splice(n,3),n-=3),th(a)}}}function sh(){function e(u){u.canIntercept&amp;&amp;u.info===&quot;react-transition&quot;&amp;&amp;u.intercept({handler:function(){return new Promise(function(h){return o=h})},focusReset:&quot;manual&quot;,scroll:&quot;manual&quot;})}function s(){o!==null&amp;&amp;(o(),o=null),n||setTimeout(a,20)}function a(){if(!n&amp;&amp;!navigation.transition){var u=navigation.currentEntry;u&amp;&amp;u.url!=null&amp;&amp;navigation.navigate(u.url,{state:u.getState(),info:&quot;react-transition&quot;,history:&quot;replace&quot;})}}if(typeof navigation==&quot;object&quot;){var n=!1,o=null;return navigation.addEventListener(&quot;navigate&quot;,e),navigation.addEventListener(&quot;navigatesuccess&quot;,s),navigation.addEventListener(&quot;navigateerror&quot;,s),setTimeout(a,100),function(){n=!0,navigation.removeEventListener(&quot;navigate&quot;,e),navigation.removeEventListener(&quot;navigatesuccess&quot;,s),navigation.removeEventListener(&quot;navigateerror&quot;,s),o!==null&amp;&amp;(o(),o=null)}}}function su(e){this._internalRoot=e}ci.prototype.render=su.prototype.render=function(e){var s=this._internalRoot;if(s===null)throw Error(c(409));var a=s.current,n=Xt();Xx(a,n,e,s,null,null)},ci.prototype.unmount=su.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var s=e.containerInfo;Xx(e.current,2,null,e,null,null),Vr(),s[Za]=null}};function ci(e){this._internalRoot=e}ci.prototype.unstable_scheduleHydration=function(e){if(e){var s=dd();e={blockedOn:null,target:e,priority:s};for(var a=0;a&lt;ha.length&amp;&amp;s!==0&amp;&amp;s&lt;ha[a].priority;a++);ha.splice(a,0,e),a===0&amp;&amp;Wx(e)}};var ah=r.version;if(ah!==&quot;19.2.6&quot;)throw Error(c(527,ah,&quot;19.2.6&quot;));z.findDOMNode=function(e){var s=e._reactInternals;if(s===void 0)throw typeof e.render==&quot;function&quot;?Error(c(188)):(e=Object.keys(e).join(&quot;,&quot;),Error(c(268,e)));return e=g(s),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var bb={bundleType:0,version:&quot;19.2.6&quot;,rendererPackageName:&quot;react-dom&quot;,currentDispatcherRef:_,reconcilerVersion:&quot;19.2.6&quot;};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&lt;&quot;u&quot;){var oi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oi.isDisabled&amp;&amp;oi.supportsFiber)try{ps=oi.inject(bb),ie=oi}catch{}}return kn.createRoot=function(e,s){if(!m(e))throw Error(c(299));var a=!1,n=&quot;&quot;,o=uf,u=df,h=mf;return s!=null&amp;&amp;(s.unstable_strictMode===!0&amp;&amp;(a=!0),s.identifierPrefix!==void 0&amp;&amp;(n=s.identifierPrefix),s.onUncaughtError!==void 0&amp;&amp;(o=s.onUncaughtError),s.onCaughtError!==void 0&amp;&amp;(u=s.onCaughtError),s.onRecoverableError!==void 0&amp;&amp;(h=s.onRecoverableError)),s=Zx(e,1,!1,null,null,a,n,null,o,u,h,sh),e[Za]=s.current,Uo(e),new su(s)},kn.hydrateRoot=function(e,s,a){if(!m(e))throw Error(c(299));var n=!1,o=&quot;&quot;,u=uf,h=df,N=mf,O=null;return a!=null&amp;&amp;(a.unstable_strictMode===!0&amp;&amp;(n=!0),a.identifierPrefix!==void 0&amp;&amp;(o=a.identifierPrefix),a.onUncaughtError!==void 0&amp;&amp;(u=a.onUncaughtError),a.onCaughtError!==void 0&amp;&amp;(h=a.onCaughtError),a.onRecoverableError!==void 0&amp;&amp;(N=a.onRecoverableError),a.formState!==void 0&amp;&amp;(O=a.formState)),s=Zx(e,1,!0,s,a??null,n,o,O,u,h,N,sh),s.context=Qx(null),a=s.current,n=Xt(),n=Zi(n),o=ea(n),o.callback=null,ta(a,o,n),a=n,s.current.lanes=a,Ul(s,a),vs(s),e[Za]=s.current,Uo(e),new ci(s)},kn.version=&quot;19.2.6&quot;,kn}var fh;function Ab(){if(fh)return nu.exports;fh=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&gt;&quot;u&quot;||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=&quot;function&quot;))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(r){console.error(r)}}return l(),nu.exports=Eb(),nu.exports}var kb=Ab();/**
 * react-router v7.15.1
 *
 * 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
 */var xh=&quot;popstate&quot;;function hh(l){return typeof l==&quot;object&quot;&amp;&amp;l!=null&amp;&amp;&quot;pathname&quot;in l&amp;&amp;&quot;search&quot;in l&amp;&amp;&quot;hash&quot;in l&amp;&amp;&quot;state&quot;in l&amp;&amp;&quot;key&quot;in l}function Tb(l={}){function r(c,m){var g;let f=(g=m.state)==null?void 0:g.masked,{pathname:x,search:b,hash:p}=f||c.location;return bu(&quot;&quot;,{pathname:x,search:b,hash:p},m.state&amp;&amp;m.state.usr||null,m.state&amp;&amp;m.state.key||&quot;default&quot;,f?{pathname:c.location.pathname,search:c.location.search,hash:c.location.hash}:void 0)}function i(c,m){return typeof m==&quot;string&quot;?m:Mn(m)}return Mb(r,i,null,l)}function st(l,r){if(l===!1||l===null||typeof l&gt;&quot;u&quot;)throw new Error(r)}function rs(l,r){if(!l){typeof console&lt;&quot;u&quot;&amp;&amp;console.warn(r);try{throw new Error(r)}catch{}}}function zb(){return Math.random().toString(36).substring(2,10)}function ph(l,r){return{usr:l.state,key:l.key,idx:r,masked:l.mask?{pathname:l.pathname,search:l.search,hash:l.hash}:void 0}}function bu(l,r,i=null,c,m){return{pathname:typeof l==&quot;string&quot;?l:l.pathname,search:&quot;&quot;,hash:&quot;&quot;,...typeof r==&quot;string&quot;?Ml(r):r,state:i,key:r&amp;&amp;r.key||c||zb(),mask:m}}function Mn({pathname:l=&quot;/&quot;,search:r=&quot;&quot;,hash:i=&quot;&quot;}){return r&amp;&amp;r!==&quot;?&quot;&amp;&amp;(l+=r.charAt(0)===&quot;?&quot;?r:&quot;?&quot;+r),i&amp;&amp;i!==&quot;#&quot;&amp;&amp;(l+=i.charAt(0)===&quot;#&quot;?i:&quot;#&quot;+i),l}function Ml(l){let r={};if(l){let i=l.indexOf(&quot;#&quot;);i&gt;=0&amp;&amp;(r.hash=l.substring(i),l=l.substring(0,i));let c=l.indexOf(&quot;?&quot;);c&gt;=0&amp;&amp;(r.search=l.substring(c),l=l.substring(0,c)),l&amp;&amp;(r.pathname=l)}return r}function Mb(l,r,i,c={}){let{window:m=document.defaultView,v5Compat:f=!1}=c,x=m.history,b=&quot;POP&quot;,p=null,g=v();g==null&amp;&amp;(g=0,x.replaceState({...x.state,idx:g},&quot;&quot;));function v(){return(x.state||{idx:null}).idx}function j(){b=&quot;POP&quot;;let E=v(),S=E==null?null:E-g;g=E,p&amp;&amp;p({action:b,location:A.location,delta:S})}function y(E,S){b=&quot;PUSH&quot;;let U=hh(E)?E:bu(A.location,E,S);g=v()+1;let T=ph(U,g),P=A.createHref(U.mask||U);try{x.pushState(T,&quot;&quot;,P)}catch(B){if(B instanceof DOMException&amp;&amp;B.name===&quot;DataCloneError&quot;)throw B;m.location.assign(P)}f&amp;&amp;p&amp;&amp;p({action:b,location:A.location,delta:1})}function C(E,S){b=&quot;REPLACE&quot;;let U=hh(E)?E:bu(A.location,E,S);g=v();let T=ph(U,g),P=A.createHref(U.mask||U);x.replaceState(T,&quot;&quot;,P),f&amp;&amp;p&amp;&amp;p({action:b,location:A.location,delta:0})}function M(E){return Db(E)}let A={get action(){return b},get location(){return l(m,x)},listen(E){if(p)throw new Error(&quot;A history only accepts one active listener&quot;);return m.addEventListener(xh,j),p=E,()=&gt;{m.removeEventListener(xh,j),p=null}},createHref(E){return r(m,E)},createURL:M,encodeLocation(E){let S=M(E);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:y,replace:C,go(E){return x.go(E)}};return A}function Db(l,r=!1){let i=&quot;http://localhost&quot;;typeof window&lt;&quot;u&quot;&amp;&amp;(i=window.location.origin!==&quot;null&quot;?window.location.origin:window.location.href),st(i,&quot;No window.location.(origin|href) available to create URL&quot;);let c=typeof l==&quot;string&quot;?l:Mn(l);return c=c.replace(/ $/,&quot;%20&quot;),!r&amp;&amp;c.startsWith(&quot;//&quot;)&amp;&amp;(c=i+c),new URL(c,i)}function Bh(l,r,i=&quot;/&quot;){return Rb(l,r,i,!1)}function Rb(l,r,i,c,m){let f=typeof r==&quot;string&quot;?Ml(r):r,x=Vs(f.pathname||&quot;/&quot;,i);if(x==null)return null;let b=Ob(l),p=null,g=Xb(x);for(let v=0;p==null&amp;&amp;v&lt;b.length;++v)p=Zb(b[v],g,c);return p}function Ob(l){let r=Hh(l);return Lb(r),r}function Hh(l,r=[],i=[],c=&quot;&quot;,m=!1){let f=(x,b,p=m,g)=&gt;{let v={relativePath:g===void 0?x.path||&quot;&quot;:g,caseSensitive:x.caseSensitive===!0,childrenIndex:b,route:x};if(v.relativePath.startsWith(&quot;/&quot;)){if(!v.relativePath.startsWith(c)&amp;&amp;p)return;st(v.relativePath.startsWith(c),`Absolute route path &quot;${v.relativePath}&quot; nested under path &quot;${c}&quot; is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(c.length)}let j=xs([c,v.relativePath]),y=i.concat(v);x.children&amp;&amp;x.children.length&gt;0&amp;&amp;(st(x.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path &quot;${j}&quot;.`),Hh(x.children,r,y,j,p)),!(x.path==null&amp;&amp;!x.index)&amp;&amp;r.push({path:j,score:Yb(j,x.index),routesMeta:y})};return l.forEach((x,b)=&gt;{var p;if(x.path===&quot;&quot;||!((p=x.path)!=null&amp;&amp;p.includes(&quot;?&quot;)))f(x,b);else for(let g of Vh(x.path))f(x,b,!0,g)}),r}function Vh(l){let r=l.split(&quot;/&quot;);if(r.length===0)return[];let[i,...c]=r,m=i.endsWith(&quot;?&quot;),f=i.replace(/\?$/,&quot;&quot;);if(c.length===0)return m?[f,&quot;&quot;]:[f];let x=Vh(c.join(&quot;/&quot;)),b=[];return b.push(...x.map(p=&gt;p===&quot;&quot;?f:[f,p].join(&quot;/&quot;))),m&amp;&amp;b.push(...x),b.map(p=&gt;l.startsWith(&quot;/&quot;)&amp;&amp;p===&quot;&quot;?&quot;/&quot;:p)}function Lb(l){l.sort((r,i)=&gt;r.score!==i.score?i.score-r.score:Gb(r.routesMeta.map(c=&gt;c.childrenIndex),i.routesMeta.map(c=&gt;c.childrenIndex)))}var Ub=/^:[\w-]+$/,$b=3,qb=2,Bb=1,Hb=10,Vb=-2,gh=l=&gt;l===&quot;*&quot;;function Yb(l,r){let i=l.split(&quot;/&quot;),c=i.length;return i.some(gh)&amp;&amp;(c+=Vb),r&amp;&amp;(c+=qb),i.filter(m=&gt;!gh(m)).reduce((m,f)=&gt;m+(Ub.test(f)?$b:f===&quot;&quot;?Bb:Hb),c)}function Gb(l,r){return l.length===r.length&amp;&amp;l.slice(0,-1).every((c,m)=&gt;c===r[m])?l[l.length-1]-r[r.length-1]:0}function Zb(l,r,i=!1){let{routesMeta:c}=l,m={},f=&quot;/&quot;,x=[];for(let b=0;b&lt;c.length;++b){let p=c[b],g=b===c.length-1,v=f===&quot;/&quot;?r:r.slice(f.length)||&quot;/&quot;,j=gi({path:p.relativePath,caseSensitive:p.caseSensitive,end:g},v),y=p.route;if(!j&amp;&amp;g&amp;&amp;i&amp;&amp;!c[c.length-1].route.index&amp;&amp;(j=gi({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},v)),!j)return null;Object.assign(m,j.params),x.push({params:m,pathname:xs([f,j.pathname]),pathnameBase:Jb(xs([f,j.pathnameBase])),route:y}),j.pathnameBase!==&quot;/&quot;&amp;&amp;(f=xs([f,j.pathnameBase]))}return x}function gi(l,r){typeof l==&quot;string&quot;&amp;&amp;(l={path:l,caseSensitive:!1,end:!0});let[i,c]=Qb(l.path,l.caseSensitive,l.end),m=r.match(i);if(!m)return null;let f=m[0],x=f.replace(/(.)\/+$/,&quot;$1&quot;),b=m.slice(1);return{params:c.reduce((g,{paramName:v,isOptional:j},y)=&gt;{if(v===&quot;*&quot;){let M=b[y]||&quot;&quot;;x=f.slice(0,f.length-M.length).replace(/(.)\/+$/,&quot;$1&quot;)}const C=b[y];return j&amp;&amp;!C?g[v]=void 0:g[v]=(C||&quot;&quot;).replace(/%2F/g,&quot;/&quot;),g},{}),pathname:f,pathnameBase:x,pattern:l}}function Qb(l,r=!1,i=!0){rs(l===&quot;*&quot;||!l.endsWith(&quot;*&quot;)||l.endsWith(&quot;/*&quot;),`Route path &quot;${l}&quot; will be treated as if it were &quot;${l.replace(/\*$/,&quot;/*&quot;)}&quot; because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to &quot;${l.replace(/\*$/,&quot;/*&quot;)}&quot;.`);let c=[],m=&quot;^&quot;+l.replace(/\/*\*?$/,&quot;&quot;).replace(/^\/*/,&quot;/&quot;).replace(/[\\.*+^${}|()[\]]/g,&quot;\\$&amp;&quot;).replace(/\/:([\w-]+)(\?)?/g,(x,b,p,g,v)=&gt;{if(c.push({paramName:b,isOptional:p!=null}),p){let j=v.charAt(g+x.length);return j&amp;&amp;j!==&quot;/&quot;?&quot;/([^\\/]*)&quot;:&quot;(?:/([^\\/]*))?&quot;}return&quot;/([^\\/]+)&quot;}).replace(/\/([\w-]+)\?(\/|$)/g,&quot;(/$1)?$2&quot;);return l.endsWith(&quot;*&quot;)?(c.push({paramName:&quot;*&quot;}),m+=l===&quot;*&quot;||l===&quot;/*&quot;?&quot;(.*)$&quot;:&quot;(?:\\/(.+)|\\/*)$&quot;):i?m+=&quot;\\/*$&quot;:l!==&quot;&quot;&amp;&amp;l!==&quot;/&quot;&amp;&amp;(m+=&quot;(?:(?=\\/|$))&quot;),[new RegExp(m,r?void 0:&quot;i&quot;),c]}function Xb(l){try{return l.split(&quot;/&quot;).map(r=&gt;decodeURIComponent(r).replace(/\//g,&quot;%2F&quot;)).join(&quot;/&quot;)}catch(r){return rs(!1,`The URL path &quot;${l}&quot; could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),l}}function Vs(l,r){if(r===&quot;/&quot;)return l;if(!l.toLowerCase().startsWith(r.toLowerCase()))return null;let i=r.endsWith(&quot;/&quot;)?r.length-1:r.length,c=l.charAt(i);return c&amp;&amp;c!==&quot;/&quot;?null:l.slice(i)||&quot;/&quot;}var Pb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Fb(l,r=&quot;/&quot;){let{pathname:i,search:c=&quot;&quot;,hash:m=&quot;&quot;}=typeof l==&quot;string&quot;?Ml(l):l,f;return i?(i=Yh(i),i.startsWith(&quot;/&quot;)?f=bh(i.substring(1),&quot;/&quot;):f=bh(i,r)):f=r,{pathname:f,search:Ib(c),hash:Wb(m)}}function bh(l,r){let i=bi(r).split(&quot;/&quot;);return l.split(&quot;/&quot;).forEach(m=&gt;{m===&quot;..&quot;?i.length&gt;1&amp;&amp;i.pop():m!==&quot;.&quot;&amp;&amp;i.push(m)}),i.length&gt;1?i.join(&quot;/&quot;):&quot;/&quot;}function ou(l,r,i,c){return`Cannot include a &#039;${l}&#039; character in a manually specified \`to.${r}\` field [${JSON.stringify(c)}].  Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in &lt;Link to=&quot;...&quot;&gt; and the router will parse it for you.`}function Kb(l){return l.filter((r,i)=&gt;i===0||r.route.path&amp;&amp;r.route.path.length&gt;0)}function Uu(l){let r=Kb(l);return r.map((i,c)=&gt;c===r.length-1?i.pathname:i.pathnameBase)}function Ui(l,r,i,c=!1){let m;typeof l==&quot;string&quot;?m=Ml(l):(m={...l},st(!m.pathname||!m.pathname.includes(&quot;?&quot;),ou(&quot;?&quot;,&quot;pathname&quot;,&quot;search&quot;,m)),st(!m.pathname||!m.pathname.includes(&quot;#&quot;),ou(&quot;#&quot;,&quot;pathname&quot;,&quot;hash&quot;,m)),st(!m.search||!m.search.includes(&quot;#&quot;),ou(&quot;#&quot;,&quot;search&quot;,&quot;hash&quot;,m)));let f=l===&quot;&quot;||m.pathname===&quot;&quot;,x=f?&quot;/&quot;:m.pathname,b;if(x==null)b=i;else{let j=r.length-1;if(!c&amp;&amp;x.startsWith(&quot;..&quot;)){let y=x.split(&quot;/&quot;);for(;y[0]===&quot;..&quot;;)y.shift(),j-=1;m.pathname=y.join(&quot;/&quot;)}b=j&gt;=0?r[j]:&quot;/&quot;}let p=Fb(m,b),g=x&amp;&amp;x!==&quot;/&quot;&amp;&amp;x.endsWith(&quot;/&quot;),v=(f||x===&quot;.&quot;)&amp;&amp;i.endsWith(&quot;/&quot;);return!p.pathname.endsWith(&quot;/&quot;)&amp;&amp;(g||v)&amp;&amp;(p.pathname+=&quot;/&quot;),p}var Yh=l=&gt;l.replace(/\/\/+/g,&quot;/&quot;),xs=l=&gt;Yh(l.join(&quot;/&quot;)),bi=l=&gt;l.replace(/\/+$/,&quot;&quot;),Jb=l=&gt;bi(l).replace(/^\/*/,&quot;/&quot;),Ib=l=&gt;!l||l===&quot;?&quot;?&quot;&quot;:l.startsWith(&quot;?&quot;)?l:&quot;?&quot;+l,Wb=l=&gt;!l||l===&quot;#&quot;?&quot;&quot;:l.startsWith(&quot;#&quot;)?l:&quot;#&quot;+l,ej=class{constructor(l,r,i,c=!1){this.status=l,this.statusText=r||&quot;&quot;,this.internal=c,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function tj(l){return l!=null&amp;&amp;typeof l.status==&quot;number&quot;&amp;&amp;typeof l.statusText==&quot;string&quot;&amp;&amp;typeof l.internal==&quot;boolean&quot;&amp;&amp;&quot;data&quot;in l}function sj(l){let r=l.map(i=&gt;i.route.path).filter(Boolean);return xs(r)||&quot;/&quot;}var Gh=typeof window&lt;&quot;u&quot;&amp;&amp;typeof window.document&lt;&quot;u&quot;&amp;&amp;typeof window.document.createElement&lt;&quot;u&quot;;function Zh(l,r){let i=l;if(typeof i!=&quot;string&quot;||!Pb.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let c=i,m=!1;if(Gh)try{let f=new URL(window.location.href),x=i.startsWith(&quot;//&quot;)?new URL(f.protocol+i):new URL(i),b=Vs(x.pathname,r);x.origin===f.origin&amp;&amp;b!=null?i=b+x.search+x.hash:m=!0}catch{rs(!1,`&lt;Link to=&quot;${i}&quot;&gt; contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:m,to:i}}Object.getOwnPropertyNames(Object.prototype).sort().join(&quot;\0&quot;);var Qh=[&quot;POST&quot;,&quot;PUT&quot;,&quot;PATCH&quot;,&quot;DELETE&quot;];new Set(Qh);var aj=[&quot;GET&quot;,...Qh];new Set(aj);var Dl=d.createContext(null);Dl.displayName=&quot;DataRouter&quot;;var $i=d.createContext(null);$i.displayName=&quot;DataRouterState&quot;;var Xh=d.createContext(!1);function lj(){return d.useContext(Xh)}var Ph=d.createContext({isTransitioning:!1});Ph.displayName=&quot;ViewTransition&quot;;var nj=d.createContext(new Map);nj.displayName=&quot;Fetchers&quot;;var rj=d.createContext(null);rj.displayName=&quot;Await&quot;;var Pt=d.createContext(null);Pt.displayName=&quot;Navigation&quot;;var Hn=d.createContext(null);Hn.displayName=&quot;Location&quot;;var is=d.createContext({outlet:null,matches:[],isDataRoute:!1});is.displayName=&quot;Route&quot;;var $u=d.createContext(null);$u.displayName=&quot;RouteError&quot;;var Fh=&quot;REACT_ROUTER_ERROR&quot;,ij=&quot;REDIRECT&quot;,cj=&quot;ROUTE_ERROR_RESPONSE&quot;;function oj(l){if(l.startsWith(`${Fh}:${ij}:{`))try{let r=JSON.parse(l.slice(28));if(typeof r==&quot;object&quot;&amp;&amp;r&amp;&amp;typeof r.status==&quot;number&quot;&amp;&amp;typeof r.statusText==&quot;string&quot;&amp;&amp;typeof r.location==&quot;string&quot;&amp;&amp;typeof r.reloadDocument==&quot;boolean&quot;&amp;&amp;typeof r.replace==&quot;boolean&quot;)return r}catch{}}function uj(l){if(l.startsWith(`${Fh}:${cj}:{`))try{let r=JSON.parse(l.slice(40));if(typeof r==&quot;object&quot;&amp;&amp;r&amp;&amp;typeof r.status==&quot;number&quot;&amp;&amp;typeof r.statusText==&quot;string&quot;)return new ej(r.status,r.statusText,r.data)}catch{}}function dj(l,{relative:r}={}){st(Rl(),&quot;useHref() may be used only in the context of a &lt;Router&gt; component.&quot;);let{basename:i,navigator:c}=d.useContext(Pt),{hash:m,pathname:f,search:x}=Vn(l,{relative:r}),b=f;return i!==&quot;/&quot;&amp;&amp;(b=f===&quot;/&quot;?i:xs([i,f])),c.createHref({pathname:b,search:x,hash:m})}function Rl(){return d.useContext(Hn)!=null}function cs(){return st(Rl(),&quot;useLocation() may be used only in the context of a &lt;Router&gt; component.&quot;),d.useContext(Hn).location}var Kh=&quot;You should call navigate() in a React.useEffect(), not when your component is first rendered.&quot;;function Jh(l){d.useContext(Pt).static||d.useLayoutEffect(l)}function ys(){let{isDataRoute:l}=d.useContext(is);return l?Cj():mj()}function mj(){st(Rl(),&quot;useNavigate() may be used only in the context of a &lt;Router&gt; component.&quot;);let l=d.useContext(Dl),{basename:r,navigator:i}=d.useContext(Pt),{matches:c}=d.useContext(is),{pathname:m}=cs(),f=JSON.stringify(Uu(c)),x=d.useRef(!1);return Jh(()=&gt;{x.current=!0}),d.useCallback((p,g={})=&gt;{if(rs(x.current,Kh),!x.current)return;if(typeof p==&quot;number&quot;){i.go(p);return}let v=Ui(p,JSON.parse(f),m,g.relative===&quot;path&quot;);l==null&amp;&amp;r!==&quot;/&quot;&amp;&amp;(v.pathname=v.pathname===&quot;/&quot;?r:xs([r,v.pathname])),(g.replace?i.replace:i.push)(v,g.state,g)},[r,i,f,m,l])}var fj=d.createContext(null);function xj(l){let r=d.useContext(is).outlet;return d.useMemo(()=&gt;r&amp;&amp;d.createElement(fj.Provider,{value:l},r),[r,l])}function Ys(){let{matches:l}=d.useContext(is),r=l[l.length-1];return(r==null?void 0:r.params)??{}}function Vn(l,{relative:r}={}){let{matches:i}=d.useContext(is),{pathname:c}=cs(),m=JSON.stringify(Uu(i));return d.useMemo(()=&gt;Ui(l,JSON.parse(m),c,r===&quot;path&quot;),[l,m,c,r])}function hj(l,r){return Ih(l,r)}function Ih(l,r,i){var E;st(Rl(),&quot;useRoutes() may be used only in the context of a &lt;Router&gt; component.&quot;);let{navigator:c}=d.useContext(Pt),{matches:m}=d.useContext(is),f=m[m.length-1],x=f?f.params:{},b=f?f.pathname:&quot;/&quot;,p=f?f.pathnameBase:&quot;/&quot;,g=f&amp;&amp;f.route;{let S=g&amp;&amp;g.path||&quot;&quot;;ep(b,!g||S.endsWith(&quot;*&quot;)||S.endsWith(&quot;*?&quot;),`You rendered descendant &lt;Routes&gt; (or called \`useRoutes()\`) at &quot;${b}&quot; (under &lt;Route path=&quot;${S}&quot;&gt;) but the parent route path has no trailing &quot;*&quot;. This means if you navigate deeper, the parent won&#039;t match anymore and therefore the child routes will never render.

Please change the parent &lt;Route path=&quot;${S}&quot;&gt; to &lt;Route path=&quot;${S===&quot;/&quot;?&quot;*&quot;:`${S}/*`}&quot;&gt;.`)}let v=cs(),j;if(r){let S=typeof r==&quot;string&quot;?Ml(r):r;st(p===&quot;/&quot;||((E=S.pathname)==null?void 0:E.startsWith(p)),`When overriding the location using \`&lt;Routes location&gt;\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is &quot;${p}&quot; but pathname &quot;${S.pathname}&quot; was given in the \`location\` prop.`),j=S}else j=v;let y=j.pathname||&quot;/&quot;,C=y;if(p!==&quot;/&quot;){let S=p.replace(/^\//,&quot;&quot;).split(&quot;/&quot;);C=&quot;/&quot;+y.replace(/^\//,&quot;&quot;).split(&quot;/&quot;).slice(S.length).join(&quot;/&quot;)}let M=i&amp;&amp;i.state.matches.length?i.state.matches.map(S=&gt;Object.assign(S,{route:i.manifest[S.route.id]||S.route})):Bh(l,{pathname:C});rs(g||M!=null,`No routes matched location &quot;${j.pathname}${j.search}${j.hash}&quot; `),rs(M==null||M[M.length-1].route.element!==void 0||M[M.length-1].route.Component!==void 0||M[M.length-1].route.lazy!==void 0,`Matched leaf route at location &quot;${j.pathname}${j.search}${j.hash}&quot; does not have an element or Component. This means it will render an &lt;Outlet /&gt; with a null value by default resulting in an &quot;empty&quot; page.`);let A=vj(M&amp;&amp;M.map(S=&gt;Object.assign({},S,{params:Object.assign({},x,S.params),pathname:xs([p,c.encodeLocation?c.encodeLocation(S.pathname.replace(/%/g,&quot;%25&quot;).replace(/\?/g,&quot;%3F&quot;).replace(/#/g,&quot;%23&quot;)).pathname:S.pathname]),pathnameBase:S.pathnameBase===&quot;/&quot;?p:xs([p,c.encodeLocation?c.encodeLocation(S.pathnameBase.replace(/%/g,&quot;%25&quot;).replace(/\?/g,&quot;%3F&quot;).replace(/#/g,&quot;%23&quot;)).pathname:S.pathnameBase])})),m,i);return r&amp;&amp;A?d.createElement(Hn.Provider,{value:{location:{pathname:&quot;/&quot;,search:&quot;&quot;,hash:&quot;&quot;,state:null,key:&quot;default&quot;,mask:void 0,...j},navigationType:&quot;POP&quot;}},A):A}function pj(){let l=wj(),r=tj(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),i=l instanceof Error?l.stack:null,c=&quot;rgba(200,200,200, 0.5)&quot;,m={padding:&quot;0.5rem&quot;,backgroundColor:c},f={padding:&quot;2px 4px&quot;,backgroundColor:c},x=null;return console.error(&quot;Error handled by React Router default ErrorBoundary:&quot;,l),x=d.createElement(d.Fragment,null,d.createElement(&quot;p&quot;,null,&quot;💿 Hey developer 👋&quot;),d.createElement(&quot;p&quot;,null,&quot;You can provide a way better UX than this when your app throws errors by providing your own &quot;,d.createElement(&quot;code&quot;,{style:f},&quot;ErrorBoundary&quot;),&quot; or&quot;,&quot; &quot;,d.createElement(&quot;code&quot;,{style:f},&quot;errorElement&quot;),&quot; prop on your route.&quot;)),d.createElement(d.Fragment,null,d.createElement(&quot;h2&quot;,null,&quot;Unexpected Application Error!&quot;),d.createElement(&quot;h3&quot;,{style:{fontStyle:&quot;italic&quot;}},r),i?d.createElement(&quot;pre&quot;,{style:m},i):null,x)}var gj=d.createElement(pj,null),Wh=class extends d.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,r){return r.location!==l.location||r.revalidation!==&quot;idle&quot;&amp;&amp;l.revalidation===&quot;idle&quot;?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:r.error,location:r.location,revalidation:l.revalidation||r.revalidation}}componentDidCatch(l,r){this.props.onError?this.props.onError(l,r):console.error(&quot;React Router caught the following error during render&quot;,l)}render(){let l=this.state.error;if(this.context&amp;&amp;typeof l==&quot;object&quot;&amp;&amp;l&amp;&amp;&quot;digest&quot;in l&amp;&amp;typeof l.digest==&quot;string&quot;){const i=uj(l.digest);i&amp;&amp;(l=i)}let r=l!==void 0?d.createElement(is.Provider,{value:this.props.routeContext},d.createElement($u.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?d.createElement(bj,{error:l},r):r}};Wh.contextType=Xh;var uu=new WeakMap;function bj({children:l,error:r}){let{basename:i}=d.useContext(Pt);if(typeof r==&quot;object&quot;&amp;&amp;r&amp;&amp;&quot;digest&quot;in r&amp;&amp;typeof r.digest==&quot;string&quot;){let c=oj(r.digest);if(c){let m=uu.get(r);if(m)throw m;let f=Zh(c.location,i);if(Gh&amp;&amp;!uu.get(r))if(f.isExternal||c.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const x=Promise.resolve().then(()=&gt;window.__reactRouterDataRouter.navigate(f.to,{replace:c.replace}));throw uu.set(r,x),x}return d.createElement(&quot;meta&quot;,{httpEquiv:&quot;refresh&quot;,content:`0;url=${f.absoluteURL||f.to}`})}}return l}function jj({routeContext:l,match:r,children:i}){let c=d.useContext(Dl);return c&amp;&amp;c.static&amp;&amp;c.staticContext&amp;&amp;(r.route.errorElement||r.route.ErrorBoundary)&amp;&amp;(c.staticContext._deepestRenderedBoundaryId=r.route.id),d.createElement(is.Provider,{value:l},i)}function vj(l,r=[],i){let c=i==null?void 0:i.state;if(l==null){if(!c)return null;if(c.errors)l=c.matches;else if(r.length===0&amp;&amp;!c.initialized&amp;&amp;c.matches.length&gt;0)l=c.matches;else return null}let m=l,f=c==null?void 0:c.errors;if(f!=null){let v=m.findIndex(j=&gt;j.route.id&amp;&amp;(f==null?void 0:f[j.route.id])!==void 0);st(v&gt;=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(&quot;,&quot;)}`),m=m.slice(0,Math.min(m.length,v+1))}let x=!1,b=-1;if(i&amp;&amp;c){x=c.renderFallback;for(let v=0;v&lt;m.length;v++){let j=m[v];if((j.route.HydrateFallback||j.route.hydrateFallbackElement)&amp;&amp;(b=v),j.route.id){let{loaderData:y,errors:C}=c,M=j.route.loader&amp;&amp;!y.hasOwnProperty(j.route.id)&amp;&amp;(!C||C[j.route.id]===void 0);if(j.route.lazy||M){i.isStatic&amp;&amp;(x=!0),b&gt;=0?m=m.slice(0,b+1):m=[m[0]];break}}}}let p=i==null?void 0:i.onError,g=c&amp;&amp;p?(v,j)=&gt;{var y,C;p(v,{location:c.location,params:((C=(y=c.matches)==null?void 0:y[0])==null?void 0:C.params)??{},pattern:sj(c.matches),errorInfo:j})}:void 0;return m.reduceRight((v,j,y)=&gt;{let C,M=!1,A=null,E=null;c&amp;&amp;(C=f&amp;&amp;j.route.id?f[j.route.id]:void 0,A=j.route.errorElement||gj,x&amp;&amp;(b&lt;0&amp;&amp;y===0?(ep(&quot;route-fallback&quot;,!1,&quot;No `HydrateFallback` element provided to render during initial hydration&quot;),M=!0,E=null):b===y&amp;&amp;(M=!0,E=j.route.hydrateFallbackElement||null)));let S=r.concat(m.slice(0,y+1)),U=()=&gt;{let T;return C?T=A:M?T=E:j.route.Component?T=d.createElement(j.route.Component,null):j.route.element?T=j.route.element:T=v,d.createElement(jj,{match:j,routeContext:{outlet:v,matches:S,isDataRoute:c!=null},children:T})};return c&amp;&amp;(j.route.ErrorBoundary||j.route.errorElement||y===0)?d.createElement(Wh,{location:c.location,revalidation:c.revalidation,component:A,error:C,children:U(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:g}):U()},null)}function qu(l){return`${l} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function yj(l){let r=d.useContext(Dl);return st(r,qu(l)),r}function Nj(l){let r=d.useContext($i);return st(r,qu(l)),r}function _j(l){let r=d.useContext(is);return st(r,qu(l)),r}function Bu(l){let r=_j(l),i=r.matches[r.matches.length-1];return st(i.route.id,`${l} can only be used on routes that contain a unique &quot;id&quot;`),i.route.id}function Sj(){return Bu(&quot;useRouteId&quot;)}function wj(){var c;let l=d.useContext($u),r=Nj(&quot;useRouteError&quot;),i=Bu(&quot;useRouteError&quot;);return l!==void 0?l:(c=r.errors)==null?void 0:c[i]}function Cj(){let{router:l}=yj(&quot;useNavigate&quot;),r=Bu(&quot;useNavigate&quot;),i=d.useRef(!1);return Jh(()=&gt;{i.current=!0}),d.useCallback(async(m,f={})=&gt;{rs(i.current,Kh),i.current&amp;&amp;(typeof m==&quot;number&quot;?await l.navigate(m):await l.navigate(m,{fromRouteId:r,...f}))},[l,r])}var jh={};function ep(l,r,i){!r&amp;&amp;!jh[l]&amp;&amp;(jh[l]=!0,rs(!1,i))}d.memo(Ej);function Ej({routes:l,manifest:r,future:i,state:c,isStatic:m,onError:f}){return Ih(l,void 0,{manifest:r,state:c,isStatic:m,onError:f})}function qi({to:l,replace:r,state:i,relative:c}){st(Rl(),&quot;&lt;Navigate&gt; may be used only in the context of a &lt;Router&gt; component.&quot;);let{static:m}=d.useContext(Pt);rs(!m,&quot;&lt;Navigate&gt; must not be used on the initial render in a &lt;StaticRouter&gt;. This is a no-op, but you should modify your code so the &lt;Navigate&gt; is only ever rendered in response to some user interaction or state change.&quot;);let{matches:f}=d.useContext(is),{pathname:x}=cs(),b=ys(),p=Ui(l,Uu(f),x,c===&quot;path&quot;),g=JSON.stringify(p);return d.useEffect(()=&gt;{b(JSON.parse(g),{replace:r,state:i,relative:c})},[b,g,c,r,i]),null}function Yn(l){return xj(l.context)}function qe(l){st(!1,&quot;A &lt;Route&gt; is only ever to be used as the child of &lt;Routes&gt; element, never rendered directly. Please wrap your &lt;Route&gt; in a &lt;Routes&gt;.&quot;)}function Aj({basename:l=&quot;/&quot;,children:r=null,location:i,navigationType:c=&quot;POP&quot;,navigator:m,static:f=!1,useTransitions:x}){st(!Rl(),&quot;You cannot render a &lt;Router&gt; inside another &lt;Router&gt;. You should never have more than one in your app.&quot;);let b=l.replace(/^\/*/,&quot;/&quot;),p=d.useMemo(()=&gt;({basename:b,navigator:m,static:f,useTransitions:x,future:{}}),[b,m,f,x]);typeof i==&quot;string&quot;&amp;&amp;(i=Ml(i));let{pathname:g=&quot;/&quot;,search:v=&quot;&quot;,hash:j=&quot;&quot;,state:y=null,key:C=&quot;default&quot;,mask:M}=i,A=d.useMemo(()=&gt;{let E=Vs(g,b);return E==null?null:{location:{pathname:E,search:v,hash:j,state:y,key:C,mask:M},navigationType:c}},[b,g,v,j,y,C,c,M]);return rs(A!=null,`&lt;Router basename=&quot;${b}&quot;&gt; is not able to match the URL &quot;${g}${v}${j}&quot; because it does not start with the basename, so the &lt;Router&gt; won&#039;t render anything.`),A==null?null:d.createElement(Pt.Provider,{value:p},d.createElement(Hn.Provider,{children:r,value:A}))}function kj({children:l,location:r}){return hj(ju(l),r)}function ju(l,r=[]){let i=[];return d.Children.forEach(l,(c,m)=&gt;{if(!d.isValidElement(c))return;let f=[...r,m];if(c.type===d.Fragment){i.push.apply(i,ju(c.props.children,f));return}st(c.type===qe,`[${typeof c.type==&quot;string&quot;?c.type:c.type.name}] is not a &lt;Route&gt; component. All component children of &lt;Routes&gt; must be a &lt;Route&gt; or &lt;React.Fragment&gt;`),st(!c.props.index||!c.props.children,&quot;An index route cannot have child routes.&quot;);let x={id:c.props.id||f.join(&quot;-&quot;),caseSensitive:c.props.caseSensitive,element:c.props.element,Component:c.props.Component,index:c.props.index,path:c.props.path,middleware:c.props.middleware,loader:c.props.loader,action:c.props.action,hydrateFallbackElement:c.props.hydrateFallbackElement,HydrateFallback:c.props.HydrateFallback,errorElement:c.props.errorElement,ErrorBoundary:c.props.ErrorBoundary,hasErrorBoundary:c.props.hasErrorBoundary===!0||c.props.ErrorBoundary!=null||c.props.errorElement!=null,shouldRevalidate:c.props.shouldRevalidate,handle:c.props.handle,lazy:c.props.lazy};c.props.children&amp;&amp;(x.children=ju(c.props.children,f)),i.push(x)}),i}var xi=&quot;get&quot;,hi=&quot;application/x-www-form-urlencoded&quot;;function Bi(l){return typeof HTMLElement&lt;&quot;u&quot;&amp;&amp;l instanceof HTMLElement}function Tj(l){return Bi(l)&amp;&amp;l.tagName.toLowerCase()===&quot;button&quot;}function zj(l){return Bi(l)&amp;&amp;l.tagName.toLowerCase()===&quot;form&quot;}function Mj(l){return Bi(l)&amp;&amp;l.tagName.toLowerCase()===&quot;input&quot;}function Dj(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Rj(l,r){return l.button===0&amp;&amp;(!r||r===&quot;_self&quot;)&amp;&amp;!Dj(l)}function vu(l=&quot;&quot;){return new URLSearchParams(typeof l==&quot;string&quot;||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((r,i)=&gt;{let c=l[i];return r.concat(Array.isArray(c)?c.map(m=&gt;[i,m]):[[i,c]])},[]))}function Oj(l,r){let i=vu(l);return r&amp;&amp;r.forEach((c,m)=&gt;{i.has(m)||r.getAll(m).forEach(f=&gt;{i.append(m,f)})}),i}var ui=null;function Lj(){if(ui===null)try{new FormData(document.createElement(&quot;form&quot;),0),ui=!1}catch{ui=!0}return ui}var Uj=new Set([&quot;application/x-www-form-urlencoded&quot;,&quot;multipart/form-data&quot;,&quot;text/plain&quot;]);function du(l){return l!=null&amp;&amp;!Uj.has(l)?(rs(!1,`&quot;${l}&quot; is not a valid \`encType\` for \`&lt;Form&gt;\`/\`&lt;fetcher.Form&gt;\` and will default to &quot;${hi}&quot;`),null):l}function $j(l,r){let i,c,m,f,x;if(zj(l)){let b=l.getAttribute(&quot;action&quot;);c=b?Vs(b,r):null,i=l.getAttribute(&quot;method&quot;)||xi,m=du(l.getAttribute(&quot;enctype&quot;))||hi,f=new FormData(l)}else if(Tj(l)||Mj(l)&amp;&amp;(l.type===&quot;submit&quot;||l.type===&quot;image&quot;)){let b=l.form;if(b==null)throw new Error(&#039;Cannot submit a &lt;button&gt; or &lt;input type=&quot;submit&quot;&gt; without a &lt;form&gt;&#039;);let p=l.getAttribute(&quot;formaction&quot;)||b.getAttribute(&quot;action&quot;);if(c=p?Vs(p,r):null,i=l.getAttribute(&quot;formmethod&quot;)||b.getAttribute(&quot;method&quot;)||xi,m=du(l.getAttribute(&quot;formenctype&quot;))||du(b.getAttribute(&quot;enctype&quot;))||hi,f=new FormData(b,l),!Lj()){let{name:g,type:v,value:j}=l;if(v===&quot;image&quot;){let y=g?`${g}.`:&quot;&quot;;f.append(`${y}x`,&quot;0&quot;),f.append(`${y}y`,&quot;0&quot;)}else g&amp;&amp;f.append(g,j)}}else{if(Bi(l))throw new Error(&#039;Cannot submit element that is not &lt;form&gt;, &lt;button&gt;, or &lt;input type=&quot;submit|image&quot;&gt;&#039;);i=xi,c=null,m=hi,x=l}return f&amp;&amp;m===&quot;text/plain&quot;&amp;&amp;(x=f,f=void 0),{action:c,method:i.toLowerCase(),encType:m,formData:f,body:x}}Object.getOwnPropertyNames(Object.prototype).sort().join(&quot;\0&quot;);function Hu(l,r){if(l===!1||l===null||typeof l&gt;&quot;u&quot;)throw new Error(r)}function tp(l,r,i,c){let m=typeof l==&quot;string&quot;?new URL(l,typeof window&gt;&quot;u&quot;?&quot;server://singlefetch/&quot;:window.location.origin):l;return i?m.pathname.endsWith(&quot;/&quot;)?m.pathname=`${m.pathname}_.${c}`:m.pathname=`${m.pathname}.${c}`:m.pathname===&quot;/&quot;?m.pathname=`_root.${c}`:r&amp;&amp;Vs(m.pathname,r)===&quot;/&quot;?m.pathname=`${bi(r)}/_root.${c}`:m.pathname=`${bi(m.pathname)}.${c}`,m}async function qj(l,r){if(l.id in r)return r[l.id];try{let i=await import(l.module);return r[l.id]=i,i}catch(i){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(i),window.__reactRouterContext&amp;&amp;window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=&gt;{})}}function Bj(l){return l==null?!1:l.href==null?l.rel===&quot;preload&quot;&amp;&amp;typeof l.imageSrcSet==&quot;string&quot;&amp;&amp;typeof l.imageSizes==&quot;string&quot;:typeof l.rel==&quot;string&quot;&amp;&amp;typeof l.href==&quot;string&quot;}async function Hj(l,r,i){let c=await Promise.all(l.map(async m=&gt;{let f=r.routes[m.route.id];if(f){let x=await qj(f,i);return x.links?x.links():[]}return[]}));return Zj(c.flat(1).filter(Bj).filter(m=&gt;m.rel===&quot;stylesheet&quot;||m.rel===&quot;preload&quot;).map(m=&gt;m.rel===&quot;stylesheet&quot;?{...m,rel:&quot;prefetch&quot;,as:&quot;style&quot;}:{...m,rel:&quot;prefetch&quot;}))}function vh(l,r,i,c,m,f){let x=(p,g)=&gt;i[g]?p.route.id!==i[g].route.id:!0,b=(p,g)=&gt;{var v;return i[g].pathname!==p.pathname||((v=i[g].route.path)==null?void 0:v.endsWith(&quot;*&quot;))&amp;&amp;i[g].params[&quot;*&quot;]!==p.params[&quot;*&quot;]};return f===&quot;assets&quot;?r.filter((p,g)=&gt;x(p,g)||b(p,g)):f===&quot;data&quot;?r.filter((p,g)=&gt;{var j;let v=c.routes[p.route.id];if(!v||!v.hasLoader)return!1;if(x(p,g)||b(p,g))return!0;if(p.route.shouldRevalidate){let y=p.route.shouldRevalidate({currentUrl:new URL(m.pathname+m.search+m.hash,window.origin),currentParams:((j=i[0])==null?void 0:j.params)||{},nextUrl:new URL(l,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof y==&quot;boolean&quot;)return y}return!0}):[]}function Vj(l,r,{includeHydrateFallback:i}={}){return Yj(l.map(c=&gt;{let m=r.routes[c.route.id];if(!m)return[];let f=[m.module];return m.clientActionModule&amp;&amp;(f=f.concat(m.clientActionModule)),m.clientLoaderModule&amp;&amp;(f=f.concat(m.clientLoaderModule)),i&amp;&amp;m.hydrateFallbackModule&amp;&amp;(f=f.concat(m.hydrateFallbackModule)),m.imports&amp;&amp;(f=f.concat(m.imports)),f}).flat(1))}function Yj(l){return[...new Set(l)]}function Gj(l){let r={},i=Object.keys(l).sort();for(let c of i)r[c]=l[c];return r}function Zj(l,r){let i=new Set;return new Set(r),l.reduce((c,m)=&gt;{let f=JSON.stringify(Gj(m));return i.has(f)||(i.add(f),c.push({key:f,link:m})),c},[])}function Vu(){let l=d.useContext(Dl);return Hu(l,&quot;You must render this element inside a &lt;DataRouterContext.Provider&gt; element&quot;),l}function Qj(){let l=d.useContext($i);return Hu(l,&quot;You must render this element inside a &lt;DataRouterStateContext.Provider&gt; element&quot;),l}var Yu=d.createContext(void 0);Yu.displayName=&quot;FrameworkContext&quot;;function Gu(){let l=d.useContext(Yu);return Hu(l,&quot;You must render this element inside a &lt;HydratedRouter&gt; element&quot;),l}function Xj(l,r){let i=d.useContext(Yu),[c,m]=d.useState(!1),[f,x]=d.useState(!1),{onFocus:b,onBlur:p,onMouseEnter:g,onMouseLeave:v,onTouchStart:j}=r,y=d.useRef(null);d.useEffect(()=&gt;{if(l===&quot;render&quot;&amp;&amp;x(!0),l===&quot;viewport&quot;){let A=S=&gt;{S.forEach(U=&gt;{x(U.isIntersecting)})},E=new IntersectionObserver(A,{threshold:.5});return y.current&amp;&amp;E.observe(y.current),()=&gt;{E.disconnect()}}},[l]),d.useEffect(()=&gt;{if(c){let A=setTimeout(()=&gt;{x(!0)},100);return()=&gt;{clearTimeout(A)}}},[c]);let C=()=&gt;{m(!0)},M=()=&gt;{m(!1),x(!1)};return i?l!==&quot;intent&quot;?[f,y,{}]:[f,y,{onFocus:Tn(b,C),onBlur:Tn(p,M),onMouseEnter:Tn(g,C),onMouseLeave:Tn(v,M),onTouchStart:Tn(j,C)}]:[!1,y,{}]}function Tn(l,r){return i=&gt;{l&amp;&amp;l(i),i.defaultPrevented||r(i)}}function Pj({page:l,...r}){let i=lj(),{router:c}=Vu(),m=d.useMemo(()=&gt;Bh(c.routes,l,c.basename),[c.routes,l,c.basename]);return m?i?d.createElement(Kj,{page:l,matches:m,...r}):d.createElement(Jj,{page:l,matches:m,...r}):null}function Fj(l){let{manifest:r,routeModules:i}=Gu(),[c,m]=d.useState([]);return d.useEffect(()=&gt;{let f=!1;return Hj(l,r,i).then(x=&gt;{f||m(x)}),()=&gt;{f=!0}},[l,r,i]),c}function Kj({page:l,matches:r,...i}){let c=cs(),{future:m}=Gu(),{basename:f}=Vu(),x=d.useMemo(()=&gt;{if(l===c.pathname+c.search+c.hash)return[];let b=tp(l,f,m.unstable_trailingSlashAwareDataRequests,&quot;rsc&quot;),p=!1,g=[];for(let v of r)typeof v.route.shouldRevalidate==&quot;function&quot;?p=!0:g.push(v.route.id);return p&amp;&amp;g.length&gt;0&amp;&amp;b.searchParams.set(&quot;_routes&quot;,g.join(&quot;,&quot;)),[b.pathname+b.search]},[f,m.unstable_trailingSlashAwareDataRequests,l,c,r]);return d.createElement(d.Fragment,null,x.map(b=&gt;d.createElement(&quot;link&quot;,{key:b,rel:&quot;prefetch&quot;,as:&quot;fetch&quot;,href:b,...i})))}function Jj({page:l,matches:r,...i}){let c=cs(),{future:m,manifest:f,routeModules:x}=Gu(),{basename:b}=Vu(),{loaderData:p,matches:g}=Qj(),v=d.useMemo(()=&gt;vh(l,r,g,f,c,&quot;data&quot;),[l,r,g,f,c]),j=d.useMemo(()=&gt;vh(l,r,g,f,c,&quot;assets&quot;),[l,r,g,f,c]),y=d.useMemo(()=&gt;{if(l===c.pathname+c.search+c.hash)return[];let A=new Set,E=!1;if(r.forEach(U=&gt;{var P;let T=f.routes[U.route.id];!T||!T.hasLoader||(!v.some(B=&gt;B.route.id===U.route.id)&amp;&amp;U.route.id in p&amp;&amp;((P=x[U.route.id])!=null&amp;&amp;P.shouldRevalidate)||T.hasClientLoader?E=!0:A.add(U.route.id))}),A.size===0)return[];let S=tp(l,b,m.unstable_trailingSlashAwareDataRequests,&quot;data&quot;);return E&amp;&amp;A.size&gt;0&amp;&amp;S.searchParams.set(&quot;_routes&quot;,r.filter(U=&gt;A.has(U.route.id)).map(U=&gt;U.route.id).join(&quot;,&quot;)),[S.pathname+S.search]},[b,m.unstable_trailingSlashAwareDataRequests,p,c,f,v,r,l,x]),C=d.useMemo(()=&gt;Vj(j,f),[j,f]),M=Fj(j);return d.createElement(d.Fragment,null,y.map(A=&gt;d.createElement(&quot;link&quot;,{key:A,rel:&quot;prefetch&quot;,as:&quot;fetch&quot;,href:A,...i})),C.map(A=&gt;d.createElement(&quot;link&quot;,{key:A,rel:&quot;modulepreload&quot;,href:A,...i})),M.map(({key:A,link:E})=&gt;d.createElement(&quot;link&quot;,{key:A,nonce:i.nonce,...E,crossOrigin:E.crossOrigin??i.crossOrigin})))}function Ij(...l){return r=&gt;{l.forEach(i=&gt;{typeof i==&quot;function&quot;?i(r):i!=null&amp;&amp;(i.current=r)})}}var Wj=typeof window&lt;&quot;u&quot;&amp;&amp;typeof window.document&lt;&quot;u&quot;&amp;&amp;typeof window.document.createElement&lt;&quot;u&quot;;try{Wj&amp;&amp;(window.__reactRouterVersion=&quot;7.15.1&quot;)}catch{}function ev({basename:l,children:r,useTransitions:i,window:c}){let m=d.useRef();m.current==null&amp;&amp;(m.current=Tb({window:c,v5Compat:!0}));let f=m.current,[x,b]=d.useState({action:f.action,location:f.location}),p=d.useCallback(g=&gt;{i===!1?b(g):d.startTransition(()=&gt;b(g))},[i]);return d.useLayoutEffect(()=&gt;f.listen(p),[f,p]),d.createElement(Aj,{basename:l,children:r,location:x.location,navigationType:x.action,navigator:f,useTransitions:i})}var sp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,he=d.forwardRef(function({onClick:r,discover:i=&quot;render&quot;,prefetch:c=&quot;none&quot;,relative:m,reloadDocument:f,replace:x,mask:b,state:p,target:g,to:v,preventScrollReset:j,viewTransition:y,defaultShouldRevalidate:C,...M},A){let{basename:E,navigator:S,useTransitions:U}=d.useContext(Pt),T=typeof v==&quot;string&quot;&amp;&amp;sp.test(v),P=Zh(v,E);v=P.to;let B=dj(v,{relative:m}),G=cs(),K=null;if(b){let q=Ui(b,[],G.mask?G.mask.pathname:&quot;/&quot;,!0);E!==&quot;/&quot;&amp;&amp;(q.pathname=q.pathname===&quot;/&quot;?E:xs([E,q.pathname])),K=S.createHref(q)}let[Z,k,w]=Xj(c,M),F=av(v,{replace:x,mask:b,state:p,target:g,preventScrollReset:j,relative:m,viewTransition:y,defaultShouldRevalidate:C,useTransitions:U});function le(q){r&amp;&amp;r(q),q.defaultPrevented||F(q)}let Y=!(P.isExternal||f),H=d.createElement(&quot;a&quot;,{...M,...w,href:(Y?K:void 0)||P.absoluteURL||B,onClick:Y?le:r,ref:Ij(A,k),target:g,&quot;data-discover&quot;:!T&amp;&amp;i===&quot;render&quot;?&quot;true&quot;:void 0});return Z&amp;&amp;!T?d.createElement(d.Fragment,null,H,d.createElement(Pj,{page:B})):H});he.displayName=&quot;Link&quot;;var Zu=d.forwardRef(function({&quot;aria-current&quot;:r=&quot;page&quot;,caseSensitive:i=!1,className:c=&quot;&quot;,end:m=!1,style:f,to:x,viewTransition:b,children:p,...g},v){let j=Vn(x,{relative:g.relative}),y=cs(),C=d.useContext($i),{navigator:M,basename:A}=d.useContext(Pt),E=C!=null&amp;&amp;cv(j)&amp;&amp;b===!0,S=M.encodeLocation?M.encodeLocation(j).pathname:j.pathname,U=y.pathname,T=C&amp;&amp;C.navigation&amp;&amp;C.navigation.location?C.navigation.location.pathname:null;i||(U=U.toLowerCase(),T=T?T.toLowerCase():null,S=S.toLowerCase()),T&amp;&amp;A&amp;&amp;(T=Vs(T,A)||T);const P=S!==&quot;/&quot;&amp;&amp;S.endsWith(&quot;/&quot;)?S.length-1:S.length;let B=U===S||!m&amp;&amp;U.startsWith(S)&amp;&amp;U.charAt(P)===&quot;/&quot;,G=T!=null&amp;&amp;(T===S||!m&amp;&amp;T.startsWith(S)&amp;&amp;T.charAt(S.length)===&quot;/&quot;),K={isActive:B,isPending:G,isTransitioning:E},Z=B?r:void 0,k;typeof c==&quot;function&quot;?k=c(K):k=[c,B?&quot;active&quot;:null,G?&quot;pending&quot;:null,E?&quot;transitioning&quot;:null].filter(Boolean).join(&quot; &quot;);let w=typeof f==&quot;function&quot;?f(K):f;return d.createElement(he,{...g,&quot;aria-current&quot;:Z,className:k,ref:v,style:w,to:x,viewTransition:b},typeof p==&quot;function&quot;?p(K):p)});Zu.displayName=&quot;NavLink&quot;;var tv=d.forwardRef(({discover:l=&quot;render&quot;,fetcherKey:r,navigate:i,reloadDocument:c,replace:m,state:f,method:x=xi,action:b,onSubmit:p,relative:g,preventScrollReset:v,viewTransition:j,defaultShouldRevalidate:y,...C},M)=&gt;{let{useTransitions:A}=d.useContext(Pt),E=rv(),S=iv(b,{relative:g}),U=x.toLowerCase()===&quot;get&quot;?&quot;get&quot;:&quot;post&quot;,T=typeof b==&quot;string&quot;&amp;&amp;sp.test(b),P=B=&gt;{if(p&amp;&amp;p(B),B.defaultPrevented)return;B.preventDefault();let G=B.nativeEvent.submitter,K=(G==null?void 0:G.getAttribute(&quot;formmethod&quot;))||x,Z=()=&gt;E(G||B.currentTarget,{fetcherKey:r,method:K,navigate:i,replace:m,state:f,relative:g,preventScrollReset:v,viewTransition:j,defaultShouldRevalidate:y});A&amp;&amp;i!==!1?d.startTransition(()=&gt;Z()):Z()};return d.createElement(&quot;form&quot;,{ref:M,method:U,action:S,onSubmit:c?p:P,...C,&quot;data-discover&quot;:!T&amp;&amp;l===&quot;render&quot;?&quot;true&quot;:void 0})});tv.displayName=&quot;Form&quot;;function sv(l){return`${l} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function ap(l){let r=d.useContext(Dl);return st(r,sv(l)),r}function av(l,{target:r,replace:i,mask:c,state:m,preventScrollReset:f,relative:x,viewTransition:b,defaultShouldRevalidate:p,useTransitions:g}={}){let v=ys(),j=cs(),y=Vn(l,{relative:x});return d.useCallback(C=&gt;{if(Rj(C,r)){C.preventDefault();let M=i!==void 0?i:Mn(j)===Mn(y),A=()=&gt;v(l,{replace:M,mask:c,state:m,preventScrollReset:f,relative:x,viewTransition:b,defaultShouldRevalidate:p});g?d.startTransition(()=&gt;A()):A()}},[j,v,y,i,c,m,r,l,f,x,b,p,g])}function Ol(l){rs(typeof URLSearchParams&lt;&quot;u&quot;,&quot;You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.&quot;);let r=d.useRef(vu(l)),i=d.useRef(!1),c=cs(),m=d.useMemo(()=&gt;Oj(c.search,i.current?null:r.current),[c.search]),f=ys(),x=d.useCallback((b,p)=&gt;{const g=vu(typeof b==&quot;function&quot;?b(new URLSearchParams(m)):b);i.current=!0,f(&quot;?&quot;+g,p)},[f,m]);return[m,x]}var lv=0,nv=()=&gt;`__${String(++lv)}__`;function rv(){let{router:l}=ap(&quot;useSubmit&quot;),{basename:r}=d.useContext(Pt),i=Sj(),c=l.fetch,m=l.navigate;return d.useCallback(async(f,x={})=&gt;{let{action:b,method:p,encType:g,formData:v,body:j}=$j(f,r);if(x.navigate===!1){let y=x.fetcherKey||nv();await c(y,i,x.action||b,{defaultShouldRevalidate:x.defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:v,body:j,formMethod:x.method||p,formEncType:x.encType||g,flushSync:x.flushSync})}else await m(x.action||b,{defaultShouldRevalidate:x.defaultShouldRevalidate,preventScrollReset:x.preventScrollReset,formData:v,body:j,formMethod:x.method||p,formEncType:x.encType||g,replace:x.replace,state:x.state,fromRouteId:i,flushSync:x.flushSync,viewTransition:x.viewTransition})},[c,m,r,i])}function iv(l,{relative:r}={}){let{basename:i}=d.useContext(Pt),c=d.useContext(is);st(c,&quot;useFormAction must be used inside a RouteContext&quot;);let[m]=c.matches.slice(-1),f={...Vn(l||&quot;.&quot;,{relative:r})},x=cs();if(l==null){f.search=x.search;let b=new URLSearchParams(f.search),p=b.getAll(&quot;index&quot;);if(p.some(v=&gt;v===&quot;&quot;)){b.delete(&quot;index&quot;),p.filter(j=&gt;j).forEach(j=&gt;b.append(&quot;index&quot;,j));let v=b.toString();f.search=v?`?${v}`:&quot;&quot;}}return(!l||l===&quot;.&quot;)&amp;&amp;m.route.index&amp;&amp;(f.search=f.search?f.search.replace(/^\?/,&quot;?index&amp;&quot;):&quot;?index&quot;),i!==&quot;/&quot;&amp;&amp;(f.pathname=f.pathname===&quot;/&quot;?i:xs([i,f.pathname])),Mn(f)}function cv(l,{relative:r}={}){let i=d.useContext(Ph);st(i!=null,&quot;`useViewTransitionState` must be used within `react-router-dom`&#039;s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?&quot;);let{basename:c}=ap(&quot;useViewTransitionState&quot;),m=Vn(l,{relative:r});if(!i.isTransitioning)return!1;let f=Vs(i.currentLocation.pathname,c)||i.currentLocation.pathname,x=Vs(i.nextLocation.pathname,c)||i.nextLocation.pathname;return gi(m.pathname,x)!=null||gi(m.pathname,f)!=null}const yu=&quot;planx_auth_token&quot;,yh={&quot;Admin PlanX&quot;:&quot;Administrateur&quot;};function ov(l){const r=[l.first_name,l.last_name].filter(Boolean).join(&quot; &quot;).trim();return r&amp;&amp;yh[r]?yh[r]:r||l.email}function uv(l){return l?l===&quot;PlanX&quot;?&quot;FasoChantier&quot;:l:null}function Qu(l){return l===&quot;true&quot;||l===&quot;1&quot;}const dv=&quot;https://api-demo.fasochantier.com/api&quot;.trim()||&quot;&quot;,mv=Qu(&quot;true&quot;),fv=Qu(&quot;true&quot;),xv=Qu(&quot;false&quot;);class me extends Error{constructor(r,i,c){super(r),this.status=i,this.payload=c,this.name=&quot;ApiError&quot;}}function lp(l){const r=l.startsWith(&quot;/&quot;)?l:`/${l}`;return`${dv.replace(/\/$/,&quot;&quot;)}${r}`}function ji(){return localStorage.getItem(yu)}function Xu(l){l?localStorage.setItem(yu,l):localStorage.removeItem(yu)}async function Nu(l){try{return await l.json()}catch{return null}}function np(l,r){if(l!=null&amp;&amp;l.message)return l.message;if(l!=null&amp;&amp;l.errors){const i=Object.values(l.errors).flat()[0];if(i)return i}return`Erreur API (${r})`}async function Gn(l,r={},i=!0){const{method:c=&quot;GET&quot;,body:m,auth:f=!0}=r,x=m instanceof FormData,b={Accept:&quot;application/json&quot;};if(m!==void 0&amp;&amp;!x&amp;&amp;(b[&quot;Content-Type&quot;]=&quot;application/json&quot;),f){const v=ji();v&amp;&amp;(b.Authorization=`Bearer ${v}`)}const p=await fetch(lp(l),{method:c,headers:b,body:m===void 0?void 0:x?m:JSON.stringify(m)});if(!p.ok){const v=await Nu(p);throw new me(np(v,p.status),p.status,v??void 0)}return i?await Nu(p):p}async function Ae(l,r=!1){return Gn(l,{auth:r})}async function Se(l,r,i=!0){return Gn(l,{method:&quot;POST&quot;,body:r,auth:i})}async function Ue(l,r={},i=!0){return Gn(l,{method:&quot;PATCH&quot;,body:r,auth:i})}async function hv(l,r=!0){return Gn(l,{method:&quot;DELETE&quot;,auth:r})}async function Zn(l,r,i=!0){return Gn(l,{method:&quot;POST&quot;,body:r,auth:i})}async function Hi(l,r=!0){const i=r?ji():null,c={};i&amp;&amp;(c.Authorization=`Bearer ${i}`);const m=await fetch(lp(l),{headers:c});if(!m.ok){const p=await Nu(m);throw new me(np(p,m.status),m.status,p??void 0)}const x=(m.headers.get(&quot;Content-Disposition&quot;)??&quot;&quot;).match(/filename=&quot;?([^&quot;]+)&quot;?/),b=(x==null?void 0:x[1])??&quot;document&quot;;return{blob:await m.blob(),filename:b}}async function pv(l,r){const c=await Se(&quot;/auth/login&quot;,{email:l,password:r},!1);return Xu(c.token),c}async function gv(){return Ae(&quot;/auth/me&quot;,!0)}async function bv(){try{return await Se(&quot;/auth/logout&quot;,{})}finally{Xu(null)}}const rp=d.createContext(null);function jv({children:l}){const[r,i]=d.useState(null),[c,m]=d.useState(()=&gt;ji()),[f,x]=d.useState(!0);d.useEffect(()=&gt;{let v=!1;async function j(){const y=ji();if(!y){x(!1);return}try{const{user:C}=await gv();v||(m(y),i(C))}catch{Xu(null),v||(m(null),i(null))}finally{v||x(!1)}}return j(),()=&gt;{v=!0}},[]);const b=d.useCallback(async(v,j)=&gt;{const y=await pv(v,j);m(y.token),i(y.user)},[]),p=d.useCallback(async()=&gt;{try{await bv()}catch{}m(null),i(null)},[]),g=d.useMemo(()=&gt;({user:r,token:c,isAuthenticated:!!(r&amp;&amp;c),isLoading:f,login:b,logout:p}),[r,c,f,b,p]);return t.jsx(rp.Provider,{value:g,children:l})}function Gs(){const l=d.useContext(rp);if(!l)throw new Error(&quot;useAuth doit être utilisé dans un AuthProvider.&quot;);return l}function vv(){const{isAuthenticated:l,isLoading:r}=Gs(),i=cs();return r?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-screen items-center justify-center bg-slate-50&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement…&quot;})}):l?t.jsx(Yn,{}):t.jsx(qi,{to:&quot;/login&quot;,replace:!0,state:{from:i}})}function yv(){const{isAuthenticated:l,isLoading:r}=Gs();return r?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-screen items-center justify-center bg-slate-50&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement…&quot;})}):l?t.jsx(qi,{to:&quot;/projects&quot;,replace:!0}):t.jsx(Yn,{})}async function Nh(){return Ae(&quot;/projects&quot;,!0)}async function _h(l){return Ae(`/projects/${l}/context`,!0)}const _u=&quot;planx_active_project_id&quot;,ip={preparation:&quot;Préparation&quot;,active:&quot;Actif&quot;,paused:&quot;En pause&quot;,suspended:&quot;Suspendu&quot;,completed:&quot;Terminé&quot;,archived:&quot;Archivé&quot;},cp=d.createContext(null);function Nv(){const l=localStorage.getItem(_u);if(!l)return null;const r=Number.parseInt(l,10);return Number.isNaN(r)?null:r}function _v({children:l}){const{isAuthenticated:r,isLoading:i}=Gs(),[c,m]=d.useState([]),[f,x]=d.useState(null),[b,p]=d.useState(!0),g=d.useCallback(()=&gt;{localStorage.removeItem(_u),x(null)},[]),v=d.useCallback(async()=&gt;{const A=await Nh();m(A.data)},[]),j=d.useCallback(async A=&gt;{const E=await _h(A);localStorage.setItem(_u,String(A)),x(E)},[]),y=d.useCallback(async()=&gt;{p(!0);try{const E=(await Nh()).data;m(E);const S=Nv();if(!S)return;if(!E.some(P=&gt;P.id===S)){g();return}const T=await _h(S);x(T)}catch{g(),m([])}finally{p(!1)}},[g,v]);d.useEffect(()=&gt;{if(!i){if(!r){m([]),x(null),p(!1);return}y()}},[i,y,r]);const C=d.useCallback(A=&gt;(f==null?void 0:f.permissions.includes(A))??!1,[f]),M=d.useMemo(()=&gt;({projects:c,activeProject:(f==null?void 0:f.project)??null,activeMembership:(f==null?void 0:f.membership)??null,permissions:(f==null?void 0:f.permissions)??[],isLoading:b,loadProjects:v,selectProject:j,clearActiveProject:g,hasPermission:C}),[c,f,b,v,j,g,C]);return t.jsx(cp.Provider,{value:M,children:l})}function Sv(){return t.jsx(_v,{children:t.jsx(Yn,{})})}function Ke(){const l=d.useContext(cp);if(!l)throw new Error(&quot;useProject doit être utilisé dans un ProjectProvider.&quot;);return l}function Sh(){const{activeProject:l,isLoading:r}=Ke();return r?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du chantier…&quot;})}):l?t.jsx(Yn,{}):t.jsx(qi,{to:&quot;/projects&quot;,replace:!0})}const wv={full:&quot;/brand/fasochantier-logo-full.png&quot;,mark:&quot;/brand/fasochantier-mark.png&quot;,monogram:&quot;/brand/fasochantier-monogram.png&quot;},Cv={full:120,mark:36,monogram:32};function Vi({variant:l=&quot;mark&quot;,size:r,className:i=&quot;&quot;,showText:c=!1}){const m=d.useMemo(()=&gt;l===&quot;full&quot;?[&quot;full&quot;,&quot;mark&quot;]:[l],[l]),[f,x]=d.useState(0),[b,p]=d.useState(!1),g=m[f]??l,v=r??Cv[g],j=wv[g];function y(){if(f&lt;m.length-1){x(C=&gt;C+1);return}p(!0)}return b?t.jsx(&quot;div&quot;,{className:`flex items-center justify-center rounded-lg border border-fc-border bg-fc-green-soft px-3 py-2 text-center ${i}`,style:{minHeight:v,minWidth:l===&quot;full&quot;?160:v},children:t.jsx(&quot;span&quot;,{className:&quot;text-sm font-bold text-fc-green-dark&quot;,children:&quot;FasoChantier&quot;})}):t.jsxs(&quot;div&quot;,{className:`flex flex-col items-center ${i}`,children:[t.jsx(&quot;img&quot;,{src:j,alt:&quot;FasoChantier&quot;,className:&quot;h-auto max-w-full object-contain&quot;,style:{width:g===&quot;full&quot;?&quot;auto&quot;:v,maxHeight:v,maxWidth:g===&quot;full&quot;?280:v},onError:y},j),c&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-2 text-center&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-lg font-bold text-fc-text&quot;,children:&quot;FasoChantier&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-fc-muted&quot;,children:&quot;Suivi BTP · Burkina Faso&quot;})]})]})}/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const op=(...l)=&gt;l.filter((r,i,c)=&gt;!!r&amp;&amp;r.trim()!==&quot;&quot;&amp;&amp;c.indexOf(r)===i).join(&quot; &quot;).trim();/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ev=l=&gt;l.replace(/([a-z0-9])([A-Z])/g,&quot;$1-$2&quot;).toLowerCase();/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Av=l=&gt;l.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,i,c)=&gt;c?c.toUpperCase():i.toLowerCase());/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wh=l=&gt;{const r=Av(l);return r.charAt(0).toUpperCase()+r.slice(1)};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var mu={xmlns:&quot;http://www.w3.org/2000/svg&quot;,width:24,height:24,viewBox:&quot;0 0 24 24&quot;,fill:&quot;none&quot;,stroke:&quot;currentColor&quot;,strokeWidth:2,strokeLinecap:&quot;round&quot;,strokeLinejoin:&quot;round&quot;};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const kv=l=&gt;{for(const r in l)if(r.startsWith(&quot;aria-&quot;)||r===&quot;role&quot;||r===&quot;title&quot;)return!0;return!1},Tv=d.createContext({}),zv=()=&gt;d.useContext(Tv),Mv=d.forwardRef(({color:l,size:r,strokeWidth:i,absoluteStrokeWidth:c,className:m=&quot;&quot;,children:f,iconNode:x,...b},p)=&gt;{const{size:g=24,strokeWidth:v=2,absoluteStrokeWidth:j=!1,color:y=&quot;currentColor&quot;,className:C=&quot;&quot;}=zv()??{},M=c??j?Number(i??v)*24/Number(r??g):i??v;return d.createElement(&quot;svg&quot;,{ref:p,...mu,width:r??g??mu.width,height:r??g??mu.height,stroke:l??y,strokeWidth:M,className:op(&quot;lucide&quot;,C,m),...!f&amp;&amp;!kv(b)&amp;&amp;{&quot;aria-hidden&quot;:&quot;true&quot;},...b},[...x.map(([A,E])=&gt;d.createElement(A,E)),...Array.isArray(f)?f:[f]])});/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ne=(l,r)=&gt;{const i=d.forwardRef(({className:c,...m},f)=&gt;d.createElement(Mv,{ref:f,iconNode:r,className:op(`lucide-${Ev(wh(l))}`,`lucide-${l}`,c),...m}));return i.displayName=wh(l),i};/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dv=[[&quot;path&quot;,{d:&quot;M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2&quot;,key:&quot;169zse&quot;}]],vi=Ne(&quot;activity&quot;,Dv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rv=[[&quot;rect&quot;,{width:&quot;20&quot;,height:&quot;5&quot;,x:&quot;2&quot;,y:&quot;3&quot;,rx:&quot;1&quot;,key:&quot;1wp1u1&quot;}],[&quot;path&quot;,{d:&quot;M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8&quot;,key:&quot;1s80jp&quot;}],[&quot;path&quot;,{d:&quot;M10 12h4&quot;,key:&quot;a56b0p&quot;}]],Ov=Ne(&quot;archive&quot;,Rv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Lv=[[&quot;path&quot;,{d:&quot;M12 5v14&quot;,key:&quot;s699le&quot;}],[&quot;path&quot;,{d:&quot;m19 12-7 7-7-7&quot;,key:&quot;1idqje&quot;}]],up=Ne(&quot;arrow-down&quot;,Lv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uv=[[&quot;path&quot;,{d:&quot;m12 19-7-7 7-7&quot;,key:&quot;1l729n&quot;}],[&quot;path&quot;,{d:&quot;M19 12H5&quot;,key:&quot;x3x0zl&quot;}]],wt=Ne(&quot;arrow-left&quot;,Uv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $v=[[&quot;path&quot;,{d:&quot;m5 12 7-7 7 7&quot;,key:&quot;hav0vg&quot;}],[&quot;path&quot;,{d:&quot;M12 19V5&quot;,key:&quot;x0mq9r&quot;}]],dp=Ne(&quot;arrow-up&quot;,$v);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const qv=[[&quot;path&quot;,{d:&quot;M10.268 21a2 2 0 0 0 3.464 0&quot;,key:&quot;vwvbt9&quot;}],[&quot;path&quot;,{d:&quot;M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326&quot;,key:&quot;11g9vi&quot;}]],mp=Ne(&quot;bell&quot;,qv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Bv=[[&quot;path&quot;,{d:&quot;M10 12h4&quot;,key:&quot;a56b0p&quot;}],[&quot;path&quot;,{d:&quot;M10 8h4&quot;,key:&quot;1sr2af&quot;}],[&quot;path&quot;,{d:&quot;M14 21v-3a2 2 0 0 0-4 0v3&quot;,key:&quot;1rgiei&quot;}],[&quot;path&quot;,{d:&quot;M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2&quot;,key:&quot;secmi2&quot;}],[&quot;path&quot;,{d:&quot;M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16&quot;,key:&quot;16ra0t&quot;}]],Pu=Ne(&quot;building-2&quot;,Bv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hv=[[&quot;path&quot;,{d:&quot;M8 2v4&quot;,key:&quot;1cmpym&quot;}],[&quot;path&quot;,{d:&quot;M16 2v4&quot;,key:&quot;4m81vk&quot;}],[&quot;rect&quot;,{width:&quot;18&quot;,height:&quot;18&quot;,x:&quot;3&quot;,y:&quot;4&quot;,rx:&quot;2&quot;,key:&quot;1hopcy&quot;}],[&quot;path&quot;,{d:&quot;M3 10h18&quot;,key:&quot;8toen8&quot;}]],Fu=Ne(&quot;calendar&quot;,Hv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vv=[[&quot;path&quot;,{d:&quot;M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z&quot;,key:&quot;18u6gg&quot;}],[&quot;circle&quot;,{cx:&quot;12&quot;,cy:&quot;13&quot;,r:&quot;3&quot;,key:&quot;1vg3eu&quot;}]],Yv=Ne(&quot;camera&quot;,Vv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Gv=[[&quot;path&quot;,{d:&quot;M3 3v16a2 2 0 0 0 2 2h16&quot;,key:&quot;c24i48&quot;}],[&quot;path&quot;,{d:&quot;M18 17V9&quot;,key:&quot;2bz60n&quot;}],[&quot;path&quot;,{d:&quot;M13 17V5&quot;,key:&quot;1frdt8&quot;}],[&quot;path&quot;,{d:&quot;M8 17v-3&quot;,key:&quot;17ska0&quot;}]],Zv=Ne(&quot;chart-column&quot;,Gv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Qv=[[&quot;path&quot;,{d:&quot;M20 6 9 17l-5-5&quot;,key:&quot;1gmf2c&quot;}]],Xv=Ne(&quot;check&quot;,Qv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Pv=[[&quot;path&quot;,{d:&quot;m6 9 6 6 6-6&quot;,key:&quot;qrunsl&quot;}]],fp=Ne(&quot;chevron-down&quot;,Pv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fv=[[&quot;path&quot;,{d:&quot;m9 18 6-6-6-6&quot;,key:&quot;mthhwq&quot;}]],Kv=Ne(&quot;chevron-right&quot;,Fv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jv=[[&quot;rect&quot;,{width:&quot;8&quot;,height:&quot;4&quot;,x:&quot;8&quot;,y:&quot;2&quot;,rx:&quot;1&quot;,ry:&quot;1&quot;,key:&quot;tgr4d6&quot;}],[&quot;path&quot;,{d:&quot;M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2&quot;,key:&quot;116196&quot;}],[&quot;path&quot;,{d:&quot;m9 14 2 2 4-4&quot;,key:&quot;df797q&quot;}]],Ku=Ne(&quot;clipboard-check&quot;,Jv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Iv=[[&quot;circle&quot;,{cx:&quot;12&quot;,cy:&quot;12&quot;,r:&quot;10&quot;,key:&quot;1mglay&quot;}],[&quot;path&quot;,{d:&quot;M12 6v6l4 2&quot;,key:&quot;mmk7yg&quot;}]],Wv=Ne(&quot;clock&quot;,Iv);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ey=[[&quot;rect&quot;,{width:&quot;14&quot;,height:&quot;14&quot;,x:&quot;8&quot;,y:&quot;8&quot;,rx:&quot;2&quot;,ry:&quot;2&quot;,key:&quot;17jyea&quot;}],[&quot;path&quot;,{d:&quot;M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2&quot;,key:&quot;zix9uf&quot;}]],xp=Ne(&quot;copy&quot;,ey);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ty=[[&quot;path&quot;,{d:&quot;M12 15V3&quot;,key:&quot;m9g1x1&quot;}],[&quot;path&quot;,{d:&quot;M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4&quot;,key:&quot;ih7n3h&quot;}],[&quot;path&quot;,{d:&quot;m7 10 5 5 5-5&quot;,key:&quot;brsn70&quot;}]],hp=Ne(&quot;download&quot;,ty);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sy=[[&quot;circle&quot;,{cx:&quot;12&quot;,cy:&quot;12&quot;,r:&quot;1&quot;,key:&quot;41hilf&quot;}],[&quot;circle&quot;,{cx:&quot;19&quot;,cy:&quot;12&quot;,r:&quot;1&quot;,key:&quot;1wjl8i&quot;}],[&quot;circle&quot;,{cx:&quot;5&quot;,cy:&quot;12&quot;,r:&quot;1&quot;,key:&quot;1pcz8c&quot;}]],ay=Ne(&quot;ellipsis&quot;,sy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ly=[[&quot;path&quot;,{d:&quot;M15 3h6v6&quot;,key:&quot;1q9fwt&quot;}],[&quot;path&quot;,{d:&quot;M10 14 21 3&quot;,key:&quot;gplh6r&quot;}],[&quot;path&quot;,{d:&quot;M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6&quot;,key:&quot;a6xqqp&quot;}]],Ju=Ne(&quot;external-link&quot;,ly);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const ny=[[&quot;path&quot;,{d:&quot;M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z&quot;,key:&quot;1oefj6&quot;}],[&quot;path&quot;,{d:&quot;M14 2v5a1 1 0 0 0 1 1h5&quot;,key:&quot;wfsgrz&quot;}],[&quot;path&quot;,{d:&quot;m9 15 2 2 4-4&quot;,key:&quot;1grp1n&quot;}]],ry=Ne(&quot;file-check&quot;,ny);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iy=[[&quot;path&quot;,{d:&quot;M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z&quot;,key:&quot;1oefj6&quot;}],[&quot;path&quot;,{d:&quot;M14 2v5a1 1 0 0 0 1 1h5&quot;,key:&quot;wfsgrz&quot;}],[&quot;path&quot;,{d:&quot;M10 9H8&quot;,key:&quot;b1mrlr&quot;}],[&quot;path&quot;,{d:&quot;M16 13H8&quot;,key:&quot;t4e002&quot;}],[&quot;path&quot;,{d:&quot;M16 17H8&quot;,key:&quot;z1uh3a&quot;}]],pp=Ne(&quot;file-text&quot;,iy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cy=[[&quot;path&quot;,{d:&quot;M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z&quot;,key:&quot;1kt360&quot;}],[&quot;path&quot;,{d:&quot;m9 13 2 2 4-4&quot;,key:&quot;6343dt&quot;}]],gp=Ne(&quot;folder-check&quot;,cy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oy=[[&quot;line&quot;,{x1:&quot;4&quot;,x2:&quot;20&quot;,y1:&quot;9&quot;,y2:&quot;9&quot;,key:&quot;4lhtct&quot;}],[&quot;line&quot;,{x1:&quot;4&quot;,x2:&quot;20&quot;,y1:&quot;15&quot;,y2:&quot;15&quot;,key:&quot;vyu0kd&quot;}],[&quot;line&quot;,{x1:&quot;10&quot;,x2:&quot;8&quot;,y1:&quot;3&quot;,y2:&quot;21&quot;,key:&quot;1ggp8o&quot;}],[&quot;line&quot;,{x1:&quot;16&quot;,x2:&quot;14&quot;,y1:&quot;3&quot;,y2:&quot;21&quot;,key:&quot;weycgp&quot;}]],bp=Ne(&quot;hash&quot;,oy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uy=[[&quot;path&quot;,{d:&quot;M16 5h6&quot;,key:&quot;1vod17&quot;}],[&quot;path&quot;,{d:&quot;M19 2v6&quot;,key:&quot;4bpg5p&quot;}],[&quot;path&quot;,{d:&quot;M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5&quot;,key:&quot;1ue2ih&quot;}],[&quot;path&quot;,{d:&quot;m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21&quot;,key:&quot;1xmnt7&quot;}],[&quot;circle&quot;,{cx:&quot;9&quot;,cy:&quot;9&quot;,r:&quot;2&quot;,key:&quot;af1f0g&quot;}]],dy=Ne(&quot;image-plus&quot;,uy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const my=[[&quot;path&quot;,{d:&quot;M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z&quot;,key:&quot;zw3jo&quot;}],[&quot;path&quot;,{d:&quot;M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12&quot;,key:&quot;1wduqc&quot;}],[&quot;path&quot;,{d:&quot;M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17&quot;,key:&quot;kqbvx6&quot;}]],jp=Ne(&quot;layers&quot;,my);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fy=[[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;9&quot;,x:&quot;3&quot;,y:&quot;3&quot;,rx:&quot;1&quot;,key:&quot;10lvy0&quot;}],[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;5&quot;,x:&quot;14&quot;,y:&quot;3&quot;,rx:&quot;1&quot;,key:&quot;16une8&quot;}],[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;9&quot;,x:&quot;14&quot;,y:&quot;12&quot;,rx:&quot;1&quot;,key:&quot;1hutg5&quot;}],[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;5&quot;,x:&quot;3&quot;,y:&quot;16&quot;,rx:&quot;1&quot;,key:&quot;ldoo1y&quot;}]],vp=Ne(&quot;layout-dashboard&quot;,fy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const xy=[[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;7&quot;,x:&quot;3&quot;,y:&quot;3&quot;,rx:&quot;1&quot;,key:&quot;1g98yp&quot;}],[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;7&quot;,x:&quot;14&quot;,y:&quot;3&quot;,rx:&quot;1&quot;,key:&quot;6d4xhi&quot;}],[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;7&quot;,x:&quot;14&quot;,y:&quot;14&quot;,rx:&quot;1&quot;,key:&quot;nxv5o0&quot;}],[&quot;rect&quot;,{width:&quot;7&quot;,height:&quot;7&quot;,x:&quot;3&quot;,y:&quot;14&quot;,rx:&quot;1&quot;,key:&quot;1bb6yr&quot;}]],yp=Ne(&quot;layout-grid&quot;,xy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hy=[[&quot;path&quot;,{d:&quot;M13 5h8&quot;,key:&quot;a7qcls&quot;}],[&quot;path&quot;,{d:&quot;M13 12h8&quot;,key:&quot;h98zly&quot;}],[&quot;path&quot;,{d:&quot;M13 19h8&quot;,key:&quot;c3s6r1&quot;}],[&quot;path&quot;,{d:&quot;m3 17 2 2 4-4&quot;,key:&quot;1jhpwq&quot;}],[&quot;rect&quot;,{x:&quot;3&quot;,y:&quot;4&quot;,width:&quot;6&quot;,height:&quot;6&quot;,rx:&quot;1&quot;,key:&quot;cif1o7&quot;}]],py=Ne(&quot;list-todo&quot;,hy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const gy=[[&quot;path&quot;,{d:&quot;M3 5h.01&quot;,key:&quot;18ugdj&quot;}],[&quot;path&quot;,{d:&quot;M3 12h.01&quot;,key:&quot;nlz23k&quot;}],[&quot;path&quot;,{d:&quot;M3 19h.01&quot;,key:&quot;noohij&quot;}],[&quot;path&quot;,{d:&quot;M8 5h13&quot;,key:&quot;1pao27&quot;}],[&quot;path&quot;,{d:&quot;M8 12h13&quot;,key:&quot;1za7za&quot;}],[&quot;path&quot;,{d:&quot;M8 19h13&quot;,key:&quot;m83p4d&quot;}]],Ua=Ne(&quot;list&quot;,gy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const by=[[&quot;path&quot;,{d:&quot;m16 17 5-5-5-5&quot;,key:&quot;1bji2h&quot;}],[&quot;path&quot;,{d:&quot;M21 12H9&quot;,key:&quot;dn1m92&quot;}],[&quot;path&quot;,{d:&quot;M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4&quot;,key:&quot;1uf3rs&quot;}]],jy=Ne(&quot;log-out&quot;,by);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vy=[[&quot;path&quot;,{d:&quot;M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0&quot;,key:&quot;1r0f0z&quot;}],[&quot;circle&quot;,{cx:&quot;12&quot;,cy:&quot;10&quot;,r:&quot;3&quot;,key:&quot;ilqhr7&quot;}]],Qn=Ne(&quot;map-pin&quot;,vy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const yy=[[&quot;path&quot;,{d:&quot;M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z&quot;,key:&quot;169xi5&quot;}],[&quot;path&quot;,{d:&quot;M15 5.764v15&quot;,key:&quot;1pn4in&quot;}],[&quot;path&quot;,{d:&quot;M9 3.236v15&quot;,key:&quot;1uimfh&quot;}]],Ny=Ne(&quot;map&quot;,yy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const _y=[[&quot;path&quot;,{d:&quot;M5 12h14&quot;,key:&quot;1ays0h&quot;}]],Sy=Ne(&quot;minus&quot;,_y);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const wy=[[&quot;path&quot;,{d:&quot;m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551&quot;,key:&quot;1miecu&quot;}]],Np=Ne(&quot;paperclip&quot;,wy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Cy=[[&quot;path&quot;,{d:&quot;M5 12h14&quot;,key:&quot;1ays0h&quot;}],[&quot;path&quot;,{d:&quot;M12 5v14&quot;,key:&quot;s699le&quot;}]],Ey=Ne(&quot;plus&quot;,Cy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ay=[[&quot;path&quot;,{d:&quot;M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8&quot;,key:&quot;v9h5vc&quot;}],[&quot;path&quot;,{d:&quot;M21 3v5h-5&quot;,key:&quot;1q7to0&quot;}],[&quot;path&quot;,{d:&quot;M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16&quot;,key:&quot;3uifl3&quot;}],[&quot;path&quot;,{d:&quot;M8 16H3v5&quot;,key:&quot;1cv678&quot;}]],ky=Ne(&quot;refresh-cw&quot;,Ay);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Ty=[[&quot;path&quot;,{d:&quot;m21 21-4.34-4.34&quot;,key:&quot;14j7rj&quot;}],[&quot;circle&quot;,{cx:&quot;11&quot;,cy:&quot;11&quot;,r:&quot;8&quot;,key:&quot;4ej97u&quot;}]],hs=Ne(&quot;search&quot;,Ty);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const zy=[[&quot;path&quot;,{d:&quot;M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915&quot;,key:&quot;1i5ecw&quot;}],[&quot;circle&quot;,{cx:&quot;12&quot;,cy:&quot;12&quot;,r:&quot;3&quot;,key:&quot;1v7zrd&quot;}]],My=Ne(&quot;settings&quot;,zy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dy=[[&quot;path&quot;,{d:&quot;M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344&quot;,key:&quot;2acyp4&quot;}],[&quot;path&quot;,{d:&quot;m9 11 3 3L22 4&quot;,key:&quot;1pflzl&quot;}]],Ry=Ne(&quot;square-check-big&quot;,Dy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Oy=[[&quot;circle&quot;,{cx:&quot;9&quot;,cy:&quot;12&quot;,r:&quot;3&quot;,key:&quot;u3jwor&quot;}],[&quot;rect&quot;,{width:&quot;20&quot;,height:&quot;14&quot;,x:&quot;2&quot;,y:&quot;5&quot;,rx:&quot;7&quot;,key:&quot;g7kal2&quot;}]],Ly=Ne(&quot;toggle-left&quot;,Oy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Uy=[[&quot;path&quot;,{d:&quot;M10 11v6&quot;,key:&quot;nco0om&quot;}],[&quot;path&quot;,{d:&quot;M14 11v6&quot;,key:&quot;outv1u&quot;}],[&quot;path&quot;,{d:&quot;M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6&quot;,key:&quot;miytrc&quot;}],[&quot;path&quot;,{d:&quot;M3 6h18&quot;,key:&quot;d0wm0j&quot;}],[&quot;path&quot;,{d:&quot;M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2&quot;,key:&quot;e791ji&quot;}]],Yi=Ne(&quot;trash-2&quot;,Uy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const $y=[[&quot;path&quot;,{d:&quot;M16 7h6v6&quot;,key:&quot;box55l&quot;}],[&quot;path&quot;,{d:&quot;m22 7-8.5 8.5-5-5L2 17&quot;,key:&quot;1t1m79&quot;}]],qy=Ne(&quot;trending-up&quot;,$y);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const By=[[&quot;path&quot;,{d:&quot;m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3&quot;,key:&quot;wmoenq&quot;}],[&quot;path&quot;,{d:&quot;M12 9v4&quot;,key:&quot;juzpu7&quot;}],[&quot;path&quot;,{d:&quot;M12 17h.01&quot;,key:&quot;p32p05&quot;}]],Hy=Ne(&quot;triangle-alert&quot;,By);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Vy=[[&quot;path&quot;,{d:&quot;M12 4v16&quot;,key:&quot;1654pz&quot;}],[&quot;path&quot;,{d:&quot;M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2&quot;,key:&quot;e0r10z&quot;}],[&quot;path&quot;,{d:&quot;M9 20h6&quot;,key:&quot;s66wpe&quot;}]],Su=Ne(&quot;type&quot;,Vy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Yy=[[&quot;path&quot;,{d:&quot;M12 3v12&quot;,key:&quot;1x0j5s&quot;}],[&quot;path&quot;,{d:&quot;m17 8-5-5-5 5&quot;,key:&quot;7q97r8&quot;}],[&quot;path&quot;,{d:&quot;M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4&quot;,key:&quot;ih7n3h&quot;}]],Gy=Ne(&quot;upload&quot;,Yy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Zy=[[&quot;path&quot;,{d:&quot;M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2&quot;,key:&quot;1yyitq&quot;}],[&quot;path&quot;,{d:&quot;M16 3.128a4 4 0 0 1 0 7.744&quot;,key:&quot;16gr8j&quot;}],[&quot;path&quot;,{d:&quot;M22 21v-2a4 4 0 0 0-3-3.87&quot;,key:&quot;kshegd&quot;}],[&quot;circle&quot;,{cx:&quot;9&quot;,cy:&quot;7&quot;,r:&quot;4&quot;,key:&quot;nufk8&quot;}]],Qy=Ne(&quot;users&quot;,Zy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Xy=[[&quot;path&quot;,{d:&quot;M12 20h.01&quot;,key:&quot;zekei9&quot;}],[&quot;path&quot;,{d:&quot;M8.5 16.429a5 5 0 0 1 7 0&quot;,key:&quot;1bycff&quot;}],[&quot;path&quot;,{d:&quot;M5 12.859a10 10 0 0 1 5.17-2.69&quot;,key:&quot;1dl1wf&quot;}],[&quot;path&quot;,{d:&quot;M19 12.859a10 10 0 0 0-2.007-1.523&quot;,key:&quot;4k23kn&quot;}],[&quot;path&quot;,{d:&quot;M2 8.82a15 15 0 0 1 4.177-2.643&quot;,key:&quot;1grhjp&quot;}],[&quot;path&quot;,{d:&quot;M22 8.82a15 15 0 0 0-11.288-3.764&quot;,key:&quot;z3jwby&quot;}],[&quot;path&quot;,{d:&quot;m2 2 20 20&quot;,key:&quot;1ooewy&quot;}]],_p=Ne(&quot;wifi-off&quot;,Xy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Py=[[&quot;path&quot;,{d:&quot;M12 20h.01&quot;,key:&quot;zekei9&quot;}],[&quot;path&quot;,{d:&quot;M2 8.82a15 15 0 0 1 20 0&quot;,key:&quot;dnpr2z&quot;}],[&quot;path&quot;,{d:&quot;M5 12.859a10 10 0 0 1 14 0&quot;,key:&quot;1x1e6c&quot;}],[&quot;path&quot;,{d:&quot;M8.5 16.429a5 5 0 0 1 7 0&quot;,key:&quot;1bycff&quot;}]],Sp=Ne(&quot;wifi&quot;,Py);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Fy=[[&quot;path&quot;,{d:&quot;M18 6 6 18&quot;,key:&quot;1bl5f8&quot;}],[&quot;path&quot;,{d:&quot;m6 6 12 12&quot;,key:&quot;d8bk6v&quot;}]],Ky=Ne(&quot;x&quot;,Fy);/**
 * @license lucide-react v1.16.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Jy=[[&quot;path&quot;,{d:&quot;M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z&quot;,key:&quot;1xq2db&quot;}]],Iy=Ne(&quot;zap&quot;,Jy),wp=[{label:&quot;Tableau de bord&quot;,path:&quot;/dashboard&quot;,icon:vp},{label:&quot;Chantiers&quot;,path:&quot;/projects&quot;,icon:Pu},{label:&quot;Lots&quot;,path:&quot;/lots&quot;,icon:jp},{label:&quot;Planning&quot;,path:&quot;/tasks&quot;,icon:yp},{label:&quot;Points chantier&quot;,path:&quot;/points&quot;,icon:Qn},{label:&quot;Plans / Zones&quot;,path:&quot;/locations&quot;,icon:Ny},{label:&quot;Documents&quot;,path:&quot;/documents&quot;,icon:pp},{label:&quot;DOE / Clôture&quot;,path:&quot;/doe&quot;,icon:gp},{label:&quot;Réunions&quot;,path:&quot;/meetings&quot;,icon:Qy},{label:&quot;Actions&quot;,path:&quot;/actions&quot;,icon:Iy},{label:&quot;Rapports&quot;,path:&quot;/reports&quot;,icon:Zv},{label:&quot;Approbations&quot;,path:&quot;/approvals&quot;,icon:Ku},{label:&quot;Notifications&quot;,path:&quot;/notifications&quot;,icon:mp},{label:&quot;Administration&quot;,path:&quot;/admin&quot;,icon:My}],Wy=[{label:&quot;Accueil&quot;,path:&quot;/dashboard&quot;,icon:vp},{label:&quot;Tâches&quot;,path:&quot;/tasks&quot;,icon:py},{label:&quot;Points&quot;,path:&quot;/points&quot;,icon:Qn},{label:&quot;Docs&quot;,path:&quot;/documents&quot;,icon:pp},{label:&quot;Plus&quot;,path:&quot;/more&quot;,icon:ay}];function eN(){return t.jsxs(&quot;aside&quot;,{className:&quot;hidden h-full w-64 shrink-0 flex-col border-r border-fc-border bg-fc-surface lg:flex&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-3 border-b border-fc-border px-5 py-5&quot;,children:[t.jsx(Vi,{variant:&quot;mark&quot;,size:36,className:&quot;shrink-0&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-lg font-bold text-fc-text&quot;,children:&quot;FasoChantier&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-fc-muted&quot;,children:&quot;Suivi BTP · Burkina Faso&quot;})]})]}),t.jsx(&quot;nav&quot;,{className:&quot;flex-1 overflow-y-auto px-3 py-4&quot;,&quot;aria-label&quot;:&quot;Navigation principale&quot;,children:t.jsx(&quot;ul&quot;,{className:&quot;space-y-0.5&quot;,children:wp.map(l=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Zu,{to:l.path,className:({isActive:r})=&gt;`flex items-center gap-3 rounded-lg px-3 py-2.5 text-sm font-medium transition ${r?&quot;bg-fc-green-soft text-fc-green-dark&quot;:&quot;text-fc-muted hover:bg-fc-green-soft/60 hover:text-fc-text&quot;}`,children:({isActive:r})=&gt;t.jsxs(t.Fragment,{children:[t.jsx(l.icon,{className:`h-5 w-5 shrink-0 ${r?&quot;text-fc-green&quot;:&quot;&quot;}`,&quot;aria-hidden&quot;:!0}),l.label]})})},l.path))})})]})}function tN({placeholder:l=&quot;Rechercher…&quot;,className:r=&quot;&quot;}){return t.jsxs(&quot;label&quot;,{className:`flex items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm ${r}`,children:[t.jsx(hs,{className:&quot;h-4 w-4 shrink-0 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:l,className:&quot;w-full min-w-0 bg-transparent text-sm text-slate-800 placeholder:text-slate-400 focus:outline-none&quot;,readOnly:!0,&quot;aria-label&quot;:l})]})}const sN={primary:&quot;bg-fc-green text-white hover:bg-fc-green-dark focus-visible:ring-fc-green/40&quot;,secondary:&quot;bg-white text-fc-green-dark border border-fc-green hover:bg-fc-green-soft focus-visible:ring-fc-green/30&quot;,danger:&quot;bg-fc-red text-white hover:bg-fc-red-dark focus-visible:ring-fc-red/40&quot;,warning:&quot;bg-fc-gold-soft text-fc-gold-dark border border-fc-gold/60 hover:bg-fc-gold/30 focus-visible:ring-fc-gold/40&quot;,ghost:&quot;bg-transparent text-fc-muted hover:bg-fc-green-soft hover:text-fc-green-dark focus-visible:ring-fc-border&quot;},aN={sm:&quot;px-3 py-1.5 text-xs&quot;,md:&quot;px-4 py-2 text-sm&quot;,lg:&quot;px-5 py-2.5 text-base&quot;};function $({variant:l=&quot;primary&quot;,size:r=&quot;md&quot;,className:i=&quot;&quot;,children:c,type:m=&quot;button&quot;,...f}){return t.jsx(&quot;button&quot;,{type:m,className:`inline-flex items-center justify-center gap-2 rounded-lg font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 ${sN[l]} ${aN[r]} ${i}`,...f,children:c})}function Cp({compact:l=!1,apiSlot:r}){const{user:i,logout:c}=Gs(),{activeMembership:m,clearActiveProject:f}=Ke(),x=ys();if(!i)return null;const b=(m==null?void 0:m.role_code)??i.role_code??&quot;—&quot;;async function p(){f(),await c(),x(&quot;/login&quot;,{replace:!0})}return t.jsxs(&quot;div&quot;,{className:`flex items-center gap-2 ${l?&quot;shrink-0&quot;:&quot;gap-3&quot;}`,children:[xv&amp;&amp;r,t.jsxs(&quot;div&quot;,{className:l?&quot;hidden min-w-0 sm:block&quot;:&quot;text-right&quot;,children:[t.jsx(&quot;p&quot;,{className:`font-semibold text-slate-800 ${l?&quot;truncate text-xs&quot;:&quot;text-sm&quot;}`,children:ov(i)}),t.jsx(&quot;p&quot;,{className:`text-slate-500 ${l?&quot;text-[10px]&quot;:&quot;text-xs&quot;}`,children:b})]}),t.jsxs($,{variant:l?&quot;ghost&quot;:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void p(),&quot;aria-label&quot;:&quot;Déconnexion&quot;,className:l?&quot;px-2&quot;:&quot;&quot;,children:[t.jsx(jy,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),!l&amp;&amp;t.jsx(&quot;span&quot;,{children:&quot;Déconnexion&quot;})]})]})}function Ep({compact:l=!1}){const{activeProject:r}=Ke(),i=(r==null?void 0:r.name)??&quot;Aucun chantier actif&quot;,c=r!=null&amp;&amp;r.location&amp;&amp;(r!=null&amp;&amp;r.country)?`${r.location}, ${r.country}`:(r==null?void 0:r.location)??(r==null?void 0:r.country)??null;return l?t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;truncate text-sm font-bold text-fc-text&quot;,children:&quot;FasoChantier&quot;}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-xs text-slate-500&quot;,children:i})]}):t.jsxs(&quot;div&quot;,{className:&quot;hidden text-right xl:block&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:&quot;Chantier actif&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:i}),c&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:c}),t.jsx(he,{to:&quot;/projects&quot;,className:&quot;text-xs font-medium text-planx-orange hover:underline&quot;,children:&quot;Changer&quot;})]})}function lN(l){return&quot;&quot;}async function nN(l,r){return Ae(`/projects/${l}/notifications${lN()}`,!0)}async function rN(l){return Ae(`/projects/${l}/notifications/unread-count`,!0)}async function iN(l,r){return Ue(`/projects/${l}/notifications/${r}/read`,{},!0)}async function cN(l){return Ue(`/projects/${l}/notifications/read-all`,{},!0)}async function oN(l,r){return Ue(`/projects/${l}/notifications/${r}/archive`,{},!0)}const Ap=d.createContext(null);function uN({children:l}){const{activeProject:r}=Ke(),[i,c]=d.useState(0),[m,f]=d.useState(!1),x=d.useCallback(async()=&gt;{if(!r){c(0);return}f(!0);try{const p=await rN(r.id);c(p.unread_count)}catch{c(0)}finally{f(!1)}},[r]);d.useEffect(()=&gt;{x()},[x]);const b=d.useMemo(()=&gt;({unreadCount:i,isLoading:m,refreshUnreadCount:x}),[i,m,x]);return t.jsx(Ap.Provider,{value:b,children:l})}function kp(){const l=d.useContext(Ap);return l||{unreadCount:0,isLoading:!1,refreshUnreadCount:async()=&gt;{}}}function Tp({compact:l=!1}){const{unreadCount:r}=kp();return t.jsxs(he,{to:&quot;/notifications&quot;,className:`relative inline-flex items-center justify-center rounded-lg text-slate-600 transition hover:bg-slate-100 hover:text-planx-orange ${l?&quot;h-8 w-8&quot;:&quot;h-9 w-9&quot;}`,&quot;aria-label&quot;:`Notifications${r&gt;0?`, ${r} non lues`:&quot;&quot;}`,children:[t.jsx(mp,{className:l?&quot;h-4 w-4&quot;:&quot;h-5 w-5&quot;,&quot;aria-hidden&quot;:!0}),r&gt;0&amp;&amp;t.jsx(&quot;span&quot;,{className:`absolute flex items-center justify-center rounded-full bg-planx-orange font-bold text-white ${l?&quot;-right-0.5 -top-0.5 h-4 min-w-4 px-0.5 text-[9px]&quot;:&quot;-right-1 -top-1 h-5 min-w-5 px-1 text-[10px]&quot;}`,children:r&gt;99?&quot;99+&quot;:r})]})}async function zp(){return Ae(&quot;/health&quot;)}function dN(){const[l,r]=d.useState(&quot;idle&quot;);async function i(){r(&quot;loading&quot;);try{const c=await zp();r(c.status===&quot;ok&quot;?&quot;ok&quot;:&quot;error&quot;)}catch{r(&quot;error&quot;)}}return t.jsxs(t.Fragment,{children:[t.jsxs($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void i(),disabled:l===&quot;loading&quot;,children:[l===&quot;loading&quot;?t.jsx(vi,{className:&quot;h-4 w-4 animate-pulse&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;ok&quot;?t.jsx(Sp,{className:&quot;h-4 w-4 text-emerald-600&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;error&quot;?t.jsx(_p,{className:&quot;h-4 w-4 text-rose-600&quot;,&quot;aria-hidden&quot;:!0}):t.jsx(vi,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Tester API&quot;]}),l===&quot;ok&quot;&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-xs font-medium text-emerald-700&quot;,role:&quot;status&quot;,children:&quot;API connectée&quot;}),l===&quot;error&quot;&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-xs font-medium text-rose-700&quot;,role:&quot;status&quot;,children:&quot;API indisponible&quot;})]})}function mN(){return t.jsx(&quot;header&quot;,{className:&quot;hidden border-b border-slate-200 bg-white px-6 py-4 lg:block&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex items-center justify-between gap-4&quot;,children:[t.jsx(&quot;div&quot;,{className:&quot;min-w-0 flex-1 max-w-md&quot;,children:t.jsx(tN,{placeholder:&quot;Rechercher dans le chantier…&quot;})}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-3&quot;,children:[t.jsx(Ep,{}),t.jsx(Tp,{}),t.jsx(Cp,{apiSlot:t.jsx(dN,{})})]})]})})}function fN(){const[l,r]=d.useState(&quot;idle&quot;);async function i(){r(&quot;loading&quot;);try{const c=await zp();r(c.status===&quot;ok&quot;?&quot;ok&quot;:&quot;error&quot;)}catch{r(&quot;error&quot;)}}return t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-1&quot;,children:[l===&quot;ok&quot;&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-[10px] font-medium text-fc-green-dark&quot;,children:&quot;OK&quot;}),l===&quot;error&quot;&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-[10px] font-medium text-fc-red&quot;,children:&quot;KO&quot;}),t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;void i(),&quot;aria-label&quot;:&quot;Tester API&quot;,className:&quot;px-2&quot;,children:l===&quot;loading&quot;?t.jsx(vi,{className:&quot;h-4 w-4 animate-pulse&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;ok&quot;?t.jsx(Sp,{className:&quot;h-4 w-4 text-fc-green&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;error&quot;?t.jsx(_p,{className:&quot;h-4 w-4 text-fc-red&quot;,&quot;aria-hidden&quot;:!0}):t.jsx(vi,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0})})]})}function xN(){return t.jsx(&quot;header&quot;,{className:&quot;sticky top-0 z-20 border-b border-fc-border bg-fc-surface px-4 py-3 lg:hidden&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex items-center justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex min-w-0 flex-1 items-center gap-2&quot;,children:[t.jsx(Vi,{variant:&quot;mark&quot;,size:30,className:&quot;shrink-0&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;truncate text-xs font-bold text-fc-text&quot;,children:&quot;FasoChantier&quot;}),t.jsx(Ep,{compact:!0})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex shrink-0 items-center gap-1&quot;,children:[t.jsx(Tp,{compact:!0}),t.jsx(he,{to:&quot;/projects&quot;,className:&quot;rounded-lg px-2 py-1 text-[10px] font-medium text-fc-green hover:bg-fc-green-soft&quot;,children:&quot;Changer&quot;}),t.jsx(Cp,{compact:!0,apiSlot:t.jsx(fN,{})})]})]})})}function hN(){return t.jsx(&quot;nav&quot;,{className:&quot;fixed bottom-0 left-0 right-0 z-20 border-t border-fc-border bg-fc-surface px-2 pb-[env(safe-area-inset-bottom)] lg:hidden&quot;,&quot;aria-label&quot;:&quot;Navigation mobile&quot;,children:t.jsx(&quot;ul&quot;,{className:&quot;flex items-stretch justify-around&quot;,children:Wy.map(l=&gt;t.jsx(&quot;li&quot;,{className:&quot;flex-1&quot;,children:t.jsxs(Zu,{to:l.path,className:({isActive:r})=&gt;`flex flex-col items-center gap-0.5 px-1 py-2 text-[10px] font-medium transition ${r?&quot;text-fc-green&quot;:&quot;text-fc-muted&quot;}`,children:[t.jsx(l.icon,{className:&quot;h-5 w-5&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;span&quot;,{children:l.label})]})},l.path))})})}function wu({className:l=&quot;&quot;,compact:r=!1}){return mv?t.jsx(&quot;div&quot;,{className:`flex items-center justify-center border-b border-fc-gold/40 bg-fc-gold-soft/90 text-fc-gold-dark ${l}`,role:&quot;status&quot;,&quot;aria-label&quot;:&quot;Version démo avec données fictives&quot;,children:t.jsx(&quot;p&quot;,{className:r?&quot;px-2 py-1 text-center text-[10px] font-semibold leading-tight sm:text-[11px]&quot;:&quot;px-3 py-1.5 text-center text-[11px] font-semibold sm:text-xs&quot;,children:&quot;Version démo — données fictives&quot;})}):null}function pN(){return t.jsx(uN,{children:t.jsxs(&quot;div&quot;,{className:&quot;flex min-h-screen bg-fc-bg text-fc-text&quot;,children:[t.jsx(eN,{}),t.jsxs(&quot;div&quot;,{className:&quot;flex min-h-screen min-w-0 flex-1 flex-col&quot;,children:[t.jsx(wu,{className:&quot;lg:hidden&quot;,compact:!0}),t.jsx(xN,{}),t.jsx(mN,{}),t.jsx(wu,{className:&quot;hidden lg:flex&quot;}),t.jsx(&quot;main&quot;,{className:&quot;flex-1 overflow-y-auto p-4 pb-24 lg:p-6 lg:pb-6&quot;,children:t.jsx(Yn,{})}),t.jsx(hN,{})]})]})})}const gN=[{email:&quot;admin@planx.test&quot;,password:&quot;password&quot;,role:&quot;AC&quot;,label:&quot;Administrateur&quot;},{email:&quot;cp@planx.test&quot;,password:&quot;password&quot;,role:&quot;CP&quot;,label:&quot;Chef de projet&quot;},{email:&quot;moe@planx.test&quot;,password:&quot;password&quot;,role:&quot;MOE&quot;,label:&quot;Maîtrise d’œuvre&quot;},{email:&quot;bc@planx.test&quot;,password:&quot;password&quot;,role:&quot;BC&quot;,label:&quot;Bureau de contrôle&quot;},{email:&quot;entreprise@planx.test&quot;,password:&quot;password&quot;,role:&quot;ENT&quot;,label:&quot;Entreprise&quot;},{email:&quot;lecteur@planx.test&quot;,password:&quot;password&quot;,role:&quot;LEC&quot;,label:&quot;Lecteur&quot;},{email:&quot;disabled@planx.test&quot;,password:&quot;password&quot;,role:&quot;ENT&quot;,label:&quot;Compte désactivé&quot;,hint:&quot;Connexion refusée attendue&quot;}],Mp=&quot;/brand/login-background-construction.jpg&quot;;function bN(){const[l,r]=d.useState(&quot;pending&quot;);return d.useEffect(()=&gt;{const i=new Image;i.onload=()=&gt;r(&quot;loaded&quot;),i.onerror=()=&gt;r(&quot;unavailable&quot;),i.src=Mp},[]),l}function jN(){return t.jsx(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-0 bg-gradient-to-br from-fc-green-soft via-white to-fc-gold-soft&quot;,&quot;aria-hidden&quot;:!0})}function vN(){return t.jsx(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-0 overflow-hidden&quot;,&quot;aria-hidden&quot;:!0,children:t.jsx(&quot;img&quot;,{src:Mp,alt:&quot;&quot;,className:&quot;absolute inset-0 h-full w-full scale-[1.04] object-cover object-center blur-[3px] brightness-[1.02] contrast-[0.9] saturate-[0.78] max-sm:blur-[4px] max-sm:saturate-[0.72] sm:blur-[4px]&quot;})})}function yN({withPhoto:l}){return l?t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-0 bg-gradient-to-br from-white/78 via-white/70 to-fc-green-soft/58 max-sm:from-white/86 max-sm:via-white/78 max-sm:to-fc-gold-soft/62 sm:from-white/76 sm:via-white/68 sm:to-fc-gold-soft/52&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_90%_75%_at_50%_42%,rgba(255,255,255,0.62)_0%,rgba(255,255,255,0.28)_50%,transparent_100%)] max-sm:bg-[radial-gradient(ellipse_95%_80%_at_50%_38%,rgba(255,255,255,0.72)_0%,rgba(255,255,255,0.35)_55%,transparent_100%)]&quot;,&quot;aria-hidden&quot;:!0})]}):null}function NN(){const r=bN()===&quot;loaded&quot;;return t.jsxs(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-0 z-0&quot;,&quot;aria-hidden&quot;:!0,children:[!r&amp;&amp;t.jsx(jN,{}),r&amp;&amp;t.jsx(vN,{}),t.jsx(yN,{withPhoto:r}),!r&amp;&amp;t.jsx(_N,{})]})}function _N(){return t.jsxs(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-0 overflow-hidden&quot;,&quot;aria-hidden&quot;:!0,children:[t.jsx(&quot;div&quot;,{className:&quot;absolute -left-24 top-16 h-72 w-72 rounded-full bg-fc-green/10 blur-3xl&quot;}),t.jsx(&quot;div&quot;,{className:&quot;absolute -right-16 bottom-24 h-80 w-80 rounded-full bg-fc-gold/20 blur-3xl&quot;}),t.jsx(&quot;div&quot;,{className:&quot;absolute inset-0 opacity-[0.35]&quot;,style:{backgroundImage:`
            linear-gradient(to right, rgba(0, 154, 68, 0.06) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(0, 154, 68, 0.06) 1px, transparent 1px)
          `,backgroundSize:&quot;48px 48px&quot;}}),t.jsx(&quot;svg&quot;,{className:&quot;absolute bottom-0 left-0 right-0 h-32 w-full text-fc-green/10 sm:h-40&quot;,viewBox:&quot;0 0 1440 120&quot;,preserveAspectRatio:&quot;none&quot;,fill:&quot;currentColor&quot;,children:t.jsx(&quot;path&quot;,{d:&quot;M0 80 L120 40 L280 95 L420 25 L600 70 L780 15 L960 60 L1120 35 L1320 75 L1440 50 L1440 120 L0 120 Z&quot;})}),t.jsx(&quot;div&quot;,{className:&quot;absolute right-[8%] top-[18%] hidden h-14 w-14 rotate-12 border-2 border-dashed border-fc-green/20 lg:block&quot;}),t.jsx(&quot;div&quot;,{className:&quot;absolute left-[10%] top-[42%] hidden h-10 w-24 rounded-sm border border-fc-gold/30 bg-fc-gold/5 lg:block&quot;})]})}function SN(){const{login:l}=Gs(),r=ys(),[i,c]=d.useState(&quot;&quot;),[m,f]=d.useState(&quot;&quot;),[x,b]=d.useState(null),[p,g]=d.useState(!1),[v,j]=d.useState(!1);async function y(M){M.preventDefault(),b(null),g(!0);try{await l(i.trim(),m),r(&quot;/projects&quot;,{replace:!0})}catch(A){A instanceof me?b(A.message):b(&quot;Une erreur est survenue. Veuillez réessayer.&quot;)}finally{g(!1)}}async function C(M){c(M.email),f(M.password),b(null),g(!0);try{await l(M.email,M.password),r(&quot;/projects&quot;,{replace:!0})}catch(A){A instanceof me?b(A.message):b(&quot;Une erreur est survenue. Veuillez réessayer.&quot;)}finally{g(!1)}}return t.jsxs(&quot;div&quot;,{className:&quot;relative flex min-h-screen flex-col overflow-x-hidden overflow-y-auto px-4 py-6 sm:px-6 sm:py-8 lg:py-12&quot;,children:[t.jsx(NN,{}),t.jsx(wu,{className:&quot;relative z-20 shrink-0&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;relative z-10 mx-auto flex w-full max-w-md flex-1 flex-col justify-center py-4 sm:max-w-lg lg:max-w-xl&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;overflow-hidden rounded-2xl border border-fc-border/70 bg-white shadow-[0_12px_48px_-16px_rgba(15,23,42,0.14),0_4px_20px_-8px_rgba(4,92,42,0.08)] ring-1 ring-black/[0.04]&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex h-1 w-full&quot;,&quot;aria-hidden&quot;:!0,children:[t.jsx(&quot;span&quot;,{className:&quot;flex-1 bg-fc-red&quot;}),t.jsx(&quot;span&quot;,{className:&quot;flex-1 bg-fc-gold&quot;}),t.jsx(&quot;span&quot;,{className:&quot;flex-1 bg-fc-green&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;px-6 py-7 sm:px-8 sm:py-9 lg:px-10 lg:py-10&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;mb-7 flex flex-col items-center text-center sm:mb-8&quot;,children:[t.jsx(Vi,{variant:&quot;full&quot;,size:120,className:&quot;mx-auto w-full max-w-[108px] sm:max-w-[128px] lg:max-w-[140px]&quot;}),t.jsx(&quot;h1&quot;,{className:&quot;mt-5 text-xl font-bold tracking-tight text-fc-text sm:mt-6 sm:text-2xl&quot;,children:&quot;Connexion à FasoChantier&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-fc-muted&quot;,children:&quot;Suivi BTP · Burkina Faso&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs leading-relaxed text-fc-muted&quot;,children:&quot;Accédez à vos chantiers autorisés&quot;})]}),t.jsxs(&quot;form&quot;,{onSubmit:M=&gt;void y(M),className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;label&quot;,{htmlFor:&quot;email&quot;,className:&quot;mb-1 block text-sm font-medium text-fc-text&quot;,children:&quot;Adresse e-mail&quot;}),t.jsx(&quot;input&quot;,{id:&quot;email&quot;,type:&quot;email&quot;,autoComplete:&quot;email&quot;,required:!0,value:i,onChange:M=&gt;c(M.target.value),className:&quot;w-full rounded-lg border border-fc-border bg-white px-3 py-2.5 text-sm text-fc-text shadow-sm transition-colors focus:border-fc-green focus:outline-none focus:ring-2 focus:ring-fc-green/30 focus-visible:ring-fc-green/30&quot;,placeholder:&quot;vous@exemple.fr&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;label&quot;,{htmlFor:&quot;password&quot;,className:&quot;mb-1 block text-sm font-medium text-fc-text&quot;,children:&quot;Mot de passe&quot;}),t.jsx(&quot;input&quot;,{id:&quot;password&quot;,type:&quot;password&quot;,autoComplete:&quot;current-password&quot;,required:!0,value:m,onChange:M=&gt;f(M.target.value),className:&quot;w-full rounded-lg border border-fc-border bg-white px-3 py-2.5 text-sm text-fc-text shadow-sm transition-colors focus:border-fc-green focus:outline-none focus:ring-2 focus:ring-fc-green/30 focus-visible:ring-fc-green/30&quot;,placeholder:&quot;••••••••&quot;})]}),t.jsx(&quot;p&quot;,{className:&quot;text-right&quot;,children:t.jsx(&quot;span&quot;,{className:&quot;cursor-not-allowed rounded text-xs text-fc-muted outline-none focus-visible:ring-2 focus-visible:ring-fc-green/25&quot;,tabIndex:0,children:&quot;Mot de passe oublié ?&quot;})}),x&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg border border-fc-red/25 bg-fc-red-soft px-3 py-2 text-sm font-medium text-fc-red&quot;,role:&quot;alert&quot;,children:x}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;lg&quot;,className:&quot;w-full&quot;,disabled:p,children:p?&quot;Connexion...&quot;:&quot;Se connecter&quot;})]}),fv&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-7 border-t border-fc-border/60 pt-4 sm:mt-8&quot;,children:[t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;j(M=&gt;!M),className:&quot;flex w-full items-center justify-between gap-2 rounded-lg px-1 py-2 text-left text-xs font-medium text-fc-muted transition hover:text-fc-green-dark focus:outline-none focus-visible:ring-2 focus-visible:ring-fc-green/25&quot;,&quot;aria-expanded&quot;:v,children:[t.jsx(&quot;span&quot;,{children:&quot;Comptes de démonstration&quot;}),t.jsx(fp,{className:`h-4 w-4 shrink-0 transition ${v?&quot;rotate-180&quot;:&quot;&quot;}`,&quot;aria-hidden&quot;:!0})]}),v&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-2 max-h-[min(14rem,40vh)] overflow-y-auto rounded-xl border border-dashed border-fc-border/80 bg-fc-bg/90 p-3 sm:max-h-none sm:overflow-visible&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;text-[11px] text-fc-muted&quot;,children:[&quot;Mot de passe commun :&quot;,&quot; &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-mono text-fc-text&quot;,children:&quot;password&quot;}),&quot; — cliquer pour se connecter&quot;]}),t.jsx(&quot;ul&quot;,{className:&quot;mt-2 grid gap-1.5 sm:grid-cols-2&quot;,children:gN.map(M=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,disabled:p,onClick:()=&gt;void C(M),className:&quot;flex w-full flex-col rounded-lg border border-fc-border/80 bg-fc-surface px-2.5 py-2 text-left transition hover:border-fc-green/40 hover:bg-fc-green-soft/50 disabled:opacity-60&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;flex items-center justify-between gap-1&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;text-xs font-medium text-fc-text&quot;,children:M.label}),t.jsx(&quot;span&quot;,{className:&quot;shrink-0 rounded bg-fc-border/60 px-1 py-0.5 text-[9px] font-semibold uppercase text-fc-muted&quot;,children:M.role})]}),t.jsx(&quot;span&quot;,{className:&quot;mt-0.5 truncate font-mono text-[10px] text-fc-muted&quot;,children:M.email}),M.hint&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;mt-0.5 text-[10px] text-fc-gold-dark&quot;,children:M.hint})]})},M.email))})]})]})]})]}),t.jsx(&quot;p&quot;,{className:&quot;mt-5 shrink-0 pb-2 text-center text-[11px] leading-relaxed text-fc-muted sm:mt-6&quot;,children:&quot;Plateforme institutionnelle de suivi de chantiers — Burkina Faso&quot;})]})]})}function Je({title:l,subtitle:r,action:i,className:c=&quot;&quot;}){return t.jsxs(&quot;header&quot;,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between ${c}`,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;h1&quot;,{className:&quot;text-2xl font-bold tracking-tight text-slate-900 sm:text-3xl&quot;,children:l}),r&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-sm text-slate-500 sm:text-base&quot;,children:r})]}),i&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;shrink-0&quot;,children:i})]})}const wN={emerald:{border:&quot;border-fc-green/25&quot;,icon:&quot;bg-fc-green-soft text-fc-green&quot;,value:&quot;text-fc-green-dark&quot;},red:{border:&quot;border-fc-red/25&quot;,icon:&quot;bg-fc-red-soft text-fc-red&quot;,value:&quot;text-fc-red-dark&quot;},orange:{border:&quot;border-fc-gold/40&quot;,icon:&quot;bg-fc-gold-soft text-fc-gold-dark&quot;,value:&quot;text-fc-gold-dark&quot;},cyan:{border:&quot;border-fc-green/20&quot;,icon:&quot;bg-fc-green-soft text-fc-green-dark&quot;,value:&quot;text-fc-green-dark&quot;},violet:{border:&quot;border-fc-gold/35&quot;,icon:&quot;bg-fc-gold-soft text-fc-gold-dark&quot;,value:&quot;text-fc-gold-dark&quot;},amber:{border:&quot;border-fc-gold/40&quot;,icon:&quot;bg-fc-gold-soft text-fc-gold-dark&quot;,value:&quot;text-fc-gold-dark&quot;}};function be({title:l,value:r,subtitle:i,tone:c=&quot;emerald&quot;,icon:m,className:f=&quot;&quot;}){const x=wN[c];return t.jsx(&quot;article&quot;,{className:`rounded-2xl border bg-fc-surface p-4 shadow-sm ${x.border} ${f}`,children:t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-3&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-sm font-medium text-fc-muted&quot;,children:l}),t.jsx(&quot;p&quot;,{className:`mt-1 text-2xl font-bold tracking-tight ${x.value}`,children:r}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-fc-muted&quot;,children:i})]}),m&amp;&amp;t.jsx(&quot;div&quot;,{className:`flex h-10 w-10 shrink-0 items-center justify-center rounded-xl ${x.icon}`,children:t.jsx(m,{className:&quot;h-5 w-5&quot;,&quot;aria-hidden&quot;:!0})})]})})}const CN={green:&quot;bg-fc-green-soft text-fc-green-dark&quot;,orange:&quot;bg-fc-gold-soft text-fc-gold-dark&quot;,red:&quot;bg-fc-red-soft text-fc-red-dark&quot;,blue:&quot;bg-fc-green-soft text-fc-green-dark&quot;,purple:&quot;bg-fc-gold-soft text-fc-gold-dark&quot;,gray:&quot;bg-slate-100 text-slate-700&quot;};function Ee({label:l,tone:r=&quot;gray&quot;,className:i=&quot;&quot;}){return t.jsx(&quot;span&quot;,{className:`inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${CN[r]} ${i}`,children:l})}function Ve({title:l,description:r,action:i,className:c=&quot;&quot;}){return t.jsxs(&quot;div&quot;,{className:`flex flex-col items-center justify-center rounded-2xl border border-dashed border-slate-200 bg-slate-50/80 px-6 py-12 text-center ${c}`,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-lg font-semibold text-slate-800&quot;,children:l}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 max-w-md text-sm text-slate-500&quot;,children:r}),i&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;mt-6&quot;,children:i})]})}async function EN(l){return Hi(`/projects/${l}/cover`)}async function AN(l,r){const i=new FormData;return i.append(&quot;cover_image&quot;,r),Zn(`/projects/${l}/admin/project/cover`,i)}async function kN(l){return hv(`/projects/${l}/admin/project/cover`)}function TN({className:l=&quot;&quot;,showFallbackLabel:r=!0,variant:i=&quot;default&quot;}){return t.jsxs(&quot;div&quot;,{className:l,role:&quot;img&quot;,&quot;aria-label&quot;:&quot;Aucune image de couverture&quot;,children:[t.jsx(Pu,{className:i===&quot;hero&quot;?&quot;h-7 w-7 text-fc-green/45&quot;:&quot;h-8 w-8 text-fc-green/50&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(Vi,{variant:&quot;mark&quot;,size:i===&quot;hero&quot;?24:28,className:&quot;opacity-70&quot;}),r&amp;&amp;t.jsx(&quot;p&quot;,{className:i===&quot;hero&quot;?&quot;text-center text-[11px] font-medium text-slate-400&quot;:&quot;text-center text-xs font-medium text-slate-500&quot;,children:&quot;Aucune image de couverture&quot;})]})}function zN({className:l=&quot;&quot;}){return t.jsx(&quot;div&quot;,{className:`animate-pulse bg-gradient-to-br from-slate-100 via-fc-green-soft/40 to-slate-100 ${l}`,&quot;aria-busy&quot;:&quot;true&quot;,&quot;aria-label&quot;:&quot;Chargement de l’image&quot;})}function Iu({projectId:l,hasCoverImage:r,alt:i,className:c=&quot;&quot;,imageClassName:m=&quot;h-full w-full object-cover object-center&quot;,fallbackClassName:f=&quot;&quot;,showFallbackLabel:x=!0,variant:b=&quot;default&quot;}){const[p,g]=d.useState(null),[v,j]=d.useState(!1),[y,C]=d.useState(!1);d.useEffect(()=&gt;{if(!r){g(U=&gt;(U&amp;&amp;URL.revokeObjectURL(U),null)),j(!1),C(!1);return}let E=!1;C(!0),j(!1);async function S(){try{const{blob:U}=await EN(l);if(E)return;const T=URL.createObjectURL(U);g(P=&gt;(P&amp;&amp;URL.revokeObjectURL(P),T)),j(!1)}catch{E||(j(!0),g(U=&gt;(U&amp;&amp;URL.revokeObjectURL(U),null)))}finally{E||C(!1)}}return S(),()=&gt;{E=!0}},[l,r]),d.useEffect(()=&gt;()=&gt;{p&amp;&amp;URL.revokeObjectURL(p)},[p]);const M=`overflow-hidden ${c}`.trim(),A=`flex flex-col items-center justify-center gap-1.5 bg-gradient-to-br from-fc-green-soft via-fc-green-soft/60 to-white ${f}`.trim();return r&amp;&amp;y&amp;&amp;!p?t.jsx(zN,{className:M}):!r||v||!p?t.jsx(TN,{className:`${M} ${A}`.trim(),showFallbackLabel:x,variant:b}):t.jsx(&quot;div&quot;,{className:M,children:t.jsx(&quot;img&quot;,{src:p,alt:i,className:m})})}function MN({projectId:l,code:r,name:i,status:c,description:m,location:f,hasCoverImage:x}){return t.jsx(&quot;section&quot;,{className:&quot;overflow-hidden rounded-2xl border border-fc-green/12 bg-white shadow-[0_2px_16px_-4px_rgba(0,154,68,0.14)]&quot;,&quot;aria-label&quot;:&quot;Présentation du chantier&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 md:grid-cols-[42%_58%] md:h-[236px] lg:h-[248px]&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;relative aspect-video max-h-[200px] w-full overflow-hidden bg-slate-100 md:aspect-auto md:max-h-none md:h-full&quot;,children:[t.jsx(Iu,{variant:&quot;hero&quot;,projectId:l,hasCoverImage:x,alt:i,className:&quot;absolute inset-0 h-full w-full&quot;,imageClassName:&quot;h-full w-full object-cover object-center&quot;,fallbackClassName:&quot;h-full min-h-[140px] md:min-h-0&quot;,showFallbackLabel:!0}),t.jsx(&quot;div&quot;,{className:&quot;pointer-events-none absolute inset-y-0 right-0 hidden w-10 bg-gradient-to-l from-black/[0.04] to-transparent md:block&quot;,&quot;aria-hidden&quot;:!0})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex min-h-0 flex-col justify-center gap-2.5 border-t border-fc-green/8 bg-gradient-to-br from-fc-green-soft/90 via-white to-white px-4 py-4 sm:px-5 md:border-t-0 md:border-l md:px-6 md:py-5&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-[11px] font-semibold uppercase tracking-[0.14em] text-fc-green-dark&quot;,children:r}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-x-2.5 gap-y-1&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold leading-snug text-slate-900 sm:text-xl&quot;,children:i}),t.jsx(Ee,{label:ip[c]??c,tone:c===&quot;active&quot;?&quot;green&quot;:&quot;orange&quot;})]}),f&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;flex items-start gap-1.5 text-sm leading-snug text-slate-600&quot;,children:[t.jsx(Qn,{className:&quot;mt-0.5 h-4 w-4 shrink-0 text-fc-green&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;span&quot;,{children:f})]}),m&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;line-clamp-2 text-sm leading-relaxed text-slate-500&quot;,children:m})]})]})})}function DN(l){return&quot;&quot;}function RN(l,r){return Ae(`/projects/${l}/dashboard${DN()}`,!0)}const ON={critical:&quot;Critique&quot;,warning:&quot;Attention&quot;,info:&quot;Info&quot;},LN={critical:&quot;Critique&quot;,warning:&quot;À surveiller&quot;,ok:&quot;OK&quot;},UN={critical:&quot;red&quot;,warning:&quot;orange&quot;,ok:&quot;green&quot;},$N={critical:&quot;red&quot;,warning:&quot;orange&quot;,info:&quot;purple&quot;};function qN(l){if(!l)return&quot;—&quot;;const r=new Date(l),c=new Date().getTime()-r.getTime(),m=Math.floor(c/(1e3*60*60*24));return m===0?r.toLocaleTimeString(&quot;fr-FR&quot;,{hour:&quot;2-digit&quot;,minute:&quot;2-digit&quot;}):m===1?&quot;Hier&quot;:m&lt;7?`Il y a ${m} j`:r.toLocaleDateString(&quot;fr-FR&quot;,{day:&quot;2-digit&quot;,month:&quot;short&quot;})}function BN(l){const{summary:r,quick_links:i,permissions:c}=l,m=[{title:&quot;Avancement validé&quot;,value:`${r.validated_progress}%`,subtitle:`Déclaré : ${r.declared_progress}% (écart ${r.progress_gap} pts)`,tone:&quot;emerald&quot;,icon:qy},{title:&quot;Tâches en retard&quot;,value:String(r.tasks_overdue),subtitle:`${r.tasks_to_validate} à valider sur ${r.tasks_total}`,tone:&quot;red&quot;,icon:Wv,href:i.tasks_overdue_url},{title:&quot;Points critiques&quot;,value:String(r.points_critical),subtitle:`${r.points_open} ouverts · ${r.points_to_verify} à vérifier`,tone:&quot;orange&quot;,icon:Qn,href:i.points_critical_url},{title:&quot;Documents à valider&quot;,value:String(r.documents_to_validate),subtitle:`${r.documents_total} documents visibles`,tone:&quot;cyan&quot;,icon:ry,href:i.documents_to_validate_url},{title:&quot;DOE complété&quot;,value:`${r.doe_completion}%`,subtitle:`${r.doe_missing} manquante(s) · ${r.doe_validated} validée(s)`,tone:&quot;violet&quot;,icon:gp,href:i.doe_url}];return c.canViewApprovals&amp;&amp;r.approvals_pending&gt;0?m.push({title:&quot;Approbations en attente&quot;,value:String(r.approvals_pending),subtitle:&quot;Centre de validation&quot;,tone:&quot;amber&quot;,icon:Ku,href:i.approvals_url}):m.push({title:&quot;Actions en retard&quot;,value:String(r.actions_overdue),subtitle:`${r.actions_open} action(s) ouverte(s)`,tone:&quot;amber&quot;,icon:Hy,href:&quot;/actions&quot;}),m}function HN(){const{activeProject:l,activeMembership:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState(!0),[x,b]=d.useState(null),p=d.useCallback(async()=&gt;{if(!l){c(null),f(!1);return}f(!0),b(null);try{const y=await RN(l.id);c(y)}catch(y){y instanceof me&amp;&amp;y.status===403?b(&quot;Accès refusé au tableau de bord de ce chantier.&quot;):b(&quot;Impossible de charger le tableau de bord.&quot;),c(null)}finally{f(!1)}},[l]);d.useEffect(()=&gt;{p()},[p]);const g=d.useMemo(()=&gt;i?BN(i):[],[i]);if(!l)return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Tableau de bord&quot;,subtitle:&quot;Vue consolidée du chantier actif&quot;}),t.jsx(Ve,{title:&quot;Aucun chantier sélectionné&quot;,description:&quot;Choisissez un chantier dans la liste des projets pour afficher le tableau de bord.&quot;})]});if(m&amp;&amp;!i)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du tableau de bord…&quot;})});const v=l.location&amp;&amp;l.country?`${l.location}, ${l.country}`:l.location??l.country??(i==null?void 0:i.project.location)??null,j=i!=null&amp;&amp;i.permissions?[i.permissions.canCreatePoint&amp;&amp;{label:&quot;Créer un point&quot;,href:&quot;/points&quot;},i.permissions.canCreateTask&amp;&amp;{label:&quot;Créer une tâche&quot;,href:&quot;/tasks&quot;},i.permissions.canGenerateReport&amp;&amp;{label:&quot;Générer un rapport&quot;,href:&quot;/reports&quot;},i.permissions.canViewApprovals&amp;&amp;{label:&quot;Voir les approbations&quot;,href:&quot;/approvals&quot;},i.permissions.canViewAdmin&amp;&amp;{label:&quot;Administration&quot;,href:&quot;/admin&quot;}].filter(y=&gt;!!y):[];return t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[t.jsx(Je,{title:&quot;Tableau de bord&quot;,subtitle:&quot;Vue consolidée du chantier actif&quot;,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsxs($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void p(),disabled:m,children:[t.jsx(ky,{className:`h-4 w-4 ${m?&quot;animate-spin&quot;:&quot;&quot;}`}),&quot;Actualiser&quot;]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 rounded-xl border border-fc-green/25 bg-fc-green-soft px-4 py-2&quot;,children:[t.jsx(Pu,{className:&quot;h-5 w-5 text-planx-orange&quot;,&quot;aria-hidden&quot;:!0}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:&quot;Chantier&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-sm font-semibold text-slate-900&quot;,children:(i==null?void 0:i.project.name)??l.name}),v&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:v}),r&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-xs font-medium text-fc-green&quot;,children:[&quot;Rôle : &quot;,r.role_code]})]})]})]})}),x&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:x}),((i==null?void 0:i.project)??l)&amp;&amp;t.jsx(MN,{projectId:(i==null?void 0:i.project.id)??l.id,code:(i==null?void 0:i.project.code)??l.code,name:(i==null?void 0:i.project.name)??l.name,status:(i==null?void 0:i.project.status)??l.status,description:(i==null?void 0:i.project.description)??(l==null?void 0:l.description)??null,location:v??(i==null?void 0:i.project.location)??(l==null?void 0:l.location)??null,hasCoverImage:(i==null?void 0:i.project.has_cover_image)??(l==null?void 0:l.has_cover_image)??!1}),j.length&gt;0&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:j.map(y=&gt;t.jsx(he,{to:y.href,children:t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:y.label})},y.href))}),i&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsx(&quot;section&quot;,{className:&quot;grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3&quot;,&quot;aria-label&quot;:&quot;Indicateurs clés&quot;,children:g.map(y=&gt;{const C=t.jsx(be,{title:y.title,value:y.value,subtitle:y.subtitle,tone:y.tone,icon:y.icon,className:y.href?&quot;transition hover:border-fc-green/30 hover:shadow-md&quot;:&quot;&quot;});return y.href?t.jsx(he,{to:y.href,className:&quot;block rounded-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-fc-green&quot;,children:C},y.title):t.jsx(&quot;div&quot;,{children:C},y.title)})}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-3&quot;,children:[t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm lg:col-span-1&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Lots à risque&quot;}),i.lot_progress.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-4 text-sm text-slate-500&quot;,children:&quot;Aucun lot visible dans votre périmètre.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-4 space-y-3&quot;,children:i.lot_progress.map(y=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(he,{to:y.target_url,className:&quot;flex items-start justify-between gap-2 rounded-xl border border-slate-100 bg-slate-50 p-3 transition hover:border-fc-green/30 hover:bg-fc-green-soft/50&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:y.code}),t.jsx(&quot;p&quot;,{className:&quot;text-sm font-medium text-slate-800&quot;,children:y.name}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[&quot;Validé &quot;,y.validated_progress,&quot;% · &quot;,y.points_open,&quot; point(s) ·&quot;,&quot; &quot;,y.tasks_overdue,&quot; retard · DOE &quot;,y.doe_completion,&quot;%&quot;]})]}),t.jsx(Ee,{label:LN[y.risk_level],tone:UN[y.risk_level]})]})},y.lot_id))})]}),t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm lg:col-span-1&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Alertes&quot;}),i.alerts.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-4 text-sm text-slate-500&quot;,children:&quot;Aucune alerte active.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-4 space-y-3&quot;,children:i.alerts.map(y=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(he,{to:y.target_url,className:&quot;block rounded-xl border border-slate-100 bg-slate-50 p-3 transition hover:border-fc-green/30&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-sm font-medium text-slate-800&quot;,children:y.title}),t.jsx(Ee,{label:ON[y.severity],tone:$N[y.severity]})]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:y.description})]})},y.key))})]}),t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm lg:col-span-1&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Activité récente&quot;}),i.recent_activity.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-4 text-sm text-slate-500&quot;,children:&quot;Aucune activité récente.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-4 space-y-3&quot;,children:i.recent_activity.map(y=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(he,{to:y.target_url,className:&quot;flex gap-3 rounded-xl border border-slate-100 bg-slate-50 p-3 transition hover:border-fc-green/30&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;shrink-0 text-xs font-medium text-slate-400&quot;,children:qN(y.occurred_at)}),t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs text-planx-orange&quot;,children:y.label}),t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-700&quot;,children:y.title})]})]})},y.key))})]})]})]}),!i&amp;&amp;!x&amp;&amp;!m&amp;&amp;t.jsx(Ve,{title:&quot;Tableau de bord vide&quot;,description:&quot;Aucune donnée disponible pour ce chantier.&quot;})]})}function Ch(l){return l?new Date(l).toLocaleDateString(&quot;fr-FR&quot;):&quot;—&quot;}function VN({project:l,onOpen:r,isOpening:i}){const c=[l.location,l.country].filter(Boolean).join(&quot;, &quot;);return t.jsxs(&quot;article&quot;,{className:&quot;flex flex-col overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm transition hover:border-fc-green/30 hover:shadow-md&quot;,children:[t.jsx(Iu,{projectId:l.id,hasCoverImage:l.has_cover_image??!1,alt:l.name,className:&quot;aspect-video w-full rounded-t-2xl&quot;,showFallbackLabel:!0}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-1 flex-col p-5&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold uppercase tracking-wide text-planx-orange&quot;,children:l.code}),t.jsx(&quot;h2&quot;,{className:&quot;mt-1 text-lg font-bold text-slate-900&quot;,children:l.name})]}),t.jsx(Ee,{label:ip[l.status]??l.status,tone:l.status===&quot;active&quot;?&quot;green&quot;:&quot;orange&quot;})]}),l.description&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-3 line-clamp-2 text-sm text-slate-600&quot;,children:l.description}),c&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;mt-3 flex items-center gap-1.5 text-sm text-slate-500&quot;,children:[t.jsx(Qn,{className:&quot;h-4 w-4 shrink-0&quot;,&quot;aria-hidden&quot;:!0}),c]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:[&quot;Rôle : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:l.membership.role_code})]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 flex items-center gap-1.5 text-xs text-slate-500&quot;,children:[t.jsx(Fu,{className:&quot;h-3.5 w-3.5 shrink-0&quot;,&quot;aria-hidden&quot;:!0}),Ch(l.planned_start_date),&quot; → &quot;,Ch(l.planned_end_date)]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-4 grid grid-cols-2 gap-2 text-center sm:grid-cols-3&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg bg-emerald-50 px-2 py-2&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-[10px] text-slate-500&quot;,children:&quot;Avancement&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;text-sm font-bold text-emerald-700&quot;,children:[l.summary.validated_progress,&quot;%&quot;]})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg bg-rose-50 px-2 py-2&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-[10px] text-slate-500&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;text-sm font-bold text-rose-700&quot;,children:l.summary.late_tasks})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg bg-fc-green-soft px-2 py-2&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-[10px] text-slate-500&quot;,children:&quot;Points&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;text-sm font-bold text-fc-gold-dark&quot;,children:l.summary.critical_points})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg bg-fc-gold-soft px-2 py-2&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-[10px] text-slate-500&quot;,children:&quot;Docs&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;text-sm font-bold text-fc-gold-dark&quot;,children:l.summary.documents_pending})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg bg-fc-green-soft px-2 py-2 col-span-2 sm:col-span-1&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-[10px] text-slate-500&quot;,children:&quot;DOE&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;text-sm font-bold text-fc-green-dark&quot;,children:[l.summary.doe_completion,&quot;%&quot;]})]})]}),t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;mt-5 w-full&quot;,disabled:i,onClick:()=&gt;r(l.id),children:i?&quot;Ouverture…&quot;:&quot;Ouvrir&quot;})]})]})}function YN(){const{projects:l,isLoading:r,selectProject:i,loadProjects:c}=Ke(),m=ys(),[f,x]=d.useState(null),[b,p]=d.useState(null);async function g(v){p(null),x(v);try{await i(v),m(&quot;/dashboard&quot;)}catch{p(&quot;Impossible d’ouvrir ce chantier. Veuillez réessayer.&quot;)}finally{x(null)}}return r?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des chantiers…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Mes chantiers&quot;,subtitle:&quot;Sélectionnez le chantier sur lequel travailler.&quot;,action:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void c(),children:&quot;Actualiser&quot;})}),b&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:b}),l.length===0?t.jsx(Ve,{title:&quot;Aucun chantier affecté&quot;,description:&quot;Aucun chantier ne vous est encore affecté. Contactez votre administrateur FasoChantier.&quot;}):t.jsx(&quot;section&quot;,{className:&quot;grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-3&quot;,&quot;aria-label&quot;:&quot;Liste des chantiers&quot;,children:l.map(v=&gt;t.jsx(VN,{project:v,onOpen:j=&gt;void g(j),isOpening:f===v.id},v.id))})]})}const yi={planned:&quot;Planifié&quot;,in_progress:&quot;En cours&quot;,at_risk:&quot;À risque&quot;,critical:&quot;Critique&quot;,completed:&quot;Terminé&quot;,archived:&quot;Archivé&quot;},Cu={planned:&quot;gray&quot;,in_progress:&quot;blue&quot;,at_risk:&quot;orange&quot;,critical:&quot;red&quot;,completed:&quot;green&quot;,archived:&quot;purple&quot;},GN=[&quot;planned&quot;,&quot;in_progress&quot;,&quot;at_risk&quot;,&quot;critical&quot;,&quot;completed&quot;];function Dp({open:l,title:r,organizations:i,initial:c,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;planned&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;0&quot;),[T,P]=d.useState(&quot;0&quot;),[B,G]=d.useState(&quot;&quot;),[K,Z]=d.useState(&quot;&quot;),[k,w]=d.useState(&quot;&quot;),[F,le]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{var H,q;l&amp;&amp;(p((c==null?void 0:c.code)??&quot;&quot;),v((c==null?void 0:c.name)??&quot;&quot;),y((c==null?void 0:c.lot_type)??&quot;&quot;),M((c==null?void 0:c.status)??&quot;planned&quot;),E(((q=(H=c==null?void 0:c.main_organization)==null?void 0:H.id)==null?void 0:q.toString())??&quot;&quot;),U(String((c==null?void 0:c.declared_progress)??0)),P(String((c==null?void 0:c.validated_progress)??0)),G((c==null?void 0:c.planned_start_date)??&quot;&quot;),Z((c==null?void 0:c.planned_end_date)??&quot;&quot;),w((c==null?void 0:c.zones_text)??&quot;&quot;),le((c==null?void 0:c.description)??&quot;&quot;))},[l,c]),!l)return null;async function Y(H){H.preventDefault();const q={code:b.trim().toUpperCase(),name:g.trim(),lot_type:j.trim()||void 0,status:C,description:F.trim()||void 0,zones_text:k.trim()||void 0,declared_progress:Number(S),validated_progress:Number(T),planned_start_date:B||null,planned_end_date:K||null,main_organization_id:A?Number(A):null};await x(q)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;lot-form-title&quot;,children:[t.jsx(&quot;h2&quot;,{id:&quot;lot-form-title&quot;,className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:H=&gt;void Y(H),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:b,onChange:H=&gt;p(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type&quot;}),t.jsx(&quot;input&quot;,{value:j,onChange:H=&gt;y(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:g,onChange:H=&gt;v(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{value:C,onChange:H=&gt;M(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:GN.map(H=&gt;t.jsx(&quot;option&quot;,{value:H,children:yi[H]},H))})]}),i.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation principale&quot;}),t.jsxs(&quot;select&quot;,{value:A,onChange:H=&gt;E(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),i.map(H=&gt;t.jsx(&quot;option&quot;,{value:H.id,children:H.name},H.id))]})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Avancement déclaré %&quot;}),t.jsx(&quot;input&quot;,{type:&quot;number&quot;,min:0,max:100,value:S,onChange:H=&gt;U(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Avancement validé %&quot;}),t.jsx(&quot;input&quot;,{type:&quot;number&quot;,min:0,max:100,value:T,onChange:H=&gt;P(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Début prévu&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:B,onChange:H=&gt;G(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fin prévue&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:K,onChange:H=&gt;Z(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zones&quot;}),t.jsx(&quot;input&quot;,{value:k,onChange:H=&gt;w(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:2,value:F,onChange:H=&gt;le(H.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}async function Tt(l){return Ae(`/projects/${l}/lots`,!0)}async function ZN(l,r){return Ae(`/projects/${l}/lots/${r}`,!0)}async function QN(l,r){return Se(`/projects/${l}/lots`,r,!0)}async function XN(l,r,i){return Ue(`/projects/${l}/lots/${r}`,i,!0)}async function PN(l,r){return Ue(`/projects/${l}/lots/${r}/archive`,{},!0)}const FN=[{key:&quot;all&quot;,label:&quot;Tous&quot;},{key:&quot;critical&quot;,label:&quot;Critiques&quot;},{key:&quot;at_risk&quot;,label:&quot;À risque&quot;},{key:&quot;in_progress&quot;,label:&quot;En cours&quot;},{key:&quot;completed&quot;,label:&quot;Terminés&quot;}];function KN(l){return l===&quot;AC&quot;||l===&quot;CP&quot;}function JN(l,r){return r===&quot;all&quot;?l.status!==&quot;archived&quot;:l.status===r}function IN(){const{activeProject:l,activeMembership:r}=Ke(),[i,c]=d.useState([]),[m,f]=d.useState([]),[x,b]=d.useState(!0),[p,g]=d.useState(null),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(&quot;all&quot;),[M,A]=d.useState(!1),[E,S]=d.useState(!1),[U,T]=d.useState(null),P=d.useCallback(async()=&gt;{if(l){b(!0),g(null);try{const k=await Tt(l.id);c(k.data),f(k.meta.organizations)}catch(k){k instanceof me&amp;&amp;k.status===403?g(&quot;Accès refusé à la liste des lots.&quot;):g(&quot;Impossible de charger les lots.&quot;),c([])}finally{b(!1)}}},[l]);d.useEffect(()=&gt;{P()},[P]);const B=d.useMemo(()=&gt;{const k=v.trim().toLowerCase();return i.filter(w=&gt;{var F;return JN(w,y)?k?w.code.toLowerCase().includes(k)||w.name.toLowerCase().includes(k)||(((F=w.main_organization)==null?void 0:F.name.toLowerCase().includes(k))??!1):!0:!1})},[i,v,y]),G=d.useMemo(()=&gt;{const k=i.filter(Y=&gt;Y.status!==&quot;archived&quot;),w=k.filter(Y=&gt;Y.status===&quot;critical&quot;).length,F=k.filter(Y=&gt;Y.status===&quot;at_risk&quot;).length,le=k.length&gt;0?Math.round(k.reduce((Y,H)=&gt;Y+H.validated_progress,0)/k.length):0;return{total:k.length,critical:w,atRisk:F,avgValidated:le}},[i]);async function K(k){if(l){S(!0);try{await QN(l.id,k),A(!1),T(&quot;Lot créé avec succès.&quot;),await P()}catch(w){g(w instanceof me?w.message:&quot;Erreur lors de la création.&quot;)}finally{S(!1)}}}const Z=KN(r==null?void 0:r.role_code);return x?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des lots…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Lots&quot;,subtitle:&quot;Structure opérationnelle du chantier actif&quot;,action:Z?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;A(!0),children:&quot;Créer un lot&quot;}):void 0}),U&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,role:&quot;status&quot;,children:U}),p&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:p}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Total lots&quot;,value:String(G.total),subtitle:&quot;Hors archivés&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Critiques&quot;,value:String(G.critical),subtitle:&quot;Statut critique&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;À risque&quot;,value:String(G.atRisk),subtitle:&quot;Surveillance requise&quot;,tone:&quot;amber&quot;}),t.jsx(be,{title:&quot;Avancement validé moyen&quot;,value:`${G.avgValidated}%`,subtitle:&quot;Tous lots visibles&quot;,tone:&quot;emerald&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher un lot…&quot;,value:v,onChange:k=&gt;j(k.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:FN.map(k=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;C(k.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${y===k.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:k.label},k.key))})]}),B.length===0?t.jsx(Ve,{title:&quot;Aucun lot trouvé&quot;,description:i.length===0?&quot;Aucun lot n’est disponible pour votre périmètre sur ce chantier.&quot;:&quot;Aucun lot ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Nom&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Entreprise&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Déclaré&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Validé&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Points&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;DOE&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:B.map(k=&gt;{var w;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:k.code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-medium text-slate-800&quot;,children:k.name}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:((w=k.main_organization)==null?void 0:w.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:yi[k.status],tone:Cu[k.status]})}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[k.declared_progress,&quot;%&quot;]}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[k.validated_progress,&quot;%&quot;]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:k.summary.late_tasks}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:k.summary.open_points}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[k.summary.doe_completion,&quot;%&quot;]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/lots/${k.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},k.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:B.map(k=&gt;{var w;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold uppercase text-planx-orange&quot;,children:k.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:k.name}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:((w=k.main_organization)==null?void 0:w.name)??&quot;—&quot;})]}),t.jsx(Ee,{label:yi[k.status],tone:Cu[k.status]})]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Déclaré&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:[k.declared_progress,&quot;%&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Validé&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:[k.validated_progress,&quot;%&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Points ouverts&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:k.summary.open_points})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;DOE&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:[k.summary.doe_completion,&quot;%&quot;]})]})]}),t.jsx(he,{to:`/lots/${k.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},k.id)})})]}),t.jsx(Dp,{open:M,title:&quot;Créer un lot&quot;,organizations:m,isSubmitting:E,onClose:()=&gt;A(!1),onSubmit:K})]})}function Rp(l){var c;if(!l)return&quot;&quot;;const r=new URLSearchParams;l.lot_id!==void 0&amp;&amp;r.set(&quot;lot_id&quot;,String(l.lot_id)),l.status&amp;&amp;r.set(&quot;status&quot;,l.status),l.priority&amp;&amp;r.set(&quot;priority&quot;,l.priority),l.responsible_organization_id!==void 0&amp;&amp;r.set(&quot;responsible_organization_id&quot;,String(l.responsible_organization_id)),l.only_late&amp;&amp;r.set(&quot;only_late&quot;,&quot;1&quot;),l.hide_closed&amp;&amp;r.set(&quot;hide_closed&quot;,&quot;1&quot;),l.responsible_user_id!==void 0&amp;&amp;r.set(&quot;responsible_user_id&quot;,String(l.responsible_user_id)),l.view&amp;&amp;r.set(&quot;view&quot;,l.view),(c=l.search)!=null&amp;&amp;c.trim()&amp;&amp;r.set(&quot;search&quot;,l.search.trim());const i=r.toString();return i?`?${i}`:&quot;&quot;}async function Ni(l,r){return Ae(`/projects/${l}/tasks${Rp(r)}`,!0)}async function WN(l,r){return Ae(`/projects/${l}/tasks/planning${Rp(r)}`,!0)}async function e2(l,r){return Ae(`/projects/${l}/tasks/${r}`,!0)}async function t2(l,r){return Se(`/projects/${l}/tasks`,r,!0)}async function s2(l,r,i){return Ue(`/projects/${l}/tasks/${r}`,i,!0)}async function a2(l,r,i){return Ue(`/projects/${l}/tasks/${r}/status`,i,!0)}async function l2(l,r,i){return Se(`/projects/${l}/tasks/${r}/progress-declarations`,i,!0)}async function n2(l,r,i){return Se(`/projects/${l}/tasks/${r}/progress-validations`,i,!0)}function r2(l){var c;if(!l)return&quot;&quot;;const r=new URLSearchParams;l.lot_id!==void 0&amp;&amp;r.set(&quot;lot_id&quot;,String(l.lot_id)),l.type&amp;&amp;r.set(&quot;type&quot;,l.type),l.status&amp;&amp;r.set(&quot;status&quot;,l.status),l.priority&amp;&amp;r.set(&quot;priority&quot;,l.priority),l.responsible_organization_id!==void 0&amp;&amp;r.set(&quot;responsible_organization_id&quot;,String(l.responsible_organization_id)),l.only_late&amp;&amp;r.set(&quot;only_late&quot;,&quot;1&quot;),(c=l.search)!=null&amp;&amp;c.trim()&amp;&amp;r.set(&quot;search&quot;,l.search.trim());const i=r.toString();return i?`?${i}`:&quot;&quot;}async function _i(l,r){return Ae(`/projects/${l}/points${r2(r)}`,!0)}async function i2(l,r){return Ae(`/projects/${l}/points/${r}`,!0)}async function c2(l,r){return Se(`/projects/${l}/points`,r,!0)}async function o2(l,r,i){return Ue(`/projects/${l}/points/${r}`,i,!0)}async function u2(l,r,i){return Se(`/projects/${l}/points/${r}/comments`,i,!0)}async function d2(l,r,i){return Se(`/projects/${l}/points/${r}/mark-corrected`,i??{},!0)}async function m2(l,r,i){return Se(`/projects/${l}/points/${r}/verify`,i??{},!0)}async function f2(l,r,i){return Se(`/projects/${l}/points/${r}/close`,i,!0)}function x2(l){var c;if(!l)return&quot;&quot;;const r=new URLSearchParams;l.lot_id!==void 0&amp;&amp;r.set(&quot;lot_id&quot;,String(l.lot_id)),l.status&amp;&amp;r.set(&quot;status&quot;,l.status),l.document_type&amp;&amp;r.set(&quot;document_type&quot;,l.document_type),l.confidentiality&amp;&amp;r.set(&quot;confidentiality&quot;,l.confidentiality),l.is_doe_candidate&amp;&amp;r.set(&quot;is_doe_candidate&quot;,&quot;1&quot;),(c=l.search)!=null&amp;&amp;c.trim()&amp;&amp;r.set(&quot;search&quot;,l.search.trim());const i=r.toString();return i?`?${i}`:&quot;&quot;}function h2(l,r){l.append(&quot;code&quot;,r.code),l.append(&quot;title&quot;,r.title),l.append(&quot;document_type&quot;,r.document_type),r.description&amp;&amp;l.append(&quot;description&quot;,r.description),r.confidentiality&amp;&amp;l.append(&quot;confidentiality&quot;,r.confidentiality),r.lot_id&amp;&amp;l.append(&quot;lot_id&quot;,String(r.lot_id)),r.is_doe_candidate&amp;&amp;l.append(&quot;is_doe_candidate&quot;,&quot;1&quot;),r.comment&amp;&amp;l.append(&quot;comment&quot;,r.comment)}async function Wu(l,r){return Ae(`/projects/${l}/documents${x2(r)}`,!0)}async function p2(l,r){return Ae(`/projects/${l}/documents/${r}`,!0)}async function g2(l,r,i){const c=new FormData;return h2(c,r),c.append(&quot;file&quot;,i),Zn(`/projects/${l}/documents`,c,!0)}async function b2(l,r,i){return Ue(`/projects/${l}/documents/${r}`,i,!0)}async function j2(l,r,i,c){const m=new FormData;return m.append(&quot;file&quot;,i),c!=null&amp;&amp;c.comment&amp;&amp;m.append(&quot;comment&quot;,c.comment),Zn(`/projects/${l}/documents/${r}/versions`,m,!0)}async function v2(l,r,i){return Hi(`/projects/${l}/documents/${r}/versions/${i}/download`,!0)}function y2(l,r){const i=URL.createObjectURL(l),c=document.createElement(&quot;a&quot;);c.href=i,c.download=r,c.click(),URL.revokeObjectURL(i)}async function N2(l,r,i){return Se(`/projects/${l}/documents/${r}/validate`,i??{},!0)}async function _2(l,r,i){return Se(`/projects/${l}/documents/${r}/reject`,i,!0)}async function S2(l,r,i){return Se(`/projects/${l}/documents/${r}/comments`,i,!0)}async function w2(l,r){return Ue(`/projects/${l}/documents/${r}/archive`,{},!0)}function C2(l){var c;if(!l)return&quot;&quot;;const r=new URLSearchParams;l.lot_id!==void 0&amp;&amp;r.set(&quot;lot_id&quot;,String(l.lot_id)),l.status&amp;&amp;r.set(&quot;status&quot;,l.status),l.expected_document_type&amp;&amp;r.set(&quot;expected_document_type&quot;,l.expected_document_type),l.is_required&amp;&amp;r.set(&quot;is_required&quot;,&quot;1&quot;),l.responsible_organization_id!==void 0&amp;&amp;r.set(&quot;responsible_organization_id&quot;,String(l.responsible_organization_id)),(c=l.search)!=null&amp;&amp;c.trim()&amp;&amp;r.set(&quot;search&quot;,l.search.trim());const i=r.toString();return i?`?${i}`:&quot;&quot;}async function E2(l){return Ae(`/projects/${l}/doe/summary`,!0)}async function Op(l,r){return Ae(`/projects/${l}/doe/items${C2(r)}`,!0)}async function A2(l,r){return Ae(`/projects/${l}/doe/items/${r}`,!0)}async function k2(l,r){return Se(`/projects/${l}/doe/items`,r,!0)}async function T2(l,r,i){return Ue(`/projects/${l}/doe/items/${r}`,i,!0)}async function z2(l,r,i){return Se(`/projects/${l}/doe/items/${r}/attach-document`,i,!0)}async function M2(l,r,i){return Se(`/projects/${l}/doe/items/${r}/validate`,i??{},!0)}async function D2(l,r,i){return Se(`/projects/${l}/doe/items/${r}/reject`,i,!0)}async function R2(l,r,i){return Se(`/projects/${l}/doe/items/${r}/mark-not-applicable`,i??{},!0)}async function O2(l,r,i){return Se(`/projects/${l}/doe/items/${r}/comments`,i,!0)}function L2(l){var c;if(!l)return&quot;&quot;;const r=new URLSearchParams;l.lot_id!==void 0&amp;&amp;r.set(&quot;lot_id&quot;,String(l.lot_id)),l.status&amp;&amp;r.set(&quot;status&quot;,l.status),l.priority&amp;&amp;r.set(&quot;priority&quot;,l.priority),l.responsible_organization_id!==void 0&amp;&amp;r.set(&quot;responsible_organization_id&quot;,String(l.responsible_organization_id)),l.responsible_user_id!==void 0&amp;&amp;r.set(&quot;responsible_user_id&quot;,String(l.responsible_user_id)),l.source_type&amp;&amp;r.set(&quot;source_type&quot;,l.source_type),l.only_late&amp;&amp;r.set(&quot;only_late&quot;,&quot;1&quot;),l.mine&amp;&amp;r.set(&quot;mine&quot;,&quot;1&quot;),(c=l.search)!=null&amp;&amp;c.trim()&amp;&amp;r.set(&quot;search&quot;,l.search.trim());const i=r.toString();return i?`?${i}`:&quot;&quot;}async function ed(l,r){return Ae(`/projects/${l}/actions${L2(r)}`,!0)}async function U2(l,r){return Ae(`/projects/${l}/actions/${r}`,!0)}async function $2(l,r){return Se(`/projects/${l}/actions`,r,!0)}async function q2(l,r,i){return Ue(`/projects/${l}/actions/${r}`,i,!0)}async function B2(l,r,i){return Ue(`/projects/${l}/actions/${r}/assign`,i,!0)}async function H2(l,r,i){return Se(`/projects/${l}/actions/${r}/comments`,i,!0)}async function V2(l,r,i){return Se(`/projects/${l}/actions/${r}/mark-done`,i??{},!0)}async function Y2(l,r,i){return Se(`/projects/${l}/actions/${r}/verify`,i??{},!0)}async function G2(l,r,i){return Se(`/projects/${l}/actions/${r}/close`,i??{},!0)}const qa={planned:&quot;Prévue&quot;,in_progress:&quot;En cours&quot;,blocked:&quot;Bloquée&quot;,late:&quot;En retard&quot;,pending_validation:&quot;À valider&quot;,validated:&quot;Validée&quot;,completed:&quot;Terminée&quot;,cancelled:&quot;Annulée&quot;},Dn={planned:&quot;gray&quot;,in_progress:&quot;blue&quot;,blocked:&quot;orange&quot;,late:&quot;red&quot;,pending_validation:&quot;purple&quot;,validated:&quot;blue&quot;,completed:&quot;green&quot;,cancelled:&quot;gray&quot;},Si={low:&quot;Faible&quot;,normal:&quot;Normale&quot;,high:&quot;Élevée&quot;,critical:&quot;Critique&quot;},Lp={phase:&quot;Phase&quot;,task:&quot;Tâche&quot;,milestone:&quot;Jalon&quot;},Up={accepted:&quot;Accepté&quot;,corrected:&quot;Corrigé&quot;,rejected:&quot;Rejeté&quot;},wi={observation:&quot;Observation&quot;,reserve:&quot;Réserve&quot;,blocking:&quot;Blocage&quot;,rfi:&quot;RFI&quot;,non_conformity:&quot;Non-conformité&quot;},kl={open:&quot;Ouvert&quot;,in_progress:&quot;En cours&quot;,corrected:&quot;Corrigé&quot;,to_verify:&quot;À vérifier&quot;,closed:&quot;Clôturé&quot;,rejected:&quot;Rejeté&quot;,cancelled:&quot;Annulé&quot;},Ci={open:&quot;orange&quot;,in_progress:&quot;blue&quot;,corrected:&quot;blue&quot;,to_verify:&quot;purple&quot;,closed:&quot;green&quot;,rejected:&quot;red&quot;,cancelled:&quot;gray&quot;},Rn={low:&quot;Faible&quot;,normal:&quot;Normale&quot;,high:&quot;Élevée&quot;,critical:&quot;Critique&quot;},Z2=[&quot;observation&quot;,&quot;blocking&quot;,&quot;rfi&quot;];function Eu(l){return l===&quot;ENT&quot;?Z2:l===&quot;BC&quot;?[&quot;non_conformity&quot;]:l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;SA&quot;?[&quot;observation&quot;,&quot;reserve&quot;,&quot;blocking&quot;,&quot;rfi&quot;,&quot;non_conformity&quot;]:[]}function Q2(l){return Eu(l).length&gt;0}const On={plan:&quot;Plan&quot;,technical_sheet:&quot;Fiche technique&quot;,report:&quot;Rapport&quot;,minutes:&quot;Compte rendu&quot;,photo:&quot;Photo&quot;,certificate:&quot;Certificat&quot;,test_report:&quot;PV d&#039;essai&quot;,other:&quot;Autre&quot;},Ln={draft:&quot;Brouillon&quot;,submitted:&quot;Soumis&quot;,pending_validation:&quot;À valider&quot;,validated:&quot;Validé&quot;,rejected:&quot;Rejeté&quot;,archived:&quot;Archivé&quot;},Ei={draft:&quot;gray&quot;,submitted:&quot;blue&quot;,pending_validation:&quot;purple&quot;,validated:&quot;green&quot;,rejected:&quot;red&quot;,archived:&quot;gray&quot;},td={project:&quot;Chantier&quot;,restricted:&quot;Restreint&quot;,confidential:&quot;Confidentiel&quot;};function X2(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;BC&quot;||l===&quot;ENT&quot;||l===&quot;SA&quot;}const Un={expected:&quot;Attendu&quot;,missing:&quot;Manquant&quot;,submitted:&quot;Soumis&quot;,to_correct:&quot;À corriger&quot;,validated:&quot;Validé&quot;,not_applicable:&quot;Non applicable&quot;,archived:&quot;Archivé&quot;},Ai={expected:&quot;gray&quot;,missing:&quot;red&quot;,submitted:&quot;blue&quot;,to_correct:&quot;orange&quot;,validated:&quot;green&quot;,not_applicable:&quot;gray&quot;,archived:&quot;gray&quot;},ki={plan:&quot;Plan&quot;,technical_sheet:&quot;Fiche technique&quot;,report:&quot;Rapport&quot;,minutes:&quot;Compte rendu&quot;,photo:&quot;Photo&quot;,certificate:&quot;Certificat&quot;,test_report:&quot;PV d&#039;essai&quot;,other:&quot;Autre&quot;};function P2(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;SA&quot;}const ga={open:&quot;Ouverte&quot;,in_progress:&quot;En cours&quot;,done:&quot;Réalisée&quot;,to_verify:&quot;À vérifier&quot;,verified:&quot;Vérifiée&quot;,closed:&quot;Clôturée&quot;,cancelled:&quot;Annulée&quot;},$n={open:&quot;orange&quot;,in_progress:&quot;blue&quot;,done:&quot;blue&quot;,to_verify:&quot;purple&quot;,verified:&quot;blue&quot;,closed:&quot;green&quot;,cancelled:&quot;gray&quot;},Tl={low:&quot;Faible&quot;,normal:&quot;Normale&quot;,high:&quot;Élevée&quot;,critical:&quot;Critique&quot;},qn={manual:&quot;Manuelle&quot;,task:&quot;Tâche&quot;,point:&quot;Point chantier&quot;,document:&quot;Document&quot;,doe:&quot;DOE&quot;,meeting:&quot;Réunion&quot;,report:&quot;Rapport&quot;,decision:&quot;Décision&quot;},F2=[&quot;manual&quot;,&quot;task&quot;,&quot;point&quot;,&quot;document&quot;,&quot;doe&quot;,&quot;meeting&quot;,&quot;report&quot;,&quot;decision&quot;];function K2(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;BC&quot;||l===&quot;SA&quot;}function J2(){var H;const{lotId:l}=Ys(),r=ys(),{activeProject:i}=Ke(),[c,m]=d.useState(null),[f,x]=d.useState([]),[b,p]=d.useState(!0),[g,v]=d.useState(null),[j,y]=d.useState(!1),[C,M]=d.useState(!1),[A,E]=d.useState(null),[S,U]=d.useState([]),[T,P]=d.useState([]),[B,G]=d.useState([]),[K,Z]=d.useState([]),[k,w]=d.useState([]),F=d.useCallback(async()=&gt;{if(!(!i||!l)){p(!0),v(null);try{const[q,_,z,R,L,ce,D]=await Promise.all([ZN(i.id,Number(l)),Tt(i.id),Ni(i.id,{lot_id:Number(l)}),_i(i.id,{lot_id:Number(l)}),Wu(i.id,{lot_id:Number(l)}),Op(i.id,{lot_id:Number(l)}),ed(i.id,{lot_id:Number(l)})]);m(q.data),x(_.meta.organizations),U(z.data.slice(0,5)),P(R.data.slice(0,5)),G(L.data.slice(0,5)),Z(ce.data.slice(0,5)),w(D.data.slice(0,5))}catch(q){q instanceof me&amp;&amp;q.status===403?v(&quot;Accès refusé à ce lot.&quot;):q instanceof me&amp;&amp;q.status===404?v(&quot;Lot introuvable.&quot;):v(&quot;Impossible de charger le lot.&quot;)}finally{p(!1)}}},[i,l]);d.useEffect(()=&gt;{F()},[F]);async function le(q){if(!(!i||!c)){M(!0);try{const _=await XN(i.id,c.id,q);m(_.data),y(!1),E(&quot;Lot mis à jour avec succès.&quot;)}catch(_){v(_ instanceof me?_.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{M(!1)}}}async function Y(){if(!(!i||!c||!window.confirm(&quot;Archiver ce lot ?&quot;))){M(!0);try{await PN(i.id,c.id),r(&quot;/lots&quot;,{replace:!0})}catch(q){v(q instanceof me?q.message:&quot;Erreur lors de l’archivage.&quot;),M(!1)}}}return b?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du lot…&quot;})}):g||!c?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/lots&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour aux lots&quot;]}),t.jsx(Ve,{title:&quot;Lot indisponible&quot;,description:g??&quot;Lot introuvable.&quot;})]}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/lots&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour aux lots&quot;]}),A&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:A}),t.jsx(Je,{title:`${c.code} — ${c.name}`,subtitle:c.lot_type??&quot;Lot chantier&quot;,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(Ee,{label:yi[c.status],tone:Cu[c.status]}),c.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;y(!0),children:&quot;Modifier&quot;}),c.permissions.canArchive&amp;&amp;c.status!==&quot;archived&quot;&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,disabled:C,onClick:()=&gt;void Y(),children:&quot;Archiver&quot;})]})}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Avancement déclaré&quot;,value:`${c.declared_progress}%`,subtitle:&quot;Déclaration entreprise&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;Avancement validé&quot;,value:`${c.validated_progress}%`,subtitle:&quot;Validation MOE/MOA&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Tâches en retard&quot;,value:String(c.summary.late_tasks),subtitle:&quot;Mock MVP&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;DOE&quot;,value:`${c.summary.doe_completion}%`,subtitle:&quot;Complétion dossier&quot;,tone:&quot;violet&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Organisation&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium text-slate-800&quot;,children:((H=c.main_organization)==null?void 0:H.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Début prévu&quot;}),t.jsx(&quot;dd&quot;,{children:c.planned_start_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Fin prévue&quot;}),t.jsx(&quot;dd&quot;,{children:c.planned_end_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Zones&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:c.zones_text??&quot;—&quot;})]}),c.description&amp;&amp;t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Description&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:c.description})]})]})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Actions du lot&quot;}),k.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:&quot;Aucune action sur ce lot.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2&quot;,children:k.map(q=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(he,{to:`/actions/${q.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:q.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:q.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:ga[q.status],tone:$n[q.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[Tl[q.priority],q.due_date?` · ${q.due_date}`:&quot;&quot;]})]})]},q.id))}),t.jsx(he,{to:`/actions?lot_id=${c.id}`,className:&quot;mt-3 inline-block text-xs font-medium text-planx-orange hover:underline&quot;,children:&quot;Voir les actions du lot&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Tâches du lot&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:&quot;Les phases et jalons globaux restent visibles dans le planning chantier.&quot;}),S.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:&quot;Aucune tâche sur ce lot.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2&quot;,children:S.map(q=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(he,{to:`/tasks/${q.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:q.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:q.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:qa[q.status],tone:Dn[q.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[q.declared_progress,&quot;% / &quot;,q.validated_progress,&quot;%&quot;]})]})]},q.id))}),t.jsx(he,{to:`/tasks?lot_id=${c.id}`,className:&quot;mt-3 inline-block text-xs font-medium text-planx-orange hover:underline&quot;,children:&quot;Voir toutes les tâches du lot&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Points du lot&quot;}),T.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:&quot;Aucun point sur ce lot.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2&quot;,children:T.map(q=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(he,{to:`/points/${q.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:q.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:q.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:kl[q.status],tone:Ci[q.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[Rn[q.priority],q.due_date?` · ${q.due_date}`:&quot;&quot;]})]})]},q.id))}),t.jsx(he,{to:`/points?lot_id=${c.id}`,className:&quot;mt-3 inline-block text-xs font-medium text-planx-orange hover:underline&quot;,children:&quot;Voir tous les points du lot&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Documents du lot&quot;}),B.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:&quot;Aucun document sur ce lot.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2&quot;,children:B.map(q=&gt;{var _;return t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(he,{to:`/documents/${q.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:q.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:q.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:Ln[q.status],tone:Ei[q.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[((_=q.current_version)==null?void 0:_.version_label)??&quot;—&quot;,q.is_doe_candidate?&quot; · DOE&quot;:&quot;&quot;]})]})]},q.id)})}),t.jsx(he,{to:`/documents?lot_id=${c.id}`,className:&quot;mt-3 inline-block text-xs font-medium text-planx-orange hover:underline&quot;,children:&quot;Voir tous les documents du lot&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;DOE du lot&quot;}),K.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:&quot;Aucune pièce DOE sur ce lot.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2&quot;,children:K.map(q=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0&quot;,children:[t.jsx(he,{to:`/doe/${q.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:q.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:q.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:Un[q.status],tone:Ai[q.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[q.has_attached_document?&quot;Doc.&quot;:&quot;Sans doc.&quot;,q.is_required?&quot; · Oblig.&quot;:&quot;&quot;]})]})]},q.id))}),t.jsx(he,{to:`/doe?lot_id=${c.id}`,className:&quot;mt-3 inline-block text-xs font-medium text-planx-orange hover:underline&quot;,children:&quot;Voir le DOE du lot&quot;})]})]})]}),t.jsx(Dp,{open:j,title:&quot;Modifier le lot&quot;,organizations:f,initial:c,isSubmitting:C,onClose:()=&gt;y(!1),onSubmit:le})]})}const I2=[&quot;planned&quot;,&quot;in_progress&quot;,&quot;blocked&quot;,&quot;late&quot;,&quot;pending_validation&quot;,&quot;validated&quot;,&quot;completed&quot;,&quot;cancelled&quot;],W2=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;],e1=[&quot;task&quot;,&quot;phase&quot;,&quot;milestone&quot;];function $p({open:l,title:r,lots:i,organizations:c,parentPhases:m=[],taskWorkTypes:f=[],initial:x,mode:b=&quot;task&quot;,canCreatePhase:p=!1,canCreateMilestone:g=!1,canEditValidatedProgress:v=!0,isSubmitting:j,onClose:y,onSubmit:C}){const[M,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;&quot;),[U,T]=d.useState(&quot;task&quot;),[P,B]=d.useState(&quot;&quot;),[G,K]=d.useState(&quot;&quot;),[Z,k]=d.useState(&quot;&quot;),[w,F]=d.useState(&quot;&quot;),[le,Y]=d.useState(&quot;planned&quot;),[H,q]=d.useState(&quot;normal&quot;),[_,z]=d.useState(&quot;&quot;),[R,L]=d.useState(&quot;&quot;),[ce,D]=d.useState(&quot;&quot;),[J,I]=d.useState(&quot;&quot;),[ee,de]=d.useState(&quot;&quot;),[X,fe]=d.useState(&quot;0&quot;),[je,Me]=d.useState(&quot;0&quot;),[ft,Ft]=d.useState(&quot;&quot;),xt=U===&quot;milestone&quot;||b===&quot;milestone&quot;,Ct=U===&quot;phase&quot;||b===&quot;phase&quot;,ht=!Ct;if(d.useEffect(()=&gt;{var Et,os,zt,Mt,nt;if(!l)return;const xe=b===&quot;milestone&quot;?&quot;milestone&quot;:b===&quot;phase&quot;?&quot;phase&quot;:(x==null?void 0:x.task_type)??&quot;task&quot;;A((x==null?void 0:x.code)??&quot;&quot;),S((x==null?void 0:x.title)??&quot;&quot;),T(xe),B((x==null?void 0:x.wbs_code)??&quot;&quot;),K(((Et=x==null?void 0:x.parent_task_id)==null?void 0:Et.toString())??&quot;&quot;),k(((os=x==null?void 0:x.lot_id)==null?void 0:os.toString())??&quot;&quot;),F(((Mt=(zt=x==null?void 0:x.responsible_organization)==null?void 0:zt.id)==null?void 0:Mt.toString())??&quot;&quot;),Y((x==null?void 0:x.status)??&quot;planned&quot;),q((x==null?void 0:x.priority)??&quot;normal&quot;),z((x==null?void 0:x.planned_start_date)??&quot;&quot;),L((x==null?void 0:x.planned_end_date)??&quot;&quot;),D((x==null?void 0:x.milestone_date)??&quot;&quot;),I((x==null?void 0:x.zone_text)??&quot;&quot;),de((x==null?void 0:x.description)??&quot;&quot;),fe(String((x==null?void 0:x.declared_progress)??0)),Me(String((x==null?void 0:x.validated_progress)??0)),Ft(((nt=x==null?void 0:x.task_work_type_id)==null?void 0:nt.toString())??&quot;&quot;)},[l,x,b]),!l)return null;const bt=e1.filter(xe=&gt;xe===&quot;phase&quot;?p||(x==null?void 0:x.task_type)===&quot;phase&quot;:xe===&quot;milestone&quot;?g||(x==null?void 0:x.task_type)===&quot;milestone&quot;:!0);async function Bt(xe){if(xe.preventDefault(),ht&amp;&amp;!w)return;const Et={code:M.trim().toUpperCase(),title:E.trim(),description:ee.trim()||void 0,zone_text:J.trim()||void 0,lot_id:Z?Number(Z):null,parent_task_id:G?Number(G):null,wbs_code:P.trim()||null,task_type:U,is_milestone:xt,milestone_date:xt&amp;&amp;ce||null,responsible_organization_id:w?Number(w):null,status:le,priority:H,planned_start_date:xt?null:_||null,planned_end_date:xt?null:R||null,declared_progress:Number(X),validated_progress:Number(je),task_work_type_id:!Ct&amp;&amp;!xt&amp;&amp;ft?Number(ft):null};await C(Et)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;task-form-title&quot;,children:[t.jsx(&quot;h2&quot;,{id:&quot;task-form-title&quot;,className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:xe=&gt;void Bt(xe),className:&quot;mt-4 space-y-3&quot;,children:[bt.length&gt;1&amp;&amp;b===&quot;task&quot;&amp;&amp;!x&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type&quot;}),t.jsx(&quot;select&quot;,{value:U,onChange:xe=&gt;T(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:bt.map(xe=&gt;t.jsx(&quot;option&quot;,{value:xe,children:Lp[xe]},xe))})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:M,onChange:xe=&gt;A(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;WBS&quot;}),t.jsx(&quot;input&quot;,{value:P,onChange:xe=&gt;B(xe.target.value),placeholder:&quot;ex. 4.1&quot;,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:E,onChange:xe=&gt;S(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),!Ct&amp;&amp;!xt&amp;&amp;f.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type métier&quot;}),t.jsxs(&quot;select&quot;,{value:ft,onChange:xe=&gt;Ft(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Non défini —&quot;}),f.map(xe=&gt;t.jsxs(&quot;option&quot;,{value:xe.id,children:[xe.code,&quot; — &quot;,xe.name]},xe.id))]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:&quot;Le type métier aide à appliquer une checklist ou un contrôle adapté. Les phases et jalons peuvent rester sans type.&quot;})]}),m.length&gt;0&amp;&amp;!Ct&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Phase parente&quot;}),t.jsxs(&quot;select&quot;,{value:G,onChange:xe=&gt;K(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),m.map(xe=&gt;t.jsxs(&quot;option&quot;,{value:xe.id,children:[xe.wbs_code?`${xe.wbs_code} — `:&quot;&quot;,xe.title]},xe.id))]})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;select&quot;,{value:H,onChange:xe=&gt;q(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:W2.map(xe=&gt;t.jsx(&quot;option&quot;,{value:xe,children:Si[xe]},xe))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{value:le,onChange:xe=&gt;Y(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:I2.map(xe=&gt;t.jsx(&quot;option&quot;,{value:xe,children:qa[xe]},xe))})]})]}),i.length&gt;0&amp;&amp;!Ct&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:Z,onChange:xe=&gt;k(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),i.map(xe=&gt;t.jsxs(&quot;option&quot;,{value:xe.id,children:[xe.code,&quot; — &quot;,xe.name]},xe.id))]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:&quot;Recommandé pour les tâches opérationnelles. Les phases et jalons peuvent rester sans lot.&quot;})]}),c.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Organisation responsable&quot;,ht?&quot; *&quot;:&quot;&quot;]}),t.jsxs(&quot;select&quot;,{required:ht,value:w,onChange:xe=&gt;F(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Sélectionner —&quot;}),c.map(xe=&gt;t.jsx(&quot;option&quot;,{value:xe.id,children:xe.name},xe.id))]})]}),xt?t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Date du jalon *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,required:!0,value:ce,onChange:xe=&gt;D(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}):t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Début prévu&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:_,onChange:xe=&gt;z(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fin prévue&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:R,onChange:xe=&gt;L(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zone&quot;}),t.jsx(&quot;input&quot;,{value:J,onChange:xe=&gt;I(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:2,value:ee,onChange:xe=&gt;de(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),!Ct&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Avancement déclaré %&quot;}),t.jsx(&quot;input&quot;,{type:&quot;number&quot;,min:0,max:100,value:X,onChange:xe=&gt;fe(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),v&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Avancement validé %&quot;}),t.jsx(&quot;input&quot;,{type:&quot;number&quot;,min:0,max:100,value:je,onChange:xe=&gt;Me(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:y,disabled:j,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:j,children:j?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}function $a(l){return new Date(`${l}T12:00:00`).getTime()}function pi(l,r,i,c){const m=$a(i),f=$a(c),x=Math.max(f-m,1),b=Math.max($a(l),m),p=Math.min($a(r),f),g=(b-m)/x*100,v=(p-b)/x*100;return{left:Math.max(0,Math.min(100,g)),width:Math.max(1.5,Math.min(100-g,v))}}function t1(l,r,i){const c=$a(r),m=$a(i),f=$a(l);return f&lt;c||f&gt;m?null:(f-c)/Math.max(m-c,1)*100}function s1(l){const r=qp(l),i=Bp(l);return!r||!i?null:{start:r,end:i}}function qp(l){return l.task_type===&quot;milestone&quot;||l.is_milestone?l.milestone_date??l.planned_start_date??l.planned_end_date??null:l.planned_start_date}function Bp(l){return l.task_type===&quot;milestone&quot;||l.is_milestone?l.milestone_date??l.planned_end_date??l.planned_start_date??null:l.planned_end_date}function zn(l,r,i,c){const m=qp(l),f=Bp(l);if(!m||!f)return null;const x=pi(m,f,i,c);return r===&quot;start&quot;?x.left:x.left+x.width}function a1(l){const r=[];return l.forEach(i=&gt;{const c=r[r.length-1];c&amp;&amp;c.month===i.month?c.span+=1:r.push({month:i.month,span:1})}),r}const Hs=40,l1=14,fu=14,di=10,n1=&quot;Conflit planning : la tâche dépendante commence avant la fin de la tâche précédente.&quot;;function Eh(l,r,i,c,m){return r===&quot;finish_to_start&quot;?zn(l,i===&quot;from&quot;?&quot;end&quot;:&quot;start&quot;,c,m):r===&quot;start_to_start&quot;?zn(l,&quot;start&quot;,c,m):r===&quot;finish_to_finish&quot;?zn(l,&quot;end&quot;,c,m):r===&quot;start_to_finish&quot;?zn(l,i===&quot;from&quot;?&quot;start&quot;:&quot;end&quot;,c,m):zn(l,i===&quot;from&quot;?&quot;end&quot;:&quot;start&quot;,c,m)}function r1(l,r,i,c,m){const f=l+l1,x=c-r,b=Hs/2;let p;Math.abs(x)&lt;4?p=r+b-4:x&gt;0?p=r+Math.min(Math.max(b*.5,x*.35),x-b*.25):p=r-Math.min(b*.5,Math.abs(x)*.35);let g=Math.min(f-di,i-fu);return m?g=Math.min(g,l-di,i-fu):i&gt;l&amp;&amp;(g=Math.min(f-di,i-fu),g&gt;=f-2&amp;&amp;(g=f-di)),`M ${l} ${r} H ${f} V ${p} H ${g} V ${c} H ${i}`}function i1(l,r,i,c,m){const f=new Map(r.map(b=&gt;[b.id,b])),x=new Map(r.map((b,p)=&gt;[b.id,p]));return l.map(b=&gt;{const p=f.get(b.predecessor_task_id),g=f.get(b.successor_task_id);if(!p||!g)return null;const v=x.get(p.id),j=x.get(g.id);if(v===void 0||j===void 0)return null;const y=Eh(p,b.dependency_type,&quot;from&quot;,i,c),C=Eh(g,b.dependency_type,&quot;to&quot;,i,c);if(y===null||C===null)return null;const M=y/100*m,A=C/100*m,E=v*Hs+Hs/2,S=j*Hs+Hs/2,U=b.dependency_type===&quot;finish_to_start&quot;,T=b.conflict_reason===&quot;dates_missing&quot;?!1:b.is_schedule_conflict??(U&amp;&amp;A&lt;M-.5);return b.conflict_reason===&quot;dates_missing&quot;?null:{id:b.id,d:r1(M,E,A,S,T),isConflict:T,successorTaskId:g.id,title:T?n1:&quot;Dépendance Fin → Début&quot;}}).filter(b=&gt;b!==null)}function c1({compact:l=!1}){return t.jsxs(&quot;div&quot;,{className:`flex flex-wrap items-center gap-2 rounded-xl border border-slate-200 bg-slate-50 px-3 py-2 text-[10px] text-slate-600 lg:gap-4 lg:px-4 lg:text-xs ${l?&quot;gap-1.5&quot;:&quot;&quot;}`,children:[t.jsxs(&quot;span&quot;,{className:&quot;flex items-center gap-1.5&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;inline-block h-2.5 w-6 rounded bg-cyan-200 lg:h-3 lg:w-8&quot;}),&quot;Durée&quot;]}),t.jsxs(&quot;span&quot;,{className:&quot;flex items-center gap-1.5&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;inline-block h-2.5 w-6 rounded bg-slate-400/70 lg:h-3 lg:w-8&quot;}),&quot;Phase&quot;]}),t.jsxs(&quot;span&quot;,{className:&quot;flex items-center gap-1.5&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;inline-block h-3 w-3 bg-violet-600 lg:h-3.5 lg:w-3.5&quot;,style:{clipPath:&quot;polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)&quot;}}),&quot;Jalon&quot;]}),!l&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;span&quot;,{className:&quot;flex items-center gap-1.5&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;inline-block h-2.5 w-6 rounded bg-orange-400/80 lg:h-3 lg:w-8&quot;}),&quot;Déclaré&quot;]}),t.jsxs(&quot;span&quot;,{className:&quot;flex items-center gap-1.5&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;inline-block h-2.5 w-6 rounded bg-emerald-500/70 lg:h-3 lg:w-8&quot;}),&quot;Validé&quot;]})]}),t.jsxs(&quot;span&quot;,{className:&quot;hidden items-center gap-1.5 sm:flex&quot;,children:[t.jsx(&quot;svg&quot;,{width:&quot;28&quot;,height:&quot;14&quot;,&quot;aria-hidden&quot;:!0,className:&quot;lg:w-10 lg:h-5&quot;,children:t.jsx(&quot;path&quot;,{d:&quot;M 2 3 H 10 V 7 H 5 V 11 H 26&quot;,fill:&quot;none&quot;,stroke:&quot;#64748b&quot;,strokeWidth:&quot;1.5&quot;,strokeDasharray:&quot;3 3&quot;,markerEnd:&quot;url(#legend-dep-arrow)&quot;})}),t.jsx(&quot;span&quot;,{className:&quot;hidden lg:inline&quot;,children:&quot;Dépendance Fin → Début&quot;}),t.jsx(&quot;span&quot;,{className:&quot;lg:hidden&quot;,children:&quot;Dép.&quot;})]}),t.jsx(&quot;svg&quot;,{width:&quot;0&quot;,height:&quot;0&quot;,&quot;aria-hidden&quot;:!0,children:t.jsx(&quot;defs&quot;,{children:t.jsx(&quot;marker&quot;,{id:&quot;legend-dep-arrow&quot;,markerWidth:&quot;6&quot;,markerHeight:&quot;6&quot;,refX:&quot;5&quot;,refY:&quot;3&quot;,orient:&quot;auto&quot;,children:t.jsx(&quot;path&quot;,{d:&quot;M0,0 L6,3 L0,6 Z&quot;,fill:&quot;#64748b&quot;})})})})]})}const xu=14,o1=&quot;polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)&quot;;function u1({leftPercent:l,widthPercent:r,isLate:i=!1,title:c}){const m=l+r/2,f=xu/2;return t.jsx(&quot;span&quot;,{className:`absolute block bg-violet-600 ${i?&quot;outline outline-2 outline-offset-1 outline-rose-500&quot;:&quot;&quot;}`,style:{left:`calc(${m}% - ${f}px)`,top:&quot;50%&quot;,width:xu,height:xu,transform:&quot;translateY(-50%)&quot;,clipPath:o1},title:c,&quot;aria-hidden&quot;:!0})}const Ah=&quot;(min-width: 1024px)&quot;;function sd(){const[l,r]=d.useState(()=&gt;typeof window&gt;&quot;u&quot;?!0:window.matchMedia(Ah).matches);return d.useEffect(()=&gt;{const i=window.matchMedia(Ah),c=()=&gt;r(i.matches);return i.addEventListener(&quot;change&quot;,c),()=&gt;i.removeEventListener(&quot;change&quot;,c)},[]),l}function kh(l){const r=l.planned_start_date??l.milestone_date??&quot;—&quot;,i=l.planned_end_date??l.milestone_date??&quot;—&quot;;return r===i?r:`${r} → ${i}`}function d1({tasks:l,dependencies:r,meta:i,showDependencies:c=!0}){const m=sd(),f=m?72:48,x=a1(i.weeks),b=t1(i.today,i.period_start,i.period_end),p=i.weeks.length*f,g=l.length*Hs,v=d.useMemo(()=&gt;c?i1(r,l,i.period_start,i.period_end,p):[],[c,r,l,i.period_start,i.period_end,p]),j=d.useMemo(()=&gt;new Set(v.filter(y=&gt;y.isConflict).map(y=&gt;y.successorTaskId)),[v]);return t.jsxs(&quot;div&quot;,{className:&quot;space-y-2&quot;,children:[t.jsx(c1,{compact:!m}),!m&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500 lg:hidden&quot;,children:&quot;Faites défiler horizontalement pour parcourir la timeline. Colonnes détaillées sur grand écran.&quot;}),t.jsx(&quot;div&quot;,{className:&quot;overflow-hidden rounded-2xl border border-slate-200 bg-white shadow-sm&quot;,children:t.jsx(&quot;div&quot;,{className:&quot;max-h-[min(55vh,520px)] overflow-auto lg:max-h-[70vh]&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex min-w-max&quot;,children:[t.jsxs(&quot;div&quot;,{className:`sticky left-0 z-20 shrink-0 border-r border-slate-200 bg-white ${m?&quot;min-w-[420px]&quot;:&quot;min-w-[200px] max-w-[42vw]&quot;}`,children:[t.jsxs(&quot;div&quot;,{className:&quot;hidden grid-cols-[56px_1fr_72px_88px_88px_88px] border-b border-slate-100 bg-slate-50 text-xs font-semibold uppercase text-slate-500 lg:grid&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;WBS&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;Début&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;Fin&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;Statut&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-[40px_1fr] border-b border-slate-100 bg-slate-50 text-xs font-semibold uppercase text-slate-500 lg:hidden&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;WBS&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:&quot;Titre&quot;})]}),l.map(y=&gt;{var C;return t.jsxs(&quot;div&quot;,{children:[t.jsxs(&quot;div&quot;,{className:&quot;hidden grid-cols-[56px_1fr_72px_88px_88px_88px] border-b border-slate-50 text-sm hover:bg-slate-50/80 lg:grid&quot;,style:{paddingLeft:`${y.level*12}px`,height:Hs},children:[t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2 font-mono text-xs text-slate-500&quot;,children:y.wbs_code??&quot;—&quot;}),t.jsx(&quot;span&quot;,{className:&quot;truncate px-2 py-2&quot;,children:t.jsx(he,{to:`/tasks/${y.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:y.title})}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2 text-xs text-slate-600&quot;,children:((C=y.lot)==null?void 0:C.code)??&quot;—&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2 text-xs&quot;,children:y.planned_start_date??y.milestone_date??&quot;—&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2 text-xs&quot;,children:y.planned_end_date??y.milestone_date??&quot;—&quot;}),t.jsx(&quot;span&quot;,{className:&quot;px-2 py-2&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col items-start gap-1&quot;,children:[t.jsx(Ee,{label:qa[y.status],tone:Dn[y.status]}),c&amp;&amp;j.has(y.id)&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;rounded bg-rose-100 px-1.5 py-0.5 text-[10px] font-semibold text-rose-700&quot;,children:&quot;Conflit&quot;})]})})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-[40px_1fr] border-b border-slate-50 text-sm hover:bg-slate-50/80 lg:hidden&quot;,style:{paddingLeft:`${Math.min(y.level,2)*8}px`,height:Hs},children:[t.jsx(&quot;span&quot;,{className:&quot;px-1 py-2 font-mono text-[10px] text-slate-500&quot;,children:y.wbs_code??&quot;—&quot;}),t.jsxs(&quot;span&quot;,{className:&quot;min-w-0 px-1 py-1&quot;,children:[t.jsx(he,{to:`/tasks/${y.id}`,className:&quot;line-clamp-2 text-xs font-medium leading-tight text-planx-orange&quot;,title:`${y.title} · ${kh(y)}`,children:y.title}),t.jsx(&quot;p&quot;,{className:&quot;mt-0.5 text-[10px] text-slate-500&quot;,children:kh(y)})]})]})]},y.id)})]}),t.jsxs(&quot;div&quot;,{className:&quot;relative min-w-0 flex-1&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;sticky top-0 z-10 border-b border-slate-100 bg-slate-50&quot;,children:[t.jsx(&quot;div&quot;,{className:&quot;flex border-b border-slate-100&quot;,children:x.map(y=&gt;t.jsx(&quot;div&quot;,{className:&quot;border-r border-slate-100 px-1 py-1 text-center text-[10px] font-semibold text-slate-600 lg:px-2 lg:text-xs&quot;,style:{width:y.span*f},children:y.month},y.month))}),t.jsx(&quot;div&quot;,{className:&quot;flex&quot;,children:i.weeks.map(y=&gt;t.jsx(&quot;div&quot;,{className:&quot;border-r border-slate-100 px-0.5 py-1 text-center text-[9px] text-slate-500 lg:px-1 lg:text-[10px]&quot;,style:{width:f},children:y.label},y.key))})]}),t.jsxs(&quot;div&quot;,{className:&quot;relative&quot;,style:{width:p,height:g},children:[c&amp;&amp;v.length&gt;0&amp;&amp;t.jsxs(&quot;svg&quot;,{className:&quot;pointer-events-none absolute inset-0 z-[5]&quot;,width:p,height:g,&quot;aria-hidden&quot;:!0,children:[t.jsxs(&quot;defs&quot;,{children:[t.jsx(&quot;marker&quot;,{id:&quot;gantt-dep-arrow&quot;,markerWidth:&quot;8&quot;,markerHeight:&quot;8&quot;,refX:&quot;7&quot;,refY:&quot;4&quot;,orient:&quot;auto&quot;,children:t.jsx(&quot;path&quot;,{d:&quot;M0,0 L8,4 L0,8 Z&quot;,fill:&quot;currentColor&quot;})}),t.jsx(&quot;marker&quot;,{id:&quot;gantt-dep-arrow-conflict&quot;,markerWidth:&quot;8&quot;,markerHeight:&quot;8&quot;,refX:&quot;7&quot;,refY:&quot;4&quot;,orient:&quot;auto&quot;,children:t.jsx(&quot;path&quot;,{d:&quot;M0,0 L8,4 L0,8 Z&quot;,fill:&quot;#ef4444&quot;})})]}),v.map(y=&gt;t.jsx(&quot;path&quot;,{d:y.d,fill:&quot;none&quot;,stroke:y.isConflict?&quot;#ef4444&quot;:&quot;#64748b&quot;,strokeWidth:y.isConflict?2:1.5,strokeDasharray:&quot;4 4&quot;,markerEnd:y.isConflict?&quot;url(#gantt-dep-arrow-conflict)&quot;:&quot;url(#gantt-dep-arrow)&quot;,children:t.jsx(&quot;title&quot;,{children:y.title})},y.id))]}),b!==null&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;pointer-events-none absolute bottom-0 top-0 z-10 w-0.5 bg-rose-500&quot;,style:{left:`${b}%`},title:&quot;Aujourd&#039;hui&quot;}),l.map(y=&gt;{const C=s1(y),M=y.task_type===&quot;milestone&quot;||y.is_milestone;return t.jsx(&quot;div&quot;,{className:&quot;relative border-b border-slate-50&quot;,style:{height:Hs,paddingLeft:`${y.level*8}px`},children:C&amp;&amp;(M?t.jsx(u1,{leftPercent:pi(C.start,C.end,i.period_start,i.period_end).left,widthPercent:pi(C.start,C.end,i.period_start,i.period_end).width,isLate:y.is_late,title:y.title}):t.jsx(&quot;div&quot;,{className:`absolute top-2 h-4 rounded lg:h-5 ${y.task_type===&quot;phase&quot;?&quot;bg-slate-400/70&quot;:&quot;bg-cyan-200&quot;} ${y.is_late?&quot;ring-2 ring-rose-500&quot;:&quot;&quot;}`,style:(()=&gt;{const A=pi(C.start,C.end,i.period_start,i.period_end);return{left:`${A.left}%`,width:`${A.width}%`}})(),title:`${y.title} · déclaré ${y.declared_progress}% · validé ${y.validated_progress}%`,children:y.task_type!==&quot;phase&quot;&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;absolute inset-y-0 left-0 rounded bg-orange-400/80&quot;,style:{width:`${Math.min(y.declared_progress,100)}%`}}),t.jsx(&quot;div&quot;,{className:&quot;absolute inset-y-0 left-0 rounded bg-emerald-500/70&quot;,style:{width:`${Math.min(y.validated_progress,100)}%`}})]})}))},y.id)})]})]})]})})})]})}function ad(l){return Ae(`/projects/${l}/task-work-types`,!0)}function m1(l,r){return Se(`/projects/${l}/task-work-types`,r,!0)}function f1(l,r,i){return Ue(`/projects/${l}/task-work-types/${r}`,i,!0)}function Th(l,r){return l===&quot;planning&quot;?&quot;planning&quot;:l===&quot;list&quot;?&quot;list&quot;:r?&quot;planning&quot;:&quot;list&quot;}const x1=[{key:&quot;all&quot;,label:&quot;Toutes&quot;},{key:&quot;mine&quot;,label:&quot;Mes tâches&quot;},{key:&quot;late&quot;,label:&quot;En retard&quot;},{key:&quot;blocked&quot;,label:&quot;Bloquées&quot;},{key:&quot;pending_validation&quot;,label:&quot;À valider&quot;},{key:&quot;completed&quot;,label:&quot;Terminées&quot;}],h1=[{value:&quot;&quot;,label:&quot;Tous statuts&quot;},{value:&quot;planned&quot;,label:&quot;Prévue&quot;},{value:&quot;in_progress&quot;,label:&quot;En cours&quot;},{value:&quot;late&quot;,label:&quot;En retard&quot;},{value:&quot;pending_validation&quot;,label:&quot;À valider&quot;},{value:&quot;completed&quot;,label:&quot;Terminée&quot;}];function p1(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;SA&quot;}function g1(l,r,i){var c;switch(r){case&quot;all&quot;:return l.status!==&quot;cancelled&quot;;case&quot;mine&quot;:return i?((c=l.responsible_organization)==null?void 0:c.id)===i:!0;case&quot;late&quot;:return l.is_late||l.status===&quot;late&quot;;case&quot;blocked&quot;:return l.status===&quot;blocked&quot;;case&quot;pending_validation&quot;:return l.status===&quot;pending_validation&quot;;case&quot;completed&quot;:return l.status===&quot;completed&quot;;default:return!0}}function b1(){var Ga,ps;const{activeProject:l,activeMembership:r}=Ke(),[i,c]=Ol(),m=i.get(&quot;lot_id&quot;),f=i.get(&quot;view&quot;),x=sd(),[b,p]=d.useState(()=&gt;Th(f,x)),[g,v]=d.useState([]),[j,y]=d.useState([]),[C,M]=d.useState([]),[A,E]=d.useState(null),[S,U]=d.useState(!0),[T,P]=d.useState([]),[B,G]=d.useState([]),[K,Z]=d.useState(!0),[k,w]=d.useState(null),[F,le]=d.useState(&quot;&quot;),[Y,H]=d.useState(&quot;all&quot;),[q,_]=d.useState(m??&quot;&quot;),[z,R]=d.useState(&quot;&quot;),[L,ce]=d.useState(&quot;&quot;),[D,J]=d.useState(!1),[I,ee]=d.useState(!0),[de,X]=d.useState(!1),[fe,je]=d.useState(&quot;task&quot;),[Me,ft]=d.useState(!1),[Ft,xt]=d.useState(null),[Ct,ht]=d.useState([]),[bt,Bt]=d.useState(&quot;&quot;),xe=A==null?void 0:A.planning,Et=d.useCallback(async()=&gt;{if(!l)return;const ie=m?{lot_id:Number(m)}:{};bt&amp;&amp;(ie.task_work_type_id=Number(bt));const[ke,ne,_e]=await Promise.all([Ni(l.id,ie),Tt(l.id),ad(l.id).catch(()=&gt;({data:[]}))]);ht(_e.data),v(ke.data),G(ke.meta.organizations),P(ne.data.filter(we=&gt;we.status!==&quot;archived&quot;))},[l,m,bt]),os=d.useCallback(async()=&gt;{if(!l)return;const ie={search:F.trim()||void 0,hide_closed:I,only_late:D||void 0};q&amp;&amp;(ie.lot_id=Number(q)),z&amp;&amp;(ie.status=z),L&amp;&amp;(ie.responsible_organization_id=Number(L));const[ke,ne]=await Promise.all([WN(l.id,ie),Tt(l.id)]);y(ke.data),M(ke.dependencies??[]),E(ke.meta),G(ke.meta.organizations),P(ne.data.filter(_e=&gt;_e.status!==&quot;archived&quot;))},[l,F,I,D,q,z,L]),zt=d.useCallback(async()=&gt;{if(l){Z(!0),w(null);try{b===&quot;planning&quot;?await os():await Et()}catch(ie){ie instanceof me&amp;&amp;ie.status===403?w(&quot;Accès refusé aux tâches.&quot;):w(&quot;Impossible de charger les tâches.&quot;),v([]),y([]),M([])}finally{Z(!1)}}},[l,b,Et,os]);d.useEffect(()=&gt;{zt()},[zt]),d.useEffect(()=&gt;{p(Th(f,x))},[f,x]);function Mt(ie){p(ie);const ke=new URLSearchParams(i);ke.set(&quot;view&quot;,ie),c(ke,{replace:!0})}d.useEffect(()=&gt;{b===&quot;list&quot;&amp;&amp;Et()},[bt,b,Et]);const nt=d.useMemo(()=&gt;{const ie=F.trim().toLowerCase();return g.filter(ke=&gt;{var ne,_e,we;return bt&amp;&amp;String(ke.task_work_type_id??&quot;&quot;)!==bt||!g1(ke,Y,(ne=r==null?void 0:r.organization)==null?void 0:ne.id)?!1:ie?ke.code.toLowerCase().includes(ie)||ke.title.toLowerCase().includes(ie)||(((_e=ke.lot)==null?void 0:_e.code.toLowerCase().includes(ie))??!1)||(((we=ke.responsible_organization)==null?void 0:we.name.toLowerCase().includes(ie))??!1):!0})},[g,F,Y,(Ga=r==null?void 0:r.organization)==null?void 0:Ga.id,bt]),us=d.useMemo(()=&gt;j.filter(ie=&gt;ie.task_type===&quot;phase&quot;),[j]),et=d.useMemo(()=&gt;{if(b===&quot;planning&quot;&amp;&amp;A)return{total:A.summary.tasks_total,late:A.summary.late_tasks,pending:0,avgValidated:A.summary.average_validated_progress,phases:A.summary.phases_total,milestones:A.summary.milestones_total};const ie=g.filter(we=&gt;we.status!==&quot;cancelled&quot;),ke=ie.filter(we=&gt;we.is_late||we.status===&quot;late&quot;).length,ne=ie.filter(we=&gt;we.status===&quot;pending_validation&quot;).length,_e=ie.length&gt;0?Math.round(ie.reduce((we,Qs)=&gt;we+Qs.validated_progress,0)/ie.length):0;return{total:ie.length,late:ke,pending:ne,avgValidated:_e,phases:0,milestones:0}},[b,A,g]);async function Ba(ie){if(l){ft(!0);try{const ke={...ie,task_type:fe===&quot;milestone&quot;?&quot;milestone&quot;:fe===&quot;phase&quot;?&quot;phase&quot;:ie.task_type??&quot;task&quot;,is_milestone:fe===&quot;milestone&quot;};await t2(l.id,ke),X(!1),xt(fe===&quot;milestone&quot;?&quot;Jalon créé avec succès.&quot;:fe===&quot;phase&quot;?&quot;Phase créée avec succès.&quot;:&quot;Tâche créée avec succès.&quot;),await zt()}catch(ke){w(ke instanceof me?ke.message:&quot;Erreur lors de la création.&quot;)}finally{ft(!1)}}}function Ns(ie){je(ie),X(!0)}const At=r==null?void 0:r.role_code,Zs=p1(At),Ha=(xe==null?void 0:xe.canCreateMilestone)??(At===&quot;AC&quot;||At===&quot;CP&quot;||At===&quot;MOE&quot;),Va=(xe==null?void 0:xe.canCreatePhase)??(At===&quot;AC&quot;||At===&quot;CP&quot;||At===&quot;MOE&quot;),Ya=m?(ps=T.find(ie=&gt;ie.id===Number(m)))==null?void 0:ps.code:null;return K?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des tâches…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:x?&quot;Planning / Tâches&quot;:&quot;Tâches&quot;,subtitle:x?&quot;Vue liste et planning du chantier actif&quot;:&quot;Liste et planning du chantier actif&quot;,action:Zs?t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;Ns(&quot;task&quot;),children:&quot;Créer une tâche&quot;}),Ha&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;md&quot;,onClick:()=&gt;Ns(&quot;milestone&quot;),children:&quot;Créer un jalon&quot;})]}):void 0}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;Mt(&quot;list&quot;),className:`inline-flex items-center gap-1.5 rounded-full px-4 py-2 text-sm font-medium transition ${b===&quot;list&quot;?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:[t.jsx(Ua,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Liste&quot;]}),t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;Mt(&quot;planning&quot;),className:`inline-flex items-center gap-1.5 rounded-full px-4 py-2 text-sm font-medium transition ${b===&quot;planning&quot;?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:[t.jsx(yp,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Planning&quot;]})]}),Ya&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Filtre lot actif : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:Ya}),&quot; · &quot;,t.jsx(he,{to:&quot;/tasks&quot;,className:&quot;text-planx-orange hover:underline&quot;,children:&quot;Voir toutes les tâches&quot;})]}),Ft&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,role:&quot;status&quot;,children:Ft}),k&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:k}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:b===&quot;planning&quot;?&quot;Tâches&quot;:&quot;Total tâches&quot;,value:String(et.total),subtitle:b===&quot;planning&quot;?`${et.phases} phases · ${et.milestones} jalons`:&quot;Hors annulées&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;En retard&quot;,value:String(et.late),subtitle:&quot;Échéance dépassée&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;À valider&quot;,value:String(et.pending),subtitle:&quot;En attente MOE/CP&quot;,tone:&quot;amber&quot;}),t.jsx(be,{title:&quot;Avancement validé moyen&quot;,value:`${et.avgValidated}%`,subtitle:&quot;Toutes tâches visibles&quot;,tone:&quot;emerald&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher une tâche…&quot;,value:F,onChange:ie=&gt;le(ie.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),b===&quot;list&quot;&amp;&amp;Ct.length&gt;0&amp;&amp;t.jsxs(&quot;select&quot;,{value:bt,onChange:ie=&gt;{Bt(ie.target.value)},className:&quot;rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm shadow-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;Type métier : tous&quot;}),Ct.map(ie=&gt;t.jsxs(&quot;option&quot;,{value:ie.id,children:[ie.code,&quot; — &quot;,ie.name]},ie.id))]}),b===&quot;list&quot;&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:x1.map(ie=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;H(ie.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${Y===ie.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:ie.label},ie.key))})]}),b===&quot;planning&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-end gap-3 rounded-xl border border-slate-200 bg-white p-3 shadow-sm&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;block text-xs font-medium text-slate-500&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:q,onChange:ie=&gt;_(ie.target.value),className:&quot;mt-1 rounded-lg border border-slate-200 px-2 py-1.5 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;Tous&quot;}),T.map(ie=&gt;t.jsx(&quot;option&quot;,{value:ie.id,children:ie.code},ie.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;block text-xs font-medium text-slate-500&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{value:z,onChange:ie=&gt;R(ie.target.value),className:&quot;mt-1 rounded-lg border border-slate-200 px-2 py-1.5 text-sm&quot;,children:h1.map(ie=&gt;t.jsx(&quot;option&quot;,{value:ie.value,children:ie.label},ie.value||&quot;all&quot;))})]}),t.jsxs(&quot;label&quot;,{className:&quot;text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;block text-xs font-medium text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsxs(&quot;select&quot;,{value:L,onChange:ie=&gt;ce(ie.target.value),className:&quot;mt-1 rounded-lg border border-slate-200 px-2 py-1.5 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;Tous&quot;}),B.map(ie=&gt;t.jsx(&quot;option&quot;,{value:ie.id,children:ie.name},ie.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:D,onChange:ie=&gt;J(ie.target.checked),className:&quot;rounded border-slate-300&quot;}),&quot;Retard uniquement&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:I,onChange:ie=&gt;ee(ie.target.checked),className:&quot;rounded border-slate-300&quot;}),&quot;Masquer clôturées&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:S,onChange:ie=&gt;U(ie.target.checked),className:&quot;rounded border-slate-300&quot;}),&quot;Afficher dépendances&quot;]}),t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void zt(),children:&quot;Appliquer&quot;})]})]}),b===&quot;list&quot;?nt.length===0?t.jsx(Ve,{title:&quot;Aucune tâche trouvée&quot;,description:g.length===0?&quot;Aucune tâche n’est disponible pour votre périmètre sur ce chantier.&quot;:&quot;Aucune tâche ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Type&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Début&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Fin&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Déclaré&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Validé&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:nt.map(ie=&gt;{var ke,ne,_e;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:ie.code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-xs text-slate-600&quot;,children:((ke=ie.task_work_type)==null?void 0:ke.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[200px] truncate px-4 py-3 font-medium text-slate-800&quot;,children:ie.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:((ne=ie.lot)==null?void 0:ne.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:((_e=ie.responsible_organization)==null?void 0:_e.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:qa[ie.status],tone:Dn[ie.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:Si[ie.priority]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:ie.planned_start_date??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:ie.planned_end_date??&quot;—&quot;}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[ie.declared_progress,&quot;%&quot;]}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[ie.validated_progress,&quot;%&quot;]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/tasks/${ie.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},ie.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:nt.map(ie=&gt;{var ke,ne,_e;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold uppercase text-planx-orange&quot;,children:ie.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:ie.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[(ke=ie.task_work_type)!=null&amp;&amp;ke.code?`${ie.task_work_type.code} · `:&quot;&quot;,((ne=ie.lot)==null?void 0:ne.code)??&quot;—&quot;,&quot; · &quot;,((_e=ie.responsible_organization)==null?void 0:_e.name)??&quot;—&quot;]})]}),t.jsx(Ee,{label:qa[ie.status],tone:Dn[ie.status]})]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:Si[ie.priority]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:ie.planned_end_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Déclaré&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:[ie.declared_progress,&quot;%&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Validé&quot;}),t.jsxs(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:[ie.validated_progress,&quot;%&quot;]})]})]}),t.jsx(he,{to:`/tasks/${ie.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},ie.id)})})]}):A?t.jsx(t.Fragment,{children:t.jsx(d1,{tasks:j,dependencies:C,meta:A,showDependencies:S})}):t.jsx(Ve,{title:&quot;Planning indisponible&quot;,description:&quot;Impossible d’afficher le planning.&quot;}),t.jsx($p,{open:de,title:fe===&quot;milestone&quot;?&quot;Créer un jalon&quot;:fe===&quot;phase&quot;?&quot;Créer une phase&quot;:&quot;Créer une tâche&quot;,mode:fe,lots:T,organizations:B,parentPhases:us,taskWorkTypes:Ct,canCreatePhase:Va,canCreateMilestone:Ha,canEditValidatedProgress:At===&quot;AC&quot;||At===&quot;CP&quot;||At===&quot;MOE&quot;,isSubmitting:Me,onClose:()=&gt;X(!1),onSubmit:Ba})]})}function j1({open:l,currentProgress:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(String(r)),[b,p]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(x(String(r)),p(&quot;&quot;))},[l,r]),!l)return null;async function g(v){v.preventDefault(),await m({declared_progress:Number(f),comment:b.trim()||void 0})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Déclarer l’avancement&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:v=&gt;void g(v),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Avancement déclaré % *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;number&quot;,required:!0,min:0,max:100,value:f,onChange:v=&gt;x(v.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire&quot;}),t.jsx(&quot;textarea&quot;,{rows:3,value:b,onChange:v=&gt;p(v.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Déclarer&quot;})]})]})]})})}const v1=[&quot;accepted&quot;,&quot;corrected&quot;,&quot;rejected&quot;];function y1({open:l,currentValidated:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(String(r)),[b,p]=d.useState(&quot;accepted&quot;),[g,v]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(x(String(r)),p(&quot;accepted&quot;),v(&quot;&quot;))},[l,r]),!l)return null;async function j(y){y.preventDefault(),await m({validated_progress:Number(f),decision:b,comment:g.trim()||void 0})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Valider l’avancement&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:y=&gt;void j(y),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Avancement validé % *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;number&quot;,required:!0,min:0,max:100,value:f,onChange:y=&gt;x(y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Décision&quot;}),t.jsx(&quot;select&quot;,{value:b,onChange:y=&gt;p(y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:v1.map(y=&gt;t.jsx(&quot;option&quot;,{value:y,children:Up[y]},y))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire&quot;}),t.jsx(&quot;textarea&quot;,{rows:3,value:g,onChange:y=&gt;v(y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Valider&quot;})]})]})]})})}const Hp={photo:&quot;Photo&quot;,file:&quot;Fichier&quot;,proof:&quot;Preuve&quot;,annex:&quot;Annexe&quot;,other:&quot;Autre&quot;};function N1(l){var c;if(!l)return&quot;&quot;;const r=new URLSearchParams;l.module&amp;&amp;r.set(&quot;module&quot;,l.module),l.attachable_id!==void 0&amp;&amp;r.set(&quot;attachable_id&quot;,String(l.attachable_id)),l.attachable_type&amp;&amp;r.set(&quot;attachable_type&quot;,l.attachable_type),l.attachment_type&amp;&amp;r.set(&quot;attachment_type&quot;,l.attachment_type),l.uploaded_by_id!==void 0&amp;&amp;r.set(&quot;uploaded_by_id&quot;,String(l.uploaded_by_id)),(c=l.search)!=null&amp;&amp;c.trim()&amp;&amp;r.set(&quot;search&quot;,l.search.trim()),l.archived&amp;&amp;r.set(&quot;archived&quot;,&quot;1&quot;);const i=r.toString();return i?`?${i}`:&quot;&quot;}function _1(l,r){return Ae(`/projects/${l}/attachments${N1(r)}`,!0)}function S1(l,r,i){const c=new FormData;return c.append(&quot;module&quot;,r.module),c.append(&quot;attachable_id&quot;,String(r.attachable_id)),c.append(&quot;attachment_type&quot;,r.attachment_type),r.title&amp;&amp;c.append(&quot;title&quot;,r.title),r.description&amp;&amp;c.append(&quot;description&quot;,r.description),c.append(&quot;file&quot;,i),Zn(`/projects/${l}/attachments`,c)}function w1(l,r){return Hi(`/projects/${l}/attachments/${r}/download`)}function C1(l,r){return Ue(`/projects/${l}/attachments/${r}/archive`)}function E1(l,r){const i=URL.createObjectURL(l),c=document.createElement(&quot;a&quot;);c.href=i,c.download=r,c.click(),URL.revokeObjectURL(i)}function A1(l){return l===null||l===0?&quot;—&quot;:l&lt;1024?`${l} o`:l&lt;1024*1024?`${(l/1024).toFixed(1)} Ko`:`${(l/(1024*1024)).toFixed(1)} Mo`}function k1({attachment:l,isDownloading:r=!1,isArchiving:i=!1,onDownload:c,onArchive:m}){var x;const f=l.title??l.original_filename;return t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-start justify-between gap-2 rounded-lg border border-slate-100 bg-slate-50 px-3 py-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;rounded bg-slate-200 px-1.5 py-0.5 text-[10px] font-semibold uppercase text-slate-700&quot;,children:Hp[l.attachment_type]}),l.is_image&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-[10px] text-slate-500&quot;,children:&quot;Image&quot;})]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 truncate text-sm font-medium text-slate-800&quot;,title:f,children:f}),t.jsxs(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:[((x=l.uploaded_by)==null?void 0:x.name)??&quot;—&quot;,&quot; ·&quot;,&quot; &quot;,l.created_at?new Date(l.created_at).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;,&quot; &quot;,&quot;· &quot;,A1(l.file_size)]}),l.description&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-600&quot;,children:l.description})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex shrink-0 gap-1&quot;,children:[l.permissions.canDownload&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:r,onClick:c,&quot;aria-label&quot;:&quot;Télécharger&quot;,children:t.jsx(hp,{className:&quot;h-4 w-4&quot;})}),l.permissions.canArchive&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:i,onClick:m,&quot;aria-label&quot;:&quot;Archiver&quot;,children:t.jsx(Yi,{className:&quot;h-4 w-4&quot;})})]})]})}const T1=[&quot;photo&quot;,&quot;file&quot;,&quot;proof&quot;,&quot;annex&quot;,&quot;other&quot;];function z1({open:l,title:r,defaultType:i=&quot;file&quot;,photoCapture:c=!1,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(i),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(null),[A,E]=d.useState(null);if(d.useEffect(()=&gt;{l&amp;&amp;(p(i),v(&quot;&quot;),y(&quot;&quot;),M(null),E(null))},[l,i]),!l)return null;async function S(U){if(U.preventDefault(),!C){E(&quot;Veuillez sélectionner un fichier.&quot;);return}if(C.size&gt;20*1024*1024){E(&quot;Le fichier ne doit pas dépasser 20 Mo.&quot;);return}E(null);try{await x({attachment_type:b,title:g.trim()||void 0,description:j.trim()||void 0,file:C})}catch{}}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-black/40 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-5 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;attachment-upload-title&quot;,children:[t.jsx(&quot;h2&quot;,{id:&quot;attachment-upload-title&quot;,className:&quot;text-lg font-semibold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{className:&quot;mt-4 space-y-3&quot;,onSubmit:U=&gt;void S(U),children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type&quot;}),t.jsx(&quot;select&quot;,{value:b,onChange:U=&gt;p(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:T1.map(U=&gt;t.jsx(&quot;option&quot;,{value:U,children:Hp[U]},U))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre (optionnel)&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:g,onChange:U=&gt;v(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description (optionnelle)&quot;}),t.jsx(&quot;textarea&quot;,{value:j,onChange:U=&gt;y(U.target.value),rows:2,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fichier *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;file&quot;,required:!0,accept:c?&quot;image/*,.pdf,.doc,.docx,.xls,.xlsx,.txt,.zip&quot;:&quot;.jpg,.jpeg,.png,.webp,.pdf,.doc,.docx,.xls,.xlsx,.txt,.zip,image/*&quot;,capture:c?&quot;environment&quot;:void 0,onChange:U=&gt;{var T;return M(((T=U.target.files)==null?void 0:T[0])??null)},className:&quot;mt-1 w-full text-sm&quot;})]}),A&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:A}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;md&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;md&quot;,disabled:m,children:m?&quot;Envoi…&quot;:&quot;Envoyer&quot;})]})]})]})})}function Xn({projectId:l,module:r,attachableId:i,canUpload:c,title:m=&quot;Pièces jointes&quot;,emptyLabel:f=&quot;Aucune pièce jointe.&quot;,defaultAttachmentType:x=&quot;file&quot;,photoCapture:b=!1,uploadButtonLabel:p=&quot;Ajouter photo / fichier&quot;,openUploadSignal:g=0}){const[v,j]=d.useState([]),[y,C]=d.useState(!0),[M,A]=d.useState(null),[E,S]=d.useState(null),[U,T]=d.useState(!1),[P,B]=d.useState(!1),[G,K]=d.useState(null),[Z,k]=d.useState(null),w=d.useCallback(async()=&gt;{C(!0),A(null);try{const H=await _1(l,{module:r,attachable_id:i});j(H.data)}catch(H){A(H instanceof me?H.message:&quot;Impossible de charger les pièces jointes.&quot;)}finally{C(!1)}},[l,r,i]);d.useEffect(()=&gt;{w()},[w]),d.useEffect(()=&gt;{g&gt;0&amp;&amp;T(!0)},[g]);async function F(H){B(!0),A(null);try{const q={module:r,attachable_id:i,attachment_type:H.attachment_type,title:H.title,description:H.description};await S1(l,q,H.file),T(!1),S(&quot;Pièce jointe ajoutée.&quot;),await w()}catch(q){throw A(q instanceof me?q.message:&quot;Échec de l’envoi du fichier.&quot;),q}finally{B(!1)}}async function le(H){K(H),A(null);try{const{blob:q,filename:_}=await w1(l,H);E1(q,_)}catch(q){A(q instanceof me?q.message:&quot;Téléchargement impossible.&quot;)}finally{K(null)}}async function Y(H){k(H),A(null);try{await C1(l,H),S(&quot;Pièce jointe archivée.&quot;),j(q=&gt;q.filter(_=&gt;_.id!==H))}catch(q){A(q instanceof me?q.message:&quot;Archivage impossible.&quot;)}finally{k(null)}}return t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm sm:p-5&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800 sm:text-base&quot;,children:m}),c&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[b&amp;&amp;t.jsxs($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(!0),children:[t.jsx(Yv,{className:&quot;mr-1 h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Photo&quot;]}),t.jsxs($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(!0),children:[t.jsx(Np,{className:&quot;mr-1 h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),p]})]})]}),E&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 rounded-lg bg-emerald-50 px-2 py-1 text-xs text-emerald-700&quot;,children:E}),M&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 rounded-lg bg-rose-50 px-2 py-1 text-xs text-rose-700&quot;,children:M}),y?t.jsx(&quot;p&quot;,{className:&quot;mt-3 text-sm text-slate-500&quot;,children:&quot;Chargement…&quot;}):v.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-3 text-sm text-slate-500&quot;,children:f}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2&quot;,children:v.map(H=&gt;t.jsx(k1,{attachment:H,isDownloading:G===H.id,isArchiving:Z===H.id,onDownload:()=&gt;void le(H.id),onArchive:()=&gt;void Y(H.id)},H.id))}),t.jsx(z1,{open:U,title:b?&quot;Ajouter une photo&quot;:&quot;Ajouter une pièce jointe&quot;,defaultType:x,photoCapture:b,isSubmitting:P,onClose:()=&gt;T(!1),onSubmit:F})]})}function Vp(l){if(!l)return&quot;&quot;;const r=new URLSearchParams;l.module&amp;&amp;r.set(&quot;module&quot;,l.module),l.markerable_id!==void 0&amp;&amp;r.set(&quot;markerable_id&quot;,String(l.markerable_id)),l.site_plan_id!==void 0&amp;&amp;r.set(&quot;site_plan_id&quot;,String(l.site_plan_id)),l.site_zone_id!==void 0&amp;&amp;r.set(&quot;site_zone_id&quot;,String(l.site_zone_id)),l.marker_type&amp;&amp;r.set(&quot;marker_type&quot;,l.marker_type);const i=r.toString();return i?`?${i}`:&quot;&quot;}function ld(l){return Ae(`/projects/${l}/locations/context`,!0)}function M1(l){return Ae(`/projects/${l}/locations/zones`,!0)}function D1(l,r){return Se(`/projects/${l}/locations/zones`,r,!0)}function R1(l,r,i){return Ue(`/projects/${l}/locations/zones/${r}`,i,!0)}function O1(l,r){return Ue(`/projects/${l}/locations/zones/${r}/archive`,{},!0)}function L1(l){return Ae(`/projects/${l}/locations/plans`,!0)}function U1(l,r,i){const c=new FormData;return c.append(&quot;code&quot;,r.code),c.append(&quot;name&quot;,r.name),c.append(&quot;plan_type&quot;,r.plan_type),r.description&amp;&amp;c.append(&quot;description&quot;,r.description),r.site_zone_id&amp;&amp;c.append(&quot;site_zone_id&quot;,String(r.site_zone_id)),r.level_label&amp;&amp;c.append(&quot;level_label&quot;,r.level_label),r.revision_label&amp;&amp;c.append(&quot;revision_label&quot;,r.revision_label),r.status&amp;&amp;c.append(&quot;status&quot;,r.status),c.append(&quot;file&quot;,i),Zn(`/projects/${l}/locations/plans`,c,!0)}function $1(l,r){return Ue(`/projects/${l}/locations/plans/${r}/archive`,{},!0)}async function q1(l,r){return Hi(`/projects/${l}/locations/plans/${r}/file`)}function B1(l,r,i){return Ae(`/projects/${l}/locations/plans/${r}/markers${Vp(i)}`,!0)}function H1(l,r){return Ae(`/projects/${l}/locations/markers${Vp(r)}`,!0)}function V1(l,r,i){return Se(`/projects/${l}/locations/plans/${r}/markers`,i,!0)}const nd={site:&quot;Site&quot;,building:&quot;Bâtiment&quot;,floor:&quot;Niveau&quot;,area:&quot;Zone&quot;,room:&quot;Local&quot;,technical_room:&quot;Local technique&quot;,outdoor:&quot;Extérieur&quot;,other:&quot;Autre&quot;},rd={site_plan:&quot;Plan de site&quot;,floor_plan:&quot;Plan de niveau&quot;,technical_plan:&quot;Plan technique&quot;,evacuation_plan:&quot;Plan d&#039;évacuation&quot;,other:&quot;Autre&quot;},Ti={point:&quot;Point chantier&quot;,task:&quot;Tâche&quot;};function Yp({projectId:l,module:r,markerableId:i,canLocalize:c,localizeHref:m}){const[f,x]=d.useState([]),[b,p]=d.useState(!0),[g,v]=d.useState(null),j=d.useCallback(async()=&gt;{p(!0),v(null);try{const C=await H1(l,{module:r,markerable_id:i});x(C.data.filter(M=&gt;M.status!==&quot;archived&quot;))}catch(C){C instanceof me&amp;&amp;C.status===403?(v(null),x([])):v(&quot;Impossible de charger la localisation.&quot;)}finally{p(!1)}},[l,r,i]);d.useEffect(()=&gt;{j()},[j]);const y=m??`/locations?module=${r}&amp;markerable_id=${i}&amp;add_marker=1`;return t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Localisation&quot;}),c&amp;&amp;t.jsx(he,{to:y,className:&quot;inline-flex items-center justify-center rounded-lg border border-slate-200 bg-white px-3 py-1.5 text-xs font-medium text-slate-700 hover:bg-slate-50&quot;,children:&quot;Localiser sur plan&quot;})]}),b&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Chargement…&quot;}),g&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-rose-600&quot;,children:g}),!b&amp;&amp;!g&amp;&amp;f.length===0&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:r===&quot;point&quot;?&quot;Ce point n&#039;est pas encore localisé sur un plan.&quot;:&quot;Cette tâche n&#039;est pas encore localisée sur un plan.&quot;}),!b&amp;&amp;f.length&gt;0&amp;&amp;t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-3&quot;,children:f.map(C=&gt;{var M;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg border border-slate-100 bg-slate-50 p-3 text-sm&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;font-medium text-slate-900&quot;,children:[((M=C.plan)==null?void 0:M.name)??&quot;Plan&quot;,&quot; — &quot;,C.label??C.target.code]}),t.jsxs(&quot;p&quot;,{className:&quot;text-slate-600&quot;,children:[Ti[C.module],&quot; ·&quot;,&quot; &quot;,C.zone?`${C.zone.code} — ${C.zone.name}`:&quot;Zone non renseignée&quot;]}),t.jsxs(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:[&quot;Position : &quot;,C.x_percent.toFixed(1),&quot; % × &quot;,C.y_percent.toFixed(1),&quot; %&quot;]}),C.plan&amp;&amp;t.jsx(he,{to:`/locations?plan_id=${C.site_plan_id}&amp;marker_id=${C.id}`,className:&quot;mt-2 inline-block text-sm font-medium text-planx-orange hover:underline&quot;,children:&quot;Voir sur plan&quot;})]},C.id)})}),t.jsx(&quot;p&quot;,{className:&quot;mt-3 text-xs text-slate-400&quot;,children:&quot;Une photo peut prouver un élément localisé ; les preuves terrain pourront être affichées sur plan dans une évolution ultérieure.&quot;})]})}function Gp({field:l,answer:r,readOnly:i,onChange:c}){const m=(r==null?void 0:r.value_boolean)??null,f=(r==null?void 0:r.value_text)??&quot;&quot;,x=(r==null?void 0:r.comment)??&quot;&quot;;if(l.field_type===&quot;section&quot;)return t.jsxs(&quot;div&quot;,{className:&quot;border-t border-slate-200 pt-4 first:border-t-0 first:pt-0&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-900&quot;,children:l.label}),l.help_text&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:l.help_text})]});if(l.field_type===&quot;separator&quot;)return t.jsxs(&quot;div&quot;,{className:&quot;py-2&quot;,role:&quot;separator&quot;,children:[t.jsx(&quot;hr&quot;,{className:&quot;border-slate-200&quot;}),l.label&amp;&amp;l.label!==&quot;—&quot;&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-center text-xs text-slate-400&quot;,children:l.label})]});function b(){switch(l.field_type){case&quot;checkbox&quot;:return t.jsxs(&quot;label&quot;,{className:&quot;flex min-h-[44px] cursor-pointer items-center gap-3 rounded-lg border border-slate-200 bg-white px-3 py-2&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:!!m,disabled:i,onChange:p=&gt;c({value_boolean:p.target.checked}),className:&quot;h-5 w-5 rounded border-slate-300 text-planx-orange&quot;}),t.jsx(&quot;span&quot;,{className:&quot;text-sm text-slate-800&quot;,children:l.label})]});case&quot;yes_no&quot;:return t.jsx(&quot;div&quot;,{className:&quot;flex gap-2&quot;,children:[&quot;true&quot;,&quot;false&quot;].map(p=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,disabled:i,onClick:()=&gt;c({value_boolean:p===&quot;true&quot;}),className:`min-h-[44px] flex-1 rounded-lg border px-3 py-2 text-sm font-medium ${String(m)===p?&quot;border-planx-orange bg-fc-green-soft text-planx-orange&quot;:&quot;border-slate-200 bg-white text-slate-600&quot;}`,children:p===&quot;true&quot;?&quot;Oui&quot;:&quot;Non&quot;},p))});case&quot;textarea&quot;:return t.jsx(&quot;textarea&quot;,{value:f,disabled:i,rows:3,onChange:p=&gt;c({value_text:p.target.value}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;});case&quot;number&quot;:return t.jsx(&quot;input&quot;,{type:&quot;number&quot;,value:(r==null?void 0:r.value_number)??&quot;&quot;,disabled:i,onChange:p=&gt;c({value_number:p.target.value===&quot;&quot;?null:Number(p.target.value)}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;});case&quot;date&quot;:return t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:(r==null?void 0:r.value_date)??&quot;&quot;,disabled:i,onChange:p=&gt;c({value_date:p.target.value||null}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;});case&quot;select&quot;:return t.jsxs(&quot;select&quot;,{value:f,disabled:i,onChange:p=&gt;c({value_text:p.target.value}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Sélectionner —&quot;}),(l.options_json??[]).map(p=&gt;t.jsx(&quot;option&quot;,{value:p,children:p},p))]});default:return t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:f,disabled:i,onChange:p=&gt;c({value_text:p.target.value}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})}}return l.field_type===&quot;checkbox&quot;?t.jsxs(&quot;div&quot;,{className:&quot;space-y-2&quot;,children:[b(),l.requires_attachment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-fc-gold-dark&quot;,children:&quot;Preuve attendue — ajoutez la preuve dans la section Photos / pièces jointes.&quot;}),(l.requires_comment||x)&amp;&amp;t.jsx(&quot;textarea&quot;,{value:x,disabled:i,placeholder:&quot;Commentaire&quot;,rows:2,onChange:p=&gt;c({comment:p.target.value}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-2&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;text-sm font-medium text-slate-800&quot;,children:[l.label,l.is_required&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-rose-500&quot;,children:&quot; *&quot;})]}),l.help_text&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:l.help_text}),b(),l.requires_attachment&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;inline-block rounded-full bg-amber-50 px-2 py-0.5 text-xs font-medium text-amber-800&quot;,children:&quot;Preuve attendue&quot;}),(l.requires_comment||x)&amp;&amp;t.jsx(&quot;textarea&quot;,{value:x,disabled:i,placeholder:&quot;Commentaire&quot;,rows:2,onChange:p=&gt;c({comment:p.target.value}),className:&quot;w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})}const Au={checklist:&quot;Checklist&quot;,form:&quot;Formulaire&quot;},Y1={draft:&quot;Brouillon&quot;,submitted:&quot;Soumis&quot;,accepted:&quot;Validé&quot;,rejected:&quot;Rejeté&quot;,archived:&quot;Archivé&quot;},Zp={checkbox:&quot;Case à cocher&quot;,yes_no:&quot;Oui / Non&quot;,text:&quot;Texte court&quot;,textarea:&quot;Texte long&quot;,number:&quot;Nombre&quot;,date:&quot;Date&quot;,select:&quot;Liste de choix&quot;,section:&quot;Section&quot;,separator:&quot;Séparateur&quot;},ku={task:&quot;Tâche&quot;,point:&quot;Point chantier&quot;},G1={draft:&quot;orange&quot;,submitted:&quot;blue&quot;,accepted:&quot;green&quot;,rejected:&quot;red&quot;,archived:&quot;gray&quot;};function Qp({status:l}){return t.jsx(Ee,{label:Y1[l],tone:G1[l]})}function ba(l){return l===&quot;section&quot;||l===&quot;separator&quot;}function Xp(l){return!ba(l)}function Tu(l,r){const i=l.normalize(&quot;NFD&quot;).replace(/[\u0300-\u036f]/g,&quot;&quot;).toLowerCase().replace(/[^a-z0-9]+/g,&quot;_&quot;).replace(/^_|_$/g,&quot;&quot;)||&quot;champ&quot;;let c=i,m=1;for(;r.includes(c);)c=`${i}_${m}`,m+=1;return c}function Z1(l,r){const c={checkbox:{label:&quot;Nouvelle case à cocher&quot;,field_type:&quot;checkbox&quot;},yes_no:{label:&quot;Question oui / non&quot;,field_type:&quot;yes_no&quot;},text:{label:&quot;Texte court&quot;,field_type:&quot;text&quot;},textarea:{label:&quot;Texte long&quot;,field_type:&quot;textarea&quot;},number:{label:&quot;Valeur numérique&quot;,field_type:&quot;number&quot;},date:{label:&quot;Date&quot;,field_type:&quot;date&quot;},select:{label:&quot;Liste de choix&quot;,field_type:&quot;select&quot;,options_json:[&quot;Option 1&quot;,&quot;Option 2&quot;]},section:{label:&quot;Nouvelle section&quot;,field_type:&quot;section&quot;,is_required:!1},separator:{label:&quot;—&quot;,field_type:&quot;separator&quot;,is_required:!1}}[l];return{code:null,label:c.label??&quot;Champ&quot;,field_type:l,is_required:c.is_required??!1,requires_comment:!1,requires_attachment:!1,options_json:c.options_json??null,help_text:null,expected_value:null,sort_order:r}}function zh(l){const r=[];return l.map((i,c)=&gt;{var x;const m=i.label.trim()||&quot;Sans libellé&quot;;let f=((x=i.code)==null?void 0:x.trim())||Tu(m,r);return r.includes(f)&amp;&amp;(f=Tu(m,r)),r.push(f),{...i,code:f,label:m,sort_order:c+1,is_required:ba(i.field_type)?!1:i.is_required,requires_comment:ba(i.field_type)?!1:i.requires_comment,requires_attachment:ba(i.field_type)?!1:i.requires_attachment,options_json:i.field_type===&quot;select&quot;?(i.options_json??[]).map(b=&gt;b.trim()).filter(Boolean):null}})}function Q1(l,r,i){const c={};l.trim()||(c.code=&quot;Le code est requis.&quot;),r.trim()||(c.name=&quot;Le nom est requis.&quot;),i.length===0&amp;&amp;(c.fields=&quot;Ajoutez au moins un champ.&quot;);const m={},f=new Set;return i.forEach((x,b)=&gt;{x.label.trim()||(m[b]=&quot;Le libellé est requis.&quot;),x.field_type===&quot;select&quot;&amp;&amp;!(x.options_json??[]).filter(Boolean).length&amp;&amp;(m[b]=&quot;Ajoutez au moins une option pour la liste de choix.&quot;);const p=(x.code??&quot;&quot;).trim()||Tu(x.label,[]);f.has(p)&amp;&amp;(m[b]=&quot;Code de champ en double dans ce modèle.&quot;),f.add(p)}),Object.keys(m).length&amp;&amp;(c.fieldIndex=m),c}function X1({submission:l,onSave:r,onSubmit:i,onAccept:c,onReject:m,isSubmitting:f}){var A,E;const[x,b]=d.useState(l.answers??[]),[p,g]=d.useState(&quot;&quot;),[v,j]=d.useState(&quot;&quot;);d.useEffect(()=&gt;{b(l.answers??[]),g(&quot;&quot;),j(&quot;&quot;)},[l]);const y=!l.permissions.canEdit||l.status===&quot;accepted&quot;||l.status===&quot;archived&quot;;function C(S,U){b(T=&gt;T.map(P=&gt;P.form_template_field_id===S?{...P,...U,form_template_field_id:S}:P))}const M=P1(l.template_fields,l.answers??[]);return t.jsxs(&quot;div&quot;,{className:&quot;space-y-4 rounded-xl border border-slate-200 bg-slate-50 p-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:l.title??((A=l.template)==null?void 0:A.name)}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:(E=l.template)==null?void 0:E.code})]}),t.jsx(Qp,{status:l.status})]}),l.status===&quot;rejected&quot;&amp;&amp;l.review_comment&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;rounded-lg border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-800&quot;,children:[&quot;Motif du rejet : &quot;,l.review_comment]}),t.jsx(&quot;ul&quot;,{className:&quot;space-y-4&quot;,children:M.map(S=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Gp,{field:S.field,answer:S.answer,readOnly:y,onChange:U=&gt;{S.answer&amp;&amp;C(S.answer.form_template_field_id,U)}})},S.key))}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:&quot;Les preuves terrain se déposent dans la section Photos / pièces jointes de la fiche.&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2 border-t border-slate-200 pt-3&quot;,children:[l.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:f,onClick:()=&gt;void r(x.filter(S=&gt;!S.field||Xp(S.field.field_type))),children:&quot;Enregistrer brouillon&quot;}),l.permissions.canSubmit&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:f,onClick:()=&gt;void i(),children:&quot;Soumettre&quot;}),l.permissions.canReview&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:p,onChange:S=&gt;g(S.target.value),placeholder:&quot;Commentaire de validation (optionnel)&quot;,className:&quot;min-w-[200px] flex-1 rounded-lg border border-slate-200 px-3 py-1.5 text-sm&quot;}),t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:f,onClick:()=&gt;void c(p.trim()||void 0),children:&quot;Valider&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:v,onChange:S=&gt;j(S.target.value),placeholder:&quot;Motif du rejet *&quot;,className:&quot;min-w-[200px] flex-1 rounded-lg border border-slate-200 px-3 py-1.5 text-sm&quot;}),t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,disabled:f||!v.trim(),onClick:()=&gt;void m(v.trim()),children:&quot;Rejeter&quot;})]})]})]})}function P1(l,r){if(l!=null&amp;&amp;l.length){const i=new Map(r.map(c=&gt;[c.form_template_field_id,c]));return[...l].sort((c,m)=&gt;c.sort_order-m.sort_order).map(c=&gt;{if(ba(c.field_type))return{key:`layout-${c.id??c.code??c.label}`,field:c};const m=c.id?i.get(c.id):void 0;return{key:`field-${c.id??c.code}`,field:(m==null?void 0:m.field)??c,answer:m}})}return r.filter(i=&gt;i.field&amp;&amp;Xp(i.field.field_type)).sort((i,c)=&gt;{var m,f;return(((m=i.field)==null?void 0:m.sort_order)??0)-(((f=c.field)==null?void 0:f.sort_order)??0)}).map(i=&gt;({key:`field-${i.form_template_field_id}`,field:i.field,answer:i}))}function F1(l,r){return Ae(`/projects/${l}/tasks/${r}/form-submissions`,!0)}function K1(l,r){return Ae(`/projects/${l}/form-submissions/${r}`,!0)}function J1(l,r,i){return Se(`/projects/${l}/tasks/${r}/form-submissions`,i,!0)}function I1(l,r,i){return Ue(`/projects/${l}/form-submissions/${r}`,i,!0)}function W1(l,r){return Ue(`/projects/${l}/form-submissions/${r}/submit`,{},!0)}function e_(l,r,i){return Ue(`/projects/${l}/form-submissions/${r}/accept`,{review_comment:i},!0)}function t_(l,r,i){return Ue(`/projects/${l}/form-submissions/${r}/reject`,{review_comment:i},!0)}function s_(l){if(!l)return&quot;&quot;;const r=new URLSearchParams;l.target_module&amp;&amp;r.set(&quot;target_module&quot;,l.target_module),l.template_kind&amp;&amp;r.set(&quot;template_kind&quot;,l.template_kind);const i=r.toString();return i?`?${i}`:&quot;&quot;}function Pp(l,r){return Ae(`/projects/${l}/form-templates${s_(r)}`,!0)}function a_(l,r){return Ae(`/projects/${l}/form-templates/${r}`,!0)}function l_(l,r){return Se(`/projects/${l}/form-templates`,r,!0)}function n_(l,r,i){return Ue(`/projects/${l}/form-templates/${r}`,i,!0)}function r_(l,r){return Ue(`/projects/${l}/form-templates/${r}/archive`,{},!0)}function i_({projectId:l,taskId:r,taskWorkType:i,formPermissions:c}){const[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState(null),[v,j]=d.useState(null),[y,C]=d.useState(!0),[M,A]=d.useState(!1),[E,S]=d.useState(null),[U,T]=d.useState(!1),[P,B]=d.useState(&quot;&quot;),G=d.useCallback(async()=&gt;{C(!0),S(null);try{const[_,z]=await Promise.all([F1(l,r),Pp(l,{target_module:&quot;task&quot;})]);f(_.data),b(z.data)}catch(_){S(_ instanceof me?_.message:&quot;Impossible de charger les formulaires.&quot;)}finally{C(!1)}},[l,r]),K=d.useCallback(async _=&gt;{try{const z=await K1(l,_);j(z.data),g(_)}catch{j(null)}},[l]);d.useEffect(()=&gt;{G()},[G]);const Z=!!(c!=null&amp;&amp;c.canCreateSubmission),k=(i==null?void 0:i.default_form_template_id)&amp;&amp;!m.some(_=&gt;_.form_template_id===i.default_form_template_id);async function w(_){A(!0);try{const z=await J1(l,r,{form_template_id:_});await G(),await K(z.data.id),T(!1),B(&quot;&quot;)}catch(z){S(z instanceof me?z.message:&quot;Erreur lors de la création.&quot;)}finally{A(!1)}}async function F(){i!=null&amp;&amp;i.default_form_template_id&amp;&amp;await w(i.default_form_template_id)}async function le(_){if(p){A(!0);try{const z=await I1(l,p,{answers:_.map(R=&gt;({form_template_field_id:R.form_template_field_id,value_text:R.value_text,value_number:R.value_number,value_date:R.value_date,value_boolean:R.value_boolean,comment:R.comment,is_conform:R.is_conform}))});j(z.data),await G()}catch(z){S(z instanceof me?z.message:&quot;Erreur lors de l’enregistrement.&quot;)}finally{A(!1)}}}async function Y(){if(p){A(!0);try{const _=await W1(l,p);j(_.data),await G()}catch(_){S(_ instanceof me?_.message:&quot;Erreur lors de la soumission.&quot;)}finally{A(!1)}}}async function H(_){if(p){A(!0);try{const z=await e_(l,p,_);j(z.data),await G()}catch(z){S(z instanceof me?z.message:&quot;Erreur lors de la validation.&quot;)}finally{A(!1)}}}async function q(_){if(p){A(!0);try{const z=await t_(l,p,_);j(z.data),await G()}catch(z){S(z instanceof me?z.message:&quot;Erreur lors du rejet.&quot;)}finally{A(!1)}}}return t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Checklists et formulaires&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[Z&amp;&amp;k&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:M,onClick:()=&gt;void F(),children:&quot;Appliquer checklist par défaut&quot;}),Z&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(_=&gt;!_),children:&quot;Ajouter checklist / formulaire&quot;})]})]}),E&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-rose-600&quot;,children:E}),U&amp;&amp;Z&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-3 flex flex-wrap items-end gap-2 rounded-lg border border-dashed border-slate-200 p-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block flex-1 text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Modèle&quot;}),t.jsxs(&quot;select&quot;,{value:P,onChange:_=&gt;B(_.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Choisir —&quot;}),x.map(_=&gt;t.jsxs(&quot;option&quot;,{value:_.id,children:[_.code,&quot; — &quot;,_.name]},_.id))]})]}),t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:!P||M,onClick:()=&gt;void w(Number(P)),children:&quot;Créer&quot;})]}),y&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-3 text-sm text-slate-500&quot;,children:&quot;Chargement…&quot;}),!y&amp;&amp;m.length===0&amp;&amp;t.jsx(Ve,{className:&quot;mt-3&quot;,title:&quot;Aucune checklist&quot;,description:&quot;Ajoutez une checklist ou un formulaire pour documenter cette tâche.&quot;}),!y&amp;&amp;m.length&gt;0&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-4 grid gap-4 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.2fr)]&quot;,children:[t.jsx(&quot;ul&quot;,{className:&quot;space-y-2&quot;,children:m.map(_=&gt;{var z,R;return t.jsx(&quot;li&quot;,{children:t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;void K(_.id),className:`w-full rounded-lg border px-3 py-2 text-left text-sm transition ${p===_.id?&quot;border-planx-orange bg-fc-green-soft&quot;:&quot;border-slate-100 bg-slate-50 hover:border-slate-200&quot;}`,children:[t.jsx(&quot;p&quot;,{className:&quot;font-medium text-slate-900&quot;,children:_.title??((z=_.template)==null?void 0:z.name)}),t.jsxs(&quot;div&quot;,{className:&quot;mt-1 flex flex-wrap items-center gap-2&quot;,children:[t.jsx(Qp,{status:_.status}),t.jsx(&quot;span&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((R=_.submitter)==null?void 0:R.name)??&quot;—&quot;})]})]})},_.id)})}),v?t.jsx(X1,{submission:v,onSave:le,onSubmit:Y,onAccept:H,onReject:q,isSubmitting:M}):t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Sélectionnez une soumission pour l’ouvrir.&quot;})]})]})}const c_=[&quot;planned&quot;,&quot;in_progress&quot;,&quot;blocked&quot;,&quot;late&quot;,&quot;pending_validation&quot;,&quot;validated&quot;,&quot;completed&quot;,&quot;cancelled&quot;];function o_(){var D,J;const{taskId:l}=Ys(),{activeProject:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState(!0),[v,j]=d.useState(null),[y,C]=d.useState(!1),[M,A]=d.useState(!1),[E,S]=d.useState(!1),[U,T]=d.useState(!1),[P,B]=d.useState(null),[G,K]=d.useState(&quot;planned&quot;),[Z,k]=d.useState(null),[w,F]=d.useState([]),le=d.useCallback(async()=&gt;{if(!(!r||!l)){g(!0),j(null);try{const[I,ee]=await Promise.all([e2(r.id,Number(l)),Tt(r.id)]);c(I.data),K(I.data.status),f(ee.data.filter(de=&gt;de.status!==&quot;archived&quot;)),b(ee.meta.organizations);try{const de=await ad(r.id);F(de.data)}catch{F([])}try{const de=await ld(r.id);k(de.permissions)}catch{k(null)}}catch(I){I instanceof me&amp;&amp;I.status===403?j(&quot;Accès refusé à cette tâche.&quot;):I instanceof me&amp;&amp;I.status===404?j(&quot;Tâche introuvable.&quot;):j(&quot;Impossible de charger la tâche.&quot;)}finally{g(!1)}}},[r,l]);d.useEffect(()=&gt;{le()},[le]);async function Y(I){if(!(!r||!i)){T(!0);try{const ee=await s2(r.id,i.id,I);c(ee.data),C(!1),B(&quot;Tâche mise à jour avec succès.&quot;)}catch(ee){j(ee instanceof me?ee.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{T(!1)}}}async function H(I){if(!(!r||!i)){T(!0);try{const ee=await l2(r.id,i.id,I);c(ee.data),A(!1),B(&quot;Avancement déclaré avec succès.&quot;)}catch(ee){j(ee instanceof me?ee.message:&quot;Erreur lors de la déclaration.&quot;)}finally{T(!1)}}}async function q(I){if(!(!r||!i)){T(!0);try{const ee=await n2(r.id,i.id,I);c(ee.data),S(!1),B(&quot;Avancement validé avec succès.&quot;)}catch(ee){j(ee instanceof me?ee.message:&quot;Erreur lors de la validation.&quot;)}finally{T(!1)}}}async function _(){if(!(!r||!i)){T(!0);try{const I=await a2(r.id,i.id,{status:G});c(I.data),B(&quot;Statut mis à jour.&quot;)}catch(I){j(I instanceof me?I.message:&quot;Erreur lors du changement de statut.&quot;)}finally{T(!1)}}}if(p)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement de la tâche…&quot;})});if(v&amp;&amp;!i)return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/tasks&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour aux tâches&quot;]}),t.jsx(Ve,{title:&quot;Tâche indisponible&quot;,description:v})]});if(!i)return null;const z=i.declared_progress-i.validated_progress,R=i.task_type===&quot;phase&quot;,L=i.task_type===&quot;milestone&quot;||i.is_milestone,ce=!R&amp;&amp;!L;return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/tasks&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour aux tâches&quot;]}),P&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:P}),v&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:v}),t.jsx(Je,{title:`${i.code} — ${i.title}`,subtitle:i.zone_text??&quot;Tâche chantier&quot;,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(Ee,{label:qa[i.status],tone:Dn[i.status]}),i.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;C(!0),children:&quot;Modifier&quot;}),i.permissions.canDeclareProgress&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;A(!0),children:&quot;Déclarer avancement&quot;}),i.permissions.canValidateProgress&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(!0),children:&quot;Valider avancement&quot;})]})}),ce&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Avancement déclaré&quot;,value:`${i.declared_progress}%`,subtitle:&quot;Déclaration entreprise&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;Avancement validé&quot;,value:`${i.validated_progress}%`,subtitle:&quot;Validation MOE/CP&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Écart déclaré / validé&quot;,value:`${z&gt;0?&quot;+&quot;:&quot;&quot;}${z}%`,subtitle:z&gt;0?&quot;Écart à valider&quot;:&quot;Aligné&quot;,tone:z&gt;10?&quot;red&quot;:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Priorité&quot;,value:Si[i.priority],subtitle:i.is_late?&quot;En retard&quot;:&quot;Dans les délais&quot;,tone:i.is_late?&quot;red&quot;:&quot;cyan&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Nature WBS&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium text-slate-800&quot;,children:Lp[i.task_type??&quot;task&quot;]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Type métier&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium text-slate-800&quot;,children:((D=i.task_work_type)==null?void 0:D.name)??&quot;Non défini&quot;})]}),i.wbs_code&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;WBS&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-mono font-medium text-slate-800&quot;,children:i.wbs_code})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium text-slate-800&quot;,children:i.lot?`${i.lot.code} — ${i.lot.name}`:&quot;Non rattachée à un lot&quot;})]}),i.parent_task&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Phase parente&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;text-right font-medium text-slate-800&quot;,children:t.jsxs(he,{to:`/tasks/${i.parent_task.id}`,className:&quot;text-planx-orange hover:underline&quot;,children:[i.parent_task.wbs_code?`${i.parent_task.wbs_code} · `:&quot;&quot;,i.parent_task.title]})})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium text-slate-800&quot;,children:((J=i.responsible_organization)==null?void 0:J.name)??&quot;—&quot;})]}),(i.task_type===&quot;milestone&quot;||i.is_milestone)&amp;&amp;i.milestone_date&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Date jalon&quot;}),t.jsx(&quot;dd&quot;,{children:i.milestone_date})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Début prévu&quot;}),t.jsx(&quot;dd&quot;,{children:i.planned_start_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Fin prévue&quot;}),t.jsx(&quot;dd&quot;,{children:i.planned_end_date??&quot;—&quot;})]}),(i.actual_start_date||i.actual_end_date)&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Début réel&quot;}),t.jsx(&quot;dd&quot;,{children:i.actual_start_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Fin réelle&quot;}),t.jsx(&quot;dd&quot;,{children:i.actual_end_date??&quot;—&quot;})]})]}),i.description&amp;&amp;t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Description&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:i.description})]})]}),i.dependencies&amp;&amp;(i.dependencies.incoming.length&gt;0||i.dependencies.outgoing.length&gt;0)&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-4 border-t border-slate-100 pt-4&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Dépendances planning&quot;}),i.dependencies.incoming.length&gt;0&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-2&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-medium text-slate-500&quot;,children:&quot;Prédécesseurs&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-1 space-y-1 text-sm&quot;,children:i.dependencies.incoming.map(I=&gt;t.jsx(&quot;li&quot;,{children:I.linked_task?t.jsxs(he,{to:`/tasks/${I.linked_task.id}`,className:&quot;text-planx-orange hover:underline&quot;,children:[I.linked_task.code,&quot; — &quot;,I.linked_task.title]}):&quot;—&quot;},I.id))})]}),i.dependencies.outgoing.length&gt;0&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-3&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-medium text-slate-500&quot;,children:&quot;Successeurs&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-1 space-y-1 text-sm&quot;,children:i.dependencies.outgoing.map(I=&gt;t.jsx(&quot;li&quot;,{children:I.linked_task?t.jsxs(he,{to:`/tasks/${I.linked_task.id}`,className:&quot;text-planx-orange hover:underline&quot;,children:[I.linked_task.code,&quot; — &quot;,I.linked_task.title]}):&quot;—&quot;},I.id))})]})]}),i.permissions.canChangeStatus&amp;&amp;ce&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-4 flex flex-wrap items-end gap-2 border-t border-slate-100 pt-4&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Changer le statut&quot;}),t.jsx(&quot;select&quot;,{value:G,onChange:I=&gt;K(I.target.value),className:&quot;mt-1 block rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:c_.map(I=&gt;t.jsx(&quot;option&quot;,{value:I,children:qa[I]},I))})]}),t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:U||G===i.status,onClick:()=&gt;void _(),children:&quot;Appliquer&quot;})]})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Historique déclarations&quot;}),i.progress_declarations.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune déclaration enregistrée.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.progress_declarations.map(I=&gt;{var ee;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:[I.declared_progress,&quot;%&quot;]}),&quot; · &quot;,((ee=I.declared_by)==null?void 0:ee.name)??&quot;—&quot;,I.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:I.comment})]},I.id)})})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Historique validations&quot;}),i.progress_validations.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune validation enregistrée.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.progress_validations.map(I=&gt;{var ee;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:[I.validated_progress,&quot;%&quot;]}),&quot; · &quot;,Up[I.decision],&quot; · &quot;,((ee=I.validated_by)==null?void 0:ee.name)??&quot;—&quot;,I.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:I.comment})]},I.id)})})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-4&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Commentaires / activité&quot;}),i.comments.length&gt;0?t.jsx(&quot;ul&quot;,{className:&quot;mt-2 space-y-2 text-sm&quot;,children:i.comments.map(I=&gt;{var ee;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-white px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:((ee=I.author)==null?void 0:ee.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:I.body})]},I.id)})}):t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:&quot;Aucun commentaire pour le moment. Le fil d’activité complet arrive dans un prochain lot.&quot;})]}),r&amp;&amp;t.jsx(i_,{projectId:r.id,taskId:i.id,taskWorkType:i.task_work_type_id?w.find(I=&gt;I.id===i.task_work_type_id)??null:null,formPermissions:i.form_permissions??null}),r&amp;&amp;t.jsx(Yp,{projectId:r.id,module:&quot;task&quot;,markerableId:i.id,canLocalize:!!(Z!=null&amp;&amp;Z.canCreateMarkers)&amp;&amp;(i.permissions.canEdit||i.permissions.canDeclareProgress)}),r&amp;&amp;t.jsx(Xn,{projectId:r.id,module:&quot;task&quot;,attachableId:i.id,canUpload:i.permissions.canEdit||i.permissions.canDeclareProgress||i.permissions.canValidateProgress,title:&quot;Photos et pièces jointes&quot;,emptyLabel:&quot;Aucune photo ni pièce jointe sur cette tâche.&quot;,defaultAttachmentType:&quot;photo&quot;,photoCapture:!0,uploadButtonLabel:&quot;Ajouter preuve&quot;})]})]}),t.jsx($p,{open:y,title:&quot;Modifier la tâche&quot;,lots:m,organizations:x,taskWorkTypes:w,initial:i,isSubmitting:U,onClose:()=&gt;C(!1),onSubmit:Y}),t.jsx(j1,{open:M,currentProgress:i.declared_progress,isSubmitting:U,onClose:()=&gt;A(!1),onSubmit:H}),t.jsx(y1,{open:E,currentValidated:i.validated_progress,isSubmitting:U,onClose:()=&gt;S(!1),onSubmit:q})]})}const u_=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;];function Fp({open:l,title:r,roleCode:i,lots:c,organizations:m,initial:f,isSubmitting:x,onClose:b,onSubmit:p}){const g=Eu(i),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(g[0]??&quot;observation&quot;),[M,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;&quot;),[U,T]=d.useState(&quot;&quot;),[P,B]=d.useState(&quot;&quot;),[G,K]=d.useState(&quot;normal&quot;),[Z,k]=d.useState(&quot;&quot;),[w,F]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{var H,q,_;if(!l)return;const Y=Eu(i);j((f==null?void 0:f.code)??&quot;&quot;),C((f==null?void 0:f.type)??Y[0]??&quot;observation&quot;),A((f==null?void 0:f.title)??&quot;&quot;),S((f==null?void 0:f.description)??&quot;&quot;),T(((H=f==null?void 0:f.lot_id)==null?void 0:H.toString())??&quot;&quot;),B(((_=(q=f==null?void 0:f.responsible_organization)==null?void 0:q.id)==null?void 0:_.toString())??&quot;&quot;),K((f==null?void 0:f.priority)??&quot;normal&quot;),k((f==null?void 0:f.due_date)??&quot;&quot;),F((f==null?void 0:f.zone_text)??&quot;&quot;)},[l,f,i]),!l||g.length===0)return null;async function le(Y){Y.preventDefault(),await p({code:v.trim().toUpperCase(),type:y,title:M.trim(),description:E.trim(),zone_text:w.trim()||void 0,lot_id:U?Number(U):null,responsible_organization_id:P?Number(P):null,priority:G,due_date:Z||null})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:Y=&gt;void le(Y),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:v,onChange:Y=&gt;j(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type *&quot;}),t.jsx(&quot;select&quot;,{value:y,onChange:Y=&gt;C(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:g.map(Y=&gt;t.jsx(&quot;option&quot;,{value:Y,children:wi[Y]},Y))})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:M,onChange:Y=&gt;A(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:3,value:E,onChange:Y=&gt;S(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),c.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:U,onChange:Y=&gt;T(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),c.map(Y=&gt;t.jsxs(&quot;option&quot;,{value:Y.id,children:[Y.code,&quot; — &quot;,Y.name]},Y.id))]})]}),m.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation responsable&quot;}),t.jsxs(&quot;select&quot;,{value:P,onChange:Y=&gt;B(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),m.map(Y=&gt;t.jsx(&quot;option&quot;,{value:Y.id,children:Y.name},Y.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;select&quot;,{value:G,onChange:Y=&gt;K(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:u_.map(Y=&gt;t.jsx(&quot;option&quot;,{value:Y,children:Rn[Y]},Y))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:Z,onChange:Y=&gt;k(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zone&quot;}),t.jsx(&quot;input&quot;,{value:w,onChange:Y=&gt;F(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:b,disabled:x,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:x,children:x?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const d_=[{key:&quot;all&quot;,label:&quot;Tous&quot;},{key:&quot;mine&quot;,label:&quot;Mes points&quot;},{key:&quot;critical&quot;,label:&quot;Critiques&quot;},{key:&quot;late&quot;,label:&quot;En retard&quot;},{key:&quot;to_verify&quot;,label:&quot;À vérifier&quot;},{key:&quot;rfi&quot;,label:&quot;RFI&quot;},{key:&quot;non_conformity&quot;,label:&quot;Non-conformités&quot;}];function m_(l,r,i){var c;switch(r){case&quot;all&quot;:return l.status!==&quot;cancelled&quot;;case&quot;mine&quot;:return i?((c=l.responsible_organization)==null?void 0:c.id)===i:!0;case&quot;critical&quot;:return l.priority===&quot;critical&quot;;case&quot;late&quot;:return l.is_late;case&quot;to_verify&quot;:return l.status===&quot;to_verify&quot;;case&quot;rfi&quot;:return l.type===&quot;rfi&quot;;case&quot;non_conformity&quot;:return l.type===&quot;non_conformity&quot;;default:return!0}}function f_(){var H,q;const{activeProject:l,activeMembership:r}=Ke(),[i]=Ol(),c=i.get(&quot;lot_id&quot;),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState([]),[v,j]=d.useState(!0),[y,C]=d.useState(null),[M,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;all&quot;),[U,T]=d.useState(!1),[P,B]=d.useState(!1),[G,K]=d.useState(null),Z=d.useCallback(async()=&gt;{if(l){j(!0),C(null);try{const _=c?{lot_id:Number(c)}:void 0,[z,R]=await Promise.all([_i(l.id,_),Tt(l.id)]);f(z.data),g(z.meta.organizations),b(R.data.filter(L=&gt;L.status!==&quot;archived&quot;))}catch(_){_ instanceof me&amp;&amp;_.status===403?C(&quot;Accès refusé à la liste des points.&quot;):C(&quot;Impossible de charger les points.&quot;),f([])}finally{j(!1)}}},[l,c]);d.useEffect(()=&gt;{Z()},[Z]);const k=d.useMemo(()=&gt;{const _=M.trim().toLowerCase();return m.filter(z=&gt;{var R,L;return m_(z,E,(R=r==null?void 0:r.organization)==null?void 0:R.id)?_?z.code.toLowerCase().includes(_)||z.title.toLowerCase().includes(_)||(((L=z.lot)==null?void 0:L.code.toLowerCase().includes(_))??!1):!0:!1})},[m,M,E,(H=r==null?void 0:r.organization)==null?void 0:H.id]),w=d.useMemo(()=&gt;{const _=m.filter(ce=&gt;![&quot;closed&quot;,&quot;cancelled&quot;,&quot;rejected&quot;].includes(ce.status)),z=_.filter(ce=&gt;ce.priority===&quot;critical&quot;).length,R=_.filter(ce=&gt;ce.is_late).length,L=_.filter(ce=&gt;ce.status===&quot;to_verify&quot;).length;return{open:_.length,critical:z,late:R,toVerify:L}},[m]);async function F(_){if(l){B(!0);try{await c2(l.id,_),T(!1),K(&quot;Point créé avec succès.&quot;),await Z()}catch(z){C(z instanceof me?z.message:&quot;Erreur lors de la création.&quot;)}finally{B(!1)}}}const le=Q2(r==null?void 0:r.role_code),Y=c?(q=x.find(_=&gt;_.id===Number(c)))==null?void 0:q.code:null;return v?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des points…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Points chantier&quot;,subtitle:&quot;Réserves, observations, blocages, RFI et non-conformités&quot;,action:le?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;T(!0),children:&quot;Créer un point&quot;}):void 0}),Y&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Filtre lot : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:Y}),&quot; · &quot;,t.jsx(he,{to:&quot;/points&quot;,className:&quot;text-planx-orange hover:underline&quot;,children:&quot;Voir tous les points&quot;})]}),G&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,role:&quot;status&quot;,children:G}),y&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:y}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Points ouverts&quot;,value:String(w.open),subtitle:&quot;Hors clôturés&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Critiques&quot;,value:String(w.critical),subtitle:&quot;Priorité critique&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;En retard&quot;,value:String(w.late),subtitle:&quot;Échéance dépassée&quot;,tone:&quot;amber&quot;}),t.jsx(be,{title:&quot;À vérifier&quot;,value:String(w.toVerify),subtitle:&quot;Corrections déclarées&quot;,tone:&quot;violet&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher un point…&quot;,value:M,onChange:_=&gt;A(_.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:d_.map(_=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;S(_.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${E===_.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:_.label},_.key))})]}),k.length===0?t.jsx(Ve,{title:&quot;Aucun point trouvé&quot;,description:m.length===0?&quot;Aucun point n’est disponible pour votre périmètre sur ce chantier.&quot;:&quot;Aucun point ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Type&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:k.map(_=&gt;{var z,R;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:_.code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:wi[_.type]}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[180px] truncate px-4 py-3 font-medium&quot;,children:_.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((z=_.lot)==null?void 0:z.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((R=_.responsible_organization)==null?void 0:R.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Rn[_.priority]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:kl[_.status],tone:Ci[_.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:_.due_date??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:_.is_late?&quot;Oui&quot;:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/points/${_.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},_.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:k.map(_=&gt;{var z,R;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:_.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:_.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[wi[_.type],&quot; · &quot;,((z=_.lot)==null?void 0:z.code)??&quot;—&quot;]})]}),t.jsx(Ee,{label:kl[_.status],tone:Ci[_.status]})]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:Rn[_.priority]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:_.due_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:((R=_.responsible_organization)==null?void 0:R.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:_.is_late?&quot;Oui&quot;:&quot;Non&quot;})]})]}),t.jsx(he,{to:`/points/${_.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},_.id)})})]}),t.jsx(Fp,{open:U,title:&quot;Créer un point&quot;,roleCode:r==null?void 0:r.role_code,lots:x,organizations:p,isSubmitting:P,onClose:()=&gt;T(!1),onSubmit:F})]})}function x_({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;f(&quot;&quot;)},[l]),!l)return null;async function x(b){b.preventDefault(),await c(m.trim())}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Ajouter un commentaire&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:b=&gt;void x(b),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:4,value:m,onChange:b=&gt;f(b.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}const h_={&quot;mark-corrected&quot;:&quot;Marquer comme corrigé&quot;,verify:&quot;Vérifier la correction&quot;,close:&quot;Clôturer le point&quot;};function p_({open:l,action:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(&quot;&quot;),[b,p]=d.useState(!0);if(d.useEffect(()=&gt;{l&amp;&amp;(x(&quot;&quot;),p(!0))},[l]),!l)return null;async function g(j){j.preventDefault(),!(r===&quot;close&quot;&amp;&amp;!f.trim())&amp;&amp;await m({comment:f.trim()||void 0,accepted:r===&quot;verify&quot;?b:void 0})}const v=r===&quot;close&quot;;return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:h_[r]}),t.jsxs(&quot;form&quot;,{onSubmit:j=&gt;void g(j),className:&quot;mt-4 space-y-3&quot;,children:[r===&quot;verify&quot;&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:b,onChange:j=&gt;p(j.target.checked),className:&quot;rounded border-slate-300&quot;}),t.jsx(&quot;span&quot;,{children:&quot;Correction acceptée&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Commentaire&quot;,v?&quot; *&quot;:&quot;&quot;]}),t.jsx(&quot;textarea&quot;,{required:v,rows:3,value:f,onChange:j=&gt;x(j.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Confirmer&quot;})]})]})]})})}function g_(){var q;const{pointId:l}=Ys(),{activeProject:r,activeMembership:i}=Ke(),[c,m]=d.useState(null),[f,x]=d.useState([]),[b,p]=d.useState([]),[g,v]=d.useState(!0),[j,y]=d.useState(null),[C,M]=d.useState(!1),[A,E]=d.useState(!1),[S,U]=d.useState(null),[T,P]=d.useState(!1),[B,G]=d.useState(null),[K,Z]=d.useState(0),[k,w]=d.useState(null),F=d.useCallback(async()=&gt;{if(!(!r||!l)){v(!0),y(null);try{const[_,z]=await Promise.all([i2(r.id,Number(l)),Tt(r.id)]);m(_.data),x(z.data.filter(R=&gt;R.status!==&quot;archived&quot;)),p(z.meta.organizations);try{const R=await ld(r.id);w(R.permissions)}catch{w(null)}}catch(_){_ instanceof me&amp;&amp;_.status===403?y(&quot;Accès refusé à ce point.&quot;):_ instanceof me&amp;&amp;_.status===404?y(&quot;Point introuvable.&quot;):y(&quot;Impossible de charger le point.&quot;)}finally{v(!1)}}},[r,l]);d.useEffect(()=&gt;{F()},[F]);async function le(_){if(!(!r||!c)){P(!0);try{const z=await o2(r.id,c.id,_);m(z.data),M(!1),G(&quot;Point mis à jour avec succès.&quot;)}catch(z){y(z instanceof me?z.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{P(!1)}}}async function Y(_){if(!(!r||!c)){P(!0);try{const z=await u2(r.id,c.id,{body:_});m(z.data),E(!1),G(&quot;Commentaire ajouté.&quot;)}catch(z){y(z instanceof me?z.message:&quot;Erreur lors du commentaire.&quot;)}finally{P(!1)}}}async function H(_){if(!(!r||!c||!S)){P(!0);try{let z;S===&quot;mark-corrected&quot;?z=await d2(r.id,c.id,_):S===&quot;verify&quot;?z=await m2(r.id,c.id,_):z=await f2(r.id,c.id,{comment:_.comment??&quot;&quot;}),m(z.data),U(null),G(&quot;Action enregistrée avec succès.&quot;)}catch(z){y(z instanceof me?z.message:&quot;Erreur lors de l’action.&quot;)}finally{P(!1)}}}return g?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du point…&quot;})}):j&amp;&amp;!c?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/points&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour aux points&quot;]}),t.jsx(Ve,{title:&quot;Point indisponible&quot;,description:j})]}):c?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/points&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour aux points&quot;]}),B&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:B}),j&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:j}),t.jsx(Je,{title:`${c.code} — ${c.title}`,subtitle:`${wi[c.type]} · ${c.zone_text??&quot;Point chantier&quot;}`,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(Ee,{label:kl[c.status],tone:Ci[c.status]}),c.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;M(!0),children:&quot;Modifier&quot;}),c.permissions.canComment&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(!0),children:&quot;Commenter&quot;}),(c.permissions.canComment||c.permissions.canMarkCorrected||c.permissions.canEdit)&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Z(_=&gt;_+1),children:&quot;Photo&quot;}),c.permissions.canMarkCorrected&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;U(&quot;mark-corrected&quot;),children:&quot;Marquer corrigé&quot;}),c.permissions.canVerify&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;U(&quot;verify&quot;),children:&quot;Vérifier&quot;}),c.permissions.canClose&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;U(&quot;close&quot;),children:&quot;Clôturer&quot;})]})}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;dd&quot;,{children:c.lot?`${c.lot.code} — ${c.lot.name}`:&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{children:((q=c.responsible_organization)==null?void 0:q.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;dd&quot;,{children:Rn[c.priority]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Échéance&quot;}),t.jsxs(&quot;dd&quot;,{children:[c.due_date??&quot;—&quot;,c.is_late?&quot; (en retard)&quot;:&quot;&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Description&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:c.description})]})]})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Commentaires&quot;}),c.comments.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun commentaire.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:c.comments.map(_=&gt;{var z;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:((z=_.author)==null?void 0:z.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:_.body})]},_.id)})})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Historique des statuts&quot;}),c.status_histories.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun historique.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:c.status_histories.map(_=&gt;{var z;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:[_.old_status?kl[_.old_status]:&quot;—&quot;,&quot; → &quot;,kl[_.new_status]]}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((z=_.changed_by)==null?void 0:z.name)??&quot;—&quot;}),_.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:_.comment})]},_.id)})})]}),r&amp;&amp;t.jsx(Yp,{projectId:r.id,module:&quot;point&quot;,markerableId:c.id,canLocalize:!!(k!=null&amp;&amp;k.canCreateMarkers)&amp;&amp;(c.permissions.canEdit||c.permissions.canAssign||c.permissions.canMarkCorrected)}),r&amp;&amp;t.jsx(Xn,{projectId:r.id,module:&quot;point&quot;,attachableId:c.id,canUpload:c.permissions.canComment||c.permissions.canMarkCorrected||c.permissions.canEdit,title:&quot;Photos, preuves et pièces jointes&quot;,emptyLabel:&quot;Aucune photo ni preuve sur ce point.&quot;,defaultAttachmentType:&quot;photo&quot;,photoCapture:!0,openUploadSignal:K})]})]}),t.jsx(Fp,{open:C,title:&quot;Modifier le point&quot;,roleCode:i==null?void 0:i.role_code,lots:f,organizations:b,initial:c,isSubmitting:T,onClose:()=&gt;M(!1),onSubmit:le}),t.jsx(x_,{open:A,isSubmitting:T,onClose:()=&gt;E(!1),onSubmit:Y}),t.jsx(p_,{open:S!==null,action:S??&quot;close&quot;,isSubmitting:T,onClose:()=&gt;U(null),onSubmit:H})]}):null}function b_(l){return l.module===&quot;task&quot;?l.target.status===&quot;completed&quot;?&quot;bg-emerald-500&quot;:&quot;bg-cyan-500&quot;:l.target.priority===&quot;critical&quot;||l.target.status===&quot;late&quot;?&quot;bg-rose-500&quot;:&quot;bg-fc-green-soft0&quot;}function j_({marker:l,selected:r=!1,onClick:i}){return t.jsx(&quot;button&quot;,{type:&quot;button&quot;,title:l.label??l.target.code,onClick:c=&gt;{c.stopPropagation(),i==null||i()},className:`absolute z-10 h-4 w-4 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-md transition ${b_(l)} ${r?&quot;ring-2 ring-fc-green ring-offset-1&quot;:&quot;&quot;}`,style:{left:`${l.x_percent}%`,top:`${l.y_percent}%`},&quot;aria-label&quot;:l.label??l.target.code})}function v_({plan:l,imageUrl:r,markers:i,selectedMarkerId:c=null,placementMode:m=!1,showPoints:f=!0,showTasks:x=!0,onPlanClick:b,onMarkerSelect:p}){const g=i.filter(j=&gt;!(j.module===&quot;point&quot;&amp;&amp;!f||j.module===&quot;task&quot;&amp;&amp;!x));function v(j){if(!m||!b||!(l!=null&amp;&amp;l.is_image))return;const y=j.currentTarget.getBoundingClientRect(),C=(j.clientX-y.left)/y.width*100,M=(j.clientY-y.top)/y.height*100;b(Math.min(100,Math.max(0,C)),Math.min(100,Math.max(0,M)))}return l?l.is_image?t.jsxs(&quot;div&quot;,{className:`relative overflow-auto rounded-xl border border-slate-200 bg-slate-100 ${m?&quot;cursor-crosshair&quot;:&quot;&quot;}`,onClick:v,role:&quot;presentation&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;relative mx-auto min-h-[280px] w-full max-w-full&quot;,children:[r?t.jsx(&quot;img&quot;,{src:r,alt:l.name,className:&quot;block h-auto w-full select-none&quot;,draggable:!1}):t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[280px] items-center justify-center text-sm text-slate-500&quot;,children:&quot;Chargement du plan…&quot;}),r&amp;&amp;g.map(j=&gt;t.jsx(j_,{marker:j,selected:j.id===c,onClick:()=&gt;p==null?void 0:p(j)},j.id))]}),m&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-center text-xs text-slate-500&quot;,children:&quot;Cliquez sur le plan pour définir la position du marqueur.&quot;})]}):t.jsxs(&quot;div&quot;,{className:&quot;rounded-xl border border-amber-200 bg-amber-50 p-4 text-sm text-amber-900&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;font-medium&quot;,children:&quot;Prévisualisation interactive disponible pour les plans image.&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-amber-800&quot;,children:[&quot;Ce plan est au format &quot;,l.is_pdf?&quot;PDF&quot;:l.mime_type??&quot;fichier&quot;,&quot;. Téléchargez-le pour consultation détaillée. Les marqueurs restent listés à droite.&quot;]})]}):t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[240px] items-center justify-center rounded-xl border border-dashed border-slate-200 bg-slate-50 p-6 text-sm text-slate-500&quot;,children:&quot;Sélectionnez un plan pour afficher la vue.&quot;})}function y_(l){const r=l.filter(c=&gt;!c.parent_zone_id),i=(c,m)=&gt;c.sort_order-m.sort_order||c.code.localeCompare(m.code);return[...r].sort(i)}function N_(l,r){return l.filter(i=&gt;i.parent_zone_id===r).sort((i,c)=&gt;i.sort_order-c.sort_order||i.code.localeCompare(c.code))}function Kp({zone:l,zones:r,depth:i,canManage:c,onEdit:m,onArchive:f}){const x=N_(r,l.id);return t.jsxs(t.Fragment,{children:[t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg border border-slate-100 bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{style:{paddingLeft:i*12},children:[t.jsx(&quot;span&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:l.code}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[&quot; — &quot;,l.name]}),t.jsx(&quot;span&quot;,{className:&quot;ml-2 text-xs text-slate-400&quot;,children:nd[l.zone_type]})]}),c&amp;&amp;l.status!==&quot;archived&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex gap-1&quot;,children:[t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;m(l),children:&quot;Modifier&quot;}),t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;f(l),children:&quot;Archiver&quot;})]})]}),x.map(b=&gt;t.jsx(Kp,{zone:b,zones:r,depth:i+1,canManage:c,onEdit:m,onArchive:f},b.id))]})}function __({zones:l,canManage:r,onEdit:i,onArchive:c}){const m=l.filter(x=&gt;x.status!==&quot;archived&quot;),f=y_(m);return m.length===0?t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Aucune zone définie pour ce chantier.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;space-y-2&quot;,children:f.map(x=&gt;t.jsx(Kp,{zone:x,zones:m,depth:0,canManage:r,onEdit:i,onArchive:c},x.id))})}const S_=Object.keys(nd);function w_({open:l,title:r,zones:i,initial:c=null,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;area&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(null);if(d.useEffect(()=&gt;{l&amp;&amp;(p((c==null?void 0:c.code)??&quot;&quot;),v((c==null?void 0:c.name)??&quot;&quot;),y((c==null?void 0:c.zone_type)??&quot;area&quot;),M(c!=null&amp;&amp;c.parent_zone_id?String(c.parent_zone_id):&quot;&quot;),E((c==null?void 0:c.description)??&quot;&quot;),U(null))},[l,c]),!l)return null;const T=i.filter(B=&gt;B.id!==(c==null?void 0:c.id)&amp;&amp;B.status!==&quot;archived&quot;);async function P(B){if(B.preventDefault(),!b.trim()||!g.trim()){U(&quot;Le code et le nom sont obligatoires.&quot;);return}U(null),await x({code:b.trim(),name:g.trim(),zone_type:j,description:A.trim()||void 0,parent_zone_id:C?Number(C):null})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-black/40 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-5 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;zone-form-title&quot;,children:[t.jsx(&quot;h2&quot;,{id:&quot;zone-form-title&quot;,className:&quot;text-lg font-semibold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{className:&quot;mt-4 space-y-3&quot;,onSubmit:B=&gt;void P(B),children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:b,onChange:B=&gt;p(B.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,disabled:!!c})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:g,onChange:B=&gt;v(B.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type&quot;}),t.jsx(&quot;select&quot;,{value:j,onChange:B=&gt;y(B.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:S_.map(B=&gt;t.jsx(&quot;option&quot;,{value:B,children:nd[B]},B))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zone parente&quot;}),t.jsxs(&quot;select&quot;,{value:C,onChange:B=&gt;M(B.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),T.map(B=&gt;t.jsxs(&quot;option&quot;,{value:B.id,children:[B.code,&quot; — &quot;,B.name]},B.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{value:A,onChange:B=&gt;E(B.target.value),rows:2,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),S&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:S}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const C_=Object.keys(rd);function E_({open:l,zones:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(&quot;&quot;),[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;floor_plan&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;&quot;),[T,P]=d.useState(null),[B,G]=d.useState(null);if(d.useEffect(()=&gt;{l&amp;&amp;(x(&quot;&quot;),p(&quot;&quot;),v(&quot;floor_plan&quot;),y(&quot;&quot;),M(&quot;&quot;),E(&quot;&quot;),U(&quot;&quot;),P(null),G(null))},[l]),!l)return null;async function K(Z){if(Z.preventDefault(),!f.trim()||!b.trim()){G(&quot;Le code et le nom sont obligatoires.&quot;);return}if(!T){G(&quot;Veuillez sélectionner un fichier plan.&quot;);return}if(T.size&gt;30*1024*1024){G(&quot;Le fichier ne doit pas dépasser 30 Mo.&quot;);return}G(null),await m({code:f.trim(),name:b.trim(),plan_type:g,description:S.trim()||void 0,site_zone_id:j?Number(j):null,level_label:C.trim()||void 0,revision_label:A.trim()||void 0},T)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-black/40 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md max-h-[90vh] overflow-y-auto rounded-2xl bg-white p-5 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;plan-upload-title&quot;,children:[t.jsx(&quot;h2&quot;,{id:&quot;plan-upload-title&quot;,className:&quot;text-lg font-semibold text-slate-900&quot;,children:&quot;Déposer un plan&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:&quot;Formats : JPG, PNG, WebP, PDF (max 30 Mo). La prévisualisation interactive est optimale pour les images.&quot;}),t.jsxs(&quot;form&quot;,{className:&quot;mt-4 space-y-3&quot;,onSubmit:Z=&gt;void K(Z),children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:f,onChange:Z=&gt;x(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:b,onChange:Z=&gt;p(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type de plan&quot;}),t.jsx(&quot;select&quot;,{value:g,onChange:Z=&gt;v(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:C_.map(Z=&gt;t.jsx(&quot;option&quot;,{value:Z,children:rd[Z]},Z))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zone associée&quot;}),t.jsxs(&quot;select&quot;,{value:j,onChange:Z=&gt;y(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),r.map(Z=&gt;t.jsxs(&quot;option&quot;,{value:Z.id,children:[Z.code,&quot; — &quot;,Z.name]},Z.id))]})]}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-2&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Niveau&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:C,onChange:Z=&gt;M(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Révision&quot;}),t.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:A,onChange:Z=&gt;E(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{value:S,onChange:Z=&gt;U(Z.target.value),rows:2,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fichier *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;file&quot;,accept:&quot;.jpg,.jpeg,.png,.webp,.pdf,image/*,application/pdf&quot;,onChange:Z=&gt;{var k;return P(((k=Z.target.files)==null?void 0:k[0])??null)},className:&quot;mt-1 w-full text-sm&quot;})]}),B&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:B}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Déposer&quot;})]})]})]})})}function A_({open:l,zones:r,points:i,tasks:c,defaultModule:m=&quot;point&quot;,defaultMarkerableId:f,position:x,isSubmitting:b,onClose:p,onSubmit:g}){const[v,j]=d.useState(m),[y,C]=d.useState(&quot;&quot;),[M,A]=d.useState(&quot;&quot;),[E,S]=d.useState(null);if(d.useEffect(()=&gt;{l&amp;&amp;(j(m),C(f?String(f):&quot;&quot;),A(&quot;&quot;),S(null))},[l,m,f]),!l)return null;const U=v===&quot;point&quot;?i:c;async function T(P){if(P.preventDefault(),!y){S(&quot;Sélectionnez un élément à localiser.&quot;);return}if(!x){S(&quot;Cliquez sur le plan pour définir la position.&quot;);return}S(null),await g({module:v,markerable_id:Number(y),marker_type:v===&quot;task&quot;?&quot;task&quot;:&quot;issue&quot;,site_zone_id:M?Number(M):null,x_percent:Math.round(x.x*10)/10,y_percent:Math.round(x.y*10)/10})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-black/40 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-5 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;marker-form-title&quot;,children:[t.jsx(&quot;h2&quot;,{id:&quot;marker-form-title&quot;,className:&quot;text-lg font-semibold text-slate-900&quot;,children:&quot;Ajouter un marqueur&quot;}),t.jsxs(&quot;form&quot;,{className:&quot;mt-4 space-y-3&quot;,onSubmit:P=&gt;void T(P),children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Module&quot;}),t.jsxs(&quot;select&quot;,{value:v,onChange:P=&gt;{j(P.target.value),C(&quot;&quot;)},className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,disabled:!!f,children:[t.jsx(&quot;option&quot;,{value:&quot;point&quot;,children:Ti.point}),t.jsx(&quot;option&quot;,{value:&quot;task&quot;,children:Ti.task})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Élément *&quot;}),t.jsxs(&quot;select&quot;,{value:y,onChange:P=&gt;C(P.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,disabled:!!f,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Sélectionner —&quot;}),U.map(P=&gt;t.jsxs(&quot;option&quot;,{value:P.id,children:[P.code,&quot; — &quot;,P.title]},P.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zone (optionnel)&quot;}),t.jsxs(&quot;select&quot;,{value:M,onChange:P=&gt;A(P.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),r.map(P=&gt;t.jsxs(&quot;option&quot;,{value:P.id,children:[P.code,&quot; — &quot;,P.name]},P.id))]})]}),t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Position :&quot;,&quot; &quot;,x?`${x.x.toFixed(1)} % × ${x.y.toFixed(1)} %`:&quot;cliquez sur le plan&quot;]}),E&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:E}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:p,disabled:b,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:b||!x,children:b?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const k_=[{key:&quot;view&quot;,label:&quot;Vue plan&quot;},{key:&quot;plans&quot;,label:&quot;Plans&quot;},{key:&quot;zones&quot;,label:&quot;Zones&quot;}];function T_(){var ke;const{activeProject:l}=Ke(),r=sd(),[i,c]=Ol(),m=i.get(&quot;plan_id&quot;),f=i.get(&quot;marker_id&quot;),x=i.get(&quot;module&quot;),b=i.get(&quot;markerable_id&quot;),p=i.get(&quot;add_marker&quot;)===&quot;1&quot;,[g,v]=d.useState(&quot;view&quot;),[j,y]=d.useState(null),[C,M]=d.useState([]),[A,E]=d.useState([]),[S,U]=d.useState([]),[T,P]=d.useState(null),[B,G]=d.useState(null),[K,Z]=d.useState(null),[k,w]=d.useState(&quot;&quot;),[F,le]=d.useState(&quot;&quot;),[Y,H]=d.useState(!0),[q,_]=d.useState(!0),[z,R]=d.useState(!0),[L,ce]=d.useState(null),[D,J]=d.useState(null),[I,ee]=d.useState(!1),[de,X]=d.useState(!1),[fe,je]=d.useState(null),[Me,ft]=d.useState(!1),[Ft,xt]=d.useState(!1),[Ct,ht]=d.useState(null),[bt,Bt]=d.useState(!1),[xe,Et]=d.useState([]),[os,zt]=d.useState([]),Mt=d.useMemo(()=&gt;A.find(ne=&gt;ne.id===T)??null,[A,T]),nt=j==null?void 0:j.permissions,us=d.useCallback(async()=&gt;{if(l){R(!0),ce(null);try{const[ne,_e,we]=await Promise.all([ld(l.id),M1(l.id),L1(l.id)]);y({summary:ne.summary,permissions:ne.permissions}),M(_e.data),E(we.data.filter(Qs=&gt;Qs.status!==&quot;archived&quot;))}catch(ne){ce(ne instanceof me?ne.message:&quot;Impossible de charger les localisations.&quot;)}finally{R(!1)}}},[l]),et=d.useCallback(async ne=&gt;{if(l)try{const _e=await B1(l.id,ne);U(_e.data.filter(we=&gt;we.status!==&quot;archived&quot;))}catch{U([])}},[l]),Ba=d.useCallback(async ne=&gt;{if(!l||!ne.is_image){Z(null);return}try{const{blob:_e}=await q1(l.id,ne.id),we=URL.createObjectURL(_e);Z(Qs=&gt;(Qs&amp;&amp;URL.revokeObjectURL(Qs),we))}catch{Z(null)}},[l]);d.useEffect(()=&gt;{us()},[us]),d.useEffect(()=&gt;{if(A.length===0)return;const ne=m?Number(m):null,_e=ne&amp;&amp;A.some(we=&gt;we.id===ne)?ne:A[0].id;P(_e),(ne||f||p)&amp;&amp;v(&quot;view&quot;)},[A,m,f,p]),d.useEffect(()=&gt;{T&amp;&amp;et(T)},[T,et]),d.useEffect(()=&gt;{if(Mt)return Ba(Mt),()=&gt;{Z(ne=&gt;(ne&amp;&amp;URL.revokeObjectURL(ne),null))}},[Mt,Ba]),d.useEffect(()=&gt;{if(!f||S.length===0)return;const ne=S.find(_e=&gt;_e.id===Number(f));ne&amp;&amp;G(ne)},[f,S]),d.useEffect(()=&gt;{!l||!p||Promise.all([_i(l.id),Ni(l.id)]).then(([ne,_e])=&gt;{Et(ne.data.map(we=&gt;({id:we.id,code:we.code,title:we.title}))),zt(_e.data.map(we=&gt;({id:we.id,code:we.code,title:we.title}))),xt(!0),(x===&quot;point&quot;||x===&quot;task&quot;)&amp;&amp;Bt(!0)})},[l,p,x]);const Ns=d.useMemo(()=&gt;S.filter(ne=&gt;!(k&amp;&amp;ne.module!==k||F&amp;&amp;String(ne.site_zone_id??&quot;&quot;)!==F)),[S,k,F]);async function At(ne){if(l){ee(!0);try{fe?(await R1(l.id,fe.id,ne),J(&quot;Zone mise à jour.&quot;)):(await D1(l.id,ne),J(&quot;Zone créée.&quot;)),X(!1),je(null),await us()}catch(_e){ce(_e instanceof me?_e.message:&quot;Erreur lors de l’enregistrement de la zone.&quot;)}finally{ee(!1)}}}async function Zs(ne){if(!(!l||!window.confirm(`Archiver la zone ${ne.code} ?`)))try{await O1(l.id,ne.id),J(&quot;Zone archivée.&quot;),await us()}catch(_e){ce(_e instanceof me?_e.message:&quot;Erreur lors de l’archivage.&quot;)}}async function Ha(ne,_e){if(l){ee(!0);try{const we=await U1(l.id,ne,_e);ft(!1),J(&quot;Plan déposé avec succès.&quot;),await us(),P(we.data.id),v(&quot;view&quot;)}catch(we){ce(we instanceof me?we.message:&quot;Erreur lors du dépôt du plan.&quot;)}finally{ee(!1)}}}async function Va(ne){if(!(!l||!window.confirm(`Archiver le plan ${ne.code} ?`)))try{await $1(l.id,ne.id),J(&quot;Plan archivé.&quot;),await us()}catch(_e){ce(_e instanceof me?_e.message:&quot;Erreur lors de l’archivage.&quot;)}}async function Ya(ne){if(!(!l||!T)){ee(!0);try{await V1(l.id,T,ne),Bt(!1),xt(!1),ht(null),J(&quot;Marqueur ajouté.&quot;),await us(),await et(T)}catch(_e){ce(_e instanceof me?_e.message:&quot;Erreur lors de la création du marqueur.&quot;)}finally{ee(!1)}}}function Ga(){l&amp;&amp;Promise.all([_i(l.id),Ni(l.id)]).then(([ne,_e])=&gt;{Et(ne.data.map(we=&gt;({id:we.id,code:we.code,title:we.title}))),zt(_e.data.map(we=&gt;({id:we.id,code:we.code,title:we.title}))),xt(!0),ht(null),Bt(!1)})}function ps(ne,_e){ht({x:ne,y:_e}),Bt(!0)}if(!l)return t.jsx(Ve,{title:&quot;Aucun chantier actif&quot;,description:&quot;Sélectionnez un chantier pour continuer.&quot;});if(z&amp;&amp;!j)return t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des plans et zones…&quot;});if(L&amp;&amp;!j)return t.jsx(Ve,{title:&quot;Localisation indisponible&quot;,description:L});const ie=j==null?void 0:j.summary;return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Plans / Zones&quot;,subtitle:&quot;Localisation des points, tâches et preuves terrain&quot;,action:nt!=null&amp;&amp;nt.canCreateMarkers?t.jsxs($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:Ga,disabled:!T,children:[t.jsx(Ey,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Ajouter un marqueur&quot;]}):void 0}),D&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-800&quot;,children:D}),L&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-800&quot;,children:L}),ie&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5&quot;,children:[t.jsx(be,{title:&quot;Zones&quot;,value:String(ie.zones_count),subtitle:&quot;Structure chantier&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Plans&quot;,value:String(ie.plans_count),subtitle:&quot;Plans déposés&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Marqueurs&quot;,value:String(ie.markers_count),subtitle:&quot;Sur les plans&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;Points localisés&quot;,value:String(ie.points_localized),subtitle:&quot;Points chantier&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;Tâches localisées&quot;,value:String(ie.tasks_localized),subtitle:&quot;Planning&quot;,tone:&quot;emerald&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2 border-b border-slate-200 pb-2&quot;,children:k_.map(ne=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;v(ne.key),className:`rounded-lg px-3 py-1.5 text-sm font-medium transition ${g===ne.key?&quot;bg-planx-orange text-white&quot;:&quot;text-slate-600 hover:bg-slate-100&quot;}`,children:ne.label},ne.key))}),g===&quot;view&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:`grid gap-4 ${r?&quot;lg:grid-cols-[1fr_320px]&quot;:&quot;&quot;}`,children:[t.jsxs(&quot;div&quot;,{className:&quot;space-y-3&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-end gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Plan actif&quot;}),t.jsxs(&quot;select&quot;,{value:T??&quot;&quot;,onChange:ne=&gt;{const _e=Number(ne.target.value);P(_e),G(null),c({plan_id:String(_e)})},className:&quot;mt-1 block min-w-[200px] rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[A.length===0&amp;&amp;t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;Aucun plan&quot;}),A.map(ne=&gt;t.jsxs(&quot;option&quot;,{value:ne.id,children:[ne.code,&quot; — &quot;,ne.name]},ne.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Module&quot;}),t.jsxs(&quot;select&quot;,{value:k,onChange:ne=&gt;w(ne.target.value),className:&quot;mt-1 block rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;Tous&quot;}),t.jsx(&quot;option&quot;,{value:&quot;point&quot;,children:&quot;Points&quot;}),t.jsx(&quot;option&quot;,{value:&quot;task&quot;,children:&quot;Tâches&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Zone&quot;}),t.jsxs(&quot;select&quot;,{value:F,onChange:ne=&gt;le(ne.target.value),className:&quot;mt-1 block rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;Toutes&quot;}),C.filter(ne=&gt;ne.status!==&quot;archived&quot;).map(ne=&gt;t.jsx(&quot;option&quot;,{value:ne.id,children:ne.code},ne.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:Y,onChange:ne=&gt;H(ne.target.checked)}),&quot;Points&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:q,onChange:ne=&gt;_(ne.target.checked)}),&quot;Tâches&quot;]})]}),A.length===0?t.jsx(Ve,{title:&quot;Aucun plan&quot;,description:&quot;Déposez un plan image pour commencer la localisation visuelle.&quot;}):t.jsx(v_,{plan:Mt,imageUrl:K,markers:Ns,selectedMarkerId:(B==null?void 0:B.id)??null,placementMode:Ft,showPoints:Y,showTasks:q,onPlanClick:ps,onMarkerSelect:ne=&gt;{G(ne),c({plan_id:String(ne.site_plan_id),marker_id:String(ne.id)})}})]}),t.jsxs(&quot;aside&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-900&quot;,children:&quot;Éléments localisés&quot;}),Ns.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun marqueur sur ce plan.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 max-h-[480px] space-y-2 overflow-y-auto&quot;,children:Ns.map(ne=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;G(ne),className:`w-full rounded-lg border px-3 py-2 text-left text-sm transition ${(B==null?void 0:B.id)===ne.id?&quot;border-planx-orange bg-fc-green-soft&quot;:&quot;border-slate-100 bg-slate-50 hover:border-slate-200&quot;}`,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:ne.target.code}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-600&quot;,children:ne.target.title}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-400&quot;,children:Ti[ne.module]})]})},ne.id))}),B&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-4 rounded-lg border border-slate-200 bg-slate-50 p-3 text-sm&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:B.target.code}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:B.target.title}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:((ke=B.zone)==null?void 0:ke.name)??&quot;Sans zone&quot;}),t.jsxs(he,{to:B.target.url,className:&quot;mt-3 inline-flex items-center gap-1 text-sm font-medium text-planx-orange hover:underline&quot;,children:[&quot;Ouvrir&quot;,t.jsx(Ju,{className:&quot;h-3.5 w-3.5&quot;,&quot;aria-hidden&quot;:!0})]})]})]})]}),g===&quot;plans&quot;&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[(nt==null?void 0:nt.canUploadPlans)&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;ft(!0),children:&quot;Déposer un plan&quot;}),A.length===0?t.jsx(Ve,{title:&quot;Aucun plan&quot;,description:&quot;Aucun plan n’a encore été déposé sur ce chantier.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;space-y-2&quot;,children:A.map(ne=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsxs(&quot;p&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:[ne.code,&quot; — &quot;,ne.name]}),t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:[rd[ne.plan_type],ne.zone?` · ${ne.zone.code}`:&quot;&quot;,&quot; · &quot;,ne.markers_count,&quot; marqueur(s)&quot;]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex gap-2&quot;,children:[t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{P(ne.id),v(&quot;view&quot;),c({plan_id:String(ne.id)})},children:&quot;Ouvrir&quot;}),ne.permissions.canArchive&amp;&amp;t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;void Va(ne),children:&quot;Archiver&quot;})]})]},ne.id))})]}),g===&quot;zones&quot;&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[(nt==null?void 0:nt.canManageZones)&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{je(null),X(!0)},children:&quot;Créer une zone&quot;}),t.jsx(__,{zones:C,canManage:!!(nt!=null&amp;&amp;nt.canManageZones),onEdit:ne=&gt;{je(ne),X(!0)},onArchive:ne=&gt;void Zs(ne)})]}),t.jsx(w_,{open:de,title:fe?&quot;Modifier la zone&quot;:&quot;Créer une zone&quot;,zones:C,initial:fe,isSubmitting:I,onClose:()=&gt;{X(!1),je(null)},onSubmit:At}),t.jsx(E_,{open:Me,zones:C.filter(ne=&gt;ne.status!==&quot;archived&quot;),isSubmitting:I,onClose:()=&gt;ft(!1),onSubmit:Ha}),t.jsx(A_,{open:bt,zones:C.filter(ne=&gt;ne.status!==&quot;archived&quot;),points:xe,tasks:os,defaultModule:x===&quot;task&quot;?&quot;task&quot;:&quot;point&quot;,defaultMarkerableId:b?Number(b):void 0,position:Ct,isSubmitting:I,onClose:()=&gt;{Bt(!1),xt(!1),ht(null)},onSubmit:Ya})]})}const z_=[&quot;plan&quot;,&quot;technical_sheet&quot;,&quot;report&quot;,&quot;minutes&quot;,&quot;photo&quot;,&quot;certificate&quot;,&quot;test_report&quot;,&quot;other&quot;],M_=[&quot;project&quot;,&quot;restricted&quot;,&quot;confidential&quot;];function Jp({open:l,title:r,lots:i,initial:c,isSubmitting:m,requireFile:f=!0,onClose:x,onSubmit:b}){const[p,g]=d.useState(&quot;&quot;),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(&quot;&quot;),[M,A]=d.useState(&quot;other&quot;),[E,S]=d.useState(&quot;&quot;),[U,T]=d.useState(&quot;project&quot;),[P,B]=d.useState(!1),[G,K]=d.useState(null);if(d.useEffect(()=&gt;{var k;l&amp;&amp;(g((c==null?void 0:c.code)??&quot;&quot;),j((c==null?void 0:c.title)??&quot;&quot;),C((c==null?void 0:c.description)??&quot;&quot;),A((c==null?void 0:c.document_type)??&quot;other&quot;),S(((k=c==null?void 0:c.lot_id)==null?void 0:k.toString())??&quot;&quot;),T((c==null?void 0:c.confidentiality)??&quot;project&quot;),B((c==null?void 0:c.is_doe_candidate)??!1),K(null))},[l,c]),!l)return null;async function Z(k){k.preventDefault(),!(f&amp;&amp;!G)&amp;&amp;await b({code:p.trim().toUpperCase(),title:v.trim(),description:y.trim()||void 0,document_type:M,confidentiality:U,lot_id:E?Number(E):null,is_doe_candidate:P},G??void 0)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:k=&gt;void Z(k),className:&quot;mt-4 space-y-3&quot;,children:[!c&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:p,onChange:k=&gt;g(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),f&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fichier *&quot;}),t.jsx(&quot;input&quot;,{required:!0,type:&quot;file&quot;,onChange:k=&gt;{var w;return K(((w=k.target.files)==null?void 0:w[0])??null)},className:&quot;mt-1 w-full text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:v,onChange:k=&gt;j(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type *&quot;}),t.jsx(&quot;select&quot;,{value:M,onChange:k=&gt;A(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:z_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:On[k]},k))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:2,value:y,onChange:k=&gt;C(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),i.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:E,onChange:k=&gt;S(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),i.map(k=&gt;t.jsxs(&quot;option&quot;,{value:k.id,children:[k.code,&quot; — &quot;,k.name]},k.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Confidentialité&quot;}),t.jsx(&quot;select&quot;,{value:U,onChange:k=&gt;T(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:M_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:td[k]},k))})]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:P,onChange:k=&gt;B(k.target.checked),className:&quot;rounded border-slate-300&quot;}),t.jsx(&quot;span&quot;,{children:&quot;Candidat DOE&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:x,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const D_=[{key:&quot;all&quot;,label:&quot;Tous&quot;},{key:&quot;pending&quot;,label:&quot;À valider&quot;},{key:&quot;validated&quot;,label:&quot;Validés&quot;},{key:&quot;doe&quot;,label:&quot;DOE&quot;},{key:&quot;mine&quot;,label:&quot;Mes dépôts&quot;},{key:&quot;rejected&quot;,label:&quot;Rejetés&quot;}];function R_(l,r,i){var c;switch(r){case&quot;all&quot;:return l.status!==&quot;archived&quot;;case&quot;pending&quot;:return[&quot;submitted&quot;,&quot;pending_validation&quot;].includes(l.status);case&quot;validated&quot;:return l.status===&quot;validated&quot;;case&quot;doe&quot;:return l.is_doe_candidate;case&quot;mine&quot;:return i?((c=l.creator)==null?void 0:c.id)===i:!0;case&quot;rejected&quot;:return l.status===&quot;rejected&quot;;default:return!0}}function O_(l){return l==null?&quot;—&quot;:l&lt;1024?`${l} o`:l&lt;1024*1024?`${(l/1024).toFixed(1)} Ko`:`${(l/(1024*1024)).toFixed(1)} Mo`}function L_(){var Y;const{user:l}=Gs(),{activeProject:r,activeMembership:i}=Ke(),[c]=Ol(),m=c.get(&quot;lot_id&quot;),[f,x]=d.useState([]),[b,p]=d.useState([]),[g,v]=d.useState(!0),[j,y]=d.useState(null),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;all&quot;),[S,U]=d.useState(!1),[T,P]=d.useState(!1),[B,G]=d.useState(null),K=d.useCallback(async()=&gt;{if(r){v(!0),y(null);try{const H=m?{lot_id:Number(m)}:void 0,[q,_]=await Promise.all([Wu(r.id,H),Tt(r.id)]);x(q.data),p(_.data.filter(z=&gt;z.status!==&quot;archived&quot;).map(z=&gt;({id:z.id,code:z.code,name:z.name})))}catch(H){y(H instanceof me&amp;&amp;H.status===403?&quot;Accès refusé à la bibliothèque documentaire.&quot;:&quot;Impossible de charger les documents.&quot;),x([])}finally{v(!1)}}},[r,m]);d.useEffect(()=&gt;{K()},[K]);const Z=d.useMemo(()=&gt;{const H=C.trim().toLowerCase();return f.filter(q=&gt;{var _;return R_(q,A,l==null?void 0:l.id)?H?q.code.toLowerCase().includes(H)||q.title.toLowerCase().includes(H)||(((_=q.lot)==null?void 0:_.code.toLowerCase().includes(H))??!1):!0:!1})},[f,C,A,l==null?void 0:l.id]),k=d.useMemo(()=&gt;{const H=f.filter(q=&gt;q.status!==&quot;archived&quot;);return{total:H.length,pending:H.filter(q=&gt;[&quot;submitted&quot;,&quot;pending_validation&quot;].includes(q.status)).length,validated:H.filter(q=&gt;q.status===&quot;validated&quot;).length,doe:H.filter(q=&gt;q.is_doe_candidate).length}},[f]);async function w(H,q){if(!(!r||!q)){P(!0);try{await g2(r.id,H,q),U(!1),G(&quot;Document déposé avec succès.&quot;),await K()}catch(_){y(_ instanceof me?_.message:&quot;Erreur lors du dépôt.&quot;)}finally{P(!1)}}}if(g)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des documents…&quot;})});const F=m?(Y=b.find(H=&gt;H.id===Number(m)))==null?void 0:Y.code:null,le=X2(i==null?void 0:i.role_code);return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Documents&quot;,subtitle:&quot;Bibliothèque documentaire du chantier&quot;,action:le?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;U(!0),children:&quot;Déposer un document&quot;}):void 0}),F&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Filtre lot : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:F}),&quot; · &quot;,t.jsx(he,{to:&quot;/documents&quot;,className:&quot;text-planx-orange hover:underline&quot;,children:&quot;Voir tous les documents&quot;})]}),B&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,role:&quot;status&quot;,children:B}),j&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:j}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Total documents&quot;,value:String(k.total),subtitle:&quot;Hors archivés&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;À valider&quot;,value:String(k.pending),subtitle:&quot;Soumis ou en attente&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Validés&quot;,value:String(k.validated),subtitle:&quot;Statut validé&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Candidats DOE&quot;,value:String(k.doe),subtitle:&quot;Marqués DOE&quot;,tone:&quot;amber&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher un document…&quot;,value:C,onChange:H=&gt;M(H.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:D_.map(H=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;E(H.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${A===H.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:H.label},H.key))})]}),Z.length===0?t.jsx(Ve,{title:&quot;Aucun document trouvé&quot;,description:f.length===0?&quot;Aucun document n’est disponible pour votre périmètre sur ce chantier.&quot;:&quot;Aucun document ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Type&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Version&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Confidentialité&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;DOE&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:Z.map(H=&gt;{var q,_;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:H.code}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[200px] truncate px-4 py-3 font-medium&quot;,children:H.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:On[H.document_type]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((q=H.lot)==null?void 0:q.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((_=H.current_version)==null?void 0:_.version_label)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:Ln[H.status],tone:Ei[H.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:td[H.confidentiality]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:H.is_doe_candidate?&quot;Oui&quot;:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/documents/${H.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},H.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:Z.map(H=&gt;{var q,_,z,R;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:H.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:H.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[On[H.document_type],&quot; · &quot;,((q=H.lot)==null?void 0:q.code)??&quot;—&quot;]})]}),t.jsx(Ee,{label:Ln[H.status],tone:Ei[H.status]})]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Version&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:((_=H.current_version)==null?void 0:_.version_label)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Fichier&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold truncate&quot;,children:((z=H.current_version)==null?void 0:z.original_filename)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Taille&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:O_((R=H.current_version)==null?void 0:R.file_size)})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;DOE&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:H.is_doe_candidate?&quot;Oui&quot;:&quot;Non&quot;})]})]}),t.jsx(he,{to:`/documents/${H.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},H.id)})})]}),t.jsx(Jp,{open:S,title:&quot;Déposer un document&quot;,lots:b,isSubmitting:T,requireFile:!0,onClose:()=&gt;U(!1),onSubmit:w})]})}function U_({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(null),[x,b]=d.useState(&quot;&quot;);if(!l)return null;async function p(g){g.preventDefault(),m&amp;&amp;(await c(m,x.trim()||void 0),f(null),b(&quot;&quot;))}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Nouvelle version&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:g=&gt;void p(g),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fichier *&quot;}),t.jsx(&quot;input&quot;,{required:!0,type:&quot;file&quot;,onChange:g=&gt;{var v;return f(((v=g.target.files)==null?void 0:v[0])??null)},className:&quot;mt-1 w-full text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire&quot;}),t.jsx(&quot;textarea&quot;,{rows:2,value:x,onChange:g=&gt;b(g.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Déposer&quot;})]})]})]})})}function $_({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;f(&quot;&quot;)},[l]),!l)return null;async function x(b){b.preventDefault(),await c(m.trim())}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Commenter&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:b=&gt;void x(b),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:4,value:m,onChange:b=&gt;f(b.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:&quot;Publier&quot;})]})]})]})})}function q_({open:l,mode:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;x(&quot;&quot;)},[l]),!l)return null;async function b(g){g.preventDefault(),!(r===&quot;reject&quot;&amp;&amp;!f.trim())&amp;&amp;await m(f.trim()||void 0)}const p=r===&quot;validate&quot;?&quot;Valider le document&quot;:&quot;Rejeter le document&quot;;return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:p}),t.jsxs(&quot;form&quot;,{onSubmit:g=&gt;void b(g),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Commentaire&quot;,r===&quot;reject&quot;?&quot; *&quot;:&quot;&quot;]}),t.jsx(&quot;textarea&quot;,{required:r===&quot;reject&quot;,rows:3,value:f,onChange:g=&gt;x(g.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:r===&quot;reject&quot;?&quot;danger&quot;:&quot;primary&quot;,disabled:i,children:r===&quot;validate&quot;?&quot;Valider&quot;:&quot;Rejeter&quot;})]})]})]})})}function B_(l){return l==null?&quot;—&quot;:l&lt;1024*1024?`${(l/1024).toFixed(1)} Ko`:`${(l/(1024*1024)).toFixed(1)} Mo`}function H_(){var z;const{documentId:l}=Ys(),{activeProject:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState([]),[x,b]=d.useState(!0),[p,g]=d.useState(null),[v,j]=d.useState(null),[y,C]=d.useState(!1),[M,A]=d.useState(!1),[E,S]=d.useState(!1),[U,T]=d.useState(!1),[P,B]=d.useState(!1),[G,K]=d.useState(null),Z=d.useCallback(async()=&gt;{if(!(!r||!l)){b(!0),g(null);try{const[R,L]=await Promise.all([p2(r.id,Number(l)),Tt(r.id)]);c(R.data),f(L.data.filter(ce=&gt;ce.status!==&quot;archived&quot;).map(ce=&gt;({id:ce.id,code:ce.code,name:ce.name})))}catch(R){R instanceof me&amp;&amp;R.status===403?g(&quot;Accès refusé à ce document.&quot;):R instanceof me&amp;&amp;R.status===404?g(&quot;Document introuvable.&quot;):g(&quot;Impossible de charger le document.&quot;)}finally{b(!1)}}},[r,l]);d.useEffect(()=&gt;{Z()},[Z]);async function k(R){if(!r||!i)return;const L=R?i.versions.find(ce=&gt;ce.id===R):i.current_version;if(!(L!=null&amp;&amp;L.has_file)){g(&quot;Fichier non disponible pour cette version (données de démonstration).&quot;);return}A(!0),g(null);try{const{blob:ce,filename:D}=await v2(r.id,i.id,L.id);y2(ce,D),j(&quot;Téléchargement lancé.&quot;)}catch(ce){g(ce instanceof me?ce.message:&quot;Erreur lors du téléchargement.&quot;)}finally{A(!1)}}async function w(R){if(!(!r||!i)){C(!0);try{const L=await b2(r.id,i.id,R);c(L.data),S(!1),j(&quot;Document mis à jour.&quot;)}catch(L){g(L instanceof me?L.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{C(!1)}}}async function F(R,L){if(!(!r||!i)){C(!0);try{const ce=await j2(r.id,i.id,R,L?{comment:L}:void 0);c(ce.data),T(!1),j(&quot;Nouvelle version déposée.&quot;)}catch(ce){g(ce instanceof me?ce.message:&quot;Erreur lors du dépôt de version.&quot;)}finally{C(!1)}}}async function le(R){if(!(!r||!i)){C(!0);try{const L=await S2(r.id,i.id,{body:R});c(L.data),B(!1),j(&quot;Commentaire ajouté.&quot;)}catch(L){g(L instanceof me?L.message:&quot;Erreur lors du commentaire.&quot;)}finally{C(!1)}}}async function Y(R){if(!(!r||!i||!G)){C(!0);try{const L=G===&quot;validate&quot;?await N2(r.id,i.id,{comment:R}):await _2(r.id,i.id,{comment:R??&quot;&quot;});c(L.data),K(null),j(G===&quot;validate&quot;?&quot;Document validé.&quot;:&quot;Document rejeté.&quot;)}catch(L){g(L instanceof me?L.message:&quot;Erreur lors de la validation.&quot;)}finally{C(!1)}}}async function H(){if(!(!r||!i)&amp;&amp;window.confirm(&quot;Archiver ce document ?&quot;)){C(!0);try{const R=await w2(r.id,i.id);c(R.data),j(&quot;Document archivé.&quot;)}catch(R){g(R instanceof me?R.message:&quot;Erreur lors de l’archivage.&quot;)}finally{C(!1)}}}if(x)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du document…&quot;})});if(p&amp;&amp;!i)return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/documents&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour aux documents&quot;]}),t.jsx(Ve,{title:&quot;Document indisponible&quot;,description:p})]});if(!i)return null;const q=i.current_version,_=i.permissions.canValidate||i.permissions.canReject;return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/documents&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour aux documents&quot;]}),v&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:v}),p&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:p}),t.jsx(Je,{title:`${i.code} — ${i.title}`,subtitle:`${On[i.document_type]} · ${i.lot?`${i.lot.code} — ${i.lot.name}`:&quot;Sans lot&quot;}`,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsx(Ee,{label:Ln[i.status],tone:Ei[i.status]}),i.permissions.canDownload&amp;&amp;t.jsxs($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:M||!(q!=null&amp;&amp;q.has_file),onClick:()=&gt;void k(),children:[t.jsx(hp,{className:&quot;mr-1 inline h-4 w-4&quot;}),&quot;Télécharger&quot;]}),i.permissions.canUploadVersion&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(!0),children:&quot;Nouvelle version&quot;}),i.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(!0),children:&quot;Modifier&quot;}),i.permissions.canComment&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;B(!0),children:&quot;Commenter&quot;}),i.permissions.canValidate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;K(&quot;validate&quot;),children:&quot;Valider&quot;}),i.permissions.canReject&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;K(&quot;reject&quot;),children:&quot;Rejeter&quot;}),i.permissions.canArchive&amp;&amp;i.status!==&quot;archived&quot;&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void H(),children:&quot;Archiver&quot;})]})}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Métadonnées&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Type&quot;}),t.jsx(&quot;dd&quot;,{children:On[i.document_type]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Confidentialité&quot;}),t.jsx(&quot;dd&quot;,{children:td[i.confidentiality]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Candidat DOE&quot;}),t.jsx(&quot;dd&quot;,{children:i.is_doe_candidate?&quot;Oui&quot;:&quot;Non&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Créateur&quot;}),t.jsx(&quot;dd&quot;,{children:((z=i.creator)==null?void 0:z.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Description&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:i.description??&quot;—&quot;})]})]}),t.jsx(&quot;h3&quot;,{className:&quot;mt-6 text-sm font-semibold text-slate-800&quot;,children:&quot;Version actuelle&quot;}),q?t.jsxs(&quot;dl&quot;,{className:&quot;mt-2 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Libellé&quot;}),t.jsx(&quot;dd&quot;,{children:q.version_label})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Fichier&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;truncate text-right&quot;,children:q.original_filename})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Taille&quot;}),t.jsx(&quot;dd&quot;,{children:B_(q.file_size)})]}),!q.has_file&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-fc-gold-dark&quot;,children:&quot;Fichier physique absent (données de démonstration).&quot;})]}):t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune version.&quot;}),t.jsx(&quot;div&quot;,{className:&quot;mt-4 rounded-lg border border-dashed border-slate-200 bg-slate-50 p-3 text-xs text-slate-600&quot;,children:&quot;Prévisualisation prévue en P1. Au MVP, téléchargement sécurisé.&quot;})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Historique des versions&quot;}),i.versions.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune version.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.versions.map(R=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:R.version_label}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-600&quot;,children:R.original_filename})]}),i.permissions.canDownload&amp;&amp;R.has_file&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:M,onClick:()=&gt;void k(R.id),children:&quot;Télécharger&quot;})]},R.id))})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Commentaires&quot;}),i.comments.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun commentaire.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.comments.map(R=&gt;{var L;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:((L=R.author)==null?void 0:L.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:R.body}),R.created_at&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:new Date(R.created_at).toLocaleString(&quot;fr-FR&quot;)})]},R.id)})})]}),_&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Validation&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-600&quot;,children:&quot;Utilisez les boutons Valider ou Rejeter pour traiter la version en cours. Le rejet exige un commentaire.&quot;}),(q==null?void 0:q.validation_comment)&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-800&quot;,children:q.validation_comment})]})]})]}),t.jsx(Jp,{open:E,title:&quot;Modifier le document&quot;,lots:m,initial:i,requireFile:!1,isSubmitting:y,onClose:()=&gt;S(!1),onSubmit:w}),t.jsx(U_,{open:U,isSubmitting:y,onClose:()=&gt;T(!1),onSubmit:F}),t.jsx($_,{open:P,isSubmitting:y,onClose:()=&gt;B(!1),onSubmit:le}),t.jsx(q_,{open:G!==null,mode:G??&quot;validate&quot;,isSubmitting:y,onClose:()=&gt;K(null),onSubmit:Y})]})}const V_=[&quot;plan&quot;,&quot;technical_sheet&quot;,&quot;report&quot;,&quot;minutes&quot;,&quot;photo&quot;,&quot;certificate&quot;,&quot;test_report&quot;,&quot;other&quot;],Y_=[&quot;expected&quot;,&quot;missing&quot;,&quot;submitted&quot;,&quot;to_correct&quot;,&quot;validated&quot;,&quot;not_applicable&quot;];function Ip({open:l,title:r,lots:i,organizations:c,initial:m,allowStatusEdit:f=!1,isSubmitting:x,onClose:b,onSubmit:p}){const[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;other&quot;),[T,P]=d.useState(!0),[B,G]=d.useState(&quot;&quot;),[K,Z]=d.useState(&quot;&quot;),[k,w]=d.useState(&quot;expected&quot;);if(d.useEffect(()=&gt;{var le,Y,H;l&amp;&amp;(v((m==null?void 0:m.code)??&quot;&quot;),y((m==null?void 0:m.title)??&quot;&quot;),M((m==null?void 0:m.description)??&quot;&quot;),E(((le=m==null?void 0:m.lot_id)==null?void 0:le.toString())??&quot;&quot;),U((m==null?void 0:m.expected_document_type)??&quot;other&quot;),P((m==null?void 0:m.is_required)??!0),G(((H=(Y=m==null?void 0:m.responsible_organization)==null?void 0:Y.id)==null?void 0:H.toString())??&quot;&quot;),Z((m==null?void 0:m.due_date)??&quot;&quot;),w((m==null?void 0:m.status)??&quot;expected&quot;))},[l,m]),!l)return null;async function F(le){le.preventDefault(),await p({code:g.trim().toUpperCase(),title:j.trim(),description:C.trim()||void 0,expected_document_type:S,is_required:T,lot_id:A?Number(A):null,responsible_organization_id:B?Number(B):null,due_date:K||null,...f?{status:k}:{}})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:le=&gt;void F(le),className:&quot;mt-4 space-y-3&quot;,children:[!m&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:g,onChange:le=&gt;v(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:j,onChange:le=&gt;y(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type document attendu&quot;}),t.jsx(&quot;select&quot;,{value:S,onChange:le=&gt;U(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:V_.map(le=&gt;t.jsx(&quot;option&quot;,{value:le,children:ki[le]},le))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:2,value:C,onChange:le=&gt;M(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),i.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:A,onChange:le=&gt;E(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),i.map(le=&gt;t.jsxs(&quot;option&quot;,{value:le.id,children:[le.code,&quot; — &quot;,le.name]},le.id))]})]}),c.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Responsable&quot;}),t.jsxs(&quot;select&quot;,{value:B,onChange:le=&gt;G(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),c.map(le=&gt;t.jsx(&quot;option&quot;,{value:le.id,children:le.name},le.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:K,onChange:le=&gt;Z(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:T,onChange:le=&gt;P(le.target.checked),className:&quot;rounded border-slate-300&quot;}),t.jsx(&quot;span&quot;,{children:&quot;Pièce obligatoire&quot;})]}),f&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{value:k,onChange:le=&gt;w(le.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:Y_.map(le=&gt;t.jsx(&quot;option&quot;,{value:le,children:Un[le]},le))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:b,disabled:x,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:x,children:x?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const G_=[{key:&quot;all&quot;,label:&quot;Toutes&quot;},{key:&quot;missing&quot;,label:&quot;Manquantes&quot;},{key:&quot;submitted&quot;,label:&quot;Soumises&quot;},{key:&quot;to_correct&quot;,label:&quot;À corriger&quot;},{key:&quot;validated&quot;,label:&quot;Validées&quot;},{key:&quot;required&quot;,label:&quot;Obligatoires&quot;}];function Z_(l,r){switch(r){case&quot;all&quot;:return l.status!==&quot;archived&quot;;case&quot;missing&quot;:return l.status===&quot;missing&quot;;case&quot;submitted&quot;:return l.status===&quot;submitted&quot;;case&quot;to_correct&quot;:return l.status===&quot;to_correct&quot;;case&quot;validated&quot;:return l.status===&quot;validated&quot;;case&quot;required&quot;:return l.is_required;default:return!0}}function Q_(){var R;const{activeProject:l,activeMembership:r}=Ke(),[i]=Ol(),c=i.get(&quot;lot_id&quot;),[m,f]=d.useState([]),[x,b]=d.useState(null),[p,g]=d.useState([]),[v,j]=d.useState([]),[y,C]=d.useState([]),[M,A]=d.useState(!0),[E,S]=d.useState(null),[U,T]=d.useState(&quot;&quot;),[P,B]=d.useState(&quot;all&quot;),[G,K]=d.useState(!1),[Z,k]=d.useState(!1),[w,F]=d.useState(null),le=d.useCallback(async()=&gt;{if(l){A(!0),S(null);try{const L=c?{lot_id:Number(c)}:void 0,[ce,D,J]=await Promise.all([E2(l.id),Op(l.id,L),Tt(l.id)]);b(ce.summary),g(ce.by_lot),f(D.data),j(J.data.filter(I=&gt;I.status!==&quot;archived&quot;)),C(J.meta.organizations)}catch(L){S(L instanceof me&amp;&amp;L.status===403?&quot;Accès refusé au dossier de clôture.&quot;:&quot;Impossible de charger le DOE.&quot;),f([])}finally{A(!1)}}},[l,c]);d.useEffect(()=&gt;{le()},[le]);const Y=d.useMemo(()=&gt;{const L=U.trim().toLowerCase();return m.filter(ce=&gt;{var D;return Z_(ce,P)?L?ce.code.toLowerCase().includes(L)||ce.title.toLowerCase().includes(L)||(((D=ce.lot)==null?void 0:D.code.toLowerCase().includes(L))??!1):!0:!1})},[m,U,P]);async function H(L){if(l){k(!0);try{await k2(l.id,L),K(!1),F(&quot;Pièce DOE créée avec succès.&quot;),await le()}catch(ce){S(ce instanceof me?ce.message:&quot;Erreur lors de la création.&quot;)}finally{k(!1)}}}if(M)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du DOE…&quot;})});const q=c?(R=v.find(L=&gt;L.id===Number(c)))==null?void 0:R.code:null,_=P2(r==null?void 0:r.role_code),z=x??{expected:0,missing:0,submitted:0,validated:0,completion_rate:0};return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;DOE / Clôture&quot;,subtitle:&quot;Suivi des pièces attendues du dossier de clôture&quot;,action:_?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;K(!0),children:&quot;Ajouter pièce attendue&quot;}):void 0}),q&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Filtre lot : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:q}),&quot; · &quot;,t.jsx(he,{to:&quot;/doe&quot;,className:&quot;text-planx-orange hover:underline&quot;,children:&quot;Voir tout le DOE&quot;})]}),w&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,role:&quot;status&quot;,children:w}),E&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:E}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-5&quot;,children:[t.jsx(be,{title:&quot;Pièces attendues&quot;,value:String(z.expected),subtitle:&quot;Total actif&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Manquantes&quot;,value:String(z.missing),subtitle:&quot;Sans document&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;Soumises&quot;,value:String(z.submitted),subtitle:&quot;En attente validation&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Validées&quot;,value:String(z.validated),subtitle:&quot;Pièces conformes&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Complétude&quot;,value:`${z.completion_rate}%`,subtitle:&quot;Obligatoires validées&quot;,tone:&quot;amber&quot;})]}),p.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Complétude par lot&quot;}),t.jsx(&quot;div&quot;,{className:&quot;mt-3 grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3&quot;,children:p.map(L=&gt;t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:[L.lot.code,&quot; — &quot;,L.lot.name]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-600&quot;,children:[L.validated,&quot;/&quot;,L.expected,&quot; validées · &quot;,L.completion_rate,&quot;% complétude&quot;]}),t.jsx(&quot;div&quot;,{className:&quot;mt-2 h-2 overflow-hidden rounded-full bg-slate-200&quot;,children:t.jsx(&quot;div&quot;,{className:&quot;h-full rounded-full bg-planx-orange transition-all&quot;,style:{width:`${L.completion_rate}%`}})})]},L.lot.id))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher une pièce DOE…&quot;,value:U,onChange:L=&gt;T(L.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:G_.map(L=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;B(L.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${P===L.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:L.label},L.key))})]}),Y.length===0?t.jsx(Ve,{title:&quot;Aucune pièce DOE trouvée&quot;,description:m.length===0?&quot;Aucune pièce DOE n’est disponible pour votre périmètre sur ce chantier.&quot;:&quot;Aucune pièce ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Type attendu&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Obligatoire&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Document&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:Y.map(L=&gt;{var ce,D,J;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:L.code}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[180px] truncate px-4 py-3 font-medium&quot;,children:L.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((ce=L.lot)==null?void 0:ce.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:L.expected_document_type?ki[L.expected_document_type]:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:L.is_required?&quot;Oui&quot;:&quot;Non&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:Un[L.status],tone:Ai[L.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((D=L.current_document)==null?void 0:D.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((J=L.responsible_organization)==null?void 0:J.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/doe/${L.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},L.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:Y.map(L=&gt;{var ce,D,J;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:L.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:L.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[((ce=L.lot)==null?void 0:ce.code)??&quot;—&quot;,L.expected_document_type?` · ${ki[L.expected_document_type]}`:&quot;&quot;]})]}),t.jsx(Ee,{label:Un[L.status],tone:Ai[L.status]})]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Obligatoire&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:L.is_required?&quot;Oui&quot;:&quot;Non&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Document&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold truncate&quot;,children:((D=L.current_document)==null?void 0:D.code)??&quot;Non rattaché&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;col-span-2&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:((J=L.responsible_organization)==null?void 0:J.name)??&quot;—&quot;})]})]}),t.jsx(he,{to:`/doe/${L.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},L.id)})})]}),t.jsx(Ip,{open:G,title:&quot;Ajouter une pièce attendue&quot;,lots:v,organizations:y,isSubmitting:Z,onClose:()=&gt;K(!1),onSubmit:H})]})}function X_({open:l,projectId:r,item:i,isSubmitting:c,onClose:m,onSubmit:f}){const[x,b]=d.useState([]),[p,g]=d.useState(!1),[v,j]=d.useState(null),[y,C]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{if(!l)return;C(&quot;&quot;),j(null),g(!0);const E={is_doe_candidate:!0};i.lot_id&amp;&amp;(E.lot_id=i.lot_id),Wu(r,E).then(S=&gt;b(S.data)).catch(S=&gt;{j(S instanceof me?S.message:&quot;Impossible de charger les documents.&quot;),b([])}).finally(()=&gt;g(!1))},[l,r,i.lot_id]),!l)return null;const M=x.find(E=&gt;E.id===Number(y));async function A(E){var S;E.preventDefault(),M&amp;&amp;await f(M.id,(S=M.current_version)==null?void 0:S.id)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Rattacher un document&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-sm text-slate-600&quot;,children:[&quot;Pièce : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:i.code})]}),p?t.jsx(&quot;p&quot;,{className:&quot;mt-4 text-sm text-slate-500&quot;,children:&quot;Chargement des documents…&quot;}):v?t.jsx(&quot;p&quot;,{className:&quot;mt-4 text-sm text-rose-700&quot;,children:v}):x.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-4 text-sm text-fc-gold-dark&quot;,children:&quot;Aucun document candidat DOE disponible.&quot;}):t.jsxs(&quot;form&quot;,{onSubmit:E=&gt;void A(E),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Document *&quot;}),t.jsxs(&quot;select&quot;,{required:!0,value:y,onChange:E=&gt;C(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Sélectionner —&quot;}),x.map(E=&gt;t.jsxs(&quot;option&quot;,{value:E.id,children:[E.code,&quot; — &quot;,E.title,&quot; (&quot;,Ln[E.status],&quot;)&quot;,E.current_version?` · ${E.current_version.version_label}`:&quot;&quot;]},E.id))]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c||!y,children:&quot;Rattacher&quot;})]})]}),!p&amp;&amp;x.length===0&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;mt-4 flex justify-end&quot;,children:t.jsx($,{variant:&quot;secondary&quot;,onClick:m,children:&quot;Fermer&quot;})})]})})}function P_({open:l,mode:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;x(&quot;&quot;)},[l]),!l)return null;async function b(g){g.preventDefault(),!(r===&quot;reject&quot;&amp;&amp;!f.trim())&amp;&amp;await m(f.trim()||void 0)}const p={validate:&quot;Valider la pièce DOE&quot;,reject:&quot;Rejeter la pièce DOE&quot;,not_applicable:&quot;Marquer non applicable&quot;};return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:p[r]}),t.jsxs(&quot;form&quot;,{onSubmit:g=&gt;void b(g),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Commentaire&quot;,r===&quot;reject&quot;?&quot; *&quot;:&quot;&quot;]}),t.jsx(&quot;textarea&quot;,{required:r===&quot;reject&quot;,rows:3,value:f,onChange:g=&gt;x(g.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:r===&quot;reject&quot;?&quot;danger&quot;:&quot;primary&quot;,disabled:i,children:r===&quot;validate&quot;?&quot;Valider&quot;:r===&quot;reject&quot;?&quot;Rejeter&quot;:&quot;Confirmer&quot;})]})]})]})})}function F_({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;f(&quot;&quot;)},[l]),!l)return null;async function x(b){b.preventDefault(),m.trim()&amp;&amp;await c(m.trim())}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Commenter la pièce DOE&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:b=&gt;void x(b),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:4,value:m,onChange:b=&gt;f(b.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:&quot;Envoyer&quot;})]})]})]})})}function K_(){var Y,H;const{doeItemId:l}=Ys(),{activeProject:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState(!0),[v,j]=d.useState(null),[y,C]=d.useState(null),[M,A]=d.useState(!1),[E,S]=d.useState(!1),[U,T]=d.useState(!1),[P,B]=d.useState(!1),[G,K]=d.useState(null),Z=d.useCallback(async()=&gt;{if(!(!r||!l)){g(!0),j(null);try{const[q,_]=await Promise.all([A2(r.id,Number(l)),Tt(r.id)]);c(q.data),f(_.data.filter(z=&gt;z.status!==&quot;archived&quot;)),b(_.meta.organizations)}catch(q){q instanceof me&amp;&amp;q.status===403?j(&quot;Accès refusé à cette pièce DOE.&quot;):q instanceof me&amp;&amp;q.status===404?j(&quot;Pièce DOE introuvable.&quot;):j(&quot;Impossible de charger la pièce DOE.&quot;)}finally{g(!1)}}},[r,l]);d.useEffect(()=&gt;{Z()},[Z]);async function k(q){if(!(!r||!i)){A(!0);try{const _=await T2(r.id,i.id,q);c(_.data),S(!1),C(&quot;Pièce DOE mise à jour.&quot;)}catch(_){j(_ instanceof me?_.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{A(!1)}}}async function w(q,_){if(!(!r||!i)){A(!0);try{const z=await z2(r.id,i.id,{document_id:q,document_version_id:_??null});c(z.data),T(!1),C(&quot;Document rattaché.&quot;)}catch(z){j(z instanceof me?z.message:&quot;Erreur lors du rattachement.&quot;)}finally{A(!1)}}}async function F(q){if(!(!r||!i)){A(!0);try{const _=await O2(r.id,i.id,{body:q});c(_.data),B(!1),C(&quot;Commentaire ajouté.&quot;)}catch(_){j(_ instanceof me?_.message:&quot;Erreur lors du commentaire.&quot;)}finally{A(!1)}}}async function le(q){if(!(!r||!i||!G)){A(!0);try{let _;G===&quot;validate&quot;?_=await M2(r.id,i.id,{comment:q}):G===&quot;reject&quot;?_=await D2(r.id,i.id,{comment:q??&quot;&quot;}):_=await R2(r.id,i.id,{comment:q}),c(_.data),K(null),C(&quot;Action enregistrée.&quot;)}catch(_){j(_ instanceof me?_.message:&quot;Erreur lors de l’action.&quot;)}finally{A(!1)}}}return p?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement de la pièce DOE…&quot;})}):v&amp;&amp;!i?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/doe&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour au DOE&quot;]}),t.jsx(Ve,{title:&quot;Pièce indisponible&quot;,description:v})]}):i?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/doe&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour au DOE&quot;]}),y&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:y}),v&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:v}),t.jsx(Je,{title:`${i.code} — ${i.title}`,subtitle:`${i.lot?`${i.lot.code} — ${i.lot.name}`:&quot;Sans lot&quot;}`,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsx(Ee,{label:Un[i.status],tone:Ai[i.status]}),i.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(!0),children:&quot;Modifier&quot;}),i.permissions.canAttachDocument&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(!0),children:&quot;Rattacher document&quot;}),i.permissions.canComment&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;B(!0),children:&quot;Commenter&quot;}),i.permissions.canValidate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;K(&quot;validate&quot;),children:&quot;Valider&quot;}),i.permissions.canReject&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;K(&quot;reject&quot;),children:&quot;Rejeter&quot;}),i.permissions.canMarkNotApplicable&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;K(&quot;not_applicable&quot;),children:&quot;Non applicable&quot;})]})}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Type attendu&quot;}),t.jsx(&quot;dd&quot;,{children:i.expected_document_type?ki[i.expected_document_type]:&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Obligatoire&quot;}),t.jsx(&quot;dd&quot;,{children:i.is_required?&quot;Oui&quot;:&quot;Non&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{children:((Y=i.responsible_organization)==null?void 0:Y.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;dd&quot;,{children:i.due_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Description&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:i.description??&quot;—&quot;})]})]}),t.jsx(&quot;h3&quot;,{className:&quot;mt-6 text-sm font-semibold text-slate-800&quot;,children:&quot;Document rattaché&quot;}),i.current_document?t.jsxs(&quot;dl&quot;,{className:&quot;mt-2 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Code&quot;}),t.jsx(&quot;dd&quot;,{children:t.jsx(he,{to:`/documents/${i.current_document.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:i.current_document.code})})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;text-right&quot;,children:i.current_document.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Version&quot;}),t.jsx(&quot;dd&quot;,{children:((H=i.current_document.current_version)==null?void 0:H.version_label)??&quot;—&quot;})]})]}):t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun document rattaché.&quot;})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Validations&quot;}),i.validations.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune validation enregistrée.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.validations.map(q=&gt;{var _;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:q.decision}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((_=q.validator)==null?void 0:_.name)??&quot;—&quot;}),q.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:q.comment})]},q.id)})})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Commentaires&quot;}),i.comments.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun commentaire.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.comments.map(q=&gt;{var _;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:((_=q.author)==null?void 0:_.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:q.body})]},q.id)})})]})]})]}),t.jsx(Ip,{open:E,title:&quot;Modifier la pièce DOE&quot;,lots:m,organizations:x,initial:i,allowStatusEdit:!0,isSubmitting:M,onClose:()=&gt;S(!1),onSubmit:k}),r&amp;&amp;t.jsx(X_,{open:U,projectId:r.id,item:i,isSubmitting:M,onClose:()=&gt;T(!1),onSubmit:w}),t.jsx(F_,{open:P,isSubmitting:M,onClose:()=&gt;B(!1),onSubmit:F}),t.jsx(P_,{open:G!==null,mode:G??&quot;validate&quot;,isSubmitting:M,onClose:()=&gt;K(null),onSubmit:le})]}):null}const zi={site:&quot;Chantier&quot;,technical:&quot;Technique&quot;,moa:&quot;MOA&quot;,control:&quot;Contrôle&quot;,coordination:&quot;Coordination&quot;,other:&quot;Autre&quot;},Mi={draft:&quot;Brouillon&quot;,scheduled:&quot;Planifiée&quot;,in_progress:&quot;En cours&quot;,minutes_draft:&quot;CR brouillon&quot;,pending_validation:&quot;CR à valider&quot;,validated:&quot;Validée&quot;,closed:&quot;Clôturée&quot;,cancelled:&quot;Annulée&quot;},zu={draft:&quot;gray&quot;,scheduled:&quot;blue&quot;,in_progress:&quot;orange&quot;,minutes_draft:&quot;purple&quot;,pending_validation:&quot;orange&quot;,validated:&quot;green&quot;,closed:&quot;green&quot;,cancelled:&quot;gray&quot;},Wp={invited:&quot;Invité&quot;,present:&quot;Présent&quot;,absent:&quot;Absent&quot;,excused:&quot;Excusé&quot;},e0={open:&quot;Ouverte&quot;,in_progress:&quot;En cours&quot;,done:&quot;Réalisée&quot;,cancelled:&quot;Annulée&quot;};function J_(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;SA&quot;}const I_=[&quot;site&quot;,&quot;technical&quot;,&quot;moa&quot;,&quot;control&quot;,&quot;coordination&quot;,&quot;other&quot;],W_=[&quot;draft&quot;,&quot;scheduled&quot;,&quot;in_progress&quot;,&quot;minutes_draft&quot;,&quot;pending_validation&quot;];function Mu({open:l,title:r,mode:i=&quot;create&quot;,initial:c,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;site&quot;),[C,M]=d.useState(&quot;draft&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;&quot;),[T,P]=d.useState(&quot;&quot;),[B,G]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(p((c==null?void 0:c.code)??&quot;&quot;),v((c==null?void 0:c.title)??&quot;&quot;),y((c==null?void 0:c.meeting_type)??&quot;site&quot;),M((c==null?void 0:c.status)??&quot;draft&quot;),E(c!=null&amp;&amp;c.scheduled_at?c.scheduled_at.slice(0,16):&quot;&quot;),U((c==null?void 0:c.location)??&quot;&quot;),P((c==null?void 0:c.summary)??&quot;&quot;),G((c==null?void 0:c.minutes_body)??&quot;&quot;))},[l,c]),!l)return null;async function K(k){k.preventDefault(),await x({code:b.trim().toUpperCase(),title:g.trim(),meeting_type:j,status:i===&quot;create&quot;?C:void 0,scheduled_at:A||null,location:S.trim()||null,summary:T.trim()||null,minutes_body:B.trim()||null})}const Z=i!==&quot;minutes&quot;;return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:k=&gt;void K(k),className:&quot;mt-4 space-y-3&quot;,children:[Z&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,disabled:i===&quot;edit&quot;,value:b,onChange:k=&gt;p(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:g,onChange:k=&gt;v(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type&quot;}),t.jsx(&quot;select&quot;,{value:j,onChange:k=&gt;y(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:I_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:zi[k]},k))})]}),i===&quot;create&quot;&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{value:C,onChange:k=&gt;M(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:W_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:Mi[k]},k))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Date et heure&quot;}),t.jsx(&quot;input&quot;,{type:&quot;datetime-local&quot;,value:A,onChange:k=&gt;E(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lieu&quot;}),t.jsx(&quot;input&quot;,{value:S,onChange:k=&gt;U(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Synthèse&quot;}),t.jsx(&quot;textarea&quot;,{rows:2,value:T,onChange:k=&gt;P(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Compte rendu&quot;}),t.jsx(&quot;textarea&quot;,{rows:5,value:B,onChange:k=&gt;G(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}function eS(l){return&quot;&quot;}async function t0(l,r){return Ae(`/projects/${l}/meetings${eS()}`,!0)}async function tS(l,r){return Ae(`/projects/${l}/meetings/${r}`,!0)}async function sS(l,r){return Se(`/projects/${l}/meetings`,r,!0)}async function aS(l,r,i){return Ue(`/projects/${l}/meetings/${r}`,i,!0)}async function lS(l,r,i){return Se(`/projects/${l}/meetings/${r}/participants`,i,!0)}async function nS(l,r,i){return Se(`/projects/${l}/meetings/${r}/decisions`,i,!0)}async function rS(l,r,i){return Se(`/projects/${l}/meetings/${r}/actions`,i,!0)}async function iS(l,r,i){return Se(`/projects/${l}/meetings/${r}/comments`,i,!0)}async function cS(l,r,i){return Se(`/projects/${l}/meetings/${r}/validate-minutes`,{},!0)}async function oS(l,r){return Se(`/projects/${l}/meetings/${r}/close`,{},!0)}const uS=[{key:&quot;all&quot;,label:&quot;Toutes&quot;},{key:&quot;this_week&quot;,label:&quot;Cette semaine&quot;},{key:&quot;pending_validation&quot;,label:&quot;CR à valider&quot;},{key:&quot;mine&quot;,label:&quot;Mes réunions&quot;},{key:&quot;validated&quot;,label:&quot;Validées&quot;},{key:&quot;closed&quot;,label:&quot;Clôturées&quot;}];function Mh(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function dS(l){if(!l)return!1;const r=new Date(l),i=new Date,c=new Date(i);c.setHours(0,0,0,0);const m=new Date(c);return m.setDate(m.getDate()+7),r&gt;=c&amp;&amp;r&lt;=m}function mS(l,r,i){var c;switch(r){case&quot;all&quot;:return l.status!==&quot;cancelled&quot;;case&quot;this_week&quot;:return dS(l.scheduled_at);case&quot;pending_validation&quot;:return l.status===&quot;pending_validation&quot;;case&quot;mine&quot;:return((c=l.organizer)==null?void 0:c.id)===i;case&quot;validated&quot;:return l.status===&quot;validated&quot;;case&quot;closed&quot;:return l.status===&quot;closed&quot;;default:return!0}}function fS(){const{user:l}=Gs(),{activeProject:r}=Ke(),[i,c]=d.useState([]),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState(!0),[v,j]=d.useState(null),[y,C]=d.useState(&quot;&quot;),[M,A]=d.useState(&quot;all&quot;),[E,S]=d.useState(!1),[U,T]=d.useState(!1),[P,B]=d.useState(null),G=d.useCallback(async()=&gt;{if(r){g(!0),j(null);try{const w=await t0(r.id);c(w.data),f(w.meta.organizations),b(w.meta.users)}catch(w){w instanceof me&amp;&amp;w.status===403?j(&quot;Accès refusé à la liste des réunions.&quot;):j(&quot;Impossible de charger les réunions.&quot;),c([])}finally{g(!1)}}},[r]);d.useEffect(()=&gt;{G()},[G]);const K=d.useMemo(()=&gt;{const w=y.trim().toLowerCase();return i.filter(F=&gt;mS(F,M,l==null?void 0:l.id)?w?F.code.toLowerCase().includes(w)||F.title.toLowerCase().includes(w):!0:!1)},[i,y,M,l==null?void 0:l.id]),Z=d.useMemo(()=&gt;({scheduled:i.filter(w=&gt;w.status===&quot;scheduled&quot;).length,pending:i.filter(w=&gt;w.status===&quot;pending_validation&quot;).length,openActions:i.reduce((w,F)=&gt;w+F.open_actions_count,0),validated:i.filter(w=&gt;w.status===&quot;validated&quot;).length}),[i]);async function k(w){if(r){T(!0);try{await sS(r.id,w),S(!1),B(&quot;Réunion créée avec succès.&quot;),await G()}catch(F){j(F instanceof me?F.message:&quot;Erreur lors de la création.&quot;)}finally{T(!1)}}}return p?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des réunions…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Réunions&quot;,subtitle:&quot;Coordination chantier et comptes rendus&quot;,action:J_(l==null?void 0:l.role_code)?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;S(!0),children:&quot;Créer une réunion&quot;}):void 0}),P&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:P}),v&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:v}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Planifiées&quot;,value:String(Z.scheduled),subtitle:&quot;Statut planifiée&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;CR à valider&quot;,value:String(Z.pending),subtitle:&quot;En attente validation&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Actions ouvertes&quot;,value:String(Z.openActions),subtitle:&quot;Liées aux réunions&quot;,tone:&quot;amber&quot;}),t.jsx(be,{title:&quot;Validées&quot;,value:String(Z.validated),subtitle:&quot;Comptes rendus validés&quot;,tone:&quot;emerald&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher une réunion…&quot;,value:y,onChange:w=&gt;C(w.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:uS.map(w=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;A(w.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${M===w.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:w.label},w.key))})]}),K.length===0?t.jsx(Ve,{title:&quot;Aucune réunion trouvée&quot;,description:i.length===0?&quot;Aucune réunion disponible pour votre périmètre.&quot;:&quot;Aucune réunion ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Date&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Type&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Objet&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Organisateur&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Participants&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Actions ouv.&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:K.map(w=&gt;{var F;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Mh(w.scheduled_at)}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:w.code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:zi[w.meeting_type]}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[180px] truncate px-4 py-3 font-medium&quot;,children:w.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((F=w.organizer)==null?void 0:F.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:w.participants_count}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:Mi[w.status],tone:zu[w.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:w.open_actions_count}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/meetings/${w.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},w.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:K.map(w=&gt;t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Mh(w.scheduled_at)}),t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:w.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:w.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[zi[w.meeting_type],&quot; · &quot;,w.participants_count,&quot; participants&quot;]})]}),t.jsx(Ee,{label:Mi[w.status],tone:zu[w.status]})]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:[&quot;Actions ouvertes : &quot;,w.open_actions_count]}),t.jsx(he,{to:`/meetings/${w.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},w.id))})]}),t.jsx(Mu,{open:E,title:&quot;Créer une réunion&quot;,organizations:m,users:x,isSubmitting:U,onClose:()=&gt;S(!1),onSubmit:k})]})}const xS=[&quot;invited&quot;,&quot;present&quot;,&quot;absent&quot;,&quot;excused&quot;];function hS({open:l,organizations:r,users:i,isSubmitting:c,onClose:m,onSubmit:f}){const[x,b]=d.useState(&quot;&quot;),[p,g]=d.useState(&quot;&quot;),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(&quot;&quot;),[M,A]=d.useState(&quot;invited&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(b(&quot;&quot;),g(&quot;&quot;),j(&quot;&quot;),C(&quot;&quot;),A(&quot;invited&quot;))},[l]),!l)return null;async function E(S){S.preventDefault(),await f({user_id:x?Number(x):null,organization_id:p?Number(p):null,external_name:v.trim()||null,external_email:y.trim()||null,attendance_status:M})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Ajouter un participant&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:S=&gt;void E(S),className:&quot;mt-4 space-y-3&quot;,children:[i.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Utilisateur&quot;}),t.jsxs(&quot;select&quot;,{value:x,onChange:S=&gt;b(S.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),i.map(S=&gt;t.jsx(&quot;option&quot;,{value:S.id,children:S.name},S.id))]})]}),r.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation&quot;}),t.jsxs(&quot;select&quot;,{value:p,onChange:S=&gt;g(S.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),r.map(S=&gt;t.jsx(&quot;option&quot;,{value:S.id,children:S.name},S.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom externe&quot;}),t.jsx(&quot;input&quot;,{value:v,onChange:S=&gt;j(S.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Email externe&quot;}),t.jsx(&quot;input&quot;,{type:&quot;email&quot;,value:y,onChange:S=&gt;C(S.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Présence&quot;}),t.jsx(&quot;select&quot;,{value:M,onChange:S=&gt;A(S.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:xS.map(S=&gt;t.jsx(&quot;option&quot;,{value:S,children:Wp[S]},S))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c,children:c?&quot;Envoi…&quot;:&quot;Ajouter&quot;})]})]})]})})}const pS=[&quot;open&quot;,&quot;in_progress&quot;,&quot;done&quot;,&quot;cancelled&quot;];function gS({open:l,organizations:r,users:i,isSubmitting:c,onClose:m,onSubmit:f}){const[x,b]=d.useState(&quot;&quot;),[p,g]=d.useState(&quot;&quot;),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(&quot;&quot;),[M,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;open&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(b(&quot;&quot;),g(&quot;&quot;),j(&quot;&quot;),C(&quot;&quot;),A(&quot;&quot;),S(&quot;open&quot;))},[l]),!l)return null;async function U(T){T.preventDefault(),await f({title:x.trim(),description:p.trim()||null,responsible_organization_id:v?Number(v):null,responsible_user_id:y?Number(y):null,due_date:M||null,status:E})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Ajouter une décision&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:T=&gt;void U(T),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:x,onChange:T=&gt;b(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:3,value:p,onChange:T=&gt;g(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),r.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation responsable&quot;}),t.jsxs(&quot;select&quot;,{value:v,onChange:T=&gt;j(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),r.map(T=&gt;t.jsx(&quot;option&quot;,{value:T.id,children:T.name},T.id))]})]}),i.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Responsable&quot;}),t.jsxs(&quot;select&quot;,{value:y,onChange:T=&gt;C(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),i.map(T=&gt;t.jsx(&quot;option&quot;,{value:T.id,children:T.name},T.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:M,onChange:T=&gt;A(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{value:E,onChange:T=&gt;S(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:pS.map(T=&gt;t.jsx(&quot;option&quot;,{value:T,children:e0[T]},T))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c,children:c?&quot;Envoi…&quot;:&quot;Ajouter&quot;})]})]})]})})}const bS=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;];function jS({open:l,lots:r,organizations:i,users:c,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;normal&quot;),[T,P]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(p(&quot;&quot;),v(&quot;&quot;),y(&quot;&quot;),M(&quot;&quot;),E(&quot;&quot;),U(&quot;normal&quot;),P(&quot;&quot;))},[l]),!l)return null;async function B(G){G.preventDefault(),await x({title:b.trim(),description:g.trim()||null,lot_id:j?Number(j):null,responsible_organization_id:C?Number(C):null,responsible_user_id:A?Number(A):null,priority:S,due_date:T||null})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Créer une action liée&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:G=&gt;void B(G),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:b,onChange:G=&gt;p(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:3,value:g,onChange:G=&gt;v(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),r.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:j,onChange:G=&gt;y(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),r.map(G=&gt;t.jsxs(&quot;option&quot;,{value:G.id,children:[G.code,&quot; — &quot;,G.name]},G.id))]})]}),i.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation responsable&quot;}),t.jsxs(&quot;select&quot;,{value:C,onChange:G=&gt;M(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),i.map(G=&gt;t.jsx(&quot;option&quot;,{value:G.id,children:G.name},G.id))]})]}),c.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Responsable&quot;}),t.jsxs(&quot;select&quot;,{value:A,onChange:G=&gt;E(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),c.map(G=&gt;t.jsx(&quot;option&quot;,{value:G.id,children:G.name},G.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;select&quot;,{value:S,onChange:G=&gt;U(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:bS.map(G=&gt;t.jsx(&quot;option&quot;,{value:G,children:Tl[G]},G))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:T,onChange:G=&gt;P(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Création…&quot;:&quot;Créer&quot;})]})]})]})})}function vS({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;f(&quot;&quot;)},[l]),!l)return null;async function x(b){b.preventDefault(),await c(m.trim())}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Ajouter un commentaire&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:b=&gt;void x(b),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:4,value:m,onChange:b=&gt;f(b.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}function Dh(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function yS(l){var r,i;return(r=l.user)!=null&amp;&amp;r.name?l.user.name:(i=l.organization)!=null&amp;&amp;i.name?l.organization.name:l.external_name??&quot;Participant externe&quot;}function NS(){var I;const{meetingId:l}=Ys(),{activeProject:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState([]),[v,j]=d.useState(!0),[y,C]=d.useState(null),[M,A]=d.useState(null),[E,S]=d.useState(!1),[U,T]=d.useState(!1),[P,B]=d.useState(!1),[G,K]=d.useState(!1),[Z,k]=d.useState(!1),[w,F]=d.useState(!1),[le,Y]=d.useState(!1),H=d.useCallback(async()=&gt;{if(!(!r||!l)){j(!0),C(null);try{const[ee,de,X]=await Promise.all([tS(r.id,Number(l)),Tt(r.id),t0(r.id)]);c(ee.data),f(de.data.filter(fe=&gt;fe.status!==&quot;archived&quot;)),b(X.meta.organizations),g(X.meta.users)}catch(ee){ee instanceof me&amp;&amp;ee.status===403?C(&quot;Accès refusé à cette réunion.&quot;):ee instanceof me&amp;&amp;ee.status===404?C(&quot;Réunion introuvable.&quot;):C(&quot;Impossible de charger la réunion.&quot;)}finally{j(!1)}}},[r,l]);d.useEffect(()=&gt;{H()},[H]);async function q(ee){if(!(!r||!i)){S(!0);try{const de=await aS(r.id,i.id,ee);c(de.data),T(!1),B(!1),A(&quot;Réunion mise à jour.&quot;)}catch(de){C(de instanceof me?de.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{S(!1)}}}async function _(ee){if(!(!r||!i)){S(!0);try{const de=await lS(r.id,i.id,ee);c(de.data),K(!1),A(&quot;Participant ajouté.&quot;)}catch(de){C(de instanceof me?de.message:&quot;Erreur lors de l’ajout du participant.&quot;)}finally{S(!1)}}}async function z(ee){if(!(!r||!i)){S(!0);try{const de=await nS(r.id,i.id,ee);c(de.data),k(!1),A(&quot;Décision ajoutée.&quot;)}catch(de){C(de instanceof me?de.message:&quot;Erreur lors de la décision.&quot;)}finally{S(!1)}}}async function R(ee){if(!(!r||!i)){S(!0);try{const de=await rS(r.id,i.id,ee);c(de.data),F(!1),A(&quot;Action créée et liée à la réunion.&quot;)}catch(de){C(de instanceof me?de.message:&quot;Erreur lors de la création de l’action.&quot;)}finally{S(!1)}}}async function L(ee){if(!(!r||!i)){S(!0);try{const de=await iS(r.id,i.id,{body:ee});c(de.data),Y(!1),A(&quot;Commentaire ajouté.&quot;)}catch(de){C(de instanceof me?de.message:&quot;Erreur lors du commentaire.&quot;)}finally{S(!1)}}}async function ce(){var de,X;if(!r||!i)return;if(!((((de=i.summary)==null?void 0:de.trim().length)??0)&gt;0||(((X=i.minutes_body)==null?void 0:X.trim().length)??0)&gt;0)){B(!0),C(&quot;Renseignez la synthèse ou le compte rendu avant validation.&quot;);return}S(!0);try{const fe=await cS(r.id,i.id);c(fe.data),A(&quot;Compte rendu validé.&quot;)}catch(fe){C(fe instanceof me?fe.message:&quot;Erreur lors de la validation.&quot;)}finally{S(!1)}}async function D(){if(!(!r||!i)){S(!0);try{const ee=await oS(r.id,i.id);c(ee.data),A(&quot;Réunion clôturée.&quot;)}catch(ee){C(ee instanceof me?ee.message:&quot;Clôture impossible (réunion non validée).&quot;)}finally{S(!1)}}}if(v)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement de la réunion…&quot;})});if(y&amp;&amp;!i)return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/meetings&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour aux réunions&quot;]}),t.jsx(Ve,{title:&quot;Réunion indisponible&quot;,description:y})]});if(!i)return null;const J=i.permissions;return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/meetings&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour aux réunions&quot;]}),M&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:M}),y&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:y}),t.jsx(Je,{title:`${i.code} — ${i.title}`,subtitle:`${zi[i.meeting_type]} · ${Dh(i.scheduled_at)}`,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(Ee,{label:Mi[i.status],tone:zu[i.status]}),J.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(!0),children:&quot;Modifier&quot;}),J.canManageParticipants&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;K(!0),children:&quot;Participants&quot;}),J.canEditMinutes&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;B(!0),children:&quot;Compte rendu&quot;}),J.canCreateDecision&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;k(!0),children:&quot;Décision&quot;}),J.canCreateAction&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;F(!0),children:&quot;Créer action&quot;}),J.canComment&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Y(!0),children:&quot;Commenter&quot;}),J.canValidateMinutes&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void ce(),children:&quot;Valider CR&quot;}),J.canClose&amp;&amp;i.status===&quot;validated&quot;&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void D(),children:&quot;Clôturer&quot;})]})}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Lieu&quot;}),t.jsx(&quot;dd&quot;,{children:i.location??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Organisateur&quot;}),t.jsx(&quot;dd&quot;,{children:((I=i.organizer)==null?void 0:I.name)??&quot;—&quot;})]}),i.validator&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Validé par&quot;}),t.jsxs(&quot;dd&quot;,{children:[i.validator.name,i.validated_at?` · ${Dh(i.validated_at)}`:&quot;&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Synthèse&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 whitespace-pre-wrap text-slate-700&quot;,children:i.summary??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Compte rendu&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 whitespace-pre-wrap text-slate-700&quot;,children:i.minutes_body??&quot;—&quot;})]})]})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Participants&quot;}),i.participants.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun participant.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.participants.map(ee=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:yS(ee)}),t.jsx(&quot;span&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Wp[ee.attendance_status]})]},ee.id))})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Décisions&quot;}),i.decisions.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune décision.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.decisions.map(ee=&gt;t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;font-medium&quot;,children:ee.title}),ee.description&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-slate-600&quot;,children:ee.description}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[e0[ee.status],ee.due_date?` · échéance ${ee.due_date}`:&quot;&quot;]})]},ee.id))})]})]})]}),t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Actions liées&quot;}),i.linked_actions.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucune action liée.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 divide-y divide-slate-100&quot;,children:i.linked_actions.map(ee=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 py-3 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsxs(he,{to:`/actions/${ee.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:[ee.code,&quot; — &quot;,ee.title]}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:ee.source_label??ee.source_type??&quot;&quot;})]}),t.jsx(Ee,{label:ga[ee.status]??ee.status,tone:$n[ee.status]??&quot;gray&quot;})]},ee.id))})]}),t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Commentaires&quot;}),i.comments.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun commentaire.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.comments.map(ee=&gt;{var de;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:((de=ee.author)==null?void 0:de.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:ee.body})]},ee.id)})})]}),r&amp;&amp;t.jsx(Xn,{projectId:r.id,module:&quot;meeting&quot;,attachableId:i.id,canUpload:i.permissions.canEdit||i.permissions.canEditMinutes||i.permissions.canCreateAction,title:&quot;Annexes&quot;,emptyLabel:&quot;Aucune annexe sur cette réunion.&quot;,defaultAttachmentType:&quot;annex&quot;,uploadButtonLabel:&quot;Ajouter une annexe&quot;}),t.jsx(Mu,{open:U,title:&quot;Modifier la réunion&quot;,mode:&quot;edit&quot;,initial:i,isSubmitting:E,onClose:()=&gt;T(!1),onSubmit:q}),t.jsx(Mu,{open:P,title:&quot;Compte rendu&quot;,mode:&quot;minutes&quot;,initial:i,isSubmitting:E,onClose:()=&gt;B(!1),onSubmit:q}),t.jsx(hS,{open:G,organizations:x,users:p,isSubmitting:E,onClose:()=&gt;K(!1),onSubmit:_}),t.jsx(gS,{open:Z,organizations:x,users:p,isSubmitting:E,onClose:()=&gt;k(!1),onSubmit:z}),t.jsx(jS,{open:w,lots:m,organizations:x,users:p,isSubmitting:E,onClose:()=&gt;F(!1),onSubmit:R}),t.jsx(vS,{open:le,isSubmitting:E,onClose:()=&gt;Y(!1),onSubmit:L})]})}const _S=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;],SS=[&quot;open&quot;,&quot;in_progress&quot;,&quot;done&quot;,&quot;to_verify&quot;,&quot;verified&quot;,&quot;closed&quot;,&quot;cancelled&quot;];function Du({open:l,title:r,mode:i=&quot;create&quot;,lots:c,organizations:m,users:f=[],initial:x,isSubmitting:b,onClose:p,onSubmit:g}){const v=i===&quot;assign&quot;,[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;manual&quot;),[T,P]=d.useState(&quot;&quot;),[B,G]=d.useState(&quot;&quot;),[K,Z]=d.useState(&quot;&quot;),[k,w]=d.useState(&quot;&quot;),[F,le]=d.useState(&quot;normal&quot;),[Y,H]=d.useState(&quot;open&quot;),[q,_]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{var R,L,ce,D,J;l&amp;&amp;(y((x==null?void 0:x.code)??&quot;&quot;),M((x==null?void 0:x.title)??&quot;&quot;),E((x==null?void 0:x.description)??&quot;&quot;),U((x==null?void 0:x.source_type)??&quot;manual&quot;),P((x==null?void 0:x.source_label)??&quot;&quot;),G(((R=x==null?void 0:x.lot_id)==null?void 0:R.toString())??&quot;&quot;),Z(((ce=(L=x==null?void 0:x.responsible_organization)==null?void 0:L.id)==null?void 0:ce.toString())??&quot;&quot;),w(((J=(D=x==null?void 0:x.responsible_user)==null?void 0:D.id)==null?void 0:J.toString())??&quot;&quot;),le((x==null?void 0:x.priority)??&quot;normal&quot;),H((x==null?void 0:x.status)??&quot;open&quot;),_((x==null?void 0:x.due_date)??&quot;&quot;))},[l,x]),!l)return null;async function z(R){if(R.preventDefault(),v){await g({responsible_organization_id:K?Number(K):null,responsible_user_id:k?Number(k):null});return}await g({code:j.trim().toUpperCase(),title:C.trim(),description:A.trim()||null,source_type:S,source_label:T.trim()||null,lot_id:B?Number(B):null,responsible_organization_id:K?Number(K):null,responsible_user_id:k?Number(k):null,priority:F,status:i===&quot;create&quot;?Y:void 0,due_date:q||null})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:R=&gt;void z(R),className:&quot;mt-4 space-y-3&quot;,children:[!v&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{required:!0,disabled:i===&quot;edit&quot;,value:j,onChange:R=&gt;y(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Titre *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:C,onChange:R=&gt;M(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:3,value:A,onChange:R=&gt;E(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type de source&quot;}),t.jsx(&quot;select&quot;,{value:S,onChange:R=&gt;U(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:F2.map(R=&gt;t.jsx(&quot;option&quot;,{value:R,children:qn[R]},R))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Libellé source&quot;}),t.jsx(&quot;input&quot;,{value:T,onChange:R=&gt;P(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),i===&quot;create&quot;&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut initial&quot;}),t.jsx(&quot;select&quot;,{value:Y,onChange:R=&gt;H(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:SS.map(R=&gt;t.jsx(&quot;option&quot;,{value:R,children:ga[R]},R))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;select&quot;,{value:F,onChange:R=&gt;le(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:_S.map(R=&gt;t.jsx(&quot;option&quot;,{value:R,children:Tl[R]},R))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:q,onChange:R=&gt;_(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),c.length&gt;0&amp;&amp;!v&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Lot&quot;}),t.jsxs(&quot;select&quot;,{value:B,onChange:R=&gt;G(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),c.map(R=&gt;t.jsxs(&quot;option&quot;,{value:R.id,children:[R.code,&quot; — &quot;,R.name]},R.id))]})]}),v&amp;&amp;c.length&gt;0&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Lot : &quot;,x!=null&amp;&amp;x.lot?`${x.lot.code} — ${x.lot.name}`:&quot;—&quot;]}),m.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation responsable&quot;}),t.jsxs(&quot;select&quot;,{value:K,onChange:R=&gt;Z(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),m.map(R=&gt;t.jsx(&quot;option&quot;,{value:R.id,children:R.name},R.id))]})]}),f.length&gt;0&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Utilisateur responsable&quot;}),t.jsxs(&quot;select&quot;,{value:k,onChange:R=&gt;w(R.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucun —&quot;}),f.map(R=&gt;t.jsx(&quot;option&quot;,{value:R.id,children:R.name},R.id))]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:p,disabled:b,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:b,children:b?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const wS=[{key:&quot;all&quot;,label:&quot;Toutes&quot;},{key:&quot;mine&quot;,label:&quot;Mes actions&quot;},{key:&quot;late&quot;,label:&quot;En retard&quot;},{key:&quot;to_verify&quot;,label:&quot;À vérifier&quot;},{key:&quot;this_week&quot;,label:&quot;Cette semaine&quot;},{key:&quot;closed&quot;,label:&quot;Clôturées&quot;}];function CS(l){if(!l)return!1;const r=new Date(l),i=new Date,c=new Date(i);c.setHours(0,0,0,0);const m=new Date(c);return m.setDate(m.getDate()+7),r&gt;=c&amp;&amp;r&lt;=m}function ES(l,r,i,c){var m,f;switch(r){case&quot;all&quot;:return l.status!==&quot;cancelled&quot;;case&quot;mine&quot;:return((m=l.responsible_user)==null?void 0:m.id)===c?!0:i?((f=l.responsible_organization)==null?void 0:f.id)===i:!1;case&quot;late&quot;:return l.is_late;case&quot;to_verify&quot;:return l.status===&quot;to_verify&quot;;case&quot;this_week&quot;:return CS(l.due_date);case&quot;closed&quot;:return l.status===&quot;closed&quot;;default:return!0}}function AS(l){var r,i;return((r=l.responsible_organization)==null?void 0:r.name)??((i=l.responsible_user)==null?void 0:i.name)??&quot;—&quot;}function kS(){var z,R;const{user:l}=Gs(),{activeProject:r,activeMembership:i}=Ke(),[c]=Ol(),m=c.get(&quot;lot_id&quot;),[f,x]=d.useState([]),[b,p]=d.useState([]),[g,v]=d.useState([]),[j,y]=d.useState([]),[C,M]=d.useState(!0),[A,E]=d.useState(null),[S,U]=d.useState(&quot;&quot;),[T,P]=d.useState(&quot;all&quot;),[B,G]=d.useState(!1),[K,Z]=d.useState(!1),[k,w]=d.useState(null),F=d.useCallback(async()=&gt;{if(r){M(!0),E(null);try{const L=m?{lot_id:Number(m)}:void 0,[ce,D]=await Promise.all([ed(r.id,L),Tt(r.id)]);x(ce.data),v(ce.meta.organizations),y(ce.meta.users),p(D.data.filter(J=&gt;J.status!==&quot;archived&quot;))}catch(L){L instanceof me&amp;&amp;L.status===403?E(&quot;Accès refusé à la liste des actions.&quot;):E(&quot;Impossible de charger les actions.&quot;),x([])}finally{M(!1)}}},[r,m]);d.useEffect(()=&gt;{F()},[F]);const le=d.useMemo(()=&gt;{const L=S.trim().toLowerCase();return f.filter(ce=&gt;{var D,J;return ES(ce,T,(D=i==null?void 0:i.organization)==null?void 0:D.id,l==null?void 0:l.id)?L?ce.code.toLowerCase().includes(L)||ce.title.toLowerCase().includes(L)||(((J=ce.lot)==null?void 0:J.code.toLowerCase().includes(L))??!1):!0:!1})},[f,S,T,(z=i==null?void 0:i.organization)==null?void 0:z.id,l==null?void 0:l.id]),Y=d.useMemo(()=&gt;{const L=f.filter(I=&gt;![&quot;closed&quot;,&quot;cancelled&quot;].includes(I.status)),ce=L.filter(I=&gt;I.is_late).length,D=f.filter(I=&gt;I.status===&quot;to_verify&quot;).length,J=f.filter(I=&gt;I.status===&quot;closed&quot;).length;return{open:L.length,late:ce,toVerify:D,closed:J}},[f]);async function H(L){if(r){Z(!0);try{await $2(r.id,L),G(!1),w(&quot;Action créée avec succès.&quot;),await F()}catch(ce){E(ce instanceof me?ce.message:&quot;Erreur lors de la création.&quot;)}finally{Z(!1)}}}const q=K2(i==null?void 0:i.role_code),_=m?(R=b.find(L=&gt;L.id===Number(m)))==null?void 0:R.code:null;return C?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des actions…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Actions&quot;,subtitle:&quot;Suivi consolidé des responsabilités&quot;,action:q?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;G(!0),children:&quot;Créer une action&quot;}):void 0}),_&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Filtre lot : &quot;,t.jsx(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:_}),&quot; · &quot;,t.jsx(he,{to:&quot;/actions&quot;,className:&quot;text-planx-orange hover:underline&quot;,children:&quot;Voir toutes les actions&quot;})]}),k&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,role:&quot;status&quot;,children:k}),A&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:A}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Actions ouvertes&quot;,value:String(Y.open),subtitle:&quot;Hors clôturées&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;En retard&quot;,value:String(Y.late),subtitle:&quot;Échéance dépassée&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;À vérifier&quot;,value:String(Y.toVerify),subtitle:&quot;Réalisations déclarées&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Clôturées&quot;,value:String(Y.closed),subtitle:&quot;Actions terminées&quot;,tone:&quot;emerald&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher une action…&quot;,value:S,onChange:L=&gt;U(L.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:wS.map(L=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;P(L.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${T===L.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:L.label},L.key))})]}),le.length===0?t.jsx(Ve,{title:&quot;Aucune action trouvée&quot;,description:f.length===0?&quot;Aucune action n’est disponible pour votre périmètre sur ce chantier.&quot;:&quot;Aucune action ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Source&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:le.map(L=&gt;{var ce;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:L.code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:L.source_type?qn[L.source_type]:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[180px] truncate px-4 py-3 font-medium&quot;,children:L.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((ce=L.lot)==null?void 0:ce.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:AS(L)}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Tl[L.priority]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:ga[L.status],tone:$n[L.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:L.due_date??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:L.is_late?&quot;Oui&quot;:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/actions/${L.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},L.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:le.map(L=&gt;{var ce,D;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:L.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:L.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[L.source_label??(L.source_type?qn[L.source_type]:&quot;—&quot;),&quot; · &quot;,((ce=L.lot)==null?void 0:ce.code)??&quot;—&quot;]})]}),t.jsx(Ee,{label:ga[L.status],tone:$n[L.status]})]}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:Tl[L.priority]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:L.due_date??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:((D=L.responsible_organization)==null?void 0:D.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-semibold&quot;,children:L.is_late?&quot;Oui&quot;:&quot;Non&quot;})]})]}),t.jsx(he,{to:`/actions/${L.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},L.id)})})]}),t.jsx(Du,{open:B,title:&quot;Créer une action&quot;,lots:b,organizations:g,users:j,isSubmitting:K,onClose:()=&gt;G(!1),onSubmit:L=&gt;H(L)})]})}function TS({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;f(&quot;&quot;)},[l]),!l)return null;async function x(b){b.preventDefault(),await c(m.trim())}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Ajouter un commentaire&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:b=&gt;void x(b),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:4,value:m,onChange:b=&gt;f(b.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}const zS={mark_done:&quot;Marquer comme réalisée&quot;,verify:&quot;Vérifier l’action&quot;,close:&quot;Clôturer l’action&quot;,status:&quot;Changer le statut&quot;};function MS({open:l,mode:r,commentRequired:i=!1,isSubmitting:c,onClose:m,onSubmit:f}){const[x,b]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;b(&quot;&quot;)},[l]),!l)return null;async function p(v){v.preventDefault(),!((r===&quot;close&quot;||i)&amp;&amp;!x.trim())&amp;&amp;await f({comment:x.trim()||void 0})}const g=r===&quot;close&quot;||i;return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:zS[r]}),t.jsxs(&quot;form&quot;,{onSubmit:v=&gt;void p(v),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Commentaire&quot;,g?&quot; *&quot;:&quot; (optionnel)&quot;]}),t.jsx(&quot;textarea&quot;,{required:g,rows:3,value:x,onChange:v=&gt;b(v.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c,children:c?&quot;Envoi…&quot;:&quot;Confirmer&quot;})]})]})]})})}function DS(){var q,_;const{actionId:l}=Ys(),{activeProject:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState(!0),[v,j]=d.useState(null),[y,C]=d.useState(!1),[M,A]=d.useState(!1),[E,S]=d.useState(null),[U,T]=d.useState(!1),[P,B]=d.useState([]),[G,K]=d.useState(!1),[Z,k]=d.useState(null),w=d.useCallback(async()=&gt;{if(!(!r||!l)){g(!0),j(null);try{const[z,R,L]=await Promise.all([U2(r.id,Number(l)),Tt(r.id),ed(r.id)]);c(z.data),B(L.meta.users),f(R.data.filter(ce=&gt;ce.status!==&quot;archived&quot;)),b(R.meta.organizations)}catch(z){z instanceof me&amp;&amp;z.status===403?j(&quot;Accès refusé à cette action.&quot;):z instanceof me&amp;&amp;z.status===404?j(&quot;Action introuvable.&quot;):j(&quot;Impossible de charger l’action.&quot;)}finally{g(!1)}}},[r,l]);d.useEffect(()=&gt;{w()},[w]);async function F(z){if(!(!r||!i)){K(!0);try{const R=await q2(r.id,i.id,z);c(R.data),C(!1),k(&quot;Action mise à jour avec succès.&quot;)}catch(R){j(R instanceof me?R.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{K(!1)}}}async function le(z){if(!(!r||!i)){K(!0);try{const R=await B2(r.id,i.id,z);c(R.data),T(!1),k(&quot;Action affectée avec succès.&quot;)}catch(R){j(R instanceof me?R.message:&quot;Erreur lors de l’affectation.&quot;)}finally{K(!1)}}}async function Y(z){if(!(!r||!i)){K(!0);try{const R=await H2(r.id,i.id,{body:z});c(R.data),A(!1),k(&quot;Commentaire ajouté.&quot;)}catch(R){j(R instanceof me?R.message:&quot;Erreur lors du commentaire.&quot;)}finally{K(!1)}}}async function H(z){if(!(!r||!i||!E)){K(!0);try{let R;E===&quot;mark_done&quot;?R=await V2(r.id,i.id,z):E===&quot;verify&quot;?R=await Y2(r.id,i.id,z):R=await G2(r.id,i.id,z),c(R.data),S(null),k(&quot;Action enregistrée avec succès.&quot;)}catch(R){j(R instanceof me?R.message:&quot;Erreur lors de l’action.&quot;)}finally{K(!1)}}}return p?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement de l&#039;action…&quot;})}):v&amp;&amp;!i?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/actions&quot;,className:&quot;inline-flex items-center gap-1 text-sm text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot; Retour aux actions&quot;]}),t.jsx(Ve,{title:&quot;Action indisponible&quot;,description:v})]}):i?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/actions&quot;,className:&quot;inline-flex items-center gap-1 text-sm font-medium text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Retour aux actions&quot;]}),Z&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:Z}),v&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:v}),t.jsx(Je,{title:`${i.code} — ${i.title}`,subtitle:i.source_type?`${qn[i.source_type]} · ${i.source_label??&quot;&quot;}`:&quot;Action chantier&quot;,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(Ee,{label:ga[i.status],tone:$n[i.status]}),i.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;C(!0),children:&quot;Modifier&quot;}),i.permissions.canAssign&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;T(!0),children:&quot;Affecter&quot;}),i.permissions.canComment&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;A(!0),children:&quot;Commenter&quot;}),i.permissions.canMarkDone&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(&quot;mark_done&quot;),children:&quot;Marquer réalisée&quot;}),i.permissions.canVerify&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(&quot;verify&quot;),children:&quot;Vérifier&quot;}),i.permissions.canClose&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(&quot;close&quot;),children:&quot;Clôturer&quot;})]})}),t.jsxs(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:[t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Lot&quot;}),t.jsx(&quot;dd&quot;,{children:i.lot?`${i.lot.code} — ${i.lot.name}`:&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{children:((q=i.responsible_organization)==null?void 0:q.name)??((_=i.responsible_user)==null?void 0:_.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Priorité&quot;}),t.jsx(&quot;dd&quot;,{children:Tl[i.priority]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-between gap-4&quot;,children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Échéance&quot;}),t.jsxs(&quot;dd&quot;,{children:[i.due_date??&quot;—&quot;,i.is_late?&quot; (en retard)&quot;:&quot;&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Description&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;mt-1 text-slate-700&quot;,children:i.description})]})]})]}),t.jsxs(&quot;section&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-dashed border-slate-200 bg-slate-50 p-4&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-800&quot;,children:&quot;Source liée&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-2 space-y-1 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Type&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:i.source_type?qn[i.source_type]:&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Référence&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:i.source_label??&quot;—&quot;})]})]}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:&quot;L’ouverture directe de la source sera enrichie dans un prochain lot.&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Commentaires&quot;}),i.comments.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun commentaire.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.comments.map(z=&gt;{var R;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:((R=z.author)==null?void 0:R.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:z.body})]},z.id)})})]}),t.jsxs(&quot;div&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Historique des statuts&quot;}),i.status_histories.length===0?t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:&quot;Aucun historique.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.status_histories.map(z=&gt;{var R;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:[z.old_status?ga[z.old_status]:&quot;—&quot;,&quot; → &quot;,ga[z.new_status]]}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((R=z.changed_by)==null?void 0:R.name)??&quot;—&quot;}),z.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:z.comment})]},z.id)})})]}),r&amp;&amp;t.jsx(Xn,{projectId:r.id,module:&quot;action&quot;,attachableId:i.id,canUpload:i.permissions.canComment||i.permissions.canMarkDone||i.permissions.canEdit,title:&quot;Pièces jointes&quot;,emptyLabel:&quot;Aucune pièce jointe sur cette action.&quot;,defaultAttachmentType:&quot;proof&quot;,uploadButtonLabel:&quot;Ajouter une preuve&quot;})]})]}),t.jsx(Du,{open:y,title:&quot;Modifier l’action&quot;,mode:&quot;edit&quot;,lots:m,organizations:x,users:P,initial:i,isSubmitting:G,onClose:()=&gt;C(!1),onSubmit:z=&gt;F(z)}),t.jsx(Du,{open:U,title:&quot;Affecter l’action&quot;,mode:&quot;assign&quot;,lots:m,organizations:x,users:P,initial:i,isSubmitting:G,onClose:()=&gt;T(!1),onSubmit:async z=&gt;le(z)}),t.jsx(TS,{open:M,isSubmitting:G,onClose:()=&gt;A(!1),onSubmit:Y}),t.jsx(MS,{open:E!==null,mode:E??&quot;close&quot;,commentRequired:E===&quot;close&quot;&amp;&amp;i.status!==&quot;verified&quot;,isSubmitting:G,onClose:()=&gt;S(null),onSubmit:H})]}):null}const Di={draft:&quot;Brouillon&quot;,generated:&quot;Généré&quot;,pending_validation:&quot;À valider&quot;,validated:&quot;Validé&quot;,rejected:&quot;Rejeté&quot;,archived:&quot;Archivé&quot;},Ru={draft:&quot;gray&quot;,generated:&quot;blue&quot;,pending_validation:&quot;purple&quot;,validated:&quot;green&quot;,rejected:&quot;red&quot;,archived:&quot;gray&quot;},zl={executive_summary:&quot;Synthèse exécutive&quot;,highlights:&quot;Faits marquants&quot;,difficulties:&quot;Difficultés&quot;,decisions_expected:&quot;Décisions attendues&quot;,priorities_next_week:&quot;Priorités semaine suivante&quot;,general_comment:&quot;Commentaire général&quot;};function Rh(l){return l===&quot;SA&quot;||l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;}function Ri(l,r){const i=new Date(l).toLocaleDateString(&quot;fr-FR&quot;),c=new Date(r).toLocaleDateString(&quot;fr-FR&quot;);return`${i} — ${c}`}function Oh(){const l=new Date,r=l.getDay(),i=r===0?-6:1-r,c=new Date(l);c.setDate(l.getDate()+i-7);const m=new Date(c);return m.setDate(c.getDate()+6),{start:c.toISOString().slice(0,10),end:m.toISOString().slice(0,10)}}function RS({open:l,lots:r,isSubmitting:i,onClose:c,onSubmit:m}){const f=Oh(),[x,b]=d.useState(f.start),[p,g]=d.useState(f.end),[v,j]=d.useState([]),[y,C]=d.useState(!0);if(d.useEffect(()=&gt;{if(!l)return;const E=Oh();b(E.start),g(E.end),j([]),C(!0)},[l]),!l)return null;function M(E){j(S=&gt;S.includes(E)?S.filter(U=&gt;U!==E):[...S,E])}async function A(E){E.preventDefault();const S={period_start_date:x,period_end_date:p};!y&amp;&amp;v.length&gt;0&amp;&amp;(S.included_lot_ids=v),await m(S)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-lg rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Générer un rapport hebdomadaire&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:E=&gt;void A(E),className:&quot;mt-4 space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;grid gap-3 sm:grid-cols-2&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Période début *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,required:!0,value:x,onChange:E=&gt;b(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Période fin *&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,required:!0,value:p,min:x,onChange:E=&gt;g(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;space-y-2&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:y,onChange:E=&gt;C(E.target.checked),className:&quot;rounded border-slate-300&quot;}),t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Tous les lots du chantier&quot;})]}),!y&amp;&amp;r.length&gt;0&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;max-h-40 space-y-1 overflow-y-auto rounded-lg border border-slate-200 p-2&quot;,children:r.map(E=&gt;t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm text-slate-700&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:v.includes(E.id),onChange:()=&gt;M(E.id),className:&quot;rounded border-slate-300&quot;}),t.jsxs(&quot;span&quot;,{children:[E.code,&quot; — &quot;,E.name]})]},E.id))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Génération…&quot;:&quot;Générer&quot;})]})]})]})})}function OS(l){return&quot;&quot;}async function LS(l,r){return Ae(`/projects/${l}/reports${OS()}`,!0)}async function US(l,r){return Ae(`/projects/${l}/reports/${r}`,!0)}async function $S(l,r){return Se(`/projects/${l}/reports/generate`,r,!0)}async function qS(l,r,i){return Ue(`/projects/${l}/reports/${r}`,i,!0)}async function BS(l,r,i){return Se(`/projects/${l}/reports/${r}/submit`,i??{},!0)}async function HS(l,r,i){return Se(`/projects/${l}/reports/${r}/validate`,i??{},!0)}async function VS(l,r,i){return Se(`/projects/${l}/reports/${r}/reject`,i,!0)}async function YS(l,r,i){return Se(`/projects/${l}/reports/${r}/comments`,i,!0)}async function GS(l,r){return Ue(`/projects/${l}/reports/${r}/archive`,{},!0)}async function ZS(l,r){return Ae(`/projects/${l}/reports/${r}/print`,!0)}const QS=[{key:&quot;all&quot;,label:&quot;Tous&quot;},{key:&quot;draft&quot;,label:&quot;Brouillons&quot;},{key:&quot;pending_validation&quot;,label:&quot;À valider&quot;},{key:&quot;validated&quot;,label:&quot;Validés&quot;},{key:&quot;rejected&quot;,label:&quot;Rejetés&quot;}];function XS(l,r){switch(r){case&quot;all&quot;:return l.status!==&quot;archived&quot;;case&quot;draft&quot;:return l.status===&quot;draft&quot;||l.status===&quot;generated&quot;;case&quot;pending_validation&quot;:return l.status===&quot;pending_validation&quot;;case&quot;validated&quot;:return l.status===&quot;validated&quot;;case&quot;rejected&quot;:return l.status===&quot;rejected&quot;;default:return!0}}function PS(){const{user:l}=Gs(),{activeProject:r}=Ke(),i=ys(),[c,m]=d.useState([]),[f,x]=d.useState([]),[b,p]=d.useState(!0),[g,v]=d.useState(null),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;all&quot;),[A,E]=d.useState(!1),[S,U]=d.useState(!1),[T,P]=d.useState(null),B=d.useCallback(async()=&gt;{if(r){p(!0),v(null);try{const[w,F]=await Promise.all([LS(r.id),Tt(r.id)]);m(w.data),x(F.data.filter(le=&gt;le.status!==&quot;archived&quot;))}catch(w){w instanceof me&amp;&amp;w.status===403?v(&quot;Accès refusé aux rapports.&quot;):v(&quot;Impossible de charger les rapports.&quot;),m([])}finally{p(!1)}}},[r]);d.useEffect(()=&gt;{B()},[B]);const G=d.useMemo(()=&gt;{const w=j.trim().toLowerCase();return c.filter(F=&gt;XS(F,C)?w?F.code.toLowerCase().includes(w)||F.title.toLowerCase().includes(w):!0:!1)},[c,j,C]),K=d.useMemo(()=&gt;({generated:c.filter(w=&gt;w.status===&quot;generated&quot;).length,drafts:c.filter(w=&gt;w.status===&quot;draft&quot;||w.status===&quot;generated&quot;).length,pending:c.filter(w=&gt;w.status===&quot;pending_validation&quot;).length,validated:c.filter(w=&gt;w.status===&quot;validated&quot;).length}),[c]),Z=c.length===0?Rh(l==null?void 0:l.role_code):c.some(w=&gt;w.permissions.canEdit)||Rh(l==null?void 0:l.role_code);async function k(w){if(r){U(!0);try{const F=await $S(r.id,w);E(!1),P(F.message??&quot;Rapport généré.&quot;),await B(),i(`/reports/${F.data.id}`)}catch(F){v(F instanceof me?F.message:&quot;Erreur lors de la génération.&quot;)}finally{U(!1)}}}return b?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des rapports…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Rapports&quot;,subtitle:&quot;Rapports hebdomadaires et exports&quot;,action:Z?t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;E(!0),children:&quot;Générer rapport&quot;}):void 0}),T&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:T}),g&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:g}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Générés&quot;,value:String(K.generated),subtitle:&quot;Statut généré&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Brouillons&quot;,value:String(K.drafts),subtitle:&quot;Brouillon / généré&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;À valider&quot;,value:String(K.pending),subtitle:&quot;En attente&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Validés&quot;,value:String(K.validated),subtitle:&quot;Rapports validés&quot;,tone:&quot;emerald&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher un rapport…&quot;,value:j,onChange:w=&gt;y(w.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:QS.map(w=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;M(w.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${C===w.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:w.label},w.key))})]}),G.length===0?t.jsx(Ve,{title:&quot;Aucun rapport trouvé&quot;,description:c.length===0?&quot;Aucun rapport disponible pour votre périmètre.&quot;:&quot;Aucun rapport ne correspond à votre recherche ou filtre.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Période&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Code&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Titre&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Avancement&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Retard&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Critiques&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;DOE&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Auteur&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:G.map(w=&gt;{var F;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50 hover:bg-slate-50/80&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 whitespace-nowrap&quot;,children:Ri(w.period_start_date,w.period_end_date)}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-semibold text-planx-orange&quot;,children:w.code}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[160px] truncate px-4 py-3 font-medium&quot;,children:w.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:Di[w.status],tone:Ru[w.status]})}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[w.summary.average_validated_progress,&quot;%&quot;]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:w.summary.tasks_late}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:w.summary.points_critical}),t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[w.summary.doe_completion_rate,&quot;%&quot;]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((F=w.created_by)==null?void 0:F.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/reports/${w.id}`,children:t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},w.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:G.map(w=&gt;t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Ri(w.period_start_date,w.period_end_date)}),t.jsx(&quot;p&quot;,{className:&quot;text-xs font-semibold text-planx-orange&quot;,children:w.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:w.title})]}),t.jsx(Ee,{label:Di[w.status],tone:Ru[w.status]})]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 grid grid-cols-3 gap-2 text-center text-xs&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Avancement&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:[w.summary.average_validated_progress,&quot;%&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Critiques&quot;}),t.jsx(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:w.summary.points_critical})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;DOE&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:[w.summary.doe_completion_rate,&quot;%&quot;]})]})]}),t.jsx(he,{to:`/reports/${w.id}`,className:&quot;mt-4 block&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},w.id))})]}),t.jsx(RS,{open:A,lots:f,isSubmitting:S,onClose:()=&gt;E(!1),onSubmit:k})]})}const FS=Object.keys(zl);function KS({open:l,initial:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState({executive_summary:&quot;&quot;,highlights:&quot;&quot;,difficulties:&quot;&quot;,decisions_expected:&quot;&quot;,priorities_next_week:&quot;&quot;,general_comment:&quot;&quot;});if(d.useEffect(()=&gt;{l&amp;&amp;x({executive_summary:(r==null?void 0:r.executive_summary)??&quot;&quot;,highlights:(r==null?void 0:r.highlights)??&quot;&quot;,difficulties:(r==null?void 0:r.difficulties)??&quot;&quot;,decisions_expected:(r==null?void 0:r.decisions_expected)??&quot;&quot;,priorities_next_week:(r==null?void 0:r.priorities_next_week)??&quot;&quot;,general_comment:(r==null?void 0:r.general_comment)??&quot;&quot;})},[l,r]),!l)return null;async function b(p){p.preventDefault(),await m(f)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Modifier les sections du rapport&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:p=&gt;void b(p),className:&quot;mt-4 space-y-4&quot;,children:[FS.map(p=&gt;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:zl[p]}),t.jsx(&quot;textarea&quot;,{rows:3,value:f[p],onChange:g=&gt;x(v=&gt;({...v,[p]:g.target.value})),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]},p)),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const JS={submit:&quot;Soumettre pour validation&quot;,validate:&quot;Valider le rapport&quot;,reject:&quot;Rejeter le rapport&quot;};function IS({open:l,mode:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;x(&quot;&quot;)},[l,r]),!l)return null;async function b(p){p.preventDefault(),!(r===&quot;reject&quot;&amp;&amp;!f.trim())&amp;&amp;await m(f.trim()||void 0)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:JS[r]}),t.jsxs(&quot;form&quot;,{onSubmit:p=&gt;void b(p),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Commentaire&quot;,r===&quot;reject&quot;?&quot; *&quot;:&quot; (optionnel)&quot;]}),t.jsx(&quot;textarea&quot;,{required:r===&quot;reject&quot;,rows:4,value:f,onChange:p=&gt;x(p.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,placeholder:r===&quot;reject&quot;?&quot;Motif du rejet…&quot;:&quot;&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:r===&quot;reject&quot;?&quot;danger&quot;:&quot;primary&quot;,disabled:i,children:i?&quot;Traitement…&quot;:r===&quot;reject&quot;?&quot;Rejeter&quot;:&quot;Confirmer&quot;})]})]})]})})}function WS({open:l,isSubmitting:r,onClose:i,onSubmit:c}){const[m,f]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;f(&quot;&quot;)},[l]),!l)return null;async function x(b){b.preventDefault(),await c(m.trim())}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Ajouter un commentaire&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:b=&gt;void x(b),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Commentaire *&quot;}),t.jsx(&quot;textarea&quot;,{required:!0,rows:4,value:m,onChange:b=&gt;f(b.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}function mi(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function ew(){var F,le;const{reportId:l}=Ys(),r=ys(),{activeProject:i}=Ke(),[c,m]=d.useState(null),[f,x]=d.useState(!0),[b,p]=d.useState(null),[g,v]=d.useState(null),[j,y]=d.useState(!1),[C,M]=d.useState(!1),[A,E]=d.useState(null),[S,U]=d.useState(!1),T=d.useCallback(async()=&gt;{if(!(!i||!l)){x(!0),p(null);try{const Y=await US(i.id,Number(l));m(Y.data)}catch(Y){Y instanceof me&amp;&amp;Y.status===403?p(&quot;Accès refusé à ce rapport.&quot;):Y instanceof me&amp;&amp;Y.status===404?p(&quot;Rapport introuvable.&quot;):p(&quot;Impossible de charger le rapport.&quot;)}finally{x(!1)}}},[i,l]);d.useEffect(()=&gt;{T()},[T]);async function P(Y){if(!(!i||!c)){y(!0);try{const H=await qS(i.id,c.id,{editable_sections:Y});m(H.data),M(!1),v(&quot;Sections mises à jour.&quot;)}catch(H){p(H instanceof me?H.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{y(!1)}}}async function B(Y){if(!(!i||!c||!A)){y(!0);try{let H;A===&quot;submit&quot;?H=await BS(i.id,c.id,{comment:Y}):A===&quot;validate&quot;?H=await HS(i.id,c.id,{comment:Y}):H=await VS(i.id,c.id,{comment:Y??&quot;&quot;}),m(H.data),E(null),v(H.message??&quot;Opération réussie.&quot;)}catch(H){p(H instanceof me?H.message:&quot;Erreur lors de l’opération.&quot;)}finally{y(!1)}}}async function G(Y){if(!(!i||!c)){y(!0);try{const H=await YS(i.id,c.id,{body:Y});m(H.data),U(!1),v(&quot;Commentaire ajouté.&quot;)}catch(H){p(H instanceof me?H.message:&quot;Erreur lors de l’ajout du commentaire.&quot;)}finally{y(!1)}}}async function K(){if(!(!i||!c)){y(!0);try{const Y=await GS(i.id,c.id);m(Y.data),v(&quot;Rapport archivé.&quot;)}catch(Y){p(Y instanceof me?Y.message:&quot;Erreur lors de l’archivage.&quot;)}finally{y(!1)}}}if(f)return t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement du rapport…&quot;})});if(b&amp;&amp;!c)return t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[t.jsxs(he,{to:&quot;/reports&quot;,className:&quot;inline-flex items-center gap-2 text-sm text-slate-600 hover:text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot;Retour aux rapports&quot;]}),t.jsx(Ve,{title:&quot;Rapport indisponible&quot;,description:b})]});if(!c)return null;const Z=c.generated_summary,k=Z==null?void 0:Z.kpis,w=c.permissions;return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsxs(he,{to:&quot;/reports&quot;,className:&quot;inline-flex items-center gap-2 text-sm text-slate-600 hover:text-planx-orange&quot;,children:[t.jsx(wt,{className:&quot;h-4 w-4&quot;}),&quot;Retour aux rapports&quot;]}),t.jsx(Je,{title:c.title,subtitle:`${c.code} · ${Ri(c.period_start_date,c.period_end_date)}`,action:t.jsx(Ee,{label:Di[c.status],tone:Ru[c.status]})}),g&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:g}),b&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:b}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[w.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;M(!0),children:&quot;Modifier sections&quot;}),w.canSubmit&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(&quot;submit&quot;),children:&quot;Soumettre&quot;}),w.canValidate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(&quot;validate&quot;),children:&quot;Valider&quot;}),w.canReject&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(&quot;reject&quot;),children:&quot;Rejeter&quot;}),w.canComment&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;U(!0),children:&quot;Commenter&quot;}),w.canArchive&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void K(),disabled:j,children:&quot;Archiver&quot;}),w.canPrint&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;r(`/reports/${c.id}/print`),children:&quot;Imprimer / Exporter&quot;})]}),t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Informations&quot;}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid gap-2 text-sm sm:grid-cols-2&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Auteur&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:((F=c.created_by)==null?void 0:F.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Généré le&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:mi(c.generated_at)})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Validé par&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:((le=c.validated_by)==null?void 0:le.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Validé le&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:mi(c.validated_at)})]})]})]}),k&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Indicateurs (snapshot)&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-3 text-sm sm:grid-cols-4&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Avancement moyen&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;text-lg font-bold&quot;,children:[k.average_validated_progress??0,&quot;%&quot;]})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Tâches en retard&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-lg font-bold&quot;,children:k.tasks_late??0})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;Points critiques&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-lg font-bold&quot;,children:k.points_critical??0})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-slate-500&quot;,children:&quot;DOE&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;text-lg font-bold&quot;,children:[k.doe_completion_rate??0,&quot;%&quot;]})]})]})]}),(Z==null?void 0:Z.lots)&amp;&amp;Z.lots.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Avancement par lot&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:Z.lots.map(Y=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex justify-between gap-2 border-b border-slate-50 pb-2&quot;,children:[t.jsxs(&quot;span&quot;,{children:[t.jsx(he,{to:`/lots/${Y.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:Y.code}),&quot; — &quot;,Y.name]}),t.jsxs(&quot;span&quot;,{className:&quot;font-semibold&quot;,children:[Y.validated_progress??0,&quot;%&quot;]})]},Y.id))})]}),(Z==null?void 0:Z.late_tasks)&amp;&amp;Z.late_tasks.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Tâches en retard&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:Z.late_tasks.map(Y=&gt;t.jsxs(&quot;li&quot;,{children:[t.jsx(he,{to:`/tasks/${Y.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:Y.code}),&quot; — &quot;,Y.title]},Y.id))})]}),(Z==null?void 0:Z.critical_points)&amp;&amp;Z.critical_points.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Points critiques&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:Z.critical_points.map(Y=&gt;t.jsxs(&quot;li&quot;,{children:[t.jsx(he,{to:`/points/${Y.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:Y.code}),&quot; — &quot;,Y.title]},Y.id))})]}),c.editable_sections&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Sections éditables&quot;}),t.jsx(&quot;div&quot;,{className:&quot;mt-3 space-y-4 text-sm&quot;,children:Object.keys(zl).map(Y=&gt;{var H;return t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;h3&quot;,{className:&quot;font-medium text-slate-700&quot;,children:zl[Y]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 whitespace-pre-wrap text-slate-600&quot;,children:((H=c.editable_sections)==null?void 0:H[Y])||&quot;—&quot;})]},Y)})})]}),c.comments.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Commentaires&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-3 text-sm&quot;,children:c.comments.map(Y=&gt;{var H;return t.jsxs(&quot;li&quot;,{className:&quot;rounded-lg bg-slate-50 p-3&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:[((H=Y.author)==null?void 0:H.name)??&quot;—&quot;,&quot; · &quot;,mi(Y.created_at)]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 whitespace-pre-wrap&quot;,children:Y.body})]},Y.id)})})]}),i&amp;&amp;t.jsx(Xn,{projectId:i.id,module:&quot;report&quot;,attachableId:c.id,canUpload:c.permissions.canEdit||c.permissions.canComment,title:&quot;Annexes du rapport&quot;,emptyLabel:&quot;Aucune annexe sur ce rapport.&quot;,defaultAttachmentType:&quot;annex&quot;,uploadButtonLabel:&quot;Ajouter une annexe&quot;}),c.validations.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-sm font-semibold uppercase text-slate-500&quot;,children:&quot;Historique validations&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:c.validations.map(Y=&gt;{var H;return t.jsxs(&quot;li&quot;,{className:&quot;border-b border-slate-50 pb-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:Y.decision}),&quot; — &quot;,((H=Y.decided_by)==null?void 0:H.name)??&quot;—&quot;,&quot; · &quot;,mi(Y.created_at),Y.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:Y.comment})]},Y.id)})})]}),t.jsx(KS,{open:C,initial:c.editable_sections,isSubmitting:j,onClose:()=&gt;M(!1),onSubmit:P}),t.jsx(IS,{open:A!==null,mode:A??&quot;submit&quot;,isSubmitting:j,onClose:()=&gt;E(null),onSubmit:B}),t.jsx(WS,{open:S,isSubmitting:j,onClose:()=&gt;U(!1),onSubmit:G})]})}function Lh(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;long&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function tw(){const{reportId:l}=Ys(),{activeProject:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState(null),x=d.useCallback(async()=&gt;{if(!(!r||!l))try{const v=await ZS(r.id,Number(l));c(v.print_data)}catch(v){v instanceof me?f(v.message):f(&quot;Impossible de charger le rapport.&quot;)}},[r,l]);if(d.useEffect(()=&gt;{x()},[x]),m)return t.jsxs(&quot;div&quot;,{className:&quot;min-h-screen bg-white p-8 text-center text-slate-600&quot;,children:[t.jsx(&quot;p&quot;,{children:m}),t.jsx(he,{to:&quot;/reports&quot;,className:&quot;mt-4 inline-block text-planx-orange&quot;,children:&quot;Retour&quot;})]});if(!i)return t.jsx(&quot;div&quot;,{className:&quot;min-h-screen bg-white p-8 text-center text-slate-500&quot;,children:&quot;Chargement…&quot;});const b=i.generated_summary,p=b==null?void 0:b.kpis,g=b==null?void 0:b.project;return t.jsxs(&quot;div&quot;,{className:&quot;min-h-screen bg-white text-slate-900 print:p-0&quot;,children:[t.jsx(&quot;style&quot;,{children:`
        @media print {
          .no-print { display: none !important; }
          body { background: white; }
        }
      `}),t.jsx(&quot;div&quot;,{className:&quot;no-print border-b border-slate-200 bg-slate-50 px-4 py-3&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;mx-auto flex max-w-4xl items-center justify-between gap-4&quot;,children:[t.jsx(he,{to:`/reports/${i.id}`,className:&quot;text-sm text-planx-orange hover:underline&quot;,children:&quot;← Retour au rapport&quot;}),t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;window.print(),className:&quot;rounded-lg bg-planx-orange px-4 py-2 text-sm font-medium text-white hover:bg-fc-green-dark&quot;,children:&quot;Imprimer / Enregistrer en PDF&quot;})]})}),t.jsxs(&quot;article&quot;,{className:&quot;mx-auto max-w-4xl px-6 py-10 print:px-8 print:py-6&quot;,children:[t.jsxs(&quot;header&quot;,{className:&quot;border-b border-slate-300 pb-6&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;FasoChantier — Rapport hebdomadaire&quot;}),t.jsx(&quot;h1&quot;,{className:&quot;mt-2 text-2xl font-bold&quot;,children:i.title}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-sm font-semibold text-slate-600&quot;,children:i.code}),g&amp;&amp;t.jsxs(&quot;p&quot;,{className:&quot;mt-3 text-base&quot;,children:[&quot;Chantier : &quot;,t.jsx(&quot;strong&quot;,{children:g.name}),&quot; (&quot;,g.code,&quot;)&quot;,g.location&amp;&amp;` — ${g.location}`]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-600&quot;,children:[&quot;Période : &quot;,Ri(i.period_start_date,i.period_end_date)]}),t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-600&quot;,children:[&quot;Statut : &quot;,Di[i.status],&quot; · Généré le &quot;,Lh(i.generated_at)]})]}),p&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;mt-8&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold&quot;,children:&quot;Indicateurs clés&quot;}),t.jsx(&quot;table&quot;,{className:&quot;mt-3 w-full border-collapse text-sm&quot;,children:t.jsxs(&quot;tbody&quot;,{children:[t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-200&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;py-2&quot;,children:&quot;Avancement moyen validé&quot;}),t.jsxs(&quot;td&quot;,{className:&quot;py-2 text-right font-semibold&quot;,children:[p.average_validated_progress,&quot;%&quot;]})]}),t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-200&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;py-2&quot;,children:&quot;Tâches en retard&quot;}),t.jsx(&quot;td&quot;,{className:&quot;py-2 text-right font-semibold&quot;,children:p.tasks_late})]}),t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-200&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;py-2&quot;,children:&quot;Points critiques ouverts&quot;}),t.jsx(&quot;td&quot;,{className:&quot;py-2 text-right font-semibold&quot;,children:p.points_critical})]}),t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-200&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;py-2&quot;,children:&quot;Taux DOE&quot;}),t.jsxs(&quot;td&quot;,{className:&quot;py-2 text-right font-semibold&quot;,children:[p.doe_completion_rate,&quot;%&quot;]})]}),t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;td&quot;,{className:&quot;py-2&quot;,children:&quot;Actions ouvertes&quot;}),t.jsx(&quot;td&quot;,{className:&quot;py-2 text-right font-semibold&quot;,children:p.actions_open})]})]})})]}),i.editable_sections&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;mt-8&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold&quot;,children:&quot;Synthèse et commentaires&quot;}),t.jsx(&quot;div&quot;,{className:&quot;mt-4 space-y-4 text-sm&quot;,children:Object.keys(zl).map(v=&gt;{var y;const j=(y=i.editable_sections)==null?void 0:y[v];return j?t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;h3&quot;,{className:&quot;font-semibold&quot;,children:zl[v]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 whitespace-pre-wrap text-slate-700&quot;,children:j})]},v):null})})]}),i.validations.length&gt;0&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;mt-8&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold&quot;,children:&quot;Historique de validation&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 space-y-2 text-sm&quot;,children:i.validations.map(v=&gt;{var j;return t.jsxs(&quot;li&quot;,{children:[t.jsx(&quot;strong&quot;,{children:v.decision}),&quot; — &quot;,((j=v.decided_by)==null?void 0:j.name)??&quot;—&quot;,&quot; (&quot;,Lh(v.created_at),&quot;)&quot;,v.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-slate-600&quot;,children:v.comment})]},v.id)})})]}),t.jsxs(&quot;footer&quot;,{className:&quot;mt-12 border-t border-slate-200 pt-4 text-xs text-slate-500&quot;,children:[&quot;Document généré par FasoChantier — &quot;,new Date().toLocaleString(&quot;fr-FR&quot;)]})]})]})}const sw={assignment:&quot;Affectation&quot;,due_soon:&quot;Échéance proche&quot;,overdue:&quot;En retard&quot;,validation_requested:&quot;Validation demandée&quot;,validation_rejected:&quot;Validation rejetée&quot;,status_changed:&quot;Statut modifié&quot;,comment_added:&quot;Commentaire ajouté&quot;,document_submitted:&quot;Document soumis&quot;,meeting_minutes:&quot;Compte rendu&quot;,report_ready:&quot;Rapport prêt&quot;,system:&quot;Système&quot;},aw={project:&quot;Chantier&quot;,lot:&quot;Lot&quot;,task:&quot;Tâche&quot;,point:&quot;Point chantier&quot;,document:&quot;Document&quot;,doe:&quot;DOE&quot;,action:&quot;Action&quot;,meeting:&quot;Réunion&quot;,report:&quot;Rapport&quot;,admin:&quot;Administration&quot;,system:&quot;Système&quot;},lw={info:&quot;Info&quot;,success:&quot;Succès&quot;,warning:&quot;Attention&quot;,critical:&quot;Critique&quot;},nw={info:&quot;blue&quot;,success:&quot;green&quot;,warning:&quot;orange&quot;,critical:&quot;red&quot;};function rw(l){if(!l)return&quot;—&quot;;const r=new Date(l),c=new Date().getTime()-r.getTime(),m=Math.floor(c/(1e3*60*60));return m&lt;24?`Il y a ${Math.max(1,m)} h`:r.toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;})}function iw({notification:l,onOpen:r,onMarkRead:i,onArchive:c}){const m=l.read_at===null,f=uv(l.source_label);return t.jsxs(&quot;article&quot;,{className:`rounded-xl border bg-white p-4 shadow-sm ${m?&quot;border-fc-green/40 ring-1 ring-fc-green-soft&quot;:&quot;border-slate-200&quot;}`,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsx(Ee,{label:lw[l.severity],tone:nw[l.severity]}),m&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;rounded-full bg-planx-orange px-2 py-0.5 text-[10px] font-semibold uppercase text-white&quot;,children:&quot;Non lue&quot;})]}),t.jsx(&quot;h3&quot;,{className:&quot;mt-2 text-sm font-semibold text-slate-900&quot;,children:l.title}),l.body&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 line-clamp-2 text-sm text-slate-600&quot;,children:l.body}),t.jsxs(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:[aw[l.module],&quot; ·&quot;,&quot; &quot;,sw[l.type],f?` · ${f}`:&quot;&quot;]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-400&quot;,children:rw(l.created_at)})]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 flex flex-wrap gap-2&quot;,children:[l.action_url&amp;&amp;t.jsxs($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:r,children:[t.jsx(Ju,{className:&quot;mr-1 h-3.5 w-3.5&quot;,&quot;aria-hidden&quot;:!0}),&quot;Ouvrir&quot;]}),m&amp;&amp;l.permissions.canMarkRead&amp;&amp;t.jsxs($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:i,children:[t.jsx(Xv,{className:&quot;mr-1 h-3.5 w-3.5&quot;,&quot;aria-hidden&quot;:!0}),&quot;Marquer lu&quot;]}),l.permissions.canArchive&amp;&amp;t.jsxs($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:c,children:[t.jsx(Ov,{className:&quot;mr-1 h-3.5 w-3.5&quot;,&quot;aria-hidden&quot;:!0}),&quot;Archiver&quot;]})]})]})}const cw=[{key:&quot;all&quot;,label:&quot;Toutes&quot;},{key:&quot;unread&quot;,label:&quot;Non lues&quot;},{key:&quot;critical&quot;,label:&quot;Critiques&quot;},{key:&quot;validations&quot;,label:&quot;Validations&quot;},{key:&quot;tasks&quot;,label:&quot;Tâches&quot;},{key:&quot;points&quot;,label:&quot;Points&quot;},{key:&quot;documents&quot;,label:&quot;Documents&quot;},{key:&quot;meetings&quot;,label:&quot;Réunions&quot;}];function ow(l,r){switch(r){case&quot;all&quot;:return!0;case&quot;unread&quot;:return l.read_at===null;case&quot;critical&quot;:return l.severity===&quot;critical&quot;;case&quot;validations&quot;:return l.type===&quot;validation_requested&quot;||l.type===&quot;validation_rejected&quot;;case&quot;tasks&quot;:return l.module===&quot;task&quot;;case&quot;points&quot;:return l.module===&quot;point&quot;;case&quot;documents&quot;:return l.module===&quot;document&quot;;case&quot;meetings&quot;:return l.module===&quot;meeting&quot;;default:return!0}}function uw(){const l=ys(),{activeProject:r}=Ke(),{refreshUnreadCount:i}=kp(),[c,m]=d.useState([]),[f,x]=d.useState(0),[b,p]=d.useState(!0),[g,v]=d.useState(null),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;all&quot;),[A,E]=d.useState(!1),[S,U]=d.useState(null),T=d.useCallback(async()=&gt;{if(r){p(!0),v(null);try{const w=await nN(r.id);m(w.data),x(w.meta.unread_count)}catch(w){w instanceof me&amp;&amp;w.status===403?v(&quot;Accès refusé aux notifications de ce chantier.&quot;):v(&quot;Impossible de charger les notifications.&quot;)}finally{p(!1)}}},[r]);d.useEffect(()=&gt;{T()},[T]);const P=d.useMemo(()=&gt;{const w=j.trim().toLowerCase();return c.filter(F=&gt;ow(F,C)).filter(F=&gt;{var le,Y;return w?F.title.toLowerCase().includes(w)||(((le=F.body)==null?void 0:le.toLowerCase().includes(w))??!1)||(((Y=F.source_label)==null?void 0:Y.toLowerCase().includes(w))??!1):!0}).sort((F,le)=&gt;F.read_at===null&amp;&amp;le.read_at!==null?-1:F.read_at!==null&amp;&amp;le.read_at===null?1:(le.created_at??&quot;&quot;).localeCompare(F.created_at??&quot;&quot;))},[c,C,j]),B=d.useMemo(()=&gt;{const w=c.filter(Y=&gt;Y.severity===&quot;critical&quot;&amp;&amp;!Y.read_at).length,F=c.filter(Y=&gt;!Y.read_at&amp;&amp;(Y.type===&quot;validation_requested&quot;||Y.type===&quot;validation_rejected&quot;)).length,le=c.filter(Y=&gt;!Y.read_at&amp;&amp;(Y.type===&quot;overdue&quot;||Y.type===&quot;due_soon&quot;)).length;return{unread:f,critical:w,validations:F,due:le}},[c,f]);async function G(){if(!(!r||f===0)){E(!0),v(null);try{await cN(r.id),await T(),await i(),U(&quot;Toutes les notifications ont été marquées comme lues.&quot;)}catch(w){v(w instanceof me?w.message:&quot;Erreur lors du marquage.&quot;)}finally{E(!1)}}}async function K(w){if(r){E(!0);try{const F=await iN(r.id,w.id);m(le=&gt;le.map(Y=&gt;Y.id===w.id?F.data:Y)),x(le=&gt;Math.max(0,le-(w.read_at?0:1))),await i()}catch(F){v(F instanceof me?F.message:&quot;Erreur lors du marquage.&quot;)}finally{E(!1)}}}async function Z(w){if(r){E(!0);try{await oN(r.id,w.id),m(F=&gt;F.filter(le=&gt;le.id!==w.id)),w.read_at||x(F=&gt;Math.max(0,F-1)),await i(),U(&quot;Notification archivée.&quot;)}catch(F){v(F instanceof me?F.message:&quot;Erreur lors de l’archivage.&quot;)}finally{E(!1)}}}async function k(w){r&amp;&amp;(w.read_at===null&amp;&amp;w.permissions.canMarkRead&amp;&amp;await K(w),w.action_url&amp;&amp;l(w.action_url))}return r?b?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des notifications…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Notifications&quot;,subtitle:&quot;Événements et alertes qui vous concernent&quot;,action:f&gt;0?t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:A,onClick:()=&gt;void G(),children:&quot;Tout marquer comme lu&quot;}):void 0}),S&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:S}),g&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:g}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Non lues&quot;,value:String(B.unread),subtitle:&quot;À traiter&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Critiques&quot;,value:String(B.critical),subtitle:&quot;Priorité haute&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;Validations&quot;,value:String(B.validations),subtitle:&quot;Demandées ou rejetées&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Échéances / retards&quot;,value:String(B.due),subtitle:&quot;Alertes temporelles&quot;,tone:&quot;amber&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher…&quot;,value:j,onChange:w=&gt;y(w.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:cw.map(w=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;M(w.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${C===w.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:w.label},w.key))})]}),P.length===0?t.jsx(Ve,{title:C===&quot;unread&quot;?&quot;Aucune notification non lue&quot;:&quot;Aucune notification&quot;,description:C===&quot;unread&quot;?&quot;Vous êtes à jour sur ce chantier.&quot;:&quot;Aucun événement ne correspond à vos filtres.&quot;}):t.jsx(&quot;ul&quot;,{className:&quot;space-y-3&quot;,children:P.map(w=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(iw,{notification:w,onOpen:()=&gt;void k(w),onMarkRead:()=&gt;void K(w),onArchive:()=&gt;void Z(w)})},w.id))})]}):t.jsx(Ve,{title:&quot;Aucun chantier actif&quot;,description:&quot;Sélectionnez un chantier pour consulter vos notifications.&quot;})}const dw={document:&quot;Document&quot;,doe:&quot;DOE&quot;,task:&quot;Tâche&quot;,point:&quot;Point chantier&quot;,meeting:&quot;Réunion / CR&quot;,report:&quot;Rapport&quot;,form_submission:&quot;Formulaire / checklist&quot;},mw=[{key:&quot;all&quot;,label:&quot;Toutes&quot;},{key:&quot;mine&quot;,label:&quot;Mes validations&quot;},{key:&quot;document&quot;,label:&quot;Documents&quot;},{key:&quot;task&quot;,label:&quot;Tâches&quot;},{key:&quot;point&quot;,label:&quot;Points&quot;},{key:&quot;doe&quot;,label:&quot;DOE&quot;},{key:&quot;meeting&quot;,label:&quot;Réunions&quot;},{key:&quot;report&quot;,label:&quot;Rapports&quot;},{key:&quot;form_submission&quot;,label:&quot;Formulaires&quot;},{key:&quot;critical&quot;,label:&quot;Critiques&quot;},{key:&quot;overdue&quot;,label:&quot;En retard&quot;}],fw={document:&quot;bg-blue-50 text-blue-800&quot;,doe:&quot;bg-violet-50 text-violet-800&quot;,task:&quot;bg-fc-green-soft text-fc-green-dark&quot;,point:&quot;bg-amber-50 text-amber-800&quot;,meeting:&quot;bg-indigo-50 text-indigo-800&quot;,report:&quot;bg-emerald-50 text-emerald-800&quot;,form_submission:&quot;bg-fc-green-soft text-fc-gold-dark&quot;};function s0({module:l}){return t.jsx(&quot;span&quot;,{className:`inline-flex rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${fw[l]}`,children:dw[l]})}function xw({item:l,onApprove:r,onReject:i}){var m,f;const c=l.created_at?new Date(l.created_at).toLocaleDateString(&quot;fr-FR&quot;,{day:&quot;2-digit&quot;,month:&quot;short&quot;,year:&quot;numeric&quot;}):&quot;—&quot;;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap items-start justify-between gap-2&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center gap-2&quot;,children:[t.jsx(s0,{module:l.module}),l.priority===&quot;critical&quot;&amp;&amp;t.jsx(Ee,{label:&quot;Critique&quot;,tone:&quot;red&quot;}),t.jsx(Ee,{label:l.status_label,tone:&quot;orange&quot;})]}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 font-mono text-xs text-planx-orange&quot;,children:l.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:l.title}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:l.subtitle})]})}),t.jsxs(&quot;dl&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs text-slate-600 sm:grid-cols-4&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-400&quot;,children:&quot;Soumis par&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:((m=l.submitted_by)==null?void 0:m.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-400&quot;,children:&quot;Responsable&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:((f=l.responsible)==null?void 0:f.name)??&quot;—&quot;})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-400&quot;,children:&quot;Date&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:c})]}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;dt&quot;,{className:&quot;text-slate-400&quot;,children:&quot;Échéance&quot;}),t.jsx(&quot;dd&quot;,{className:&quot;font-medium&quot;,children:l.due_at?new Date(l.due_at).toLocaleDateString(&quot;fr-FR&quot;):&quot;—&quot;})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-4 flex flex-wrap gap-2 border-t border-slate-100 pt-3&quot;,children:[t.jsx(he,{to:l.target_url,children:t.jsxs($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:[t.jsx(Ju,{className:&quot;h-4 w-4&quot;}),&quot; Ouvrir&quot;]})}),l.permissions.canApprove&amp;&amp;t.jsx($,{type:&quot;button&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:r,children:&quot;Valider&quot;}),l.permissions.canReject&amp;&amp;t.jsx($,{type:&quot;button&quot;,variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:i,children:&quot;Rejeter&quot;})]})]})}function hw({search:l,activeQuickFilter:r,onSearchChange:i,onQuickFilterChange:c}){return t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex max-w-md flex-1 items-center gap-2 rounded-lg border border-slate-200 bg-white px-3 py-2 shadow-sm&quot;,children:[t.jsx(hs,{className:&quot;h-4 w-4 shrink-0 text-slate-400&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;input&quot;,{type:&quot;search&quot;,placeholder:&quot;Rechercher code, titre…&quot;,value:l,onChange:m=&gt;i(m.target.value),className:&quot;w-full bg-transparent text-sm focus:outline-none&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:mw.map(m=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;c(m.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${r===m.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:m.label},m.key))})]})}function pw({open:l,mode:r,item:i,isSubmitting:c,error:m,onClose:f,onConfirm:x}){const[b,p]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;p(&quot;&quot;)},[l,i,r]),!l||!i)return null;const g=r===&quot;reject&quot;;return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-black/40 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-5 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;approval-action-title&quot;,children:[t.jsxs(&quot;h2&quot;,{id:&quot;approval-action-title&quot;,className:&quot;text-lg font-semibold text-slate-900&quot;,children:[g?&quot;Rejeter&quot;:&quot;Valider&quot;,&quot; — &quot;,i.title]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-2 flex flex-wrap items-center gap-2&quot;,children:[t.jsx(s0,{module:i.module}),t.jsx(&quot;span&quot;,{className:&quot;font-mono text-xs text-slate-500&quot;,children:i.code})]}),t.jsxs(&quot;label&quot;,{className:&quot;mt-4 block text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:[&quot;Commentaire&quot;,g?&quot; *&quot;:&quot; (optionnel)&quot;]}),t.jsx(&quot;textarea&quot;,{value:b,onChange:v=&gt;p(v.target.value),rows:3,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,placeholder:g?&quot;Motif du rejet (obligatoire)&quot;:&quot;Commentaire de validation (optionnel)&quot;})]}),m&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;mt-2 space-y-2&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:m}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-600&quot;,children:&quot;Cette action n’est pas disponible depuis le centre d’approbations pour cet élément.&quot;}),t.jsx(he,{to:i.target_url,className:&quot;inline-block text-sm font-medium text-planx-orange hover:underline&quot;,children:&quot;Ouvrir la fiche source →&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-4 flex justify-end gap-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,disabled:c,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;button&quot;,variant:g?&quot;danger&quot;:&quot;primary&quot;,size:&quot;sm&quot;,disabled:c||g&amp;&amp;!b.trim(),onClick:()=&gt;x(b.trim()),children:g?&quot;Confirmer le rejet&quot;:&quot;Confirmer la validation&quot;})]})]})})}function gw(l){if(!l)return&quot;&quot;;const r=new URLSearchParams;l.module&amp;&amp;r.set(&quot;module&quot;,l.module),l.status&amp;&amp;r.set(&quot;status&quot;,l.status),l.priority&amp;&amp;r.set(&quot;priority&quot;,l.priority),l.search&amp;&amp;r.set(&quot;search&quot;,l.search),l.assigned_to_me&amp;&amp;r.set(&quot;assigned_to_me&quot;,&quot;1&quot;),l.created_by_me&amp;&amp;r.set(&quot;created_by_me&quot;,&quot;1&quot;),l.overdue&amp;&amp;r.set(&quot;overdue&quot;,&quot;1&quot;),l.limit&amp;&amp;r.set(&quot;limit&quot;,String(l.limit));const i=r.toString();return i?`?${i}`:&quot;&quot;}function bw(l){return Ae(`/projects/${l}/approvals/context`,!0)}function jw(l,r){return Ae(`/projects/${l}/approvals${gw(r)}`,!0)}function vw(l,r,i,c){return Ue(`/projects/${l}/approvals/${r}/${i}/approve`,c??{},!0)}function yw(l,r,i,c){return Ue(`/projects/${l}/approvals/${r}/${i}/reject`,c,!0)}function Nw(l){switch(l){case&quot;all&quot;:return{};case&quot;mine&quot;:return{assigned_to_me:!0};case&quot;critical&quot;:return{priority:&quot;critical&quot;};case&quot;overdue&quot;:return{overdue:!0};case&quot;document&quot;:case&quot;doe&quot;:case&quot;task&quot;:case&quot;point&quot;:case&quot;meeting&quot;:case&quot;report&quot;:case&quot;form_submission&quot;:return{module:l};default:return{}}}function _w(){const{activeProject:l}=Ke(),[r,i]=d.useState(null),[c,m]=d.useState([]),[f,x]=d.useState(!0),[b,p]=d.useState(null),[g,v]=d.useState(null),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;all&quot;),[S,U]=d.useState(null),[T,P]=d.useState(&quot;approve&quot;),[B,G]=d.useState(!1),[K,Z]=d.useState(!1),[k,w]=d.useState(null);d.useEffect(()=&gt;{const z=window.setTimeout(()=&gt;M(j.trim()),300);return()=&gt;window.clearTimeout(z)},[j]);const F=d.useMemo(()=&gt;{const z=Nw(A);return C?{...z,search:C}:z},[A,C]),le=d.useCallback(async()=&gt;{if(l){x(!0),p(null);try{const[z,R]=await Promise.all([bw(l.id),jw(l.id,F)]);i({summary:z.summary,permissions:z.permissions}),m(R.data)}catch(z){z instanceof me&amp;&amp;z.status===403?p(&quot;Accès refusé au centre d’approbations.&quot;):p(&quot;Impossible de charger les approbations en attente.&quot;),i(null),m([])}finally{x(!1)}}},[l,F]);d.useEffect(()=&gt;{le()},[le]);const Y=r==null?void 0:r.summary,H=(r==null?void 0:r.permissions.canViewApprovals)&amp;&amp;!r.permissions.canApproveDocuments&amp;&amp;!r.permissions.canApproveDoe&amp;&amp;!r.permissions.canApproveTasks&amp;&amp;!r.permissions.canApprovePoints&amp;&amp;!r.permissions.canApproveMeetings&amp;&amp;!r.permissions.canApproveReports&amp;&amp;!r.permissions.canApproveForms;function q(z,R){U(z),P(R),w(null),G(!0)}async function _(z){if(!(!l||!S)){Z(!0),w(null);try{T===&quot;approve&quot;?(await vw(l.id,S.module,S.source_id,z?{comment:z}:void 0),v(&quot;Élément validé avec succès.&quot;)):(await yw(l.id,S.module,S.source_id,{comment:z}),v(&quot;Élément rejeté.&quot;)),G(!1),U(null),await le()}catch(R){w(R instanceof me?R.message:&quot;Action impossible.&quot;)}finally{Z(!1)}}}return f&amp;&amp;!r?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement des approbations…&quot;})}):t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Centre d&#039;approbations&quot;,subtitle:&quot;Centre de validation — tous modules confondus&quot;,action:t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 rounded-xl border border-fc-green/25 bg-fc-green-soft px-4 py-2&quot;,children:[t.jsx(Ku,{className:&quot;h-5 w-5 text-planx-orange&quot;,&quot;aria-hidden&quot;:!0}),t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:&quot;En attente&quot;}),t.jsxs(&quot;p&quot;,{className:&quot;text-sm font-semibold text-slate-900&quot;,children:[(Y==null?void 0:Y.total_pending)??0,&quot; élément(s)&quot;]})]})]})}),H&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-slate-50 px-3 py-2 text-sm text-slate-600&quot;,children:&quot;Mode consultation : vous pouvez consulter les éléments en attente mais pas les valider ou rejeter depuis ce centre.&quot;}),g&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:g}),b&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:b}),Y&amp;&amp;t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 sm:grid-cols-3 lg:grid-cols-5&quot;,children:[t.jsx(be,{title:&quot;Total&quot;,value:String(Y.total_pending),subtitle:&quot;En attente&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;Critiques&quot;,value:String(Y.critical),subtitle:&quot;Priorité haute&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;Documents&quot;,value:String(Y.documents),subtitle:&quot;À valider&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Tâches&quot;,value:String(Y.tasks),subtitle:&quot;Avancement&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Points&quot;,value:String(Y.points),subtitle:&quot;À vérifier&quot;,tone:&quot;amber&quot;})]}),t.jsx(hw,{search:j,activeQuickFilter:A,onSearchChange:y,onQuickFilterChange:E}),f?t.jsx(&quot;p&quot;,{className:&quot;text-center text-sm text-slate-500&quot;,children:&quot;Mise à jour de la liste…&quot;}):c.length===0?t.jsx(Ve,{title:&quot;Aucune approbation en attente&quot;,description:A!==&quot;all&quot;||C?&quot;Aucun élément ne correspond à vos filtres.&quot;:&quot;Tout est à jour pour votre périmètre.&quot;}):t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:grid-cols-2&quot;,children:c.map(z=&gt;t.jsx(xw,{item:z,onApprove:()=&gt;q(z,&quot;approve&quot;),onReject:()=&gt;q(z,&quot;reject&quot;)},z.key))}),t.jsx(pw,{open:B,mode:T,item:S,isSubmitting:K,error:k,onClose:()=&gt;{K||(G(!1),U(null))},onConfirm:_})]})}const Sw=[&quot;active&quot;,&quot;paused&quot;,&quot;preparation&quot;,&quot;completed&quot;,&quot;archived&quot;];function ww({initial:l,readOnly:r=!1,isSubmitting:i,onSubmit:c}){const[m,f]=d.useState(l.name),[x,b]=d.useState(l.description??&quot;&quot;),[p,g]=d.useState(l.location??&quot;&quot;),[v,j]=d.useState(l.country??&quot;&quot;),[y,C]=d.useState(l.status),[M,A]=d.useState(l.planned_start_date??&quot;&quot;),[E,S]=d.useState(l.planned_end_date??&quot;&quot;);d.useEffect(()=&gt;{f(l.name),b(l.description??&quot;&quot;),g(l.location??&quot;&quot;),j(l.country??&quot;&quot;),C(l.status),A(l.planned_start_date??&quot;&quot;),S(l.planned_end_date??&quot;&quot;)},[l]);async function U(T){T.preventDefault(),await c({name:m.trim(),description:x.trim()||null,location:p.trim()||null,country:v.trim()||null,status:y,planned_start_date:M||null,planned_end_date:E||null})}return t.jsxs(&quot;form&quot;,{onSubmit:T=&gt;void U(T),className:&quot;space-y-4 rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;grid gap-4 sm:grid-cols-2&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm sm:col-span-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code&quot;}),t.jsx(&quot;input&quot;,{value:l.code,disabled:!0,className:&quot;mt-1 w-full rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm sm:col-span-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{required:!0,disabled:r,value:m,onChange:T=&gt;f(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm sm:col-span-2&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{rows:3,disabled:r,value:x,onChange:T=&gt;b(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Localisation&quot;}),t.jsx(&quot;input&quot;,{disabled:r,value:p,onChange:T=&gt;g(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Pays&quot;}),t.jsx(&quot;input&quot;,{disabled:r,value:v,onChange:T=&gt;j(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;select&quot;,{disabled:r,value:y,onChange:T=&gt;C(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;,children:Sw.map(T=&gt;t.jsx(&quot;option&quot;,{value:T,children:T},T))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Début prévu&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,disabled:r,value:M,onChange:T=&gt;A(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Fin prévue&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,disabled:r,value:E,min:M,onChange:T=&gt;S(T.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;})]})]}),!r&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex justify-end&quot;,children:t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})})]})}const Cw=&quot;image/jpeg,image/png,image/webp,.jpg,.jpeg,.png,.webp&quot;,Ew=5*1024*1024;function Aw({projectId:l,projectName:r,hasCoverImage:i,readOnly:c=!1,onUpdated:m}){const f=d.useRef(null),[x,b]=d.useState(i),[p,g]=d.useState(null),[v,j]=d.useState(!1),[y,C]=d.useState(null),[M,A]=d.useState(0);d.useEffect(()=&gt;{b(i)},[i]);function E(){var B;(B=f.current)==null||B.click()}function S(B){return[&quot;image/jpeg&quot;,&quot;image/png&quot;,&quot;image/webp&quot;].includes(B.type)?B.size&gt;Ew?&quot;L’image ne doit pas dépasser 5 Mo.&quot;:null:&quot;Formats autorisés : JPG, PNG, WebP.&quot;}async function U(B){var k;const G=(k=B.target.files)==null?void 0:k[0];if(B.target.value=&quot;&quot;,!G)return;const K=S(G);if(K){C(K);return}C(null),j(!0);const Z=URL.createObjectURL(G);g(w=&gt;(w&amp;&amp;URL.revokeObjectURL(w),Z));try{const w=await AN(l,G);b(w.data.has_cover_image),m(w.data.has_cover_image),A(F=&gt;F+1),g(F=&gt;(F&amp;&amp;URL.revokeObjectURL(F),null))}catch(w){g(F=&gt;(F&amp;&amp;URL.revokeObjectURL(F),null)),C(w instanceof me?w.message:&quot;Échec du téléversement.&quot;)}finally{j(!1)}}async function T(){if(!(!x||!window.confirm(&quot;Supprimer l’image de couverture de ce chantier ?&quot;))){j(!0),C(null);try{const B=await kN(l);b(B.data.has_cover_image),m(B.data.has_cover_image),g(G=&gt;(G&amp;&amp;URL.revokeObjectURL(G),null)),A(G=&gt;G+1)}catch(B){C(B instanceof me?B.message:&quot;Échec de la suppression.&quot;)}finally{j(!1)}}}const P=p&amp;&amp;v===!1?p:null;return t.jsxs(&quot;section&quot;,{className:&quot;space-y-4 rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;h2&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Image de couverture du chantier&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-sm text-slate-500&quot;,children:&quot;Ajoutez une perspective, un rendu architectural ou une image représentative du chantier.&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;overflow-hidden rounded-xl border border-slate-200&quot;,children:P?t.jsx(&quot;img&quot;,{src:P,alt:`Aperçu — ${r}`,className:&quot;aspect-video w-full object-cover&quot;}):t.jsx(Iu,{projectId:l,hasCoverImage:x,alt:`Couverture — ${r}`,className:&quot;aspect-video w-full&quot;,showFallbackLabel:!0},`${l}-${x}-${M}`)}),y&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,role:&quot;alert&quot;,children:y}),!c&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(&quot;input&quot;,{ref:f,type:&quot;file&quot;,accept:Cw,className:&quot;sr-only&quot;,onChange:B=&gt;void U(B)}),t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:v,onClick:E,children:x?t.jsxs(t.Fragment,{children:[t.jsx(Gy,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Remplacer&quot;]}):t.jsxs(t.Fragment,{children:[t.jsx(dy,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Téléverser une image&quot;]})}),x&amp;&amp;t.jsxs($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:v,onClick:()=&gt;void T(),children:[t.jsx(Yi,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Supprimer&quot;]})]})]})}const Bn={SA:&quot;Super administrateur&quot;,AC:&quot;Administrateur chantier&quot;,CP:&quot;Chef de projet&quot;,MOA:&quot;Maître d’ouvrage&quot;,MOE:&quot;Maîtrise d’œuvre&quot;,BC:&quot;Bureau de contrôle&quot;,ENT:&quot;Entreprise&quot;,LEC:&quot;Lecteur&quot;},Oi={MOA:&quot;Maître d’ouvrage&quot;,MOE:&quot;Maîtrise d’œuvre&quot;,BC:&quot;Bureau de contrôle&quot;,ENT:&quot;Entreprise&quot;,PARTNER:&quot;Partenaire&quot;,OTHER:&quot;Autre&quot;},hu={active:&quot;Actif&quot;,inactive:&quot;Inactif&quot;,disabled:&quot;Désactivé&quot;,paused:&quot;En pause&quot;,completed:&quot;Terminé&quot;,archived:&quot;Archivé&quot;,preparation:&quot;Préparation&quot;},Uh={full:&quot;Complet&quot;,read:&quot;Lecture&quot;,limited:&quot;Limité&quot;,none:&quot;Aucun&quot;},Ou={dashboard:&quot;Dashboard&quot;,lots:&quot;Lots&quot;,tasks:&quot;Tâches&quot;,points:&quot;Points&quot;,documents:&quot;Documents&quot;,doe:&quot;DOE&quot;,meetings:&quot;Réunions&quot;,actions:&quot;Actions&quot;,reports:&quot;Rapports&quot;,admin:&quot;Administration&quot;},kw=[&quot;SA&quot;,&quot;AC&quot;,&quot;CP&quot;,&quot;MOA&quot;,&quot;MOE&quot;,&quot;BC&quot;,&quot;ENT&quot;,&quot;LEC&quot;];function Tw(l){return l?kw:[&quot;CP&quot;,&quot;MOA&quot;,&quot;MOE&quot;,&quot;BC&quot;,&quot;ENT&quot;,&quot;LEC&quot;]}const zw=Object.keys(Oi);function Mw({open:l,initial:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(&quot;&quot;),[b,p]=d.useState(&quot;ENT&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(x((r==null?void 0:r.name)??&quot;&quot;),p((r==null?void 0:r.type)??&quot;ENT&quot;),v((r==null?void 0:r.email)??&quot;&quot;),y((r==null?void 0:r.phone)??&quot;&quot;),M((r==null?void 0:r.contact_name)??&quot;&quot;),E((r==null?void 0:r.address)??&quot;&quot;))},[l,r]),!l)return null;async function S(U){U.preventDefault(),await m({name:f.trim(),type:b,email:g.trim()||null,phone:j.trim()||null,contact_name:C.trim()||null,address:A.trim()||null})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-lg rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r?&quot;Modifier l’organisation&quot;:&quot;Créer une organisation&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:U=&gt;void S(U),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:f,onChange:U=&gt;x(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type *&quot;}),t.jsx(&quot;select&quot;,{value:b,onChange:U=&gt;p(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:zw.map(U=&gt;t.jsx(&quot;option&quot;,{value:U,children:Oi[U]},U))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Contact&quot;}),t.jsx(&quot;input&quot;,{value:C,onChange:U=&gt;M(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Email&quot;}),t.jsx(&quot;input&quot;,{type:&quot;email&quot;,value:g,onChange:U=&gt;v(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Téléphone&quot;}),t.jsx(&quot;input&quot;,{value:j,onChange:U=&gt;y(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Adresse&quot;}),t.jsx(&quot;input&quot;,{value:A,onChange:U=&gt;E(U.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const Dw=[&quot;all_project&quot;,&quot;organization&quot;,&quot;lots&quot;];function Rw({open:l,initial:r,organizations:i,canAssignAdmin:c,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;ENT&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(&quot;all_project&quot;),[T,P]=d.useState(&quot;PlanX2026!&quot;),[B,G]=d.useState(!0),K=Tw(c);if(d.useEffect(()=&gt;{var k;l&amp;&amp;(p((r==null?void 0:r.name)??&quot;&quot;),v((r==null?void 0:r.email)??&quot;&quot;),y((r==null?void 0:r.phone)??&quot;&quot;),M((r==null?void 0:r.membership.role_code)??&quot;ENT&quot;),E((k=r==null?void 0:r.membership.organization)!=null&amp;&amp;k.id?String(r.membership.organization.id):&quot;&quot;),U((r==null?void 0:r.membership.scope_kind)??&quot;all_project&quot;),P(&quot;PlanX2026!&quot;),G(!r))},[l,r]),!l)return null;async function Z(k){k.preventDefault(),await x({name:b.trim(),email:g.trim(),phone:j.trim()||null,role_code:C,organization_id:A?Number(A):null,scope_kind:S,password:B?&quot;PlanX2026!&quot;:T,status:&quot;active&quot;})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;max-h-[90vh] w-full max-w-lg overflow-y-auto rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:r?&quot;Modifier l’utilisateur&quot;:&quot;Créer un utilisateur&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:k=&gt;void Z(k),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{required:!0,value:b,onChange:k=&gt;p(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Email *&quot;}),t.jsx(&quot;input&quot;,{required:!0,type:&quot;email&quot;,value:g,onChange:k=&gt;v(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Téléphone&quot;}),t.jsx(&quot;input&quot;,{value:j,onChange:k=&gt;y(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Rôle chantier *&quot;}),t.jsx(&quot;select&quot;,{value:C,onChange:k=&gt;M(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:K.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:Bn[k]},k))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Organisation&quot;}),t.jsxs(&quot;select&quot;,{value:A,onChange:k=&gt;E(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),i.filter(k=&gt;k.status===&quot;active&quot;).map(k=&gt;t.jsx(&quot;option&quot;,{value:k.id,children:k.name},k.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Périmètre&quot;}),t.jsx(&quot;select&quot;,{value:S,onChange:k=&gt;U(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:Dw.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:k},k))})]}),!r&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:B,onChange:k=&gt;G(k.target.checked)}),&quot;Utiliser le mot de passe temporaire démo&quot;]}),!B&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Mot de passe temporaire *&quot;}),t.jsx(&quot;input&quot;,{required:!0,minLength:8,value:T,onChange:k=&gt;P(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}function Ow({open:l,userName:r,isSubmitting:i,onClose:c,onSubmit:m}){const[f,x]=d.useState(!0),[b,p]=d.useState(&quot;&quot;);if(!l)return null;async function g(v){v.preventDefault(),await m(f,f?void 0:b)}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-slate-900/50 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-6 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-bold text-slate-900&quot;,children:&quot;Réinitialiser le mot de passe&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-sm text-slate-600&quot;,children:r}),t.jsxs(&quot;form&quot;,{onSubmit:v=&gt;void g(v),className:&quot;mt-4 space-y-3&quot;,children:[t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:f,onChange:v=&gt;x(v.target.checked)}),&quot;Utiliser le mot de passe temporaire démo&quot;]}),!f&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Mot de passe temporaire *&quot;}),t.jsx(&quot;input&quot;,{required:!0,minLength:8,value:b,onChange:v=&gt;p(v.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Réinitialisation…&quot;:&quot;Réinitialiser&quot;})]})]})]})})}const pu=Object.keys(Ou);function Lw({items:l,label:r}){return t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;inline-flex rounded-full bg-violet-100 px-3 py-1 text-xs font-medium text-violet-800&quot;,children:r}),t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Rôle&quot;}),pu.map(i=&gt;t.jsx(&quot;th&quot;,{className:&quot;px-3 py-3&quot;,children:Ou[i]},i))]})}),t.jsx(&quot;tbody&quot;,{children:l.map(i=&gt;t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50&quot;,children:[t.jsxs(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:Bn[i.role_code]??i.label}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:i.description})]}),pu.map(c=&gt;t.jsx(&quot;td&quot;,{className:&quot;px-3 py-3 text-xs&quot;,children:Uh[i.permissions[c]??&quot;none&quot;]},c))]},i.role_code))})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid gap-4 lg:hidden&quot;,children:l.map(i=&gt;t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:Bn[i.role_code]??i.label}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:i.description}),t.jsx(&quot;ul&quot;,{className:&quot;mt-3 grid grid-cols-2 gap-2 text-xs&quot;,children:pu.map(c=&gt;t.jsxs(&quot;li&quot;,{children:[t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[Ou[c],&quot; : &quot;]}),t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:Uh[i.permissions[c]??&quot;none&quot;]})]},c))})]},i.role_code))})]})}async function Uw(l){return Ae(`/projects/${l}/admin/context`,!0)}async function $w(l,r){return Ue(`/projects/${l}/admin/project`,r,!0)}async function qw(l){return Ae(`/projects/${l}/admin/organizations`,!0)}async function Bw(l,r){return Se(`/projects/${l}/admin/organizations`,r,!0)}async function Hw(l,r,i){return Ue(`/projects/${l}/admin/organizations/${r}`,i,!0)}async function Vw(l,r){return Ue(`/projects/${l}/admin/organizations/${r}/deactivate`,{},!0)}async function Yw(l,r){return Ue(`/projects/${l}/admin/organizations/${r}/activate`,{},!0)}async function Gw(l){return Ae(`/projects/${l}/admin/users`,!0)}async function Zw(l,r){return Se(`/projects/${l}/admin/users`,r,!0)}async function Qw(l,r,i){return Ue(`/projects/${l}/admin/users/${r}`,i,!0)}async function Xw(l,r){return Ue(`/projects/${l}/admin/users/${r}/deactivate`,{},!0)}async function Pw(l,r){return Ue(`/projects/${l}/admin/users/${r}/activate`,{},!0)}async function Fw(l,r,i){return Se(`/projects/${l}/admin/users/${r}/reset-password`,i??{},!0)}async function Kw(l){return Ae(`/projects/${l}/admin/roles-matrix`,!0)}const a0=[{type:&quot;checkbox&quot;,label:&quot;Case à cocher&quot;,icon:Ry},{type:&quot;yes_no&quot;,label:&quot;Oui / Non&quot;,icon:Ly}],l0=[{type:&quot;text&quot;,label:&quot;Texte court&quot;,icon:Su},{type:&quot;textarea&quot;,label:&quot;Texte long&quot;,icon:Su},{type:&quot;number&quot;,label:&quot;Nombre&quot;,icon:bp},{type:&quot;date&quot;,label:&quot;Date&quot;,icon:Fu},{type:&quot;select&quot;,label:&quot;Liste de choix&quot;,icon:Ua}],n0=[{type:&quot;section&quot;,label:&quot;Section&quot;,icon:jp},{type:&quot;separator&quot;,label:&quot;Séparateur&quot;,icon:Sy}],$h=[{type:&quot;text&quot;,label:&quot;Statut&quot;,icon:Ua,soon:!0},{type:&quot;text&quot;,label:&quot;Priorité&quot;,icon:Ua,soon:!0},{type:&quot;text&quot;,label:&quot;Lot&quot;,icon:Ua,soon:!0},{type:&quot;text&quot;,label:&quot;Responsable&quot;,icon:Ua,soon:!0},{type:&quot;date&quot;,label:&quot;Date d&#039;échéance&quot;,icon:Fu,soon:!0},{type:&quot;number&quot;,label:&quot;Avancement&quot;,icon:bp,soon:!0},{type:&quot;text&quot;,label:&quot;Localisation&quot;,icon:Ua,soon:!0},{type:&quot;checkbox&quot;,label:&quot;Pièce jointe attendue&quot;,icon:Np,soon:!0}];function Jw(l){const r=[...a0,...l0,...n0].find(c=&gt;c.type===l),i=(r==null?void 0:r.icon)??Su;return t.jsx(i,{className:&quot;h-4 w-4 shrink-0 text-slate-500&quot;})}function r0(l,r){return l.trim()?l.trim():r===&quot;checklist&quot;?&quot;Checklist sans titre&quot;:&quot;Formulaire sans titre&quot;}function Iw(l){const r=[];return l.code&amp;&amp;r.push(l.code),l.name&amp;&amp;r.push(l.name),l.fields&amp;&amp;r.push(l.fields),l.fieldIndex&amp;&amp;Object.values(l.fieldIndex).forEach(i=&gt;{i&amp;&amp;r.push(i)}),r}function Ww({open:l,title:r,initial:i=null,initialKind:c=&quot;checklist&quot;,isSubmitting:m,onClose:f,onSubmit:x}){var ee;const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;checklist&quot;),[A,E]=d.useState(&quot;task&quot;),[S,U]=d.useState(&quot;active&quot;),[T,P]=d.useState([]),[B,G]=d.useState(null),[K,Z]=d.useState(&quot;build&quot;),[k,w]=d.useState({}),[F,le]=d.useState(null),[Y,H]=d.useState({});d.useEffect(()=&gt;{var de;l&amp;&amp;(p((i==null?void 0:i.code)??&quot;&quot;),v((i==null?void 0:i.name)??&quot;&quot;),y((i==null?void 0:i.description)??&quot;&quot;),M((i==null?void 0:i.template_kind)??c),E((i==null?void 0:i.target_module)??&quot;task&quot;),U((i==null?void 0:i.status)??&quot;active&quot;),P((de=i==null?void 0:i.fields)!=null&amp;&amp;de.length?i.fields.map(X=&gt;({...X})):[]),G(null),Z(&quot;build&quot;),w({}),le(null),H({}))},[l,i,c]);const q=d.useMemo(()=&gt;zh(T),[T]);if(!l)return null;function _(de){const X=Z1(de,T.length+1);P(fe=&gt;[...fe,X]),G(T.length),Z(&quot;build&quot;)}function z(de,X){P(fe=&gt;fe.map((je,Me)=&gt;Me===de?{...je,...X}:je))}function R(de){const X=T[de];if(!X)return;const fe={...X,id:void 0,code:X.code?`${X.code}_copie`:null,label:`${X.label} (copie)`};P(je=&gt;{const Me=[...je];return Me.splice(de+1,0,fe),Me}),G(de+1)}function L(de){P(X=&gt;X.filter((fe,je)=&gt;je!==de)),G(X=&gt;X===null||X===de?null:X&gt;de?X-1:X)}function ce(de,X){const fe=de+X;fe&lt;0||fe&gt;=T.length||(P(je=&gt;{const Me=[...je],[ft]=Me.splice(de,1);return Me.splice(fe,0,ft),Me}),G(fe))}async function D(de){const X=Q1(b,g,T);if(w(X),le(null),X.code||X.name||X.fields||X.fieldIndex){if(Z(&quot;build&quot;),X.fieldIndex){const je=Number(Object.keys(X.fieldIndex)[0]);Number.isNaN(je)||G(je)}else G(null);return}const fe={code:b.trim().toUpperCase(),name:g.trim(),description:j.trim()||void 0,template_kind:C,target_module:A,status:S,fields:zh(T)};try{await x(fe)}catch(je){le(je instanceof me?je.message:&quot;Erreur lors de l’enregistrement.&quot;)}}const J=B!==null?T[B]:null,I=Iw(k);return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex flex-col bg-black/40&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;mx-auto flex h-full w-full max-w-[1400px] flex-col bg-white shadow-2xl sm:my-2 sm:h-[calc(100%-1rem)] sm:rounded-2xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,&quot;aria-labelledby&quot;:&quot;form-builder-title&quot;,children:[t.jsxs(&quot;header&quot;,{className:&quot;flex shrink-0 items-center justify-between gap-3 border-b border-slate-200 px-4 py-3 sm:px-6&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;h2&quot;,{id:&quot;form-builder-title&quot;,className:&quot;text-lg font-semibold text-slate-900&quot;,children:r}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:&quot;Éditeur de modèle — construction et aperçu&quot;})]}),t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:f,className:&quot;rounded-lg p-2 text-slate-500 hover:bg-slate-100&quot;,&quot;aria-label&quot;:&quot;Fermer&quot;,children:t.jsx(Ky,{className:&quot;h-5 w-5&quot;})})]}),(F||I.length&gt;0)&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;shrink-0 border-b border-rose-100 bg-rose-50 px-4 py-2 sm:px-6&quot;,children:[F&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-700&quot;,children:F}),I.length&gt;0&amp;&amp;t.jsx(&quot;ul&quot;,{className:&quot;list-inside list-disc text-sm text-rose-700&quot;,children:I.map(de=&gt;t.jsx(&quot;li&quot;,{children:de},de))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex min-h-0 flex-1 flex-col overflow-hidden lg:flex-row&quot;,children:[t.jsx(&quot;aside&quot;,{className:&quot;hidden w-56 shrink-0 overflow-y-auto border-r border-slate-200 bg-slate-50 p-4 lg:block&quot;,children:t.jsx(qh,{onAdd:_})}),t.jsxs(&quot;main&quot;,{className:&quot;flex min-h-0 flex-1 flex-col overflow-hidden&quot;,children:[t.jsx(&quot;div&quot;,{className:&quot;border-b border-slate-200 px-4 py-3 sm:px-5&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex gap-1 rounded-lg bg-slate-100 p-1&quot;,role:&quot;tablist&quot;,&quot;aria-label&quot;:&quot;Mode d’édition&quot;,children:[t.jsx(&quot;button&quot;,{type:&quot;button&quot;,role:&quot;tab&quot;,&quot;aria-selected&quot;:K===&quot;build&quot;,onClick:()=&gt;Z(&quot;build&quot;),className:`flex-1 rounded-md px-3 py-1.5 text-sm font-medium ${K===&quot;build&quot;?&quot;bg-white text-slate-900 shadow-sm&quot;:&quot;text-slate-600&quot;}`,children:&quot;Construction&quot;}),t.jsx(&quot;button&quot;,{type:&quot;button&quot;,role:&quot;tab&quot;,&quot;aria-selected&quot;:K===&quot;preview&quot;,onClick:()=&gt;Z(&quot;preview&quot;),className:`flex-1 rounded-md px-3 py-1.5 text-sm font-medium ${K===&quot;preview&quot;?&quot;bg-white text-slate-900 shadow-sm&quot;:&quot;text-slate-600&quot;}`,children:&quot;Aperçu&quot;})]})}),t.jsx(&quot;div&quot;,{className:&quot;flex-1 overflow-y-auto p-4 sm:p-5&quot;,children:K===&quot;preview&quot;?t.jsx(a3,{name:g,code:b,templateKind:C,description:j,fields:q,previewAnswers:Y,onPreviewChange:H}):t.jsx(t3,{name:g,code:b,templateKind:C,description:j,fields:T,selectedIndex:B,validation:k,onSelect:G,onAddCheckbox:()=&gt;_(&quot;checkbox&quot;),onDuplicate:R,onRemove:L,onMove:ce})}),t.jsxs(&quot;div&quot;,{className:&quot;border-t border-slate-200 bg-slate-50 p-3 lg:hidden&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500&quot;,children:&quot;Ajouter un champ&quot;}),t.jsx(qh,{compact:!0,onAdd:_})]})]}),t.jsx(&quot;aside&quot;,{className:&quot;w-full shrink-0 overflow-y-auto border-t border-slate-200 bg-white p-4 lg:w-72 lg:border-l lg:border-t-0&quot;,children:J&amp;&amp;B!==null?t.jsx(n3,{field:J,index:B,total:T.length,error:(ee=k.fieldIndex)==null?void 0:ee[B],onChange:de=&gt;z(B,de),onDuplicate:()=&gt;R(B),onRemove:()=&gt;L(B),onMoveUp:()=&gt;ce(B,-1),onMoveDown:()=&gt;ce(B,1)}):t.jsx(l3,{code:b,name:g,description:j,templateKind:C,targetModule:A,status:S,isEdit:!!i,errors:k,onCodeChange:p,onNameChange:v,onDescriptionChange:y,onKindChange:M,onModuleChange:E,onStatusChange:U,onPreview:()=&gt;Z(&quot;preview&quot;)})})]}),t.jsxs(&quot;footer&quot;,{className:&quot;sticky bottom-0 z-10 flex shrink-0 justify-end gap-2 border-t border-slate-200 bg-white px-4 py-3 shadow-[0_-4px_12px_rgba(0,0,0,0.04)] sm:px-6&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;button&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:m,onClick:()=&gt;void D(),children:&quot;Enregistrer&quot;})]})]})})}function qh({onAdd:l,compact:r=!1}){return t.jsxs(&quot;div&quot;,{className:r?&quot;flex flex-wrap gap-1&quot;:&quot;space-y-4&quot;,children:[t.jsx(gu,{title:&quot;Champs checklist&quot;,items:a0,compact:r,onAdd:l}),t.jsx(gu,{title:&quot;Champs de saisie&quot;,items:l0,compact:r,onAdd:l}),t.jsx(gu,{title:&quot;Structure&quot;,items:n0,compact:r,onAdd:l}),t.jsx(e3,{compact:r})]})}function e3({compact:l}){const[r,i]=d.useState(!1);return l?t.jsxs(&quot;details&quot;,{className:&quot;w-full rounded-lg border border-slate-200 bg-white&quot;,children:[t.jsx(&quot;summary&quot;,{className:&quot;cursor-pointer px-2 py-1.5 text-xs font-medium text-slate-600&quot;,children:&quot;Champs FasoChantier prédéfinis — bientôt&quot;}),t.jsx(&quot;div&quot;,{className:&quot;flex flex-wrap gap-1 border-t border-slate-100 p-2&quot;,children:$h.map(c=&gt;t.jsx(Li,{item:c,onAdd:()=&gt;{},compact:!0,soonGroup:!0},c.label))})]}):t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg border border-dashed border-slate-200 bg-slate-100/60&quot;,children:[t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;i(c=&gt;!c),className:&quot;flex w-full items-center gap-2 px-3 py-2 text-left text-xs font-semibold uppercase tracking-wide text-slate-500&quot;,children:[r?t.jsx(fp,{className:&quot;h-3.5 w-3.5&quot;}):t.jsx(Kv,{className:&quot;h-3.5 w-3.5&quot;}),&quot;Champs FasoChantier prédéfinis — bientôt&quot;]}),r&amp;&amp;t.jsx(&quot;ul&quot;,{className:&quot;space-y-1 border-t border-slate-200 px-2 pb-2 pt-1&quot;,children:$h.map(c=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Li,{item:c,onAdd:()=&gt;{},soonGroup:!0})},c.label))})]})}function gu({title:l,items:r,compact:i,onAdd:c,soonGroup:m}){return i?t.jsx(t.Fragment,{children:r.map(f=&gt;t.jsx(Li,{item:f,onAdd:c,compact:!0,soonGroup:m},f.label))}):t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;mb-2 text-xs font-semibold uppercase tracking-wide text-slate-500&quot;,children:l}),t.jsx(&quot;ul&quot;,{className:&quot;space-y-1&quot;,children:r.map(f=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Li,{item:f,onAdd:c,soonGroup:m})},f.label))})]})}function Li({item:l,onAdd:r,compact:i,soonGroup:c}){const m=l.icon,f=!!(l.soon||c);return t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,disabled:f,onClick:()=&gt;!f&amp;&amp;r(l.type),className:`flex w-full items-center gap-2 rounded-lg border border-slate-200 bg-white text-left text-sm text-slate-700 transition hover:border-planx-orange hover:bg-fc-green-soft disabled:cursor-not-allowed disabled:opacity-50 ${i?&quot;px-2 py-1.5&quot;:&quot;px-3 py-2&quot;}`,children:[t.jsx(m,{className:&quot;h-4 w-4 shrink-0 text-slate-500&quot;}),t.jsx(&quot;span&quot;,{className:&quot;flex-1 truncate&quot;,children:l.label}),f&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;rounded bg-slate-100 px-1.5 py-0.5 text-[10px] font-medium text-slate-500&quot;,children:&quot;Bientôt&quot;})]})}function t3({name:l,code:r,templateKind:i,description:c,fields:m,selectedIndex:f,validation:x,onSelect:b,onAddCheckbox:p,onDuplicate:g,onRemove:v,onMove:j}){return t.jsxs(&quot;div&quot;,{className:&quot;mx-auto max-w-2xl space-y-4&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;rounded-xl border border-dashed border-slate-200 bg-slate-50/80 p-4&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-xs font-medium uppercase tracking-wide text-slate-400&quot;,children:&quot;Aperçu du modèle&quot;}),t.jsx(&quot;h3&quot;,{className:&quot;mt-1 text-base font-semibold text-slate-900&quot;,children:r0(l,i)}),r.trim()&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-0.5 font-mono text-xs text-slate-500&quot;,children:r.trim().toUpperCase()}),c&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-sm text-slate-500&quot;,children:c}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-400&quot;,children:&quot;Modifiez le nom et les options dans le panneau « Propriétés du formulaire ».&quot;})]}),x.fields&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg border border-rose-200 bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:x.fields}),m.length===0?t.jsxs(&quot;div&quot;,{className:&quot;rounded-xl border border-dashed border-slate-300 bg-slate-50 px-6 py-12 text-center&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Ajoutez un premier champ depuis la colonne de gauche.&quot;}),t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,className:&quot;mt-4&quot;,onClick:p,children:&quot;Ajouter une case à cocher&quot;})]}):t.jsx(&quot;ul&quot;,{className:&quot;space-y-2&quot;,children:m.map((y,C)=&gt;{var M;return t.jsx(&quot;li&quot;,{children:t.jsx(s3,{field:y,index:C,total:m.length,selected:f===C,error:(M=x.fieldIndex)==null?void 0:M[C],onSelect:()=&gt;b(C),onDuplicate:()=&gt;g(C),onRemove:()=&gt;v(C),onMoveUp:()=&gt;j(C,-1),onMoveDown:()=&gt;j(C,1)})},C)})})]})}function s3({field:l,index:r,total:i,selected:c,error:m,onSelect:f,onDuplicate:x,onRemove:b,onMoveUp:p,onMoveDown:g}){return t.jsxs(&quot;div&quot;,{className:`rounded-xl border bg-white p-3 transition ${c?&quot;border-planx-orange shadow-md shadow-orange-100 ring-2 ring-orange-200&quot;:&quot;border-slate-200 hover:border-slate-300&quot;}`,children:[t.jsx(&quot;button&quot;,{type:&quot;button&quot;,className:&quot;w-full text-left&quot;,onClick:f,children:t.jsxs(&quot;div&quot;,{className:&quot;flex items-start gap-3&quot;,children:[Jw(l.field_type),t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;text-sm font-medium text-slate-900&quot;,children:l.label||&quot;Sans libellé&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Zp[l.field_type]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-1 flex flex-wrap gap-1&quot;,children:[l.is_required&amp;&amp;!ba(l.field_type)&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;rounded-full bg-fc-green-soft px-2 py-0.5 text-[10px] font-medium text-fc-gold-dark&quot;,children:&quot;Obligatoire&quot;}),l.requires_attachment&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;rounded-full bg-cyan-50 px-2 py-0.5 text-[10px] font-medium text-cyan-800&quot;,children:&quot;Preuve attendue&quot;})]}),l.help_text&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-400&quot;,children:l.help_text}),m&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-rose-600&quot;,children:m})]})]})}),t.jsxs(&quot;div&quot;,{className:&quot;mt-2 flex flex-wrap gap-1 border-t border-slate-100 pt-2&quot;,children:[t.jsx(fi,{label:&quot;Monter&quot;,disabled:r===0,onClick:p,children:t.jsx(dp,{className:&quot;h-3.5 w-3.5&quot;})}),t.jsx(fi,{label:&quot;Descendre&quot;,disabled:r&gt;=i-1,onClick:g,children:t.jsx(up,{className:&quot;h-3.5 w-3.5&quot;})}),t.jsx(fi,{label:&quot;Dupliquer&quot;,onClick:x,children:t.jsx(xp,{className:&quot;h-3.5 w-3.5&quot;})}),t.jsx(fi,{label:&quot;Supprimer&quot;,onClick:b,children:t.jsx(Yi,{className:&quot;h-3.5 w-3.5 text-rose-600&quot;})})]})]})}function fi({label:l,disabled:r,onClick:i,children:c}){return t.jsx(&quot;button&quot;,{type:&quot;button&quot;,title:l,disabled:r,onClick:i,className:&quot;rounded-md border border-slate-200 p-1.5 text-slate-600 hover:bg-slate-50 disabled:opacity-40&quot;,children:c})}function a3({name:l,code:r,templateKind:i,description:c,fields:m,previewAnswers:f,onPreviewChange:x}){return m.length===0?t.jsx(&quot;p&quot;,{className:&quot;text-center text-sm text-slate-500&quot;,children:&quot;Ajoutez des champs pour voir l’aperçu.&quot;}):t.jsxs(&quot;div&quot;,{className:&quot;mx-auto max-w-xl space-y-4 rounded-xl border border-slate-200 bg-slate-50 p-5&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:r0(l,i)}),r.trim()&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-0.5 font-mono text-xs text-slate-500&quot;,children:r.trim().toUpperCase()}),c&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-sm text-slate-500&quot;,children:c})]}),t.jsx(&quot;ul&quot;,{className:&quot;space-y-4&quot;,children:m.map((b,p)=&gt;{var v,j,y,C,M;const g={id:p,form_template_field_id:p,value_text:((v=f[p])==null?void 0:v.value_text)??b.expected_value??null,value_number:((j=f[p])==null?void 0:j.value_number)??null,value_date:((y=f[p])==null?void 0:y.value_date)??null,value_boolean:((C=f[p])==null?void 0:C.value_boolean)??null,comment:((M=f[p])==null?void 0:M.comment)??null,is_conform:null,field:b};return t.jsx(&quot;li&quot;,{children:t.jsx(Gp,{field:b,answer:ba(b.field_type)?void 0:g,readOnly:!1,onChange:A=&gt;x({...f,[p]:{...f[p],...A}})})},p)})})]})}function l3({code:l,name:r,description:i,templateKind:c,targetModule:m,status:f,isEdit:x,errors:b,onCodeChange:p,onNameChange:g,onDescriptionChange:v,onKindChange:j,onModuleChange:y,onStatusChange:C,onPreview:M}){const A=c===&quot;checklist&quot;?&quot;bg-cyan-50 text-cyan-800&quot;:&quot;bg-violet-50 text-violet-800&quot;;return t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-900&quot;,children:&quot;Propriétés du formulaire&quot;}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(&quot;span&quot;,{className:`pointer-events-none rounded-full px-2.5 py-0.5 text-xs font-medium ${A}`,children:Au[c]}),t.jsx(&quot;span&quot;,{className:&quot;pointer-events-none rounded-full bg-slate-100 px-2.5 py-0.5 text-xs font-medium text-slate-600&quot;,children:ku[m]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{value:l,disabled:x,onChange:E=&gt;p(E.target.value.toUpperCase()),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm disabled:bg-slate-50&quot;}),b.code&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-xs text-rose-600&quot;,children:b.code})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{value:r,onChange:E=&gt;g(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;}),b.name&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;text-xs text-rose-600&quot;,children:b.name})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Description&quot;}),t.jsx(&quot;textarea&quot;,{value:i,rows:3,onChange:E=&gt;v(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Type de modèle&quot;}),t.jsx(&quot;select&quot;,{value:c,onChange:E=&gt;j(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:Object.entries(Au).map(([E,S])=&gt;t.jsx(&quot;option&quot;,{value:E,children:S},E))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Module cible&quot;}),t.jsx(&quot;select&quot;,{value:m,onChange:E=&gt;y(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:Object.entries(ku).map(([E,S])=&gt;t.jsx(&quot;option&quot;,{value:E,children:S},E))})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Statut&quot;}),t.jsxs(&quot;select&quot;,{value:f,onChange:E=&gt;C(E.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;active&quot;,children:&quot;Actif&quot;}),t.jsx(&quot;option&quot;,{value:&quot;inactive&quot;,children:&quot;Inactif&quot;})]})]}),b.fields&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-rose-600&quot;,children:b.fields}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-col gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,className:&quot;w-full&quot;,onClick:M,children:&quot;Voir l’onglet Aperçu&quot;}),t.jsx(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-400&quot;,children:&quot;Enregistrez via le bouton en bas de l’écran.&quot;})]})]})}function n3({field:l,index:r,total:i,error:c,onChange:m,onDuplicate:f,onRemove:x,onMoveUp:b,onMoveDown:p}){const g=ba(l.field_type),v=(l.options_json??[]).join(`
`);return t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-sm font-semibold text-slate-900&quot;,children:&quot;Propriétés du champ&quot;}),c&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-xs text-rose-600&quot;,children:c}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Libellé *&quot;}),t.jsx(&quot;input&quot;,{value:l.label,onChange:j=&gt;m({label:j.target.value}),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Code&quot;}),t.jsx(&quot;input&quot;,{value:l.code??&quot;&quot;,onChange:j=&gt;m({code:j.target.value||null}),placeholder:&quot;Généré automatiquement si vide&quot;,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:[&quot;Type : &quot;,t.jsx(&quot;strong&quot;,{children:Zp[l.field_type]})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Texte d’aide&quot;}),t.jsx(&quot;textarea&quot;,{value:l.help_text??&quot;&quot;,rows:2,onChange:j=&gt;m({help_text:j.target.value||null}),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),!g&amp;&amp;t.jsxs(t.Fragment,{children:[t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:l.is_required,onChange:j=&gt;m({is_required:j.target.checked})}),&quot;Obligatoire&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:l.requires_comment,onChange:j=&gt;m({requires_comment:j.target.checked})}),&quot;Commentaire requis&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:l.requires_attachment,onChange:j=&gt;m({requires_attachment:j.target.checked})}),&quot;Preuve attendue&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Valeur par défaut&quot;}),t.jsx(&quot;input&quot;,{value:l.expected_value??&quot;&quot;,onChange:j=&gt;m({expected_value:j.target.value||null}),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]})]}),l.field_type===&quot;select&quot;&amp;&amp;t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium text-slate-700&quot;,children:&quot;Options (une par ligne) *&quot;}),t.jsx(&quot;textarea&quot;,{value:v,rows:4,onChange:j=&gt;m({options_json:j.target.value.split(`
`).map(y=&gt;y.trim()).filter(Boolean)}),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm font-mono&quot;})]}),t.jsxs(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:[&quot;Ordre : &quot;,r+1,&quot; / &quot;,i]}),t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:r===0,onClick:b,children:t.jsx(dp,{className:&quot;h-4 w-4&quot;})}),t.jsx($,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:r&gt;=i-1,onClick:p,children:t.jsx(up,{className:&quot;h-4 w-4&quot;})}),t.jsxs($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,children:[t.jsx(xp,{className:&quot;h-4 w-4&quot;}),&quot; Dupliquer&quot;]}),t.jsxs($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:x,children:[t.jsx(Yi,{className:&quot;h-4 w-4 text-rose-600&quot;}),&quot; Supprimer&quot;]})]})]})}function r3({open:l,title:r,templates:i,initial:c=null,isSubmitting:m,onClose:f,onSubmit:x}){const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,M]=d.useState(&quot;cyan&quot;),[A,E]=d.useState(&quot;&quot;),[S,U]=d.useState(!1),[T,P]=d.useState(!1),[B,G]=d.useState(!1);if(d.useEffect(()=&gt;{var Z;l&amp;&amp;(p((c==null?void 0:c.code)??&quot;&quot;),v((c==null?void 0:c.name)??&quot;&quot;),y((c==null?void 0:c.description)??&quot;&quot;),M((c==null?void 0:c.color)??&quot;cyan&quot;),E(((Z=c==null?void 0:c.default_form_template_id)==null?void 0:Z.toString())??&quot;&quot;),U((c==null?void 0:c.requires_lot)??!1),P((c==null?void 0:c.requires_location)??!1),G((c==null?void 0:c.requires_attachment)??!1))},[l,c]),!l)return null;async function K(Z){Z.preventDefault(),await x({code:b.trim().toUpperCase(),name:g.trim(),description:j.trim()||void 0,color:C,default_form_template_id:A?Number(A):null,requires_lot:S,requires_location:T,requires_attachment:B})}return t.jsx(&quot;div&quot;,{className:&quot;fixed inset-0 z-50 flex items-end justify-center bg-black/40 p-4 sm:items-center&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;w-full max-w-md rounded-2xl bg-white p-5 shadow-xl&quot;,role:&quot;dialog&quot;,&quot;aria-modal&quot;:&quot;true&quot;,children:[t.jsx(&quot;h2&quot;,{className:&quot;text-lg font-semibold&quot;,children:r}),t.jsxs(&quot;form&quot;,{className:&quot;mt-4 space-y-3&quot;,onSubmit:Z=&gt;void K(Z),children:[t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:&quot;Code *&quot;}),t.jsx(&quot;input&quot;,{value:b,onChange:Z=&gt;p(Z.target.value),disabled:!!c,className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:&quot;Nom *&quot;}),t.jsx(&quot;input&quot;,{value:g,onChange:Z=&gt;v(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;})]}),t.jsxs(&quot;label&quot;,{className:&quot;block text-sm&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:&quot;Checklist par défaut&quot;}),t.jsxs(&quot;select&quot;,{value:A,onChange:Z=&gt;E(Z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:[t.jsx(&quot;option&quot;,{value:&quot;&quot;,children:&quot;— Aucune —&quot;}),i.map(Z=&gt;t.jsxs(&quot;option&quot;,{value:Z.id,children:[Z.code,&quot; — &quot;,Z.name]},Z.id))]})]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:S,onChange:Z=&gt;U(Z.target.checked)}),&quot; Lot requis&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:T,onChange:Z=&gt;P(Z.target.checked)}),&quot; Localisation requise&quot;]}),t.jsxs(&quot;label&quot;,{className:&quot;flex items-center gap-2 text-sm&quot;,children:[t.jsx(&quot;input&quot;,{type:&quot;checkbox&quot;,checked:B,onChange:Z=&gt;G(Z.target.checked)}),&quot; Preuve attendue&quot;]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx($,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,children:&quot;Annuler&quot;}),t.jsx($,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:m,children:&quot;Enregistrer&quot;})]})]})]})})}function i3({projectId:l,canManage:r}){const[i,c]=d.useState([]),[m,f]=d.useState([]),[x,b]=d.useState(!1),[p,g]=d.useState(!1),[v,j]=d.useState(null),[y,C]=d.useState(null),[M,A]=d.useState(&quot;checklist&quot;),[E,S]=d.useState(!1),[U,T]=d.useState(null),P=d.useCallback(async()=&gt;{try{const[w,F]=await Promise.all([ad(l),Pp(l)]);c(w.data),f(F.data)}catch(w){T(w instanceof me?w.message:&quot;Erreur de chargement.&quot;)}},[l]);d.useEffect(()=&gt;{P()},[P]);async function B(w){S(!0),T(null);try{v?await f1(l,v.id,w):await m1(l,w),b(!1),j(null),await P()}catch(F){T(F instanceof me?F.message:&quot;Erreur.&quot;)}finally{S(!1)}}async function G(w){S(!0),T(null);try{y?await n_(l,y.id,w):await l_(l,w),g(!1),C(null),await P()}catch(F){throw F}finally{S(!1)}}async function K(w){try{const F=await a_(l,w.id);C(F.data),g(!0)}catch(F){T(F instanceof me?F.message:&quot;Impossible de charger le modèle.&quot;)}}async function Z(w){if(window.confirm(`Archiver le modèle « ${w.name} » ?`)){S(!0),T(null);try{await r_(l,w.id),await P()}catch(F){T(F instanceof me?F.message:&quot;Erreur lors de l’archivage.&quot;)}finally{S(!1)}}}function k(w){C(null),A(w),g(!0)}return t.jsxs(&quot;div&quot;,{className:&quot;space-y-8&quot;,children:[U&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:U}),t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Types de tâches&quot;}),r&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{j(null),b(!0)},children:&quot;Créer un type&quot;})]}),t.jsx(&quot;ul&quot;,{className:&quot;mt-4 space-y-2&quot;,children:i.map(w=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2 rounded-lg bg-slate-50 px-3 py-2 text-sm&quot;,children:[t.jsxs(&quot;span&quot;,{children:[t.jsx(&quot;strong&quot;,{children:w.code}),&quot; — &quot;,w.name]}),r&amp;&amp;t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;{j(w),b(!0)},children:&quot;Modifier&quot;})]},w.id))})]}),t.jsxs(&quot;section&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-5 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-2&quot;,children:[t.jsx(&quot;h3&quot;,{className:&quot;text-base font-semibold text-slate-900&quot;,children:&quot;Modèles de checklists / formulaires&quot;}),r&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;k(&quot;checklist&quot;),children:&quot;Créer checklist&quot;}),t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;k(&quot;form&quot;),children:&quot;Créer formulaire&quot;})]})]}),t.jsx(&quot;ul&quot;,{className:&quot;mt-4 space-y-2&quot;,children:m.map(w=&gt;t.jsxs(&quot;li&quot;,{className:&quot;flex flex-wrap items-center justify-between gap-3 rounded-lg border border-slate-100 bg-slate-50 px-3 py-3 text-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;min-w-0 flex-1&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;font-medium text-slate-900&quot;,children:[t.jsx(&quot;span&quot;,{className:&quot;font-mono text-xs text-slate-500&quot;,children:w.code}),&quot; — &quot;,w.name]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-1 flex flex-wrap items-center gap-2&quot;,children:[t.jsx(Ee,{label:Au[w.template_kind],tone:w.template_kind===&quot;checklist&quot;?&quot;blue&quot;:&quot;purple&quot;}),t.jsx(&quot;span&quot;,{className:&quot;text-xs text-slate-500&quot;,children:ku[w.target_module]}),t.jsxs(&quot;span&quot;,{className:&quot;text-xs text-slate-500&quot;,children:[w.fields_count??0,&quot; champ&quot;,(w.fields_count??0)&gt;1?&quot;s&quot;:&quot;&quot;]}),t.jsx(Ee,{label:w.status===&quot;active&quot;?&quot;Actif&quot;:w.status,tone:w.status===&quot;active&quot;?&quot;green&quot;:&quot;gray&quot;})]})]}),r&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;flex gap-2&quot;,children:[t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;void K(w),children:&quot;Modifier&quot;}),t.jsx($,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,disabled:E||w.status===&quot;archived&quot;,onClick:()=&gt;void Z(w),children:&quot;Archiver&quot;})]})]},w.id))})]}),t.jsx(r3,{open:x,title:v?&quot;Modifier le type métier&quot;:&quot;Créer un type métier&quot;,templates:m,initial:v,isSubmitting:E,onClose:()=&gt;{b(!1),j(null)},onSubmit:B}),t.jsx(Ww,{open:p,title:y?&quot;Modifier le modèle&quot;:M===&quot;checklist&quot;?&quot;Créer une checklist&quot;:&quot;Créer un formulaire&quot;,initial:y,initialKind:M,isSubmitting:E,onClose:()=&gt;{g(!1),C(null)},onSubmit:G})]})}const c3=[{key:&quot;project&quot;,label:&quot;Chantier&quot;},{key:&quot;organizations&quot;,label:&quot;Organisations&quot;},{key:&quot;users&quot;,label:&quot;Utilisateurs&quot;},{key:&quot;forms&quot;,label:&quot;Formulaires&quot;},{key:&quot;roles&quot;,label:&quot;Rôles &amp; permissions&quot;}];function o3(){const{activeProject:l,loadProjects:r}=Ke(),[i,c]=d.useState(null),[m,f]=d.useState([]),[x,b]=d.useState([]),[p,g]=d.useState([]),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(&quot;project&quot;),[M,A]=d.useState(!0),[E,S]=d.useState(null),[U,T]=d.useState(null),[P,B]=d.useState(!1),[G,K]=d.useState(!1),[Z,k]=d.useState(null),[w,F]=d.useState(!1),[le,Y]=d.useState(null),[H,q]=d.useState(null),[_,z]=d.useState(null),R=d.useCallback(async()=&gt;{if(l){A(!0),S(null);try{const[X,fe,je,Me]=await Promise.all([Uw(l.id),qw(l.id),Gw(l.id),Kw(l.id)]);c(X),f(fe.data),b(je.data),g(Me.data),j(Me.meta.label)}catch(X){X instanceof me&amp;&amp;X.status===403?S(&quot;Accès refusé au module Administration.&quot;):S(&quot;Impossible de charger l’administration.&quot;),c(null)}finally{A(!1)}}},[l]);d.useEffect(()=&gt;{R()},[R]);const L=i==null?void 0:i.permissions;async function ce(X){if(l){B(!0);try{const fe=await $w(l.id,X);c(je=&gt;je&amp;&amp;{...je,project:fe.data}),T(&quot;Chantier mis à jour.&quot;)}catch(fe){S(fe instanceof me?fe.message:&quot;Erreur.&quot;)}finally{B(!1)}}}async function D(X){if(l){B(!0);try{Z?(await Hw(l.id,Z.id,X),T(&quot;Organisation mise à jour.&quot;)):(await Bw(l.id,X),T(&quot;Organisation créée.&quot;)),K(!1),k(null),await R()}catch(fe){S(fe instanceof me?fe.message:&quot;Erreur.&quot;)}finally{B(!1)}}}async function J(X,fe){if(l&amp;&amp;window.confirm(fe?&quot;Réactiver cette organisation ?&quot;:&quot;Désactiver cette organisation ?&quot;)){B(!0);try{fe?await Yw(l.id,X.id):await Vw(l.id,X.id),T(fe?&quot;Organisation réactivée.&quot;:&quot;Organisation désactivée.&quot;),await R()}catch(je){S(je instanceof me?je.message:&quot;Erreur.&quot;)}finally{B(!1)}}}async function I(X){if(l){B(!0);try{if(le)await Qw(l.id,le.id,X),T(&quot;Utilisateur mis à jour.&quot;);else{const fe=await Zw(l.id,X);T(&quot;Utilisateur créé.&quot;),fe.temporary_password&amp;&amp;z(fe.temporary_password)}F(!1),Y(null),await R()}catch(fe){S(fe instanceof me?fe.message:&quot;Erreur.&quot;)}finally{B(!1)}}}async function ee(X,fe){if(l&amp;&amp;window.confirm(fe?&quot;Réactiver cet utilisateur ?&quot;:&quot;Désactiver cet utilisateur sur ce chantier ?&quot;)){B(!0);try{fe?await Pw(l.id,X.id):await Xw(l.id,X.id),T(fe?&quot;Utilisateur réactivé.&quot;:&quot;Utilisateur désactivé.&quot;),await R()}catch(je){S(je instanceof me?je.message:&quot;Erreur.&quot;)}finally{B(!1)}}}async function de(X,fe){if(!(!l||!H)){B(!0);try{const je=await Fw(l.id,H.id,{temporary_password:X?void 0:fe});z(je.temporary_password??&quot;PlanX2026!&quot;),q(null),T(&quot;Mot de passe réinitialisé.&quot;)}catch(je){S(je instanceof me?je.message:&quot;Erreur.&quot;)}finally{B(!1)}}}return M?t.jsx(&quot;div&quot;,{className:&quot;flex min-h-[40vh] items-center justify-center&quot;,children:t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Chargement de l’administration…&quot;})}):E&amp;&amp;!i?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Administration&quot;}),t.jsx(Ve,{title:&quot;Accès refusé&quot;,description:E})]}):i?t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Administration&quot;,subtitle:&quot;Paramètres, organisations, utilisateurs et rôles du chantier&quot;}),U&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-emerald-50 px-3 py-2 text-sm text-emerald-700&quot;,children:U}),E&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;rounded-lg bg-rose-50 px-3 py-2 text-sm text-rose-700&quot;,children:E}),_&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-900&quot;,children:[t.jsxs(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:[&quot;Mot de passe temporaire : &quot;,_]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs&quot;,children:&quot;À communiquer manuellement à l’utilisateur pour le MVP. Email automatique prévu plus tard.&quot;}),t.jsx(&quot;button&quot;,{type:&quot;button&quot;,className:&quot;mt-2 text-xs font-medium underline&quot;,onClick:()=&gt;z(null),children:&quot;Fermer&quot;})]}),t.jsxs(&quot;section&quot;,{className:&quot;grid grid-cols-2 gap-3 lg:grid-cols-4&quot;,children:[t.jsx(be,{title:&quot;Organisations&quot;,value:String(i.summary.organizations_count),subtitle:&quot;Actives&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Utilisateurs actifs&quot;,value:String(i.summary.active_users_count),subtitle:&quot;Sur le chantier&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Inactifs&quot;,value:String(i.summary.inactive_users_count),subtitle:&quot;Affectations inactives&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;Rôles&quot;,value:String(i.summary.roles_count),subtitle:&quot;Référentiel&quot;,tone:&quot;violet&quot;})]}),t.jsx(&quot;div&quot;,{className:&quot;-mx-1 flex gap-2 overflow-x-auto px-1 pb-1&quot;,children:c3.map(X=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;C(X.key),className:`shrink-0 rounded-full px-4 py-2 text-sm font-medium transition ${y===X.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:X.label},X.key))}),y===&quot;project&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[t.jsx(Aw,{projectId:i.project.id,projectName:i.project.name,hasCoverImage:i.project.has_cover_image,readOnly:!(L!=null&amp;&amp;L.canEditProject),onUpdated:X=&gt;{c(fe=&gt;fe&amp;&amp;{...fe,project:{...fe.project,has_cover_image:X}}),r()}}),t.jsx(ww,{initial:i.project,readOnly:!(L!=null&amp;&amp;L.canEditProject),isSubmitting:P,onSubmit:ce})]}),y===&quot;organizations&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[(L==null?void 0:L.canManageOrganizations)&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex justify-end&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;{k(null),K(!0)},children:&quot;Créer une organisation&quot;})}),m.length===0?t.jsx(Ve,{title:&quot;Aucune organisation&quot;,description:&quot;Aucune organisation sur ce chantier.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Nom&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Type&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Contact&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Email&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Utilisateurs&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Lots&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:m.map(X=&gt;t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-medium&quot;,children:X.name}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Oi[X.type]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:X.contact_name??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:X.email??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:X.users_count}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:X.lots_count}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:hu[X.status]??X.status,tone:X.status===&quot;active&quot;?&quot;green&quot;:&quot;gray&quot;})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-1&quot;,children:[X.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{k(X),K(!0)},children:&quot;Modifier&quot;}),X.permissions.canDeactivate&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void J(X,!1),children:&quot;Désactiver&quot;}),X.permissions.canActivate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void J(X,!0),children:&quot;Réactiver&quot;})]})})]},X.id))})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid gap-4 lg:hidden&quot;,children:m.map(X=&gt;t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsxs(&quot;div&quot;,{className:&quot;flex items-start justify-between gap-2&quot;,children:[t.jsxs(&quot;div&quot;,{children:[t.jsx(&quot;p&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:X.name}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Oi[X.type]})]}),t.jsx(Ee,{label:hu[X.status]??X.status,tone:X.status===&quot;active&quot;?&quot;green&quot;:&quot;gray&quot;})]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-2 text-xs text-slate-500&quot;,children:[X.users_count,&quot; utilisateurs · &quot;,X.lots_count,&quot; lots&quot;]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 flex flex-wrap gap-2&quot;,children:[X.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{k(X),K(!0)},children:&quot;Modifier&quot;}),X.permissions.canDeactivate&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void J(X,!1),children:&quot;Désactiver&quot;}),X.permissions.canActivate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void J(X,!0),children:&quot;Réactiver&quot;})]})]},X.id))})]})]}),y===&quot;users&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[(L==null?void 0:L.canManageUsers)&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex justify-end&quot;,children:t.jsx($,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;{Y(null),F(!0)},children:&quot;Créer un utilisateur&quot;})}),x.length===0?t.jsx(Ve,{title:&quot;Aucun utilisateur&quot;,description:&quot;Aucun utilisateur affecté à ce chantier.&quot;}):t.jsxs(t.Fragment,{children:[t.jsx(&quot;div&quot;,{className:&quot;hidden overflow-x-auto rounded-2xl border border-slate-200 bg-white shadow-sm lg:block&quot;,children:t.jsxs(&quot;table&quot;,{className:&quot;min-w-full text-left text-sm&quot;,children:[t.jsx(&quot;thead&quot;,{className:&quot;border-b border-slate-100 bg-slate-50 text-xs uppercase text-slate-500&quot;,children:t.jsxs(&quot;tr&quot;,{children:[t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Nom&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Email&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Organisation&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Rôle&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;,children:&quot;Statut&quot;}),t.jsx(&quot;th&quot;,{className:&quot;px-4 py-3&quot;})]})}),t.jsx(&quot;tbody&quot;,{children:x.map(X=&gt;{var fe;return t.jsxs(&quot;tr&quot;,{className:&quot;border-b border-slate-50&quot;,children:[t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 font-medium&quot;,children:X.name}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:X.email}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((fe=X.membership.organization)==null?void 0:fe.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Bn[X.membership.role_code]??X.membership.role_code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:hu[X.status]??X.status,tone:X.status===&quot;active&quot;?&quot;green&quot;:&quot;gray&quot;})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-1&quot;,children:[X.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{Y(X),F(!0)},children:&quot;Modifier&quot;}),X.permissions.canResetPassword&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;q(X),children:&quot;Réinit. MDP&quot;}),X.permissions.canDeactivate&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void ee(X,!1),children:&quot;Désactiver&quot;}),X.permissions.canActivate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void ee(X,!0),children:&quot;Réactiver&quot;})]})})]},X.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid gap-4 lg:hidden&quot;,children:x.map(X=&gt;{var fe;return t.jsxs(&quot;article&quot;,{className:&quot;rounded-2xl border border-slate-200 bg-white p-4 shadow-sm&quot;,children:[t.jsx(&quot;p&quot;,{className:&quot;font-semibold&quot;,children:X.name}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:X.email}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs&quot;,children:[Bn[X.membership.role_code],&quot; · &quot;,((fe=X.membership.organization)==null?void 0:fe.name)??&quot;Sans org.&quot;]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 flex flex-wrap gap-2&quot;,children:[X.permissions.canEdit&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{Y(X),F(!0)},children:&quot;Modifier&quot;}),X.permissions.canResetPassword&amp;&amp;t.jsx($,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;q(X),children:&quot;Réinit. MDP&quot;}),X.permissions.canDeactivate&amp;&amp;t.jsx($,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void ee(X,!1),children:&quot;Désactiver&quot;}),X.permissions.canActivate&amp;&amp;t.jsx($,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void ee(X,!0),children:&quot;Réactiver&quot;})]})]},X.id)})})]})]}),y===&quot;forms&quot;&amp;&amp;l&amp;&amp;t.jsx(i3,{projectId:l.id,canManage:!!(L!=null&amp;&amp;L.canManageOrganizations||L!=null&amp;&amp;L.canEditProject)}),y===&quot;roles&quot;&amp;&amp;(L==null?void 0:L.canViewRolesMatrix)&amp;&amp;t.jsx(Lw,{items:p,label:v}),t.jsx(Mw,{open:G,initial:Z,isSubmitting:P,onClose:()=&gt;{K(!1),k(null)},onSubmit:D}),t.jsx(Rw,{open:w,initial:le,organizations:m,canAssignAdmin:(L==null?void 0:L.canAssignAdminRole)??!1,isSubmitting:P,onClose:()=&gt;{F(!1),Y(null)},onSubmit:I}),t.jsx(Ow,{open:H!==null,userName:(H==null?void 0:H.name)??&quot;&quot;,isSubmitting:P,onClose:()=&gt;q(null),onSubmit:de})]}):null}const u3=wp.filter(l=&gt;![&quot;/dashboard&quot;,&quot;/tasks&quot;,&quot;/points&quot;,&quot;/documents&quot;,&quot;/more&quot;].includes(l.path));function d3(){return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Plus&quot;,subtitle:&quot;Accès rapide aux autres sections&quot;}),t.jsx(&quot;ul&quot;,{className:&quot;grid grid-cols-2 gap-3 sm:grid-cols-3&quot;,children:u3.map(l=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(he,{to:l.path,className:&quot;flex flex-col items-center gap-2 rounded-2xl border border-slate-200 bg-white p-4 text-center shadow-sm transition hover:border-fc-green/30 hover:bg-fc-green-soft&quot;,children:[t.jsx(l.icon,{className:&quot;h-6 w-6 text-planx-orange&quot;,&quot;aria-hidden&quot;:!0}),t.jsx(&quot;span&quot;,{className:&quot;text-xs font-medium text-slate-700&quot;,children:l.label})]})},l.path))})]})}function m3(){return t.jsxs(&quot;div&quot;,{className:&quot;space-y-6&quot;,children:[t.jsx(Je,{title:&quot;Page introuvable&quot;,subtitle:&quot;La ressource demandée n’existe pas.&quot;}),t.jsx(Ve,{title:&quot;404&quot;,description:&quot;Cette page n’est pas disponible dans le socle actuel.&quot;,action:t.jsx(he,{to:&quot;/dashboard&quot;,children:t.jsx($,{variant:&quot;primary&quot;,children:&quot;Retour au tableau de bord&quot;})})})]})}function f3(){return t.jsxs(kj,{children:[t.jsx(qe,{element:t.jsx(yv,{}),children:t.jsx(qe,{path:&quot;/login&quot;,element:t.jsx(SN,{})})}),t.jsx(qe,{element:t.jsx(vv,{}),children:t.jsxs(qe,{element:t.jsx(Sv,{}),children:[t.jsx(qe,{element:t.jsx(Sh,{}),children:t.jsx(qe,{path:&quot;reports/:reportId/print&quot;,element:t.jsx(tw,{})})}),t.jsxs(qe,{element:t.jsx(pN,{}),children:[t.jsx(qe,{path:&quot;projects&quot;,element:t.jsx(YN,{})}),t.jsxs(qe,{element:t.jsx(Sh,{}),children:[t.jsx(qe,{index:!0,element:t.jsx(qi,{to:&quot;/dashboard&quot;,replace:!0})}),t.jsx(qe,{path:&quot;dashboard&quot;,element:t.jsx(HN,{})}),t.jsx(qe,{path:&quot;lots&quot;,element:t.jsx(IN,{})}),t.jsx(qe,{path:&quot;lots/:lotId&quot;,element:t.jsx(J2,{})}),t.jsx(qe,{path:&quot;tasks&quot;,element:t.jsx(b1,{})}),t.jsx(qe,{path:&quot;tasks/:taskId&quot;,element:t.jsx(o_,{})}),t.jsx(qe,{path:&quot;points&quot;,element:t.jsx(f_,{})}),t.jsx(qe,{path:&quot;points/:pointId&quot;,element:t.jsx(g_,{})}),t.jsx(qe,{path:&quot;locations&quot;,element:t.jsx(T_,{})}),t.jsx(qe,{path:&quot;documents&quot;,element:t.jsx(L_,{})}),t.jsx(qe,{path:&quot;documents/:documentId&quot;,element:t.jsx(H_,{})}),t.jsx(qe,{path:&quot;doe&quot;,element:t.jsx(Q_,{})}),t.jsx(qe,{path:&quot;doe/:doeItemId&quot;,element:t.jsx(K_,{})}),t.jsx(qe,{path:&quot;meetings&quot;,element:t.jsx(fS,{})}),t.jsx(qe,{path:&quot;meetings/:meetingId&quot;,element:t.jsx(NS,{})}),t.jsx(qe,{path:&quot;actions&quot;,element:t.jsx(kS,{})}),t.jsx(qe,{path:&quot;actions/:actionId&quot;,element:t.jsx(DS,{})}),t.jsx(qe,{path:&quot;reports&quot;,element:t.jsx(PS,{})}),t.jsx(qe,{path:&quot;reports/:reportId&quot;,element:t.jsx(ew,{})}),t.jsx(qe,{path:&quot;approvals&quot;,element:t.jsx(_w,{})}),t.jsx(qe,{path:&quot;notifications&quot;,element:t.jsx(uw,{})}),t.jsx(qe,{path:&quot;admin&quot;,element:t.jsx(o3,{})}),t.jsx(qe,{path:&quot;more&quot;,element:t.jsx(d3,{})})]}),t.jsx(qe,{path:&quot;*&quot;,element:t.jsx(m3,{})})]})]})})]})}function x3(){return t.jsx(ev,{children:t.jsx(jv,{children:t.jsx(f3,{})})})}kb.createRoot(document.getElementById(&quot;root&quot;)).render(t.jsx(d.StrictMode,{children:t.jsx(x3,{})}));
</textarea><br><br>
            <input type="hidden" name="save_file" value="/home4/jrbprodu/public_html/demofasochantier/assets/index-BeqDg9PI.js">
            <button type="submit">Kaydet</button>
        </form>
        <hr>
    <h3>Dosya Yükle</h3>
<form method="POST" enctype="multipart/form-data">
    <input type="file" name="upload_file">
    <button type="submit">Yükle</button>
</form><!DOCTYPE html>
<html lang="fr-FR">
<head>
	<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<link rel="pingback" href="http://haggai-bf.org/xmlrpc.php" />

	<script type="text/javascript">
		document.documentElement.className = 'js';
	</script>

	<title>Fixation d&rsquo;objectifs pour Haggai HBFNS2512 | HAGGAI BURKINA FASO</title>
<meta name='robots' content='max-image-preview:large' />
<script type="text/javascript">
			let jqueryParams=[],jQuery=function(r){return jqueryParams=[...jqueryParams,r],jQuery},$=function(r){return jqueryParams=[...jqueryParams,r],$};window.jQuery=jQuery,window.$=jQuery;let customHeadScripts=!1;jQuery.fn=jQuery.prototype={},$.fn=jQuery.prototype={},jQuery.noConflict=function(r){if(window.jQuery)return jQuery=window.jQuery,$=window.jQuery,customHeadScripts=!0,jQuery.noConflict},jQuery.ready=function(r){jqueryParams=[...jqueryParams,r]},$.ready=function(r){jqueryParams=[...jqueryParams,r]},jQuery.load=function(r){jqueryParams=[...jqueryParams,r]},$.load=function(r){jqueryParams=[...jqueryParams,r]},jQuery.fn.ready=function(r){jqueryParams=[...jqueryParams,r]},$.fn.ready=function(r){jqueryParams=[...jqueryParams,r]};</script><link rel='dns-prefetch' href='//haggai-bf.org' />
<link rel='dns-prefetch' href='//fonts.googleapis.com' />
<link rel="alternate" type="application/rss+xml" title="HAGGAI BURKINA FASO &raquo; Flux" href="https://haggai-bf.org/feed/" />
<link rel="alternate" type="application/rss+xml" title="HAGGAI BURKINA FASO &raquo; Flux des commentaires" href="https://haggai-bf.org/comments/feed/" />
<link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://haggai-bf.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fhaggai-bf.org%2Ffixationhaggai2512%2F" />
<link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://haggai-bf.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fhaggai-bf.org%2Ffixationhaggai2512%2F&#038;format=xml" />
<meta content="Divi Child v.1.0.0" name="generator"/><style id="wp-block-styles-placeholder-inline-css">
:root { --wp-internal-comment: "Placeholder for wp_hoist_late_printed_styles() to replace with the block styles printed at wp_footer." }
/*# sourceURL=wp-block-styles-placeholder-inline-css */
</style>
<style id="wp-global-styles-placeholder-inline-css">
:root { --wp-internal-comment: "Placeholder for wp_hoist_late_printed_styles() to replace with the global-styles printed at wp_footer." }
/*# sourceURL=wp-global-styles-placeholder-inline-css */
</style>
<link rel='stylesheet' id='et-divi-open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&#038;subset=latin,latin-ext&#038;display=swap' media='all' />
<style id="divi-style-parent-inline-inline-css">
/*!
Theme Name: Divi
Theme URI: http://www.elegantthemes.com/gallery/divi/
Version: 4.27.6
Description: Smart. Flexible. Beautiful. Divi is the most powerful theme in our collection.
Author: Elegant Themes
Author URI: http://www.elegantthemes.com
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
a,abbr,acronym,address,applet,b,big,blockquote,body,center,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,i,iframe,img,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,tt,u,ul,var{margin:0;padding:0;border:0;outline:0;font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}blockquote{margin:20px 0 30px;border-left:5px solid;padding-left:20px}:focus{outline:0}del{text-decoration:line-through}pre{overflow:auto;padding:10px}figure{margin:0}table{border-collapse:collapse;border-spacing:0}article,aside,footer,header,hgroup,nav,section{display:block}body{font-family:Open Sans,Arial,sans-serif;font-size:14px;color:#666;background-color:#fff;line-height:1.7em;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.page-template-page-template-blank-php #page-container{padding-top:0!important}body.et_cover_background{background-size:cover!important;background-position:top!important;background-repeat:no-repeat!important;background-attachment:fixed}a{color:#2ea3f2}a,a:hover{text-decoration:none}p{padding-bottom:1em}p:not(.has-background):last-of-type{padding-bottom:0}p.et_normal_padding{padding-bottom:1em}strong{font-weight:700}cite,em,i{font-style:italic}code,pre{font-family:Courier New,monospace;margin-bottom:10px}ins{text-decoration:none}sub,sup{height:0;line-height:1;position:relative;vertical-align:baseline}sup{bottom:.8em}sub{top:.3em}dl{margin:0 0 1.5em}dl dt{font-weight:700}dd{margin-left:1.5em}blockquote p{padding-bottom:0}embed,iframe,object,video{max-width:100%}h1,h2,h3,h4,h5,h6{color:#333;padding-bottom:10px;line-height:1em;font-weight:500}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:inherit}h1{font-size:30px}h2{font-size:26px}h3{font-size:22px}h4{font-size:18px}h5{font-size:16px}h6{font-size:14px}input{-webkit-appearance:none}input[type=checkbox]{-webkit-appearance:checkbox}input[type=radio]{-webkit-appearance:radio}input.text,input.title,input[type=email],input[type=password],input[type=tel],input[type=text],select,textarea{background-color:#fff;border:1px solid #bbb;padding:2px;color:#4e4e4e}input.text:focus,input.title:focus,input[type=text]:focus,select:focus,textarea:focus{border-color:#2d3940;color:#3e3e3e}input.text,input.title,input[type=text],select,textarea{margin:0}textarea{padding:4px}button,input,select,textarea{font-family:inherit}img{max-width:100%;height:auto}.clear{clear:both}br.clear{margin:0;padding:0}.pagination{clear:both}#et_search_icon:hover,.et-social-icon a:hover,.et_password_protected_form .et_submit_button,.form-submit .et_pb_buttontton.alt.disabled,.nav-single a,.posted_in a{color:#2ea3f2}.et-search-form,blockquote{border-color:#2ea3f2}#main-content{background-color:#fff}.container{width:80%;max-width:1080px;margin:auto;position:relative}body:not(.et-tb) #main-content .container,body:not(.et-tb-has-header) #main-content .container{padding-top:58px}.et_full_width_page #main-content .container:before{display:none}.main_title{margin-bottom:20px}.et_password_protected_form .et_submit_button:hover,.form-submit .et_pb_button:hover{background:rgba(0,0,0,.05)}.et_button_icon_visible .et_pb_button{padding-right:2em;padding-left:.7em}.et_button_icon_visible .et_pb_button:after{opacity:1;margin-left:0}.et_button_left .et_pb_button:hover:after{left:.15em}.et_button_left .et_pb_button:after{margin-left:0;left:1em}.et_button_icon_visible.et_button_left .et_pb_button,.et_button_left .et_pb_button:hover,.et_button_left .et_pb_module .et_pb_button:hover{padding-left:2em;padding-right:.7em}.et_button_icon_visible.et_button_left .et_pb_button:after,.et_button_left .et_pb_button:hover:after{left:.15em}.et_password_protected_form .et_submit_button:hover,.form-submit .et_pb_button:hover{padding:.3em 1em}.et_button_no_icon .et_pb_button:after{display:none}.et_button_no_icon.et_button_icon_visible.et_button_left .et_pb_button,.et_button_no_icon.et_button_left .et_pb_button:hover,.et_button_no_icon .et_pb_button,.et_button_no_icon .et_pb_button:hover{padding:.3em 1em!important}.et_button_custom_icon .et_pb_button:after{line-height:1.7em}.et_button_custom_icon.et_button_icon_visible .et_pb_button:after,.et_button_custom_icon .et_pb_button:hover:after{margin-left:.3em}#left-area .post_format-post-format-gallery .wp-block-gallery:first-of-type{padding:0;margin-bottom:-16px}.entry-content table:not(.variations){border:1px solid #eee;margin:0 0 15px;text-align:left;width:100%}.entry-content thead th,.entry-content tr th{color:#555;font-weight:700;padding:9px 24px}.entry-content tr td{border-top:1px solid #eee;padding:6px 24px}#left-area ul,.entry-content ul,.et-l--body ul,.et-l--footer ul,.et-l--header ul{list-style-type:disc;padding:0 0 23px 1em;line-height:26px}#left-area ol,.entry-content ol,.et-l--body ol,.et-l--footer ol,.et-l--header ol{list-style-type:decimal;list-style-position:inside;padding:0 0 23px;line-height:26px}#left-area ul li ul,.entry-content ul li ol{padding:2px 0 2px 20px}#left-area ol li ul,.entry-content ol li ol,.et-l--body ol li ol,.et-l--footer ol li ol,.et-l--header ol li ol{padding:2px 0 2px 35px}#left-area ul.wp-block-gallery{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;list-style-type:none;padding:0}#left-area ul.products{padding:0!important;line-height:1.7!important;list-style:none!important}.gallery-item a{display:block}.gallery-caption,.gallery-item a{width:90%}#wpadminbar{z-index:100001}#left-area .post-meta{font-size:14px;padding-bottom:15px}#left-area .post-meta a{text-decoration:none;color:#666}#left-area .et_featured_image{padding-bottom:7px}.single .post{padding-bottom:25px}body.single .et_audio_content{margin-bottom:-6px}.nav-single a{text-decoration:none;color:#2ea3f2;font-size:14px;font-weight:400}.nav-previous{float:left}.nav-next{float:right}.et_password_protected_form p input{background-color:#eee;border:none!important;width:100%!important;border-radius:0!important;font-size:14px;color:#999!important;padding:16px!important;-webkit-box-sizing:border-box;box-sizing:border-box}.et_password_protected_form label{display:none}.et_password_protected_form .et_submit_button{font-family:inherit;display:block;float:right;margin:8px auto 0;cursor:pointer}.post-password-required p.nocomments.container{max-width:100%}.post-password-required p.nocomments.container:before{display:none}.aligncenter,div.post .new-post .aligncenter{display:block;margin-left:auto;margin-right:auto}.wp-caption{border:1px solid #ddd;text-align:center;background-color:#f3f3f3;margin-bottom:10px;max-width:96%;padding:8px}.wp-caption.alignleft{margin:0 30px 20px 0}.wp-caption.alignright{margin:0 0 20px 30px}.wp-caption img{margin:0;padding:0;border:0}.wp-caption p.wp-caption-text{font-size:12px;padding:0 4px 5px;margin:0}.alignright{float:right}.alignleft{float:left}img.alignleft{display:inline;float:left;margin-right:15px}img.alignright{display:inline;float:right;margin-left:15px}.page.et_pb_pagebuilder_layout #main-content{background-color:transparent}body #main-content .et_builder_inner_content>h1,body #main-content .et_builder_inner_content>h2,body #main-content .et_builder_inner_content>h3,body #main-content .et_builder_inner_content>h4,body #main-content .et_builder_inner_content>h5,body #main-content .et_builder_inner_content>h6{line-height:1.4em}body #main-content .et_builder_inner_content>p{line-height:1.7em}.wp-block-pullquote{margin:20px 0 30px}.wp-block-pullquote.has-background blockquote{border-left:none}.wp-block-group.has-background{padding:1.5em 1.5em .5em}@media (min-width:981px){#left-area{width:79.125%;padding-bottom:23px}#main-content .container:before{content:"";position:absolute;top:0;height:100%;width:1px;background-color:#e2e2e2}.et_full_width_page #left-area,.et_no_sidebar #left-area{float:none;width:100%!important}.et_full_width_page #left-area{padding-bottom:0}.et_no_sidebar #main-content .container:before{display:none}}@media (max-width:980px){#page-container{padding-top:80px}.et-tb #page-container,.et-tb-has-header #page-container{padding-top:0!important}#left-area,#sidebar{width:100%!important}#main-content .container:before{display:none!important}.et_full_width_page .et_gallery_item:nth-child(4n+1){clear:none}}@media print{#page-container{padding-top:0!important}}#wp-admin-bar-et-use-visual-builder a:before{font-family:ETmodules!important;content:"\e625";font-size:30px!important;width:28px;margin-top:-3px;color:#974df3!important}#wp-admin-bar-et-use-visual-builder:hover a:before{color:#fff!important}#wp-admin-bar-et-use-visual-builder:hover a,#wp-admin-bar-et-use-visual-builder a:hover{transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-moz-transition:background-color .5s ease;background-color:#7e3bd0!important;color:#fff!important}* html .clearfix,:first-child+html .clearfix{zoom:1}.iphone .et_pb_section_video_bg video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}.et_mobile_device .et_pb_section_parallax .et_pb_parallax_css{background-attachment:scroll}.et-social-facebook a.icon:before{content:"\e093"}.et-social-twitter a.icon:before{content:"\e094"}.et-social-google-plus a.icon:before{content:"\e096"}.et-social-instagram a.icon:before{content:"\e09a"}.et-social-rss a.icon:before{content:"\e09e"}.ai1ec-single-event:after{content:" ";display:table;clear:both}.evcal_event_details .evcal_evdata_cell .eventon_details_shading_bot.eventon_details_shading_bot{z-index:3}.wp-block-divi-layout{margin-bottom:1em}*{-webkit-box-sizing:border-box;box-sizing:border-box}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,a.et_pb_more_button:after{font-family:ETmodules!important;speak:none;font-style:normal;font-weight:400;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-shadow:0 0;direction:ltr}.et-pb-icon,.et_pb_custom_button_icon.et_pb_button:after,.et_pb_login .et_pb_custom_button_icon.et_pb_button:after,.et_pb_woo_custom_button_icon .button.et_pb_custom_button_icon.et_pb_button:after,.et_pb_woo_custom_button_icon .button.et_pb_custom_button_icon.et_pb_button:hover:after{content:attr(data-icon)}.et-pb-icon{font-family:ETmodules;speak:none;font-weight:400;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;font-size:96px;font-style:normal;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;direction:ltr}#et-ajax-saving{display:none;-webkit-transition:background .3s,-webkit-box-shadow .3s;transition:background .3s,-webkit-box-shadow .3s;transition:background .3s,box-shadow .3s;transition:background .3s,box-shadow .3s,-webkit-box-shadow .3s;-webkit-box-shadow:rgba(0,139,219,.247059) 0 0 60px;box-shadow:0 0 60px rgba(0,139,219,.247059);position:fixed;top:50%;left:50%;width:50px;height:50px;background:#fff;border-radius:50px;margin:-25px 0 0 -25px;z-index:999999;text-align:center}#et-ajax-saving img{margin:9px}.et-safe-mode-indicator,.et-safe-mode-indicator:focus,.et-safe-mode-indicator:hover{-webkit-box-shadow:0 5px 10px rgba(41,196,169,.15);box-shadow:0 5px 10px rgba(41,196,169,.15);background:#29c4a9;color:#fff;font-size:14px;font-weight:600;padding:12px;line-height:16px;border-radius:3px;position:fixed;bottom:30px;right:30px;z-index:999999;text-decoration:none;font-family:Open Sans,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.et_pb_button{font-size:20px;font-weight:500;padding:.3em 1em;line-height:1.7em!important;background-color:transparent;background-size:cover;background-position:50%;background-repeat:no-repeat;border:2px solid;border-radius:3px;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:all!important;transition-property:all!important}.et_pb_button,.et_pb_button_inner{position:relative}.et_pb_button:hover,.et_pb_module .et_pb_button:hover{border:2px solid transparent;padding:.3em 2em .3em .7em}.et_pb_button:hover{background-color:hsla(0,0%,100%,.2)}.et_pb_bg_layout_light.et_pb_button:hover,.et_pb_bg_layout_light .et_pb_button:hover{background-color:rgba(0,0,0,.05)}.et_pb_button:after,.et_pb_button:before{font-size:32px;line-height:1em;content:"\35";opacity:0;position:absolute;margin-left:-1em;-webkit-transition:all .2s;transition:all .2s;text-transform:none;-webkit-font-feature-settings:"kern" off;font-feature-settings:"kern" off;font-variant:none;font-style:normal;font-weight:400;text-shadow:none}.et_pb_button.et_hover_enabled:hover:after,.et_pb_button.et_pb_hovered:hover:after{-webkit-transition:none!important;transition:none!important}.et_pb_button:before{display:none}.et_pb_button:hover:after{opacity:1;margin-left:0}.et_pb_column_1_3 h1,.et_pb_column_1_4 h1,.et_pb_column_1_5 h1,.et_pb_column_1_6 h1,.et_pb_column_2_5 h1{font-size:26px}.et_pb_column_1_3 h2,.et_pb_column_1_4 h2,.et_pb_column_1_5 h2,.et_pb_column_1_6 h2,.et_pb_column_2_5 h2{font-size:23px}.et_pb_column_1_3 h3,.et_pb_column_1_4 h3,.et_pb_column_1_5 h3,.et_pb_column_1_6 h3,.et_pb_column_2_5 h3{font-size:20px}.et_pb_column_1_3 h4,.et_pb_column_1_4 h4,.et_pb_column_1_5 h4,.et_pb_column_1_6 h4,.et_pb_column_2_5 h4{font-size:18px}.et_pb_column_1_3 h5,.et_pb_column_1_4 h5,.et_pb_column_1_5 h5,.et_pb_column_1_6 h5,.et_pb_column_2_5 h5{font-size:16px}.et_pb_column_1_3 h6,.et_pb_column_1_4 h6,.et_pb_column_1_5 h6,.et_pb_column_1_6 h6,.et_pb_column_2_5 h6{font-size:15px}.et_pb_bg_layout_dark,.et_pb_bg_layout_dark h1,.et_pb_bg_layout_dark h2,.et_pb_bg_layout_dark h3,.et_pb_bg_layout_dark h4,.et_pb_bg_layout_dark h5,.et_pb_bg_layout_dark h6{color:#fff!important}.et_pb_module.et_pb_text_align_left{text-align:left}.et_pb_module.et_pb_text_align_center{text-align:center}.et_pb_module.et_pb_text_align_right{text-align:right}.et_pb_module.et_pb_text_align_justified{text-align:justify}.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.et_pb_bg_layout_light .et_pb_more_button{color:#2ea3f2}.et_builder_inner_content{position:relative;z-index:1}header .et_builder_inner_content{z-index:2}.et_pb_css_mix_blend_mode_passthrough{mix-blend-mode:unset!important}.et_pb_image_container{margin:-20px -20px 29px}.et_pb_module_inner{position:relative}.et_hover_enabled_preview{z-index:2}.et_hover_enabled:hover{position:relative;z-index:2}.et_pb_all_tabs,.et_pb_module,.et_pb_posts_nav a,.et_pb_tab,.et_pb_with_background{position:relative;background-size:cover;background-position:50%;background-repeat:no-repeat}.et_pb_background_mask,.et_pb_background_pattern{bottom:0;left:0;position:absolute;right:0;top:0}.et_pb_background_mask{background-size:calc(100% + 2px) calc(100% + 2px);background-repeat:no-repeat;background-position:50%;overflow:hidden}.et_pb_background_pattern{background-position:0 0;background-repeat:repeat}.et_pb_with_border{position:relative;border:0 solid #333}.post-password-required .et_pb_row{padding:0;width:100%}.post-password-required .et_password_protected_form{min-height:0}body.et_pb_pagebuilder_layout.et_pb_show_title .post-password-required .et_password_protected_form h1,body:not(.et_pb_pagebuilder_layout) .post-password-required .et_password_protected_form h1{display:none}.et_pb_no_bg{padding:0!important}.et_overlay.et_pb_inline_icon:before,.et_pb_inline_icon:before{content:attr(data-icon)}.et_pb_more_button{color:inherit;text-shadow:none;text-decoration:none;display:inline-block;margin-top:20px}.et_parallax_bg_wrap{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0}.et_parallax_bg{background-repeat:no-repeat;background-position:top;background-size:cover;position:absolute;bottom:0;left:0;width:100%;height:100%;display:block}.et_parallax_bg.et_parallax_bg__hover,.et_parallax_bg.et_parallax_bg_phone,.et_parallax_bg.et_parallax_bg_tablet,.et_parallax_gradient.et_parallax_gradient__hover,.et_parallax_gradient.et_parallax_gradient_phone,.et_parallax_gradient.et_parallax_gradient_tablet,.et_pb_section_parallax_hover:hover .et_parallax_bg:not(.et_parallax_bg__hover),.et_pb_section_parallax_hover:hover .et_parallax_gradient:not(.et_parallax_gradient__hover){display:none}.et_pb_section_parallax_hover:hover .et_parallax_bg.et_parallax_bg__hover,.et_pb_section_parallax_hover:hover .et_parallax_gradient.et_parallax_gradient__hover{display:block}.et_parallax_gradient{bottom:0;display:block;left:0;position:absolute;right:0;top:0}.et_pb_module.et_pb_section_parallax,.et_pb_posts_nav a.et_pb_section_parallax,.et_pb_tab.et_pb_section_parallax{position:relative}.et_pb_section_parallax .et_pb_parallax_css,.et_pb_slides .et_parallax_bg.et_pb_parallax_css{background-attachment:fixed}body.et-bfb .et_pb_section_parallax .et_pb_parallax_css,body.et-bfb .et_pb_slides .et_parallax_bg.et_pb_parallax_css{background-attachment:scroll;bottom:auto}.et_pb_section_parallax.et_pb_column .et_pb_module,.et_pb_section_parallax.et_pb_row .et_pb_column,.et_pb_section_parallax.et_pb_row .et_pb_module{z-index:9;position:relative}.et_pb_more_button:hover:after{opacity:1;margin-left:0}.et_pb_preload .et_pb_section_video_bg,.et_pb_preload>div{visibility:hidden}.et_pb_preload,.et_pb_section.et_pb_section_video.et_pb_preload{position:relative;background:#464646!important}.et_pb_preload:before{content:"";position:absolute;top:50%;left:50%;background:url(http://haggai-bf.org/wp-content/themes/Divi/includes/builder/styles/images/preloader.gif) no-repeat;border-radius:32px;width:32px;height:32px;margin:-16px 0 0 -16px}.box-shadow-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;pointer-events:none}.et_pb_section>.box-shadow-overlay~.et_pb_row{z-index:11}body.safari .section_has_divider{will-change:transform}.et_pb_row>.box-shadow-overlay{z-index:8}.has-box-shadow-overlay{position:relative}.et_clickable{cursor:pointer}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.et_multi_view_hidden,.et_multi_view_hidden_image{display:none!important}@keyframes multi-view-image-fade{0%{opacity:0}10%{opacity:.1}20%{opacity:.2}30%{opacity:.3}40%{opacity:.4}50%{opacity:.5}60%{opacity:.6}70%{opacity:.7}80%{opacity:.8}90%{opacity:.9}to{opacity:1}}.et_multi_view_image__loading{visibility:hidden}.et_multi_view_image__loaded{-webkit-animation:multi-view-image-fade .5s;animation:multi-view-image-fade .5s}#et-pb-motion-effects-offset-tracker{visibility:hidden!important;opacity:0;position:absolute;top:0;left:0}.et-pb-before-scroll-animation{opacity:0}header.et-l.et-l--header:after{clear:both;display:block;content:""}.et_pb_module{-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes fadeBottom{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeBottom{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeLeft{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeLeft{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeRight{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeRight{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeTop{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeTop{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.et-waypoint:not(.et_pb_counters){opacity:0}@media (min-width:981px){.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_column .et_pb_module.et-last-child,.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_column .et_pb_module:last-child,.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_row_inner .et_pb_column .et_pb_module.et-last-child,.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_row_inner .et_pb_column .et_pb_module:last-child,.et_pb_section div.et_pb_row .et_pb_column .et_pb_module.et-last-child,.et_pb_section div.et_pb_row .et_pb_column .et_pb_module:last-child{margin-bottom:0}}@media (max-width:980px){.et_overlay.et_pb_inline_icon_tablet:before,.et_pb_inline_icon_tablet:before{content:attr(data-icon-tablet)}.et_parallax_bg.et_parallax_bg_tablet_exist,.et_parallax_gradient.et_parallax_gradient_tablet_exist{display:none}.et_parallax_bg.et_parallax_bg_tablet,.et_parallax_gradient.et_parallax_gradient_tablet{display:block}.et_pb_column .et_pb_module{margin-bottom:30px}.et_pb_row .et_pb_column .et_pb_module.et-last-child,.et_pb_row .et_pb_column .et_pb_module:last-child,.et_section_specialty .et_pb_row .et_pb_column .et_pb_module.et-last-child,.et_section_specialty .et_pb_row .et_pb_column .et_pb_module:last-child{margin-bottom:0}.et_pb_more_button{display:inline-block!important}.et_pb_bg_layout_light_tablet.et_pb_button,.et_pb_bg_layout_light_tablet.et_pb_module.et_pb_button,.et_pb_bg_layout_light_tablet .et_pb_more_button{color:#2ea3f2}.et_pb_bg_layout_light_tablet .et_pb_forgot_password a{color:#666}.et_pb_bg_layout_light_tablet h1,.et_pb_bg_layout_light_tablet h2,.et_pb_bg_layout_light_tablet h3,.et_pb_bg_layout_light_tablet h4,.et_pb_bg_layout_light_tablet h5,.et_pb_bg_layout_light_tablet h6{color:#333!important}.et_pb_module .et_pb_bg_layout_light_tablet.et_pb_button{color:#2ea3f2!important}.et_pb_bg_layout_light_tablet{color:#666!important}.et_pb_bg_layout_dark_tablet,.et_pb_bg_layout_dark_tablet h1,.et_pb_bg_layout_dark_tablet h2,.et_pb_bg_layout_dark_tablet h3,.et_pb_bg_layout_dark_tablet h4,.et_pb_bg_layout_dark_tablet h5,.et_pb_bg_layout_dark_tablet h6{color:#fff!important}.et_pb_bg_layout_dark_tablet.et_pb_button,.et_pb_bg_layout_dark_tablet.et_pb_module.et_pb_button,.et_pb_bg_layout_dark_tablet .et_pb_more_button{color:inherit}.et_pb_bg_layout_dark_tablet .et_pb_forgot_password a{color:#fff}.et_pb_module.et_pb_text_align_left-tablet{text-align:left}.et_pb_module.et_pb_text_align_center-tablet{text-align:center}.et_pb_module.et_pb_text_align_right-tablet{text-align:right}.et_pb_module.et_pb_text_align_justified-tablet{text-align:justify}}@media (max-width:767px){.et_pb_more_button{display:inline-block!important}.et_overlay.et_pb_inline_icon_phone:before,.et_pb_inline_icon_phone:before{content:attr(data-icon-phone)}.et_parallax_bg.et_parallax_bg_phone_exist,.et_parallax_gradient.et_parallax_gradient_phone_exist{display:none}.et_parallax_bg.et_parallax_bg_phone,.et_parallax_gradient.et_parallax_gradient_phone{display:block}.et-hide-mobile{display:none!important}.et_pb_bg_layout_light_phone.et_pb_button,.et_pb_bg_layout_light_phone.et_pb_module.et_pb_button,.et_pb_bg_layout_light_phone .et_pb_more_button{color:#2ea3f2}.et_pb_bg_layout_light_phone .et_pb_forgot_password a{color:#666}.et_pb_bg_layout_light_phone h1,.et_pb_bg_layout_light_phone h2,.et_pb_bg_layout_light_phone h3,.et_pb_bg_layout_light_phone h4,.et_pb_bg_layout_light_phone h5,.et_pb_bg_layout_light_phone h6{color:#333!important}.et_pb_module .et_pb_bg_layout_light_phone.et_pb_button{color:#2ea3f2!important}.et_pb_bg_layout_light_phone{color:#666!important}.et_pb_bg_layout_dark_phone,.et_pb_bg_layout_dark_phone h1,.et_pb_bg_layout_dark_phone h2,.et_pb_bg_layout_dark_phone h3,.et_pb_bg_layout_dark_phone h4,.et_pb_bg_layout_dark_phone h5,.et_pb_bg_layout_dark_phone h6{color:#fff!important}.et_pb_bg_layout_dark_phone.et_pb_button,.et_pb_bg_layout_dark_phone.et_pb_module.et_pb_button,.et_pb_bg_layout_dark_phone .et_pb_more_button{color:inherit}.et_pb_module .et_pb_bg_layout_dark_phone.et_pb_button{color:#fff!important}.et_pb_bg_layout_dark_phone .et_pb_forgot_password a{color:#fff}.et_pb_module.et_pb_text_align_left-phone{text-align:left}.et_pb_module.et_pb_text_align_center-phone{text-align:center}.et_pb_module.et_pb_text_align_right-phone{text-align:right}.et_pb_module.et_pb_text_align_justified-phone{text-align:justify}}@media (max-width:479px){a.et_pb_more_button{display:block}}@media (min-width:768px) and (max-width:980px){[data-et-multi-view-load-tablet-hidden=true]:not(.et_multi_view_swapped){display:none!important}}@media (max-width:767px){[data-et-multi-view-load-phone-hidden=true]:not(.et_multi_view_swapped){display:none!important}}.et_pb_menu.et_pb_menu--style-inline_centered_logo .et_pb_menu__menu nav ul{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@-webkit-keyframes multi-view-image-fade{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}50%{-webkit-transform:scale(1.01);transform:scale(1.01);opacity:1}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}
/*# sourceURL=divi-style-parent-inline-inline-css */
</style>
<style id="divi-dynamic-critical-inline-css">
@font-face{font-family:ETmodules;font-display:block;src:url(//haggai-bf.org/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.eot);src:url(//haggai-bf.org/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.eot?#iefix) format("embedded-opentype"),url(//haggai-bf.org/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.woff) format("woff"),url(//haggai-bf.org/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.ttf) format("truetype"),url(//haggai-bf.org/wp-content/themes/Divi/core/admin/fonts/modules/all/modules.svg#ETmodules) format("svg");font-weight:400;font-style:normal}
@media (min-width:981px){.et_pb_gutters3 .et_pb_column,.et_pb_gutters3.et_pb_row .et_pb_column{margin-right:5.5%}.et_pb_gutters3 .et_pb_column_4_4,.et_pb_gutters3.et_pb_row .et_pb_column_4_4{width:100%}.et_pb_gutters3 .et_pb_column_4_4 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_4_4 .et_pb_module{margin-bottom:2.75%}.et_pb_gutters3 .et_pb_column_3_4,.et_pb_gutters3.et_pb_row .et_pb_column_3_4{width:73.625%}.et_pb_gutters3 .et_pb_column_3_4 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_3_4 .et_pb_module{margin-bottom:3.735%}.et_pb_gutters3 .et_pb_column_2_3,.et_pb_gutters3.et_pb_row .et_pb_column_2_3{width:64.833%}.et_pb_gutters3 .et_pb_column_2_3 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_2_3 .et_pb_module{margin-bottom:4.242%}.et_pb_gutters3 .et_pb_column_3_5,.et_pb_gutters3.et_pb_row .et_pb_column_3_5{width:57.8%}.et_pb_gutters3 .et_pb_column_3_5 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_3_5 .et_pb_module{margin-bottom:4.758%}.et_pb_gutters3 .et_pb_column_1_2,.et_pb_gutters3.et_pb_row .et_pb_column_1_2{width:47.25%}.et_pb_gutters3 .et_pb_column_1_2 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_1_2 .et_pb_module{margin-bottom:5.82%}.et_pb_gutters3 .et_pb_column_2_5,.et_pb_gutters3.et_pb_row .et_pb_column_2_5{width:36.7%}.et_pb_gutters3 .et_pb_column_2_5 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_2_5 .et_pb_module{margin-bottom:7.493%}.et_pb_gutters3 .et_pb_column_1_3,.et_pb_gutters3.et_pb_row .et_pb_column_1_3{width:29.6667%}.et_pb_gutters3 .et_pb_column_1_3 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_1_3 .et_pb_module{margin-bottom:9.27%}.et_pb_gutters3 .et_pb_column_1_4,.et_pb_gutters3.et_pb_row .et_pb_column_1_4{width:20.875%}.et_pb_gutters3 .et_pb_column_1_4 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_1_4 .et_pb_module{margin-bottom:13.174%}.et_pb_gutters3 .et_pb_column_1_5,.et_pb_gutters3.et_pb_row .et_pb_column_1_5{width:15.6%}.et_pb_gutters3 .et_pb_column_1_5 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_1_5 .et_pb_module{margin-bottom:17.628%}.et_pb_gutters3 .et_pb_column_1_6,.et_pb_gutters3.et_pb_row .et_pb_column_1_6{width:12.0833%}.et_pb_gutters3 .et_pb_column_1_6 .et_pb_module,.et_pb_gutters3.et_pb_row .et_pb_column_1_6 .et_pb_module{margin-bottom:22.759%}.et_pb_gutters3 .et_full_width_page.woocommerce-page ul.products li.product{width:20.875%;margin-right:5.5%;margin-bottom:5.5%}.et_pb_gutters3.et_left_sidebar.woocommerce-page #main-content ul.products li.product,.et_pb_gutters3.et_right_sidebar.woocommerce-page #main-content ul.products li.product{width:28.353%;margin-right:7.47%}.et_pb_gutters3.et_left_sidebar.woocommerce-page #main-content ul.products.columns-1 li.product,.et_pb_gutters3.et_right_sidebar.woocommerce-page #main-content ul.products.columns-1 li.product{width:100%;margin-right:0}.et_pb_gutters3.et_left_sidebar.woocommerce-page #main-content ul.products.columns-2 li.product,.et_pb_gutters3.et_right_sidebar.woocommerce-page #main-content ul.products.columns-2 li.product{width:48%;margin-right:4%}.et_pb_gutters3.et_left_sidebar.woocommerce-page #main-content ul.products.columns-2 li:nth-child(2n+2),.et_pb_gutters3.et_right_sidebar.woocommerce-page #main-content ul.products.columns-2 li:nth-child(2n+2){margin-right:0}.et_pb_gutters3.et_left_sidebar.woocommerce-page #main-content ul.products.columns-2 li:nth-child(3n+1),.et_pb_gutters3.et_right_sidebar.woocommerce-page #main-content ul.products.columns-2 li:nth-child(3n+1){clear:none}}
#et-secondary-menu li,#top-menu li{word-wrap:break-word}.nav li ul,.et_mobile_menu{border-color:#2EA3F2}.mobile_menu_bar:before,.mobile_menu_bar:after,#top-menu li.current-menu-ancestor>a,#top-menu li.current-menu-item>a{color:#2EA3F2}#main-header{-webkit-transition:background-color 0.4s, color 0.4s, opacity 0.4s ease-in-out, -webkit-transform 0.4s;transition:background-color 0.4s, color 0.4s, opacity 0.4s ease-in-out, -webkit-transform 0.4s;transition:background-color 0.4s, color 0.4s, transform 0.4s, opacity 0.4s ease-in-out;transition:background-color 0.4s, color 0.4s, transform 0.4s, opacity 0.4s ease-in-out, -webkit-transform 0.4s}#main-header.et-disabled-animations *{-webkit-transition-duration:0s !important;transition-duration:0s !important}.container{text-align:left;position:relative}.et_fixed_nav.et_show_nav #page-container{padding-top:80px}.et_fixed_nav.et_show_nav.et-tb #page-container,.et_fixed_nav.et_show_nav.et-tb-has-header #page-container{padding-top:0 !important}.et_fixed_nav.et_show_nav.et_secondary_nav_enabled #page-container{padding-top:111px}.et_fixed_nav.et_show_nav.et_secondary_nav_enabled.et_header_style_centered #page-container{padding-top:177px}.et_fixed_nav.et_show_nav.et_header_style_centered #page-container{padding-top:147px}.et_fixed_nav #main-header{position:fixed}.et-cloud-item-editor #page-container{padding-top:0 !important}.et_header_style_left #et-top-navigation{padding-top:33px}.et_header_style_left #et-top-navigation nav>ul>li>a{padding-bottom:33px}.et_header_style_left .logo_container{position:absolute;height:100%;width:100%}.et_header_style_left #et-top-navigation .mobile_menu_bar{padding-bottom:24px}.et_hide_search_icon #et_top_search{display:none !important}#logo{width:auto;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out;margin-bottom:0;max-height:54%;display:inline-block;float:none;vertical-align:middle;-webkit-transform:translate3d(0, 0, 0)}.et_pb_svg_logo #logo{height:54%}.logo_container{-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}span.logo_helper{display:inline-block;height:100%;vertical-align:middle;width:0}.safari .centered-inline-logo-wrap{-webkit-transform:translate3d(0, 0, 0);-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}#et-define-logo-wrap img{width:100%}.gecko #et-define-logo-wrap.svg-logo{position:relative !important}#top-menu-nav,#top-menu{line-height:0}#et-top-navigation{font-weight:600}.et_fixed_nav #et-top-navigation{-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.et-cart-info span:before{content:"\e07a";margin-right:10px;position:relative}nav#top-menu-nav,#top-menu,nav.et-menu-nav,.et-menu{float:left}#top-menu li{display:inline-block;font-size:14px;padding-right:22px}#top-menu>li:last-child{padding-right:0}.et_fullwidth_nav.et_non_fixed_nav.et_header_style_left #top-menu>li:last-child>ul.sub-menu{right:0}#top-menu a{color:rgba(0,0,0,0.6);text-decoration:none;display:block;position:relative;-webkit-transition:opacity 0.4s ease-in-out, background-color 0.4s ease-in-out;transition:opacity 0.4s ease-in-out, background-color 0.4s ease-in-out}#top-menu-nav>ul>li>a:hover{opacity:0.7;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}#et_search_icon:before{content:"\55";font-size:17px;left:0;position:absolute;top:-3px}#et_search_icon:hover{cursor:pointer}#et_top_search{float:right;margin:3px 0 0 22px;position:relative;display:block;width:18px}#et_top_search.et_search_opened{position:absolute;width:100%}.et-search-form{top:0;bottom:0;right:0;position:absolute;z-index:1000;width:100%}.et-search-form input{width:90%;border:none;color:#333;position:absolute;top:0;bottom:0;right:30px;margin:auto;background:transparent}.et-search-form .et-search-field::-ms-clear{width:0;height:0;display:none}.et_search_form_container{-webkit-animation:none;animation:none;-o-animation:none}.container.et_search_form_container{position:relative;opacity:0;height:1px}.container.et_search_form_container.et_pb_search_visible{z-index:999;-webkit-animation:fadeInTop 1s 1 cubic-bezier(0.77, 0, 0.175, 1);animation:fadeInTop 1s 1 cubic-bezier(0.77, 0, 0.175, 1)}.et_pb_search_visible.et_pb_no_animation{opacity:1}.et_pb_search_form_hidden{-webkit-animation:fadeOutTop 1s 1 cubic-bezier(0.77, 0, 0.175, 1);animation:fadeOutTop 1s 1 cubic-bezier(0.77, 0, 0.175, 1)}span.et_close_search_field{display:block;width:30px;height:30px;z-index:99999;position:absolute;right:0;cursor:pointer;top:0;bottom:0;margin:auto}span.et_close_search_field:after{font-family:'ETmodules';content:'\4d';speak:none;font-weight:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;font-size:32px;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box}.container.et_menu_container{z-index:99}.container.et_search_form_container.et_pb_search_form_hidden{z-index:1 !important}.et_search_outer{width:100%;overflow:hidden;position:absolute;top:0}.container.et_pb_menu_hidden{z-index:-1}form.et-search-form{background:rgba(0,0,0,0) !important}input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}.et-cart-info{color:inherit}#et-top-navigation .et-cart-info{float:left;margin:-2px 0 0 22px;font-size:16px}#et-top-navigation{float:right}#top-menu li li{padding:0 20px;margin:0}#top-menu li li a{padding:6px 20px;width:200px}.nav li.et-touch-hover>ul{opacity:1;visibility:visible}#top-menu .menu-item-has-children>a:first-child:after,#et-secondary-nav .menu-item-has-children>a:first-child:after{font-family:'ETmodules';content:"3";font-size:16px;position:absolute;right:0;top:0;font-weight:800}#top-menu .menu-item-has-children>a:first-child,#et-secondary-nav .menu-item-has-children>a:first-child{padding-right:20px}#top-menu li .menu-item-has-children>a:first-child{padding-right:40px}#top-menu li .menu-item-has-children>a:first-child:after{right:20px;top:6px}#top-menu li.mega-menu{position:inherit}#top-menu li.mega-menu>ul{padding:30px 20px;position:absolute !important;width:100%;left:0 !important}#top-menu li.mega-menu ul li{margin:0;float:left !important;display:block !important;padding:0 !important}#top-menu li.mega-menu>ul>li:nth-of-type(4n){clear:right}#top-menu li.mega-menu>ul>li:nth-of-type(4n+1){clear:left}#top-menu li.mega-menu ul li li{width:100%}#top-menu li.mega-menu li>ul{-webkit-animation:none !important;animation:none !important;padding:0px;border:none;left:auto;top:auto;width:90% !important;position:relative;-webkit-box-shadow:none;box-shadow:none}#top-menu li.mega-menu li ul{visibility:visible;opacity:1;display:none}#top-menu li.mega-menu.et-hover li ul{display:block}#top-menu li.mega-menu.et-hover>ul{opacity:1 !important;visibility:visible !important}#top-menu li.mega-menu>ul>li>a{width:90%;padding:0 20px 10px}#top-menu li.mega-menu>ul>li>a:first-child{padding-top:0 !important;font-weight:bold;border-bottom:1px solid rgba(0,0,0,0.03)}#top-menu li.mega-menu>ul>li>a:first-child:hover{background-color:transparent !important}#top-menu li.mega-menu li>a{width:100%}#top-menu li.mega-menu.mega-menu-parent li li,#top-menu li.mega-menu.mega-menu-parent li>a{width:100% !important}#top-menu li.mega-menu.mega-menu-parent li>.sub-menu{float:left;width:100% !important}#top-menu li.mega-menu>ul>li{width:25%;margin:0}#top-menu li.mega-menu.mega-menu-parent-3>ul>li{width:33.33%}#top-menu li.mega-menu.mega-menu-parent-2>ul>li{width:50%}#top-menu li.mega-menu.mega-menu-parent-1>ul>li{width:100%}#top-menu li.mega-menu .menu-item-has-children>a:first-child:after{display:none}#top-menu li.mega-menu>ul>li>ul>li{width:100%;margin:0}#et_mobile_nav_menu{float:right;display:none}.mobile_menu_bar{position:relative;display:block;line-height:0}.mobile_menu_bar:before,.et_toggle_slide_menu:after{content:"\61";font-size:32px;left:0;position:relative;top:0;cursor:pointer}.mobile_nav .select_page{display:none}.et_pb_menu_hidden #top-menu,.et_pb_menu_hidden #et_search_icon:before,.et_pb_menu_hidden .et-cart-info{opacity:0;-webkit-animation:fadeOutBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1);animation:fadeOutBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1)}.et_pb_menu_visible #top-menu,.et_pb_menu_visible #et_search_icon:before,.et_pb_menu_visible .et-cart-info{z-index:99;opacity:1;-webkit-animation:fadeInBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1);animation:fadeInBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1)}.et_pb_menu_hidden #top-menu,.et_pb_menu_hidden #et_search_icon:before,.et_pb_menu_hidden .mobile_menu_bar{opacity:0;-webkit-animation:fadeOutBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1);animation:fadeOutBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1)}.et_pb_menu_visible #top-menu,.et_pb_menu_visible #et_search_icon:before,.et_pb_menu_visible .mobile_menu_bar{z-index:99;opacity:1;-webkit-animation:fadeInBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1);animation:fadeInBottom 1s 1 cubic-bezier(0.77, 0, 0.175, 1)}.et_pb_no_animation #top-menu,.et_pb_no_animation #et_search_icon:before,.et_pb_no_animation .mobile_menu_bar,.et_pb_no_animation.et_search_form_container{animation:none !important;-o-animation:none !important;-webkit-animation:none !important;-moz-animation:none !important}body.admin-bar.et_fixed_nav #main-header{top:32px}body.et-wp-pre-3_8.admin-bar.et_fixed_nav #main-header{top:28px}body.et_fixed_nav.et_secondary_nav_enabled #main-header{top:30px}body.admin-bar.et_fixed_nav.et_secondary_nav_enabled #main-header{top:63px}@media all and (min-width: 981px){.et_hide_primary_logo #main-header:not(.et-fixed-header) .logo_container,.et_hide_fixed_logo #main-header.et-fixed-header .logo_container{height:0;opacity:0;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.et_hide_primary_logo #main-header:not(.et-fixed-header) .centered-inline-logo-wrap,.et_hide_fixed_logo #main-header.et-fixed-header .centered-inline-logo-wrap{height:0;opacity:0;padding:0}.et-animated-content#page-container{-webkit-transition:margin-top 0.4s ease-in-out;transition:margin-top 0.4s ease-in-out}.et_hide_nav #page-container{-webkit-transition:none;transition:none}.et_fullwidth_nav .et-search-form,.et_fullwidth_nav .et_close_search_field{right:30px}#main-header.et-fixed-header{-webkit-box-shadow:0 0 7px rgba(0,0,0,0.1) !important;box-shadow:0 0 7px rgba(0,0,0,0.1) !important}.et_header_style_left .et-fixed-header #et-top-navigation{padding-top:20px}.et_header_style_left .et-fixed-header #et-top-navigation nav>ul>li>a{padding-bottom:20px}.et_hide_nav.et_fixed_nav #main-header{opacity:0}.et_hide_nav.et_fixed_nav .et-fixed-header#main-header{-webkit-transform:translateY(0px) !important;transform:translateY(0px) !important;opacity:1}.et_hide_nav .centered-inline-logo-wrap,.et_hide_nav.et_fixed_nav #main-header,.et_hide_nav.et_fixed_nav #main-header,.et_hide_nav .centered-inline-logo-wrap{-webkit-transition-duration:.7s;transition-duration:.7s}.et_hide_nav #page-container{padding-top:0 !important}.et_primary_nav_dropdown_animation_fade #et-top-navigation ul li:hover>ul,.et_secondary_nav_dropdown_animation_fade #et-secondary-nav li:hover>ul{-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.et_primary_nav_dropdown_animation_slide #et-top-navigation ul li:hover>ul,.et_secondary_nav_dropdown_animation_slide #et-secondary-nav li:hover>ul{-webkit-animation:fadeLeft .4s ease-in-out;animation:fadeLeft .4s ease-in-out}.et_primary_nav_dropdown_animation_expand #et-top-navigation ul li:hover>ul,.et_secondary_nav_dropdown_animation_expand #et-secondary-nav li:hover>ul{-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-animation:Grow .4s ease-in-out;animation:Grow .4s ease-in-out;-webkit-backface-visibility:visible !important;backface-visibility:visible !important}.et_primary_nav_dropdown_animation_flip #et-top-navigation ul li ul li:hover>ul,.et_secondary_nav_dropdown_animation_flip #et-secondary-nav ul li:hover>ul{-webkit-animation:flipInX .6s ease-in-out;animation:flipInX .6s ease-in-out;-webkit-backface-visibility:visible !important;backface-visibility:visible !important}.et_primary_nav_dropdown_animation_flip #et-top-navigation ul li:hover>ul,.et_secondary_nav_dropdown_animation_flip #et-secondary-nav li:hover>ul{-webkit-animation:flipInY .6s ease-in-out;animation:flipInY .6s ease-in-out;-webkit-backface-visibility:visible !important;backface-visibility:visible !important}.et_fullwidth_nav #main-header .container{width:100%;max-width:100%;padding-right:32px;padding-left:30px}.et_non_fixed_nav.et_fullwidth_nav.et_header_style_left #main-header .container{padding-left:0}.et_non_fixed_nav.et_fullwidth_nav.et_header_style_left .logo_container{padding-left:30px}}@media all and (max-width: 980px){.et_fixed_nav.et_show_nav.et_secondary_nav_enabled #page-container,.et_fixed_nav.et_show_nav #page-container{padding-top:80px}.et_fixed_nav.et_show_nav.et-tb #page-container,.et_fixed_nav.et_show_nav.et-tb-has-header #page-container{padding-top:0 !important}.et_non_fixed_nav #page-container{padding-top:0}.et_fixed_nav.et_secondary_nav_only_menu.admin-bar #main-header{top:32px !important}.et_hide_mobile_logo #main-header .logo_container{display:none;opacity:0;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}#top-menu{display:none}.et_hide_nav.et_fixed_nav #main-header{-webkit-transform:translateY(0px) !important;transform:translateY(0px) !important;opacity:1}#et-top-navigation{margin-right:0;-webkit-transition:none;transition:none}.et_fixed_nav #main-header{position:absolute}.et_header_style_left .et-fixed-header #et-top-navigation,.et_header_style_left #et-top-navigation{padding-top:24px;display:block}.et_fixed_nav #main-header{-webkit-transition:none;transition:none}.et_fixed_nav_temp #main-header{top:0 !important}#logo,.logo_container,#main-header,.container{-webkit-transition:none;transition:none}.et_header_style_left #logo{max-width:50%}#et_top_search{margin:0 35px 0 0;float:left}#et_search_icon:before{top:7px}.et_header_style_left .et-search-form{width:50% !important;max-width:50% !important}#et_mobile_nav_menu{display:block}#et-top-navigation .et-cart-info{margin-top:5px}}@media screen and (max-width: 782px){body.admin-bar.et_fixed_nav #main-header{top:46px}}@media all and (max-width: 767px){#et-top-navigation{margin-right:0}body.admin-bar.et_fixed_nav #main-header{top:46px}}@media all and (max-width: 479px){#et-top-navigation{margin-right:0}}@media print{#top-header,#main-header{position:relative !important;top:auto !important;right:auto !important;bottom:auto !important;left:auto !important}}
@-webkit-keyframes fadeOutTop{0%{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}to{opacity:0;-webkit-transform:translatey(-60%);transform:translatey(-60%)}}@keyframes fadeOutTop{0%{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}to{opacity:0;-webkit-transform:translatey(-60%);transform:translatey(-60%)}}@-webkit-keyframes fadeInTop{0%{opacity:0;-webkit-transform:translatey(-60%);transform:translatey(-60%)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@keyframes fadeInTop{0%{opacity:0;-webkit-transform:translatey(-60%);transform:translatey(-60%)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-webkit-keyframes fadeInBottom{0%{opacity:0;-webkit-transform:translatey(60%);transform:translatey(60%)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@keyframes fadeInBottom{0%{opacity:0;-webkit-transform:translatey(60%);transform:translatey(60%)}to{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}}@-webkit-keyframes fadeOutBottom{0%{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}to{opacity:0;-webkit-transform:translatey(60%);transform:translatey(60%)}}@keyframes fadeOutBottom{0%{opacity:1;-webkit-transform:translatey(0);transform:translatey(0)}to{opacity:0;-webkit-transform:translatey(60%);transform:translatey(60%)}}@-webkit-keyframes Grow{0%{opacity:0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes Grow{0%{opacity:0;-webkit-transform:scaleY(.5);transform:scaleY(.5)}to{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}/*!
	  * Animate.css - http://daneden.me/animate
	  * Licensed under the MIT license - http://opensource.org/licenses/MIT
	  * Copyright (c) 2015 Daniel Eden
	 */@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{0%{-webkit-transform:perspective(400px) rotateX(90deg);transform:perspective(400px) rotateX(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateX(-20deg);transform:perspective(400px) rotateX(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateX(10deg);transform:perspective(400px) rotateX(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateX(-5deg);transform:perspective(400px) rotateX(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@-webkit-keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{0%{-webkit-transform:perspective(400px) rotateY(90deg);transform:perspective(400px) rotateY(90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotateY(-20deg);transform:perspective(400px) rotateY(-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotateY(10deg);transform:perspective(400px) rotateY(10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotateY(-5deg);transform:perspective(400px) rotateY(-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}
#main-header{line-height:23px;font-weight:500;top:0;background-color:#fff;width:100%;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.1);box-shadow:0 1px 0 rgba(0,0,0,.1);position:relative;z-index:99999}.nav li li{padding:0 20px;margin:0}.et-menu li li a{padding:6px 20px;width:200px}.nav li{position:relative;line-height:1em}.nav li li{position:relative;line-height:2em}.nav li ul{position:absolute;padding:20px 0;z-index:9999;width:240px;background:#fff;visibility:hidden;opacity:0;border-top:3px solid #2ea3f2;box-shadow:0 2px 5px rgba(0,0,0,.1);-moz-box-shadow:0 2px 5px rgba(0,0,0,.1);-webkit-box-shadow:0 2px 5px rgba(0,0,0,.1);-webkit-transform:translateZ(0);text-align:left}.nav li.et-hover>ul{visibility:visible}.nav li.et-touch-hover>ul,.nav li:hover>ul{opacity:1;visibility:visible}.nav li li ul{z-index:1000;top:-23px;left:240px}.nav li.et-reverse-direction-nav li ul{left:auto;right:240px}.nav li:hover{visibility:inherit}.et_mobile_menu li a,.nav li li a{font-size:14px;-webkit-transition:opacity .2s ease-in-out,background-color .2s ease-in-out;transition:opacity .2s ease-in-out,background-color .2s ease-in-out}.et_mobile_menu li a:hover,.nav ul li a:hover{background-color:rgba(0,0,0,.03);opacity:.7}.et-dropdown-removing>ul{display:none}.mega-menu .et-dropdown-removing>ul{display:block}.et-menu .menu-item-has-children>a:first-child:after{font-family:ETmodules;content:"3";font-size:16px;position:absolute;right:0;top:0;font-weight:800}.et-menu .menu-item-has-children>a:first-child{padding-right:20px}.et-menu li li.menu-item-has-children>a:first-child:after{right:20px;top:6px}.et-menu-nav li.mega-menu{position:inherit}.et-menu-nav li.mega-menu>ul{padding:30px 20px;position:absolute!important;width:100%;left:0!important}.et-menu-nav li.mega-menu ul li{margin:0;float:left!important;display:block!important;padding:0!important}.et-menu-nav li.mega-menu li>ul{-webkit-animation:none!important;animation:none!important;padding:0;border:none;left:auto;top:auto;width:240px!important;position:relative;box-shadow:none;-webkit-box-shadow:none}.et-menu-nav li.mega-menu li ul{visibility:visible;opacity:1;display:none}.et-menu-nav li.mega-menu.et-hover li ul,.et-menu-nav li.mega-menu:hover li ul{display:block}.et-menu-nav li.mega-menu:hover>ul{opacity:1!important;visibility:visible!important}.et-menu-nav li.mega-menu>ul>li>a:first-child{padding-top:0!important;font-weight:700;border-bottom:1px solid rgba(0,0,0,.03)}.et-menu-nav li.mega-menu>ul>li>a:first-child:hover{background-color:transparent!important}.et-menu-nav li.mega-menu li>a{width:200px!important}.et-menu-nav li.mega-menu.mega-menu-parent li>a,.et-menu-nav li.mega-menu.mega-menu-parent li li{width:100%!important}.et-menu-nav li.mega-menu.mega-menu-parent li>.sub-menu{float:left;width:100%!important}.et-menu-nav li.mega-menu>ul>li{width:25%;margin:0}.et-menu-nav li.mega-menu.mega-menu-parent-3>ul>li{width:33.33%}.et-menu-nav li.mega-menu.mega-menu-parent-2>ul>li{width:50%}.et-menu-nav li.mega-menu.mega-menu-parent-1>ul>li{width:100%}.et_pb_fullwidth_menu li.mega-menu .menu-item-has-children>a:first-child:after,.et_pb_menu li.mega-menu .menu-item-has-children>a:first-child:after{display:none}.et_fullwidth_nav #top-menu li.mega-menu>ul{width:auto;left:30px!important;right:30px!important}.et_mobile_menu{position:absolute;left:0;padding:5%;background:#fff;width:100%;visibility:visible;opacity:1;display:none;z-index:9999;border-top:3px solid #2ea3f2;box-shadow:0 2px 5px rgba(0,0,0,.1);-moz-box-shadow:0 2px 5px rgba(0,0,0,.1);-webkit-box-shadow:0 2px 5px rgba(0,0,0,.1)}#main-header .et_mobile_menu li ul,.et_pb_fullwidth_menu .et_mobile_menu li ul,.et_pb_menu .et_mobile_menu li ul{visibility:visible!important;display:block!important;padding-left:10px}.et_mobile_menu li li{padding-left:5%}.et_mobile_menu li a{border-bottom:1px solid rgba(0,0,0,.03);color:#666;padding:10px 5%;display:block}.et_mobile_menu .menu-item-has-children>a{font-weight:700;background-color:rgba(0,0,0,.03)}.et_mobile_menu li .menu-item-has-children>a{background-color:transparent}.et_mobile_nav_menu{float:right;display:none}.mobile_menu_bar{position:relative;display:block;line-height:0}.mobile_menu_bar:before{content:"a";font-size:32px;position:relative;left:0;top:0;cursor:pointer}.et_pb_module .mobile_menu_bar:before{top:2px}.mobile_nav .select_page{display:none}
.footer-widget h4,#main-footer .widget_block h1,#main-footer .widget_block h2,#main-footer .widget_block h3,#main-footer .widget_block h4,#main-footer .widget_block h5,#main-footer .widget_block h6{color:#2EA3F2}.footer-widget li:before{border-color:#2EA3F2}.bottom-nav li.current-menu-item>a{color:#2EA3F2}#main-footer{background-color:#222222}#footer-widgets{padding:6% 0 0}.footer-widget{float:left;color:#fff}.last{margin-right:0}.footer-widget .fwidget:last-child{margin-bottom:0 !important}#footer-widgets .footer-widget li{padding-left:14px;position:relative}#footer-widgets .footer-widget li:before{border-radius:3px;border-style:solid;border-width:3px;content:"";left:0;position:absolute;top:9px}#footer-widgets .footer-widget a{color:#fff}#footer-widgets .footer-widget li a{color:#fff;text-decoration:none}#footer-widgets .footer-widget li a:hover{color:rgba(255,255,255,0.7)}.footer-widget .widget_adsensewidget ins{min-width:160px}#footer-bottom{background-color:#1f1f1f;background-color:rgba(0,0,0,0.32);padding:15px 0 5px}#footer-bottom a{-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}#footer-info{text-align:left;color:#666;padding-bottom:10px;float:left}#footer-info a{font-weight:700;color:#666}#footer-info a:hover{opacity:.7}#et-footer-nav{background-color:rgba(255,255,255,0.05)}.bottom-nav{padding:15px 0}.bottom-nav li{font-weight:600;display:inline-block;font-size:14px;padding-right:22px}.bottom-nav a{color:#bbb;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.bottom-nav a:hover{opacity:.7}@media all and (max-width: 980px){.footer-widget:nth-child(n){width:46.25% !important;margin:0 7.5% 7.5% 0 !important}.et_pb_footer_columns1 .footer-widget{width:100% !important;margin:0 7.5% 7.5% 0 !important}#footer-widgets .footer-widget .fwidget{margin-bottom:16.21%}.et_pb_gutters1 .footer-widget:nth-child(n){width:50% !important;margin:0 !important}.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0}#footer-widgets{padding:8% 0}#footer-widgets .footer-widget:nth-child(2n){margin-right:0 !important}#footer-widgets .footer-widget:nth-last-child(-n+2){margin-bottom:0 !important}.bottom-nav{text-align:center}#footer-info{float:none;text-align:center}}@media all and (max-width: 767px){#footer-widgets .footer-widget,.et_pb_gutters1 #footer-widgets .footer-widget{width:100% !important;margin-right:0 !important}#footer-widgets .footer-widget:nth-child(n),#footer-widgets .footer-widget .fwidget{margin-bottom:9.5% !important}.et_pb_gutters1 #footer-widgets .footer-widget:nth-child(n),.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0 !important}#footer-widgets{padding:10% 0}#footer-widgets .footer-widget .fwidget:last-child{margin-bottom:0 !important}#footer-widgets .footer-widget:last-child{margin-bottom:0 !important}}@media all and (max-width: 479px){#footer-widgets .footer-widget:nth-child(n),.footer-widget .fwidget{margin-bottom:11.5% !important}#footer-widgets .footer-widget.last{margin-bottom:0 !important}.et_pb_gutters1 #footer-widgets .footer-widget:nth-child(n),.et_pb_gutters1 #footer-widgets .footer-widget .fwidget{margin-bottom:0 !important}#footer-widgets{padding:12% 0}}
@media all and (min-width: 981px){.et_pb_gutters3 .footer-widget{margin-right:5.5%;margin-bottom:5.5%}.et_pb_gutters3 .footer-widget:last-child{margin-right:0}.et_pb_gutters3.et_pb_footer_columns6 .footer-widget{width:12.083%}.et_pb_gutters3.et_pb_footer_columns6 .footer-widget .fwidget{margin-bottom:45.517%}.et_pb_gutters3.et_pb_footer_columns5 .footer-widget{width:15.6%}.et_pb_gutters3.et_pb_footer_columns5 .footer-widget .fwidget{margin-bottom:35.256%}.et_pb_gutters3.et_pb_footer_columns4 .footer-widget{width:20.875%}.et_pb_gutters3.et_pb_footer_columns4 .footer-widget .fwidget{margin-bottom:26.347%}.et_pb_gutters3.et_pb_footer_columns3 .footer-widget{width:29.667%}.et_pb_gutters3.et_pb_footer_columns3 .footer-widget .fwidget{margin-bottom:18.539%}.et_pb_gutters3.et_pb_footer_columns2 .footer-widget{width:47.25%}.et_pb_gutters3.et_pb_footer_columns2 .footer-widget .fwidget{margin-bottom:11.64%}.et_pb_gutters3.et_pb_footer_columns1 .footer-widget{width:100%}.et_pb_gutters3.et_pb_footer_columns1 .footer-widget .fwidget{margin-bottom:5.5%}.et_pb_gutters3.et_pb_footer_columns_3_4__1_4 .footer-widget:nth-child(1){width:73.625%;clear:both}.et_pb_gutters3.et_pb_footer_columns_3_4__1_4 .footer-widget:nth-child(1) .fwidget{margin-bottom:7.47%}.et_pb_gutters3.et_pb_footer_columns_3_4__1_4 .footer-widget:nth-child(2){width:20.875%}.et_pb_gutters3.et_pb_footer_columns_3_4__1_4 .footer-widget:nth-child(2) .fwidget{margin-bottom:26.347%}.et_pb_gutters3.et_pb_footer_columns_1_4__3_4 .footer-widget:nth-child(1){width:20.875%;clear:both}.et_pb_gutters3.et_pb_footer_columns_1_4__3_4 .footer-widget:nth-child(1) .fwidget{margin-bottom:26.347%}.et_pb_gutters3.et_pb_footer_columns_1_4__3_4 .footer-widget:nth-child(2){width:73.625%}.et_pb_gutters3.et_pb_footer_columns_1_4__3_4 .footer-widget:nth-child(2) .fwidget{margin-bottom:7.47%}.et_pb_gutters3.et_pb_footer_columns_2_3__1_3 .footer-widget:nth-child(1){width:64.833%}.et_pb_gutters3.et_pb_footer_columns_2_3__1_3 .footer-widget:nth-child(1) .fwidget{margin-bottom:8.483%}.et_pb_gutters3.et_pb_footer_columns_2_3__1_3 .footer-widget:nth-child(2){width:29.667%}.et_pb_gutters3.et_pb_footer_columns_2_3__1_3 .footer-widget:nth-child(2) .fwidget{margin-bottom:18.539%}.et_pb_gutters3.et_pb_footer_columns_1_3__2_3 .footer-widget:nth-child(1){width:29.667%}.et_pb_gutters3.et_pb_footer_columns_1_3__2_3 .footer-widget:nth-child(1) .fwidget{margin-bottom:18.539%}.et_pb_gutters3.et_pb_footer_columns_1_3__2_3 .footer-widget:nth-child(2){width:64.833%}.et_pb_gutters3.et_pb_footer_columns_1_3__2_3 .footer-widget:nth-child(2) .fwidget{margin-bottom:8.483%}.et_pb_gutters3.et_pb_footer_columns_1_4__1_2 .footer-widget:nth-child(-n+2){width:20.875%}.et_pb_gutters3.et_pb_footer_columns_1_4__1_2 .footer-widget:nth-child(-n+2) .fwidget{margin-bottom:26.347%}.et_pb_gutters3.et_pb_footer_columns_1_4__1_2 .footer-widget:nth-child(3){width:47.25%}.et_pb_gutters3.et_pb_footer_columns_1_4__1_2 .footer-widget:nth-child(3) .fwidget{margin-bottom:11.64%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_4 .footer-widget:first-child{width:47.25%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_4 .footer-widget:first-child .fwidget{margin-bottom:11.64%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_4 .footer-widget:nth-child(-n+3):not(:nth-child(1)){width:20.875%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_4 .footer-widget:nth-child(-n+3):not(:nth-child(1)) .fwidget{margin-bottom:26.347%}.et_pb_gutters3.et_pb_footer_columns_1_5__3_5 .footer-widget:nth-child(-n+2){width:15.6%}.et_pb_gutters3.et_pb_footer_columns_1_5__3_5 .footer-widget:nth-child(-n+2) .fwidget{margin-bottom:35.256%}.et_pb_gutters3.et_pb_footer_columns_1_5__3_5 .footer-widget:nth-child(3){width:57.8%}.et_pb_gutters3.et_pb_footer_columns_1_5__3_5 .footer-widget:nth-child(3) .fwidget{margin-bottom:9.516%}.et_pb_gutters3.et_pb_footer_columns_3_5__1_5 .footer-widget:first-child{width:57.8%}.et_pb_gutters3.et_pb_footer_columns_3_5__1_5 .footer-widget:first-child .fwidget{margin-bottom:9.516%}.et_pb_gutters3.et_pb_footer_columns_3_5__1_5 .footer-widget:nth-child(-n+3):not(:nth-child(1)){width:15.6%}.et_pb_gutters3.et_pb_footer_columns_3_5__1_5 .footer-widget:nth-child(-n+3):not(:nth-child(1)) .fwidget{margin-bottom:35.256%}.et_pb_gutters3.et_pb_footer_columns_3_5__2_5 .footer-widget:nth-child(1){width:57.8%}.et_pb_gutters3.et_pb_footer_columns_3_5__2_5 .footer-widget:nth-child(1) .fwidget{margin-bottom:9.516%}.et_pb_gutters3.et_pb_footer_columns_3_5__2_5 .footer-widget:nth-child(2){width:36.7%}.et_pb_gutters3.et_pb_footer_columns_3_5__2_5 .footer-widget:nth-child(2) .fwidget{margin-bottom:14.986%}.et_pb_gutters3.et_pb_footer_columns_2_5__3_5 .footer-widget:nth-child(1){width:36.7%}.et_pb_gutters3.et_pb_footer_columns_2_5__3_5 .footer-widget:nth-child(1) .fwidget{margin-bottom:14.986%}.et_pb_gutters3.et_pb_footer_columns_2_5__3_5 .footer-widget:nth-child(2){width:57.8%}.et_pb_gutters3.et_pb_footer_columns_2_5__3_5 .footer-widget:nth-child(2) .fwidget{margin-bottom:9.516%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_6 .footer-widget:first-child{width:47.25%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_6 .footer-widget:first-child .fwidget{margin-bottom:11.64%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_6 .footer-widget:nth-child(-n+4):not(:nth-child(1)){width:12.083%}.et_pb_gutters3.et_pb_footer_columns_1_2__1_6 .footer-widget:nth-child(-n+4):not(:nth-child(1)) .fwidget{margin-bottom:45.517%}.et_pb_gutters3.et_pb_footer_columns_1_6__1_2 .footer-widget:nth-child(-n+3){width:12.083%}.et_pb_gutters3.et_pb_footer_columns_1_6__1_2 .footer-widget:nth-child(-n+3) .fwidget{margin-bottom:45.517%}.et_pb_gutters3.et_pb_footer_columns_1_6__1_2 .footer-widget:nth-child(4){width:47.25%}.et_pb_gutters3.et_pb_footer_columns_1_6__1_2 .footer-widget:nth-child(4) .fwidget{margin-bottom:11.64%}.et_pb_gutters3.et_pb_footer_columns_1_4_1_2_1_4 .footer-widget:nth-child(-n+3):not(:nth-child(2)){width:20.875%}.et_pb_gutters3.et_pb_footer_columns_1_4_1_2_1_4 .footer-widget:nth-child(-n+3):not(:nth-child(2)) .fwidget{margin-bottom:26.347%}.et_pb_gutters3.et_pb_footer_columns_1_4_1_2_1_4 .footer-widget:nth-child(2){width:47.25%}.et_pb_gutters3.et_pb_footer_columns_1_4_1_2_1_4 .footer-widget:nth-child(2) .fwidget{margin-bottom:11.64%}.et_pb_gutters3.et_pb_footer_columns_1_5_3_5_1_5 .footer-widget:nth-child(-n+3):not(:nth-child(2)){width:15.6%}.et_pb_gutters3.et_pb_footer_columns_1_5_3_5_1_5 .footer-widget:nth-child(-n+3):not(:nth-child(2)) .fwidget{margin-bottom:35.256%}.et_pb_gutters3.et_pb_footer_columns_1_5_3_5_1_5 .footer-widget:nth-child(2){width:57.8%}.et_pb_gutters3.et_pb_footer_columns_1_5_3_5_1_5 .footer-widget:nth-child(2) .fwidget{margin-bottom:9.516%}}
.et-social-icons{float:right}.et-social-icons li{display:inline-block;margin-left:20px}.et-social-icon a{display:inline-block;font-size:24px;position:relative;text-align:center;-webkit-transition:color 300ms ease 0s;transition:color 300ms ease 0s;color:#666;text-decoration:none}.et-social-icons a:hover{opacity:0.7;-webkit-transition:all 0.4s ease-in-out;transition:all 0.4s ease-in-out}.et-social-icon span{display:none}.et_duplicate_social_icons{display:none}@media all and (max-width: 980px){.et-social-icons{float:none;text-align:center}}@media all and (max-width: 980px){.et-social-icons{margin:0 0 5px}}
.widget_search .screen-reader-text,.et_pb_widget .wp-block-search__label{display:none}.widget_search input#s,.widget_search input#searchsubmit,.et_pb_widget .wp-block-search__input,.et_pb_widget .wp-block-search__button{padding:.7em;height:40px !important;margin:0;font-size:14px;line-height:normal !important;border:1px solid #ddd;color:#666}.widget_search #s,.et_pb_widget .wp-block-search__input{width:100%;border-radius:3px}.widget_search #searchform,.et_pb_widget .wp-block-search{position:relative}.widget_search #searchsubmit,.et_pb_widget .wp-block-search__button{background-color:#ddd;-webkit-border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;position:absolute;right:0;top:0}#searchsubmit,.et_pb_widget .wp-block-search__button{cursor:pointer}
.et_pb_section{position:relative;background-color:#fff;background-position:50%;background-size:100%;background-size:cover}.et_pb_section--absolute,.et_pb_section--fixed{width:100%}.et_pb_section.et_section_transparent{background-color:transparent}.et_pb_fullwidth_section{padding:0}.et_pb_fullwidth_section>.et_pb_module:not(.et_pb_post_content):not(.et_pb_fullwidth_post_content) .et_pb_row{padding:0!important}.et_pb_inner_shadow{-webkit-box-shadow:inset 0 0 7px rgba(0,0,0,.07);box-shadow:inset 0 0 7px rgba(0,0,0,.07)}.et_pb_bottom_inside_divider,.et_pb_top_inside_divider{display:block;background-repeat-y:no-repeat;height:100%;position:absolute;pointer-events:none;width:100%;left:0;right:0}.et_pb_bottom_inside_divider.et-no-transition,.et_pb_top_inside_divider.et-no-transition{-webkit-transition:none!important;transition:none!important}.et-fb .section_has_divider.et_fb_element_controls_visible--child>.et_pb_bottom_inside_divider,.et-fb .section_has_divider.et_fb_element_controls_visible--child>.et_pb_top_inside_divider{z-index:1}.et_pb_section_video:not(.et_pb_section--with-menu){overflow:hidden;position:relative}.et_pb_column>.et_pb_section_video_bg{z-index:-1}.et_pb_section_video_bg{visibility:visible;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;display:block;pointer-events:none;-webkit-transition:display .3s;transition:display .3s}.et_pb_section_video_bg.et_pb_section_video_bg_hover,.et_pb_section_video_bg.et_pb_section_video_bg_phone,.et_pb_section_video_bg.et_pb_section_video_bg_tablet,.et_pb_section_video_bg.et_pb_section_video_bg_tablet_only{display:none}.et_pb_section_video_bg .mejs-controls,.et_pb_section_video_bg .mejs-overlay-play{display:none!important}.et_pb_section_video_bg embed,.et_pb_section_video_bg iframe,.et_pb_section_video_bg object,.et_pb_section_video_bg video{max-width:none}.et_pb_section_video_bg .mejs-video{left:50%;position:absolute;max-width:none}.et_pb_section_video_bg .mejs-overlay-loading{display:none!important}.et_pb_social_network_link .et_pb_section_video{overflow:visible}.et_pb_section_video_on_hover:hover>.et_pb_section_video_bg{display:none}.et_pb_section_video_on_hover:hover>.et_pb_section_video_bg_hover,.et_pb_section_video_on_hover:hover>.et_pb_section_video_bg_hover_inherit{display:block}@media (min-width:981px){.et_pb_section{padding:4% 0}body.et_pb_pagebuilder_layout.et_pb_show_title .post-password-required .et_pb_section,body:not(.et_pb_pagebuilder_layout) .post-password-required .et_pb_section{padding-top:0}.et_pb_fullwidth_section{padding:0}.et_pb_section_video_bg.et_pb_section_video_bg_desktop_only{display:block}}@media (max-width:980px){.et_pb_section{padding:50px 0}body.et_pb_pagebuilder_layout.et_pb_show_title .post-password-required .et_pb_section,body:not(.et_pb_pagebuilder_layout) .post-password-required .et_pb_section{padding-top:0}.et_pb_fullwidth_section{padding:0}.et_pb_section_video_bg.et_pb_section_video_bg_tablet{display:block}.et_pb_section_video_bg.et_pb_section_video_bg_desktop_only{display:none}}@media (min-width:768px){.et_pb_section_video_bg.et_pb_section_video_bg_desktop_tablet{display:block}}@media (min-width:768px) and (max-width:980px){.et_pb_section_video_bg.et_pb_section_video_bg_tablet_only{display:block}}@media (max-width:767px){.et_pb_section_video_bg.et_pb_section_video_bg_phone{display:block}.et_pb_section_video_bg.et_pb_section_video_bg_desktop_tablet{display:none}}
.et_pb_row{width:80%;max-width:1080px;margin:auto;position:relative}body.safari .section_has_divider,body.uiwebview .section_has_divider{-webkit-perspective:2000px;perspective:2000px}.section_has_divider .et_pb_row{z-index:5}.et_pb_row_inner{width:100%;position:relative}.et_pb_row.et_pb_row_empty,.et_pb_row_inner:nth-of-type(n+2).et_pb_row_empty{display:none}.et_pb_row:after,.et_pb_row_inner:after{content:"";display:block;clear:both;visibility:hidden;line-height:0;height:0;width:0}.et_pb_row_4col .et-last-child,.et_pb_row_4col .et-last-child-2,.et_pb_row_6col .et-last-child,.et_pb_row_6col .et-last-child-2,.et_pb_row_6col .et-last-child-3{margin-bottom:0}.et_pb_column{float:left;background-size:cover;background-position:50%;position:relative;z-index:2;min-height:1px}.et_pb_column--with-menu{z-index:3}.et_pb_column.et_pb_column_empty{min-height:1px}.et_pb_row .et_pb_column.et-last-child,.et_pb_row .et_pb_column:last-child,.et_pb_row_inner .et_pb_column.et-last-child,.et_pb_row_inner .et_pb_column:last-child{margin-right:0!important}.et_pb_column.et_pb_section_parallax{position:relative}.et_pb_column,.et_pb_row,.et_pb_row_inner{background-size:cover;background-position:50%;background-repeat:no-repeat}@media (min-width:981px){.et_pb_row{padding:2% 0}body.et_pb_pagebuilder_layout.et_pb_show_title .post-password-required .et_pb_row,body:not(.et_pb_pagebuilder_layout) .post-password-required .et_pb_row{padding:0;width:100%}.et_pb_column_3_4 .et_pb_row_inner{padding:3.735% 0}.et_pb_column_2_3 .et_pb_row_inner{padding:4.2415% 0}.et_pb_column_1_2 .et_pb_row_inner,.et_pb_column_3_5 .et_pb_row_inner{padding:5.82% 0}.et_section_specialty>.et_pb_row{padding:0}.et_pb_row_inner{width:100%}.et_pb_column_single{padding:2.855% 0}.et_pb_column_single .et_pb_module.et-first-child,.et_pb_column_single .et_pb_module:first-child{margin-top:0}.et_pb_column_single .et_pb_module.et-last-child,.et_pb_column_single .et_pb_module:last-child{margin-bottom:0}.et_pb_row .et_pb_column.et-last-child,.et_pb_row .et_pb_column:last-child,.et_pb_row_inner .et_pb_column.et-last-child,.et_pb_row_inner .et_pb_column:last-child{margin-right:0!important}.et_pb_row.et_pb_equal_columns,.et_pb_row_inner.et_pb_equal_columns,.et_pb_section.et_pb_equal_columns>.et_pb_row{display:-webkit-box;display:-ms-flexbox;display:flex}.rtl .et_pb_row.et_pb_equal_columns,.rtl .et_pb_row_inner.et_pb_equal_columns,.rtl .et_pb_section.et_pb_equal_columns>.et_pb_row{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.et_pb_row.et_pb_equal_columns>.et_pb_column,.et_pb_section.et_pb_equal_columns>.et_pb_row>.et_pb_column{-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}}@media (max-width:980px){.et_pb_row{max-width:1080px}body.et_pb_pagebuilder_layout.et_pb_show_title .post-password-required .et_pb_row,body:not(.et_pb_pagebuilder_layout) .post-password-required .et_pb_row{padding:0;width:100%}.et_pb_column .et_pb_row_inner,.et_pb_row{padding:30px 0}.et_section_specialty>.et_pb_row{padding:0}.et_pb_column{width:100%;margin-bottom:30px}.et_pb_bottom_divider .et_pb_row:nth-last-child(2) .et_pb_column:last-child,.et_pb_row .et_pb_column.et-last-child,.et_pb_row .et_pb_column:last-child{margin-bottom:0}.et_section_specialty .et_pb_row>.et_pb_column{padding-bottom:0}.et_pb_column.et_pb_column_empty{display:none}.et_pb_row_1-2_1-4_1-4,.et_pb_row_1-2_1-6_1-6_1-6,.et_pb_row_1-4_1-4,.et_pb_row_1-4_1-4_1-2,.et_pb_row_1-5_1-5_3-5,.et_pb_row_1-6_1-6_1-6,.et_pb_row_1-6_1-6_1-6_1-2,.et_pb_row_1-6_1-6_1-6_1-6,.et_pb_row_3-5_1-5_1-5,.et_pb_row_4col,.et_pb_row_5col,.et_pb_row_6col{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.et_pb_row_1-4_1-4>.et_pb_column.et_pb_column_1_4,.et_pb_row_1-4_1-4_1-2>.et_pb_column.et_pb_column_1_4,.et_pb_row_4col>.et_pb_column.et_pb_column_1_4{width:47.25%;margin-right:5.5%}.et_pb_row_1-4_1-4>.et_pb_column.et_pb_column_1_4:nth-child(2n),.et_pb_row_1-4_1-4_1-2>.et_pb_column.et_pb_column_1_4:nth-child(2n),.et_pb_row_4col>.et_pb_column.et_pb_column_1_4:nth-child(2n){margin-right:0}.et_pb_row_1-2_1-4_1-4>.et_pb_column.et_pb_column_1_4{width:47.25%;margin-right:5.5%}.et_pb_row_1-2_1-4_1-4>.et_pb_column.et_pb_column_1_2,.et_pb_row_1-2_1-4_1-4>.et_pb_column.et_pb_column_1_4:nth-child(odd){margin-right:0}.et_pb_row_1-2_1-4_1-4 .et_pb_column:nth-last-child(-n+2),.et_pb_row_1-4_1-4 .et_pb_column:nth-last-child(-n+2),.et_pb_row_4col .et_pb_column:nth-last-child(-n+2){margin-bottom:0}.et_pb_row_1-5_1-5_3-5>.et_pb_column.et_pb_column_1_5,.et_pb_row_5col>.et_pb_column.et_pb_column_1_5{width:47.25%;margin-right:5.5%}.et_pb_row_1-5_1-5_3-5>.et_pb_column.et_pb_column_1_5:nth-child(2n),.et_pb_row_5col>.et_pb_column.et_pb_column_1_5:nth-child(2n){margin-right:0}.et_pb_row_3-5_1-5_1-5>.et_pb_column.et_pb_column_1_5{width:47.25%;margin-right:5.5%}.et_pb_row_3-5_1-5_1-5>.et_pb_column.et_pb_column_1_5:nth-child(odd),.et_pb_row_3-5_1-5_1-5>.et_pb_column.et_pb_column_3_5{margin-right:0}.et_pb_row_3-5_1-5_1-5 .et_pb_column:nth-last-child(-n+2),.et_pb_row_5col .et_pb_column:last-child{margin-bottom:0}.et_pb_row_1-6_1-6_1-6_1-2>.et_pb_column.et_pb_column_1_6,.et_pb_row_6col>.et_pb_column.et_pb_column_1_6{width:29.666%;margin-right:5.5%}.et_pb_row_1-6_1-6_1-6_1-2>.et_pb_column.et_pb_column_1_6:nth-child(3n),.et_pb_row_6col>.et_pb_column.et_pb_column_1_6:nth-child(3n){margin-right:0}.et_pb_row_1-2_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6{width:29.666%;margin-right:5.5%}.et_pb_row_1-2_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_2,.et_pb_row_1-2_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6:last-child{margin-right:0}.et_pb_row_1-2_1-2 .et_pb_column.et_pb_column_1_2,.et_pb_row_1-2_1-6_1-6_1-6 .et_pb_column:nth-last-child(-n+3),.et_pb_row_6col .et_pb_column:nth-last-child(-n+3){margin-bottom:0}.et_pb_row_1-2_1-2 .et_pb_column.et_pb_column_1_2 .et_pb_column.et_pb_column_1_6{width:29.666%;margin-right:5.5%;margin-bottom:0}.et_pb_row_1-2_1-2 .et_pb_column.et_pb_column_1_2 .et_pb_column.et_pb_column_1_6:last-child{margin-right:0}.et_pb_row_1-6_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6{width:47.25%;margin-right:5.5%}.et_pb_row_1-6_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6:nth-child(2n){margin-right:0}.et_pb_row_1-6_1-6_1-6_1-6:nth-last-child(-n+3){margin-bottom:0}}@media (max-width:479px){.et_pb_row .et_pb_column.et_pb_column_1_4,.et_pb_row .et_pb_column.et_pb_column_1_5,.et_pb_row .et_pb_column.et_pb_column_1_6{width:100%;margin:0 0 30px}.et_pb_row .et_pb_column.et_pb_column_1_4.et-last-child,.et_pb_row .et_pb_column.et_pb_column_1_4:last-child,.et_pb_row .et_pb_column.et_pb_column_1_5.et-last-child,.et_pb_row .et_pb_column.et_pb_column_1_5:last-child,.et_pb_row .et_pb_column.et_pb_column_1_6.et-last-child,.et_pb_row .et_pb_column.et_pb_column_1_6:last-child{margin-bottom:0}.et_pb_row_1-2_1-2 .et_pb_column.et_pb_column_1_2 .et_pb_column.et_pb_column_1_6{width:100%;margin:0 0 30px}.et_pb_row_1-2_1-2 .et_pb_column.et_pb_column_1_2 .et_pb_column.et_pb_column_1_6.et-last-child,.et_pb_row_1-2_1-2 .et_pb_column.et_pb_column_1_2 .et_pb_column.et_pb_column_1_6:last-child{margin-bottom:0}.et_pb_column{width:100%!important}}
.et_pb_heading_container{position:relative}
.et_pb_code_inner{position:relative}
/*# sourceURL=divi-dynamic-critical-inline-css */
</style>
<link rel='stylesheet' id='divi-style-css' href='http://haggai-bf.org/wp-content/themes/Divi-child/style.css?ver=4.27.6' media='all' />
<link rel="https://api.w.org/" href="https://haggai-bf.org/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://haggai-bf.org/wp-json/wp/v2/pages/181" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://haggai-bf.org/xmlrpc.php?rsd" />
<meta name="generator" content="WordPress 7.0" />
<link rel="canonical" href="https://haggai-bf.org/fixationhaggai2512/" />
<link rel='shortlink' href='https://haggai-bf.org/?p=181' />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /><link rel="icon" href="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF-150x150.png" sizes="32x32" />
<link rel="icon" href="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" sizes="192x192" />
<link rel="apple-touch-icon" href="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" />
<meta name="msapplication-TileImage" content="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" />
<style id="et-critical-inline-css">body,.et_pb_column_1_2 .et_quote_content blockquote cite,.et_pb_column_1_2 .et_link_content a.et_link_main_url,.et_pb_column_1_3 .et_quote_content blockquote cite,.et_pb_column_3_8 .et_quote_content blockquote cite,.et_pb_column_1_4 .et_quote_content blockquote cite,.et_pb_blog_grid .et_quote_content blockquote cite,.et_pb_column_1_3 .et_link_content a.et_link_main_url,.et_pb_column_3_8 .et_link_content a.et_link_main_url,.et_pb_column_1_4 .et_link_content a.et_link_main_url,.et_pb_blog_grid .et_link_content a.et_link_main_url,body .et_pb_bg_layout_light .et_pb_post p,body .et_pb_bg_layout_dark .et_pb_post p{font-size:14px}.et_pb_slide_content,.et_pb_best_value{font-size:15px}@media only screen and (min-width:1350px){.et_pb_row{padding:27px 0}.et_pb_section{padding:54px 0}.single.et_pb_pagebuilder_layout.et_full_width_page .et_post_meta_wrapper{padding-top:81px}.et_pb_fullwidth_section{padding:0}}tr#user-9,tr#user_9{display:none!important}</style>
</head>
<body class="wp-singular page-template-default page page-id-181 wp-custom-logo wp-theme-Divi wp-child-theme-Divi-child et_pb_button_helper_class et_fixed_nav et_show_nav et_primary_nav_dropdown_animation_fade et_secondary_nav_dropdown_animation_fade et_header_style_left et_pb_footer_columns4 et_cover_background et_pb_gutter et_pb_gutters3 et_pb_pagebuilder_layout et_no_sidebar et_divi_theme et-db">
	<div id="page-container">

	
	
			<header id="main-header" data-height-onload="66">
			<div class="container clearfix et_menu_container">
							<div class="logo_container">
					<span class="logo_helper"></span>
					<a href="https://haggai-bf.org/">
						<img src="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" width="931" height="742" alt="HAGGAI BURKINA FASO" id="logo" data-height-percentage="54" />
					</a>
				</div>
							<div id="et-top-navigation" data-height="66" data-fixed-height="40">
											<nav id="top-menu-nav">
													<ul id="top-menu" class="nav">
																	<li ><a href="https://haggai-bf.org/">Accueil</a></li>
								
								<li class="page_item page-item-844"><a href="https://haggai-bf.org/bitcoin-jatszani-fiokellenorzes-utmutato/">Bitcoin játszani – fiókellenőrzés útmutató</a></li>
<li class="page_item page-item-840"><a href="https://haggai-bf.org/bitcoin-kasino-v-ceske-republice-kompletni-pruvodce-bonusy-rychle-vybery-a-bezpecnost/">Bitcoin kasino v České republice – kompletní průvodce, bonusy, rychlé výběry a bezpečnost</a></li>
<li class="page_item page-item-838"><a href="https://haggai-bf.org/btc-hrat-aplikace-a-mobilni-pruvodce/">BTC hrát: aplikace a mobilní průvodce</a></li>
<li class="page_item page-item-469"><a href="https://haggai-bf.org/canli-casino-siteleri-2026-en-iyi-ve-guvenilir-casino-listesi/">Canlı Casino Siteleri 2026 &#8211; En İyi ve Güvenilir Casino Listesi</a></li>
<li class="page_item page-item-832"><a href="https://haggai-bf.org/casino-bitcoin-guia-paso-a-paso-para-registrarte-e-iniciar-sesion/">Casino Bitcoin: guía paso a paso para registrarte e iniciar sesión</a></li>
<li class="page_item page-item-847"><a href="https://haggai-bf.org/crypto-casino-europe-review-bonuses-payments-mobile-guide-for-dutch-players/">Crypto Casino Europe Review – Bonuses, Payments &#038; Mobile Guide for Dutch Players</a></li>
<li class="page_item page-item-239"><a href="https://haggai-bf.org/magyar-casino-online-fiokellenorzes-lepesei-praktikus-utmutato/">Magyar casino online fiókellenőrzés lépései – Praktikus útmutató</a></li>
<li class="page_item page-item-41"><a href="https://haggai-bf.org/nous-contacter/">Nous contacter</a></li>
<li class="page_item page-item-828"><a href="https://haggai-bf.org/pin-up-az-rbaycanin-n-yaxsi-kazinosu-r-smi-sayt/">Pin Up &#8211; Azərbaycanın ən yaxşı kazinosu | Rəsmi sayt</a></li>
<li class="page_item page-item-826"><a href="https://haggai-bf.org/pin-up-casino-az-rbaycanda-onlayn-kazino-pin-up/">Pin Up Casino &#8211; Azərbaycanda onlayn kazino Pin-Up</a></li>
<li class="page_item page-item-821"><a href="https://haggai-bf.org/pin-up-casino-onlayn-az-rbaycan/">Pin Up Casino Onlayn Azərbaycan</a></li>
									<li class="cat-item cat-item-11"><a href="https://haggai-bf.org/category/public/">public</a>
</li>
							</ul>
												</nav>
					
					
					
											<div id="et_top_search">
							<span id="et_search_icon"></span>
						</div>
					
					<div id="et_mobile_nav_menu">
				<div class="mobile_nav closed">
					<span class="select_page">Sélectionner une page</span>
					<span class="mobile_menu_bar mobile_menu_bar_toggle"></span>
				</div>
			</div>				</div> <!-- #et-top-navigation -->
			</div> <!-- .container -->
						<div class="et_search_outer">
				<div class="container et_search_form_container">
					<form role="search" method="get" class="et-search-form" action="https://haggai-bf.org/">
					<input type="search" class="et-search-field" placeholder="Rechercher &hellip;" value="" name="s" title="Rechercher:" />					</form>
					<span class="et_close_search_field"></span>
				</div>
			</div>
					</header> <!-- #main-header -->
			<div id="et-main-area">
	
<div id="main-content">


			
				<article id="post-181" class="post-181 page type-page status-publish hentry">

				
					<div class="entry-content">
					<div class="et-l et-l--post">
			<div class="et_builder_inner_content et_pb_gutters3"><div class="et_pb_section et_pb_section_0 et_section_regular" >
				
				
				
				
				
				
				<div class="et_pb_row et_pb_row_0">
				<div class="et_pb_column et_pb_column_4_4 et_pb_column_0  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				
				
				<div class="et_pb_module et_pb_heading et_pb_heading_0 et_pb_bg_layout_">
				
				
				
				
				<div class="et_pb_heading_container"><h1 class="et_pb_module_heading">FORMULAIRE ENGAGEMENT POUR HAGGAI BURKINA FASO</h1></div>
			</div>
			</div>
				
				
				
				
			</div><div class="et_pb_row et_pb_row_1">
				<div class="et_pb_column et_pb_column_4_4 et_pb_column_1  et_pb_css_mix_blend_mode_passthrough et-last-child">
				
				
				
				
				<div class="et_pb_module et_pb_code et_pb_code_0">
				
				
				
				
				<div class="et_pb_code_inner">[fluentform id="16"]</div>
			</div>
			</div>
				
				
				
				
			</div>
				
				
			</div>		</div>
	</div>
						</div>

				
				</article>

			

</div>


			<footer id="main-footer">
				

		
				<div id="footer-bottom">
					<div class="container clearfix">
				<ul class="et-social-icons">

	<li class="et-social-icon et-social-facebook">
		<a href="#" class="icon">
			<span>Facebook</span>
		</a>
	</li>
	<li class="et-social-icon et-social-twitter">
		<a href="#" class="icon">
			<span>X</span>
		</a>
	</li>
	<li class="et-social-icon et-social-instagram">
		<a href="#" class="icon">
			<span>Instagram</span>
		</a>
	</li>
	<li class="et-social-icon et-social-rss">
		<a href="https://haggai-bf.org/feed/" class="icon">
			<span>RSS</span>
		</a>
	</li>

</ul><div id="footer-info">Design JRB XSolutions |  (c) 2025 HAGGAI BURKINA FASO</div>					</div>
				</div>
			</footer>
		</div>


	</div>

	<script type="speculationrules">
{"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/wp-content/uploads/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/Divi-child/*","/wp-content/themes/Divi/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]}
</script>
<script id="jquery-core-js" src="http://haggai-bf.org/wp-includes/js/jquery/jquery.min.js?ver=3.7.1"></script>
<script id="jquery-migrate-js" src="http://haggai-bf.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1"></script>
<script id="jquery-js-after">
jqueryParams.length&&$.each(jqueryParams,function(e,r){if("function"==typeof r){var n=String(r);n.replace("$","jQuery");var a=new Function("return "+n)();$(document).ready(a)}});
//# sourceURL=jquery-js-after
</script>
<script id="divi-custom-script-js-extra">
var DIVI = {"item_count":"%d Item","items_count":"%d Items"};
var et_builder_utils_params = {"condition":{"diviTheme":true,"extraTheme":false},"scrollLocations":["app","top"],"builderScrollLocations":{"desktop":"app","tablet":"app","phone":"app"},"onloadScrollLocation":"app","builderType":"fe"};
var et_frontend_scripts = {"builderCssContainerPrefix":"#et-boc","builderCssLayoutPrefix":"#et-boc .et-l"};
var et_pb_custom = {"ajaxurl":"http://haggai-bf.org/wp-admin/admin-ajax.php","images_uri":"http://haggai-bf.org/wp-content/themes/Divi/images","builder_images_uri":"http://haggai-bf.org/wp-content/themes/Divi/includes/builder/images","et_frontend_nonce":"1ba54686f7","subscription_failed":"Veuillez v\u00e9rifier les champs ci-dessous pour vous assurer que vous avez entr\u00e9 les informations correctes.","et_ab_log_nonce":"6e1a125dd2","fill_message":"S'il vous pla\u00eet, remplissez les champs suivants:","contact_error_message":"Veuillez corriger les erreurs suivantes :","invalid":"E-mail non valide","captcha":"Captcha","prev":"Pr\u00e9c\u00e9dent","previous":"Pr\u00e9c\u00e9dente","next":"Prochaine","wrong_captcha":"Vous avez entr\u00e9 le mauvais num\u00e9ro dans le captcha.","wrong_checkbox":"Case \u00e0 cocher","ignore_waypoints":"no","is_divi_theme_used":"1","widget_search_selector":".widget_search","ab_tests":[],"is_ab_testing_active":"","page_id":"181","unique_test_id":"","ab_bounce_rate":"5","is_cache_plugin_active":"yes","is_shortcode_tracking":"","tinymce_uri":"http://haggai-bf.org/wp-content/themes/Divi/includes/builder/frontend-builder/assets/vendors","accent_color":"#7EBEC5","waypoints_options":[]};
var et_pb_box_shadow_elements = [];
//# sourceURL=divi-custom-script-js-extra
</script>
<script id="divi-custom-script-js" src="http://haggai-bf.org/wp-content/themes/Divi/js/scripts.min.js?ver=4.27.6"></script>
<script id="fitvids-js" src="http://haggai-bf.org/wp-content/themes/Divi/includes/builder/feature/dynamic-assets/assets/js/jquery.fitvids.js?ver=4.27.6"></script>
<script id="et-core-common-js" src="http://haggai-bf.org/wp-content/themes/Divi/core/admin/js/common.js?ver=4.27.6"></script>
</body>
</html>
