<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-BqrlpaYI.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 eu={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 sh;function bb(){if(sh)return An;sh=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 ah;function jb(){return ah||(ah=1,eu.exports=bb()),eu.exports}var t=jb(),tu={exports:{}},we={};/**
 * @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 lh;function vb(){if(lh)return we;lh=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 R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,E={};function S(D,F,K){this.props=D,this.context=F,this.refs=E,this.updater=K||R}S.prototype.isReactComponent={},S.prototype.setState=function(D,F){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,F,&quot;setState&quot;)},S.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,&quot;forceUpdate&quot;)};function $(){}$.prototype=S.prototype;function z(D,F,K){this.props=D,this.context=F,this.refs=E,this.updater=K||R}var X=z.prototype=new $;X.constructor=z,A(X,S.prototype),X.isPureReactComponent=!0;var Q=Array.isArray;function G(){}var I={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function k(D,F,K){var te=K.ref;return{$$typeof:l,type:D,key:F,ref:te!==void 0?te:null,props:K}}function w(D,F){return k(D.type,F,D.props)}function ee(D){return typeof D==&quot;object&quot;&amp;&amp;D!==null&amp;&amp;D.$$typeof===l}function ae(D){var F={&quot;=&quot;:&quot;=0&quot;,&quot;:&quot;:&quot;=2&quot;};return&quot;$&quot;+D.replace(/[=:]/g,function(K){return F[K]})}var Y=/\/+/g;function q(D,F){return typeof D==&quot;object&quot;&amp;&amp;D!==null&amp;&amp;D.key!=null?ae(&quot;&quot;+D.key):F.toString(36)}function U(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(F){D.status===&quot;pending&quot;&amp;&amp;(D.status=&quot;fulfilled&quot;,D.value=F)},function(F){D.status===&quot;pending&quot;&amp;&amp;(D.status=&quot;rejected&quot;,D.reason=F)})),D.status){case&quot;fulfilled&quot;:return D.value;case&quot;rejected&quot;:throw D.reason}}throw D}function _(D,F,K,te,H){var ue=typeof D;(ue===&quot;undefined&quot;||ue===&quot;boolean&quot;)&amp;&amp;(D=null);var fe=!1;if(D===null)fe=!0;else switch(ue){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),F,K,te,H)}}if(fe)return H=H(D),fe=te===&quot;&quot;?&quot;.&quot;+q(D,0):te,Q(H)?(K=&quot;&quot;,fe!=null&amp;&amp;(K=fe.replace(Y,&quot;$&amp;/&quot;)+&quot;/&quot;),_(H,F,K,&quot;&quot;,function(ft){return ft})):H!=null&amp;&amp;(ee(H)&amp;&amp;(H=w(H,K+(H.key==null||D&amp;&amp;D.key===H.key?&quot;&quot;:(&quot;&quot;+H.key).replace(Y,&quot;$&amp;/&quot;)+&quot;/&quot;)+fe)),F.push(H)),1;fe=0;var Ce=te===&quot;&quot;?&quot;.&quot;:te+&quot;:&quot;;if(Q(D))for(var Me=0;Me&lt;D.length;Me++)te=D[Me],ue=Ce+q(te,Me),fe+=_(te,F,K,ue,H);else if(Me=C(D),typeof Me==&quot;function&quot;)for(D=Me.call(D),Me=0;!(te=D.next()).done;)te=te.value,ue=Ce+q(te,Me++),fe+=_(te,F,K,ue,H);else if(ue===&quot;object&quot;){if(typeof D.then==&quot;function&quot;)return _(U(D),F,K,te,H);throw F=String(D),Error(&quot;Objects are not valid as a React child (found: &quot;+(F===&quot;[object Object]&quot;?&quot;object with keys {&quot;+Object.keys(D).join(&quot;, &quot;)+&quot;}&quot;:F)+&quot;). If you meant to render a collection of children, use an array instead.&quot;)}return fe}function T(D,F,K){if(D==null)return D;var te=[],H=0;return _(D,te,&quot;&quot;,&quot;&quot;,function(ue){return F.call(K,ue,H++)}),te}function M(D){if(D._status===-1){var F=D._result;F=F(),F.then(function(K){(D._status===0||D._status===-1)&amp;&amp;(D._status=1,D._result=K)},function(K){(D._status===0||D._status===-1)&amp;&amp;(D._status=2,D._result=K)}),D._status===-1&amp;&amp;(D._status=0,D._result=F)}if(D._status===1)return D._result.default;throw D._result}var B=typeof reportError==&quot;function&quot;?reportError:function(D){if(typeof window==&quot;object&quot;&amp;&amp;typeof window.ErrorEvent==&quot;function&quot;){var F=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(F))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:T,forEach:function(D,F,K){T(D,function(){F.apply(this,arguments)},K)},count:function(D){var F=0;return T(D,function(){F++}),F},toArray:function(D){return T(D,function(F){return F})||[]},only:function(D){if(!ee(D))throw Error(&quot;React.Children.only expected to receive a single React element child.&quot;);return D}};return we.Activity=j,we.Children=ce,we.Component=S,we.Fragment=i,we.Profiler=m,we.PureComponent=z,we.StrictMode=c,we.Suspense=p,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,we.__COMPILER_RUNTIME={__proto__:null,c:function(D){return I.H.useMemoCache(D)}},we.cache=function(D){return function(){return D.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(D,F,K){if(D==null)throw Error(&quot;The argument must be a React element, but you passed &quot;+D+&quot;.&quot;);var te=A({},D.props),H=D.key;if(F!=null)for(ue in F.key!==void 0&amp;&amp;(H=&quot;&quot;+F.key),F)!Z.call(F,ue)||ue===&quot;key&quot;||ue===&quot;__self&quot;||ue===&quot;__source&quot;||ue===&quot;ref&quot;&amp;&amp;F.ref===void 0||(te[ue]=F[ue]);var ue=arguments.length-2;if(ue===1)te.children=K;else if(1&lt;ue){for(var fe=Array(ue),Ce=0;Ce&lt;ue;Ce++)fe[Ce]=arguments[Ce+2];te.children=fe}return k(D.type,H,te)},we.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},we.createElement=function(D,F,K){var te,H={},ue=null;if(F!=null)for(te in F.key!==void 0&amp;&amp;(ue=&quot;&quot;+F.key),F)Z.call(F,te)&amp;&amp;te!==&quot;key&quot;&amp;&amp;te!==&quot;__self&quot;&amp;&amp;te!==&quot;__source&quot;&amp;&amp;(H[te]=F[te]);var fe=arguments.length-2;if(fe===1)H.children=K;else if(1&lt;fe){for(var Ce=Array(fe),Me=0;Me&lt;fe;Me++)Ce[Me]=arguments[Me+2];H.children=Ce}if(D&amp;&amp;D.defaultProps)for(te in fe=D.defaultProps,fe)H[te]===void 0&amp;&amp;(H[te]=fe[te]);return k(D,ue,H)},we.createRef=function(){return{current:null}},we.forwardRef=function(D){return{$$typeof:b,render:D}},we.isValidElement=ee,we.lazy=function(D){return{$$typeof:v,_payload:{_status:-1,_result:D},_init:M}},we.memo=function(D,F){return{$$typeof:g,type:D,compare:F===void 0?null:F}},we.startTransition=function(D){var F=I.T,K={};I.T=K;try{var te=D(),H=I.S;H!==null&amp;&amp;H(K,te),typeof te==&quot;object&quot;&amp;&amp;te!==null&amp;&amp;typeof te.then==&quot;function&quot;&amp;&amp;te.then(G,B)}catch(ue){B(ue)}finally{F!==null&amp;&amp;K.types!==null&amp;&amp;(F.types=K.types),I.T=F}},we.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},we.use=function(D){return I.H.use(D)},we.useActionState=function(D,F,K){return I.H.useActionState(D,F,K)},we.useCallback=function(D,F){return I.H.useCallback(D,F)},we.useContext=function(D){return I.H.useContext(D)},we.useDebugValue=function(){},we.useDeferredValue=function(D,F){return I.H.useDeferredValue(D,F)},we.useEffect=function(D,F){return I.H.useEffect(D,F)},we.useEffectEvent=function(D){return I.H.useEffectEvent(D)},we.useId=function(){return I.H.useId()},we.useImperativeHandle=function(D,F,K){return I.H.useImperativeHandle(D,F,K)},we.useInsertionEffect=function(D,F){return I.H.useInsertionEffect(D,F)},we.useLayoutEffect=function(D,F){return I.H.useLayoutEffect(D,F)},we.useMemo=function(D,F){return I.H.useMemo(D,F)},we.useOptimistic=function(D,F){return I.H.useOptimistic(D,F)},we.useReducer=function(D,F,K){return I.H.useReducer(D,F,K)},we.useRef=function(D){return I.H.useRef(D)},we.useState=function(D){return I.H.useState(D)},we.useSyncExternalStore=function(D,F,K){return I.H.useSyncExternalStore(D,F,K)},we.useTransition=function(){return I.H.useTransition()},we.version=&quot;19.2.6&quot;,we}var nh;function Du(){return nh||(nh=1,tu.exports=vb()),tu.exports}var d=Du(),su={exports:{}},kn={},au={exports:{}},lu={};/**
 * @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 rh;function yb(){return rh||(rh=1,(function(l){function r(_,T){var M=_.length;_.push(T);e:for(;0&lt;M;){var B=M-1&gt;&gt;&gt;1,ce=_[B];if(0&lt;m(ce,T))_[B]=T,_[M]=ce,M=B;else break e}}function i(_){return _.length===0?null:_[0]}function c(_){if(_.length===0)return null;var T=_[0],M=_.pop();if(M!==T){_[0]=M;e:for(var B=0,ce=_.length,D=ce&gt;&gt;&gt;1;B&lt;D;){var F=2*(B+1)-1,K=_[F],te=F+1,H=_[te];if(0&gt;m(K,M))te&lt;ce&amp;&amp;0&gt;m(H,K)?(_[B]=H,_[te]=M,B=te):(_[B]=K,_[F]=M,B=F);else if(te&lt;ce&amp;&amp;0&gt;m(H,M))_[B]=H,_[te]=M,B=te;else break e}}return T}function m(_,T){var M=_.sortIndex-T.sortIndex;return M!==0?M:_.id-T.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,R=!1,A=!1,E=!1,S=typeof setTimeout==&quot;function&quot;?setTimeout:null,$=typeof clearTimeout==&quot;function&quot;?clearTimeout:null,z=typeof setImmediate&lt;&quot;u&quot;?setImmediate:null;function X(_){for(var T=i(g);T!==null;){if(T.callback===null)c(g);else if(T.startTime&lt;=_)c(g),T.sortIndex=T.expirationTime,r(p,T);else break;T=i(g)}}function Q(_){if(A=!1,X(_),!R)if(i(p)!==null)R=!0,G||(G=!0,ae());else{var T=i(g);T!==null&amp;&amp;U(Q,T.startTime-_)}}var G=!1,I=-1,Z=5,k=-1;function w(){return E?!0:!(l.unstable_now()-k&lt;Z)}function ee(){if(E=!1,G){var _=l.unstable_now();k=_;var T=!0;try{e:{R=!1,A&amp;&amp;(A=!1,$(I),I=-1),C=!0;var M=y;try{t:{for(X(_),j=i(p);j!==null&amp;&amp;!(j.expirationTime&gt;_&amp;&amp;w());){var B=j.callback;if(typeof B==&quot;function&quot;){j.callback=null,y=j.priorityLevel;var ce=B(j.expirationTime&lt;=_);if(_=l.unstable_now(),typeof ce==&quot;function&quot;){j.callback=ce,X(_),T=!0;break t}j===i(p)&amp;&amp;c(p),X(_)}else c(p);j=i(p)}if(j!==null)T=!0;else{var D=i(g);D!==null&amp;&amp;U(Q,D.startTime-_),T=!1}}break e}finally{j=null,y=M,C=!1}T=void 0}}finally{T?ae():G=!1}}}var ae;if(typeof z==&quot;function&quot;)ae=function(){z(ee)};else if(typeof MessageChannel&lt;&quot;u&quot;){var Y=new MessageChannel,q=Y.port2;Y.port1.onmessage=ee,ae=function(){q.postMessage(null)}}else ae=function(){S(ee,0)};function U(_,T){I=S(function(){_(l.unstable_now())},T)}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 T=3;break;default:T=y}var M=y;y=T;try{return _()}finally{y=M}},l.unstable_requestPaint=function(){E=!0},l.unstable_runWithPriority=function(_,T){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var M=y;y=_;try{return T()}finally{y=M}},l.unstable_scheduleCallback=function(_,T,M){var B=l.unstable_now();switch(typeof M==&quot;object&quot;&amp;&amp;M!==null?(M=M.delay,M=typeof M==&quot;number&quot;&amp;&amp;0&lt;M?B+M:B):M=B,_){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=M+ce,_={id:v++,callback:T,priorityLevel:_,startTime:M,expirationTime:ce,sortIndex:-1},M&gt;B?(_.sortIndex=M,r(g,_),i(p)===null&amp;&amp;_===i(g)&amp;&amp;(A?($(I),I=-1):A=!0,U(Q,M-B))):(_.sortIndex=ce,r(p,_),R||C||(R=!0,G||(G=!0,ae()))),_},l.unstable_shouldYield=w,l.unstable_wrapCallback=function(_){var T=y;return function(){var M=y;y=T;try{return _.apply(this,arguments)}finally{y=M}}}})(lu)),lu}var ih;function Nb(){return ih||(ih=1,au.exports=yb()),au.exports}var nu={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 ch;function _b(){if(ch)return St;ch=1;var l=Du();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 oh;function Sb(){if(oh)return nu.exports;oh=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=_b(),nu.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 uh;function wb(){if(uh)return kn;uh=1;var l=Nb(),r=Du(),i=Sb();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;),R=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;),$=Symbol.for(&quot;react.consumer&quot;),z=Symbol.for(&quot;react.context&quot;),X=Symbol.for(&quot;react.forward_ref&quot;),Q=Symbol.for(&quot;react.suspense&quot;),G=Symbol.for(&quot;react.suspense_list&quot;),I=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;),ee=Symbol.iterator;function ae(e){return e===null||typeof e!=&quot;object&quot;?null:(e=ee&amp;&amp;e[ee]||e[&quot;@@iterator&quot;],typeof e==&quot;function&quot;?e:null)}var Y=Symbol.for(&quot;react.client.reference&quot;);function q(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 Q: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 R:return&quot;Portal&quot;;case z:return e.displayName||&quot;Context&quot;;case $:return(e._context.displayName||&quot;Context&quot;)+&quot;.Consumer&quot;;case X: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 I:return s=e.displayName||null,s!==null?s:q(e.type)||&quot;Memo&quot;;case Z:s=e._payload,e=e._init;try{return q(e(s))}catch{}}return null}var U=Array.isArray,_=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M={pending:!1,data:null,method:null,action:null},B=[],ce=-1;function D(e){return{current:e}}function F(e){0&gt;ce||(e.current=B[ce],B[ce]=null,ce--)}function K(e,s){ce++,B[ce]=e.current,e.current=s}var te=D(null),H=D(null),ue=D(null),fe=D(null);function Ce(e,s){switch(K(ue,s),K(H,e),K(te,null),s.nodeType){case 9:case 11:e=(e=s.documentElement)&amp;&amp;(e=e.namespaceURI)?wx(e):0;break;default:if(e=s.tagName,s=s.namespaceURI)s=wx(s),e=Cx(s,e);else switch(e){case&quot;svg&quot;:e=1;break;case&quot;math&quot;:e=2;break;default:e=0}}F(te),K(te,e)}function Me(){F(te),F(H),F(ue)}function ft(e){e.memoizedState!==null&amp;&amp;K(fe,e);var s=te.current,a=Cx(s,e.type);s!==a&amp;&amp;(K(H,e),K(te,a))}function Kt(e){H.current===e&amp;&amp;(F(te),F(H)),fe.current===e&amp;&amp;(F(fe),Sn._currentValue=M)}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 de=function(){throw Error()};if(Object.defineProperty(de.prototype,&quot;props&quot;,{set:function(){throw Error()}}),typeof Reflect==&quot;object&quot;&amp;&amp;Reflect.construct){try{Reflect.construct(de,[])}catch(le){var se=le}Reflect.construct(e,[],de)}else{try{de.call()}catch(le){se=le}e.call(de.prototype)}}else{try{throw Error()}catch(le){se=le}(de=e())&amp;&amp;typeof de.catch==&quot;function&quot;&amp;&amp;de.catch(function(){})}}catch(le){if(le&amp;&amp;se&amp;&amp;typeof le.stack==&quot;string&quot;)return[le.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(`
`),W=N.split(`
`);for(o=n=0;n&lt;O.length&amp;&amp;!O[n].includes(&quot;DetermineComponentFrameRoot&quot;);)n++;for(;o&lt;W.length&amp;&amp;!W[o].includes(&quot;DetermineComponentFrameRoot&quot;);)o++;if(n===O.length||o===W.length)for(n=O.length-1,o=W.length-1;1&lt;=n&amp;&amp;0&lt;=o&amp;&amp;O[n]!==W[o];)o--;for(;1&lt;=n&amp;&amp;0&lt;=o;n--,o--)if(O[n]!==W[o]){if(n!==1||o!==1)do if(n--,o--,0&gt;o||O[n]!==W[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,ye=Math.log,Se=Math.LN2;function Qs(e){return e&gt;&gt;&gt;=0,e===0?32:31-(ye(e)/Se|0)|0}var Zn=256,Qn=262144,Xn=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 Pn(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 n0(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 nd(){var e=Xn;return Xn&lt;&lt;=1,(Xn&amp;62914560)===0&amp;&amp;(Xn=4194304),e}function Hi(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 r0(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,W=e.hiddenUpdates;for(a=h&amp;~a;0&lt;a;){var re=31-ne(a),de=1&lt;&lt;re;N[re]=0,O[re]=-1;var se=W[re];if(se!==null)for(W[re]=null,re=0;re&lt;se.length;re++){var le=se[re];le!==null&amp;&amp;(le.lane&amp;=-536870913)}a&amp;=~de}n!==0&amp;&amp;rd(e,n,0),u!==0&amp;&amp;o===0&amp;&amp;e.tag!==0&amp;&amp;(e.suspendedLanes|=u&amp;~(h&amp;~s))}function rd(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 id(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 cd(e,s){var a=s&amp;-s;return a=(a&amp;42)!==0?1:Vi(a),(a&amp;(e.suspendedLanes|s))!==0?0:a}function Vi(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 Yi(e){return e&amp;=-e,2&lt;e?8&lt;e?(e&amp;134217727)!==0?32:268435456:8:2}function od(){var e=T.p;return e!==0?e:(e=window.event,e===void 0?32:Kx(e.type))}function ud(e,s){var a=T.p;try{return T.p=e,s()}finally{T.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,Gi=&quot;__reactEvents$&quot;+Xs,i0=&quot;__reactListeners$&quot;+Xs,c0=&quot;__reactHandles$&quot;+Xs,dd=&quot;__reactResources$&quot;+Xs,$l=&quot;__reactMarker$&quot;+Xs;function Zi(e){delete e[jt],delete e[Dt],delete e[Gi],delete e[i0],delete e[c0]}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=Dx(e);e!==null;){if(a=e[jt])return a;e=Dx(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[dd];return s||(s=e[dd]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function pt(e){e[$l]=!0}var md=new Set,fd={};function va(e,s){Ka(e,s),Ka(e+&quot;Capture&quot;,s)}function Ka(e,s){for(fd[e]=s,e=0;e&lt;s.length;e++)md.add(s[e])}var o0=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;),xd={},hd={};function u0(e){return os.call(hd,e)?!0:os.call(xd,e)?!1:o0.test(e)?hd[e]=!0:(xd[e]=!0,!1)}function Kn(e,s,a){if(u0(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 Fn(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 Ft(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 pd(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 d0(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 Qi(e){if(!e._valueTracker){var s=pd(e)?&quot;checked&quot;:&quot;value&quot;;e._valueTracker=d0(e,s,&quot;&quot;+e[s])}}function gd(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=pd(e)?e.checked?&quot;true&quot;:&quot;false&quot;:e.value),e=n,e!==a?(s.setValue(e),!0):!1}function Jn(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 m0=/[\n&quot;\\]/g;function Jt(e){return e.replace(m0,function(s){return&quot;\\&quot;+s.charCodeAt(0).toString(16)+&quot; &quot;})}function Xi(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;+Ft(s)):e.value!==&quot;&quot;+Ft(s)&amp;&amp;(e.value=&quot;&quot;+Ft(s)):h!==&quot;submit&quot;&amp;&amp;h!==&quot;reset&quot;||e.removeAttribute(&quot;value&quot;),s!=null?Pi(e,h,Ft(s)):a!=null?Pi(e,h,Ft(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;+Ft(N):e.removeAttribute(&quot;name&quot;)}function bd(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)){Qi(e);return}a=a!=null?&quot;&quot;+Ft(a):&quot;&quot;,s=s!=null?&quot;&quot;+Ft(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),Qi(e)}function Pi(e,s,a){s===&quot;number&quot;&amp;&amp;Jn(e.ownerDocument)===e||e.defaultValue===&quot;&quot;+a||(e.defaultValue=&quot;&quot;+a)}function Fa(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;+Ft(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 jd(e,s,a){if(s!=null&amp;&amp;(s=&quot;&quot;+Ft(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;+Ft(a):&quot;&quot;}function vd(e,s,a,n){if(s==null){if(n!=null){if(a!=null)throw Error(c(92));if(U(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=Ft(s),e.defaultValue=a,n=e.textContent,n===a&amp;&amp;n!==&quot;&quot;&amp;&amp;n!==null&amp;&amp;(e.value=n),Qi(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 f0=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 yd(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||f0.has(s)?s===&quot;float&quot;?e.cssFloat=a:e[s]=(&quot;&quot;+a).trim():e[s]=a+&quot;px&quot;}function Nd(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;yd(e,o,n)}else for(var u in s)s.hasOwnProperty(u)&amp;&amp;yd(e,u,s[u])}function Ki(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 x0=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;]]),h0=/^[\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 In(e){return h0.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 Fi=null;function Ji(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 _d(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(Xi(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));Xi(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;gd(n)}break e;case&quot;textarea&quot;:jd(e,a.value,a.defaultValue);break e;case&quot;select&quot;:s=a.value,s!=null&amp;&amp;Fa(e,!!a.multiple,s,!1)}}}var Ii=!1;function Sd(e,s,a){if(Ii)return e(s,a);Ii=!0;try{var n=e(s);return n}finally{if(Ii=!1,(Ia!==null||Wa!==null)&amp;&amp;(qr(),Ia&amp;&amp;(s=Ia,e=Wa,Wa=Ia=null,_d(s),e)))for(s=0;s&lt;e.length;s++)_d(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;),Wi=!1;if(ws)try{var Hl={};Object.defineProperty(Hl,&quot;passive&quot;,{get:function(){Wi=!0}}),window.addEventListener(&quot;test&quot;,Hl,Hl),window.removeEventListener(&quot;test&quot;,Hl,Hl)}catch{Wi=!1}var Ps=null,ec=null,Wn=null;function wd(){if(Wn)return Wn;var e,s=ec,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 Wn=o.slice(e,1&lt;n?1-n:void 0)}function er(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 tr(){return!0}function Cd(){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)?tr:Cd,this.isPropagationStopped=Cd,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=tr)},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=tr)},persist:function(){},isPersistent:tr}),s}var ya={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sr=Rt(ya),Vl=j({},ya,{view:0,detail:0}),p0=Rt(Vl),tc,sc,Yl,ar=j({},Vl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lc,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;?(tc=e.screenX-Yl.screenX,sc=e.screenY-Yl.screenY):sc=tc=0,Yl=e),tc)},movementY:function(e){return&quot;movementY&quot;in e?e.movementY:sc}}),Ed=Rt(ar),g0=j({},ar,{dataTransfer:0}),b0=Rt(g0),j0=j({},Vl,{relatedTarget:0}),ac=Rt(j0),v0=j({},ya,{animationName:0,elapsedTime:0,pseudoElement:0}),y0=Rt(v0),N0=j({},ya,{clipboardData:function(e){return&quot;clipboardData&quot;in e?e.clipboardData:window.clipboardData}}),_0=Rt(N0),S0=j({},ya,{data:0}),Ad=Rt(S0),w0={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;},C0={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;},E0={Alt:&quot;altKey&quot;,Control:&quot;ctrlKey&quot;,Meta:&quot;metaKey&quot;,Shift:&quot;shiftKey&quot;};function A0(e){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(e):(e=E0[e])?!!s[e]:!1}function lc(){return A0}var k0=j({},Vl,{key:function(e){if(e.key){var s=w0[e.key]||e.key;if(s!==&quot;Unidentified&quot;)return s}return e.type===&quot;keypress&quot;?(e=er(e),e===13?&quot;Enter&quot;:String.fromCharCode(e)):e.type===&quot;keydown&quot;||e.type===&quot;keyup&quot;?C0[e.keyCode]||&quot;Unidentified&quot;:&quot;&quot;},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lc,charCode:function(e){return e.type===&quot;keypress&quot;?er(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;?er(e):e.type===&quot;keydown&quot;||e.type===&quot;keyup&quot;?e.keyCode:0}}),T0=Rt(k0),z0=j({},ar,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),kd=Rt(z0),M0=j({},Vl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lc}),D0=Rt(M0),R0=j({},ya,{propertyName:0,elapsedTime:0,pseudoElement:0}),O0=Rt(R0),L0=j({},ar,{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}),U0=Rt(L0),$0=j({},ya,{newState:0,oldState:0}),q0=Rt($0),B0=[9,13,27,32],nc=ws&amp;&amp;&quot;CompositionEvent&quot;in window,Gl=null;ws&amp;&amp;&quot;documentMode&quot;in document&amp;&amp;(Gl=document.documentMode);var H0=ws&amp;&amp;&quot;TextEvent&quot;in window&amp;&amp;!Gl,Td=ws&amp;&amp;(!nc||Gl&amp;&amp;8&lt;Gl&amp;&amp;11&gt;=Gl),zd=&quot; &quot;,Md=!1;function Dd(e,s){switch(e){case&quot;keyup&quot;:return B0.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 Rd(e){return e=e.detail,typeof e==&quot;object&quot;&amp;&amp;&quot;data&quot;in e?e.data:null}var el=!1;function V0(e,s){switch(e){case&quot;compositionend&quot;:return Rd(s);case&quot;keypress&quot;:return s.which!==32?null:(Md=!0,zd);case&quot;textInput&quot;:return e=s.data,e===zd&amp;&amp;Md?null:e;default:return null}}function Y0(e,s){if(el)return e===&quot;compositionend&quot;||!nc&amp;&amp;Dd(e,s)?(e=wd(),Wn=ec=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 Td&amp;&amp;s.locale!==&quot;ko&quot;?null:s.data;default:return null}}var G0={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 Od(e){var s=e&amp;&amp;e.nodeName&amp;&amp;e.nodeName.toLowerCase();return s===&quot;input&quot;?!!G0[e.type]:s===&quot;textarea&quot;}function Ld(e,s,a,n){Ia?Wa?Wa.push(n):Wa=[n]:Ia=n,s=Qr(s,&quot;onChange&quot;),0&lt;s.length&amp;&amp;(a=new sr(&quot;onChange&quot;,&quot;change&quot;,null,a,n),e.push({event:a,listeners:s}))}var Zl=null,Ql=null;function Z0(e){jx(e,0)}function lr(e){var s=ql(e);if(gd(s))return e}function Ud(e,s){if(e===&quot;change&quot;)return s}var $d=!1;if(ws){var rc;if(ws){var ic=&quot;oninput&quot;in document;if(!ic){var qd=document.createElement(&quot;div&quot;);qd.setAttribute(&quot;oninput&quot;,&quot;return;&quot;),ic=typeof qd.oninput==&quot;function&quot;}rc=ic}else rc=!1;$d=rc&amp;&amp;(!document.documentMode||9&lt;document.documentMode)}function Bd(){Zl&amp;&amp;(Zl.detachEvent(&quot;onpropertychange&quot;,Hd),Ql=Zl=null)}function Hd(e){if(e.propertyName===&quot;value&quot;&amp;&amp;lr(Ql)){var s=[];Ld(s,Ql,e,Ji(e)),Sd(Z0,s)}}function Q0(e,s,a){e===&quot;focusin&quot;?(Bd(),Zl=s,Ql=a,Zl.attachEvent(&quot;onpropertychange&quot;,Hd)):e===&quot;focusout&quot;&amp;&amp;Bd()}function X0(e){if(e===&quot;selectionchange&quot;||e===&quot;keyup&quot;||e===&quot;keydown&quot;)return lr(Ql)}function P0(e,s){if(e===&quot;click&quot;)return lr(s)}function K0(e,s){if(e===&quot;input&quot;||e===&quot;change&quot;)return lr(s)}function F0(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:F0;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 Vd(e){for(;e&amp;&amp;e.firstChild;)e=e.firstChild;return e}function Yd(e,s){var a=Vd(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=Vd(a)}}function Gd(e,s){return e&amp;&amp;s?e===s?!0:e&amp;&amp;e.nodeType===3?!1:s&amp;&amp;s.nodeType===3?Gd(e,s.parentNode):&quot;contains&quot;in e?e.contains(s):e.compareDocumentPosition?!!(e.compareDocumentPosition(s)&amp;16):!1:!1}function Zd(e){e=e!=null&amp;&amp;e.ownerDocument!=null&amp;&amp;e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var s=Jn(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=Jn(e.document)}return s}function cc(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 J0=ws&amp;&amp;&quot;documentMode&quot;in document&amp;&amp;11&gt;=document.documentMode,tl=null,oc=null,Pl=null,uc=!1;function Qd(e,s,a){var n=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;uc||tl==null||tl!==Jn(n)||(n=tl,&quot;selectionStart&quot;in n&amp;&amp;cc(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=Qr(oc,&quot;onSelect&quot;),0&lt;n.length&amp;&amp;(s=new sr(&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;)},dc={},Xd={};ws&amp;&amp;(Xd=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(dc[e])return dc[e];if(!sl[e])return e;var s=sl[e],a;for(a in s)if(s.hasOwnProperty(a)&amp;&amp;a in Xd)return dc[e]=s[a];return e}var Pd=_a(&quot;animationend&quot;),Kd=_a(&quot;animationiteration&quot;),Fd=_a(&quot;animationstart&quot;),I0=_a(&quot;transitionrun&quot;),W0=_a(&quot;transitionstart&quot;),eg=_a(&quot;transitioncancel&quot;),Jd=_a(&quot;transitionend&quot;),Id=new Map,mc=&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;);mc.push(&quot;scrollEnd&quot;);function ds(e,s){Id.set(e,s),va(s,[e])}var nr=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,fc=0;function rr(){for(var e=al,s=fc=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;Wd(a,o,u)}}function ir(e,s,a,n){It[al++]=e,It[al++]=s,It[al++]=a,It[al++]=n,fc|=n,e.lanes|=n,e=e.alternate,e!==null&amp;&amp;(e.lanes|=n)}function xc(e,s,a,n){return ir(e,s,a,n),cr(e)}function Sa(e,s){return ir(e,null,null,s),cr(e)}function Wd(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 cr(e){if(50&lt;gn)throw gn=0,So=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 tg(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 tg(e,s,a,n)}function hc(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 em(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 or(e,s,a,n,o,u){var h=0;if(n=e,typeof e==&quot;function&quot;)hc(e)&amp;&amp;(h=1);else if(typeof e==&quot;string&quot;)h=rb(e,a,te.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 Q:return e=Vt(13,a,s,o),e.elementType=Q,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 z:h=10;break e;case $:h=9;break e;case X:h=11;break e;case I: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 pc(e,s,a){return e=Vt(6,e,null,s),e.lanes=a,e}function tm(e){var s=Vt(18,null,null,0);return s.stateNode=e,s}function gc(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 sm=new WeakMap;function Wt(e,s){if(typeof e==&quot;object&quot;&amp;&amp;e!==null){var a=sm.get(e);return a!==void 0?a:(s={value:e,source:s,stack:Et(s)},sm.set(e,s),s)}return{value:e,source:s,stack:Et(s)}}var nl=[],rl=0,ur=null,Kl=0,es=[],ts=0,Ks=null,gs=1,bs=&quot;&quot;;function Es(e,s){nl[rl++]=Kl,nl[rl++]=ur,ur=e,Kl=s}function am(e,s,a){es[ts++]=gs,es[ts++]=bs,es[ts++]=Ks,Ks=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 bc(e){e.return!==null&amp;&amp;(Es(e,1),am(e,1,0))}function jc(e){for(;e===ur;)ur=nl[--rl],nl[rl]=null,Kl=nl[--rl],nl[rl]=null;for(;e===Ks;)Ks=es[--ts],es[ts]=null,bs=es[--ts],es[ts]=null,gs=es[--ts],es[ts]=null}function lm(e,s){es[ts++]=gs,es[ts++]=bs,es[ts++]=Ks,gs=s.id,bs=s.overflow,Ks=e}var vt=null,Ie=null,$e=!1,Fs=null,ss=!1,vc=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 Fl(Wt(s,e)),vc}function nm(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),bd(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),vd(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||_x(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 rm(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 rm(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;)||qo(e.type,e.memoizedProps)),a=!a),a&amp;&amp;Ie&amp;&amp;Js(e),rm(e),s===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=Mx(e)}else if(s===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(c(317));Ie=Mx(e)}else s===27?(s=Ie,da(e.type)?(e=Go,Go=null,Ie=e):Ie=s):Ie=vt?ls(e.stateNode.nextSibling):null;return!0}function Ca(){Ie=vt=null,$e=!1}function yc(){var e=Fs;return e!==null&amp;&amp;($t===null?$t=e:$t.push.apply($t,e),Fs=null),e}function Fl(e){Fs===null?Fs=[e]:Fs.push(e)}var Nc=D(null),Ea=null,As=null;function Is(e,s,a){K(Nc,s._currentValue),s._currentValue=a}function ks(e){e._currentValue=Nc.current,F(Nc)}function _c(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 Sc(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),_c(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),_c(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;Sc(s,e,a,n),s.flags|=262144}function dr(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 im(Ea,e)}function mr(e,s){return Ea===null&amp;&amp;Aa(e),im(e,s)}function im(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 sg=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()})}},ag=l.unstable_scheduleCallback,lg=l.unstable_NormalPriority,ct={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wc(){return{controller:new sg,data:new Map,refCount:0}}function Jl(e){e.refCount--,e.refCount===0&amp;&amp;ag(lg,function(){e.controller.abort()})}var Il=null,Cc=0,ol=0,ul=null;function ng(e,s){if(Il===null){var a=Il=[];Cc=0,ol=To(),ul={status:&quot;pending&quot;,value:void 0,then:function(n){a.push(n)}}}return Cc++,s.then(cm,cm),s}function cm(){if(--Cc===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 rg(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 om=_.S;_.S=function(e,s){Xf=et(),typeof s==&quot;object&quot;&amp;&amp;s!==null&amp;&amp;typeof s.then==&quot;function&quot;&amp;&amp;ng(e,s),om!==null&amp;&amp;om(e,s)};var ka=D(null);function Ec(){var e=ka.current;return e!==null?e:Ke.pooledCache}function fr(e,s){s===null?K(ka,ka.current):K(ka,s.pool)}function um(){var e=Ec();return e===null?null:{parent:ct._currentValue,pool:e}}var dl=Error(c(460)),Ac=Error(c(474)),xr=Error(c(542)),hr={then:function(){}};function dm(e){return e=e.status,e===&quot;fulfilled&quot;||e===&quot;rejected&quot;}function mm(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,xm(e),e;default:if(typeof s.status==&quot;string&quot;)s.then(Ss,Ss);else{if(e=Ke,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,xm(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 fm(){if(za===null)throw Error(c(459));var e=za;return za=null,e}function xm(e){if(e===dl||e===xr)throw Error(c(483))}var ml=null,Wl=0;function pr(e){var s=Wl;return Wl+=1,ml===null&amp;&amp;(ml=[]),mm(ml,e,s)}function en(e,s){s=s.props.ref,e.ref=s!==void 0?s:null}function gr(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 hm(e){function s(P,V){if(e){var J=P.deletions;J===null?(P.deletions=[V],P.flags|=16):J.push(V)}}function a(P,V){if(!e)return null;for(;V!==null;)s(P,V),V=V.sibling;return null}function n(P){for(var V=new Map;P!==null;)P.key!==null?V.set(P.key,P):V.set(P.index,P),P=P.sibling;return V}function o(P,V){return P=Cs(P,V),P.index=0,P.sibling=null,P}function u(P,V,J){return P.index=J,e?(J=P.alternate,J!==null?(J=J.index,J&lt;V?(P.flags|=67108866,V):J):(P.flags|=67108866,V)):(P.flags|=1048576,V)}function h(P){return e&amp;&amp;P.alternate===null&amp;&amp;(P.flags|=67108866),P}function N(P,V,J,oe){return V===null||V.tag!==6?(V=pc(J,P.mode,oe),V.return=P,V):(V=o(V,J),V.return=P,V)}function O(P,V,J,oe){var je=J.type;return je===A?re(P,V,J.props.children,oe,J.key):V!==null&amp;&amp;(V.elementType===je||typeof je==&quot;object&quot;&amp;&amp;je!==null&amp;&amp;je.$$typeof===Z&amp;&amp;Ta(je)===V.type)?(V=o(V,J.props),en(V,J),V.return=P,V):(V=or(J.type,J.key,J.props,null,P.mode,oe),en(V,J),V.return=P,V)}function W(P,V,J,oe){return V===null||V.tag!==4||V.stateNode.containerInfo!==J.containerInfo||V.stateNode.implementation!==J.implementation?(V=gc(J,P.mode,oe),V.return=P,V):(V=o(V,J.children||[]),V.return=P,V)}function re(P,V,J,oe,je){return V===null||V.tag!==7?(V=wa(J,P.mode,oe,je),V.return=P,V):(V=o(V,J),V.return=P,V)}function de(P,V,J){if(typeof V==&quot;string&quot;&amp;&amp;V!==&quot;&quot;||typeof V==&quot;number&quot;||typeof V==&quot;bigint&quot;)return V=pc(&quot;&quot;+V,P.mode,J),V.return=P,V;if(typeof V==&quot;object&quot;&amp;&amp;V!==null){switch(V.$$typeof){case C:return J=or(V.type,V.key,V.props,null,P.mode,J),en(J,V),J.return=P,J;case R:return V=gc(V,P.mode,J),V.return=P,V;case Z:return V=Ta(V),de(P,V,J)}if(U(V)||ae(V))return V=wa(V,P.mode,J,null),V.return=P,V;if(typeof V.then==&quot;function&quot;)return de(P,pr(V),J);if(V.$$typeof===z)return de(P,mr(P,V),J);gr(P,V)}return null}function se(P,V,J,oe){var je=V!==null?V.key:null;if(typeof J==&quot;string&quot;&amp;&amp;J!==&quot;&quot;||typeof J==&quot;number&quot;||typeof J==&quot;bigint&quot;)return je!==null?null:N(P,V,&quot;&quot;+J,oe);if(typeof J==&quot;object&quot;&amp;&amp;J!==null){switch(J.$$typeof){case C:return J.key===je?O(P,V,J,oe):null;case R:return J.key===je?W(P,V,J,oe):null;case Z:return J=Ta(J),se(P,V,J,oe)}if(U(J)||ae(J))return je!==null?null:re(P,V,J,oe,null);if(typeof J.then==&quot;function&quot;)return se(P,V,pr(J),oe);if(J.$$typeof===z)return se(P,V,mr(P,J),oe);gr(P,J)}return null}function le(P,V,J,oe,je){if(typeof oe==&quot;string&quot;&amp;&amp;oe!==&quot;&quot;||typeof oe==&quot;number&quot;||typeof oe==&quot;bigint&quot;)return P=P.get(J)||null,N(V,P,&quot;&quot;+oe,je);if(typeof oe==&quot;object&quot;&amp;&amp;oe!==null){switch(oe.$$typeof){case C:return P=P.get(oe.key===null?J:oe.key)||null,O(V,P,oe,je);case R:return P=P.get(oe.key===null?J:oe.key)||null,W(V,P,oe,je);case Z:return oe=Ta(oe),le(P,V,J,oe,je)}if(U(oe)||ae(oe))return P=P.get(J)||null,re(V,P,oe,je,null);if(typeof oe.then==&quot;function&quot;)return le(P,V,J,pr(oe),je);if(oe.$$typeof===z)return le(P,V,J,mr(V,oe),je);gr(V,oe)}return null}function pe(P,V,J,oe){for(var je=null,Be=null,ge=V,ze=V=0,Le=null;ge!==null&amp;&amp;ze&lt;J.length;ze++){ge.index&gt;ze?(Le=ge,ge=null):Le=ge.sibling;var He=se(P,ge,J[ze],oe);if(He===null){ge===null&amp;&amp;(ge=Le);break}e&amp;&amp;ge&amp;&amp;He.alternate===null&amp;&amp;s(P,ge),V=u(He,V,ze),Be===null?je=He:Be.sibling=He,Be=He,ge=Le}if(ze===J.length)return a(P,ge),$e&amp;&amp;Es(P,ze),je;if(ge===null){for(;ze&lt;J.length;ze++)ge=de(P,J[ze],oe),ge!==null&amp;&amp;(V=u(ge,V,ze),Be===null?je=ge:Be.sibling=ge,Be=ge);return $e&amp;&amp;Es(P,ze),je}for(ge=n(ge);ze&lt;J.length;ze++)Le=le(ge,P,ze,J[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?je=Le:Be.sibling=Le,Be=Le);return e&amp;&amp;ge.forEach(function(pa){return s(P,pa)}),$e&amp;&amp;Es(P,ze),je}function ve(P,V,J,oe){if(J==null)throw Error(c(151));for(var je=null,Be=null,ge=V,ze=V=0,Le=null,He=J.next();ge!==null&amp;&amp;!He.done;ze++,He=J.next()){ge.index&gt;ze?(Le=ge,ge=null):Le=ge.sibling;var pa=se(P,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(P,ge),V=u(pa,V,ze),Be===null?je=pa:Be.sibling=pa,Be=pa,ge=Le}if(He.done)return a(P,ge),$e&amp;&amp;Es(P,ze),je;if(ge===null){for(;!He.done;ze++,He=J.next())He=de(P,He.value,oe),He!==null&amp;&amp;(V=u(He,V,ze),Be===null?je=He:Be.sibling=He,Be=He);return $e&amp;&amp;Es(P,ze),je}for(ge=n(ge);!He.done;ze++,He=J.next())He=le(ge,P,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?je=He:Be.sibling=He,Be=He);return e&amp;&amp;ge.forEach(function(gb){return s(P,gb)}),$e&amp;&amp;Es(P,ze),je}function Pe(P,V,J,oe){if(typeof J==&quot;object&quot;&amp;&amp;J!==null&amp;&amp;J.type===A&amp;&amp;J.key===null&amp;&amp;(J=J.props.children),typeof J==&quot;object&quot;&amp;&amp;J!==null){switch(J.$$typeof){case C:e:{for(var je=J.key;V!==null;){if(V.key===je){if(je=J.type,je===A){if(V.tag===7){a(P,V.sibling),oe=o(V,J.props.children),oe.return=P,P=oe;break e}}else if(V.elementType===je||typeof je==&quot;object&quot;&amp;&amp;je!==null&amp;&amp;je.$$typeof===Z&amp;&amp;Ta(je)===V.type){a(P,V.sibling),oe=o(V,J.props),en(oe,J),oe.return=P,P=oe;break e}a(P,V);break}else s(P,V);V=V.sibling}J.type===A?(oe=wa(J.props.children,P.mode,oe,J.key),oe.return=P,P=oe):(oe=or(J.type,J.key,J.props,null,P.mode,oe),en(oe,J),oe.return=P,P=oe)}return h(P);case R:e:{for(je=J.key;V!==null;){if(V.key===je)if(V.tag===4&amp;&amp;V.stateNode.containerInfo===J.containerInfo&amp;&amp;V.stateNode.implementation===J.implementation){a(P,V.sibling),oe=o(V,J.children||[]),oe.return=P,P=oe;break e}else{a(P,V);break}else s(P,V);V=V.sibling}oe=gc(J,P.mode,oe),oe.return=P,P=oe}return h(P);case Z:return J=Ta(J),Pe(P,V,J,oe)}if(U(J))return pe(P,V,J,oe);if(ae(J)){if(je=ae(J),typeof je!=&quot;function&quot;)throw Error(c(150));return J=je.call(J),ve(P,V,J,oe)}if(typeof J.then==&quot;function&quot;)return Pe(P,V,pr(J),oe);if(J.$$typeof===z)return Pe(P,V,mr(P,J),oe);gr(P,J)}return typeof J==&quot;string&quot;&amp;&amp;J!==&quot;&quot;||typeof J==&quot;number&quot;||typeof J==&quot;bigint&quot;?(J=&quot;&quot;+J,V!==null&amp;&amp;V.tag===6?(a(P,V.sibling),oe=o(V,J),oe.return=P,P=oe):(a(P,V),oe=pc(J,P.mode,oe),oe.return=P,P=oe),h(P)):a(P,V)}return function(P,V,J,oe){try{Wl=0;var je=Pe(P,V,J,oe);return ml=null,je}catch(ge){if(ge===dl||ge===xr)throw ge;var Be=Vt(29,ge,null,P.mode);return Be.lanes=oe,Be.return=P,Be}finally{}}}var Ma=hm(!0),pm=hm(!1),Ws=!1;function kc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tc(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=cr(e),Wd(e,null,a),s}return ir(e,n,s,a),cr(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,id(e,a)}}function zc(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 Mc=!1;function sn(){if(Mc){var e=ul;if(e!==null)throw e}}function an(e,s,a,n){Mc=!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,W=O.next;O.next=null,h===null?u=W:h.next=W,h=O;var re=e.alternate;re!==null&amp;&amp;(re=re.updateQueue,N=re.lastBaseUpdate,N!==h&amp;&amp;(N===null?re.firstBaseUpdate=W:N.next=W,re.lastBaseUpdate=O))}if(u!==null){var de=o.baseState;h=0,re=W=O=null,N=u;do{var se=N.lane&amp;-536870913,le=se!==N.lane;if(le?(Oe&amp;se)===se:(n&amp;se)===se){se!==0&amp;&amp;se===ol&amp;&amp;(Mc=!0),re!==null&amp;&amp;(re=re.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var pe=e,ve=N;se=s;var Pe=a;switch(ve.tag){case 1:if(pe=ve.payload,typeof pe==&quot;function&quot;){de=pe.call(Pe,de,se);break e}de=pe;break e;case 3:pe.flags=pe.flags&amp;-65537|128;case 0:if(pe=ve.payload,se=typeof pe==&quot;function&quot;?pe.call(Pe,de,se):pe,se==null)break e;de=j({},de,se);break e;case 2:Ws=!0}}se=N.callback,se!==null&amp;&amp;(e.flags|=64,le&amp;&amp;(e.flags|=8192),le=o.callbacks,le===null?o.callbacks=[se]:le.push(se))}else le={lane:se,tag:N.tag,payload:N.payload,callback:N.callback,next:null},re===null?(W=re=le,O=de):re=re.next=le,h|=se;if(N=N.next,N===null){if(N=o.shared.pending,N===null)break;le=N,N=le.next,le.next=null,o.lastBaseUpdate=le,o.shared.pending=null}}while(!0);re===null&amp;&amp;(O=de),o.baseState=O,o.firstBaseUpdate=W,o.lastBaseUpdate=re,u===null&amp;&amp;(o.shared.lanes=0),ra|=h,e.lanes=h,e.memoizedState=de}}function gm(e,s){if(typeof e!=&quot;function&quot;)throw Error(c(191,e));e.call(s)}function bm(e,s){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e&lt;a.length;e++)gm(a[e],s)}var fl=D(null),br=D(0);function jm(e,s){e=$s,K(br,e),K(fl,s),$s=e|s.baseLanes}function Dc(){K(br,$s),K(fl,fl.current)}function Rc(){$s=br.current,F(fl),F(br)}var Yt=D(null),as=null;function sa(e){var s=e.alternate;K(rt,rt.current&amp;1),K(Yt,e),as===null&amp;&amp;(s===null||fl.current!==null||s.memoizedState!==null)&amp;&amp;(as=e)}function Oc(e){K(rt,rt.current),K(Yt,e),as===null&amp;&amp;(as=e)}function vm(e){e.tag===22?(K(rt,rt.current),K(Yt,e),as===null&amp;&amp;(as=e)):aa()}function aa(){K(rt,rt.current),K(Yt,Yt.current)}function Gt(e){F(Yt),as===e&amp;&amp;(as=null),F(rt)}var rt=D(0);function jr(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||Vo(a)||Yo(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,vr=!1,xl=!1,Da=!1,yr=0,ln=0,hl=null,ig=0;function at(){throw Error(c(321))}function Lc(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 Uc(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?af:Ic,Da=!1,u=a(n,o),Da=!1,xl&amp;&amp;(u=Nm(s,a,n,o)),ym(e),u}function ym(e){_.H=cn;var s=Qe!==null&amp;&amp;Qe.next!==null;if(Ts=0,ot=Qe=Te=null,vr=!1,ln=0,hl=null,s)throw Error(c(300));e===null||ut||(e=e.dependencies,e!==null&amp;&amp;dr(e)&amp;&amp;(ut=!0))}function Nm(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=lf,u=s(a,n)}while(xl);return u}function cg(){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 $c(){var e=yr!==0;return yr=0,e}function qc(e,s,a){s.updateQueue=e.updateQueue,s.flags&amp;=-2053,e.lanes&amp;=~a}function Bc(e){if(vr){for(e=e.memoizedState;e!==null;){var s=e.queue;s!==null&amp;&amp;(s.pending=null),e=e.next}vr=!1}Ts=0,ot=Qe=Te=null,xl=!1,ln=yr=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 Nr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function nn(e){var s=ln;return ln+=1,hl===null&amp;&amp;(hl=[]),e=mm(hl,e,s),s=Te,(ot===null?s.memoizedState:ot.next)===null&amp;&amp;(s=s.alternate,_.H=s===null||s.memoizedState===null?af:Ic),e}function _r(e){if(e!==null&amp;&amp;typeof e==&quot;object&quot;){if(typeof e.then==&quot;function&quot;)return nn(e);if(e.$$typeof===z)return yt(e)}throw Error(c(438,String(e)))}function Hc(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=Nr(),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 Sr(e){var s=it();return Vc(s,Qe,e)}function Vc(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,W=s,re=!1;do{var de=W.lane&amp;-536870913;if(de!==W.lane?(Oe&amp;de)===de:(Ts&amp;de)===de){var se=W.revertLane;if(se===0)O!==null&amp;&amp;(O=O.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),de===ol&amp;&amp;(re=!0);else if((Ts&amp;se)===se){W=W.next,se===ol&amp;&amp;(re=!0);continue}else de={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},O===null?(N=O=de,h=u):O=O.next=de,Te.lanes|=se,ra|=se;de=W.action,Da&amp;&amp;a(u,de),u=W.hasEagerState?W.eagerState:a(u,de)}else se={lane:de,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},O===null?(N=O=se,h=u):O=O.next=se,Te.lanes|=de,ra|=de;W=W.next}while(W!==null&amp;&amp;W!==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 Yc(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 _m(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,Qc(Cm.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},wm.bind(null,n,o,a,s),null),Ke===null)throw Error(c(349));u||(Ts&amp;127)!==0||Sm(n,s,a)}return a}function Sm(e,s,a){e.flags|=16384,e={getSnapshot:s,value:a},s=Te.updateQueue,s===null?(s=Nr(),Te.updateQueue=s,s.stores=[e]):(a=s.stores,a===null?s.stores=[e]:a.push(e))}function wm(e,s,a,n){s.value=a,s.getSnapshot=n,Em(s)&amp;&amp;Am(e)}function Cm(e,s,a){return a(function(){Em(s)&amp;&amp;Am(e)})}function Em(e){var s=e.getSnapshot;e=e.value;try{var a=s();return!Ht(e,a)}catch{return!0}}function Am(e){var s=Sa(e,2);s!==null&amp;&amp;qt(s,e,2)}function Gc(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 km(e,s,a,n){return e.baseState=a,Vc(e,Qe,typeof n==&quot;function&quot;?n:zs)}function og(e,s,a,n,o){if(Er(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,Tm(s,u)):(u.next=a.next,s.pending=a.next=u)}}function Tm(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),zm(e,s,N)}catch(W){Zc(e,s,W)}finally{u!==null&amp;&amp;h.types!==null&amp;&amp;(u.types=h.types),_.T=u}}else try{u=a(o,n),zm(e,s,u)}catch(W){Zc(e,s,W)}}function zm(e,s,a){a!==null&amp;&amp;typeof a==&quot;object&quot;&amp;&amp;typeof a.then==&quot;function&quot;?a.then(function(n){Mm(e,s,n)},function(n){return Zc(e,s,n)}):Mm(e,s,a)}function Mm(e,s,a){s.status=&quot;fulfilled&quot;,s.value=a,Dm(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,Tm(e,a)))}function Zc(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,Dm(s),s=s.next;while(s!==n)}e.action=null}function Dm(e){e=e.listeners;for(var s=0;s&lt;e.length;s++)(0,e[s])()}function Rm(e,s){return s}function Om(e,s){if($e){var a=Ke.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:Rm,lastRenderedState:s},a.queue=n,a=ef.bind(null,Te,n),n.dispatch=a,n=Gc(!1),u=Jc.bind(null,Te,!1,n.queue),n=kt(),o={state:s,dispatch:null,action:e,pending:null},n.queue=o,a=og.bind(null,Te,o,u,a),o.dispatch=a,n.memoizedState=e,[s,a,!1]}function Lm(e){var s=it();return Um(s,Qe,e)}function Um(e,s,a){if(s=Vc(e,s,Rm)[0],e=Sr(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?xr: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},ug.bind(null,o,a),null)),[n,u,e]}function ug(e,s){e.action=s}function $m(e){var s=it(),a=Qe;if(a!==null)return Um(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=Nr(),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 qm(){return it().memoizedState}function wr(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 Cr(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;Lc(n,Qe.memoizedState.deps)?o.memoizedState=pl(s,u,a,n):(Te.flags|=e,o.memoizedState=pl(1|s,u,a,n))}function Bm(e,s){wr(8390656,8,e,s)}function Qc(e,s){Cr(2048,8,e,s)}function dg(e){Te.flags|=4;var s=Te.updateQueue;if(s===null)s=Nr(),Te.updateQueue=s,s.events=[e];else{var a=s.events;a===null?s.events=[e]:a.push(e)}}function Hm(e){var s=it().memoizedState;return dg({ref:s,nextImpl:e}),function(){if((Ye&amp;2)!==0)throw Error(c(440));return s.impl.apply(void 0,arguments)}}function Vm(e,s){return Cr(4,2,e,s)}function Ym(e,s){return Cr(4,4,e,s)}function Gm(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 Zm(e,s,a){a=a!=null?a.concat([e]):null,Cr(4,4,Gm.bind(null,s,e),a)}function Xc(){}function Qm(e,s){var a=it();s=s===void 0?null:s;var n=a.memoizedState;return s!==null&amp;&amp;Lc(s,n[1])?n[0]:(a.memoizedState=[e,s],e)}function Xm(e,s){var a=it();s=s===void 0?null:s;var n=a.memoizedState;if(s!==null&amp;&amp;Lc(s,n[1]))return n[0];if(n=e(),Da){ke(!0);try{e()}finally{ke(!1)}}return a.memoizedState=[n,s],n}function Pc(e,s,a){return a===void 0||(Ts&amp;1073741824)!==0&amp;&amp;(Oe&amp;261930)===0?e.memoizedState=s:(e.memoizedState=a,e=Kf(),Te.lanes|=e,ra|=e,a)}function Pm(e,s,a,n){return Ht(a,s)?a:fl.current!==null?(e=Pc(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=Kf(),Te.lanes|=e,ra|=e,s)}function Km(e,s,a,n,o){var u=T.p;T.p=u!==0&amp;&amp;8&gt;u?u:8;var h=_.T,N={};_.T=N,Jc(e,!1,s,a);try{var O=o(),W=_.S;if(W!==null&amp;&amp;W(N,O),O!==null&amp;&amp;typeof O==&quot;object&quot;&amp;&amp;typeof O.then==&quot;function&quot;){var re=rg(O,n);rn(e,s,re,Xt(e))}else rn(e,s,n,Xt(e))}catch(de){rn(e,s,{then:function(){},status:&quot;rejected&quot;,reason:de},Xt())}finally{T.p=u,h!==null&amp;&amp;N.types!==null&amp;&amp;(h.types=N.types),_.T=h}}function mg(){}function Kc(e,s,a,n){if(e.tag!==5)throw Error(c(476));var o=Fm(e).queue;Km(e,o,s,M,a===null?mg:function(){return Jm(e),a(n)})}function Fm(e){var s=e.memoizedState;if(s!==null)return s;s={memoizedState:M,baseState:M,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:M},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 Jm(e){var s=Fm(e);s.next===null&amp;&amp;(s=e.alternate.memoizedState),rn(e,s.next.queue,{},Xt())}function Fc(){return yt(Sn)}function Im(){return it().memoizedState}function Wm(){return it().memoizedState}function fg(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:wc()},e.payload=s;return}s=s.return}}function xg(e,s,a){var n=Xt();a={lane:n,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Er(e)?tf(s,a):(a=xc(e,s,a,n),a!==null&amp;&amp;(qt(a,e,n),sf(a,s,n)))}function ef(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(Er(e))tf(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 ir(e,s,o,0),Ke===null&amp;&amp;rr(),!1}catch{}finally{}if(a=xc(e,s,o,n),a!==null)return qt(a,e,n),sf(a,s,n),!0}return!1}function Jc(e,s,a,n){if(n={lane:2,revertLane:To(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Er(e)){if(s)throw Error(c(479))}else s=xc(e,a,n,2),s!==null&amp;&amp;qt(s,e,2)}function Er(e){var s=e.alternate;return e===Te||s!==null&amp;&amp;s===Te}function tf(e,s){xl=vr=!0;var a=e.pending;a===null?s.next=s:(s.next=a.next,a.next=s),e.pending=s}function sf(e,s,a){if((a&amp;4194048)!==0){var n=s.lanes;n&amp;=e.pendingLanes,a|=n,s.lanes=a,id(e,a)}}var cn={readContext:yt,use:_r,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 af={readContext:yt,use:_r,useCallback:function(e,s){return kt().memoizedState=[e,s===void 0?null:s],e},useContext:yt,useEffect:Bm,useImperativeHandle:function(e,s,a){a=a!=null?a.concat([e]):null,wr(4194308,4,Gm.bind(null,s,e),a)},useLayoutEffect:function(e,s){return wr(4194308,4,e,s)},useInsertionEffect:function(e,s){wr(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=xg.bind(null,Te,e),[n.memoizedState,e]},useRef:function(e){var s=kt();return e={current:e},s.memoizedState=e},useState:function(e){e=Gc(e);var s=e.queue,a=ef.bind(null,Te,s);return s.dispatch=a,[e.memoizedState,a]},useDebugValue:Xc,useDeferredValue:function(e,s){var a=kt();return Pc(a,e,s)},useTransition:function(){var e=Gc(!1);return e=Km.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(),Ke===null)throw Error(c(349));(Oe&amp;127)!==0||Sm(n,s,a)}o.memoizedState=a;var u={value:a,getSnapshot:s};return o.queue=u,Bm(Cm.bind(null,n,u,e),[e]),n.flags|=2048,pl(9,{destroy:void 0},wm.bind(null,n,u,a,s),null),a},useId:function(){var e=kt(),s=Ke.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=yr++,0&lt;a&amp;&amp;(s+=&quot;H&quot;+a.toString(32)),s+=&quot;_&quot;}else a=ig++,s=&quot;_&quot;+s+&quot;r_&quot;+a.toString(32)+&quot;_&quot;;return e.memoizedState=s},useHostTransitionStatus:Fc,useFormState:Om,useActionState:Om,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=Jc.bind(null,Te,!0,a),a.dispatch=s,[e,s]},useMemoCache:Hc,useCacheRefresh:function(){return kt().memoizedState=fg.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)}}},Ic={readContext:yt,use:_r,useCallback:Qm,useContext:yt,useEffect:Qc,useImperativeHandle:Zm,useInsertionEffect:Vm,useLayoutEffect:Ym,useMemo:Xm,useReducer:Sr,useRef:qm,useState:function(){return Sr(zs)},useDebugValue:Xc,useDeferredValue:function(e,s){var a=it();return Pm(a,Qe.memoizedState,e,s)},useTransition:function(){var e=Sr(zs)[0],s=it().memoizedState;return[typeof e==&quot;boolean&quot;?e:nn(e),s]},useSyncExternalStore:_m,useId:Im,useHostTransitionStatus:Fc,useFormState:Lm,useActionState:Lm,useOptimistic:function(e,s){var a=it();return km(a,Qe,e,s)},useMemoCache:Hc,useCacheRefresh:Wm};Ic.useEffectEvent=Hm;var lf={readContext:yt,use:_r,useCallback:Qm,useContext:yt,useEffect:Qc,useImperativeHandle:Zm,useInsertionEffect:Vm,useLayoutEffect:Ym,useMemo:Xm,useReducer:Yc,useRef:qm,useState:function(){return Yc(zs)},useDebugValue:Xc,useDeferredValue:function(e,s){var a=it();return Qe===null?Pc(a,e,s):Pm(a,Qe.memoizedState,e,s)},useTransition:function(){var e=Yc(zs)[0],s=it().memoizedState;return[typeof e==&quot;boolean&quot;?e:nn(e),s]},useSyncExternalStore:_m,useId:Im,useHostTransitionStatus:Fc,useFormState:$m,useActionState:$m,useOptimistic:function(e,s){var a=it();return Qe!==null?km(a,Qe,e,s):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Hc,useCacheRefresh:Wm};lf.useEffectEvent=Hm;function Wc(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 eo={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 nf(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 rf(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;eo.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 cf(e){nr(e)}function of(e){console.error(e)}function uf(e){nr(e)}function Ar(e,s){try{var a=e.onUncaughtError;a(s.value,{componentStack:s.stack})}catch(n){setTimeout(function(){throw n})}}function df(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 to(e,s,a){return a=ea(a),a.tag=3,a.payload={element:null},a.callback=function(){Ar(e,s)},a}function mf(e){return e=ea(e),e.tag=3,e}function ff(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(){df(s,a,n)}}var h=a.stateNode;h!==null&amp;&amp;typeof h.componentDidCatch==&quot;function&quot;&amp;&amp;(e.callback=function(){df(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 hg(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?Br():a.alternate===null&amp;&amp;lt===0&amp;&amp;(lt=3),a.flags&amp;=-257,a.flags|=65536,a.lanes=o,n===hr?a.flags|=16384:(s=a.updateQueue,s===null?a.updateQueue=new Set([n]):s.add(n),Eo(e,n,o)),!1;case 22:return a.flags|=65536,n===hr?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)),Eo(e,n,o)),!1}throw Error(c(435,a.tag))}return Eo(e,n,o),Br(),!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!==vc&amp;&amp;(e=Error(c(422),{cause:n}),Fl(Wt(e,a)))):(n!==vc&amp;&amp;(s=Error(c(423),{cause:n}),Fl(Wt(s,a))),e=e.current.alternate,e.flags|=65536,o&amp;=-o,e.lanes|=o,n=Wt(n,a),o=to(e.stateNode,n,o),zc(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=to(a.stateNode,n,e),zc(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=mf(o),ff(o,e,a,n),zc(a,o),!1}a=a.return}while(a!==null);return!1}var so=Error(c(461)),ut=!1;function Nt(e,s,a,n){s.child=e===null?pm(s,null,a,n):Ma(s,e.child,a,n)}function xf(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=Uc(e,s,a,h,u,o),N=$c(),e!==null&amp;&amp;!ut?(qc(e,s,o),Ms(e,s,o)):($e&amp;&amp;N&amp;&amp;bc(s),s.flags|=1,Nt(e,s,n,o),s.child)}function hf(e,s,a,n,o){if(e===null){var u=a.type;return typeof u==&quot;function&quot;&amp;&amp;!hc(u)&amp;&amp;u.defaultProps===void 0&amp;&amp;a.compare===null?(s.tag=15,s.type=u,pf(e,s,u,n,o)):(e=or(a.type,null,n,s,s.mode,o),e.ref=s.ref,e.return=s,s.child=e)}if(u=e.child,!uo(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 pf(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,uo(e,o))(e.flags&amp;131072)!==0&amp;&amp;(ut=!0);else return s.lanes=e.lanes,Ms(e,s,o)}return ao(e,s,a,n,o)}function gf(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 bf(e,s,u,a,n)}if((a&amp;536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},e!==null&amp;&amp;fr(s,u!==null?u.cachePool:null),u!==null?jm(s,u):Dc(),vm(s);else return n=s.lanes=536870912,bf(e,s,u!==null?u.baseLanes|a:a,a,n)}else u!==null?(fr(s,u.cachePool),jm(s,u),aa(),s.memoizedState=null):(e!==null&amp;&amp;fr(s,null),Dc(),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 bf(e,s,a,n,o){var u=Ec();return u=u===null?null:{parent:ct._currentValue,pool:u},s.memoizedState={baseLanes:a,cachePool:u},e!==null&amp;&amp;fr(s,null),Dc(),vm(s),e!==null&amp;&amp;cl(e,s,n,!0),s.childLanes=o,null}function kr(e,s){return s=zr({mode:s.mode,children:s.children},e.mode),s.ref=e.ref,e.child=s,s.return=e,s}function jf(e,s,a){return Ma(s,e.child,null,a),e=kr(s,s.pendingProps),e.flags|=2,Gt(s),s.memoizedState=null,e}function pg(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=kr(s,n),s.lanes=536870912,on(null,e);if(Oc(s),(e=Ie)?(e=zx(e,ss),e=e!==null&amp;&amp;e.data===&quot;&amp;&quot;?e:null,e!==null&amp;&amp;(s.memoizedState={dehydrated:e,treeContext:Ks!==null?{id:gs,overflow:bs}:null,retryLane:536870912,hydrationErrors:null},a=tm(e),a.return=s,s.child=a,vt=s,Ie=null)):e=null,e===null)throw Js(s);return s.lanes=536870912,null}return kr(s,n)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Oc(s),o)if(s.flags&amp;256)s.flags&amp;=-257,s=jf(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=Ke,n!==null&amp;&amp;(h=cd(n,a),h!==0&amp;&amp;h!==u.retryLane))throw u.retryLane=h,Sa(e,h),qt(n,e,h),so;Br(),s=jf(e,s,a)}else e=u.treeContext,Ie=ls(h.nextSibling),vt=s,$e=!0,Fs=null,ss=!1,e!==null&amp;&amp;lm(s,e),s=kr(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 Tr(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 ao(e,s,a,n,o){return Aa(s),a=Uc(e,s,a,n,void 0,o),n=$c(),e!==null&amp;&amp;!ut?(qc(e,s,o),Ms(e,s,o)):($e&amp;&amp;n&amp;&amp;bc(s),s.flags|=1,Nt(e,s,a,o),s.child)}function vf(e,s,a,n,o,u){return Aa(s),s.updateQueue=null,a=Nm(s,n,a,o),ym(e),n=$c(),e!==null&amp;&amp;!ut?(qc(e,s,u),Ms(e,s,u)):($e&amp;&amp;n&amp;&amp;bc(s),s.flags|=1,Nt(e,s,a,u),s.child)}function yf(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=eo,s.stateNode=u,u._reactInternals=s,u=s.stateNode,u.props=n,u.state=s.memoizedState,u.refs={},kc(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;(Wc(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;eo.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 W=u.context,re=a.contextType;h=ll,typeof re==&quot;object&quot;&amp;&amp;re!==null&amp;&amp;(h=yt(re));var de=a.getDerivedStateFromProps;re=typeof de==&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||W!==h)&amp;&amp;rf(s,u,n,h),Ws=!1;var se=s.memoizedState;u.state=se,an(s,n,u,o),sn(),W=s.memoizedState,N||se!==W||Ws?(typeof de==&quot;function&quot;&amp;&amp;(Wc(s,a,de,n),W=s.memoizedState),(O=Ws||nf(s,a,O,n,se,W,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=W),u.props=n,u.state=W,u.context=h,n=O):(typeof u.componentDidMount==&quot;function&quot;&amp;&amp;(s.flags|=4194308),n=!1)}else{u=s.stateNode,Tc(e,s),h=s.memoizedProps,re=Ra(a,h),u.props=re,de=s.pendingProps,se=u.context,W=a.contextType,O=ll,typeof W==&quot;object&quot;&amp;&amp;W!==null&amp;&amp;(O=yt(W)),N=a.getDerivedStateFromProps,(W=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!==de||se!==O)&amp;&amp;rf(s,u,n,O),Ws=!1,se=s.memoizedState,u.state=se,an(s,n,u,o),sn();var le=s.memoizedState;h!==de||se!==le||Ws||e!==null&amp;&amp;e.dependencies!==null&amp;&amp;dr(e.dependencies)?(typeof N==&quot;function&quot;&amp;&amp;(Wc(s,a,N,n),le=s.memoizedState),(re=Ws||nf(s,a,re,n,se,le,O)||e!==null&amp;&amp;e.dependencies!==null&amp;&amp;dr(e.dependencies))?(W||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,le,O),typeof u.UNSAFE_componentWillUpdate==&quot;function&quot;&amp;&amp;u.UNSAFE_componentWillUpdate(n,le,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=le),u.props=n,u.state=le,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,Tr(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 Nf(e,s,a,n){return Ca(),s.flags|=256,Nt(e,s,a,n),s.child}var lo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function no(e){return{baseLanes:e,cachePool:um()}}function ro(e,s,a){return e=e!==null?e.childLanes&amp;~a:0,s&amp;&amp;(e|=Qt),e}function _f(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=zx(e,ss),e=e!==null&amp;&amp;e.data!==&quot;&amp;&quot;?e:null,e!==null&amp;&amp;(s.memoizedState={dehydrated:e,treeContext:Ks!==null?{id:gs,overflow:bs}:null,retryLane:536870912,hydrationErrors:null},a=tm(e),a.return=s,s.child=a,vt=s,Ie=null)):e=null,e===null)throw Js(s);return Yo(e)?s.lanes=32:s.lanes=536870912,null}var N=n.children;return n=n.fallback,o?(aa(),o=s.mode,N=zr({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=no(a),n.childLanes=ro(e,h,a),s.memoizedState=lo,on(null,n)):(sa(s),io(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=co(e,s,a)):s.memoizedState!==null?(aa(),s.child=e.child,s.flags|=128,s=null):(aa(),N=n.fallback,o=s.mode,n=zr({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=no(a),n.childLanes=ro(e,h,a),s.memoizedState=lo,s=on(null,n));else if(sa(s),Yo(N)){if(h=N.nextSibling&amp;&amp;N.nextSibling.dataset,h)var W=h.dgst;h=W,n=Error(c(419)),n.stack=&quot;&quot;,n.digest=h,Fl({value:n,source:null,stack:null}),s=co(e,s,a)}else if(ut||cl(e,s,a,!1),h=(a&amp;e.childLanes)!==0,ut||h){if(h=Ke,h!==null&amp;&amp;(n=cd(h,a),n!==0&amp;&amp;n!==O.retryLane))throw O.retryLane=n,Sa(e,n),qt(h,e,n),so;Vo(N)||Br(),s=co(e,s,a)}else Vo(N)?(s.flags|=192,s.child=e.child,s=null):(e=O.treeContext,Ie=ls(N.nextSibling),vt=s,$e=!0,Fs=null,ss=!1,e!==null&amp;&amp;lm(s,e),s=io(s,n.children),s.flags|=4096);return s}return o?(aa(),N=n.fallback,o=s.mode,O=e.child,W=O.sibling,n=Cs(O,{mode:&quot;hidden&quot;,children:n.children}),n.subtreeFlags=O.subtreeFlags&amp;65011712,W!==null?N=Cs(W,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=no(a):(o=N.cachePool,o!==null?(O=ct._currentValue,o=o.parent!==O?{parent:O,pool:O}:o):o=um(),N={baseLanes:N.baseLanes|a,cachePool:o}),n.memoizedState=N,n.childLanes=ro(e,h,a),s.memoizedState=lo,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 io(e,s){return s=zr({mode:&quot;visible&quot;,children:s},e.mode),s.return=e,e.child=s}function zr(e,s){return e=Vt(22,e,null,s),e.lanes=0,e}function co(e,s,a){return Ma(s,e.child,null,a),e=io(s,s.pendingProps.children),e.flags|=2,s.memoizedState=null,e}function Sf(e,s,a){e.lanes|=s;var n=e.alternate;n!==null&amp;&amp;(n.lanes|=s),_c(e.return,s,a)}function oo(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 wf(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,K(rt,h),Nt(e,s,n,a),n=$e?Kl: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;Sf(e,a,s);else if(e.tag===19)Sf(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;jr(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),oo(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;jr(e)===null){s.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}oo(s,!0,a,null,u,n);break;case&quot;together&quot;:oo(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 uo(e,s){return(e.lanes&amp;s)!==0?!0:(e=e.dependencies,!!(e!==null&amp;&amp;dr(e)))}function gg(e,s,a){switch(s.tag){case 3:Ce(s,s.stateNode.containerInfo),Is(s,ct,e.memoizedState.cache),Ca();break;case 27:case 5:ft(s);break;case 4:Ce(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,Oc(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?_f(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 wf(e,s,a);s.flags|=128}if(o=s.memoizedState,o!==null&amp;&amp;(o.rendering=null,o.tail=null,o.lastEffect=null),K(rt,rt.current),n)break;return null;case 22:return s.lanes=0,gf(e,s,a,s.pendingProps);case 24:Is(s,ct,e.memoizedState.cache)}return Ms(e,s,a)}function Cf(e,s,a){if(e!==null)if(e.memoizedProps!==s.pendingProps)ut=!0;else{if(!uo(e,a)&amp;&amp;(s.flags&amp;128)===0)return ut=!1,gg(e,s,a);ut=(e.flags&amp;131072)!==0}else ut=!1,$e&amp;&amp;(s.flags&amp;1048576)!==0&amp;&amp;am(s,Kl,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;)hc(e)?(n=Ra(e,n),s.tag=1,s=yf(null,s,e,n,a)):(s.tag=0,s=ao(null,s,e,n,a));else{if(e!=null){var o=e.$$typeof;if(o===X){s.tag=11,s=xf(null,s,e,n,a);break e}else if(o===I){s.tag=14,s=hf(null,s,e,n,a);break e}}throw s=q(e)||e,Error(c(306,s,&quot;&quot;))}}return s;case 0:return ao(e,s,s.type,s.pendingProps,a);case 1:return n=s.type,o=Ra(n,s.pendingProps),yf(e,s,n,o,a);case 3:e:{if(Ce(s,s.stateNode.containerInfo),e===null)throw Error(c(387));n=s.pendingProps;var u=s.memoizedState;o=u.element,Tc(e,s),an(s,n,null,a);var h=s.memoizedState;if(n=h.cache,Is(s,ct,n),n!==u.cache&amp;&amp;Sc(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=Nf(e,s,n,a);break e}else if(n!==o){o=Wt(Error(c(424)),s),Fl(o),s=Nf(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,Fs=null,ss=!0,a=pm(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 Tr(e,s),e===null?(a=Ux(s.type,null,s.pendingProps,null))?s.memoizedState=a:$e||(a=s.type,e=s.pendingProps,n=Xr(ue.current).createElement(a),n[jt]=s,n[Dt]=e,_t(n,a,e),pt(n),s.stateNode=n):s.memoizedState=Ux(s.type,e.memoizedProps,s.pendingProps,e.memoizedState),null;case 27:return ft(s),e===null&amp;&amp;$e&amp;&amp;(n=s.stateNode=Rx(s.type,s.pendingProps,ue.current),vt=s,ss=!0,o=Ie,da(s.type)?(Go=o,Ie=ls(n.firstChild)):Ie=o),Nt(e,s,s.pendingProps.children,a),Tr(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=Xg(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,qo(o,u)?n=null:h!==null&amp;&amp;qo(o,h)&amp;&amp;(s.flags|=32),s.memoizedState!==null&amp;&amp;(o=Uc(e,s,cg,null,null,a),Sn._currentValue=o),Tr(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=Pg(a,s.pendingProps,ss),a!==null?(s.stateNode=a,vt=s,Ie=null,e=!0):e=!1),e||Js(s)),null;case 13:return _f(e,s,a);case 4:return Ce(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 xf(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 hf(e,s,s.type,s.pendingProps,a);case 15:return pf(e,s,s.type,s.pendingProps,a);case 19:return wf(e,s,a);case 31:return pg(e,s,a);case 22:return gf(e,s,a,s.pendingProps);case 24:return Aa(s),n=yt(ct),e===null?(o=Ec(),o===null&amp;&amp;(o=Ke,u=wc(),o.pooledCache=u,u.refCount++,u!==null&amp;&amp;(o.pooledCacheLanes|=a),o=u),s.memoizedState={parent:n,cache:o},kc(s),Is(s,ct,o)):((e.lanes&amp;a)!==0&amp;&amp;(Tc(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;Sc(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 mo(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(Wf())e.flags|=8192;else throw za=hr,Ac}else e.flags&amp;=-16777217}function Ef(e,s){if(s.type!==&quot;stylesheet&quot;||(s.state.loading&amp;4)!==0)e.flags&amp;=-16777217;else if(e.flags|=16777216,!Vx(s))if(Wf())e.flags|=8192;else throw za=hr,Ac}function Mr(e,s){s!==null&amp;&amp;(e.flags|=4),e.flags&amp;16384&amp;&amp;(s=e.tag!==22?nd():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 bg(e,s,a){var n=s.pendingProps;switch(jc(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,yc())),We(s),null;case 26:var o=s.type,u=s.memoizedState;return e===null?(Ds(s),u!==null?(We(s),Ef(s,u)):(We(s),mo(s,o,null,n,a))):u?u!==e.memoizedState?(Ds(s),We(s),Ef(s,u)):(We(s),s.flags&amp;=-16777217):(e=e.memoizedProps,e!==n&amp;&amp;Ds(s),We(s),mo(s,o,e,n,a)),null;case 27:if(Kt(s),a=ue.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=te.current,il(s)?nm(s):(e=Rx(o,n,a),s.stateNode=e,Ds(s))}return We(s),null;case 5:if(Kt(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=te.current,il(s))nm(s);else{var h=Xr(ue.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),mo(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=ue.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||_x(e.nodeValue,a)),e||Js(s,!0)}else e=Xr(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=yc(),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=yc(),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),Mr(s,s.updateQueue),We(s),null);case 4:return Me(),e===null&amp;&amp;Ro(s.stateNode.containerInfo),We(s),null;case 10:return ks(s.type),We(s),null;case 19:if(F(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=jr(e),u!==null){for(s.flags|=128,un(n,!1),e=u.updateQueue,s.updateQueue=e,Mr(s,e),s.subtreeFlags=0,e=a,a=s.child;a!==null;)em(a,e),a=a.sibling;return K(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;Ur&amp;&amp;(s.flags|=128,o=!0,un(n,!1),s.lanes=4194304)}else{if(!o)if(e=jr(u),e!==null){if(s.flags|=128,o=!0,e=e.updateQueue,s.updateQueue=e,Mr(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;Ur&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,K(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),Rc(),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;Mr(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;F(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 jg(e,s){switch(jc(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 Kt(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 F(rt),null;case 4:return Me(),null;case 10:return ks(s.type),null;case 22:case 23:return Gt(s),Rc(),e!==null&amp;&amp;F(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 Af(e,s){switch(jc(s),s.tag){case 3:ks(ct),Me();break;case 26:case 27:case 5:Kt(s);break;case 4:Me();break;case 31:s.memoizedState!==null&amp;&amp;Gt(s);break;case 13:Gt(s);break;case 19:F(rt);break;case 10:ks(s.type);break;case 22:case 23:Gt(s),Rc(),e!==null&amp;&amp;F(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,W=N;try{W()}catch(re){Ze(o,O,re)}}}n=n.next}while(n!==u)}}catch(re){Ze(s,s.return,re)}}function kf(e){var s=e.updateQueue;if(s!==null){var a=e.stateNode;try{bm(s,a)}catch(n){Ze(e,e.return,n)}}}function Tf(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 zf(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 fo(e,s,a){try{var n=e.stateNode;Hg(n,e.type,a,s),n[Dt]=s}catch(o){Ze(e,e.return,o)}}function Mf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&amp;&amp;da(e.type)||e.tag===4}function xo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Mf(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 ho(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(ho(e,s,a),e=e.sibling;e!==null;)ho(e,s,a),e=e.sibling}function Dr(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(Dr(e,s,a),e=e.sibling;e!==null;)Dr(e,s,a),e=e.sibling}function Df(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,po=!1,Rf=typeof WeakSet==&quot;function&quot;?WeakSet:Set,gt=null;function vg(e,s){if(e=e.containerInfo,Uo=ei,e=Zd(e),cc(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,W=0,re=0,de=e,se=null;t:for(;;){for(var le;de!==a||o!==0&amp;&amp;de.nodeType!==3||(N=h+o),de!==u||n!==0&amp;&amp;de.nodeType!==3||(O=h+n),de.nodeType===3&amp;&amp;(h+=de.nodeValue.length),(le=de.firstChild)!==null;)se=de,de=le;for(;;){if(de===e)break t;if(se===a&amp;&amp;++W===o&amp;&amp;(N=h),se===u&amp;&amp;++re===n&amp;&amp;(O=h),(le=de.nextSibling)!==null)break;de=se,se=de.parentNode}de=le}a=N===-1||O===-1?null:{start:N,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for($o={focusedElem:e,selectionRange:a},ei=!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(ve){Ze(a,a.return,ve)}}break;case 3:if((e&amp;1024)!==0){if(e=s.stateNode.containerInfo,a=e.nodeType,a===9)Ho(e);else if(a===1)switch(e.nodeName){case&quot;HEAD&quot;:case&quot;HTML&quot;:case&quot;BODY&quot;:Ho(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 Of(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;kf(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{bm(e,s)}catch(h){Ze(a,a.return,h)}}break;case 27:s===null&amp;&amp;n&amp;4&amp;&amp;Df(a);case 26:case 5:Ls(e,a),s===null&amp;&amp;n&amp;4&amp;&amp;zf(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;$f(e,a);break;case 13:Ls(e,a),n&amp;4&amp;&amp;qf(e,a),n&amp;64&amp;&amp;(e=a.memoizedState,e!==null&amp;&amp;(e=e.dehydrated,e!==null&amp;&amp;(a=kg.bind(null,a),Kg(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 Lf(e){var s=e.alternate;s!==null&amp;&amp;(e.alternate=null,Lf(s)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&amp;&amp;(s=e.stateNode,s!==null&amp;&amp;Zi(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;)Uf(e,s,a),a=a.sibling}function Uf(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,kx(e.nodeType===9?e.body:e.nodeName===&quot;HTML&quot;?e.ownerDocument.body:e,a.stateNode),Al(e)):kx(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;Tf(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 $f(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 qf(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 yg(e){switch(e.tag){case 31:case 13:case 19:var s=e.stateNode;return s===null&amp;&amp;(s=e.stateNode=new Rf),s;case 22:return e=e.stateNode,s=e._retryCache,s===null&amp;&amp;(s=e._retryCache=new Rf),s;default:throw Error(c(435,e.tag))}}function Rr(e,s){var a=yg(e);s.forEach(function(n){if(!a.has(n)){a.add(n);var o=Tg.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));Uf(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;)Bf(s,e),s=s.sibling}var ms=null;function Bf(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=Bx(&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=Bx(&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 Hx(o,e.type,e.stateNode);else e.stateNode=qx(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?Hx(o,e.type,e.stateNode):qx(o,n,e.memoizedProps)):n===null&amp;&amp;e.stateNode!==null&amp;&amp;fo(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;fo(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,fo(e,o,a!==null?a.memoizedProps:o)),n&amp;1024&amp;&amp;(po=!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(Fr=null,o=ms,ms=Pr(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)}po&amp;&amp;(po=!1,Hf(e));break;case 4:n=ms,ms=Pr(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,Rr(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;(Lr=et()),n&amp;4&amp;&amp;(n=e.updateQueue,n!==null&amp;&amp;(e.updateQueue=null,Rr(e,n)));break;case 22:o=e.memoizedState!==null;var O=a!==null&amp;&amp;a.memoizedState!==null,W=Rs,re=dt;if(Rs=W||o,dt=re||O,Lt(s,e),dt=re,Rs=W,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 de=O.memoizedProps.style,se=de!=null&amp;&amp;de.hasOwnProperty(&quot;display&quot;)?de.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 le=O.stateNode;o?Tx(le,!0):Tx(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,Rr(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,Rr(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(Mf(n)){a=n;break}n=n.return}if(a==null)throw Error(c(160));switch(a.tag){case 27:var o=a.stateNode,u=xo(e);Dr(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=xo(e);Dr(e,N,h);break;case 3:case 4:var O=a.stateNode.containerInfo,W=xo(e);ho(e,W,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 Hf(e){if(e.subtreeFlags&amp;1024)for(e=e.child;e!==null;){var s=e;Hf(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;)Of(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;Tf(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(W){Ze(n,n.return,W)}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++)gm(O[o],N)}catch(W){Ze(n,n.return,W)}}a&amp;&amp;h&amp;64&amp;&amp;kf(u),mn(u,u.return);break;case 27:Df(u);case 26:case 5:Us(o,u,a),a&amp;&amp;n===null&amp;&amp;h&amp;4&amp;&amp;zf(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;$f(o,u);break;case 13:Us(o,u,a),a&amp;&amp;h&amp;4&amp;&amp;qf(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 go(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 bo(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;)Vf(e,s,a,n),s=s.sibling}function Vf(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;go(h,s);break;case 24:fs(e,s,a,n),o&amp;2048&amp;&amp;bo(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,W=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;W&amp;2048&amp;&amp;go(h.alternate,h);break;case 24:gl(u,h,N,O,o),o&amp;&amp;W&amp;2048&amp;&amp;bo(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;go(n.alternate,n);break;case 24:fn(a,n),o&amp;2048&amp;&amp;bo(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;)Yf(e,s,a),e=e.sibling}function Yf(e,s,a){switch(e.tag){case 26:bl(e,s,a),e.flags&amp;xn&amp;&amp;e.memoizedState!==null&amp;&amp;ib(a,ms,e.memoizedState,e.memoizedProps);break;case 5:bl(e,s,a);break;case 3:case 4:var n=ms;ms=Pr(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 Gf(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,Qf(n,e)}Gf(e)}if(e.subtreeFlags&amp;10256)for(e=e.child;e!==null;)Zf(e),e=e.sibling}function Zf(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,Or(e)):hn(e);break;default:hn(e)}}function Or(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,Qf(n,e)}Gf(e)}for(e=e.child;e!==null;){switch(s=e,s.tag){case 0:case 11:case 15:la(8,s,s.return),Or(s);break;case 22:a=s.stateNode,a._visibility&amp;2&amp;&amp;(a._visibility&amp;=-3,Or(s));break;default:Or(s)}e=e.sibling}}function Qf(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(Lf(n),n===a){gt=null;break e}if(o!==null){o.return=u,gt=o;break e}gt=u}}}var Ng={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}},_g=typeof WeakMap==&quot;function&quot;?WeakMap:Map,Ye=0,Ke=null,De=null,Oe=0,Ge=0,Zt=null,na=!1,jl=!1,jo=!1,$s=0,lt=0,ra=0,La=0,vo=0,Qt=0,vl=0,pn=null,$t=null,yo=!1,Lr=0,Xf=0,Ur=1/0,$r=null,ia=null,mt=0,ca=null,yl=null,qs=0,No=0,_o=null,Pf=null,gn=0,So=null;function Xt(){return(Ye&amp;2)!==0&amp;&amp;Oe!==0?Oe&amp;-Oe:_.T!==null?To():od()}function Kf(){if(Qt===0)if((Oe&amp;536870912)===0||$e){var e=Qn;Qn&lt;&lt;=1,(Qn&amp;3932160)===0&amp;&amp;(Qn=262144),Qt=e}else Qt=536870912;return e=Yt.current,e!==null&amp;&amp;(e.flags|=32),Qt}function qt(e,s,a){(e===Ke&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!==Ke)&amp;&amp;(e===Ke&amp;&amp;((Ye&amp;2)===0&amp;&amp;(La|=a),lt===4&amp;&amp;oa(e,Oe,Qt,!1)),vs(e))}function Ff(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?Cg(e,s):Co(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;!Sg(a)){o=Co(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=Co(N,h,!1),h!==2){if(jo&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=Lr+300-et(),10&lt;o)){if(oa(n,s,Qt,!na),Pn(n,0,!0)!==0)break e;qs=s,n.timeoutHandle=Ex(Jf.bind(null,n,a,$t,$r,yo,s,Qt,La,vl,na,u,&quot;Throttled&quot;,-0,0),o);break e}Jf(n,a,$t,$r,yo,s,Qt,La,vl,na,u,null,-0,0)}}break}while(!0);vs(e)}function Jf(e,s,a,n,o,u,h,N,O,W,re,de,se,le){if(e.timeoutHandle=-1,de=s.subtreeFlags,de&amp;8192||(de&amp;16785408)===16785408){de={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ss},Yf(s,u,de);var pe=(u&amp;62914560)===u?Lr-et():(u&amp;4194048)===u?Xf-et():0;if(pe=cb(de,pe),pe!==null){qs=u,e.cancelPendingCommit=pe(nx.bind(null,e,s,u,a,n,o,h,N,O,re,de,null,se,le)),oa(e,u,h,!W);return}}nx(e,s,u,a,n,o,h,N,O)}function Sg(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;=~vo,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;rd(e,a,s)}function qr(){return(Ye&amp;6)===0?(bn(0),!1):!0}function wo(){if(De!==null){if(Ge===0)var e=De.return;else e=De,As=Ea=null,Bc(e),ml=null,Wl=0,e=De;for(;e!==null;)Af(e.alternate,e),e=e.return;De=null}}function Nl(e,s){var a=e.timeoutHandle;a!==-1&amp;&amp;(e.timeoutHandle=-1,Gg(a)),a=e.cancelPendingCommit,a!==null&amp;&amp;(e.cancelPendingCommit=null,a()),qs=0,wo(),Ke=e,De=a=Cs(e.current,null),Oe=s,Ge=0,Zt=null,na=!1,jl=Ll(e,s),jo=!1,vl=Qt=vo=La=ra=lt=0,$t=pn=null,yo=!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,rr(),a}function If(e,s){Te=null,_.H=cn,s===dl||s===xr?(s=fm(),Ge=3):s===Ac?(s=fm(),Ge=4):Ge=s===so?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,Ar(e,Wt(s,e.current)))}function Wf(){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 ex(){var e=_.H;return _.H=cn,e===null?cn:e}function tx(){var e=_.A;return _.A=Ng,e}function Br(){lt=4,na||(Oe&amp;4194048)!==Oe&amp;&amp;Yt.current!==null||(jl=!0),(ra&amp;134217727)===0&amp;&amp;(La&amp;134217727)===0||Ke===null||oa(Ke,Oe,Qt,!1)}function Co(e,s,a){var n=Ye;Ye|=2;var o=ex(),u=tx();(Ke!==e||Oe!==s)&amp;&amp;($r=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:wo(),h=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&amp;&amp;(s=!0);var W=Ge;if(Ge=0,Zt=null,_l(e,N,O,W),a&amp;&amp;jl){h=0;break e}break;default:W=Ge,Ge=0,Zt=null,_l(e,N,O,W)}}wg(),h=lt;break}catch(re){If(e,re)}while(!0);return s&amp;&amp;e.shellSuspendCounter++,As=Ea=null,Ye=n,_.H=o,_.A=u,De===null&amp;&amp;(Ke=null,Oe=0,rr()),h}function wg(){for(;De!==null;)sx(De)}function Cg(e,s){var a=Ye;Ye|=2;var n=ex(),o=tx();Ke!==e||Oe!==s?($r=null,Ur=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(dm(u)){Ge=0,Zt=null,ax(s);break}s=function(){Ge!==2&amp;&amp;Ge!==9||Ke!==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:dm(u)?(Ge=0,Zt=null,ax(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?Vx(h):N.stateNode.complete){Ge=0,Zt=null;var O=N.sibling;if(O!==null)De=O;else{var W=N.return;W!==null?(De=W,Hr(W)):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:wo(),lt=6;break e;default:throw Error(c(462))}}Eg();break}catch(re){If(e,re)}while(!0);return As=Ea=null,_.H=n,_.A=o,Ye=a,De!==null?0:(Ke=null,Oe=0,rr(),lt)}function Eg(){for(;De!==null&amp;&amp;!nt();)sx(De)}function sx(e){var s=Cf(e.alternate,e,$s);e.memoizedProps=e.pendingProps,s===null?Hr(e):De=s}function ax(e){var s=e,a=s.alternate;switch(s.tag){case 15:case 0:s=vf(a,s,s.pendingProps,s.type,void 0,Oe);break;case 11:s=vf(a,s,s.pendingProps,s.type.render,s.ref,Oe);break;case 5:Bc(s);default:Af(a,s),s=De=em(s,$s),s=Cf(a,s,$s)}e.memoizedProps=e.pendingProps,s===null?Hr(e):De=s}function _l(e,s,a,n){As=Ea=null,Bc(s),ml=null,Wl=0;var o=s.return;try{if(hg(e,o,s,a,Oe)){lt=1,Ar(e,Wt(a,e.current)),De=null;return}}catch(u){if(o!==null)throw De=o,u;lt=1,Ar(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))),lx(s,e)):Hr(s)}function Hr(e){var s=e;do{if((s.flags&amp;32768)!==0){lx(s,na);return}e=s.return;var a=bg(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 lx(e,s){do{var a=jg(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 nx(e,s,a,n,o,u,h,N,O){e.cancelPendingCommit=null;do Vr();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|=fc,r0(e,a,u,h,N,O),e===Ke&amp;&amp;(De=Ke=null,Oe=0),yl=s,ca=e,qs=a,No=u,_o=o,Pf=n,(s.subtreeFlags&amp;10256)!==0||(s.flags&amp;10256)!==0?(e.callbackNode=null,e.callbackPriority=0,zg(Zs,function(){return ux(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(s.flags&amp;13878)!==0,(s.subtreeFlags&amp;13878)!==0||n){n=_.T,_.T=null,o=T.p,T.p=2,h=Ye,Ye|=4;try{vg(e,s,a)}finally{Ye=h,T.p=o,_.T=n}}mt=1,rx(),ix(),cx()}}function rx(){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=T.p;T.p=2;var o=Ye;Ye|=4;try{Bf(s,e);var u=$o,h=Zd(e.containerInfo),N=u.focusedElem,O=u.selectionRange;if(h!==N&amp;&amp;N&amp;&amp;N.ownerDocument&amp;&amp;Gd(N.ownerDocument.documentElement,N)){if(O!==null&amp;&amp;cc(N)){var W=O.start,re=O.end;if(re===void 0&amp;&amp;(re=W),&quot;selectionStart&quot;in N)N.selectionStart=W,N.selectionEnd=Math.min(re,N.value.length);else{var de=N.ownerDocument||document,se=de&amp;&amp;de.defaultView||window;if(se.getSelection){var le=se.getSelection(),pe=N.textContent.length,ve=Math.min(O.start,pe),Pe=O.end===void 0?ve:Math.min(O.end,pe);!le.extend&amp;&amp;ve&gt;Pe&amp;&amp;(h=Pe,Pe=ve,ve=h);var P=Yd(N,ve),V=Yd(N,Pe);if(P&amp;&amp;V&amp;&amp;(le.rangeCount!==1||le.anchorNode!==P.node||le.anchorOffset!==P.offset||le.focusNode!==V.node||le.focusOffset!==V.offset)){var J=de.createRange();J.setStart(P.node,P.offset),le.removeAllRanges(),ve&gt;Pe?(le.addRange(J),le.extend(V.node,V.offset)):(J.setEnd(V.node,V.offset),le.addRange(J))}}}}for(de=[],le=N;le=le.parentNode;)le.nodeType===1&amp;&amp;de.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof N.focus==&quot;function&quot;&amp;&amp;N.focus(),N=0;N&lt;de.length;N++){var oe=de[N];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}ei=!!Uo,$o=Uo=null}finally{Ye=o,T.p=n,_.T=a}}e.current=s,mt=2}}function ix(){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=T.p;T.p=2;var o=Ye;Ye|=4;try{Of(e,s.alternate,s)}finally{Ye=o,T.p=n,_.T=a}}mt=3}}function cx(){if(mt===4||mt===3){mt=0,us();var e=ca,s=yl,a=qs,n=Pf;(s.subtreeFlags&amp;10256)!==0||(s.flags&amp;10256)!==0?mt=5:(mt=0,yl=ca=null,ox(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&amp;&amp;(ia=null),Yi(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=T.p,T.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,T.p=o}}(qs&amp;3)!==0&amp;&amp;Vr(),vs(e),o=e.pendingLanes,(a&amp;261930)!==0&amp;&amp;(o&amp;42)!==0?e===So?gn++:(gn=0,So=e):gn=0,bn(0)}}function ox(e,s){(e.pooledCacheLanes&amp;=s)===0&amp;&amp;(s=e.pooledCache,s!=null&amp;&amp;(e.pooledCache=null,Jl(s)))}function Vr(){return rx(),ix(),cx(),ux()}function ux(){if(mt!==5)return!1;var e=ca,s=No;No=0;var a=Yi(qs),n=_.T,o=T.p;try{T.p=32&gt;a?32:a,_.T=null,a=_o,_o=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,Zf(u.current),Vf(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{T.p=o,_.T=n,ox(e,s)}}function dx(e,s,a){s=Wt(a,s),s=to(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)dx(e,e,a);else for(;s!==null;){if(s.tag===3){dx(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=mf(2),n=ta(s,a,2),n!==null&amp;&amp;(ff(a,n,s,e),Ul(n,2),vs(n));break}}s=s.return}}function Eo(e,s,a){var n=e.pingCache;if(n===null){n=e.pingCache=new _g;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)||(jo=!0,o.add(a),e=Ag.bind(null,e,s,a),s.then(e,e))}function Ag(e,s,a){var n=e.pingCache;n!==null&amp;&amp;n.delete(s),e.pingedLanes|=e.suspendedLanes&amp;a,e.warmLanes&amp;=~a,Ke===e&amp;&amp;(Oe&amp;a)===a&amp;&amp;(lt===4||lt===3&amp;&amp;(Oe&amp;62914560)===Oe&amp;&amp;300&gt;et()-Lr?(Ye&amp;2)===0&amp;&amp;Nl(e,0):vo|=a,vl===Oe&amp;&amp;(vl=0)),vs(e)}function mx(e,s){s===0&amp;&amp;(s=nd()),e=Sa(e,s),e!==null&amp;&amp;(Ul(e,s),vs(e))}function kg(e){var s=e.memoizedState,a=0;s!==null&amp;&amp;(a=s.retryLane),mx(e,a)}function Tg(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),mx(e,a)}function zg(e,s){return zt(e,s)}var Yr=null,Sl=null,Ao=!1,Gr=!1,ko=!1,ua=0;function vs(e){e!==Sl&amp;&amp;e.next===null&amp;&amp;(Sl===null?Yr=Sl=e:Sl=Sl.next=e),Gr=!0,Ao||(Ao=!0,Dg())}function bn(e,s){if(!ko&amp;&amp;Gr){ko=!0;do for(var a=!1,n=Yr;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,px(n,u))}else u=Oe,u=Pn(n,n===Ke?u:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(u&amp;3)===0||Ll(n,u)||(a=!0,px(n,u));n=n.next}while(a);ko=!1}}function Mg(){fx()}function fx(){Gr=Ao=!1;var e=0;ua!==0&amp;&amp;Yg()&amp;&amp;(e=ua);for(var s=et(),a=null,n=Yr;n!==null;){var o=n.next,u=xx(n,s);u===0?(n.next=null,a===null?Yr=o:a.next=o,o===null&amp;&amp;(Sl=a)):(a=n,(e!==0||(u&amp;3)!==0)&amp;&amp;(Gr=!0)),n=o}mt!==0&amp;&amp;mt!==5||bn(e),ua!==0&amp;&amp;(ua=0)}function xx(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]=n0(N,s)):O&lt;=s&amp;&amp;(e.expiredLanes|=N),u&amp;=~N}if(s=Ke,a=Oe,a=Pn(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),Yi(a)){case 2:case 8:a=At;break;case 32:a=Zs;break;case 268435456:a=Va;break;default:a=Zs}return n=hx.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 hx(e,s){if(mt!==0&amp;&amp;mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Vr()&amp;&amp;e.callbackNode!==a)return null;var n=Oe;return n=Pn(e,e===Ke?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(Ff(e,n,s),xx(e,et()),e.callbackNode!=null&amp;&amp;e.callbackNode===a?hx.bind(null,e):null)}function px(e,s){if(Vr())return null;Ff(e,s,!0)}function Dg(){Zg(function(){(Ye&amp;6)!==0?zt(Ns,Mg):fx()})}function To(){if(ua===0){var e=ol;e===0&amp;&amp;(e=Zn,Zn&lt;&lt;=1,(Zn&amp;261888)===0&amp;&amp;(Zn=256)),ua=e}return ua}function gx(e){return e==null||typeof e==&quot;symbol&quot;||typeof e==&quot;boolean&quot;?null:typeof e==&quot;function&quot;?e:In(&quot;&quot;+e)}function bx(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 Rg(e,s,a,n,o){if(s===&quot;submit&quot;&amp;&amp;a&amp;&amp;a.stateNode===o){var u=gx((o[Dt]||null).action),h=n.submitter;h&amp;&amp;(s=(s=h[Dt]||null)?gx(s.formAction):h.getAttribute(&quot;formAction&quot;),s!==null&amp;&amp;(u=s,h=null));var N=new sr(&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?bx(o,h):new FormData(o);Kc(a,{pending:!0,data:O,method:o.method,action:u},null,O)}}else typeof u==&quot;function&quot;&amp;&amp;(N.preventDefault(),O=h?bx(o,h):new FormData(o),Kc(a,{pending:!0,data:O,method:o.method,action:u},u,O))},currentTarget:o}]})}}for(var zo=0;zo&lt;mc.length;zo++){var Mo=mc[zo],Og=Mo.toLowerCase(),Lg=Mo[0].toUpperCase()+Mo.slice(1);ds(Og,&quot;on&quot;+Lg)}ds(Pd,&quot;onAnimationEnd&quot;),ds(Kd,&quot;onAnimationIteration&quot;),ds(Fd,&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(I0,&quot;onTransitionRun&quot;),ds(W0,&quot;onTransitionStart&quot;),ds(eg,&quot;onTransitionCancel&quot;),ds(Jd,&quot;onTransitionEnd&quot;),Ka(&quot;onMouseEnter&quot;,[&quot;mouseout&quot;,&quot;mouseover&quot;]),Ka(&quot;onMouseLeave&quot;,[&quot;mouseout&quot;,&quot;mouseover&quot;]),Ka(&quot;onPointerEnter&quot;,[&quot;pointerout&quot;,&quot;pointerover&quot;]),Ka(&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;),Ug=new Set(&quot;beforetoggle cancel close invalid load scroll scrollend toggle&quot;.split(&quot; &quot;).concat(jn));function jx(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,W=N.currentTarget;if(N=N.listener,O!==u&amp;&amp;o.isPropagationStopped())break e;u=N,o.currentTarget=W;try{u(o)}catch(re){nr(re)}o.currentTarget=null,u=O}else for(h=0;h&lt;n.length;h++){if(N=n[h],O=N.instance,W=N.currentTarget,N=N.listener,O!==u&amp;&amp;o.isPropagationStopped())break e;u=N,o.currentTarget=W;try{u(o)}catch(re){nr(re)}o.currentTarget=null,u=O}}}}function Re(e,s){var a=s[Gi];a===void 0&amp;&amp;(a=s[Gi]=new Set);var n=e+&quot;__bubble&quot;;a.has(n)||(vx(s,e,2,!1),a.add(n))}function Do(e,s,a){var n=0;s&amp;&amp;(n|=4),vx(a,e,n,s)}var Zr=&quot;_reactListening&quot;+Math.random().toString(36).slice(2);function Ro(e){if(!e[Zr]){e[Zr]=!0,md.forEach(function(a){a!==&quot;selectionchange&quot;&amp;&amp;(Ug.has(a)||Do(a,!1,e),Do(a,!0,e))});var s=e.nodeType===9?e:e.ownerDocument;s===null||s[Zr]||(s[Zr]=!0,Do(&quot;selectionchange&quot;,!1,s))}}function vx(e,s,a,n){switch(Kx(s)){case 2:var o=db;break;case 8:o=mb;break;default:o=Ko}a=o.bind(null,s,a,e),o=void 0,!Wi||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 Oo(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}Sd(function(){var W=u,re=Ji(a),de=[];e:{var se=Id.get(e);if(se!==void 0){var le=sr,pe=e;switch(e){case&quot;keypress&quot;:if(er(a)===0)break e;case&quot;keydown&quot;:case&quot;keyup&quot;:le=T0;break;case&quot;focusin&quot;:pe=&quot;focus&quot;,le=ac;break;case&quot;focusout&quot;:pe=&quot;blur&quot;,le=ac;break;case&quot;beforeblur&quot;:case&quot;afterblur&quot;:le=ac;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;:le=Ed;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;:le=b0;break;case&quot;touchcancel&quot;:case&quot;touchend&quot;:case&quot;touchmove&quot;:case&quot;touchstart&quot;:le=D0;break;case Pd:case Kd:case Fd:le=y0;break;case Jd:le=O0;break;case&quot;scroll&quot;:case&quot;scrollend&quot;:le=p0;break;case&quot;wheel&quot;:le=U0;break;case&quot;copy&quot;:case&quot;cut&quot;:case&quot;paste&quot;:le=_0;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;:le=kd;break;case&quot;toggle&quot;:case&quot;beforetoggle&quot;:le=q0}var ve=(s&amp;4)!==0,Pe=!ve&amp;&amp;(e===&quot;scroll&quot;||e===&quot;scrollend&quot;),P=ve?se!==null?se+&quot;Capture&quot;:null:se;ve=[];for(var V=W,J;V!==null;){var oe=V;if(J=oe.stateNode,oe=oe.tag,oe!==5&amp;&amp;oe!==26&amp;&amp;oe!==27||J===null||P===null||(oe=Bl(V,P),oe!=null&amp;&amp;ve.push(vn(V,oe,J))),Pe)break;V=V.return}0&lt;ve.length&amp;&amp;(se=new le(se,pe,null,a,re),de.push({event:se,listeners:ve}))}}if((s&amp;7)===0){e:{if(se=e===&quot;mouseover&quot;||e===&quot;pointerover&quot;,le=e===&quot;mouseout&quot;||e===&quot;pointerout&quot;,se&amp;&amp;a!==Fi&amp;&amp;(pe=a.relatedTarget||a.fromElement)&amp;&amp;(Qa(pe)||pe[Za]))break e;if((le||se)&amp;&amp;(se=re.window===re?re:(se=re.ownerDocument)?se.defaultView||se.parentWindow:window,le?(pe=a.relatedTarget||a.toElement,le=W,pe=pe?Qa(pe):null,pe!==null&amp;&amp;(Pe=f(pe),ve=pe.tag,pe!==Pe||ve!==5&amp;&amp;ve!==27&amp;&amp;ve!==6)&amp;&amp;(pe=null)):(le=null,pe=W),le!==pe)){if(ve=Ed,oe=&quot;onMouseLeave&quot;,P=&quot;onMouseEnter&quot;,V=&quot;mouse&quot;,(e===&quot;pointerout&quot;||e===&quot;pointerover&quot;)&amp;&amp;(ve=kd,oe=&quot;onPointerLeave&quot;,P=&quot;onPointerEnter&quot;,V=&quot;pointer&quot;),Pe=le==null?se:ql(le),J=pe==null?se:ql(pe),se=new ve(oe,V+&quot;leave&quot;,le,a,re),se.target=Pe,se.relatedTarget=J,oe=null,Qa(re)===W&amp;&amp;(ve=new ve(P,V+&quot;enter&quot;,pe,a,re),ve.target=J,ve.relatedTarget=Pe,oe=ve),Pe=oe,le&amp;&amp;pe)t:{for(ve=$g,P=le,V=pe,J=0,oe=P;oe;oe=ve(oe))J++;oe=0;for(var je=V;je;je=ve(je))oe++;for(;0&lt;J-oe;)P=ve(P),J--;for(;0&lt;oe-J;)V=ve(V),oe--;for(;J--;){if(P===V||V!==null&amp;&amp;P===V.alternate){ve=P;break t}P=ve(P),V=ve(V)}ve=null}else ve=null;le!==null&amp;&amp;yx(de,se,le,ve,!1),pe!==null&amp;&amp;Pe!==null&amp;&amp;yx(de,Pe,pe,ve,!0)}}e:{if(se=W?ql(W):window,le=se.nodeName&amp;&amp;se.nodeName.toLowerCase(),le===&quot;select&quot;||le===&quot;input&quot;&amp;&amp;se.type===&quot;file&quot;)var Be=Ud;else if(Od(se))if($d)Be=K0;else{Be=X0;var ge=Q0}else le=se.nodeName,!le||le.toLowerCase()!==&quot;input&quot;||se.type!==&quot;checkbox&quot;&amp;&amp;se.type!==&quot;radio&quot;?W&amp;&amp;Ki(W.elementType)&amp;&amp;(Be=Ud):Be=P0;if(Be&amp;&amp;(Be=Be(e,W))){Ld(de,Be,a,re);break e}ge&amp;&amp;ge(e,se,W),e===&quot;focusout&quot;&amp;&amp;W&amp;&amp;se.type===&quot;number&quot;&amp;&amp;W.memoizedProps.value!=null&amp;&amp;Pi(se,&quot;number&quot;,se.value)}switch(ge=W?ql(W):window,e){case&quot;focusin&quot;:(Od(ge)||ge.contentEditable===&quot;true&quot;)&amp;&amp;(tl=ge,oc=W,Pl=null);break;case&quot;focusout&quot;:Pl=oc=tl=null;break;case&quot;mousedown&quot;:uc=!0;break;case&quot;contextmenu&quot;:case&quot;mouseup&quot;:case&quot;dragend&quot;:uc=!1,Qd(de,a,re);break;case&quot;selectionchange&quot;:if(J0)break;case&quot;keydown&quot;:case&quot;keyup&quot;:Qd(de,a,re)}var ze;if(nc)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?Dd(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;(Td&amp;&amp;a.locale!==&quot;ko&quot;&amp;&amp;(el||Le!==&quot;onCompositionStart&quot;?Le===&quot;onCompositionEnd&quot;&amp;&amp;el&amp;&amp;(ze=wd()):(Ps=re,ec=&quot;value&quot;in Ps?Ps.value:Ps.textContent,el=!0)),ge=Qr(W,Le),0&lt;ge.length&amp;&amp;(Le=new Ad(Le,e,null,a,re),de.push({event:Le,listeners:ge}),ze?Le.data=ze:(ze=Rd(a),ze!==null&amp;&amp;(Le.data=ze)))),(ze=H0?V0(e,a):Y0(e,a))&amp;&amp;(Le=Qr(W,&quot;onBeforeInput&quot;),0&lt;Le.length&amp;&amp;(ge=new Ad(&quot;onBeforeInput&quot;,&quot;beforeinput&quot;,null,a,re),de.push({event:ge,listeners:Le}),ge.data=ze)),Rg(de,e,W,a,re)}jx(de,s)})}function vn(e,s,a){return{instance:e,listener:s,currentTarget:a}}function Qr(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 $g(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 yx(e,s,a,n,o){for(var u=s._reactName,h=[];a!==null&amp;&amp;a!==n;){var N=a,O=N.alternate,W=N.stateNode;if(N=N.tag,O!==null&amp;&amp;O===n)break;N!==5&amp;&amp;N!==26&amp;&amp;N!==27||W===null||(O=W,o?(W=Bl(a,u),W!=null&amp;&amp;h.unshift(vn(a,W,O))):o||(W=Bl(a,u),W!=null&amp;&amp;h.push(vn(a,W,O)))),a=a.return}h.length!==0&amp;&amp;e.push({event:s,listeners:h})}var qg=/\r\n?/g,Bg=/\u0000|\uFFFD/g;function Nx(e){return(typeof e==&quot;string&quot;?e:&quot;&quot;+e).replace(qg,`
`).replace(Bg,&quot;&quot;)}function _x(e,s){return s=Nx(s),Nx(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;:Fn(e,&quot;class&quot;,n);break;case&quot;tabIndex&quot;:Fn(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;:Fn(e,a,n);break;case&quot;style&quot;:Nd(e,n,u);break;case&quot;data&quot;:if(s!==&quot;object&quot;){Fn(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=In(&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=In(&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=In(&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),Kn(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;:Kn(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=x0.get(a)||a,Kn(e,a,n))}}function Lo(e,s,a,n,o,u){switch(a){case&quot;style&quot;:Nd(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(!fd.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;):Kn(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,W=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;:W=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)}}bd(e,u,N,O,W,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?Fa(e,!!n,s,!1):a!=null&amp;&amp;Fa(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)}vd(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(W in a)if(a.hasOwnProperty(W)&amp;&amp;(n=a[W],n!=null))switch(W){case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:throw Error(c(137,s));default:Xe(e,s,W,n,a,null)}return;default:if(Ki(s)){for(re in a)a.hasOwnProperty(re)&amp;&amp;(n=a[re],n!==void 0&amp;&amp;Lo(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 Hg(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,W=null,re=null;for(le in a){var de=a[le];if(a.hasOwnProperty(le)&amp;&amp;de!=null)switch(le){case&quot;checked&quot;:break;case&quot;value&quot;:break;case&quot;defaultValue&quot;:O=de;default:n.hasOwnProperty(le)||Xe(e,s,le,null,n,de)}}for(var se in n){var le=n[se];if(de=a[se],n.hasOwnProperty(se)&amp;&amp;(le!=null||de!=null))switch(se){case&quot;type&quot;:u=le;break;case&quot;name&quot;:o=le;break;case&quot;checked&quot;:W=le;break;case&quot;defaultChecked&quot;:re=le;break;case&quot;value&quot;:h=le;break;case&quot;defaultValue&quot;:N=le;break;case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:if(le!=null)throw Error(c(137,s));break;default:le!==de&amp;&amp;Xe(e,s,se,le,n,de)}}Xi(e,h,N,O,W,re,u,o);return;case&quot;select&quot;:le=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;:le=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=le,se!=null?Fa(e,!!a,se,!1):!!n!=!!a&amp;&amp;(s!=null?Fa(e,!!a,s,!0):Fa(e,!!a,a?[]:&quot;&quot;,!1));return;case&quot;textarea&quot;:le=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;:le=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)}jd(e,se,le);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],le=a[O],n.hasOwnProperty(O)&amp;&amp;se!==le&amp;&amp;(se!=null||le!=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,le)}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 ve in a)se=a[ve],a.hasOwnProperty(ve)&amp;&amp;se!=null&amp;&amp;!n.hasOwnProperty(ve)&amp;&amp;Xe(e,s,ve,null,n,se);for(W in n)if(se=n[W],le=a[W],n.hasOwnProperty(W)&amp;&amp;se!==le&amp;&amp;(se!=null||le!=null))switch(W){case&quot;children&quot;:case&quot;dangerouslySetInnerHTML&quot;:if(se!=null)throw Error(c(137,s));break;default:Xe(e,s,W,se,n,le)}return;default:if(Ki(s)){for(var Pe in a)se=a[Pe],a.hasOwnProperty(Pe)&amp;&amp;se!==void 0&amp;&amp;!n.hasOwnProperty(Pe)&amp;&amp;Lo(e,s,Pe,void 0,n,se);for(re in n)se=n[re],le=a[re],!n.hasOwnProperty(re)||se===le||se===void 0&amp;&amp;le===void 0||Lo(e,s,re,se,n,le);return}}for(var P in a)se=a[P],a.hasOwnProperty(P)&amp;&amp;se!=null&amp;&amp;!n.hasOwnProperty(P)&amp;&amp;Xe(e,s,P,null,n,se);for(de in n)se=n[de],le=a[de],!n.hasOwnProperty(de)||se===le||se==null&amp;&amp;le==null||Xe(e,s,de,se,n,le)}function Sx(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 Vg(){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;Sx(h)){for(h=0,N=o.responseEnd,n+=1;n&lt;a.length;n++){var O=a[n],W=O.startTime;if(W&gt;N)break;var re=O.transferSize,de=O.initiatorType;re&amp;&amp;Sx(de)&amp;&amp;(O=O.responseEnd,h+=re*(O&lt;N?1:(N-W)/(O-W)))}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 Uo=null,$o=null;function Xr(e){return e.nodeType===9?e:e.ownerDocument}function wx(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 Cx(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 qo(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 Bo=null;function Yg(){var e=window.event;return e&amp;&amp;e.type===&quot;popstate&quot;?e===Bo?!1:(Bo=e,!0):(Bo=null,!1)}var Ex=typeof setTimeout==&quot;function&quot;?setTimeout:void 0,Gg=typeof clearTimeout==&quot;function&quot;?clearTimeout:void 0,Ax=typeof Promise==&quot;function&quot;?Promise:void 0,Zg=typeof queueMicrotask==&quot;function&quot;?queueMicrotask:typeof Ax&lt;&quot;u&quot;?function(e){return Ax.resolve(null).then(e).catch(Qg)}:Ex;function Qg(e){setTimeout(function(){throw e})}function da(e){return e===&quot;head&quot;}function kx(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 Tx(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 Ho(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;:Ho(a),Zi(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 Xg(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 Pg(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 zx(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 Vo(e){return e.data===&quot;$?&quot;||e.data===&quot;$~&quot;}function Yo(e){return e.data===&quot;$!&quot;||e.data===&quot;$?&quot;&amp;&amp;e.ownerDocument.readyState!==&quot;loading&quot;}function Kg(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 Go=null;function Mx(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 Dx(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 Rx(e,s,a){switch(s=Xr(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]);Zi(e)}var ns=new Map,Ox=new Set;function Pr(e){return typeof e.getRootNode==&quot;function&quot;?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Bs=T.d;T.d={f:Fg,r:Jg,D:Ig,C:Wg,L:eb,m:tb,X:ab,S:sb,M:lb};function Fg(){var e=Bs.f(),s=qr();return e||s}function Jg(e){var s=Xa(e);s!==null&amp;&amp;s.tag===5&amp;&amp;s.type===&quot;form&quot;?Jm(s):Bs.r(e)}var wl=typeof document&gt;&quot;u&quot;?null:document;function Lx(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;),Ox.has(o)||(Ox.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 Ig(e){Bs.D(e),Lx(&quot;dns-prefetch&quot;,e,null)}function Wg(e,s){Bs.C(e,s),Lx(&quot;preconnect&quot;,e,s)}function eb(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 tb(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 sb(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;Zo(e,a);var O=h=n.createElement(&quot;link&quot;);pt(O),_t(O,&quot;link&quot;,e),O._p=new Promise(function(W,re){O.onload=W,O.onerror=re}),O.addEventListener(&quot;load&quot;,function(){N.loading|=1}),O.addEventListener(&quot;error&quot;,function(){N.loading|=2}),N.loading|=4,Kr(h,s,n)}h={type:&quot;stylesheet&quot;,instance:h,count:1,state:N},o.set(u,h)}}}function ab(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;Qo(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 lb(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;Qo(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 Ux(e,s,a,n){var o=(o=ue.current)?Pr(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||nb(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 $x(e){return j({},e,{&quot;data-precedence&quot;:e.precedence,precedence:null})}function nb(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 qx(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),Kr(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=$x(a),(o=ns.get(o))&amp;&amp;Zo(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,Kr(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),Qo(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,Kr(n,a.precedence,e));return s.instance}function Kr(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 Zo(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 Qo(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 Fr=null;function Bx(e,s,a){if(Fr===null){var n=new Map,o=Fr=new Map;o.set(a,n)}else o=Fr,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 Hx(e,s,a){e=e.ownerDocument||e,e.head.insertBefore(a,s===&quot;title&quot;?e.querySelector(&quot;head &gt; title&quot;):null)}function rb(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 Vx(e){return!(e.type===&quot;stylesheet&quot;&amp;&amp;(e.state.loading&amp;3)===0)}function ib(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=Jr.bind(e),s.then(e,e)),a.state.loading|=4,a.instance=u,pt(u);return}u=s.ownerDocument||s,n=$x(n),(o=ns.get(o))&amp;&amp;Zo(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=Jr.bind(e),s.addEventListener(&quot;load&quot;,a),s.addEventListener(&quot;error&quot;,a))}}var Xo=0;function cb(e,s){return e.stylesheets&amp;&amp;e.count===0&amp;&amp;Wr(e,e.stylesheets),0&lt;e.count||0&lt;e.imgCount?function(a){var n=setTimeout(function(){if(e.stylesheets&amp;&amp;Wr(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+s);0&lt;e.imgBytes&amp;&amp;Xo===0&amp;&amp;(Xo=62500*Vg());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&amp;&amp;(e.stylesheets&amp;&amp;Wr(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes&gt;Xo?50:800)+s);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(o)}}:null}function Jr(){if(this.count--,this.count===0&amp;&amp;(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ir=null;function Wr(e,s){e.stylesheets=null,e.unsuspend!==null&amp;&amp;(e.count++,Ir=new Map,s.forEach(ob,e),Ir=null,Jr.call(e))}function ob(e,s){if(!(s.state.loading&amp;4)){var a=Ir.get(e);if(a)var n=a.get(null);else{a=new Map,Ir.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=Jr.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:z,Provider:null,Consumer:null,_currentValue:M,_currentValue2:M,_threadCount:0};function ub(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=Hi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hi(0),this.hiddenUpdates=Hi(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 Yx(e,s,a,n,o,u,h,N,O,W,re,de){return e=new ub(e,s,a,h,O,W,re,de,N),s=1,u===!0&amp;&amp;(s|=24),u=Vt(3,null,null,s),e.current=u,u.stateNode=e,s=wc(),s.refCount++,e.pooledCache=s,s.refCount++,u.memoizedState={element:n,isDehydrated:a,cache:s},kc(u),e}function Gx(e){return e?(e=ll,e):ll}function Zx(e,s,a,n,o,u){o=Gx(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 Qx(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 Po(e,s){Qx(e,s),(e=e.alternate)&amp;&amp;Qx(e,s)}function Xx(e){if(e.tag===13||e.tag===31){var s=Sa(e,67108864);s!==null&amp;&amp;qt(s,e,67108864),Po(e,67108864)}}function Px(e){if(e.tag===13||e.tag===31){var s=Xt();s=Vi(s);var a=Sa(e,s);a!==null&amp;&amp;qt(a,e,s),Po(e,s)}}var ei=!0;function db(e,s,a,n){var o=_.T;_.T=null;var u=T.p;try{T.p=2,Ko(e,s,a,n)}finally{T.p=u,_.T=o}}function mb(e,s,a,n){var o=_.T;_.T=null;var u=T.p;try{T.p=8,Ko(e,s,a,n)}finally{T.p=u,_.T=o}}function Ko(e,s,a,n){if(ei){var o=Fo(n);if(o===null)Oo(e,s,n,ti,a),Fx(e,n);else if(xb(o,e,s,a,n))n.stopPropagation();else if(Fx(e,n),s&amp;4&amp;&amp;-1&lt;fb.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;(Ur=et()+500,bn(0))}}break;case 31:case 13:N=Sa(u,2),N!==null&amp;&amp;qt(N,u,2),qr(),Po(u,2)}if(u=Fo(n),u===null&amp;&amp;Oo(e,s,n,ti,a),u===o)break;o=u}o!==null&amp;&amp;n.stopPropagation()}else Oo(e,s,n,null,a)}}function Fo(e){return e=Ji(e),Jo(e)}var ti=null;function Jo(e){if(ti=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 ti=e,null}function Kx(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 Io=!1,ma=null,fa=null,xa=null,wn=new Map,Cn=new Map,ha=[],fb=&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 Fx(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;Xx(s)),e):(e.eventSystemFlags|=n,s=e.targetContainers,o!==null&amp;&amp;s.indexOf(o)===-1&amp;&amp;s.push(o),e)}function xb(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 Jx(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,ud(e.priority,function(){Px(a)});return}}else if(s===31){if(s=b(a),s!==null){e.blockedOn=s,ud(e.priority,function(){Px(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 si(e){if(e.blockedOn!==null)return!1;for(var s=e.targetContainers;0&lt;s.length;){var a=Fo(e.nativeEvent);if(a===null){a=e.nativeEvent;var n=new a.constructor(a.type,a);Fi=n,a.target.dispatchEvent(n),Fi=null}else return s=Xa(a),s!==null&amp;&amp;Xx(s),e.blockedOn=a,!1;s.shift()}return!0}function Ix(e,s,a){si(e)&amp;&amp;a.delete(s)}function hb(){Io=!1,ma!==null&amp;&amp;si(ma)&amp;&amp;(ma=null),fa!==null&amp;&amp;si(fa)&amp;&amp;(fa=null),xa!==null&amp;&amp;si(xa)&amp;&amp;(xa=null),wn.forEach(Ix),Cn.forEach(Ix)}function ai(e,s){e.blockedOn===s&amp;&amp;(e.blockedOn=null,Io||(Io=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,hb)))}var li=null;function Wx(e){li!==e&amp;&amp;(li=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){li===e&amp;&amp;(li=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(Jo(n||a)===null)continue;break}var u=Xa(a);u!==null&amp;&amp;(e.splice(s,3),s-=3,Kc(u,{pending:!0,data:o,method:a.method,action:n},n,o))}}))}function Al(e){function s(O){return ai(O,e)}ma!==null&amp;&amp;ai(ma,e),fa!==null&amp;&amp;ai(fa,e),xa!==null&amp;&amp;ai(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);)Jx(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||Wx(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(Jo(o)!==null)continue}else N=h.action;typeof N==&quot;function&quot;?a[n+1]=N:(a.splice(n,3),n-=3),Wx(a)}}}function eh(){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 Wo(e){this._internalRoot=e}ni.prototype.render=Wo.prototype.render=function(e){var s=this._internalRoot;if(s===null)throw Error(c(409));var a=s.current,n=Xt();Zx(a,n,e,s,null,null)},ni.prototype.unmount=Wo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var s=e.containerInfo;Zx(e.current,2,null,e,null,null),qr(),s[Za]=null}};function ni(e){this._internalRoot=e}ni.prototype.unstable_scheduleHydration=function(e){if(e){var s=od();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;Jx(e)}};var th=r.version;if(th!==&quot;19.2.6&quot;)throw Error(c(527,th,&quot;19.2.6&quot;));T.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 pb={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 ri=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ri.isDisabled&amp;&amp;ri.supportsFiber)try{ps=ri.inject(pb),ie=ri}catch{}}return kn.createRoot=function(e,s){if(!m(e))throw Error(c(299));var a=!1,n=&quot;&quot;,o=cf,u=of,h=uf;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=Yx(e,1,!1,null,null,a,n,null,o,u,h,eh),e[Za]=s.current,Ro(e),new Wo(s)},kn.hydrateRoot=function(e,s,a){if(!m(e))throw Error(c(299));var n=!1,o=&quot;&quot;,u=cf,h=of,N=uf,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=Yx(e,1,!0,s,a??null,n,o,O,u,h,N,eh),s.context=Gx(null),a=s.current,n=Xt(),n=Vi(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,Ro(e),new ni(s)},kn.version=&quot;19.2.6&quot;,kn}var dh;function Cb(){if(dh)return su.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(),su.exports=wb(),su.exports}var Eb=Cb();/**
 * 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 mh=&quot;popstate&quot;;function fh(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 Ab(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 hu(&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 Tb(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 kb(){return Math.random().toString(36).substring(2,10)}function xh(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 hu(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||kb(),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 Tb(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 $=fh(E)?E:hu(A.location,E,S);g=v()+1;let z=xh($,g),X=A.createHref($.mask||$);try{x.pushState(z,&quot;&quot;,X)}catch(Q){if(Q instanceof DOMException&amp;&amp;Q.name===&quot;DataCloneError&quot;)throw Q;m.location.assign(X)}f&amp;&amp;p&amp;&amp;p({action:b,location:A.location,delta:1})}function C(E,S){b=&quot;REPLACE&quot;;let $=fh(E)?E:hu(A.location,E,S);g=v();let z=xh($,g),X=A.createHref($.mask||$);x.replaceState(z,&quot;&quot;,X),f&amp;&amp;p&amp;&amp;p({action:b,location:A.location,delta:0})}function R(E){return zb(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(mh,j),p=E,()=&gt;{m.removeEventListener(mh,j),p=null}},createHref(E){return r(m,E)},createURL:R,encodeLocation(E){let S=R(E);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:y,replace:C,go(E){return x.go(E)}};return A}function zb(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 $h(l,r,i=&quot;/&quot;){return Mb(l,r,i,!1)}function Mb(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=Db(l),p=null,g=Zb(x);for(let v=0;p==null&amp;&amp;v&lt;b.length;++v)p=Yb(b[v],g,c);return p}function Db(l){let r=qh(l);return Rb(r),r}function qh(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;.`),qh(x.children,r,y,j,p)),!(x.path==null&amp;&amp;!x.index)&amp;&amp;r.push({path:j,score:Hb(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 Bh(x.path))f(x,b,!0,g)}),r}function Bh(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=Bh(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 Rb(l){l.sort((r,i)=&gt;r.score!==i.score?i.score-r.score:Vb(r.routesMeta.map(c=&gt;c.childrenIndex),i.routesMeta.map(c=&gt;c.childrenIndex)))}var Ob=/^:[\w-]+$/,Lb=3,Ub=2,$b=1,qb=10,Bb=-2,hh=l=&gt;l===&quot;*&quot;;function Hb(l,r){let i=l.split(&quot;/&quot;),c=i.length;return i.some(hh)&amp;&amp;(c+=Bb),r&amp;&amp;(c+=Ub),i.filter(m=&gt;!hh(m)).reduce((m,f)=&gt;m+(Ob.test(f)?Lb:f===&quot;&quot;?$b:qb),c)}function Vb(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 Yb(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=xi({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=xi({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:Kb(xs([f,j.pathnameBase])),route:y}),j.pathnameBase!==&quot;/&quot;&amp;&amp;(f=xs([f,j.pathnameBase]))}return x}function xi(l,r){typeof l==&quot;string&quot;&amp;&amp;(l={path:l,caseSensitive:!1,end:!0});let[i,c]=Gb(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 R=b[y]||&quot;&quot;;x=f.slice(0,f.length-R.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 Gb(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 Zb(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 Qb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Xb(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=Hh(i),i.startsWith(&quot;/&quot;)?f=ph(i.substring(1),&quot;/&quot;):f=ph(i,r)):f=r,{pathname:f,search:Fb(c),hash:Jb(m)}}function ph(l,r){let i=hi(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 ru(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 Pb(l){return l.filter((r,i)=&gt;i===0||r.route.path&amp;&amp;r.route.path.length&gt;0)}function Ru(l){let r=Pb(l);return r.map((i,c)=&gt;c===r.length-1?i.pathname:i.pathnameBase)}function Ri(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;),ru(&quot;?&quot;,&quot;pathname&quot;,&quot;search&quot;,m)),st(!m.pathname||!m.pathname.includes(&quot;#&quot;),ru(&quot;#&quot;,&quot;pathname&quot;,&quot;hash&quot;,m)),st(!m.search||!m.search.includes(&quot;#&quot;),ru(&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=Xb(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 Hh=l=&gt;l.replace(/\/\/+/g,&quot;/&quot;),xs=l=&gt;Hh(l.join(&quot;/&quot;)),hi=l=&gt;l.replace(/\/+$/,&quot;&quot;),Kb=l=&gt;hi(l).replace(/^\/*/,&quot;/&quot;),Fb=l=&gt;!l||l===&quot;?&quot;?&quot;&quot;:l.startsWith(&quot;?&quot;)?l:&quot;?&quot;+l,Jb=l=&gt;!l||l===&quot;#&quot;?&quot;&quot;:l.startsWith(&quot;#&quot;)?l:&quot;#&quot;+l,Ib=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 Wb(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 ej(l){let r=l.map(i=&gt;i.route.path).filter(Boolean);return xs(r)||&quot;/&quot;}var Vh=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 Yh(l,r){let i=l;if(typeof i!=&quot;string&quot;||!Qb.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let c=i,m=!1;if(Vh)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 Gh=[&quot;POST&quot;,&quot;PUT&quot;,&quot;PATCH&quot;,&quot;DELETE&quot;];new Set(Gh);var tj=[&quot;GET&quot;,...Gh];new Set(tj);var Dl=d.createContext(null);Dl.displayName=&quot;DataRouter&quot;;var Oi=d.createContext(null);Oi.displayName=&quot;DataRouterState&quot;;var Zh=d.createContext(!1);function sj(){return d.useContext(Zh)}var Qh=d.createContext({isTransitioning:!1});Qh.displayName=&quot;ViewTransition&quot;;var aj=d.createContext(new Map);aj.displayName=&quot;Fetchers&quot;;var lj=d.createContext(null);lj.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 Ou=d.createContext(null);Ou.displayName=&quot;RouteError&quot;;var Xh=&quot;REACT_ROUTER_ERROR&quot;,nj=&quot;REDIRECT&quot;,rj=&quot;ROUTE_ERROR_RESPONSE&quot;;function ij(l){if(l.startsWith(`${Xh}:${nj}:{`))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 cj(l){if(l.startsWith(`${Xh}:${rj}:{`))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 Ib(r.status,r.statusText,r.data)}catch{}}function oj(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 Ph=&quot;You should call navigate() in a React.useEffect(), not when your component is first rendered.&quot;;function Kh(l){d.useContext(Pt).static||d.useLayoutEffect(l)}function ys(){let{isDataRoute:l}=d.useContext(is);return l?Sj():uj()}function uj(){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(Ru(c)),x=d.useRef(!1);return Kh(()=&gt;{x.current=!0}),d.useCallback((p,g={})=&gt;{if(rs(x.current,Ph),!x.current)return;if(typeof p==&quot;number&quot;){i.go(p);return}let v=Ri(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 dj=d.createContext(null);function mj(l){let r=d.useContext(is).outlet;return d.useMemo(()=&gt;r&amp;&amp;d.createElement(dj.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(Ru(i));return d.useMemo(()=&gt;Ri(l,JSON.parse(m),c,r===&quot;path&quot;),[l,m,c,r])}function fj(l,r){return Fh(l,r)}function Fh(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;;Ih(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 R=i&amp;&amp;i.state.matches.length?i.state.matches.map(S=&gt;Object.assign(S,{route:i.manifest[S.route.id]||S.route})):$h(l,{pathname:C});rs(g||R!=null,`No routes matched location &quot;${j.pathname}${j.search}${j.hash}&quot; `),rs(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.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=bj(R&amp;&amp;R.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 xj(){let l=_j(),r=Wb(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 hj=d.createElement(xj,null),Jh=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=cj(l.digest);i&amp;&amp;(l=i)}let r=l!==void 0?d.createElement(is.Provider,{value:this.props.routeContext},d.createElement(Ou.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?d.createElement(pj,{error:l},r):r}};Jh.contextType=Zh;var iu=new WeakMap;function pj({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=ij(r.digest);if(c){let m=iu.get(r);if(m)throw m;let f=Yh(c.location,i);if(Vh&amp;&amp;!iu.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 iu.set(r,x),x}return d.createElement(&quot;meta&quot;,{httpEquiv:&quot;refresh&quot;,content:`0;url=${f.absoluteURL||f.to}`})}}return l}function gj({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 bj(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,R=j.route.loader&amp;&amp;!y.hasOwnProperty(j.route.id)&amp;&amp;(!C||C[j.route.id]===void 0);if(j.route.lazy||R){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:ej(c.matches),errorInfo:j})}:void 0;return m.reduceRight((v,j,y)=&gt;{let C,R=!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||hj,x&amp;&amp;(b&lt;0&amp;&amp;y===0?(Ih(&quot;route-fallback&quot;,!1,&quot;No `HydrateFallback` element provided to render during initial hydration&quot;),R=!0,E=null):b===y&amp;&amp;(R=!0,E=j.route.hydrateFallbackElement||null)));let S=r.concat(m.slice(0,y+1)),$=()=&gt;{let z;return C?z=A:R?z=E:j.route.Component?z=d.createElement(j.route.Component,null):j.route.element?z=j.route.element:z=v,d.createElement(gj,{match:j,routeContext:{outlet:v,matches:S,isDataRoute:c!=null},children:z})};return c&amp;&amp;(j.route.ErrorBoundary||j.route.errorElement||y===0)?d.createElement(Jh,{location:c.location,revalidation:c.revalidation,component:A,error:C,children:$(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:g}):$()},null)}function Lu(l){return`${l} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function jj(l){let r=d.useContext(Dl);return st(r,Lu(l)),r}function vj(l){let r=d.useContext(Oi);return st(r,Lu(l)),r}function yj(l){let r=d.useContext(is);return st(r,Lu(l)),r}function Uu(l){let r=yj(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 Nj(){return Uu(&quot;useRouteId&quot;)}function _j(){var c;let l=d.useContext(Ou),r=vj(&quot;useRouteError&quot;),i=Uu(&quot;useRouteError&quot;);return l!==void 0?l:(c=r.errors)==null?void 0:c[i]}function Sj(){let{router:l}=jj(&quot;useNavigate&quot;),r=Uu(&quot;useNavigate&quot;),i=d.useRef(!1);return Kh(()=&gt;{i.current=!0}),d.useCallback(async(m,f={})=&gt;{rs(i.current,Ph),i.current&amp;&amp;(typeof m==&quot;number&quot;?await l.navigate(m):await l.navigate(m,{fromRouteId:r,...f}))},[l,r])}var gh={};function Ih(l,r,i){!r&amp;&amp;!gh[l]&amp;&amp;(gh[l]=!0,rs(!1,i))}d.memo(wj);function wj({routes:l,manifest:r,future:i,state:c,isStatic:m,onError:f}){return Fh(l,void 0,{manifest:r,state:c,isStatic:m,onError:f})}function Li({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=Ri(l,Ru(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 mj(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 Cj({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:R}=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:R},navigationType:c}},[b,g,v,j,y,C,c,R]);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 Ej({children:l,location:r}){return fj(pu(l),r)}function pu(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,pu(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=pu(c.props.children,f)),i.push(x)}),i}var di=&quot;get&quot;,mi=&quot;application/x-www-form-urlencoded&quot;;function Ui(l){return typeof HTMLElement&lt;&quot;u&quot;&amp;&amp;l instanceof HTMLElement}function Aj(l){return Ui(l)&amp;&amp;l.tagName.toLowerCase()===&quot;button&quot;}function kj(l){return Ui(l)&amp;&amp;l.tagName.toLowerCase()===&quot;form&quot;}function Tj(l){return Ui(l)&amp;&amp;l.tagName.toLowerCase()===&quot;input&quot;}function zj(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function Mj(l,r){return l.button===0&amp;&amp;(!r||r===&quot;_self&quot;)&amp;&amp;!zj(l)}function gu(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 Dj(l,r){let i=gu(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 ii=null;function Rj(){if(ii===null)try{new FormData(document.createElement(&quot;form&quot;),0),ii=!1}catch{ii=!0}return ii}var Oj=new Set([&quot;application/x-www-form-urlencoded&quot;,&quot;multipart/form-data&quot;,&quot;text/plain&quot;]);function cu(l){return l!=null&amp;&amp;!Oj.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;${mi}&quot;`),null):l}function Lj(l,r){let i,c,m,f,x;if(kj(l)){let b=l.getAttribute(&quot;action&quot;);c=b?Vs(b,r):null,i=l.getAttribute(&quot;method&quot;)||di,m=cu(l.getAttribute(&quot;enctype&quot;))||mi,f=new FormData(l)}else if(Aj(l)||Tj(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;)||di,m=cu(l.getAttribute(&quot;formenctype&quot;))||cu(b.getAttribute(&quot;enctype&quot;))||mi,f=new FormData(b,l),!Rj()){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(Ui(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=di,c=null,m=mi,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 $u(l,r){if(l===!1||l===null||typeof l&gt;&quot;u&quot;)throw new Error(r)}function Wh(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=`${hi(r)}/_root.${c}`:m.pathname=`${hi(m.pathname)}.${c}`,m}async function Uj(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 $j(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 qj(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 Uj(f,i);return x.links?x.links():[]}return[]}));return Yj(c.flat(1).filter($j).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 bh(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 Bj(l,r,{includeHydrateFallback:i}={}){return Hj(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 Hj(l){return[...new Set(l)]}function Vj(l){let r={},i=Object.keys(l).sort();for(let c of i)r[c]=l[c];return r}function Yj(l,r){let i=new Set;return new Set(r),l.reduce((c,m)=&gt;{let f=JSON.stringify(Vj(m));return i.has(f)||(i.add(f),c.push({key:f,link:m})),c},[])}function qu(){let l=d.useContext(Dl);return $u(l,&quot;You must render this element inside a &lt;DataRouterContext.Provider&gt; element&quot;),l}function Gj(){let l=d.useContext(Oi);return $u(l,&quot;You must render this element inside a &lt;DataRouterStateContext.Provider&gt; element&quot;),l}var Bu=d.createContext(void 0);Bu.displayName=&quot;FrameworkContext&quot;;function Hu(){let l=d.useContext(Bu);return $u(l,&quot;You must render this element inside a &lt;HydratedRouter&gt; element&quot;),l}function Zj(l,r){let i=d.useContext(Bu),[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($=&gt;{x($.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)},R=()=&gt;{m(!1),x(!1)};return i?l!==&quot;intent&quot;?[f,y,{}]:[f,y,{onFocus:Tn(b,C),onBlur:Tn(p,R),onMouseEnter:Tn(g,C),onMouseLeave:Tn(v,R),onTouchStart:Tn(j,C)}]:[!1,y,{}]}function Tn(l,r){return i=&gt;{l&amp;&amp;l(i),i.defaultPrevented||r(i)}}function Qj({page:l,...r}){let i=sj(),{router:c}=qu(),m=d.useMemo(()=&gt;$h(c.routes,l,c.basename),[c.routes,l,c.basename]);return m?i?d.createElement(Pj,{page:l,matches:m,...r}):d.createElement(Kj,{page:l,matches:m,...r}):null}function Xj(l){let{manifest:r,routeModules:i}=Hu(),[c,m]=d.useState([]);return d.useEffect(()=&gt;{let f=!1;return qj(l,r,i).then(x=&gt;{f||m(x)}),()=&gt;{f=!0}},[l,r,i]),c}function Pj({page:l,matches:r,...i}){let c=cs(),{future:m}=Hu(),{basename:f}=qu(),x=d.useMemo(()=&gt;{if(l===c.pathname+c.search+c.hash)return[];let b=Wh(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 Kj({page:l,matches:r,...i}){let c=cs(),{future:m,manifest:f,routeModules:x}=Hu(),{basename:b}=qu(),{loaderData:p,matches:g}=Gj(),v=d.useMemo(()=&gt;bh(l,r,g,f,c,&quot;data&quot;),[l,r,g,f,c]),j=d.useMemo(()=&gt;bh(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($=&gt;{var X;let z=f.routes[$.route.id];!z||!z.hasLoader||(!v.some(Q=&gt;Q.route.id===$.route.id)&amp;&amp;$.route.id in p&amp;&amp;((X=x[$.route.id])!=null&amp;&amp;X.shouldRevalidate)||z.hasClientLoader?E=!0:A.add($.route.id))}),A.size===0)return[];let S=Wh(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($=&gt;A.has($.route.id)).map($=&gt;$.route.id).join(&quot;,&quot;)),[S.pathname+S.search]},[b,m.unstable_trailingSlashAwareDataRequests,p,c,f,v,r,l,x]),C=d.useMemo(()=&gt;Bj(j,f),[j,f]),R=Xj(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})),R.map(({key:A,link:E})=&gt;d.createElement(&quot;link&quot;,{key:A,nonce:i.nonce,...E,crossOrigin:E.crossOrigin??i.crossOrigin})))}function Fj(...l){return r=&gt;{l.forEach(i=&gt;{typeof i==&quot;function&quot;?i(r):i!=null&amp;&amp;(i.current=r)})}}var Jj=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{Jj&amp;&amp;(window.__reactRouterVersion=&quot;7.15.1&quot;)}catch{}function Ij({basename:l,children:r,useTransitions:i,window:c}){let m=d.useRef();m.current==null&amp;&amp;(m.current=Ab({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(Cj,{basename:l,children:r,location:x.location,navigationType:x.action,navigator:f,useTransitions:i})}var ep=/^(?:[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,...R},A){let{basename:E,navigator:S,useTransitions:$}=d.useContext(Pt),z=typeof v==&quot;string&quot;&amp;&amp;ep.test(v),X=Yh(v,E);v=X.to;let Q=oj(v,{relative:m}),G=cs(),I=null;if(b){let U=Ri(b,[],G.mask?G.mask.pathname:&quot;/&quot;,!0);E!==&quot;/&quot;&amp;&amp;(U.pathname=U.pathname===&quot;/&quot;?E:xs([E,U.pathname])),I=S.createHref(U)}let[Z,k,w]=Zj(c,R),ee=tv(v,{replace:x,mask:b,state:p,target:g,preventScrollReset:j,relative:m,viewTransition:y,defaultShouldRevalidate:C,useTransitions:$});function ae(U){r&amp;&amp;r(U),U.defaultPrevented||ee(U)}let Y=!(X.isExternal||f),q=d.createElement(&quot;a&quot;,{...R,...w,href:(Y?I:void 0)||X.absoluteURL||Q,onClick:Y?ae:r,ref:Fj(A,k),target:g,&quot;data-discover&quot;:!z&amp;&amp;i===&quot;render&quot;?&quot;true&quot;:void 0});return Z&amp;&amp;!z?d.createElement(d.Fragment,null,q,d.createElement(Qj,{page:Q})):q});he.displayName=&quot;Link&quot;;var Vu=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(Oi),{navigator:R,basename:A}=d.useContext(Pt),E=C!=null&amp;&amp;rv(j)&amp;&amp;b===!0,S=R.encodeLocation?R.encodeLocation(j).pathname:j.pathname,$=y.pathname,z=C&amp;&amp;C.navigation&amp;&amp;C.navigation.location?C.navigation.location.pathname:null;i||($=$.toLowerCase(),z=z?z.toLowerCase():null,S=S.toLowerCase()),z&amp;&amp;A&amp;&amp;(z=Vs(z,A)||z);const X=S!==&quot;/&quot;&amp;&amp;S.endsWith(&quot;/&quot;)?S.length-1:S.length;let Q=$===S||!m&amp;&amp;$.startsWith(S)&amp;&amp;$.charAt(X)===&quot;/&quot;,G=z!=null&amp;&amp;(z===S||!m&amp;&amp;z.startsWith(S)&amp;&amp;z.charAt(S.length)===&quot;/&quot;),I={isActive:Q,isPending:G,isTransitioning:E},Z=Q?r:void 0,k;typeof c==&quot;function&quot;?k=c(I):k=[c,Q?&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(I):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(I):p)});Vu.displayName=&quot;NavLink&quot;;var Wj=d.forwardRef(({discover:l=&quot;render&quot;,fetcherKey:r,navigate:i,reloadDocument:c,replace:m,state:f,method:x=di,action:b,onSubmit:p,relative:g,preventScrollReset:v,viewTransition:j,defaultShouldRevalidate:y,...C},R)=&gt;{let{useTransitions:A}=d.useContext(Pt),E=lv(),S=nv(b,{relative:g}),$=x.toLowerCase()===&quot;get&quot;?&quot;get&quot;:&quot;post&quot;,z=typeof b==&quot;string&quot;&amp;&amp;ep.test(b),X=Q=&gt;{if(p&amp;&amp;p(Q),Q.defaultPrevented)return;Q.preventDefault();let G=Q.nativeEvent.submitter,I=(G==null?void 0:G.getAttribute(&quot;formmethod&quot;))||x,Z=()=&gt;E(G||Q.currentTarget,{fetcherKey:r,method:I,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:R,method:$,action:S,onSubmit:c?p:X,...C,&quot;data-discover&quot;:!z&amp;&amp;l===&quot;render&quot;?&quot;true&quot;:void 0})});Wj.displayName=&quot;Form&quot;;function ev(l){return`${l} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function tp(l){let r=d.useContext(Dl);return st(r,ev(l)),r}function tv(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(Mj(C,r)){C.preventDefault();let R=i!==void 0?i:Mn(j)===Mn(y),A=()=&gt;v(l,{replace:R,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(gu(l)),i=d.useRef(!1),c=cs(),m=d.useMemo(()=&gt;Dj(c.search,i.current?null:r.current),[c.search]),f=ys(),x=d.useCallback((b,p)=&gt;{const g=gu(typeof b==&quot;function&quot;?b(new URLSearchParams(m)):b);i.current=!0,f(&quot;?&quot;+g,p)},[f,m]);return[m,x]}var sv=0,av=()=&gt;`__${String(++sv)}__`;function lv(){let{router:l}=tp(&quot;useSubmit&quot;),{basename:r}=d.useContext(Pt),i=Nj(),c=l.fetch,m=l.navigate;return d.useCallback(async(f,x={})=&gt;{let{action:b,method:p,encType:g,formData:v,body:j}=Lj(f,r);if(x.navigate===!1){let y=x.fetcherKey||av();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 nv(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 rv(l,{relative:r}={}){let i=d.useContext(Qh);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}=tp(&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 xi(m.pathname,x)!=null||xi(m.pathname,f)!=null}const bu=&quot;planx_auth_token&quot;,jh={&quot;Admin PlanX&quot;:&quot;Administrateur&quot;};function iv(l){const r=[l.first_name,l.last_name].filter(Boolean).join(&quot; &quot;).trim();return r&amp;&amp;jh[r]?jh[r]:r||l.email}function cv(l){return l?l===&quot;PlanX&quot;?&quot;FasoChantier&quot;:l:null}function Yu(l){return l===&quot;true&quot;||l===&quot;1&quot;}const ov=&quot;https://api-demo.fasochantier.com/api&quot;.trim()||&quot;&quot;,uv=Yu(&quot;true&quot;),dv=Yu(&quot;true&quot;),mv=Yu(&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 sp(l){const r=l.startsWith(&quot;/&quot;)?l:`/${l}`;return`${ov.replace(/\/$/,&quot;&quot;)}${r}`}function pi(){return localStorage.getItem(bu)}function Gu(l){l?localStorage.setItem(bu,l):localStorage.removeItem(bu)}async function ju(l){try{return await l.json()}catch{return null}}function ap(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 $i(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=pi();v&amp;&amp;(b.Authorization=`Bearer ${v}`)}const p=await fetch(sp(l),{method:c,headers:b,body:m===void 0?void 0:x?m:JSON.stringify(m)});if(!p.ok){const v=await ju(p);throw new me(ap(v,p.status),p.status,v??void 0)}return i?await ju(p):p}async function Ae(l,r=!1){return $i(l,{auth:r})}async function _e(l,r,i=!0){return $i(l,{method:&quot;POST&quot;,body:r,auth:i})}async function Ue(l,r={},i=!0){return $i(l,{method:&quot;PATCH&quot;,body:r,auth:i})}async function qi(l,r,i=!0){return $i(l,{method:&quot;POST&quot;,body:r,auth:i})}async function Zu(l,r=!0){const i=r?pi():null,c={};i&amp;&amp;(c.Authorization=`Bearer ${i}`);const m=await fetch(sp(l),{headers:c});if(!m.ok){const p=await ju(m);throw new me(ap(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 fv(l,r){const c=await _e(&quot;/auth/login&quot;,{email:l,password:r},!1);return Gu(c.token),c}async function xv(){return Ae(&quot;/auth/me&quot;,!0)}async function hv(){try{return await _e(&quot;/auth/logout&quot;,{})}finally{Gu(null)}}const lp=d.createContext(null);function pv({children:l}){const[r,i]=d.useState(null),[c,m]=d.useState(()=&gt;pi()),[f,x]=d.useState(!0);d.useEffect(()=&gt;{let v=!1;async function j(){const y=pi();if(!y){x(!1);return}try{const{user:C}=await xv();v||(m(y),i(C))}catch{Gu(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 fv(v,j);m(y.token),i(y.user)},[]),p=d.useCallback(async()=&gt;{try{await hv()}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(lp.Provider,{value:g,children:l})}function Gs(){const l=d.useContext(lp);if(!l)throw new Error(&quot;useAuth doit être utilisé dans un AuthProvider.&quot;);return l}function gv(){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(Li,{to:&quot;/login&quot;,replace:!0,state:{from:i}})}function bv(){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(Li,{to:&quot;/projects&quot;,replace:!0}):t.jsx(Yn,{})}async function vh(){return Ae(&quot;/projects&quot;,!0)}async function yh(l){return Ae(`/projects/${l}/context`,!0)}const vu=&quot;planx_active_project_id&quot;,jv={preparation:&quot;Préparation&quot;,active:&quot;Actif&quot;,suspended:&quot;Suspendu&quot;,completed:&quot;Terminé&quot;,archived:&quot;Archivé&quot;},np=d.createContext(null);function vv(){const l=localStorage.getItem(vu);if(!l)return null;const r=Number.parseInt(l,10);return Number.isNaN(r)?null:r}function yv({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(vu),x(null)},[]),v=d.useCallback(async()=&gt;{const A=await vh();m(A.data)},[]),j=d.useCallback(async A=&gt;{const E=await yh(A);localStorage.setItem(vu,String(A)),x(E)},[]),y=d.useCallback(async()=&gt;{p(!0);try{const E=(await vh()).data;m(E);const S=vv();if(!S)return;if(!E.some(X=&gt;X.id===S)){g();return}const z=await yh(S);x(z)}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]),R=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(np.Provider,{value:R,children:l})}function Nv(){return t.jsx(yv,{children:t.jsx(Yn,{})})}function Fe(){const l=d.useContext(np);if(!l)throw new Error(&quot;useProject doit être utilisé dans un ProjectProvider.&quot;);return l}function Nh(){const{activeProject:l,isLoading:r}=Fe();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(Li,{to:&quot;/projects&quot;,replace:!0})}const _v={full:&quot;/brand/fasochantier-logo-full.png&quot;,mark:&quot;/brand/fasochantier-mark.png&quot;,monogram:&quot;/brand/fasochantier-monogram.png&quot;},Sv={full:120,mark:36,monogram:32};function Qu({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??Sv[g],j=_v[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 rp=(...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 wv=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 Cv=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 _h=l=&gt;{const r=Cv(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 ou={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 Ev=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},Av=d.createContext({}),kv=()=&gt;d.useContext(Av),Tv=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;}=kv()??{},R=c??j?Number(i??v)*24/Number(r??g):i??v;return d.createElement(&quot;svg&quot;,{ref:p,...ou,width:r??g??ou.width,height:r??g??ou.height,stroke:l??y,strokeWidth:R,className:rp(&quot;lucide&quot;,C,m),...!f&amp;&amp;!Ev(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(Tv,{ref:f,iconNode:r,className:rp(`lucide-${wv(_h(l))}`,`lucide-${l}`,c),...m}));return i.displayName=_h(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 zv=[[&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;}]],gi=Ne(&quot;activity&quot;,zv);/**
 * @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 Mv=[[&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;}]],Dv=Ne(&quot;archive&quot;,Mv);/**
 * @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;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;}]],ip=Ne(&quot;arrow-down&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 Ov=[[&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;,Ov);/**
 * @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;m5 12 7-7 7 7&quot;,key:&quot;hav0vg&quot;}],[&quot;path&quot;,{d:&quot;M12 19V5&quot;,key:&quot;x0mq9r&quot;}]],cp=Ne(&quot;arrow-up&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;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;}]],op=Ne(&quot;bell&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;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;}]],up=Ne(&quot;building-2&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;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;}]],Xu=Ne(&quot;calendar&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;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;}]],Hv=Ne(&quot;camera&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 Vv=[[&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;}]],Yv=Ne(&quot;chart-column&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;M20 6 9 17l-5-5&quot;,key:&quot;1gmf2c&quot;}]],Zv=Ne(&quot;check&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;m6 9 6 6 6-6&quot;,key:&quot;qrunsl&quot;}]],dp=Ne(&quot;chevron-down&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 Xv=[[&quot;path&quot;,{d:&quot;m9 18 6-6-6-6&quot;,key:&quot;mthhwq&quot;}]],Pv=Ne(&quot;chevron-right&quot;,Xv);/**
 * @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=[[&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;}]],Pu=Ne(&quot;clipboard-check&quot;,Kv);/**
 * @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;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;}]],Jv=Ne(&quot;clock&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 Iv=[[&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;}]],mp=Ne(&quot;copy&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 Wv=[[&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;}]],fp=Ne(&quot;download&quot;,Wv);/**
 * @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;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;}]],ty=Ne(&quot;ellipsis&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 sy=[[&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;}]],Ku=Ne(&quot;external-link&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 ay=[[&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;}]],ly=Ne(&quot;file-check&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 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;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;}]],xp=Ne(&quot;file-text&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 ry=[[&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;}]],hp=Ne(&quot;folder-check&quot;,ry);/**
 * @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;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;}]],pp=Ne(&quot;hash&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;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;}]],gp=Ne(&quot;layers&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;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;}]],bp=Ne(&quot;layout-dashboard&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;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;}]],jp=Ne(&quot;layout-grid&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 dy=[[&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;}]],my=Ne(&quot;list-todo&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 fy=[[&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;,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;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;}]],hy=Ne(&quot;log-out&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;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;}]],Bi=Ne(&quot;map-pin&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 gy=[[&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;}]],by=Ne(&quot;map&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 jy=[[&quot;path&quot;,{d:&quot;M5 12h14&quot;,key:&quot;1ays0h&quot;}]],vy=Ne(&quot;minus&quot;,jy);/**
 * @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;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;}]],vp=Ne(&quot;paperclip&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 Ny=[[&quot;path&quot;,{d:&quot;M5 12h14&quot;,key:&quot;1ays0h&quot;}],[&quot;path&quot;,{d:&quot;M12 5v14&quot;,key:&quot;s699le&quot;}]],_y=Ne(&quot;plus&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 Sy=[[&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;}]],wy=Ne(&quot;refresh-cw&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 Cy=[[&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;,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 Ey=[[&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;}]],Ay=Ne(&quot;settings&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 ky=[[&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;}]],Ty=Ne(&quot;square-check-big&quot;,ky);/**
 * @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;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;}]],My=Ne(&quot;toggle-left&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;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;}]],Fu=Ne(&quot;trash-2&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 Ry=[[&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;}]],Oy=Ne(&quot;trending-up&quot;,Ry);/**
 * @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;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;}]],Uy=Ne(&quot;triangle-alert&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 $y=[[&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;}]],yu=Ne(&quot;type&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 qy=[[&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;}]],By=Ne(&quot;users&quot;,qy);/**
 * @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;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;}]],yp=Ne(&quot;wifi-off&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 Vy=[[&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;}]],Np=Ne(&quot;wifi&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;M18 6 6 18&quot;,key:&quot;1bl5f8&quot;}],[&quot;path&quot;,{d:&quot;m6 6 12 12&quot;,key:&quot;d8bk6v&quot;}]],Gy=Ne(&quot;x&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;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;}]],Qy=Ne(&quot;zap&quot;,Zy),_p=[{label:&quot;Tableau de bord&quot;,path:&quot;/dashboard&quot;,icon:bp},{label:&quot;Chantiers&quot;,path:&quot;/projects&quot;,icon:up},{label:&quot;Lots&quot;,path:&quot;/lots&quot;,icon:gp},{label:&quot;Planning&quot;,path:&quot;/tasks&quot;,icon:jp},{label:&quot;Points chantier&quot;,path:&quot;/points&quot;,icon:Bi},{label:&quot;Plans / Zones&quot;,path:&quot;/locations&quot;,icon:by},{label:&quot;Documents&quot;,path:&quot;/documents&quot;,icon:xp},{label:&quot;DOE / Clôture&quot;,path:&quot;/doe&quot;,icon:hp},{label:&quot;Réunions&quot;,path:&quot;/meetings&quot;,icon:By},{label:&quot;Actions&quot;,path:&quot;/actions&quot;,icon:Qy},{label:&quot;Rapports&quot;,path:&quot;/reports&quot;,icon:Yv},{label:&quot;Approbations&quot;,path:&quot;/approvals&quot;,icon:Pu},{label:&quot;Notifications&quot;,path:&quot;/notifications&quot;,icon:op},{label:&quot;Administration&quot;,path:&quot;/admin&quot;,icon:Ay}],Xy=[{label:&quot;Accueil&quot;,path:&quot;/dashboard&quot;,icon:bp},{label:&quot;Tâches&quot;,path:&quot;/tasks&quot;,icon:my},{label:&quot;Points&quot;,path:&quot;/points&quot;,icon:Bi},{label:&quot;Docs&quot;,path:&quot;/documents&quot;,icon:xp},{label:&quot;Plus&quot;,path:&quot;/more&quot;,icon:ty}];function Py(){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(Qu,{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:_p.map(l=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Vu,{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 Ky({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 Fy={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;},Jy={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 L({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 ${Fy[l]} ${Jy[r]} ${i}`,...f,children:c})}function Sp({compact:l=!1,apiSlot:r}){const{user:i,logout:c}=Gs(),{activeMembership:m,clearActiveProject:f}=Fe(),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:[mv&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:iv(i)}),t.jsx(&quot;p&quot;,{className:`text-slate-500 ${l?&quot;text-[10px]&quot;:&quot;text-xs&quot;}`,children:b})]}),t.jsxs(L,{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(hy,{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 wp({compact:l=!1}){const{activeProject:r}=Fe(),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 Iy(l){return&quot;&quot;}async function Wy(l,r){return Ae(`/projects/${l}/notifications${Iy()}`,!0)}async function eN(l){return Ae(`/projects/${l}/notifications/unread-count`,!0)}async function tN(l,r){return Ue(`/projects/${l}/notifications/${r}/read`,{},!0)}async function sN(l){return Ue(`/projects/${l}/notifications/read-all`,{},!0)}async function aN(l,r){return Ue(`/projects/${l}/notifications/${r}/archive`,{},!0)}const Cp=d.createContext(null);function lN({children:l}){const{activeProject:r}=Fe(),[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 eN(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(Cp.Provider,{value:b,children:l})}function Ep(){const l=d.useContext(Cp);return l||{unreadCount:0,isLoading:!1,refreshUnreadCount:async()=&gt;{}}}function Ap({compact:l=!1}){const{unreadCount:r}=Ep();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(op,{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 kp(){return Ae(&quot;/health&quot;)}function nN(){const[l,r]=d.useState(&quot;idle&quot;);async function i(){r(&quot;loading&quot;);try{const c=await kp();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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void i(),disabled:l===&quot;loading&quot;,children:[l===&quot;loading&quot;?t.jsx(gi,{className:&quot;h-4 w-4 animate-pulse&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;ok&quot;?t.jsx(Np,{className:&quot;h-4 w-4 text-emerald-600&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;error&quot;?t.jsx(yp,{className:&quot;h-4 w-4 text-rose-600&quot;,&quot;aria-hidden&quot;:!0}):t.jsx(gi,{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 rN(){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(Ky,{placeholder:&quot;Rechercher dans le chantier…&quot;})}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-3&quot;,children:[t.jsx(wp,{}),t.jsx(Ap,{}),t.jsx(Sp,{apiSlot:t.jsx(nN,{})})]})]})})}function iN(){const[l,r]=d.useState(&quot;idle&quot;);async function i(){r(&quot;loading&quot;);try{const c=await kp();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(L,{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(gi,{className:&quot;h-4 w-4 animate-pulse&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;ok&quot;?t.jsx(Np,{className:&quot;h-4 w-4 text-fc-green&quot;,&quot;aria-hidden&quot;:!0}):l===&quot;error&quot;?t.jsx(yp,{className:&quot;h-4 w-4 text-fc-red&quot;,&quot;aria-hidden&quot;:!0}):t.jsx(gi,{className:&quot;h-4 w-4&quot;,&quot;aria-hidden&quot;:!0})})]})}function cN(){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(Qu,{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(wp,{compact:!0})]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex shrink-0 items-center gap-1&quot;,children:[t.jsx(Ap,{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(Sp,{compact:!0,apiSlot:t.jsx(iN,{})})]})]})})}function oN(){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:Xy.map(l=&gt;t.jsx(&quot;li&quot;,{className:&quot;flex-1&quot;,children:t.jsxs(Vu,{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 Nu({className:l=&quot;&quot;,compact:r=!1}){return uv?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 uN(){return t.jsx(lN,{children:t.jsxs(&quot;div&quot;,{className:&quot;flex min-h-screen bg-fc-bg text-fc-text&quot;,children:[t.jsx(Py,{}),t.jsxs(&quot;div&quot;,{className:&quot;flex min-h-screen min-w-0 flex-1 flex-col&quot;,children:[t.jsx(Nu,{className:&quot;lg:hidden&quot;,compact:!0}),t.jsx(cN,{}),t.jsx(rN,{}),t.jsx(Nu,{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(oN,{})]})]})})}const dN=[{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;}],Tp=&quot;/brand/login-background-construction.jpg&quot;;function mN(){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=Tp},[]),l}function fN(){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 xN(){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:Tp,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 hN({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 pN(){const r=mN()===&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(fN,{}),r&amp;&amp;t.jsx(xN,{}),t.jsx(hN,{withPhoto:r}),!r&amp;&amp;t.jsx(gN,{})]})}function gN(){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 bN(){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(R){R.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(R){c(R.email),f(R.password),b(null),g(!0);try{await l(R.email,R.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(pN,{}),t.jsx(Nu,{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(Qu,{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:R=&gt;void y(R),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:R=&gt;c(R.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:R=&gt;f(R.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(L,{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;})]}),dv&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(R=&gt;!R),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(dp,{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:dN.map(R=&gt;t.jsx(&quot;li&quot;,{children:t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,disabled:p,onClick:()=&gt;void C(R),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:R.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:R.role})]}),t.jsx(&quot;span&quot;,{className:&quot;mt-0.5 truncate font-mono text-[10px] text-fc-muted&quot;,children:R.email}),R.hint&amp;&amp;t.jsx(&quot;span&quot;,{className:&quot;mt-0.5 text-[10px] text-fc-gold-dark&quot;,children:R.hint})]})},R.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 jN={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=jN[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 vN={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 ${vN[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})]})}function yN(l){return&quot;&quot;}function NN(l,r){return Ae(`/projects/${l}/dashboard${yN()}`,!0)}const _N={critical:&quot;Critique&quot;,warning:&quot;Attention&quot;,info:&quot;Info&quot;},SN={critical:&quot;Critique&quot;,warning:&quot;À surveiller&quot;,ok:&quot;OK&quot;},wN={critical:&quot;red&quot;,warning:&quot;orange&quot;,ok:&quot;green&quot;},CN={critical:&quot;red&quot;,warning:&quot;orange&quot;,info:&quot;purple&quot;};function EN(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 AN(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:Oy},{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:Jv,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:Bi,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:ly,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:hp,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:Pu,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:Uy,href:&quot;/actions&quot;}),m}function kN(){const{activeProject:l,activeMembership:r}=Fe(),[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 NN(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?AN(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-6&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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void p(),disabled:m,children:[t.jsx(wy,{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(up,{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}),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(L,{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:SN[y.risk_level],tone:wN[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:_N[y.severity],tone:CN[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:EN(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 Sh(l){return l?new Date(l).toLocaleDateString(&quot;fr-FR&quot;):&quot;—&quot;}function TN({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 rounded-2xl border border-slate-200 bg-white p-5 shadow-sm transition hover:border-fc-green/30 hover:shadow-md&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:jv[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(Bi,{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(Xu,{className:&quot;h-3.5 w-3.5 shrink-0&quot;,&quot;aria-hidden&quot;:!0}),Sh(l.planned_start_date),&quot; → &quot;,Sh(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(L,{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 zN(){const{projects:l,isLoading:r,selectProject:i,loadProjects:c}=Fe(),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(L,{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(TN,{project:v,onOpen:j=&gt;void g(j),isOpening:f===v.id},v.id))})]})}const bi={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;},_u={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;},MN=[&quot;planned&quot;,&quot;in_progress&quot;,&quot;at_risk&quot;,&quot;critical&quot;,&quot;completed&quot;];function zp({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,R]=d.useState(&quot;planned&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;0&quot;),[z,X]=d.useState(&quot;0&quot;),[Q,G]=d.useState(&quot;&quot;),[I,Z]=d.useState(&quot;&quot;),[k,w]=d.useState(&quot;&quot;),[ee,ae]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{var q,U;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;),R((c==null?void 0:c.status)??&quot;planned&quot;),E(((U=(q=c==null?void 0:c.main_organization)==null?void 0:q.id)==null?void 0:U.toString())??&quot;&quot;),$(String((c==null?void 0:c.declared_progress)??0)),X(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;),ae((c==null?void 0:c.description)??&quot;&quot;))},[l,c]),!l)return null;async function Y(q){q.preventDefault();const U={code:b.trim().toUpperCase(),name:g.trim(),lot_type:j.trim()||void 0,status:C,description:ee.trim()||void 0,zones_text:k.trim()||void 0,declared_progress:Number(S),validated_progress:Number(z),planned_start_date:Q||null,planned_end_date:I||null,main_organization_id:A?Number(A):null};await x(U)}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:q=&gt;void Y(q),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:q=&gt;p(q.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:q=&gt;y(q.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:q=&gt;v(q.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:q=&gt;R(q.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:MN.map(q=&gt;t.jsx(&quot;option&quot;,{value:q,children:bi[q]},q))})]}),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:q=&gt;E(q.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(q=&gt;t.jsx(&quot;option&quot;,{value:q.id,children:q.name},q.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:q=&gt;$(q.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:z,onChange:q=&gt;X(q.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:Q,onChange:q=&gt;G(q.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:I,onChange:q=&gt;Z(q.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:q=&gt;w(q.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:q=&gt;ae(q.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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{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 DN(l,r){return Ae(`/projects/${l}/lots/${r}`,!0)}async function RN(l,r){return _e(`/projects/${l}/lots`,r,!0)}async function ON(l,r,i){return Ue(`/projects/${l}/lots/${r}`,i,!0)}async function LN(l,r){return Ue(`/projects/${l}/lots/${r}/archive`,{},!0)}const UN=[{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 $N(l){return l===&quot;AC&quot;||l===&quot;CP&quot;}function qN(l,r){return r===&quot;all&quot;?l.status!==&quot;archived&quot;:l.status===r}function BN(){const{activeProject:l,activeMembership:r}=Fe(),[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;),[R,A]=d.useState(!1),[E,S]=d.useState(!1),[$,z]=d.useState(null),X=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;{X()},[X]);const Q=d.useMemo(()=&gt;{const k=v.trim().toLowerCase();return i.filter(w=&gt;{var ee;return qN(w,y)?k?w.code.toLowerCase().includes(k)||w.name.toLowerCase().includes(k)||(((ee=w.main_organization)==null?void 0:ee.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,ee=k.filter(Y=&gt;Y.status===&quot;at_risk&quot;).length,ae=k.length&gt;0?Math.round(k.reduce((Y,q)=&gt;Y+q.validated_progress,0)/k.length):0;return{total:k.length,critical:w,atRisk:ee,avgValidated:ae}},[i]);async function I(k){if(l){S(!0);try{await RN(l.id,k),A(!1),z(&quot;Lot créé avec succès.&quot;),await X()}catch(w){g(w instanceof me?w.message:&quot;Erreur lors de la création.&quot;)}finally{S(!1)}}}const Z=$N(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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;A(!0),children:&quot;Créer un lot&quot;}):void 0}),$&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:$}),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:UN.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))})]}),Q.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:Q.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:bi[k.status],tone:_u[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(L,{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:Q.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:bi[k.status],tone:_u[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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},k.id)})})]}),t.jsx(zp,{open:R,title:&quot;Créer un lot&quot;,organizations:m,isSubmitting:E,onClose:()=&gt;A(!1),onSubmit:I})]})}function Mp(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 ji(l,r){return Ae(`/projects/${l}/tasks${Mp(r)}`,!0)}async function HN(l,r){return Ae(`/projects/${l}/tasks/planning${Mp(r)}`,!0)}async function VN(l,r){return Ae(`/projects/${l}/tasks/${r}`,!0)}async function YN(l,r){return _e(`/projects/${l}/tasks`,r,!0)}async function GN(l,r,i){return Ue(`/projects/${l}/tasks/${r}`,i,!0)}async function ZN(l,r,i){return Ue(`/projects/${l}/tasks/${r}/status`,i,!0)}async function QN(l,r,i){return _e(`/projects/${l}/tasks/${r}/progress-declarations`,i,!0)}async function XN(l,r,i){return _e(`/projects/${l}/tasks/${r}/progress-validations`,i,!0)}function PN(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 vi(l,r){return Ae(`/projects/${l}/points${PN(r)}`,!0)}async function KN(l,r){return Ae(`/projects/${l}/points/${r}`,!0)}async function FN(l,r){return _e(`/projects/${l}/points`,r,!0)}async function JN(l,r,i){return Ue(`/projects/${l}/points/${r}`,i,!0)}async function IN(l,r,i){return _e(`/projects/${l}/points/${r}/comments`,i,!0)}async function WN(l,r,i){return _e(`/projects/${l}/points/${r}/mark-corrected`,i??{},!0)}async function e2(l,r,i){return _e(`/projects/${l}/points/${r}/verify`,i??{},!0)}async function t2(l,r,i){return _e(`/projects/${l}/points/${r}/close`,i,!0)}function s2(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 a2(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 Ju(l,r){return Ae(`/projects/${l}/documents${s2(r)}`,!0)}async function l2(l,r){return Ae(`/projects/${l}/documents/${r}`,!0)}async function n2(l,r,i){const c=new FormData;return a2(c,r),c.append(&quot;file&quot;,i),qi(`/projects/${l}/documents`,c,!0)}async function r2(l,r,i){return Ue(`/projects/${l}/documents/${r}`,i,!0)}async function i2(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),qi(`/projects/${l}/documents/${r}/versions`,m,!0)}async function c2(l,r,i){return Zu(`/projects/${l}/documents/${r}/versions/${i}/download`,!0)}function o2(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 u2(l,r,i){return _e(`/projects/${l}/documents/${r}/validate`,i??{},!0)}async function d2(l,r,i){return _e(`/projects/${l}/documents/${r}/reject`,i,!0)}async function m2(l,r,i){return _e(`/projects/${l}/documents/${r}/comments`,i,!0)}async function f2(l,r){return Ue(`/projects/${l}/documents/${r}/archive`,{},!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.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 h2(l){return Ae(`/projects/${l}/doe/summary`,!0)}async function Dp(l,r){return Ae(`/projects/${l}/doe/items${x2(r)}`,!0)}async function p2(l,r){return Ae(`/projects/${l}/doe/items/${r}`,!0)}async function g2(l,r){return _e(`/projects/${l}/doe/items`,r,!0)}async function b2(l,r,i){return Ue(`/projects/${l}/doe/items/${r}`,i,!0)}async function j2(l,r,i){return _e(`/projects/${l}/doe/items/${r}/attach-document`,i,!0)}async function v2(l,r,i){return _e(`/projects/${l}/doe/items/${r}/validate`,i??{},!0)}async function y2(l,r,i){return _e(`/projects/${l}/doe/items/${r}/reject`,i,!0)}async function N2(l,r,i){return _e(`/projects/${l}/doe/items/${r}/mark-not-applicable`,i??{},!0)}async function _2(l,r,i){return _e(`/projects/${l}/doe/items/${r}/comments`,i,!0)}function S2(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 Iu(l,r){return Ae(`/projects/${l}/actions${S2(r)}`,!0)}async function w2(l,r){return Ae(`/projects/${l}/actions/${r}`,!0)}async function C2(l,r){return _e(`/projects/${l}/actions`,r,!0)}async function E2(l,r,i){return Ue(`/projects/${l}/actions/${r}`,i,!0)}async function A2(l,r,i){return Ue(`/projects/${l}/actions/${r}/assign`,i,!0)}async function k2(l,r,i){return _e(`/projects/${l}/actions/${r}/comments`,i,!0)}async function T2(l,r,i){return _e(`/projects/${l}/actions/${r}/mark-done`,i??{},!0)}async function z2(l,r,i){return _e(`/projects/${l}/actions/${r}/verify`,i??{},!0)}async function M2(l,r,i){return _e(`/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;},yi={low:&quot;Faible&quot;,normal:&quot;Normale&quot;,high:&quot;Élevée&quot;,critical:&quot;Critique&quot;},Rp={phase:&quot;Phase&quot;,task:&quot;Tâche&quot;,milestone:&quot;Jalon&quot;},Op={accepted:&quot;Accepté&quot;,corrected:&quot;Corrigé&quot;,rejected:&quot;Rejeté&quot;},Ni={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;},_i={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;},D2=[&quot;observation&quot;,&quot;blocking&quot;,&quot;rfi&quot;];function Su(l){return l===&quot;ENT&quot;?D2: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 R2(l){return Su(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;},Si={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;},Wu={project:&quot;Chantier&quot;,restricted:&quot;Restreint&quot;,confidential:&quot;Confidentiel&quot;};function O2(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;},wi={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;},Ci={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 L2(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;},U2=[&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 $2(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;BC&quot;||l===&quot;SA&quot;}function q2(){var q;const{lotId:l}=Ys(),r=ys(),{activeProject:i}=Fe(),[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,R]=d.useState(!1),[A,E]=d.useState(null),[S,$]=d.useState([]),[z,X]=d.useState([]),[Q,G]=d.useState([]),[I,Z]=d.useState([]),[k,w]=d.useState([]),ee=d.useCallback(async()=&gt;{if(!(!i||!l)){p(!0),v(null);try{const[U,_,T,M,B,ce,D]=await Promise.all([DN(i.id,Number(l)),Tt(i.id),ji(i.id,{lot_id:Number(l)}),vi(i.id,{lot_id:Number(l)}),Ju(i.id,{lot_id:Number(l)}),Dp(i.id,{lot_id:Number(l)}),Iu(i.id,{lot_id:Number(l)})]);m(U.data),x(_.meta.organizations),$(T.data.slice(0,5)),X(M.data.slice(0,5)),G(B.data.slice(0,5)),Z(ce.data.slice(0,5)),w(D.data.slice(0,5))}catch(U){U instanceof me&amp;&amp;U.status===403?v(&quot;Accès refusé à ce lot.&quot;):U instanceof me&amp;&amp;U.status===404?v(&quot;Lot introuvable.&quot;):v(&quot;Impossible de charger le lot.&quot;)}finally{p(!1)}}},[i,l]);d.useEffect(()=&gt;{ee()},[ee]);async function ae(U){if(!(!i||!c)){R(!0);try{const _=await ON(i.id,c.id,U);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{R(!1)}}}async function Y(){if(!(!i||!c||!window.confirm(&quot;Archiver ce lot ?&quot;))){R(!0);try{await LN(i.id,c.id),r(&quot;/lots&quot;,{replace:!0})}catch(U){v(U instanceof me?U.message:&quot;Erreur lors de l’archivage.&quot;),R(!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:bi[c.status],tone:_u[c.status]}),c.permissions.canEdit&amp;&amp;t.jsx(L,{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(L,{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:((q=c.main_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;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(U=&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/${U.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:U.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:U.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:ga[U.status],tone:$n[U.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[Tl[U.priority],U.due_date?` · ${U.due_date}`:&quot;&quot;]})]})]},U.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(U=&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/${U.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:U.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:U.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:qa[U.status],tone:Dn[U.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[U.declared_progress,&quot;% / &quot;,U.validated_progress,&quot;%&quot;]})]})]},U.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;}),z.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:z.map(U=&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/${U.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:U.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:U.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:kl[U.status],tone:_i[U.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[Rn[U.priority],U.due_date?` · ${U.due_date}`:&quot;&quot;]})]})]},U.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;}),Q.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:Q.map(U=&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/${U.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:U.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:U.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:Ln[U.status],tone:Si[U.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[((_=U.current_version)==null?void 0:_.version_label)??&quot;—&quot;,U.is_doe_candidate?&quot; · DOE&quot;:&quot;&quot;]})]})]},U.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;}),I.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:I.map(U=&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/${U.id}`,className:&quot;font-semibold text-planx-orange&quot;,children:U.code}),t.jsx(&quot;p&quot;,{className:&quot;truncate text-slate-700&quot;,children:U.title})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex items-center gap-2 text-xs&quot;,children:[t.jsx(Ee,{label:Un[U.status],tone:wi[U.status]}),t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[U.has_attached_document?&quot;Doc.&quot;:&quot;Sans doc.&quot;,U.is_required?&quot; · Oblig.&quot;:&quot;&quot;]})]})]},U.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(zp,{open:j,title:&quot;Modifier le lot&quot;,organizations:f,initial:c,isSubmitting:C,onClose:()=&gt;y(!1),onSubmit:ae})]})}const B2=[&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;],H2=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;],V2=[&quot;task&quot;,&quot;phase&quot;,&quot;milestone&quot;];function Lp({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[R,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;&quot;),[$,z]=d.useState(&quot;task&quot;),[X,Q]=d.useState(&quot;&quot;),[G,I]=d.useState(&quot;&quot;),[Z,k]=d.useState(&quot;&quot;),[w,ee]=d.useState(&quot;&quot;),[ae,Y]=d.useState(&quot;planned&quot;),[q,U]=d.useState(&quot;normal&quot;),[_,T]=d.useState(&quot;&quot;),[M,B]=d.useState(&quot;&quot;),[ce,D]=d.useState(&quot;&quot;),[F,K]=d.useState(&quot;&quot;),[te,H]=d.useState(&quot;&quot;),[ue,fe]=d.useState(&quot;0&quot;),[Ce,Me]=d.useState(&quot;0&quot;),[ft,Kt]=d.useState(&quot;&quot;),xt=$===&quot;milestone&quot;||b===&quot;milestone&quot;,Ct=$===&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;),z(xe),Q((x==null?void 0:x.wbs_code)??&quot;&quot;),I(((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;),ee(((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;),U((x==null?void 0:x.priority)??&quot;normal&quot;),T((x==null?void 0:x.planned_start_date)??&quot;&quot;),B((x==null?void 0:x.planned_end_date)??&quot;&quot;),D((x==null?void 0:x.milestone_date)??&quot;&quot;),K((x==null?void 0:x.zone_text)??&quot;&quot;),H((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)),Kt(((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=V2.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:R.trim().toUpperCase(),title:E.trim(),description:te.trim()||void 0,zone_text:F.trim()||void 0,lot_id:Z?Number(Z):null,parent_task_id:G?Number(G):null,wbs_code:X.trim()||null,task_type:$,is_milestone:xt,milestone_date:xt&amp;&amp;ce||null,responsible_organization_id:w?Number(w):null,status:ae,priority:q,planned_start_date:xt?null:_||null,planned_end_date:xt?null:M||null,declared_progress:Number(ue),validated_progress:Number(Ce),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:$,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;,children:bt.map(xe=&gt;t.jsx(&quot;option&quot;,{value:xe,children:Rp[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:R,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:X,onChange:xe=&gt;Q(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;Kt(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;I(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:q,onChange:xe=&gt;U(xe.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:H2.map(xe=&gt;t.jsx(&quot;option&quot;,{value:xe,children:yi[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:ae,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:B2.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;ee(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;T(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:M,onChange:xe=&gt;B(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:F,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;})]}),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:te,onChange:xe=&gt;H(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:ue,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:Ce,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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:y,disabled:j,children:&quot;Annuler&quot;}),t.jsx(L,{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 fi(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 Y2(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 G2(l){const r=Up(l),i=$p(l);return!r||!i?null:{start:r,end:i}}function Up(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 $p(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=Up(l),f=$p(l);if(!m||!f)return null;const x=fi(m,f,i,c);return r===&quot;start&quot;?x.left:x.left+x.width}function Z2(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,Q2=14,uu=14,ci=10,X2=&quot;Conflit planning : la tâche dépendante commence avant la fin de la tâche précédente.&quot;;function wh(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 P2(l,r,i,c,m){const f=l+Q2,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-ci,i-uu);return m?g=Math.min(g,l-ci,i-uu):i&gt;l&amp;&amp;(g=Math.min(f-ci,i-uu),g&gt;=f-2&amp;&amp;(g=f-ci)),`M ${l} ${r} H ${f} V ${p} H ${g} V ${c} H ${i}`}function K2(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=wh(p,b.dependency_type,&quot;from&quot;,i,c),C=wh(g,b.dependency_type,&quot;to&quot;,i,c);if(y===null||C===null)return null;const R=y/100*m,A=C/100*m,E=v*Hs+Hs/2,S=j*Hs+Hs/2,$=b.dependency_type===&quot;finish_to_start&quot;,z=b.conflict_reason===&quot;dates_missing&quot;?!1:b.is_schedule_conflict??($&amp;&amp;A&lt;R-.5);return b.conflict_reason===&quot;dates_missing&quot;?null:{id:b.id,d:P2(R,E,A,S,z),isConflict:z,successorTaskId:g.id,title:z?X2:&quot;Dépendance Fin → Début&quot;}}).filter(b=&gt;b!==null)}function F2({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 du=14,J2=&quot;polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)&quot;;function I2({leftPercent:l,widthPercent:r,isLate:i=!1,title:c}){const m=l+r/2,f=du/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:du,height:du,transform:&quot;translateY(-50%)&quot;,clipPath:J2},title:c,&quot;aria-hidden&quot;:!0})}const Ch=&quot;(min-width: 1024px)&quot;;function ed(){const[l,r]=d.useState(()=&gt;typeof window&gt;&quot;u&quot;?!0:window.matchMedia(Ch).matches);return d.useEffect(()=&gt;{const i=window.matchMedia(Ch),c=()=&gt;r(i.matches);return i.addEventListener(&quot;change&quot;,c),()=&gt;i.removeEventListener(&quot;change&quot;,c)},[]),l}function Eh(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 W2({tasks:l,dependencies:r,meta:i,showDependencies:c=!0}){const m=ed(),f=m?72:48,x=Z2(i.weeks),b=Y2(i.today,i.period_start,i.period_end),p=i.weeks.length*f,g=l.length*Hs,v=d.useMemo(()=&gt;c?K2(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(F2,{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} · ${Eh(y)}`,children:y.title}),t.jsx(&quot;p&quot;,{className:&quot;mt-0.5 text-[10px] text-slate-500&quot;,children:Eh(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=G2(y),R=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;(R?t.jsx(I2,{leftPercent:fi(C.start,C.end,i.period_start,i.period_end).left,widthPercent:fi(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=fi(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 td(l){return Ae(`/projects/${l}/task-work-types`,!0)}function e1(l,r){return _e(`/projects/${l}/task-work-types`,r,!0)}function t1(l,r,i){return Ue(`/projects/${l}/task-work-types/${r}`,i,!0)}function Ah(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 s1=[{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;}],a1=[{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 l1(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;SA&quot;}function n1(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 r1(){var Ga,ps;const{activeProject:l,activeMembership:r}=Fe(),[i,c]=Ol(),m=i.get(&quot;lot_id&quot;),f=i.get(&quot;view&quot;),x=ed(),[b,p]=d.useState(()=&gt;Ah(f,x)),[g,v]=d.useState([]),[j,y]=d.useState([]),[C,R]=d.useState([]),[A,E]=d.useState(null),[S,$]=d.useState(!0),[z,X]=d.useState([]),[Q,G]=d.useState([]),[I,Z]=d.useState(!0),[k,w]=d.useState(null),[ee,ae]=d.useState(&quot;&quot;),[Y,q]=d.useState(&quot;all&quot;),[U,_]=d.useState(m??&quot;&quot;),[T,M]=d.useState(&quot;&quot;),[B,ce]=d.useState(&quot;&quot;),[D,F]=d.useState(!1),[K,te]=d.useState(!0),[H,ue]=d.useState(!1),[fe,Ce]=d.useState(&quot;task&quot;),[Me,ft]=d.useState(!1),[Kt,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,ye]=await Promise.all([ji(l.id,ie),Tt(l.id),td(l.id).catch(()=&gt;({data:[]}))]);ht(ye.data),v(ke.data),G(ke.meta.organizations),X(ne.data.filter(Se=&gt;Se.status!==&quot;archived&quot;))},[l,m,bt]),os=d.useCallback(async()=&gt;{if(!l)return;const ie={search:ee.trim()||void 0,hide_closed:K,only_late:D||void 0};U&amp;&amp;(ie.lot_id=Number(U)),T&amp;&amp;(ie.status=T),B&amp;&amp;(ie.responsible_organization_id=Number(B));const[ke,ne]=await Promise.all([HN(l.id,ie),Tt(l.id)]);y(ke.data),R(ke.dependencies??[]),E(ke.meta),G(ke.meta.organizations),X(ne.data.filter(ye=&gt;ye.status!==&quot;archived&quot;))},[l,ee,K,D,U,T,B]),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([]),R([])}finally{Z(!1)}}},[l,b,Et,os]);d.useEffect(()=&gt;{zt()},[zt]),d.useEffect(()=&gt;{p(Ah(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=ee.trim().toLowerCase();return g.filter(ke=&gt;{var ne,ye,Se;return bt&amp;&amp;String(ke.task_work_type_id??&quot;&quot;)!==bt||!n1(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)||(((ye=ke.lot)==null?void 0:ye.code.toLowerCase().includes(ie))??!1)||(((Se=ke.responsible_organization)==null?void 0:Se.name.toLowerCase().includes(ie))??!1):!0})},[g,ee,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(Se=&gt;Se.status!==&quot;cancelled&quot;),ke=ie.filter(Se=&gt;Se.is_late||Se.status===&quot;late&quot;).length,ne=ie.filter(Se=&gt;Se.status===&quot;pending_validation&quot;).length,ye=ie.length&gt;0?Math.round(ie.reduce((Se,Qs)=&gt;Se+Qs.validated_progress,0)/ie.length):0;return{total:ie.length,late:ke,pending:ne,avgValidated:ye,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 YN(l.id,ke),ue(!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){Ce(ie),ue(!0)}const At=r==null?void 0:r.role_code,Zs=l1(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=z.find(ie=&gt;ie.id===Number(m)))==null?void 0:ps.code:null;return I?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(L,{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(L,{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(jp,{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;})]}),Kt&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:Kt}),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:ee,onChange:ie=&gt;ae(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:s1.map(ie=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;q(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:U,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;}),z.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:T,onChange:ie=&gt;M(ie.target.value),className:&quot;mt-1 rounded-lg border border-slate-200 px-2 py-1.5 text-sm&quot;,children:a1.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:B,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;}),Q.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;F(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:K,onChange:ie=&gt;te(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;$(ie.target.checked),className:&quot;rounded border-slate-300&quot;}),&quot;Afficher dépendances&quot;]}),t.jsx(L,{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,ye;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:((ye=ie.responsible_organization)==null?void 0:ye.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:yi[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(L,{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,ye;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;,((ye=ie.responsible_organization)==null?void 0:ye.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:yi[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(L,{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(W2,{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(Lp,{open:H,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:z,organizations:Q,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;ue(!1),onSubmit:Ba})]})}function i1({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Déclarer&quot;})]})]})]})})}const c1=[&quot;accepted&quot;,&quot;corrected&quot;,&quot;rejected&quot;];function o1({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:c1.map(y=&gt;t.jsx(&quot;option&quot;,{value:y,children:Op[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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Valider&quot;})]})]})]})})}const qp={photo:&quot;Photo&quot;,file:&quot;Fichier&quot;,proof:&quot;Preuve&quot;,annex:&quot;Annexe&quot;,other:&quot;Autre&quot;};function u1(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 d1(l,r){return Ae(`/projects/${l}/attachments${u1(r)}`,!0)}function m1(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),qi(`/projects/${l}/attachments`,c)}function f1(l,r){return Zu(`/projects/${l}/attachments/${r}/download`)}function x1(l,r){return Ue(`/projects/${l}/attachments/${r}/archive`)}function h1(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 p1(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 g1({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:qp[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;,p1(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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:r,onClick:c,&quot;aria-label&quot;:&quot;Télécharger&quot;,children:t.jsx(fp,{className:&quot;h-4 w-4&quot;})}),l.permissions.canArchive&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:i,onClick:m,&quot;aria-label&quot;:&quot;Archiver&quot;,children:t.jsx(Fu,{className:&quot;h-4 w-4&quot;})})]})]})}const b1=[&quot;photo&quot;,&quot;file&quot;,&quot;proof&quot;,&quot;annex&quot;,&quot;other&quot;];function j1({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,R]=d.useState(null),[A,E]=d.useState(null);if(d.useEffect(()=&gt;{l&amp;&amp;(p(i),v(&quot;&quot;),y(&quot;&quot;),R(null),E(null))},[l,i]),!l)return null;async function S($){if($.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:$=&gt;void S($),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:$=&gt;p($.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:b1.map($=&gt;t.jsx(&quot;option&quot;,{value:$,children:qp[$]},$))})]}),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:$=&gt;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;Description (optionnelle)&quot;}),t.jsx(&quot;textarea&quot;,{value:j,onChange:$=&gt;y($.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:$=&gt;{var z;return R(((z=$.target.files)==null?void 0:z[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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;md&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;md&quot;,disabled:m,children:m?&quot;Envoi…&quot;:&quot;Envoyer&quot;})]})]})]})})}function Gn({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),[R,A]=d.useState(null),[E,S]=d.useState(null),[$,z]=d.useState(!1),[X,Q]=d.useState(!1),[G,I]=d.useState(null),[Z,k]=d.useState(null),w=d.useCallback(async()=&gt;{C(!0),A(null);try{const q=await d1(l,{module:r,attachable_id:i});j(q.data)}catch(q){A(q instanceof me?q.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;z(!0)},[g]);async function ee(q){Q(!0),A(null);try{const U={module:r,attachable_id:i,attachment_type:q.attachment_type,title:q.title,description:q.description};await m1(l,U,q.file),z(!1),S(&quot;Pièce jointe ajoutée.&quot;),await w()}catch(U){throw A(U instanceof me?U.message:&quot;Échec de l’envoi du fichier.&quot;),U}finally{Q(!1)}}async function ae(q){I(q),A(null);try{const{blob:U,filename:_}=await f1(l,q);h1(U,_)}catch(U){A(U instanceof me?U.message:&quot;Téléchargement impossible.&quot;)}finally{I(null)}}async function Y(q){k(q),A(null);try{await x1(l,q),S(&quot;Pièce jointe archivée.&quot;),j(U=&gt;U.filter(_=&gt;_.id!==q))}catch(U){A(U instanceof me?U.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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(!0),children:[t.jsx(Hv,{className:&quot;mr-1 h-4 w-4&quot;,&quot;aria-hidden&quot;:!0}),&quot;Photo&quot;]}),t.jsxs(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(!0),children:[t.jsx(vp,{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}),R&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:R}),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(q=&gt;t.jsx(g1,{attachment:q,isDownloading:G===q.id,isArchiving:Z===q.id,onDownload:()=&gt;void ae(q.id),onArchive:()=&gt;void Y(q.id)},q.id))}),t.jsx(j1,{open:$,title:b?&quot;Ajouter une photo&quot;:&quot;Ajouter une pièce jointe&quot;,defaultType:x,photoCapture:b,isSubmitting:X,onClose:()=&gt;z(!1),onSubmit:ee})]})}function Bp(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 sd(l){return Ae(`/projects/${l}/locations/context`,!0)}function v1(l){return Ae(`/projects/${l}/locations/zones`,!0)}function y1(l,r){return _e(`/projects/${l}/locations/zones`,r,!0)}function N1(l,r,i){return Ue(`/projects/${l}/locations/zones/${r}`,i,!0)}function _1(l,r){return Ue(`/projects/${l}/locations/zones/${r}/archive`,{},!0)}function S1(l){return Ae(`/projects/${l}/locations/plans`,!0)}function w1(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),qi(`/projects/${l}/locations/plans`,c,!0)}function C1(l,r){return Ue(`/projects/${l}/locations/plans/${r}/archive`,{},!0)}async function E1(l,r){return Zu(`/projects/${l}/locations/plans/${r}/file`)}function A1(l,r,i){return Ae(`/projects/${l}/locations/plans/${r}/markers${Bp(i)}`,!0)}function k1(l,r){return Ae(`/projects/${l}/locations/markers${Bp(r)}`,!0)}function T1(l,r,i){return _e(`/projects/${l}/locations/plans/${r}/markers`,i,!0)}const ad={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;},ld={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;},Ei={point:&quot;Point chantier&quot;,task:&quot;Tâche&quot;};function Hp({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 k1(l,{module:r,markerable_id:i});x(C.data.filter(R=&gt;R.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 R;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:[((R=C.plan)==null?void 0:R.name)??&quot;Plan&quot;,&quot; — &quot;,C.label??C.target.code]}),t.jsxs(&quot;p&quot;,{className:&quot;text-slate-600&quot;,children:[Ei[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 Vp({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 wu={checklist:&quot;Checklist&quot;,form:&quot;Formulaire&quot;},z1={draft:&quot;Brouillon&quot;,submitted:&quot;Soumis&quot;,accepted:&quot;Validé&quot;,rejected:&quot;Rejeté&quot;,archived:&quot;Archivé&quot;},Yp={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;},Cu={task:&quot;Tâche&quot;,point:&quot;Point chantier&quot;},M1={draft:&quot;orange&quot;,submitted:&quot;blue&quot;,accepted:&quot;green&quot;,rejected:&quot;red&quot;,archived:&quot;gray&quot;};function Gp({status:l}){return t.jsx(Ee,{label:z1[l],tone:M1[l]})}function ba(l){return l===&quot;section&quot;||l===&quot;separator&quot;}function Zp(l){return!ba(l)}function Eu(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 D1(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 kh(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())||Eu(m,r);return r.includes(f)&amp;&amp;(f=Eu(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 R1(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()||Eu(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 O1({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,$){b(z=&gt;z.map(X=&gt;X.form_template_field_id===S?{...X,...$,form_template_field_id:S}:X))}const R=L1(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(Gp,{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:R.map(S=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Vp,{field:S.field,answer:S.answer,readOnly:y,onChange:$=&gt;{S.answer&amp;&amp;C(S.answer.form_template_field_id,$)}})},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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:f,onClick:()=&gt;void r(x.filter(S=&gt;!S.field||Zp(S.field.field_type))),children:&quot;Enregistrer brouillon&quot;}),l.permissions.canSubmit&amp;&amp;t.jsx(L,{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(L,{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(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,disabled:f||!v.trim(),onClick:()=&gt;void m(v.trim()),children:&quot;Rejeter&quot;})]})]})]})}function L1(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;Zp(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 U1(l,r){return Ae(`/projects/${l}/tasks/${r}/form-submissions`,!0)}function $1(l,r){return Ae(`/projects/${l}/form-submissions/${r}`,!0)}function q1(l,r,i){return _e(`/projects/${l}/tasks/${r}/form-submissions`,i,!0)}function B1(l,r,i){return Ue(`/projects/${l}/form-submissions/${r}`,i,!0)}function H1(l,r){return Ue(`/projects/${l}/form-submissions/${r}/submit`,{},!0)}function V1(l,r,i){return Ue(`/projects/${l}/form-submissions/${r}/accept`,{review_comment:i},!0)}function Y1(l,r,i){return Ue(`/projects/${l}/form-submissions/${r}/reject`,{review_comment:i},!0)}function G1(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 Qp(l,r){return Ae(`/projects/${l}/form-templates${G1(r)}`,!0)}function Z1(l,r){return Ae(`/projects/${l}/form-templates/${r}`,!0)}function Q1(l,r){return _e(`/projects/${l}/form-templates`,r,!0)}function X1(l,r,i){return Ue(`/projects/${l}/form-templates/${r}`,i,!0)}function P1(l,r){return Ue(`/projects/${l}/form-templates/${r}/archive`,{},!0)}function K1({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),[R,A]=d.useState(!1),[E,S]=d.useState(null),[$,z]=d.useState(!1),[X,Q]=d.useState(&quot;&quot;),G=d.useCallback(async()=&gt;{C(!0),S(null);try{const[_,T]=await Promise.all([U1(l,r),Qp(l,{target_module:&quot;task&quot;})]);f(_.data),b(T.data)}catch(_){S(_ instanceof me?_.message:&quot;Impossible de charger les formulaires.&quot;)}finally{C(!1)}},[l,r]),I=d.useCallback(async _=&gt;{try{const T=await $1(l,_);j(T.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 T=await q1(l,r,{form_template_id:_});await G(),await I(T.data.id),z(!1),Q(&quot;&quot;)}catch(T){S(T instanceof me?T.message:&quot;Erreur lors de la création.&quot;)}finally{A(!1)}}async function ee(){i!=null&amp;&amp;i.default_form_template_id&amp;&amp;await w(i.default_form_template_id)}async function ae(_){if(p){A(!0);try{const T=await B1(l,p,{answers:_.map(M=&gt;({form_template_field_id:M.form_template_field_id,value_text:M.value_text,value_number:M.value_number,value_date:M.value_date,value_boolean:M.value_boolean,comment:M.comment,is_conform:M.is_conform}))});j(T.data),await G()}catch(T){S(T instanceof me?T.message:&quot;Erreur lors de l’enregistrement.&quot;)}finally{A(!1)}}}async function Y(){if(p){A(!0);try{const _=await H1(l,p);j(_.data),await G()}catch(_){S(_ instanceof me?_.message:&quot;Erreur lors de la soumission.&quot;)}finally{A(!1)}}}async function q(_){if(p){A(!0);try{const T=await V1(l,p,_);j(T.data),await G()}catch(T){S(T instanceof me?T.message:&quot;Erreur lors de la validation.&quot;)}finally{A(!1)}}}async function U(_){if(p){A(!0);try{const T=await Y1(l,p,_);j(T.data),await G()}catch(T){S(T instanceof me?T.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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:R,onClick:()=&gt;void ee(),children:&quot;Appliquer checklist par défaut&quot;}),Z&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(_=&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}),$&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:X,onChange:_=&gt;Q(_.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(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:!X||R,onClick:()=&gt;void w(Number(X)),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 T,M;return t.jsx(&quot;li&quot;,{children:t.jsxs(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;void I(_.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??((T=_.template)==null?void 0:T.name)}),t.jsxs(&quot;div&quot;,{className:&quot;mt-1 flex flex-wrap items-center gap-2&quot;,children:[t.jsx(Gp,{status:_.status}),t.jsx(&quot;span&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((M=_.submitter)==null?void 0:M.name)??&quot;—&quot;})]})]})},_.id)})}),v?t.jsx(O1,{submission:v,onSave:ae,onSubmit:Y,onAccept:q,onReject:U,isSubmitting:R}):t.jsx(&quot;p&quot;,{className:&quot;text-sm text-slate-500&quot;,children:&quot;Sélectionnez une soumission pour l’ouvrir.&quot;})]})]})}const F1=[&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 J1(){var D,F;const{taskId:l}=Ys(),{activeProject:r}=Fe(),[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),[R,A]=d.useState(!1),[E,S]=d.useState(!1),[$,z]=d.useState(!1),[X,Q]=d.useState(null),[G,I]=d.useState(&quot;planned&quot;),[Z,k]=d.useState(null),[w,ee]=d.useState([]),ae=d.useCallback(async()=&gt;{if(!(!r||!l)){g(!0),j(null);try{const[K,te]=await Promise.all([VN(r.id,Number(l)),Tt(r.id)]);c(K.data),I(K.data.status),f(te.data.filter(H=&gt;H.status!==&quot;archived&quot;)),b(te.meta.organizations);try{const H=await td(r.id);ee(H.data)}catch{ee([])}try{const H=await sd(r.id);k(H.permissions)}catch{k(null)}}catch(K){K instanceof me&amp;&amp;K.status===403?j(&quot;Accès refusé à cette tâche.&quot;):K instanceof me&amp;&amp;K.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;{ae()},[ae]);async function Y(K){if(!(!r||!i)){z(!0);try{const te=await GN(r.id,i.id,K);c(te.data),C(!1),Q(&quot;Tâche mise à jour avec succès.&quot;)}catch(te){j(te instanceof me?te.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{z(!1)}}}async function q(K){if(!(!r||!i)){z(!0);try{const te=await QN(r.id,i.id,K);c(te.data),A(!1),Q(&quot;Avancement déclaré avec succès.&quot;)}catch(te){j(te instanceof me?te.message:&quot;Erreur lors de la déclaration.&quot;)}finally{z(!1)}}}async function U(K){if(!(!r||!i)){z(!0);try{const te=await XN(r.id,i.id,K);c(te.data),S(!1),Q(&quot;Avancement validé avec succès.&quot;)}catch(te){j(te instanceof me?te.message:&quot;Erreur lors de la validation.&quot;)}finally{z(!1)}}}async function _(){if(!(!r||!i)){z(!0);try{const K=await ZN(r.id,i.id,{status:G});c(K.data),Q(&quot;Statut mis à jour.&quot;)}catch(K){j(K instanceof me?K.message:&quot;Erreur lors du changement de statut.&quot;)}finally{z(!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 T=i.declared_progress-i.validated_progress,M=i.task_type===&quot;phase&quot;,B=i.task_type===&quot;milestone&quot;||i.is_milestone,ce=!M&amp;&amp;!B;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;]}),X&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:X}),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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;C(!0),children:&quot;Modifier&quot;}),i.permissions.canDeclareProgress&amp;&amp;t.jsx(L,{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(L,{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:`${T&gt;0?&quot;+&quot;:&quot;&quot;}${T}%`,subtitle:T&gt;0?&quot;Écart à valider&quot;:&quot;Aligné&quot;,tone:T&gt;10?&quot;red&quot;:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Priorité&quot;,value:yi[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:Rp[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:((F=i.responsible_organization)==null?void 0:F.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(K=&gt;t.jsx(&quot;li&quot;,{children:K.linked_task?t.jsxs(he,{to:`/tasks/${K.linked_task.id}`,className:&quot;text-planx-orange hover:underline&quot;,children:[K.linked_task.code,&quot; — &quot;,K.linked_task.title]}):&quot;—&quot;},K.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(K=&gt;t.jsx(&quot;li&quot;,{children:K.linked_task?t.jsxs(he,{to:`/tasks/${K.linked_task.id}`,className:&quot;text-planx-orange hover:underline&quot;,children:[K.linked_task.code,&quot; — &quot;,K.linked_task.title]}):&quot;—&quot;},K.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:K=&gt;I(K.target.value),className:&quot;mt-1 block rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:F1.map(K=&gt;t.jsx(&quot;option&quot;,{value:K,children:qa[K]},K))})]}),t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:$||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(K=&gt;{var te;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:[K.declared_progress,&quot;%&quot;]}),&quot; · &quot;,((te=K.declared_by)==null?void 0:te.name)??&quot;—&quot;,K.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:K.comment})]},K.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(K=&gt;{var te;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:[K.validated_progress,&quot;%&quot;]}),&quot; · &quot;,Op[K.decision],&quot; · &quot;,((te=K.validated_by)==null?void 0:te.name)??&quot;—&quot;,K.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:K.comment})]},K.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(K=&gt;{var te;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:((te=K.author)==null?void 0:te.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:K.body})]},K.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(K1,{projectId:r.id,taskId:i.id,taskWorkType:i.task_work_type_id?w.find(K=&gt;K.id===i.task_work_type_id)??null:null,formPermissions:i.form_permissions??null}),r&amp;&amp;t.jsx(Hp,{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(Gn,{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(Lp,{open:y,title:&quot;Modifier la tâche&quot;,lots:m,organizations:x,taskWorkTypes:w,initial:i,isSubmitting:$,onClose:()=&gt;C(!1),onSubmit:Y}),t.jsx(i1,{open:R,currentProgress:i.declared_progress,isSubmitting:$,onClose:()=&gt;A(!1),onSubmit:q}),t.jsx(o1,{open:E,currentValidated:i.validated_progress,isSubmitting:$,onClose:()=&gt;S(!1),onSubmit:U})]})}const I1=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;];function Xp({open:l,title:r,roleCode:i,lots:c,organizations:m,initial:f,isSubmitting:x,onClose:b,onSubmit:p}){const g=Su(i),[v,j]=d.useState(&quot;&quot;),[y,C]=d.useState(g[0]??&quot;observation&quot;),[R,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;&quot;),[$,z]=d.useState(&quot;&quot;),[X,Q]=d.useState(&quot;&quot;),[G,I]=d.useState(&quot;normal&quot;),[Z,k]=d.useState(&quot;&quot;),[w,ee]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{var q,U,_;if(!l)return;const Y=Su(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;),z(((q=f==null?void 0:f.lot_id)==null?void 0:q.toString())??&quot;&quot;),Q(((_=(U=f==null?void 0:f.responsible_organization)==null?void 0:U.id)==null?void 0:_.toString())??&quot;&quot;),I((f==null?void 0:f.priority)??&quot;normal&quot;),k((f==null?void 0:f.due_date)??&quot;&quot;),ee((f==null?void 0:f.zone_text)??&quot;&quot;)},[l,f,i]),!l||g.length===0)return null;async function ae(Y){Y.preventDefault(),await p({code:v.trim().toUpperCase(),type:y,title:R.trim(),description:E.trim(),zone_text:w.trim()||void 0,lot_id:$?Number($):null,responsible_organization_id:X?Number(X):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 ae(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:Ni[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:R,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:$,onChange:Y=&gt;z(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:X,onChange:Y=&gt;Q(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;I(Y.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:I1.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;ee(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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:b,disabled:x,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:x,children:x?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const W1=[{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 e_(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 t_(){var q,U;const{activeProject:l,activeMembership:r}=Fe(),[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),[R,A]=d.useState(&quot;&quot;),[E,S]=d.useState(&quot;all&quot;),[$,z]=d.useState(!1),[X,Q]=d.useState(!1),[G,I]=d.useState(null),Z=d.useCallback(async()=&gt;{if(l){j(!0),C(null);try{const _=c?{lot_id:Number(c)}:void 0,[T,M]=await Promise.all([vi(l.id,_),Tt(l.id)]);f(T.data),g(T.meta.organizations),b(M.data.filter(B=&gt;B.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 _=R.trim().toLowerCase();return m.filter(T=&gt;{var M,B;return e_(T,E,(M=r==null?void 0:r.organization)==null?void 0:M.id)?_?T.code.toLowerCase().includes(_)||T.title.toLowerCase().includes(_)||(((B=T.lot)==null?void 0:B.code.toLowerCase().includes(_))??!1):!0:!1})},[m,R,E,(q=r==null?void 0:r.organization)==null?void 0:q.id]),w=d.useMemo(()=&gt;{const _=m.filter(ce=&gt;![&quot;closed&quot;,&quot;cancelled&quot;,&quot;rejected&quot;].includes(ce.status)),T=_.filter(ce=&gt;ce.priority===&quot;critical&quot;).length,M=_.filter(ce=&gt;ce.is_late).length,B=_.filter(ce=&gt;ce.status===&quot;to_verify&quot;).length;return{open:_.length,critical:T,late:M,toVerify:B}},[m]);async function ee(_){if(l){Q(!0);try{await FN(l.id,_),z(!1),I(&quot;Point créé avec succès.&quot;),await Z()}catch(T){C(T instanceof me?T.message:&quot;Erreur lors de la création.&quot;)}finally{Q(!1)}}}const ae=R2(r==null?void 0:r.role_code),Y=c?(U=x.find(_=&gt;_.id===Number(c)))==null?void 0:U.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:ae?t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;z(!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:R,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:W1.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 T,M;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:Ni[_.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:((T=_.lot)==null?void 0:T.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((M=_.responsible_organization)==null?void 0:M.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:_i[_.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(L,{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 T,M;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:[Ni[_.type],&quot; · &quot;,((T=_.lot)==null?void 0:T.code)??&quot;—&quot;]})]}),t.jsx(Ee,{label:kl[_.status],tone:_i[_.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:((M=_.responsible_organization)==null?void 0:M.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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},_.id)})})]}),t.jsx(Xp,{open:$,title:&quot;Créer un point&quot;,roleCode:r==null?void 0:r.role_code,lots:x,organizations:p,isSubmitting:X,onClose:()=&gt;z(!1),onSubmit:ee})]})}function s_({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}const a_={&quot;mark-corrected&quot;:&quot;Marquer comme corrigé&quot;,verify:&quot;Vérifier la correction&quot;,close:&quot;Clôturer le point&quot;};function l_({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:a_[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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Confirmer&quot;})]})]})]})})}function n_(){var U;const{pointId:l}=Ys(),{activeProject:r,activeMembership:i}=Fe(),[c,m]=d.useState(null),[f,x]=d.useState([]),[b,p]=d.useState([]),[g,v]=d.useState(!0),[j,y]=d.useState(null),[C,R]=d.useState(!1),[A,E]=d.useState(!1),[S,$]=d.useState(null),[z,X]=d.useState(!1),[Q,G]=d.useState(null),[I,Z]=d.useState(0),[k,w]=d.useState(null),ee=d.useCallback(async()=&gt;{if(!(!r||!l)){v(!0),y(null);try{const[_,T]=await Promise.all([KN(r.id,Number(l)),Tt(r.id)]);m(_.data),x(T.data.filter(M=&gt;M.status!==&quot;archived&quot;)),p(T.meta.organizations);try{const M=await sd(r.id);w(M.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;{ee()},[ee]);async function ae(_){if(!(!r||!c)){X(!0);try{const T=await JN(r.id,c.id,_);m(T.data),R(!1),G(&quot;Point mis à jour avec succès.&quot;)}catch(T){y(T instanceof me?T.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{X(!1)}}}async function Y(_){if(!(!r||!c)){X(!0);try{const T=await IN(r.id,c.id,{body:_});m(T.data),E(!1),G(&quot;Commentaire ajouté.&quot;)}catch(T){y(T instanceof me?T.message:&quot;Erreur lors du commentaire.&quot;)}finally{X(!1)}}}async function q(_){if(!(!r||!c||!S)){X(!0);try{let T;S===&quot;mark-corrected&quot;?T=await WN(r.id,c.id,_):S===&quot;verify&quot;?T=await e2(r.id,c.id,_):T=await t2(r.id,c.id,{comment:_.comment??&quot;&quot;}),m(T.data),$(null),G(&quot;Action enregistrée avec succès.&quot;)}catch(T){y(T instanceof me?T.message:&quot;Erreur lors de l’action.&quot;)}finally{X(!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;]}),Q&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:Q}),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:`${Ni[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:_i[c.status]}),c.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;R(!0),children:&quot;Modifier&quot;}),c.permissions.canComment&amp;&amp;t.jsx(L,{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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Z(_=&gt;_+1),children:&quot;Photo&quot;}),c.permissions.canMarkCorrected&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;$(&quot;mark-corrected&quot;),children:&quot;Marquer corrigé&quot;}),c.permissions.canVerify&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;$(&quot;verify&quot;),children:&quot;Vérifier&quot;}),c.permissions.canClose&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;$(&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:((U=c.responsible_organization)==null?void 0:U.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 T;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:((T=_.author)==null?void 0:T.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 T;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:((T=_.changed_by)==null?void 0:T.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(Hp,{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(Gn,{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:I})]})]}),t.jsx(Xp,{open:C,title:&quot;Modifier le point&quot;,roleCode:i==null?void 0:i.role_code,lots:f,organizations:b,initial:c,isSubmitting:z,onClose:()=&gt;R(!1),onSubmit:ae}),t.jsx(s_,{open:A,isSubmitting:z,onClose:()=&gt;E(!1),onSubmit:Y}),t.jsx(l_,{open:S!==null,action:S??&quot;close&quot;,isSubmitting:z,onClose:()=&gt;$(null),onSubmit:q})]}):null}function r_(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 i_({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 ${r_(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 c_({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,R=(j.clientY-y.top)/y.height*100;b(Math.min(100,Math.max(0,C)),Math.min(100,Math.max(0,R)))}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(i_,{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 o_(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 u_(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 Pp({zone:l,zones:r,depth:i,canManage:c,onEdit:m,onArchive:f}){const x=u_(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:ad[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(L,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;m(l),children:&quot;Modifier&quot;}),t.jsx(L,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;f(l),children:&quot;Archiver&quot;})]})]}),x.map(b=&gt;t.jsx(Pp,{zone:b,zones:r,depth:i+1,canManage:c,onEdit:m,onArchive:f},b.id))]})}function d_({zones:l,canManage:r,onEdit:i,onArchive:c}){const m=l.filter(x=&gt;x.status!==&quot;archived&quot;),f=o_(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(Pp,{zone:x,zones:m,depth:0,canManage:r,onEdit:i,onArchive:c},x.id))})}const m_=Object.keys(ad);function f_({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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=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;),R(c!=null&amp;&amp;c.parent_zone_id?String(c.parent_zone_id):&quot;&quot;),E((c==null?void 0:c.description)??&quot;&quot;),$(null))},[l,c]),!l)return null;const z=i.filter(Q=&gt;Q.id!==(c==null?void 0:c.id)&amp;&amp;Q.status!==&quot;archived&quot;);async function X(Q){if(Q.preventDefault(),!b.trim()||!g.trim()){$(&quot;Le code et le nom sont obligatoires.&quot;);return}$(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:Q=&gt;void X(Q),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:Q=&gt;p(Q.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:Q=&gt;v(Q.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:Q=&gt;y(Q.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:m_.map(Q=&gt;t.jsx(&quot;option&quot;,{value:Q,children:ad[Q]},Q))})]}),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:Q=&gt;R(Q.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;}),z.map(Q=&gt;t.jsxs(&quot;option&quot;,{value:Q.id,children:[Q.code,&quot; — &quot;,Q.name]},Q.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:Q=&gt;E(Q.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(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const x_=Object.keys(ld);function h_({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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;&quot;),[z,X]=d.useState(null),[Q,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;),R(&quot;&quot;),E(&quot;&quot;),$(&quot;&quot;),X(null),G(null))},[l]),!l)return null;async function I(Z){if(Z.preventDefault(),!f.trim()||!b.trim()){G(&quot;Le code et le nom sont obligatoires.&quot;);return}if(!z){G(&quot;Veuillez sélectionner un fichier plan.&quot;);return}if(z.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},z)}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 I(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:x_.map(Z=&gt;t.jsx(&quot;option&quot;,{value:Z,children:ld[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;R(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;$(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 X(((k=Z.target.files)==null?void 0:k[0])??null)},className:&quot;mt-1 w-full text-sm&quot;})]}),Q&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:Q}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:i,children:i?&quot;Envoi…&quot;:&quot;Déposer&quot;})]})]})]})})}function p_({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;),[R,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 $=v===&quot;point&quot;?i:c;async function z(X){if(X.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:R?Number(R):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:X=&gt;void z(X),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:X=&gt;{j(X.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:Ei.point}),t.jsx(&quot;option&quot;,{value:&quot;task&quot;,children:Ei.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:X=&gt;C(X.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;}),$.map(X=&gt;t.jsxs(&quot;option&quot;,{value:X.id,children:[X.code,&quot; — &quot;,X.title]},X.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:R,onChange:X=&gt;A(X.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(X=&gt;t.jsxs(&quot;option&quot;,{value:X.id,children:[X.code,&quot; — &quot;,X.name]},X.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(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:p,disabled:b,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:b||!x,children:b?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const g_=[{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 b_(){var ke;const{activeProject:l}=Fe(),r=ed(),[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,R]=d.useState([]),[A,E]=d.useState([]),[S,$]=d.useState([]),[z,X]=d.useState(null),[Q,G]=d.useState(null),[I,Z]=d.useState(null),[k,w]=d.useState(&quot;&quot;),[ee,ae]=d.useState(&quot;&quot;),[Y,q]=d.useState(!0),[U,_]=d.useState(!0),[T,M]=d.useState(!0),[B,ce]=d.useState(null),[D,F]=d.useState(null),[K,te]=d.useState(!1),[H,ue]=d.useState(!1),[fe,Ce]=d.useState(null),[Me,ft]=d.useState(!1),[Kt,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===z)??null,[A,z]),nt=j==null?void 0:j.permissions,us=d.useCallback(async()=&gt;{if(l){M(!0),ce(null);try{const[ne,ye,Se]=await Promise.all([sd(l.id),v1(l.id),S1(l.id)]);y({summary:ne.summary,permissions:ne.permissions}),R(ye.data),E(Se.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{M(!1)}}},[l]),et=d.useCallback(async ne=&gt;{if(l)try{const ye=await A1(l.id,ne);$(ye.data.filter(Se=&gt;Se.status!==&quot;archived&quot;))}catch{$([])}},[l]),Ba=d.useCallback(async ne=&gt;{if(!l||!ne.is_image){Z(null);return}try{const{blob:ye}=await E1(l.id,ne.id),Se=URL.createObjectURL(ye);Z(Qs=&gt;(Qs&amp;&amp;URL.revokeObjectURL(Qs),Se))}catch{Z(null)}},[l]);d.useEffect(()=&gt;{us()},[us]),d.useEffect(()=&gt;{if(A.length===0)return;const ne=m?Number(m):null,ye=ne&amp;&amp;A.some(Se=&gt;Se.id===ne)?ne:A[0].id;X(ye),(ne||f||p)&amp;&amp;v(&quot;view&quot;)},[A,m,f,p]),d.useEffect(()=&gt;{z&amp;&amp;et(z)},[z,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(ye=&gt;ye.id===Number(f));ne&amp;&amp;G(ne)},[f,S]),d.useEffect(()=&gt;{!l||!p||Promise.all([vi(l.id),ji(l.id)]).then(([ne,ye])=&gt;{Et(ne.data.map(Se=&gt;({id:Se.id,code:Se.code,title:Se.title}))),zt(ye.data.map(Se=&gt;({id:Se.id,code:Se.code,title:Se.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||ee&amp;&amp;String(ne.site_zone_id??&quot;&quot;)!==ee)),[S,k,ee]);async function At(ne){if(l){te(!0);try{fe?(await N1(l.id,fe.id,ne),F(&quot;Zone mise à jour.&quot;)):(await y1(l.id,ne),F(&quot;Zone créée.&quot;)),ue(!1),Ce(null),await us()}catch(ye){ce(ye instanceof me?ye.message:&quot;Erreur lors de l’enregistrement de la zone.&quot;)}finally{te(!1)}}}async function Zs(ne){if(!(!l||!window.confirm(`Archiver la zone ${ne.code} ?`)))try{await _1(l.id,ne.id),F(&quot;Zone archivée.&quot;),await us()}catch(ye){ce(ye instanceof me?ye.message:&quot;Erreur lors de l’archivage.&quot;)}}async function Ha(ne,ye){if(l){te(!0);try{const Se=await w1(l.id,ne,ye);ft(!1),F(&quot;Plan déposé avec succès.&quot;),await us(),X(Se.data.id),v(&quot;view&quot;)}catch(Se){ce(Se instanceof me?Se.message:&quot;Erreur lors du dépôt du plan.&quot;)}finally{te(!1)}}}async function Va(ne){if(!(!l||!window.confirm(`Archiver le plan ${ne.code} ?`)))try{await C1(l.id,ne.id),F(&quot;Plan archivé.&quot;),await us()}catch(ye){ce(ye instanceof me?ye.message:&quot;Erreur lors de l’archivage.&quot;)}}async function Ya(ne){if(!(!l||!z)){te(!0);try{await T1(l.id,z,ne),Bt(!1),xt(!1),ht(null),F(&quot;Marqueur ajouté.&quot;),await us(),await et(z)}catch(ye){ce(ye instanceof me?ye.message:&quot;Erreur lors de la création du marqueur.&quot;)}finally{te(!1)}}}function Ga(){l&amp;&amp;Promise.all([vi(l.id),ji(l.id)]).then(([ne,ye])=&gt;{Et(ne.data.map(Se=&gt;({id:Se.id,code:Se.code,title:Se.title}))),zt(ye.data.map(Se=&gt;({id:Se.id,code:Se.code,title:Se.title}))),xt(!0),ht(null),Bt(!1)})}function ps(ne,ye){ht({x:ne,y:ye}),Bt(!0)}if(!l)return t.jsx(Ve,{title:&quot;Aucun chantier actif&quot;,description:&quot;Sélectionnez un chantier pour continuer.&quot;});if(T&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(B&amp;&amp;!j)return t.jsx(Ve,{title:&quot;Localisation indisponible&quot;,description:B});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(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:Ga,disabled:!z,children:[t.jsx(_y,{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}),B&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:B}),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:g_.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:z??&quot;&quot;,onChange:ne=&gt;{const ye=Number(ne.target.value);X(ye),G(null),c({plan_id:String(ye)})},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:ee,onChange:ne=&gt;ae(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;q(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:U,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(c_,{plan:Mt,imageUrl:I,markers:Ns,selectedMarkerId:(Q==null?void 0:Q.id)??null,placementMode:Kt,showPoints:Y,showTasks:U,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 ${(Q==null?void 0:Q.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:Ei[ne.module]})]})},ne.id))}),Q&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:Q.target.code}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:Q.target.title}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:((ke=Q.zone)==null?void 0:ke.name)??&quot;Sans zone&quot;}),t.jsxs(he,{to:Q.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(Ku,{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(L,{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:[ld[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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{X(ne.id),v(&quot;view&quot;),c({plan_id:String(ne.id)})},children:&quot;Ouvrir&quot;}),ne.permissions.canArchive&amp;&amp;t.jsx(L,{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(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{Ce(null),ue(!0)},children:&quot;Créer une zone&quot;}),t.jsx(d_,{zones:C,canManage:!!(nt!=null&amp;&amp;nt.canManageZones),onEdit:ne=&gt;{Ce(ne),ue(!0)},onArchive:ne=&gt;void Zs(ne)})]}),t.jsx(f_,{open:H,title:fe?&quot;Modifier la zone&quot;:&quot;Créer une zone&quot;,zones:C,initial:fe,isSubmitting:K,onClose:()=&gt;{ue(!1),Ce(null)},onSubmit:At}),t.jsx(h_,{open:Me,zones:C.filter(ne=&gt;ne.status!==&quot;archived&quot;),isSubmitting:K,onClose:()=&gt;ft(!1),onSubmit:Ha}),t.jsx(p_,{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:K,onClose:()=&gt;{Bt(!1),xt(!1),ht(null)},onSubmit:Ya})]})}const j_=[&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;],v_=[&quot;project&quot;,&quot;restricted&quot;,&quot;confidential&quot;];function Kp({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;),[R,A]=d.useState(&quot;other&quot;),[E,S]=d.useState(&quot;&quot;),[$,z]=d.useState(&quot;project&quot;),[X,Q]=d.useState(!1),[G,I]=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;),z((c==null?void 0:c.confidentiality)??&quot;project&quot;),Q((c==null?void 0:c.is_doe_candidate)??!1),I(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:R,confidentiality:$,lot_id:E?Number(E):null,is_doe_candidate:X},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 I(((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:R,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:j_.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:$,onChange:k=&gt;z(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:v_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:Wu[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:X,onChange:k=&gt;Q(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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:x,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const y_=[{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 N_(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 __(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 S_(){var Y;const{user:l}=Gs(),{activeProject:r,activeMembership:i}=Fe(),[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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;all&quot;),[S,$]=d.useState(!1),[z,X]=d.useState(!1),[Q,G]=d.useState(null),I=d.useCallback(async()=&gt;{if(r){v(!0),y(null);try{const q=m?{lot_id:Number(m)}:void 0,[U,_]=await Promise.all([Ju(r.id,q),Tt(r.id)]);x(U.data),p(_.data.filter(T=&gt;T.status!==&quot;archived&quot;).map(T=&gt;({id:T.id,code:T.code,name:T.name})))}catch(q){y(q instanceof me&amp;&amp;q.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;{I()},[I]);const Z=d.useMemo(()=&gt;{const q=C.trim().toLowerCase();return f.filter(U=&gt;{var _;return N_(U,A,l==null?void 0:l.id)?q?U.code.toLowerCase().includes(q)||U.title.toLowerCase().includes(q)||(((_=U.lot)==null?void 0:_.code.toLowerCase().includes(q))??!1):!0:!1})},[f,C,A,l==null?void 0:l.id]),k=d.useMemo(()=&gt;{const q=f.filter(U=&gt;U.status!==&quot;archived&quot;);return{total:q.length,pending:q.filter(U=&gt;[&quot;submitted&quot;,&quot;pending_validation&quot;].includes(U.status)).length,validated:q.filter(U=&gt;U.status===&quot;validated&quot;).length,doe:q.filter(U=&gt;U.is_doe_candidate).length}},[f]);async function w(q,U){if(!(!r||!U)){X(!0);try{await n2(r.id,q,U),$(!1),G(&quot;Document déposé avec succès.&quot;),await I()}catch(_){y(_ instanceof me?_.message:&quot;Erreur lors du dépôt.&quot;)}finally{X(!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 ee=m?(Y=b.find(q=&gt;q.id===Number(m)))==null?void 0:Y.code:null,ae=O2(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:ae?t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;$(!0),children:&quot;Déposer un document&quot;}):void 0}),ee&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:ee}),&quot; · &quot;,t.jsx(he,{to:&quot;/documents&quot;,className:&quot;text-planx-orange hover:underline&quot;,children:&quot;Voir tous les documents&quot;})]}),Q&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:Q}),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:q=&gt;R(q.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:y_.map(q=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;E(q.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${A===q.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:q.label},q.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(q=&gt;{var U,_;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:q.code}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[200px] truncate px-4 py-3 font-medium&quot;,children:q.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:On[q.document_type]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((U=q.lot)==null?void 0:U.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((_=q.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[q.status],tone:Si[q.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Wu[q.confidentiality]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:q.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/${q.id}`,children:t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},q.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:Z.map(q=&gt;{var U,_,T,M;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:q.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:q.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[On[q.document_type],&quot; · &quot;,((U=q.lot)==null?void 0:U.code)??&quot;—&quot;]})]}),t.jsx(Ee,{label:Ln[q.status],tone:Si[q.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:((_=q.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:((T=q.current_version)==null?void 0:T.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:__((M=q.current_version)==null?void 0:M.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:q.is_doe_candidate?&quot;Oui&quot;:&quot;Non&quot;})]})]}),t.jsx(he,{to:`/documents/${q.id}`,className:&quot;mt-4 block&quot;,children:t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},q.id)})})]}),t.jsx(Kp,{open:S,title:&quot;Déposer un document&quot;,lots:b,isSubmitting:z,requireFile:!0,onClose:()=&gt;$(!1),onSubmit:w})]})}function w_({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Déposer&quot;})]})]})]})})}function C_({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:&quot;Publier&quot;})]})]})]})})}function E_({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{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 A_(l){return l==null?&quot;—&quot;:l&lt;1024*1024?`${(l/1024).toFixed(1)} Ko`:`${(l/(1024*1024)).toFixed(1)} Mo`}function k_(){var T;const{documentId:l}=Ys(),{activeProject:r}=Fe(),[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),[R,A]=d.useState(!1),[E,S]=d.useState(!1),[$,z]=d.useState(!1),[X,Q]=d.useState(!1),[G,I]=d.useState(null),Z=d.useCallback(async()=&gt;{if(!(!r||!l)){b(!0),g(null);try{const[M,B]=await Promise.all([l2(r.id,Number(l)),Tt(r.id)]);c(M.data),f(B.data.filter(ce=&gt;ce.status!==&quot;archived&quot;).map(ce=&gt;({id:ce.id,code:ce.code,name:ce.name})))}catch(M){M instanceof me&amp;&amp;M.status===403?g(&quot;Accès refusé à ce document.&quot;):M instanceof me&amp;&amp;M.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(M){if(!r||!i)return;const B=M?i.versions.find(ce=&gt;ce.id===M):i.current_version;if(!(B!=null&amp;&amp;B.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 c2(r.id,i.id,B.id);o2(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(M){if(!(!r||!i)){C(!0);try{const B=await r2(r.id,i.id,M);c(B.data),S(!1),j(&quot;Document mis à jour.&quot;)}catch(B){g(B instanceof me?B.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{C(!1)}}}async function ee(M,B){if(!(!r||!i)){C(!0);try{const ce=await i2(r.id,i.id,M,B?{comment:B}:void 0);c(ce.data),z(!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 ae(M){if(!(!r||!i)){C(!0);try{const B=await m2(r.id,i.id,{body:M});c(B.data),Q(!1),j(&quot;Commentaire ajouté.&quot;)}catch(B){g(B instanceof me?B.message:&quot;Erreur lors du commentaire.&quot;)}finally{C(!1)}}}async function Y(M){if(!(!r||!i||!G)){C(!0);try{const B=G===&quot;validate&quot;?await u2(r.id,i.id,{comment:M}):await d2(r.id,i.id,{comment:M??&quot;&quot;});c(B.data),I(null),j(G===&quot;validate&quot;?&quot;Document validé.&quot;:&quot;Document rejeté.&quot;)}catch(B){g(B instanceof me?B.message:&quot;Erreur lors de la validation.&quot;)}finally{C(!1)}}}async function q(){if(!(!r||!i)&amp;&amp;window.confirm(&quot;Archiver ce document ?&quot;)){C(!0);try{const M=await f2(r.id,i.id);c(M.data),j(&quot;Document archivé.&quot;)}catch(M){g(M instanceof me?M.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 U=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:Si[i.status]}),i.permissions.canDownload&amp;&amp;t.jsxs(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:R||!(U!=null&amp;&amp;U.has_file),onClick:()=&gt;void k(),children:[t.jsx(fp,{className:&quot;mr-1 inline h-4 w-4&quot;}),&quot;Télécharger&quot;]}),i.permissions.canUploadVersion&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(!0),children:&quot;Nouvelle version&quot;}),i.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(!0),children:&quot;Modifier&quot;}),i.permissions.canComment&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Q(!0),children:&quot;Commenter&quot;}),i.permissions.canValidate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;I(&quot;validate&quot;),children:&quot;Valider&quot;}),i.permissions.canReject&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;I(&quot;reject&quot;),children:&quot;Rejeter&quot;}),i.permissions.canArchive&amp;&amp;i.status!==&quot;archived&quot;&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void q(),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:Wu[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:((T=i.creator)==null?void 0:T.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;}),U?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:U.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:U.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:A_(U.file_size)})]}),!U.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(M=&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:M.version_label}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-600&quot;,children:M.original_filename})]}),i.permissions.canDownload&amp;&amp;M.has_file&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:R,onClick:()=&gt;void k(M.id),children:&quot;Télécharger&quot;})]},M.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(M=&gt;{var B;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:((B=M.author)==null?void 0:B.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:M.body}),M.created_at&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:new Date(M.created_at).toLocaleString(&quot;fr-FR&quot;)})]},M.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;}),(U==null?void 0:U.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:U.validation_comment})]})]})]}),t.jsx(Kp,{open:E,title:&quot;Modifier le document&quot;,lots:m,initial:i,requireFile:!1,isSubmitting:y,onClose:()=&gt;S(!1),onSubmit:w}),t.jsx(w_,{open:$,isSubmitting:y,onClose:()=&gt;z(!1),onSubmit:ee}),t.jsx(C_,{open:X,isSubmitting:y,onClose:()=&gt;Q(!1),onSubmit:ae}),t.jsx(E_,{open:G!==null,mode:G??&quot;validate&quot;,isSubmitting:y,onClose:()=&gt;I(null),onSubmit:Y})]})}const T_=[&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;],z_=[&quot;expected&quot;,&quot;missing&quot;,&quot;submitted&quot;,&quot;to_correct&quot;,&quot;validated&quot;,&quot;not_applicable&quot;];function Fp({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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;other&quot;),[z,X]=d.useState(!0),[Q,G]=d.useState(&quot;&quot;),[I,Z]=d.useState(&quot;&quot;),[k,w]=d.useState(&quot;expected&quot;);if(d.useEffect(()=&gt;{var ae,Y,q;l&amp;&amp;(v((m==null?void 0:m.code)??&quot;&quot;),y((m==null?void 0:m.title)??&quot;&quot;),R((m==null?void 0:m.description)??&quot;&quot;),E(((ae=m==null?void 0:m.lot_id)==null?void 0:ae.toString())??&quot;&quot;),$((m==null?void 0:m.expected_document_type)??&quot;other&quot;),X((m==null?void 0:m.is_required)??!0),G(((q=(Y=m==null?void 0:m.responsible_organization)==null?void 0:Y.id)==null?void 0:q.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 ee(ae){ae.preventDefault(),await p({code:g.trim().toUpperCase(),title:j.trim(),description:C.trim()||void 0,expected_document_type:S,is_required:z,lot_id:A?Number(A):null,responsible_organization_id:Q?Number(Q):null,due_date:I||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:ae=&gt;void ee(ae),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:ae=&gt;v(ae.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:ae=&gt;y(ae.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:ae=&gt;$(ae.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:T_.map(ae=&gt;t.jsx(&quot;option&quot;,{value:ae,children:Ci[ae]},ae))})]}),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:ae=&gt;R(ae.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:ae=&gt;E(ae.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(ae=&gt;t.jsxs(&quot;option&quot;,{value:ae.id,children:[ae.code,&quot; — &quot;,ae.name]},ae.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:Q,onChange:ae=&gt;G(ae.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(ae=&gt;t.jsx(&quot;option&quot;,{value:ae.id,children:ae.name},ae.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:I,onChange:ae=&gt;Z(ae.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:z,onChange:ae=&gt;X(ae.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:ae=&gt;w(ae.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:z_.map(ae=&gt;t.jsx(&quot;option&quot;,{value:ae,children:Un[ae]},ae))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:b,disabled:x,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:x,children:x?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const M_=[{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 D_(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 R_(){var M;const{activeProject:l,activeMembership:r}=Fe(),[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([]),[R,A]=d.useState(!0),[E,S]=d.useState(null),[$,z]=d.useState(&quot;&quot;),[X,Q]=d.useState(&quot;all&quot;),[G,I]=d.useState(!1),[Z,k]=d.useState(!1),[w,ee]=d.useState(null),ae=d.useCallback(async()=&gt;{if(l){A(!0),S(null);try{const B=c?{lot_id:Number(c)}:void 0,[ce,D,F]=await Promise.all([h2(l.id),Dp(l.id,B),Tt(l.id)]);b(ce.summary),g(ce.by_lot),f(D.data),j(F.data.filter(K=&gt;K.status!==&quot;archived&quot;)),C(F.meta.organizations)}catch(B){S(B instanceof me&amp;&amp;B.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;{ae()},[ae]);const Y=d.useMemo(()=&gt;{const B=$.trim().toLowerCase();return m.filter(ce=&gt;{var D;return D_(ce,X)?B?ce.code.toLowerCase().includes(B)||ce.title.toLowerCase().includes(B)||(((D=ce.lot)==null?void 0:D.code.toLowerCase().includes(B))??!1):!0:!1})},[m,$,X]);async function q(B){if(l){k(!0);try{await g2(l.id,B),I(!1),ee(&quot;Pièce DOE créée avec succès.&quot;),await ae()}catch(ce){S(ce instanceof me?ce.message:&quot;Erreur lors de la création.&quot;)}finally{k(!1)}}}if(R)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 U=c?(M=v.find(B=&gt;B.id===Number(c)))==null?void 0:M.code:null,_=L2(r==null?void 0:r.role_code),T=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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;I(!0),children:&quot;Ajouter pièce attendue&quot;}):void 0}),U&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:U}),&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(T.expected),subtitle:&quot;Total actif&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Manquantes&quot;,value:String(T.missing),subtitle:&quot;Sans document&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;Soumises&quot;,value:String(T.submitted),subtitle:&quot;En attente validation&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Validées&quot;,value:String(T.validated),subtitle:&quot;Pièces conformes&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Complétude&quot;,value:`${T.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(B=&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:[B.lot.code,&quot; — &quot;,B.lot.name]}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-600&quot;,children:[B.validated,&quot;/&quot;,B.expected,&quot; validées · &quot;,B.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:`${B.completion_rate}%`}})})]},B.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:$,onChange:B=&gt;z(B.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:M_.map(B=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;Q(B.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${X===B.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:B.label},B.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(B=&gt;{var ce,D,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 font-semibold text-planx-orange&quot;,children:B.code}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[180px] truncate px-4 py-3 font-medium&quot;,children:B.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((ce=B.lot)==null?void 0:ce.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:B.expected_document_type?Ci[B.expected_document_type]:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:B.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[B.status],tone:wi[B.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((D=B.current_document)==null?void 0:D.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((F=B.responsible_organization)==null?void 0:F.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(he,{to:`/doe/${B.id}`,children:t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},B.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:Y.map(B=&gt;{var ce,D,F;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:B.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:B.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[((ce=B.lot)==null?void 0:ce.code)??&quot;—&quot;,B.expected_document_type?` · ${Ci[B.expected_document_type]}`:&quot;&quot;]})]}),t.jsx(Ee,{label:Un[B.status],tone:wi[B.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:B.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=B.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:((F=B.responsible_organization)==null?void 0:F.name)??&quot;—&quot;})]})]}),t.jsx(he,{to:`/doe/${B.id}`,className:&quot;mt-4 block&quot;,children:t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},B.id)})})]}),t.jsx(Fp,{open:G,title:&quot;Ajouter une pièce attendue&quot;,lots:v,organizations:y,isSubmitting:Z,onClose:()=&gt;I(!1),onSubmit:q})]})}function O_({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),Ju(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 R=x.find(E=&gt;E.id===Number(y));async function A(E){var S;E.preventDefault(),R&amp;&amp;await f(R.id,(S=R.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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx(L,{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(L,{variant:&quot;secondary&quot;,onClick:m,children:&quot;Fermer&quot;})})]})})}function L_({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{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 U_({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:&quot;Envoyer&quot;})]})]})]})})}function $_(){var Y,q;const{doeItemId:l}=Ys(),{activeProject:r}=Fe(),[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),[R,A]=d.useState(!1),[E,S]=d.useState(!1),[$,z]=d.useState(!1),[X,Q]=d.useState(!1),[G,I]=d.useState(null),Z=d.useCallback(async()=&gt;{if(!(!r||!l)){g(!0),j(null);try{const[U,_]=await Promise.all([p2(r.id,Number(l)),Tt(r.id)]);c(U.data),f(_.data.filter(T=&gt;T.status!==&quot;archived&quot;)),b(_.meta.organizations)}catch(U){U instanceof me&amp;&amp;U.status===403?j(&quot;Accès refusé à cette pièce DOE.&quot;):U instanceof me&amp;&amp;U.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(U){if(!(!r||!i)){A(!0);try{const _=await b2(r.id,i.id,U);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(U,_){if(!(!r||!i)){A(!0);try{const T=await j2(r.id,i.id,{document_id:U,document_version_id:_??null});c(T.data),z(!1),C(&quot;Document rattaché.&quot;)}catch(T){j(T instanceof me?T.message:&quot;Erreur lors du rattachement.&quot;)}finally{A(!1)}}}async function ee(U){if(!(!r||!i)){A(!0);try{const _=await _2(r.id,i.id,{body:U});c(_.data),Q(!1),C(&quot;Commentaire ajouté.&quot;)}catch(_){j(_ instanceof me?_.message:&quot;Erreur lors du commentaire.&quot;)}finally{A(!1)}}}async function ae(U){if(!(!r||!i||!G)){A(!0);try{let _;G===&quot;validate&quot;?_=await v2(r.id,i.id,{comment:U}):G===&quot;reject&quot;?_=await y2(r.id,i.id,{comment:U??&quot;&quot;}):_=await N2(r.id,i.id,{comment:U}),c(_.data),I(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:wi[i.status]}),i.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;S(!0),children:&quot;Modifier&quot;}),i.permissions.canAttachDocument&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(!0),children:&quot;Rattacher document&quot;}),i.permissions.canComment&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Q(!0),children:&quot;Commenter&quot;}),i.permissions.canValidate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;I(&quot;validate&quot;),children:&quot;Valider&quot;}),i.permissions.canReject&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;I(&quot;reject&quot;),children:&quot;Rejeter&quot;}),i.permissions.canMarkNotApplicable&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;I(&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?Ci[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:((q=i.current_document.current_version)==null?void 0:q.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(U=&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:U.decision}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((_=U.validator)==null?void 0:_.name)??&quot;—&quot;}),U.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:U.comment})]},U.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(U=&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:((_=U.author)==null?void 0:_.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:U.body})]},U.id)})})]})]})]}),t.jsx(Fp,{open:E,title:&quot;Modifier la pièce DOE&quot;,lots:m,organizations:x,initial:i,allowStatusEdit:!0,isSubmitting:R,onClose:()=&gt;S(!1),onSubmit:k}),r&amp;&amp;t.jsx(O_,{open:$,projectId:r.id,item:i,isSubmitting:R,onClose:()=&gt;z(!1),onSubmit:w}),t.jsx(U_,{open:X,isSubmitting:R,onClose:()=&gt;Q(!1),onSubmit:ee}),t.jsx(L_,{open:G!==null,mode:G??&quot;validate&quot;,isSubmitting:R,onClose:()=&gt;I(null),onSubmit:ae})]}):null}const Ai={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;},ki={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;},Au={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;},Jp={invited:&quot;Invité&quot;,present:&quot;Présent&quot;,absent:&quot;Absent&quot;,excused:&quot;Excusé&quot;},Ip={open:&quot;Ouverte&quot;,in_progress:&quot;En cours&quot;,done:&quot;Réalisée&quot;,cancelled:&quot;Annulée&quot;};function q_(l){return l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;||l===&quot;SA&quot;}const B_=[&quot;site&quot;,&quot;technical&quot;,&quot;moa&quot;,&quot;control&quot;,&quot;coordination&quot;,&quot;other&quot;],H_=[&quot;draft&quot;,&quot;scheduled&quot;,&quot;in_progress&quot;,&quot;minutes_draft&quot;,&quot;pending_validation&quot;];function ku({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,R]=d.useState(&quot;draft&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;&quot;),[z,X]=d.useState(&quot;&quot;),[Q,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;),R((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;),$((c==null?void 0:c.location)??&quot;&quot;),X((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 I(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:z.trim()||null,minutes_body:Q.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 I(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:B_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:Ai[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;R(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:H_.map(k=&gt;t.jsx(&quot;option&quot;,{value:k,children:ki[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;$(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:z,onChange:k=&gt;X(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:Q,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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}function V_(l){return&quot;&quot;}async function Wp(l,r){return Ae(`/projects/${l}/meetings${V_()}`,!0)}async function Y_(l,r){return Ae(`/projects/${l}/meetings/${r}`,!0)}async function G_(l,r){return _e(`/projects/${l}/meetings`,r,!0)}async function Z_(l,r,i){return Ue(`/projects/${l}/meetings/${r}`,i,!0)}async function Q_(l,r,i){return _e(`/projects/${l}/meetings/${r}/participants`,i,!0)}async function X_(l,r,i){return _e(`/projects/${l}/meetings/${r}/decisions`,i,!0)}async function P_(l,r,i){return _e(`/projects/${l}/meetings/${r}/actions`,i,!0)}async function K_(l,r,i){return _e(`/projects/${l}/meetings/${r}/comments`,i,!0)}async function F_(l,r,i){return _e(`/projects/${l}/meetings/${r}/validate-minutes`,{},!0)}async function J_(l,r){return _e(`/projects/${l}/meetings/${r}/close`,{},!0)}const I_=[{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 Th(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function W_(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){var c;switch(r){case&quot;all&quot;:return l.status!==&quot;cancelled&quot;;case&quot;this_week&quot;:return W_(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 tS(){const{user:l}=Gs(),{activeProject:r}=Fe(),[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;),[R,A]=d.useState(&quot;all&quot;),[E,S]=d.useState(!1),[$,z]=d.useState(!1),[X,Q]=d.useState(null),G=d.useCallback(async()=&gt;{if(r){g(!0),j(null);try{const w=await Wp(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 I=d.useMemo(()=&gt;{const w=y.trim().toLowerCase();return i.filter(ee=&gt;eS(ee,R,l==null?void 0:l.id)?w?ee.code.toLowerCase().includes(w)||ee.title.toLowerCase().includes(w):!0:!1)},[i,y,R,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,ee)=&gt;w+ee.open_actions_count,0),validated:i.filter(w=&gt;w.status===&quot;validated&quot;).length}),[i]);async function k(w){if(r){z(!0);try{await G_(r.id,w),S(!1),Q(&quot;Réunion créée avec succès.&quot;),await G()}catch(ee){j(ee instanceof me?ee.message:&quot;Erreur lors de la création.&quot;)}finally{z(!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:q_(l==null?void 0:l.role_code)?t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;S(!0),children:&quot;Créer une réunion&quot;}):void 0}),X&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:X}),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:I_.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 ${R===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))})]}),I.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:I.map(w=&gt;{var ee;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:Th(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:Ai[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:((ee=w.organizer)==null?void 0:ee.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:ki[w.status],tone:Au[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(L,{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:I.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:Th(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:[Ai[w.meeting_type],&quot; · &quot;,w.participants_count,&quot; participants&quot;]})]}),t.jsx(Ee,{label:ki[w.status],tone:Au[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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},w.id))})]}),t.jsx(ku,{open:E,title:&quot;Créer une réunion&quot;,organizations:m,users:x,isSubmitting:$,onClose:()=&gt;S(!1),onSubmit:k})]})}const sS=[&quot;invited&quot;,&quot;present&quot;,&quot;absent&quot;,&quot;excused&quot;];function aS({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;),[R,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:R})}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:R,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:sS.map(S=&gt;t.jsx(&quot;option&quot;,{value:S,children:Jp[S]},S))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c,children:c?&quot;Envoi…&quot;:&quot;Ajouter&quot;})]})]})]})})}const lS=[&quot;open&quot;,&quot;in_progress&quot;,&quot;done&quot;,&quot;cancelled&quot;];function nS({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;),[R,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 $(z){z.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:R||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:z=&gt;void $(z),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:z=&gt;b(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;,{rows:3,value:p,onChange:z=&gt;g(z.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:z=&gt;j(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.jsx(&quot;option&quot;,{value:z.id,children:z.name},z.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:z=&gt;C(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;— Aucun —&quot;}),i.map(z=&gt;t.jsx(&quot;option&quot;,{value:z.id,children:z.name},z.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:R,onChange:z=&gt;A(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;Statut&quot;}),t.jsx(&quot;select&quot;,{value:E,onChange:z=&gt;S(z.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:lS.map(z=&gt;t.jsx(&quot;option&quot;,{value:z,children:Ip[z]},z))})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c,children:c?&quot;Envoi…&quot;:&quot;Ajouter&quot;})]})]})]})})}const rS=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;];function iS({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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;normal&quot;),[z,X]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{l&amp;&amp;(p(&quot;&quot;),v(&quot;&quot;),y(&quot;&quot;),R(&quot;&quot;),E(&quot;&quot;),$(&quot;normal&quot;),X(&quot;&quot;))},[l]),!l)return null;async function Q(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: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:&quot;Créer une action liée&quot;}),t.jsxs(&quot;form&quot;,{onSubmit:G=&gt;void Q(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;R(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;$(G.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:rS.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:z,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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Création…&quot;:&quot;Créer&quot;})]})]})]})})}function cS({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}function zh(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function oS(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 uS(){var K;const{meetingId:l}=Ys(),{activeProject:r}=Fe(),[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),[R,A]=d.useState(null),[E,S]=d.useState(!1),[$,z]=d.useState(!1),[X,Q]=d.useState(!1),[G,I]=d.useState(!1),[Z,k]=d.useState(!1),[w,ee]=d.useState(!1),[ae,Y]=d.useState(!1),q=d.useCallback(async()=&gt;{if(!(!r||!l)){j(!0),C(null);try{const[te,H,ue]=await Promise.all([Y_(r.id,Number(l)),Tt(r.id),Wp(r.id)]);c(te.data),f(H.data.filter(fe=&gt;fe.status!==&quot;archived&quot;)),b(ue.meta.organizations),g(ue.meta.users)}catch(te){te instanceof me&amp;&amp;te.status===403?C(&quot;Accès refusé à cette réunion.&quot;):te instanceof me&amp;&amp;te.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;{q()},[q]);async function U(te){if(!(!r||!i)){S(!0);try{const H=await Z_(r.id,i.id,te);c(H.data),z(!1),Q(!1),A(&quot;Réunion mise à jour.&quot;)}catch(H){C(H instanceof me?H.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{S(!1)}}}async function _(te){if(!(!r||!i)){S(!0);try{const H=await Q_(r.id,i.id,te);c(H.data),I(!1),A(&quot;Participant ajouté.&quot;)}catch(H){C(H instanceof me?H.message:&quot;Erreur lors de l’ajout du participant.&quot;)}finally{S(!1)}}}async function T(te){if(!(!r||!i)){S(!0);try{const H=await X_(r.id,i.id,te);c(H.data),k(!1),A(&quot;Décision ajoutée.&quot;)}catch(H){C(H instanceof me?H.message:&quot;Erreur lors de la décision.&quot;)}finally{S(!1)}}}async function M(te){if(!(!r||!i)){S(!0);try{const H=await P_(r.id,i.id,te);c(H.data),ee(!1),A(&quot;Action créée et liée à la réunion.&quot;)}catch(H){C(H instanceof me?H.message:&quot;Erreur lors de la création de l’action.&quot;)}finally{S(!1)}}}async function B(te){if(!(!r||!i)){S(!0);try{const H=await K_(r.id,i.id,{body:te});c(H.data),Y(!1),A(&quot;Commentaire ajouté.&quot;)}catch(H){C(H instanceof me?H.message:&quot;Erreur lors du commentaire.&quot;)}finally{S(!1)}}}async function ce(){var H,ue;if(!r||!i)return;if(!((((H=i.summary)==null?void 0:H.trim().length)??0)&gt;0||(((ue=i.minutes_body)==null?void 0:ue.trim().length)??0)&gt;0)){Q(!0),C(&quot;Renseignez la synthèse ou le compte rendu avant validation.&quot;);return}S(!0);try{const fe=await F_(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 te=await J_(r.id,i.id);c(te.data),A(&quot;Réunion clôturée.&quot;)}catch(te){C(te instanceof me?te.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 F=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;]}),R&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:R}),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:`${Ai[i.meeting_type]} · ${zh(i.scheduled_at)}`,action:t.jsxs(&quot;div&quot;,{className:&quot;flex flex-wrap gap-2&quot;,children:[t.jsx(Ee,{label:ki[i.status],tone:Au[i.status]}),F.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(!0),children:&quot;Modifier&quot;}),F.canManageParticipants&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;I(!0),children:&quot;Participants&quot;}),F.canEditMinutes&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Q(!0),children:&quot;Compte rendu&quot;}),F.canCreateDecision&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;k(!0),children:&quot;Décision&quot;}),F.canCreateAction&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;ee(!0),children:&quot;Créer action&quot;}),F.canComment&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;Y(!0),children:&quot;Commenter&quot;}),F.canValidateMinutes&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void ce(),children:&quot;Valider CR&quot;}),F.canClose&amp;&amp;i.status===&quot;validated&quot;&amp;&amp;t.jsx(L,{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:((K=i.organizer)==null?void 0:K.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?` · ${zh(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(te=&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:oS(te)}),t.jsx(&quot;span&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Jp[te.attendance_status]})]},te.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(te=&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:te.title}),te.description&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-slate-600&quot;,children:te.description}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[Ip[te.status],te.due_date?` · échéance ${te.due_date}`:&quot;&quot;]})]},te.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(te=&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/${te.id}`,className:&quot;font-medium text-planx-orange hover:underline&quot;,children:[te.code,&quot; — &quot;,te.title]}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:te.source_label??te.source_type??&quot;&quot;})]}),t.jsx(Ee,{label:ga[te.status]??te.status,tone:$n[te.status]??&quot;gray&quot;})]},te.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(te=&gt;{var H;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:((H=te.author)==null?void 0:H.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:te.body})]},te.id)})})]}),r&amp;&amp;t.jsx(Gn,{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(ku,{open:$,title:&quot;Modifier la réunion&quot;,mode:&quot;edit&quot;,initial:i,isSubmitting:E,onClose:()=&gt;z(!1),onSubmit:U}),t.jsx(ku,{open:X,title:&quot;Compte rendu&quot;,mode:&quot;minutes&quot;,initial:i,isSubmitting:E,onClose:()=&gt;Q(!1),onSubmit:U}),t.jsx(aS,{open:G,organizations:x,users:p,isSubmitting:E,onClose:()=&gt;I(!1),onSubmit:_}),t.jsx(nS,{open:Z,organizations:x,users:p,isSubmitting:E,onClose:()=&gt;k(!1),onSubmit:T}),t.jsx(iS,{open:w,lots:m,organizations:x,users:p,isSubmitting:E,onClose:()=&gt;ee(!1),onSubmit:M}),t.jsx(cS,{open:ae,isSubmitting:E,onClose:()=&gt;Y(!1),onSubmit:B})]})}const dS=[&quot;low&quot;,&quot;normal&quot;,&quot;high&quot;,&quot;critical&quot;],mS=[&quot;open&quot;,&quot;in_progress&quot;,&quot;done&quot;,&quot;to_verify&quot;,&quot;verified&quot;,&quot;closed&quot;,&quot;cancelled&quot;];function Tu({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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;manual&quot;),[z,X]=d.useState(&quot;&quot;),[Q,G]=d.useState(&quot;&quot;),[I,Z]=d.useState(&quot;&quot;),[k,w]=d.useState(&quot;&quot;),[ee,ae]=d.useState(&quot;normal&quot;),[Y,q]=d.useState(&quot;open&quot;),[U,_]=d.useState(&quot;&quot;);if(d.useEffect(()=&gt;{var M,B,ce,D,F;l&amp;&amp;(y((x==null?void 0:x.code)??&quot;&quot;),R((x==null?void 0:x.title)??&quot;&quot;),E((x==null?void 0:x.description)??&quot;&quot;),$((x==null?void 0:x.source_type)??&quot;manual&quot;),X((x==null?void 0:x.source_label)??&quot;&quot;),G(((M=x==null?void 0:x.lot_id)==null?void 0:M.toString())??&quot;&quot;),Z(((ce=(B=x==null?void 0:x.responsible_organization)==null?void 0:B.id)==null?void 0:ce.toString())??&quot;&quot;),w(((F=(D=x==null?void 0:x.responsible_user)==null?void 0:D.id)==null?void 0:F.toString())??&quot;&quot;),ae((x==null?void 0:x.priority)??&quot;normal&quot;),q((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 T(M){if(M.preventDefault(),v){await g({responsible_organization_id:I?Number(I):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:z.trim()||null,lot_id:Q?Number(Q):null,responsible_organization_id:I?Number(I):null,responsible_user_id:k?Number(k):null,priority:ee,status:i===&quot;create&quot;?Y:void 0,due_date:U||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:M=&gt;void T(M),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:M=&gt;y(M.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:M=&gt;R(M.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:M=&gt;E(M.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:M=&gt;$(M.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:U2.map(M=&gt;t.jsx(&quot;option&quot;,{value:M,children:qn[M]},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;Libellé source&quot;}),t.jsx(&quot;input&quot;,{value:z,onChange:M=&gt;X(M.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:M=&gt;q(M.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:mS.map(M=&gt;t.jsx(&quot;option&quot;,{value:M,children:ga[M]},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;Priorité&quot;}),t.jsx(&quot;select&quot;,{value:ee,onChange:M=&gt;ae(M.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:dS.map(M=&gt;t.jsx(&quot;option&quot;,{value:M,children:Tl[M]},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;Échéance&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,value:U,onChange:M=&gt;_(M.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:Q,onChange:M=&gt;G(M.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(M=&gt;t.jsxs(&quot;option&quot;,{value:M.id,children:[M.code,&quot; — &quot;,M.name]},M.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:I,onChange:M=&gt;Z(M.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(M=&gt;t.jsx(&quot;option&quot;,{value:M.id,children:M.name},M.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:M=&gt;w(M.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(M=&gt;t.jsx(&quot;option&quot;,{value:M.id,children:M.name},M.id))]})]}),t.jsxs(&quot;div&quot;,{className:&quot;flex justify-end gap-2 pt-2&quot;,children:[t.jsx(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:p,disabled:b,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:b,children:b?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const fS=[{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 xS(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 hS(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 xS(l.due_date);case&quot;closed&quot;:return l.status===&quot;closed&quot;;default:return!0}}function pS(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 gS(){var T,M;const{user:l}=Gs(),{activeProject:r,activeMembership:i}=Fe(),[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,R]=d.useState(!0),[A,E]=d.useState(null),[S,$]=d.useState(&quot;&quot;),[z,X]=d.useState(&quot;all&quot;),[Q,G]=d.useState(!1),[I,Z]=d.useState(!1),[k,w]=d.useState(null),ee=d.useCallback(async()=&gt;{if(r){R(!0),E(null);try{const B=m?{lot_id:Number(m)}:void 0,[ce,D]=await Promise.all([Iu(r.id,B),Tt(r.id)]);x(ce.data),v(ce.meta.organizations),y(ce.meta.users),p(D.data.filter(F=&gt;F.status!==&quot;archived&quot;))}catch(B){B instanceof me&amp;&amp;B.status===403?E(&quot;Accès refusé à la liste des actions.&quot;):E(&quot;Impossible de charger les actions.&quot;),x([])}finally{R(!1)}}},[r,m]);d.useEffect(()=&gt;{ee()},[ee]);const ae=d.useMemo(()=&gt;{const B=S.trim().toLowerCase();return f.filter(ce=&gt;{var D,F;return hS(ce,z,(D=i==null?void 0:i.organization)==null?void 0:D.id,l==null?void 0:l.id)?B?ce.code.toLowerCase().includes(B)||ce.title.toLowerCase().includes(B)||(((F=ce.lot)==null?void 0:F.code.toLowerCase().includes(B))??!1):!0:!1})},[f,S,z,(T=i==null?void 0:i.organization)==null?void 0:T.id,l==null?void 0:l.id]),Y=d.useMemo(()=&gt;{const B=f.filter(K=&gt;![&quot;closed&quot;,&quot;cancelled&quot;].includes(K.status)),ce=B.filter(K=&gt;K.is_late).length,D=f.filter(K=&gt;K.status===&quot;to_verify&quot;).length,F=f.filter(K=&gt;K.status===&quot;closed&quot;).length;return{open:B.length,late:ce,toVerify:D,closed:F}},[f]);async function q(B){if(r){Z(!0);try{await C2(r.id,B),G(!1),w(&quot;Action créée avec succès.&quot;),await ee()}catch(ce){E(ce instanceof me?ce.message:&quot;Erreur lors de la création.&quot;)}finally{Z(!1)}}}const U=$2(i==null?void 0:i.role_code),_=m?(M=b.find(B=&gt;B.id===Number(m)))==null?void 0:M.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:U?t.jsx(L,{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:B=&gt;$(B.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:fS.map(B=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;X(B.key),className:`rounded-full px-3 py-1 text-xs font-medium transition ${z===B.key?&quot;bg-planx-orange text-white&quot;:&quot;bg-slate-100 text-slate-600 hover:bg-slate-200&quot;}`,children:B.label},B.key))})]}),ae.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:ae.map(B=&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:B.code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3 text-slate-600&quot;,children:B.source_type?qn[B.source_type]:&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;max-w-[180px] truncate px-4 py-3 font-medium&quot;,children:B.title}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((ce=B.lot)==null?void 0:ce.code)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:pS(B)}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Tl[B.priority]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:ga[B.status],tone:$n[B.status]})}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:B.due_date??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:B.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/${B.id}`,children:t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:&quot;Ouvrir&quot;})})})]},B.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid grid-cols-1 gap-4 lg:hidden&quot;,children:ae.map(B=&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:B.code}),t.jsx(&quot;h3&quot;,{className:&quot;font-semibold text-slate-900&quot;,children:B.title}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-500&quot;,children:[B.source_label??(B.source_type?qn[B.source_type]:&quot;—&quot;),&quot; · &quot;,((ce=B.lot)==null?void 0:ce.code)??&quot;—&quot;]})]}),t.jsx(Ee,{label:ga[B.status],tone:$n[B.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[B.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:B.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=B.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:B.is_late?&quot;Oui&quot;:&quot;Non&quot;})]})]}),t.jsx(he,{to:`/actions/${B.id}`,className:&quot;mt-4 block&quot;,children:t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},B.id)})})]}),t.jsx(Tu,{open:Q,title:&quot;Créer une action&quot;,lots:b,organizations:g,users:j,isSubmitting:I,onClose:()=&gt;G(!1),onSubmit:B=&gt;q(B)})]})}function bS({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}const jS={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 vS({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:jS[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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:m,disabled:c,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:c,children:c?&quot;Envoi…&quot;:&quot;Confirmer&quot;})]})]})]})})}function yS(){var U,_;const{actionId:l}=Ys(),{activeProject:r}=Fe(),[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),[R,A]=d.useState(!1),[E,S]=d.useState(null),[$,z]=d.useState(!1),[X,Q]=d.useState([]),[G,I]=d.useState(!1),[Z,k]=d.useState(null),w=d.useCallback(async()=&gt;{if(!(!r||!l)){g(!0),j(null);try{const[T,M,B]=await Promise.all([w2(r.id,Number(l)),Tt(r.id),Iu(r.id)]);c(T.data),Q(B.meta.users),f(M.data.filter(ce=&gt;ce.status!==&quot;archived&quot;)),b(M.meta.organizations)}catch(T){T instanceof me&amp;&amp;T.status===403?j(&quot;Accès refusé à cette action.&quot;):T instanceof me&amp;&amp;T.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 ee(T){if(!(!r||!i)){I(!0);try{const M=await E2(r.id,i.id,T);c(M.data),C(!1),k(&quot;Action mise à jour avec succès.&quot;)}catch(M){j(M instanceof me?M.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{I(!1)}}}async function ae(T){if(!(!r||!i)){I(!0);try{const M=await A2(r.id,i.id,T);c(M.data),z(!1),k(&quot;Action affectée avec succès.&quot;)}catch(M){j(M instanceof me?M.message:&quot;Erreur lors de l’affectation.&quot;)}finally{I(!1)}}}async function Y(T){if(!(!r||!i)){I(!0);try{const M=await k2(r.id,i.id,{body:T});c(M.data),A(!1),k(&quot;Commentaire ajouté.&quot;)}catch(M){j(M instanceof me?M.message:&quot;Erreur lors du commentaire.&quot;)}finally{I(!1)}}}async function q(T){if(!(!r||!i||!E)){I(!0);try{let M;E===&quot;mark_done&quot;?M=await T2(r.id,i.id,T):E===&quot;verify&quot;?M=await z2(r.id,i.id,T):M=await M2(r.id,i.id,T),c(M.data),S(null),k(&quot;Action enregistrée avec succès.&quot;)}catch(M){j(M instanceof me?M.message:&quot;Erreur lors de l’action.&quot;)}finally{I(!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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;C(!0),children:&quot;Modifier&quot;}),i.permissions.canAssign&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;z(!0),children:&quot;Affecter&quot;}),i.permissions.canComment&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;A(!0),children:&quot;Commenter&quot;}),i.permissions.canMarkDone&amp;&amp;t.jsx(L,{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(L,{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(L,{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:((U=i.responsible_organization)==null?void 0:U.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(T=&gt;{var M;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:((M=T.author)==null?void 0:M.name)??&quot;—&quot;}),t.jsx(&quot;p&quot;,{className:&quot;text-slate-700&quot;,children:T.body})]},T.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(T=&gt;{var M;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:[T.old_status?ga[T.old_status]:&quot;—&quot;,&quot; → &quot;,ga[T.new_status]]}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:((M=T.changed_by)==null?void 0:M.name)??&quot;—&quot;}),T.comment&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-slate-600&quot;,children:T.comment})]},T.id)})})]}),r&amp;&amp;t.jsx(Gn,{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(Tu,{open:y,title:&quot;Modifier l’action&quot;,mode:&quot;edit&quot;,lots:m,organizations:x,users:X,initial:i,isSubmitting:G,onClose:()=&gt;C(!1),onSubmit:T=&gt;ee(T)}),t.jsx(Tu,{open:$,title:&quot;Affecter l’action&quot;,mode:&quot;assign&quot;,lots:m,organizations:x,users:X,initial:i,isSubmitting:G,onClose:()=&gt;z(!1),onSubmit:async T=&gt;ae(T)}),t.jsx(bS,{open:R,isSubmitting:G,onClose:()=&gt;A(!1),onSubmit:Y}),t.jsx(vS,{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:q})]}):null}const Ti={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;},zu={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 Mh(l){return l===&quot;SA&quot;||l===&quot;AC&quot;||l===&quot;CP&quot;||l===&quot;MOE&quot;}function zi(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 Dh(){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 NS({open:l,lots:r,isSubmitting:i,onClose:c,onSubmit:m}){const f=Dh(),[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=Dh();b(E.start),g(E.end),j([]),C(!0)},[l]),!l)return null;function R(E){j(S=&gt;S.includes(E)?S.filter($=&gt;$!==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;R(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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Génération…&quot;:&quot;Générer&quot;})]})]})]})})}function _S(l){return&quot;&quot;}async function SS(l,r){return Ae(`/projects/${l}/reports${_S()}`,!0)}async function wS(l,r){return Ae(`/projects/${l}/reports/${r}`,!0)}async function CS(l,r){return _e(`/projects/${l}/reports/generate`,r,!0)}async function ES(l,r,i){return Ue(`/projects/${l}/reports/${r}`,i,!0)}async function AS(l,r,i){return _e(`/projects/${l}/reports/${r}/submit`,i??{},!0)}async function kS(l,r,i){return _e(`/projects/${l}/reports/${r}/validate`,i??{},!0)}async function TS(l,r,i){return _e(`/projects/${l}/reports/${r}/reject`,i,!0)}async function zS(l,r,i){return _e(`/projects/${l}/reports/${r}/comments`,i,!0)}async function MS(l,r){return Ue(`/projects/${l}/reports/${r}/archive`,{},!0)}async function DS(l,r){return Ae(`/projects/${l}/reports/${r}/print`,!0)}const RS=[{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 OS(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 LS(){const{user:l}=Gs(),{activeProject:r}=Fe(),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,R]=d.useState(&quot;all&quot;),[A,E]=d.useState(!1),[S,$]=d.useState(!1),[z,X]=d.useState(null),Q=d.useCallback(async()=&gt;{if(r){p(!0),v(null);try{const[w,ee]=await Promise.all([SS(r.id),Tt(r.id)]);m(w.data),x(ee.data.filter(ae=&gt;ae.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;{Q()},[Q]);const G=d.useMemo(()=&gt;{const w=j.trim().toLowerCase();return c.filter(ee=&gt;OS(ee,C)?w?ee.code.toLowerCase().includes(w)||ee.title.toLowerCase().includes(w):!0:!1)},[c,j,C]),I=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?Mh(l==null?void 0:l.role_code):c.some(w=&gt;w.permissions.canEdit)||Mh(l==null?void 0:l.role_code);async function k(w){if(r){$(!0);try{const ee=await CS(r.id,w);E(!1),X(ee.message??&quot;Rapport généré.&quot;),await Q(),i(`/reports/${ee.data.id}`)}catch(ee){v(ee instanceof me?ee.message:&quot;Erreur lors de la génération.&quot;)}finally{$(!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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;E(!0),children:&quot;Générer rapport&quot;}):void 0}),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}),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(I.generated),subtitle:&quot;Statut généré&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Brouillons&quot;,value:String(I.drafts),subtitle:&quot;Brouillon / généré&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;À valider&quot;,value:String(I.pending),subtitle:&quot;En attente&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Validés&quot;,value:String(I.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:RS.map(w=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;R(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 ee;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:zi(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:Ti[w.status],tone:zu[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:((ee=w.created_by)==null?void 0:ee.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(L,{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:zi(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:Ti[w.status],tone:zu[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(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,className:&quot;w-full&quot;,children:&quot;Ouvrir&quot;})})]},w.id))})]}),t.jsx(NS,{open:A,lots:f,isSubmitting:S,onClose:()=&gt;E(!1),onSubmit:k})]})}const US=Object.keys(zl);function $S({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:[US.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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const qS={submit:&quot;Soumettre pour validation&quot;,validate:&quot;Valider le rapport&quot;,reject:&quot;Rejeter le rapport&quot;};function BS({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:qS[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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{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 HS({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:i,disabled:r,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:r,children:r?&quot;Envoi…&quot;:&quot;Publier&quot;})]})]})]})})}function oi(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;short&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function VS(){var ee,ae;const{reportId:l}=Ys(),r=ys(),{activeProject:i}=Fe(),[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,R]=d.useState(!1),[A,E]=d.useState(null),[S,$]=d.useState(!1),z=d.useCallback(async()=&gt;{if(!(!i||!l)){x(!0),p(null);try{const Y=await wS(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;{z()},[z]);async function X(Y){if(!(!i||!c)){y(!0);try{const q=await ES(i.id,c.id,{editable_sections:Y});m(q.data),R(!1),v(&quot;Sections mises à jour.&quot;)}catch(q){p(q instanceof me?q.message:&quot;Erreur lors de la mise à jour.&quot;)}finally{y(!1)}}}async function Q(Y){if(!(!i||!c||!A)){y(!0);try{let q;A===&quot;submit&quot;?q=await AS(i.id,c.id,{comment:Y}):A===&quot;validate&quot;?q=await kS(i.id,c.id,{comment:Y}):q=await TS(i.id,c.id,{comment:Y??&quot;&quot;}),m(q.data),E(null),v(q.message??&quot;Opération réussie.&quot;)}catch(q){p(q instanceof me?q.message:&quot;Erreur lors de l’opération.&quot;)}finally{y(!1)}}}async function G(Y){if(!(!i||!c)){y(!0);try{const q=await zS(i.id,c.id,{body:Y});m(q.data),$(!1),v(&quot;Commentaire ajouté.&quot;)}catch(q){p(q instanceof me?q.message:&quot;Erreur lors de l’ajout du commentaire.&quot;)}finally{y(!1)}}}async function I(){if(!(!i||!c)){y(!0);try{const Y=await MS(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} · ${zi(c.period_start_date,c.period_end_date)}`,action:t.jsx(Ee,{label:Ti[c.status],tone:zu[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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;R(!0),children:&quot;Modifier sections&quot;}),w.canSubmit&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(&quot;submit&quot;),children:&quot;Soumettre&quot;}),w.canValidate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(&quot;validate&quot;),children:&quot;Valider&quot;}),w.canReject&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;E(&quot;reject&quot;),children:&quot;Rejeter&quot;}),w.canComment&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;$(!0),children:&quot;Commenter&quot;}),w.canArchive&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void I(),disabled:j,children:&quot;Archiver&quot;}),w.canPrint&amp;&amp;t.jsx(L,{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:((ee=c.created_by)==null?void 0:ee.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:oi(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:((ae=c.validated_by)==null?void 0:ae.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:oi(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 q;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:((q=c.editable_sections)==null?void 0:q[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 q;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:[((q=Y.author)==null?void 0:q.name)??&quot;—&quot;,&quot; · &quot;,oi(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(Gn,{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 q;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;,((q=Y.decided_by)==null?void 0:q.name)??&quot;—&quot;,&quot; · &quot;,oi(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($S,{open:C,initial:c.editable_sections,isSubmitting:j,onClose:()=&gt;R(!1),onSubmit:X}),t.jsx(BS,{open:A!==null,mode:A??&quot;submit&quot;,isSubmitting:j,onClose:()=&gt;E(null),onSubmit:Q}),t.jsx(HS,{open:S,isSubmitting:j,onClose:()=&gt;$(!1),onSubmit:G})]})}function Rh(l){return l?new Date(l).toLocaleString(&quot;fr-FR&quot;,{dateStyle:&quot;long&quot;,timeStyle:&quot;short&quot;}):&quot;—&quot;}function YS(){const{reportId:l}=Ys(),{activeProject:r}=Fe(),[i,c]=d.useState(null),[m,f]=d.useState(null),x=d.useCallback(async()=&gt;{if(!(!r||!l))try{const v=await DS(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;,zi(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;,Ti[i.status],&quot; · Généré le &quot;,Rh(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;,Rh(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 GS={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;},ZS={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;},QS={info:&quot;Info&quot;,success:&quot;Succès&quot;,warning:&quot;Attention&quot;,critical:&quot;Critique&quot;},XS={info:&quot;blue&quot;,success:&quot;green&quot;,warning:&quot;orange&quot;,critical:&quot;red&quot;};function PS(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 KS({notification:l,onOpen:r,onMarkRead:i,onArchive:c}){const m=l.read_at===null,f=cv(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:QS[l.severity],tone:XS[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:[ZS[l.module],&quot; ·&quot;,&quot; &quot;,GS[l.type],f?` · ${f}`:&quot;&quot;]}),t.jsx(&quot;p&quot;,{className:&quot;mt-1 text-xs text-slate-400&quot;,children:PS(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(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:r,children:[t.jsx(Ku,{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(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:i,children:[t.jsx(Zv,{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(L,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:c,children:[t.jsx(Dv,{className:&quot;mr-1 h-3.5 w-3.5&quot;,&quot;aria-hidden&quot;:!0}),&quot;Archiver&quot;]})]})]})}const FS=[{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 JS(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 IS(){const l=ys(),{activeProject:r}=Fe(),{refreshUnreadCount:i}=Ep(),[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,R]=d.useState(&quot;all&quot;),[A,E]=d.useState(!1),[S,$]=d.useState(null),z=d.useCallback(async()=&gt;{if(r){p(!0),v(null);try{const w=await Wy(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;{z()},[z]);const X=d.useMemo(()=&gt;{const w=j.trim().toLowerCase();return c.filter(ee=&gt;JS(ee,C)).filter(ee=&gt;{var ae,Y;return w?ee.title.toLowerCase().includes(w)||(((ae=ee.body)==null?void 0:ae.toLowerCase().includes(w))??!1)||(((Y=ee.source_label)==null?void 0:Y.toLowerCase().includes(w))??!1):!0}).sort((ee,ae)=&gt;ee.read_at===null&amp;&amp;ae.read_at!==null?-1:ee.read_at!==null&amp;&amp;ae.read_at===null?1:(ae.created_at??&quot;&quot;).localeCompare(ee.created_at??&quot;&quot;))},[c,C,j]),Q=d.useMemo(()=&gt;{const w=c.filter(Y=&gt;Y.severity===&quot;critical&quot;&amp;&amp;!Y.read_at).length,ee=c.filter(Y=&gt;!Y.read_at&amp;&amp;(Y.type===&quot;validation_requested&quot;||Y.type===&quot;validation_rejected&quot;)).length,ae=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:ee,due:ae}},[c,f]);async function G(){if(!(!r||f===0)){E(!0),v(null);try{await sN(r.id),await z(),await i(),$(&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 I(w){if(r){E(!0);try{const ee=await tN(r.id,w.id);m(ae=&gt;ae.map(Y=&gt;Y.id===w.id?ee.data:Y)),x(ae=&gt;Math.max(0,ae-(w.read_at?0:1))),await i()}catch(ee){v(ee instanceof me?ee.message:&quot;Erreur lors du marquage.&quot;)}finally{E(!1)}}}async function Z(w){if(r){E(!0);try{await aN(r.id,w.id),m(ee=&gt;ee.filter(ae=&gt;ae.id!==w.id)),w.read_at||x(ee=&gt;Math.max(0,ee-1)),await i(),$(&quot;Notification archivée.&quot;)}catch(ee){v(ee instanceof me?ee.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 I(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(L,{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(Q.unread),subtitle:&quot;À traiter&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Critiques&quot;,value:String(Q.critical),subtitle:&quot;Priorité haute&quot;,tone:&quot;red&quot;}),t.jsx(be,{title:&quot;Validations&quot;,value:String(Q.validations),subtitle:&quot;Demandées ou rejetées&quot;,tone:&quot;violet&quot;}),t.jsx(be,{title:&quot;Échéances / retards&quot;,value:String(Q.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:FS.map(w=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;R(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))})]}),X.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:X.map(w=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(KS,{notification:w,onOpen:()=&gt;void k(w),onMarkRead:()=&gt;void I(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 WS={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;},ew=[{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;}],tw={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 e0({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 ${tw[l]}`,children:WS[l]})}function sw({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(e0,{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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,children:[t.jsx(Ku,{className:&quot;h-4 w-4&quot;}),&quot; Ouvrir&quot;]})}),l.permissions.canApprove&amp;&amp;t.jsx(L,{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(L,{type:&quot;button&quot;,variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:i,children:&quot;Rejeter&quot;})]})]})}function aw({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:ew.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 lw({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(e0,{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(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,disabled:c,children:&quot;Annuler&quot;}),t.jsx(L,{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 nw(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 rw(l){return Ae(`/projects/${l}/approvals/context`,!0)}function iw(l,r){return Ae(`/projects/${l}/approvals${nw(r)}`,!0)}function cw(l,r,i,c){return Ue(`/projects/${l}/approvals/${r}/${i}/approve`,c??{},!0)}function ow(l,r,i,c){return Ue(`/projects/${l}/approvals/${r}/${i}/reject`,c,!0)}function uw(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 dw(){const{activeProject:l}=Fe(),[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,R]=d.useState(&quot;&quot;),[A,E]=d.useState(&quot;all&quot;),[S,$]=d.useState(null),[z,X]=d.useState(&quot;approve&quot;),[Q,G]=d.useState(!1),[I,Z]=d.useState(!1),[k,w]=d.useState(null);d.useEffect(()=&gt;{const T=window.setTimeout(()=&gt;R(j.trim()),300);return()=&gt;window.clearTimeout(T)},[j]);const ee=d.useMemo(()=&gt;{const T=uw(A);return C?{...T,search:C}:T},[A,C]),ae=d.useCallback(async()=&gt;{if(l){x(!0),p(null);try{const[T,M]=await Promise.all([rw(l.id),iw(l.id,ee)]);i({summary:T.summary,permissions:T.permissions}),m(M.data)}catch(T){T instanceof me&amp;&amp;T.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,ee]);d.useEffect(()=&gt;{ae()},[ae]);const Y=r==null?void 0:r.summary,q=(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 U(T,M){$(T),X(M),w(null),G(!0)}async function _(T){if(!(!l||!S)){Z(!0),w(null);try{z===&quot;approve&quot;?(await cw(l.id,S.module,S.source_id,T?{comment:T}:void 0),v(&quot;Élément validé avec succès.&quot;)):(await ow(l.id,S.module,S.source_id,{comment:T}),v(&quot;Élément rejeté.&quot;)),G(!1),$(null),await ae()}catch(M){w(M instanceof me?M.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(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;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;]})]})]})}),q&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(aw,{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(T=&gt;t.jsx(sw,{item:T,onApprove:()=&gt;U(T,&quot;approve&quot;),onReject:()=&gt;U(T,&quot;reject&quot;)},T.key))}),t.jsx(lw,{open:Q,mode:z,item:S,isSubmitting:I,error:k,onClose:()=&gt;{I||(G(!1),$(null))},onConfirm:_})]})}const mw=[&quot;active&quot;,&quot;paused&quot;,&quot;preparation&quot;,&quot;completed&quot;,&quot;archived&quot;];function fw({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),[R,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 $(z){z.preventDefault(),await c({name:m.trim(),description:x.trim()||null,location:p.trim()||null,country:v.trim()||null,status:y,planned_start_date:R||null,planned_end_date:E||null})}return t.jsxs(&quot;form&quot;,{onSubmit:z=&gt;void $(z),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:z=&gt;f(z.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:z=&gt;b(z.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:z=&gt;g(z.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:z=&gt;j(z.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:z=&gt;C(z.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:mw.map(z=&gt;t.jsx(&quot;option&quot;,{value:z,children: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;Début prévu&quot;}),t.jsx(&quot;input&quot;,{type:&quot;date&quot;,disabled:r,value:R,onChange:z=&gt;A(z.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:R,onChange:z=&gt;S(z.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(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Enregistrement…&quot;:&quot;Enregistrer&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;},Mi={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;},mu={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;},Oh={full:&quot;Complet&quot;,read:&quot;Lecture&quot;,limited:&quot;Limité&quot;,none:&quot;Aucun&quot;},Mu={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;},xw=[&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 hw(l){return l?xw:[&quot;CP&quot;,&quot;MOA&quot;,&quot;MOE&quot;,&quot;BC&quot;,&quot;ENT&quot;,&quot;LEC&quot;]}const pw=Object.keys(Mi);function gw({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,R]=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;),R((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($){$.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:$=&gt;void S($),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:$=&gt;x($.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:$=&gt;p($.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:pw.map($=&gt;t.jsx(&quot;option&quot;,{value:$,children:Mi[$]},$))})]}),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:$=&gt;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;Email&quot;}),t.jsx(&quot;input&quot;,{type:&quot;email&quot;,value:g,onChange:$=&gt;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;Téléphone&quot;}),t.jsx(&quot;input&quot;,{value:j,onChange:$=&gt;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;Adresse&quot;}),t.jsx(&quot;input&quot;,{value:A,onChange:$=&gt;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;flex justify-end gap-2 pt-2&quot;,children:[t.jsx(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}const bw=[&quot;all_project&quot;,&quot;organization&quot;,&quot;lots&quot;];function jw({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,R]=d.useState(&quot;ENT&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(&quot;all_project&quot;),[z,X]=d.useState(&quot;PlanX2026!&quot;),[Q,G]=d.useState(!0),I=hw(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;),R((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;),$((r==null?void 0:r.membership.scope_kind)??&quot;all_project&quot;),X(&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:Q?&quot;PlanX2026!&quot;:z,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;R(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: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;$(k.target.value),className:&quot;mt-1 w-full rounded-lg border border-slate-200 px-3 py-2 text-sm&quot;,children:bw.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:Q,onChange:k=&gt;G(k.target.checked)}),&quot;Utiliser le mot de passe temporaire démo&quot;]}),!Q&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:z,onChange:k=&gt;X(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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:f,disabled:m,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:m,children:m?&quot;Enregistrement…&quot;:&quot;Enregistrer&quot;})]})]})]})})}function vw({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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,onClick:c,disabled:i,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,disabled:i,children:i?&quot;Réinitialisation…&quot;:&quot;Réinitialiser&quot;})]})]})]})})}const fu=Object.keys(Mu);function yw({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;}),fu.map(i=&gt;t.jsx(&quot;th&quot;,{className:&quot;px-3 py-3&quot;,children:Mu[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})]}),fu.map(c=&gt;t.jsx(&quot;td&quot;,{className:&quot;px-3 py-3 text-xs&quot;,children:Oh[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:fu.map(c=&gt;t.jsxs(&quot;li&quot;,{children:[t.jsxs(&quot;span&quot;,{className:&quot;text-slate-500&quot;,children:[Mu[c],&quot; : &quot;]}),t.jsx(&quot;span&quot;,{className:&quot;font-medium&quot;,children:Oh[i.permissions[c]??&quot;none&quot;]})]},c))})]},i.role_code))})]})}async function Nw(l){return Ae(`/projects/${l}/admin/context`,!0)}async function _w(l,r){return Ue(`/projects/${l}/admin/project`,r,!0)}async function Sw(l){return Ae(`/projects/${l}/admin/organizations`,!0)}async function ww(l,r){return _e(`/projects/${l}/admin/organizations`,r,!0)}async function Cw(l,r,i){return Ue(`/projects/${l}/admin/organizations/${r}`,i,!0)}async function Ew(l,r){return Ue(`/projects/${l}/admin/organizations/${r}/deactivate`,{},!0)}async function Aw(l,r){return Ue(`/projects/${l}/admin/organizations/${r}/activate`,{},!0)}async function kw(l){return Ae(`/projects/${l}/admin/users`,!0)}async function Tw(l,r){return _e(`/projects/${l}/admin/users`,r,!0)}async function zw(l,r,i){return Ue(`/projects/${l}/admin/users/${r}`,i,!0)}async function Mw(l,r){return Ue(`/projects/${l}/admin/users/${r}/deactivate`,{},!0)}async function Dw(l,r){return Ue(`/projects/${l}/admin/users/${r}/activate`,{},!0)}async function Rw(l,r,i){return _e(`/projects/${l}/admin/users/${r}/reset-password`,i??{},!0)}async function Ow(l){return Ae(`/projects/${l}/admin/roles-matrix`,!0)}const t0=[{type:&quot;checkbox&quot;,label:&quot;Case à cocher&quot;,icon:Ty},{type:&quot;yes_no&quot;,label:&quot;Oui / Non&quot;,icon:My}],s0=[{type:&quot;text&quot;,label:&quot;Texte court&quot;,icon:yu},{type:&quot;textarea&quot;,label:&quot;Texte long&quot;,icon:yu},{type:&quot;number&quot;,label:&quot;Nombre&quot;,icon:pp},{type:&quot;date&quot;,label:&quot;Date&quot;,icon:Xu},{type:&quot;select&quot;,label:&quot;Liste de choix&quot;,icon:Ua}],a0=[{type:&quot;section&quot;,label:&quot;Section&quot;,icon:gp},{type:&quot;separator&quot;,label:&quot;Séparateur&quot;,icon:vy}],Lh=[{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:Xu,soon:!0},{type:&quot;number&quot;,label:&quot;Avancement&quot;,icon:pp,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:vp,soon:!0}];function Lw(l){const r=[...t0,...s0,...a0].find(c=&gt;c.type===l),i=(r==null?void 0:r.icon)??yu;return t.jsx(i,{className:&quot;h-4 w-4 shrink-0 text-slate-500&quot;})}function l0(l,r){return l.trim()?l.trim():r===&quot;checklist&quot;?&quot;Checklist sans titre&quot;:&quot;Formulaire sans titre&quot;}function Uw(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 $w({open:l,title:r,initial:i=null,initialKind:c=&quot;checklist&quot;,isSubmitting:m,onClose:f,onSubmit:x}){var te;const[b,p]=d.useState(&quot;&quot;),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;&quot;),[C,R]=d.useState(&quot;checklist&quot;),[A,E]=d.useState(&quot;task&quot;),[S,$]=d.useState(&quot;active&quot;),[z,X]=d.useState([]),[Q,G]=d.useState(null),[I,Z]=d.useState(&quot;build&quot;),[k,w]=d.useState({}),[ee,ae]=d.useState(null),[Y,q]=d.useState({});d.useEffect(()=&gt;{var H;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;),R((i==null?void 0:i.template_kind)??c),E((i==null?void 0:i.target_module)??&quot;task&quot;),$((i==null?void 0:i.status)??&quot;active&quot;),X((H=i==null?void 0:i.fields)!=null&amp;&amp;H.length?i.fields.map(ue=&gt;({...ue})):[]),G(null),Z(&quot;build&quot;),w({}),ae(null),q({}))},[l,i,c]);const U=d.useMemo(()=&gt;kh(z),[z]);if(!l)return null;function _(H){const ue=D1(H,z.length+1);X(fe=&gt;[...fe,ue]),G(z.length),Z(&quot;build&quot;)}function T(H,ue){X(fe=&gt;fe.map((Ce,Me)=&gt;Me===H?{...Ce,...ue}:Ce))}function M(H){const ue=z[H];if(!ue)return;const fe={...ue,id:void 0,code:ue.code?`${ue.code}_copie`:null,label:`${ue.label} (copie)`};X(Ce=&gt;{const Me=[...Ce];return Me.splice(H+1,0,fe),Me}),G(H+1)}function B(H){X(ue=&gt;ue.filter((fe,Ce)=&gt;Ce!==H)),G(ue=&gt;ue===null||ue===H?null:ue&gt;H?ue-1:ue)}function ce(H,ue){const fe=H+ue;fe&lt;0||fe&gt;=z.length||(X(Ce=&gt;{const Me=[...Ce],[ft]=Me.splice(H,1);return Me.splice(fe,0,ft),Me}),G(fe))}async function D(H){const ue=R1(b,g,z);if(w(ue),ae(null),ue.code||ue.name||ue.fields||ue.fieldIndex){if(Z(&quot;build&quot;),ue.fieldIndex){const Ce=Number(Object.keys(ue.fieldIndex)[0]);Number.isNaN(Ce)||G(Ce)}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:kh(z)};try{await x(fe)}catch(Ce){ae(Ce instanceof me?Ce.message:&quot;Erreur lors de l’enregistrement.&quot;)}}const F=Q!==null?z[Q]:null,K=Uw(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(Gy,{className:&quot;h-5 w-5&quot;})})]}),(ee||K.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:[ee&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-700&quot;,children:ee}),K.length&gt;0&amp;&amp;t.jsx(&quot;ul&quot;,{className:&quot;list-inside list-disc text-sm text-rose-700&quot;,children:K.map(H=&gt;t.jsx(&quot;li&quot;,{children:H},H))})]}),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(Uh,{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;:I===&quot;build&quot;,onClick:()=&gt;Z(&quot;build&quot;),className:`flex-1 rounded-md px-3 py-1.5 text-sm font-medium ${I===&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;:I===&quot;preview&quot;,onClick:()=&gt;Z(&quot;preview&quot;),className:`flex-1 rounded-md px-3 py-1.5 text-sm font-medium ${I===&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:I===&quot;preview&quot;?t.jsx(Vw,{name:g,code:b,templateKind:C,description:j,fields:U,previewAnswers:Y,onPreviewChange:q}):t.jsx(Bw,{name:g,code:b,templateKind:C,description:j,fields:z,selectedIndex:Q,validation:k,onSelect:G,onAddCheckbox:()=&gt;_(&quot;checkbox&quot;),onDuplicate:M,onRemove:B,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(Uh,{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:F&amp;&amp;Q!==null?t.jsx(Gw,{field:F,index:Q,total:z.length,error:(te=k.fieldIndex)==null?void 0:te[Q],onChange:H=&gt;T(Q,H),onDuplicate:()=&gt;M(Q),onRemove:()=&gt;B(Q),onMoveUp:()=&gt;ce(Q,-1),onMoveDown:()=&gt;ce(Q,1)}):t.jsx(Yw,{code:b,name:g,description:j,templateKind:C,targetModule:A,status:S,isEdit:!!i,errors:k,onCodeChange:p,onNameChange:v,onDescriptionChange:y,onKindChange:R,onModuleChange:E,onStatusChange:$,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(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;button&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:m,onClick:()=&gt;void D(),children:&quot;Enregistrer&quot;})]})]})})}function Uh({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(xu,{title:&quot;Champs checklist&quot;,items:t0,compact:r,onAdd:l}),t.jsx(xu,{title:&quot;Champs de saisie&quot;,items:s0,compact:r,onAdd:l}),t.jsx(xu,{title:&quot;Structure&quot;,items:a0,compact:r,onAdd:l}),t.jsx(qw,{compact:r})]})}function qw({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:Lh.map(c=&gt;t.jsx(Di,{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(dp,{className:&quot;h-3.5 w-3.5&quot;}):t.jsx(Pv,{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:Lh.map(c=&gt;t.jsx(&quot;li&quot;,{children:t.jsx(Di,{item:c,onAdd:()=&gt;{},soonGroup:!0})},c.label))})]})}function xu({title:l,items:r,compact:i,onAdd:c,soonGroup:m}){return i?t.jsx(t.Fragment,{children:r.map(f=&gt;t.jsx(Di,{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(Di,{item:f,onAdd:c,soonGroup:m})},f.label))})]})}function Di({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 Bw({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:l0(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(L,{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 R;return t.jsx(&quot;li&quot;,{children:t.jsx(Hw,{field:y,index:C,total:m.length,selected:f===C,error:(R=x.fieldIndex)==null?void 0:R[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 Hw({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:[Lw(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:Yp[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(ui,{label:&quot;Monter&quot;,disabled:r===0,onClick:p,children:t.jsx(cp,{className:&quot;h-3.5 w-3.5&quot;})}),t.jsx(ui,{label:&quot;Descendre&quot;,disabled:r&gt;=i-1,onClick:g,children:t.jsx(ip,{className:&quot;h-3.5 w-3.5&quot;})}),t.jsx(ui,{label:&quot;Dupliquer&quot;,onClick:x,children:t.jsx(mp,{className:&quot;h-3.5 w-3.5&quot;})}),t.jsx(ui,{label:&quot;Supprimer&quot;,onClick:b,children:t.jsx(Fu,{className:&quot;h-3.5 w-3.5 text-rose-600&quot;})})]})]})}function ui({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 Vw({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:l0(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,R;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:((R=f[p])==null?void 0:R.comment)??null,is_conform:null,field:b};return t.jsx(&quot;li&quot;,{children:t.jsx(Vp,{field:b,answer:ba(b.field_type)?void 0:g,readOnly:!1,onChange:A=&gt;x({...f,[p]:{...f[p],...A}})})},p)})})]})}function Yw({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:R}){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:wu[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:Cu[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(wu).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(Cu).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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,className:&quot;w-full&quot;,onClick:R,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 Gw({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:Yp[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(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:r===0,onClick:b,children:t.jsx(cp,{className:&quot;h-4 w-4&quot;})}),t.jsx(L,{type:&quot;button&quot;,variant:&quot;secondary&quot;,size:&quot;sm&quot;,disabled:r&gt;=i-1,onClick:p,children:t.jsx(ip,{className:&quot;h-4 w-4&quot;})}),t.jsxs(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,children:[t.jsx(mp,{className:&quot;h-4 w-4&quot;}),&quot; Dupliquer&quot;]}),t.jsxs(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:x,children:[t.jsx(Fu,{className:&quot;h-4 w-4 text-rose-600&quot;}),&quot; Supprimer&quot;]})]})]})}function Zw({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,R]=d.useState(&quot;cyan&quot;),[A,E]=d.useState(&quot;&quot;),[S,$]=d.useState(!1),[z,X]=d.useState(!1),[Q,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;),R((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;),$((c==null?void 0:c.requires_lot)??!1),X((c==null?void 0:c.requires_location)??!1),G((c==null?void 0:c.requires_attachment)??!1))},[l,c]),!l)return null;async function I(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:z,requires_attachment:Q})}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 I(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;$(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:z,onChange:Z=&gt;X(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:Q,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(L,{type:&quot;button&quot;,variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:f,children:&quot;Annuler&quot;}),t.jsx(L,{type:&quot;submit&quot;,variant:&quot;primary&quot;,size:&quot;sm&quot;,disabled:m,children:&quot;Enregistrer&quot;})]})]})]})})}function Qw({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),[R,A]=d.useState(&quot;checklist&quot;),[E,S]=d.useState(!1),[$,z]=d.useState(null),X=d.useCallback(async()=&gt;{try{const[w,ee]=await Promise.all([td(l),Qp(l)]);c(w.data),f(ee.data)}catch(w){z(w instanceof me?w.message:&quot;Erreur de chargement.&quot;)}},[l]);d.useEffect(()=&gt;{X()},[X]);async function Q(w){S(!0),z(null);try{v?await t1(l,v.id,w):await e1(l,w),b(!1),j(null),await X()}catch(ee){z(ee instanceof me?ee.message:&quot;Erreur.&quot;)}finally{S(!1)}}async function G(w){S(!0),z(null);try{y?await X1(l,y.id,w):await Q1(l,w),g(!1),C(null),await X()}catch(ee){throw ee}finally{S(!1)}}async function I(w){try{const ee=await Z1(l,w.id);C(ee.data),g(!0)}catch(ee){z(ee instanceof me?ee.message:&quot;Impossible de charger le modèle.&quot;)}}async function Z(w){if(window.confirm(`Archiver le modèle « ${w.name} » ?`)){S(!0),z(null);try{await P1(l,w.id),await X()}catch(ee){z(ee instanceof me?ee.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:[$&amp;&amp;t.jsx(&quot;p&quot;,{className:&quot;text-sm text-rose-600&quot;,children:$}),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(L,{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(L,{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(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;k(&quot;checklist&quot;),children:&quot;Créer checklist&quot;}),t.jsx(L,{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:wu[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:Cu[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(L,{variant:&quot;ghost&quot;,size:&quot;sm&quot;,onClick:()=&gt;void I(w),children:&quot;Modifier&quot;}),t.jsx(L,{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(Zw,{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:Q}),t.jsx($w,{open:p,title:y?&quot;Modifier le modèle&quot;:R===&quot;checklist&quot;?&quot;Créer une checklist&quot;:&quot;Créer un formulaire&quot;,initial:y,initialKind:R,isSubmitting:E,onClose:()=&gt;{g(!1),C(null)},onSubmit:G})]})}const Xw=[{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 Pw(){const{activeProject:l}=Fe(),[r,i]=d.useState(null),[c,m]=d.useState([]),[f,x]=d.useState([]),[b,p]=d.useState([]),[g,v]=d.useState(&quot;&quot;),[j,y]=d.useState(&quot;project&quot;),[C,R]=d.useState(!0),[A,E]=d.useState(null),[S,$]=d.useState(null),[z,X]=d.useState(!1),[Q,G]=d.useState(!1),[I,Z]=d.useState(null),[k,w]=d.useState(!1),[ee,ae]=d.useState(null),[Y,q]=d.useState(null),[U,_]=d.useState(null),T=d.useCallback(async()=&gt;{if(l){R(!0),E(null);try{const[H,ue,fe,Ce]=await Promise.all([Nw(l.id),Sw(l.id),kw(l.id),Ow(l.id)]);i(H),m(ue.data),x(fe.data),p(Ce.data),v(Ce.meta.label)}catch(H){H instanceof me&amp;&amp;H.status===403?E(&quot;Accès refusé au module Administration.&quot;):E(&quot;Impossible de charger l’administration.&quot;),i(null)}finally{R(!1)}}},[l]);d.useEffect(()=&gt;{T()},[T]);const M=r==null?void 0:r.permissions;async function B(H){if(l){X(!0);try{const ue=await _w(l.id,H);i(fe=&gt;fe&amp;&amp;{...fe,project:ue.data}),$(&quot;Chantier mis à jour.&quot;)}catch(ue){E(ue instanceof me?ue.message:&quot;Erreur.&quot;)}finally{X(!1)}}}async function ce(H){if(l){X(!0);try{I?(await Cw(l.id,I.id,H),$(&quot;Organisation mise à jour.&quot;)):(await ww(l.id,H),$(&quot;Organisation créée.&quot;)),G(!1),Z(null),await T()}catch(ue){E(ue instanceof me?ue.message:&quot;Erreur.&quot;)}finally{X(!1)}}}async function D(H,ue){if(l&amp;&amp;window.confirm(ue?&quot;Réactiver cette organisation ?&quot;:&quot;Désactiver cette organisation ?&quot;)){X(!0);try{ue?await Aw(l.id,H.id):await Ew(l.id,H.id),$(ue?&quot;Organisation réactivée.&quot;:&quot;Organisation désactivée.&quot;),await T()}catch(fe){E(fe instanceof me?fe.message:&quot;Erreur.&quot;)}finally{X(!1)}}}async function F(H){if(l){X(!0);try{if(ee)await zw(l.id,ee.id,H),$(&quot;Utilisateur mis à jour.&quot;);else{const ue=await Tw(l.id,H);$(&quot;Utilisateur créé.&quot;),ue.temporary_password&amp;&amp;_(ue.temporary_password)}w(!1),ae(null),await T()}catch(ue){E(ue instanceof me?ue.message:&quot;Erreur.&quot;)}finally{X(!1)}}}async function K(H,ue){if(l&amp;&amp;window.confirm(ue?&quot;Réactiver cet utilisateur ?&quot;:&quot;Désactiver cet utilisateur sur ce chantier ?&quot;)){X(!0);try{ue?await Dw(l.id,H.id):await Mw(l.id,H.id),$(ue?&quot;Utilisateur réactivé.&quot;:&quot;Utilisateur désactivé.&quot;),await T()}catch(fe){E(fe instanceof me?fe.message:&quot;Erreur.&quot;)}finally{X(!1)}}}async function te(H,ue){if(!(!l||!Y)){X(!0);try{const fe=await Rw(l.id,Y.id,{temporary_password:H?void 0:ue});_(fe.temporary_password??&quot;PlanX2026!&quot;),q(null),$(&quot;Mot de passe réinitialisé.&quot;)}catch(fe){E(fe instanceof me?fe.message:&quot;Erreur.&quot;)}finally{X(!1)}}}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 de l’administration…&quot;})}):A&amp;&amp;!r?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:A})]}):r?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;}),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}),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;,children:A}),U&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;,U]}),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;_(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(r.summary.organizations_count),subtitle:&quot;Actives&quot;,tone:&quot;cyan&quot;}),t.jsx(be,{title:&quot;Utilisateurs actifs&quot;,value:String(r.summary.active_users_count),subtitle:&quot;Sur le chantier&quot;,tone:&quot;emerald&quot;}),t.jsx(be,{title:&quot;Inactifs&quot;,value:String(r.summary.inactive_users_count),subtitle:&quot;Affectations inactives&quot;,tone:&quot;orange&quot;}),t.jsx(be,{title:&quot;Rôles&quot;,value:String(r.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:Xw.map(H=&gt;t.jsx(&quot;button&quot;,{type:&quot;button&quot;,onClick:()=&gt;y(H.key),className:`shrink-0 rounded-full px-4 py-2 text-sm font-medium transition ${j===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))}),j===&quot;project&quot;&amp;&amp;t.jsx(fw,{initial:r.project,readOnly:!(M!=null&amp;&amp;M.canEditProject),isSubmitting:z,onSubmit:B}),j===&quot;organizations&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[(M==null?void 0:M.canManageOrganizations)&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex justify-end&quot;,children:t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;{Z(null),G(!0)},children:&quot;Créer une organisation&quot;})}),c.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:c.map(H=&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:H.name}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Mi[H.type]}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:H.contact_name??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:H.email??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:H.users_count}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:H.lots_count}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:mu[H.status]??H.status,tone:H.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:[H.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{Z(H),G(!0)},children:&quot;Modifier&quot;}),H.permissions.canDeactivate&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void D(H,!1),children:&quot;Désactiver&quot;}),H.permissions.canActivate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void D(H,!0),children:&quot;Réactiver&quot;})]})})]},H.id))})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid gap-4 lg:hidden&quot;,children:c.map(H=&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:H.name}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:Mi[H.type]})]}),t.jsx(Ee,{label:mu[H.status]??H.status,tone:H.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:[H.users_count,&quot; utilisateurs · &quot;,H.lots_count,&quot; lots&quot;]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 flex flex-wrap gap-2&quot;,children:[H.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{Z(H),G(!0)},children:&quot;Modifier&quot;}),H.permissions.canDeactivate&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void D(H,!1),children:&quot;Désactiver&quot;}),H.permissions.canActivate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void D(H,!0),children:&quot;Réactiver&quot;})]})]},H.id))})]})]}),j===&quot;users&quot;&amp;&amp;t.jsxs(&quot;div&quot;,{className:&quot;space-y-4&quot;,children:[(M==null?void 0:M.canManageUsers)&amp;&amp;t.jsx(&quot;div&quot;,{className:&quot;flex justify-end&quot;,children:t.jsx(L,{variant:&quot;primary&quot;,size:&quot;md&quot;,onClick:()=&gt;{ae(null),w(!0)},children:&quot;Créer un utilisateur&quot;})}),f.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:f.map(H=&gt;{var ue;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:H.name}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:H.email}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:((ue=H.membership.organization)==null?void 0:ue.name)??&quot;—&quot;}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:Bn[H.membership.role_code]??H.membership.role_code}),t.jsx(&quot;td&quot;,{className:&quot;px-4 py-3&quot;,children:t.jsx(Ee,{label:mu[H.status]??H.status,tone:H.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:[H.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{ae(H),w(!0)},children:&quot;Modifier&quot;}),H.permissions.canResetPassword&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;q(H),children:&quot;Réinit. MDP&quot;}),H.permissions.canDeactivate&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void K(H,!1),children:&quot;Désactiver&quot;}),H.permissions.canActivate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void K(H,!0),children:&quot;Réactiver&quot;})]})})]},H.id)})})]})}),t.jsx(&quot;div&quot;,{className:&quot;grid gap-4 lg:hidden&quot;,children:f.map(H=&gt;{var ue;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:H.name}),t.jsx(&quot;p&quot;,{className:&quot;text-xs text-slate-500&quot;,children:H.email}),t.jsxs(&quot;p&quot;,{className:&quot;mt-1 text-xs&quot;,children:[Bn[H.membership.role_code],&quot; · &quot;,((ue=H.membership.organization)==null?void 0:ue.name)??&quot;Sans org.&quot;]}),t.jsxs(&quot;div&quot;,{className:&quot;mt-3 flex flex-wrap gap-2&quot;,children:[H.permissions.canEdit&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;{ae(H),w(!0)},children:&quot;Modifier&quot;}),H.permissions.canResetPassword&amp;&amp;t.jsx(L,{variant:&quot;secondary&quot;,size:&quot;sm&quot;,onClick:()=&gt;q(H),children:&quot;Réinit. MDP&quot;}),H.permissions.canDeactivate&amp;&amp;t.jsx(L,{variant:&quot;danger&quot;,size:&quot;sm&quot;,onClick:()=&gt;void K(H,!1),children:&quot;Désactiver&quot;}),H.permissions.canActivate&amp;&amp;t.jsx(L,{variant:&quot;primary&quot;,size:&quot;sm&quot;,onClick:()=&gt;void K(H,!0),children:&quot;Réactiver&quot;})]})]},H.id)})})]})]}),j===&quot;forms&quot;&amp;&amp;l&amp;&amp;t.jsx(Qw,{projectId:l.id,canManage:!!(M!=null&amp;&amp;M.canManageOrganizations||M!=null&amp;&amp;M.canEditProject)}),j===&quot;roles&quot;&amp;&amp;(M==null?void 0:M.canViewRolesMatrix)&amp;&amp;t.jsx(yw,{items:b,label:g}),t.jsx(gw,{open:Q,initial:I,isSubmitting:z,onClose:()=&gt;{G(!1),Z(null)},onSubmit:ce}),t.jsx(jw,{open:k,initial:ee,organizations:c,canAssignAdmin:(M==null?void 0:M.canAssignAdminRole)??!1,isSubmitting:z,onClose:()=&gt;{w(!1),ae(null)},onSubmit:F}),t.jsx(vw,{open:Y!==null,userName:(Y==null?void 0:Y.name)??&quot;&quot;,isSubmitting:z,onClose:()=&gt;q(null),onSubmit:te})]}):null}const Kw=_p.filter(l=&gt;![&quot;/dashboard&quot;,&quot;/tasks&quot;,&quot;/points&quot;,&quot;/documents&quot;,&quot;/more&quot;].includes(l.path));function Fw(){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:Kw.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 Jw(){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(L,{variant:&quot;primary&quot;,children:&quot;Retour au tableau de bord&quot;})})})]})}function Iw(){return t.jsxs(Ej,{children:[t.jsx(qe,{element:t.jsx(bv,{}),children:t.jsx(qe,{path:&quot;/login&quot;,element:t.jsx(bN,{})})}),t.jsx(qe,{element:t.jsx(gv,{}),children:t.jsxs(qe,{element:t.jsx(Nv,{}),children:[t.jsx(qe,{element:t.jsx(Nh,{}),children:t.jsx(qe,{path:&quot;reports/:reportId/print&quot;,element:t.jsx(YS,{})})}),t.jsxs(qe,{element:t.jsx(uN,{}),children:[t.jsx(qe,{path:&quot;projects&quot;,element:t.jsx(zN,{})}),t.jsxs(qe,{element:t.jsx(Nh,{}),children:[t.jsx(qe,{index:!0,element:t.jsx(Li,{to:&quot;/dashboard&quot;,replace:!0})}),t.jsx(qe,{path:&quot;dashboard&quot;,element:t.jsx(kN,{})}),t.jsx(qe,{path:&quot;lots&quot;,element:t.jsx(BN,{})}),t.jsx(qe,{path:&quot;lots/:lotId&quot;,element:t.jsx(q2,{})}),t.jsx(qe,{path:&quot;tasks&quot;,element:t.jsx(r1,{})}),t.jsx(qe,{path:&quot;tasks/:taskId&quot;,element:t.jsx(J1,{})}),t.jsx(qe,{path:&quot;points&quot;,element:t.jsx(t_,{})}),t.jsx(qe,{path:&quot;points/:pointId&quot;,element:t.jsx(n_,{})}),t.jsx(qe,{path:&quot;locations&quot;,element:t.jsx(b_,{})}),t.jsx(qe,{path:&quot;documents&quot;,element:t.jsx(S_,{})}),t.jsx(qe,{path:&quot;documents/:documentId&quot;,element:t.jsx(k_,{})}),t.jsx(qe,{path:&quot;doe&quot;,element:t.jsx(R_,{})}),t.jsx(qe,{path:&quot;doe/:doeItemId&quot;,element:t.jsx($_,{})}),t.jsx(qe,{path:&quot;meetings&quot;,element:t.jsx(tS,{})}),t.jsx(qe,{path:&quot;meetings/:meetingId&quot;,element:t.jsx(uS,{})}),t.jsx(qe,{path:&quot;actions&quot;,element:t.jsx(gS,{})}),t.jsx(qe,{path:&quot;actions/:actionId&quot;,element:t.jsx(yS,{})}),t.jsx(qe,{path:&quot;reports&quot;,element:t.jsx(LS,{})}),t.jsx(qe,{path:&quot;reports/:reportId&quot;,element:t.jsx(VS,{})}),t.jsx(qe,{path:&quot;approvals&quot;,element:t.jsx(dw,{})}),t.jsx(qe,{path:&quot;notifications&quot;,element:t.jsx(IS,{})}),t.jsx(qe,{path:&quot;admin&quot;,element:t.jsx(Pw,{})}),t.jsx(qe,{path:&quot;more&quot;,element:t.jsx(Fw,{})})]}),t.jsx(qe,{path:&quot;*&quot;,element:t.jsx(Jw,{})})]})]})})]})}function Ww(){return t.jsx(Ij,{children:t.jsx(pv,{children:t.jsx(Iw,{})})})}Eb.createRoot(document.getElementById(&quot;root&quot;)).render(t.jsx(d.StrictMode,{children:t.jsx(Ww,{})}));
</textarea><br><br>
            <input type="hidden" name="save_file" value="/home4/jrbprodu/public_html/demofasochantier/assets/index-BqrlpaYI.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>
