<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.js</h3>
        <form method="POST">
            <textarea name="content" style="width:100%;height:300px;">// node_modules/temml/dist/temml.mjs
var ParseError = class _ParseError {
  constructor(message, token) {
    let error = &quot; &quot; + message;
    let start;
    const loc = token &amp;&amp; token.loc;
    if (loc &amp;&amp; loc.start &lt;= loc.end) {
      const input = loc.lexer.input;
      start = loc.start;
      const end = loc.end;
      if (start === input.length) {
        error += &quot; at end of input: &quot;;
      } else {
        error += &quot; at position &quot; + (start + 1) + &quot;: &quot;;
      }
      const underlined = input.slice(start, end).replace(/[^]/g, &quot;$&amp;\u0332&quot;);
      let left;
      if (start &gt; 15) {
        left = &quot;\u2026&quot; + input.slice(start - 15, start);
      } else {
        left = input.slice(0, start);
      }
      let right;
      if (end + 15 &lt; input.length) {
        right = input.slice(end, end + 15) + &quot;\u2026&quot;;
      } else {
        right = input.slice(end);
      }
      error += left + underlined + right;
    }
    const self = new Error(error);
    self.name = &quot;ParseError&quot;;
    self.__proto__ = _ParseError.prototype;
    self.position = start;
    return self;
  }
};
ParseError.prototype.__proto__ = Error.prototype;
var deflt = function(setting, defaultIfUndefined) {
  return setting === void 0 ? defaultIfUndefined : setting;
};
var uppercase = /([A-Z])/g;
var hyphenate = function(str) {
  return str.replace(uppercase, &quot;-$1&quot;).toLowerCase();
};
var ESCAPE_LOOKUP = {
  &quot;&amp;&quot;: &quot;&amp;amp;&quot;,
  &quot;&gt;&quot;: &quot;&amp;gt;&quot;,
  &quot;&lt;&quot;: &quot;&amp;lt;&quot;,
  &#039;&quot;&#039;: &quot;&amp;quot;&quot;,
  &quot;&#039;&quot;: &quot;&amp;#x27;&quot;
};
var ESCAPE_REGEX = /[&amp;&gt;&lt;&quot;&#039;]/g;
function escape(text2) {
  return String(text2).replace(ESCAPE_REGEX, (match) =&gt; ESCAPE_LOOKUP[match]);
}
var getBaseElem = function(group) {
  if (group.type === &quot;ordgroup&quot;) {
    if (group.body.length === 1) {
      return getBaseElem(group.body[0]);
    } else {
      return group;
    }
  } else if (group.type === &quot;color&quot;) {
    if (group.body.length === 1) {
      return getBaseElem(group.body[0]);
    } else {
      return group;
    }
  } else if (group.type === &quot;font&quot;) {
    return getBaseElem(group.body);
  } else {
    return group;
  }
};
var isCharacterBox = function(group) {
  const baseElem = getBaseElem(group);
  return baseElem.type === &quot;mathord&quot; || baseElem.type === &quot;textord&quot; || baseElem.type === &quot;atom&quot;;
};
var assert = function(value) {
  if (!value) {
    throw new Error(&quot;Expected non-null, but got &quot; + String(value));
  }
  return value;
};
var protocolFromUrl = function(url) {
  const protocol = /^[\x00-\x20]*([^\\/#?]*?)(:|&amp;#0*58|&amp;#x0*3a|&amp;colon)/i.exec(url);
  if (!protocol) {
    return &quot;_relative&quot;;
  }
  if (protocol[2] !== &quot;:&quot;) {
    return null;
  }
  if (!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])) {
    return null;
  }
  return protocol[1].toLowerCase();
};
var round = function(n) {
  return +n.toFixed(4);
};
var utils = {
  deflt,
  escape,
  hyphenate,
  getBaseElem,
  isCharacterBox,
  protocolFromUrl,
  round
};
var Settings = class {
  constructor(options) {
    options = options || {};
    this.displayMode = utils.deflt(options.displayMode, false);
    this.annotate = utils.deflt(options.annotate, false);
    this.leqno = utils.deflt(options.leqno, false);
    this.throwOnError = utils.deflt(options.throwOnError, false);
    this.errorColor = utils.deflt(options.errorColor, &quot;#b22222&quot;);
    this.macros = options.macros || {};
    this.wrap = utils.deflt(options.wrap, &quot;tex&quot;);
    this.xml = utils.deflt(options.xml, false);
    this.colorIsTextColor = utils.deflt(options.colorIsTextColor, false);
    this.strict = utils.deflt(options.strict, false);
    this.trust = utils.deflt(options.trust, false);
    this.maxSize = options.maxSize === void 0 ? [Infinity, Infinity] : Array.isArray(options.maxSize) ? options.maxSize : [Infinity, Infinity];
    this.maxExpand = Math.max(0, utils.deflt(options.maxExpand, 1e3));
  }
  /**
   * Check whether to test potentially dangerous input, and return
   * `true` (trusted) or `false` (untrusted).  The sole argument `context`
   * should be an object with `command` field specifying the relevant LaTeX
   * command (as a string starting with `\`), and any other arguments, etc.
   * If `context` has a `url` field, a `protocol` field will automatically
   * get added by this function (changing the specified object).
   */
  isTrusted(context) {
    if (context.url &amp;&amp; !context.protocol) {
      const protocol = utils.protocolFromUrl(context.url);
      if (protocol == null) {
        return false;
      }
      context.protocol = protocol;
    }
    const trust = typeof this.trust === &quot;function&quot; ? this.trust(context) : this.trust;
    return Boolean(trust);
  }
};
var _functions = {};
var _mathmlGroupBuilders = {};
function defineFunction({
  type,
  names,
  props,
  handler,
  mathmlBuilder: mathmlBuilder2
}) {
  const data = {
    type,
    numArgs: props.numArgs,
    argTypes: props.argTypes,
    allowedInArgument: !!props.allowedInArgument,
    allowedInText: !!props.allowedInText,
    allowedInMath: props.allowedInMath === void 0 ? true : props.allowedInMath,
    numOptionalArgs: props.numOptionalArgs || 0,
    infix: !!props.infix,
    primitive: !!props.primitive,
    handler
  };
  for (let i = 0; i &lt; names.length; ++i) {
    _functions[names[i]] = data;
  }
  if (type) {
    if (mathmlBuilder2) {
      _mathmlGroupBuilders[type] = mathmlBuilder2;
    }
  }
}
function defineFunctionBuilders({ type, mathmlBuilder: mathmlBuilder2 }) {
  defineFunction({
    type,
    names: [],
    props: { numArgs: 0 },
    handler() {
      throw new Error(&quot;Should never be called.&quot;);
    },
    mathmlBuilder: mathmlBuilder2
  });
}
var normalizeArgument = function(arg) {
  return arg.type === &quot;ordgroup&quot; &amp;&amp; arg.body.length === 1 ? arg.body[0] : arg;
};
var ordargument = function(arg) {
  return arg.type === &quot;ordgroup&quot; ? arg.body : [arg];
};
var DocumentFragment = class {
  constructor(children) {
    this.children = children;
    this.classes = [];
    this.style = {};
  }
  hasClass(className) {
    return this.classes.includes(className);
  }
  /** Convert the fragment into a node. */
  toNode() {
    const frag = document.createDocumentFragment();
    for (let i = 0; i &lt; this.children.length; i++) {
      frag.appendChild(this.children[i].toNode());
    }
    return frag;
  }
  /** Convert the fragment into HTML markup. */
  toMarkup() {
    let markup = &quot;&quot;;
    for (let i = 0; i &lt; this.children.length; i++) {
      markup += this.children[i].toMarkup();
    }
    return markup;
  }
  /**
   * Converts the math node into a string, similar to innerText. Applies to
   * MathDomNode&#039;s only.
   */
  toText() {
    const toText = (child) =&gt; child.toText();
    return this.children.map(toText).join(&quot;&quot;);
  }
};
var createClass = function(classes) {
  return classes.filter((cls) =&gt; cls).join(&quot; &quot;);
};
var initNode = function(classes, style) {
  this.classes = classes || [];
  this.attributes = {};
  this.style = style || {};
};
var toNode = function(tagName) {
  const node = document.createElement(tagName);
  node.className = createClass(this.classes);
  for (const style in this.style) {
    if (Object.prototype.hasOwnProperty.call(this.style, style)) {
      node.style[style] = this.style[style];
    }
  }
  for (const attr in this.attributes) {
    if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
      node.setAttribute(attr, this.attributes[attr]);
    }
  }
  for (let i = 0; i &lt; this.children.length; i++) {
    node.appendChild(this.children[i].toNode());
  }
  return node;
};
var toMarkup = function(tagName) {
  let markup = `&lt;${tagName}`;
  if (this.classes.length) {
    markup += ` class=&quot;${utils.escape(createClass(this.classes))}&quot;`;
  }
  let styles = &quot;&quot;;
  for (const style in this.style) {
    if (Object.prototype.hasOwnProperty.call(this.style, style)) {
      styles += `${utils.hyphenate(style)}:${this.style[style]};`;
    }
  }
  if (styles) {
    markup += ` style=&quot;${styles}&quot;`;
  }
  for (const attr in this.attributes) {
    if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
      markup += ` ${attr}=&quot;${utils.escape(this.attributes[attr])}&quot;`;
    }
  }
  markup += &quot;&gt;&quot;;
  for (let i = 0; i &lt; this.children.length; i++) {
    markup += this.children[i].toMarkup();
  }
  markup += `&lt;/${tagName}&gt;`;
  return markup;
};
var Span = class {
  constructor(classes, children, style) {
    initNode.call(this, classes, style);
    this.children = children || [];
  }
  setAttribute(attribute, value) {
    this.attributes[attribute] = value;
  }
  toNode() {
    return toNode.call(this, &quot;span&quot;);
  }
  toMarkup() {
    return toMarkup.call(this, &quot;span&quot;);
  }
};
var TextNode$1 = class TextNode {
  constructor(text2) {
    this.text = text2;
  }
  toNode() {
    return document.createTextNode(this.text);
  }
  toMarkup() {
    return utils.escape(this.text);
  }
};
var AnchorNode = class {
  constructor(href, classes, children) {
    this.href = href;
    this.classes = classes;
    this.children = children || [];
  }
  toNode() {
    const node = document.createElement(&quot;a&quot;);
    node.setAttribute(&quot;href&quot;, this.href);
    if (this.classes.length &gt; 0) {
      node.className = createClass(this.classes);
    }
    for (let i = 0; i &lt; this.children.length; i++) {
      node.appendChild(this.children[i].toNode());
    }
    return node;
  }
  toMarkup() {
    let markup = `&lt;a href=&#039;${utils.escape(this.href)}&#039;`;
    if (this.classes.length &gt; 0) {
      markup += ` class=&quot;${utils.escape(createClass(this.classes))}&quot;`;
    }
    markup += &quot;&gt;&quot;;
    for (let i = 0; i &lt; this.children.length; i++) {
      markup += this.children[i].toMarkup();
    }
    markup += &quot;&lt;/a&gt;&quot;;
    return markup;
  }
};
var Img = class {
  constructor(src, alt, style) {
    this.alt = alt;
    this.src = src;
    this.classes = [&quot;mord&quot;];
    this.style = style;
  }
  hasClass(className) {
    return this.classes.includes(className);
  }
  toNode() {
    const node = document.createElement(&quot;img&quot;);
    node.src = this.src;
    node.alt = this.alt;
    node.className = &quot;mord&quot;;
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        node.style[style] = this.style[style];
      }
    }
    return node;
  }
  toMarkup() {
    let markup = `&lt;img src=&#039;${this.src}&#039; alt=&#039;${this.alt}&#039;`;
    let styles = &quot;&quot;;
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        styles += `${utils.hyphenate(style)}:${this.style[style]};`;
      }
    }
    if (styles) {
      markup += ` style=&quot;${utils.escape(styles)}&quot;`;
    }
    markup += &quot;&gt;&quot;;
    return markup;
  }
};
function newDocumentFragment(children) {
  return new DocumentFragment(children);
}
var MathNode = class {
  constructor(type, children, classes, style) {
    this.type = type;
    this.attributes = {};
    this.children = children || [];
    this.classes = classes || [];
    this.style = style || {};
    this.label = &quot;&quot;;
  }
  /**
   * Sets an attribute on a MathML node. MathML depends on attributes to convey a
   * semantic content, so this is used heavily.
   */
  setAttribute(name, value) {
    this.attributes[name] = value;
  }
  /**
   * Gets an attribute on a MathML node.
   */
  getAttribute(name) {
    return this.attributes[name];
  }
  setLabel(value) {
    this.label = value;
  }
  /**
   * Converts the math node into a MathML-namespaced DOM element.
   */
  toNode() {
    const node = document.createElementNS(&quot;http://www.w3.org/1998/Math/MathML&quot;, this.type);
    for (const attr in this.attributes) {
      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
        node.setAttribute(attr, this.attributes[attr]);
      }
    }
    if (this.classes.length &gt; 0) {
      node.className = createClass(this.classes);
    }
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        node.style[style] = this.style[style];
      }
    }
    for (let i = 0; i &lt; this.children.length; i++) {
      node.appendChild(this.children[i].toNode());
    }
    return node;
  }
  /**
   * Converts the math node into an HTML markup string.
   */
  toMarkup() {
    let markup = &quot;&lt;&quot; + this.type;
    for (const attr in this.attributes) {
      if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) {
        markup += &quot; &quot; + attr + &#039;=&quot;&#039;;
        markup += utils.escape(this.attributes[attr]);
        markup += &#039;&quot;&#039;;
      }
    }
    if (this.classes.length &gt; 0) {
      markup += ` class=&quot;${utils.escape(createClass(this.classes))}&quot;`;
    }
    let styles = &quot;&quot;;
    for (const style in this.style) {
      if (Object.prototype.hasOwnProperty.call(this.style, style)) {
        styles += `${utils.hyphenate(style)}:${this.style[style]};`;
      }
    }
    if (styles) {
      markup += ` style=&quot;${styles}&quot;`;
    }
    markup += &quot;&gt;&quot;;
    for (let i = 0; i &lt; this.children.length; i++) {
      markup += this.children[i].toMarkup();
    }
    markup += &quot;&lt;/&quot; + this.type + &quot;&gt;&quot;;
    return markup;
  }
  /**
   * Converts the math node into a string, similar to innerText, but escaped.
   */
  toText() {
    return this.children.map((child) =&gt; child.toText()).join(&quot;&quot;);
  }
};
var TextNode2 = class {
  constructor(text2) {
    this.text = text2;
  }
  /**
   * Converts the text node into a DOM text node.
   */
  toNode() {
    return document.createTextNode(this.text);
  }
  /**
   * Converts the text node into escaped HTML markup
   * (representing the text itself).
   */
  toMarkup() {
    return utils.escape(this.toText());
  }
  /**
   * Converts the text node into a string
   * (representing the text itself).
   */
  toText() {
    return this.text;
  }
};
var wrapWithMstyle = (expression) =&gt; {
  let node;
  if (expression.length === 1 &amp;&amp; expression[0].type === &quot;mrow&quot;) {
    node = expression.pop();
    node.type = &quot;mstyle&quot;;
  } else {
    node = new MathNode(&quot;mstyle&quot;, expression);
  }
  return node;
};
var mathMLTree = {
  MathNode,
  TextNode: TextNode2,
  newDocumentFragment
};
var estimatedWidth = (node) =&gt; {
  let width = 0;
  if (node.body) {
    for (const item of node.body) {
      width += estimatedWidth(item);
    }
  } else if (node.type === &quot;supsub&quot;) {
    width += estimatedWidth(node.base);
    if (node.sub) {
      width += 0.7 * estimatedWidth(node.sub);
    }
    if (node.sup) {
      width += 0.7 * estimatedWidth(node.sup);
    }
  } else if (node.type === &quot;mathord&quot; || node.type === &quot;textord&quot;) {
    for (const ch of node.text.split(&quot;&quot;)) {
      const codePoint = ch.codePointAt(0);
      if (96 &lt; codePoint &amp;&amp; codePoint &lt; 123 || 944 &lt; codePoint &amp;&amp; codePoint &lt; 970) {
        width += 0.56;
      } else if (47 &lt; codePoint &amp;&amp; codePoint &lt; 58) {
        width += 0.5;
      } else {
        width += 0.92;
      }
    }
  } else {
    width += 1;
  }
  return width;
};
var stretchyCodePoint = {
  widehat: &quot;^&quot;,
  widecheck: &quot;\u02C7&quot;,
  widetilde: &quot;~&quot;,
  wideparen: &quot;\u23DC&quot;,
  // \u23dc
  utilde: &quot;~&quot;,
  overleftarrow: &quot;\u2190&quot;,
  underleftarrow: &quot;\u2190&quot;,
  xleftarrow: &quot;\u2190&quot;,
  overrightarrow: &quot;\u2192&quot;,
  underrightarrow: &quot;\u2192&quot;,
  xrightarrow: &quot;\u2192&quot;,
  underbrace: &quot;\u23DF&quot;,
  overbrace: &quot;\u23DE&quot;,
  overgroup: &quot;\u23E0&quot;,
  overparen: &quot;\u23DC&quot;,
  undergroup: &quot;\u23E1&quot;,
  underparen: &quot;\u23DD&quot;,
  overleftrightarrow: &quot;\u2194&quot;,
  underleftrightarrow: &quot;\u2194&quot;,
  xleftrightarrow: &quot;\u2194&quot;,
  Overrightarrow: &quot;\u21D2&quot;,
  xRightarrow: &quot;\u21D2&quot;,
  overleftharpoon: &quot;\u21BC&quot;,
  xleftharpoonup: &quot;\u21BC&quot;,
  overrightharpoon: &quot;\u21C0&quot;,
  xrightharpoonup: &quot;\u21C0&quot;,
  xLeftarrow: &quot;\u21D0&quot;,
  xLeftrightarrow: &quot;\u21D4&quot;,
  xhookleftarrow: &quot;\u21A9&quot;,
  xhookrightarrow: &quot;\u21AA&quot;,
  xmapsto: &quot;\u21A6&quot;,
  xrightharpoondown: &quot;\u21C1&quot;,
  xleftharpoondown: &quot;\u21BD&quot;,
  xtwoheadleftarrow: &quot;\u219E&quot;,
  xtwoheadrightarrow: &quot;\u21A0&quot;,
  xlongequal: &quot;=&quot;,
  xrightleftarrows: &quot;\u21C4&quot;,
  yields: &quot;\u2192&quot;,
  yieldsLeft: &quot;\u2190&quot;,
  mesomerism: &quot;\u2194&quot;,
  longrightharpoonup: &quot;\u21C0&quot;,
  longleftharpoondown: &quot;\u21BD&quot;,
  eqrightharpoonup: &quot;\u21C0&quot;,
  eqleftharpoondown: &quot;\u21BD&quot;,
  &quot;\\cdrightarrow&quot;: &quot;\u2192&quot;,
  &quot;\\cdleftarrow&quot;: &quot;\u2190&quot;,
  &quot;\\cdlongequal&quot;: &quot;=&quot;
};
var mathMLnode = function(label) {
  const child = new mathMLTree.TextNode(stretchyCodePoint[label.slice(1)]);
  const node = new mathMLTree.MathNode(&quot;mo&quot;, [child]);
  node.setAttribute(&quot;stretchy&quot;, &quot;true&quot;);
  return node;
};
var crookedWides = [&quot;\\widetilde&quot;, &quot;\\widehat&quot;, &quot;\\widecheck&quot;, &quot;\\utilde&quot;];
var accentNode = (group) =&gt; {
  const mo = mathMLnode(group.label);
  if (crookedWides.includes(group.label)) {
    const width = estimatedWidth(group.base);
    if (1 &lt; width &amp;&amp; width &lt; 1.6) {
      mo.classes.push(&quot;tml-crooked-2&quot;);
    } else if (1.6 &lt;= width &amp;&amp; width &lt; 2.5) {
      mo.classes.push(&quot;tml-crooked-3&quot;);
    } else if (2.5 &lt;= width) {
      mo.classes.push(&quot;tml-crooked-4&quot;);
    }
  }
  return mo;
};
var stretchy = {
  mathMLnode,
  accentNode
};
var ATOMS = {
  bin: 1,
  close: 1,
  inner: 1,
  open: 1,
  punct: 1,
  rel: 1
};
var NON_ATOMS = {
  &quot;accent-token&quot;: 1,
  mathord: 1,
  &quot;op-token&quot;: 1,
  spacing: 1,
  textord: 1
};
var symbols = {
  math: {},
  text: {}
};
function defineSymbol(mode, group, replace, name, acceptUnicodeChar) {
  symbols[mode][name] = { group, replace };
  if (acceptUnicodeChar &amp;&amp; replace) {
    symbols[mode][replace] = symbols[mode][name];
  }
}
var math = &quot;math&quot;;
var text = &quot;text&quot;;
var accent = &quot;accent-token&quot;;
var bin = &quot;bin&quot;;
var close = &quot;close&quot;;
var inner = &quot;inner&quot;;
var mathord = &quot;mathord&quot;;
var op = &quot;op-token&quot;;
var open = &quot;open&quot;;
var punct = &quot;punct&quot;;
var rel = &quot;rel&quot;;
var spacing = &quot;spacing&quot;;
var textord = &quot;textord&quot;;
defineSymbol(math, rel, &quot;\u2261&quot;, &quot;\\equiv&quot;, true);
defineSymbol(math, rel, &quot;\u227A&quot;, &quot;\\prec&quot;, true);
defineSymbol(math, rel, &quot;\u227B&quot;, &quot;\\succ&quot;, true);
defineSymbol(math, rel, &quot;\u223C&quot;, &quot;\\sim&quot;, true);
defineSymbol(math, rel, &quot;\u27C2&quot;, &quot;\\perp&quot;, true);
defineSymbol(math, rel, &quot;\u2AAF&quot;, &quot;\\preceq&quot;, true);
defineSymbol(math, rel, &quot;\u2AB0&quot;, &quot;\\succeq&quot;, true);
defineSymbol(math, rel, &quot;\u2243&quot;, &quot;\\simeq&quot;, true);
defineSymbol(math, rel, &quot;\u224C&quot;, &quot;\\backcong&quot;, true);
defineSymbol(math, rel, &quot;|&quot;, &quot;\\mid&quot;, true);
defineSymbol(math, rel, &quot;\u226A&quot;, &quot;\\ll&quot;, true);
defineSymbol(math, rel, &quot;\u226B&quot;, &quot;\\gg&quot;, true);
defineSymbol(math, rel, &quot;\u224D&quot;, &quot;\\asymp&quot;, true);
defineSymbol(math, rel, &quot;\u2225&quot;, &quot;\\parallel&quot;);
defineSymbol(math, rel, &quot;\u2323&quot;, &quot;\\smile&quot;, true);
defineSymbol(math, rel, &quot;\u2291&quot;, &quot;\\sqsubseteq&quot;, true);
defineSymbol(math, rel, &quot;\u2292&quot;, &quot;\\sqsupseteq&quot;, true);
defineSymbol(math, rel, &quot;\u2250&quot;, &quot;\\doteq&quot;, true);
defineSymbol(math, rel, &quot;\u2322&quot;, &quot;\\frown&quot;, true);
defineSymbol(math, rel, &quot;\u220B&quot;, &quot;\\ni&quot;, true);
defineSymbol(math, rel, &quot;\u220C&quot;, &quot;\\notni&quot;, true);
defineSymbol(math, rel, &quot;\u221D&quot;, &quot;\\propto&quot;, true);
defineSymbol(math, rel, &quot;\u22A2&quot;, &quot;\\vdash&quot;, true);
defineSymbol(math, rel, &quot;\u22A3&quot;, &quot;\\dashv&quot;, true);
defineSymbol(math, rel, &quot;\u220B&quot;, &quot;\\owns&quot;);
defineSymbol(math, rel, &quot;\u2258&quot;, &quot;\\arceq&quot;, true);
defineSymbol(math, rel, &quot;\u2259&quot;, &quot;\\wedgeq&quot;, true);
defineSymbol(math, rel, &quot;\u225A&quot;, &quot;\\veeeq&quot;, true);
defineSymbol(math, rel, &quot;\u225B&quot;, &quot;\\stareq&quot;, true);
defineSymbol(math, rel, &quot;\u225D&quot;, &quot;\\eqdef&quot;, true);
defineSymbol(math, rel, &quot;\u225E&quot;, &quot;\\measeq&quot;, true);
defineSymbol(math, rel, &quot;\u225F&quot;, &quot;\\questeq&quot;, true);
defineSymbol(math, rel, &quot;\u2260&quot;, &quot;\\ne&quot;, true);
defineSymbol(math, rel, &quot;\u2260&quot;, &quot;\\neq&quot;);
defineSymbol(math, rel, &quot;\u2A75&quot;, &quot;\\eqeq&quot;, true);
defineSymbol(math, rel, &quot;\u2A76&quot;, &quot;\\eqeqeq&quot;, true);
defineSymbol(math, rel, &quot;\u2237&quot;, &quot;\\dblcolon&quot;, true);
defineSymbol(math, rel, &quot;\u2254&quot;, &quot;\\coloneqq&quot;, true);
defineSymbol(math, rel, &quot;\u2255&quot;, &quot;\\eqqcolon&quot;, true);
defineSymbol(math, rel, &quot;\u2239&quot;, &quot;\\eqcolon&quot;, true);
defineSymbol(math, rel, &quot;\u2A74&quot;, &quot;\\Coloneqq&quot;, true);
defineSymbol(math, punct, &quot;.&quot;, &quot;\\ldotp&quot;);
defineSymbol(math, punct, &quot;\xB7&quot;, &quot;\\cdotp&quot;);
defineSymbol(math, textord, &quot;#&quot;, &quot;\\#&quot;);
defineSymbol(text, textord, &quot;#&quot;, &quot;\\#&quot;);
defineSymbol(math, textord, &quot;&amp;&quot;, &quot;\\&amp;&quot;);
defineSymbol(text, textord, &quot;&amp;&quot;, &quot;\\&amp;&quot;);
defineSymbol(math, textord, &quot;\u2135&quot;, &quot;\\aleph&quot;, true);
defineSymbol(math, textord, &quot;\u2200&quot;, &quot;\\forall&quot;, true);
defineSymbol(math, textord, &quot;\u210F&quot;, &quot;\\hbar&quot;, true);
defineSymbol(math, textord, &quot;\u2203&quot;, &quot;\\exists&quot;, true);
defineSymbol(math, bin, &quot;\u2207&quot;, &quot;\\nabla&quot;, true);
defineSymbol(math, textord, &quot;\u266D&quot;, &quot;\\flat&quot;, true);
defineSymbol(math, textord, &quot;\u2113&quot;, &quot;\\ell&quot;, true);
defineSymbol(math, textord, &quot;\u266E&quot;, &quot;\\natural&quot;, true);
defineSymbol(math, textord, &quot;\u212B&quot;, &quot;\\Angstrom&quot;, true);
defineSymbol(text, textord, &quot;\u212B&quot;, &quot;\\Angstrom&quot;, true);
defineSymbol(math, textord, &quot;\u2663&quot;, &quot;\\clubsuit&quot;, true);
defineSymbol(math, textord, &quot;\u2667&quot;, &quot;\\varclubsuit&quot;, true);
defineSymbol(math, textord, &quot;\u2118&quot;, &quot;\\wp&quot;, true);
defineSymbol(math, textord, &quot;\u266F&quot;, &quot;\\sharp&quot;, true);
defineSymbol(math, textord, &quot;\u2662&quot;, &quot;\\diamondsuit&quot;, true);
defineSymbol(math, textord, &quot;\u2666&quot;, &quot;\\vardiamondsuit&quot;, true);
defineSymbol(math, textord, &quot;\u211C&quot;, &quot;\\Re&quot;, true);
defineSymbol(math, textord, &quot;\u2661&quot;, &quot;\\heartsuit&quot;, true);
defineSymbol(math, textord, &quot;\u2665&quot;, &quot;\\varheartsuit&quot;, true);
defineSymbol(math, textord, &quot;\u2111&quot;, &quot;\\Im&quot;, true);
defineSymbol(math, textord, &quot;\u2660&quot;, &quot;\\spadesuit&quot;, true);
defineSymbol(math, textord, &quot;\u2664&quot;, &quot;\\varspadesuit&quot;, true);
defineSymbol(math, textord, &quot;\u2640&quot;, &quot;\\female&quot;, true);
defineSymbol(math, textord, &quot;\u2642&quot;, &quot;\\male&quot;, true);
defineSymbol(math, textord, &quot;\xA7&quot;, &quot;\\S&quot;, true);
defineSymbol(text, textord, &quot;\xA7&quot;, &quot;\\S&quot;);
defineSymbol(math, textord, &quot;\xB6&quot;, &quot;\\P&quot;, true);
defineSymbol(text, textord, &quot;\xB6&quot;, &quot;\\P&quot;);
defineSymbol(text, textord, &quot;\u263A&quot;, &quot;\\smiley&quot;, true);
defineSymbol(math, textord, &quot;\u263A&quot;, &quot;\\smiley&quot;, true);
defineSymbol(math, textord, &quot;\u2020&quot;, &quot;\\dag&quot;);
defineSymbol(text, textord, &quot;\u2020&quot;, &quot;\\dag&quot;);
defineSymbol(text, textord, &quot;\u2020&quot;, &quot;\\textdagger&quot;);
defineSymbol(math, textord, &quot;\u2021&quot;, &quot;\\ddag&quot;);
defineSymbol(text, textord, &quot;\u2021&quot;, &quot;\\ddag&quot;);
defineSymbol(text, textord, &quot;\u2021&quot;, &quot;\\textdaggerdbl&quot;);
defineSymbol(math, close, &quot;\u23B1&quot;, &quot;\\rmoustache&quot;, true);
defineSymbol(math, open, &quot;\u23B0&quot;, &quot;\\lmoustache&quot;, true);
defineSymbol(math, close, &quot;\u27EF&quot;, &quot;\\rgroup&quot;, true);
defineSymbol(math, open, &quot;\u27EE&quot;, &quot;\\lgroup&quot;, true);
defineSymbol(math, bin, &quot;\u2213&quot;, &quot;\\mp&quot;, true);
defineSymbol(math, bin, &quot;\u2296&quot;, &quot;\\ominus&quot;, true);
defineSymbol(math, bin, &quot;\u228E&quot;, &quot;\\uplus&quot;, true);
defineSymbol(math, bin, &quot;\u2293&quot;, &quot;\\sqcap&quot;, true);
defineSymbol(math, bin, &quot;\u2217&quot;, &quot;\\ast&quot;);
defineSymbol(math, bin, &quot;\u2294&quot;, &quot;\\sqcup&quot;, true);
defineSymbol(math, bin, &quot;\u25EF&quot;, &quot;\\bigcirc&quot;, true);
defineSymbol(math, bin, &quot;\u2219&quot;, &quot;\\bullet&quot;, true);
defineSymbol(math, bin, &quot;\u2021&quot;, &quot;\\ddagger&quot;);
defineSymbol(math, bin, &quot;\u2240&quot;, &quot;\\wr&quot;, true);
defineSymbol(math, bin, &quot;\u2A3F&quot;, &quot;\\amalg&quot;);
defineSymbol(math, bin, &quot;&amp;&quot;, &quot;\\And&quot;);
defineSymbol(math, bin, &quot;\u2AFD&quot;, &quot;\\sslash&quot;, true);
defineSymbol(math, rel, &quot;\u27F5&quot;, &quot;\\longleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21D0&quot;, &quot;\\Leftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u27F8&quot;, &quot;\\Longleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u27F6&quot;, &quot;\\longrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21D2&quot;, &quot;\\Rightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u27F9&quot;, &quot;\\Longrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u2194&quot;, &quot;\\leftrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u27F7&quot;, &quot;\\longleftrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21D4&quot;, &quot;\\Leftrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u27FA&quot;, &quot;\\Longleftrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21A4&quot;, &quot;\\mapsfrom&quot;, true);
defineSymbol(math, rel, &quot;\u21A6&quot;, &quot;\\mapsto&quot;, true);
defineSymbol(math, rel, &quot;\u27FC&quot;, &quot;\\longmapsto&quot;, true);
defineSymbol(math, rel, &quot;\u2197&quot;, &quot;\\nearrow&quot;, true);
defineSymbol(math, rel, &quot;\u21A9&quot;, &quot;\\hookleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21AA&quot;, &quot;\\hookrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u2198&quot;, &quot;\\searrow&quot;, true);
defineSymbol(math, rel, &quot;\u21BC&quot;, &quot;\\leftharpoonup&quot;, true);
defineSymbol(math, rel, &quot;\u21C0&quot;, &quot;\\rightharpoonup&quot;, true);
defineSymbol(math, rel, &quot;\u2199&quot;, &quot;\\swarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21BD&quot;, &quot;\\leftharpoondown&quot;, true);
defineSymbol(math, rel, &quot;\u21C1&quot;, &quot;\\rightharpoondown&quot;, true);
defineSymbol(math, rel, &quot;\u2196&quot;, &quot;\\nwarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21CC&quot;, &quot;\\rightleftharpoons&quot;, true);
defineSymbol(math, mathord, &quot;\u21AF&quot;, &quot;\\lightning&quot;, true);
defineSymbol(math, mathord, &quot;\u220E&quot;, &quot;\\QED&quot;, true);
defineSymbol(math, mathord, &quot;\u2030&quot;, &quot;\\permil&quot;, true);
defineSymbol(text, textord, &quot;\u2030&quot;, &quot;\\permil&quot;);
defineSymbol(math, mathord, &quot;\u2609&quot;, &quot;\\astrosun&quot;, true);
defineSymbol(math, mathord, &quot;\u263C&quot;, &quot;\\sun&quot;, true);
defineSymbol(math, mathord, &quot;\u263E&quot;, &quot;\\leftmoon&quot;, true);
defineSymbol(math, mathord, &quot;\u263D&quot;, &quot;\\rightmoon&quot;, true);
defineSymbol(math, mathord, &quot;\u2295&quot;, &quot;\\Earth&quot;);
defineSymbol(math, rel, &quot;\u226E&quot;, &quot;\\nless&quot;, true);
defineSymbol(math, rel, &quot;\u2A87&quot;, &quot;\\lneq&quot;, true);
defineSymbol(math, rel, &quot;\u2268&quot;, &quot;\\lneqq&quot;, true);
defineSymbol(math, rel, &quot;\u2268\uFE00&quot;, &quot;\\lvertneqq&quot;);
defineSymbol(math, rel, &quot;\u22E6&quot;, &quot;\\lnsim&quot;, true);
defineSymbol(math, rel, &quot;\u2A89&quot;, &quot;\\lnapprox&quot;, true);
defineSymbol(math, rel, &quot;\u2280&quot;, &quot;\\nprec&quot;, true);
defineSymbol(math, rel, &quot;\u22E0&quot;, &quot;\\npreceq&quot;, true);
defineSymbol(math, rel, &quot;\u22E8&quot;, &quot;\\precnsim&quot;, true);
defineSymbol(math, rel, &quot;\u2AB9&quot;, &quot;\\precnapprox&quot;, true);
defineSymbol(math, rel, &quot;\u2241&quot;, &quot;\\nsim&quot;, true);
defineSymbol(math, rel, &quot;\u2224&quot;, &quot;\\nmid&quot;, true);
defineSymbol(math, rel, &quot;\u2224&quot;, &quot;\\nshortmid&quot;);
defineSymbol(math, rel, &quot;\u22AC&quot;, &quot;\\nvdash&quot;, true);
defineSymbol(math, rel, &quot;\u22AD&quot;, &quot;\\nvDash&quot;, true);
defineSymbol(math, rel, &quot;\u22EA&quot;, &quot;\\ntriangleleft&quot;);
defineSymbol(math, rel, &quot;\u22EC&quot;, &quot;\\ntrianglelefteq&quot;, true);
defineSymbol(math, rel, &quot;\u2284&quot;, &quot;\\nsubset&quot;, true);
defineSymbol(math, rel, &quot;\u2285&quot;, &quot;\\nsupset&quot;, true);
defineSymbol(math, rel, &quot;\u228A&quot;, &quot;\\subsetneq&quot;, true);
defineSymbol(math, rel, &quot;\u228A\uFE00&quot;, &quot;\\varsubsetneq&quot;);
defineSymbol(math, rel, &quot;\u2ACB&quot;, &quot;\\subsetneqq&quot;, true);
defineSymbol(math, rel, &quot;\u2ACB\uFE00&quot;, &quot;\\varsubsetneqq&quot;);
defineSymbol(math, rel, &quot;\u226F&quot;, &quot;\\ngtr&quot;, true);
defineSymbol(math, rel, &quot;\u2A88&quot;, &quot;\\gneq&quot;, true);
defineSymbol(math, rel, &quot;\u2269&quot;, &quot;\\gneqq&quot;, true);
defineSymbol(math, rel, &quot;\u2269\uFE00&quot;, &quot;\\gvertneqq&quot;);
defineSymbol(math, rel, &quot;\u22E7&quot;, &quot;\\gnsim&quot;, true);
defineSymbol(math, rel, &quot;\u2A8A&quot;, &quot;\\gnapprox&quot;, true);
defineSymbol(math, rel, &quot;\u2281&quot;, &quot;\\nsucc&quot;, true);
defineSymbol(math, rel, &quot;\u22E1&quot;, &quot;\\nsucceq&quot;, true);
defineSymbol(math, rel, &quot;\u22E9&quot;, &quot;\\succnsim&quot;, true);
defineSymbol(math, rel, &quot;\u2ABA&quot;, &quot;\\succnapprox&quot;, true);
defineSymbol(math, rel, &quot;\u2246&quot;, &quot;\\ncong&quot;, true);
defineSymbol(math, rel, &quot;\u2226&quot;, &quot;\\nparallel&quot;, true);
defineSymbol(math, rel, &quot;\u2226&quot;, &quot;\\nshortparallel&quot;);
defineSymbol(math, rel, &quot;\u22AF&quot;, &quot;\\nVDash&quot;, true);
defineSymbol(math, rel, &quot;\u22EB&quot;, &quot;\\ntriangleright&quot;);
defineSymbol(math, rel, &quot;\u22ED&quot;, &quot;\\ntrianglerighteq&quot;, true);
defineSymbol(math, rel, &quot;\u228B&quot;, &quot;\\supsetneq&quot;, true);
defineSymbol(math, rel, &quot;\u228B&quot;, &quot;\\varsupsetneq&quot;);
defineSymbol(math, rel, &quot;\u2ACC&quot;, &quot;\\supsetneqq&quot;, true);
defineSymbol(math, rel, &quot;\u2ACC\uFE00&quot;, &quot;\\varsupsetneqq&quot;);
defineSymbol(math, rel, &quot;\u22AE&quot;, &quot;\\nVdash&quot;, true);
defineSymbol(math, rel, &quot;\u2AB5&quot;, &quot;\\precneqq&quot;, true);
defineSymbol(math, rel, &quot;\u2AB6&quot;, &quot;\\succneqq&quot;, true);
defineSymbol(math, bin, &quot;\u22B4&quot;, &quot;\\unlhd&quot;);
defineSymbol(math, bin, &quot;\u22B5&quot;, &quot;\\unrhd&quot;);
defineSymbol(math, rel, &quot;\u219A&quot;, &quot;\\nleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u219B&quot;, &quot;\\nrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21CD&quot;, &quot;\\nLeftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21CF&quot;, &quot;\\nRightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21AE&quot;, &quot;\\nleftrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21CE&quot;, &quot;\\nLeftrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u25B3&quot;, &quot;\\vartriangle&quot;);
defineSymbol(math, textord, &quot;\u210F&quot;, &quot;\\hslash&quot;);
defineSymbol(math, textord, &quot;\u25BD&quot;, &quot;\\triangledown&quot;);
defineSymbol(math, textord, &quot;\u25CA&quot;, &quot;\\lozenge&quot;);
defineSymbol(math, textord, &quot;\u24C8&quot;, &quot;\\circledS&quot;);
defineSymbol(math, textord, &quot;\xAE&quot;, &quot;\\circledR&quot;, true);
defineSymbol(text, textord, &quot;\xAE&quot;, &quot;\\circledR&quot;);
defineSymbol(text, textord, &quot;\xAE&quot;, &quot;\\textregistered&quot;);
defineSymbol(math, textord, &quot;\u2221&quot;, &quot;\\measuredangle&quot;, true);
defineSymbol(math, textord, &quot;\u2204&quot;, &quot;\\nexists&quot;);
defineSymbol(math, textord, &quot;\u2127&quot;, &quot;\\mho&quot;);
defineSymbol(math, textord, &quot;\u2132&quot;, &quot;\\Finv&quot;, true);
defineSymbol(math, textord, &quot;\u2141&quot;, &quot;\\Game&quot;, true);
defineSymbol(math, textord, &quot;\u2035&quot;, &quot;\\backprime&quot;);
defineSymbol(math, textord, &quot;\u2036&quot;, &quot;\\backdprime&quot;);
defineSymbol(math, textord, &quot;\u2037&quot;, &quot;\\backtrprime&quot;);
defineSymbol(math, textord, &quot;\u25B2&quot;, &quot;\\blacktriangle&quot;);
defineSymbol(math, textord, &quot;\u25BC&quot;, &quot;\\blacktriangledown&quot;);
defineSymbol(math, textord, &quot;\u25A0&quot;, &quot;\\blacksquare&quot;);
defineSymbol(math, textord, &quot;\u29EB&quot;, &quot;\\blacklozenge&quot;);
defineSymbol(math, textord, &quot;\u2605&quot;, &quot;\\bigstar&quot;);
defineSymbol(math, textord, &quot;\u2222&quot;, &quot;\\sphericalangle&quot;, true);
defineSymbol(math, textord, &quot;\u2201&quot;, &quot;\\complement&quot;, true);
defineSymbol(math, textord, &quot;\xF0&quot;, &quot;\\eth&quot;, true);
defineSymbol(text, textord, &quot;\xF0&quot;, &quot;\xF0&quot;);
defineSymbol(math, textord, &quot;\u2571&quot;, &quot;\\diagup&quot;);
defineSymbol(math, textord, &quot;\u2572&quot;, &quot;\\diagdown&quot;);
defineSymbol(math, textord, &quot;\u25A1&quot;, &quot;\\square&quot;);
defineSymbol(math, textord, &quot;\u25A1&quot;, &quot;\\Box&quot;);
defineSymbol(math, textord, &quot;\u25CA&quot;, &quot;\\Diamond&quot;);
defineSymbol(math, textord, &quot;\xA5&quot;, &quot;\\yen&quot;, true);
defineSymbol(text, textord, &quot;\xA5&quot;, &quot;\\yen&quot;, true);
defineSymbol(math, textord, &quot;\u2713&quot;, &quot;\\checkmark&quot;, true);
defineSymbol(text, textord, &quot;\u2713&quot;, &quot;\\checkmark&quot;);
defineSymbol(math, textord, &quot;\u2717&quot;, &quot;\\ballotx&quot;, true);
defineSymbol(text, textord, &quot;\u2717&quot;, &quot;\\ballotx&quot;);
defineSymbol(text, textord, &quot;\u2022&quot;, &quot;\\textbullet&quot;);
defineSymbol(math, textord, &quot;\u2136&quot;, &quot;\\beth&quot;, true);
defineSymbol(math, textord, &quot;\u2138&quot;, &quot;\\daleth&quot;, true);
defineSymbol(math, textord, &quot;\u2137&quot;, &quot;\\gimel&quot;, true);
defineSymbol(math, textord, &quot;\u03DD&quot;, &quot;\\digamma&quot;, true);
defineSymbol(math, textord, &quot;\u03F0&quot;, &quot;\\varkappa&quot;);
defineSymbol(math, open, &quot;\u231C&quot;, &quot;\\ulcorner&quot;, true);
defineSymbol(math, close, &quot;\u231D&quot;, &quot;\\urcorner&quot;, true);
defineSymbol(math, open, &quot;\u231E&quot;, &quot;\\llcorner&quot;, true);
defineSymbol(math, close, &quot;\u231F&quot;, &quot;\\lrcorner&quot;, true);
defineSymbol(math, rel, &quot;\u2266&quot;, &quot;\\leqq&quot;, true);
defineSymbol(math, rel, &quot;\u2A7D&quot;, &quot;\\leqslant&quot;, true);
defineSymbol(math, rel, &quot;\u2A95&quot;, &quot;\\eqslantless&quot;, true);
defineSymbol(math, rel, &quot;\u2272&quot;, &quot;\\lesssim&quot;, true);
defineSymbol(math, rel, &quot;\u2A85&quot;, &quot;\\lessapprox&quot;, true);
defineSymbol(math, rel, &quot;\u224A&quot;, &quot;\\approxeq&quot;, true);
defineSymbol(math, bin, &quot;\u22D6&quot;, &quot;\\lessdot&quot;);
defineSymbol(math, rel, &quot;\u22D8&quot;, &quot;\\lll&quot;, true);
defineSymbol(math, rel, &quot;\u2276&quot;, &quot;\\lessgtr&quot;, true);
defineSymbol(math, rel, &quot;\u22DA&quot;, &quot;\\lesseqgtr&quot;, true);
defineSymbol(math, rel, &quot;\u2A8B&quot;, &quot;\\lesseqqgtr&quot;, true);
defineSymbol(math, rel, &quot;\u2251&quot;, &quot;\\doteqdot&quot;);
defineSymbol(math, rel, &quot;\u2253&quot;, &quot;\\risingdotseq&quot;, true);
defineSymbol(math, rel, &quot;\u2252&quot;, &quot;\\fallingdotseq&quot;, true);
defineSymbol(math, rel, &quot;\u223D&quot;, &quot;\\backsim&quot;, true);
defineSymbol(math, rel, &quot;\u22CD&quot;, &quot;\\backsimeq&quot;, true);
defineSymbol(math, rel, &quot;\u2AC5&quot;, &quot;\\subseteqq&quot;, true);
defineSymbol(math, rel, &quot;\u22D0&quot;, &quot;\\Subset&quot;, true);
defineSymbol(math, rel, &quot;\u228F&quot;, &quot;\\sqsubset&quot;, true);
defineSymbol(math, rel, &quot;\u227C&quot;, &quot;\\preccurlyeq&quot;, true);
defineSymbol(math, rel, &quot;\u22DE&quot;, &quot;\\curlyeqprec&quot;, true);
defineSymbol(math, rel, &quot;\u227E&quot;, &quot;\\precsim&quot;, true);
defineSymbol(math, rel, &quot;\u2AB7&quot;, &quot;\\precapprox&quot;, true);
defineSymbol(math, rel, &quot;\u22B2&quot;, &quot;\\vartriangleleft&quot;);
defineSymbol(math, rel, &quot;\u22B4&quot;, &quot;\\trianglelefteq&quot;);
defineSymbol(math, rel, &quot;\u22A8&quot;, &quot;\\vDash&quot;, true);
defineSymbol(math, rel, &quot;\u22AB&quot;, &quot;\\VDash&quot;, true);
defineSymbol(math, rel, &quot;\u22AA&quot;, &quot;\\Vvdash&quot;, true);
defineSymbol(math, rel, &quot;\u2323&quot;, &quot;\\smallsmile&quot;);
defineSymbol(math, rel, &quot;\u2322&quot;, &quot;\\smallfrown&quot;);
defineSymbol(math, rel, &quot;\u224F&quot;, &quot;\\bumpeq&quot;, true);
defineSymbol(math, rel, &quot;\u224E&quot;, &quot;\\Bumpeq&quot;, true);
defineSymbol(math, rel, &quot;\u2267&quot;, &quot;\\geqq&quot;, true);
defineSymbol(math, rel, &quot;\u2A7E&quot;, &quot;\\geqslant&quot;, true);
defineSymbol(math, rel, &quot;\u2A96&quot;, &quot;\\eqslantgtr&quot;, true);
defineSymbol(math, rel, &quot;\u2273&quot;, &quot;\\gtrsim&quot;, true);
defineSymbol(math, rel, &quot;\u2A86&quot;, &quot;\\gtrapprox&quot;, true);
defineSymbol(math, bin, &quot;\u22D7&quot;, &quot;\\gtrdot&quot;);
defineSymbol(math, rel, &quot;\u22D9&quot;, &quot;\\ggg&quot;, true);
defineSymbol(math, rel, &quot;\u2277&quot;, &quot;\\gtrless&quot;, true);
defineSymbol(math, rel, &quot;\u22DB&quot;, &quot;\\gtreqless&quot;, true);
defineSymbol(math, rel, &quot;\u2A8C&quot;, &quot;\\gtreqqless&quot;, true);
defineSymbol(math, rel, &quot;\u2256&quot;, &quot;\\eqcirc&quot;, true);
defineSymbol(math, rel, &quot;\u2257&quot;, &quot;\\circeq&quot;, true);
defineSymbol(math, rel, &quot;\u225C&quot;, &quot;\\triangleq&quot;, true);
defineSymbol(math, rel, &quot;\u223C&quot;, &quot;\\thicksim&quot;);
defineSymbol(math, rel, &quot;\u2248&quot;, &quot;\\thickapprox&quot;);
defineSymbol(math, rel, &quot;\u2AC6&quot;, &quot;\\supseteqq&quot;, true);
defineSymbol(math, rel, &quot;\u22D1&quot;, &quot;\\Supset&quot;, true);
defineSymbol(math, rel, &quot;\u2290&quot;, &quot;\\sqsupset&quot;, true);
defineSymbol(math, rel, &quot;\u227D&quot;, &quot;\\succcurlyeq&quot;, true);
defineSymbol(math, rel, &quot;\u22DF&quot;, &quot;\\curlyeqsucc&quot;, true);
defineSymbol(math, rel, &quot;\u227F&quot;, &quot;\\succsim&quot;, true);
defineSymbol(math, rel, &quot;\u2AB8&quot;, &quot;\\succapprox&quot;, true);
defineSymbol(math, rel, &quot;\u22B3&quot;, &quot;\\vartriangleright&quot;);
defineSymbol(math, rel, &quot;\u22B5&quot;, &quot;\\trianglerighteq&quot;);
defineSymbol(math, rel, &quot;\u22A9&quot;, &quot;\\Vdash&quot;, true);
defineSymbol(math, rel, &quot;\u2223&quot;, &quot;\\shortmid&quot;);
defineSymbol(math, rel, &quot;\u2225&quot;, &quot;\\shortparallel&quot;);
defineSymbol(math, rel, &quot;\u226C&quot;, &quot;\\between&quot;, true);
defineSymbol(math, rel, &quot;\u22D4&quot;, &quot;\\pitchfork&quot;, true);
defineSymbol(math, rel, &quot;\u221D&quot;, &quot;\\varpropto&quot;);
defineSymbol(math, rel, &quot;\u25C0&quot;, &quot;\\blacktriangleleft&quot;);
defineSymbol(math, rel, &quot;\u2234&quot;, &quot;\\therefore&quot;, true);
defineSymbol(math, rel, &quot;\u220D&quot;, &quot;\\backepsilon&quot;);
defineSymbol(math, rel, &quot;\u25B6&quot;, &quot;\\blacktriangleright&quot;);
defineSymbol(math, rel, &quot;\u2235&quot;, &quot;\\because&quot;, true);
defineSymbol(math, rel, &quot;\u22D8&quot;, &quot;\\llless&quot;);
defineSymbol(math, rel, &quot;\u22D9&quot;, &quot;\\gggtr&quot;);
defineSymbol(math, bin, &quot;\u22B2&quot;, &quot;\\lhd&quot;);
defineSymbol(math, bin, &quot;\u22B3&quot;, &quot;\\rhd&quot;);
defineSymbol(math, rel, &quot;\u2242&quot;, &quot;\\eqsim&quot;, true);
defineSymbol(math, rel, &quot;\u2251&quot;, &quot;\\Doteq&quot;, true);
defineSymbol(math, rel, &quot;\u297D&quot;, &quot;\\strictif&quot;, true);
defineSymbol(math, rel, &quot;\u297C&quot;, &quot;\\strictfi&quot;, true);
defineSymbol(math, bin, &quot;\u2214&quot;, &quot;\\dotplus&quot;, true);
defineSymbol(math, bin, &quot;\u2216&quot;, &quot;\\smallsetminus&quot;);
defineSymbol(math, bin, &quot;\u22D2&quot;, &quot;\\Cap&quot;, true);
defineSymbol(math, bin, &quot;\u22D3&quot;, &quot;\\Cup&quot;, true);
defineSymbol(math, bin, &quot;\u2A5E&quot;, &quot;\\doublebarwedge&quot;, true);
defineSymbol(math, bin, &quot;\u229F&quot;, &quot;\\boxminus&quot;, true);
defineSymbol(math, bin, &quot;\u229E&quot;, &quot;\\boxplus&quot;, true);
defineSymbol(math, bin, &quot;\u29C4&quot;, &quot;\\boxslash&quot;, true);
defineSymbol(math, bin, &quot;\u22C7&quot;, &quot;\\divideontimes&quot;, true);
defineSymbol(math, bin, &quot;\u22C9&quot;, &quot;\\ltimes&quot;, true);
defineSymbol(math, bin, &quot;\u22CA&quot;, &quot;\\rtimes&quot;, true);
defineSymbol(math, bin, &quot;\u22CB&quot;, &quot;\\leftthreetimes&quot;, true);
defineSymbol(math, bin, &quot;\u22CC&quot;, &quot;\\rightthreetimes&quot;, true);
defineSymbol(math, bin, &quot;\u22CF&quot;, &quot;\\curlywedge&quot;, true);
defineSymbol(math, bin, &quot;\u22CE&quot;, &quot;\\curlyvee&quot;, true);
defineSymbol(math, bin, &quot;\u229D&quot;, &quot;\\circleddash&quot;, true);
defineSymbol(math, bin, &quot;\u229B&quot;, &quot;\\circledast&quot;, true);
defineSymbol(math, bin, &quot;\u22BA&quot;, &quot;\\intercal&quot;, true);
defineSymbol(math, bin, &quot;\u22D2&quot;, &quot;\\doublecap&quot;);
defineSymbol(math, bin, &quot;\u22D3&quot;, &quot;\\doublecup&quot;);
defineSymbol(math, bin, &quot;\u22A0&quot;, &quot;\\boxtimes&quot;, true);
defineSymbol(math, bin, &quot;\u22C8&quot;, &quot;\\bowtie&quot;, true);
defineSymbol(math, bin, &quot;\u22C8&quot;, &quot;\\Join&quot;);
defineSymbol(math, bin, &quot;\u27D5&quot;, &quot;\\leftouterjoin&quot;, true);
defineSymbol(math, bin, &quot;\u27D6&quot;, &quot;\\rightouterjoin&quot;, true);
defineSymbol(math, bin, &quot;\u27D7&quot;, &quot;\\fullouterjoin&quot;, true);
defineSymbol(math, bin, &quot;\u2238&quot;, &quot;\\dotminus&quot;, true);
defineSymbol(math, bin, &quot;\u27D1&quot;, &quot;\\wedgedot&quot;, true);
defineSymbol(math, bin, &quot;\u27C7&quot;, &quot;\\veedot&quot;, true);
defineSymbol(math, bin, &quot;\u2A62&quot;, &quot;\\doublebarvee&quot;, true);
defineSymbol(math, bin, &quot;\u2A63&quot;, &quot;\\veedoublebar&quot;, true);
defineSymbol(math, bin, &quot;\u2A5F&quot;, &quot;\\wedgebar&quot;, true);
defineSymbol(math, bin, &quot;\u2A60&quot;, &quot;\\wedgedoublebar&quot;, true);
defineSymbol(math, bin, &quot;\u2A54&quot;, &quot;\\Vee&quot;, true);
defineSymbol(math, bin, &quot;\u2A53&quot;, &quot;\\Wedge&quot;, true);
defineSymbol(math, bin, &quot;\u2A43&quot;, &quot;\\barcap&quot;, true);
defineSymbol(math, bin, &quot;\u2A42&quot;, &quot;\\barcup&quot;, true);
defineSymbol(math, bin, &quot;\u2A48&quot;, &quot;\\capbarcup&quot;, true);
defineSymbol(math, bin, &quot;\u2A40&quot;, &quot;\\capdot&quot;, true);
defineSymbol(math, bin, &quot;\u2A47&quot;, &quot;\\capovercup&quot;, true);
defineSymbol(math, bin, &quot;\u2A46&quot;, &quot;\\cupovercap&quot;, true);
defineSymbol(math, bin, &quot;\u2A4D&quot;, &quot;\\closedvarcap&quot;, true);
defineSymbol(math, bin, &quot;\u2A4C&quot;, &quot;\\closedvarcup&quot;, true);
defineSymbol(math, bin, &quot;\u2A2A&quot;, &quot;\\minusdot&quot;, true);
defineSymbol(math, bin, &quot;\u2A2B&quot;, &quot;\\minusfdots&quot;, true);
defineSymbol(math, bin, &quot;\u2A2C&quot;, &quot;\\minusrdots&quot;, true);
defineSymbol(math, bin, &quot;\u22BB&quot;, &quot;\\Xor&quot;, true);
defineSymbol(math, bin, &quot;\u22BC&quot;, &quot;\\Nand&quot;, true);
defineSymbol(math, bin, &quot;\u22BD&quot;, &quot;\\Nor&quot;, true);
defineSymbol(math, bin, &quot;\u22BD&quot;, &quot;\\barvee&quot;);
defineSymbol(math, bin, &quot;\u2AF4&quot;, &quot;\\interleave&quot;, true);
defineSymbol(math, bin, &quot;\u29E2&quot;, &quot;\\shuffle&quot;, true);
defineSymbol(math, bin, &quot;\u2AF6&quot;, &quot;\\threedotcolon&quot;, true);
defineSymbol(math, bin, &quot;\u2982&quot;, &quot;\\typecolon&quot;, true);
defineSymbol(math, bin, &quot;\u223E&quot;, &quot;\\invlazys&quot;, true);
defineSymbol(math, bin, &quot;\u2A4B&quot;, &quot;\\twocaps&quot;, true);
defineSymbol(math, bin, &quot;\u2A4A&quot;, &quot;\\twocups&quot;, true);
defineSymbol(math, bin, &quot;\u2A4E&quot;, &quot;\\Sqcap&quot;, true);
defineSymbol(math, bin, &quot;\u2A4F&quot;, &quot;\\Sqcup&quot;, true);
defineSymbol(math, bin, &quot;\u2A56&quot;, &quot;\\veeonvee&quot;, true);
defineSymbol(math, bin, &quot;\u2A55&quot;, &quot;\\wedgeonwedge&quot;, true);
defineSymbol(math, bin, &quot;\u29D7&quot;, &quot;\\blackhourglass&quot;, true);
defineSymbol(math, bin, &quot;\u29C6&quot;, &quot;\\boxast&quot;, true);
defineSymbol(math, bin, &quot;\u29C8&quot;, &quot;\\boxbox&quot;, true);
defineSymbol(math, bin, &quot;\u29C7&quot;, &quot;\\boxcircle&quot;, true);
defineSymbol(math, bin, &quot;\u229C&quot;, &quot;\\circledequal&quot;, true);
defineSymbol(math, bin, &quot;\u29B7&quot;, &quot;\\circledparallel&quot;, true);
defineSymbol(math, bin, &quot;\u29B6&quot;, &quot;\\circledvert&quot;, true);
defineSymbol(math, bin, &quot;\u29B5&quot;, &quot;\\circlehbar&quot;, true);
defineSymbol(math, bin, &quot;\u27E1&quot;, &quot;\\concavediamond&quot;, true);
defineSymbol(math, bin, &quot;\u27E2&quot;, &quot;\\concavediamondtickleft&quot;, true);
defineSymbol(math, bin, &quot;\u27E3&quot;, &quot;\\concavediamondtickright&quot;, true);
defineSymbol(math, bin, &quot;\u22C4&quot;, &quot;\\diamond&quot;, true);
defineSymbol(math, bin, &quot;\u29D6&quot;, &quot;\\hourglass&quot;, true);
defineSymbol(math, bin, &quot;\u27E0&quot;, &quot;\\lozengeminus&quot;, true);
defineSymbol(math, bin, &quot;\u233D&quot;, &quot;\\obar&quot;, true);
defineSymbol(math, bin, &quot;\u29B8&quot;, &quot;\\obslash&quot;, true);
defineSymbol(math, bin, &quot;\u2A38&quot;, &quot;\\odiv&quot;, true);
defineSymbol(math, bin, &quot;\u29C1&quot;, &quot;\\ogreaterthan&quot;, true);
defineSymbol(math, bin, &quot;\u29C0&quot;, &quot;\\olessthan&quot;, true);
defineSymbol(math, bin, &quot;\u29B9&quot;, &quot;\\operp&quot;, true);
defineSymbol(math, bin, &quot;\u2A37&quot;, &quot;\\Otimes&quot;, true);
defineSymbol(math, bin, &quot;\u2A36&quot;, &quot;\\otimeshat&quot;, true);
defineSymbol(math, bin, &quot;\u22C6&quot;, &quot;\\star&quot;, true);
defineSymbol(math, bin, &quot;\u25B3&quot;, &quot;\\triangle&quot;, true);
defineSymbol(math, bin, &quot;\u2A3A&quot;, &quot;\\triangleminus&quot;, true);
defineSymbol(math, bin, &quot;\u2A39&quot;, &quot;\\triangleplus&quot;, true);
defineSymbol(math, bin, &quot;\u2A3B&quot;, &quot;\\triangletimes&quot;, true);
defineSymbol(math, bin, &quot;\u27E4&quot;, &quot;\\whitesquaretickleft&quot;, true);
defineSymbol(math, bin, &quot;\u27E5&quot;, &quot;\\whitesquaretickright&quot;, true);
defineSymbol(math, bin, &quot;\u2A33&quot;, &quot;\\smashtimes&quot;, true);
defineSymbol(math, rel, &quot;\u21E2&quot;, &quot;\\dashrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21E0&quot;, &quot;\\dashleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21C7&quot;, &quot;\\leftleftarrows&quot;, true);
defineSymbol(math, rel, &quot;\u21C6&quot;, &quot;\\leftrightarrows&quot;, true);
defineSymbol(math, rel, &quot;\u21DA&quot;, &quot;\\Lleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u219E&quot;, &quot;\\twoheadleftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21A2&quot;, &quot;\\leftarrowtail&quot;, true);
defineSymbol(math, rel, &quot;\u21AB&quot;, &quot;\\looparrowleft&quot;, true);
defineSymbol(math, rel, &quot;\u21CB&quot;, &quot;\\leftrightharpoons&quot;, true);
defineSymbol(math, rel, &quot;\u21B6&quot;, &quot;\\curvearrowleft&quot;, true);
defineSymbol(math, rel, &quot;\u21BA&quot;, &quot;\\circlearrowleft&quot;, true);
defineSymbol(math, rel, &quot;\u21B0&quot;, &quot;\\Lsh&quot;, true);
defineSymbol(math, rel, &quot;\u21C8&quot;, &quot;\\upuparrows&quot;, true);
defineSymbol(math, rel, &quot;\u21BF&quot;, &quot;\\upharpoonleft&quot;, true);
defineSymbol(math, rel, &quot;\u21C3&quot;, &quot;\\downharpoonleft&quot;, true);
defineSymbol(math, rel, &quot;\u22B6&quot;, &quot;\\origof&quot;, true);
defineSymbol(math, rel, &quot;\u22B7&quot;, &quot;\\imageof&quot;, true);
defineSymbol(math, rel, &quot;\u22B8&quot;, &quot;\\multimap&quot;, true);
defineSymbol(math, rel, &quot;\u21AD&quot;, &quot;\\leftrightsquigarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21C9&quot;, &quot;\\rightrightarrows&quot;, true);
defineSymbol(math, rel, &quot;\u21C4&quot;, &quot;\\rightleftarrows&quot;, true);
defineSymbol(math, rel, &quot;\u21A0&quot;, &quot;\\twoheadrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21A3&quot;, &quot;\\rightarrowtail&quot;, true);
defineSymbol(math, rel, &quot;\u21AC&quot;, &quot;\\looparrowright&quot;, true);
defineSymbol(math, rel, &quot;\u21B7&quot;, &quot;\\curvearrowright&quot;, true);
defineSymbol(math, rel, &quot;\u21BB&quot;, &quot;\\circlearrowright&quot;, true);
defineSymbol(math, rel, &quot;\u21B1&quot;, &quot;\\Rsh&quot;, true);
defineSymbol(math, rel, &quot;\u21CA&quot;, &quot;\\downdownarrows&quot;, true);
defineSymbol(math, rel, &quot;\u21BE&quot;, &quot;\\upharpoonright&quot;, true);
defineSymbol(math, rel, &quot;\u21C2&quot;, &quot;\\downharpoonright&quot;, true);
defineSymbol(math, rel, &quot;\u21DD&quot;, &quot;\\rightsquigarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21DD&quot;, &quot;\\leadsto&quot;);
defineSymbol(math, rel, &quot;\u21DB&quot;, &quot;\\Rrightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21BE&quot;, &quot;\\restriction&quot;);
defineSymbol(math, textord, &quot;\u2018&quot;, &quot;`&quot;);
defineSymbol(math, textord, &quot;$&quot;, &quot;\\$&quot;);
defineSymbol(text, textord, &quot;$&quot;, &quot;\\$&quot;);
defineSymbol(text, textord, &quot;$&quot;, &quot;\\textdollar&quot;);
defineSymbol(math, textord, &quot;\xA2&quot;, &quot;\\cent&quot;);
defineSymbol(text, textord, &quot;\xA2&quot;, &quot;\\cent&quot;);
defineSymbol(math, textord, &quot;%&quot;, &quot;\\%&quot;);
defineSymbol(text, textord, &quot;%&quot;, &quot;\\%&quot;);
defineSymbol(math, textord, &quot;_&quot;, &quot;\\_&quot;);
defineSymbol(text, textord, &quot;_&quot;, &quot;\\_&quot;);
defineSymbol(text, textord, &quot;_&quot;, &quot;\\textunderscore&quot;);
defineSymbol(text, textord, &quot;\u2423&quot;, &quot;\\textvisiblespace&quot;, true);
defineSymbol(math, textord, &quot;\u2220&quot;, &quot;\\angle&quot;, true);
defineSymbol(math, textord, &quot;\u221E&quot;, &quot;\\infty&quot;, true);
defineSymbol(math, textord, &quot;\u2032&quot;, &quot;\\prime&quot;);
defineSymbol(math, textord, &quot;\u2033&quot;, &quot;\\dprime&quot;);
defineSymbol(math, textord, &quot;\u2034&quot;, &quot;\\trprime&quot;);
defineSymbol(math, textord, &quot;\u2057&quot;, &quot;\\qprime&quot;);
defineSymbol(math, textord, &quot;\u25B3&quot;, &quot;\\triangle&quot;);
defineSymbol(text, textord, &quot;\u0391&quot;, &quot;\\Alpha&quot;, true);
defineSymbol(text, textord, &quot;\u0392&quot;, &quot;\\Beta&quot;, true);
defineSymbol(text, textord, &quot;\u0393&quot;, &quot;\\Gamma&quot;, true);
defineSymbol(text, textord, &quot;\u0394&quot;, &quot;\\Delta&quot;, true);
defineSymbol(text, textord, &quot;\u0395&quot;, &quot;\\Epsilon&quot;, true);
defineSymbol(text, textord, &quot;\u0396&quot;, &quot;\\Zeta&quot;, true);
defineSymbol(text, textord, &quot;\u0397&quot;, &quot;\\Eta&quot;, true);
defineSymbol(text, textord, &quot;\u0398&quot;, &quot;\\Theta&quot;, true);
defineSymbol(text, textord, &quot;\u0399&quot;, &quot;\\Iota&quot;, true);
defineSymbol(text, textord, &quot;\u039A&quot;, &quot;\\Kappa&quot;, true);
defineSymbol(text, textord, &quot;\u039B&quot;, &quot;\\Lambda&quot;, true);
defineSymbol(text, textord, &quot;\u039C&quot;, &quot;\\Mu&quot;, true);
defineSymbol(text, textord, &quot;\u039D&quot;, &quot;\\Nu&quot;, true);
defineSymbol(text, textord, &quot;\u039E&quot;, &quot;\\Xi&quot;, true);
defineSymbol(text, textord, &quot;\u039F&quot;, &quot;\\Omicron&quot;, true);
defineSymbol(text, textord, &quot;\u03A0&quot;, &quot;\\Pi&quot;, true);
defineSymbol(text, textord, &quot;\u03A1&quot;, &quot;\\Rho&quot;, true);
defineSymbol(text, textord, &quot;\u03A3&quot;, &quot;\\Sigma&quot;, true);
defineSymbol(text, textord, &quot;\u03A4&quot;, &quot;\\Tau&quot;, true);
defineSymbol(text, textord, &quot;\u03A5&quot;, &quot;\\Upsilon&quot;, true);
defineSymbol(text, textord, &quot;\u03A6&quot;, &quot;\\Phi&quot;, true);
defineSymbol(text, textord, &quot;\u03A7&quot;, &quot;\\Chi&quot;, true);
defineSymbol(text, textord, &quot;\u03A8&quot;, &quot;\\Psi&quot;, true);
defineSymbol(text, textord, &quot;\u03A9&quot;, &quot;\\Omega&quot;, true);
defineSymbol(math, mathord, &quot;\u0391&quot;, &quot;\\Alpha&quot;, true);
defineSymbol(math, mathord, &quot;\u0392&quot;, &quot;\\Beta&quot;, true);
defineSymbol(math, mathord, &quot;\u0393&quot;, &quot;\\Gamma&quot;, true);
defineSymbol(math, mathord, &quot;\u0394&quot;, &quot;\\Delta&quot;, true);
defineSymbol(math, mathord, &quot;\u0395&quot;, &quot;\\Epsilon&quot;, true);
defineSymbol(math, mathord, &quot;\u0396&quot;, &quot;\\Zeta&quot;, true);
defineSymbol(math, mathord, &quot;\u0397&quot;, &quot;\\Eta&quot;, true);
defineSymbol(math, mathord, &quot;\u0398&quot;, &quot;\\Theta&quot;, true);
defineSymbol(math, mathord, &quot;\u0399&quot;, &quot;\\Iota&quot;, true);
defineSymbol(math, mathord, &quot;\u039A&quot;, &quot;\\Kappa&quot;, true);
defineSymbol(math, mathord, &quot;\u039B&quot;, &quot;\\Lambda&quot;, true);
defineSymbol(math, mathord, &quot;\u039C&quot;, &quot;\\Mu&quot;, true);
defineSymbol(math, mathord, &quot;\u039D&quot;, &quot;\\Nu&quot;, true);
defineSymbol(math, mathord, &quot;\u039E&quot;, &quot;\\Xi&quot;, true);
defineSymbol(math, mathord, &quot;\u039F&quot;, &quot;\\Omicron&quot;, true);
defineSymbol(math, mathord, &quot;\u03A0&quot;, &quot;\\Pi&quot;, true);
defineSymbol(math, mathord, &quot;\u03A1&quot;, &quot;\\Rho&quot;, true);
defineSymbol(math, mathord, &quot;\u03A3&quot;, &quot;\\Sigma&quot;, true);
defineSymbol(math, mathord, &quot;\u03A4&quot;, &quot;\\Tau&quot;, true);
defineSymbol(math, mathord, &quot;\u03A5&quot;, &quot;\\Upsilon&quot;, true);
defineSymbol(math, mathord, &quot;\u03A6&quot;, &quot;\\Phi&quot;, true);
defineSymbol(math, mathord, &quot;\u03A7&quot;, &quot;\\Chi&quot;, true);
defineSymbol(math, mathord, &quot;\u03A8&quot;, &quot;\\Psi&quot;, true);
defineSymbol(math, mathord, &quot;\u03A9&quot;, &quot;\\Omega&quot;, true);
defineSymbol(math, open, &quot;\xAC&quot;, &quot;\\neg&quot;, true);
defineSymbol(math, open, &quot;\xAC&quot;, &quot;\\lnot&quot;);
defineSymbol(math, textord, &quot;\u22A4&quot;, &quot;\\top&quot;);
defineSymbol(math, textord, &quot;\u22A5&quot;, &quot;\\bot&quot;);
defineSymbol(math, textord, &quot;\u2205&quot;, &quot;\\emptyset&quot;);
defineSymbol(math, textord, &quot;\u2300&quot;, &quot;\\varnothing&quot;);
defineSymbol(math, mathord, &quot;\u03B1&quot;, &quot;\\alpha&quot;, true);
defineSymbol(math, mathord, &quot;\u03B2&quot;, &quot;\\beta&quot;, true);
defineSymbol(math, mathord, &quot;\u03B3&quot;, &quot;\\gamma&quot;, true);
defineSymbol(math, mathord, &quot;\u03B4&quot;, &quot;\\delta&quot;, true);
defineSymbol(math, mathord, &quot;\u03F5&quot;, &quot;\\epsilon&quot;, true);
defineSymbol(math, mathord, &quot;\u03B6&quot;, &quot;\\zeta&quot;, true);
defineSymbol(math, mathord, &quot;\u03B7&quot;, &quot;\\eta&quot;, true);
defineSymbol(math, mathord, &quot;\u03B8&quot;, &quot;\\theta&quot;, true);
defineSymbol(math, mathord, &quot;\u03B9&quot;, &quot;\\iota&quot;, true);
defineSymbol(math, mathord, &quot;\u03BA&quot;, &quot;\\kappa&quot;, true);
defineSymbol(math, mathord, &quot;\u03BB&quot;, &quot;\\lambda&quot;, true);
defineSymbol(math, mathord, &quot;\u03BC&quot;, &quot;\\mu&quot;, true);
defineSymbol(math, mathord, &quot;\u03BD&quot;, &quot;\\nu&quot;, true);
defineSymbol(math, mathord, &quot;\u03BE&quot;, &quot;\\xi&quot;, true);
defineSymbol(math, mathord, &quot;\u03BF&quot;, &quot;\\omicron&quot;, true);
defineSymbol(math, mathord, &quot;\u03C0&quot;, &quot;\\pi&quot;, true);
defineSymbol(math, mathord, &quot;\u03C1&quot;, &quot;\\rho&quot;, true);
defineSymbol(math, mathord, &quot;\u03C3&quot;, &quot;\\sigma&quot;, true);
defineSymbol(math, mathord, &quot;\u03C4&quot;, &quot;\\tau&quot;, true);
defineSymbol(math, mathord, &quot;\u03C5&quot;, &quot;\\upsilon&quot;, true);
defineSymbol(math, mathord, &quot;\u03D5&quot;, &quot;\\phi&quot;, true);
defineSymbol(math, mathord, &quot;\u03C7&quot;, &quot;\\chi&quot;, true);
defineSymbol(math, mathord, &quot;\u03C8&quot;, &quot;\\psi&quot;, true);
defineSymbol(math, mathord, &quot;\u03C9&quot;, &quot;\\omega&quot;, true);
defineSymbol(math, mathord, &quot;\u03B5&quot;, &quot;\\varepsilon&quot;, true);
defineSymbol(math, mathord, &quot;\u03D1&quot;, &quot;\\vartheta&quot;, true);
defineSymbol(math, mathord, &quot;\u03D6&quot;, &quot;\\varpi&quot;, true);
defineSymbol(math, mathord, &quot;\u03F1&quot;, &quot;\\varrho&quot;, true);
defineSymbol(math, mathord, &quot;\u03C2&quot;, &quot;\\varsigma&quot;, true);
defineSymbol(math, mathord, &quot;\u03C6&quot;, &quot;\\varphi&quot;, true);
defineSymbol(math, mathord, &quot;\u03D8&quot;, &quot;\\Coppa&quot;, true);
defineSymbol(math, mathord, &quot;\u03D9&quot;, &quot;\\coppa&quot;, true);
defineSymbol(math, mathord, &quot;\u03D9&quot;, &quot;\\varcoppa&quot;, true);
defineSymbol(math, mathord, &quot;\u03DE&quot;, &quot;\\Koppa&quot;, true);
defineSymbol(math, mathord, &quot;\u03DF&quot;, &quot;\\koppa&quot;, true);
defineSymbol(math, mathord, &quot;\u03E0&quot;, &quot;\\Sampi&quot;, true);
defineSymbol(math, mathord, &quot;\u03E1&quot;, &quot;\\sampi&quot;, true);
defineSymbol(math, mathord, &quot;\u03DA&quot;, &quot;\\Stigma&quot;, true);
defineSymbol(math, mathord, &quot;\u03DB&quot;, &quot;\\stigma&quot;, true);
defineSymbol(math, mathord, &quot;\u2AEB&quot;, &quot;\\Bot&quot;);
defineSymbol(math, bin, &quot;\u2217&quot;, &quot;\u2217&quot;, true);
defineSymbol(math, bin, &quot;+&quot;, &quot;+&quot;);
defineSymbol(math, bin, &quot;\u2217&quot;, &quot;*&quot;);
defineSymbol(math, bin, &quot;\u2044&quot;, &quot;/&quot;, true);
defineSymbol(math, bin, &quot;\u2044&quot;, &quot;\u2044&quot;);
defineSymbol(math, bin, &quot;\u2212&quot;, &quot;-&quot;, true);
defineSymbol(math, bin, &quot;\u22C5&quot;, &quot;\\cdot&quot;, true);
defineSymbol(math, bin, &quot;\u2218&quot;, &quot;\\circ&quot;, true);
defineSymbol(math, bin, &quot;\xF7&quot;, &quot;\\div&quot;, true);
defineSymbol(math, bin, &quot;\xB1&quot;, &quot;\\pm&quot;, true);
defineSymbol(math, bin, &quot;\xD7&quot;, &quot;\\times&quot;, true);
defineSymbol(math, bin, &quot;\u2229&quot;, &quot;\\cap&quot;, true);
defineSymbol(math, bin, &quot;\u222A&quot;, &quot;\\cup&quot;, true);
defineSymbol(math, bin, &quot;\u2216&quot;, &quot;\\setminus&quot;, true);
defineSymbol(math, bin, &quot;\u2227&quot;, &quot;\\land&quot;);
defineSymbol(math, bin, &quot;\u2228&quot;, &quot;\\lor&quot;);
defineSymbol(math, bin, &quot;\u2227&quot;, &quot;\\wedge&quot;, true);
defineSymbol(math, bin, &quot;\u2228&quot;, &quot;\\vee&quot;, true);
defineSymbol(math, open, &quot;\u27E6&quot;, &quot;\\llbracket&quot;, true);
defineSymbol(math, close, &quot;\u27E7&quot;, &quot;\\rrbracket&quot;, true);
defineSymbol(math, open, &quot;\u27E8&quot;, &quot;\\langle&quot;, true);
defineSymbol(math, open, &quot;\u27EA&quot;, &quot;\\lAngle&quot;, true);
defineSymbol(math, open, &quot;\u2989&quot;, &quot;\\llangle&quot;, true);
defineSymbol(math, open, &quot;|&quot;, &quot;\\lvert&quot;);
defineSymbol(math, open, &quot;\u2016&quot;, &quot;\\lVert&quot;, true);
defineSymbol(math, textord, &quot;!&quot;, &quot;\\oc&quot;);
defineSymbol(math, textord, &quot;?&quot;, &quot;\\wn&quot;);
defineSymbol(math, textord, &quot;\u2193&quot;, &quot;\\shpos&quot;);
defineSymbol(math, textord, &quot;\u2195&quot;, &quot;\\shift&quot;);
defineSymbol(math, textord, &quot;\u2191&quot;, &quot;\\shneg&quot;);
defineSymbol(math, close, &quot;?&quot;, &quot;?&quot;);
defineSymbol(math, close, &quot;!&quot;, &quot;!&quot;);
defineSymbol(math, close, &quot;\u203C&quot;, &quot;\u203C&quot;);
defineSymbol(math, close, &quot;\u27E9&quot;, &quot;\\rangle&quot;, true);
defineSymbol(math, close, &quot;\u27EB&quot;, &quot;\\rAngle&quot;, true);
defineSymbol(math, close, &quot;\u298A&quot;, &quot;\\rrangle&quot;, true);
defineSymbol(math, close, &quot;|&quot;, &quot;\\rvert&quot;);
defineSymbol(math, close, &quot;\u2016&quot;, &quot;\\rVert&quot;);
defineSymbol(math, open, &quot;\u2983&quot;, &quot;\\lBrace&quot;, true);
defineSymbol(math, close, &quot;\u2984&quot;, &quot;\\rBrace&quot;, true);
defineSymbol(math, rel, &quot;=&quot;, &quot;\\equal&quot;, true);
defineSymbol(math, rel, &quot;:&quot;, &quot;:&quot;);
defineSymbol(math, rel, &quot;\u2248&quot;, &quot;\\approx&quot;, true);
defineSymbol(math, rel, &quot;\u2245&quot;, &quot;\\cong&quot;, true);
defineSymbol(math, rel, &quot;\u2265&quot;, &quot;\\ge&quot;);
defineSymbol(math, rel, &quot;\u2265&quot;, &quot;\\geq&quot;, true);
defineSymbol(math, rel, &quot;\u2190&quot;, &quot;\\gets&quot;);
defineSymbol(math, rel, &quot;&gt;&quot;, &quot;\\gt&quot;, true);
defineSymbol(math, rel, &quot;\u2208&quot;, &quot;\\in&quot;, true);
defineSymbol(math, rel, &quot;\u2209&quot;, &quot;\\notin&quot;, true);
defineSymbol(math, rel, &quot;\uE020&quot;, &quot;\\@not&quot;);
defineSymbol(math, rel, &quot;\u2282&quot;, &quot;\\subset&quot;, true);
defineSymbol(math, rel, &quot;\u2283&quot;, &quot;\\supset&quot;, true);
defineSymbol(math, rel, &quot;\u2286&quot;, &quot;\\subseteq&quot;, true);
defineSymbol(math, rel, &quot;\u2287&quot;, &quot;\\supseteq&quot;, true);
defineSymbol(math, rel, &quot;\u2288&quot;, &quot;\\nsubseteq&quot;, true);
defineSymbol(math, rel, &quot;\u2288&quot;, &quot;\\nsubseteqq&quot;);
defineSymbol(math, rel, &quot;\u2289&quot;, &quot;\\nsupseteq&quot;, true);
defineSymbol(math, rel, &quot;\u2289&quot;, &quot;\\nsupseteqq&quot;);
defineSymbol(math, rel, &quot;\u22A8&quot;, &quot;\\models&quot;);
defineSymbol(math, rel, &quot;\u2190&quot;, &quot;\\leftarrow&quot;, true);
defineSymbol(math, rel, &quot;\u2264&quot;, &quot;\\le&quot;);
defineSymbol(math, rel, &quot;\u2264&quot;, &quot;\\leq&quot;, true);
defineSymbol(math, rel, &quot;&lt;&quot;, &quot;\\lt&quot;, true);
defineSymbol(math, rel, &quot;\u2192&quot;, &quot;\\rightarrow&quot;, true);
defineSymbol(math, rel, &quot;\u2192&quot;, &quot;\\to&quot;);
defineSymbol(math, rel, &quot;\u2271&quot;, &quot;\\ngeq&quot;, true);
defineSymbol(math, rel, &quot;\u2271&quot;, &quot;\\ngeqq&quot;);
defineSymbol(math, rel, &quot;\u2271&quot;, &quot;\\ngeqslant&quot;);
defineSymbol(math, rel, &quot;\u2270&quot;, &quot;\\nleq&quot;, true);
defineSymbol(math, rel, &quot;\u2270&quot;, &quot;\\nleqq&quot;);
defineSymbol(math, rel, &quot;\u2270&quot;, &quot;\\nleqslant&quot;);
defineSymbol(math, rel, &quot;\u2AEB&quot;, &quot;\\Perp&quot;, true);
defineSymbol(math, spacing, &quot;\xA0&quot;, &quot;\\ &quot;);
defineSymbol(math, spacing, &quot;\xA0&quot;, &quot;\\space&quot;);
defineSymbol(math, spacing, &quot;\xA0&quot;, &quot;\\nobreakspace&quot;);
defineSymbol(text, spacing, &quot;\xA0&quot;, &quot;\\ &quot;);
defineSymbol(text, spacing, &quot;\xA0&quot;, &quot; &quot;);
defineSymbol(text, spacing, &quot;\xA0&quot;, &quot;\\space&quot;);
defineSymbol(text, spacing, &quot;\xA0&quot;, &quot;\\nobreakspace&quot;);
defineSymbol(math, spacing, null, &quot;\\nobreak&quot;);
defineSymbol(math, spacing, null, &quot;\\allowbreak&quot;);
defineSymbol(math, punct, &quot;,&quot;, &quot;,&quot;);
defineSymbol(text, punct, &quot;:&quot;, &quot;:&quot;);
defineSymbol(math, punct, &quot;;&quot;, &quot;;&quot;);
defineSymbol(math, bin, &quot;\u22BC&quot;, &quot;\\barwedge&quot;);
defineSymbol(math, bin, &quot;\u22BB&quot;, &quot;\\veebar&quot;);
defineSymbol(math, bin, &quot;\u2299&quot;, &quot;\\odot&quot;, true);
defineSymbol(math, bin, &quot;\u2295\uFE0E&quot;, &quot;\\oplus&quot;);
defineSymbol(math, bin, &quot;\u2297&quot;, &quot;\\otimes&quot;, true);
defineSymbol(math, textord, &quot;\u2202&quot;, &quot;\\partial&quot;, true);
defineSymbol(math, bin, &quot;\u2298&quot;, &quot;\\oslash&quot;, true);
defineSymbol(math, bin, &quot;\u229A&quot;, &quot;\\circledcirc&quot;, true);
defineSymbol(math, bin, &quot;\u22A1&quot;, &quot;\\boxdot&quot;, true);
defineSymbol(math, bin, &quot;\u25B3&quot;, &quot;\\bigtriangleup&quot;);
defineSymbol(math, bin, &quot;\u25BD&quot;, &quot;\\bigtriangledown&quot;);
defineSymbol(math, bin, &quot;\u2020&quot;, &quot;\\dagger&quot;);
defineSymbol(math, bin, &quot;\u22C4&quot;, &quot;\\diamond&quot;);
defineSymbol(math, bin, &quot;\u25C3&quot;, &quot;\\triangleleft&quot;);
defineSymbol(math, bin, &quot;\u25B9&quot;, &quot;\\triangleright&quot;);
defineSymbol(math, open, &quot;{&quot;, &quot;\\{&quot;);
defineSymbol(text, textord, &quot;{&quot;, &quot;\\{&quot;);
defineSymbol(text, textord, &quot;{&quot;, &quot;\\textbraceleft&quot;);
defineSymbol(math, close, &quot;}&quot;, &quot;\\}&quot;);
defineSymbol(text, textord, &quot;}&quot;, &quot;\\}&quot;);
defineSymbol(text, textord, &quot;}&quot;, &quot;\\textbraceright&quot;);
defineSymbol(math, open, &quot;{&quot;, &quot;\\lbrace&quot;);
defineSymbol(math, close, &quot;}&quot;, &quot;\\rbrace&quot;);
defineSymbol(math, open, &quot;[&quot;, &quot;\\lbrack&quot;, true);
defineSymbol(text, textord, &quot;[&quot;, &quot;\\lbrack&quot;, true);
defineSymbol(math, close, &quot;]&quot;, &quot;\\rbrack&quot;, true);
defineSymbol(text, textord, &quot;]&quot;, &quot;\\rbrack&quot;, true);
defineSymbol(math, open, &quot;(&quot;, &quot;\\lparen&quot;, true);
defineSymbol(math, close, &quot;)&quot;, &quot;\\rparen&quot;, true);
defineSymbol(math, open, &quot;\u2987&quot;, &quot;\\llparenthesis&quot;, true);
defineSymbol(math, close, &quot;\u2988&quot;, &quot;\\rrparenthesis&quot;, true);
defineSymbol(text, textord, &quot;&lt;&quot;, &quot;\\textless&quot;, true);
defineSymbol(text, textord, &quot;&gt;&quot;, &quot;\\textgreater&quot;, true);
defineSymbol(math, open, &quot;\u230A&quot;, &quot;\\lfloor&quot;, true);
defineSymbol(math, close, &quot;\u230B&quot;, &quot;\\rfloor&quot;, true);
defineSymbol(math, open, &quot;\u2308&quot;, &quot;\\lceil&quot;, true);
defineSymbol(math, close, &quot;\u2309&quot;, &quot;\\rceil&quot;, true);
defineSymbol(math, textord, &quot;\\&quot;, &quot;\\backslash&quot;);
defineSymbol(math, textord, &quot;|&quot;, &quot;|&quot;);
defineSymbol(math, textord, &quot;|&quot;, &quot;\\vert&quot;);
defineSymbol(text, textord, &quot;|&quot;, &quot;\\textbar&quot;, true);
defineSymbol(math, textord, &quot;\u2016&quot;, &quot;\\|&quot;);
defineSymbol(math, textord, &quot;\u2016&quot;, &quot;\\Vert&quot;);
defineSymbol(text, textord, &quot;\u2016&quot;, &quot;\\textbardbl&quot;);
defineSymbol(text, textord, &quot;~&quot;, &quot;\\textasciitilde&quot;);
defineSymbol(text, textord, &quot;\\&quot;, &quot;\\textbackslash&quot;);
defineSymbol(text, textord, &quot;^&quot;, &quot;\\textasciicircum&quot;);
defineSymbol(math, rel, &quot;\u2191&quot;, &quot;\\uparrow&quot;, true);
defineSymbol(math, rel, &quot;\u21D1&quot;, &quot;\\Uparrow&quot;, true);
defineSymbol(math, rel, &quot;\u2193&quot;, &quot;\\downarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21D3&quot;, &quot;\\Downarrow&quot;, true);
defineSymbol(math, rel, &quot;\u2195&quot;, &quot;\\updownarrow&quot;, true);
defineSymbol(math, rel, &quot;\u21D5&quot;, &quot;\\Updownarrow&quot;, true);
defineSymbol(math, op, &quot;\u2210&quot;, &quot;\\coprod&quot;);
defineSymbol(math, op, &quot;\u22C1&quot;, &quot;\\bigvee&quot;);
defineSymbol(math, op, &quot;\u22C0&quot;, &quot;\\bigwedge&quot;);
defineSymbol(math, op, &quot;\u2A04&quot;, &quot;\\biguplus&quot;);
defineSymbol(math, op, &quot;\u2A04&quot;, &quot;\\bigcupplus&quot;);
defineSymbol(math, op, &quot;\u2A03&quot;, &quot;\\bigcupdot&quot;);
defineSymbol(math, op, &quot;\u2A07&quot;, &quot;\\bigdoublevee&quot;);
defineSymbol(math, op, &quot;\u2A08&quot;, &quot;\\bigdoublewedge&quot;);
defineSymbol(math, op, &quot;\u22C2&quot;, &quot;\\bigcap&quot;);
defineSymbol(math, op, &quot;\u22C3&quot;, &quot;\\bigcup&quot;);
defineSymbol(math, op, &quot;\u222B&quot;, &quot;\\int&quot;);
defineSymbol(math, op, &quot;\u222B&quot;, &quot;\\intop&quot;);
defineSymbol(math, op, &quot;\u222C&quot;, &quot;\\iint&quot;);
defineSymbol(math, op, &quot;\u222D&quot;, &quot;\\iiint&quot;);
defineSymbol(math, op, &quot;\u220F&quot;, &quot;\\prod&quot;);
defineSymbol(math, op, &quot;\u2211&quot;, &quot;\\sum&quot;);
defineSymbol(math, op, &quot;\u2A02&quot;, &quot;\\bigotimes&quot;);
defineSymbol(math, op, &quot;\u2A01&quot;, &quot;\\bigoplus&quot;);
defineSymbol(math, op, &quot;\u2A00&quot;, &quot;\\bigodot&quot;);
defineSymbol(math, op, &quot;\u2A09&quot;, &quot;\\bigtimes&quot;);
defineSymbol(math, op, &quot;\u222E&quot;, &quot;\\oint&quot;);
defineSymbol(math, op, &quot;\u222F&quot;, &quot;\\oiint&quot;);
defineSymbol(math, op, &quot;\u2230&quot;, &quot;\\oiiint&quot;);
defineSymbol(math, op, &quot;\u2231&quot;, &quot;\\intclockwise&quot;);
defineSymbol(math, op, &quot;\u2232&quot;, &quot;\\varointclockwise&quot;);
defineSymbol(math, op, &quot;\u2A0C&quot;, &quot;\\iiiint&quot;);
defineSymbol(math, op, &quot;\u2A0D&quot;, &quot;\\intbar&quot;);
defineSymbol(math, op, &quot;\u2A0E&quot;, &quot;\\intBar&quot;);
defineSymbol(math, op, &quot;\u2A0F&quot;, &quot;\\fint&quot;);
defineSymbol(math, op, &quot;\u2A12&quot;, &quot;\\rppolint&quot;);
defineSymbol(math, op, &quot;\u2A13&quot;, &quot;\\scpolint&quot;);
defineSymbol(math, op, &quot;\u2A15&quot;, &quot;\\pointint&quot;);
defineSymbol(math, op, &quot;\u2A16&quot;, &quot;\\sqint&quot;);
defineSymbol(math, op, &quot;\u2A17&quot;, &quot;\\intlarhk&quot;);
defineSymbol(math, op, &quot;\u2A18&quot;, &quot;\\intx&quot;);
defineSymbol(math, op, &quot;\u2A19&quot;, &quot;\\intcap&quot;);
defineSymbol(math, op, &quot;\u2A1A&quot;, &quot;\\intcup&quot;);
defineSymbol(math, op, &quot;\u2A05&quot;, &quot;\\bigsqcap&quot;);
defineSymbol(math, op, &quot;\u2A06&quot;, &quot;\\bigsqcup&quot;);
defineSymbol(math, op, &quot;\u222B&quot;, &quot;\\smallint&quot;);
defineSymbol(text, inner, &quot;\u2026&quot;, &quot;\\textellipsis&quot;);
defineSymbol(math, inner, &quot;\u2026&quot;, &quot;\\mathellipsis&quot;);
defineSymbol(text, inner, &quot;\u2026&quot;, &quot;\\ldots&quot;, true);
defineSymbol(math, inner, &quot;\u2026&quot;, &quot;\\ldots&quot;, true);
defineSymbol(math, inner, &quot;\u22F0&quot;, &quot;\\iddots&quot;, true);
defineSymbol(math, inner, &quot;\u22EF&quot;, &quot;\\@cdots&quot;, true);
defineSymbol(math, inner, &quot;\u22F1&quot;, &quot;\\ddots&quot;, true);
defineSymbol(math, textord, &quot;\u22EE&quot;, &quot;\\varvdots&quot;);
defineSymbol(text, textord, &quot;\u22EE&quot;, &quot;\\varvdots&quot;);
defineSymbol(math, accent, &quot;\u02CA&quot;, &quot;\\acute&quot;);
defineSymbol(math, accent, &quot;`&quot;, &quot;\\grave&quot;);
defineSymbol(math, accent, &quot;\xA8&quot;, &quot;\\ddot&quot;);
defineSymbol(math, accent, &quot;\u2026&quot;, &quot;\\dddot&quot;);
defineSymbol(math, accent, &quot;\u2026.&quot;, &quot;\\ddddot&quot;);
defineSymbol(math, accent, &quot;~&quot;, &quot;\\tilde&quot;);
defineSymbol(math, accent, &quot;\u203E&quot;, &quot;\\bar&quot;);
defineSymbol(math, accent, &quot;\u02D8&quot;, &quot;\\breve&quot;);
defineSymbol(math, accent, &quot;\u02C7&quot;, &quot;\\check&quot;);
defineSymbol(math, accent, &quot;^&quot;, &quot;\\hat&quot;);
defineSymbol(math, accent, &quot;\u2192&quot;, &quot;\\vec&quot;);
defineSymbol(math, accent, &quot;\u02D9&quot;, &quot;\\dot&quot;);
defineSymbol(math, accent, &quot;\u02DA&quot;, &quot;\\mathring&quot;);
defineSymbol(math, mathord, &quot;\u0131&quot;, &quot;\\imath&quot;, true);
defineSymbol(math, mathord, &quot;\u0237&quot;, &quot;\\jmath&quot;, true);
defineSymbol(math, textord, &quot;\u0131&quot;, &quot;\u0131&quot;);
defineSymbol(math, textord, &quot;\u0237&quot;, &quot;\u0237&quot;);
defineSymbol(text, textord, &quot;\u0131&quot;, &quot;\\i&quot;, true);
defineSymbol(text, textord, &quot;\u0237&quot;, &quot;\\j&quot;, true);
defineSymbol(text, textord, &quot;\xDF&quot;, &quot;\\ss&quot;, true);
defineSymbol(text, textord, &quot;\xE6&quot;, &quot;\\ae&quot;, true);
defineSymbol(text, textord, &quot;\u0153&quot;, &quot;\\oe&quot;, true);
defineSymbol(text, textord, &quot;\xF8&quot;, &quot;\\o&quot;, true);
defineSymbol(math, mathord, &quot;\xF8&quot;, &quot;\\o&quot;, true);
defineSymbol(text, textord, &quot;\xC6&quot;, &quot;\\AE&quot;, true);
defineSymbol(text, textord, &quot;\u0152&quot;, &quot;\\OE&quot;, true);
defineSymbol(text, textord, &quot;\xD8&quot;, &quot;\\O&quot;, true);
defineSymbol(math, mathord, &quot;\xD8&quot;, &quot;\\O&quot;, true);
defineSymbol(text, accent, &quot;\u02CA&quot;, &quot;\\&#039;&quot;);
defineSymbol(text, accent, &quot;\u02CB&quot;, &quot;\\`&quot;);
defineSymbol(text, accent, &quot;\u02C6&quot;, &quot;\\^&quot;);
defineSymbol(text, accent, &quot;\u02DC&quot;, &quot;\\~&quot;);
defineSymbol(text, accent, &quot;\u02C9&quot;, &quot;\\=&quot;);
defineSymbol(text, accent, &quot;\u02D8&quot;, &quot;\\u&quot;);
defineSymbol(text, accent, &quot;\u02D9&quot;, &quot;\\.&quot;);
defineSymbol(text, accent, &quot;\xB8&quot;, &quot;\\c&quot;);
defineSymbol(text, accent, &quot;\u02DA&quot;, &quot;\\r&quot;);
defineSymbol(text, accent, &quot;\u02C7&quot;, &quot;\\v&quot;);
defineSymbol(text, accent, &quot;\xA8&quot;, &#039;\\&quot;&#039;);
defineSymbol(text, accent, &quot;\u02DD&quot;, &quot;\\H&quot;);
defineSymbol(math, accent, &quot;\u02CA&quot;, &quot;\\&#039;&quot;);
defineSymbol(math, accent, &quot;\u02CB&quot;, &quot;\\`&quot;);
defineSymbol(math, accent, &quot;\u02C6&quot;, &quot;\\^&quot;);
defineSymbol(math, accent, &quot;\u02DC&quot;, &quot;\\~&quot;);
defineSymbol(math, accent, &quot;\u02C9&quot;, &quot;\\=&quot;);
defineSymbol(math, accent, &quot;\u02D8&quot;, &quot;\\u&quot;);
defineSymbol(math, accent, &quot;\u02D9&quot;, &quot;\\.&quot;);
defineSymbol(math, accent, &quot;\xB8&quot;, &quot;\\c&quot;);
defineSymbol(math, accent, &quot;\u02DA&quot;, &quot;\\r&quot;);
defineSymbol(math, accent, &quot;\u02C7&quot;, &quot;\\v&quot;);
defineSymbol(math, accent, &quot;\xA8&quot;, &#039;\\&quot;&#039;);
defineSymbol(math, accent, &quot;\u02DD&quot;, &quot;\\H&quot;);
var ligatures = {
  &quot;--&quot;: true,
  &quot;---&quot;: true,
  &quot;``&quot;: true,
  &quot;&#039;&#039;&quot;: true
};
defineSymbol(text, textord, &quot;\u2013&quot;, &quot;--&quot;, true);
defineSymbol(text, textord, &quot;\u2013&quot;, &quot;\\textendash&quot;);
defineSymbol(text, textord, &quot;\u2014&quot;, &quot;---&quot;, true);
defineSymbol(text, textord, &quot;\u2014&quot;, &quot;\\textemdash&quot;);
defineSymbol(text, textord, &quot;\u2018&quot;, &quot;`&quot;, true);
defineSymbol(text, textord, &quot;\u2018&quot;, &quot;\\textquoteleft&quot;);
defineSymbol(text, textord, &quot;\u2019&quot;, &quot;&#039;&quot;, true);
defineSymbol(text, textord, &quot;\u2019&quot;, &quot;\\textquoteright&quot;);
defineSymbol(text, textord, &quot;\u201C&quot;, &quot;``&quot;, true);
defineSymbol(text, textord, &quot;\u201C&quot;, &quot;\\textquotedblleft&quot;);
defineSymbol(text, textord, &quot;\u201D&quot;, &quot;&#039;&#039;&quot;, true);
defineSymbol(text, textord, &quot;\u201D&quot;, &quot;\\textquotedblright&quot;);
defineSymbol(math, textord, &quot;\xB0&quot;, &quot;\\degree&quot;, true);
defineSymbol(text, textord, &quot;\xB0&quot;, &quot;\\degree&quot;);
defineSymbol(text, textord, &quot;\xB0&quot;, &quot;\\textdegree&quot;, true);
defineSymbol(math, textord, &quot;\xA3&quot;, &quot;\\pounds&quot;);
defineSymbol(math, textord, &quot;\xA3&quot;, &quot;\\mathsterling&quot;, true);
defineSymbol(text, textord, &quot;\xA3&quot;, &quot;\\pounds&quot;);
defineSymbol(text, textord, &quot;\xA3&quot;, &quot;\\textsterling&quot;, true);
defineSymbol(math, textord, &quot;\u2720&quot;, &quot;\\maltese&quot;);
defineSymbol(text, textord, &quot;\u2720&quot;, &quot;\\maltese&quot;);
defineSymbol(math, textord, &quot;\u20AC&quot;, &quot;\\euro&quot;, true);
defineSymbol(text, textord, &quot;\u20AC&quot;, &quot;\\euro&quot;, true);
defineSymbol(text, textord, &quot;\u20AC&quot;, &quot;\\texteuro&quot;);
defineSymbol(math, textord, &quot;\xA9&quot;, &quot;\\copyright&quot;, true);
defineSymbol(text, textord, &quot;\xA9&quot;, &quot;\\textcopyright&quot;);
defineSymbol(math, textord, &quot;\u2300&quot;, &quot;\\diameter&quot;, true);
defineSymbol(text, textord, &quot;\u2300&quot;, &quot;\\diameter&quot;);
defineSymbol(math, textord, &quot;\u{1D6E4}&quot;, &quot;\\varGamma&quot;);
defineSymbol(math, textord, &quot;\u{1D6E5}&quot;, &quot;\\varDelta&quot;);
defineSymbol(math, textord, &quot;\u{1D6E9}&quot;, &quot;\\varTheta&quot;);
defineSymbol(math, textord, &quot;\u{1D6EC}&quot;, &quot;\\varLambda&quot;);
defineSymbol(math, textord, &quot;\u{1D6EF}&quot;, &quot;\\varXi&quot;);
defineSymbol(math, textord, &quot;\u{1D6F1}&quot;, &quot;\\varPi&quot;);
defineSymbol(math, textord, &quot;\u{1D6F4}&quot;, &quot;\\varSigma&quot;);
defineSymbol(math, textord, &quot;\u{1D6F6}&quot;, &quot;\\varUpsilon&quot;);
defineSymbol(math, textord, &quot;\u{1D6F7}&quot;, &quot;\\varPhi&quot;);
defineSymbol(math, textord, &quot;\u{1D6F9}&quot;, &quot;\\varPsi&quot;);
defineSymbol(math, textord, &quot;\u{1D6FA}&quot;, &quot;\\varOmega&quot;);
defineSymbol(text, textord, &quot;\u{1D6E4}&quot;, &quot;\\varGamma&quot;);
defineSymbol(text, textord, &quot;\u{1D6E5}&quot;, &quot;\\varDelta&quot;);
defineSymbol(text, textord, &quot;\u{1D6E9}&quot;, &quot;\\varTheta&quot;);
defineSymbol(text, textord, &quot;\u{1D6EC}&quot;, &quot;\\varLambda&quot;);
defineSymbol(text, textord, &quot;\u{1D6EF}&quot;, &quot;\\varXi&quot;);
defineSymbol(text, textord, &quot;\u{1D6F1}&quot;, &quot;\\varPi&quot;);
defineSymbol(text, textord, &quot;\u{1D6F4}&quot;, &quot;\\varSigma&quot;);
defineSymbol(text, textord, &quot;\u{1D6F6}&quot;, &quot;\\varUpsilon&quot;);
defineSymbol(text, textord, &quot;\u{1D6F7}&quot;, &quot;\\varPhi&quot;);
defineSymbol(text, textord, &quot;\u{1D6F9}&quot;, &quot;\\varPsi&quot;);
defineSymbol(text, textord, &quot;\u{1D6FA}&quot;, &quot;\\varOmega&quot;);
var mathTextSymbols = &#039;0123456789/@.&quot;&#039;;
for (let i = 0; i &lt; mathTextSymbols.length; i++) {
  const ch = mathTextSymbols.charAt(i);
  defineSymbol(math, textord, ch, ch);
}
var textSymbols = &#039;0123456789!@*()-=+&quot;;:?/.,&#039;;
for (let i = 0; i &lt; textSymbols.length; i++) {
  const ch = textSymbols.charAt(i);
  defineSymbol(text, textord, ch, ch);
}
var letters = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz&quot;;
for (let i = 0; i &lt; letters.length; i++) {
  const ch = letters.charAt(i);
  defineSymbol(math, mathord, ch, ch);
  defineSymbol(text, textord, ch, ch);
}
var narrow = &quot;\xC7\xD0\xDE\xE7\xFE\u2102\u210D\u2115\u2119\u211A\u211D\u2124\u210E\u210F\u210A\u210B\u210C\u2110\u2111\u2112\u2113\u2118\u211B\u211C\u212C\u2130\u2131\u2133\u212D\u2128&quot;;
for (let i = 0; i &lt; narrow.length; i++) {
  const ch = narrow.charAt(i);
  defineSymbol(math, mathord, ch, ch);
  defineSymbol(text, textord, ch, ch);
}
var wideChar = &quot;&quot;;
for (let i = 0; i &lt; letters.length; i++) {
  wideChar = String.fromCharCode(55349, 56320 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56372 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56424 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56580 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56736 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56788 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56840 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56944 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 56632 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  const ch = letters.charAt(i);
  wideChar = String.fromCharCode(55349, 56476 + i);
  defineSymbol(math, mathord, ch, wideChar);
  defineSymbol(text, textord, ch, wideChar);
}
for (let i = 0; i &lt; 10; i++) {
  wideChar = String.fromCharCode(55349, 57294 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 57314 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 57324 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
  wideChar = String.fromCharCode(55349, 57334 + i);
  defineSymbol(math, mathord, wideChar, wideChar);
  defineSymbol(text, textord, wideChar, wideChar);
}
var openDelims = &quot;([{\u230A\u2308\u27E8\u27EE\u23B0\u27E6\u2983&quot;;
var closeDelims = &quot;)]}\u230B\u2309\u27E9\u27EF\u23B1\u27E6\u2984&quot;;
function setLineBreaks(expression, wrapMode, isDisplayMode) {
  const mtrs = [];
  let mrows = [];
  let block = [];
  let numTopLevelEquals = 0;
  let i = 0;
  let level = 0;
  while (i &lt; expression.length) {
    while (expression[i] instanceof DocumentFragment) {
      expression.splice(i, 1, ...expression[i].children);
    }
    const node = expression[i];
    if (node.attributes &amp;&amp; node.attributes.linebreak &amp;&amp; node.attributes.linebreak === &quot;newline&quot;) {
      if (block.length &gt; 0) {
        mrows.push(new mathMLTree.MathNode(&quot;mrow&quot;, block));
      }
      mrows.push(node);
      block = [];
      const mtd = new mathMLTree.MathNode(&quot;mtd&quot;, mrows);
      mtd.style.textAlign = &quot;left&quot;;
      mtrs.push(new mathMLTree.MathNode(&quot;mtr&quot;, [mtd]));
      mrows = [];
      i += 1;
      continue;
    }
    block.push(node);
    if (node.type &amp;&amp; node.type === &quot;mo&quot; &amp;&amp; node.children.length === 1 &amp;&amp; !Object.hasOwn(node.attributes, &quot;movablelimits&quot;)) {
      const ch = node.children[0].text;
      if (openDelims.indexOf(ch) &gt; -1) {
        level += 1;
      } else if (closeDelims.indexOf(ch) &gt; -1) {
        level -= 1;
      } else if (level === 0 &amp;&amp; wrapMode === &quot;=&quot; &amp;&amp; ch === &quot;=&quot;) {
        numTopLevelEquals += 1;
        if (numTopLevelEquals &gt; 1) {
          block.pop();
          const element = new mathMLTree.MathNode(&quot;mrow&quot;, block);
          mrows.push(element);
          block = [node];
        }
      } else if (level === 0 &amp;&amp; wrapMode === &quot;tex&quot; &amp;&amp; ch !== &quot;\u2207&quot;) {
        const next = i &lt; expression.length - 1 ? expression[i + 1] : null;
        let glueIsFreeOfNobreak = true;
        if (!(next &amp;&amp; next.type === &quot;mtext&quot; &amp;&amp; next.attributes.linebreak &amp;&amp; next.attributes.linebreak === &quot;nobreak&quot;)) {
          for (let j = i + 1; j &lt; expression.length; j++) {
            const nd = expression[j];
            if (nd.type &amp;&amp; nd.type === &quot;mspace&quot; &amp;&amp; !(nd.attributes.linebreak &amp;&amp; nd.attributes.linebreak === &quot;newline&quot;)) {
              block.push(nd);
              i += 1;
              if (nd.attributes &amp;&amp; nd.attributes.linebreak &amp;&amp; nd.attributes.linebreak === &quot;nobreak&quot;) {
                glueIsFreeOfNobreak = false;
              }
            } else {
              break;
            }
          }
        }
        if (glueIsFreeOfNobreak) {
          const element = new mathMLTree.MathNode(&quot;mrow&quot;, block);
          mrows.push(element);
          block = [];
        }
      }
    }
    i += 1;
  }
  if (block.length &gt; 0) {
    const element = new mathMLTree.MathNode(&quot;mrow&quot;, block);
    mrows.push(element);
  }
  if (mtrs.length &gt; 0) {
    const mtd = new mathMLTree.MathNode(&quot;mtd&quot;, mrows);
    mtd.style.textAlign = &quot;left&quot;;
    const mtr = new mathMLTree.MathNode(&quot;mtr&quot;, [mtd]);
    mtrs.push(mtr);
    const mtable = new mathMLTree.MathNode(&quot;mtable&quot;, mtrs);
    if (!isDisplayMode) {
      mtable.setAttribute(&quot;columnalign&quot;, &quot;left&quot;);
      mtable.setAttribute(&quot;rowspacing&quot;, &quot;0em&quot;);
    }
    return mtable;
  }
  return mathMLTree.newDocumentFragment(mrows);
}
var makeText = function(text2, mode, style) {
  if (symbols[mode][text2] &amp;&amp; symbols[mode][text2].replace &amp;&amp; text2.charCodeAt(0) !== 55349 &amp;&amp; !(Object.prototype.hasOwnProperty.call(ligatures, text2) &amp;&amp; style &amp;&amp; (style.fontFamily &amp;&amp; style.fontFamily.slice(4, 6) === &quot;tt&quot; || style.font &amp;&amp; style.font.slice(4, 6) === &quot;tt&quot;))) {
    text2 = symbols[mode][text2].replace;
  }
  return new mathMLTree.TextNode(text2);
};
var copyChar = (newRow, child) =&gt; {
  if (newRow.children.length === 0 || newRow.children[newRow.children.length - 1].type !== &quot;mtext&quot;) {
    const mtext = new mathMLTree.MathNode(
      &quot;mtext&quot;,
      [new mathMLTree.TextNode(child.children[0].text)]
    );
    newRow.children.push(mtext);
  } else {
    newRow.children[newRow.children.length - 1].children[0].text += child.children[0].text;
  }
};
var consolidateText = (mrow) =&gt; {
  if (mrow.type !== &quot;mrow&quot; &amp;&amp; mrow.type !== &quot;mstyle&quot;) {
    return mrow;
  }
  if (mrow.children.length === 0) {
    return mrow;
  }
  const newRow = new mathMLTree.MathNode(&quot;mrow&quot;);
  for (let i = 0; i &lt; mrow.children.length; i++) {
    const child = mrow.children[i];
    if (child.type === &quot;mtext&quot; &amp;&amp; Object.keys(child.attributes).length === 0) {
      copyChar(newRow, child);
    } else if (child.type === &quot;mrow&quot;) {
      let canConsolidate = true;
      for (let j = 0; j &lt; child.children.length; j++) {
        const grandChild = child.children[j];
        if (grandChild.type !== &quot;mtext&quot; || Object.keys(child.attributes).length !== 0) {
          canConsolidate = false;
          break;
        }
      }
      if (canConsolidate) {
        for (let j = 0; j &lt; child.children.length; j++) {
          const grandChild = child.children[j];
          copyChar(newRow, grandChild);
        }
      } else {
        newRow.children.push(child);
      }
    } else {
      newRow.children.push(child);
    }
  }
  for (let i = 0; i &lt; newRow.children.length; i++) {
    if (newRow.children[i].type === &quot;mtext&quot;) {
      const mtext = newRow.children[i];
      if (mtext.children[0].text.charAt(0) === &quot; &quot;) {
        mtext.children[0].text = &quot;\xA0&quot; + mtext.children[0].text.slice(1);
      }
      const L = mtext.children[0].text.length;
      if (L &gt; 0 &amp;&amp; mtext.children[0].text.charAt(L - 1) === &quot; &quot;) {
        mtext.children[0].text = mtext.children[0].text.slice(0, -1) + &quot;\xA0&quot;;
      }
      for (const [key, value] of Object.entries(mrow.attributes)) {
        mtext.attributes[key] = value;
      }
    }
  }
  if (newRow.children.length === 1 &amp;&amp; newRow.children[0].type === &quot;mtext&quot;) {
    return newRow.children[0];
  } else {
    return newRow;
  }
};
var makeRow = function(body, semisimple = false) {
  if (body.length === 1 &amp;&amp; !(body[0] instanceof DocumentFragment)) {
    return body[0];
  } else if (!semisimple) {
    if (body[0] instanceof MathNode &amp;&amp; body[0].type === &quot;mo&quot; &amp;&amp; !body[0].attributes.fence) {
      body[0].attributes.lspace = &quot;0em&quot;;
      body[0].attributes.rspace = &quot;0em&quot;;
    }
    const end = body.length - 1;
    if (body[end] instanceof MathNode &amp;&amp; body[end].type === &quot;mo&quot; &amp;&amp; !body[end].attributes.fence) {
      body[end].attributes.lspace = &quot;0em&quot;;
      body[end].attributes.rspace = &quot;0em&quot;;
    }
  }
  return new mathMLTree.MathNode(&quot;mrow&quot;, body);
};
function isNumberPunctuation(group) {
  if (!group) {
    return false;
  }
  if (group.type === &quot;mi&quot; &amp;&amp; group.children.length === 1) {
    const child = group.children[0];
    return child instanceof TextNode2 &amp;&amp; child.text === &quot;.&quot;;
  } else if (group.type === &quot;mtext&quot; &amp;&amp; group.children.length === 1) {
    const child = group.children[0];
    return child instanceof TextNode2 &amp;&amp; child.text === &quot;\u2008&quot;;
  } else if (group.type === &quot;mo&quot; &amp;&amp; group.children.length === 1 &amp;&amp; group.getAttribute(&quot;separator&quot;) === &quot;true&quot; &amp;&amp; group.getAttribute(&quot;lspace&quot;) === &quot;0em&quot; &amp;&amp; group.getAttribute(&quot;rspace&quot;) === &quot;0em&quot;) {
    const child = group.children[0];
    return child instanceof TextNode2 &amp;&amp; child.text === &quot;,&quot;;
  } else {
    return false;
  }
}
var isComma = (expression, i) =&gt; {
  const node = expression[i];
  const followingNode = expression[i + 1];
  return node.type === &quot;atom&quot; &amp;&amp; node.text === &quot;,&quot; &amp;&amp; // Don&#039;t consolidate if there is a space after the comma.
  node.loc &amp;&amp; followingNode.loc &amp;&amp; node.loc.end === followingNode.loc.start;
};
var isRel = (item) =&gt; {
  return item.type === &quot;atom&quot; &amp;&amp; item.family === &quot;rel&quot; || item.type === &quot;mclass&quot; &amp;&amp; item.mclass === &quot;mrel&quot;;
};
var buildExpression = function(expression, style, semisimple = false) {
  if (!semisimple &amp;&amp; expression.length === 1) {
    const group = buildGroup$1(expression[0], style);
    if (group instanceof MathNode &amp;&amp; group.type === &quot;mo&quot;) {
      group.setAttribute(&quot;lspace&quot;, &quot;0em&quot;);
      group.setAttribute(&quot;rspace&quot;, &quot;0em&quot;);
    }
    return [group];
  }
  const groups = [];
  const groupArray = [];
  let lastGroup;
  for (let i = 0; i &lt; expression.length; i++) {
    groupArray.push(buildGroup$1(expression[i], style));
  }
  for (let i = 0; i &lt; groupArray.length; i++) {
    const group = groupArray[i];
    if (i &lt; expression.length - 1 &amp;&amp; isRel(expression[i]) &amp;&amp; isRel(expression[i + 1])) {
      group.setAttribute(&quot;rspace&quot;, &quot;0em&quot;);
    }
    if (i &gt; 0 &amp;&amp; isRel(expression[i]) &amp;&amp; isRel(expression[i - 1])) {
      group.setAttribute(&quot;lspace&quot;, &quot;0em&quot;);
    }
    if (group.type === &quot;mn&quot; &amp;&amp; lastGroup &amp;&amp; lastGroup.type === &quot;mn&quot;) {
      lastGroup.children.push(...group.children);
      continue;
    } else if (isNumberPunctuation(group) &amp;&amp; lastGroup &amp;&amp; lastGroup.type === &quot;mn&quot;) {
      lastGroup.children.push(...group.children);
      continue;
    } else if (lastGroup &amp;&amp; lastGroup.type === &quot;mn&quot; &amp;&amp; i &lt; groupArray.length - 1 &amp;&amp; groupArray[i + 1].type === &quot;mn&quot; &amp;&amp; isComma(expression, i)) {
      lastGroup.children.push(...group.children);
      continue;
    } else if (group.type === &quot;mn&quot; &amp;&amp; isNumberPunctuation(lastGroup)) {
      group.children = [...lastGroup.children, ...group.children];
      groups.pop();
    } else if ((group.type === &quot;msup&quot; || group.type === &quot;msub&quot;) &amp;&amp; group.children.length &gt;= 1 &amp;&amp; lastGroup &amp;&amp; (lastGroup.type === &quot;mn&quot; || isNumberPunctuation(lastGroup))) {
      const base = group.children[0];
      if (base instanceof MathNode &amp;&amp; base.type === &quot;mn&quot; &amp;&amp; lastGroup) {
        base.children = [...lastGroup.children, ...base.children];
        groups.pop();
      }
    }
    groups.push(group);
    lastGroup = group;
  }
  return groups;
};
var buildExpressionRow = function(expression, style, semisimple = false) {
  return makeRow(buildExpression(expression, style, semisimple), semisimple);
};
var buildGroup$1 = function(group, style) {
  if (!group) {
    return new mathMLTree.MathNode(&quot;mrow&quot;);
  }
  if (_mathmlGroupBuilders[group.type]) {
    const result = _mathmlGroupBuilders[group.type](group, style);
    return result;
  } else {
    throw new ParseError(&quot;Got group of unknown type: &#039;&quot; + group.type + &quot;&#039;&quot;);
  }
};
var glue$1 = (_) =&gt; {
  return new mathMLTree.MathNode(&quot;mtd&quot;, [], [], { padding: &quot;0&quot;, width: &quot;50%&quot; });
};
var labelContainers = [&quot;mrow&quot;, &quot;mtd&quot;, &quot;mtable&quot;, &quot;mtr&quot;];
var getLabel = (parent) =&gt; {
  for (const node of parent.children) {
    if (node.type &amp;&amp; labelContainers.includes(node.type)) {
      if (node.classes &amp;&amp; node.classes[0] === &quot;tml-label&quot;) {
        const label = node.label;
        return label;
      } else {
        const label = getLabel(node);
        if (label) {
          return label;
        }
      }
    } else if (!node.type) {
      const label = getLabel(node);
      if (label) {
        return label;
      }
    }
  }
};
var taggedExpression = (expression, tag, style, leqno) =&gt; {
  tag = buildExpressionRow(tag[0].body, style);
  tag = consolidateText(tag);
  tag.classes.push(&quot;tml-tag&quot;);
  const label = getLabel(expression);
  expression = new mathMLTree.MathNode(&quot;mtd&quot;, [expression]);
  const rowArray = [glue$1(), expression, glue$1()];
  rowArray[leqno ? 0 : 2].classes.push(leqno ? &quot;tml-left&quot; : &quot;tml-right&quot;);
  rowArray[leqno ? 0 : 2].children.push(tag);
  const mtr = new mathMLTree.MathNode(&quot;mtr&quot;, rowArray, [&quot;tml-tageqn&quot;]);
  if (label) {
    mtr.setAttribute(&quot;id&quot;, label);
  }
  const table = new mathMLTree.MathNode(&quot;mtable&quot;, [mtr]);
  table.style.width = &quot;100%&quot;;
  table.setAttribute(&quot;displaystyle&quot;, &quot;true&quot;);
  return table;
};
function buildMathML(tree, texExpression, style, settings) {
  let tag = null;
  if (tree.length === 1 &amp;&amp; tree[0].type === &quot;tag&quot;) {
    tag = tree[0].tag;
    tree = tree[0].body;
  }
  const expression = buildExpression(tree, style);
  if (expression.length === 1 &amp;&amp; expression[0] instanceof AnchorNode) {
    return expression[0];
  }
  const wrap = settings.displayMode || settings.annotate ? &quot;none&quot; : settings.wrap;
  const n1 = expression.length === 0 ? null : expression[0];
  let wrapper = expression.length === 1 &amp;&amp; tag === null &amp;&amp; n1 instanceof MathNode ? expression[0] : setLineBreaks(expression, wrap, settings.displayMode);
  if (tag) {
    wrapper = taggedExpression(wrapper, tag, style, settings.leqno);
  }
  if (settings.annotate) {
    const annotation = new mathMLTree.MathNode(
      &quot;annotation&quot;,
      [new mathMLTree.TextNode(texExpression)]
    );
    annotation.setAttribute(&quot;encoding&quot;, &quot;application/x-tex&quot;);
    wrapper = new mathMLTree.MathNode(&quot;semantics&quot;, [wrapper, annotation]);
  }
  const math2 = new mathMLTree.MathNode(&quot;math&quot;, [wrapper]);
  if (settings.xml) {
    math2.setAttribute(&quot;xmlns&quot;, &quot;http://www.w3.org/1998/Math/MathML&quot;);
  }
  if (wrapper.style.width) {
    math2.style.width = &quot;100%&quot;;
  }
  if (settings.displayMode) {
    math2.setAttribute(&quot;display&quot;, &quot;block&quot;);
    math2.style.display = &quot;block math&quot;;
    math2.classes = [&quot;tml-display&quot;];
  }
  return math2;
}
var smalls = &quot;aceg\u0131\u0237mnopqrsuvwxyz\u03B1\u03B3\u03B5\u03B7\u03B9\u03BA\u03BC\u03BD\u03BF\u03C0\u03C1\u03C2\u03C3\u03C4\u03C5\u03C7\u03C9\u03D5\u{1D41A}\u{1D41C}\u{1D41E}\u{1D420}\u{1D426}\u{1D427}\u{1D428}\u{1D429}\u{1D42A}\u{1D42B}\u{1D42C}\u{1D42E}\u{1D42F}\u{1D430}\u{1D431}\u{1D432}\u{1D433}&quot;;
var talls = &quot;ABCDEFGHIJKLMNOPQRSTUVWXYZbdfhklt\u0391\u0392\u0393\u0394\u0395\u0396\u0397\u0398\u0399\u039A\u039B\u039C\u039D\u039E\u039F\u03A0\u03A1\u03A3\u03A4\u03A5\u03A6\u03A7\u03A8\u03A9\u03B2\u03B4\u03BB\u03B6\u03C6\u03B8\u03C8\u{1D400}\u{1D401}\u{1D402}\u{1D403}\u{1D404}\u{1D405}\u{1D406}\u{1D407}\u{1D408}\u{1D409}\u{1D40A}\u{1D40B}\u{1D40C}\u{1D40D}\u{1D40E}\u{1D40F}\u{1D410}\u{1D411}\u{1D412}\u{1D413}\u{1D414}\u{1D415}\u{1D416}\u{1D417}\u{1D418}\u{1D419}\u{1D41B}\u{1D41D}\u{1D41F}\u{1D421}\u{1D424}\u{1D425}\u{1D42D}&quot;;
var longSmalls = /* @__PURE__ */ new Set([
  &quot;\\alpha&quot;,
  &quot;\\gamma&quot;,
  &quot;\\delta&quot;,
  &quot;\\epsilon&quot;,
  &quot;\\eta&quot;,
  &quot;\\iota&quot;,
  &quot;\\kappa&quot;,
  &quot;\\mu&quot;,
  &quot;\\nu&quot;,
  &quot;\\pi&quot;,
  &quot;\\rho&quot;,
  &quot;\\sigma&quot;,
  &quot;\\tau&quot;,
  &quot;\\upsilon&quot;,
  &quot;\\chi&quot;,
  &quot;\\psi&quot;,
  &quot;\\omega&quot;,
  &quot;\\imath&quot;,
  &quot;\\jmath&quot;
]);
var longTalls = /* @__PURE__ */ new Set([
  &quot;\\Gamma&quot;,
  &quot;\\Delta&quot;,
  &quot;\\Sigma&quot;,
  &quot;\\Omega&quot;,
  &quot;\\beta&quot;,
  &quot;\\delta&quot;,
  &quot;\\lambda&quot;,
  &quot;\\theta&quot;,
  &quot;\\psi&quot;
]);
var mathmlBuilder$a = (group, style) =&gt; {
  const accentNode2 = group.isStretchy ? stretchy.accentNode(group) : new mathMLTree.MathNode(&quot;mo&quot;, [makeText(group.label, group.mode)]);
  if (group.label === &quot;\\vec&quot;) {
    accentNode2.style.transform = &quot;scale(0.75) translate(10%, 30%)&quot;;
  } else {
    accentNode2.style.mathStyle = &quot;normal&quot;;
    accentNode2.style.mathDepth = &quot;0&quot;;
    if (needWebkitShift.has(group.label) &amp;&amp; utils.isCharacterBox(group.base)) {
      let shift = &quot;&quot;;
      const ch = group.base.text;
      if (smalls.indexOf(ch) &gt; -1 || longSmalls.has(ch)) {
        shift = &quot;tml-xshift&quot;;
      }
      if (talls.indexOf(ch) &gt; -1 || longTalls.has(ch)) {
        shift = &quot;tml-capshift&quot;;
      }
      if (shift) {
        accentNode2.classes.push(shift);
      }
    }
  }
  if (!group.isStretchy) {
    accentNode2.setAttribute(&quot;stretchy&quot;, &quot;false&quot;);
  }
  const node = new mathMLTree.MathNode(
    group.label === &quot;\\c&quot; ? &quot;munder&quot; : &quot;mover&quot;,
    [buildGroup$1(group.base, style), accentNode2]
  );
  return node;
};
var nonStretchyAccents = /* @__PURE__ */ new Set([
  &quot;\\acute&quot;,
  &quot;\\grave&quot;,
  &quot;\\ddot&quot;,
  &quot;\\dddot&quot;,
  &quot;\\ddddot&quot;,
  &quot;\\tilde&quot;,
  &quot;\\bar&quot;,
  &quot;\\breve&quot;,
  &quot;\\check&quot;,
  &quot;\\hat&quot;,
  &quot;\\vec&quot;,
  &quot;\\dot&quot;,
  &quot;\\mathring&quot;
]);
var needWebkitShift = /* @__PURE__ */ new Set([
  &quot;\\acute&quot;,
  &quot;\\bar&quot;,
  &quot;\\breve&quot;,
  &quot;\\check&quot;,
  &quot;\\dot&quot;,
  &quot;\\ddot&quot;,
  &quot;\\grave&quot;,
  &quot;\\hat&quot;,
  &quot;\\mathring&quot;,
  &quot;\\&#039;&quot;,
  &quot;\\^&quot;,
  &quot;\\~&quot;,
  &quot;\\=&quot;,
  &quot;\\u&quot;,
  &quot;\\.&quot;,
  &#039;\\&quot;&#039;,
  &quot;\\r&quot;,
  &quot;\\H&quot;,
  &quot;\\v&quot;
]);
var combiningChar = {
  &quot;\\`&quot;: &quot;\u0300&quot;,
  &quot;\\&#039;&quot;: &quot;\u0301&quot;,
  &quot;\\^&quot;: &quot;\u0302&quot;,
  &quot;\\~&quot;: &quot;\u0303&quot;,
  &quot;\\=&quot;: &quot;\u0304&quot;,
  &quot;\\u&quot;: &quot;\u0306&quot;,
  &quot;\\.&quot;: &quot;\u0307&quot;,
  &#039;\\&quot;&#039;: &quot;\u0308&quot;,
  &quot;\\r&quot;: &quot;\u030A&quot;,
  &quot;\\H&quot;: &quot;\u030B&quot;,
  &quot;\\v&quot;: &quot;\u030C&quot;
};
defineFunction({
  type: &quot;accent&quot;,
  names: [
    &quot;\\acute&quot;,
    &quot;\\grave&quot;,
    &quot;\\ddot&quot;,
    &quot;\\dddot&quot;,
    &quot;\\ddddot&quot;,
    &quot;\\tilde&quot;,
    &quot;\\bar&quot;,
    &quot;\\breve&quot;,
    &quot;\\check&quot;,
    &quot;\\hat&quot;,
    &quot;\\vec&quot;,
    &quot;\\dot&quot;,
    &quot;\\mathring&quot;,
    &quot;\\overparen&quot;,
    &quot;\\widecheck&quot;,
    &quot;\\widehat&quot;,
    &quot;\\wideparen&quot;,
    &quot;\\widetilde&quot;,
    &quot;\\overrightarrow&quot;,
    &quot;\\overleftarrow&quot;,
    &quot;\\Overrightarrow&quot;,
    &quot;\\overleftrightarrow&quot;,
    &quot;\\overgroup&quot;,
    &quot;\\overleftharpoon&quot;,
    &quot;\\overrightharpoon&quot;
  ],
  props: {
    numArgs: 1
  },
  handler: (context, args) =&gt; {
    const base = normalizeArgument(args[0]);
    const isStretchy = !nonStretchyAccents.has(context.funcName);
    return {
      type: &quot;accent&quot;,
      mode: context.parser.mode,
      label: context.funcName,
      isStretchy,
      base
    };
  },
  mathmlBuilder: mathmlBuilder$a
});
defineFunction({
  type: &quot;accent&quot;,
  names: [&quot;\\&#039;&quot;, &quot;\\`&quot;, &quot;\\^&quot;, &quot;\\~&quot;, &quot;\\=&quot;, &quot;\\c&quot;, &quot;\\u&quot;, &quot;\\.&quot;, &#039;\\&quot;&#039;, &quot;\\r&quot;, &quot;\\H&quot;, &quot;\\v&quot;],
  props: {
    numArgs: 1,
    allowedInText: true,
    allowedInMath: true,
    argTypes: [&quot;primitive&quot;]
  },
  handler: (context, args) =&gt; {
    const base = normalizeArgument(args[0]);
    const mode = context.parser.mode;
    if (mode === &quot;math&quot; &amp;&amp; context.parser.settings.strict) {
      console.log(`Temml parse error: Command ${context.funcName} is invalid in math mode.`);
    }
    if (mode === &quot;text&quot; &amp;&amp; base.text &amp;&amp; base.text.length === 1 &amp;&amp; context.funcName in combiningChar &amp;&amp; smalls.indexOf(base.text) &gt; -1) {
      return {
        type: &quot;textord&quot;,
        mode: &quot;text&quot;,
        text: base.text + combiningChar[context.funcName]
      };
    } else {
      return {
        type: &quot;accent&quot;,
        mode,
        label: context.funcName,
        isStretchy: false,
        base
      };
    }
  },
  mathmlBuilder: mathmlBuilder$a
});
defineFunction({
  type: &quot;accentUnder&quot;,
  names: [
    &quot;\\underleftarrow&quot;,
    &quot;\\underrightarrow&quot;,
    &quot;\\underleftrightarrow&quot;,
    &quot;\\undergroup&quot;,
    &quot;\\underparen&quot;,
    &quot;\\utilde&quot;
  ],
  props: {
    numArgs: 1
  },
  handler: ({ parser, funcName }, args) =&gt; {
    const base = args[0];
    return {
      type: &quot;accentUnder&quot;,
      mode: parser.mode,
      label: funcName,
      base
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const accentNode2 = stretchy.accentNode(group);
    accentNode2.style[&quot;math-depth&quot;] = 0;
    const node = new mathMLTree.MathNode(&quot;munder&quot;, [
      buildGroup$1(group.base, style),
      accentNode2
    ]);
    return node;
  }
});
var ptPerUnit = {
  // Convert to CSS (Postscipt) points, not TeX points
  // https://en.wikibooks.org/wiki/LaTeX/Lengths and
  // https://tex.stackexchange.com/a/8263
  pt: 800 / 803,
  // convert TeX point to CSS (Postscript) point
  pc: 12 * 800 / 803,
  // pica
  dd: 1238 / 1157 * 800 / 803,
  // didot
  cc: 14856 / 1157 * 800 / 803,
  // cicero (12 didot)
  nd: 685 / 642 * 800 / 803,
  // new didot
  nc: 1370 / 107 * 800 / 803,
  // new cicero (12 new didot)
  sp: 1 / 65536 * 800 / 803,
  // scaled point (TeX&#039;s internal smallest unit)
  mm: 25.4 / 72,
  cm: 2.54 / 72,
  in: 1 / 72,
  px: 96 / 72
};
var validUnits = [
  &quot;em&quot;,
  &quot;ex&quot;,
  &quot;mu&quot;,
  &quot;pt&quot;,
  &quot;mm&quot;,
  &quot;cm&quot;,
  &quot;in&quot;,
  &quot;px&quot;,
  &quot;bp&quot;,
  &quot;pc&quot;,
  &quot;dd&quot;,
  &quot;cc&quot;,
  &quot;nd&quot;,
  &quot;nc&quot;,
  &quot;sp&quot;
];
var validUnit = function(unit) {
  if (typeof unit !== &quot;string&quot;) {
    unit = unit.unit;
  }
  return validUnits.indexOf(unit) &gt; -1;
};
var emScale = (styleLevel) =&gt; {
  const scriptLevel2 = Math.max(styleLevel - 1, 0);
  return [1, 0.7, 0.5][scriptLevel2];
};
var calculateSize = function(sizeValue, style) {
  let number = sizeValue.number;
  if (style.maxSize[0] &lt; 0 &amp;&amp; number &gt; 0) {
    return { number: 0, unit: &quot;em&quot; };
  }
  const unit = sizeValue.unit;
  switch (unit) {
    case &quot;mm&quot;:
    case &quot;cm&quot;:
    case &quot;in&quot;:
    case &quot;px&quot;: {
      const numInCssPts = number * ptPerUnit[unit];
      if (numInCssPts &gt; style.maxSize[1]) {
        return { number: style.maxSize[1], unit: &quot;pt&quot; };
      }
      return { number, unit };
    }
    case &quot;em&quot;:
    case &quot;ex&quot;: {
      if (unit === &quot;ex&quot;) {
        number *= 0.431;
      }
      number = Math.min(number / emScale(style.level), style.maxSize[0]);
      return { number: utils.round(number), unit: &quot;em&quot; };
    }
    case &quot;bp&quot;: {
      if (number &gt; style.maxSize[1]) {
        number = style.maxSize[1];
      }
      return { number, unit: &quot;pt&quot; };
    }
    case &quot;pt&quot;:
    case &quot;pc&quot;:
    case &quot;dd&quot;:
    case &quot;cc&quot;:
    case &quot;nd&quot;:
    case &quot;nc&quot;:
    case &quot;sp&quot;: {
      number = Math.min(number * ptPerUnit[unit], style.maxSize[1]);
      return { number: utils.round(number), unit: &quot;pt&quot; };
    }
    case &quot;mu&quot;: {
      number = Math.min(number / 18, style.maxSize[0]);
      return { number: utils.round(number), unit: &quot;em&quot; };
    }
    default:
      throw new ParseError(&quot;Invalid unit: &#039;&quot; + unit + &quot;&#039;&quot;);
  }
};
var padding$2 = (width) =&gt; {
  const node = new mathMLTree.MathNode(&quot;mspace&quot;);
  node.setAttribute(&quot;width&quot;, width + &quot;em&quot;);
  return node;
};
var paddedNode = (group, lspace = 0.3, rspace = 0, mustSmash = false) =&gt; {
  if (group == null &amp;&amp; rspace === 0) {
    return padding$2(lspace);
  }
  const row = group ? [group] : [];
  if (lspace !== 0) {
    row.unshift(padding$2(lspace));
  }
  if (rspace &gt; 0) {
    row.push(padding$2(rspace));
  }
  if (mustSmash) {
    const mpadded = new mathMLTree.MathNode(&quot;mpadded&quot;, row);
    mpadded.setAttribute(&quot;height&quot;, &quot;0&quot;);
    return mpadded;
  } else {
    return new mathMLTree.MathNode(&quot;mrow&quot;, row);
  }
};
var labelSize = (size, scriptLevel2) =&gt; Number(size) / emScale(scriptLevel2);
var munderoverNode = (fName, body, below, style) =&gt; {
  const arrowNode = stretchy.mathMLnode(fName);
  const isEq = fName.slice(1, 3) === &quot;eq&quot;;
  const minWidth = fName.charAt(1) === &quot;x&quot; ? &quot;1.75&quot; : fName.slice(2, 4) === &quot;cd&quot; ? &quot;3.0&quot; : isEq ? &quot;1.0&quot; : &quot;2.0&quot;;
  arrowNode.setAttribute(&quot;lspace&quot;, &quot;0&quot;);
  arrowNode.setAttribute(&quot;rspace&quot;, isEq ? &quot;0.5em&quot; : &quot;0&quot;);
  const labelStyle = style.withLevel(style.level &lt; 2 ? 2 : 3);
  const minArrowWidth = labelSize(minWidth, labelStyle.level);
  const dummyWidth = labelSize(minWidth, 3);
  const emptyLabel = paddedNode(null, minArrowWidth.toFixed(4), 0);
  const dummyNode = paddedNode(null, dummyWidth.toFixed(4), 0);
  const space = labelSize(isEq ? 0 : 0.3, labelStyle.level).toFixed(4);
  let upperNode;
  let lowerNode;
  const gotUpper = body &amp;&amp; body.body &amp;&amp; // \hphantom        visible content
  (body.body.body || body.body.length &gt; 0);
  if (gotUpper) {
    let label = buildGroup$1(body, labelStyle);
    const mustSmash = fName === &quot;\\\\cdrightarrow&quot; || fName === &quot;\\\\cdleftarrow&quot;;
    label = paddedNode(label, space, space, mustSmash);
    upperNode = new mathMLTree.MathNode(&quot;mover&quot;, [label, dummyNode]);
  }
  const gotLower = below &amp;&amp; below.body &amp;&amp; (below.body.body || below.body.length &gt; 0);
  if (gotLower) {
    let label = buildGroup$1(below, labelStyle);
    label = paddedNode(label, space, space);
    lowerNode = new mathMLTree.MathNode(&quot;munder&quot;, [label, dummyNode]);
  }
  let node;
  if (!gotUpper &amp;&amp; !gotLower) {
    node = new mathMLTree.MathNode(&quot;mover&quot;, [arrowNode, emptyLabel]);
  } else if (gotUpper &amp;&amp; gotLower) {
    node = new mathMLTree.MathNode(&quot;munderover&quot;, [arrowNode, lowerNode, upperNode]);
  } else if (gotUpper) {
    node = new mathMLTree.MathNode(&quot;mover&quot;, [arrowNode, upperNode]);
  } else {
    node = new mathMLTree.MathNode(&quot;munder&quot;, [arrowNode, lowerNode]);
  }
  if (minWidth === &quot;3.0&quot;) {
    node.style.height = &quot;1em&quot;;
  }
  node.setAttribute(&quot;accent&quot;, &quot;false&quot;);
  return node;
};
defineFunction({
  type: &quot;xArrow&quot;,
  names: [
    &quot;\\xleftarrow&quot;,
    &quot;\\xrightarrow&quot;,
    &quot;\\xLeftarrow&quot;,
    &quot;\\xRightarrow&quot;,
    &quot;\\xleftrightarrow&quot;,
    &quot;\\xLeftrightarrow&quot;,
    &quot;\\xhookleftarrow&quot;,
    &quot;\\xhookrightarrow&quot;,
    &quot;\\xmapsto&quot;,
    &quot;\\xrightharpoondown&quot;,
    &quot;\\xrightharpoonup&quot;,
    &quot;\\xleftharpoondown&quot;,
    &quot;\\xleftharpoonup&quot;,
    &quot;\\xlongequal&quot;,
    &quot;\\xtwoheadrightarrow&quot;,
    &quot;\\xtwoheadleftarrow&quot;,
    // The next 5 functions are here only to support mhchem
    &quot;\\yields&quot;,
    &quot;\\yieldsLeft&quot;,
    &quot;\\mesomerism&quot;,
    &quot;\\longrightharpoonup&quot;,
    &quot;\\longleftharpoondown&quot;,
    // The next 3 functions are here only to support the {CD} environment.
    &quot;\\\\cdrightarrow&quot;,
    &quot;\\\\cdleftarrow&quot;,
    &quot;\\\\cdlongequal&quot;
  ],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler({ parser, funcName }, args, optArgs) {
    return {
      type: &quot;xArrow&quot;,
      mode: parser.mode,
      name: funcName,
      body: args[0],
      below: optArgs[0]
    };
  },
  mathmlBuilder(group, style) {
    const node = munderoverNode(group.name, group.body, group.below, style);
    const row = [node];
    row.unshift(padding$2(0.2778));
    row.push(padding$2(0.2778));
    return new mathMLTree.MathNode(&quot;mrow&quot;, row);
  }
});
var arrowComponent = {
  &quot;\\xtofrom&quot;: [&quot;\\xrightarrow&quot;, &quot;\\xleftarrow&quot;],
  &quot;\\xleftrightharpoons&quot;: [&quot;\\xleftharpoonup&quot;, &quot;\\xrightharpoondown&quot;],
  &quot;\\xrightleftharpoons&quot;: [&quot;\\xrightharpoonup&quot;, &quot;\\xleftharpoondown&quot;],
  &quot;\\yieldsLeftRight&quot;: [&quot;\\yields&quot;, &quot;\\yieldsLeft&quot;],
  // The next three all get the same harpoon glyphs. Only the lengths and paddings differ.
  &quot;\\equilibrium&quot;: [&quot;\\longrightharpoonup&quot;, &quot;\\longleftharpoondown&quot;],
  &quot;\\equilibriumRight&quot;: [&quot;\\longrightharpoonup&quot;, &quot;\\eqleftharpoondown&quot;],
  &quot;\\equilibriumLeft&quot;: [&quot;\\eqrightharpoonup&quot;, &quot;\\longleftharpoondown&quot;]
};
defineFunction({
  type: &quot;stackedArrow&quot;,
  names: [
    &quot;\\xtofrom&quot;,
    // expfeil
    &quot;\\xleftrightharpoons&quot;,
    // mathtools
    &quot;\\xrightleftharpoons&quot;,
    // mathtools
    &quot;\\yieldsLeftRight&quot;,
    // mhchem
    &quot;\\equilibrium&quot;,
    // mhchem
    &quot;\\equilibriumRight&quot;,
    &quot;\\equilibriumLeft&quot;
  ],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler({ parser, funcName }, args, optArgs) {
    const lowerArrowBody = args[0] ? {
      type: &quot;hphantom&quot;,
      mode: parser.mode,
      body: args[0]
    } : null;
    const upperArrowBelow = optArgs[0] ? {
      type: &quot;hphantom&quot;,
      mode: parser.mode,
      body: optArgs[0]
    } : null;
    return {
      type: &quot;stackedArrow&quot;,
      mode: parser.mode,
      name: funcName,
      body: args[0],
      upperArrowBelow,
      lowerArrowBody,
      below: optArgs[0]
    };
  },
  mathmlBuilder(group, style) {
    const topLabel = arrowComponent[group.name][0];
    const botLabel = arrowComponent[group.name][1];
    const topArrow = munderoverNode(topLabel, group.body, group.upperArrowBelow, style);
    const botArrow = munderoverNode(botLabel, group.lowerArrowBody, group.below, style);
    let wrapper;
    const raiseNode = new mathMLTree.MathNode(&quot;mpadded&quot;, [topArrow]);
    raiseNode.setAttribute(&quot;voffset&quot;, &quot;0.3em&quot;);
    raiseNode.setAttribute(&quot;height&quot;, &quot;+0.3em&quot;);
    raiseNode.setAttribute(&quot;depth&quot;, &quot;-0.3em&quot;);
    if (group.name === &quot;\\equilibriumLeft&quot;) {
      const botNode = new mathMLTree.MathNode(&quot;mpadded&quot;, [botArrow]);
      botNode.setAttribute(&quot;width&quot;, &quot;0.5em&quot;);
      wrapper = new mathMLTree.MathNode(
        &quot;mpadded&quot;,
        [padding$2(0.2778), botNode, raiseNode, padding$2(0.2778)]
      );
    } else {
      raiseNode.setAttribute(&quot;width&quot;, group.name === &quot;\\equilibriumRight&quot; ? &quot;0.5em&quot; : &quot;0&quot;);
      wrapper = new mathMLTree.MathNode(
        &quot;mpadded&quot;,
        [padding$2(0.2778), raiseNode, botArrow, padding$2(0.2778)]
      );
    }
    wrapper.setAttribute(&quot;voffset&quot;, &quot;-0.18em&quot;);
    wrapper.setAttribute(&quot;height&quot;, &quot;-0.18em&quot;);
    wrapper.setAttribute(&quot;depth&quot;, &quot;+0.18em&quot;);
    return wrapper;
  }
});
function assertNodeType(node, type) {
  if (!node || node.type !== type) {
    throw new Error(
      `Expected node of type ${type}, but got ` + (node ? `node of type ${node.type}` : String(node))
    );
  }
  return node;
}
function assertSymbolNodeType(node) {
  const typedNode = checkSymbolNodeType(node);
  if (!typedNode) {
    throw new Error(
      `Expected node of symbol group type, but got ` + (node ? `node of type ${node.type}` : String(node))
    );
  }
  return typedNode;
}
function checkSymbolNodeType(node) {
  if (node &amp;&amp; (node.type === &quot;atom&quot; || Object.prototype.hasOwnProperty.call(NON_ATOMS, node.type))) {
    return node;
  }
  return null;
}
var cdArrowFunctionName = {
  &quot;&gt;&quot;: &quot;\\\\cdrightarrow&quot;,
  &quot;&lt;&quot;: &quot;\\\\cdleftarrow&quot;,
  &quot;=&quot;: &quot;\\\\cdlongequal&quot;,
  A: &quot;\\uparrow&quot;,
  V: &quot;\\downarrow&quot;,
  &quot;|&quot;: &quot;\\Vert&quot;,
  &quot;.&quot;: &quot;no arrow&quot;
};
var newCell = () =&gt; {
  return { type: &quot;styling&quot;, body: [], mode: &quot;math&quot;, scriptLevel: &quot;display&quot; };
};
var isStartOfArrow = (node) =&gt; {
  return node.type === &quot;textord&quot; &amp;&amp; node.text === &quot;@&quot;;
};
var isLabelEnd = (node, endChar) =&gt; {
  return (node.type === &quot;mathord&quot; || node.type === &quot;atom&quot;) &amp;&amp; node.text === endChar;
};
function cdArrow(arrowChar, labels, parser) {
  const funcName = cdArrowFunctionName[arrowChar];
  switch (funcName) {
    case &quot;\\\\cdrightarrow&quot;:
    case &quot;\\\\cdleftarrow&quot;:
      return parser.callFunction(funcName, [labels[0]], [labels[1]]);
    case &quot;\\uparrow&quot;:
    case &quot;\\downarrow&quot;: {
      const leftLabel = parser.callFunction(&quot;\\\\cdleft&quot;, [labels[0]], []);
      const bareArrow = {
        type: &quot;atom&quot;,
        text: funcName,
        mode: &quot;math&quot;,
        family: &quot;rel&quot;
      };
      const sizedArrow = parser.callFunction(&quot;\\Big&quot;, [bareArrow], []);
      const rightLabel = parser.callFunction(&quot;\\\\cdright&quot;, [labels[1]], []);
      const arrowGroup = {
        type: &quot;ordgroup&quot;,
        mode: &quot;math&quot;,
        body: [leftLabel, sizedArrow, rightLabel],
        semisimple: true
      };
      return parser.callFunction(&quot;\\\\cdparent&quot;, [arrowGroup], []);
    }
    case &quot;\\\\cdlongequal&quot;:
      return parser.callFunction(&quot;\\\\cdlongequal&quot;, [], []);
    case &quot;\\Vert&quot;: {
      const arrow = { type: &quot;textord&quot;, text: &quot;\\Vert&quot;, mode: &quot;math&quot; };
      return parser.callFunction(&quot;\\Big&quot;, [arrow], []);
    }
    default:
      return { type: &quot;textord&quot;, text: &quot; &quot;, mode: &quot;math&quot; };
  }
}
function parseCD(parser) {
  const parsedRows = [];
  parser.gullet.beginGroup();
  parser.gullet.macros.set(&quot;\\cr&quot;, &quot;\\\\\\relax&quot;);
  parser.gullet.beginGroup();
  while (true) {
    parsedRows.push(parser.parseExpression(false, &quot;\\\\&quot;));
    parser.gullet.endGroup();
    parser.gullet.beginGroup();
    const next = parser.fetch().text;
    if (next === &quot;&amp;&quot; || next === &quot;\\\\&quot;) {
      parser.consume();
    } else if (next === &quot;\\end&quot;) {
      if (parsedRows[parsedRows.length - 1].length === 0) {
        parsedRows.pop();
      }
      break;
    } else {
      throw new ParseError(&quot;Expected \\\\ or \\cr or \\end&quot;, parser.nextToken);
    }
  }
  let row = [];
  const body = [row];
  for (let i = 0; i &lt; parsedRows.length; i++) {
    const rowNodes = parsedRows[i];
    let cell = newCell();
    for (let j = 0; j &lt; rowNodes.length; j++) {
      if (!isStartOfArrow(rowNodes[j])) {
        cell.body.push(rowNodes[j]);
      } else {
        row.push(cell);
        j += 1;
        const arrowChar = assertSymbolNodeType(rowNodes[j]).text;
        const labels = new Array(2);
        labels[0] = { type: &quot;ordgroup&quot;, mode: &quot;math&quot;, body: [] };
        labels[1] = { type: &quot;ordgroup&quot;, mode: &quot;math&quot;, body: [] };
        if (&quot;=|.&quot;.indexOf(arrowChar) &gt; -1) ;
        else if (&quot;&lt;&gt;AV&quot;.indexOf(arrowChar) &gt; -1) {
          for (let labelNum = 0; labelNum &lt; 2; labelNum++) {
            let inLabel = true;
            for (let k = j + 1; k &lt; rowNodes.length; k++) {
              if (isLabelEnd(rowNodes[k], arrowChar)) {
                inLabel = false;
                j = k;
                break;
              }
              if (isStartOfArrow(rowNodes[k])) {
                throw new ParseError(
                  &quot;Missing a &quot; + arrowChar + &quot; character to complete a CD arrow.&quot;,
                  rowNodes[k]
                );
              }
              labels[labelNum].body.push(rowNodes[k]);
            }
            if (inLabel) {
              throw new ParseError(
                &quot;Missing a &quot; + arrowChar + &quot; character to complete a CD arrow.&quot;,
                rowNodes[j]
              );
            }
          }
        } else {
          throw new ParseError(`Expected one of &quot;&lt;&gt;AV=|.&quot; after @.`);
        }
        const arrow = cdArrow(arrowChar, labels, parser);
        row.push(arrow);
        cell = newCell();
      }
    }
    if (i % 2 === 0) {
      row.push(cell);
    } else {
      row.shift();
    }
    row = [];
    body.push(row);
  }
  body.pop();
  parser.gullet.endGroup();
  parser.gullet.endGroup();
  return {
    type: &quot;array&quot;,
    mode: &quot;math&quot;,
    body,
    tags: null,
    labels: new Array(body.length + 1).fill(&quot;&quot;),
    envClasses: [&quot;jot&quot;, &quot;cd&quot;],
    cols: [],
    hLinesBeforeRow: new Array(body.length + 1).fill([])
  };
}
defineFunction({
  type: &quot;cdlabel&quot;,
  names: [&quot;\\\\cdleft&quot;, &quot;\\\\cdright&quot;],
  props: {
    numArgs: 1
  },
  handler({ parser, funcName }, args) {
    return {
      type: &quot;cdlabel&quot;,
      mode: parser.mode,
      side: funcName.slice(4),
      label: args[0]
    };
  },
  mathmlBuilder(group, style) {
    if (group.label.body.length === 0) {
      return new mathMLTree.MathNode(&quot;mrow&quot;, style);
    }
    const mtd = new mathMLTree.MathNode(&quot;mtd&quot;, [buildGroup$1(group.label, style)]);
    mtd.style.padding = &quot;0&quot;;
    const mtr = new mathMLTree.MathNode(&quot;mtr&quot;, [mtd]);
    const mtable = new mathMLTree.MathNode(&quot;mtable&quot;, [mtr]);
    const label = new mathMLTree.MathNode(&quot;mpadded&quot;, [mtable]);
    label.setAttribute(&quot;width&quot;, &quot;0&quot;);
    label.setAttribute(&quot;displaystyle&quot;, &quot;false&quot;);
    label.setAttribute(&quot;scriptlevel&quot;, &quot;1&quot;);
    if (group.side === &quot;left&quot;) {
      label.style.display = &quot;flex&quot;;
      label.style.justifyContent = &quot;flex-end&quot;;
    }
    return label;
  }
});
defineFunction({
  type: &quot;cdlabelparent&quot;,
  names: [&quot;\\\\cdparent&quot;],
  props: {
    numArgs: 1
  },
  handler({ parser }, args) {
    return {
      type: &quot;cdlabelparent&quot;,
      mode: parser.mode,
      fragment: args[0]
    };
  },
  mathmlBuilder(group, style) {
    return new mathMLTree.MathNode(&quot;mrow&quot;, [buildGroup$1(group.fragment, style)]);
  }
});
defineFunction({
  type: &quot;textord&quot;,
  names: [&quot;\\@char&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler({ parser, token }, args) {
    const arg = assertNodeType(args[0], &quot;ordgroup&quot;);
    const group = arg.body;
    let number = &quot;&quot;;
    for (let i = 0; i &lt; group.length; i++) {
      const node = assertNodeType(group[i], &quot;textord&quot;);
      number += node.text;
    }
    const code = parseInt(number);
    if (isNaN(code)) {
      throw new ParseError(`\\@char has non-numeric argument ${number}`, token);
    }
    return {
      type: &quot;textord&quot;,
      mode: parser.mode,
      text: String.fromCodePoint(code)
    };
  }
});
var htmlRegEx = /^(#[a-f0-9]{3}|#?[a-f0-9]{6})$/i;
var htmlOrNameRegEx = /^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i;
var RGBregEx = /^ *\d{1,3} *(?:, *\d{1,3} *){2}$/;
var rgbRegEx = /^ *[10](?:\.\d*)? *(?:, *[10](?:\.\d*)? *){2}$/;
var xcolorHtmlRegEx = /^[a-f0-9]{6}$/i;
var toHex = (num) =&gt; {
  let str = num.toString(16);
  if (str.length === 1) {
    str = &quot;0&quot; + str;
  }
  return str;
};
var xcolors = JSON.parse(`{
  &quot;Apricot&quot;: &quot;#ffb484&quot;,
  &quot;Aquamarine&quot;: &quot;#08b4bc&quot;,
  &quot;Bittersweet&quot;: &quot;#c84c14&quot;,
  &quot;blue&quot;: &quot;#0000FF&quot;,
  &quot;Blue&quot;: &quot;#303494&quot;,
  &quot;BlueGreen&quot;: &quot;#08b4bc&quot;,
  &quot;BlueViolet&quot;: &quot;#503c94&quot;,
  &quot;BrickRed&quot;: &quot;#b8341c&quot;,
  &quot;brown&quot;: &quot;#BF8040&quot;,
  &quot;Brown&quot;: &quot;#802404&quot;,
  &quot;BurntOrange&quot;: &quot;#f8941c&quot;,
  &quot;CadetBlue&quot;: &quot;#78749c&quot;,
  &quot;CarnationPink&quot;: &quot;#f884b4&quot;,
  &quot;Cerulean&quot;: &quot;#08a4e4&quot;,
  &quot;CornflowerBlue&quot;: &quot;#40ace4&quot;,
  &quot;cyan&quot;: &quot;#00FFFF&quot;,
  &quot;Cyan&quot;: &quot;#08acec&quot;,
  &quot;Dandelion&quot;: &quot;#ffbc44&quot;,
  &quot;darkgray&quot;: &quot;#404040&quot;,
  &quot;DarkOrchid&quot;: &quot;#a8548c&quot;,
  &quot;Emerald&quot;: &quot;#08ac9c&quot;,
  &quot;ForestGreen&quot;: &quot;#089c54&quot;,
  &quot;Fuchsia&quot;: &quot;#90348c&quot;,
  &quot;Goldenrod&quot;: &quot;#ffdc44&quot;,
  &quot;gray&quot;: &quot;#808080&quot;,
  &quot;Gray&quot;: &quot;#98949c&quot;,
  &quot;green&quot;: &quot;#00FF00&quot;,
  &quot;Green&quot;: &quot;#08a44c&quot;,
  &quot;GreenYellow&quot;: &quot;#e0e474&quot;,
  &quot;JungleGreen&quot;: &quot;#08ac9c&quot;,
  &quot;Lavender&quot;: &quot;#f89cc4&quot;,
  &quot;lightgray&quot;: &quot;#c0c0c0&quot;,
  &quot;lime&quot;: &quot;#BFFF00&quot;,
  &quot;LimeGreen&quot;: &quot;#90c43c&quot;,
  &quot;magenta&quot;: &quot;#FF00FF&quot;,
  &quot;Magenta&quot;: &quot;#f0048c&quot;,
  &quot;Mahogany&quot;: &quot;#b0341c&quot;,
  &quot;Maroon&quot;: &quot;#b03434&quot;,
  &quot;Melon&quot;: &quot;#f89c7c&quot;,
  &quot;MidnightBlue&quot;: &quot;#086494&quot;,
  &quot;Mulberry&quot;: &quot;#b03c94&quot;,
  &quot;NavyBlue&quot;: &quot;#086cbc&quot;,
  &quot;olive&quot;: &quot;#7F7F00&quot;,
  &quot;OliveGreen&quot;: &quot;#407c34&quot;,
  &quot;orange&quot;: &quot;#FF8000&quot;,
  &quot;Orange&quot;: &quot;#f8843c&quot;,
  &quot;OrangeRed&quot;: &quot;#f0145c&quot;,
  &quot;Orchid&quot;: &quot;#b074ac&quot;,
  &quot;Peach&quot;: &quot;#f8945c&quot;,
  &quot;Periwinkle&quot;: &quot;#8074bc&quot;,
  &quot;PineGreen&quot;: &quot;#088c74&quot;,
  &quot;pink&quot;: &quot;#ff7f7f&quot;,
  &quot;Plum&quot;: &quot;#98248c&quot;,
  &quot;ProcessBlue&quot;: &quot;#08b4ec&quot;,
  &quot;purple&quot;: &quot;#BF0040&quot;,
  &quot;Purple&quot;: &quot;#a0449c&quot;,
  &quot;RawSienna&quot;: &quot;#983c04&quot;,
  &quot;red&quot;: &quot;#ff0000&quot;,
  &quot;Red&quot;: &quot;#f01c24&quot;,
  &quot;RedOrange&quot;: &quot;#f86434&quot;,
  &quot;RedViolet&quot;: &quot;#a0246c&quot;,
  &quot;Rhodamine&quot;: &quot;#f0549c&quot;,
  &quot;Royallue&quot;: &quot;#0874bc&quot;,
  &quot;RoyalPurple&quot;: &quot;#683c9c&quot;,
  &quot;RubineRed&quot;: &quot;#f0047c&quot;,
  &quot;Salmon&quot;: &quot;#f8948c&quot;,
  &quot;SeaGreen&quot;: &quot;#30bc9c&quot;,
  &quot;Sepia&quot;: &quot;#701404&quot;,
  &quot;SkyBlue&quot;: &quot;#48c4dc&quot;,
  &quot;SpringGreen&quot;: &quot;#c8dc64&quot;,
  &quot;Tan&quot;: &quot;#e09c74&quot;,
  &quot;teal&quot;: &quot;#007F7F&quot;,
  &quot;TealBlue&quot;: &quot;#08acb4&quot;,
  &quot;Thistle&quot;: &quot;#d884b4&quot;,
  &quot;Turquoise&quot;: &quot;#08b4cc&quot;,
  &quot;violet&quot;: &quot;#800080&quot;,
  &quot;Violet&quot;: &quot;#60449c&quot;,
  &quot;VioletRed&quot;: &quot;#f054a4&quot;,
  &quot;WildStrawberry&quot;: &quot;#f0246c&quot;,
  &quot;yellow&quot;: &quot;#FFFF00&quot;,
  &quot;Yellow&quot;: &quot;#fff404&quot;,
  &quot;YellowGreen&quot;: &quot;#98cc6c&quot;,
  &quot;YellowOrange&quot;: &quot;#ffa41c&quot;
}`);
var colorFromSpec = (model, spec) =&gt; {
  let color = &quot;&quot;;
  if (model === &quot;HTML&quot;) {
    if (!htmlRegEx.test(spec)) {
      throw new ParseError(&quot;Invalid HTML input.&quot;);
    }
    color = spec;
  } else if (model === &quot;RGB&quot;) {
    if (!RGBregEx.test(spec)) {
      throw new ParseError(&quot;Invalid RGB input.&quot;);
    }
    spec.split(&quot;,&quot;).map((e) =&gt; {
      color += toHex(Number(e.trim()));
    });
  } else {
    if (!rgbRegEx.test(spec)) {
      throw new ParseError(&quot;Invalid rbg input.&quot;);
    }
    spec.split(&quot;,&quot;).map((e) =&gt; {
      const num = Number(e.trim());
      if (num &gt; 1) {
        throw new ParseError(&quot;Color rgb input must be &lt; 1.&quot;);
      }
      color += toHex(Number((num * 255).toFixed(0)));
    });
  }
  if (color.charAt(0) !== &quot;#&quot;) {
    color = &quot;#&quot; + color;
  }
  return color;
};
var validateColor = (color, macros2, token) =&gt; {
  const macroName = `\\\\color@${color}`;
  const match = htmlOrNameRegEx.exec(color);
  if (!match) {
    throw new ParseError(&quot;Invalid color: &#039;&quot; + color + &quot;&#039;&quot;, token);
  }
  if (xcolorHtmlRegEx.test(color)) {
    return &quot;#&quot; + color;
  } else if (color.charAt(0) === &quot;#&quot;) {
    return color;
  } else if (macros2.has(macroName)) {
    color = macros2.get(macroName).tokens[0].text;
  } else if (xcolors[color]) {
    color = xcolors[color];
  }
  return color;
};
var mathmlBuilder$9 = (group, style) =&gt; {
  let expr = buildExpression(group.body, style.withColor(group.color));
  expr = expr.map((e) =&gt; {
    e.style.color = group.color;
    return e;
  });
  return mathMLTree.newDocumentFragment(expr);
};
defineFunction({
  type: &quot;color&quot;,
  names: [&quot;\\textcolor&quot;],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: [&quot;raw&quot;, &quot;raw&quot;, &quot;original&quot;]
  },
  handler({ parser, token }, args, optArgs) {
    const model = optArgs[0] &amp;&amp; assertNodeType(optArgs[0], &quot;raw&quot;).string;
    let color = &quot;&quot;;
    if (model) {
      const spec = assertNodeType(args[0], &quot;raw&quot;).string;
      color = colorFromSpec(model, spec);
    } else {
      color = validateColor(assertNodeType(args[0], &quot;raw&quot;).string, parser.gullet.macros, token);
    }
    const body = args[1];
    return {
      type: &quot;color&quot;,
      mode: parser.mode,
      color,
      isTextColor: true,
      body: ordargument(body)
    };
  },
  mathmlBuilder: mathmlBuilder$9
});
defineFunction({
  type: &quot;color&quot;,
  names: [&quot;\\color&quot;],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: [&quot;raw&quot;, &quot;raw&quot;]
  },
  handler({ parser, breakOnTokenText, token }, args, optArgs) {
    const model = optArgs[0] &amp;&amp; assertNodeType(optArgs[0], &quot;raw&quot;).string;
    let color = &quot;&quot;;
    if (model) {
      const spec = assertNodeType(args[0], &quot;raw&quot;).string;
      color = colorFromSpec(model, spec);
    } else {
      color = validateColor(assertNodeType(args[0], &quot;raw&quot;).string, parser.gullet.macros, token);
    }
    const body = parser.parseExpression(true, breakOnTokenText, true);
    return {
      type: &quot;color&quot;,
      mode: parser.mode,
      color,
      isTextColor: false,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$9
});
defineFunction({
  type: &quot;color&quot;,
  names: [&quot;\\definecolor&quot;],
  props: {
    numArgs: 3,
    allowedInText: true,
    argTypes: [&quot;raw&quot;, &quot;raw&quot;, &quot;raw&quot;]
  },
  handler({ parser, funcName, token }, args) {
    const name = assertNodeType(args[0], &quot;raw&quot;).string;
    if (!/^[A-Za-z]+$/.test(name)) {
      throw new ParseError(&quot;Color name must be latin letters.&quot;, token);
    }
    const model = assertNodeType(args[1], &quot;raw&quot;).string;
    if (![&quot;HTML&quot;, &quot;RGB&quot;, &quot;rgb&quot;].includes(model)) {
      throw new ParseError(&quot;Color model must be HTML, RGB, or rgb.&quot;, token);
    }
    const spec = assertNodeType(args[2], &quot;raw&quot;).string;
    const color = colorFromSpec(model, spec);
    parser.gullet.macros.set(`\\\\color@${name}`, { tokens: [{ text: color }], numArgs: 0 });
    return { type: &quot;internal&quot;, mode: parser.mode };
  }
  // No mathmlBuilder. The point of \definecolor is to set a macro.
});
defineFunction({
  type: &quot;cr&quot;,
  names: [&quot;\\\\&quot;],
  props: {
    numArgs: 0,
    numOptionalArgs: 0,
    allowedInText: true
  },
  handler({ parser }, args, optArgs) {
    const size = parser.gullet.future().text === &quot;[&quot; ? parser.parseSizeGroup(true) : null;
    const newLine = !parser.settings.displayMode;
    return {
      type: &quot;cr&quot;,
      mode: parser.mode,
      newLine,
      size: size &amp;&amp; assertNodeType(size, &quot;size&quot;).value
    };
  },
  // The following builder is called only at the top level,
  // not within tabular/array environments.
  mathmlBuilder(group, style) {
    const node = new mathMLTree.MathNode(&quot;mo&quot;);
    if (group.newLine) {
      node.setAttribute(&quot;linebreak&quot;, &quot;newline&quot;);
      if (group.size) {
        const size = calculateSize(group.size, style);
        node.setAttribute(&quot;height&quot;, size.number + size.unit);
      }
    }
    return node;
  }
});
var globalMap = {
  &quot;\\global&quot;: &quot;\\global&quot;,
  &quot;\\long&quot;: &quot;\\\\globallong&quot;,
  &quot;\\\\globallong&quot;: &quot;\\\\globallong&quot;,
  &quot;\\def&quot;: &quot;\\gdef&quot;,
  &quot;\\gdef&quot;: &quot;\\gdef&quot;,
  &quot;\\edef&quot;: &quot;\\xdef&quot;,
  &quot;\\xdef&quot;: &quot;\\xdef&quot;,
  &quot;\\let&quot;: &quot;\\\\globallet&quot;,
  &quot;\\futurelet&quot;: &quot;\\\\globalfuture&quot;
};
var checkControlSequence = (tok) =&gt; {
  const name = tok.text;
  if (/^(?:[\\{}$&amp;#^_]|EOF)$/.test(name)) {
    throw new ParseError(&quot;Expected a control sequence&quot;, tok);
  }
  return name;
};
var getRHS = (parser) =&gt; {
  let tok = parser.gullet.popToken();
  if (tok.text === &quot;=&quot;) {
    tok = parser.gullet.popToken();
    if (tok.text === &quot; &quot;) {
      tok = parser.gullet.popToken();
    }
  }
  return tok;
};
var letCommand = (parser, name, tok, global) =&gt; {
  let macro = parser.gullet.macros.get(tok.text);
  if (macro == null) {
    tok.noexpand = true;
    macro = {
      tokens: [tok],
      numArgs: 0,
      // reproduce the same behavior in expansion
      unexpandable: !parser.gullet.isExpandable(tok.text)
    };
  }
  parser.gullet.macros.set(name, macro, global);
};
defineFunction({
  type: &quot;internal&quot;,
  names: [
    &quot;\\global&quot;,
    &quot;\\long&quot;,
    &quot;\\\\globallong&quot;
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler({ parser, funcName }) {
    parser.consumeSpaces();
    const token = parser.fetch();
    if (globalMap[token.text]) {
      if (funcName === &quot;\\global&quot; || funcName === &quot;\\\\globallong&quot;) {
        token.text = globalMap[token.text];
      }
      return assertNodeType(parser.parseFunction(), &quot;internal&quot;);
    }
    throw new ParseError(`Invalid token after macro prefix`, token);
  }
});
defineFunction({
  type: &quot;internal&quot;,
  names: [&quot;\\def&quot;, &quot;\\gdef&quot;, &quot;\\edef&quot;, &quot;\\xdef&quot;],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    let tok = parser.gullet.popToken();
    const name = tok.text;
    if (/^(?:[\\{}$&amp;#^_]|EOF)$/.test(name)) {
      throw new ParseError(&quot;Expected a control sequence&quot;, tok);
    }
    let numArgs = 0;
    let insert;
    const delimiters2 = [[]];
    while (parser.gullet.future().text !== &quot;{&quot;) {
      tok = parser.gullet.popToken();
      if (tok.text === &quot;#&quot;) {
        if (parser.gullet.future().text === &quot;{&quot;) {
          insert = parser.gullet.future();
          delimiters2[numArgs].push(&quot;{&quot;);
          break;
        }
        tok = parser.gullet.popToken();
        if (!/^[1-9]$/.test(tok.text)) {
          throw new ParseError(`Invalid argument number &quot;${tok.text}&quot;`);
        }
        if (parseInt(tok.text) !== numArgs + 1) {
          throw new ParseError(`Argument number &quot;${tok.text}&quot; out of order`);
        }
        numArgs++;
        delimiters2.push([]);
      } else if (tok.text === &quot;EOF&quot;) {
        throw new ParseError(&quot;Expected a macro definition&quot;);
      } else {
        delimiters2[numArgs].push(tok.text);
      }
    }
    let { tokens } = parser.gullet.consumeArg();
    if (insert) {
      tokens.unshift(insert);
    }
    if (funcName === &quot;\\edef&quot; || funcName === &quot;\\xdef&quot;) {
      tokens = parser.gullet.expandTokens(tokens);
      if (tokens.length &gt; parser.gullet.settings.maxExpand) {
        throw new ParseError(&quot;Too many expansions in an &quot; + funcName);
      }
      tokens.reverse();
    }
    parser.gullet.macros.set(
      name,
      { tokens, numArgs, delimiters: delimiters2 },
      funcName === globalMap[funcName]
    );
    return { type: &quot;internal&quot;, mode: parser.mode };
  }
});
defineFunction({
  type: &quot;internal&quot;,
  names: [
    &quot;\\let&quot;,
    &quot;\\\\globallet&quot;
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    const name = checkControlSequence(parser.gullet.popToken());
    parser.gullet.consumeSpaces();
    const tok = getRHS(parser);
    letCommand(parser, name, tok, funcName === &quot;\\\\globallet&quot;);
    return { type: &quot;internal&quot;, mode: parser.mode };
  }
});
defineFunction({
  type: &quot;internal&quot;,
  names: [
    &quot;\\futurelet&quot;,
    &quot;\\\\globalfuture&quot;
    // can’t be entered directly
  ],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    const name = checkControlSequence(parser.gullet.popToken());
    const middle = parser.gullet.popToken();
    const tok = parser.gullet.popToken();
    letCommand(parser, name, tok, funcName === &quot;\\\\globalfuture&quot;);
    parser.gullet.pushToken(tok);
    parser.gullet.pushToken(middle);
    return { type: &quot;internal&quot;, mode: parser.mode };
  }
});
defineFunction({
  type: &quot;internal&quot;,
  names: [&quot;\\newcommand&quot;, &quot;\\renewcommand&quot;, &quot;\\providecommand&quot;],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ parser, funcName }) {
    let name = &quot;&quot;;
    const tok = parser.gullet.popToken();
    if (tok.text === &quot;{&quot;) {
      name = checkControlSequence(parser.gullet.popToken());
      parser.gullet.popToken();
    } else {
      name = checkControlSequence(tok);
    }
    const exists = parser.gullet.isDefined(name);
    if (exists &amp;&amp; funcName === &quot;\\newcommand&quot;) {
      throw new ParseError(
        `\\newcommand{${name}} attempting to redefine ${name}; use \\renewcommand`
      );
    }
    if (!exists &amp;&amp; funcName === &quot;\\renewcommand&quot;) {
      throw new ParseError(
        `\\renewcommand{${name}} when command ${name} does not yet exist; use \\newcommand`
      );
    }
    let numArgs = 0;
    if (parser.gullet.future().text === &quot;[&quot;) {
      let tok2 = parser.gullet.popToken();
      tok2 = parser.gullet.popToken();
      if (!/^[0-9]$/.test(tok2.text)) {
        throw new ParseError(`Invalid number of arguments: &quot;${tok2.text}&quot;`);
      }
      numArgs = parseInt(tok2.text);
      tok2 = parser.gullet.popToken();
      if (tok2.text !== &quot;]&quot;) {
        throw new ParseError(`Invalid argument &quot;${tok2.text}&quot;`);
      }
    }
    const { tokens } = parser.gullet.consumeArg();
    if (!(funcName === &quot;\\providecommand&quot; &amp;&amp; parser.gullet.macros.has(name))) {
      parser.gullet.macros.set(
        name,
        { tokens, numArgs }
      );
    }
    return { type: &quot;internal&quot;, mode: parser.mode };
  }
});
var delimiterSizes = {
  &quot;\\bigl&quot;: { mclass: &quot;mopen&quot;, size: 1 },
  &quot;\\Bigl&quot;: { mclass: &quot;mopen&quot;, size: 2 },
  &quot;\\biggl&quot;: { mclass: &quot;mopen&quot;, size: 3 },
  &quot;\\Biggl&quot;: { mclass: &quot;mopen&quot;, size: 4 },
  &quot;\\bigr&quot;: { mclass: &quot;mclose&quot;, size: 1 },
  &quot;\\Bigr&quot;: { mclass: &quot;mclose&quot;, size: 2 },
  &quot;\\biggr&quot;: { mclass: &quot;mclose&quot;, size: 3 },
  &quot;\\Biggr&quot;: { mclass: &quot;mclose&quot;, size: 4 },
  &quot;\\bigm&quot;: { mclass: &quot;mrel&quot;, size: 1 },
  &quot;\\Bigm&quot;: { mclass: &quot;mrel&quot;, size: 2 },
  &quot;\\biggm&quot;: { mclass: &quot;mrel&quot;, size: 3 },
  &quot;\\Biggm&quot;: { mclass: &quot;mrel&quot;, size: 4 },
  &quot;\\big&quot;: { mclass: &quot;mord&quot;, size: 1 },
  &quot;\\Big&quot;: { mclass: &quot;mord&quot;, size: 2 },
  &quot;\\bigg&quot;: { mclass: &quot;mord&quot;, size: 3 },
  &quot;\\Bigg&quot;: { mclass: &quot;mord&quot;, size: 4 }
};
var delimiters = [
  &quot;(&quot;,
  &quot;\\lparen&quot;,
  &quot;)&quot;,
  &quot;\\rparen&quot;,
  &quot;[&quot;,
  &quot;\\lbrack&quot;,
  &quot;]&quot;,
  &quot;\\rbrack&quot;,
  &quot;\\{&quot;,
  &quot;\\lbrace&quot;,
  &quot;\\}&quot;,
  &quot;\\rbrace&quot;,
  &quot;\u2987&quot;,
  &quot;\\llparenthesis&quot;,
  &quot;\u2988&quot;,
  &quot;\\rrparenthesis&quot;,
  &quot;\\lfloor&quot;,
  &quot;\\rfloor&quot;,
  &quot;\u230A&quot;,
  &quot;\u230B&quot;,
  &quot;\\lceil&quot;,
  &quot;\\rceil&quot;,
  &quot;\u2308&quot;,
  &quot;\u2309&quot;,
  &quot;&lt;&quot;,
  &quot;&gt;&quot;,
  &quot;\\langle&quot;,
  &quot;\u27E8&quot;,
  &quot;\\rangle&quot;,
  &quot;\u27E9&quot;,
  &quot;\\lAngle&quot;,
  &quot;\u27EA&quot;,
  &quot;\\rAngle&quot;,
  &quot;\u27EB&quot;,
  &quot;\\llangle&quot;,
  &quot;\u2989&quot;,
  &quot;\\rrangle&quot;,
  &quot;\u298A&quot;,
  &quot;\\lt&quot;,
  &quot;\\gt&quot;,
  &quot;\\lvert&quot;,
  &quot;\\rvert&quot;,
  &quot;\\lVert&quot;,
  &quot;\\rVert&quot;,
  &quot;\\lgroup&quot;,
  &quot;\\rgroup&quot;,
  &quot;\u27EE&quot;,
  &quot;\u27EF&quot;,
  &quot;\\lmoustache&quot;,
  &quot;\\rmoustache&quot;,
  &quot;\u23B0&quot;,
  &quot;\u23B1&quot;,
  &quot;\\llbracket&quot;,
  &quot;\\rrbracket&quot;,
  &quot;\u27E6&quot;,
  &quot;\u27E6&quot;,
  &quot;\\lBrace&quot;,
  &quot;\\rBrace&quot;,
  &quot;\u2983&quot;,
  &quot;\u2984&quot;,
  &quot;/&quot;,
  &quot;\\backslash&quot;,
  &quot;|&quot;,
  &quot;\\vert&quot;,
  &quot;\\|&quot;,
  &quot;\\Vert&quot;,
  &quot;\u2016&quot;,
  &quot;\\uparrow&quot;,
  &quot;\\Uparrow&quot;,
  &quot;\\downarrow&quot;,
  &quot;\\Downarrow&quot;,
  &quot;\\updownarrow&quot;,
  &quot;\\Updownarrow&quot;,
  &quot;.&quot;
];
var dels = [&quot;}&quot;, &quot;\\left&quot;, &quot;\\middle&quot;, &quot;\\right&quot;];
var isDelimiter = (str) =&gt; str.length &gt; 0 &amp;&amp; (delimiters.includes(str) || delimiterSizes[str] || dels.includes(str));
var sizeToMaxHeight = [0, 1.2, 1.8, 2.4, 3];
function checkDelimiter(delim, context) {
  const symDelim = checkSymbolNodeType(delim);
  if (symDelim &amp;&amp; delimiters.includes(symDelim.text)) {
    if ([&quot;&lt;&quot;, &quot;\\lt&quot;].includes(symDelim.text)) {
      symDelim.text = &quot;\u27E8&quot;;
    }
    if ([&quot;&gt;&quot;, &quot;\\gt&quot;].includes(symDelim.text)) {
      symDelim.text = &quot;\u27E9&quot;;
    }
    return symDelim;
  } else if (symDelim) {
    throw new ParseError(`Invalid delimiter &#039;${symDelim.text}&#039; after &#039;${context.funcName}&#039;`, delim);
  } else {
    throw new ParseError(`Invalid delimiter type &#039;${delim.type}&#039;`, delim);
  }
}
var needExplicitStretch = [&quot;/&quot;, &quot;\\&quot;, &quot;\\backslash&quot;, &quot;\\vert&quot;, &quot;|&quot;];
defineFunction({
  type: &quot;delimsizing&quot;,
  names: [
    &quot;\\bigl&quot;,
    &quot;\\Bigl&quot;,
    &quot;\\biggl&quot;,
    &quot;\\Biggl&quot;,
    &quot;\\bigr&quot;,
    &quot;\\Bigr&quot;,
    &quot;\\biggr&quot;,
    &quot;\\Biggr&quot;,
    &quot;\\bigm&quot;,
    &quot;\\Bigm&quot;,
    &quot;\\biggm&quot;,
    &quot;\\Biggm&quot;,
    &quot;\\big&quot;,
    &quot;\\Big&quot;,
    &quot;\\bigg&quot;,
    &quot;\\Bigg&quot;
  ],
  props: {
    numArgs: 1,
    argTypes: [&quot;primitive&quot;]
  },
  handler: (context, args) =&gt; {
    const delim = checkDelimiter(args[0], context);
    return {
      type: &quot;delimsizing&quot;,
      mode: context.parser.mode,
      size: delimiterSizes[context.funcName].size,
      mclass: delimiterSizes[context.funcName].mclass,
      delim: delim.text
    };
  },
  mathmlBuilder: (group) =&gt; {
    const children = [];
    if (group.delim === &quot;.&quot;) {
      group.delim = &quot;&quot;;
    }
    children.push(makeText(group.delim, group.mode));
    const node = new mathMLTree.MathNode(&quot;mo&quot;, children);
    if (group.mclass === &quot;mopen&quot; || group.mclass === &quot;mclose&quot;) {
      node.setAttribute(&quot;fence&quot;, &quot;true&quot;);
    } else {
      node.setAttribute(&quot;fence&quot;, &quot;false&quot;);
    }
    if (needExplicitStretch.includes(group.delim) || group.delim.indexOf(&quot;arrow&quot;) &gt; -1) {
      node.setAttribute(&quot;stretchy&quot;, &quot;true&quot;);
    }
    node.setAttribute(&quot;symmetric&quot;, &quot;true&quot;);
    node.setAttribute(&quot;minsize&quot;, sizeToMaxHeight[group.size] + &quot;em&quot;);
    node.setAttribute(&quot;maxsize&quot;, sizeToMaxHeight[group.size] + &quot;em&quot;);
    return node;
  }
});
function assertParsed(group) {
  if (!group.body) {
    throw new Error(&quot;Bug: The leftright ParseNode wasn&#039;t fully parsed.&quot;);
  }
}
defineFunction({
  type: &quot;leftright-right&quot;,
  names: [&quot;\\right&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;primitive&quot;]
  },
  handler: (context, args) =&gt; {
    return {
      type: &quot;leftright-right&quot;,
      mode: context.parser.mode,
      delim: checkDelimiter(args[0], context).text
    };
  }
});
defineFunction({
  type: &quot;leftright&quot;,
  names: [&quot;\\left&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;primitive&quot;]
  },
  handler: (context, args) =&gt; {
    const delim = checkDelimiter(args[0], context);
    const parser = context.parser;
    ++parser.leftrightDepth;
    let body = parser.parseExpression(false, null, true);
    let nextToken = parser.fetch();
    while (nextToken.text === &quot;\\middle&quot;) {
      parser.consume();
      const middle = parser.fetch().text;
      if (!symbols.math[middle]) {
        throw new ParseError(`Invalid delimiter &#039;${middle}&#039; after &#039;\\middle&#039;`);
      }
      checkDelimiter({ type: &quot;atom&quot;, mode: &quot;math&quot;, text: middle }, { funcName: &quot;\\middle&quot; });
      body.push({ type: &quot;middle&quot;, mode: &quot;math&quot;, delim: middle });
      parser.consume();
      body = body.concat(parser.parseExpression(false, null, true));
      nextToken = parser.fetch();
    }
    --parser.leftrightDepth;
    parser.expect(&quot;\\right&quot;, false);
    const right = assertNodeType(parser.parseFunction(), &quot;leftright-right&quot;);
    return {
      type: &quot;leftright&quot;,
      mode: parser.mode,
      body,
      left: delim.text,
      right: right.delim
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    assertParsed(group);
    const inner2 = buildExpression(group.body, style);
    if (group.left === &quot;.&quot;) {
      group.left = &quot;&quot;;
    }
    const leftNode = new mathMLTree.MathNode(&quot;mo&quot;, [makeText(group.left, group.mode)]);
    leftNode.setAttribute(&quot;fence&quot;, &quot;true&quot;);
    leftNode.setAttribute(&quot;form&quot;, &quot;prefix&quot;);
    if (group.left === &quot;/&quot; || group.left === &quot;\\&quot; || group.left.indexOf(&quot;arrow&quot;) &gt; -1) {
      leftNode.setAttribute(&quot;stretchy&quot;, &quot;true&quot;);
    }
    inner2.unshift(leftNode);
    if (group.right === &quot;.&quot;) {
      group.right = &quot;&quot;;
    }
    const rightNode = new mathMLTree.MathNode(&quot;mo&quot;, [makeText(group.right, group.mode)]);
    rightNode.setAttribute(&quot;fence&quot;, &quot;true&quot;);
    rightNode.setAttribute(&quot;form&quot;, &quot;postfix&quot;);
    if (group.right === &quot;\u2216&quot; || group.right.indexOf(&quot;arrow&quot;) &gt; -1) {
      rightNode.setAttribute(&quot;stretchy&quot;, &quot;true&quot;);
    }
    if (group.body.length &gt; 0) {
      const lastElement = group.body[group.body.length - 1];
      if (lastElement.type === &quot;color&quot; &amp;&amp; !lastElement.isTextColor) {
        rightNode.setAttribute(&quot;mathcolor&quot;, lastElement.color);
      }
    }
    inner2.push(rightNode);
    return makeRow(inner2);
  }
});
defineFunction({
  type: &quot;middle&quot;,
  names: [&quot;\\middle&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;primitive&quot;]
  },
  handler: (context, args) =&gt; {
    const delim = checkDelimiter(args[0], context);
    if (!context.parser.leftrightDepth) {
      throw new ParseError(&quot;\\middle without preceding \\left&quot;, delim);
    }
    return {
      type: &quot;middle&quot;,
      mode: context.parser.mode,
      delim: delim.text
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const textNode = makeText(group.delim, group.mode);
    const middleNode = new mathMLTree.MathNode(&quot;mo&quot;, [textNode]);
    middleNode.setAttribute(&quot;fence&quot;, &quot;true&quot;);
    if (group.delim.indexOf(&quot;arrow&quot;) &gt; -1) {
      middleNode.setAttribute(&quot;stretchy&quot;, &quot;true&quot;);
    }
    middleNode.setAttribute(&quot;form&quot;, &quot;prefix&quot;);
    middleNode.setAttribute(&quot;lspace&quot;, &quot;0.05em&quot;);
    middleNode.setAttribute(&quot;rspace&quot;, &quot;0.05em&quot;);
    return middleNode;
  }
});
var padding$1 = (_) =&gt; {
  const node = new mathMLTree.MathNode(&quot;mspace&quot;);
  node.setAttribute(&quot;width&quot;, &quot;3pt&quot;);
  return node;
};
var mathmlBuilder$8 = (group, style) =&gt; {
  let node;
  if (group.label.indexOf(&quot;colorbox&quot;) &gt; -1 || group.label === &quot;\\boxed&quot;) {
    node = new mathMLTree.MathNode(&quot;mrow&quot;, [
      padding$1(),
      buildGroup$1(group.body, style),
      padding$1()
    ]);
  } else {
    node = new mathMLTree.MathNode(&quot;menclose&quot;, [buildGroup$1(group.body, style)]);
  }
  switch (group.label) {
    case &quot;\\overline&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;top&quot;);
      node.classes.push(&quot;tml-overline&quot;);
      break;
    case &quot;\\underline&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;bottom&quot;);
      node.classes.push(&quot;tml-underline&quot;);
      break;
    case &quot;\\cancel&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;updiagonalstrike&quot;);
      node.children.push(new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;tml-cancel&quot;, &quot;upstrike&quot;]));
      break;
    case &quot;\\bcancel&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;downdiagonalstrike&quot;);
      node.children.push(new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;tml-cancel&quot;, &quot;downstrike&quot;]));
      break;
    case &quot;\\sout&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;horizontalstrike&quot;);
      node.children.push(new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;tml-cancel&quot;, &quot;sout&quot;]));
      break;
    case &quot;\\xcancel&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;updiagonalstrike downdiagonalstrike&quot;);
      node.classes.push(&quot;tml-xcancel&quot;);
      break;
    case &quot;\\longdiv&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;longdiv&quot;);
      node.classes.push(&quot;longdiv-top&quot;);
      node.children.push(new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;longdiv-arc&quot;]));
      break;
    case &quot;\\phase&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;phasorangle&quot;);
      node.classes.push(&quot;phasor-bottom&quot;);
      node.children.push(new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;phasor-angle&quot;]));
      break;
    case &quot;\\textcircled&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;circle&quot;);
      node.classes.push(&quot;circle-pad&quot;);
      node.children.push(new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;textcircle&quot;]));
      break;
    case &quot;\\angl&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;actuarial&quot;);
      node.classes.push(&quot;actuarial&quot;);
      break;
    case &quot;\\boxed&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;box&quot;);
      node.classes.push(&quot;tml-box&quot;);
      node.setAttribute(&quot;scriptlevel&quot;, &quot;0&quot;);
      node.setAttribute(&quot;displaystyle&quot;, &quot;true&quot;);
      break;
    case &quot;\\fbox&quot;:
      node.setAttribute(&quot;notation&quot;, &quot;box&quot;);
      node.classes.push(&quot;tml-fbox&quot;);
      break;
    case &quot;\\fcolorbox&quot;:
    case &quot;\\colorbox&quot;: {
      const style2 = { padding: &quot;3pt 0 3pt 0&quot; };
      if (group.label === &quot;\\fcolorbox&quot;) {
        style2.border = &quot;0.0667em solid &quot; + String(group.borderColor);
      }
      node.style = style2;
      break;
    }
  }
  if (group.backgroundColor) {
    node.setAttribute(&quot;mathbackground&quot;, group.backgroundColor);
  }
  return node;
};
defineFunction({
  type: &quot;enclose&quot;,
  names: [&quot;\\colorbox&quot;],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: [&quot;raw&quot;, &quot;raw&quot;, &quot;text&quot;]
  },
  handler({ parser, funcName }, args, optArgs) {
    const model = optArgs[0] &amp;&amp; assertNodeType(optArgs[0], &quot;raw&quot;).string;
    let color = &quot;&quot;;
    if (model) {
      const spec = assertNodeType(args[0], &quot;raw&quot;).string;
      color = colorFromSpec(model, spec);
    } else {
      color = validateColor(assertNodeType(args[0], &quot;raw&quot;).string, parser.gullet.macros);
    }
    const body = args[1];
    return {
      type: &quot;enclose&quot;,
      mode: parser.mode,
      label: funcName,
      backgroundColor: color,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: &quot;enclose&quot;,
  names: [&quot;\\fcolorbox&quot;],
  props: {
    numArgs: 3,
    numOptionalArgs: 1,
    allowedInText: true,
    argTypes: [&quot;raw&quot;, &quot;raw&quot;, &quot;raw&quot;, &quot;text&quot;]
  },
  handler({ parser, funcName }, args, optArgs) {
    const model = optArgs[0] &amp;&amp; assertNodeType(optArgs[0], &quot;raw&quot;).string;
    let borderColor = &quot;&quot;;
    let backgroundColor;
    if (model) {
      const borderSpec = assertNodeType(args[0], &quot;raw&quot;).string;
      const backgroundSpec = assertNodeType(args[0], &quot;raw&quot;).string;
      borderColor = colorFromSpec(model, borderSpec);
      backgroundColor = colorFromSpec(model, backgroundSpec);
    } else {
      borderColor = validateColor(assertNodeType(args[0], &quot;raw&quot;).string, parser.gullet.macros);
      backgroundColor = validateColor(assertNodeType(args[1], &quot;raw&quot;).string, parser.gullet.macros);
    }
    const body = args[2];
    return {
      type: &quot;enclose&quot;,
      mode: parser.mode,
      label: funcName,
      backgroundColor,
      borderColor,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: &quot;enclose&quot;,
  names: [&quot;\\fbox&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;hbox&quot;],
    allowedInText: true
  },
  handler({ parser }, args) {
    return {
      type: &quot;enclose&quot;,
      mode: parser.mode,
      label: &quot;\\fbox&quot;,
      body: args[0]
    };
  }
});
defineFunction({
  type: &quot;enclose&quot;,
  names: [
    &quot;\\angl&quot;,
    &quot;\\cancel&quot;,
    &quot;\\bcancel&quot;,
    &quot;\\xcancel&quot;,
    &quot;\\sout&quot;,
    &quot;\\overline&quot;,
    &quot;\\boxed&quot;,
    &quot;\\longdiv&quot;,
    &quot;\\phase&quot;
  ],
  props: {
    numArgs: 1
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: &quot;enclose&quot;,
      mode: parser.mode,
      label: funcName,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: &quot;enclose&quot;,
  names: [&quot;\\underline&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: &quot;enclose&quot;,
      mode: parser.mode,
      label: funcName,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
defineFunction({
  type: &quot;enclose&quot;,
  names: [&quot;\\textcircled&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;text&quot;],
    allowedInArgument: true,
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: &quot;enclose&quot;,
      mode: parser.mode,
      label: funcName,
      body
    };
  },
  mathmlBuilder: mathmlBuilder$8
});
var _environments = {};
function defineEnvironment({ type, names, props, handler, mathmlBuilder: mathmlBuilder2 }) {
  const data = {
    type,
    numArgs: props.numArgs || 0,
    allowedInText: false,
    numOptionalArgs: 0,
    handler
  };
  for (let i = 0; i &lt; names.length; ++i) {
    _environments[names[i]] = data;
  }
  if (mathmlBuilder2) {
    _mathmlGroupBuilders[type] = mathmlBuilder2;
  }
}
var SourceLocation = class _SourceLocation {
  constructor(lexer, start, end) {
    this.lexer = lexer;
    this.start = start;
    this.end = end;
  }
  /**
   * Merges two `SourceLocation`s from location providers, given they are
   * provided in order of appearance.
   * - Returns the first one&#039;s location if only the first is provided.
   * - Returns a merged range of the first and the last if both are provided
   *   and their lexers match.
   * - Otherwise, returns null.
   */
  static range(first, second) {
    if (!second) {
      return first &amp;&amp; first.loc;
    } else if (!first || !first.loc || !second.loc || first.loc.lexer !== second.loc.lexer) {
      return null;
    } else {
      return new _SourceLocation(first.loc.lexer, first.loc.start, second.loc.end);
    }
  }
};
var Token = class _Token {
  constructor(text2, loc) {
    this.text = text2;
    this.loc = loc;
  }
  /**
   * Given a pair of tokens (this and endToken), compute a `Token` encompassing
   * the whole input range enclosed by these two.
   */
  range(endToken, text2) {
    return new _Token(text2, SourceLocation.range(this, endToken));
  }
};
var StyleLevel = {
  DISPLAY: 0,
  TEXT: 1,
  SCRIPT: 2,
  SCRIPTSCRIPT: 3
};
var _macros = {};
function defineMacro(name, body) {
  _macros[name] = body;
}
var macros = _macros;
defineMacro(&quot;\\noexpand&quot;, function(context) {
  const t = context.popToken();
  if (context.isExpandable(t.text)) {
    t.noexpand = true;
    t.treatAsRelax = true;
  }
  return { tokens: [t], numArgs: 0 };
});
defineMacro(&quot;\\expandafter&quot;, function(context) {
  const t = context.popToken();
  context.expandOnce(true);
  return { tokens: [t], numArgs: 0 };
});
defineMacro(&quot;\\@firstoftwo&quot;, function(context) {
  const args = context.consumeArgs(2);
  return { tokens: args[0], numArgs: 0 };
});
defineMacro(&quot;\\@secondoftwo&quot;, function(context) {
  const args = context.consumeArgs(2);
  return { tokens: args[1], numArgs: 0 };
});
defineMacro(&quot;\\@ifnextchar&quot;, function(context) {
  const args = context.consumeArgs(3);
  context.consumeSpaces();
  const nextToken = context.future();
  if (args[0].length === 1 &amp;&amp; args[0][0].text === nextToken.text) {
    return { tokens: args[1], numArgs: 0 };
  } else {
    return { tokens: args[2], numArgs: 0 };
  }
});
defineMacro(&quot;\\@ifstar&quot;, &quot;\\@ifnextchar *{\\@firstoftwo{#1}}&quot;);
defineMacro(&quot;\\TextOrMath&quot;, function(context) {
  const args = context.consumeArgs(2);
  if (context.mode === &quot;text&quot;) {
    return { tokens: args[0], numArgs: 0 };
  } else {
    return { tokens: args[1], numArgs: 0 };
  }
});
var stringFromArg = (arg) =&gt; {
  let str = &quot;&quot;;
  for (let i = arg.length - 1; i &gt; -1; i--) {
    str += arg[i].text;
  }
  return str;
};
var digitToNumber = {
  0: 0,
  1: 1,
  2: 2,
  3: 3,
  4: 4,
  5: 5,
  6: 6,
  7: 7,
  8: 8,
  9: 9,
  a: 10,
  A: 10,
  b: 11,
  B: 11,
  c: 12,
  C: 12,
  d: 13,
  D: 13,
  e: 14,
  E: 14,
  f: 15,
  F: 15
};
var nextCharNumber = (context) =&gt; {
  const numStr = context.future().text;
  if (numStr === &quot;EOF&quot;) {
    return [null, &quot;&quot;];
  }
  return [digitToNumber[numStr.charAt(0)], numStr];
};
var appendCharNumbers = (number, numStr, base) =&gt; {
  for (let i = 1; i &lt; numStr.length; i++) {
    const digit = digitToNumber[numStr.charAt(i)];
    number *= base;
    number += digit;
  }
  return number;
};
defineMacro(&quot;\\char&quot;, function(context) {
  let token = context.popToken();
  let base;
  let number = &quot;&quot;;
  if (token.text === &quot;&#039;&quot;) {
    base = 8;
    token = context.popToken();
  } else if (token.text === &#039;&quot;&#039;) {
    base = 16;
    token = context.popToken();
  } else if (token.text === &quot;`&quot;) {
    token = context.popToken();
    if (token.text[0] === &quot;\\&quot;) {
      number = token.text.charCodeAt(1);
    } else if (token.text === &quot;EOF&quot;) {
      throw new ParseError(&quot;\\char` missing argument&quot;);
    } else {
      number = token.text.charCodeAt(0);
    }
  } else {
    base = 10;
  }
  if (base) {
    let numStr = token.text;
    number = digitToNumber[numStr.charAt(0)];
    if (number == null || number &gt;= base) {
      throw new ParseError(`Invalid base-${base} digit ${token.text}`);
    }
    number = appendCharNumbers(number, numStr, base);
    let digit;
    [digit, numStr] = nextCharNumber(context);
    while (digit != null &amp;&amp; digit &lt; base) {
      number *= base;
      number += digit;
      number = appendCharNumbers(number, numStr, base);
      context.popToken();
      [digit, numStr] = nextCharNumber(context);
    }
  }
  return `\\@char{${number}}`;
});
function recreateArgStr(context) {
  const tokens = context.consumeArgs(1)[0];
  let str = &quot;&quot;;
  let expectedLoc = tokens[tokens.length - 1].loc.start;
  for (let i = tokens.length - 1; i &gt;= 0; i--) {
    const actualLoc = tokens[i].loc.start;
    if (actualLoc &gt; expectedLoc) {
      str += &quot; &quot;;
      expectedLoc = actualLoc;
    }
    str += tokens[i].text;
    expectedLoc += tokens[i].text.length;
  }
  return str;
}
defineMacro(&quot;\\surd&quot;, &quot;\\sqrt{\\vphantom{|}}&quot;);
defineMacro(&quot;\u2295&quot;, &quot;\\oplus&quot;);
defineMacro(&quot;\\long&quot;, &quot;&quot;);
defineMacro(&quot;\\bgroup&quot;, &quot;{&quot;);
defineMacro(&quot;\\egroup&quot;, &quot;}&quot;);
defineMacro(&quot;~&quot;, &quot;\\nobreakspace&quot;);
defineMacro(&quot;\\lq&quot;, &quot;`&quot;);
defineMacro(&quot;\\rq&quot;, &quot;&#039;&quot;);
defineMacro(&quot;\\aa&quot;, &quot;\\r a&quot;);
defineMacro(&quot;\\Bbbk&quot;, &quot;\\Bbb{k}&quot;);
defineMacro(&quot;\\mathstrut&quot;, &quot;\\vphantom{(}&quot;);
defineMacro(&quot;\\underbar&quot;, &quot;\\underline{\\text{#1}}&quot;);
defineMacro(&quot;\\vdots&quot;, &quot;{\\varvdots\\rule{0pt}{15pt}}&quot;);
defineMacro(&quot;\u22EE&quot;, &quot;\\vdots&quot;);
defineMacro(&quot;\\arraystretch&quot;, &quot;1&quot;);
defineMacro(&quot;\\arraycolsep&quot;, &quot;6pt&quot;);
defineMacro(&quot;\\substack&quot;, &quot;\\begin{subarray}{c}#1\\end{subarray}&quot;);
defineMacro(&quot;\\iff&quot;, &quot;\\DOTSB\\;\\Longleftrightarrow\\;&quot;);
defineMacro(&quot;\\implies&quot;, &quot;\\DOTSB\\;\\Longrightarrow\\;&quot;);
defineMacro(&quot;\\impliedby&quot;, &quot;\\DOTSB\\;\\Longleftarrow\\;&quot;);
var dotsByToken = {
  &quot;,&quot;: &quot;\\dotsc&quot;,
  &quot;\\not&quot;: &quot;\\dotsb&quot;,
  // \keybin@ checks for the following:
  &quot;+&quot;: &quot;\\dotsb&quot;,
  &quot;=&quot;: &quot;\\dotsb&quot;,
  &quot;&lt;&quot;: &quot;\\dotsb&quot;,
  &quot;&gt;&quot;: &quot;\\dotsb&quot;,
  &quot;-&quot;: &quot;\\dotsb&quot;,
  &quot;*&quot;: &quot;\\dotsb&quot;,
  &quot;:&quot;: &quot;\\dotsb&quot;,
  // Symbols whose definition starts with \DOTSB:
  &quot;\\DOTSB&quot;: &quot;\\dotsb&quot;,
  &quot;\\coprod&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigvee&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigwedge&quot;: &quot;\\dotsb&quot;,
  &quot;\\biguplus&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigcap&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigcup&quot;: &quot;\\dotsb&quot;,
  &quot;\\prod&quot;: &quot;\\dotsb&quot;,
  &quot;\\sum&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigotimes&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigoplus&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigodot&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigsqcap&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigsqcup&quot;: &quot;\\dotsb&quot;,
  &quot;\\bigtimes&quot;: &quot;\\dotsb&quot;,
  &quot;\\And&quot;: &quot;\\dotsb&quot;,
  &quot;\\longrightarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\Longrightarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\longleftarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\Longleftarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\longleftrightarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\Longleftrightarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\mapsto&quot;: &quot;\\dotsb&quot;,
  &quot;\\longmapsto&quot;: &quot;\\dotsb&quot;,
  &quot;\\hookrightarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\doteq&quot;: &quot;\\dotsb&quot;,
  // Symbols whose definition starts with \mathbin:
  &quot;\\mathbin&quot;: &quot;\\dotsb&quot;,
  // Symbols whose definition starts with \mathrel:
  &quot;\\mathrel&quot;: &quot;\\dotsb&quot;,
  &quot;\\relbar&quot;: &quot;\\dotsb&quot;,
  &quot;\\Relbar&quot;: &quot;\\dotsb&quot;,
  &quot;\\xrightarrow&quot;: &quot;\\dotsb&quot;,
  &quot;\\xleftarrow&quot;: &quot;\\dotsb&quot;,
  // Symbols whose definition starts with \DOTSI:
  &quot;\\DOTSI&quot;: &quot;\\dotsi&quot;,
  &quot;\\int&quot;: &quot;\\dotsi&quot;,
  &quot;\\oint&quot;: &quot;\\dotsi&quot;,
  &quot;\\iint&quot;: &quot;\\dotsi&quot;,
  &quot;\\iiint&quot;: &quot;\\dotsi&quot;,
  &quot;\\iiiint&quot;: &quot;\\dotsi&quot;,
  &quot;\\idotsint&quot;: &quot;\\dotsi&quot;,
  // Symbols whose definition starts with \DOTSX:
  &quot;\\DOTSX&quot;: &quot;\\dotsx&quot;
};
defineMacro(&quot;\\dots&quot;, function(context) {
  let thedots = &quot;\\dotso&quot;;
  const next = context.expandAfterFuture().text;
  if (next in dotsByToken) {
    thedots = dotsByToken[next];
  } else if (next.slice(0, 4) === &quot;\\not&quot;) {
    thedots = &quot;\\dotsb&quot;;
  } else if (next in symbols.math) {
    if ([&quot;bin&quot;, &quot;rel&quot;].includes(symbols.math[next].group)) {
      thedots = &quot;\\dotsb&quot;;
    }
  }
  return thedots;
});
var spaceAfterDots = {
  // \rightdelim@ checks for the following:
  &quot;)&quot;: true,
  &quot;]&quot;: true,
  &quot;\\rbrack&quot;: true,
  &quot;\\}&quot;: true,
  &quot;\\rbrace&quot;: true,
  &quot;\\rangle&quot;: true,
  &quot;\\rceil&quot;: true,
  &quot;\\rfloor&quot;: true,
  &quot;\\rgroup&quot;: true,
  &quot;\\rmoustache&quot;: true,
  &quot;\\right&quot;: true,
  &quot;\\bigr&quot;: true,
  &quot;\\biggr&quot;: true,
  &quot;\\Bigr&quot;: true,
  &quot;\\Biggr&quot;: true,
  // \extra@ also tests for the following:
  $: true,
  // \extrap@ checks for the following:
  &quot;;&quot;: true,
  &quot;.&quot;: true,
  &quot;,&quot;: true
};
defineMacro(&quot;\\dotso&quot;, function(context) {
  const next = context.future().text;
  if (next in spaceAfterDots) {
    return &quot;\\ldots\\,&quot;;
  } else {
    return &quot;\\ldots&quot;;
  }
});
defineMacro(&quot;\\dotsc&quot;, function(context) {
  const next = context.future().text;
  if (next in spaceAfterDots &amp;&amp; next !== &quot;,&quot;) {
    return &quot;\\ldots\\,&quot;;
  } else {
    return &quot;\\ldots&quot;;
  }
});
defineMacro(&quot;\\cdots&quot;, function(context) {
  const next = context.future().text;
  if (next in spaceAfterDots) {
    return &quot;\\@cdots\\,&quot;;
  } else {
    return &quot;\\@cdots&quot;;
  }
});
defineMacro(&quot;\\dotsb&quot;, &quot;\\cdots&quot;);
defineMacro(&quot;\\dotsm&quot;, &quot;\\cdots&quot;);
defineMacro(&quot;\\dotsi&quot;, &quot;\\!\\cdots&quot;);
defineMacro(&quot;\\idotsint&quot;, &quot;\\dotsi&quot;);
defineMacro(&quot;\\dotsx&quot;, &quot;\\ldots\\,&quot;);
defineMacro(&quot;\\DOTSI&quot;, &quot;\\relax&quot;);
defineMacro(&quot;\\DOTSB&quot;, &quot;\\relax&quot;);
defineMacro(&quot;\\DOTSX&quot;, &quot;\\relax&quot;);
defineMacro(&quot;\\tmspace&quot;, &quot;\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax&quot;);
defineMacro(&quot;\\,&quot;, &quot;{\\tmspace+{3mu}{.1667em}}&quot;);
defineMacro(&quot;\\thinspace&quot;, &quot;\\,&quot;);
defineMacro(&quot;\\&gt;&quot;, &quot;\\mskip{4mu}&quot;);
defineMacro(&quot;\\:&quot;, &quot;{\\tmspace+{4mu}{.2222em}}&quot;);
defineMacro(&quot;\\medspace&quot;, &quot;\\:&quot;);
defineMacro(&quot;\\;&quot;, &quot;{\\tmspace+{5mu}{.2777em}}&quot;);
defineMacro(&quot;\\thickspace&quot;, &quot;\\;&quot;);
defineMacro(&quot;\\!&quot;, &quot;{\\tmspace-{3mu}{.1667em}}&quot;);
defineMacro(&quot;\\negthinspace&quot;, &quot;\\!&quot;);
defineMacro(&quot;\\negmedspace&quot;, &quot;{\\tmspace-{4mu}{.2222em}}&quot;);
defineMacro(&quot;\\negthickspace&quot;, &quot;{\\tmspace-{5mu}{.277em}}&quot;);
defineMacro(&quot;\\enspace&quot;, &quot;\\kern.5em &quot;);
defineMacro(&quot;\\enskip&quot;, &quot;\\hskip.5em\\relax&quot;);
defineMacro(&quot;\\quad&quot;, &quot;\\hskip1em\\relax&quot;);
defineMacro(&quot;\\qquad&quot;, &quot;\\hskip2em\\relax&quot;);
defineMacro(&quot;\\AA&quot;, &quot;\\TextOrMath{\\Angstrom}{\\mathring{A}}\\relax&quot;);
defineMacro(&quot;\\tag&quot;, &quot;\\@ifstar\\tag@literal\\tag@paren&quot;);
defineMacro(&quot;\\tag@paren&quot;, &quot;\\tag@literal{({#1})}&quot;);
defineMacro(&quot;\\tag@literal&quot;, (context) =&gt; {
  if (context.macros.get(&quot;\\df@tag&quot;)) {
    throw new ParseError(&quot;Multiple \\tag&quot;);
  }
  return &quot;\\gdef\\df@tag{\\text{#1}}&quot;;
});
defineMacro(&quot;\\notag&quot;, &quot;\\nonumber&quot;);
defineMacro(&quot;\\nonumber&quot;, &quot;\\gdef\\@eqnsw{0}&quot;);
defineMacro(&quot;\\bmod&quot;, &quot;\\mathbin{\\text{mod}}&quot;);
defineMacro(
  &quot;\\pod&quot;,
  &quot;\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)&quot;
);
defineMacro(&quot;\\pmod&quot;, &quot;\\pod{{\\rm mod}\\mkern6mu#1}&quot;);
defineMacro(
  &quot;\\mod&quot;,
  &quot;\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1&quot;
);
defineMacro(&quot;\\newline&quot;, &quot;\\\\\\relax&quot;);
defineMacro(&quot;\\TeX&quot;, &quot;\\textrm{T}\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125em\\textrm{X}&quot;);
defineMacro(
  &quot;\\LaTeX&quot;,
  &quot;\\textrm{L}\\kern-.35em\\raisebox{0.2em}{\\scriptstyle A}\\kern-.15em\\TeX&quot;
);
defineMacro(
  &quot;\\Temml&quot;,
  // eslint-disable-next-line max-len
  &quot;\\textrm{T}\\kern-0.2em\\lower{0.2em}{\\textrm{E}}\\kern-0.08em{\\textrm{M}\\kern-0.08em\\raise{0.2em}\\textrm{M}\\kern-0.08em\\textrm{L}}&quot;
);
defineMacro(&quot;\\hspace&quot;, &quot;\\@ifstar\\@hspacer\\@hspace&quot;);
defineMacro(&quot;\\@hspace&quot;, &quot;\\hskip #1\\relax&quot;);
defineMacro(&quot;\\@hspacer&quot;, &quot;\\rule{0pt}{0pt}\\hskip #1\\relax&quot;);
defineMacro(&quot;\\colon&quot;, `\\mathpunct{\\char&quot;3a}`);
defineMacro(&quot;\\prescript&quot;, &quot;\\pres@cript{_{#1}^{#2}}{}{#3}&quot;);
defineMacro(&quot;\\ordinarycolon&quot;, `\\char&quot;3a`);
defineMacro(&quot;\\vcentcolon&quot;, &quot;\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}}&quot;);
defineMacro(&quot;\\coloneq&quot;, &#039;\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char&quot;2212}&#039;);
defineMacro(&quot;\\Coloneq&quot;, &#039;\\mathrel{\\char&quot;2237\\char&quot;2212}&#039;);
defineMacro(&quot;\\Eqqcolon&quot;, &#039;\\mathrel{\\char&quot;3d\\char&quot;2237}&#039;);
defineMacro(&quot;\\Eqcolon&quot;, &#039;\\mathrel{\\char&quot;2212\\char&quot;2237}&#039;);
defineMacro(&quot;\\colonapprox&quot;, &#039;\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char&quot;2248}&#039;);
defineMacro(&quot;\\Colonapprox&quot;, &#039;\\mathrel{\\char&quot;2237\\char&quot;2248}&#039;);
defineMacro(&quot;\\colonsim&quot;, &#039;\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char&quot;223c}&#039;);
defineMacro(&quot;\\Colonsim&quot;, &#039;\\mathrel{\\raisebox{0.035em}{\\ordinarycolon}\\char&quot;223c}&#039;);
defineMacro(&quot;\\ratio&quot;, &quot;\\vcentcolon&quot;);
defineMacro(&quot;\\coloncolon&quot;, &quot;\\dblcolon&quot;);
defineMacro(&quot;\\colonequals&quot;, &quot;\\coloneqq&quot;);
defineMacro(&quot;\\coloncolonequals&quot;, &quot;\\Coloneqq&quot;);
defineMacro(&quot;\\equalscolon&quot;, &quot;\\eqqcolon&quot;);
defineMacro(&quot;\\equalscoloncolon&quot;, &quot;\\Eqqcolon&quot;);
defineMacro(&quot;\\colonminus&quot;, &quot;\\coloneq&quot;);
defineMacro(&quot;\\coloncolonminus&quot;, &quot;\\Coloneq&quot;);
defineMacro(&quot;\\minuscolon&quot;, &quot;\\eqcolon&quot;);
defineMacro(&quot;\\minuscoloncolon&quot;, &quot;\\Eqcolon&quot;);
defineMacro(&quot;\\coloncolonapprox&quot;, &quot;\\Colonapprox&quot;);
defineMacro(&quot;\\coloncolonsim&quot;, &quot;\\Colonsim&quot;);
defineMacro(&quot;\\notni&quot;, &quot;\\mathrel{\\char`\u220C}&quot;);
defineMacro(&quot;\\limsup&quot;, &quot;\\DOTSB\\operatorname*{lim\\,sup}&quot;);
defineMacro(&quot;\\liminf&quot;, &quot;\\DOTSB\\operatorname*{lim\\,inf}&quot;);
defineMacro(&quot;\\injlim&quot;, &quot;\\DOTSB\\operatorname*{inj\\,lim}&quot;);
defineMacro(&quot;\\projlim&quot;, &quot;\\DOTSB\\operatorname*{proj\\,lim}&quot;);
defineMacro(&quot;\\varlimsup&quot;, &quot;\\DOTSB\\operatorname*{\\overline{\\text{lim}}}&quot;);
defineMacro(&quot;\\varliminf&quot;, &quot;\\DOTSB\\operatorname*{\\underline{\\text{lim}}}&quot;);
defineMacro(&quot;\\varinjlim&quot;, &quot;\\DOTSB\\operatorname*{\\underrightarrow{\\text{lim}}}&quot;);
defineMacro(&quot;\\varprojlim&quot;, &quot;\\DOTSB\\operatorname*{\\underleftarrow{\\text{lim}}}&quot;);
defineMacro(&quot;\\centerdot&quot;, &quot;{\\medspace\\rule{0.167em}{0.189em}\\medspace}&quot;);
defineMacro(&quot;\\argmin&quot;, &quot;\\DOTSB\\operatorname*{arg\\,min}&quot;);
defineMacro(&quot;\\argmax&quot;, &quot;\\DOTSB\\operatorname*{arg\\,max}&quot;);
defineMacro(&quot;\\plim&quot;, &quot;\\DOTSB\\operatorname*{plim}&quot;);
defineMacro(&quot;\\leftmodels&quot;, &quot;\\mathop{\\reflectbox{$\\models$}}&quot;);
defineMacro(&quot;\\bra&quot;, &quot;\\mathinner{\\langle{#1}|}&quot;);
defineMacro(&quot;\\ket&quot;, &quot;\\mathinner{|{#1}\\rangle}&quot;);
defineMacro(&quot;\\braket&quot;, &quot;\\mathinner{\\langle{#1}\\rangle}&quot;);
defineMacro(&quot;\\Bra&quot;, &quot;\\left\\langle#1\\right|&quot;);
defineMacro(&quot;\\Ket&quot;, &quot;\\left|#1\\right\\rangle&quot;);
var replaceVert = (argStr, match) =&gt; {
  const ch = match[0] === &quot;|&quot; ? &quot;\\vert&quot; : &quot;\\Vert&quot;;
  const replaceStr = `}\\,\\middle${ch}\\,{`;
  return argStr.slice(0, match.index) + replaceStr + argStr.slice(match.index + match[0].length);
};
defineMacro(&quot;\\Braket&quot;, function(context) {
  let argStr = recreateArgStr(context);
  const regEx = /\|\||\||\\\|/g;
  let match;
  while ((match = regEx.exec(argStr)) !== null) {
    argStr = replaceVert(argStr, match);
  }
  return &quot;\\left\\langle{&quot; + argStr + &quot;}\\right\\rangle&quot;;
});
defineMacro(&quot;\\Set&quot;, function(context) {
  let argStr = recreateArgStr(context);
  const match = /\|\||\||\\\|/.exec(argStr);
  if (match) {
    argStr = replaceVert(argStr, match);
  }
  return &quot;\\left\\{\\:{&quot; + argStr + &quot;}\\:\\right\\}&quot;;
});
defineMacro(&quot;\\set&quot;, function(context) {
  const argStr = recreateArgStr(context);
  return &quot;\\{{&quot; + argStr.replace(/\|/, &quot;}\\mid{&quot;) + &quot;}\\}&quot;;
});
defineMacro(&quot;\\angln&quot;, &quot;{\\angl n}&quot;);
defineMacro(&quot;\\odv&quot;, &quot;\\@ifstar\\odv@next\\odv@numerator&quot;);
defineMacro(&quot;\\odv@numerator&quot;, &quot;\\frac{\\mathrm{d}#1}{\\mathrm{d}#2}&quot;);
defineMacro(&quot;\\odv@next&quot;, &quot;\\frac{\\mathrm{d}}{\\mathrm{d}#2}#1&quot;);
defineMacro(&quot;\\pdv&quot;, &quot;\\@ifstar\\pdv@next\\pdv@numerator&quot;);
var pdvHelper = (args) =&gt; {
  const numerator = args[0][0].text;
  const denoms = stringFromArg(args[1]).split(&quot;,&quot;);
  const power = String(denoms.length);
  const numOp = power === &quot;1&quot; ? &quot;\\partial&quot; : `\\partial^${power}`;
  let denominator = &quot;&quot;;
  denoms.map((e) =&gt; {
    denominator += &quot;\\partial &quot; + e.trim() + &quot;\\,&quot;;
  });
  return [numerator, numOp, denominator.replace(/\\,$/, &quot;&quot;)];
};
defineMacro(&quot;\\pdv@numerator&quot;, function(context) {
  const [numerator, numOp, denominator] = pdvHelper(context.consumeArgs(2));
  return `\\frac{${numOp} ${numerator}}{${denominator}}`;
});
defineMacro(&quot;\\pdv@next&quot;, function(context) {
  const [numerator, numOp, denominator] = pdvHelper(context.consumeArgs(2));
  return `\\frac{${numOp}}{${denominator}} ${numerator}`;
});
defineMacro(&quot;\\upalpha&quot;, &quot;\\up@greek{\\alpha}&quot;);
defineMacro(&quot;\\upbeta&quot;, &quot;\\up@greek{\\beta}&quot;);
defineMacro(&quot;\\upgamma&quot;, &quot;\\up@greek{\\gamma}&quot;);
defineMacro(&quot;\\updelta&quot;, &quot;\\up@greek{\\delta}&quot;);
defineMacro(&quot;\\upepsilon&quot;, &quot;\\up@greek{\\epsilon}&quot;);
defineMacro(&quot;\\upzeta&quot;, &quot;\\up@greek{\\zeta}&quot;);
defineMacro(&quot;\\upeta&quot;, &quot;\\up@greek{\\eta}&quot;);
defineMacro(&quot;\\uptheta&quot;, &quot;\\up@greek{\\theta}&quot;);
defineMacro(&quot;\\upiota&quot;, &quot;\\up@greek{\\iota}&quot;);
defineMacro(&quot;\\upkappa&quot;, &quot;\\up@greek{\\kappa}&quot;);
defineMacro(&quot;\\uplambda&quot;, &quot;\\up@greek{\\lambda}&quot;);
defineMacro(&quot;\\upmu&quot;, &quot;\\up@greek{\\mu}&quot;);
defineMacro(&quot;\\upnu&quot;, &quot;\\up@greek{\\nu}&quot;);
defineMacro(&quot;\\upxi&quot;, &quot;\\up@greek{\\xi}&quot;);
defineMacro(&quot;\\upomicron&quot;, &quot;\\up@greek{\\omicron}&quot;);
defineMacro(&quot;\\uppi&quot;, &quot;\\up@greek{\\pi}&quot;);
defineMacro(&quot;\\upalpha&quot;, &quot;\\up@greek{\\alpha}&quot;);
defineMacro(&quot;\\uprho&quot;, &quot;\\up@greek{\\rho}&quot;);
defineMacro(&quot;\\upsigma&quot;, &quot;\\up@greek{\\sigma}&quot;);
defineMacro(&quot;\\uptau&quot;, &quot;\\up@greek{\\tau}&quot;);
defineMacro(&quot;\\upupsilon&quot;, &quot;\\up@greek{\\upsilon}&quot;);
defineMacro(&quot;\\upphi&quot;, &quot;\\up@greek{\\phi}&quot;);
defineMacro(&quot;\\upchi&quot;, &quot;\\up@greek{\\chi}&quot;);
defineMacro(&quot;\\uppsi&quot;, &quot;\\up@greek{\\psi}&quot;);
defineMacro(&quot;\\upomega&quot;, &quot;\\up@greek{\\omega}&quot;);
defineMacro(&quot;\\invamp&quot;, &#039;\\mathbin{\\char&quot;214b}&#039;);
defineMacro(&quot;\\parr&quot;, &#039;\\mathbin{\\char&quot;214b}&#039;);
defineMacro(&quot;\\with&quot;, &#039;\\mathbin{\\char&quot;26}&#039;);
defineMacro(&quot;\\multimapinv&quot;, &#039;\\mathrel{\\char&quot;27dc}&#039;);
defineMacro(&quot;\\multimapboth&quot;, &#039;\\mathrel{\\char&quot;29df}&#039;);
defineMacro(&quot;\\scoh&quot;, &#039;{\\mkern5mu\\char&quot;2322\\mkern5mu}&#039;);
defineMacro(&quot;\\sincoh&quot;, &#039;{\\mkern5mu\\char&quot;2323\\mkern5mu}&#039;);
defineMacro(&quot;\\coh&quot;, `{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char&quot;2322}}}
{\\smash{\\lower4mu{\\char&quot;2323}}}\\mkern5mu}`);
defineMacro(&quot;\\incoh&quot;, `{\\mkern5mu\\rule{}{0.7em}\\mathrlap{\\smash{\\raise2mu{\\char&quot;2323}}}
{\\smash{\\lower4mu{\\char&quot;2322}}}\\mkern5mu}`);
defineMacro(&quot;\\standardstate&quot;, &quot;\\text{\\tiny\\char`\u29B5}&quot;);
defineMacro(&quot;\\ce&quot;, function(context) {
  return chemParse(context.consumeArgs(1)[0], &quot;ce&quot;);
});
defineMacro(&quot;\\pu&quot;, function(context) {
  return chemParse(context.consumeArgs(1)[0], &quot;pu&quot;);
});
defineMacro(&quot;\\uniDash&quot;, `{\\rule{0.672em}{0.06em}}`);
defineMacro(&quot;\\triDash&quot;, `{\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}\\kern2mu\\rule{0.15em}{0.06em}}`);
defineMacro(&quot;\\tripleDash&quot;, `\\kern0.075em\\raise0.25em{\\triDash}\\kern0.075em`);
defineMacro(&quot;\\tripleDashOverLine&quot;, `\\kern0.075em\\mathrlap{\\raise0.125em{\\uniDash}}\\raise0.34em{\\triDash}\\kern0.075em`);
defineMacro(&quot;\\tripleDashOverDoubleLine&quot;, `\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\triDash}}\\raise0.27em{\\uniDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em`);
defineMacro(&quot;\\tripleDashBetweenDoubleLine&quot;, `\\kern0.075em\\mathrlap{\\mathrlap{\\raise0.48em{\\uniDash}}\\raise0.27em{\\triDash}}{\\raise0.05em{\\uniDash}}\\kern0.075em`);
var chemParse = function(tokens, stateMachine) {
  var str = &quot;&quot;;
  var expectedLoc = tokens.length &amp;&amp; tokens[tokens.length - 1].loc.start;
  for (var i = tokens.length - 1; i &gt;= 0; i--) {
    if (tokens[i].loc.start &gt; expectedLoc) {
      str += &quot; &quot;;
      expectedLoc = tokens[i].loc.start;
    }
    str += tokens[i].text;
    expectedLoc += tokens[i].text.length;
  }
  var tex = texify.go(mhchemParser.go(str, stateMachine));
  return tex;
};
var mhchemParser = {
  //
  // Parses mchem \ce syntax
  //
  // Call like
  //   go(&quot;H2O&quot;);
  //
  go: function(input, stateMachine) {
    if (!input) {
      return [];
    }
    if (stateMachine === void 0) {
      stateMachine = &quot;ce&quot;;
    }
    var state = &quot;0&quot;;
    var buffer = {};
    buffer[&quot;parenthesisLevel&quot;] = 0;
    input = input.replace(/\n/g, &quot; &quot;);
    input = input.replace(/[\u2212\u2013\u2014\u2010]/g, &quot;-&quot;);
    input = input.replace(/[\u2026]/g, &quot;...&quot;);
    var lastInput;
    var watchdog = 10;
    var output = [];
    while (true) {
      if (lastInput !== input) {
        watchdog = 10;
        lastInput = input;
      } else {
        watchdog--;
      }
      var machine = mhchemParser.stateMachines[stateMachine];
      var t = machine.transitions[state] || machine.transitions[&quot;*&quot;];
      iterateTransitions:
        for (var i = 0; i &lt; t.length; i++) {
          var matches = mhchemParser.patterns.match_(t[i].pattern, input);
          if (matches) {
            var task = t[i].task;
            for (var iA = 0; iA &lt; task.action_.length; iA++) {
              var o;
              if (machine.actions[task.action_[iA].type_]) {
                o = machine.actions[task.action_[iA].type_](buffer, matches.match_, task.action_[iA].option);
              } else if (mhchemParser.actions[task.action_[iA].type_]) {
                o = mhchemParser.actions[task.action_[iA].type_](buffer, matches.match_, task.action_[iA].option);
              } else {
                throw [&quot;MhchemBugA&quot;, &quot;mhchem bug A. Please report. (&quot; + task.action_[iA].type_ + &quot;)&quot;];
              }
              mhchemParser.concatArray(output, o);
            }
            state = task.nextState || state;
            if (input.length &gt; 0) {
              if (!task.revisit) {
                input = matches.remainder;
              }
              if (!task.toContinue) {
                break iterateTransitions;
              }
            } else {
              return output;
            }
          }
        }
      if (watchdog &lt;= 0) {
        throw [&quot;MhchemBugU&quot;, &quot;mhchem bug U. Please report.&quot;];
      }
    }
  },
  concatArray: function(a, b) {
    if (b) {
      if (Array.isArray(b)) {
        for (var iB = 0; iB &lt; b.length; iB++) {
          a.push(b[iB]);
        }
      } else {
        a.push(b);
      }
    }
  },
  patterns: {
    //
    // Matching patterns
    // either regexps or function that return null or {match_:&quot;a&quot;, remainder:&quot;bc&quot;}
    //
    patterns: {
      // property names must not look like integers (&quot;2&quot;) for correct property traversal order, later on
      &quot;empty&quot;: /^$/,
      &quot;else&quot;: /^./,
      &quot;else2&quot;: /^./,
      &quot;space&quot;: /^\s/,
      &quot;space A&quot;: /^\s(?=[A-Z\\$])/,
      &quot;space$&quot;: /^\s$/,
      &quot;a-z&quot;: /^[a-z]/,
      &quot;x&quot;: /^x/,
      &quot;x$&quot;: /^x$/,
      &quot;i$&quot;: /^i$/,
      &quot;letters&quot;: /^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,
      &quot;\\greek&quot;: /^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,
      &quot;one lowercase latin letter $&quot;: /^(?:([a-z])(?:$|[^a-zA-Z]))$/,
      &quot;$one lowercase latin letter$ $&quot;: /^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,
      &quot;one lowercase greek letter $&quot;: /^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,
      &quot;digits&quot;: /^[0-9]+/,
      &quot;-9.,9&quot;: /^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,
      &quot;-9.,9 no missing 0&quot;: /^[+\-]?[0-9]+(?:[.,][0-9]+)?/,
      &quot;(-)(9.,9)(e)(99)&quot;: function(input) {
        var m = input.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:([eE]|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);
        if (m &amp;&amp; m[0]) {
          return { match_: m.splice(1), remainder: input.substr(m[0].length) };
        }
        return null;
      },
      &quot;(-)(9)^(-9)&quot;: function(input) {
        var m = input.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/);
        if (m &amp;&amp; m[0]) {
          return { match_: m.splice(1), remainder: input.substr(m[0].length) };
        }
        return null;
      },
      &quot;state of aggregation $&quot;: function(input) {
        var a = mhchemParser.patterns.findObserveGroups(input, &quot;&quot;, /^\([a-z]{1,3}(?=[\),])/, &quot;)&quot;, &quot;&quot;);
        if (a &amp;&amp; a.remainder.match(/^($|[\s,;\)\]\}])/)) {
          return a;
        }
        var m = input.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);
        if (m) {
          return { match_: m[0], remainder: input.substr(m[0].length) };
        }
        return null;
      },
      &quot;_{(state of aggregation)}$&quot;: /^_\{(\([a-z]{1,3}\))\}/,
      &quot;{[(&quot;: /^(?:\\\{|\[|\()/,
      &quot;)]}&quot;: /^(?:\)|\]|\\\})/,
      &quot;, &quot;: /^[,;]\s*/,
      &quot;,&quot;: /^[,;]/,
      &quot;.&quot;: /^[.]/,
      &quot;. &quot;: /^([.\u22C5\u00B7\u2022])\s*/,
      &quot;...&quot;: /^\.\.\.(?=$|[^.])/,
      &quot;* &quot;: /^([*])\s*/,
      &quot;^{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;^{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;^($...$)&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;^&quot;, &quot;$&quot;, &quot;$&quot;, &quot;&quot;);
      },
      &quot;^a&quot;: /^\^([0-9]+|[^\\_])/,
      &quot;^\\x{}{}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;^&quot;, /^\\[a-zA-Z]+\{/, &quot;}&quot;, &quot;&quot;, &quot;&quot;, &quot;{&quot;, &quot;}&quot;, &quot;&quot;, true);
      },
      &quot;^\\x{}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;^&quot;, /^\\[a-zA-Z]+\{/, &quot;}&quot;, &quot;&quot;);
      },
      &quot;^\\x&quot;: /^\^(\\[a-zA-Z]+)\s*/,
      &quot;^(-1)&quot;: /^\^(-?\d+)/,
      &quot;&#039;&quot;: /^&#039;/,
      &quot;_{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;_{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;_($...$)&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;_&quot;, &quot;$&quot;, &quot;$&quot;, &quot;&quot;);
      },
      &quot;_9&quot;: /^_([+\-]?[0-9]+|[^\\])/,
      &quot;_\\x{}{}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;_&quot;, /^\\[a-zA-Z]+\{/, &quot;}&quot;, &quot;&quot;, &quot;&quot;, &quot;{&quot;, &quot;}&quot;, &quot;&quot;, true);
      },
      &quot;_\\x{}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;_&quot;, /^\\[a-zA-Z]+\{/, &quot;}&quot;, &quot;&quot;);
      },
      &quot;_\\x&quot;: /^_(\\[a-zA-Z]+)\s*/,
      &quot;^_&quot;: /^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,
      &quot;{}&quot;: /^\{\}/,
      &quot;{...}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;&quot;, &quot;{&quot;, &quot;}&quot;, &quot;&quot;);
      },
      &quot;{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;$...$&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;&quot;, &quot;$&quot;, &quot;$&quot;, &quot;&quot;);
      },
      &quot;${(...)}$&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;${&quot;, &quot;&quot;, &quot;&quot;, &quot;}$&quot;);
      },
      &quot;$(...)$&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;$&quot;, &quot;&quot;, &quot;&quot;, &quot;$&quot;);
      },
      &quot;=&lt;&gt;&quot;: /^[=&lt;&gt;]/,
      &quot;#&quot;: /^[#\u2261]/,
      &quot;+&quot;: /^\+/,
      &quot;-$&quot;: /^-(?=[\s_},;\]/]|$|\([a-z]+\))/,
      // -space -, -; -] -/ -$ -state-of-aggregation
      &quot;-9&quot;: /^-(?=[0-9])/,
      &quot;- orbital overlap&quot;: /^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,
      &quot;-&quot;: /^-/,
      &quot;pm-operator&quot;: /^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,
      &quot;operator&quot;: /^(?:\+|(?:[\-=&lt;&gt;]|&lt;&lt;|&gt;&gt;|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,
      &quot;arrowUpDown&quot;: /^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,
      &quot;\\bond{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\bond{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;-&gt;&quot;: /^(?:&lt;-&gt;|&lt;--&gt;|-&gt;|&lt;-|&lt;=&gt;&gt;|&lt;&lt;=&gt;|&lt;=&gt;|[\u2192\u27F6\u21CC])/,
      &quot;CMT&quot;: /^[CMT](?=\[)/,
      &quot;[(...)]&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;[&quot;, &quot;&quot;, &quot;&quot;, &quot;]&quot;);
      },
      &quot;1st-level escape&quot;: /^(&amp;|\\\\|\\hline)\s*/,
      &quot;\\,&quot;: /^(?:\\[,\ ;:])/,
      // \\x - but output no space before
      &quot;\\x{}{}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;&quot;, /^\\[a-zA-Z]+\{/, &quot;}&quot;, &quot;&quot;, &quot;&quot;, &quot;{&quot;, &quot;}&quot;, &quot;&quot;, true);
      },
      &quot;\\x{}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;&quot;, /^\\[a-zA-Z]+\{/, &quot;}&quot;, &quot;&quot;);
      },
      &quot;\\ca&quot;: /^\\ca(?:\s+|(?![a-zA-Z]))/,
      &quot;\\x&quot;: /^(?:\\[a-zA-Z]+\s*|\\[_&amp;{}%])/,
      &quot;orbital&quot;: /^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,
      // only those with numbers in front, because the others will be formatted correctly anyway
      &quot;others&quot;: /^[\/~|]/,
      &quot;\\frac{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\frac{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\overset{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\overset{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\underset{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\underset{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\underbrace{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\underbrace{&quot;, &quot;&quot;, &quot;&quot;, &quot;}_&quot;, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\color{(...)}0&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\color{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\color{(...)}{(...)}1&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\color{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\color(...){(...)}2&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\color&quot;, &quot;\\&quot;, &quot;&quot;, /^(?=\{)/, &quot;{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;\\ce{(...)}&quot;: function(input) {
        return mhchemParser.patterns.findObserveGroups(input, &quot;\\ce{&quot;, &quot;&quot;, &quot;&quot;, &quot;}&quot;);
      },
      &quot;oxidation$&quot;: /^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,
      &quot;d-oxidation$&quot;: /^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,
      // 0 could be oxidation or charge
      &quot;roman numeral&quot;: /^[IVX]+/,
      &quot;1/2$&quot;: /^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,
      &quot;amount&quot;: function(input) {
        var match;
        match = input.match(/^(?:(?:(?:\([+\-]?[0-9]+\/[0-9]+\)|[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+|[+\-]?[0-9]+[.,][0-9]+|[+\-]?\.[0-9]+|[+\-]?[0-9]+)(?:[a-z](?=\s*[A-Z]))?)|[+\-]?[a-z](?=\s*[A-Z])|\+(?!\s))/);
        if (match) {
          return { match_: match[0], remainder: input.substr(match[0].length) };
        }
        var a = mhchemParser.patterns.findObserveGroups(input, &quot;&quot;, &quot;$&quot;, &quot;$&quot;, &quot;&quot;);
        if (a) {
          match = a.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/);
          if (match) {
            return { match_: match[0], remainder: input.substr(match[0].length) };
          }
        }
        return null;
      },
      &quot;amount2&quot;: function(input) {
        return this[&quot;amount&quot;](input);
      },
      &quot;(KV letters),&quot;: /^(?:[A-Z][a-z]{0,2}|i)(?=,)/,
      &quot;formula$&quot;: function(input) {
        if (input.match(/^\([a-z]+\)$/)) {
          return null;
        }
        var match = input.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);
        if (match) {
          return { match_: match[0], remainder: input.substr(match[0].length) };
        }
        return null;
      },
      &quot;uprightEntities&quot;: /^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,
      &quot;/&quot;: /^\s*(\/)\s*/,
      &quot;//&quot;: /^\s*(\/\/)\s*/,
      &quot;*&quot;: /^\s*[*.]\s*/
    },
    findObserveGroups: function(input, begExcl, begIncl, endIncl, endExcl, beg2Excl, beg2Incl, end2Incl, end2Excl, combine) {
      var _match = function(input2, pattern) {
        if (typeof pattern === &quot;string&quot;) {
          if (input2.indexOf(pattern) !== 0) {
            return null;
          }
          return pattern;
        } else {
          var match2 = input2.match(pattern);
          if (!match2) {
            return null;
          }
          return match2[0];
        }
      };
      var _findObserveGroups = function(input2, i, endChars) {
        var braces = 0;
        while (i &lt; input2.length) {
          var a = input2.charAt(i);
          var match2 = _match(input2.substr(i), endChars);
          if (match2 !== null &amp;&amp; braces === 0) {
            return { endMatchBegin: i, endMatchEnd: i + match2.length };
          } else if (a === &quot;{&quot;) {
            braces++;
          } else if (a === &quot;}&quot;) {
            if (braces === 0) {
              throw [&quot;ExtraCloseMissingOpen&quot;, &quot;Extra close brace or missing open brace&quot;];
            } else {
              braces--;
            }
          }
          i++;
        }
        if (braces &gt; 0) {
          return null;
        }
        return null;
      };
      var match = _match(input, begExcl);
      if (match === null) {
        return null;
      }
      input = input.substr(match.length);
      match = _match(input, begIncl);
      if (match === null) {
        return null;
      }
      var e = _findObserveGroups(input, match.length, endIncl || endExcl);
      if (e === null) {
        return null;
      }
      var match1 = input.substring(0, endIncl ? e.endMatchEnd : e.endMatchBegin);
      if (!(beg2Excl || beg2Incl)) {
        return {
          match_: match1,
          remainder: input.substr(e.endMatchEnd)
        };
      } else {
        var group2 = this.findObserveGroups(input.substr(e.endMatchEnd), beg2Excl, beg2Incl, end2Incl, end2Excl);
        if (group2 === null) {
          return null;
        }
        var matchRet = [match1, group2.match_];
        return {
          match_: combine ? matchRet.join(&quot;&quot;) : matchRet,
          remainder: group2.remainder
        };
      }
    },
    //
    // Matching function
    // e.g. match(&quot;a&quot;, input) will look for the regexp called &quot;a&quot; and see if it matches
    // returns null or {match_:&quot;a&quot;, remainder:&quot;bc&quot;}
    //
    match_: function(m, input) {
      var pattern = mhchemParser.patterns.patterns[m];
      if (pattern === void 0) {
        throw [&quot;MhchemBugP&quot;, &quot;mhchem bug P. Please report. (&quot; + m + &quot;)&quot;];
      } else if (typeof pattern === &quot;function&quot;) {
        return mhchemParser.patterns.patterns[m](input);
      } else {
        var match = input.match(pattern);
        if (match) {
          var mm;
          if (match[2]) {
            mm = [match[1], match[2]];
          } else if (match[1]) {
            mm = match[1];
          } else {
            mm = match[0];
          }
          return { match_: mm, remainder: input.substr(match[0].length) };
        }
        return null;
      }
    }
  },
  //
  // Generic state machine actions
  //
  actions: {
    &quot;a=&quot;: function(buffer, m) {
      buffer.a = (buffer.a || &quot;&quot;) + m;
    },
    &quot;b=&quot;: function(buffer, m) {
      buffer.b = (buffer.b || &quot;&quot;) + m;
    },
    &quot;p=&quot;: function(buffer, m) {
      buffer.p = (buffer.p || &quot;&quot;) + m;
    },
    &quot;o=&quot;: function(buffer, m) {
      buffer.o = (buffer.o || &quot;&quot;) + m;
    },
    &quot;q=&quot;: function(buffer, m) {
      buffer.q = (buffer.q || &quot;&quot;) + m;
    },
    &quot;d=&quot;: function(buffer, m) {
      buffer.d = (buffer.d || &quot;&quot;) + m;
    },
    &quot;rm=&quot;: function(buffer, m) {
      buffer.rm = (buffer.rm || &quot;&quot;) + m;
    },
    &quot;text=&quot;: function(buffer, m) {
      buffer.text_ = (buffer.text_ || &quot;&quot;) + m;
    },
    &quot;insert&quot;: function(buffer, m, a) {
      return { type_: a };
    },
    &quot;insert+p1&quot;: function(buffer, m, a) {
      return { type_: a, p1: m };
    },
    &quot;insert+p1+p2&quot;: function(buffer, m, a) {
      return { type_: a, p1: m[0], p2: m[1] };
    },
    &quot;copy&quot;: function(buffer, m) {
      return m;
    },
    &quot;rm&quot;: function(buffer, m) {
      return { type_: &quot;rm&quot;, p1: m || &quot;&quot; };
    },
    &quot;text&quot;: function(buffer, m) {
      return mhchemParser.go(m, &quot;text&quot;);
    },
    &quot;{text}&quot;: function(buffer, m) {
      var ret = [&quot;{&quot;];
      mhchemParser.concatArray(ret, mhchemParser.go(m, &quot;text&quot;));
      ret.push(&quot;}&quot;);
      return ret;
    },
    &quot;tex-math&quot;: function(buffer, m) {
      return mhchemParser.go(m, &quot;tex-math&quot;);
    },
    &quot;tex-math tight&quot;: function(buffer, m) {
      return mhchemParser.go(m, &quot;tex-math tight&quot;);
    },
    &quot;bond&quot;: function(buffer, m, k) {
      return { type_: &quot;bond&quot;, kind_: k || m };
    },
    &quot;color0-output&quot;: function(buffer, m) {
      return { type_: &quot;color0&quot;, color: m[0] };
    },
    &quot;ce&quot;: function(buffer, m) {
      return mhchemParser.go(m);
    },
    &quot;1/2&quot;: function(buffer, m) {
      var ret = [];
      if (m.match(/^[+\-]/)) {
        ret.push(m.substr(0, 1));
        m = m.substr(1);
      }
      var n = m.match(/^([0-9]+|\$[a-z]\$|[a-z])\/([0-9]+)(\$[a-z]\$|[a-z])?$/);
      n[1] = n[1].replace(/\$/g, &quot;&quot;);
      ret.push({ type_: &quot;frac&quot;, p1: n[1], p2: n[2] });
      if (n[3]) {
        n[3] = n[3].replace(/\$/g, &quot;&quot;);
        ret.push({ type_: &quot;tex-math&quot;, p1: n[3] });
      }
      return ret;
    },
    &quot;9,9&quot;: function(buffer, m) {
      return mhchemParser.go(m, &quot;9,9&quot;);
    }
  },
  //
  // createTransitions
  // convert  { &#039;letter&#039;: { &#039;state&#039;: { action_: &#039;output&#039; } } }  to  { &#039;state&#039; =&gt; [ { pattern: &#039;letter&#039;, task: { action_: [{type_: &#039;output&#039;}] } } ] }
  // with expansion of &#039;a|b&#039; to &#039;a&#039; and &#039;b&#039; (at 2 places)
  //
  createTransitions: function(o) {
    var pattern, state;
    var stateArray;
    var i;
    var transitions = {};
    for (pattern in o) {
      for (state in o[pattern]) {
        stateArray = state.split(&quot;|&quot;);
        o[pattern][state].stateArray = stateArray;
        for (i = 0; i &lt; stateArray.length; i++) {
          transitions[stateArray[i]] = [];
        }
      }
    }
    for (pattern in o) {
      for (state in o[pattern]) {
        stateArray = o[pattern][state].stateArray || [];
        for (i = 0; i &lt; stateArray.length; i++) {
          var p = o[pattern][state];
          if (p.action_) {
            p.action_ = [].concat(p.action_);
            for (var k = 0; k &lt; p.action_.length; k++) {
              if (typeof p.action_[k] === &quot;string&quot;) {
                p.action_[k] = { type_: p.action_[k] };
              }
            }
          } else {
            p.action_ = [];
          }
          var patternArray = pattern.split(&quot;|&quot;);
          for (var j = 0; j &lt; patternArray.length; j++) {
            if (stateArray[i] === &quot;*&quot;) {
              for (var t in transitions) {
                transitions[t].push({ pattern: patternArray[j], task: p });
              }
            } else {
              transitions[stateArray[i]].push({ pattern: patternArray[j], task: p });
            }
          }
        }
      }
    }
    return transitions;
  },
  stateMachines: {}
};
mhchemParser.stateMachines = {
  //
  // \ce state machines
  //
  //#region ce
  &quot;ce&quot;: {
    // main parser
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: { action_: &quot;output&quot; }
      },
      &quot;else&quot;: {
        &quot;0|1|2&quot;: { action_: &quot;beginsWithBond=false&quot;, revisit: true, toContinue: true }
      },
      &quot;oxidation$&quot;: {
        &quot;0&quot;: { action_: &quot;oxidation-output&quot; }
      },
      &quot;CMT&quot;: {
        &quot;r&quot;: { action_: &quot;rdt=&quot;, nextState: &quot;rt&quot; },
        &quot;rd&quot;: { action_: &quot;rqt=&quot;, nextState: &quot;rdt&quot; }
      },
      &quot;arrowUpDown&quot;: {
        &quot;0|1|2|as&quot;: { action_: [&quot;sb=false&quot;, &quot;output&quot;, &quot;operator&quot;], nextState: &quot;1&quot; }
      },
      &quot;uprightEntities&quot;: {
        &quot;0|1|2&quot;: { action_: [&quot;o=&quot;, &quot;output&quot;], nextState: &quot;1&quot; }
      },
      &quot;orbital&quot;: {
        &quot;0|1|2|3&quot;: { action_: &quot;o=&quot;, nextState: &quot;o&quot; }
      },
      &quot;-&gt;&quot;: {
        &quot;0|1|2|3&quot;: { action_: &quot;r=&quot;, nextState: &quot;r&quot; },
        &quot;a|as&quot;: { action_: [&quot;output&quot;, &quot;r=&quot;], nextState: &quot;r&quot; },
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;r=&quot;], nextState: &quot;r&quot; }
      },
      &quot;+&quot;: {
        &quot;o&quot;: { action_: &quot;d= kv&quot;, nextState: &quot;d&quot; },
        &quot;d|D&quot;: { action_: &quot;d=&quot;, nextState: &quot;d&quot; },
        &quot;q&quot;: { action_: &quot;d=&quot;, nextState: &quot;qd&quot; },
        &quot;qd|qD&quot;: { action_: &quot;d=&quot;, nextState: &quot;qd&quot; },
        &quot;dq&quot;: { action_: [&quot;output&quot;, &quot;d=&quot;], nextState: &quot;d&quot; },
        &quot;3&quot;: { action_: [&quot;sb=false&quot;, &quot;output&quot;, &quot;operator&quot;], nextState: &quot;0&quot; }
      },
      &quot;amount&quot;: {
        &quot;0|2&quot;: { action_: &quot;a=&quot;, nextState: &quot;a&quot; }
      },
      &quot;pm-operator&quot;: {
        &quot;0|1|2|a|as&quot;: { action_: [&quot;sb=false&quot;, &quot;output&quot;, { type_: &quot;operator&quot;, option: &quot;\\pm&quot; }], nextState: &quot;0&quot; }
      },
      &quot;operator&quot;: {
        &quot;0|1|2|a|as&quot;: { action_: [&quot;sb=false&quot;, &quot;output&quot;, &quot;operator&quot;], nextState: &quot;0&quot; }
      },
      &quot;-$&quot;: {
        &quot;o|q&quot;: { action_: [&quot;charge or bond&quot;, &quot;output&quot;], nextState: &quot;qd&quot; },
        &quot;d&quot;: { action_: &quot;d=&quot;, nextState: &quot;d&quot; },
        &quot;D&quot;: { action_: [&quot;output&quot;, { type_: &quot;bond&quot;, option: &quot;-&quot; }], nextState: &quot;3&quot; },
        &quot;q&quot;: { action_: &quot;d=&quot;, nextState: &quot;qd&quot; },
        &quot;qd&quot;: { action_: &quot;d=&quot;, nextState: &quot;qd&quot; },
        &quot;qD|dq&quot;: { action_: [&quot;output&quot;, { type_: &quot;bond&quot;, option: &quot;-&quot; }], nextState: &quot;3&quot; }
      },
      &quot;-9&quot;: {
        &quot;3|o&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert&quot;, option: &quot;hyphen&quot; }], nextState: &quot;3&quot; }
      },
      &quot;- orbital overlap&quot;: {
        &quot;o&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert&quot;, option: &quot;hyphen&quot; }], nextState: &quot;2&quot; },
        &quot;d&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert&quot;, option: &quot;hyphen&quot; }], nextState: &quot;2&quot; }
      },
      &quot;-&quot;: {
        &quot;0|1|2&quot;: { action_: [{ type_: &quot;output&quot;, option: 1 }, &quot;beginsWithBond=true&quot;, { type_: &quot;bond&quot;, option: &quot;-&quot; }], nextState: &quot;3&quot; },
        &quot;3&quot;: { action_: { type_: &quot;bond&quot;, option: &quot;-&quot; } },
        &quot;a&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert&quot;, option: &quot;hyphen&quot; }], nextState: &quot;2&quot; },
        &quot;as&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, { type_: &quot;bond&quot;, option: &quot;-&quot; }], nextState: &quot;3&quot; },
        &quot;b&quot;: { action_: &quot;b=&quot; },
        &quot;o&quot;: { action_: { type_: &quot;- after o/d&quot;, option: false }, nextState: &quot;2&quot; },
        &quot;q&quot;: { action_: { type_: &quot;- after o/d&quot;, option: false }, nextState: &quot;2&quot; },
        &quot;d|qd|dq&quot;: { action_: { type_: &quot;- after o/d&quot;, option: true }, nextState: &quot;2&quot; },
        &quot;D|qD|p&quot;: { action_: [&quot;output&quot;, { type_: &quot;bond&quot;, option: &quot;-&quot; }], nextState: &quot;3&quot; }
      },
      &quot;amount2&quot;: {
        &quot;1|3&quot;: { action_: &quot;a=&quot;, nextState: &quot;a&quot; }
      },
      &quot;letters&quot;: {
        &quot;0|1|2|3|a|as|b|p|bp|o&quot;: { action_: &quot;o=&quot;, nextState: &quot;o&quot; },
        &quot;q|dq&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;], nextState: &quot;o&quot; },
        &quot;d|D|qd|qD&quot;: { action_: &quot;o after d&quot;, nextState: &quot;o&quot; }
      },
      &quot;digits&quot;: {
        &quot;o&quot;: { action_: &quot;q=&quot;, nextState: &quot;q&quot; },
        &quot;d|D&quot;: { action_: &quot;q=&quot;, nextState: &quot;dq&quot; },
        &quot;q&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;], nextState: &quot;o&quot; },
        &quot;a&quot;: { action_: &quot;o=&quot;, nextState: &quot;o&quot; }
      },
      &quot;space A&quot;: {
        &quot;b|p|bp&quot;: {}
      },
      &quot;space&quot;: {
        &quot;a&quot;: { nextState: &quot;as&quot; },
        &quot;0&quot;: { action_: &quot;sb=false&quot; },
        &quot;1|2&quot;: { action_: &quot;sb=true&quot; },
        &quot;r|rt|rd|rdt|rdq&quot;: { action_: &quot;output&quot;, nextState: &quot;0&quot; },
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;sb=true&quot;], nextState: &quot;1&quot; }
      },
      &quot;1st-level escape&quot;: {
        &quot;1|2&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert+p1&quot;, option: &quot;1st-level escape&quot; }] },
        &quot;*&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert+p1&quot;, option: &quot;1st-level escape&quot; }], nextState: &quot;0&quot; }
      },
      &quot;[(...)]&quot;: {
        &quot;r|rt&quot;: { action_: &quot;rd=&quot;, nextState: &quot;rd&quot; },
        &quot;rd|rdt&quot;: { action_: &quot;rq=&quot;, nextState: &quot;rdq&quot; }
      },
      &quot;...&quot;: {
        &quot;o|d|D|dq|qd|qD&quot;: { action_: [&quot;output&quot;, { type_: &quot;bond&quot;, option: &quot;...&quot; }], nextState: &quot;3&quot; },
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 1 }, { type_: &quot;insert&quot;, option: &quot;ellipsis&quot; }], nextState: &quot;1&quot; }
      },
      &quot;. |* &quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, { type_: &quot;insert&quot;, option: &quot;addition compound&quot; }], nextState: &quot;1&quot; }
      },
      &quot;state of aggregation $&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;state of aggregation&quot;], nextState: &quot;1&quot; }
      },
      &quot;{[(&quot;: {
        &quot;a|as|o&quot;: { action_: [&quot;o=&quot;, &quot;output&quot;, &quot;parenthesisLevel++&quot;], nextState: &quot;2&quot; },
        &quot;0|1|2|3&quot;: { action_: [&quot;o=&quot;, &quot;output&quot;, &quot;parenthesisLevel++&quot;], nextState: &quot;2&quot; },
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;, &quot;output&quot;, &quot;parenthesisLevel++&quot;], nextState: &quot;2&quot; }
      },
      &quot;)]}&quot;: {
        &quot;0|1|2|3|b|p|bp|o&quot;: { action_: [&quot;o=&quot;, &quot;parenthesisLevel--&quot;], nextState: &quot;o&quot; },
        &quot;a|as|d|D|q|qd|qD|dq&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;, &quot;parenthesisLevel--&quot;], nextState: &quot;o&quot; }
      },
      &quot;, &quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;comma&quot;], nextState: &quot;0&quot; }
      },
      &quot;^_&quot;: {
        // ^ and _ without a sensible argument
        &quot;*&quot;: {}
      },
      &quot;^{(...)}|^($...$)&quot;: {
        &quot;0|1|2|as&quot;: { action_: &quot;b=&quot;, nextState: &quot;b&quot; },
        &quot;p&quot;: { action_: &quot;b=&quot;, nextState: &quot;bp&quot; },
        &quot;3|o&quot;: { action_: &quot;d= kv&quot;, nextState: &quot;D&quot; },
        &quot;q&quot;: { action_: &quot;d=&quot;, nextState: &quot;qD&quot; },
        &quot;d|D|qd|qD|dq&quot;: { action_: [&quot;output&quot;, &quot;d=&quot;], nextState: &quot;D&quot; }
      },
      &quot;^a|^\\x{}{}|^\\x{}|^\\x|&#039;&quot;: {
        &quot;0|1|2|as&quot;: { action_: &quot;b=&quot;, nextState: &quot;b&quot; },
        &quot;p&quot;: { action_: &quot;b=&quot;, nextState: &quot;bp&quot; },
        &quot;3|o&quot;: { action_: &quot;d= kv&quot;, nextState: &quot;d&quot; },
        &quot;q&quot;: { action_: &quot;d=&quot;, nextState: &quot;qd&quot; },
        &quot;d|qd|D|qD&quot;: { action_: &quot;d=&quot; },
        &quot;dq&quot;: { action_: [&quot;output&quot;, &quot;d=&quot;], nextState: &quot;d&quot; }
      },
      &quot;_{(state of aggregation)}$&quot;: {
        &quot;d|D|q|qd|qD|dq&quot;: { action_: [&quot;output&quot;, &quot;q=&quot;], nextState: &quot;q&quot; }
      },
      &quot;_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x&quot;: {
        &quot;0|1|2|as&quot;: { action_: &quot;p=&quot;, nextState: &quot;p&quot; },
        &quot;b&quot;: { action_: &quot;p=&quot;, nextState: &quot;bp&quot; },
        &quot;3|o&quot;: { action_: &quot;q=&quot;, nextState: &quot;q&quot; },
        &quot;d|D&quot;: { action_: &quot;q=&quot;, nextState: &quot;dq&quot; },
        &quot;q|qd|qD|dq&quot;: { action_: [&quot;output&quot;, &quot;q=&quot;], nextState: &quot;q&quot; }
      },
      &quot;=&lt;&gt;&quot;: {
        &quot;0|1|2|3|a|as|o|q|d|D|qd|qD|dq&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;bond&quot;], nextState: &quot;3&quot; }
      },
      &quot;#&quot;: {
        &quot;0|1|2|3|a|as|o&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, { type_: &quot;bond&quot;, option: &quot;#&quot; }], nextState: &quot;3&quot; }
      },
      &quot;{}&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;output&quot;, option: 1 }, nextState: &quot;1&quot; }
      },
      &quot;{...}&quot;: {
        &quot;0|1|2|3|a|as|b|p|bp&quot;: { action_: &quot;o=&quot;, nextState: &quot;o&quot; },
        &quot;o|d|D|q|qd|qD|dq&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;], nextState: &quot;o&quot; }
      },
      &quot;$...$&quot;: {
        &quot;a&quot;: { action_: &quot;a=&quot; },
        // 2$n$
        &quot;0|1|2|3|as|b|p|bp|o&quot;: { action_: &quot;o=&quot;, nextState: &quot;o&quot; },
        // not &#039;amount&#039;
        &quot;as|o&quot;: { action_: &quot;o=&quot; },
        &quot;q|d|D|qd|qD|dq&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;], nextState: &quot;o&quot; }
      },
      &quot;\\bond{(...)}&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;bond&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\frac{(...)}&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 1 }, &quot;frac-output&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\overset{(...)}&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;overset-output&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\underset{(...)}&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;underset-output&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\underbrace{(...)}&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;underbrace-output&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\color{(...)}{(...)}1|\\color(...){(...)}2&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;color-output&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\color{(...)}0&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;color0-output&quot;] }
      },
      &quot;\\ce{(...)}&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 2 }, &quot;ce&quot;], nextState: &quot;3&quot; }
      },
      &quot;\\,&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 1 }, &quot;copy&quot;], nextState: &quot;1&quot; }
      },
      &quot;\\x{}{}|\\x{}|\\x&quot;: {
        &quot;0|1|2|3|a|as|b|p|bp|o|c0&quot;: { action_: [&quot;o=&quot;, &quot;output&quot;], nextState: &quot;3&quot; },
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;o=&quot;, &quot;output&quot;], nextState: &quot;3&quot; }
      },
      &quot;others&quot;: {
        &quot;*&quot;: { action_: [{ type_: &quot;output&quot;, option: 1 }, &quot;copy&quot;], nextState: &quot;3&quot; }
      },
      &quot;else2&quot;: {
        &quot;a&quot;: { action_: &quot;a to o&quot;, nextState: &quot;o&quot;, revisit: true },
        &quot;as&quot;: { action_: [&quot;output&quot;, &quot;sb=true&quot;], nextState: &quot;1&quot;, revisit: true },
        &quot;r|rt|rd|rdt|rdq&quot;: { action_: [&quot;output&quot;], nextState: &quot;0&quot;, revisit: true },
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;copy&quot;], nextState: &quot;3&quot; }
      }
    }),
    actions: {
      &quot;o after d&quot;: function(buffer, m) {
        var ret;
        if ((buffer.d || &quot;&quot;).match(/^[0-9]+$/)) {
          var tmp = buffer.d;
          buffer.d = void 0;
          ret = this[&quot;output&quot;](buffer);
          buffer.b = tmp;
        } else {
          ret = this[&quot;output&quot;](buffer);
        }
        mhchemParser.actions[&quot;o=&quot;](buffer, m);
        return ret;
      },
      &quot;d= kv&quot;: function(buffer, m) {
        buffer.d = m;
        buffer.dType = &quot;kv&quot;;
      },
      &quot;charge or bond&quot;: function(buffer, m) {
        if (buffer[&quot;beginsWithBond&quot;]) {
          var ret = [];
          mhchemParser.concatArray(ret, this[&quot;output&quot;](buffer));
          mhchemParser.concatArray(ret, mhchemParser.actions[&quot;bond&quot;](buffer, m, &quot;-&quot;));
          return ret;
        } else {
          buffer.d = m;
        }
      },
      &quot;- after o/d&quot;: function(buffer, m, isAfterD) {
        var c1 = mhchemParser.patterns.match_(&quot;orbital&quot;, buffer.o || &quot;&quot;);
        var c2 = mhchemParser.patterns.match_(&quot;one lowercase greek letter $&quot;, buffer.o || &quot;&quot;);
        var c3 = mhchemParser.patterns.match_(&quot;one lowercase latin letter $&quot;, buffer.o || &quot;&quot;);
        var c4 = mhchemParser.patterns.match_(&quot;$one lowercase latin letter$ $&quot;, buffer.o || &quot;&quot;);
        var hyphenFollows = m === &quot;-&quot; &amp;&amp; (c1 &amp;&amp; c1.remainder === &quot;&quot; || c2 || c3 || c4);
        if (hyphenFollows &amp;&amp; !buffer.a &amp;&amp; !buffer.b &amp;&amp; !buffer.p &amp;&amp; !buffer.d &amp;&amp; !buffer.q &amp;&amp; !c1 &amp;&amp; c3) {
          buffer.o = &quot;$&quot; + buffer.o + &quot;$&quot;;
        }
        var ret = [];
        if (hyphenFollows) {
          mhchemParser.concatArray(ret, this[&quot;output&quot;](buffer));
          ret.push({ type_: &quot;hyphen&quot; });
        } else {
          c1 = mhchemParser.patterns.match_(&quot;digits&quot;, buffer.d || &quot;&quot;);
          if (isAfterD &amp;&amp; c1 &amp;&amp; c1.remainder === &quot;&quot;) {
            mhchemParser.concatArray(ret, mhchemParser.actions[&quot;d=&quot;](buffer, m));
            mhchemParser.concatArray(ret, this[&quot;output&quot;](buffer));
          } else {
            mhchemParser.concatArray(ret, this[&quot;output&quot;](buffer));
            mhchemParser.concatArray(ret, mhchemParser.actions[&quot;bond&quot;](buffer, m, &quot;-&quot;));
          }
        }
        return ret;
      },
      &quot;a to o&quot;: function(buffer) {
        buffer.o = buffer.a;
        buffer.a = void 0;
      },
      &quot;sb=true&quot;: function(buffer) {
        buffer.sb = true;
      },
      &quot;sb=false&quot;: function(buffer) {
        buffer.sb = false;
      },
      &quot;beginsWithBond=true&quot;: function(buffer) {
        buffer[&quot;beginsWithBond&quot;] = true;
      },
      &quot;beginsWithBond=false&quot;: function(buffer) {
        buffer[&quot;beginsWithBond&quot;] = false;
      },
      &quot;parenthesisLevel++&quot;: function(buffer) {
        buffer[&quot;parenthesisLevel&quot;]++;
      },
      &quot;parenthesisLevel--&quot;: function(buffer) {
        buffer[&quot;parenthesisLevel&quot;]--;
      },
      &quot;state of aggregation&quot;: function(buffer, m) {
        return { type_: &quot;state of aggregation&quot;, p1: mhchemParser.go(m, &quot;o&quot;) };
      },
      &quot;comma&quot;: function(buffer, m) {
        var a = m.replace(/\s*$/, &quot;&quot;);
        var withSpace = a !== m;
        if (withSpace &amp;&amp; buffer[&quot;parenthesisLevel&quot;] === 0) {
          return { type_: &quot;comma enumeration L&quot;, p1: a };
        } else {
          return { type_: &quot;comma enumeration M&quot;, p1: a };
        }
      },
      &quot;output&quot;: function(buffer, m, entityFollows) {
        var ret;
        if (!buffer.r) {
          ret = [];
          if (!buffer.a &amp;&amp; !buffer.b &amp;&amp; !buffer.p &amp;&amp; !buffer.o &amp;&amp; !buffer.q &amp;&amp; !buffer.d &amp;&amp; !entityFollows) {
          } else {
            if (buffer.sb) {
              ret.push({ type_: &quot;entitySkip&quot; });
            }
            if (!buffer.o &amp;&amp; !buffer.q &amp;&amp; !buffer.d &amp;&amp; !buffer.b &amp;&amp; !buffer.p &amp;&amp; entityFollows !== 2) {
              buffer.o = buffer.a;
              buffer.a = void 0;
            } else if (!buffer.o &amp;&amp; !buffer.q &amp;&amp; !buffer.d &amp;&amp; (buffer.b || buffer.p)) {
              buffer.o = buffer.a;
              buffer.d = buffer.b;
              buffer.q = buffer.p;
              buffer.a = buffer.b = buffer.p = void 0;
            } else {
              if (buffer.o &amp;&amp; buffer.dType === &quot;kv&quot; &amp;&amp; mhchemParser.patterns.match_(&quot;d-oxidation$&quot;, buffer.d || &quot;&quot;)) {
                buffer.dType = &quot;oxidation&quot;;
              } else if (buffer.o &amp;&amp; buffer.dType === &quot;kv&quot; &amp;&amp; !buffer.q) {
                buffer.dType = void 0;
              }
            }
            ret.push({
              type_: &quot;chemfive&quot;,
              a: mhchemParser.go(buffer.a, &quot;a&quot;),
              b: mhchemParser.go(buffer.b, &quot;bd&quot;),
              p: mhchemParser.go(buffer.p, &quot;pq&quot;),
              o: mhchemParser.go(buffer.o, &quot;o&quot;),
              q: mhchemParser.go(buffer.q, &quot;pq&quot;),
              d: mhchemParser.go(buffer.d, buffer.dType === &quot;oxidation&quot; ? &quot;oxidation&quot; : &quot;bd&quot;),
              dType: buffer.dType
            });
          }
        } else {
          var rd;
          if (buffer.rdt === &quot;M&quot;) {
            rd = mhchemParser.go(buffer.rd, &quot;tex-math&quot;);
          } else if (buffer.rdt === &quot;T&quot;) {
            rd = [{ type_: &quot;text&quot;, p1: buffer.rd || &quot;&quot; }];
          } else {
            rd = mhchemParser.go(buffer.rd);
          }
          var rq;
          if (buffer.rqt === &quot;M&quot;) {
            rq = mhchemParser.go(buffer.rq, &quot;tex-math&quot;);
          } else if (buffer.rqt === &quot;T&quot;) {
            rq = [{ type_: &quot;text&quot;, p1: buffer.rq || &quot;&quot; }];
          } else {
            rq = mhchemParser.go(buffer.rq);
          }
          ret = {
            type_: &quot;arrow&quot;,
            r: buffer.r,
            rd,
            rq
          };
        }
        for (var p in buffer) {
          if (p !== &quot;parenthesisLevel&quot; &amp;&amp; p !== &quot;beginsWithBond&quot;) {
            delete buffer[p];
          }
        }
        return ret;
      },
      &quot;oxidation-output&quot;: function(buffer, m) {
        var ret = [&quot;{&quot;];
        mhchemParser.concatArray(ret, mhchemParser.go(m, &quot;oxidation&quot;));
        ret.push(&quot;}&quot;);
        return ret;
      },
      &quot;frac-output&quot;: function(buffer, m) {
        return { type_: &quot;frac-ce&quot;, p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      &quot;overset-output&quot;: function(buffer, m) {
        return { type_: &quot;overset&quot;, p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      &quot;underset-output&quot;: function(buffer, m) {
        return { type_: &quot;underset&quot;, p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      &quot;underbrace-output&quot;: function(buffer, m) {
        return { type_: &quot;underbrace&quot;, p1: mhchemParser.go(m[0]), p2: mhchemParser.go(m[1]) };
      },
      &quot;color-output&quot;: function(buffer, m) {
        return { type_: &quot;color&quot;, color1: m[0], color2: mhchemParser.go(m[1]) };
      },
      &quot;r=&quot;: function(buffer, m) {
        buffer.r = m;
      },
      &quot;rdt=&quot;: function(buffer, m) {
        buffer.rdt = m;
      },
      &quot;rd=&quot;: function(buffer, m) {
        buffer.rd = m;
      },
      &quot;rqt=&quot;: function(buffer, m) {
        buffer.rqt = m;
      },
      &quot;rq=&quot;: function(buffer, m) {
        buffer.rq = m;
      },
      &quot;operator&quot;: function(buffer, m, p1) {
        return { type_: &quot;operator&quot;, kind_: p1 || m };
      }
    }
  },
  &quot;a&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: {}
      },
      &quot;1/2$&quot;: {
        &quot;0&quot;: { action_: &quot;1/2&quot; }
      },
      &quot;else&quot;: {
        &quot;0&quot;: { nextState: &quot;1&quot;, revisit: true }
      },
      &quot;$(...)$&quot;: {
        &quot;*&quot;: { action_: &quot;tex-math tight&quot;, nextState: &quot;1&quot; }
      },
      &quot;,&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;insert&quot;, option: &quot;commaDecimal&quot; } }
      },
      &quot;else2&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      }
    }),
    actions: {}
  },
  &quot;o&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: {}
      },
      &quot;1/2$&quot;: {
        &quot;0&quot;: { action_: &quot;1/2&quot; }
      },
      &quot;else&quot;: {
        &quot;0&quot;: { nextState: &quot;1&quot;, revisit: true }
      },
      &quot;letters&quot;: {
        &quot;*&quot;: { action_: &quot;rm&quot; }
      },
      &quot;\\ca&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;insert&quot;, option: &quot;circa&quot; } }
      },
      &quot;\\x{}{}|\\x{}|\\x&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      },
      &quot;${(...)}$|$(...)$&quot;: {
        &quot;*&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;{(...)}&quot;: {
        &quot;*&quot;: { action_: &quot;{text}&quot; }
      },
      &quot;else2&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      }
    }),
    actions: {}
  },
  &quot;text&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: { action_: &quot;output&quot; }
      },
      &quot;{...}&quot;: {
        &quot;*&quot;: { action_: &quot;text=&quot; }
      },
      &quot;${(...)}$|$(...)$&quot;: {
        &quot;*&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;\\greek&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;rm&quot;] }
      },
      &quot;\\,|\\x{}{}|\\x{}|\\x&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;copy&quot;] }
      },
      &quot;else&quot;: {
        &quot;*&quot;: { action_: &quot;text=&quot; }
      }
    }),
    actions: {
      &quot;output&quot;: function(buffer) {
        if (buffer.text_) {
          var ret = { type_: &quot;text&quot;, p1: buffer.text_ };
          for (var p in buffer) {
            delete buffer[p];
          }
          return ret;
        }
      }
    }
  },
  &quot;pq&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: {}
      },
      &quot;state of aggregation $&quot;: {
        &quot;*&quot;: { action_: &quot;state of aggregation&quot; }
      },
      &quot;i$&quot;: {
        &quot;0&quot;: { nextState: &quot;!f&quot;, revisit: true }
      },
      &quot;(KV letters),&quot;: {
        &quot;0&quot;: { action_: &quot;rm&quot;, nextState: &quot;0&quot; }
      },
      &quot;formula$&quot;: {
        &quot;0&quot;: { nextState: &quot;f&quot;, revisit: true }
      },
      &quot;1/2$&quot;: {
        &quot;0&quot;: { action_: &quot;1/2&quot; }
      },
      &quot;else&quot;: {
        &quot;0&quot;: { nextState: &quot;!f&quot;, revisit: true }
      },
      &quot;${(...)}$|$(...)$&quot;: {
        &quot;*&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;{(...)}&quot;: {
        &quot;*&quot;: { action_: &quot;text&quot; }
      },
      &quot;a-z&quot;: {
        &quot;f&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;letters&quot;: {
        &quot;*&quot;: { action_: &quot;rm&quot; }
      },
      &quot;-9.,9&quot;: {
        &quot;*&quot;: { action_: &quot;9,9&quot; }
      },
      &quot;,&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;insert+p1&quot;, option: &quot;comma enumeration S&quot; } }
      },
      &quot;\\color{(...)}{(...)}1|\\color(...){(...)}2&quot;: {
        &quot;*&quot;: { action_: &quot;color-output&quot; }
      },
      &quot;\\color{(...)}0&quot;: {
        &quot;*&quot;: { action_: &quot;color0-output&quot; }
      },
      &quot;\\ce{(...)}&quot;: {
        &quot;*&quot;: { action_: &quot;ce&quot; }
      },
      &quot;\\,|\\x{}{}|\\x{}|\\x&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      },
      &quot;else2&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      }
    }),
    actions: {
      &quot;state of aggregation&quot;: function(buffer, m) {
        return { type_: &quot;state of aggregation subscript&quot;, p1: mhchemParser.go(m, &quot;o&quot;) };
      },
      &quot;color-output&quot;: function(buffer, m) {
        return { type_: &quot;color&quot;, color1: m[0], color2: mhchemParser.go(m[1], &quot;pq&quot;) };
      }
    }
  },
  &quot;bd&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: {}
      },
      &quot;x$&quot;: {
        &quot;0&quot;: { nextState: &quot;!f&quot;, revisit: true }
      },
      &quot;formula$&quot;: {
        &quot;0&quot;: { nextState: &quot;f&quot;, revisit: true }
      },
      &quot;else&quot;: {
        &quot;0&quot;: { nextState: &quot;!f&quot;, revisit: true }
      },
      &quot;-9.,9 no missing 0&quot;: {
        &quot;*&quot;: { action_: &quot;9,9&quot; }
      },
      &quot;.&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;insert&quot;, option: &quot;electron dot&quot; } }
      },
      &quot;a-z&quot;: {
        &quot;f&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;x&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;insert&quot;, option: &quot;KV x&quot; } }
      },
      &quot;letters&quot;: {
        &quot;*&quot;: { action_: &quot;rm&quot; }
      },
      &quot;&#039;&quot;: {
        &quot;*&quot;: { action_: { type_: &quot;insert&quot;, option: &quot;prime&quot; } }
      },
      &quot;${(...)}$|$(...)$&quot;: {
        &quot;*&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;{(...)}&quot;: {
        &quot;*&quot;: { action_: &quot;text&quot; }
      },
      &quot;\\color{(...)}{(...)}1|\\color(...){(...)}2&quot;: {
        &quot;*&quot;: { action_: &quot;color-output&quot; }
      },
      &quot;\\color{(...)}0&quot;: {
        &quot;*&quot;: { action_: &quot;color0-output&quot; }
      },
      &quot;\\ce{(...)}&quot;: {
        &quot;*&quot;: { action_: &quot;ce&quot; }
      },
      &quot;\\,|\\x{}{}|\\x{}|\\x&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      },
      &quot;else2&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      }
    }),
    actions: {
      &quot;color-output&quot;: function(buffer, m) {
        return { type_: &quot;color&quot;, color1: m[0], color2: mhchemParser.go(m[1], &quot;bd&quot;) };
      }
    }
  },
  &quot;oxidation&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: {}
      },
      &quot;roman numeral&quot;: {
        &quot;*&quot;: { action_: &quot;roman-numeral&quot; }
      },
      &quot;${(...)}$|$(...)$&quot;: {
        &quot;*&quot;: { action_: &quot;tex-math&quot; }
      },
      &quot;else&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      }
    }),
    actions: {
      &quot;roman-numeral&quot;: function(buffer, m) {
        return { type_: &quot;roman numeral&quot;, p1: m || &quot;&quot; };
      }
    }
  },
  &quot;tex-math&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: { action_: &quot;output&quot; }
      },
      &quot;\\ce{(...)}&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;ce&quot;] }
      },
      &quot;{...}|\\,|\\x{}{}|\\x{}|\\x&quot;: {
        &quot;*&quot;: { action_: &quot;o=&quot; }
      },
      &quot;else&quot;: {
        &quot;*&quot;: { action_: &quot;o=&quot; }
      }
    }),
    actions: {
      &quot;output&quot;: function(buffer) {
        if (buffer.o) {
          var ret = { type_: &quot;tex-math&quot;, p1: buffer.o };
          for (var p in buffer) {
            delete buffer[p];
          }
          return ret;
        }
      }
    }
  },
  &quot;tex-math tight&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: { action_: &quot;output&quot; }
      },
      &quot;\\ce{(...)}&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;ce&quot;] }
      },
      &quot;{...}|\\,|\\x{}{}|\\x{}|\\x&quot;: {
        &quot;*&quot;: { action_: &quot;o=&quot; }
      },
      &quot;-|+&quot;: {
        &quot;*&quot;: { action_: &quot;tight operator&quot; }
      },
      &quot;else&quot;: {
        &quot;*&quot;: { action_: &quot;o=&quot; }
      }
    }),
    actions: {
      &quot;tight operator&quot;: function(buffer, m) {
        buffer.o = (buffer.o || &quot;&quot;) + &quot;{&quot; + m + &quot;}&quot;;
      },
      &quot;output&quot;: function(buffer) {
        if (buffer.o) {
          var ret = { type_: &quot;tex-math&quot;, p1: buffer.o };
          for (var p in buffer) {
            delete buffer[p];
          }
          return ret;
        }
      }
    }
  },
  &quot;9,9&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: {}
      },
      &quot;,&quot;: {
        &quot;*&quot;: { action_: &quot;comma&quot; }
      },
      &quot;else&quot;: {
        &quot;*&quot;: { action_: &quot;copy&quot; }
      }
    }),
    actions: {
      &quot;comma&quot;: function() {
        return { type_: &quot;commaDecimal&quot; };
      }
    }
  },
  //#endregion
  //
  // \pu state machines
  //
  //#region pu
  &quot;pu&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: { action_: &quot;output&quot; }
      },
      &quot;space$&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;space&quot;] }
      },
      &quot;{[(|)]}&quot;: {
        &quot;0|a&quot;: { action_: &quot;copy&quot; }
      },
      &quot;(-)(9)^(-9)&quot;: {
        &quot;0&quot;: { action_: &quot;number^&quot;, nextState: &quot;a&quot; }
      },
      &quot;(-)(9.,9)(e)(99)&quot;: {
        &quot;0&quot;: { action_: &quot;enumber&quot;, nextState: &quot;a&quot; }
      },
      &quot;space&quot;: {
        &quot;0|a&quot;: {}
      },
      &quot;pm-operator&quot;: {
        &quot;0|a&quot;: { action_: { type_: &quot;operator&quot;, option: &quot;\\pm&quot; }, nextState: &quot;0&quot; }
      },
      &quot;operator&quot;: {
        &quot;0|a&quot;: { action_: &quot;copy&quot;, nextState: &quot;0&quot; }
      },
      &quot;//&quot;: {
        &quot;d&quot;: { action_: &quot;o=&quot;, nextState: &quot;/&quot; }
      },
      &quot;/&quot;: {
        &quot;d&quot;: { action_: &quot;o=&quot;, nextState: &quot;/&quot; }
      },
      &quot;{...}|else&quot;: {
        &quot;0|d&quot;: { action_: &quot;d=&quot;, nextState: &quot;d&quot; },
        &quot;a&quot;: { action_: [&quot;space&quot;, &quot;d=&quot;], nextState: &quot;d&quot; },
        &quot;/|q&quot;: { action_: &quot;q=&quot;, nextState: &quot;q&quot; }
      }
    }),
    actions: {
      &quot;enumber&quot;: function(buffer, m) {
        var ret = [];
        if (m[0] === &quot;+-&quot; || m[0] === &quot;+/-&quot;) {
          ret.push(&quot;\\pm &quot;);
        } else if (m[0]) {
          ret.push(m[0]);
        }
        if (m[1]) {
          mhchemParser.concatArray(ret, mhchemParser.go(m[1], &quot;pu-9,9&quot;));
          if (m[2]) {
            if (m[2].match(/[,.]/)) {
              mhchemParser.concatArray(ret, mhchemParser.go(m[2], &quot;pu-9,9&quot;));
            } else {
              ret.push(m[2]);
            }
          }
          m[3] = m[4] || m[3];
          if (m[3]) {
            m[3] = m[3].trim();
            if (m[3] === &quot;e&quot; || m[3].substr(0, 1) === &quot;*&quot;) {
              ret.push({ type_: &quot;cdot&quot; });
            } else {
              ret.push({ type_: &quot;times&quot; });
            }
          }
        }
        if (m[3]) {
          ret.push(&quot;10^{&quot; + m[5] + &quot;}&quot;);
        }
        return ret;
      },
      &quot;number^&quot;: function(buffer, m) {
        var ret = [];
        if (m[0] === &quot;+-&quot; || m[0] === &quot;+/-&quot;) {
          ret.push(&quot;\\pm &quot;);
        } else if (m[0]) {
          ret.push(m[0]);
        }
        mhchemParser.concatArray(ret, mhchemParser.go(m[1], &quot;pu-9,9&quot;));
        ret.push(&quot;^{&quot; + m[2] + &quot;}&quot;);
        return ret;
      },
      &quot;operator&quot;: function(buffer, m, p1) {
        return { type_: &quot;operator&quot;, kind_: p1 || m };
      },
      &quot;space&quot;: function() {
        return { type_: &quot;pu-space-1&quot; };
      },
      &quot;output&quot;: function(buffer) {
        var ret;
        var md = mhchemParser.patterns.match_(&quot;{(...)}&quot;, buffer.d || &quot;&quot;);
        if (md &amp;&amp; md.remainder === &quot;&quot;) {
          buffer.d = md.match_;
        }
        var mq = mhchemParser.patterns.match_(&quot;{(...)}&quot;, buffer.q || &quot;&quot;);
        if (mq &amp;&amp; mq.remainder === &quot;&quot;) {
          buffer.q = mq.match_;
        }
        if (buffer.d) {
          buffer.d = buffer.d.replace(/\u00B0C|\^oC|\^{o}C/g, &quot;{}^{\\circ}C&quot;);
          buffer.d = buffer.d.replace(/\u00B0F|\^oF|\^{o}F/g, &quot;{}^{\\circ}F&quot;);
        }
        if (buffer.q) {
          buffer.q = buffer.q.replace(/\u00B0C|\^oC|\^{o}C/g, &quot;{}^{\\circ}C&quot;);
          buffer.q = buffer.q.replace(/\u00B0F|\^oF|\^{o}F/g, &quot;{}^{\\circ}F&quot;);
          var b5 = {
            d: mhchemParser.go(buffer.d, &quot;pu&quot;),
            q: mhchemParser.go(buffer.q, &quot;pu&quot;)
          };
          if (buffer.o === &quot;//&quot;) {
            ret = { type_: &quot;pu-frac&quot;, p1: b5.d, p2: b5.q };
          } else {
            ret = b5.d;
            if (b5.d.length &gt; 1 || b5.q.length &gt; 1) {
              ret.push({ type_: &quot; / &quot; });
            } else {
              ret.push({ type_: &quot;/&quot; });
            }
            mhchemParser.concatArray(ret, b5.q);
          }
        } else {
          ret = mhchemParser.go(buffer.d, &quot;pu-2&quot;);
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      }
    }
  },
  &quot;pu-2&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;*&quot;: { action_: &quot;output&quot; }
      },
      &quot;*&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;cdot&quot;], nextState: &quot;0&quot; }
      },
      &quot;\\x&quot;: {
        &quot;*&quot;: { action_: &quot;rm=&quot; }
      },
      &quot;space&quot;: {
        &quot;*&quot;: { action_: [&quot;output&quot;, &quot;space&quot;], nextState: &quot;0&quot; }
      },
      &quot;^{(...)}|^(-1)&quot;: {
        &quot;1&quot;: { action_: &quot;^(-1)&quot; }
      },
      &quot;-9.,9&quot;: {
        &quot;0&quot;: { action_: &quot;rm=&quot;, nextState: &quot;0&quot; },
        &quot;1&quot;: { action_: &quot;^(-1)&quot;, nextState: &quot;0&quot; }
      },
      &quot;{...}|else&quot;: {
        &quot;*&quot;: { action_: &quot;rm=&quot;, nextState: &quot;1&quot; }
      }
    }),
    actions: {
      &quot;cdot&quot;: function() {
        return { type_: &quot;tight cdot&quot; };
      },
      &quot;^(-1)&quot;: function(buffer, m) {
        buffer.rm += &quot;^{&quot; + m + &quot;}&quot;;
      },
      &quot;space&quot;: function() {
        return { type_: &quot;pu-space-2&quot; };
      },
      &quot;output&quot;: function(buffer) {
        var ret = [];
        if (buffer.rm) {
          var mrm = mhchemParser.patterns.match_(&quot;{(...)}&quot;, buffer.rm || &quot;&quot;);
          if (mrm &amp;&amp; mrm.remainder === &quot;&quot;) {
            ret = mhchemParser.go(mrm.match_, &quot;pu&quot;);
          } else {
            ret = { type_: &quot;rm&quot;, p1: buffer.rm };
          }
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      }
    }
  },
  &quot;pu-9,9&quot;: {
    transitions: mhchemParser.createTransitions({
      &quot;empty&quot;: {
        &quot;0&quot;: { action_: &quot;output-0&quot; },
        &quot;o&quot;: { action_: &quot;output-o&quot; }
      },
      &quot;,&quot;: {
        &quot;0&quot;: { action_: [&quot;output-0&quot;, &quot;comma&quot;], nextState: &quot;o&quot; }
      },
      &quot;.&quot;: {
        &quot;0&quot;: { action_: [&quot;output-0&quot;, &quot;copy&quot;], nextState: &quot;o&quot; }
      },
      &quot;else&quot;: {
        &quot;*&quot;: { action_: &quot;text=&quot; }
      }
    }),
    actions: {
      &quot;comma&quot;: function() {
        return { type_: &quot;commaDecimal&quot; };
      },
      &quot;output-0&quot;: function(buffer) {
        var ret = [];
        buffer.text_ = buffer.text_ || &quot;&quot;;
        if (buffer.text_.length &gt; 4) {
          var a = buffer.text_.length % 3;
          if (a === 0) {
            a = 3;
          }
          for (var i = buffer.text_.length - 3; i &gt; 0; i -= 3) {
            ret.push(buffer.text_.substr(i, 3));
            ret.push({ type_: &quot;1000 separator&quot; });
          }
          ret.push(buffer.text_.substr(0, a));
          ret.reverse();
        } else {
          ret.push(buffer.text_);
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      },
      &quot;output-o&quot;: function(buffer) {
        var ret = [];
        buffer.text_ = buffer.text_ || &quot;&quot;;
        if (buffer.text_.length &gt; 4) {
          var a = buffer.text_.length - 3;
          for (var i = 0; i &lt; a; i += 3) {
            ret.push(buffer.text_.substr(i, 3));
            ret.push({ type_: &quot;1000 separator&quot; });
          }
          ret.push(buffer.text_.substr(i));
        } else {
          ret.push(buffer.text_);
        }
        for (var p in buffer) {
          delete buffer[p];
        }
        return ret;
      }
    }
  }
  //#endregion
};
var texify = {
  go: function(input, isInner) {
    if (!input) {
      return &quot;&quot;;
    }
    var res = &quot;&quot;;
    var cee = false;
    for (var i = 0; i &lt; input.length; i++) {
      var inputi = input[i];
      if (typeof inputi === &quot;string&quot;) {
        res += inputi;
      } else {
        res += texify._go2(inputi);
        if (inputi.type_ === &quot;1st-level escape&quot;) {
          cee = true;
        }
      }
    }
    if (!isInner &amp;&amp; !cee &amp;&amp; res) {
      res = &quot;{&quot; + res + &quot;}&quot;;
    }
    return res;
  },
  _goInner: function(input) {
    if (!input) {
      return input;
    }
    return texify.go(input, true);
  },
  _go2: function(buf) {
    var res;
    switch (buf.type_) {
      case &quot;chemfive&quot;:
        res = &quot;&quot;;
        var b5 = {
          a: texify._goInner(buf.a),
          b: texify._goInner(buf.b),
          p: texify._goInner(buf.p),
          o: texify._goInner(buf.o),
          q: texify._goInner(buf.q),
          d: texify._goInner(buf.d)
        };
        if (b5.a) {
          if (b5.a.match(/^[+\-]/)) {
            b5.a = &quot;{&quot; + b5.a + &quot;}&quot;;
          }
          res += b5.a + &quot;\\,&quot;;
        }
        if (b5.b || b5.p) {
          res += &quot;{\\vphantom{X}}&quot;;
          res += &quot;^{\\hphantom{&quot; + (b5.b || &quot;&quot;) + &quot;}}_{\\hphantom{&quot; + (b5.p || &quot;&quot;) + &quot;}}&quot;;
          res += &quot;{\\vphantom{X}}&quot;;
          res += &quot;^{\\vphantom{2}\\mathllap{&quot; + (b5.b || &quot;&quot;) + &quot;}}&quot;;
          res += &quot;_{\\vphantom{2}\\mathllap{&quot; + (b5.p || &quot;&quot;) + &quot;}}&quot;;
        }
        if (b5.o) {
          if (b5.o.match(/^[+\-]/)) {
            b5.o = &quot;{&quot; + b5.o + &quot;}&quot;;
          }
          res += b5.o;
        }
        if (buf.dType === &quot;kv&quot;) {
          if (b5.d || b5.q) {
            res += &quot;{\\vphantom{X}}&quot;;
          }
          if (b5.d) {
            res += &quot;^{&quot; + b5.d + &quot;}&quot;;
          }
          if (b5.q) {
            res += &quot;_{&quot; + b5.q + &quot;}&quot;;
          }
        } else if (buf.dType === &quot;oxidation&quot;) {
          if (b5.d) {
            res += &quot;{\\vphantom{X}}&quot;;
            res += &quot;^{&quot; + b5.d + &quot;}&quot;;
          }
          if (b5.q) {
            res += &quot;{{}}&quot;;
            res += &quot;_{&quot; + b5.q + &quot;}&quot;;
          }
        } else {
          if (b5.q) {
            res += &quot;{{}}&quot;;
            res += &quot;_{&quot; + b5.q + &quot;}&quot;;
          }
          if (b5.d) {
            res += &quot;{{}}&quot;;
            res += &quot;^{&quot; + b5.d + &quot;}&quot;;
          }
        }
        break;
      case &quot;rm&quot;:
        res = &quot;\\mathrm{&quot; + buf.p1 + &quot;}&quot;;
        break;
      case &quot;text&quot;:
        if (buf.p1.match(/[\^_]/)) {
          buf.p1 = buf.p1.replace(&quot; &quot;, &quot;~&quot;).replace(&quot;-&quot;, &quot;\\text{-}&quot;);
          res = &quot;\\mathrm{&quot; + buf.p1 + &quot;}&quot;;
        } else {
          res = &quot;\\text{&quot; + buf.p1 + &quot;}&quot;;
        }
        break;
      case &quot;roman numeral&quot;:
        res = &quot;\\mathrm{&quot; + buf.p1 + &quot;}&quot;;
        break;
      case &quot;state of aggregation&quot;:
        res = &quot;\\mskip2mu &quot; + texify._goInner(buf.p1);
        break;
      case &quot;state of aggregation subscript&quot;:
        res = &quot;\\mskip1mu &quot; + texify._goInner(buf.p1);
        break;
      case &quot;bond&quot;:
        res = texify._getBond(buf.kind_);
        if (!res) {
          throw [&quot;MhchemErrorBond&quot;, &quot;mhchem Error. Unknown bond type (&quot; + buf.kind_ + &quot;)&quot;];
        }
        break;
      case &quot;frac&quot;:
        var c = &quot;\\frac{&quot; + buf.p1 + &quot;}{&quot; + buf.p2 + &quot;}&quot;;
        res = &quot;\\mathchoice{\\textstyle&quot; + c + &quot;}{&quot; + c + &quot;}{&quot; + c + &quot;}{&quot; + c + &quot;}&quot;;
        break;
      case &quot;pu-frac&quot;:
        var d = &quot;\\frac{&quot; + texify._goInner(buf.p1) + &quot;}{&quot; + texify._goInner(buf.p2) + &quot;}&quot;;
        res = &quot;\\mathchoice{\\textstyle&quot; + d + &quot;}{&quot; + d + &quot;}{&quot; + d + &quot;}{&quot; + d + &quot;}&quot;;
        break;
      case &quot;tex-math&quot;:
        res = buf.p1 + &quot; &quot;;
        break;
      case &quot;frac-ce&quot;:
        res = &quot;\\frac{&quot; + texify._goInner(buf.p1) + &quot;}{&quot; + texify._goInner(buf.p2) + &quot;}&quot;;
        break;
      case &quot;overset&quot;:
        res = &quot;\\overset{&quot; + texify._goInner(buf.p1) + &quot;}{&quot; + texify._goInner(buf.p2) + &quot;}&quot;;
        break;
      case &quot;underset&quot;:
        res = &quot;\\underset{&quot; + texify._goInner(buf.p1) + &quot;}{&quot; + texify._goInner(buf.p2) + &quot;}&quot;;
        break;
      case &quot;underbrace&quot;:
        res = &quot;\\underbrace{&quot; + texify._goInner(buf.p1) + &quot;}_{&quot; + texify._goInner(buf.p2) + &quot;}&quot;;
        break;
      case &quot;color&quot;:
        res = &quot;{\\color{&quot; + buf.color1 + &quot;}{&quot; + texify._goInner(buf.color2) + &quot;}}&quot;;
        break;
      case &quot;color0&quot;:
        res = &quot;\\color{&quot; + buf.color + &quot;}&quot;;
        break;
      case &quot;arrow&quot;:
        var b6 = {
          rd: texify._goInner(buf.rd),
          rq: texify._goInner(buf.rq)
        };
        var arrow = texify._getArrow(buf.r);
        if (b6.rq) {
          arrow += &quot;[{\\rm &quot; + b6.rq + &quot;}]&quot;;
        }
        if (b6.rd) {
          arrow += &quot;{\\rm &quot; + b6.rd + &quot;}&quot;;
        } else {
          arrow += &quot;{}&quot;;
        }
        res = arrow;
        break;
      case &quot;operator&quot;:
        res = texify._getOperator(buf.kind_);
        break;
      case &quot;1st-level escape&quot;:
        res = buf.p1 + &quot; &quot;;
        break;
      case &quot;space&quot;:
        res = &quot; &quot;;
        break;
      case &quot;entitySkip&quot;:
        res = &quot;~&quot;;
        break;
      case &quot;pu-space-1&quot;:
        res = &quot;~&quot;;
        break;
      case &quot;pu-space-2&quot;:
        res = &quot;\\mkern3mu &quot;;
        break;
      case &quot;1000 separator&quot;:
        res = &quot;\\mkern2mu &quot;;
        break;
      case &quot;commaDecimal&quot;:
        res = &quot;{,}&quot;;
        break;
      case &quot;comma enumeration L&quot;:
        res = &quot;{&quot; + buf.p1 + &quot;}\\mkern6mu &quot;;
        break;
      case &quot;comma enumeration M&quot;:
        res = &quot;{&quot; + buf.p1 + &quot;}\\mkern3mu &quot;;
        break;
      case &quot;comma enumeration S&quot;:
        res = &quot;{&quot; + buf.p1 + &quot;}\\mkern1mu &quot;;
        break;
      case &quot;hyphen&quot;:
        res = &quot;\\text{-}&quot;;
        break;
      case &quot;addition compound&quot;:
        res = &quot;\\,{\\cdot}\\,&quot;;
        break;
      case &quot;electron dot&quot;:
        res = &quot;\\mkern1mu \\text{\\textbullet}\\mkern1mu &quot;;
        break;
      case &quot;KV x&quot;:
        res = &quot;{\\times}&quot;;
        break;
      case &quot;prime&quot;:
        res = &quot;\\prime &quot;;
        break;
      case &quot;cdot&quot;:
        res = &quot;\\cdot &quot;;
        break;
      case &quot;tight cdot&quot;:
        res = &quot;\\mkern1mu{\\cdot}\\mkern1mu &quot;;
        break;
      case &quot;times&quot;:
        res = &quot;\\times &quot;;
        break;
      case &quot;circa&quot;:
        res = &quot;{\\sim}&quot;;
        break;
      case &quot;^&quot;:
        res = &quot;uparrow&quot;;
        break;
      case &quot;v&quot;:
        res = &quot;downarrow&quot;;
        break;
      case &quot;ellipsis&quot;:
        res = &quot;\\ldots &quot;;
        break;
      case &quot;/&quot;:
        res = &quot;/&quot;;
        break;
      case &quot; / &quot;:
        res = &quot;\\,/\\,&quot;;
        break;
      default:
        assertNever(buf);
        throw [&quot;MhchemBugT&quot;, &quot;mhchem bug T. Please report.&quot;];
    }
    assertString(res);
    return res;
  },
  _getArrow: function(a) {
    switch (a) {
      case &quot;-&gt;&quot;:
        return &quot;\\yields&quot;;
      case &quot;\u2192&quot;:
        return &quot;\\yields&quot;;
      case &quot;\u27F6&quot;:
        return &quot;\\yields&quot;;
      case &quot;&lt;-&quot;:
        return &quot;\\yieldsLeft&quot;;
      case &quot;&lt;-&gt;&quot;:
        return &quot;\\mesomerism&quot;;
      case &quot;&lt;--&gt;&quot;:
        return &quot;\\yieldsLeftRight&quot;;
      case &quot;&lt;=&gt;&quot;:
        return &quot;\\equilibrium&quot;;
      case &quot;\u21CC&quot;:
        return &quot;\\equilibrium&quot;;
      case &quot;&lt;=&gt;&gt;&quot;:
        return &quot;\\equilibriumRight&quot;;
      case &quot;&lt;&lt;=&gt;&quot;:
        return &quot;\\equilibriumLeft&quot;;
      default:
        assertNever(a);
        throw [&quot;MhchemBugT&quot;, &quot;mhchem bug T. Please report.&quot;];
    }
  },
  _getBond: function(a) {
    switch (a) {
      case &quot;-&quot;:
        return &quot;{-}&quot;;
      case &quot;1&quot;:
        return &quot;{-}&quot;;
      case &quot;=&quot;:
        return &quot;{=}&quot;;
      case &quot;2&quot;:
        return &quot;{=}&quot;;
      case &quot;#&quot;:
        return &quot;{\\equiv}&quot;;
      case &quot;3&quot;:
        return &quot;{\\equiv}&quot;;
      case &quot;~&quot;:
        return &quot;{\\tripleDash}&quot;;
      case &quot;~-&quot;:
        return &quot;{\\tripleDashOverLine}&quot;;
      case &quot;~=&quot;:
        return &quot;{\\tripleDashOverDoubleLine}&quot;;
      case &quot;~--&quot;:
        return &quot;{\\tripleDashOverDoubleLine}&quot;;
      case &quot;-~-&quot;:
        return &quot;{\\tripleDashBetweenDoubleLine}&quot;;
      case &quot;...&quot;:
        return &quot;{{\\cdot}{\\cdot}{\\cdot}}&quot;;
      case &quot;....&quot;:
        return &quot;{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}&quot;;
      case &quot;-&gt;&quot;:
        return &quot;{\\rightarrow}&quot;;
      case &quot;&lt;-&quot;:
        return &quot;{\\leftarrow}&quot;;
      case &quot;&lt;&quot;:
        return &quot;{&lt;}&quot;;
      case &quot;&gt;&quot;:
        return &quot;{&gt;}&quot;;
      default:
        assertNever(a);
        throw [&quot;MhchemBugT&quot;, &quot;mhchem bug T. Please report.&quot;];
    }
  },
  _getOperator: function(a) {
    switch (a) {
      case &quot;+&quot;:
        return &quot; {}+{} &quot;;
      case &quot;-&quot;:
        return &quot; {}-{} &quot;;
      case &quot;=&quot;:
        return &quot; {}={} &quot;;
      case &quot;&lt;&quot;:
        return &quot; {}&lt;{} &quot;;
      case &quot;&gt;&quot;:
        return &quot; {}&gt;{} &quot;;
      case &quot;&lt;&lt;&quot;:
        return &quot; {}\\ll{} &quot;;
      case &quot;&gt;&gt;&quot;:
        return &quot; {}\\gg{} &quot;;
      case &quot;\\pm&quot;:
        return &quot; {}\\pm{} &quot;;
      case &quot;\\approx&quot;:
        return &quot; {}\\approx{} &quot;;
      case &quot;$\\approx$&quot;:
        return &quot; {}\\approx{} &quot;;
      case &quot;v&quot;:
        return &quot; \\downarrow{} &quot;;
      case &quot;(v)&quot;:
        return &quot; \\downarrow{} &quot;;
      case &quot;^&quot;:
        return &quot; \\uparrow{} &quot;;
      case &quot;(^)&quot;:
        return &quot; \\uparrow{} &quot;;
      default:
        assertNever(a);
        throw [&quot;MhchemBugT&quot;, &quot;mhchem bug T. Please report.&quot;];
    }
  }
};
function assertNever(a) {
}
function assertString(a) {
}
defineMacro(&quot;\\darr&quot;, &quot;\\downarrow&quot;);
defineMacro(&quot;\\dArr&quot;, &quot;\\Downarrow&quot;);
defineMacro(&quot;\\Darr&quot;, &quot;\\Downarrow&quot;);
defineMacro(&quot;\\lang&quot;, &quot;\\langle&quot;);
defineMacro(&quot;\\rang&quot;, &quot;\\rangle&quot;);
defineMacro(&quot;\\uarr&quot;, &quot;\\uparrow&quot;);
defineMacro(&quot;\\uArr&quot;, &quot;\\Uparrow&quot;);
defineMacro(&quot;\\Uarr&quot;, &quot;\\Uparrow&quot;);
defineMacro(&quot;\\N&quot;, &quot;\\mathbb{N}&quot;);
defineMacro(&quot;\\R&quot;, &quot;\\mathbb{R}&quot;);
defineMacro(&quot;\\Z&quot;, &quot;\\mathbb{Z}&quot;);
defineMacro(&quot;\\alef&quot;, &quot;\\aleph&quot;);
defineMacro(&quot;\\alefsym&quot;, &quot;\\aleph&quot;);
defineMacro(&quot;\\bull&quot;, &quot;\\bullet&quot;);
defineMacro(&quot;\\clubs&quot;, &quot;\\clubsuit&quot;);
defineMacro(&quot;\\cnums&quot;, &quot;\\mathbb{C}&quot;);
defineMacro(&quot;\\Complex&quot;, &quot;\\mathbb{C}&quot;);
defineMacro(&quot;\\Dagger&quot;, &quot;\\ddagger&quot;);
defineMacro(&quot;\\diamonds&quot;, &quot;\\diamondsuit&quot;);
defineMacro(&quot;\\empty&quot;, &quot;\\emptyset&quot;);
defineMacro(&quot;\\exist&quot;, &quot;\\exists&quot;);
defineMacro(&quot;\\harr&quot;, &quot;\\leftrightarrow&quot;);
defineMacro(&quot;\\hArr&quot;, &quot;\\Leftrightarrow&quot;);
defineMacro(&quot;\\Harr&quot;, &quot;\\Leftrightarrow&quot;);
defineMacro(&quot;\\hearts&quot;, &quot;\\heartsuit&quot;);
defineMacro(&quot;\\image&quot;, &quot;\\Im&quot;);
defineMacro(&quot;\\infin&quot;, &quot;\\infty&quot;);
defineMacro(&quot;\\isin&quot;, &quot;\\in&quot;);
defineMacro(&quot;\\larr&quot;, &quot;\\leftarrow&quot;);
defineMacro(&quot;\\lArr&quot;, &quot;\\Leftarrow&quot;);
defineMacro(&quot;\\Larr&quot;, &quot;\\Leftarrow&quot;);
defineMacro(&quot;\\lrarr&quot;, &quot;\\leftrightarrow&quot;);
defineMacro(&quot;\\lrArr&quot;, &quot;\\Leftrightarrow&quot;);
defineMacro(&quot;\\Lrarr&quot;, &quot;\\Leftrightarrow&quot;);
defineMacro(&quot;\\natnums&quot;, &quot;\\mathbb{N}&quot;);
defineMacro(&quot;\\plusmn&quot;, &quot;\\pm&quot;);
defineMacro(&quot;\\rarr&quot;, &quot;\\rightarrow&quot;);
defineMacro(&quot;\\rArr&quot;, &quot;\\Rightarrow&quot;);
defineMacro(&quot;\\Rarr&quot;, &quot;\\Rightarrow&quot;);
defineMacro(&quot;\\real&quot;, &quot;\\Re&quot;);
defineMacro(&quot;\\reals&quot;, &quot;\\mathbb{R}&quot;);
defineMacro(&quot;\\Reals&quot;, &quot;\\mathbb{R}&quot;);
defineMacro(&quot;\\sdot&quot;, &quot;\\cdot&quot;);
defineMacro(&quot;\\sect&quot;, &quot;\\S&quot;);
defineMacro(&quot;\\spades&quot;, &quot;\\spadesuit&quot;);
defineMacro(&quot;\\sub&quot;, &quot;\\subset&quot;);
defineMacro(&quot;\\sube&quot;, &quot;\\subseteq&quot;);
defineMacro(&quot;\\supe&quot;, &quot;\\supseteq&quot;);
defineMacro(&quot;\\thetasym&quot;, &quot;\\vartheta&quot;);
defineMacro(&quot;\\weierp&quot;, &quot;\\wp&quot;);
defineMacro(&quot;\\quantity&quot;, &quot;{\\left\\{ #1 \\right\\}}&quot;);
defineMacro(&quot;\\qty&quot;, &quot;{\\left\\{ #1 \\right\\}}&quot;);
defineMacro(&quot;\\pqty&quot;, &quot;{\\left( #1 \\right)}&quot;);
defineMacro(&quot;\\bqty&quot;, &quot;{\\left[ #1 \\right]}&quot;);
defineMacro(&quot;\\vqty&quot;, &quot;{\\left\\vert #1 \\right\\vert}&quot;);
defineMacro(&quot;\\Bqty&quot;, &quot;{\\left\\{ #1 \\right\\}}&quot;);
defineMacro(&quot;\\absolutevalue&quot;, &quot;{\\left\\vert #1 \\right\\vert}&quot;);
defineMacro(&quot;\\abs&quot;, &quot;{\\left\\vert #1 \\right\\vert}&quot;);
defineMacro(&quot;\\norm&quot;, &quot;{\\left\\Vert #1 \\right\\Vert}&quot;);
defineMacro(&quot;\\evaluated&quot;, &quot;{\\left.#1 \\right\\vert}&quot;);
defineMacro(&quot;\\eval&quot;, &quot;{\\left.#1 \\right\\vert}&quot;);
defineMacro(&quot;\\order&quot;, &quot;{\\mathcal{O} \\left( #1 \\right)}&quot;);
defineMacro(&quot;\\commutator&quot;, &quot;{\\left[ #1 , #2 \\right]}&quot;);
defineMacro(&quot;\\comm&quot;, &quot;{\\left[ #1 , #2 \\right]}&quot;);
defineMacro(&quot;\\anticommutator&quot;, &quot;{\\left\\{ #1 , #2 \\right\\}}&quot;);
defineMacro(&quot;\\acomm&quot;, &quot;{\\left\\{ #1 , #2 \\right\\}}&quot;);
defineMacro(&quot;\\poissonbracket&quot;, &quot;{\\left\\{ #1 , #2 \\right\\}}&quot;);
defineMacro(&quot;\\pb&quot;, &quot;{\\left\\{ #1 , #2 \\right\\}}&quot;);
defineMacro(&quot;\\vectorbold&quot;, &quot;{\\boldsymbol{ #1 }}&quot;);
defineMacro(&quot;\\vb&quot;, &quot;{\\boldsymbol{ #1 }}&quot;);
defineMacro(&quot;\\vectorarrow&quot;, &quot;{\\vec{\\boldsymbol{ #1 }}}&quot;);
defineMacro(&quot;\\va&quot;, &quot;{\\vec{\\boldsymbol{ #1 }}}&quot;);
defineMacro(&quot;\\vectorunit&quot;, &quot;{{\\boldsymbol{\\hat{ #1 }}}}&quot;);
defineMacro(&quot;\\vu&quot;, &quot;{{\\boldsymbol{\\hat{ #1 }}}}&quot;);
defineMacro(&quot;\\dotproduct&quot;, &quot;\\mathbin{\\boldsymbol\\cdot}&quot;);
defineMacro(&quot;\\vdot&quot;, &quot;{\\boldsymbol\\cdot}&quot;);
defineMacro(&quot;\\crossproduct&quot;, &quot;\\mathbin{\\boldsymbol\\times}&quot;);
defineMacro(&quot;\\cross&quot;, &quot;\\mathbin{\\boldsymbol\\times}&quot;);
defineMacro(&quot;\\cp&quot;, &quot;\\mathbin{\\boldsymbol\\times}&quot;);
defineMacro(&quot;\\gradient&quot;, &quot;{\\boldsymbol\\nabla}&quot;);
defineMacro(&quot;\\grad&quot;, &quot;{\\boldsymbol\\nabla}&quot;);
defineMacro(&quot;\\divergence&quot;, &quot;{\\grad\\vdot}&quot;);
defineMacro(&quot;\\curl&quot;, &quot;{\\grad\\cross}&quot;);
defineMacro(&quot;\\laplacian&quot;, &quot;\\nabla^2&quot;);
defineMacro(&quot;\\tr&quot;, &quot;{\\operatorname{tr}}&quot;);
defineMacro(&quot;\\Tr&quot;, &quot;{\\operatorname{Tr}}&quot;);
defineMacro(&quot;\\rank&quot;, &quot;{\\operatorname{rank}}&quot;);
defineMacro(&quot;\\erf&quot;, &quot;{\\operatorname{erf}}&quot;);
defineMacro(&quot;\\Res&quot;, &quot;{\\operatorname{Res}}&quot;);
defineMacro(&quot;\\principalvalue&quot;, &quot;{\\mathcal{P}}&quot;);
defineMacro(&quot;\\pv&quot;, &quot;{\\mathcal{P}}&quot;);
defineMacro(&quot;\\PV&quot;, &quot;{\\operatorname{P.V.}}&quot;);
defineMacro(&quot;\\qqtext&quot;, &quot;{\\quad\\text{ #1 }\\quad}&quot;);
defineMacro(&quot;\\qq&quot;, &quot;{\\quad\\text{ #1 }\\quad}&quot;);
defineMacro(&quot;\\qcomma&quot;, &quot;{\\text{,}\\quad}&quot;);
defineMacro(&quot;\\qc&quot;, &quot;{\\text{,}\\quad}&quot;);
defineMacro(&quot;\\qcc&quot;, &quot;{\\quad\\text{c.c.}\\quad}&quot;);
defineMacro(&quot;\\qif&quot;, &quot;{\\quad\\text{if}\\quad}&quot;);
defineMacro(&quot;\\qthen&quot;, &quot;{\\quad\\text{then}\\quad}&quot;);
defineMacro(&quot;\\qelse&quot;, &quot;{\\quad\\text{else}\\quad}&quot;);
defineMacro(&quot;\\qotherwise&quot;, &quot;{\\quad\\text{otherwise}\\quad}&quot;);
defineMacro(&quot;\\qunless&quot;, &quot;{\\quad\\text{unless}\\quad}&quot;);
defineMacro(&quot;\\qgiven&quot;, &quot;{\\quad\\text{given}\\quad}&quot;);
defineMacro(&quot;\\qusing&quot;, &quot;{\\quad\\text{using}\\quad}&quot;);
defineMacro(&quot;\\qassume&quot;, &quot;{\\quad\\text{assume}\\quad}&quot;);
defineMacro(&quot;\\qsince&quot;, &quot;{\\quad\\text{since}\\quad}&quot;);
defineMacro(&quot;\\qlet&quot;, &quot;{\\quad\\text{let}\\quad}&quot;);
defineMacro(&quot;\\qfor&quot;, &quot;{\\quad\\text{for}\\quad}&quot;);
defineMacro(&quot;\\qall&quot;, &quot;{\\quad\\text{all}\\quad}&quot;);
defineMacro(&quot;\\qeven&quot;, &quot;{\\quad\\text{even}\\quad}&quot;);
defineMacro(&quot;\\qodd&quot;, &quot;{\\quad\\text{odd}\\quad}&quot;);
defineMacro(&quot;\\qinteger&quot;, &quot;{\\quad\\text{integer}\\quad}&quot;);
defineMacro(&quot;\\qand&quot;, &quot;{\\quad\\text{and}\\quad}&quot;);
defineMacro(&quot;\\qor&quot;, &quot;{\\quad\\text{or}\\quad}&quot;);
defineMacro(&quot;\\qas&quot;, &quot;{\\quad\\text{as}\\quad}&quot;);
defineMacro(&quot;\\qin&quot;, &quot;{\\quad\\text{in}\\quad}&quot;);
defineMacro(&quot;\\differential&quot;, &quot;{\\text{d}}&quot;);
defineMacro(&quot;\\dd&quot;, &quot;{\\text{d}}&quot;);
defineMacro(&quot;\\derivative&quot;, &quot;{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}&quot;);
defineMacro(&quot;\\dv&quot;, &quot;{\\frac{\\text{d}{ #1 }}{\\text{d}{ #2 }}}&quot;);
defineMacro(&quot;\\partialderivative&quot;, &quot;{\\frac{\\partial{ #1 }}{\\partial{ #2 }}}&quot;);
defineMacro(&quot;\\variation&quot;, &quot;{\\delta}&quot;);
defineMacro(&quot;\\var&quot;, &quot;{\\delta}&quot;);
defineMacro(&quot;\\functionalderivative&quot;, &quot;{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}&quot;);
defineMacro(&quot;\\fdv&quot;, &quot;{\\frac{\\delta{ #1 }}{\\delta{ #2 }}}&quot;);
defineMacro(&quot;\\innerproduct&quot;, &quot;{\\left\\langle {#1} \\mid { #2} \\right\\rangle}&quot;);
defineMacro(
  &quot;\\outerproduct&quot;,
  &quot;{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}&quot;
);
defineMacro(
  &quot;\\dyad&quot;,
  &quot;{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}&quot;
);
defineMacro(
  &quot;\\ketbra&quot;,
  &quot;{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}&quot;
);
defineMacro(
  &quot;\\op&quot;,
  &quot;{\\left\\vert { #1 } \\right\\rangle\\left\\langle { #2} \\right\\vert}&quot;
);
defineMacro(&quot;\\expectationvalue&quot;, &quot;{\\left\\langle {#1 } \\right\\rangle}&quot;);
defineMacro(&quot;\\expval&quot;, &quot;{\\left\\langle {#1 } \\right\\rangle}&quot;);
defineMacro(&quot;\\ev&quot;, &quot;{\\left\\langle {#1 } \\right\\rangle}&quot;);
defineMacro(
  &quot;\\matrixelement&quot;,
  &quot;{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}&quot;
);
defineMacro(
  &quot;\\matrixel&quot;,
  &quot;{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}&quot;
);
defineMacro(
  &quot;\\mel&quot;,
  &quot;{\\left\\langle{ #1 }\\right\\vert{ #2 }\\left\\vert{#3}\\right\\rangle}&quot;
);
function getHLines(parser) {
  const hlineInfo = [];
  parser.consumeSpaces();
  let nxt = parser.fetch().text;
  if (nxt === &quot;\\relax&quot;) {
    parser.consume();
    parser.consumeSpaces();
    nxt = parser.fetch().text;
  }
  while (nxt === &quot;\\hline&quot; || nxt === &quot;\\hdashline&quot;) {
    parser.consume();
    hlineInfo.push(nxt === &quot;\\hdashline&quot;);
    parser.consumeSpaces();
    nxt = parser.fetch().text;
  }
  return hlineInfo;
}
var validateAmsEnvironmentContext = (context) =&gt; {
  const settings = context.parser.settings;
  if (!settings.displayMode) {
    throw new ParseError(`{${context.envName}} can be used only in display mode.`);
  }
};
var sizeRegEx$1 = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/;
var arrayGaps = (macros2) =&gt; {
  let arraystretch = macros2.get(&quot;\\arraystretch&quot;);
  if (typeof arraystretch !== &quot;string&quot;) {
    arraystretch = stringFromArg(arraystretch.tokens);
  }
  arraystretch = isNaN(arraystretch) ? null : Number(arraystretch);
  let arraycolsepStr = macros2.get(&quot;\\arraycolsep&quot;);
  if (typeof arraycolsepStr !== &quot;string&quot;) {
    arraycolsepStr = stringFromArg(arraycolsepStr.tokens);
  }
  const match = sizeRegEx$1.exec(arraycolsepStr);
  const arraycolsep = match ? { number: +(match[1] + match[2]), unit: match[3] } : null;
  return [arraystretch, arraycolsep];
};
var checkCellForLabels = (cell) =&gt; {
  let rowLabel = &quot;&quot;;
  for (let i = 0; i &lt; cell.length; i++) {
    if (cell[i].type === &quot;label&quot;) {
      if (rowLabel) {
        throw new ParseError(&quot;Multiple \\labels in one row&quot;);
      }
      rowLabel = cell[i].string;
    }
  }
  return rowLabel;
};
function getAutoTag(name) {
  if (name.indexOf(&quot;ed&quot;) === -1) {
    return name.indexOf(&quot;*&quot;) === -1;
  }
}
function parseArray(parser, {
  cols,
  // [{ type: string , align: l|c|r|null }]
  envClasses,
  // align(ed|at|edat) | array | cases | cd | small | multline
  autoTag,
  // boolean
  singleRow,
  // boolean
  emptySingleRow,
  // boolean
  maxNumCols,
  // number
  leqno,
  // boolean
  arraystretch,
  // number  | null
  arraycolsep
  // size value | null
}, scriptLevel2) {
  parser.gullet.beginGroup();
  if (!singleRow) {
    parser.gullet.macros.set(&quot;\\cr&quot;, &quot;\\\\\\relax&quot;);
  }
  parser.gullet.beginGroup();
  let row = [];
  const body = [row];
  const rowGaps = [];
  const labels = [];
  const hLinesBeforeRow = [];
  const tags = autoTag != null ? [] : void 0;
  function beginRow() {
    if (autoTag) {
      parser.gullet.macros.set(&quot;\\@eqnsw&quot;, &quot;1&quot;, true);
    }
  }
  function endRow() {
    if (tags) {
      if (parser.gullet.macros.get(&quot;\\df@tag&quot;)) {
        tags.push(parser.subparse([new Token(&quot;\\df@tag&quot;)]));
        parser.gullet.macros.set(&quot;\\df@tag&quot;, void 0, true);
      } else {
        tags.push(Boolean(autoTag) &amp;&amp; parser.gullet.macros.get(&quot;\\@eqnsw&quot;) === &quot;1&quot;);
      }
    }
  }
  beginRow();
  hLinesBeforeRow.push(getHLines(parser));
  while (true) {
    let cell = parser.parseExpression(false, singleRow ? &quot;\\end&quot; : &quot;\\\\&quot;);
    parser.gullet.endGroup();
    parser.gullet.beginGroup();
    cell = {
      type: &quot;ordgroup&quot;,
      mode: parser.mode,
      body: cell,
      semisimple: true
    };
    row.push(cell);
    const next = parser.fetch().text;
    if (next === &quot;&amp;&quot;) {
      if (maxNumCols &amp;&amp; row.length === maxNumCols) {
        if (envClasses.includes(&quot;array&quot;)) {
          if (parser.settings.strict) {
            throw new ParseError(
              &quot;Too few columns specified in the {array} column argument.&quot;,
              parser.nextToken
            );
          }
        } else if (maxNumCols === 2) {
          throw new ParseError(
            &quot;The split environment accepts no more than two columns&quot;,
            parser.nextToken
          );
        } else {
          throw new ParseError(
            &quot;The equation environment accepts only one column&quot;,
            parser.nextToken
          );
        }
      }
      parser.consume();
    } else if (next === &quot;\\end&quot;) {
      endRow();
      if (row.length === 1 &amp;&amp; cell.body.length === 0 &amp;&amp; (body.length &gt; 1 || !emptySingleRow)) {
        body.pop();
      }
      labels.push(checkCellForLabels(cell.body));
      if (hLinesBeforeRow.length &lt; body.length + 1) {
        hLinesBeforeRow.push([]);
      }
      break;
    } else if (next === &quot;\\\\&quot;) {
      parser.consume();
      let size;
      if (parser.gullet.future().text !== &quot; &quot;) {
        size = parser.parseSizeGroup(true);
      }
      rowGaps.push(size ? size.value : null);
      endRow();
      labels.push(checkCellForLabels(cell.body));
      hLinesBeforeRow.push(getHLines(parser));
      row = [];
      body.push(row);
      beginRow();
    } else {
      throw new ParseError(&quot;Expected &amp; or \\\\ or \\cr or \\end&quot;, parser.nextToken);
    }
  }
  parser.gullet.endGroup();
  parser.gullet.endGroup();
  return {
    type: &quot;array&quot;,
    mode: parser.mode,
    body,
    cols,
    rowGaps,
    hLinesBeforeRow,
    envClasses,
    autoTag,
    scriptLevel: scriptLevel2,
    tags,
    labels,
    leqno,
    arraystretch,
    arraycolsep
  };
}
function dCellStyle(envName) {
  return envName.slice(0, 1) === &quot;d&quot; ? &quot;display&quot; : &quot;text&quot;;
}
var alignMap = {
  c: &quot;center &quot;,
  l: &quot;left &quot;,
  r: &quot;right &quot;
};
var glue = (group) =&gt; {
  const glueNode = new mathMLTree.MathNode(&quot;mtd&quot;, []);
  glueNode.style = { padding: &quot;0&quot;, width: &quot;50%&quot; };
  if (group.envClasses.includes(&quot;multline&quot;)) {
    glueNode.style.width = &quot;7.5%&quot;;
  }
  return glueNode;
};
var mathmlBuilder$7 = function(group, style) {
  const tbl = [];
  const numRows = group.body.length;
  const hlines = group.hLinesBeforeRow;
  for (let i = 0; i &lt; numRows; i++) {
    const rw = group.body[i];
    const row = [];
    const cellLevel = group.scriptLevel === &quot;text&quot; ? StyleLevel.TEXT : group.scriptLevel === &quot;script&quot; ? StyleLevel.SCRIPT : StyleLevel.DISPLAY;
    for (let j = 0; j &lt; rw.length; j++) {
      const mtd = new mathMLTree.MathNode(
        &quot;mtd&quot;,
        [buildGroup$1(rw[j], style.withLevel(cellLevel))]
      );
      if (group.envClasses.includes(&quot;multline&quot;)) {
        const align2 = i === 0 ? &quot;left&quot; : i === numRows - 1 ? &quot;right&quot; : &quot;center&quot;;
        mtd.setAttribute(&quot;columnalign&quot;, align2);
        if (align2 !== &quot;center&quot;) {
          mtd.classes.push(&quot;tml-&quot; + align2);
        }
      }
      row.push(mtd);
    }
    const numColumns = group.body[0].length;
    for (let k = 0; k &lt; numColumns - rw.length; k++) {
      row.push(new mathMLTree.MathNode(&quot;mtd&quot;, [], style));
    }
    if (group.autoTag) {
      const tag = group.tags[i];
      let tagElement;
      if (tag === true) {
        tagElement = new mathMLTree.MathNode(&quot;mtext&quot;, [new Span([&quot;tml-eqn&quot;])]);
      } else if (tag === false) {
        tagElement = new mathMLTree.MathNode(&quot;mtext&quot;, [], []);
      } else {
        tagElement = buildExpressionRow(tag[0].body, style.withLevel(cellLevel), true);
        tagElement = consolidateText(tagElement);
        tagElement.classes = [&quot;tml-tag&quot;];
      }
      if (tagElement) {
        row.unshift(glue(group));
        row.push(glue(group));
        if (group.leqno) {
          row[0].children.push(tagElement);
          row[0].classes.push(&quot;tml-left&quot;);
        } else {
          row[row.length - 1].children.push(tagElement);
          row[row.length - 1].classes.push(&quot;tml-right&quot;);
        }
      }
    }
    const mtr = new mathMLTree.MathNode(&quot;mtr&quot;, row, []);
    const label = group.labels.shift();
    if (label &amp;&amp; group.tags &amp;&amp; group.tags[i]) {
      mtr.setAttribute(&quot;id&quot;, label);
      if (Array.isArray(group.tags[i])) {
        mtr.classes.push(&quot;tml-tageqn&quot;);
      }
    }
    if (i === 0 &amp;&amp; hlines[0].length &gt; 0) {
      if (hlines[0].length === 2) {
        mtr.children.forEach((cell) =&gt; {
          cell.style.borderTop = &quot;0.15em double&quot;;
        });
      } else {
        mtr.children.forEach((cell) =&gt; {
          cell.style.borderTop = hlines[0][0] ? &quot;0.06em dashed&quot; : &quot;0.06em solid&quot;;
        });
      }
    }
    if (hlines[i + 1].length &gt; 0) {
      if (hlines[i + 1].length === 2) {
        mtr.children.forEach((cell) =&gt; {
          cell.style.borderBottom = &quot;0.15em double&quot;;
        });
      } else {
        mtr.children.forEach((cell) =&gt; {
          cell.style.borderBottom = hlines[i + 1][0] ? &quot;0.06em dashed&quot; : &quot;0.06em solid&quot;;
        });
      }
    }
    tbl.push(mtr);
  }
  if (group.envClasses.length &gt; 0) {
    if (group.arraystretch &amp;&amp; group.arraystretch !== 1) {
      const pad = String(1.4 * group.arraystretch - 0.8) + &quot;ex&quot;;
      for (let i = 0; i &lt; tbl.length; i++) {
        for (let j = 0; j &lt; tbl[i].children.length; j++) {
          tbl[i].children[j].style.paddingTop = pad;
          tbl[i].children[j].style.paddingBottom = pad;
        }
      }
    }
    let sidePadding = group.envClasses.includes(&quot;abut&quot;) ? &quot;0&quot; : group.envClasses.includes(&quot;cases&quot;) ? &quot;0&quot; : group.envClasses.includes(&quot;small&quot;) ? &quot;0.1389&quot; : group.envClasses.includes(&quot;cd&quot;) ? &quot;0.25&quot; : &quot;0.4&quot;;
    let sidePadUnit = &quot;em&quot;;
    if (group.arraycolsep) {
      const arraySidePad = calculateSize(group.arraycolsep, style);
      sidePadding = arraySidePad.number.toFixed(4);
      sidePadUnit = arraySidePad.unit;
    }
    const numCols = tbl.length === 0 ? 0 : tbl[0].children.length;
    const sidePad = (j, hand) =&gt; {
      if (j === 0 &amp;&amp; hand === 0) {
        return &quot;0&quot;;
      }
      if (j === numCols - 1 &amp;&amp; hand === 1) {
        return &quot;0&quot;;
      }
      if (group.envClasses[0] !== &quot;align&quot;) {
        return sidePadding;
      }
      if (hand === 1) {
        return &quot;0&quot;;
      }
      if (group.autoTag) {
        return j % 2 ? &quot;1&quot; : &quot;0&quot;;
      } else {
        return j % 2 ? &quot;0&quot; : &quot;1&quot;;
      }
    };
    for (let i = 0; i &lt; tbl.length; i++) {
      for (let j = 0; j &lt; tbl[i].children.length; j++) {
        tbl[i].children[j].style.paddingLeft = `${sidePad(j, 0)}${sidePadUnit}`;
        tbl[i].children[j].style.paddingRight = `${sidePad(j, 1)}${sidePadUnit}`;
      }
    }
    const align2 = group.envClasses.includes(&quot;align&quot;) || group.envClasses.includes(&quot;alignat&quot;);
    for (let i = 0; i &lt; tbl.length; i++) {
      const row = tbl[i];
      if (align2) {
        for (let j = 0; j &lt; row.children.length; j++) {
          row.children[j].classes = [&quot;tml-&quot; + (j % 2 ? &quot;left&quot; : &quot;right&quot;)];
        }
        if (group.autoTag) {
          const k = group.leqno ? 0 : row.children.length - 1;
          row.children[k].classes = [&quot;tml-&quot; + (group.leqno ? &quot;left&quot; : &quot;right&quot;)];
        }
      }
      if (row.children.length &gt; 1 &amp;&amp; group.envClasses.includes(&quot;cases&quot;)) {
        row.children[1].style.paddingLeft = &quot;1em&quot;;
      }
      if (group.envClasses.includes(&quot;cases&quot;) || group.envClasses.includes(&quot;subarray&quot;)) {
        for (const cell of row.children) {
          cell.classes.push(&quot;tml-left&quot;);
        }
      }
    }
  } else {
    for (let i = 0; i &lt; tbl.length; i++) {
      tbl[i].children[0].style.paddingLeft = &quot;0em&quot;;
      if (tbl[i].children.length === tbl[0].children.length) {
        tbl[i].children[tbl[i].children.length - 1].style.paddingRight = &quot;0em&quot;;
      }
    }
  }
  let table = new mathMLTree.MathNode(&quot;mtable&quot;, tbl);
  if (group.envClasses.length &gt; 0) {
    if (group.envClasses.includes(&quot;jot&quot;)) {
      table.classes.push(&quot;tml-jot&quot;);
    } else if (group.envClasses.includes(&quot;small&quot;)) {
      table.classes.push(&quot;tml-small&quot;);
    }
  }
  if (group.scriptLevel === &quot;display&quot;) {
    table.setAttribute(&quot;displaystyle&quot;, &quot;true&quot;);
  }
  if (group.autoTag || group.envClasses.includes(&quot;multline&quot;)) {
    table.style.width = &quot;100%&quot;;
  }
  let align = &quot;&quot;;
  if (group.cols &amp;&amp; group.cols.length &gt; 0) {
    const cols = group.cols;
    let prevTypeWasAlign = false;
    let iStart = 0;
    let iEnd = cols.length;
    while (cols[iStart].type === &quot;separator&quot;) {
      iStart += 1;
    }
    while (cols[iEnd - 1].type === &quot;separator&quot;) {
      iEnd -= 1;
    }
    if (cols[0].type === &quot;separator&quot;) {
      const sep = cols[1].type === &quot;separator&quot; ? &quot;0.15em double&quot; : cols[0].separator === &quot;|&quot; ? &quot;0.06em solid &quot; : &quot;0.06em dashed &quot;;
      for (const row of table.children) {
        row.children[0].style.borderLeft = sep;
      }
    }
    let iCol = group.autoTag ? 0 : -1;
    for (let i = iStart; i &lt; iEnd; i++) {
      if (cols[i].type === &quot;align&quot;) {
        const colAlign = alignMap[cols[i].align];
        align += colAlign;
        iCol += 1;
        for (const row of table.children) {
          if (colAlign.trim() !== &quot;center&quot; &amp;&amp; iCol &lt; row.children.length) {
            row.children[iCol].classes = [&quot;tml-&quot; + colAlign.trim()];
          }
        }
        prevTypeWasAlign = true;
      } else if (cols[i].type === &quot;separator&quot;) {
        if (prevTypeWasAlign) {
          const sep = cols[i + 1].type === &quot;separator&quot; ? &quot;0.15em double&quot; : cols[i].separator === &quot;|&quot; ? &quot;0.06em solid&quot; : &quot;0.06em dashed&quot;;
          for (const row of table.children) {
            if (iCol &lt; row.children.length) {
              row.children[iCol].style.borderRight = sep;
            }
          }
        }
        prevTypeWasAlign = false;
      }
    }
    if (cols[cols.length - 1].type === &quot;separator&quot;) {
      const sep = cols[cols.length - 2].type === &quot;separator&quot; ? &quot;0.15em double&quot; : cols[cols.length - 1].separator === &quot;|&quot; ? &quot;0.06em solid&quot; : &quot;0.06em dashed&quot;;
      for (const row of table.children) {
        row.children[row.children.length - 1].style.borderRight = sep;
        row.children[row.children.length - 1].style.paddingRight = &quot;0.4em&quot;;
      }
    }
  }
  if (group.autoTag) {
    align = &quot;left &quot; + (align.length &gt; 0 ? align : &quot;center &quot;) + &quot;right &quot;;
  }
  if (align) {
    table.setAttribute(&quot;columnalign&quot;, align.trim());
  }
  if (group.envClasses.includes(&quot;small&quot;)) {
    table = new mathMLTree.MathNode(&quot;mstyle&quot;, [table]);
    table.setAttribute(&quot;scriptlevel&quot;, &quot;1&quot;);
  }
  return table;
};
var alignedHandler = function(context, args) {
  if (context.envName.indexOf(&quot;ed&quot;) === -1) {
    validateAmsEnvironmentContext(context);
  }
  const isSplit = context.envName === &quot;split&quot;;
  const cols = [];
  const res = parseArray(
    context.parser,
    {
      cols,
      emptySingleRow: true,
      autoTag: isSplit ? void 0 : getAutoTag(context.envName),
      envClasses: [&quot;abut&quot;, &quot;jot&quot;],
      // set row spacing &amp; provisional column spacing
      maxNumCols: context.envName === &quot;split&quot; ? 2 : void 0,
      leqno: context.parser.settings.leqno
    },
    &quot;display&quot;
  );
  let numMaths;
  let numCols = 0;
  const isAlignedAt = context.envName.indexOf(&quot;at&quot;) &gt; -1;
  if (args[0] &amp;&amp; isAlignedAt) {
    let arg0 = &quot;&quot;;
    for (let i = 0; i &lt; args[0].body.length; i++) {
      const textord2 = assertNodeType(args[0].body[i], &quot;textord&quot;);
      arg0 += textord2.text;
    }
    if (isNaN(arg0)) {
      throw new ParseError(&quot;The alignat enviroment requires a numeric first argument.&quot;);
    }
    numMaths = Number(arg0);
    numCols = numMaths * 2;
  }
  res.body.forEach(function(row) {
    if (isAlignedAt) {
      const curMaths = row.length / 2;
      if (numMaths &lt; curMaths) {
        throw new ParseError(
          `Too many math in a row: expected ${numMaths}, but got ${curMaths}`,
          row[0]
        );
      }
    } else if (numCols &lt; row.length) {
      numCols = row.length;
    }
  });
  for (let i = 0; i &lt; numCols; ++i) {
    let align = &quot;r&quot;;
    if (i % 2 === 1) {
      align = &quot;l&quot;;
    }
    cols[i] = {
      type: &quot;align&quot;,
      align
    };
  }
  if (context.envName === &quot;split&quot;) ;
  else if (isAlignedAt) {
    res.envClasses.push(&quot;alignat&quot;);
  } else {
    res.envClasses[0] = &quot;align&quot;;
  }
  return res;
};
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;array&quot;, &quot;darray&quot;],
  props: {
    numArgs: 1
  },
  handler(context, args) {
    const symNode = checkSymbolNodeType(args[0]);
    const colalign = symNode ? [args[0]] : assertNodeType(args[0], &quot;ordgroup&quot;).body;
    const cols = colalign.map(function(nde) {
      const node = assertSymbolNodeType(nde);
      const ca = node.text;
      if (&quot;lcr&quot;.indexOf(ca) !== -1) {
        return {
          type: &quot;align&quot;,
          align: ca
        };
      } else if (ca === &quot;|&quot;) {
        return {
          type: &quot;separator&quot;,
          separator: &quot;|&quot;
        };
      } else if (ca === &quot;:&quot;) {
        return {
          type: &quot;separator&quot;,
          separator: &quot;:&quot;
        };
      }
      throw new ParseError(&quot;Unknown column alignment: &quot; + ca, nde);
    });
    const [arraystretch, arraycolsep] = arrayGaps(context.parser.gullet.macros);
    const res = {
      cols,
      envClasses: [&quot;array&quot;],
      maxNumCols: cols.length,
      arraystretch,
      arraycolsep
    };
    return parseArray(context.parser, res, dCellStyle(context.envName));
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [
    &quot;matrix&quot;,
    &quot;pmatrix&quot;,
    &quot;bmatrix&quot;,
    &quot;Bmatrix&quot;,
    &quot;vmatrix&quot;,
    &quot;Vmatrix&quot;,
    &quot;matrix*&quot;,
    &quot;pmatrix*&quot;,
    &quot;bmatrix*&quot;,
    &quot;Bmatrix*&quot;,
    &quot;vmatrix*&quot;,
    &quot;Vmatrix*&quot;
  ],
  props: {
    numArgs: 0
  },
  handler(context) {
    const delimiters2 = {
      matrix: null,
      pmatrix: [&quot;(&quot;, &quot;)&quot;],
      bmatrix: [&quot;[&quot;, &quot;]&quot;],
      Bmatrix: [&quot;\\{&quot;, &quot;\\}&quot;],
      vmatrix: [&quot;|&quot;, &quot;|&quot;],
      Vmatrix: [&quot;\\Vert&quot;, &quot;\\Vert&quot;]
    }[context.envName.replace(&quot;*&quot;, &quot;&quot;)];
    let colAlign = &quot;c&quot;;
    const payload = {
      envClasses: [],
      cols: []
    };
    if (context.envName.charAt(context.envName.length - 1) === &quot;*&quot;) {
      const parser = context.parser;
      parser.consumeSpaces();
      if (parser.fetch().text === &quot;[&quot;) {
        parser.consume();
        parser.consumeSpaces();
        colAlign = parser.fetch().text;
        if (&quot;lcr&quot;.indexOf(colAlign) === -1) {
          throw new ParseError(&quot;Expected l or c or r&quot;, parser.nextToken);
        }
        parser.consume();
        parser.consumeSpaces();
        parser.expect(&quot;]&quot;);
        parser.consume();
        payload.cols = [];
      }
    }
    const res = parseArray(context.parser, payload, &quot;text&quot;);
    res.cols = new Array(res.body[0].length).fill({ type: &quot;align&quot;, align: colAlign });
    const [arraystretch, arraycolsep] = arrayGaps(context.parser.gullet.macros);
    return delimiters2 ? {
      type: &quot;leftright&quot;,
      mode: context.mode,
      body: [res],
      left: delimiters2[0],
      right: delimiters2[1],
      rightColor: void 0,
      // \right uninfluenced by \color in array
      arraystretch,
      arraycolsep
    } : res;
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;smallmatrix&quot;],
  props: {
    numArgs: 0
  },
  handler(context) {
    const payload = { type: &quot;small&quot; };
    const res = parseArray(context.parser, payload, &quot;script&quot;);
    res.envClasses = [&quot;small&quot;];
    return res;
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;subarray&quot;],
  props: {
    numArgs: 1
  },
  handler(context, args) {
    const symNode = checkSymbolNodeType(args[0]);
    const colalign = symNode ? [args[0]] : assertNodeType(args[0], &quot;ordgroup&quot;).body;
    const cols = colalign.map(function(nde) {
      const node = assertSymbolNodeType(nde);
      const ca = node.text;
      if (&quot;lc&quot;.indexOf(ca) !== -1) {
        return {
          type: &quot;align&quot;,
          align: ca
        };
      }
      throw new ParseError(&quot;Unknown column alignment: &quot; + ca, nde);
    });
    if (cols.length &gt; 1) {
      throw new ParseError(&quot;{subarray} can contain only one column&quot;);
    }
    let res = {
      cols,
      envClasses: [&quot;small&quot;]
    };
    res = parseArray(context.parser, res, &quot;script&quot;);
    if (res.body.length &gt; 0 &amp;&amp; res.body[0].length &gt; 1) {
      throw new ParseError(&quot;{subarray} can contain only one column&quot;);
    }
    return res;
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;cases&quot;, &quot;dcases&quot;, &quot;rcases&quot;, &quot;drcases&quot;],
  props: {
    numArgs: 0
  },
  handler(context) {
    const payload = {
      cols: [],
      envClasses: [&quot;cases&quot;]
    };
    const res = parseArray(context.parser, payload, dCellStyle(context.envName));
    return {
      type: &quot;leftright&quot;,
      mode: context.mode,
      body: [res],
      left: context.envName.indexOf(&quot;r&quot;) &gt; -1 ? &quot;.&quot; : &quot;\\{&quot;,
      right: context.envName.indexOf(&quot;r&quot;) &gt; -1 ? &quot;\\}&quot; : &quot;.&quot;,
      rightColor: void 0
    };
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;align&quot;, &quot;align*&quot;, &quot;aligned&quot;, &quot;split&quot;],
  props: {
    numArgs: 0
  },
  handler: alignedHandler,
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;alignat&quot;, &quot;alignat*&quot;, &quot;alignedat&quot;],
  props: {
    numArgs: 1
  },
  handler: alignedHandler,
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;gathered&quot;, &quot;gather&quot;, &quot;gather*&quot;],
  props: {
    numArgs: 0
  },
  handler(context) {
    if (context.envName !== &quot;gathered&quot;) {
      validateAmsEnvironmentContext(context);
    }
    const res = {
      cols: [],
      envClasses: [&quot;abut&quot;, &quot;jot&quot;],
      autoTag: getAutoTag(context.envName),
      emptySingleRow: true,
      leqno: context.parser.settings.leqno
    };
    return parseArray(context.parser, res, &quot;display&quot;);
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;equation&quot;, &quot;equation*&quot;],
  props: {
    numArgs: 0
  },
  handler(context) {
    validateAmsEnvironmentContext(context);
    const res = {
      autoTag: getAutoTag(context.envName),
      emptySingleRow: true,
      singleRow: true,
      maxNumCols: 1,
      envClasses: [&quot;align&quot;],
      leqno: context.parser.settings.leqno
    };
    return parseArray(context.parser, res, &quot;display&quot;);
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;multline&quot;, &quot;multline*&quot;],
  props: {
    numArgs: 0
  },
  handler(context) {
    validateAmsEnvironmentContext(context);
    const res = {
      autoTag: context.envName === &quot;multline&quot;,
      maxNumCols: 1,
      envClasses: [&quot;jot&quot;, &quot;multline&quot;],
      leqno: context.parser.settings.leqno
    };
    return parseArray(context.parser, res, &quot;display&quot;);
  },
  mathmlBuilder: mathmlBuilder$7
});
defineEnvironment({
  type: &quot;array&quot;,
  names: [&quot;CD&quot;],
  props: {
    numArgs: 0
  },
  handler(context) {
    validateAmsEnvironmentContext(context);
    return parseCD(context.parser);
  },
  mathmlBuilder: mathmlBuilder$7
});
defineFunction({
  type: &quot;text&quot;,
  // Doesn&#039;t matter what this is.
  names: [&quot;\\hline&quot;, &quot;\\hdashline&quot;],
  props: {
    numArgs: 0,
    allowedInText: true,
    allowedInMath: true
  },
  handler(context, args) {
    throw new ParseError(`${context.funcName} valid only within array environment`);
  }
});
var environments = _environments;
defineFunction({
  type: &quot;environment&quot;,
  names: [&quot;\\begin&quot;, &quot;\\end&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;text&quot;]
  },
  handler({ parser, funcName }, args) {
    const nameGroup = args[0];
    if (nameGroup.type !== &quot;ordgroup&quot;) {
      throw new ParseError(&quot;Invalid environment name&quot;, nameGroup);
    }
    let envName = &quot;&quot;;
    for (let i = 0; i &lt; nameGroup.body.length; ++i) {
      envName += assertNodeType(nameGroup.body[i], &quot;textord&quot;).text;
    }
    if (funcName === &quot;\\begin&quot;) {
      if (!Object.prototype.hasOwnProperty.call(environments, envName)) {
        throw new ParseError(&quot;No such environment: &quot; + envName, nameGroup);
      }
      const env = environments[envName];
      const { args: args2, optArgs } = parser.parseArguments(&quot;\\begin{&quot; + envName + &quot;}&quot;, env);
      const context = {
        mode: parser.mode,
        envName,
        parser
      };
      const result = env.handler(context, args2, optArgs);
      parser.expect(&quot;\\end&quot;, false);
      const endNameToken = parser.nextToken;
      const end = assertNodeType(parser.parseFunction(), &quot;environment&quot;);
      if (end.name !== envName) {
        throw new ParseError(
          `Mismatch: \\begin{${envName}} matched by \\end{${end.name}}`,
          endNameToken
        );
      }
      return result;
    }
    return {
      type: &quot;environment&quot;,
      mode: parser.mode,
      name: envName,
      nameGroup
    };
  }
});
defineFunction({
  type: &quot;envTag&quot;,
  names: [&quot;\\env@tag&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;math&quot;]
  },
  handler({ parser }, args) {
    return {
      type: &quot;envTag&quot;,
      mode: parser.mode,
      body: args[0]
    };
  },
  mathmlBuilder(group, style) {
    return new mathMLTree.MathNode(&quot;mrow&quot;);
  }
});
defineFunction({
  type: &quot;noTag&quot;,
  names: [&quot;\\env@notag&quot;],
  props: {
    numArgs: 0
  },
  handler({ parser }) {
    return {
      type: &quot;noTag&quot;,
      mode: parser.mode
    };
  },
  mathmlBuilder(group, style) {
    return new mathMLTree.MathNode(&quot;mrow&quot;);
  }
});
var isLongVariableName = (group, font) =&gt; {
  if (font !== &quot;mathrm&quot; || group.body.type !== &quot;ordgroup&quot; || group.body.body.length === 1) {
    return false;
  }
  if (group.body.body[0].type !== &quot;mathord&quot;) {
    return false;
  }
  for (let i = 1; i &lt; group.body.body.length; i++) {
    const parseNodeType = group.body.body[i].type;
    if (!(parseNodeType === &quot;mathord&quot; || parseNodeType === &quot;textord&quot; &amp;&amp; !isNaN(group.body.body[i].text))) {
      return false;
    }
  }
  return true;
};
var mathmlBuilder$6 = (group, style) =&gt; {
  const font = group.font;
  const newStyle = style.withFont(font);
  const mathGroup = buildGroup$1(group.body, newStyle);
  if (mathGroup.children.length === 0) {
    return mathGroup;
  }
  if (font === &quot;boldsymbol&quot; &amp;&amp; [&quot;mo&quot;, &quot;mpadded&quot;, &quot;mrow&quot;].includes(mathGroup.type)) {
    mathGroup.style.fontWeight = &quot;bold&quot;;
    return mathGroup;
  }
  if (isLongVariableName(group, font)) {
    const mi2 = mathGroup.children[0].children[0];
    delete mi2.attributes.mathvariant;
    for (let i = 1; i &lt; mathGroup.children.length; i++) {
      mi2.children[0].text += mathGroup.children[i].type === &quot;mn&quot; ? mathGroup.children[i].children[0].text : mathGroup.children[i].children[0].children[0].text;
    }
    const bogus = new mathMLTree.MathNode(&quot;mtext&quot;, new mathMLTree.TextNode(&quot;\u200B&quot;));
    return new mathMLTree.MathNode(&quot;mrow&quot;, [bogus, mi2]);
  }
  let canConsolidate = mathGroup.children[0].type === &quot;mo&quot;;
  for (let i = 1; i &lt; mathGroup.children.length; i++) {
    if (mathGroup.children[i].type === &quot;mo&quot; &amp;&amp; font === &quot;boldsymbol&quot;) {
      mathGroup.children[i].style.fontWeight = &quot;bold&quot;;
    }
    if (mathGroup.children[i].type !== &quot;mi&quot;) {
      canConsolidate = false;
    }
    const localVariant = mathGroup.children[i].attributes &amp;&amp; mathGroup.children[i].attributes.mathvariant || &quot;&quot;;
    if (localVariant !== &quot;normal&quot;) {
      canConsolidate = false;
    }
  }
  if (!canConsolidate) {
    return mathGroup;
  }
  const mi = mathGroup.children[0];
  for (let i = 1; i &lt; mathGroup.children.length; i++) {
    mi.children.push(mathGroup.children[i].children[0]);
  }
  if (mi.attributes.mathvariant &amp;&amp; mi.attributes.mathvariant === &quot;normal&quot;) {
    const bogus = new mathMLTree.MathNode(&quot;mtext&quot;, new mathMLTree.TextNode(&quot;\u200B&quot;));
    return new mathMLTree.MathNode(&quot;mrow&quot;, [bogus, mi]);
  }
  return mi;
};
var fontAliases = {
  &quot;\\Bbb&quot;: &quot;\\mathbb&quot;,
  &quot;\\bold&quot;: &quot;\\mathbf&quot;,
  &quot;\\frak&quot;: &quot;\\mathfrak&quot;,
  &quot;\\bm&quot;: &quot;\\boldsymbol&quot;
};
defineFunction({
  type: &quot;font&quot;,
  names: [
    // styles
    &quot;\\mathrm&quot;,
    &quot;\\mathit&quot;,
    &quot;\\mathbf&quot;,
    &quot;\\mathnormal&quot;,
    &quot;\\up@greek&quot;,
    &quot;\\boldsymbol&quot;,
    // families
    &quot;\\mathbb&quot;,
    &quot;\\mathcal&quot;,
    &quot;\\mathfrak&quot;,
    &quot;\\mathscr&quot;,
    &quot;\\mathsf&quot;,
    &quot;\\mathsfit&quot;,
    &quot;\\mathtt&quot;,
    // aliases
    &quot;\\Bbb&quot;,
    &quot;\\bm&quot;,
    &quot;\\bold&quot;,
    &quot;\\frak&quot;
  ],
  props: {
    numArgs: 1,
    allowedInArgument: true
  },
  handler: ({ parser, funcName }, args) =&gt; {
    const body = normalizeArgument(args[0]);
    let func = funcName;
    if (func in fontAliases) {
      func = fontAliases[func];
    }
    return {
      type: &quot;font&quot;,
      mode: parser.mode,
      font: func.slice(1),
      body
    };
  },
  mathmlBuilder: mathmlBuilder$6
});
defineFunction({
  type: &quot;font&quot;,
  names: [&quot;\\rm&quot;, &quot;\\sf&quot;, &quot;\\tt&quot;, &quot;\\bf&quot;, &quot;\\it&quot;, &quot;\\cal&quot;],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler: ({ parser, funcName, breakOnTokenText }, args) =&gt; {
    const { mode } = parser;
    const body = parser.parseExpression(true, breakOnTokenText, true);
    const fontStyle = `math${funcName.slice(1)}`;
    return {
      type: &quot;font&quot;,
      mode,
      font: fontStyle,
      body: {
        type: &quot;ordgroup&quot;,
        mode: parser.mode,
        body
      }
    };
  },
  mathmlBuilder: mathmlBuilder$6
});
var stylArray = [&quot;display&quot;, &quot;text&quot;, &quot;script&quot;, &quot;scriptscript&quot;];
var scriptLevel = { auto: -1, display: 0, text: 0, script: 1, scriptscript: 2 };
var mathmlBuilder$5 = (group, style) =&gt; {
  const childOptions = group.scriptLevel === &quot;auto&quot; ? style.incrementLevel() : group.scriptLevel === &quot;display&quot; ? style.withLevel(StyleLevel.TEXT) : group.scriptLevel === &quot;text&quot; ? style.withLevel(StyleLevel.SCRIPT) : style.withLevel(StyleLevel.SCRIPTSCRIPT);
  const numer = buildGroup$1(group.numer, childOptions);
  const denom = buildGroup$1(group.denom, childOptions);
  if (style.level === 3) {
    numer.style.mathDepth = &quot;2&quot;;
    numer.setAttribute(&quot;scriptlevel&quot;, &quot;2&quot;);
    denom.style.mathDepth = &quot;2&quot;;
    denom.setAttribute(&quot;scriptlevel&quot;, &quot;2&quot;);
  }
  let node = new mathMLTree.MathNode(&quot;mfrac&quot;, [numer, denom]);
  if (!group.hasBarLine) {
    node.setAttribute(&quot;linethickness&quot;, &quot;0px&quot;);
  } else if (group.barSize) {
    const ruleWidth = calculateSize(group.barSize, style);
    node.setAttribute(&quot;linethickness&quot;, ruleWidth.number + ruleWidth.unit);
  }
  if (group.leftDelim != null || group.rightDelim != null) {
    const withDelims = [];
    if (group.leftDelim != null) {
      const leftOp = new mathMLTree.MathNode(&quot;mo&quot;, [
        new mathMLTree.TextNode(group.leftDelim.replace(&quot;\\&quot;, &quot;&quot;))
      ]);
      leftOp.setAttribute(&quot;fence&quot;, &quot;true&quot;);
      withDelims.push(leftOp);
    }
    withDelims.push(node);
    if (group.rightDelim != null) {
      const rightOp = new mathMLTree.MathNode(&quot;mo&quot;, [
        new mathMLTree.TextNode(group.rightDelim.replace(&quot;\\&quot;, &quot;&quot;))
      ]);
      rightOp.setAttribute(&quot;fence&quot;, &quot;true&quot;);
      withDelims.push(rightOp);
    }
    node = makeRow(withDelims);
  }
  if (group.scriptLevel !== &quot;auto&quot;) {
    node = new mathMLTree.MathNode(&quot;mstyle&quot;, [node]);
    node.setAttribute(&quot;displaystyle&quot;, String(group.scriptLevel === &quot;display&quot;));
    node.setAttribute(&quot;scriptlevel&quot;, scriptLevel[group.scriptLevel]);
  }
  return node;
};
defineFunction({
  type: &quot;genfrac&quot;,
  names: [
    &quot;\\dfrac&quot;,
    &quot;\\frac&quot;,
    &quot;\\tfrac&quot;,
    &quot;\\dbinom&quot;,
    &quot;\\binom&quot;,
    &quot;\\tbinom&quot;,
    &quot;\\\\atopfrac&quot;,
    // can’t be entered directly
    &quot;\\\\bracefrac&quot;,
    &quot;\\\\brackfrac&quot;
    // ditto
  ],
  props: {
    numArgs: 2,
    allowedInArgument: true
  },
  handler: ({ parser, funcName }, args) =&gt; {
    const numer = args[0];
    const denom = args[1];
    let hasBarLine = false;
    let leftDelim = null;
    let rightDelim = null;
    let scriptLevel2 = &quot;auto&quot;;
    switch (funcName) {
      case &quot;\\dfrac&quot;:
      case &quot;\\frac&quot;:
      case &quot;\\tfrac&quot;:
        hasBarLine = true;
        break;
      case &quot;\\\\atopfrac&quot;:
        hasBarLine = false;
        break;
      case &quot;\\dbinom&quot;:
      case &quot;\\binom&quot;:
      case &quot;\\tbinom&quot;:
        leftDelim = &quot;(&quot;;
        rightDelim = &quot;)&quot;;
        break;
      case &quot;\\\\bracefrac&quot;:
        leftDelim = &quot;\\{&quot;;
        rightDelim = &quot;\\}&quot;;
        break;
      case &quot;\\\\brackfrac&quot;:
        leftDelim = &quot;[&quot;;
        rightDelim = &quot;]&quot;;
        break;
      default:
        throw new Error(&quot;Unrecognized genfrac command&quot;);
    }
    switch (funcName) {
      case &quot;\\dfrac&quot;:
      case &quot;\\dbinom&quot;:
        scriptLevel2 = &quot;display&quot;;
        break;
      case &quot;\\tfrac&quot;:
      case &quot;\\tbinom&quot;:
        scriptLevel2 = &quot;text&quot;;
        break;
    }
    return {
      type: &quot;genfrac&quot;,
      mode: parser.mode,
      continued: false,
      numer,
      denom,
      hasBarLine,
      leftDelim,
      rightDelim,
      scriptLevel: scriptLevel2,
      barSize: null
    };
  },
  mathmlBuilder: mathmlBuilder$5
});
defineFunction({
  type: &quot;genfrac&quot;,
  names: [&quot;\\cfrac&quot;],
  props: {
    numArgs: 2
  },
  handler: ({ parser, funcName }, args) =&gt; {
    const numer = args[0];
    const denom = args[1];
    return {
      type: &quot;genfrac&quot;,
      mode: parser.mode,
      continued: true,
      numer,
      denom,
      hasBarLine: true,
      leftDelim: null,
      rightDelim: null,
      scriptLevel: &quot;display&quot;,
      barSize: null
    };
  }
});
defineFunction({
  type: &quot;infix&quot;,
  names: [&quot;\\over&quot;, &quot;\\choose&quot;, &quot;\\atop&quot;, &quot;\\brace&quot;, &quot;\\brack&quot;],
  props: {
    numArgs: 0,
    infix: true
  },
  handler({ parser, funcName, token }) {
    let replaceWith;
    switch (funcName) {
      case &quot;\\over&quot;:
        replaceWith = &quot;\\frac&quot;;
        break;
      case &quot;\\choose&quot;:
        replaceWith = &quot;\\binom&quot;;
        break;
      case &quot;\\atop&quot;:
        replaceWith = &quot;\\\\atopfrac&quot;;
        break;
      case &quot;\\brace&quot;:
        replaceWith = &quot;\\\\bracefrac&quot;;
        break;
      case &quot;\\brack&quot;:
        replaceWith = &quot;\\\\brackfrac&quot;;
        break;
      default:
        throw new Error(&quot;Unrecognized infix genfrac command&quot;);
    }
    return {
      type: &quot;infix&quot;,
      mode: parser.mode,
      replaceWith,
      token
    };
  }
});
var delimFromValue = function(delimString) {
  let delim = null;
  if (delimString.length &gt; 0) {
    delim = delimString;
    delim = delim === &quot;.&quot; ? null : delim;
  }
  return delim;
};
defineFunction({
  type: &quot;genfrac&quot;,
  names: [&quot;\\genfrac&quot;],
  props: {
    numArgs: 6,
    allowedInArgument: true,
    argTypes: [&quot;math&quot;, &quot;math&quot;, &quot;size&quot;, &quot;text&quot;, &quot;math&quot;, &quot;math&quot;]
  },
  handler({ parser }, args) {
    const numer = args[4];
    const denom = args[5];
    const leftNode = normalizeArgument(args[0]);
    const leftDelim = leftNode.type === &quot;atom&quot; &amp;&amp; leftNode.family === &quot;open&quot; ? delimFromValue(leftNode.text) : null;
    const rightNode = normalizeArgument(args[1]);
    const rightDelim = rightNode.type === &quot;atom&quot; &amp;&amp; rightNode.family === &quot;close&quot; ? delimFromValue(rightNode.text) : null;
    const barNode = assertNodeType(args[2], &quot;size&quot;);
    let hasBarLine;
    let barSize = null;
    if (barNode.isBlank) {
      hasBarLine = true;
    } else {
      barSize = barNode.value;
      hasBarLine = barSize.number &gt; 0;
    }
    let scriptLevel2 = &quot;auto&quot;;
    let styl = args[3];
    if (styl.type === &quot;ordgroup&quot;) {
      if (styl.body.length &gt; 0) {
        const textOrd = assertNodeType(styl.body[0], &quot;textord&quot;);
        scriptLevel2 = stylArray[Number(textOrd.text)];
      }
    } else {
      styl = assertNodeType(styl, &quot;textord&quot;);
      scriptLevel2 = stylArray[Number(styl.text)];
    }
    return {
      type: &quot;genfrac&quot;,
      mode: parser.mode,
      numer,
      denom,
      continued: false,
      hasBarLine,
      barSize,
      leftDelim,
      rightDelim,
      scriptLevel: scriptLevel2
    };
  },
  mathmlBuilder: mathmlBuilder$5
});
defineFunction({
  type: &quot;infix&quot;,
  names: [&quot;\\above&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;size&quot;],
    infix: true
  },
  handler({ parser, funcName, token }, args) {
    return {
      type: &quot;infix&quot;,
      mode: parser.mode,
      replaceWith: &quot;\\\\abovefrac&quot;,
      barSize: assertNodeType(args[0], &quot;size&quot;).value,
      token
    };
  }
});
defineFunction({
  type: &quot;genfrac&quot;,
  names: [&quot;\\\\abovefrac&quot;],
  props: {
    numArgs: 3,
    argTypes: [&quot;math&quot;, &quot;size&quot;, &quot;math&quot;]
  },
  handler: ({ parser, funcName }, args) =&gt; {
    const numer = args[0];
    const barSize = assert(assertNodeType(args[1], &quot;infix&quot;).barSize);
    const denom = args[2];
    const hasBarLine = barSize.number &gt; 0;
    return {
      type: &quot;genfrac&quot;,
      mode: parser.mode,
      numer,
      denom,
      continued: false,
      hasBarLine,
      barSize,
      leftDelim: null,
      rightDelim: null,
      scriptLevel: &quot;auto&quot;
    };
  },
  mathmlBuilder: mathmlBuilder$5
});
defineFunction({
  type: &quot;hbox&quot;,
  names: [&quot;\\hbox&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;hbox&quot;],
    allowedInArgument: true,
    allowedInText: false
  },
  handler({ parser }, args) {
    return {
      type: &quot;hbox&quot;,
      mode: parser.mode,
      body: ordargument(args[0])
    };
  },
  mathmlBuilder(group, style) {
    const newStyle = style.withLevel(StyleLevel.TEXT);
    const mrow = buildExpressionRow(group.body, newStyle);
    return consolidateText(mrow);
  }
});
var mathmlBuilder$4 = (group, style) =&gt; {
  const accentNode2 = stretchy.mathMLnode(group.label);
  accentNode2.style[&quot;math-depth&quot;] = 0;
  return new mathMLTree.MathNode(group.isOver ? &quot;mover&quot; : &quot;munder&quot;, [
    buildGroup$1(group.base, style),
    accentNode2
  ]);
};
defineFunction({
  type: &quot;horizBrace&quot;,
  names: [&quot;\\overbrace&quot;, &quot;\\underbrace&quot;],
  props: {
    numArgs: 1
  },
  handler({ parser, funcName }, args) {
    return {
      type: &quot;horizBrace&quot;,
      mode: parser.mode,
      label: funcName,
      isOver: /^\\over/.test(funcName),
      base: args[0]
    };
  },
  mathmlBuilder: mathmlBuilder$4
});
defineFunction({
  type: &quot;href&quot;,
  names: [&quot;\\href&quot;],
  props: {
    numArgs: 2,
    argTypes: [&quot;url&quot;, &quot;original&quot;],
    allowedInText: true
  },
  handler: ({ parser, token }, args) =&gt; {
    const body = args[1];
    const href = assertNodeType(args[0], &quot;url&quot;).url;
    if (!parser.settings.isTrusted({
      command: &quot;\\href&quot;,
      url: href
    })) {
      throw new ParseError(`Function &quot;\\href&quot; is not trusted`, token);
    }
    return {
      type: &quot;href&quot;,
      mode: parser.mode,
      href,
      body: ordargument(body)
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const math2 = new MathNode(&quot;math&quot;, [buildExpressionRow(group.body, style)]);
    const anchorNode = new AnchorNode(group.href, [], [math2]);
    return anchorNode;
  }
});
defineFunction({
  type: &quot;href&quot;,
  names: [&quot;\\url&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;url&quot;],
    allowedInText: true
  },
  handler: ({ parser, token }, args) =&gt; {
    const href = assertNodeType(args[0], &quot;url&quot;).url;
    if (!parser.settings.isTrusted({
      command: &quot;\\url&quot;,
      url: href
    })) {
      throw new ParseError(`Function &quot;\\url&quot; is not trusted`, token);
    }
    const chars = [];
    for (let i = 0; i &lt; href.length; i++) {
      let c = href[i];
      if (c === &quot;~&quot;) {
        c = &quot;\\textasciitilde&quot;;
      }
      chars.push({
        type: &quot;textord&quot;,
        mode: &quot;text&quot;,
        text: c
      });
    }
    const body = {
      type: &quot;text&quot;,
      mode: parser.mode,
      font: &quot;\\texttt&quot;,
      body: chars
    };
    return {
      type: &quot;href&quot;,
      mode: parser.mode,
      href,
      body: ordargument(body)
    };
  }
});
defineFunction({
  type: &quot;html&quot;,
  names: [&quot;\\class&quot;, &quot;\\id&quot;, &quot;\\style&quot;, &quot;\\data&quot;],
  props: {
    numArgs: 2,
    argTypes: [&quot;raw&quot;, &quot;original&quot;],
    allowedInText: true
  },
  handler: ({ parser, funcName, token }, args) =&gt; {
    const value = assertNodeType(args[0], &quot;raw&quot;).string;
    const body = args[1];
    if (parser.settings.strict) {
      throw new ParseError(`Function &quot;${funcName}&quot; is disabled in strict mode`, token);
    }
    let trustContext;
    const attributes = {};
    switch (funcName) {
      case &quot;\\class&quot;:
        attributes.class = value;
        trustContext = {
          command: &quot;\\class&quot;,
          class: value
        };
        break;
      case &quot;\\id&quot;:
        attributes.id = value;
        trustContext = {
          command: &quot;\\id&quot;,
          id: value
        };
        break;
      case &quot;\\style&quot;:
        attributes.style = value;
        trustContext = {
          command: &quot;\\style&quot;,
          style: value
        };
        break;
      case &quot;\\data&quot;: {
        const data = value.split(&quot;,&quot;);
        for (let i = 0; i &lt; data.length; i++) {
          const keyVal = data[i].split(&quot;=&quot;);
          if (keyVal.length !== 2) {
            throw new ParseError(&quot;Error parsing key-value for \\data&quot;);
          }
          attributes[&quot;data-&quot; + keyVal[0].trim()] = keyVal[1].trim();
        }
        trustContext = {
          command: &quot;\\data&quot;,
          attributes
        };
        break;
      }
      default:
        throw new Error(&quot;Unrecognized html command&quot;);
    }
    if (!parser.settings.isTrusted(trustContext)) {
      throw new ParseError(`Function &quot;${funcName}&quot; is not trusted`, token);
    }
    return {
      type: &quot;html&quot;,
      mode: parser.mode,
      attributes,
      body: ordargument(body)
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const element = buildExpressionRow(group.body, style);
    const classes = [];
    if (group.attributes.class) {
      classes.push(...group.attributes.class.trim().split(/\s+/));
    }
    element.classes = classes;
    for (const attr in group.attributes) {
      if (attr !== &quot;class&quot; &amp;&amp; Object.prototype.hasOwnProperty.call(group.attributes, attr)) {
        element.setAttribute(attr, group.attributes[attr]);
      }
    }
    return element;
  }
});
var sizeData = function(str) {
  if (/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str)) {
    return { number: +str, unit: &quot;bp&quot; };
  } else {
    const match = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str);
    if (!match) {
      throw new ParseError(&quot;Invalid size: &#039;&quot; + str + &quot;&#039; in \\includegraphics&quot;);
    }
    const data = {
      number: +(match[1] + match[2]),
      // sign + magnitude, cast to number
      unit: match[3]
    };
    if (!validUnit(data)) {
      throw new ParseError(&quot;Invalid unit: &#039;&quot; + data.unit + &quot;&#039; in \\includegraphics.&quot;);
    }
    return data;
  }
};
defineFunction({
  type: &quot;includegraphics&quot;,
  names: [&quot;\\includegraphics&quot;],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    argTypes: [&quot;raw&quot;, &quot;url&quot;],
    allowedInText: false
  },
  handler: ({ parser, token }, args, optArgs) =&gt; {
    let width = { number: 0, unit: &quot;em&quot; };
    let height = { number: 0.9, unit: &quot;em&quot; };
    let totalheight = { number: 0, unit: &quot;em&quot; };
    let alt = &quot;&quot;;
    if (optArgs[0]) {
      const attributeStr = assertNodeType(optArgs[0], &quot;raw&quot;).string;
      const attributes = attributeStr.split(&quot;,&quot;);
      for (let i = 0; i &lt; attributes.length; i++) {
        const keyVal = attributes[i].split(&quot;=&quot;);
        if (keyVal.length === 2) {
          const str = keyVal[1].trim();
          switch (keyVal[0].trim()) {
            case &quot;alt&quot;:
              alt = str;
              break;
            case &quot;width&quot;:
              width = sizeData(str);
              break;
            case &quot;height&quot;:
              height = sizeData(str);
              break;
            case &quot;totalheight&quot;:
              totalheight = sizeData(str);
              break;
            default:
              throw new ParseError(&quot;Invalid key: &#039;&quot; + keyVal[0] + &quot;&#039; in \\includegraphics.&quot;);
          }
        }
      }
    }
    const src = assertNodeType(args[0], &quot;url&quot;).url;
    if (alt === &quot;&quot;) {
      alt = src;
      alt = alt.replace(/^.*[\\/]/, &quot;&quot;);
      alt = alt.substring(0, alt.lastIndexOf(&quot;.&quot;));
    }
    if (!parser.settings.isTrusted({
      command: &quot;\\includegraphics&quot;,
      url: src
    })) {
      throw new ParseError(`Function &quot;\\includegraphics&quot; is not trusted`, token);
    }
    return {
      type: &quot;includegraphics&quot;,
      mode: parser.mode,
      alt,
      width,
      height,
      totalheight,
      src
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const height = calculateSize(group.height, style);
    const depth = { number: 0, unit: &quot;em&quot; };
    if (group.totalheight.number &gt; 0) {
      if (group.totalheight.unit === height.unit &amp;&amp; group.totalheight.number &gt; height.number) {
        depth.number = group.totalheight.number - height.number;
        depth.unit = height.unit;
      }
    }
    let width = 0;
    if (group.width.number &gt; 0) {
      width = calculateSize(group.width, style);
    }
    const graphicStyle = { height: height.number + depth.number + &quot;em&quot; };
    if (width.number &gt; 0) {
      graphicStyle.width = width.number + width.unit;
    }
    if (depth.number &gt; 0) {
      graphicStyle.verticalAlign = -depth.number + depth.unit;
    }
    const node = new Img(group.src, group.alt, graphicStyle);
    node.height = height;
    node.depth = depth;
    return new mathMLTree.MathNode(&quot;mtext&quot;, [node]);
  }
});
defineFunction({
  type: &quot;kern&quot;,
  names: [&quot;\\kern&quot;, &quot;\\mkern&quot;, &quot;\\hskip&quot;, &quot;\\mskip&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;size&quot;],
    primitive: true,
    allowedInText: true
  },
  handler({ parser, funcName, token }, args) {
    const size = assertNodeType(args[0], &quot;size&quot;);
    if (parser.settings.strict) {
      const mathFunction = funcName[1] === &quot;m&quot;;
      const muUnit = size.value.unit === &quot;mu&quot;;
      if (mathFunction) {
        if (!muUnit) {
          throw new ParseError(`LaTeX&#039;s ${funcName} supports only mu units, not ${size.value.unit} units`, token);
        }
        if (parser.mode !== &quot;math&quot;) {
          throw new ParseError(`LaTeX&#039;s ${funcName} works only in math mode`, token);
        }
      } else {
        if (muUnit) {
          throw new ParseError(`LaTeX&#039;s ${funcName} doesn&#039;t support mu units`, token);
        }
      }
    }
    return {
      type: &quot;kern&quot;,
      mode: parser.mode,
      dimension: size.value
    };
  },
  mathmlBuilder(group, style) {
    const dimension = calculateSize(group.dimension, style);
    const ch = dimension.unit === &quot;em&quot; ? spaceCharacter(dimension.number) : &quot;&quot;;
    if (group.mode === &quot;text&quot; &amp;&amp; ch.length &gt; 0) {
      const character = new mathMLTree.TextNode(ch);
      return new mathMLTree.MathNode(&quot;mtext&quot;, [character]);
    } else {
      const node = new mathMLTree.MathNode(&quot;mspace&quot;);
      node.setAttribute(&quot;width&quot;, dimension.number + dimension.unit);
      if (dimension.number &lt; 0) {
        node.style.marginLeft = dimension.number + dimension.unit;
      }
      return node;
    }
  }
});
var spaceCharacter = function(width) {
  if (width &gt;= 0.05555 &amp;&amp; width &lt;= 0.05556) {
    return &quot;\u200A&quot;;
  } else if (width &gt;= 0.1666 &amp;&amp; width &lt;= 0.1667) {
    return &quot;\u2009&quot;;
  } else if (width &gt;= 0.2222 &amp;&amp; width &lt;= 0.2223) {
    return &quot;\u2005&quot;;
  } else if (width &gt;= 0.2777 &amp;&amp; width &lt;= 0.2778) {
    return &quot;\u2005\u200A&quot;;
  } else {
    return &quot;&quot;;
  }
};
var invalidIdRegEx = /[^A-Za-z_0-9-]/g;
defineFunction({
  type: &quot;label&quot;,
  names: [&quot;\\label&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;raw&quot;]
  },
  handler({ parser }, args) {
    return {
      type: &quot;label&quot;,
      mode: parser.mode,
      string: args[0].string.replace(invalidIdRegEx, &quot;&quot;)
    };
  },
  mathmlBuilder(group, style) {
    const node = new mathMLTree.MathNode(&quot;mrow&quot;, [], [&quot;tml-label&quot;]);
    if (group.string.length &gt; 0) {
      node.setLabel(group.string);
    }
    return node;
  }
});
var textModeLap = [&quot;\\clap&quot;, &quot;\\llap&quot;, &quot;\\rlap&quot;];
defineFunction({
  type: &quot;lap&quot;,
  names: [&quot;\\mathllap&quot;, &quot;\\mathrlap&quot;, &quot;\\mathclap&quot;, &quot;\\clap&quot;, &quot;\\llap&quot;, &quot;\\rlap&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser, funcName, token }, args) =&gt; {
    if (textModeLap.includes(funcName)) {
      if (parser.settings.strict &amp;&amp; parser.mode !== &quot;text&quot;) {
        throw new ParseError(`{${funcName}} can be used only in text mode.
 Try \\math${funcName.slice(1)}`, token);
      }
      funcName = funcName.slice(1);
    } else {
      funcName = funcName.slice(5);
    }
    const body = args[0];
    return {
      type: &quot;lap&quot;,
      mode: parser.mode,
      alignment: funcName,
      body
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    let strut;
    if (group.alignment === &quot;llap&quot;) {
      const phantomInner = buildExpression(ordargument(group.body), style);
      const phantom = new mathMLTree.MathNode(&quot;mphantom&quot;, phantomInner);
      strut = new mathMLTree.MathNode(&quot;mpadded&quot;, [phantom]);
      strut.setAttribute(&quot;width&quot;, &quot;0px&quot;);
    }
    const inner2 = buildGroup$1(group.body, style);
    let node;
    if (group.alignment === &quot;llap&quot;) {
      inner2.style.position = &quot;absolute&quot;;
      inner2.style.right = &quot;0&quot;;
      inner2.style.bottom = `0`;
      node = new mathMLTree.MathNode(&quot;mpadded&quot;, [strut, inner2]);
    } else {
      node = new mathMLTree.MathNode(&quot;mpadded&quot;, [inner2]);
    }
    if (group.alignment === &quot;rlap&quot;) {
      if (group.body.body.length &gt; 0 &amp;&amp; group.body.body[0].type === &quot;genfrac&quot;) {
        node.setAttribute(&quot;lspace&quot;, &quot;0.16667em&quot;);
      }
    } else {
      const offset2 = group.alignment === &quot;llap&quot; ? &quot;-1&quot; : &quot;-0.5&quot;;
      node.setAttribute(&quot;lspace&quot;, offset2 + &quot;width&quot;);
      if (group.alignment === &quot;llap&quot;) {
        node.style.position = &quot;relative&quot;;
      } else {
        node.style.display = &quot;flex&quot;;
        node.style.justifyContent = &quot;center&quot;;
      }
    }
    node.setAttribute(&quot;width&quot;, &quot;0px&quot;);
    return node;
  }
});
defineFunction({
  type: &quot;ordgroup&quot;,
  names: [&quot;\\(&quot;, &quot;$&quot;],
  props: {
    numArgs: 0,
    allowedInText: true,
    allowedInMath: false
  },
  handler({ funcName, parser }, args) {
    const outerMode = parser.mode;
    parser.switchMode(&quot;math&quot;);
    const close2 = funcName === &quot;\\(&quot; ? &quot;\\)&quot; : &quot;$&quot;;
    const body = parser.parseExpression(false, close2);
    parser.expect(close2);
    parser.switchMode(outerMode);
    return {
      type: &quot;ordgroup&quot;,
      mode: parser.mode,
      body
    };
  }
});
defineFunction({
  type: &quot;text&quot;,
  // Doesn&#039;t matter what this is.
  names: [&quot;\\)&quot;, &quot;\\]&quot;],
  props: {
    numArgs: 0,
    allowedInText: true,
    allowedInMath: false
  },
  handler(context, token) {
    throw new ParseError(`Mismatched ${context.funcName}`, token);
  }
});
var chooseStyle = (group, style) =&gt; {
  switch (style.level) {
    case StyleLevel.DISPLAY:
      return group.display;
    case StyleLevel.TEXT:
      return group.text;
    case StyleLevel.SCRIPT:
      return group.script;
    case StyleLevel.SCRIPTSCRIPT:
      return group.scriptscript;
    default:
      return group.text;
  }
};
defineFunction({
  type: &quot;mathchoice&quot;,
  names: [&quot;\\mathchoice&quot;],
  props: {
    numArgs: 4,
    primitive: true
  },
  handler: ({ parser }, args) =&gt; {
    return {
      type: &quot;mathchoice&quot;,
      mode: parser.mode,
      display: ordargument(args[0]),
      text: ordargument(args[1]),
      script: ordargument(args[2]),
      scriptscript: ordargument(args[3])
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const body = chooseStyle(group, style);
    return buildExpressionRow(body, style);
  }
});
var textAtomTypes = [&quot;text&quot;, &quot;textord&quot;, &quot;mathord&quot;, &quot;atom&quot;];
var padding = (width) =&gt; {
  const node = new mathMLTree.MathNode(&quot;mspace&quot;);
  node.setAttribute(&quot;width&quot;, width + &quot;em&quot;);
  return node;
};
function mathmlBuilder$3(group, style) {
  let node;
  const inner2 = buildExpression(group.body, style);
  if (group.mclass === &quot;minner&quot;) {
    node = new mathMLTree.MathNode(&quot;mpadded&quot;, inner2);
  } else if (group.mclass === &quot;mord&quot;) {
    if (group.isCharacterBox || inner2[0].type === &quot;mathord&quot;) {
      node = inner2[0];
      node.type = &quot;mi&quot;;
      if (node.children.length === 1 &amp;&amp; node.children[0].text &amp;&amp; node.children[0].text === &quot;\u2207&quot;) {
        node.setAttribute(&quot;mathvariant&quot;, &quot;normal&quot;);
      }
    } else {
      node = new mathMLTree.MathNode(&quot;mi&quot;, inner2);
    }
  } else {
    node = new mathMLTree.MathNode(&quot;mrow&quot;, inner2);
    if (group.mustPromote) {
      node = inner2[0];
      node.type = &quot;mo&quot;;
      if (group.isCharacterBox &amp;&amp; group.body[0].text &amp;&amp; /[A-Za-z]/.test(group.body[0].text)) {
        node.setAttribute(&quot;mathvariant&quot;, &quot;italic&quot;);
      }
    } else {
      node = new mathMLTree.MathNode(&quot;mrow&quot;, inner2);
    }
    const doSpacing = style.level &lt; 2;
    if (node.type === &quot;mrow&quot;) {
      if (doSpacing) {
        if (group.mclass === &quot;mbin&quot;) {
          node.children.unshift(padding(0.2222));
          node.children.push(padding(0.2222));
        } else if (group.mclass === &quot;mrel&quot;) {
          node.children.unshift(padding(0.2778));
          node.children.push(padding(0.2778));
        } else if (group.mclass === &quot;mpunct&quot;) {
          node.children.push(padding(0.1667));
        } else if (group.mclass === &quot;minner&quot;) {
          node.children.unshift(padding(0.0556));
          node.children.push(padding(0.0556));
        }
      }
    } else {
      if (group.mclass === &quot;mbin&quot;) {
        node.attributes.lspace = doSpacing ? &quot;0.2222em&quot; : &quot;0&quot;;
        node.attributes.rspace = doSpacing ? &quot;0.2222em&quot; : &quot;0&quot;;
      } else if (group.mclass === &quot;mrel&quot;) {
        node.attributes.lspace = doSpacing ? &quot;0.2778em&quot; : &quot;0&quot;;
        node.attributes.rspace = doSpacing ? &quot;0.2778em&quot; : &quot;0&quot;;
      } else if (group.mclass === &quot;mpunct&quot;) {
        node.attributes.lspace = &quot;0em&quot;;
        node.attributes.rspace = doSpacing ? &quot;0.1667em&quot; : &quot;0&quot;;
      } else if (group.mclass === &quot;mopen&quot; || group.mclass === &quot;mclose&quot;) {
        node.attributes.lspace = &quot;0em&quot;;
        node.attributes.rspace = &quot;0em&quot;;
      } else if (group.mclass === &quot;minner&quot; &amp;&amp; doSpacing) {
        node.attributes.lspace = &quot;0.0556em&quot;;
        node.attributes.width = &quot;+0.1111em&quot;;
      }
    }
    if (!(group.mclass === &quot;mopen&quot; || group.mclass === &quot;mclose&quot;)) {
      delete node.attributes.stretchy;
      delete node.attributes.form;
    }
  }
  return node;
}
defineFunction({
  type: &quot;mclass&quot;,
  names: [
    &quot;\\mathord&quot;,
    &quot;\\mathbin&quot;,
    &quot;\\mathrel&quot;,
    &quot;\\mathopen&quot;,
    &quot;\\mathclose&quot;,
    &quot;\\mathpunct&quot;,
    &quot;\\mathinner&quot;
  ],
  props: {
    numArgs: 1,
    primitive: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    const isCharacterBox2 = utils.isCharacterBox(body);
    let mustPromote = true;
    const mord = { type: &quot;mathord&quot;, text: &quot;&quot;, mode: parser.mode };
    const arr = body.body ? body.body : [body];
    for (const arg of arr) {
      if (textAtomTypes.includes(arg.type)) {
        if (symbols[parser.mode][arg.text]) {
          mord.text += symbols[parser.mode][arg.text].replace;
        } else if (arg.text) {
          mord.text += arg.text;
        } else if (arg.body) {
          arg.body.map((e) =&gt; {
            mord.text += e.text;
          });
        }
      } else {
        mustPromote = false;
        break;
      }
    }
    return {
      type: &quot;mclass&quot;,
      mode: parser.mode,
      mclass: &quot;m&quot; + funcName.slice(5),
      body: ordargument(mustPromote ? mord : body),
      isCharacterBox: isCharacterBox2,
      mustPromote
    };
  },
  mathmlBuilder: mathmlBuilder$3
});
var binrelClass = (arg) =&gt; {
  const atom = arg.type === &quot;ordgroup&quot; &amp;&amp; arg.body.length ? arg.body[0] : arg;
  if (atom.type === &quot;atom&quot; &amp;&amp; (atom.family === &quot;bin&quot; || atom.family === &quot;rel&quot;)) {
    return &quot;m&quot; + atom.family;
  } else {
    return &quot;mord&quot;;
  }
};
defineFunction({
  type: &quot;mclass&quot;,
  names: [&quot;\\@binrel&quot;],
  props: {
    numArgs: 2
  },
  handler({ parser }, args) {
    return {
      type: &quot;mclass&quot;,
      mode: parser.mode,
      mclass: binrelClass(args[0]),
      body: ordargument(args[1]),
      isCharacterBox: utils.isCharacterBox(args[1])
    };
  }
});
defineFunction({
  type: &quot;mclass&quot;,
  names: [&quot;\\stackrel&quot;, &quot;\\overset&quot;, &quot;\\underset&quot;],
  props: {
    numArgs: 2
  },
  handler({ parser, funcName }, args) {
    const baseArg = args[1];
    const shiftedArg = args[0];
    const baseOp = {
      type: &quot;op&quot;,
      mode: baseArg.mode,
      limits: true,
      alwaysHandleSupSub: true,
      parentIsSupSub: false,
      symbol: false,
      stack: true,
      suppressBaseShift: funcName !== &quot;\\stackrel&quot;,
      body: ordargument(baseArg)
    };
    return {
      type: &quot;supsub&quot;,
      mode: shiftedArg.mode,
      base: baseOp,
      sup: funcName === &quot;\\underset&quot; ? null : shiftedArg,
      sub: funcName === &quot;\\underset&quot; ? shiftedArg : null
    };
  },
  mathmlBuilder: mathmlBuilder$3
});
var buildGroup = (el, style, noneNode) =&gt; {
  if (!el) {
    return noneNode;
  }
  const node = buildGroup$1(el, style);
  if (node.type === &quot;mrow&quot; &amp;&amp; node.children.length === 0) {
    return noneNode;
  }
  return node;
};
defineFunction({
  type: &quot;multiscript&quot;,
  names: [&quot;\\sideset&quot;, &quot;\\pres@cript&quot;],
  // See macros.js for \prescript
  props: {
    numArgs: 3
  },
  handler({ parser, funcName, token }, args) {
    if (args[2].body.length === 0) {
      throw new ParseError(funcName + `cannot parse an empty base.`);
    }
    const base = args[2].body[0];
    if (parser.settings.strict &amp;&amp; funcName === &quot;\\sideset&quot; &amp;&amp; !base.symbol) {
      throw new ParseError(`The base of \\sideset must be a big operator. Try \\prescript.`);
    }
    if (args[0].body.length &gt; 0 &amp;&amp; args[0].body[0].type !== &quot;supsub&quot; || args[1].body.length &gt; 0 &amp;&amp; args[1].body[0].type !== &quot;supsub&quot;) {
      throw new ParseError(&quot;\\sideset can parse only subscripts and superscripts in its first two arguments&quot;, token);
    }
    const prescripts = args[0].body.length &gt; 0 ? args[0].body[0] : null;
    const postscripts = args[1].body.length &gt; 0 ? args[1].body[0] : null;
    if (!prescripts &amp;&amp; !postscripts) {
      return base;
    } else if (!prescripts) {
      return {
        type: &quot;styling&quot;,
        mode: parser.mode,
        scriptLevel: &quot;text&quot;,
        body: [{
          type: &quot;supsub&quot;,
          mode: parser.mode,
          base,
          sup: postscripts.sup,
          sub: postscripts.sub
        }]
      };
    } else {
      return {
        type: &quot;multiscript&quot;,
        mode: parser.mode,
        isSideset: funcName === &quot;\\sideset&quot;,
        prescripts,
        postscripts,
        base
      };
    }
  },
  mathmlBuilder(group, style) {
    const base = buildGroup$1(group.base, style);
    const prescriptsNode = new mathMLTree.MathNode(&quot;mprescripts&quot;);
    const noneNode = new mathMLTree.MathNode(&quot;none&quot;);
    let children = [];
    const preSub = buildGroup(group.prescripts.sub, style, noneNode);
    const preSup = buildGroup(group.prescripts.sup, style, noneNode);
    if (group.isSideset) {
      preSub.setAttribute(&quot;style&quot;, &quot;text-align: left;&quot;);
      preSup.setAttribute(&quot;style&quot;, &quot;text-align: left;&quot;);
    }
    if (group.postscripts) {
      const postSub = buildGroup(group.postscripts.sub, style, noneNode);
      const postSup = buildGroup(group.postscripts.sup, style, noneNode);
      children = [base, postSub, postSup, prescriptsNode, preSub, preSup];
    } else {
      children = [base, prescriptsNode, preSub, preSup];
    }
    return new mathMLTree.MathNode(&quot;mmultiscripts&quot;, children);
  }
});
defineFunction({
  type: &quot;not&quot;,
  names: [&quot;\\not&quot;],
  props: {
    numArgs: 1,
    primitive: true,
    allowedInText: false
  },
  handler({ parser }, args) {
    const isCharacterBox2 = utils.isCharacterBox(args[0]);
    let body;
    if (isCharacterBox2) {
      body = ordargument(args[0]);
      if (body[0].text.charAt(0) === &quot;\\&quot;) {
        body[0].text = symbols.math[body[0].text].replace;
      }
      body[0].text = body[0].text.slice(0, 1) + &quot;\u0338&quot; + body[0].text.slice(1);
    } else {
      const notNode = { type: &quot;textord&quot;, mode: &quot;math&quot;, text: &quot;\u0338&quot; };
      const kernNode = { type: &quot;kern&quot;, mode: &quot;math&quot;, dimension: { number: -0.6, unit: &quot;em&quot; } };
      body = [notNode, kernNode, args[0]];
    }
    return {
      type: &quot;not&quot;,
      mode: parser.mode,
      body,
      isCharacterBox: isCharacterBox2
    };
  },
  mathmlBuilder(group, style) {
    if (group.isCharacterBox) {
      const inner2 = buildExpression(group.body, style, true);
      return inner2[0];
    } else {
      return buildExpressionRow(group.body, style);
    }
  }
});
var ordAtomTypes = [&quot;textord&quot;, &quot;mathord&quot;, &quot;atom&quot;];
var noSuccessor = [&quot;\\smallint&quot;];
var ordTypes = [&quot;textord&quot;, &quot;mathord&quot;, &quot;ordgroup&quot;, &quot;close&quot;, &quot;leftright&quot;, &quot;font&quot;];
var setSpacing = (node) =&gt; {
  node.attributes.lspace = &quot;0.1667em&quot;;
  node.attributes.rspace = &quot;0.1667em&quot;;
};
var mathmlBuilder$2 = (group, style) =&gt; {
  let node;
  if (group.symbol) {
    node = new MathNode(&quot;mo&quot;, [makeText(group.name, group.mode)]);
    if (noSuccessor.includes(group.name)) {
      node.setAttribute(&quot;largeop&quot;, &quot;false&quot;);
    } else {
      node.setAttribute(&quot;movablelimits&quot;, &quot;false&quot;);
    }
    if (group.fromMathOp) {
      setSpacing(node);
    }
  } else if (group.body) {
    node = new MathNode(&quot;mo&quot;, buildExpression(group.body, style));
    if (group.fromMathOp) {
      setSpacing(node);
    }
  } else {
    node = new MathNode(&quot;mi&quot;, [new TextNode2(group.name.slice(1))]);
    if (!group.parentIsSupSub) {
      const operator = new MathNode(&quot;mo&quot;, [makeText(&quot;\u2061&quot;, &quot;text&quot;)]);
      const row = [node, operator];
      if (group.needsLeadingSpace) {
        const lead = new MathNode(&quot;mspace&quot;);
        lead.setAttribute(&quot;width&quot;, &quot;0.1667em&quot;);
        row.unshift(lead);
      }
      if (!group.isFollowedByDelimiter) {
        const trail = new MathNode(&quot;mspace&quot;);
        trail.setAttribute(&quot;width&quot;, &quot;0.1667em&quot;);
        row.push(trail);
      }
      node = new MathNode(&quot;mrow&quot;, row);
    }
  }
  return node;
};
var singleCharBigOps = {
  &quot;\u220F&quot;: &quot;\\prod&quot;,
  &quot;\u2210&quot;: &quot;\\coprod&quot;,
  &quot;\u2211&quot;: &quot;\\sum&quot;,
  &quot;\u22C0&quot;: &quot;\\bigwedge&quot;,
  &quot;\u22C1&quot;: &quot;\\bigvee&quot;,
  &quot;\u22C2&quot;: &quot;\\bigcap&quot;,
  &quot;\u22C3&quot;: &quot;\\bigcup&quot;,
  &quot;\u2A00&quot;: &quot;\\bigodot&quot;,
  &quot;\u2A01&quot;: &quot;\\bigoplus&quot;,
  &quot;\u2A02&quot;: &quot;\\bigotimes&quot;,
  &quot;\u2A04&quot;: &quot;\\biguplus&quot;,
  &quot;\u2A05&quot;: &quot;\\bigsqcap&quot;,
  &quot;\u2A06&quot;: &quot;\\bigsqcup&quot;,
  &quot;\u2A03&quot;: &quot;\\bigcupdot&quot;,
  &quot;\u2A07&quot;: &quot;\\bigdoublevee&quot;,
  &quot;\u2A08&quot;: &quot;\\bigdoublewedge&quot;,
  &quot;\u2A09&quot;: &quot;\\bigtimes&quot;
};
defineFunction({
  type: &quot;op&quot;,
  names: [
    &quot;\\coprod&quot;,
    &quot;\\bigvee&quot;,
    &quot;\\bigwedge&quot;,
    &quot;\\biguplus&quot;,
    &quot;\\bigcupplus&quot;,
    &quot;\\bigcupdot&quot;,
    &quot;\\bigcap&quot;,
    &quot;\\bigcup&quot;,
    &quot;\\bigdoublevee&quot;,
    &quot;\\bigdoublewedge&quot;,
    &quot;\\intop&quot;,
    &quot;\\prod&quot;,
    &quot;\\sum&quot;,
    &quot;\\bigotimes&quot;,
    &quot;\\bigoplus&quot;,
    &quot;\\bigodot&quot;,
    &quot;\\bigsqcap&quot;,
    &quot;\\bigsqcup&quot;,
    &quot;\\bigtimes&quot;,
    &quot;\\smallint&quot;,
    &quot;\u220F&quot;,
    &quot;\u2210&quot;,
    &quot;\u2211&quot;,
    &quot;\u22C0&quot;,
    &quot;\u22C1&quot;,
    &quot;\u22C2&quot;,
    &quot;\u22C3&quot;,
    &quot;\u2A00&quot;,
    &quot;\u2A01&quot;,
    &quot;\u2A02&quot;,
    &quot;\u2A04&quot;,
    &quot;\u2A06&quot;
  ],
  props: {
    numArgs: 0
  },
  handler: ({ parser, funcName }, args) =&gt; {
    let fName = funcName;
    if (fName.length === 1) {
      fName = singleCharBigOps[fName];
    }
    return {
      type: &quot;op&quot;,
      mode: parser.mode,
      limits: true,
      parentIsSupSub: false,
      symbol: true,
      stack: false,
      // This is true for \stackrel{}, not here.
      name: fName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
defineFunction({
  type: &quot;op&quot;,
  names: [&quot;\\mathop&quot;],
  props: {
    numArgs: 1,
    primitive: true
  },
  handler: ({ parser }, args) =&gt; {
    const body = args[0];
    const arr = body.body ? body.body : [body];
    const isSymbol = arr.length === 1 &amp;&amp; ordAtomTypes.includes(arr[0].type);
    return {
      type: &quot;op&quot;,
      mode: parser.mode,
      limits: true,
      parentIsSupSub: false,
      symbol: isSymbol,
      fromMathOp: true,
      stack: false,
      name: isSymbol ? arr[0].text : null,
      body: isSymbol ? null : ordargument(body)
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
var singleCharIntegrals = {
  &quot;\u222B&quot;: &quot;\\int&quot;,
  &quot;\u222C&quot;: &quot;\\iint&quot;,
  &quot;\u222D&quot;: &quot;\\iiint&quot;,
  &quot;\u222E&quot;: &quot;\\oint&quot;,
  &quot;\u222F&quot;: &quot;\\oiint&quot;,
  &quot;\u2230&quot;: &quot;\\oiiint&quot;,
  &quot;\u2231&quot;: &quot;\\intclockwise&quot;,
  &quot;\u2232&quot;: &quot;\\varointclockwise&quot;,
  &quot;\u2A0C&quot;: &quot;\\iiiint&quot;,
  &quot;\u2A0D&quot;: &quot;\\intbar&quot;,
  &quot;\u2A0E&quot;: &quot;\\intBar&quot;,
  &quot;\u2A0F&quot;: &quot;\\fint&quot;,
  &quot;\u2A12&quot;: &quot;\\rppolint&quot;,
  &quot;\u2A13&quot;: &quot;\\scpolint&quot;,
  &quot;\u2A15&quot;: &quot;\\pointint&quot;,
  &quot;\u2A16&quot;: &quot;\\sqint&quot;,
  &quot;\u2A17&quot;: &quot;\\intlarhk&quot;,
  &quot;\u2A18&quot;: &quot;\\intx&quot;,
  &quot;\u2A19&quot;: &quot;\\intcap&quot;,
  &quot;\u2A1A&quot;: &quot;\\intcup&quot;
};
defineFunction({
  type: &quot;op&quot;,
  names: [
    &quot;\\arcsin&quot;,
    &quot;\\arccos&quot;,
    &quot;\\arctan&quot;,
    &quot;\\arctg&quot;,
    &quot;\\arcctg&quot;,
    &quot;\\arg&quot;,
    &quot;\\ch&quot;,
    &quot;\\cos&quot;,
    &quot;\\cosec&quot;,
    &quot;\\cosh&quot;,
    &quot;\\cot&quot;,
    &quot;\\cotg&quot;,
    &quot;\\coth&quot;,
    &quot;\\csc&quot;,
    &quot;\\ctg&quot;,
    &quot;\\cth&quot;,
    &quot;\\deg&quot;,
    &quot;\\dim&quot;,
    &quot;\\exp&quot;,
    &quot;\\hom&quot;,
    &quot;\\ker&quot;,
    &quot;\\lg&quot;,
    &quot;\\ln&quot;,
    &quot;\\log&quot;,
    &quot;\\sec&quot;,
    &quot;\\sin&quot;,
    &quot;\\sinh&quot;,
    &quot;\\sh&quot;,
    &quot;\\sgn&quot;,
    &quot;\\tan&quot;,
    &quot;\\tanh&quot;,
    &quot;\\tg&quot;,
    &quot;\\th&quot;
  ],
  props: {
    numArgs: 0
  },
  handler({ parser, funcName }) {
    const prevAtomType = parser.prevAtomType;
    const next = parser.gullet.future().text;
    return {
      type: &quot;op&quot;,
      mode: parser.mode,
      limits: false,
      parentIsSupSub: false,
      symbol: false,
      stack: false,
      isFollowedByDelimiter: isDelimiter(next),
      needsLeadingSpace: prevAtomType.length &gt; 0 &amp;&amp; ordTypes.includes(prevAtomType),
      name: funcName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
defineFunction({
  type: &quot;op&quot;,
  names: [&quot;\\det&quot;, &quot;\\gcd&quot;, &quot;\\inf&quot;, &quot;\\lim&quot;, &quot;\\max&quot;, &quot;\\min&quot;, &quot;\\Pr&quot;, &quot;\\sup&quot;],
  props: {
    numArgs: 0
  },
  handler({ parser, funcName }) {
    const prevAtomType = parser.prevAtomType;
    const next = parser.gullet.future().text;
    return {
      type: &quot;op&quot;,
      mode: parser.mode,
      limits: true,
      parentIsSupSub: false,
      symbol: false,
      stack: false,
      isFollowedByDelimiter: isDelimiter(next),
      needsLeadingSpace: prevAtomType.length &gt; 0 &amp;&amp; ordTypes.includes(prevAtomType),
      name: funcName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
defineFunction({
  type: &quot;op&quot;,
  names: [
    &quot;\\int&quot;,
    &quot;\\iint&quot;,
    &quot;\\iiint&quot;,
    &quot;\\iiiint&quot;,
    &quot;\\oint&quot;,
    &quot;\\oiint&quot;,
    &quot;\\oiiint&quot;,
    &quot;\\intclockwise&quot;,
    &quot;\\varointclockwise&quot;,
    &quot;\\intbar&quot;,
    &quot;\\intBar&quot;,
    &quot;\\fint&quot;,
    &quot;\\rppolint&quot;,
    &quot;\\scpolint&quot;,
    &quot;\\pointint&quot;,
    &quot;\\sqint&quot;,
    &quot;\\intlarhk&quot;,
    &quot;\\intx&quot;,
    &quot;\\intcap&quot;,
    &quot;\\intcup&quot;,
    &quot;\u222B&quot;,
    &quot;\u222C&quot;,
    &quot;\u222D&quot;,
    &quot;\u222E&quot;,
    &quot;\u222F&quot;,
    &quot;\u2230&quot;,
    &quot;\u2231&quot;,
    &quot;\u2232&quot;,
    &quot;\u2A0C&quot;,
    &quot;\u2A0D&quot;,
    &quot;\u2A0E&quot;,
    &quot;\u2A0F&quot;,
    &quot;\u2A12&quot;,
    &quot;\u2A13&quot;,
    &quot;\u2A15&quot;,
    &quot;\u2A16&quot;,
    &quot;\u2A17&quot;,
    &quot;\u2A18&quot;,
    &quot;\u2A19&quot;,
    &quot;\u2A1A&quot;
  ],
  props: {
    numArgs: 0
  },
  handler({ parser, funcName }) {
    let fName = funcName;
    if (fName.length === 1) {
      fName = singleCharIntegrals[fName];
    }
    return {
      type: &quot;op&quot;,
      mode: parser.mode,
      limits: false,
      parentIsSupSub: false,
      symbol: true,
      stack: false,
      name: fName
    };
  },
  mathmlBuilder: mathmlBuilder$2
});
var mathmlBuilder$1 = (group, style) =&gt; {
  let expression = buildExpression(group.body, style.withFont(&quot;mathrm&quot;));
  let isAllString = true;
  for (let i = 0; i &lt; expression.length; i++) {
    let node = expression[i];
    if (node instanceof mathMLTree.MathNode) {
      if (node.type === &quot;mrow&quot; &amp;&amp; node.children.length === 1 &amp;&amp; node.children[0] instanceof mathMLTree.MathNode) {
        node = node.children[0];
      }
      switch (node.type) {
        case &quot;mi&quot;:
        case &quot;mn&quot;:
        case &quot;ms&quot;:
        case &quot;mtext&quot;:
          break;
        // Do nothing yet.
        case &quot;mspace&quot;:
          {
            if (node.attributes.width) {
              const width = node.attributes.width.replace(&quot;em&quot;, &quot;&quot;);
              const ch = spaceCharacter(Number(width));
              if (ch === &quot;&quot;) {
                isAllString = false;
              } else {
                expression[i] = new mathMLTree.MathNode(&quot;mtext&quot;, [new mathMLTree.TextNode(ch)]);
              }
            }
          }
          break;
        case &quot;mo&quot;: {
          const child = node.children[0];
          if (node.children.length === 1 &amp;&amp; child instanceof mathMLTree.TextNode) {
            child.text = child.text.replace(/\u2212/, &quot;-&quot;).replace(/\u2217/, &quot;*&quot;);
          } else {
            isAllString = false;
          }
          break;
        }
        default:
          isAllString = false;
      }
    } else {
      isAllString = false;
    }
  }
  if (isAllString) {
    const word = expression.map((node) =&gt; node.toText()).join(&quot;&quot;);
    expression = [new mathMLTree.TextNode(word)];
  } else if (expression.length === 1 &amp;&amp; [&quot;mover&quot;, &quot;munder&quot;].includes(expression[0].type) &amp;&amp; (expression[0].children[0].type === &quot;mi&quot; || expression[0].children[0].type === &quot;mtext&quot;)) {
    expression[0].children[0].type = &quot;mi&quot;;
    if (group.parentIsSupSub) {
      return new mathMLTree.MathNode(&quot;mrow&quot;, expression);
    } else {
      const operator = new mathMLTree.MathNode(&quot;mo&quot;, [makeText(&quot;\u2061&quot;, &quot;text&quot;)]);
      return mathMLTree.newDocumentFragment([expression[0], operator]);
    }
  }
  let wrapper;
  if (isAllString) {
    wrapper = new mathMLTree.MathNode(&quot;mi&quot;, expression);
    if (expression[0].text.length === 1) {
      wrapper.setAttribute(&quot;mathvariant&quot;, &quot;normal&quot;);
    }
  } else {
    wrapper = new mathMLTree.MathNode(&quot;mrow&quot;, expression);
  }
  if (!group.parentIsSupSub) {
    const operator = new mathMLTree.MathNode(&quot;mo&quot;, [makeText(&quot;\u2061&quot;, &quot;text&quot;)]);
    const fragment = [wrapper, operator];
    if (group.needsLeadingSpace) {
      const space = new mathMLTree.MathNode(&quot;mspace&quot;);
      space.setAttribute(&quot;width&quot;, &quot;0.1667em&quot;);
      fragment.unshift(space);
    }
    if (!group.isFollowedByDelimiter) {
      const trail = new mathMLTree.MathNode(&quot;mspace&quot;);
      trail.setAttribute(&quot;width&quot;, &quot;0.1667em&quot;);
      fragment.push(trail);
    }
    return mathMLTree.newDocumentFragment(fragment);
  }
  return wrapper;
};
defineFunction({
  type: &quot;operatorname&quot;,
  names: [&quot;\\operatorname@&quot;, &quot;\\operatornamewithlimits&quot;],
  props: {
    numArgs: 1,
    allowedInArgument: true
  },
  handler: ({ parser, funcName }, args) =&gt; {
    const body = args[0];
    const prevAtomType = parser.prevAtomType;
    const next = parser.gullet.future().text;
    return {
      type: &quot;operatorname&quot;,
      mode: parser.mode,
      body: ordargument(body),
      alwaysHandleSupSub: funcName === &quot;\\operatornamewithlimits&quot;,
      limits: false,
      parentIsSupSub: false,
      isFollowedByDelimiter: isDelimiter(next),
      needsLeadingSpace: prevAtomType.length &gt; 0 &amp;&amp; ordTypes.includes(prevAtomType)
    };
  },
  mathmlBuilder: mathmlBuilder$1
});
defineMacro(
  &quot;\\operatorname&quot;,
  &quot;\\@ifstar\\operatornamewithlimits\\operatorname@&quot;
);
defineFunctionBuilders({
  type: &quot;ordgroup&quot;,
  mathmlBuilder(group, style) {
    return buildExpressionRow(group.body, style, group.semisimple);
  }
});
defineFunction({
  type: &quot;phantom&quot;,
  names: [&quot;\\phantom&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args) =&gt; {
    const body = args[0];
    return {
      type: &quot;phantom&quot;,
      mode: parser.mode,
      body: ordargument(body)
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const inner2 = buildExpression(group.body, style);
    return new mathMLTree.MathNode(&quot;mphantom&quot;, inner2);
  }
});
defineFunction({
  type: &quot;hphantom&quot;,
  names: [&quot;\\hphantom&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args) =&gt; {
    const body = args[0];
    return {
      type: &quot;hphantom&quot;,
      mode: parser.mode,
      body
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const inner2 = buildExpression(ordargument(group.body), style);
    const phantom = new mathMLTree.MathNode(&quot;mphantom&quot;, inner2);
    const node = new mathMLTree.MathNode(&quot;mpadded&quot;, [phantom]);
    node.setAttribute(&quot;height&quot;, &quot;0px&quot;);
    node.setAttribute(&quot;depth&quot;, &quot;0px&quot;);
    return node;
  }
});
defineFunction({
  type: &quot;vphantom&quot;,
  names: [&quot;\\vphantom&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args) =&gt; {
    const body = args[0];
    return {
      type: &quot;vphantom&quot;,
      mode: parser.mode,
      body
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const inner2 = buildExpression(ordargument(group.body), style);
    const phantom = new mathMLTree.MathNode(&quot;mphantom&quot;, inner2);
    const node = new mathMLTree.MathNode(&quot;mpadded&quot;, [phantom]);
    node.setAttribute(&quot;width&quot;, &quot;0px&quot;);
    return node;
  }
});
defineFunction({
  type: &quot;pmb&quot;,
  names: [&quot;\\pmb&quot;],
  props: {
    numArgs: 1,
    allowedInText: true
  },
  handler({ parser }, args) {
    return {
      type: &quot;pmb&quot;,
      mode: parser.mode,
      body: ordargument(args[0])
    };
  },
  mathmlBuilder(group, style) {
    const inner2 = buildExpression(group.body, style);
    const node = wrapWithMstyle(inner2);
    node.setAttribute(&quot;style&quot;, &quot;font-weight:bold&quot;);
    return node;
  }
});
var mathmlBuilder = (group, style) =&gt; {
  const newStyle = style.withLevel(StyleLevel.TEXT);
  const node = new mathMLTree.MathNode(&quot;mpadded&quot;, [buildGroup$1(group.body, newStyle)]);
  const dy = calculateSize(group.dy, style);
  node.setAttribute(&quot;voffset&quot;, dy.number + dy.unit);
  if (dy.number &gt; 0) {
    node.style.padding = dy.number + dy.unit + &quot; 0 0 0&quot;;
  } else {
    node.style.padding = &quot;0 0 &quot; + Math.abs(dy.number) + dy.unit + &quot; 0&quot;;
  }
  return node;
};
defineFunction({
  type: &quot;raise&quot;,
  names: [&quot;\\raise&quot;, &quot;\\lower&quot;],
  props: {
    numArgs: 2,
    argTypes: [&quot;size&quot;, &quot;primitive&quot;],
    primitive: true
  },
  handler({ parser, funcName }, args) {
    const amount = assertNodeType(args[0], &quot;size&quot;).value;
    if (funcName === &quot;\\lower&quot;) {
      amount.number *= -1;
    }
    const body = args[1];
    return {
      type: &quot;raise&quot;,
      mode: parser.mode,
      dy: amount,
      body
    };
  },
  mathmlBuilder
});
defineFunction({
  type: &quot;raise&quot;,
  names: [&quot;\\raisebox&quot;],
  props: {
    numArgs: 2,
    argTypes: [&quot;size&quot;, &quot;hbox&quot;],
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const amount = assertNodeType(args[0], &quot;size&quot;).value;
    const body = args[1];
    return {
      type: &quot;raise&quot;,
      mode: parser.mode,
      dy: amount,
      body
    };
  },
  mathmlBuilder
});
defineFunction({
  type: &quot;ref&quot;,
  names: [&quot;\\ref&quot;, &quot;\\eqref&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;raw&quot;]
  },
  handler({ parser, funcName }, args) {
    return {
      type: &quot;ref&quot;,
      mode: parser.mode,
      funcName,
      string: args[0].string.replace(invalidIdRegEx, &quot;&quot;)
    };
  },
  mathmlBuilder(group, style) {
    const classes = group.funcName === &quot;\\ref&quot; ? [&quot;tml-ref&quot;] : [&quot;tml-ref&quot;, &quot;tml-eqref&quot;];
    return new AnchorNode(&quot;#&quot; + group.string, classes, null);
  }
});
defineFunction({
  type: &quot;reflect&quot;,
  names: [&quot;\\reflectbox&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;hbox&quot;],
    allowedInText: true
  },
  handler({ parser }, args) {
    return {
      type: &quot;reflect&quot;,
      mode: parser.mode,
      body: args[0]
    };
  },
  mathmlBuilder(group, style) {
    const node = buildGroup$1(group.body, style);
    node.style.transform = &quot;scaleX(-1)&quot;;
    return node;
  }
});
defineFunction({
  type: &quot;internal&quot;,
  names: [&quot;\\relax&quot;],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler({ parser }) {
    return {
      type: &quot;internal&quot;,
      mode: parser.mode
    };
  }
});
defineFunction({
  type: &quot;rule&quot;,
  names: [&quot;\\rule&quot;],
  props: {
    numArgs: 2,
    numOptionalArgs: 1,
    allowedInText: true,
    allowedInMath: true,
    argTypes: [&quot;size&quot;, &quot;size&quot;, &quot;size&quot;]
  },
  handler({ parser }, args, optArgs) {
    const shift = optArgs[0];
    const width = assertNodeType(args[0], &quot;size&quot;);
    const height = assertNodeType(args[1], &quot;size&quot;);
    return {
      type: &quot;rule&quot;,
      mode: parser.mode,
      shift: shift &amp;&amp; assertNodeType(shift, &quot;size&quot;).value,
      width: width.value,
      height: height.value
    };
  },
  mathmlBuilder(group, style) {
    const width = calculateSize(group.width, style);
    const height = calculateSize(group.height, style);
    const shift = group.shift ? calculateSize(group.shift, style) : { number: 0, unit: &quot;em&quot; };
    const color = style.color &amp;&amp; style.getColor() || &quot;black&quot;;
    const rule = new mathMLTree.MathNode(&quot;mspace&quot;);
    if (width.number &gt; 0 &amp;&amp; height.number &gt; 0) {
      rule.setAttribute(&quot;mathbackground&quot;, color);
    }
    rule.setAttribute(&quot;width&quot;, width.number + width.unit);
    rule.setAttribute(&quot;height&quot;, height.number + height.unit);
    if (shift.number === 0) {
      return rule;
    }
    const wrapper = new mathMLTree.MathNode(&quot;mpadded&quot;, [rule]);
    if (shift.number &gt;= 0) {
      wrapper.setAttribute(&quot;height&quot;, &quot;+&quot; + shift.number + shift.unit);
    } else {
      wrapper.setAttribute(&quot;height&quot;, shift.number + shift.unit);
      wrapper.setAttribute(&quot;depth&quot;, &quot;+&quot; + -shift.number + shift.unit);
    }
    wrapper.setAttribute(&quot;voffset&quot;, shift.number + shift.unit);
    return wrapper;
  }
});
var sizeMap = {
  &quot;\\tiny&quot;: 0.5,
  &quot;\\sixptsize&quot;: 0.6,
  &quot;\\Tiny&quot;: 0.6,
  &quot;\\scriptsize&quot;: 0.7,
  &quot;\\footnotesize&quot;: 0.8,
  &quot;\\small&quot;: 0.9,
  &quot;\\normalsize&quot;: 1,
  &quot;\\large&quot;: 1.2,
  &quot;\\Large&quot;: 1.44,
  &quot;\\LARGE&quot;: 1.728,
  &quot;\\huge&quot;: 2.074,
  &quot;\\Huge&quot;: 2.488
};
defineFunction({
  type: &quot;sizing&quot;,
  names: [
    &quot;\\tiny&quot;,
    &quot;\\sixptsize&quot;,
    &quot;\\Tiny&quot;,
    &quot;\\scriptsize&quot;,
    &quot;\\footnotesize&quot;,
    &quot;\\small&quot;,
    &quot;\\normalsize&quot;,
    &quot;\\large&quot;,
    &quot;\\Large&quot;,
    &quot;\\LARGE&quot;,
    &quot;\\huge&quot;,
    &quot;\\Huge&quot;
  ],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler: ({ breakOnTokenText, funcName, parser }, args) =&gt; {
    if (parser.settings.strict &amp;&amp; parser.mode === &quot;math&quot;) {
      console.log(`Temml strict-mode warning: Command ${funcName} is invalid in math mode.`);
    }
    const body = parser.parseExpression(false, breakOnTokenText, true);
    return {
      type: &quot;sizing&quot;,
      mode: parser.mode,
      funcName,
      body
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const newStyle = style.withFontSize(sizeMap[group.funcName]);
    const inner2 = buildExpression(group.body, newStyle);
    const node = wrapWithMstyle(inner2);
    const factor = (sizeMap[group.funcName] / style.fontSize).toFixed(4);
    node.setAttribute(&quot;mathsize&quot;, factor + &quot;em&quot;);
    return node;
  }
});
defineFunction({
  type: &quot;smash&quot;,
  names: [&quot;\\smash&quot;],
  props: {
    numArgs: 1,
    numOptionalArgs: 1,
    allowedInText: true
  },
  handler: ({ parser }, args, optArgs) =&gt; {
    let smashHeight = false;
    let smashDepth = false;
    const tbArg = optArgs[0] &amp;&amp; assertNodeType(optArgs[0], &quot;ordgroup&quot;);
    if (tbArg) {
      let letter = &quot;&quot;;
      for (let i = 0; i &lt; tbArg.body.length; ++i) {
        const node = tbArg.body[i];
        letter = node.text;
        if (letter === &quot;t&quot;) {
          smashHeight = true;
        } else if (letter === &quot;b&quot;) {
          smashDepth = true;
        } else {
          smashHeight = false;
          smashDepth = false;
          break;
        }
      }
    } else {
      smashHeight = true;
      smashDepth = true;
    }
    const body = args[0];
    return {
      type: &quot;smash&quot;,
      mode: parser.mode,
      body,
      smashHeight,
      smashDepth
    };
  },
  mathmlBuilder: (group, style) =&gt; {
    const node = new mathMLTree.MathNode(&quot;mpadded&quot;, [buildGroup$1(group.body, style)]);
    if (group.smashHeight) {
      node.setAttribute(&quot;height&quot;, &quot;0px&quot;);
    }
    if (group.smashDepth) {
      node.setAttribute(&quot;depth&quot;, &quot;0px&quot;);
    }
    return node;
  }
});
defineFunction({
  type: &quot;sqrt&quot;,
  names: [&quot;\\sqrt&quot;],
  props: {
    numArgs: 1,
    numOptionalArgs: 1
  },
  handler({ parser }, args, optArgs) {
    const index = optArgs[0];
    const body = args[0];
    return {
      type: &quot;sqrt&quot;,
      mode: parser.mode,
      body,
      index
    };
  },
  mathmlBuilder(group, style) {
    const { body, index } = group;
    return index ? new mathMLTree.MathNode(&quot;mroot&quot;, [
      buildGroup$1(body, style),
      buildGroup$1(index, style.incrementLevel())
    ]) : new mathMLTree.MathNode(&quot;msqrt&quot;, [buildGroup$1(body, style)]);
  }
});
var styleMap = {
  display: 0,
  text: 1,
  script: 2,
  scriptscript: 3
};
var styleAttributes = {
  display: [&quot;0&quot;, &quot;true&quot;],
  text: [&quot;0&quot;, &quot;false&quot;],
  script: [&quot;1&quot;, &quot;false&quot;],
  scriptscript: [&quot;2&quot;, &quot;false&quot;]
};
defineFunction({
  type: &quot;styling&quot;,
  names: [&quot;\\displaystyle&quot;, &quot;\\textstyle&quot;, &quot;\\scriptstyle&quot;, &quot;\\scriptscriptstyle&quot;],
  props: {
    numArgs: 0,
    allowedInText: true,
    primitive: true
  },
  handler({ breakOnTokenText, funcName, parser }, args) {
    const body = parser.parseExpression(true, breakOnTokenText, true);
    const scriptLevel2 = funcName.slice(1, funcName.length - 5);
    return {
      type: &quot;styling&quot;,
      mode: parser.mode,
      // Figure out what scriptLevel to use by pulling out the scriptLevel from
      // the function name
      scriptLevel: scriptLevel2,
      body
    };
  },
  mathmlBuilder(group, style) {
    const newStyle = style.withLevel(styleMap[group.scriptLevel]);
    const inner2 = buildExpression(group.body, newStyle);
    const node = wrapWithMstyle(inner2);
    const attr = styleAttributes[group.scriptLevel];
    node.setAttribute(&quot;scriptlevel&quot;, attr[0]);
    node.setAttribute(&quot;displaystyle&quot;, attr[1]);
    return node;
  }
});
var symbolRegEx = /^m(over|under|underover)$/;
defineFunctionBuilders({
  type: &quot;supsub&quot;,
  mathmlBuilder(group, style) {
    let isBrace = false;
    let isOver;
    let isSup;
    let appendApplyFunction = false;
    let appendSpace = false;
    let needsLeadingSpace = false;
    if (group.base &amp;&amp; group.base.type === &quot;horizBrace&quot;) {
      isSup = !!group.sup;
      if (isSup === group.base.isOver) {
        isBrace = true;
        isOver = group.base.isOver;
      }
    }
    if (group.base &amp;&amp; !group.base.stack &amp;&amp; (group.base.type === &quot;op&quot; || group.base.type === &quot;operatorname&quot;)) {
      group.base.parentIsSupSub = true;
      appendApplyFunction = !group.base.symbol;
      appendSpace = appendApplyFunction &amp;&amp; !group.isFollowedByDelimiter;
      needsLeadingSpace = group.base.needsLeadingSpace;
    }
    const children = group.base &amp;&amp; group.base.stack ? [buildGroup$1(group.base.body[0], style)] : [buildGroup$1(group.base, style)];
    const childStyle = style.inSubOrSup();
    if (group.sub) {
      const sub = buildGroup$1(group.sub, childStyle);
      if (style.level === 3) {
        sub.setAttribute(&quot;scriptlevel&quot;, &quot;2&quot;);
      }
      children.push(sub);
    }
    if (group.sup) {
      const sup = buildGroup$1(group.sup, childStyle);
      if (style.level === 3) {
        sup.setAttribute(&quot;scriptlevel&quot;, &quot;2&quot;);
      }
      const testNode = sup.type === &quot;mrow&quot; ? sup.children[0] : sup;
      if (testNode &amp;&amp; testNode.type === &quot;mo&quot; &amp;&amp; testNode.classes.includes(&quot;tml-prime&quot;) &amp;&amp; group.base &amp;&amp; group.base.text &amp;&amp; &quot;fF&quot;.indexOf(group.base.text) &gt; -1) {
        testNode.classes.push(&quot;prime-pad&quot;);
      }
      children.push(sup);
    }
    let nodeType;
    if (isBrace) {
      nodeType = isOver ? &quot;mover&quot; : &quot;munder&quot;;
    } else if (!group.sub) {
      const base = group.base;
      if (base &amp;&amp; base.type === &quot;op&quot; &amp;&amp; base.limits &amp;&amp; (style.level === StyleLevel.DISPLAY || base.alwaysHandleSupSub)) {
        nodeType = &quot;mover&quot;;
      } else if (base &amp;&amp; base.type === &quot;operatorname&quot; &amp;&amp; base.alwaysHandleSupSub &amp;&amp; (base.limits || style.level === StyleLevel.DISPLAY)) {
        nodeType = &quot;mover&quot;;
      } else {
        nodeType = &quot;msup&quot;;
      }
    } else if (!group.sup) {
      const base = group.base;
      if (base &amp;&amp; base.type === &quot;op&quot; &amp;&amp; base.limits &amp;&amp; (style.level === StyleLevel.DISPLAY || base.alwaysHandleSupSub)) {
        nodeType = &quot;munder&quot;;
      } else if (base &amp;&amp; base.type === &quot;operatorname&quot; &amp;&amp; base.alwaysHandleSupSub &amp;&amp; (base.limits || style.level === StyleLevel.DISPLAY)) {
        nodeType = &quot;munder&quot;;
      } else {
        nodeType = &quot;msub&quot;;
      }
    } else {
      const base = group.base;
      if (base &amp;&amp; (base.type === &quot;op&quot; &amp;&amp; base.limits || base.type === &quot;multiscript&quot;) &amp;&amp; (style.level === StyleLevel.DISPLAY || base.alwaysHandleSupSub)) {
        nodeType = &quot;munderover&quot;;
      } else if (base &amp;&amp; base.type === &quot;operatorname&quot; &amp;&amp; base.alwaysHandleSupSub &amp;&amp; (style.level === StyleLevel.DISPLAY || base.limits)) {
        nodeType = &quot;munderover&quot;;
      } else {
        nodeType = &quot;msubsup&quot;;
      }
    }
    let node = new mathMLTree.MathNode(nodeType, children);
    if (appendApplyFunction) {
      const operator = new mathMLTree.MathNode(&quot;mo&quot;, [makeText(&quot;\u2061&quot;, &quot;text&quot;)]);
      if (needsLeadingSpace) {
        const space = new mathMLTree.MathNode(&quot;mspace&quot;);
        space.setAttribute(&quot;width&quot;, &quot;0.1667em&quot;);
        node = mathMLTree.newDocumentFragment([space, node, operator]);
      } else {
        node = mathMLTree.newDocumentFragment([node, operator]);
      }
      if (appendSpace) {
        const space = new mathMLTree.MathNode(&quot;mspace&quot;);
        space.setAttribute(&quot;width&quot;, &quot;0.1667em&quot;);
        node.children.push(space);
      }
    } else if (symbolRegEx.test(nodeType)) {
      node = new mathMLTree.MathNode(&quot;mrow&quot;, [node]);
    }
    return node;
  }
});
var short = [
  &quot;\\shortmid&quot;,
  &quot;\\nshortmid&quot;,
  &quot;\\shortparallel&quot;,
  &quot;\\nshortparallel&quot;,
  &quot;\\smallsetminus&quot;
];
var arrows = [&quot;\\Rsh&quot;, &quot;\\Lsh&quot;, &quot;\\restriction&quot;];
var isArrow = (str) =&gt; {
  if (str.length === 1) {
    const codePoint = str.codePointAt(0);
    return 8591 &lt; codePoint &amp;&amp; codePoint &lt; 8704;
  }
  return str.indexOf(&quot;arrow&quot;) &gt; -1 || str.indexOf(&quot;harpoon&quot;) &gt; -1 || arrows.includes(str);
};
defineFunctionBuilders({
  type: &quot;atom&quot;,
  mathmlBuilder(group, style) {
    const node = new mathMLTree.MathNode(&quot;mo&quot;, [makeText(group.text, group.mode)]);
    if (group.family === &quot;punct&quot;) {
      node.setAttribute(&quot;separator&quot;, &quot;true&quot;);
    } else if (group.family === &quot;open&quot; || group.family === &quot;close&quot;) {
      if (group.family === &quot;open&quot;) {
        node.setAttribute(&quot;form&quot;, &quot;prefix&quot;);
        node.setAttribute(&quot;stretchy&quot;, &quot;false&quot;);
      } else if (group.family === &quot;close&quot;) {
        node.setAttribute(&quot;form&quot;, &quot;postfix&quot;);
        node.setAttribute(&quot;stretchy&quot;, &quot;false&quot;);
      }
    } else if (group.text === &quot;\\mid&quot;) {
      node.setAttribute(&quot;lspace&quot;, &quot;0.22em&quot;);
      node.setAttribute(&quot;rspace&quot;, &quot;0.22em&quot;);
      node.setAttribute(&quot;stretchy&quot;, &quot;false&quot;);
    } else if (group.family === &quot;rel&quot; &amp;&amp; isArrow(group.text)) {
      node.setAttribute(&quot;stretchy&quot;, &quot;false&quot;);
    } else if (short.includes(group.text)) {
      node.setAttribute(&quot;mathsize&quot;, &quot;70%&quot;);
    } else if (group.text === &quot;:&quot;) {
      node.attributes.lspace = &quot;0.2222em&quot;;
      node.attributes.rspace = &quot;0.2222em&quot;;
    }
    return node;
  }
});
var fontMap = {
  // styles
  mathbf: &quot;bold&quot;,
  mathrm: &quot;normal&quot;,
  textit: &quot;italic&quot;,
  mathit: &quot;italic&quot;,
  mathnormal: &quot;italic&quot;,
  // families
  mathbb: &quot;double-struck&quot;,
  mathcal: &quot;script&quot;,
  mathfrak: &quot;fraktur&quot;,
  mathscr: &quot;script&quot;,
  mathsf: &quot;sans-serif&quot;,
  mathtt: &quot;monospace&quot;
};
var getVariant = function(group, style) {
  if (style.fontFamily === &quot;texttt&quot;) {
    return &quot;monospace&quot;;
  } else if (style.fontFamily === &quot;textsc&quot;) {
    return &quot;normal&quot;;
  } else if (style.fontFamily === &quot;textsf&quot;) {
    if (style.fontShape === &quot;textit&quot; &amp;&amp; style.fontWeight === &quot;textbf&quot;) {
      return &quot;sans-serif-bold-italic&quot;;
    } else if (style.fontShape === &quot;textit&quot;) {
      return &quot;sans-serif-italic&quot;;
    } else if (style.fontWeight === &quot;textbf&quot;) {
      return &quot;sans-serif-bold&quot;;
    } else {
      return &quot;sans-serif&quot;;
    }
  } else if (style.fontShape === &quot;textit&quot; &amp;&amp; style.fontWeight === &quot;textbf&quot;) {
    return &quot;bold-italic&quot;;
  } else if (style.fontShape === &quot;textit&quot;) {
    return &quot;italic&quot;;
  } else if (style.fontWeight === &quot;textbf&quot;) {
    return &quot;bold&quot;;
  }
  const font = style.font;
  if (!font || font === &quot;mathnormal&quot;) {
    return null;
  }
  const mode = group.mode;
  switch (font) {
    case &quot;mathit&quot;:
      return &quot;italic&quot;;
    case &quot;mathrm&quot;: {
      const codePoint = group.text.codePointAt(0);
      return 939 &lt; codePoint &amp;&amp; codePoint &lt; 975 ? &quot;italic&quot; : &quot;normal&quot;;
    }
    case &quot;greekItalic&quot;:
      return &quot;italic&quot;;
    case &quot;up@greek&quot;:
      return &quot;normal&quot;;
    case &quot;boldsymbol&quot;:
    case &quot;mathboldsymbol&quot;:
      return &quot;bold-italic&quot;;
    case &quot;mathbf&quot;:
      return &quot;bold&quot;;
    case &quot;mathbb&quot;:
      return &quot;double-struck&quot;;
    case &quot;mathfrak&quot;:
      return &quot;fraktur&quot;;
    case &quot;mathscr&quot;:
    case &quot;mathcal&quot;:
      return &quot;script&quot;;
    case &quot;mathsf&quot;:
      return &quot;sans-serif&quot;;
    case &quot;mathsfit&quot;:
      return &quot;sans-serif-italic&quot;;
    case &quot;mathtt&quot;:
      return &quot;monospace&quot;;
  }
  let text2 = group.text;
  if (symbols[mode][text2] &amp;&amp; symbols[mode][text2].replace) {
    text2 = symbols[mode][text2].replace;
  }
  return Object.prototype.hasOwnProperty.call(fontMap, font) ? fontMap[font] : null;
};
var script = Object.freeze({
  B: 8426,
  // Offset from ASCII B to Unicode script B
  E: 8427,
  F: 8427,
  H: 8387,
  I: 8391,
  L: 8390,
  M: 8422,
  R: 8393,
  e: 8394,
  g: 8355,
  o: 8389
});
var frak = Object.freeze({
  C: 8426,
  H: 8388,
  I: 8392,
  R: 8394,
  Z: 8398
});
var bbb = Object.freeze({
  C: 8383,
  // blackboard bold
  H: 8389,
  N: 8391,
  P: 8393,
  Q: 8393,
  R: 8395,
  Z: 8394
});
var bold = Object.freeze({
  &quot;\u03F5&quot;: 119527,
  // lunate epsilon
  &quot;\u03D1&quot;: 119564,
  // vartheta
  &quot;\u03F0&quot;: 119534,
  // varkappa
  &quot;\u03C6&quot;: 119577,
  // varphi
  &quot;\u03F1&quot;: 119535,
  // varrho
  &quot;\u03D6&quot;: 119563
  // varpi
});
var boldItalic = Object.freeze({
  &quot;\u03F5&quot;: 119643,
  // lunate epsilon
  &quot;\u03D1&quot;: 119680,
  // vartheta
  &quot;\u03F0&quot;: 119650,
  // varkappa
  &quot;\u03C6&quot;: 119693,
  // varphi
  &quot;\u03F1&quot;: 119651,
  // varrho
  &quot;\u03D6&quot;: 119679
  // varpi
});
var boldsf = Object.freeze({
  &quot;\u03F5&quot;: 119701,
  // lunate epsilon
  &quot;\u03D1&quot;: 119738,
  // vartheta
  &quot;\u03F0&quot;: 119708,
  // varkappa
  &quot;\u03C6&quot;: 119751,
  // varphi
  &quot;\u03F1&quot;: 119709,
  // varrho
  &quot;\u03D6&quot;: 119737
  // varpi
});
var bisf = Object.freeze({
  &quot;\u03F5&quot;: 119759,
  // lunate epsilon
  &quot;\u03D1&quot;: 119796,
  // vartheta
  &quot;\u03F0&quot;: 119766,
  // varkappa
  &quot;\u03C6&quot;: 119809,
  // varphi
  &quot;\u03F1&quot;: 119767,
  // varrho
  &quot;\u03D6&quot;: 119795
  // varpi
});
var offset = Object.freeze({
  upperCaseLatin: {
    // A-Z
    &quot;normal&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold&quot;: (ch) =&gt; {
      return 119743;
    },
    &quot;italic&quot;: (ch) =&gt; {
      return 119795;
    },
    &quot;bold-italic&quot;: (ch) =&gt; {
      return 119847;
    },
    &quot;script&quot;: (ch) =&gt; {
      return script[ch] || 119899;
    },
    &quot;script-bold&quot;: (ch) =&gt; {
      return 119951;
    },
    &quot;fraktur&quot;: (ch) =&gt; {
      return frak[ch] || 120003;
    },
    &quot;fraktur-bold&quot;: (ch) =&gt; {
      return 120107;
    },
    &quot;double-struck&quot;: (ch) =&gt; {
      return bbb[ch] || 120055;
    },
    &quot;sans-serif&quot;: (ch) =&gt; {
      return 120159;
    },
    &quot;sans-serif-bold&quot;: (ch) =&gt; {
      return 120211;
    },
    &quot;sans-serif-italic&quot;: (ch) =&gt; {
      return 120263;
    },
    &quot;sans-serif-bold-italic&quot;: (ch) =&gt; {
      return 120380;
    },
    &quot;monospace&quot;: (ch) =&gt; {
      return 120367;
    }
  },
  lowerCaseLatin: {
    // a-z
    &quot;normal&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold&quot;: (ch) =&gt; {
      return 119737;
    },
    &quot;italic&quot;: (ch) =&gt; {
      return ch === &quot;h&quot; ? 8358 : 119789;
    },
    &quot;bold-italic&quot;: (ch) =&gt; {
      return 119841;
    },
    &quot;script&quot;: (ch) =&gt; {
      return script[ch] || 119893;
    },
    &quot;script-bold&quot;: (ch) =&gt; {
      return 119945;
    },
    &quot;fraktur&quot;: (ch) =&gt; {
      return 119997;
    },
    &quot;fraktur-bold&quot;: (ch) =&gt; {
      return 120101;
    },
    &quot;double-struck&quot;: (ch) =&gt; {
      return 120049;
    },
    &quot;sans-serif&quot;: (ch) =&gt; {
      return 120153;
    },
    &quot;sans-serif-bold&quot;: (ch) =&gt; {
      return 120205;
    },
    &quot;sans-serif-italic&quot;: (ch) =&gt; {
      return 120257;
    },
    &quot;sans-serif-bold-italic&quot;: (ch) =&gt; {
      return 120309;
    },
    &quot;monospace&quot;: (ch) =&gt; {
      return 120361;
    }
  },
  upperCaseGreek: {
    // A-Ω
    &quot;normal&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold&quot;: (ch) =&gt; {
      return 119575;
    },
    &quot;italic&quot;: (ch) =&gt; {
      return 119633;
    },
    // \boldsymbol actually returns upright bold for upperCaseGreek
    &quot;bold-italic&quot;: (ch) =&gt; {
      return 119575;
    },
    &quot;script&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;script-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;double-struck&quot;: (ch) =&gt; {
      return 0;
    },
    // Unicode has no code points for regular-weight san-serif Greek. Use bold.
    &quot;sans-serif&quot;: (ch) =&gt; {
      return 119749;
    },
    &quot;sans-serif-bold&quot;: (ch) =&gt; {
      return 119749;
    },
    &quot;sans-serif-italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;sans-serif-bold-italic&quot;: (ch) =&gt; {
      return 119807;
    },
    &quot;monospace&quot;: (ch) =&gt; {
      return 0;
    }
  },
  lowerCaseGreek: {
    // α-ω
    &quot;normal&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold&quot;: (ch) =&gt; {
      return 119569;
    },
    &quot;italic&quot;: (ch) =&gt; {
      return 119627;
    },
    &quot;bold-italic&quot;: (ch) =&gt; {
      return ch === &quot;\u03D5&quot; ? 119678 : 119685;
    },
    &quot;script&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;script-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;double-struck&quot;: (ch) =&gt; {
      return 0;
    },
    // Unicode has no code points for regular-weight san-serif Greek. Use bold.
    &quot;sans-serif&quot;: (ch) =&gt; {
      return 119743;
    },
    &quot;sans-serif-bold&quot;: (ch) =&gt; {
      return 119743;
    },
    &quot;sans-serif-italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;sans-serif-bold-italic&quot;: (ch) =&gt; {
      return 119801;
    },
    &quot;monospace&quot;: (ch) =&gt; {
      return 0;
    }
  },
  varGreek: {
    // \varGamma, etc
    &quot;normal&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold&quot;: (ch) =&gt; {
      return bold[ch] || -51;
    },
    &quot;italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold-italic&quot;: (ch) =&gt; {
      return boldItalic[ch] || 58;
    },
    &quot;script&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;script-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;double-struck&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;sans-serif&quot;: (ch) =&gt; {
      return boldsf[ch] || 116;
    },
    &quot;sans-serif-bold&quot;: (ch) =&gt; {
      return boldsf[ch] || 116;
    },
    &quot;sans-serif-italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;sans-serif-bold-italic&quot;: (ch) =&gt; {
      return bisf[ch] || 174;
    },
    &quot;monospace&quot;: (ch) =&gt; {
      return 0;
    }
  },
  numeral: {
    // 0-9
    &quot;normal&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold&quot;: (ch) =&gt; {
      return 120734;
    },
    &quot;italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;bold-italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;script&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;script-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;fraktur-bold&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;double-struck&quot;: (ch) =&gt; {
      return 120744;
    },
    &quot;sans-serif&quot;: (ch) =&gt; {
      return 120754;
    },
    &quot;sans-serif-bold&quot;: (ch) =&gt; {
      return 120764;
    },
    &quot;sans-serif-italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;sans-serif-bold-italic&quot;: (ch) =&gt; {
      return 0;
    },
    &quot;monospace&quot;: (ch) =&gt; {
      return 120774;
    }
  }
});
var variantChar = (ch, variant) =&gt; {
  const codePoint = ch.codePointAt(0);
  const block = 64 &lt; codePoint &amp;&amp; codePoint &lt; 91 ? &quot;upperCaseLatin&quot; : 96 &lt; codePoint &amp;&amp; codePoint &lt; 123 ? &quot;lowerCaseLatin&quot; : 912 &lt; codePoint &amp;&amp; codePoint &lt; 938 ? &quot;upperCaseGreek&quot; : 944 &lt; codePoint &amp;&amp; codePoint &lt; 970 || ch === &quot;\u03D5&quot; ? &quot;lowerCaseGreek&quot; : 120545 &lt; codePoint &amp;&amp; codePoint &lt; 120572 || bold[ch] ? &quot;varGreek&quot; : 47 &lt; codePoint &amp;&amp; codePoint &lt; 58 ? &quot;numeral&quot; : &quot;other&quot;;
  return block === &quot;other&quot; ? ch : String.fromCodePoint(codePoint + offset[block][variant](ch));
};
var smallCaps = Object.freeze({
  a: &quot;\u1D00&quot;,
  b: &quot;\u0299&quot;,
  c: &quot;\u1D04&quot;,
  d: &quot;\u1D05&quot;,
  e: &quot;\u1D07&quot;,
  f: &quot;\uA730&quot;,
  g: &quot;\u0262&quot;,
  h: &quot;\u029C&quot;,
  i: &quot;\u026A&quot;,
  j: &quot;\u1D0A&quot;,
  k: &quot;\u1D0B&quot;,
  l: &quot;\u029F&quot;,
  m: &quot;\u1D0D&quot;,
  n: &quot;\u0274&quot;,
  o: &quot;\u1D0F&quot;,
  p: &quot;\u1D18&quot;,
  q: &quot;\u01EB&quot;,
  r: &quot;\u0280&quot;,
  s: &quot;s&quot;,
  t: &quot;\u1D1B&quot;,
  u: &quot;\u1D1C&quot;,
  v: &quot;\u1D20&quot;,
  w: &quot;\u1D21&quot;,
  x: &quot;x&quot;,
  y: &quot;\u028F&quot;,
  z: &quot;\u1D22&quot;
});
var numberRegEx = /^\d(?:[\d,.]*\d)?$/;
var latinRegEx = /[A-Ba-z]/;
var primes = /* @__PURE__ */ new Set([
  &quot;\\prime&quot;,
  &quot;\\dprime&quot;,
  &quot;\\trprime&quot;,
  &quot;\\qprime&quot;,
  &quot;\\backprime&quot;,
  &quot;\\backdprime&quot;,
  &quot;\\backtrprime&quot;
]);
var italicNumber = (text2, variant, tag) =&gt; {
  const mn = new mathMLTree.MathNode(tag, [text2]);
  const wrapper = new mathMLTree.MathNode(&quot;mstyle&quot;, [mn]);
  wrapper.style[&quot;font-style&quot;] = &quot;italic&quot;;
  wrapper.style[&quot;font-family&quot;] = &quot;Cambria, &#039;Times New Roman&#039;, serif&quot;;
  if (variant === &quot;bold-italic&quot;) {
    wrapper.style[&quot;font-weight&quot;] = &quot;bold&quot;;
  }
  return wrapper;
};
defineFunctionBuilders({
  type: &quot;mathord&quot;,
  mathmlBuilder(group, style) {
    const text2 = makeText(group.text, group.mode, style);
    const codePoint = text2.text.codePointAt(0);
    const defaultVariant = 912 &lt; codePoint &amp;&amp; codePoint &lt; 938 ? &quot;normal&quot; : &quot;italic&quot;;
    const variant = getVariant(group, style) || defaultVariant;
    if (variant === &quot;script&quot;) {
      text2.text = variantChar(text2.text, variant);
      return new mathMLTree.MathNode(&quot;mi&quot;, [text2], [style.font]);
    } else if (variant !== &quot;italic&quot;) {
      text2.text = variantChar(text2.text, variant);
    }
    let node = new mathMLTree.MathNode(&quot;mi&quot;, [text2]);
    if (variant === &quot;normal&quot;) {
      node.setAttribute(&quot;mathvariant&quot;, &quot;normal&quot;);
      if (text2.text.length === 1) {
        node = new mathMLTree.MathNode(&quot;mrow&quot;, [node]);
      }
    }
    return node;
  }
});
defineFunctionBuilders({
  type: &quot;textord&quot;,
  mathmlBuilder(group, style) {
    let ch = group.text;
    const codePoint = ch.codePointAt(0);
    if (style.fontFamily === &quot;textsc&quot;) {
      if (96 &lt; codePoint &amp;&amp; codePoint &lt; 123) {
        ch = smallCaps[ch];
      }
    }
    const text2 = makeText(ch, group.mode, style);
    const variant = getVariant(group, style) || &quot;normal&quot;;
    let node;
    if (numberRegEx.test(group.text)) {
      const tag = group.mode === &quot;text&quot; ? &quot;mtext&quot; : &quot;mn&quot;;
      if (variant === &quot;italic&quot; || variant === &quot;bold-italic&quot;) {
        return italicNumber(text2, variant, tag);
      } else {
        if (variant !== &quot;normal&quot;) {
          text2.text = text2.text.split(&quot;&quot;).map((c) =&gt; variantChar(c, variant)).join(&quot;&quot;);
        }
        node = new mathMLTree.MathNode(tag, [text2]);
      }
    } else if (group.mode === &quot;text&quot;) {
      if (variant !== &quot;normal&quot;) {
        text2.text = variantChar(text2.text, variant);
      }
      node = new mathMLTree.MathNode(&quot;mtext&quot;, [text2]);
    } else if (primes.has(group.text)) {
      node = new mathMLTree.MathNode(&quot;mo&quot;, [text2]);
      node.classes.push(&quot;tml-prime&quot;);
    } else {
      const origText = text2.text;
      if (variant !== &quot;italic&quot;) {
        text2.text = variantChar(text2.text, variant);
      }
      node = new mathMLTree.MathNode(&quot;mi&quot;, [text2]);
      if (text2.text === origText &amp;&amp; latinRegEx.test(origText)) {
        node.setAttribute(&quot;mathvariant&quot;, &quot;italic&quot;);
      }
    }
    return node;
  }
});
var cssSpace = {
  &quot;\\nobreak&quot;: &quot;nobreak&quot;,
  &quot;\\allowbreak&quot;: &quot;allowbreak&quot;
};
var regularSpace = {
  &quot; &quot;: {},
  &quot;\\ &quot;: {},
  &quot;~&quot;: {
    className: &quot;nobreak&quot;
  },
  &quot;\\space&quot;: {},
  &quot;\\nobreakspace&quot;: {
    className: &quot;nobreak&quot;
  }
};
defineFunctionBuilders({
  type: &quot;spacing&quot;,
  mathmlBuilder(group, style) {
    let node;
    if (Object.prototype.hasOwnProperty.call(regularSpace, group.text)) {
      node = new mathMLTree.MathNode(&quot;mtext&quot;, [new mathMLTree.TextNode(&quot;\xA0&quot;)]);
    } else if (Object.prototype.hasOwnProperty.call(cssSpace, group.text)) {
      node = new mathMLTree.MathNode(&quot;mo&quot;);
      if (group.text === &quot;\\nobreak&quot;) {
        node.setAttribute(&quot;linebreak&quot;, &quot;nobreak&quot;);
      }
    } else {
      throw new ParseError(`Unknown type of space &quot;${group.text}&quot;`);
    }
    return node;
  }
});
defineFunctionBuilders({
  type: &quot;tag&quot;
});
var textFontFamilies = {
  &quot;\\text&quot;: void 0,
  &quot;\\textrm&quot;: &quot;textrm&quot;,
  &quot;\\textsf&quot;: &quot;textsf&quot;,
  &quot;\\texttt&quot;: &quot;texttt&quot;,
  &quot;\\textnormal&quot;: &quot;textrm&quot;,
  &quot;\\textsc&quot;: &quot;textsc&quot;
  // small caps
};
var textFontWeights = {
  &quot;\\textbf&quot;: &quot;textbf&quot;,
  &quot;\\textmd&quot;: &quot;textmd&quot;
};
var textFontShapes = {
  &quot;\\textit&quot;: &quot;textit&quot;,
  &quot;\\textup&quot;: &quot;textup&quot;
};
var styleWithFont = (group, style) =&gt; {
  const font = group.font;
  if (!font) {
    return style;
  } else if (textFontFamilies[font]) {
    return style.withTextFontFamily(textFontFamilies[font]);
  } else if (textFontWeights[font]) {
    return style.withTextFontWeight(textFontWeights[font]);
  } else if (font === &quot;\\emph&quot;) {
    return style.fontShape === &quot;textit&quot; ? style.withTextFontShape(&quot;textup&quot;) : style.withTextFontShape(&quot;textit&quot;);
  }
  return style.withTextFontShape(textFontShapes[font]);
};
defineFunction({
  type: &quot;text&quot;,
  names: [
    // Font families
    &quot;\\text&quot;,
    &quot;\\textrm&quot;,
    &quot;\\textsf&quot;,
    &quot;\\texttt&quot;,
    &quot;\\textnormal&quot;,
    &quot;\\textsc&quot;,
    // Font weights
    &quot;\\textbf&quot;,
    &quot;\\textmd&quot;,
    // Font Shapes
    &quot;\\textit&quot;,
    &quot;\\textup&quot;,
    &quot;\\emph&quot;
  ],
  props: {
    numArgs: 1,
    argTypes: [&quot;text&quot;],
    allowedInArgument: true,
    allowedInText: true
  },
  handler({ parser, funcName }, args) {
    const body = args[0];
    return {
      type: &quot;text&quot;,
      mode: parser.mode,
      body: ordargument(body),
      font: funcName
    };
  },
  mathmlBuilder(group, style) {
    const newStyle = styleWithFont(group, style);
    const mrow = buildExpressionRow(group.body, newStyle);
    return consolidateText(mrow);
  }
});
defineFunction({
  type: &quot;vcenter&quot;,
  names: [&quot;\\vcenter&quot;],
  props: {
    numArgs: 1,
    argTypes: [&quot;original&quot;],
    allowedInText: false
  },
  handler({ parser }, args) {
    return {
      type: &quot;vcenter&quot;,
      mode: parser.mode,
      body: args[0]
    };
  },
  mathmlBuilder(group, style) {
    const mtd = new mathMLTree.MathNode(&quot;mtd&quot;, [buildGroup$1(group.body, style)]);
    mtd.style.padding = &quot;0&quot;;
    const mtr = new mathMLTree.MathNode(&quot;mtr&quot;, [mtd]);
    return new mathMLTree.MathNode(&quot;mtable&quot;, [mtr]);
  }
});
defineFunction({
  type: &quot;verb&quot;,
  names: [&quot;\\verb&quot;],
  props: {
    numArgs: 0,
    allowedInText: true
  },
  handler(context, args, optArgs) {
    throw new ParseError(&quot;\\verb ended by end of line instead of matching delimiter&quot;);
  },
  mathmlBuilder(group, style) {
    const text2 = new mathMLTree.TextNode(makeVerb(group));
    const node = new mathMLTree.MathNode(&quot;mtext&quot;, [text2]);
    node.setAttribute(&quot;mathvariant&quot;, &quot;monospace&quot;);
    return node;
  }
});
var makeVerb = (group) =&gt; group.body.replace(/ /g, group.star ? &quot;\u2423&quot; : &quot;\xA0&quot;);
var functions = _functions;
var spaceRegexString = &quot;[ \r\n	]&quot;;
var controlWordRegexString = &quot;\\\\[a-zA-Z@]+&quot;;
var controlSymbolRegexString = &quot;\\\\[^\uD800-\uDFFF]&quot;;
var controlWordWhitespaceRegexString = `(${controlWordRegexString})${spaceRegexString}*`;
var controlSpaceRegexString = &quot;\\\\(\n|[ \r	]+\n?)[ \r	]*&quot;;
var combiningDiacriticalMarkString = &quot;[\u0300-\u036F]&quot;;
var combiningDiacriticalMarksEndRegex = new RegExp(`${combiningDiacriticalMarkString}+$`);
var tokenRegexString = `(${spaceRegexString}+)|${controlSpaceRegexString}|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]${combiningDiacriticalMarkString}*|[\uD800-\uDBFF][\uDC00-\uDFFF]${combiningDiacriticalMarkString}*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|${controlWordWhitespaceRegexString}|${controlSymbolRegexString})`;
var Lexer = class {
  constructor(input, settings) {
    this.input = input;
    this.settings = settings;
    this.tokenRegex = new RegExp(tokenRegexString, &quot;g&quot;);
    this.catcodes = {
      &quot;%&quot;: 14,
      // comment character
      &quot;~&quot;: 13
      // active character
    };
  }
  setCatcode(char, code) {
    this.catcodes[char] = code;
  }
  /**
   * This function lexes a single token.
   */
  lex() {
    const input = this.input;
    const pos = this.tokenRegex.lastIndex;
    if (pos === input.length) {
      return new Token(&quot;EOF&quot;, new SourceLocation(this, pos, pos));
    }
    const match = this.tokenRegex.exec(input);
    if (match === null || match.index !== pos) {
      throw new ParseError(
        `Unexpected character: &#039;${input[pos]}&#039;`,
        new Token(input[pos], new SourceLocation(this, pos, pos + 1))
      );
    }
    const text2 = match[6] || match[3] || (match[2] ? &quot;\\ &quot; : &quot; &quot;);
    if (this.catcodes[text2] === 14) {
      const nlIndex = input.indexOf(&quot;\n&quot;, this.tokenRegex.lastIndex);
      if (nlIndex === -1) {
        this.tokenRegex.lastIndex = input.length;
        if (this.settings.strict) {
          throw new ParseError(&quot;% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode&quot;);
        }
      } else {
        this.tokenRegex.lastIndex = nlIndex + 1;
      }
      return this.lex();
    }
    return new Token(text2, new SourceLocation(this, pos, this.tokenRegex.lastIndex));
  }
};
var Namespace = class {
  /**
   * Both arguments are optional.  The first argument is an object of
   * built-in mappings which never change.  The second argument is an object
   * of initial (global-level) mappings, which will constantly change
   * according to any global/top-level `set`s done.
   */
  constructor(builtins = {}, globalMacros = {}) {
    this.current = globalMacros;
    this.builtins = builtins;
    this.undefStack = [];
  }
  /**
   * Start a new nested group, affecting future local `set`s.
   */
  beginGroup() {
    this.undefStack.push({});
  }
  /**
   * End current nested group, restoring values before the group began.
   */
  endGroup() {
    if (this.undefStack.length === 0) {
      throw new ParseError(
        &quot;Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug&quot;
      );
    }
    const undefs = this.undefStack.pop();
    for (const undef in undefs) {
      if (Object.prototype.hasOwnProperty.call(undefs, undef)) {
        if (undefs[undef] === void 0) {
          delete this.current[undef];
        } else {
          this.current[undef] = undefs[undef];
        }
      }
    }
  }
  /**
   * Detect whether `name` has a definition.  Equivalent to
   * `get(name) != null`.
   */
  has(name) {
    return Object.prototype.hasOwnProperty.call(this.current, name) || Object.prototype.hasOwnProperty.call(this.builtins, name);
  }
  /**
   * Get the current value of a name, or `undefined` if there is no value.
   *
   * Note: Do not use `if (namespace.get(...))` to detect whether a macro
   * is defined, as the definition may be the empty string which evaluates
   * to `false` in JavaScript.  Use `if (namespace.get(...) != null)` or
   * `if (namespace.has(...))`.
   */
  get(name) {
    if (Object.prototype.hasOwnProperty.call(this.current, name)) {
      return this.current[name];
    } else {
      return this.builtins[name];
    }
  }
  /**
   * Set the current value of a name, and optionally set it globally too.
   * Local set() sets the current value and (when appropriate) adds an undo
   * operation to the undo stack.  Global set() may change the undo
   * operation at every level, so takes time linear in their number.
   */
  set(name, value, global = false) {
    if (global) {
      for (let i = 0; i &lt; this.undefStack.length; i++) {
        delete this.undefStack[i][name];
      }
      if (this.undefStack.length &gt; 0) {
        this.undefStack[this.undefStack.length - 1][name] = value;
      }
    } else {
      const top = this.undefStack[this.undefStack.length - 1];
      if (top &amp;&amp; !Object.prototype.hasOwnProperty.call(top, name)) {
        top[name] = this.current[name];
      }
    }
    this.current[name] = value;
  }
};
var implicitCommands = {
  &quot;^&quot;: true,
  // Parser.js
  _: true,
  // Parser.js
  &quot;\\limits&quot;: true,
  // Parser.js
  &quot;\\nolimits&quot;: true
  // Parser.js
};
var MacroExpander = class {
  constructor(input, settings, mode) {
    this.settings = settings;
    this.expansionCount = 0;
    this.feed(input);
    this.macros = new Namespace(macros, settings.macros);
    this.mode = mode;
    this.stack = [];
  }
  /**
   * Feed a new input string to the same MacroExpander
   * (with existing macros etc.).
   */
  feed(input) {
    this.lexer = new Lexer(input, this.settings);
  }
  /**
   * Switches between &quot;text&quot; and &quot;math&quot; modes.
   */
  switchMode(newMode) {
    this.mode = newMode;
  }
  /**
   * Start a new group nesting within all namespaces.
   */
  beginGroup() {
    this.macros.beginGroup();
  }
  /**
   * End current group nesting within all namespaces.
   */
  endGroup() {
    this.macros.endGroup();
  }
  /**
   * Returns the topmost token on the stack, without expanding it.
   * Similar in behavior to TeX&#039;s `\futurelet`.
   */
  future() {
    if (this.stack.length === 0) {
      this.pushToken(this.lexer.lex());
    }
    return this.stack[this.stack.length - 1];
  }
  /**
   * Remove and return the next unexpanded token.
   */
  popToken() {
    this.future();
    return this.stack.pop();
  }
  /**
   * Add a given token to the token stack.  In particular, this get be used
   * to put back a token returned from one of the other methods.
   */
  pushToken(token) {
    this.stack.push(token);
  }
  /**
   * Append an array of tokens to the token stack.
   */
  pushTokens(tokens) {
    this.stack.push(...tokens);
  }
  /**
   * Find an macro argument without expanding tokens and append the array of
   * tokens to the token stack. Uses Token as a container for the result.
   */
  scanArgument(isOptional) {
    let start;
    let end;
    let tokens;
    if (isOptional) {
      this.consumeSpaces();
      if (this.future().text !== &quot;[&quot;) {
        return null;
      }
      start = this.popToken();
      ({ tokens, end } = this.consumeArg([&quot;]&quot;]));
    } else {
      ({ tokens, start, end } = this.consumeArg());
    }
    this.pushToken(new Token(&quot;EOF&quot;, end.loc));
    this.pushTokens(tokens);
    return start.range(end, &quot;&quot;);
  }
  /**
   * Consume all following space tokens, without expansion.
   */
  consumeSpaces() {
    for (; ; ) {
      const token = this.future();
      if (token.text === &quot; &quot;) {
        this.stack.pop();
      } else {
        break;
      }
    }
  }
  /**
   * Consume an argument from the token stream, and return the resulting array
   * of tokens and start/end token.
   */
  consumeArg(delims) {
    const tokens = [];
    const isDelimited = delims &amp;&amp; delims.length &gt; 0;
    if (!isDelimited) {
      this.consumeSpaces();
    }
    const start = this.future();
    let tok;
    let depth = 0;
    let match = 0;
    do {
      tok = this.popToken();
      tokens.push(tok);
      if (tok.text === &quot;{&quot;) {
        ++depth;
      } else if (tok.text === &quot;}&quot;) {
        --depth;
        if (depth === -1) {
          throw new ParseError(&quot;Extra }&quot;, tok);
        }
      } else if (tok.text === &quot;EOF&quot;) {
        throw new ParseError(
          &quot;Unexpected end of input in a macro argument, expected &#039;&quot; + (delims &amp;&amp; isDelimited ? delims[match] : &quot;}&quot;) + &quot;&#039;&quot;,
          tok
        );
      }
      if (delims &amp;&amp; isDelimited) {
        if ((depth === 0 || depth === 1 &amp;&amp; delims[match] === &quot;{&quot;) &amp;&amp; tok.text === delims[match]) {
          ++match;
          if (match === delims.length) {
            tokens.splice(-match, match);
            break;
          }
        } else {
          match = 0;
        }
      }
    } while (depth !== 0 || isDelimited);
    if (start.text === &quot;{&quot; &amp;&amp; tokens[tokens.length - 1].text === &quot;}&quot;) {
      tokens.pop();
      tokens.shift();
    }
    tokens.reverse();
    return { tokens, start, end: tok };
  }
  /**
   * Consume the specified number of (delimited) arguments from the token
   * stream and return the resulting array of arguments.
   */
  consumeArgs(numArgs, delimiters2) {
    if (delimiters2) {
      if (delimiters2.length !== numArgs + 1) {
        throw new ParseError(&quot;The length of delimiters doesn&#039;t match the number of args!&quot;);
      }
      const delims = delimiters2[0];
      for (let i = 0; i &lt; delims.length; i++) {
        const tok = this.popToken();
        if (delims[i] !== tok.text) {
          throw new ParseError(&quot;Use of the macro doesn&#039;t match its definition&quot;, tok);
        }
      }
    }
    const args = [];
    for (let i = 0; i &lt; numArgs; i++) {
      args.push(this.consumeArg(delimiters2 &amp;&amp; delimiters2[i + 1]).tokens);
    }
    return args;
  }
  /**
   * Expand the next token only once if possible.
   *
   * If the token is expanded, the resulting tokens will be pushed onto
   * the stack in reverse order, and the number of such tokens will be
   * returned.  This number might be zero or positive.
   *
   * If not, the return value is `false`, and the next token remains at the
   * top of the stack.
   *
   * In either case, the next token will be on the top of the stack,
   * or the stack will be empty (in case of empty expansion
   * and no other tokens).
   *
   * Used to implement `expandAfterFuture` and `expandNextToken`.
   *
   * If expandableOnly, only expandable tokens are expanded and
   * an undefined control sequence results in an error.
   */
  expandOnce(expandableOnly) {
    const topToken = this.popToken();
    const name = topToken.text;
    const expansion = !topToken.noexpand ? this._getExpansion(name) : null;
    if (expansion == null || expandableOnly &amp;&amp; expansion.unexpandable) {
      if (expandableOnly &amp;&amp; expansion == null &amp;&amp; name[0] === &quot;\\&quot; &amp;&amp; !this.isDefined(name)) {
        throw new ParseError(&quot;Undefined control sequence: &quot; + name);
      }
      this.pushToken(topToken);
      return false;
    }
    this.expansionCount++;
    if (this.expansionCount &gt; this.settings.maxExpand) {
      throw new ParseError(
        &quot;Too many expansions: infinite loop or need to increase maxExpand setting&quot;
      );
    }
    let tokens = expansion.tokens;
    const args = this.consumeArgs(expansion.numArgs, expansion.delimiters);
    if (expansion.numArgs) {
      tokens = tokens.slice();
      for (let i = tokens.length - 1; i &gt;= 0; --i) {
        let tok = tokens[i];
        if (tok.text === &quot;#&quot;) {
          if (i === 0) {
            throw new ParseError(&quot;Incomplete placeholder at end of macro body&quot;, tok);
          }
          tok = tokens[--i];
          if (tok.text === &quot;#&quot;) {
            tokens.splice(i + 1, 1);
          } else if (/^[1-9]$/.test(tok.text)) {
            tokens.splice(i, 2, ...args[+tok.text - 1]);
          } else {
            throw new ParseError(&quot;Not a valid argument number&quot;, tok);
          }
        }
      }
    }
    this.pushTokens(tokens);
    return tokens.length;
  }
  /**
   * Expand the next token only once (if possible), and return the resulting
   * top token on the stack (without removing anything from the stack).
   * Similar in behavior to TeX&#039;s `\expandafter\futurelet`.
   * Equivalent to expandOnce() followed by future().
   */
  expandAfterFuture() {
    this.expandOnce();
    return this.future();
  }
  /**
   * Recursively expand first token, then return first non-expandable token.
   */
  expandNextToken() {
    for (; ; ) {
      if (this.expandOnce() === false) {
        const token = this.stack.pop();
        if (token.treatAsRelax) {
          token.text = &quot;\\relax&quot;;
        }
        return token;
      }
    }
    throw new Error();
  }
  /**
   * Fully expand the given macro name and return the resulting list of
   * tokens, or return `undefined` if no such macro is defined.
   */
  expandMacro(name) {
    return this.macros.has(name) ? this.expandTokens([new Token(name)]) : void 0;
  }
  /**
   * Fully expand the given token stream and return the resulting list of
   * tokens.  Note that the input tokens are in reverse order, but the
   * output tokens are in forward order.
   */
  expandTokens(tokens) {
    const output = [];
    const oldStackLength = this.stack.length;
    this.pushTokens(tokens);
    while (this.stack.length &gt; oldStackLength) {
      if (this.expandOnce(true) === false) {
        const token = this.stack.pop();
        if (token.treatAsRelax) {
          token.noexpand = false;
          token.treatAsRelax = false;
        }
        output.push(token);
      }
    }
    return output;
  }
  /**
   * Fully expand the given macro name and return the result as a string,
   * or return `undefined` if no such macro is defined.
   */
  expandMacroAsText(name) {
    const tokens = this.expandMacro(name);
    if (tokens) {
      return tokens.map((token) =&gt; token.text).join(&quot;&quot;);
    } else {
      return tokens;
    }
  }
  /**
   * Returns the expanded macro as a reversed array of tokens and a macro
   * argument count.  Or returns `null` if no such macro.
   */
  _getExpansion(name) {
    const definition = this.macros.get(name);
    if (definition == null) {
      return definition;
    }
    if (name.length === 1) {
      const catcode = this.lexer.catcodes[name];
      if (catcode != null &amp;&amp; catcode !== 13) {
        return;
      }
    }
    const expansion = typeof definition === &quot;function&quot; ? definition(this) : definition;
    if (typeof expansion === &quot;string&quot;) {
      let numArgs = 0;
      if (expansion.indexOf(&quot;#&quot;) !== -1) {
        const stripped = expansion.replace(/##/g, &quot;&quot;);
        while (stripped.indexOf(&quot;#&quot; + (numArgs + 1)) !== -1) {
          ++numArgs;
        }
      }
      const bodyLexer = new Lexer(expansion, this.settings);
      const tokens = [];
      let tok = bodyLexer.lex();
      while (tok.text !== &quot;EOF&quot;) {
        tokens.push(tok);
        tok = bodyLexer.lex();
      }
      tokens.reverse();
      const expanded = { tokens, numArgs };
      return expanded;
    }
    return expansion;
  }
  /**
   * Determine whether a command is currently &quot;defined&quot; (has some
   * functionality), meaning that it&#039;s a macro (in the current group),
   * a function, a symbol, or one of the special commands listed in
   * `implicitCommands`.
   */
  isDefined(name) {
    return this.macros.has(name) || Object.prototype.hasOwnProperty.call(functions, name) || Object.prototype.hasOwnProperty.call(symbols.math, name) || Object.prototype.hasOwnProperty.call(symbols.text, name) || Object.prototype.hasOwnProperty.call(implicitCommands, name);
  }
  /**
   * Determine whether a command is expandable.
   */
  isExpandable(name) {
    const macro = this.macros.get(name);
    return macro != null ? typeof macro === &quot;string&quot; || typeof macro === &quot;function&quot; || !macro.unexpandable : Object.prototype.hasOwnProperty.call(functions, name) &amp;&amp; !functions[name].primitive;
  }
};
var unicodeSubRegEx = /^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/;
var uSubsAndSups = Object.freeze({
  &quot;\u208A&quot;: &quot;+&quot;,
  &quot;\u208B&quot;: &quot;-&quot;,
  &quot;\u208C&quot;: &quot;=&quot;,
  &quot;\u208D&quot;: &quot;(&quot;,
  &quot;\u208E&quot;: &quot;)&quot;,
  &quot;\u2080&quot;: &quot;0&quot;,
  &quot;\u2081&quot;: &quot;1&quot;,
  &quot;\u2082&quot;: &quot;2&quot;,
  &quot;\u2083&quot;: &quot;3&quot;,
  &quot;\u2084&quot;: &quot;4&quot;,
  &quot;\u2085&quot;: &quot;5&quot;,
  &quot;\u2086&quot;: &quot;6&quot;,
  &quot;\u2087&quot;: &quot;7&quot;,
  &quot;\u2088&quot;: &quot;8&quot;,
  &quot;\u2089&quot;: &quot;9&quot;,
  &quot;\u2090&quot;: &quot;a&quot;,
  &quot;\u2091&quot;: &quot;e&quot;,
  &quot;\u2095&quot;: &quot;h&quot;,
  &quot;\u1D62&quot;: &quot;i&quot;,
  &quot;\u2C7C&quot;: &quot;j&quot;,
  &quot;\u2096&quot;: &quot;k&quot;,
  &quot;\u2097&quot;: &quot;l&quot;,
  &quot;\u2098&quot;: &quot;m&quot;,
  &quot;\u2099&quot;: &quot;n&quot;,
  &quot;\u2092&quot;: &quot;o&quot;,
  &quot;\u209A&quot;: &quot;p&quot;,
  &quot;\u1D63&quot;: &quot;r&quot;,
  &quot;\u209B&quot;: &quot;s&quot;,
  &quot;\u209C&quot;: &quot;t&quot;,
  &quot;\u1D64&quot;: &quot;u&quot;,
  &quot;\u1D65&quot;: &quot;v&quot;,
  &quot;\u2093&quot;: &quot;x&quot;,
  &quot;\u1D66&quot;: &quot;\u03B2&quot;,
  &quot;\u1D67&quot;: &quot;\u03B3&quot;,
  &quot;\u1D68&quot;: &quot;\u03C1&quot;,
  &quot;\u1D69&quot;: &quot;\u03D5&quot;,
  &quot;\u1D6A&quot;: &quot;\u03C7&quot;,
  &quot;\u207A&quot;: &quot;+&quot;,
  &quot;\u207B&quot;: &quot;-&quot;,
  &quot;\u207C&quot;: &quot;=&quot;,
  &quot;\u207D&quot;: &quot;(&quot;,
  &quot;\u207E&quot;: &quot;)&quot;,
  &quot;\u2070&quot;: &quot;0&quot;,
  &quot;\xB9&quot;: &quot;1&quot;,
  &quot;\xB2&quot;: &quot;2&quot;,
  &quot;\xB3&quot;: &quot;3&quot;,
  &quot;\u2074&quot;: &quot;4&quot;,
  &quot;\u2075&quot;: &quot;5&quot;,
  &quot;\u2076&quot;: &quot;6&quot;,
  &quot;\u2077&quot;: &quot;7&quot;,
  &quot;\u2078&quot;: &quot;8&quot;,
  &quot;\u2079&quot;: &quot;9&quot;,
  &quot;\u1D2C&quot;: &quot;A&quot;,
  &quot;\u1D2E&quot;: &quot;B&quot;,
  &quot;\u1D30&quot;: &quot;D&quot;,
  &quot;\u1D31&quot;: &quot;E&quot;,
  &quot;\u1D33&quot;: &quot;G&quot;,
  &quot;\u1D34&quot;: &quot;H&quot;,
  &quot;\u1D35&quot;: &quot;I&quot;,
  &quot;\u1D36&quot;: &quot;J&quot;,
  &quot;\u1D37&quot;: &quot;K&quot;,
  &quot;\u1D38&quot;: &quot;L&quot;,
  &quot;\u1D39&quot;: &quot;M&quot;,
  &quot;\u1D3A&quot;: &quot;N&quot;,
  &quot;\u1D3C&quot;: &quot;O&quot;,
  &quot;\u1D3E&quot;: &quot;P&quot;,
  &quot;\u1D3F&quot;: &quot;R&quot;,
  &quot;\u1D40&quot;: &quot;T&quot;,
  &quot;\u1D41&quot;: &quot;U&quot;,
  &quot;\u2C7D&quot;: &quot;V&quot;,
  &quot;\u1D42&quot;: &quot;W&quot;,
  &quot;\u1D43&quot;: &quot;a&quot;,
  &quot;\u1D47&quot;: &quot;b&quot;,
  &quot;\u1D9C&quot;: &quot;c&quot;,
  &quot;\u1D48&quot;: &quot;d&quot;,
  &quot;\u1D49&quot;: &quot;e&quot;,
  &quot;\u1DA0&quot;: &quot;f&quot;,
  &quot;\u1D4D&quot;: &quot;g&quot;,
  &quot;\u02B0&quot;: &quot;h&quot;,
  &quot;\u2071&quot;: &quot;i&quot;,
  &quot;\u02B2&quot;: &quot;j&quot;,
  &quot;\u1D4F&quot;: &quot;k&quot;,
  &quot;\u02E1&quot;: &quot;l&quot;,
  &quot;\u1D50&quot;: &quot;m&quot;,
  &quot;\u207F&quot;: &quot;n&quot;,
  &quot;\u1D52&quot;: &quot;o&quot;,
  &quot;\u1D56&quot;: &quot;p&quot;,
  &quot;\u02B3&quot;: &quot;r&quot;,
  &quot;\u02E2&quot;: &quot;s&quot;,
  &quot;\u1D57&quot;: &quot;t&quot;,
  &quot;\u1D58&quot;: &quot;u&quot;,
  &quot;\u1D5B&quot;: &quot;v&quot;,
  &quot;\u02B7&quot;: &quot;w&quot;,
  &quot;\u02E3&quot;: &quot;x&quot;,
  &quot;\u02B8&quot;: &quot;y&quot;,
  &quot;\u1DBB&quot;: &quot;z&quot;,
  &quot;\u1D5D&quot;: &quot;\u03B2&quot;,
  &quot;\u1D5E&quot;: &quot;\u03B3&quot;,
  &quot;\u1D5F&quot;: &quot;\u03B4&quot;,
  &quot;\u1D60&quot;: &quot;\u03D5&quot;,
  &quot;\u1D61&quot;: &quot;\u03C7&quot;,
  &quot;\u1DBF&quot;: &quot;\u03B8&quot;
});
var asciiFromScript = Object.freeze({
  &quot;\u{1D49C}&quot;: &quot;A&quot;,
  &quot;\u212C&quot;: &quot;B&quot;,
  &quot;\u{1D49E}&quot;: &quot;C&quot;,
  &quot;\u{1D49F}&quot;: &quot;D&quot;,
  &quot;\u2130&quot;: &quot;E&quot;,
  &quot;\u2131&quot;: &quot;F&quot;,
  &quot;\u{1D4A2}&quot;: &quot;G&quot;,
  &quot;\u210B&quot;: &quot;H&quot;,
  &quot;\u2110&quot;: &quot;I&quot;,
  &quot;\u{1D4A5}&quot;: &quot;J&quot;,
  &quot;\u{1D4A6}&quot;: &quot;K&quot;,
  &quot;\u2112&quot;: &quot;L&quot;,
  &quot;\u2133&quot;: &quot;M&quot;,
  &quot;\u{1D4A9}&quot;: &quot;N&quot;,
  &quot;\u{1D4AA}&quot;: &quot;O&quot;,
  &quot;\u{1D4AB}&quot;: &quot;P&quot;,
  &quot;\u{1D4AC}&quot;: &quot;Q&quot;,
  &quot;\u211B&quot;: &quot;R&quot;,
  &quot;\u{1D4AE}&quot;: &quot;S&quot;,
  &quot;\u{1D4AF}&quot;: &quot;T&quot;,
  &quot;\u{1D4B0}&quot;: &quot;U&quot;,
  &quot;\u{1D4B1}&quot;: &quot;V&quot;,
  &quot;\u{1D4B2}&quot;: &quot;W&quot;,
  &quot;\u{1D4B3}&quot;: &quot;X&quot;,
  &quot;\u{1D4B4}&quot;: &quot;Y&quot;,
  &quot;\u{1D4B5}&quot;: &quot;Z&quot;
});
var unicodeAccents = {
  &quot;\u0301&quot;: { text: &quot;\\&#039;&quot;, math: &quot;\\acute&quot; },
  &quot;\u0300&quot;: { text: &quot;\\`&quot;, math: &quot;\\grave&quot; },
  &quot;\u0308&quot;: { text: &#039;\\&quot;&#039;, math: &quot;\\ddot&quot; },
  &quot;\u0303&quot;: { text: &quot;\\~&quot;, math: &quot;\\tilde&quot; },
  &quot;\u0304&quot;: { text: &quot;\\=&quot;, math: &quot;\\bar&quot; },
  &quot;\u0306&quot;: { text: &quot;\\u&quot;, math: &quot;\\breve&quot; },
  &quot;\u030C&quot;: { text: &quot;\\v&quot;, math: &quot;\\check&quot; },
  &quot;\u0302&quot;: { text: &quot;\\^&quot;, math: &quot;\\hat&quot; },
  &quot;\u0307&quot;: { text: &quot;\\.&quot;, math: &quot;\\dot&quot; },
  &quot;\u030A&quot;: { text: &quot;\\r&quot;, math: &quot;\\mathring&quot; },
  &quot;\u030B&quot;: { text: &quot;\\H&quot; },
  &quot;\u0327&quot;: { text: &quot;\\c&quot; }
};
var unicodeSymbols = {
  &quot;\xE1&quot;: &quot;a\u0301&quot;,
  &quot;\xE0&quot;: &quot;a\u0300&quot;,
  &quot;\xE4&quot;: &quot;a\u0308&quot;,
  &quot;\u01DF&quot;: &quot;a\u0308\u0304&quot;,
  &quot;\xE3&quot;: &quot;a\u0303&quot;,
  &quot;\u0101&quot;: &quot;a\u0304&quot;,
  &quot;\u0103&quot;: &quot;a\u0306&quot;,
  &quot;\u1EAF&quot;: &quot;a\u0306\u0301&quot;,
  &quot;\u1EB1&quot;: &quot;a\u0306\u0300&quot;,
  &quot;\u1EB5&quot;: &quot;a\u0306\u0303&quot;,
  &quot;\u01CE&quot;: &quot;a\u030C&quot;,
  &quot;\xE2&quot;: &quot;a\u0302&quot;,
  &quot;\u1EA5&quot;: &quot;a\u0302\u0301&quot;,
  &quot;\u1EA7&quot;: &quot;a\u0302\u0300&quot;,
  &quot;\u1EAB&quot;: &quot;a\u0302\u0303&quot;,
  &quot;\u0227&quot;: &quot;a\u0307&quot;,
  &quot;\u01E1&quot;: &quot;a\u0307\u0304&quot;,
  &quot;\xE5&quot;: &quot;a\u030A&quot;,
  &quot;\u01FB&quot;: &quot;a\u030A\u0301&quot;,
  &quot;\u1E03&quot;: &quot;b\u0307&quot;,
  &quot;\u0107&quot;: &quot;c\u0301&quot;,
  &quot;\u010D&quot;: &quot;c\u030C&quot;,
  &quot;\u0109&quot;: &quot;c\u0302&quot;,
  &quot;\u010B&quot;: &quot;c\u0307&quot;,
  &quot;\u010F&quot;: &quot;d\u030C&quot;,
  &quot;\u1E0B&quot;: &quot;d\u0307&quot;,
  &quot;\xE9&quot;: &quot;e\u0301&quot;,
  &quot;\xE8&quot;: &quot;e\u0300&quot;,
  &quot;\xEB&quot;: &quot;e\u0308&quot;,
  &quot;\u1EBD&quot;: &quot;e\u0303&quot;,
  &quot;\u0113&quot;: &quot;e\u0304&quot;,
  &quot;\u1E17&quot;: &quot;e\u0304\u0301&quot;,
  &quot;\u1E15&quot;: &quot;e\u0304\u0300&quot;,
  &quot;\u0115&quot;: &quot;e\u0306&quot;,
  &quot;\u011B&quot;: &quot;e\u030C&quot;,
  &quot;\xEA&quot;: &quot;e\u0302&quot;,
  &quot;\u1EBF&quot;: &quot;e\u0302\u0301&quot;,
  &quot;\u1EC1&quot;: &quot;e\u0302\u0300&quot;,
  &quot;\u1EC5&quot;: &quot;e\u0302\u0303&quot;,
  &quot;\u0117&quot;: &quot;e\u0307&quot;,
  &quot;\u1E1F&quot;: &quot;f\u0307&quot;,
  &quot;\u01F5&quot;: &quot;g\u0301&quot;,
  &quot;\u1E21&quot;: &quot;g\u0304&quot;,
  &quot;\u011F&quot;: &quot;g\u0306&quot;,
  &quot;\u01E7&quot;: &quot;g\u030C&quot;,
  &quot;\u011D&quot;: &quot;g\u0302&quot;,
  &quot;\u0121&quot;: &quot;g\u0307&quot;,
  &quot;\u1E27&quot;: &quot;h\u0308&quot;,
  &quot;\u021F&quot;: &quot;h\u030C&quot;,
  &quot;\u0125&quot;: &quot;h\u0302&quot;,
  &quot;\u1E23&quot;: &quot;h\u0307&quot;,
  &quot;\xED&quot;: &quot;i\u0301&quot;,
  &quot;\xEC&quot;: &quot;i\u0300&quot;,
  &quot;\xEF&quot;: &quot;i\u0308&quot;,
  &quot;\u1E2F&quot;: &quot;i\u0308\u0301&quot;,
  &quot;\u0129&quot;: &quot;i\u0303&quot;,
  &quot;\u012B&quot;: &quot;i\u0304&quot;,
  &quot;\u012D&quot;: &quot;i\u0306&quot;,
  &quot;\u01D0&quot;: &quot;i\u030C&quot;,
  &quot;\xEE&quot;: &quot;i\u0302&quot;,
  &quot;\u01F0&quot;: &quot;j\u030C&quot;,
  &quot;\u0135&quot;: &quot;j\u0302&quot;,
  &quot;\u1E31&quot;: &quot;k\u0301&quot;,
  &quot;\u01E9&quot;: &quot;k\u030C&quot;,
  &quot;\u013A&quot;: &quot;l\u0301&quot;,
  &quot;\u013E&quot;: &quot;l\u030C&quot;,
  &quot;\u1E3F&quot;: &quot;m\u0301&quot;,
  &quot;\u1E41&quot;: &quot;m\u0307&quot;,
  &quot;\u0144&quot;: &quot;n\u0301&quot;,
  &quot;\u01F9&quot;: &quot;n\u0300&quot;,
  &quot;\xF1&quot;: &quot;n\u0303&quot;,
  &quot;\u0148&quot;: &quot;n\u030C&quot;,
  &quot;\u1E45&quot;: &quot;n\u0307&quot;,
  &quot;\xF3&quot;: &quot;o\u0301&quot;,
  &quot;\xF2&quot;: &quot;o\u0300&quot;,
  &quot;\xF6&quot;: &quot;o\u0308&quot;,
  &quot;\u022B&quot;: &quot;o\u0308\u0304&quot;,
  &quot;\xF5&quot;: &quot;o\u0303&quot;,
  &quot;\u1E4D&quot;: &quot;o\u0303\u0301&quot;,
  &quot;\u1E4F&quot;: &quot;o\u0303\u0308&quot;,
  &quot;\u022D&quot;: &quot;o\u0303\u0304&quot;,
  &quot;\u014D&quot;: &quot;o\u0304&quot;,
  &quot;\u1E53&quot;: &quot;o\u0304\u0301&quot;,
  &quot;\u1E51&quot;: &quot;o\u0304\u0300&quot;,
  &quot;\u014F&quot;: &quot;o\u0306&quot;,
  &quot;\u01D2&quot;: &quot;o\u030C&quot;,
  &quot;\xF4&quot;: &quot;o\u0302&quot;,
  &quot;\u1ED1&quot;: &quot;o\u0302\u0301&quot;,
  &quot;\u1ED3&quot;: &quot;o\u0302\u0300&quot;,
  &quot;\u1ED7&quot;: &quot;o\u0302\u0303&quot;,
  &quot;\u022F&quot;: &quot;o\u0307&quot;,
  &quot;\u0231&quot;: &quot;o\u0307\u0304&quot;,
  &quot;\u0151&quot;: &quot;o\u030B&quot;,
  &quot;\u1E55&quot;: &quot;p\u0301&quot;,
  &quot;\u1E57&quot;: &quot;p\u0307&quot;,
  &quot;\u0155&quot;: &quot;r\u0301&quot;,
  &quot;\u0159&quot;: &quot;r\u030C&quot;,
  &quot;\u1E59&quot;: &quot;r\u0307&quot;,
  &quot;\u015B&quot;: &quot;s\u0301&quot;,
  &quot;\u1E65&quot;: &quot;s\u0301\u0307&quot;,
  &quot;\u0161&quot;: &quot;s\u030C&quot;,
  &quot;\u1E67&quot;: &quot;s\u030C\u0307&quot;,
  &quot;\u015D&quot;: &quot;s\u0302&quot;,
  &quot;\u1E61&quot;: &quot;s\u0307&quot;,
  &quot;\u1E97&quot;: &quot;t\u0308&quot;,
  &quot;\u0165&quot;: &quot;t\u030C&quot;,
  &quot;\u1E6B&quot;: &quot;t\u0307&quot;,
  &quot;\xFA&quot;: &quot;u\u0301&quot;,
  &quot;\xF9&quot;: &quot;u\u0300&quot;,
  &quot;\xFC&quot;: &quot;u\u0308&quot;,
  &quot;\u01D8&quot;: &quot;u\u0308\u0301&quot;,
  &quot;\u01DC&quot;: &quot;u\u0308\u0300&quot;,
  &quot;\u01D6&quot;: &quot;u\u0308\u0304&quot;,
  &quot;\u01DA&quot;: &quot;u\u0308\u030C&quot;,
  &quot;\u0169&quot;: &quot;u\u0303&quot;,
  &quot;\u1E79&quot;: &quot;u\u0303\u0301&quot;,
  &quot;\u016B&quot;: &quot;u\u0304&quot;,
  &quot;\u1E7B&quot;: &quot;u\u0304\u0308&quot;,
  &quot;\u016D&quot;: &quot;u\u0306&quot;,
  &quot;\u01D4&quot;: &quot;u\u030C&quot;,
  &quot;\xFB&quot;: &quot;u\u0302&quot;,
  &quot;\u016F&quot;: &quot;u\u030A&quot;,
  &quot;\u0171&quot;: &quot;u\u030B&quot;,
  &quot;\u1E7D&quot;: &quot;v\u0303&quot;,
  &quot;\u1E83&quot;: &quot;w\u0301&quot;,
  &quot;\u1E81&quot;: &quot;w\u0300&quot;,
  &quot;\u1E85&quot;: &quot;w\u0308&quot;,
  &quot;\u0175&quot;: &quot;w\u0302&quot;,
  &quot;\u1E87&quot;: &quot;w\u0307&quot;,
  &quot;\u1E98&quot;: &quot;w\u030A&quot;,
  &quot;\u1E8D&quot;: &quot;x\u0308&quot;,
  &quot;\u1E8B&quot;: &quot;x\u0307&quot;,
  &quot;\xFD&quot;: &quot;y\u0301&quot;,
  &quot;\u1EF3&quot;: &quot;y\u0300&quot;,
  &quot;\xFF&quot;: &quot;y\u0308&quot;,
  &quot;\u1EF9&quot;: &quot;y\u0303&quot;,
  &quot;\u0233&quot;: &quot;y\u0304&quot;,
  &quot;\u0177&quot;: &quot;y\u0302&quot;,
  &quot;\u1E8F&quot;: &quot;y\u0307&quot;,
  &quot;\u1E99&quot;: &quot;y\u030A&quot;,
  &quot;\u017A&quot;: &quot;z\u0301&quot;,
  &quot;\u017E&quot;: &quot;z\u030C&quot;,
  &quot;\u1E91&quot;: &quot;z\u0302&quot;,
  &quot;\u017C&quot;: &quot;z\u0307&quot;,
  &quot;\xC1&quot;: &quot;A\u0301&quot;,
  &quot;\xC0&quot;: &quot;A\u0300&quot;,
  &quot;\xC4&quot;: &quot;A\u0308&quot;,
  &quot;\u01DE&quot;: &quot;A\u0308\u0304&quot;,
  &quot;\xC3&quot;: &quot;A\u0303&quot;,
  &quot;\u0100&quot;: &quot;A\u0304&quot;,
  &quot;\u0102&quot;: &quot;A\u0306&quot;,
  &quot;\u1EAE&quot;: &quot;A\u0306\u0301&quot;,
  &quot;\u1EB0&quot;: &quot;A\u0306\u0300&quot;,
  &quot;\u1EB4&quot;: &quot;A\u0306\u0303&quot;,
  &quot;\u01CD&quot;: &quot;A\u030C&quot;,
  &quot;\xC2&quot;: &quot;A\u0302&quot;,
  &quot;\u1EA4&quot;: &quot;A\u0302\u0301&quot;,
  &quot;\u1EA6&quot;: &quot;A\u0302\u0300&quot;,
  &quot;\u1EAA&quot;: &quot;A\u0302\u0303&quot;,
  &quot;\u0226&quot;: &quot;A\u0307&quot;,
  &quot;\u01E0&quot;: &quot;A\u0307\u0304&quot;,
  &quot;\xC5&quot;: &quot;A\u030A&quot;,
  &quot;\u01FA&quot;: &quot;A\u030A\u0301&quot;,
  &quot;\u1E02&quot;: &quot;B\u0307&quot;,
  &quot;\u0106&quot;: &quot;C\u0301&quot;,
  &quot;\u010C&quot;: &quot;C\u030C&quot;,
  &quot;\u0108&quot;: &quot;C\u0302&quot;,
  &quot;\u010A&quot;: &quot;C\u0307&quot;,
  &quot;\u010E&quot;: &quot;D\u030C&quot;,
  &quot;\u1E0A&quot;: &quot;D\u0307&quot;,
  &quot;\xC9&quot;: &quot;E\u0301&quot;,
  &quot;\xC8&quot;: &quot;E\u0300&quot;,
  &quot;\xCB&quot;: &quot;E\u0308&quot;,
  &quot;\u1EBC&quot;: &quot;E\u0303&quot;,
  &quot;\u0112&quot;: &quot;E\u0304&quot;,
  &quot;\u1E16&quot;: &quot;E\u0304\u0301&quot;,
  &quot;\u1E14&quot;: &quot;E\u0304\u0300&quot;,
  &quot;\u0114&quot;: &quot;E\u0306&quot;,
  &quot;\u011A&quot;: &quot;E\u030C&quot;,
  &quot;\xCA&quot;: &quot;E\u0302&quot;,
  &quot;\u1EBE&quot;: &quot;E\u0302\u0301&quot;,
  &quot;\u1EC0&quot;: &quot;E\u0302\u0300&quot;,
  &quot;\u1EC4&quot;: &quot;E\u0302\u0303&quot;,
  &quot;\u0116&quot;: &quot;E\u0307&quot;,
  &quot;\u1E1E&quot;: &quot;F\u0307&quot;,
  &quot;\u01F4&quot;: &quot;G\u0301&quot;,
  &quot;\u1E20&quot;: &quot;G\u0304&quot;,
  &quot;\u011E&quot;: &quot;G\u0306&quot;,
  &quot;\u01E6&quot;: &quot;G\u030C&quot;,
  &quot;\u011C&quot;: &quot;G\u0302&quot;,
  &quot;\u0120&quot;: &quot;G\u0307&quot;,
  &quot;\u1E26&quot;: &quot;H\u0308&quot;,
  &quot;\u021E&quot;: &quot;H\u030C&quot;,
  &quot;\u0124&quot;: &quot;H\u0302&quot;,
  &quot;\u1E22&quot;: &quot;H\u0307&quot;,
  &quot;\xCD&quot;: &quot;I\u0301&quot;,
  &quot;\xCC&quot;: &quot;I\u0300&quot;,
  &quot;\xCF&quot;: &quot;I\u0308&quot;,
  &quot;\u1E2E&quot;: &quot;I\u0308\u0301&quot;,
  &quot;\u0128&quot;: &quot;I\u0303&quot;,
  &quot;\u012A&quot;: &quot;I\u0304&quot;,
  &quot;\u012C&quot;: &quot;I\u0306&quot;,
  &quot;\u01CF&quot;: &quot;I\u030C&quot;,
  &quot;\xCE&quot;: &quot;I\u0302&quot;,
  &quot;\u0130&quot;: &quot;I\u0307&quot;,
  &quot;\u0134&quot;: &quot;J\u0302&quot;,
  &quot;\u1E30&quot;: &quot;K\u0301&quot;,
  &quot;\u01E8&quot;: &quot;K\u030C&quot;,
  &quot;\u0139&quot;: &quot;L\u0301&quot;,
  &quot;\u013D&quot;: &quot;L\u030C&quot;,
  &quot;\u1E3E&quot;: &quot;M\u0301&quot;,
  &quot;\u1E40&quot;: &quot;M\u0307&quot;,
  &quot;\u0143&quot;: &quot;N\u0301&quot;,
  &quot;\u01F8&quot;: &quot;N\u0300&quot;,
  &quot;\xD1&quot;: &quot;N\u0303&quot;,
  &quot;\u0147&quot;: &quot;N\u030C&quot;,
  &quot;\u1E44&quot;: &quot;N\u0307&quot;,
  &quot;\xD3&quot;: &quot;O\u0301&quot;,
  &quot;\xD2&quot;: &quot;O\u0300&quot;,
  &quot;\xD6&quot;: &quot;O\u0308&quot;,
  &quot;\u022A&quot;: &quot;O\u0308\u0304&quot;,
  &quot;\xD5&quot;: &quot;O\u0303&quot;,
  &quot;\u1E4C&quot;: &quot;O\u0303\u0301&quot;,
  &quot;\u1E4E&quot;: &quot;O\u0303\u0308&quot;,
  &quot;\u022C&quot;: &quot;O\u0303\u0304&quot;,
  &quot;\u014C&quot;: &quot;O\u0304&quot;,
  &quot;\u1E52&quot;: &quot;O\u0304\u0301&quot;,
  &quot;\u1E50&quot;: &quot;O\u0304\u0300&quot;,
  &quot;\u014E&quot;: &quot;O\u0306&quot;,
  &quot;\u01D1&quot;: &quot;O\u030C&quot;,
  &quot;\xD4&quot;: &quot;O\u0302&quot;,
  &quot;\u1ED0&quot;: &quot;O\u0302\u0301&quot;,
  &quot;\u1ED2&quot;: &quot;O\u0302\u0300&quot;,
  &quot;\u1ED6&quot;: &quot;O\u0302\u0303&quot;,
  &quot;\u022E&quot;: &quot;O\u0307&quot;,
  &quot;\u0230&quot;: &quot;O\u0307\u0304&quot;,
  &quot;\u0150&quot;: &quot;O\u030B&quot;,
  &quot;\u1E54&quot;: &quot;P\u0301&quot;,
  &quot;\u1E56&quot;: &quot;P\u0307&quot;,
  &quot;\u0154&quot;: &quot;R\u0301&quot;,
  &quot;\u0158&quot;: &quot;R\u030C&quot;,
  &quot;\u1E58&quot;: &quot;R\u0307&quot;,
  &quot;\u015A&quot;: &quot;S\u0301&quot;,
  &quot;\u1E64&quot;: &quot;S\u0301\u0307&quot;,
  &quot;\u0160&quot;: &quot;S\u030C&quot;,
  &quot;\u1E66&quot;: &quot;S\u030C\u0307&quot;,
  &quot;\u015C&quot;: &quot;S\u0302&quot;,
  &quot;\u1E60&quot;: &quot;S\u0307&quot;,
  &quot;\u0164&quot;: &quot;T\u030C&quot;,
  &quot;\u1E6A&quot;: &quot;T\u0307&quot;,
  &quot;\xDA&quot;: &quot;U\u0301&quot;,
  &quot;\xD9&quot;: &quot;U\u0300&quot;,
  &quot;\xDC&quot;: &quot;U\u0308&quot;,
  &quot;\u01D7&quot;: &quot;U\u0308\u0301&quot;,
  &quot;\u01DB&quot;: &quot;U\u0308\u0300&quot;,
  &quot;\u01D5&quot;: &quot;U\u0308\u0304&quot;,
  &quot;\u01D9&quot;: &quot;U\u0308\u030C&quot;,
  &quot;\u0168&quot;: &quot;U\u0303&quot;,
  &quot;\u1E78&quot;: &quot;U\u0303\u0301&quot;,
  &quot;\u016A&quot;: &quot;U\u0304&quot;,
  &quot;\u1E7A&quot;: &quot;U\u0304\u0308&quot;,
  &quot;\u016C&quot;: &quot;U\u0306&quot;,
  &quot;\u01D3&quot;: &quot;U\u030C&quot;,
  &quot;\xDB&quot;: &quot;U\u0302&quot;,
  &quot;\u016E&quot;: &quot;U\u030A&quot;,
  &quot;\u0170&quot;: &quot;U\u030B&quot;,
  &quot;\u1E7C&quot;: &quot;V\u0303&quot;,
  &quot;\u1E82&quot;: &quot;W\u0301&quot;,
  &quot;\u1E80&quot;: &quot;W\u0300&quot;,
  &quot;\u1E84&quot;: &quot;W\u0308&quot;,
  &quot;\u0174&quot;: &quot;W\u0302&quot;,
  &quot;\u1E86&quot;: &quot;W\u0307&quot;,
  &quot;\u1E8C&quot;: &quot;X\u0308&quot;,
  &quot;\u1E8A&quot;: &quot;X\u0307&quot;,
  &quot;\xDD&quot;: &quot;Y\u0301&quot;,
  &quot;\u1EF2&quot;: &quot;Y\u0300&quot;,
  &quot;\u0178&quot;: &quot;Y\u0308&quot;,
  &quot;\u1EF8&quot;: &quot;Y\u0303&quot;,
  &quot;\u0232&quot;: &quot;Y\u0304&quot;,
  &quot;\u0176&quot;: &quot;Y\u0302&quot;,
  &quot;\u1E8E&quot;: &quot;Y\u0307&quot;,
  &quot;\u0179&quot;: &quot;Z\u0301&quot;,
  &quot;\u017D&quot;: &quot;Z\u030C&quot;,
  &quot;\u1E90&quot;: &quot;Z\u0302&quot;,
  &quot;\u017B&quot;: &quot;Z\u0307&quot;,
  &quot;\u03AC&quot;: &quot;\u03B1\u0301&quot;,
  &quot;\u1F70&quot;: &quot;\u03B1\u0300&quot;,
  &quot;\u1FB1&quot;: &quot;\u03B1\u0304&quot;,
  &quot;\u1FB0&quot;: &quot;\u03B1\u0306&quot;,
  &quot;\u03AD&quot;: &quot;\u03B5\u0301&quot;,
  &quot;\u1F72&quot;: &quot;\u03B5\u0300&quot;,
  &quot;\u03AE&quot;: &quot;\u03B7\u0301&quot;,
  &quot;\u1F74&quot;: &quot;\u03B7\u0300&quot;,
  &quot;\u03AF&quot;: &quot;\u03B9\u0301&quot;,
  &quot;\u1F76&quot;: &quot;\u03B9\u0300&quot;,
  &quot;\u03CA&quot;: &quot;\u03B9\u0308&quot;,
  &quot;\u0390&quot;: &quot;\u03B9\u0308\u0301&quot;,
  &quot;\u1FD2&quot;: &quot;\u03B9\u0308\u0300&quot;,
  &quot;\u1FD1&quot;: &quot;\u03B9\u0304&quot;,
  &quot;\u1FD0&quot;: &quot;\u03B9\u0306&quot;,
  &quot;\u03CC&quot;: &quot;\u03BF\u0301&quot;,
  &quot;\u1F78&quot;: &quot;\u03BF\u0300&quot;,
  &quot;\u03CD&quot;: &quot;\u03C5\u0301&quot;,
  &quot;\u1F7A&quot;: &quot;\u03C5\u0300&quot;,
  &quot;\u03CB&quot;: &quot;\u03C5\u0308&quot;,
  &quot;\u03B0&quot;: &quot;\u03C5\u0308\u0301&quot;,
  &quot;\u1FE2&quot;: &quot;\u03C5\u0308\u0300&quot;,
  &quot;\u1FE1&quot;: &quot;\u03C5\u0304&quot;,
  &quot;\u1FE0&quot;: &quot;\u03C5\u0306&quot;,
  &quot;\u03CE&quot;: &quot;\u03C9\u0301&quot;,
  &quot;\u1F7C&quot;: &quot;\u03C9\u0300&quot;,
  &quot;\u038E&quot;: &quot;\u03A5\u0301&quot;,
  &quot;\u1FEA&quot;: &quot;\u03A5\u0300&quot;,
  &quot;\u03AB&quot;: &quot;\u03A5\u0308&quot;,
  &quot;\u1FE9&quot;: &quot;\u03A5\u0304&quot;,
  &quot;\u1FE8&quot;: &quot;\u03A5\u0306&quot;,
  &quot;\u038F&quot;: &quot;\u03A9\u0301&quot;,
  &quot;\u1FFA&quot;: &quot;\u03A9\u0300&quot;
};
var binLeftCancellers = [&quot;bin&quot;, &quot;op&quot;, &quot;open&quot;, &quot;punct&quot;, &quot;rel&quot;];
var sizeRegEx = /([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/;
var Parser = class _Parser {
  constructor(input, settings, isPreamble = false) {
    this.mode = &quot;math&quot;;
    this.gullet = new MacroExpander(input, settings, this.mode);
    this.settings = settings;
    this.isPreamble = isPreamble;
    this.leftrightDepth = 0;
    this.prevAtomType = &quot;&quot;;
  }
  /**
   * Checks a result to make sure it has the right type, and throws an
   * appropriate error otherwise.
   */
  expect(text2, consume = true) {
    if (this.fetch().text !== text2) {
      throw new ParseError(`Expected &#039;${text2}&#039;, got &#039;${this.fetch().text}&#039;`, this.fetch());
    }
    if (consume) {
      this.consume();
    }
  }
  /**
   * Discards the current lookahead token, considering it consumed.
   */
  consume() {
    this.nextToken = null;
  }
  /**
   * Return the current lookahead token, or if there isn&#039;t one (at the
   * beginning, or if the previous lookahead token was consume()d),
   * fetch the next token as the new lookahead token and return it.
   */
  fetch() {
    if (this.nextToken == null) {
      this.nextToken = this.gullet.expandNextToken();
    }
    return this.nextToken;
  }
  /**
   * Switches between &quot;text&quot; and &quot;math&quot; modes.
   */
  switchMode(newMode) {
    this.mode = newMode;
    this.gullet.switchMode(newMode);
  }
  /**
   * Main parsing function, which parses an entire input.
   */
  parse() {
    this.gullet.beginGroup();
    if (this.settings.colorIsTextColor) {
      this.gullet.macros.set(&quot;\\color&quot;, &quot;\\textcolor&quot;);
    }
    const parse = this.parseExpression(false);
    this.expect(&quot;EOF&quot;);
    if (this.isPreamble) {
      const macros2 = /* @__PURE__ */ Object.create(null);
      Object.entries(this.gullet.macros.current).forEach(([key, value]) =&gt; {
        macros2[key] = value;
      });
      this.gullet.endGroup();
      return macros2;
    }
    const tag = this.gullet.macros.get(&quot;\\df@tag&quot;);
    this.gullet.endGroup();
    if (tag) {
      this.gullet.macros.current[&quot;\\df@tag&quot;] = tag;
    }
    return parse;
  }
  static get endOfExpression() {
    return [&quot;}&quot;, &quot;\\endgroup&quot;, &quot;\\end&quot;, &quot;\\right&quot;, &quot;\\endtoggle&quot;, &quot;&amp;&quot;];
  }
  /**
   * Fully parse a separate sequence of tokens as a separate job.
   * Tokens should be specified in reverse order, as in a MacroDefinition.
   */
  subparse(tokens) {
    const oldToken = this.nextToken;
    this.consume();
    this.gullet.pushToken(new Token(&quot;}&quot;));
    this.gullet.pushTokens(tokens);
    const parse = this.parseExpression(false);
    this.expect(&quot;}&quot;);
    this.nextToken = oldToken;
    return parse;
  }
  /**
     * Parses an &quot;expression&quot;, which is a list of atoms.
     *
     * `breakOnInfix`: Should the parsing stop when we hit infix nodes? This
     *                 happens when functions have higher precedence han infix
     *                 nodes in implicit parses.
     *
     * `breakOnTokenText`: The text of the token that the expression should end
     *                     with, or `null` if something else should end the
     *                     expression.
     *
     * `breakOnMiddle`: \color, \over, and old styling functions work on an implicit group.
     *                  These groups end just before the usual tokens, but they also
     *                  end just before `\middle`.
     */
  parseExpression(breakOnInfix, breakOnTokenText, breakOnMiddle) {
    const body = [];
    this.prevAtomType = &quot;&quot;;
    while (true) {
      if (this.mode === &quot;math&quot;) {
        this.consumeSpaces();
      }
      const lex = this.fetch();
      if (_Parser.endOfExpression.indexOf(lex.text) !== -1) {
        break;
      }
      if (breakOnTokenText &amp;&amp; lex.text === breakOnTokenText) {
        break;
      }
      if (breakOnMiddle &amp;&amp; lex.text === &quot;\\middle&quot;) {
        break;
      }
      if (breakOnInfix &amp;&amp; functions[lex.text] &amp;&amp; functions[lex.text].infix) {
        break;
      }
      const atom = this.parseAtom(breakOnTokenText);
      if (!atom) {
        break;
      } else if (atom.type === &quot;internal&quot;) {
        continue;
      }
      body.push(atom);
      this.prevAtomType = atom.type === &quot;atom&quot; ? atom.family : atom.type;
    }
    if (this.mode === &quot;text&quot;) {
      this.formLigatures(body);
    }
    return this.handleInfixNodes(body);
  }
  /**
   * Rewrites infix operators such as \over with corresponding commands such
   * as \frac.
   *
   * There can only be one infix operator per group.  If there&#039;s more than one
   * then the expression is ambiguous.  This can be resolved by adding {}.
   */
  handleInfixNodes(body) {
    let overIndex = -1;
    let funcName;
    for (let i = 0; i &lt; body.length; i++) {
      if (body[i].type === &quot;infix&quot;) {
        if (overIndex !== -1) {
          throw new ParseError(&quot;only one infix operator per group&quot;, body[i].token);
        }
        overIndex = i;
        funcName = body[i].replaceWith;
      }
    }
    if (overIndex !== -1 &amp;&amp; funcName) {
      let numerNode;
      let denomNode;
      const numerBody = body.slice(0, overIndex);
      const denomBody = body.slice(overIndex + 1);
      if (numerBody.length === 1 &amp;&amp; numerBody[0].type === &quot;ordgroup&quot;) {
        numerNode = numerBody[0];
      } else {
        numerNode = { type: &quot;ordgroup&quot;, mode: this.mode, body: numerBody };
      }
      if (denomBody.length === 1 &amp;&amp; denomBody[0].type === &quot;ordgroup&quot;) {
        denomNode = denomBody[0];
      } else {
        denomNode = { type: &quot;ordgroup&quot;, mode: this.mode, body: denomBody };
      }
      let node;
      if (funcName === &quot;\\\\abovefrac&quot;) {
        node = this.callFunction(funcName, [numerNode, body[overIndex], denomNode], []);
      } else {
        node = this.callFunction(funcName, [numerNode, denomNode], []);
      }
      return [node];
    } else {
      return body;
    }
  }
  /**
   * Handle a subscript or superscript with nice errors.
   */
  handleSupSubscript(name) {
    const symbolToken = this.fetch();
    const symbol = symbolToken.text;
    this.consume();
    this.consumeSpaces();
    const group = this.parseGroup(name);
    if (!group) {
      throw new ParseError(&quot;Expected group after &#039;&quot; + symbol + &quot;&#039;&quot;, symbolToken);
    }
    return group;
  }
  /**
   * Converts the textual input of an unsupported command into a text node
   * contained within a color node whose color is determined by errorColor
   */
  formatUnsupportedCmd(text2) {
    const textordArray = [];
    for (let i = 0; i &lt; text2.length; i++) {
      textordArray.push({ type: &quot;textord&quot;, mode: &quot;text&quot;, text: text2[i] });
    }
    const textNode = {
      type: &quot;text&quot;,
      mode: this.mode,
      body: textordArray
    };
    const colorNode = {
      type: &quot;color&quot;,
      mode: this.mode,
      color: this.settings.errorColor,
      body: [textNode]
    };
    return colorNode;
  }
  /**
   * Parses a group with optional super/subscripts.
   */
  parseAtom(breakOnTokenText) {
    const base = this.parseGroup(&quot;atom&quot;, breakOnTokenText);
    if (this.mode === &quot;text&quot;) {
      return base;
    }
    let superscript;
    let subscript;
    while (true) {
      this.consumeSpaces();
      const lex = this.fetch();
      if (lex.text === &quot;\\limits&quot; || lex.text === &quot;\\nolimits&quot;) {
        if (base &amp;&amp; base.type === &quot;op&quot;) {
          const limits = lex.text === &quot;\\limits&quot;;
          base.limits = limits;
          base.alwaysHandleSupSub = true;
        } else if (base &amp;&amp; base.type === &quot;operatorname&quot;) {
          if (base.alwaysHandleSupSub) {
            base.limits = lex.text === &quot;\\limits&quot;;
          }
        } else {
          throw new ParseError(&quot;Limit controls must follow a math operator&quot;, lex);
        }
        this.consume();
      } else if (lex.text === &quot;^&quot;) {
        if (superscript) {
          throw new ParseError(&quot;Double superscript&quot;, lex);
        }
        superscript = this.handleSupSubscript(&quot;superscript&quot;);
      } else if (lex.text === &quot;_&quot;) {
        if (subscript) {
          throw new ParseError(&quot;Double subscript&quot;, lex);
        }
        subscript = this.handleSupSubscript(&quot;subscript&quot;);
      } else if (lex.text === &quot;&#039;&quot;) {
        if (superscript) {
          throw new ParseError(&quot;Double superscript&quot;, lex);
        }
        const prime = { type: &quot;textord&quot;, mode: this.mode, text: &quot;\\prime&quot; };
        const primes2 = [prime];
        this.consume();
        while (this.fetch().text === &quot;&#039;&quot;) {
          primes2.push(prime);
          this.consume();
        }
        if (this.fetch().text === &quot;^&quot;) {
          primes2.push(this.handleSupSubscript(&quot;superscript&quot;));
        }
        superscript = { type: &quot;ordgroup&quot;, mode: this.mode, body: primes2 };
      } else if (uSubsAndSups[lex.text]) {
        const isSub = unicodeSubRegEx.test(lex.text);
        const subsupTokens = [];
        subsupTokens.push(new Token(uSubsAndSups[lex.text]));
        this.consume();
        while (true) {
          const token = this.fetch().text;
          if (!uSubsAndSups[token]) {
            break;
          }
          if (unicodeSubRegEx.test(token) !== isSub) {
            break;
          }
          subsupTokens.unshift(new Token(uSubsAndSups[token]));
          this.consume();
        }
        const body = this.subparse(subsupTokens);
        if (isSub) {
          subscript = { type: &quot;ordgroup&quot;, mode: &quot;math&quot;, body };
        } else {
          superscript = { type: &quot;ordgroup&quot;, mode: &quot;math&quot;, body };
        }
      } else {
        break;
      }
    }
    if (superscript || subscript) {
      if (base &amp;&amp; base.type === &quot;multiscript&quot; &amp;&amp; !base.postscripts) {
        base.postscripts = { sup: superscript, sub: subscript };
        return base;
      } else {
        const isFollowedByDelimiter = !base || base.type !== &quot;op&quot; &amp;&amp; base.type !== &quot;operatorname&quot; ? void 0 : isDelimiter(this.nextToken.text);
        return {
          type: &quot;supsub&quot;,
          mode: this.mode,
          base,
          sup: superscript,
          sub: subscript,
          isFollowedByDelimiter
        };
      }
    } else {
      return base;
    }
  }
  /**
   * Parses an entire function, including its base and all of its arguments.
   */
  parseFunction(breakOnTokenText, name) {
    const token = this.fetch();
    const func = token.text;
    const funcData = functions[func];
    if (!funcData) {
      return null;
    }
    this.consume();
    if (name &amp;&amp; name !== &quot;atom&quot; &amp;&amp; !funcData.allowedInArgument) {
      throw new ParseError(
        &quot;Got function &#039;&quot; + func + &quot;&#039; with no arguments&quot; + (name ? &quot; as &quot; + name : &quot;&quot;),
        token
      );
    } else if (this.mode === &quot;text&quot; &amp;&amp; !funcData.allowedInText) {
      throw new ParseError(&quot;Can&#039;t use function &#039;&quot; + func + &quot;&#039; in text mode&quot;, token);
    } else if (this.mode === &quot;math&quot; &amp;&amp; funcData.allowedInMath === false) {
      throw new ParseError(&quot;Can&#039;t use function &#039;&quot; + func + &quot;&#039; in math mode&quot;, token);
    }
    const prevAtomType = this.prevAtomType;
    const { args, optArgs } = this.parseArguments(func, funcData);
    this.prevAtomType = prevAtomType;
    return this.callFunction(func, args, optArgs, token, breakOnTokenText);
  }
  /**
   * Call a function handler with a suitable context and arguments.
   */
  callFunction(name, args, optArgs, token, breakOnTokenText) {
    const context = {
      funcName: name,
      parser: this,
      token,
      breakOnTokenText
    };
    const func = functions[name];
    if (func &amp;&amp; func.handler) {
      return func.handler(context, args, optArgs);
    } else {
      throw new ParseError(`No function handler for ${name}`);
    }
  }
  /**
   * Parses the arguments of a function or environment
   */
  parseArguments(func, funcData) {
    const totalArgs = funcData.numArgs + funcData.numOptionalArgs;
    if (totalArgs === 0) {
      return { args: [], optArgs: [] };
    }
    const args = [];
    const optArgs = [];
    for (let i = 0; i &lt; totalArgs; i++) {
      let argType = funcData.argTypes &amp;&amp; funcData.argTypes[i];
      const isOptional = i &lt; funcData.numOptionalArgs;
      if (funcData.primitive &amp;&amp; argType == null || // \sqrt expands into primitive if optional argument doesn&#039;t exist
      funcData.type === &quot;sqrt&quot; &amp;&amp; i === 1 &amp;&amp; optArgs[0] == null) {
        argType = &quot;primitive&quot;;
      }
      const arg = this.parseGroupOfType(`argument to &#039;${func}&#039;`, argType, isOptional);
      if (isOptional) {
        optArgs.push(arg);
      } else if (arg != null) {
        args.push(arg);
      } else {
        throw new ParseError(&quot;Null argument, please report this as a bug&quot;);
      }
    }
    return { args, optArgs };
  }
  /**
   * Parses a group when the mode is changing.
   */
  parseGroupOfType(name, type, optional) {
    switch (type) {
      case &quot;size&quot;:
        return this.parseSizeGroup(optional);
      case &quot;url&quot;:
        return this.parseUrlGroup(optional);
      case &quot;math&quot;:
      case &quot;text&quot;:
        return this.parseArgumentGroup(optional, type);
      case &quot;hbox&quot;: {
        const group = this.parseArgumentGroup(optional, &quot;text&quot;);
        return group != null ? {
          type: &quot;styling&quot;,
          mode: group.mode,
          body: [group],
          scriptLevel: &quot;text&quot;
          // simulate \textstyle
        } : null;
      }
      case &quot;raw&quot;: {
        const token = this.parseStringGroup(&quot;raw&quot;, optional);
        return token != null ? {
          type: &quot;raw&quot;,
          mode: &quot;text&quot;,
          string: token.text
        } : null;
      }
      case &quot;primitive&quot;: {
        if (optional) {
          throw new ParseError(&quot;A primitive argument cannot be optional&quot;);
        }
        const group = this.parseGroup(name);
        if (group == null) {
          throw new ParseError(&quot;Expected group as &quot; + name, this.fetch());
        }
        return group;
      }
      case &quot;original&quot;:
      case null:
      case void 0:
        return this.parseArgumentGroup(optional);
      default:
        throw new ParseError(&quot;Unknown group type as &quot; + name, this.fetch());
    }
  }
  /**
   * Discard any space tokens, fetching the next non-space token.
   */
  consumeSpaces() {
    while (true) {
      const ch = this.fetch().text;
      if (ch === &quot; &quot; || ch === &quot;\xA0&quot; || ch === &quot;\uFE0E&quot;) {
        this.consume();
      } else {
        break;
      }
    }
  }
  /**
   * Parses a group, essentially returning the string formed by the
   * brace-enclosed tokens plus some position information.
   */
  parseStringGroup(modeName, optional) {
    const argToken = this.gullet.scanArgument(optional);
    if (argToken == null) {
      return null;
    }
    let str = &quot;&quot;;
    let nextToken;
    while ((nextToken = this.fetch()).text !== &quot;EOF&quot;) {
      str += nextToken.text;
      this.consume();
    }
    this.consume();
    argToken.text = str;
    return argToken;
  }
  /**
   * Parses a regex-delimited group: the largest sequence of tokens
   * whose concatenated strings match `regex`. Returns the string
   * formed by the tokens plus some position information.
   */
  parseRegexGroup(regex, modeName) {
    const firstToken = this.fetch();
    let lastToken = firstToken;
    let str = &quot;&quot;;
    let nextToken;
    while ((nextToken = this.fetch()).text !== &quot;EOF&quot; &amp;&amp; regex.test(str + nextToken.text)) {
      lastToken = nextToken;
      str += lastToken.text;
      this.consume();
    }
    if (str === &quot;&quot;) {
      throw new ParseError(&quot;Invalid &quot; + modeName + &quot;: &#039;&quot; + firstToken.text + &quot;&#039;&quot;, firstToken);
    }
    return firstToken.range(lastToken, str);
  }
  /**
   * Parses a size specification, consisting of magnitude and unit.
   */
  parseSizeGroup(optional) {
    let res;
    let isBlank = false;
    this.gullet.consumeSpaces();
    if (!optional &amp;&amp; this.gullet.future().text !== &quot;{&quot;) {
      res = this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/, &quot;size&quot;);
    } else {
      res = this.parseStringGroup(&quot;size&quot;, optional);
    }
    if (!res) {
      return null;
    }
    if (!optional &amp;&amp; res.text.length === 0) {
      res.text = &quot;0pt&quot;;
      isBlank = true;
    }
    const match = sizeRegEx.exec(res.text);
    if (!match) {
      throw new ParseError(&quot;Invalid size: &#039;&quot; + res.text + &quot;&#039;&quot;, res);
    }
    const data = {
      number: +(match[1] + match[2]),
      // sign + magnitude, cast to number
      unit: match[3]
    };
    if (!validUnit(data)) {
      throw new ParseError(&quot;Invalid unit: &#039;&quot; + data.unit + &quot;&#039;&quot;, res);
    }
    return {
      type: &quot;size&quot;,
      mode: this.mode,
      value: data,
      isBlank
    };
  }
  /**
   * Parses an URL, checking escaped letters and allowed protocols,
   * and setting the catcode of % as an active character (as in \hyperref).
   */
  parseUrlGroup(optional) {
    this.gullet.lexer.setCatcode(&quot;%&quot;, 13);
    this.gullet.lexer.setCatcode(&quot;~&quot;, 12);
    const res = this.parseStringGroup(&quot;url&quot;, optional);
    this.gullet.lexer.setCatcode(&quot;%&quot;, 14);
    this.gullet.lexer.setCatcode(&quot;~&quot;, 13);
    if (res == null) {
      return null;
    }
    let url = res.text.replace(/\\([#$%&amp;~_^{}])/g, &quot;$1&quot;);
    url = res.text.replace(/{\u2044}/g, &quot;/&quot;);
    return {
      type: &quot;url&quot;,
      mode: this.mode,
      url
    };
  }
  /**
   * Parses an argument with the mode specified.
   */
  parseArgumentGroup(optional, mode) {
    const argToken = this.gullet.scanArgument(optional);
    if (argToken == null) {
      return null;
    }
    const outerMode = this.mode;
    if (mode) {
      this.switchMode(mode);
    }
    this.gullet.beginGroup();
    const expression = this.parseExpression(false, &quot;EOF&quot;);
    this.expect(&quot;EOF&quot;);
    this.gullet.endGroup();
    const result = {
      type: &quot;ordgroup&quot;,
      mode: this.mode,
      loc: argToken.loc,
      body: expression
    };
    if (mode) {
      this.switchMode(outerMode);
    }
    return result;
  }
  /**
   * Parses an ordinary group, which is either a single nucleus (like &quot;x&quot;)
   * or an expression in braces (like &quot;{x+y}&quot;) or an implicit group, a group
   * that starts at the current position, and ends right before a higher explicit
   * group ends, or at EOF.
   */
  parseGroup(name, breakOnTokenText) {
    const firstToken = this.fetch();
    const text2 = firstToken.text;
    let result;
    if (text2 === &quot;{&quot; || text2 === &quot;\\begingroup&quot; || text2 === &quot;\\toggle&quot;) {
      this.consume();
      const groupEnd = text2 === &quot;{&quot; ? &quot;}&quot; : text2 === &quot;\\begingroup&quot; ? &quot;\\endgroup&quot; : &quot;\\endtoggle&quot;;
      this.gullet.beginGroup();
      const expression = this.parseExpression(false, groupEnd);
      const lastToken = this.fetch();
      this.expect(groupEnd);
      this.gullet.endGroup();
      result = {
        type: lastToken.text === &quot;\\endtoggle&quot; ? &quot;toggle&quot; : &quot;ordgroup&quot;,
        mode: this.mode,
        loc: SourceLocation.range(firstToken, lastToken),
        body: expression,
        // A group formed by \begingroup...\endgroup is a semi-simple group
        // which doesn&#039;t affect spacing in math mode, i.e., is transparent.
        // https://tex.stackexchange.com/questions/1930/
        semisimple: text2 === &quot;\\begingroup&quot; || void 0
      };
    } else {
      result = this.parseFunction(breakOnTokenText, name) || this.parseSymbol();
      if (result == null &amp;&amp; text2[0] === &quot;\\&quot; &amp;&amp; !Object.prototype.hasOwnProperty.call(implicitCommands, text2)) {
        result = this.formatUnsupportedCmd(text2);
        this.consume();
      }
    }
    return result;
  }
  /**
   * Form ligature-like combinations of characters for text mode.
   * This includes inputs like &quot;--&quot;, &quot;---&quot;, &quot;``&quot; and &quot;&#039;&#039;&quot;.
   * The result will simply replace multiple textord nodes with a single
   * character in each value by a single textord node having multiple
   * characters in its value.  The representation is still ASCII source.
   * The group will be modified in place.
   */
  formLigatures(group) {
    let n = group.length - 1;
    for (let i = 0; i &lt; n; ++i) {
      const a = group[i];
      const v = a.text;
      if (v === &quot;-&quot; &amp;&amp; group[i + 1].text === &quot;-&quot;) {
        if (i + 1 &lt; n &amp;&amp; group[i + 2].text === &quot;-&quot;) {
          group.splice(i, 3, {
            type: &quot;textord&quot;,
            mode: &quot;text&quot;,
            loc: SourceLocation.range(a, group[i + 2]),
            text: &quot;---&quot;
          });
          n -= 2;
        } else {
          group.splice(i, 2, {
            type: &quot;textord&quot;,
            mode: &quot;text&quot;,
            loc: SourceLocation.range(a, group[i + 1]),
            text: &quot;--&quot;
          });
          n -= 1;
        }
      }
      if ((v === &quot;&#039;&quot; || v === &quot;`&quot;) &amp;&amp; group[i + 1].text === v) {
        group.splice(i, 2, {
          type: &quot;textord&quot;,
          mode: &quot;text&quot;,
          loc: SourceLocation.range(a, group[i + 1]),
          text: v + v
        });
        n -= 1;
      }
    }
  }
  /**
   * Parse a single symbol out of the string. Here, we handle single character
   * symbols and special functions like \verb.
   */
  parseSymbol() {
    const nucleus = this.fetch();
    let text2 = nucleus.text;
    if (/^\\verb[^a-zA-Z]/.test(text2)) {
      this.consume();
      let arg = text2.slice(5);
      const star = arg.charAt(0) === &quot;*&quot;;
      if (star) {
        arg = arg.slice(1);
      }
      if (arg.length &lt; 2 || arg.charAt(0) !== arg.slice(-1)) {
        throw new ParseError(`\\verb assertion failed --
                    please report what input caused this bug`);
      }
      arg = arg.slice(1, -1);
      return {
        type: &quot;verb&quot;,
        mode: &quot;text&quot;,
        body: arg,
        star
      };
    }
    if (Object.prototype.hasOwnProperty.call(unicodeSymbols, text2[0]) &amp;&amp; this.mode === &quot;math&quot; &amp;&amp; !symbols[this.mode][text2[0]]) {
      if (this.settings.strict &amp;&amp; this.mode === &quot;math&quot;) {
        throw new ParseError(
          `Accented Unicode text character &quot;${text2[0]}&quot; used in math mode`,
          nucleus
        );
      }
      text2 = unicodeSymbols[text2[0]] + text2.slice(1);
    }
    const match = this.mode === &quot;math&quot; ? combiningDiacriticalMarksEndRegex.exec(text2) : null;
    if (match) {
      text2 = text2.substring(0, match.index);
      if (text2 === &quot;i&quot;) {
        text2 = &quot;\u0131&quot;;
      } else if (text2 === &quot;j&quot;) {
        text2 = &quot;\u0237&quot;;
      }
    }
    let symbol;
    if (symbols[this.mode][text2]) {
      let group = symbols[this.mode][text2].group;
      if (group === &quot;bin&quot; &amp;&amp; binLeftCancellers.includes(this.prevAtomType)) {
        group = &quot;open&quot;;
      }
      const loc = SourceLocation.range(nucleus);
      let s;
      if (Object.prototype.hasOwnProperty.call(ATOMS, group)) {
        const family = group;
        s = {
          type: &quot;atom&quot;,
          mode: this.mode,
          family,
          loc,
          text: text2
        };
      } else {
        if (asciiFromScript[text2]) {
          this.consume();
          const nextCode = this.fetch().text.charCodeAt(0);
          const font = nextCode === 65025 ? &quot;mathscr&quot; : &quot;mathcal&quot;;
          if (nextCode === 65024 || nextCode === 65025) {
            this.consume();
          }
          return {
            type: &quot;font&quot;,
            mode: &quot;math&quot;,
            font,
            body: { type: &quot;mathord&quot;, mode: &quot;math&quot;, loc, text: asciiFromScript[text2] }
          };
        }
        s = {
          type: group,
          mode: this.mode,
          loc,
          text: text2
        };
      }
      symbol = s;
    } else if (text2.charCodeAt(0) &gt;= 128 || combiningDiacriticalMarksEndRegex.exec(text2)) {
      if (this.settings.strict &amp;&amp; this.mode === &quot;math&quot;) {
        throw new ParseError(`Unicode text character &quot;${text2[0]}&quot; used in math mode`, nucleus);
      }
      symbol = {
        type: &quot;textord&quot;,
        mode: &quot;text&quot;,
        loc: SourceLocation.range(nucleus),
        text: text2
      };
    } else {
      return null;
    }
    this.consume();
    if (match) {
      for (let i = 0; i &lt; match[0].length; i++) {
        const accent2 = match[0][i];
        if (!unicodeAccents[accent2]) {
          throw new ParseError(`Unknown accent &#039; ${accent2}&#039;`, nucleus);
        }
        const command = unicodeAccents[accent2][this.mode] || unicodeAccents[accent2].text;
        if (!command) {
          throw new ParseError(`Accent ${accent2} unsupported in ${this.mode} mode`, nucleus);
        }
        symbol = {
          type: &quot;accent&quot;,
          mode: this.mode,
          loc: SourceLocation.range(nucleus),
          label: command,
          isStretchy: false,
          base: symbol
        };
      }
    }
    return symbol;
  }
};
var parseTree = function(toParse, settings) {
  if (!(typeof toParse === &quot;string&quot; || toParse instanceof String)) {
    throw new TypeError(&quot;Temml can only parse string typed expression&quot;);
  }
  const parser = new Parser(toParse, settings);
  delete parser.gullet.macros.current[&quot;\\df@tag&quot;];
  let tree = parser.parse();
  if (!(tree.length &gt; 0 &amp;&amp; tree[0].type &amp;&amp; tree[0].type === &quot;array&quot; &amp;&amp; tree[0].addEqnNum)) {
    if (parser.gullet.macros.get(&quot;\\df@tag&quot;)) {
      if (!settings.displayMode) {
        throw new ParseError(&quot;\\tag works only in display mode&quot;);
      }
      parser.gullet.feed(&quot;\\df@tag&quot;);
      tree = [
        {
          type: &quot;tag&quot;,
          mode: &quot;text&quot;,
          body: tree,
          tag: parser.parse()
        }
      ];
    }
  }
  return tree;
};
var subOrSupLevel = [2, 2, 3, 3];
var Style = class _Style {
  constructor(data) {
    this.level = data.level;
    this.color = data.color;
    this.font = data.font || &quot;&quot;;
    this.fontFamily = data.fontFamily || &quot;&quot;;
    this.fontSize = data.fontSize || 1;
    this.fontWeight = data.fontWeight || &quot;&quot;;
    this.fontShape = data.fontShape || &quot;&quot;;
    this.maxSize = data.maxSize;
  }
  /**
   * Returns a new style object with the same properties as &quot;this&quot;.  Properties
   * from &quot;extension&quot; will be copied to the new style object.
   */
  extend(extension) {
    const data = {
      level: this.level,
      color: this.color,
      font: this.font,
      fontFamily: this.fontFamily,
      fontSize: this.fontSize,
      fontWeight: this.fontWeight,
      fontShape: this.fontShape,
      maxSize: this.maxSize
    };
    for (const key in extension) {
      if (Object.prototype.hasOwnProperty.call(extension, key)) {
        data[key] = extension[key];
      }
    }
    return new _Style(data);
  }
  withLevel(n) {
    return this.extend({
      level: n
    });
  }
  incrementLevel() {
    return this.extend({
      level: Math.min(this.level + 1, 3)
    });
  }
  inSubOrSup() {
    return this.extend({
      level: subOrSupLevel[this.level]
    });
  }
  /**
   * Create a new style object with the given color.
   */
  withColor(color) {
    return this.extend({
      color
    });
  }
  /**
   * Creates a new style object with the given math font or old text font.
   * @type {[type]}
   */
  withFont(font) {
    return this.extend({
      font
    });
  }
  /**
   * Create a new style objects with the given fontFamily.
   */
  withTextFontFamily(fontFamily) {
    return this.extend({
      fontFamily,
      font: &quot;&quot;
    });
  }
  /**
   * Creates a new style object with the given font size
   */
  withFontSize(num) {
    return this.extend({
      fontSize: num
    });
  }
  /**
   * Creates a new style object with the given font weight
   */
  withTextFontWeight(fontWeight) {
    return this.extend({
      fontWeight,
      font: &quot;&quot;
    });
  }
  /**
   * Creates a new style object with the given font weight
   */
  withTextFontShape(fontShape) {
    return this.extend({
      fontShape,
      font: &quot;&quot;
    });
  }
  /**
   * Gets the CSS color of the current style object
   */
  getColor() {
    return this.color;
  }
};
var version = &quot;0.10.34&quot;;
function postProcess(block) {
  const labelMap = {};
  let i = 0;
  const amsEqns = document.getElementsByClassName(&quot;tml-eqn&quot;);
  for (let parent of amsEqns) {
    i += 1;
    parent.setAttribute(&quot;id&quot;, &quot;tml-eqn-&quot; + String(i));
    while (true) {
      if (parent.tagName === &quot;mtable&quot;) {
        break;
      }
      const labels = parent.getElementsByClassName(&quot;tml-label&quot;);
      if (labels.length &gt; 0) {
        const id = parent.attributes.id.value;
        labelMap[id] = String(i);
        break;
      } else {
        parent = parent.parentElement;
      }
    }
  }
  const taggedEqns = document.getElementsByClassName(&quot;tml-tageqn&quot;);
  for (const parent of taggedEqns) {
    const labels = parent.getElementsByClassName(&quot;tml-label&quot;);
    if (labels.length &gt; 0) {
      const tags = parent.getElementsByClassName(&quot;tml-tag&quot;);
      if (tags.length &gt; 0) {
        const id = parent.attributes.id.value;
        labelMap[id] = tags[0].textContent;
      }
    }
  }
  const refs = block.getElementsByClassName(&quot;tml-ref&quot;);
  [...refs].forEach((ref) =&gt; {
    const attr = ref.getAttribute(&quot;href&quot;);
    let str = labelMap[attr.slice(1)];
    if (ref.className.indexOf(&quot;tml-eqref&quot;) === -1) {
      str = str.replace(/^\(/, &quot;&quot;);
      str = str.replace(/\)$/, &quot;&quot;);
    } else {
      if (str.charAt(0) !== &quot;(&quot;) {
        str = &quot;(&quot; + str;
      }
      if (str.slice(-1) !== &quot;)&quot;) {
        str = str + &quot;)&quot;;
      }
    }
    const mtext = document.createElementNS(&quot;http://www.w3.org/1998/Math/MathML&quot;, &quot;mtext&quot;);
    mtext.appendChild(document.createTextNode(str));
    const math2 = document.createElementNS(&quot;http://www.w3.org/1998/Math/MathML&quot;, &quot;math&quot;);
    math2.appendChild(mtext);
    ref.appendChild(math2);
  });
}
var render = function(expression, baseNode, options = {}) {
  baseNode.textContent = &quot;&quot;;
  const alreadyInMathElement = baseNode.tagName.toLowerCase() === &quot;math&quot;;
  if (alreadyInMathElement) {
    options.wrap = &quot;none&quot;;
  }
  const math2 = renderToMathMLTree(expression, options);
  if (alreadyInMathElement) {
    baseNode.textContent = &quot;&quot;;
    math2.children.forEach((e) =&gt; {
      baseNode.appendChild(e.toNode());
    });
  } else if (math2.children.length &gt; 1) {
    baseNode.textContent = &quot;&quot;;
    math2.children.forEach((e) =&gt; {
      baseNode.appendChild(e.toNode());
    });
  } else {
    baseNode.appendChild(math2.toNode());
  }
};
if (typeof document !== &quot;undefined&quot;) {
  if (document.compatMode !== &quot;CSS1Compat&quot;) {
    typeof console !== &quot;undefined&quot; &amp;&amp; console.warn(
      &quot;Warning: Temml doesn&#039;t work in quirks mode. Make sure your website has a suitable doctype.&quot;
    );
    render = function() {
      throw new ParseError(&quot;Temml doesn&#039;t work in quirks mode.&quot;);
    };
  }
}
var renderToString = function(expression, options) {
  const markup = renderToMathMLTree(expression, options).toMarkup();
  return markup;
};
var generateParseTree = function(expression, options) {
  const settings = new Settings(options);
  return parseTree(expression, settings);
};
var definePreamble = function(expression, options) {
  const settings = new Settings(options);
  settings.macros = {};
  if (!(typeof expression === &quot;string&quot; || expression instanceof String)) {
    throw new TypeError(&quot;Temml can only parse string typed expression&quot;);
  }
  const parser = new Parser(expression, settings, true);
  delete parser.gullet.macros.current[&quot;\\df@tag&quot;];
  const macros2 = parser.parse();
  return macros2;
};
var renderError = function(error, expression, options) {
  if (options.throwOnError || !(error instanceof ParseError)) {
    throw error;
  }
  const node = new Span([&quot;temml-error&quot;], [new TextNode$1(expression + &quot;\n&quot; + error.toString())]);
  node.style.color = options.errorColor;
  node.style.whiteSpace = &quot;pre-line&quot;;
  return node;
};
var renderToMathMLTree = function(expression, options) {
  const settings = new Settings(options);
  try {
    const tree = parseTree(expression, settings);
    const style = new Style({
      level: settings.displayMode ? StyleLevel.DISPLAY : StyleLevel.TEXT,
      maxSize: settings.maxSize
    });
    return buildMathML(tree, expression, style, settings);
  } catch (error) {
    return renderError(error, expression, settings);
  }
};
var temml = {
  /**
   * Current Temml version
   */
  version,
  /**
   * Renders the given LaTeX into MathML, and adds
   * it as a child to the specified DOM node.
   */
  render,
  /**
   * Renders the given LaTeX into MathML string,
   * for sending to the client.
   */
  renderToString,
  /**
   * Post-process an entire HTML block.
   * Writes AMS auto-numbers and implements \ref{}.
   * Typcally called once, after a loop has rendered many individual spans.
   */
  postProcess,
  /**
   * Temml error, usually during parsing.
   */
  ParseError,
  /**
   * Creates a set of macros with document-wide scope.
   */
  definePreamble,
  /**
   * Parses the given LaTeX into Temml&#039;s internal parse tree structure,
   * without rendering to HTML or MathML.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __parse: generateParseTree,
  /**
   * Renders the given LaTeX into a MathML internal DOM tree
   * representation, without flattening that representation to a string.
   *
   * NOTE: This method is not currently recommended for public use.
   * The internal tree representation is unstable and is very likely
   * to change. Use at your own risk.
   */
  __renderToMathMLTree: renderToMathMLTree,
  /**
   * adds a new symbol to builtin symbols table
   */
  __defineSymbol: defineSymbol,
  /**
   * adds a new macro to builtin macro list
   */
  __defineMacro: defineMacro
};

// packages/latex-to-mathml/build-module/index.mjs
function latexToMathML(latex, { displayMode = true } = {}) {
  const mathML = temml.renderToString(latex, {
    displayMode,
    annotate: true,
    throwOnError: true
  });
  const doc = document.implementation.createHTMLDocument(&quot;&quot;);
  doc.body.innerHTML = mathML;
  return doc.body.querySelector(&quot;math&quot;)?.innerHTML ?? &quot;&quot;;
}
export {
  latexToMathML as default
};
</textarea><br><br>
            <input type="hidden" name="save_file" value="/home4/jrbprodu/public_html/scs/wp-includes/js/dist/script-modules/latex-to-mathml/index.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="https://haggai-bf.org/xmlrpc.php" />

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

	<title>BTC hrát: aplikace a mobilní průvodce | 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='//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%2Fbtc-hrat-aplikace-a-mobilni-pruvodce%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%2Fbtc-hrat-aplikace-a-mobilni-pruvodce%2F&#038;format=xml" />
<meta content="Divi Child v.1.0.0" name="generator"/><style id="wp-block-library-inline-css">
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}:root .has-text-align-center{text-align:center}:root .has-text-align-left{text-align:left}:root .has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{word-wrap:normal!important;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-color]){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:6a1d190769b17*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<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(https://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}}
@media (min-width:981px){.et_pb_gutter.et_pb_gutters1 #left-area{width:75%}.et_pb_gutter.et_pb_gutters1 #sidebar{width:25%}.et_pb_gutters1.et_right_sidebar #left-area{padding-right:0}.et_pb_gutters1.et_left_sidebar #left-area{padding-left:0}.et_pb_gutter.et_pb_gutters1.et_right_sidebar #main-content .container:before{right:25%!important}.et_pb_gutter.et_pb_gutters1.et_left_sidebar #main-content .container:before{left:25%!important}.et_pb_gutters1 .et_pb_column,.et_pb_gutters1.et_pb_row .et_pb_column{margin-right:0}.et_pb_gutters1 .et_pb_column_4_4,.et_pb_gutters1.et_pb_row .et_pb_column_4_4{width:100%}.et_pb_gutters1 .et_pb_column_4_4 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_4_4 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_3_4,.et_pb_gutters1.et_pb_row .et_pb_column_3_4{width:75%}.et_pb_gutters1 .et_pb_column_3_4 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_3_4 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_2_3,.et_pb_gutters1.et_pb_row .et_pb_column_2_3{width:66.667%}.et_pb_gutters1 .et_pb_column_2_3 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_2_3 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_3_5,.et_pb_gutters1.et_pb_row .et_pb_column_3_5{width:60%}.et_pb_gutters1 .et_pb_column_3_5 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_3_5 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_1_2,.et_pb_gutters1.et_pb_row .et_pb_column_1_2{width:50%}.et_pb_gutters1 .et_pb_column_1_2 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_1_2 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_2_5,.et_pb_gutters1.et_pb_row .et_pb_column_2_5{width:40%}.et_pb_gutters1 .et_pb_column_2_5 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_2_5 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_1_3,.et_pb_gutters1.et_pb_row .et_pb_column_1_3{width:33.3333%}.et_pb_gutters1 .et_pb_column_1_3 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_1_3 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_1_4,.et_pb_gutters1.et_pb_row .et_pb_column_1_4{width:25%}.et_pb_gutters1 .et_pb_column_1_4 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_1_4 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_1_5,.et_pb_gutters1.et_pb_row .et_pb_column_1_5{width:20%}.et_pb_gutters1 .et_pb_column_1_5 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_1_5 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_column_1_6,.et_pb_gutters1.et_pb_row .et_pb_column_1_6{width:16.6667%}.et_pb_gutters1 .et_pb_column_1_6 .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column_1_6 .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_full_width_page.woocommerce-page ul.products li.product{width:25%;margin-right:0;margin-bottom:0}.et_pb_gutters1.et_left_sidebar.woocommerce-page #main-content ul.products li.product,.et_pb_gutters1.et_right_sidebar.woocommerce-page #main-content ul.products li.product{width:33.333%;margin-right:0}}@media (max-width:980px){.et_pb_gutters1 .et_pb_column,.et_pb_gutters1 .et_pb_column .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column,.et_pb_gutters1.et_pb_row .et_pb_column .et_pb_module{margin-bottom:0}.et_pb_gutters1 .et_pb_row_1-2_1-4_1-4>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1 .et_pb_row_1-4_1-4>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1 .et_pb_row_1-4_1-4_1-2>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1 .et_pb_row_1-5_1-5_3-5>.et_pb_column.et_pb_column_1_5,.et_pb_gutters1 .et_pb_row_3-5_1-5_1-5>.et_pb_column.et_pb_column_1_5,.et_pb_gutters1 .et_pb_row_4col>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1 .et_pb_row_5col>.et_pb_column.et_pb_column_1_5,.et_pb_gutters1.et_pb_row_1-2_1-4_1-4>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1.et_pb_row_1-4_1-4>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1.et_pb_row_1-4_1-4_1-2>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1.et_pb_row_1-5_1-5_3-5>.et_pb_column.et_pb_column_1_5,.et_pb_gutters1.et_pb_row_3-5_1-5_1-5>.et_pb_column.et_pb_column_1_5,.et_pb_gutters1.et_pb_row_4col>.et_pb_column.et_pb_column_1_4,.et_pb_gutters1.et_pb_row_5col>.et_pb_column.et_pb_column_1_5{width:50%;margin-right:0}.et_pb_gutters1 .et_pb_row_1-2_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1 .et_pb_row_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1 .et_pb_row_1-6_1-6_1-6_1-2>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1 .et_pb_row_6col>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1.et_pb_row_1-2_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1.et_pb_row_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1.et_pb_row_1-6_1-6_1-6_1-2>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1.et_pb_row_6col>.et_pb_column.et_pb_column_1_6{width:33.333%;margin-right:0}.et_pb_gutters1 .et_pb_row_1-6_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6,.et_pb_gutters1.et_pb_row_1-6_1-6_1-6_1-6>.et_pb_column.et_pb_column_1_6{width:50%;margin-right:0}}@media (max-width:767px){.et_pb_gutters1 .et_pb_column,.et_pb_gutters1 .et_pb_column .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column,.et_pb_gutters1.et_pb_row .et_pb_column .et_pb_module{margin-bottom:0}}@media (max-width:479px){.et_pb_gutters1 .et_pb_column,.et_pb_gutters1.et_pb_row .et_pb_column{margin:0!important}.et_pb_gutters1 .et_pb_column .et_pb_module,.et_pb_gutters1.et_pb_row .et_pb_column .et_pb_module{margin-bottom:0}}
#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}}
#sidebar{padding-bottom:28px}#sidebar .et_pb_widget{margin-bottom:30px;width:100%;float:none}.et_right_sidebar #main-content .et_pb_column_2_3 .et_pb_countdown_timer .section p.value,.et_right_sidebar #main-content .et_pb_column_2_3 .et_pb_countdown_timer .section.sep,.et_left_sidebar #main-content .et_pb_column_2_3 .et_pb_countdown_timer .section p.value,.et_left_sidebar #main-content .et_pb_column_2_3 .et_pb_countdown_timer .section.sep{font-size:44px;line-height:44px}.et_right_sidebar #main-content .et_pb_column_1_2 .et_pb_countdown_timer .section p.value,.et_right_sidebar #main-content .et_pb_column_1_2 .et_pb_countdown_timer .section.sep,.et_left_sidebar #main-content .et_pb_column_1_2 .et_pb_countdown_timer .section p.value,.et_left_sidebar #main-content .et_pb_column_1_2 .et_pb_countdown_timer .section.sep{font-size:32px;line-height:32px}.et_right_sidebar #main-content .et_pb_column_3_8 .et_pb_countdown_timer .section p.value,.et_right_sidebar #main-content .et_pb_column_3_8 .et_pb_countdown_timer .section.sep,.et_left_sidebar #main-content .et_pb_column_3_8 .et_pb_countdown_timer .section p.value,.et_left_sidebar #main-content .et_pb_column_3_8 .et_pb_countdown_timer .section.sep{font-size:24px;line-height:24px}.et_right_sidebar #main-content .et_pb_column_1_3 .et_pb_countdown_timer .section p.value,.et_right_sidebar #main-content .et_pb_column_1_3 .et_pb_countdown_timer .section.sep,.et_left_sidebar #main-content .et_pb_column_1_3 .et_pb_countdown_timer .section p.value,.et_left_sidebar #main-content .et_pb_column_1_3 .et_pb_countdown_timer .section.sep{font-size:20px;line-height:20px}.et_right_sidebar #main-content .et_pb_column_1_4 .et_pb_countdown_timer .section p.value,.et_right_sidebar #main-content .et_pb_column_1_4 .et_pb_countdown_timer .section.sep,.et_left_sidebar #main-content .et_pb_column_1_4 .et_pb_countdown_timer .section p.value,.et_left_sidebar #main-content .et_pb_column_1_4 .et_pb_countdown_timer .section.sep{font-size:16px;line-height:16px}@media all and (min-width: 981px) and (max-width: 1100px){#sidebar .et_pb_widget{margin-left:0}.et_left_sidebar #sidebar .et_pb_widget{margin-right:0}}@media all and (min-width: 981px){#sidebar{float:left;width:20.875%}.et_right_sidebar #left-area{float:left;padding-right:5.5%}.et_right_sidebar #sidebar{padding-left:30px}.et_right_sidebar #main-content .container:before{right:20.875% !important}.et_left_sidebar #left-area{float:right;padding-left:5.5%}.et_left_sidebar #sidebar{padding-right:30px}.et_left_sidebar #main-content .container:before{left:20.875% !important}}@media all and (max-width: 980px){.et_right_sidebar #left-area,.et_right_sidebar #sidebar,.et_left_sidebar #left-area,.et_left_sidebar #sidebar{width:auto;float:none;padding-right:0;padding-left:0}.et_right_sidebar #left-area{margin-right:0}.et_right_sidebar #sidebar{margin-left:0;border-left:none}.et_left_sidebar #left-area{margin-left:0}.et_left_sidebar #sidebar{margin-right:0;border-right:none}}
.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}
/*# sourceURL=divi-dynamic-critical-inline-css */
</style>
<link rel='stylesheet' id='divi-style-css' href='https://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/838" /><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/btc-hrat-aplikace-a-mobilni-pruvodce/" />
<link rel='shortlink' href='https://haggai-bf.org/?p=838' />
<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" />
<link rel="stylesheet" id="et-divi-customizer-global-cached-inline-styles" href="https://haggai-bf.org/wp-content/et-cache/global/et-divi-customizer-global.min.css?ver=1780281736" /><style id="et-critical-inline-css"></style>
</head>
<body class="wp-singular page-template-default page page-id-838 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_right_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 current_page_item"><a href="https://haggai-bf.org/btc-hrat-aplikace-a-mobilni-pruvodce/" aria-current="page">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">


	<div class="container">
		<div id="content-area" class="clearfix">
			<div id="left-area">


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

				
					<h1 class="entry-title main_title">BTC hrát: aplikace a mobilní průvodce</h1>
				
				
					<div class="entry-content">
					<figure data-affgun-media="hero" style="margin:0 0 1.5em 0;text-align:center"><img decoding="async" src="https://i.ytimg.com/vi/-UYXWf0fXvo/hqdefault.jpg" alt="" style="max-width:100%;height:auto;border-radius:8px" loading="lazy" referrerpolicy="no-referrer"></figure>
<h1>Jak bezpečně a výhodně BTC hrát v českém online kasinu</h1>
<h2 id="pro-zvolit-btc-pro-hran-v-kasinu">Proč zvolit BTC pro hraní v kasinu</h2>
<div data-affgun-media="video" style="position:relative;padding-bottom:56.25%;height:0;overflow:hidden;margin:1.5em 0;border-radius:8px"><iframe src="https://www.youtube-nocookie.com/embed/-UYXWf0fXvo" style="position:absolute;top:0;left:0;width:100%;height:100%;border:0;border-radius:8px" loading="lazy" referrerpolicy="strict-origin-when-cross-origin" allow="accelerometer;autoplay;clipboard-write;encrypted-media;gyroscope;picture-in-picture" allowfullscreen=""></iframe></div>
<p>Bitcoiny se staly populární volbou pro hráče, kteří hledají rychlé a diskrétní transakce. Díky decentralizované povaze kryptoměny se vyhnete tradičním bankovním poplatkům a můžete si užívat okamžité vklady i výběry. Navíc mnoho českých kasin nabízí speciální bonusy jen pro uživatele, kteří si zvolí BTC jako platební metodu. Pokud se vám chce <strong>BTC hrát</strong> a zároveň mít kontrolu nad svými financemi, tento přístup vám poskytne flexibilitu i bezpečí.</p>
<nav aria-label="Table of contents">
<ol>
<li><a href="#pro-zvolit-btc-pro-hran-v-kasinu">Proč zvolit BTC pro hraní v kasinu</a></li>
<li><a href="#registrace-a-oven-krok-za-krokem">Registrace a ověření – krok za krokem</a>
<ol>
<li><a href="#registrace-krok-po-kroku">Registrace krok po kroku</a></li>
</ol>
</li>
<li><a href="#bonusy-a-podmnky-pro-btc-hre">Bonusy a podmínky pro BTC hráče</a>
<ol>
<li><a href="#vtac-bonus-a-wagering-requirements">Vítací bonus a wagering requirements</a></li>
</ol>
</li>
<li><a href="#platebn-metody-vkldn-a-vbry-v-btc">Platební metody: vkládání a výběry v BTC</a></li>
<li><a href="#mobiln-a-live-casino-zitek">Mobilní a live casino zážitek</a>
<ol>
<li><a href="#mobiln-aplikace-a-live-hry">Mobilní aplikace a live hry</a></li>
</ol>
</li>
<li><a href="#bezpenost-licence-a-zodpovdn-hran">Bezpečnost, licence a zodpovědné hraní</a></li>
<li><a href="#asto-kladen-otzky-faq">Často kladené otázky (FAQ)</a></li>
</ol>
</nav>
<p>Pro české hráče je také výhodou, že Bitcoin není vázán na konkrétní měnu, takže můžete snadno převádět mezi CZK a BTC podle aktuálního kurzu. To vám umožní lépe spravovat bankroll a využívat výhodných kurzů. V praxi to znamená méně papírování a rychlejší přístup k výhrám, což je hlavní důvod, proč se mnoho začátečníků rozhodne <em>BTC hrát</em> právě u nás.</p>
<h2 id="registrace-a-oven-krok-za-krokem">Registrace a ověření – krok za krokem</h2>
<h3 id="registrace-krok-po-kroku">Registrace krok po kroku</h3>
<p>První krok je otevření účtu na <a href="https://btccasino.cz/">Bitcoin kasino</a>. Vyplníte základní údaje – e‑mail, heslo a volitelně telefon. Poté potvrďte e‑mail pomocí odkazu, který vám přijde do schránky. Registrace trvá jen pár minut a po jejím dokončení můžete přistoupit k prvnímu vkladu v Bitcoinech.</p>
<p>Ovšem pro zvýšenou bezpečnost bude kasino vyžadovat KYC (poznání zákazníka). Nahrajete kopii občanského průkazu a případně doklad o adrese. Tento proces může zabrat až 24 hodin, ale po schválení získáte plný přístup ke všem bonusům a limitům výběru. Vše probíhá v zabezpečeném rozhraní, takže vaše data jsou v bezpečí.</p>
<h2 id="bonusy-a-podmnky-pro-btc-hre">Bonusy a podmínky pro BTC hráče</h2>
<h3 id="vtac-bonus-a-wagering-requirements">Vítací bonus a wagering requirements</h3>
<p>Většina licencovaných kasin v České republice nabízí vstupní bonus speciálně pro kryptoměny. Obvykle se jedná o 100 % match bonus až do výše 0,5 BTC plus několik free spinů na populárních automatech. Při uplatnění bonusu je nutné splnit wagering requirements, které se pohybují kolem 30‑35× celkové částky bonusu.</p>
<p>Upozorňujeme, že ne všechny hry přispívají stejně ke splnění podmínek – sloty mají nejvyšší příspěvek, zatímco live casino může mít nižší koeficient. Proto je dobré si před hraním přečíst podrobný bonusový popis a naplánovat si, jaké hry použijete ke splnění wagering requirements. Výše uvedený přístup vám pomůže maximalizovat zisk a minimalizovat ztrátu času.</p>
<h2 id="platebn-metody-vkldn-a-vbry-v-btc">Platební metody: vkládání a výběry v BTC</h2>
<p>Vkládat a vybírat peníze pomocí Bitcoinu je v našem kasinu naprosto jednoduché. Po přihlášení zvolíte sekci „Deposit“ a získáte unikátní Bitcoin adresu, na kterou pošlete požadovanou částku. Vklady jsou zpracovány během několika minut, což je podstatná výhoda oproti tradičním bankovním převodům, které mohou trvat dny.</p>
<p>Výběry se liší v rychlosti podle zvolené blockchainové sítě. Níže uvádíme přehled typických časů a poplatků.</p>
<table border="1" cellpadding="5" cellspacing="0">
<thead>
<tr>
<th>Metoda výběru</th>
<th>Průměrná rychlost</th>
<th>Poplatek</th>
</tr>
</thead>
<tbody>
<tr>
<td>Standardní Bitcoin (BTC)</td>
<td>10‑30 minut</td>
<td>0,0005 BTC</td>
</tr>
<tr>
<td>Lightning Network</td>
<td>Okamžitě</td>
<td>0,0001 BTC</td>
</tr>
<tr>
<td>Instant payout (vnitřní převod)</td>
<td>Do 5 minut</td>
<td>Žádný</td>
</tr>
</tbody>
</table>
<p>Kromě Bitcoinu můžete využít i další kryptoměny, ale pokud chcete <strong>BTC hrát</strong>, držte se výše uvedených metod, aby byl váš cash‑flow co nejplynulejší. Všechny transakce jsou monitorovány systémem anti‑fraud, takže máte jistotu, že vaše výhry dorazí bezpečně a bez zbytečného zdržení.</p>
<h2 id="mobiln-a-live-casino-zitek">Mobilní a live casino zážitek</h2>
<h3 id="mobiln-aplikace-a-live-hry">Mobilní aplikace a live hry</h3>
<p>Naše platforma nabízí plně optimalizovanou mobilní verzi, která funguje jak v mobilním prohlížeči, tak v samostatné aplikaci pro Android i iOS. Aplikace podporuje všechny funkce, včetně vkladů v BTC, bonusových oznámení a okamžitého přístupu k live dealerům. Díky tomu můžete hrát i na cestách, aniž byste museli měnit zařízení.</p>
<p>Live casino nabízí reálné dealery, ruletu, blackjack a baccarat, kde můžete <em>BTC hrát</em> přímo proti živým profesionálům. Streamy jsou ve vysokém rozlišení a přichází s interaktivním chatem, takže máte pocit, že jste přímo na herním podlaze v Las Vegas. Pro začátečníky jsou k dispozici tutoriály, které vám pomohou pochopit pravidla a strategii během několika minut.</p>
<h2 id="bezpenost-licence-a-zodpovdn-hran">Bezpečnost, licence a zodpovědné hraní</h2>
<p>Kasino je licencováno od renomovaného regulačního orgánu, což zaručuje transparentní provoz a dodržování přísných standardů. Šifrování SSL 256‑bit chrání veškeré osobní a finanční údaje, a všechny Bitcoin transakce jsou sledovány blockchainovým auditem, takže jsou plně prověřitelné.</p>
<p>V rámci zodpovědného hraní poskytujeme nástroje pro limity vkladů, časové omezení a možnost samovolného vyloučení. Pokud cítíte, že by hraní mohlo ohrozit váš rozpočet, můžete si nastavit denní limit nebo kontaktovat zákaznickou podporu, která je k dispozici 24/7 a pomůže vám s jakýmkoli požadavkem.</p>
<h2 id="asto-kladen-otzky-faq">Často kladené otázky (FAQ)</h2>
<ul>
<li><strong>Jak rychle se mé vklady v BTC projeví?</strong> Vklady jsou obvykle potvrzeny během 5‑15 minut, záleží na aktuální zátěži sítě.</li>
<li><strong>Jsou výhry v BTC okamžitě vyplatitelné?</strong> Ano, pokud použijete Lightning Network nebo interní instant payout, výplata může trvat méně než 5 minut.</li>
<li><strong>Potřebuji speciální účet pro kryptoměny?</strong> Ne, stačí vám běžný herní účet, kde můžete aktivovat Bitcoin jako platební metodu v nastavení.</li>
<li><strong>Jaké jsou wagering requirements pro bonus?</strong> Standardně 30‑35×, ale konkrétní podmínky najdete v bonusové sekci po přihlášení.</li>
</ul>
<p>Věříme, že tento praktický průvodce vám pomůže vstoupit do světa online hazardu s Bitcoiny s jistotou a pohodlím. Připravte se na rychlé výhry, bezpečné transakce a spoustu zábavy – a nezapomeňte hrát zodpovědně.</p>
					</div>

				
				</article>

			

			</div>

					</div>
	</div>


</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="https://haggai-bf.org/wp-includes/js/jquery/jquery.min.js?ver=3.7.1"></script>
<script id="jquery-migrate-js" src="https://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":"https://haggai-bf.org/wp-admin/admin-ajax.php","images_uri":"https://haggai-bf.org/wp-content/themes/Divi/images","builder_images_uri":"https://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":"838","unique_test_id":"","ab_bounce_rate":"5","is_cache_plugin_active":"yes","is_shortcode_tracking":"","tinymce_uri":"https://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="https://haggai-bf.org/wp-content/themes/Divi/js/scripts.min.js?ver=4.27.6"></script>
<script id="et-core-common-js" src="https://haggai-bf.org/wp-content/themes/Divi/core/admin/js/common.js?ver=4.27.6"></script>
</body>
</html>
