From 94b14158e43aea3ba7d2aac3489a50dc9d06d224 Mon Sep 17 00:00:00 2001 From: Arno Gourdol Date: Sat, 22 Aug 2020 10:27:27 -0700 Subject: [PATCH] 0.56.0 --- CHANGELOG.md | 2 +- dist/math-json/domains.d.ts | 2 +- dist/math-json/public.d.ts | 2 +- dist/mathlive-fonts.css | 2 +- dist/mathlive-static.css | 2 +- dist/mathlive.js | 2 +- dist/mathlive.min.js | 4 ++-- dist/mathlive.min.mjs | 4 ++-- dist/mathlive.mjs | 2 +- dist/public/commands.d.ts | 2 +- dist/public/config.d.ts | 2 +- dist/public/core.d.ts | 2 +- dist/public/mathfield.d.ts | 2 +- dist/public/mathlive.d.ts | 8 ++++---- dist/public/types-utils.d.ts | 2 +- dist/vue-mathlive.mjs | 2 +- package-lock.json | 2 +- package.json | 2 +- 18 files changed, 23 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee96de0b0..5443be5b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## [Unreleased] +## 0.56.0 (2020-08-22) ### New Features diff --git a/dist/math-json/domains.d.ts b/dist/math-json/domains.d.ts index 90f03c3f6..88a975130 100644 --- a/dist/math-json/domains.d.ts +++ b/dist/math-json/domains.d.ts @@ -1,4 +1,4 @@ -/* 0.55.0 */ export declare const DOMAIN_NONE = 0; +/* 0.56.0 */ export declare const DOMAIN_NONE = 0; export declare const DOMAIN_ZERO = 1; export declare const DOMAIN_PRIME_NUMBER = 256; export declare const DOMAIN_POSITIVE_INTEGER: number; diff --git a/dist/math-json/public.d.ts b/dist/math-json/public.d.ts index e8cfeabe3..b518c345a 100644 --- a/dist/math-json/public.d.ts +++ b/dist/math-json/public.d.ts @@ -1,4 +1,4 @@ -/* 0.55.0 */ import { Domain } from './domains'; +/* 0.56.0 */ import { Domain } from './domains'; export declare type FunctionDefinition = { /** * A short string indicating an entry in a wikibase. For example diff --git a/dist/mathlive-fonts.css b/dist/mathlive-fonts.css index 7e682ecaf..afa0dc934 100644 --- a/dist/mathlive-fonts.css +++ b/dist/mathlive-fonts.css @@ -1 +1 @@ -/* 0.55.0 */@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}:root{--ML__static-fonts:true} +/* 0.56.0 */@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}:root{--ML__static-fonts:true} diff --git a/dist/mathlive-static.css b/dist/mathlive-static.css index aa6238f9c..d72c3ba9f 100644 --- a/dist/mathlive-static.css +++ b/dist/mathlive-static.css @@ -1 +1 @@ -/* 0.55.0 */@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}:root{--ML__static-fonts:true}.ML__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__base{visibility:inherit;display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--ml_text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__mathlive{display:inline-block;line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-family:KaTeX_Main;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em;box-sizing:content-box}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .stretchy{display:block;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;position:absolute;width:50.2%;overflow:hidden}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;position:absolute;left:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-2-of-3{display:inline-flex;position:absolute;left:25%;width:50%;overflow:hidden}.ML__mathlive .slice-3-of-3{display:inline-flex;position:absolute;right:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-1-of-1{display:inline-flex;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .op-over-under{position:relative}.ML__mathlive .op-over-under>.vlist>span:first-child,.ML__mathlive .op-over-under>.vlist>span:last-child{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{font-family:KaTeX_Main;width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__placeholder{opacity:.7;padding-left:.4ex;padding-right:.4ex;padding-top:.4ex} +/* 0.56.0 */@font-face{font-family:KaTeX_AMS;src:url(fonts/KaTeX_AMS-Regular.woff2) format("woff2"),url(fonts/KaTeX_AMS-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Bold.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Caligraphic;src:url(fonts/KaTeX_Caligraphic-Regular.woff2) format("woff2"),url(fonts/KaTeX_Caligraphic-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Bold.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Fraktur;src:url(fonts/KaTeX_Fraktur-Regular.woff2) format("woff2"),url(fonts/KaTeX_Fraktur-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Main-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Bold.woff2) format("woff2"),url(fonts/KaTeX_Main-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Italic.woff2) format("woff2"),url(fonts/KaTeX_Main-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Main;src:url(fonts/KaTeX_Main-Regular.woff2) format("woff2"),url(fonts/KaTeX_Main-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-BoldItalic.woff2) format("woff2"),url(fonts/KaTeX_Math-BoldItalic.woff) format("woff");font-weight:700;font-style:italic;font-display:"swap"}@font-face{font-family:KaTeX_Math;src:url(fonts/KaTeX_Math-Italic.woff2) format("woff2"),url(fonts/KaTeX_Math-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Bold.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Bold.woff) format("woff");font-weight:700;font-style:normal;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Italic.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Italic.woff) format("woff");font-weight:400;font-style:italic;font-display:"swap"}@font-face{font-family:"KaTeX_SansSerif";src:url(fonts/KaTeX_SansSerif-Regular.woff2) format("woff2"),url(fonts/KaTeX_SansSerif-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Script;src:url(fonts/KaTeX_Script-Regular.woff2) format("woff2"),url(fonts/KaTeX_Script-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size1;src:url(fonts/KaTeX_Size1-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size1-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size2;src:url(fonts/KaTeX_Size2-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size2-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size3;src:url(fonts/KaTeX_Size3-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size3-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Size4;src:url(fonts/KaTeX_Size4-Regular.woff2) format("woff2"),url(fonts/KaTeX_Size4-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}@font-face{font-family:KaTeX_Typewriter;src:url(fonts/KaTeX_Typewriter-Regular.woff2) format("woff2"),url(fonts/KaTeX_Typewriter-Regular.woff) format("woff");font-weight:400;font-style:normal;font-display:"swap"}:root{--ML__static-fonts:true}.ML__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__base{visibility:inherit;display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--ml_text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__mathlive{display:inline-block;line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-family:KaTeX_Main;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em;box-sizing:content-box}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .stretchy{display:block;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;position:absolute;width:50.2%;overflow:hidden}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;position:absolute;left:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-2-of-3{display:inline-flex;position:absolute;left:25%;width:50%;overflow:hidden}.ML__mathlive .slice-3-of-3{display:inline-flex;position:absolute;right:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-1-of-1{display:inline-flex;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .op-over-under{position:relative}.ML__mathlive .op-over-under>.vlist>span:first-child,.ML__mathlive .op-over-under>.vlist>span:last-child{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{font-family:KaTeX_Main;width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__placeholder{opacity:.7;padding-left:.4ex;padding-right:.4ex;padding-top:.4ex} diff --git a/dist/mathlive.js b/dist/mathlive.js index 568280fd9..aebf01426 100644 --- a/dist/mathlive.js +++ b/dist/mathlive.js @@ -38150,7 +38150,7 @@ M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`, return element.getAttribute('data-' + ((_a = options.namespace) !== null && _a !== void 0 ? _a : '') + 'original-content'); } // This SDK_VERSION variable will be replaced during the build process. - const version = '0.55.0'; + const version = '0.56.0'; var mathlive = { version, latexToMarkup: latexToMarkup$2, diff --git a/dist/mathlive.min.js b/dist/mathlive.min.js index 8f08cf714..55c6ce44b 100644 --- a/dist/mathlive.min.js +++ b/dist/mathlive.min.js @@ -1,2 +1,2 @@ -/* MathLive 0.55.0 */ -var global,factory;global=this,factory=function(e){function t(e){return Array.isArray(e)}var i={"AMS-Regular":{65:[0,.68889,0,0],66:[0,.68889,0,0],67:[0,.68889,0,0],68:[0,.68889,0,0],69:[0,.68889,0,0],70:[0,.68889,0,0],71:[0,.68889,0,0],72:[0,.68889,0,0],73:[0,.68889,0,0],74:[.16667,.68889,0,0],75:[0,.68889,0,0],76:[0,.68889,0,0],77:[0,.68889,0,0],78:[0,.68889,0,0],79:[.16667,.68889,0,0],80:[0,.68889,0,0],81:[.16667,.68889,0,0],82:[0,.68889,0,0],83:[0,.68889,0,0],84:[0,.68889,0,0],85:[0,.68889,0,0],86:[0,.68889,0,0],87:[0,.68889,0,0],88:[0,.68889,0,0],89:[0,.68889,0,0],90:[0,.68889,0,0],107:[0,.68889,0,0],165:[0,.675,.025,0],174:[.15559,.69224,0,0],240:[0,.68889,0,0],295:[0,.68889,0,0],710:[0,.825,0,0],732:[0,.9,0,0],770:[0,.825,0,0],771:[0,.9,0,0],989:[.08167,.58167,0,0],1008:[0,.43056,.04028,0],8245:[0,.54986,0,0],8463:[0,.68889,0,0],8487:[0,.68889,0,0],8498:[0,.68889,0,0],8502:[0,.68889,0,0],8503:[0,.68889,0,0],8504:[0,.68889,0,0],8513:[0,.68889,0,0],8592:[-.03598,.46402,0,0],8594:[-.03598,.46402,0,0],8602:[-.13313,.36687,0,0],8603:[-.13313,.36687,0,0],8606:[.01354,.52239,0,0],8608:[.01354,.52239,0,0],8610:[.01354,.52239,0,0],8611:[.01354,.52239,0,0],8619:[0,.54986,0,0],8620:[0,.54986,0,0],8621:[-.13313,.37788,0,0],8622:[-.13313,.36687,0,0],8624:[0,.69224,0,0],8625:[0,.69224,0,0],8630:[0,.43056,0,0],8631:[0,.43056,0,0],8634:[.08198,.58198,0,0],8635:[.08198,.58198,0,0],8638:[.19444,.69224,0,0],8639:[.19444,.69224,0,0],8642:[.19444,.69224,0,0],8643:[.19444,.69224,0,0],8644:[.1808,.675,0,0],8646:[.1808,.675,0,0],8647:[.1808,.675,0,0],8648:[.19444,.69224,0,0],8649:[.1808,.675,0,0],8650:[.19444,.69224,0,0],8651:[.01354,.52239,0,0],8652:[.01354,.52239,0,0],8653:[-.13313,.36687,0,0],8654:[-.13313,.36687,0,0],8655:[-.13313,.36687,0,0],8666:[.13667,.63667,0,0],8667:[.13667,.63667,0,0],8669:[-.13313,.37788,0,0],8672:[-.064,.437,0,0],8674:[-.064,.437,0,0],8705:[0,.825,0,0],8708:[0,.68889,0,0],8709:[.08167,.58167,0,0],8717:[0,.43056,0,0],8722:[-.03598,.46402,0,0],8724:[.08198,.69224,0,0],8726:[.08167,.58167,0,0],8733:[0,.69224,0,0],8736:[0,.69224,0,0],8737:[0,.69224,0,0],8738:[.03517,.52239,0,0],8739:[.08167,.58167,0,0],8740:[.25142,.74111,0,0],8741:[.08167,.58167,0,0],8742:[.25142,.74111,0,0],8756:[0,.69224,0,0],8757:[0,.69224,0,0],8764:[-.13313,.36687,0,0],8765:[-.13313,.37788,0,0],8769:[-.13313,.36687,0,0],8770:[-.03625,.46375,0,0],8774:[.30274,.79383,0,0],8776:[-.01688,.48312,0,0],8778:[.08167,.58167,0,0],8782:[.06062,.54986,0,0],8783:[.06062,.54986,0,0],8785:[.08198,.58198,0,0],8786:[.08198,.58198,0,0],8787:[.08198,.58198,0,0],8790:[0,.69224,0,0],8791:[.22958,.72958,0,0],8796:[.08198,.91667,0,0],8806:[.25583,.75583,0,0],8807:[.25583,.75583,0,0],8808:[.25142,.75726,0,0],8809:[.25142,.75726,0,0],8812:[.25583,.75583,0,0],8814:[.20576,.70576,0,0],8815:[.20576,.70576,0,0],8816:[.30274,.79383,0,0],8817:[.30274,.79383,0,0],8818:[.22958,.72958,0,0],8819:[.22958,.72958,0,0],8822:[.1808,.675,0,0],8823:[.1808,.675,0,0],8828:[.13667,.63667,0,0],8829:[.13667,.63667,0,0],8830:[.22958,.72958,0,0],8831:[.22958,.72958,0,0],8832:[.20576,.70576,0,0],8833:[.20576,.70576,0,0],8840:[.30274,.79383,0,0],8841:[.30274,.79383,0,0],8842:[.13597,.63597,0,0],8843:[.13597,.63597,0,0],8847:[.03517,.54986,0,0],8848:[.03517,.54986,0,0],8858:[.08198,.58198,0,0],8859:[.08198,.58198,0,0],8861:[.08198,.58198,0,0],8862:[0,.675,0,0],8863:[0,.675,0,0],8864:[0,.675,0,0],8865:[0,.675,0,0],8872:[0,.69224,0,0],8873:[0,.69224,0,0],8874:[0,.69224,0,0],8876:[0,.68889,0,0],8877:[0,.68889,0,0],8878:[0,.68889,0,0],8879:[0,.68889,0,0],8882:[.03517,.54986,0,0],8883:[.03517,.54986,0,0],8884:[.13667,.63667,0,0],8885:[.13667,.63667,0,0],8888:[0,.54986,0,0],8890:[.19444,.43056,0,0],8891:[.19444,.69224,0,0],8892:[.19444,.69224,0,0],8901:[0,.54986,0,0],8903:[.08167,.58167,0,0],8905:[.08167,.58167,0,0],8906:[.08167,.58167,0,0],8907:[0,.69224,0,0],8908:[0,.69224,0,0],8909:[-.03598,.46402,0,0],8910:[0,.54986,0,0],8911:[0,.54986,0,0],8912:[.03517,.54986,0,0],8913:[.03517,.54986,0,0],8914:[0,.54986,0,0],8915:[0,.54986,0,0],8916:[0,.69224,0,0],8918:[.0391,.5391,0,0],8919:[.0391,.5391,0,0],8920:[.03517,.54986,0,0],8921:[.03517,.54986,0,0],8922:[.38569,.88569,0,0],8923:[.38569,.88569,0,0],8926:[.13667,.63667,0,0],8927:[.13667,.63667,0,0],8928:[.30274,.79383,0,0],8929:[.30274,.79383,0,0],8934:[.23222,.74111,0,0],8935:[.23222,.74111,0,0],8936:[.23222,.74111,0,0],8937:[.23222,.74111,0,0],8938:[.20576,.70576,0,0],8939:[.20576,.70576,0,0],8940:[.30274,.79383,0,0],8941:[.30274,.79383,0,0],8994:[.19444,.69224,0,0],8995:[.19444,.69224,0,0],9416:[.15559,.69224,0,0],9484:[0,.69224,0,0],9488:[0,.69224,0,0],9492:[0,.37788,0,0],9496:[0,.37788,0,0],9585:[.19444,.68889,0,0],9586:[.19444,.74111,0,0],9632:[0,.675,0,0],9633:[0,.675,0,0],9650:[0,.54986,0,0],9651:[0,.54986,0,0],9654:[.03517,.54986,0,0],9660:[0,.54986,0,0],9661:[0,.54986,0,0],9664:[.03517,.54986,0,0],9674:[.11111,.69224,0,0],9733:[.19444,.69224,0,0],10003:[0,.69224,0,0],10016:[0,.69224,0,0],10731:[.11111,.69224,0,0],10846:[.19444,.75583,0,0],10877:[.13667,.63667,0,0],10878:[.13667,.63667,0,0],10885:[.25583,.75583,0,0],10886:[.25583,.75583,0,0],10887:[.13597,.63597,0,0],10888:[.13597,.63597,0,0],10889:[.26167,.75726,0,0],10890:[.26167,.75726,0,0],10891:[.48256,.98256,0,0],10892:[.48256,.98256,0,0],10901:[.13667,.63667,0,0],10902:[.13667,.63667,0,0],10933:[.25142,.75726,0,0],10934:[.25142,.75726,0,0],10935:[.26167,.75726,0,0],10936:[.26167,.75726,0,0],10937:[.26167,.75726,0,0],10938:[.26167,.75726,0,0],10949:[.25583,.75583,0,0],10950:[.25583,.75583,0,0],10955:[.28481,.79383,0,0],10956:[.28481,.79383,0,0],57350:[.08167,.58167,0,0],57351:[.08167,.58167,0,0],57352:[.08167,.58167,0,0],57353:[0,.43056,.04028,0],57356:[.25142,.75726,0,0],57357:[.25142,.75726,0,0],57358:[.41951,.91951,0,0],57359:[.30274,.79383,0,0],57360:[.30274,.79383,0,0],57361:[.41951,.91951,0,0],57366:[.25142,.75726,0,0],57367:[.25142,.75726,0,0],57368:[.25142,.75726,0,0],57369:[.25142,.75726,0,0],57370:[.13597,.63597,0,0],57371:[.13597,.63597,0,0]},"Caligraphic-Regular":{48:[0,.43056,0,0],49:[0,.43056,0,0],50:[0,.43056,0,0],51:[.19444,.43056,0,0],52:[.19444,.43056,0,0],53:[.19444,.43056,0,0],54:[0,.64444,0,0],55:[.19444,.43056,0,0],56:[0,.64444,0,0],57:[.19444,.43056,0,0],65:[0,.68333,0,.19445],66:[0,.68333,.03041,.13889],67:[0,.68333,.05834,.13889],68:[0,.68333,.02778,.08334],69:[0,.68333,.08944,.11111],70:[0,.68333,.09931,.11111],71:[.09722,.68333,.0593,.11111],72:[0,.68333,.00965,.11111],73:[0,.68333,.07382,0],74:[.09722,.68333,.18472,.16667],75:[0,.68333,.01445,.05556],76:[0,.68333,0,.13889],77:[0,.68333,0,.13889],78:[0,.68333,.14736,.08334],79:[0,.68333,.02778,.11111],80:[0,.68333,.08222,.08334],81:[.09722,.68333,0,.11111],82:[0,.68333,0,.08334],83:[0,.68333,.075,.13889],84:[0,.68333,.25417,0],85:[0,.68333,.09931,.08334],86:[0,.68333,.08222,0],87:[0,.68333,.08222,.08334],88:[0,.68333,.14643,.13889],89:[.09722,.68333,.08222,.08334],90:[0,.68333,.07944,.13889]},"Fraktur-Regular":{33:[0,.69141,0,0],34:[0,.69141,0,0],38:[0,.69141,0,0],39:[0,.69141,0,0],40:[.24982,.74947,0,0],41:[.24982,.74947,0,0],42:[0,.62119,0,0],43:[.08319,.58283,0,0],44:[0,.10803,0,0],45:[.08319,.58283,0,0],46:[0,.10803,0,0],47:[.24982,.74947,0,0],48:[0,.47534,0,0],49:[0,.47534,0,0],50:[0,.47534,0,0],51:[.18906,.47534,0,0],52:[.18906,.47534,0,0],53:[.18906,.47534,0,0],54:[0,.69141,0,0],55:[.18906,.47534,0,0],56:[0,.69141,0,0],57:[.18906,.47534,0,0],58:[0,.47534,0,0],59:[.12604,.47534,0,0],61:[-.13099,.36866,0,0],63:[0,.69141,0,0],65:[0,.69141,0,0],66:[0,.69141,0,0],67:[0,.69141,0,0],68:[0,.69141,0,0],69:[0,.69141,0,0],70:[.12604,.69141,0,0],71:[0,.69141,0,0],72:[.06302,.69141,0,0],73:[0,.69141,0,0],74:[.12604,.69141,0,0],75:[0,.69141,0,0],76:[0,.69141,0,0],77:[0,.69141,0,0],78:[0,.69141,0,0],79:[0,.69141,0,0],80:[.18906,.69141,0,0],81:[.03781,.69141,0,0],82:[0,.69141,0,0],83:[0,.69141,0,0],84:[0,.69141,0,0],85:[0,.69141,0,0],86:[0,.69141,0,0],87:[0,.69141,0,0],88:[0,.69141,0,0],89:[.18906,.69141,0,0],90:[.12604,.69141,0,0],91:[.24982,.74947,0,0],93:[.24982,.74947,0,0],94:[0,.69141,0,0],97:[0,.47534,0,0],98:[0,.69141,0,0],99:[0,.47534,0,0],100:[0,.62119,0,0],101:[0,.47534,0,0],102:[.18906,.69141,0,0],103:[.18906,.47534,0,0],104:[.18906,.69141,0,0],105:[0,.69141,0,0],106:[0,.69141,0,0],107:[0,.69141,0,0],108:[0,.69141,0,0],109:[0,.47534,0,0],110:[0,.47534,0,0],111:[0,.47534,0,0],112:[.18906,.52396,0,0],113:[.18906,.47534,0,0],114:[0,.47534,0,0],115:[0,.47534,0,0],116:[0,.62119,0,0],117:[0,.47534,0,0],118:[0,.52396,0,0],119:[0,.52396,0,0],120:[.18906,.47534,0,0],121:[.18906,.47534,0,0],122:[.18906,.47534,0,0],8216:[0,.69141,0,0],8217:[0,.69141,0,0],58112:[0,.62119,0,0],58113:[0,.62119,0,0],58114:[.18906,.69141,0,0],58115:[.18906,.69141,0,0],58116:[.18906,.47534,0,0],58117:[0,.69141,0,0],58118:[0,.62119,0,0],58119:[0,.47534,0,0]},"Main-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.13333,.63333,0,0],44:[.19444,.15556,0,0],45:[0,.44444,0,0],46:[0,.15556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.44444,0,0],59:[.19444,.44444,0,0],60:[.08556,.58556,0,0],61:[-.10889,.39111,0,0],62:[.08556,.58556,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68611,0,0],66:[0,.68611,0,0],67:[0,.68611,0,0],68:[0,.68611,0,0],69:[0,.68611,0,0],70:[0,.68611,0,0],71:[0,.68611,0,0],72:[0,.68611,0,0],73:[0,.68611,0,0],74:[0,.68611,0,0],75:[0,.68611,0,0],76:[0,.68611,0,0],77:[0,.68611,0,0],78:[0,.68611,0,0],79:[0,.68611,0,0],80:[0,.68611,0,0],81:[.19444,.68611,0,0],82:[0,.68611,0,0],83:[0,.68611,0,0],84:[0,.68611,0,0],85:[0,.68611,0,0],86:[0,.68611,.01597,0],87:[0,.68611,.01597,0],88:[0,.68611,0,0],89:[0,.68611,.02875,0],90:[0,.68611,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.13444,.03194,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.10903,0],103:[.19444,.44444,.01597,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,0,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.01597,0],119:[0,.44444,.01597,0],120:[0,.44444,0,0],121:[.19444,.44444,.01597,0],122:[0,.44444,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],172:[0,.44444,0,0],176:[0,.69444,0,0],177:[.13333,.63333,0,0],184:[.17014,0,0,0],198:[0,.68611,0,0],215:[.13333,.63333,0,0],216:[.04861,.73472,0,0],223:[0,.69444,0,0],230:[0,.44444,0,0],247:[.13333,.63333,0,0],248:[.09722,.54167,0,0],305:[0,.44444,0,0],338:[0,.68611,0,0],339:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.59611,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],733:[0,.69444,0,0],915:[0,.68611,0,0],916:[0,.68611,0,0],920:[0,.68611,0,0],923:[0,.68611,0,0],926:[0,.68611,0,0],928:[0,.68611,0,0],931:[0,.68611,0,0],933:[0,.68611,0,0],934:[0,.68611,0,0],936:[0,.68611,0,0],937:[0,.68611,0,0],8211:[0,.44444,.03194,0],8212:[0,.44444,.03194,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8242:[0,.55556,0,0],8407:[0,.72444,.15486,0],8463:[0,.69444,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,0],8472:[.19444,.44444,0,0],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.10889,.39111,0,0],8593:[.19444,.69444,0,0],8594:[-.10889,.39111,0,0],8595:[.19444,.69444,0,0],8596:[-.10889,.39111,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8636:[-.10889,.39111,0,0],8637:[-.10889,.39111,0,0],8640:[-.10889,.39111,0,0],8641:[-.10889,.39111,0,0],8656:[-.10889,.39111,0,0],8657:[.19444,.69444,0,0],8658:[-.10889,.39111,0,0],8659:[.19444,.69444,0,0],8660:[-.10889,.39111,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.06389,0],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68611,0,0],8712:[.08556,.58556,0,0],8715:[.08556,.58556,0,0],8722:[.13333,.63333,0,0],8723:[.13333,.63333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.02778,.47222,0,0],8728:[-.02639,.47361,0,0],8729:[-.02639,.47361,0,0],8730:[.18,.82,0,0],8733:[0,.44444,0,0],8734:[0,.44444,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.12778,0],8764:[-.10889,.39111,0,0],8768:[.19444,.69444,0,0],8771:[.00222,.50222,0,0],8776:[.02444,.52444,0,0],8781:[.00222,.50222,0,0],8801:[.00222,.50222,0,0],8804:[.19667,.69667,0,0],8805:[.19667,.69667,0,0],8810:[.08556,.58556,0,0],8811:[.08556,.58556,0,0],8826:[.08556,.58556,0,0],8827:[.08556,.58556,0,0],8834:[.08556,.58556,0,0],8835:[.08556,.58556,0,0],8838:[.19667,.69667,0,0],8839:[.19667,.69667,0,0],8846:[0,.55556,0,0],8849:[.19667,.69667,0,0],8850:[.19667,.69667,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.13333,.63333,0,0],8854:[.13333,.63333,0,0],8855:[.13333,.63333,0,0],8856:[.13333,.63333,0,0],8857:[.13333,.63333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8900:[-.02639,.47361,0,0],8901:[-.02639,.47361,0,0],8902:[-.02778,.47222,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.13889,.36111,0,0],8995:[-.13889,.36111,0,0],9651:[.19444,.69444,0,0],9657:[-.02778,.47222,0,0],9661:[.19444,.69444,0,0],9667:[-.02778,.47222,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10815:[0,.68611,0,0],10927:[.19667,.69667,0,0],10928:[.19667,.69667,0,0],57376:[.19444,.69444,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0],34:[0,.69444,.07939,0],35:[.19444,.69444,.06833,0],37:[.05556,.75,.12861,0],38:[0,.69444,.08528,0],39:[0,.69444,.12945,0],40:[.25,.75,.15806,0],41:[.25,.75,.03306,0],42:[0,.75,.14333,0],43:[.10333,.60333,.03306,0],44:[.19444,.14722,0,0],45:[0,.44444,.02611,0],46:[0,.14722,0,0],47:[.25,.75,.15806,0],48:[0,.64444,.13167,0],49:[0,.64444,.13167,0],50:[0,.64444,.13167,0],51:[0,.64444,.13167,0],52:[.19444,.64444,.13167,0],53:[0,.64444,.13167,0],54:[0,.64444,.13167,0],55:[.19444,.64444,.13167,0],56:[0,.64444,.13167,0],57:[0,.64444,.13167,0],58:[0,.44444,.06695,0],59:[.19444,.44444,.06695,0],61:[-.10889,.39111,.06833,0],63:[0,.69444,.11472,0],64:[0,.69444,.09208,0],65:[0,.68611,0,0],66:[0,.68611,.0992,0],67:[0,.68611,.14208,0],68:[0,.68611,.09062,0],69:[0,.68611,.11431,0],70:[0,.68611,.12903,0],71:[0,.68611,.07347,0],72:[0,.68611,.17208,0],73:[0,.68611,.15681,0],74:[0,.68611,.145,0],75:[0,.68611,.14208,0],76:[0,.68611,0,0],77:[0,.68611,.17208,0],78:[0,.68611,.17208,0],79:[0,.68611,.09062,0],80:[0,.68611,.0992,0],81:[.19444,.68611,.09062,0],82:[0,.68611,.02559,0],83:[0,.68611,.11264,0],84:[0,.68611,.12903,0],85:[0,.68611,.17208,0],86:[0,.68611,.18625,0],87:[0,.68611,.18625,0],88:[0,.68611,.15681,0],89:[0,.68611,.19803,0],90:[0,.68611,.14208,0],91:[.25,.75,.1875,0],93:[.25,.75,.09972,0],94:[0,.69444,.06709,0],95:[.31,.13444,.09811,0],97:[0,.44444,.09426,0],98:[0,.69444,.07861,0],99:[0,.44444,.05222,0],100:[0,.69444,.10861,0],101:[0,.44444,.085,0],102:[.19444,.69444,.21778,0],103:[.19444,.44444,.105,0],104:[0,.69444,.09426,0],105:[0,.69326,.11387,0],106:[.19444,.69326,.1672,0],107:[0,.69444,.11111,0],108:[0,.69444,.10861,0],109:[0,.44444,.09426,0],110:[0,.44444,.09426,0],111:[0,.44444,.07861,0],112:[.19444,.44444,.07861,0],113:[.19444,.44444,.105,0],114:[0,.44444,.11111,0],115:[0,.44444,.08167,0],116:[0,.63492,.09639,0],117:[0,.44444,.09426,0],118:[0,.44444,.11111,0],119:[0,.44444,.11111,0],120:[0,.44444,.12583,0],121:[.19444,.44444,.105,0],122:[0,.44444,.13889,0],126:[.35,.34444,.11472,0],163:[0,.69444,0,0],168:[0,.69444,.11473,0],176:[0,.69444,0,0],184:[.17014,0,0,0],198:[0,.68611,.11431,0],216:[.04861,.73472,.09062,0],223:[.19444,.69444,.09736,0],230:[0,.44444,.085,0],248:[.09722,.54167,.09458,0],305:[0,.44444,.09426,0],338:[0,.68611,.11431,0],339:[0,.44444,.085,0],567:[.19444,.44444,.04611,0],710:[0,.69444,.06709,0],711:[0,.63194,.08271,0],713:[0,.59444,.10444,0],714:[0,.69444,.08528,0],715:[0,.69444,0,0],728:[0,.69444,.10333,0],729:[0,.69444,.12945,0],730:[0,.69444,0,0],732:[0,.69444,.11472,0],733:[0,.69444,.11472,0],915:[0,.68611,.12903,0],916:[0,.68611,0,0],920:[0,.68611,.09062,0],923:[0,.68611,0,0],926:[0,.68611,.15092,0],928:[0,.68611,.17208,0],931:[0,.68611,.11431,0],933:[0,.68611,.10778,0],934:[0,.68611,.05632,0],936:[0,.68611,.10778,0],937:[0,.68611,.0992,0],8211:[0,.44444,.09811,0],8212:[0,.44444,.09811,0],8216:[0,.69444,.12945,0],8217:[0,.69444,.12945,0],8220:[0,.69444,.16772,0],8221:[0,.69444,.07939,0]},"Main-Italic":{33:[0,.69444,.12417,0],34:[0,.69444,.06961,0],35:[.19444,.69444,.06616,0],37:[.05556,.75,.13639,0],38:[0,.69444,.09694,0],39:[0,.69444,.12417,0],40:[.25,.75,.16194,0],41:[.25,.75,.03694,0],42:[0,.75,.14917,0],43:[.05667,.56167,.03694,0],44:[.19444,.10556,0,0],45:[0,.43056,.02826,0],46:[0,.10556,0,0],47:[.25,.75,.16194,0],48:[0,.64444,.13556,0],49:[0,.64444,.13556,0],50:[0,.64444,.13556,0],51:[0,.64444,.13556,0],52:[.19444,.64444,.13556,0],53:[0,.64444,.13556,0],54:[0,.64444,.13556,0],55:[.19444,.64444,.13556,0],56:[0,.64444,.13556,0],57:[0,.64444,.13556,0],58:[0,.43056,.0582,0],59:[.19444,.43056,.0582,0],61:[-.13313,.36687,.06616,0],63:[0,.69444,.1225,0],64:[0,.69444,.09597,0],65:[0,.68333,0,0],66:[0,.68333,.10257,0],67:[0,.68333,.14528,0],68:[0,.68333,.09403,0],69:[0,.68333,.12028,0],70:[0,.68333,.13305,0],71:[0,.68333,.08722,0],72:[0,.68333,.16389,0],73:[0,.68333,.15806,0],74:[0,.68333,.14028,0],75:[0,.68333,.14528,0],76:[0,.68333,0,0],77:[0,.68333,.16389,0],78:[0,.68333,.16389,0],79:[0,.68333,.09403,0],80:[0,.68333,.10257,0],81:[.19444,.68333,.09403,0],82:[0,.68333,.03868,0],83:[0,.68333,.11972,0],84:[0,.68333,.13305,0],85:[0,.68333,.16389,0],86:[0,.68333,.18361,0],87:[0,.68333,.18361,0],88:[0,.68333,.15806,0],89:[0,.68333,.19383,0],90:[0,.68333,.14528,0],91:[.25,.75,.1875,0],93:[.25,.75,.10528,0],94:[0,.69444,.06646,0],95:[.31,.12056,.09208,0],97:[0,.43056,.07671,0],98:[0,.69444,.06312,0],99:[0,.43056,.05653,0],100:[0,.69444,.10333,0],101:[0,.43056,.07514,0],102:[.19444,.69444,.21194,0],103:[.19444,.43056,.08847,0],104:[0,.69444,.07671,0],105:[0,.65536,.1019,0],106:[.19444,.65536,.14467,0],107:[0,.69444,.10764,0],108:[0,.69444,.10333,0],109:[0,.43056,.07671,0],110:[0,.43056,.07671,0],111:[0,.43056,.06312,0],112:[.19444,.43056,.06312,0],113:[.19444,.43056,.08847,0],114:[0,.43056,.10764,0],115:[0,.43056,.08208,0],116:[0,.61508,.09486,0],117:[0,.43056,.07671,0],118:[0,.43056,.10764,0],119:[0,.43056,.10764,0],120:[0,.43056,.12042,0],121:[.19444,.43056,.08847,0],122:[0,.43056,.12292,0],126:[.35,.31786,.11585,0],163:[0,.69444,0,0],168:[0,.66786,.10474,0],176:[0,.69444,0,0],184:[.17014,0,0,0],198:[0,.68333,.12028,0],216:[.04861,.73194,.09403,0],223:[.19444,.69444,.10514,0],230:[0,.43056,.07514,0],248:[.09722,.52778,.09194,0],305:[0,.43056,0,.02778],338:[0,.68333,.12028,0],339:[0,.43056,.07514,0],567:[.19444,.43056,0,.08334],710:[0,.69444,.06646,0],711:[0,.62847,.08295,0],713:[0,.56167,.10333,0],714:[0,.69444,.09694,0],715:[0,.69444,0,0],728:[0,.69444,.10806,0],729:[0,.66786,.11752,0],730:[0,.69444,0,0],732:[0,.66786,.11585,0],733:[0,.69444,.1225,0],915:[0,.68333,.13305,0],916:[0,.68333,0,0],920:[0,.68333,.09403,0],923:[0,.68333,0,0],926:[0,.68333,.15294,0],928:[0,.68333,.16389,0],931:[0,.68333,.12028,0],933:[0,.68333,.11111,0],934:[0,.68333,.05986,0],936:[0,.68333,.11111,0],937:[0,.68333,.10257,0],8211:[0,.43056,.09208,0],8212:[0,.43056,.09208,0],8216:[0,.69444,.12417,0],8217:[0,.69444,.12417,0],8220:[0,.69444,.1685,0],8221:[0,.69444,.06961,0],8463:[0,.68889,0,0]},"Main-Regular":{32:[0,0,0,0],33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.19444,.10556,0,0],45:[0,.43056,0,0],46:[0,.10556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.43056,0,0],59:[.19444,.43056,0,0],60:[.0391,.5391,0,0],61:[-.13313,.36687,0,0],62:[.0391,.5391,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68333,0,0],66:[0,.68333,0,0],67:[0,.68333,0,0],68:[0,.68333,0,0],69:[0,.68333,0,0],70:[0,.68333,0,0],71:[0,.68333,0,0],72:[0,.68333,0,0],73:[0,.68333,0,0],74:[0,.68333,0,0],75:[0,.68333,0,0],76:[0,.68333,0,0],77:[0,.68333,0,0],78:[0,.68333,0,0],79:[0,.68333,0,0],80:[0,.68333,0,0],81:[.19444,.68333,0,0],82:[0,.68333,0,0],83:[0,.68333,0,0],84:[0,.68333,0,0],85:[0,.68333,0,0],86:[0,.68333,.01389,0],87:[0,.68333,.01389,0],88:[0,.68333,0,0],89:[0,.68333,.025,0],90:[0,.68333,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.12056,.02778,0],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,0],100:[0,.69444,0,0],101:[0,.43056,0,0],102:[0,.69444,.07778,0],103:[.19444,.43056,.01389,0],104:[0,.69444,0,0],105:[0,.66786,0,0],106:[.19444,.66786,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.19444,.43056,0,0],113:[.19444,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.61508,0,0],117:[0,.43056,0,0],118:[0,.43056,.01389,0],119:[0,.43056,.01389,0],120:[0,.43056,0,0],121:[.19444,.43056,.01389,0],122:[0,.43056,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.31786,0,0],160:[0,0,0,0],167:[.19444,.69444,0,0],168:[0,.66786,0,0],172:[0,.43056,0,0],176:[0,.69444,0,0],177:[.08333,.58333,0,0],182:[.19444,.69444,0,0],184:[.17014,0,0,0],198:[0,.68333,0,0],215:[.08333,.58333,0,0],216:[.04861,.73194,0,0],223:[0,.69444,0,0],230:[0,.43056,0,0],247:[.08333,.58333,0,0],248:[.09722,.52778,0,0],305:[0,.43056,0,0],338:[0,.68333,0,0],339:[0,.43056,0,0],567:[.19444,.43056,0,0],710:[0,.69444,0,0],711:[0,.62847,0,0],713:[0,.56778,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.66786,0,0],730:[0,.69444,0,0],732:[0,.66786,0,0],733:[0,.69444,0,0],915:[0,.68333,0,0],916:[0,.68333,0,0],920:[0,.68333,0,0],923:[0,.68333,0,0],926:[0,.68333,0,0],928:[0,.68333,0,0],931:[0,.68333,0,0],933:[0,.68333,0,0],934:[0,.68333,0,0],936:[0,.68333,0,0],937:[0,.68333,0,0],8211:[0,.43056,.02778,0],8212:[0,.43056,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8230:[0,.12,0,0],8242:[0,.55556,0,0],8407:[0,.71444,.15382,0],8463:[0,.68889,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,.11111],8472:[.19444,.43056,0,.11111],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.13313,.36687,0,0],8593:[.19444,.69444,0,0],8594:[-.13313,.36687,0,0],8595:[.19444,.69444,0,0],8596:[-.13313,.36687,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8614:[.011,.511,0,0],8617:[.011,.511,0,0],8618:[.011,.511,0,0],8636:[-.13313,.36687,0,0],8637:[-.13313,.36687,0,0],8640:[-.13313,.36687,0,0],8641:[-.13313,.36687,0,0],8652:[.011,.671,0,0],8656:[-.13313,.36687,0,0],8657:[.19444,.69444,0,0],8658:[-.13313,.36687,0,0],8659:[.19444,.69444,0,0],8660:[-.13313,.36687,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.05556,.08334],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68333,0,0],8712:[.0391,.5391,0,0],8715:[.0391,.5391,0,0],8722:[.08333,.58333,0,0],8723:[.08333,.58333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.03472,.46528,0,0],8728:[-.05555,.44445,0,0],8729:[-.05555,.44445,0,0],8730:[.2,.8,0,0],8733:[0,.43056,0,0],8734:[0,.43056,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.11111,0],8764:[-.13313,.36687,0,0],8768:[.19444,.69444,0,0],8771:[-.03625,.46375,0,0],8773:[-.022,.589,0,0],8776:[-.01688,.48312,0,0],8781:[-.03625,.46375,0,0],8784:[-.133,.67,0,0],8801:[-.03625,.46375,0,0],8804:[.13597,.63597,0,0],8805:[.13597,.63597,0,0],8810:[.0391,.5391,0,0],8811:[.0391,.5391,0,0],8826:[.0391,.5391,0,0],8827:[.0391,.5391,0,0],8834:[.0391,.5391,0,0],8835:[.0391,.5391,0,0],8838:[.13597,.63597,0,0],8839:[.13597,.63597,0,0],8846:[0,.55556,0,0],8849:[.13597,.63597,0,0],8850:[.13597,.63597,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.08333,.58333,0,0],8854:[.08333,.58333,0,0],8855:[.08333,.58333,0,0],8856:[.08333,.58333,0,0],8857:[.08333,.58333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8872:[.249,.75,0,0],8900:[-.05555,.44445,0,0],8901:[-.05555,.44445,0,0],8902:[-.03472,.46528,0,0],8904:[.005,.505,0,0],8942:[.03,.9,0,0],8943:[-.19,.31,0,0],8945:[-.1,.82,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.14236,.35764,0,0],8995:[-.14236,.35764,0,0],9136:[.244,.744,0,0],9137:[.244,.744,0,0],9651:[.19444,.69444,0,0],9657:[-.03472,.46528,0,0],9661:[.19444,.69444,0,0],9667:[-.03472,.46528,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10222:[.244,.744,0,0],10223:[.244,.744,0,0],10229:[.011,.511,0,0],10230:[.011,.511,0,0],10231:[.011,.511,0,0],10232:[.024,.525,0,0],10233:[.024,.525,0,0],10234:[.024,.525,0,0],10236:[.011,.511,0,0],10815:[0,.68333,0,0],10927:[.13597,.63597,0,0],10928:[.13597,.63597,0,0],57376:[.19444,.69444,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0],66:[0,.68611,.04835,0],67:[0,.68611,.06979,0],68:[0,.68611,.03194,0],69:[0,.68611,.05451,0],70:[0,.68611,.15972,0],71:[0,.68611,0,0],72:[0,.68611,.08229,0],73:[0,.68611,.07778,0],74:[0,.68611,.10069,0],75:[0,.68611,.06979,0],76:[0,.68611,0,0],77:[0,.68611,.11424,0],78:[0,.68611,.11424,0],79:[0,.68611,.03194,0],80:[0,.68611,.15972,0],81:[.19444,.68611,0,0],82:[0,.68611,.00421,0],83:[0,.68611,.05382,0],84:[0,.68611,.15972,0],85:[0,.68611,.11424,0],86:[0,.68611,.25555,0],87:[0,.68611,.15972,0],88:[0,.68611,.07778,0],89:[0,.68611,.25555,0],90:[0,.68611,.06979,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[.19444,.69444,.11042,0],103:[.19444,.44444,.03704,0],104:[0,.69444,0,0],105:[0,.69326,0,0],106:[.19444,.69326,.0622,0],107:[0,.69444,.01852,0],108:[0,.69444,.0088,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,.03704,0],114:[0,.44444,.03194,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.03704,0],119:[0,.44444,.02778,0],120:[0,.44444,0,0],121:[.19444,.44444,.03704,0],122:[0,.44444,.04213,0],915:[0,.68611,.15972,0],916:[0,.68611,0,0],920:[0,.68611,.03194,0],923:[0,.68611,0,0],926:[0,.68611,.07458,0],928:[0,.68611,.08229,0],931:[0,.68611,.05451,0],933:[0,.68611,.15972,0],934:[0,.68611,0,0],936:[0,.68611,.11653,0],937:[0,.68611,.04835,0],945:[0,.44444,0,0],946:[.19444,.69444,.03403,0],947:[.19444,.44444,.06389,0],948:[0,.69444,.03819,0],949:[0,.44444,0,0],950:[.19444,.69444,.06215,0],951:[.19444,.44444,.03704,0],952:[0,.69444,.03194,0],953:[0,.44444,0,0],954:[0,.44444,0,0],955:[0,.69444,0,0],956:[.19444,.44444,0,0],957:[0,.44444,.06898,0],958:[.19444,.69444,.03021,0],959:[0,.44444,0,0],960:[0,.44444,.03704,0],961:[.19444,.44444,0,0],962:[.09722,.44444,.07917,0],963:[0,.44444,.03704,0],964:[0,.44444,.13472,0],965:[0,.44444,.03704,0],966:[.19444,.44444,0,0],967:[.19444,.44444,0,0],968:[.19444,.69444,.03704,0],969:[0,.44444,.03704,0],977:[0,.69444,0,0],981:[.19444,.69444,0,0],982:[0,.44444,.03194,0],1009:[.19444,.44444,0,0],1013:[0,.44444,0,0]},"Math-Italic":{65:[0,.68333,0,.13889],66:[0,.68333,.05017,.08334],67:[0,.68333,.07153,.08334],68:[0,.68333,.02778,.05556],69:[0,.68333,.05764,.08334],70:[0,.68333,.13889,.08334],71:[0,.68333,0,.08334],72:[0,.68333,.08125,.05556],73:[0,.68333,.07847,.11111],74:[0,.68333,.09618,.16667],75:[0,.68333,.07153,.05556],76:[0,.68333,0,.02778],77:[0,.68333,.10903,.08334],78:[0,.68333,.10903,.08334],79:[0,.68333,.02778,.08334],80:[0,.68333,.13889,.08334],81:[.19444,.68333,0,.08334],82:[0,.68333,.00773,.08334],83:[0,.68333,.05764,.08334],84:[0,.68333,.13889,.08334],85:[0,.68333,.10903,.02778],86:[0,.68333,.22222,0],87:[0,.68333,.13889,0],88:[0,.68333,.07847,.08334],89:[0,.68333,.22222,0],90:[0,.68333,.07153,.08334],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,.05556],100:[0,.69444,0,.16667],101:[0,.43056,0,.05556],102:[.19444,.69444,.10764,.16667],103:[.19444,.43056,.03588,.02778],104:[0,.69444,0,0],105:[0,.65952,0,0],106:[.19444,.65952,.05724,0],107:[0,.69444,.03148,0],108:[0,.69444,.01968,.08334],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,.05556],112:[.19444,.43056,0,.08334],113:[.19444,.43056,.03588,.08334],114:[0,.43056,.02778,.05556],115:[0,.43056,0,.05556],116:[0,.61508,0,.08334],117:[0,.43056,0,.02778],118:[0,.43056,.03588,.02778],119:[0,.43056,.02691,.08334],120:[0,.43056,0,.02778],121:[.19444,.43056,.03588,.05556],122:[0,.43056,.04398,.05556],915:[0,.68333,.13889,.08334],916:[0,.68333,0,.16667],920:[0,.68333,.02778,.08334],923:[0,.68333,0,.16667],926:[0,.68333,.07569,.08334],928:[0,.68333,.08125,.05556],931:[0,.68333,.05764,.08334],933:[0,.68333,.13889,.05556],934:[0,.68333,0,.08334],936:[0,.68333,.11,.05556],937:[0,.68333,.05017,.08334],945:[0,.43056,.0037,.02778],946:[.19444,.69444,.05278,.08334],947:[.19444,.43056,.05556,0],948:[0,.69444,.03785,.05556],949:[0,.43056,0,.08334],950:[.19444,.69444,.07378,.08334],951:[.19444,.43056,.03588,.05556],952:[0,.69444,.02778,.08334],953:[0,.43056,0,.05556],954:[0,.43056,0,0],955:[0,.69444,0,0],956:[.19444,.43056,0,.02778],957:[0,.43056,.06366,.02778],958:[.19444,.69444,.04601,.11111],959:[0,.43056,0,.05556],960:[0,.43056,.03588,0],961:[.19444,.43056,0,.08334],962:[.09722,.43056,.07986,.08334],963:[0,.43056,.03588,0],964:[0,.43056,.1132,.02778],965:[0,.43056,.03588,.02778],966:[.19444,.43056,0,.08334],967:[.19444,.43056,0,.05556],968:[.19444,.69444,.03588,.11111],969:[0,.43056,.03588,0],977:[0,.69444,0,.08334],981:[.19444,.69444,0,.08334],982:[0,.43056,.02778,0],1009:[.19444,.43056,0,.08334],1013:[0,.43056,0,.05556]},"SansSerif-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.11667,.61667,0,0],44:[.10556,.13056,0,0],45:[0,.45833,0,0],46:[0,.13056,0,0],47:[.25,.75,0,0],48:[0,.69444,0,0],49:[0,.69444,0,0],50:[0,.69444,0,0],51:[0,.69444,0,0],52:[0,.69444,0,0],53:[0,.69444,0,0],54:[0,.69444,0,0],55:[0,.69444,0,0],56:[0,.69444,0,0],57:[0,.69444,0,0],58:[0,.45833,0,0],59:[.10556,.45833,0,0],61:[-.09375,.40625,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.10556,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01528,0],87:[0,.69444,.01528,0],88:[0,.69444,0,0],89:[0,.69444,.0275,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.10833,.03056,0],97:[0,.45833,0,0],98:[0,.69444,0,0],99:[0,.45833,0,0],100:[0,.69444,0,0],101:[0,.45833,0,0],102:[0,.69444,.07639,0],103:[.19444,.45833,.01528,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.45833,0,0],110:[0,.45833,0,0],111:[0,.45833,0,0],112:[.19444,.45833,0,0],113:[.19444,.45833,0,0],114:[0,.45833,.01528,0],115:[0,.45833,0,0],116:[0,.58929,0,0],117:[0,.45833,0,0],118:[0,.45833,.01528,0],119:[0,.45833,.01528,0],120:[0,.45833,0,0],121:[.19444,.45833,.01528,0],122:[0,.45833,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],176:[0,.69444,0,0],180:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.45833,0,0],567:[.19444,.45833,0,0],710:[0,.69444,0,0],711:[0,.63542,0,0],713:[0,.63778,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],733:[0,.69444,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.45833,.03056,0],8212:[0,.45833,.03056,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"SansSerif-Italic":{33:[0,.69444,.05733,0],34:[0,.69444,.00316,0],35:[.19444,.69444,.05087,0],36:[.05556,.75,.11156,0],37:[.05556,.75,.03126,0],38:[0,.69444,.03058,0],39:[0,.69444,.07816,0],40:[.25,.75,.13164,0],41:[.25,.75,.02536,0],42:[0,.75,.11775,0],43:[.08333,.58333,.02536,0],44:[.125,.08333,0,0],45:[0,.44444,.01946,0],46:[0,.08333,0,0],47:[.25,.75,.13164,0],48:[0,.65556,.11156,0],49:[0,.65556,.11156,0],50:[0,.65556,.11156,0],51:[0,.65556,.11156,0],52:[0,.65556,.11156,0],53:[0,.65556,.11156,0],54:[0,.65556,.11156,0],55:[0,.65556,.11156,0],56:[0,.65556,.11156,0],57:[0,.65556,.11156,0],58:[0,.44444,.02502,0],59:[.125,.44444,.02502,0],61:[-.13,.37,.05087,0],63:[0,.69444,.11809,0],64:[0,.69444,.07555,0],65:[0,.69444,0,0],66:[0,.69444,.08293,0],67:[0,.69444,.11983,0],68:[0,.69444,.07555,0],69:[0,.69444,.11983,0],70:[0,.69444,.13372,0],71:[0,.69444,.11983,0],72:[0,.69444,.08094,0],73:[0,.69444,.13372,0],74:[0,.69444,.08094,0],75:[0,.69444,.11983,0],76:[0,.69444,0,0],77:[0,.69444,.08094,0],78:[0,.69444,.08094,0],79:[0,.69444,.07555,0],80:[0,.69444,.08293,0],81:[.125,.69444,.07555,0],82:[0,.69444,.08293,0],83:[0,.69444,.09205,0],84:[0,.69444,.13372,0],85:[0,.69444,.08094,0],86:[0,.69444,.1615,0],87:[0,.69444,.1615,0],88:[0,.69444,.13372,0],89:[0,.69444,.17261,0],90:[0,.69444,.11983,0],91:[.25,.75,.15942,0],93:[.25,.75,.08719,0],94:[0,.69444,.0799,0],95:[.35,.09444,.08616,0],97:[0,.44444,.00981,0],98:[0,.69444,.03057,0],99:[0,.44444,.08336,0],100:[0,.69444,.09483,0],101:[0,.44444,.06778,0],102:[0,.69444,.21705,0],103:[.19444,.44444,.10836,0],104:[0,.69444,.01778,0],105:[0,.67937,.09718,0],106:[.19444,.67937,.09162,0],107:[0,.69444,.08336,0],108:[0,.69444,.09483,0],109:[0,.44444,.01778,0],110:[0,.44444,.01778,0],111:[0,.44444,.06613,0],112:[.19444,.44444,.0389,0],113:[.19444,.44444,.04169,0],114:[0,.44444,.10836,0],115:[0,.44444,.0778,0],116:[0,.57143,.07225,0],117:[0,.44444,.04169,0],118:[0,.44444,.10836,0],119:[0,.44444,.10836,0],120:[0,.44444,.09169,0],121:[.19444,.44444,.10836,0],122:[0,.44444,.08752,0],126:[.35,.32659,.08826,0],168:[0,.67937,.06385,0],176:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.44444,.04169,0],567:[.19444,.44444,.04169,0],710:[0,.69444,.0799,0],711:[0,.63194,.08432,0],713:[0,.60889,.08776,0],714:[0,.69444,.09205,0],715:[0,.69444,0,0],728:[0,.69444,.09483,0],729:[0,.67937,.07774,0],730:[0,.69444,0,0],732:[0,.67659,.08826,0],733:[0,.69444,.09205,0],915:[0,.69444,.13372,0],916:[0,.69444,0,0],920:[0,.69444,.07555,0],923:[0,.69444,0,0],926:[0,.69444,.12816,0],928:[0,.69444,.08094,0],931:[0,.69444,.11983,0],933:[0,.69444,.09031,0],934:[0,.69444,.04603,0],936:[0,.69444,.09031,0],937:[0,.69444,.08293,0],8211:[0,.44444,.08616,0],8212:[0,.44444,.08616,0],8216:[0,.69444,.07816,0],8217:[0,.69444,.07816,0],8220:[0,.69444,.14205,0],8221:[0,.69444,.00316,0]},"SansSerif-Regular":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.125,.08333,0,0],45:[0,.44444,0,0],46:[0,.08333,0,0],47:[.25,.75,0,0],48:[0,.65556,0,0],49:[0,.65556,0,0],50:[0,.65556,0,0],51:[0,.65556,0,0],52:[0,.65556,0,0],53:[0,.65556,0,0],54:[0,.65556,0,0],55:[0,.65556,0,0],56:[0,.65556,0,0],57:[0,.65556,0,0],58:[0,.44444,0,0],59:[.125,.44444,0,0],61:[-.13,.37,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.125,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01389,0],87:[0,.69444,.01389,0],88:[0,.69444,0,0],89:[0,.69444,.025,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.09444,.02778,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.06944,0],103:[.19444,.44444,.01389,0],104:[0,.69444,0,0],105:[0,.67937,0,0],106:[.19444,.67937,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,.01389,0],115:[0,.44444,0,0],116:[0,.57143,0,0],117:[0,.44444,0,0],118:[0,.44444,.01389,0],119:[0,.44444,.01389,0],120:[0,.44444,0,0],121:[.19444,.44444,.01389,0],122:[0,.44444,0,0],126:[.35,.32659,0,0],168:[0,.67937,0,0],176:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.60889,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.67937,0,0],730:[0,.69444,0,0],732:[0,.67659,0,0],733:[0,.69444,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.44444,.02778,0],8212:[0,.44444,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"Script-Regular":{65:[0,.7,.22925,0],66:[0,.7,.04087,0],67:[0,.7,.1689,0],68:[0,.7,.09371,0],69:[0,.7,.18583,0],70:[0,.7,.13634,0],71:[0,.7,.17322,0],72:[0,.7,.29694,0],73:[0,.7,.19189,0],74:[.27778,.7,.19189,0],75:[0,.7,.31259,0],76:[0,.7,.19189,0],77:[0,.7,.15981,0],78:[0,.7,.3525,0],79:[0,.7,.08078,0],80:[0,.7,.08078,0],81:[0,.7,.03305,0],82:[0,.7,.06259,0],83:[0,.7,.19189,0],84:[0,.7,.29087,0],85:[0,.7,.25815,0],86:[0,.7,.27523,0],87:[0,.7,.27523,0],88:[0,.7,.26006,0],89:[0,.7,.2939,0],90:[0,.7,.24037,0]},"Size1-Regular":{40:[.35001,.85,0,0],41:[.35001,.85,0,0],47:[.35001,.85,0,0],91:[.35001,.85,0,0],92:[.35001,.85,0,0],93:[.35001,.85,0,0],123:[.35001,.85,0,0],125:[.35001,.85,0,0],710:[0,.72222,0,0],732:[0,.72222,0,0],770:[0,.72222,0,0],771:[0,.72222,0,0],8214:[-99e-5,.601,0,0],8593:[1e-5,.6,0,0],8595:[1e-5,.6,0,0],8657:[1e-5,.6,0,0],8659:[1e-5,.6,0,0],8719:[.25001,.75,0,0],8720:[.25001,.75,0,0],8721:[.25001,.75,0,0],8730:[.35001,.85,0,0],8739:[-.00599,.606,0,0],8741:[-.00599,.606,0,0],8747:[.30612,.805,.19445,0],8748:[.306,.805,.19445,0],8749:[.306,.805,.19445,0],8750:[.30612,.805,.19445,0],8896:[.25001,.75,0,0],8897:[.25001,.75,0,0],8898:[.25001,.75,0,0],8899:[.25001,.75,0,0],8968:[.35001,.85,0,0],8969:[.35001,.85,0,0],8970:[.35001,.85,0,0],8971:[.35001,.85,0,0],9168:[-99e-5,.601,0,0],10216:[.35001,.85,0,0],10217:[.35001,.85,0,0],10752:[.25001,.75,0,0],10753:[.25001,.75,0,0],10754:[.25001,.75,0,0],10756:[.25001,.75,0,0],10758:[.25001,.75,0,0]},"Size2-Regular":{40:[.65002,1.15,0,0],41:[.65002,1.15,0,0],47:[.65002,1.15,0,0],91:[.65002,1.15,0,0],92:[.65002,1.15,0,0],93:[.65002,1.15,0,0],123:[.65002,1.15,0,0],125:[.65002,1.15,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8719:[.55001,1.05,0,0],8720:[.55001,1.05,0,0],8721:[.55001,1.05,0,0],8730:[.65002,1.15,0,0],8747:[.86225,1.36,.44445,0],8748:[.862,1.36,.44445,0],8749:[.862,1.36,.44445,0],8750:[.86225,1.36,.44445,0],8896:[.55001,1.05,0,0],8897:[.55001,1.05,0,0],8898:[.55001,1.05,0,0],8899:[.55001,1.05,0,0],8968:[.65002,1.15,0,0],8969:[.65002,1.15,0,0],8970:[.65002,1.15,0,0],8971:[.65002,1.15,0,0],10216:[.65002,1.15,0,0],10217:[.65002,1.15,0,0],10752:[.55001,1.05,0,0],10753:[.55001,1.05,0,0],10754:[.55001,1.05,0,0],10756:[.55001,1.05,0,0],10758:[.55001,1.05,0,0]},"Size3-Regular":{40:[.95003,1.45,0,0],41:[.95003,1.45,0,0],47:[.95003,1.45,0,0],91:[.95003,1.45,0,0],92:[.95003,1.45,0,0],93:[.95003,1.45,0,0],123:[.95003,1.45,0,0],125:[.95003,1.45,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8730:[.95003,1.45,0,0],8968:[.95003,1.45,0,0],8969:[.95003,1.45,0,0],8970:[.95003,1.45,0,0],8971:[.95003,1.45,0,0],10216:[.95003,1.45,0,0],10217:[.95003,1.45,0,0]},"Size4-Regular":{40:[1.25003,1.75,0,0],41:[1.25003,1.75,0,0],47:[1.25003,1.75,0,0],91:[1.25003,1.75,0,0],92:[1.25003,1.75,0,0],93:[1.25003,1.75,0,0],123:[1.25003,1.75,0,0],125:[1.25003,1.75,0,0],710:[0,.825,0,0],732:[0,.825,0,0],770:[0,.825,0,0],771:[0,.825,0,0],8730:[1.25003,1.75,0,0],8968:[1.25003,1.75,0,0],8969:[1.25003,1.75,0,0],8970:[1.25003,1.75,0,0],8971:[1.25003,1.75,0,0],9115:[.64502,1.155,0,0],9116:[1e-5,.6,0,0],9117:[.64502,1.155,0,0],9118:[.64502,1.155,0,0],9119:[1e-5,.6,0,0],9120:[.64502,1.155,0,0],9121:[.64502,1.155,0,0],9122:[-99e-5,.601,0,0],9123:[.64502,1.155,0,0],9124:[.64502,1.155,0,0],9125:[-99e-5,.601,0,0],9126:[.64502,1.155,0,0],9127:[1e-5,.9,0,0],9128:[.65002,1.15,0,0],9129:[.90001,0,0,0],9130:[0,.3,0,0],9131:[1e-5,.9,0,0],9132:[.65002,1.15,0,0],9133:[.90001,0,0,0],9143:[.88502,.915,0,0],10216:[1.25003,1.75,0,0],10217:[1.25003,1.75,0,0],57344:[-.00499,.605,0,0],57345:[-.00499,.605,0,0],57680:[0,.12,0,0],57681:[0,.12,0,0],57682:[0,.12,0,0],57683:[0,.12,0,0]},"Typewriter-Regular":{32:[0,0,0,0],33:[0,.61111,0,0],34:[0,.61111,0,0],35:[0,.61111,0,0],36:[.08333,.69444,0,0],37:[.08333,.69444,0,0],38:[0,.61111,0,0],39:[0,.61111,0,0],40:[.08333,.69444,0,0],41:[.08333,.69444,0,0],42:[0,.52083,0,0],43:[-.08056,.53055,0,0],44:[.13889,.125,0,0],45:[-.08056,.53055,0,0],46:[0,.125,0,0],47:[.08333,.69444,0,0],48:[0,.61111,0,0],49:[0,.61111,0,0],50:[0,.61111,0,0],51:[0,.61111,0,0],52:[0,.61111,0,0],53:[0,.61111,0,0],54:[0,.61111,0,0],55:[0,.61111,0,0],56:[0,.61111,0,0],57:[0,.61111,0,0],58:[0,.43056,0,0],59:[.13889,.43056,0,0],60:[-.05556,.55556,0,0],61:[-.19549,.41562,0,0],62:[-.05556,.55556,0,0],63:[0,.61111,0,0],64:[0,.61111,0,0],65:[0,.61111,0,0],66:[0,.61111,0,0],67:[0,.61111,0,0],68:[0,.61111,0,0],69:[0,.61111,0,0],70:[0,.61111,0,0],71:[0,.61111,0,0],72:[0,.61111,0,0],73:[0,.61111,0,0],74:[0,.61111,0,0],75:[0,.61111,0,0],76:[0,.61111,0,0],77:[0,.61111,0,0],78:[0,.61111,0,0],79:[0,.61111,0,0],80:[0,.61111,0,0],81:[.13889,.61111,0,0],82:[0,.61111,0,0],83:[0,.61111,0,0],84:[0,.61111,0,0],85:[0,.61111,0,0],86:[0,.61111,0,0],87:[0,.61111,0,0],88:[0,.61111,0,0],89:[0,.61111,0,0],90:[0,.61111,0,0],91:[.08333,.69444,0,0],92:[.08333,.69444,0,0],93:[.08333,.69444,0,0],94:[0,.61111,0,0],95:[.09514,0,0,0],96:[0,.61111,0,0],97:[0,.43056,0,0],98:[0,.61111,0,0],99:[0,.43056,0,0],100:[0,.61111,0,0],101:[0,.43056,0,0],102:[0,.61111,0,0],103:[.22222,.43056,0,0],104:[0,.61111,0,0],105:[0,.61111,0,0],106:[.22222,.61111,0,0],107:[0,.61111,0,0],108:[0,.61111,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.22222,.43056,0,0],113:[.22222,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.55358,0,0],117:[0,.43056,0,0],118:[0,.43056,0,0],119:[0,.43056,0,0],120:[0,.43056,0,0],121:[.22222,.43056,0,0],122:[0,.43056,0,0],123:[.08333,.69444,0,0],124:[.08333,.69444,0,0],125:[.08333,.69444,0,0],126:[0,.61111,0,0],127:[0,.61111,0,0],160:[0,0,0,0],176:[0,.61111,0,0],184:[.19445,0,0,0],305:[0,.43056,0,0],567:[.22222,.43056,0,0],711:[0,.56597,0,0],713:[0,.56555,0,0],714:[0,.61111,0,0],715:[0,.61111,0,0],728:[0,.61111,0,0],730:[0,.61111,0,0],770:[0,.61111,0,0],771:[0,.61111,0,0],776:[0,.61111,0,0],915:[0,.61111,0,0],916:[0,.61111,0,0],920:[0,.61111,0,0],923:[0,.61111,0,0],926:[0,.61111,0,0],928:[0,.61111,0,0],931:[0,.61111,0,0],933:[0,.61111,0,0],934:[0,.61111,0,0],936:[0,.61111,0,0],937:[0,.61111,0,0],8216:[0,.61111,0,0],8217:[0,.61111,0,0],8242:[0,.61111,0,0],9251:[.11111,.21944,0,0]}};const a=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,r={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25]},n={" ":" ","​":" ","Å":"A","Ç":"C","Ð":"D","Þ":"o","å":"a","ç":"c","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function o(e,t){let r=e.charCodeAt(0);e[0]in n?r=n[e[0]].charCodeAt(0):a.test(e[0])&&(r=77);const o=i[t][r];return o?{defaultMetrics:!1,depth:o[0],height:o[1],italic:o[2],skew:o[3]}:11034===r?{defaultMetrics:!0,depth:0,height:1,italic:0,skew:0}:{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}function s(e,t,i=NaN){if("string"==typeof e){const i=e.match(/([-+]?[0-9.]*)\s*([a-zA-Z]+)/);i?(e=parseFloat(i[1]),t=i[2].toLowerCase()):e=parseFloat(e)}const a={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:10,bp:1.00375,dd:1238/1157,pc:12,in:72.27,mu:10/18}[t]||1;if(isFinite(i)){const t=Math.pow(10,i);return Math.round(e/10*a*t)/t}return e/10*a}function l(e,t){return s(e,t)*(4/3)*10}class c{constructor(e,t,i,a){this.id=e,this.size=t,this.cramped=a,this.sizeMultiplier=i,this.metrics=Object.keys(r).reduce((e,t)=>({...e,[t]:r[t][this.size]}),{}),this.metrics.emPerEx=r.xHeight[this.size]/r.quad[this.size]}sup(){return d[[4,5,4,5,6,7,6,7][this.id]]}sub(){return d[[5,5,5,5,7,7,7,7][this.id]]}fracNum(){return d[[2,3,4,5,6,7,6,7][this.id]]}fracDen(){return d[[3,3,5,5,7,7,7,7][this.id]]}cramp(){return d[[1,1,3,3,5,5,7,7][this.id]]}cls(){return["displaystyle textstyle","textstyle","scriptstyle","scriptscriptstyle"][this.size]}adjustTo(e){let t=[["","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-textstyle displaystyle textstyle","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-scriptstyle textstyle displaystyle","reset-scriptstyle textstyle","","reset-scriptstyle scriptscriptstyle"],["reset-scriptscriptstyle textstyle displaystyle","reset-scriptscriptstyle textstyle","reset-scriptscriptstyle scriptstyle",""]][this.size][e.size];return t.length>0&&(t=" "+t),t}isTight(){return this.size>=2}}const d={0:new c(0,0,1,!1),1:new c(1,0,1,!0),2:new c(2,1,1,!1),3:new c(3,1,1,!0),4:new c(4,2,.7,!1),5:new c(5,2,.7,!0),6:new c(6,3,.5,!1),7:new c(7,3,.5,!0)};d.displaystyle=d[0],d.textstyle=d[2],d.scriptstyle=d[4],d.scriptscriptstyle=d[6];class m{constructor(e){var t,i,a,r,n,o;this.macros=null!==(t=e.macros)&&void 0!==t?t:{},this.atomIdsSettings=e.atomIdsSettings,this.mathstyle=null!==(i=e.mathstyle)&&void 0!==i?i:d.displaystyle,this.letterShapeStyle=null!==(a=e.letterShapeStyle)&&void 0!==a?a:"tex",this.size=null!==(r=e.size)&&void 0!==r?r:"size5",this.parentMathstyle=null!==(n=e.parentMathstyle)&&void 0!==n?n:this.mathstyle,this.parentSize=null!==(o=e.parentSize)&&void 0!==o?o:this.size,this.opacity=e.opacity,this.smartFence=e.smartFence}clone(e={}){const t=new m(this);return void 0!==e&&(Object.assign(t,e),e.mathstyle?(t.parentMathstyle=this.mathstyle,t.parentSize=this.size,"string"==typeof e.mathstyle&&(t.mathstyle=d[e.mathstyle])):t.mathstyle=this.mathstyle),t}setMathstyle(e){e&&"auto"!==e&&(this.mathstyle=d[e])}cramp(){return this.clone({mathstyle:this.mathstyle.cramp()})}sup(){return this.clone({mathstyle:this.mathstyle.sup()})}sub(){return this.clone({mathstyle:this.mathstyle.sub()})}}const p={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},u={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34]},h={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",widetilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",widetilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",widetilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",widetilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};function f(e){let t="",i="";for(const a of e)a&&(/[a-zA-Z*]/.test(a[0])&&(i+=t),t=/\\[a-zA-Z]+\*?$/.test(a)?" ":"",i+=a);return i}function g(e){return f(e.map(e=>{var t;return null!==(t={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])&&void 0!==t?t:e}))}function y(e,t){const i=[];let a,r=[];return e.forEach(e=>{if("first"!==e.type){let n;"variant"===t?(n=e.variant,e.variantStyle&&"up"!==e.variantStyle&&(n+="-"+e.variantStyle)):n=e[t],n!==a?(r.length>0&&i.push(r),r=[e],a=n):r.push(e)}}),r.length>0&&i.push(r),i}const b={};function v(e,t){b[e]={...t}}const x=["","mord","mbin","mop","mrel","mopen","mclose","mpunct","minner","spacing","first","command","error","placeholder","textord","none"];function k(e){return x.includes(e)}const _={"mord+mop":3,"mord+mbin":4,"mord+mrel":5,"mord+minner":3,"mop+mord":3,"mop+mop":3,"mop+mbin":5,"mop+minner":3,"mbin+mord":4,"mbin+mop":4,"mbin+mopen":4,"mbin+minner":4,"mrel+mord":5,"mrel+mop":5,"mrel+mopen":5,"mrel+minner":5,"mclose+mop":3,"mclose+mbin":4,"mclose+mrel":5,"mclose+minner":3,"mpunct+mord":3,"mpunct+mop":3,"mpunct+mbin":4,"mpunct+mrel":5,"mpunct+mopen":3,"mpunct+mpunct":3,"mpunct+minner":3},w={"mord+mop":3,"mop+mord":3,"mop+mop":3,"mclose+mop":3,"minner+mop":3};function M(e){if("string"==typeof e)return e;if("number"==typeof e)return Number(Math.ceil(100*e)/100).toString();if(void 0===e)return"";if(t(e)){let t="";for(const i of e)t+=M(i);return t}return""}class S{constructor(e,i="",a=""){this.classes=i,t(e)?this.children=[].concat(...e):"string"==typeof e?this.body=e:e&&"object"==typeof e&&(this.children=[e]),this.type=a,this.style=null,this.updateDimensions()}updateDimensions(){let e=0,t=0,i=1;this.children?this.children.forEach(a=>{a.height>e&&(e=a.height),a.depth>t&&(t=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}):"string"==typeof this.body&&(e=1.2,t=0),this.height=e,this.depth=t,this.maxFontSize=i}selected(e){e&&!/ML__selected/.test(this.classes)&&(this.classes.length>0&&(this.classes+=" "),this.classes+="ML__selected"),!e&&/ML__selected/.test(this.classes)&&(this.classes=this.classes.replace("ML__selected","")),this.children&&this.children.forEach(t=>t.selected(e))}applyStyle(e){if(!e)return;if(e.color&&("none"!==e.color?this.setStyle("color",e.color):this.setStyle("color","")),e.backgroundColor&&("none"!==e.backgroundColor?this.setStyle("background-color",e.backgroundColor):this.setStyle("background-color","")),e.cssClass&&(this.classes+=" "+e.cssClass),!this.body)return;const t=function(e,t){var i;return(null===(i=b[t.mode])||void 0===i?void 0:i.applyStyle)?b[t.mode].applyStyle(e,t):""}(this,e);if(this.body&&t){this.maxFontSize={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49}[e.fontSize]||1,this.height=0,this.depth=0,this.skew=0,this.italic=0;for(let e=0;e0&&(this.style||(this.style={}),this.style[e]=i)}setTop(e){e&&0!==e&&(this.style||(this.style={}),this.style.top=M(e)+"em",this.height-=e,this.depth+=e)}setLeft(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-left"]=M(e)+"em")}setRight(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-right"]=M(e)+"em")}setWidth(e){e&&0!==e&&(this.style||(this.style={}),this.style.width=M(e)+"em")}toMarkup(e=1,t=1){var i,a,r,n,o;let s="",l=this.body||"";if(this.children){let e="none";for(let r=0;r`${e}="${this.attributes[e]}"`).join(" "));const t=this.classes.split(" ");t.push(null!==(r={command:"ML__command",placeholder:"ML__placeholder",error:"ML__error"}[this.type])&&void 0!==r?r:""),this.caret&&"command"===this.type&&t.push("ML__command-caret");let i="";if(i=t.length>1?t.filter((e,t,i)=>e.length>0&&i.indexOf(e)===t).join(" "):t[0],i.length>0&&(s+=` class="${i}"`),e&&((null===(n=this.style)||void 0===n?void 0:n["margin-left"])?this.style["margin-left"]=M(parseFloat(this.style["margin-left"])+e/18)+"em":(this.style||(this.style={}),this.style["margin-left"]=M(e/18)+"em")),this.style){let e="";const t=/ML__selected/.test(this.classes);for(const i in this.style)Object.prototype.hasOwnProperty.call(this.style,i)&&("background-color"===i&&t||(e+=i+":"+this.style[i]+";"));e.length>0&&(s+=' style="'+e+'"')}s+=">",this.svgBody?s+=function(e){if(u[e]){const t=u[e][2];return``}const[t,i,a,r]=p[e];let n,o;const s=a/1e3;3===t.length?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):2===t.length?(n=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],o=[r]);const l=t.map((e,t)=>``).join("");return`${l}`}(this.svgBody):this.svgOverlay?(s+='",s+=""):s+=l,s+=""}else s="";return this.caret&&"command"!==this.type&&("text"===this.caret?s+='':s+=''),s}tryCoalesceWith(e){if(this.type!==e.type)return!1;if("error"===this.type||"placeholder"===this.type||"command"===this.type)return!1;if(this.svgBody||!this.body)return!1;if(e.svgBody||!e.body)return!1;const t=this.children&&this.children.length>0,i=e.children&&e.children.length>0;if(t||i)return!1;if((this.style?this.style.length:0)!==(e.style?e.style.length:0))return!1;const a=this.classes.trim().replace(/\s+/g," ").split(" "),r=e.classes.trim().replace(/\s+/g," ").split(" ");if(a.length!==r.length)return!1;a.sort(),r.sort();for(let e=0;e=e.length)return"none";const s=null!==(a=null===(i=e[t-1])||void 0===i?void 0:i.type)&&void 0!==a?a:"none",l=null!==(n=null===(r=e[t+1])||void 0===r?void 0:r.type)&&void 0!==n?n:"none";let c=null!==(o=e[t].type)&&void 0!==o?o:"none";return"first"===c?"none":"textord"===c?"mord":("mbin"===c&&(/first|none|mrel|mpunct|mopen|mbin|mop/.test(s)||/none|mrel|mpunct|mclose/.test(l))&&(c="mord"),c)}function L(e){return e?t(e)?e.reduce((e,t)=>Math.max(e,t.height),0):e.height:0}function A(e){return e?t(e)?e.reduce((e,t)=>Math.max(e,t.depth),0):e.depth:0}function q(e){return e?t(e)?e[e.length-1].italic:e.italic:0}function $(e,i="",a=""){if(t(e)){const t=e.filter(e=>Boolean(e));return 1===t.length?new S(t[0],i,a):new S(t,i,a)}return new S(e,i,a)}function C(e,t,i="",a=""){const r=new S(t,i,a),n=o(t,e);return r.height=n.height,r.depth=n.depth,r.skew=n.skew,r.italic=n.italic,r.setRight(r.italic),r}function D(e,i="",a=""){const r=$("","ML__strut");let n,o;return r.setStyle("height",L(e),"em"),0!==A(e)&&(n=$("","ML__strut--bottom"),n.setStyle("height",L(e)+A(e),"em"),n.setStyle("vertical-align",-A(e),"em")),o=t(e)?[r,n,...e]:[r,n,e],$(o,i,a)}function T(e,t,i,a,r){r=r||"";const n=E(t,(r+=" style-wrap ")+i.adjustTo(a));n.type=e;const o=a.sizeMultiplier/i.sizeMultiplier;return n.height*=o,n.depth*=o,n.maxFontSize=a.sizeMultiplier,n}function E(e,t="",i=""){const a=new S(e,t,i);let r=1;return r=e instanceof S?e.maxFontSize:e.reduce((e,t)=>Math.max(e,t.maxFontSize),r),a.height*=r,a.depth*=r,a}function K(e,i,a="shift",r=0){let n=0,o=0;a=a||"shift";for(let e=0;e0?"em":""),a.attributes={"aria-hidden":"true"}),"size5"!==e.size?new S(a,"fontsize-ensurer reset-"+e.size+" size5"):0!==i?a:null}(e,s),c=[];o=n;for(const e of i)if("number"==typeof e)o+=e;else if(e instanceof S){const t=$([l,e]);t.setTop(-e.depth-o),c.push(t),o+=e.height+e.depth}const d=$(c,"vlist");return d.depth=Math.max(n,A(d)||0),d.height=Math.max(-o,L(d)||0),d}function N(e){const t=new S(null);return t.svgBody=e,t.height=function(e){return p[e]?p[e][2]/1e3:u[e][2]}(e)/2,t.depth=t.height,t}const O={},B={"<":"<",">":">",o:"o","&":"\\&","{":"\\{","}":"\\}","[":"\\lbrack","]":"\\rbrack",":":"\\colon"," ":"~","¬":"\\neg","·":"\\cdot","¼":"\\frac{1}{4}","½":"\\frac{1}{2}","¾":"\\frac{3}{4}","⁰":"^{0}","ⁱ":"^{i}","¹":"^{1}","²":"^{2}","³":"^{3}","†":"\\dagger","‡":"\\ddagger","…":"\\ldots","⁴":"^{4}","⁵":"^{5}","⁶":"^{6}","⁷":"^{7}","⁸":"^{8}","⁹":"^{9}","⁺":"^{+}","⁻":"^{-}","⁼":"^{=}","ⁿ":"^{n}","₀":"_{0}","₁":"_{1}","₂":"_{2}","₃":"_{3}","₄":"_{4}","₅":"_{5}","₆":"_{6}","₇":"_{7}","₈":"_{8}","₉":"_{9}","₊":"_{+}","₋":"_{-}","₌":"_{=}","ₐ":"_{a}","ₑ":"_{e}","ₒ":"_{o}","ₓ":"_{x}","′":"\\prime","'":"\\prime","←":"\\gets","→":"\\to","△":"\\triangle","▽":"\\triangledown","∋":"\\owns","∗":"\\ast","∣":"\\vert","∥":"\\Vert","∧":"\\land","∨":"\\lor","⋅":"\\cdot","⋈":"\\bowtie","≠":"\\ne","≤":"\\le","≥":"\\ge","⊥":"\\bot","⟷":"\\biconditional","⟸":"\\impliedby","⟹":"\\implies","ℂ":"\\C","ℕ":"\\N","ℙ":"\\P","ℚ":"\\Q","ℝ":"\\R","ℤ":"\\Z"},F={},P={},R={iff:"\\;⟺\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",bra:"\\mathinner{\\langle{#1}|}",ket:"\\mathinner{|{#1}\\rangle}",braket:"\\mathinner{\\langle{#1}\\rangle}",set:"\\mathinner{\\lbrace #1 \\rbrace}",Bra:"\\left\\langle #1\\right|",Ket:"\\left|#1\\right\\rangle",Braket:"\\left\\langle{#1}\\right\\rangle",Set:"\\left\\lbrace #1 \\right\\rbrace",rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}"},I={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},H={"\\#":"#","\\&":"&","\\$":"$","\\%":"%","\\_":"_","\\euro":"€","\\maltese":"✠","\\{":"{","\\}":"}","\\nobreakspace":" ","\\ldots":"…","\\textellipsis":"…","\\backslash":"\\","`":"‘","'":"’","``":"“","''":"”","\\degree":"°","\\textasciicircum":"^","\\textasciitilde":"~","\\textasteriskcentered":"*","\\textbackslash":"\\","\\textbraceleft":"{","\\textbraceright":"}","\\textbullet":"•","\\textdollar":"$","\\textsterling":"£","\\textdagger":"†","\\textdaggerdbl":"‡","–":"–","—":"—","‘":"‘","’":"’","“":"“","”":"”",'"':"”","\\ss":"ß","\\ae":"æ","\\oe":"œ","\\AE":"Æ","\\OE":"Œ","\\O":"Ø","\\i":"ı","\\j":"ȷ","\\aa":"å","\\AA":"Å"},W=/[a-zA-Z0-9!@*()-=+{}[\]\\';:?/.,~<>`|'$%#&^_" ]/,V="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("\\p{Letter}","u"),U="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[0-9a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("[0-9\\p{Letter}]","u");function j(e,t,i="mord",a=""){O[e]={type:i,variant:a,value:t},B[t]||a||(B[t]=e),H[e]=t}function G(e,t){for(let i=e;i<=t;i++){const e=String.fromCodePoint(i);j(e,e)}}function X(e,t){return"math"===e?B[t]||t:"text"===e&&Object.keys(H).find(e=>H[e]===t)||t}const Z={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},Y=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Q(e,t,i){if(!/[A-Za-z0-9]/.test(e))return e;if(!t&&!i)return e;const a=e.codePointAt(0);for(let e=0;e=Y[e].offset&&a120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const i in Z)if(Object.prototype.hasOwnProperty.call(Z,i)&&Z[i]===e){e=null!==(t=i.codePointAt(0))&&void 0!==t?t:0;break}for(let t=0;t=Y[t].start&&e=1;)a.params.push({isOptional:!1,type:"math"}),r-=1}}}else"math"===t?a=O[e]:H[e]&&(a={value:H[e]});return!a||"mord"!==a.type||"f"!==a.value&&"g"!==a.value&&"h"!==a.value||(a.isFunction=!0),a}function ne(e){if(e.length<=1)return[];const t=[];for(const i in F)Object.prototype.hasOwnProperty.call(F,i)&&i.startsWith(e)&&!F[i].infix&&t.push({match:i,frequency:F[i].frequency});for(const i in O)Object.prototype.hasOwnProperty.call(O,i)&&i.startsWith(e)&&t.push({match:i,frequency:O[i].frequency});return t.sort((e,t)=>e.frequency===t.frequency?e.match.length-t.match.length:(t.frequency||0)-(e.frequency||0)),t}function oe(e){let t="auto";const i=e.match(/:([^=]+)/);return i&&(t=i[1].trim()),t}function se(e){if(!e)return[];let t=[],i=e.split("]");if("["===i[0].charAt(0)){t.push({isOptional:!0,type:oe(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(se(i[e]))}else if(i=e.split("}"),"{"===i[0].charAt(0)){t.push({isOptional:!1,type:oe(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(se(i[e]))}return t}function le(e){let t="",i=!0;return e.forEach(e=>{"string"==typeof e.body?t+=e.body:i=!1}),i?t:""}function ce(e,t,i,a=!1){"string"==typeof e&&(e=[e]);const r={tabular:a,params:se(t),parser:i};for(const t of e)P[t]=r}function de(e,t,i){ce(e,t,i,!0)}function me(e,t,i,a,r){"string"==typeof e&&(e=[e]),i||(i={});const n={params:se(t),mode:i.mode,infix:Boolean(i.infix),parse:a,emit:r};e.forEach(e=>{F["\\"+e]=n})}const pe={acute:"ˊ",grave:"ˋ",dot:"˙",ddot:"¨",mathring:"˚",tilde:"~",bar:"ˉ",breve:"˘",check:"ˇ",hat:"^",vec:"⃗"};me(Object.keys(pe),"{body:auto}",null,(function(e,t){return{type:"accent",accent:pe[e.slice(1)],limits:"accent",skipBoundary:!0,body:t[0]}})),me(["widehat","widecheck","widetilde"],"{body:auto}",null,(e,t)=>{const i=le(t[0]);return{type:"accent",svgAccent:e.slice(1)+(i.length>5?"4":["1","1","2","2","3","3"][i.length]),limits:"accent",skipBoundary:!0,body:t[0]}}),me("utilde","{body:auto}",null,(e,t)=>{const i=le(t[0]),a="widetilde"+(i.length>5?"4":["1","1","2","2","3","3"][i.length]);return{type:"overunder",body:t[0],svgBelow:a,skipBoundary:!0}},(e,t,i,a)=>`\\utilde{${a(i,i.body)}}`),me("^","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[t[0]]||"^"})),me("`","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[t[0]]||"`"})),me("'","{:string}",{},(function(e,t){return{type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[t[0]]||"^"}})),me("~","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[t[0]]||"´"})),me("c","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{c:"ç",C:"Ç"}[t[0]]||""})),me("enclose","{notation:string}[style:string]{body:auto}",null,(e,t)=>{const i={type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",captureSelection:!0,body:t[2]};if(t[1]){const e=t[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const t of e){const e=t.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(e)i.strokeWidth=l(e[1],"px"),isFinite(i.strokeWidth)||(i.strokeWidth=1),i.strokeStyle=e[2],i.strokeColor=e[3];else{const e=t.match(/\s*([a-z]*)\s*=\s*"(.*)"/);e&&("mathbackground"===e[1]?i.backgroundcolor=e[2]:"mathcolor"===e[1]?i.strokeColor=e[2]:"padding"===e[1]?i.padding=l(e[2],"px"):"shadow"===e[1]&&(i.shadow=e[2]))}}"dashed"===i.strokeStyle?i.svgStrokeStyle="5,5":"dotted"===i.strokeStyle&&(i.svgStrokeStyle="1,5")}return i.borderStyle=i.strokeWidth+"px "+i.strokeStyle+" "+i.strokeColor,i.notation={},t[0].split(/[, ]/).filter(e=>e.length>0).forEach(e=>{i.notation[e.toLowerCase()]=!0}),i.notation.updiagonalarrow&&(i.notation.updiagonalstrike=!1),i.notation.box&&(i.notation.left=!1,i.notation.right=!1,i.notation.bottom=!1,i.notation.top=!1),i}),me("cancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0},body:t[0]}})),me("bcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{downdiagonalstrike:!0},body:t[0]}})),me("xcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0,downdiagonalstrike:!0},body:t[0]}})),ce("math","",()=>({mathstyle:"textstyle"})),ce("displaymath","",(function(){return{mathstyle:"displaystyle"}})),de("array","{columns:colspec}",(e,t)=>({colFormat:t[0],mathstyle:"textstyle"})),de(["equation","equation","subequations"],"",()=>({colFormat:[{align:"c"}]})),de("multline","",(function(){return{colFormat:[{align:"m"}]}})),de(["align","align*","aligned","eqnarray"],"",(e,t,i)=>{let a=0;for(const e of i)a=Math.max(a,e.length);const r=[{gap:0},{align:"r"},{gap:0},{align:"l"}];let n=2;for(;n({colFormat:[{align:"r"},{align:"l"}]})),de(["gather","gathered"],"",()=>({colFormat:[{gap:.25},{align:"c"},{gap:0}],jot:.3})),de(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","smallmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*","smallmatrix*"],"[columns:colspec]",(e,t)=>{var i;const a={mathstyle:"textstyle"};switch(e){case"pmatrix":case"pmatrix*":a.leftDelim="(",a.rightDelim=")";break;case"bmatrix":case"bmatrix*":a.leftDelim="[",a.rightDelim="]";break;case"Bmatrix":case"Bmatrix*":a.leftDelim="\\lbrace",a.rightDelim="\\rbrace";break;case"vmatrix":case"vmatrix*":a.leftDelim="\\vert",a.rightDelim="\\vert";break;case"Vmatrix":case"Vmatrix*":a.leftDelim="\\Vert",a.rightDelim="\\Vert";break;case"smallmatrix":case"smallmatrix*":a.mathstyle="scriptstyle";break;case"matrix":case"matrix*":a.leftDelim=".",a.rightDelim="."}return a.colFormat=null!==(i=t[0])&&void 0!==i?i:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}],a}),de("cases","",()=>({arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",colFormat:[{align:"l"},{gap:1},{align:"l"}]})),ce("center","",(function(){return{colFormat:[{align:"c"}]}})),me(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overbrace","overlinesegment","overgroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgAbove:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),me(["underrightarrow","underleftarrow","underleftrightarrow","underbrace","underlinesegment","undergroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgBelow:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),me(["xrightarrow","xleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","xLeftrightarrow","xrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xrightleftarrows","xrightequilibrium","xleftequilibrium"],"[:auto]{:auto}",null,(e,t)=>{let i=t[1];return 0===(null==i?void 0:i.length)&&(i=null),{type:"overunder",mathtype:"mrel",svgBody:e.slice(1),overscript:i,underscript:t[0],skipBoundary:!0}},(e,t,i,a)=>e+(void 0!==i.underscript?`[${a(i,i.underscript)}]`:"")+`{${a(i,i.overscript)}}`),me(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","coth","ctg","cth","cotg","csc","cosec","deg","dim","exp","hom","inf","ker","lg","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main",variantStyle:"up"}})),me(["liminf","limsup"],"",null,e=>({type:"mop",limits:"limits",isSymbol:!1,body:{"\\liminf":"lim inf","\\limsup":"lim sup"}[e],variant:"main"})),me(["lim","mod"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,body:e.slice(1),variant:"main"}})),me(["det","max","min"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main"}})),me("sqrt","[index:auto]{radicand:auto}",null,(e,t)=>({type:"surd",body:t[1],index:t[0]}),(e,t,i,a)=>{let r="";return void 0!==i.index&&(r+=`[${a(i,i.index)}]`),r+=`{${a(i,i.body)}}`,e+r}),me(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{numerator}{denominator}",null,(e,t)=>{const i={type:"genfrac",numer:t[0],denom:t[1],mathstyle:"auto"};switch(e){case"\\dfrac":case"\\frac":case"\\tfrac":case"\\cfrac":i.hasBarLine=!0;break;case"\\\\atopfrac":i.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i.hasBarLine=!1,i.leftDelim="(",i.rightDelim=")"}switch(e){case"\\dfrac":case"\\dbinom":i.mathstyle="displaystyle";break;case"\\tfrac":case"\\tbinom":i.mathstyle="textstyle"}return"\\cfrac"===e&&(i.continuousFraction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),me(["over","atop","choose"],"",{infix:!0},(e,t)=>{const i=t[0],a=t[1];let r=!1,n=null,o=null;switch(e){case"\\atop":break;case"\\over":r=!0;break;case"\\choose":r=!1,n="(",o=")";break;default:throw new Error("Unrecognized genfrac command")}return{type:"genfrac",numer:i,denom:a,hasBarLine:r,leftDelim:n,rightDelim:o,mathstyle:"auto"}},(e,t,i,a)=>`{${a(i,i.numer)}${e} ${a(i,i.denom)}}`),me("pdiff","{numerator}{denominator}",null,(e,t)=>({type:"genfrac",numer:t[0],denom:t[1],numerPrefix:"∂",denomPrefix:"∂",hasBarLine:!0,leftDelim:null,rightDelim:null,mathstyle:"auto"}),(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),me(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","smallint","intop"],"",null,e=>({type:"mop",limits:"auto",isSymbol:!0,variant:"main",body:{coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[e.slice(1)]}));const ue={int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑",sqcup:"⊔",sqcap:"⊓",uplus:"⊎",wr:"≀",amalg:"⨿",Cap:"⋒",Cup:"⋓",doublecap:"⋒",doublecup:"⋓"};me(Object.keys(ue),"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!0,body:ue[e.slice(1)],variant:{"⋒":"ams","⋓":"ams"}[ue[e.slice(1)]]}})),me(["Re","Im"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:{"\\Re":"ℜ","\\Im":"ℑ"}[e],variant:"fraktur"}})),me("middle","{:delim}",null,(function(e,t){return{type:"delim",delim:t[0]}}));const he={m0:"#3f3d99",m1:"#993d71",m2:"#998b3d",m3:"#3d9956",m4:"#3d5a99",m5:"#993d90",m6:"#996d3d",m7:"#43993d",m8:"#3d7999",m9:"#843d99"},fe=["#d35d60","#7293cb","#e1974d","#84bb5d","#9066a7","#aD6a58","#f5a4ce","#fff590","#212121","#818787","#d4d5d2","#ffffff"],ge=["#cc2428","#3769b1","#da7e30","#409852","#6b4c9a","#922426","#e7298a","#ffe907","#000000","#525055","#adafaa","#ffffff"],ye={apricot:"#FBB982",aquamarine:"#00B5BE",bittersweet:"#C04F17",black:"#221E1F",blue:"#2D2F92",bluegreen:"#00B3B8",blueviolet:"#473992",brickred:"#B6321C",brown:"#792500",burntorange:"#F7921D",cadetblue:"#74729A",carnationpink:"#F282B4",cerulean:"#00A2E3",cornflowerblue:"#41B0E4",cyan:"#00AEEF",dandelion:"#FDBC42",darkorchid:"#A4538A",emerald:"#00A99D",forestgreen:"#009B55",fuchsia:"#8C368C",goldenrod:"#FFDF42",gray:"#949698",green:"#00A64F",greenyellow:"#DFE674",junglegreen:"#00A99A",lavender:"#F49EC4",limegreen:"#8DC73E",magenta:"#EC008C",mahogany:"#A9341F",maroon:"#AF3235",melon:"#F89E7B",midnightblue:"#006795",mulberry:"#A93C93",navyblue:"#006EB8",olivegreen:"#3C8031",orange:"#F58137",orangered:"#ED135A",orchid:"#AF72B0",peach:"#F7965A",periwinkle:"#7977B8",pinegreen:"#008B72",plum:"#92268F",processblue:"#00B0F0",purple:"#99479B",rawsienna:"#974006",red:"#ED1B23",redorange:"#F26035",redviolet:"#A1246B",rhodamine:"#EF559F",royalblue:"#0071BC",royalpurple:"#613F99",rubinered:"#ED017D",salmon:"#F69289",seagreen:"#3FBC9D",sepia:"#671800",skyblue:"#46C5DD",springgreen:"#C6DC67",tan:"#DA9D76",tealblue:"#00AEB3",thistle:"#D883B7",turquoise:"#00B4CE",violet:"#58429B",violetred:"#EF58A0",white:"#FFFFFF",wildstrawberry:"#EE2967",yellow:"#FFF200",yellowgreen:"#98CC70",yelloworange:"#FAA21A"};function be(e){var t;const i=e.toLowerCase().split("!");let a,r,n,o=255,s=255,l=255,c=-1;const d=i.length>0&&"-"===i[0].charAt(0);d&&(i[0]=i[0].slice(1));for(let e=0;e=0&&(o=(1-c)*o+c*a,s=(1-c)*s+c*r,l=(1-c)*l+c*n,c=-1),e+1=0&&(o=c*o+(1-c)*a,s=c*s+(1-c)*r,l=c*l+(1-c)*n),d&&(o=255-o,s=255-s,l=255-l),"#"+("00"+Math.round(o).toString(16)).slice(-2)+("00"+Math.round(s).toString(16)).slice(-2)+("00"+Math.round(l).toString(16)).slice(-2)}function ve(e){let t=e.toUpperCase();for(const e in ye)if(ye[e]===t){t=e;break}for(const e in he)if(he[e]===t){t=e;break}return t}me("ensuremath","{:math}",{},(e,t)=>({type:"group",mode:"math",body:t[0],skipBoundary:!0,latexOpen:"\\ensuremath{",latexClose:"}"}),(e,t,i,a)=>a(i,i.body)),me("color","{:color}",{},(e,t)=>({color:t[0]})),me("textcolor","{:color}{content:auto*}",{},(e,t)=>({color:t[0]})),me("boxed","{content:math}",null,(e,t)=>({type:"box",framecolor:"black",skipBoundary:!0,body:t[0]})),me("colorbox","{background-color:string}{content:auto}",{},(e,t)=>({type:"box",backgroundcolor:be(t[0]),skipBoundary:!0,body:t[1],verbatimBackgroundcolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimBackgroundcolor||ve(i.backgroundcolor)}}{${a(i,i.body)}}`),me("fcolorbox","{frame-color:string}{background-color:string}{content:auto}",{},(e,t)=>({type:"box",framecolor:be(t[0]),backgroundcolor:be(t[1]),skipBoundary:!0,body:t[2],verbatimBackgroundcolor:t[1],verbatimFramecolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimFramecolor||ve(i.framecolor)}{${i.verbatimBackgroundcolor||ve(i.backgroundcolor)}}{${a(i,i.body)}}`),me("bbox","[:bbox]{body:auto}",{},(e,t)=>{if(t[0]){const e=t[0];return{type:"box",padding:e.padding,border:e.border,backgroundcolor:e.backgroundcolor,skipBoundary:!0,body:t[1]}}return{type:"box",skipBoundary:!0,body:t[1]}},(e,t,i,a)=>{let r=e;if(isFinite(i.padding)||void 0!==i.border||void 0!==i.backgroundcolor){const e=[];isFinite(i.padding)&&e.push(Math.floor(100*i.padding)/100+"em"),i.border&&e.push("border:"+i.border),i.backgroundcolor&&e.push(ve(i.backgroundcolor)),r+=`[${e.join(",")}]`}return r+`{${a(i,i.body)}}`}),me(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"",{},(e,t)=>({mathstyle:e.slice(1)})),me(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{mode:"text"},(e,t)=>({fontSize:{tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[e.slice(1)]})),me("fontseries","{:string}",{mode:"text"},(e,t)=>({fontSeries:t[0]})),me("fontshape","{:string}",{mode:"text"},(e,t)=>({fontShape:t[0]})),me("fontfamily","{:string}",{mode:"text"},(e,t)=>({fontFamily:t[0]})),me("selectfont","",{mode:"text"},(e,t)=>({})),me("bf","",{},(e,t)=>({fontSeries:"b",fontShape:"n",fontFamily:"cmr"})),me(["boldsymbol","bm"],"{:math*}",{},(e,t)=>({mode:"math",cssClass:"ML__boldsymbol"})),me("bold","{:math*}",{},(e,t)=>({mode:"math",variantStyle:"bold"})),me("bfseries","",{mode:"text"},(e,t)=>({fontSeries:"b"})),me("mdseries","",{mode:"text"},(e,t)=>({fontSeries:"m"})),me("upshape","",{mode:"text"},(e,t)=>({fontShape:"n"})),me("slshape","",{mode:"text"},(e,t)=>({fontShape:"sl"})),me("scshape","",{mode:"text"},(e,t)=>({fontShape:"sc"})),me("textbf","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"b"})),me("textmd","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"m"})),me("textup","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n"})),me("textnormal","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n",fontSeries:"m"})),me("textsl","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sl"})),me("textit","{:text*}",{},(e,t)=>({mode:"text",fontShape:"it"})),me("textsc","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sc"})),me("textrm","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"roman"})),me("textsf","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"sans-serif"})),me("texttt","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"monospace"})),me("mathbf","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bold"})),me("mathit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"italic"})),me("mathbfit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bolditalic"})),me("mathrm","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"up"})),me("mathsf","{:math*}",{},(e,t)=>({mode:"math",variant:"sans-serif",variantStyle:"up"})),me("mathtt","{:math*}",{},(e,t)=>({mode:"math",variant:"monospace",variantStyle:"up"})),me("it","",{},(e,t)=>({fontSeries:"m",fontShape:"it",fontFamily:"cmr",variantStyle:"italic"})),me("rmfamily","",{},(e,t)=>({fontFamily:"roman"})),me("sffamily","",{},(e,t)=>({fontFamily:"sans-serif"})),me("ttfamily","",{},(e,t)=>({fontFamily:"monospace"})),me(["Bbb","mathbb"],"{:math*}",{},(e,t)=>({variant:"double-struck",variantStyle:"up"})),me(["frak","mathfrak"],"{:math*}",{},(e,t)=>({variant:"fraktur",variantStyle:"up"})),me("mathcal","{:math*}",{},(e,t)=>({variant:"calligraphic",variantStyle:"up"})),me("mathscr","{:math*}",{},(e,t)=>({variant:"script",variantStyle:"up"})),me("mbox","{:text}",null,(e,t)=>({type:"group",mode:"math",body:t[0]})),me("text","{:text*}",null,(e,t)=>({mode:"text"})),me("class","{name:string}{content:auto*}",null,(e,t)=>({cssClass:t[0]})),me("cssId","{id:string}{content:auto}",null,(e,t)=>({type:"group",body:t[1],cssId:t[0]})),me("em","",null,(e,t)=>({cssClass:"ML__emph"})),me("emph","{:auto}",null,(e,t)=>({cssClass:"ML__emph",body:t[0],type:"group",skipBoundary:!0}));const xe={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};function ke(e,t,i,a,r,n=""){const o=T(e,C("Size"+i+"-Regular",te("math",t),"delimsizing size"+i),r.mathstyle,d.textstyle,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}function _e(e,t){let i="";return"Size1-Regular"===t?i=" delim-size1":"Size4-Regular"===t&&(i=" delim-size4"),C(t,te("math",e),"delimsizinginner"+i)}function we(e,t,i,a,r,n=""){let s,l,c,m;s=c=m=te("math",t),l=null;let p="Size1-Regular";"\\vert"===t||"\\lvert"===t||"\\rvert"===t||"\\mvert"===t||"\\mid"===t?c=s=m="∣":"\\Vert"===t||"\\lVert"===t||"\\rVert"===t||"\\mVert"===t||"\\|"===t?c=s=m="∥":"\\uparrow"===t?c=m="⏐":"\\Uparrow"===t?c=m="‖":"\\downarrow"===t?s=c="⏐":"\\Downarrow"===t?s=c="‖":"\\updownarrow"===t?(s="↑",c="⏐",m="↓"):"\\Updownarrow"===t?(s="⇑",c="‖",m="⇓"):"["===t||"\\lbrack"===t?(s="⎡",c="⎢",m="⎣",p="Size4-Regular"):"]"===t||"\\rbrack"===t?(s="⎤",c="⎥",m="⎦",p="Size4-Regular"):"\\lfloor"===t?(c=s="⎢",m="⎣",p="Size4-Regular"):"\\lceil"===t?(s="⎡",c=m="⎢",p="Size4-Regular"):"\\rfloor"===t?(c=s="⎥",m="⎦",p="Size4-Regular"):"\\rceil"===t?(s="⎤",c=m="⎥",p="Size4-Regular"):"("===t?(s="⎛",c="⎜",m="⎝",p="Size4-Regular"):")"===t?(s="⎞",c="⎟",m="⎠",p="Size4-Regular"):"\\{"===t||"\\lbrace"===t?(s="⎧",l="⎨",m="⎩",c="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",l="⎬",m="⎭",c="⎪",p="Size4-Regular"):"\\lgroup"===t?(s="⎧",m="⎩",c="⎪",p="Size4-Regular"):"\\rgroup"===t?(s="⎫",m="⎭",c="⎪",p="Size4-Regular"):"\\lmoustache"===t?(s="⎧",m="⎭",c="⎪",p="Size4-Regular"):"\\rmoustache"===t?(s="⎫",m="⎩",c="⎪",p="Size4-Regular"):"\\surd"===t?(s="",m="⎷",c="",p="Size4-Regular"):"\\ulcorner"===t?(s="┌",c=m=" "):"\\urcorner"===t?(s="┐",c=m=" "):"\\llcorner"===t?(m="└",c=s=" "):"\\lrcorner"===t&&(s="┘",c=s=" ");const u=o(te("math",s),p),h=u.height+u.depth,f=o(te("math",c),p),g=f.height+f.depth,y=o(te("math",m),p),b=y.height+y.depth;let v=0,x=1;if(null!==l){const e=o(te("math",l),p);v=e.height+e.depth,x=2}const k=h+b+v,_=Math.ceil((i-k)/(x*g)),w=k+_*x*g;let M=r.mathstyle.metrics.axisHeight;a&&(M*=r.mathstyle.sizeMultiplier);const S=w/2-M,z=[];if(z.push(_e(m,p)),null===l)for(let e=0;e<_;e++)z.push(_e(c,p));else{for(let e=0;e<_;e++)z.push(_e(c,p));z.push(_e(l,p));for(let e=0;e<_;e++)z.push(_e(c,p))}z.push(_e(s,p));const L=K(r,z,"bottom",S);return L.setStyle("color",r.color),"number"==typeof r.opacity&&L.setStyle("opacity",r.opacity),T(e,$(L,"delimsizing mult"),r.mathstyle,d.textstyle,n)}me(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",null,(function(e,t){return{type:"sizeddelim",size:xe[e].size,cls:xe[e].mclass,delim:t[0]}})),me(["hspace","hspace*"],"{width:skip}",{},(function(e,t){return{type:"spacing",width:t[0]||0}})),me(["mathop","mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",null,(e,t)=>{const i={type:{"\\mathop":"mop","\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e],body:t[0],captureSelection:!0};return"\\mathop"===e&&(i.limits="limits",i.isFunction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.body)}}`),me(["operatorname","operatorname*"],"{operator:math}",null,(function(e,t){const i={type:"mop",captureSelection:!0,body:t[0],isFunction:!0};return i.body.forEach(e=>{e.isFunction=!1,e.variant||e.variantStyle||(e.variant="main",e.variantStyle="up"),e.type="mord",e.body={"∗":"*","−":"-"}[e.body]||e.body}),"\\operatorname"===e?i.limits="nolimits":"\\operatorname*"===e&&(i.limits="limits"),i})),me("unicode","{charcode:number}",null,(e,t)=>{let i=parseInt(t[0]);return isFinite(i)||(i=10067),{type:"mord",body:String.fromCodePoint(i),codepoint:i}},(e,t,i,a)=>`${e}{"${("000000"+i.codepoint.toString(16)).toUpperCase().substr(-6)}}`),me("rule","[raise:dimen]{width:dimen}{thickness:dimen}",null,(function(e,t){return{type:"rule",shift:t[0],width:t[1],height:t[2]}})),me("overline","{:auto}",null,(e,t)=>({type:"line",position:"overline",skipBoundary:!0,body:t[0]})),me("underline","{:auto}",null,(e,t)=>({type:"line",position:"underline",skipBoundary:!0,body:t[0]})),me("overset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),me("underset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",underscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),me(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0},(function(e,t){return{type:"genfrac",numer:t[0],denom:t[1],hasBarLine:!1,leftDelim:t[2],rightDelim:t[3],mathstyle:"auto"}}),(e,t,i,a)=>`${a(i,i.numer)} ${e}${i.leftDelim}${i.rightDelim}${a(i,i.denom)}`),me(["stackrel","stackbin"],"{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1],mathtype:"\\stackrel"===e?"mrel":"mbin"}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),me(["phantom","vphantom","hphantom"],"{:auto*}",{},(e,t)=>({type:"phantom",captureSelection:!0,phantomType:e.slice(1),isPhantom:!0}),(e,t,i,a)=>e+"{"+a(i,i.body)+"}"),me("smash","[:string]{:auto}",null,(function(e,t){let i="smash";return"b"===t[0]?i="bsmash":"t"===t[0]&&(i="tsmash"),{type:"phantom",phantomType:i,skipBoundary:!0,body:t[1]}})),me("rlap","{:auto}",null,(function(e,t){return{type:"overlap",align:"right",skipBoundary:!0,body:t[0]}})),me("llap","{:auto}",null,(function(e,t){return{type:"overlap",align:"left",skipBoundary:!0,body:t[0]}})),me("mathrlap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"right",skipBoundary:!0,body:t[0]}})),me("mathllap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"left",skipBoundary:!0,body:t[0]}})),function(e){for(let e=0;e<"0123456789/@.?!".length;e++){const t="0123456789/@.?!".charAt(e);j(t,t)}}(),G(65,90),G(97,122),j("\\forall","∀"),j("\\exists","∃"),j("\\nexists","∄","mord","ams"),j("\\mid","∣","mrel"),j("\\top","⊤"),j("\\bot","⊥"),j("\\sharp","♯"),j("\\flat","♭"),j("\\natural","♮"),j("\\#","#"),j("\\&","&"),j("\\clubsuit","♣"),j("\\heartsuit","♡"),j("\\spadesuit","♠"),j("\\diamondsuit","♢"),j("\\differencedelta","∆","mrel"),j("\\backslash","\\"),j("\\nabla","∇"),j("\\partial","∂"),j("\\ell","ℓ"),j("\\hbar","ℏ"),j("\\hslash","ℏ","mord","ams"),j("\\Finv","Ⅎ","mord","ams"),j("\\Game","⅁","mord","ams"),j("\\wp","℘"),j("\\eth","ð","mord","ams"),j("\\mho","℧","mord","ams"),j("\\Bbbk","k","mord","ams"),j("\\N","N","mord","double-struck"),j("\\R","R","mord","double-struck"),j("\\Q","Q","mord","double-struck"),j("\\C","C","mord","double-struck"),j("\\Z","Z","mord","double-struck"),j("\\P","P","mord","double-struck"),j("\\pounds","£"),j("\\yen","¥","mord","ams"),j("\\euro","€"),j("\\dagger","†","mbin"),j("\\dag","†","mbin"),j("\\ddag","‡","mbin"),j("\\ddagger","‡","mbin"),j("\\maltese","✠","mord","ams"),j("\\rightarrow","→","mrel"),j("\\to","→","mrel"),j("\\leftarrow","←","mrel"),j("\\gets","←","mrel"),j("\\Rightarrow","⇒","mrel"),j("\\Leftarrow","⇐","mrel"),j("\\longrightarrow","⟶","mrel"),j("\\longleftarrow","⟵","mrel"),j("\\Longrightarrow","⟹","mrel"),j("\\implies","⟹","mrel"),j("\\Longleftarrow","⟸","mrel"),j("\\impliedby","⟸","mrel"),j("\\dashrightarrow","⇢","mrel","ams"),j("\\dashleftarrow","⇠","mrel","ams"),j("\\Rrightarrow","⇛","mrel","ams"),j("\\Lleftarrow","⇚","mrel","ams"),j("\\longleftrightarrow","⟷","mrel"),j("\\biconditional","⟷","mrel"),j("\\Longleftrightarrow","⟺","mrel"),j("\\leftrightarrows","⇆","mrel","ams"),j("\\rightleftarrows","⇄","mrel","ams"),j("\\mapsto","↦","mrel"),j("\\longmapsto","⟼","mrel"),j("\\uparrow","↑","mrel"),j("\\downarrow","↓","mrel"),j("\\Uparrow","⇑","mrel"),j("\\Downarrow","⇓","mrel"),j("\\updownarrow","↕","mrel"),j("\\Updownarrow","⇕","mrel"),j("\\curvearrowright","↷","mrel","ams"),j("\\curvearrowleft","↶","mrel","ams"),j("\\hookrightarrow","↪","mrel"),j("\\hookleftarrow","↩","mrel"),j("\\rightharpoonup","⇀","mrel"),j("\\leftharpoonup","↼","mrel"),j("\\rightharpoondown","⇁","mrel"),j("\\leftharpoondown","↽","mrel"),j("\\rightrightarrows","⇉","mrel","ams"),j("\\leftleftarrows","⇇","mrel","ams"),j("\\upuparrows","⇈","mrel","ams"),j("\\downdownarrows","⇊","mrel","ams"),j("\\leftarrowtail","↢","mrel","ams"),j("\\rightarrowtail","↣","mrel","ams"),j("\\looparrowright","↬","mrel","ams"),j("\\looparrowleft","↫","mrel","ams"),j("\\twoheadleftarrow","↞","mrel","ams"),j("\\twoheadrightarrow","↠","mrel","ams"),j("\\rightleftharpoons","⇌","mrel"),j("\\leftrightharpoons","⇋","mrel","ams"),j("\\Rsh","↱","mrel","ams"),j("\\Lsh","↰","mrel","ams"),j("\\searrow","↘","mrel"),j("\\nearrow","↗","mrel"),j("\\swarrow","↙","mrel"),j("\\nwarrow","↖","mrel"),j("\\circlearrowright","↻","mrel","ams"),j("\\circlearrowleft","↺","mrel","ams"),j("\\restriction","↾","mrel","ams"),j("\\upharpoonright","↾","mrel","ams"),j("\\upharpoonleft","↿","mrel","ams"),j("\\downharpoonright","⇂","mrel","ams"),j("\\downharpoonleft","⇃","mrel","ams"),j("\\rightsquigarrow","⇝","mrel","ams"),j("\\leadsto","⇝","mrel","ams"),j("\\leftrightsquigarrow","↭","mrel","ams"),j("\\originalof","⊶","mrel"),j("\\laplace","⊶","mrel"),j("\\imageof","⊷","mrel"),j("\\Laplace","⊷","mrel"),j("\\multimap","⊸","mrel","ams"),j("\\nrightarrow","↛","mrel","ams"),j("\\nleftarrow","↚","mrel","ams"),j("\\nRightarrow","⇏","mrel","ams"),j("\\nLeftarrow","⇍","mrel","ams"),j("\\nleftrightarrow","↮","mrel","ams"),j("\\nLeftrightarrow","⇎","mrel","ams"),j("\\nless","≮","mrel","ams"),j("\\nleqslant","","mrel","ams"),j("\\lneq","⪇","mrel","ams"),j("\\lneqq","≨","mrel","ams"),j("\\nleqq","","mrel","ams"),j("\\unlhd","⊴","mbin","ams"),j("\\unrhd","⊵","mbin","ams"),j("\\lvertneqq","","mrel","ams"),j("\\lnsim","⋦","mrel","ams"),j("\\lnapprox","⪉","mrel","ams"),j("\\nprec","⊀","mrel","ams"),j("\\npreceq","⋠","mrel","ams"),j("\\precnsim","⋨","mrel","ams"),j("\\precnapprox","⪹","mrel","ams"),j("\\nsim","≁","mrel","ams"),j("\\nshortmid","","mrel","ams"),j("\\nmid","∤","mrel","ams"),j("\\nvdash","⊬","mrel","ams"),j("\\nvDash","⊭","mrel","ams"),j("\\ngtr","≯","mrel","ams"),j("\\ngeqslant","","mrel","ams"),j("\\ngeqq","","mrel","ams"),j("\\gneq","⪈","mrel","ams"),j("\\gneqq","≩","mrel","ams"),j("\\gvertneqq","","mrel","ams"),j("\\gnsim","⋧","mrel","ams"),j("\\gnapprox","⪊","mrel","ams"),j("\\nsucc","⊁","mrel","ams"),j("\\nsucceq","⋡","mrel","ams"),j("\\succnsim","⋩","mrel","ams"),j("\\succnapprox","⪺","mrel","ams"),j("\\ncong","≆","mrel","ams"),j("\\nshortparallel","","mrel","ams"),j("\\nparallel","∦","mrel","ams"),j("\\nVDash","⊯","mrel","ams"),j("\\nsupseteqq","","mrel","ams"),j("\\supsetneq","⊋","mrel","ams"),j("\\varsupsetneq","","mrel","ams"),j("\\supsetneqq","⫌","mrel","ams"),j("\\varsupsetneqq","","mrel","ams"),j("\\nVdash","⊮","mrel","ams"),j("\\precneqq","⪵","mrel","ams"),j("\\succneqq","⪶","mrel","ams"),j("\\nsubseteqq","","mrel","ams"),j("\\checkmark","✓","mord","ams"),j("\\diagup","╱","mord","ams"),j("\\diagdown","╲","mord","ams"),j("\\measuredangle","∡","mord","ams"),j("\\sphericalangle","∢","mord","ams"),j("\\backprime","‵","mord","ams"),j("\\backdoubleprime","‶","mord","ams"),j("\\ast","∗","mbin"),j("\\star","⋆","mbin"),j("\\diamond","⋄","mbin"),j("\\Diamond","◊","mord","ams"),j("\\lozenge","◊","mord","ams"),j("\\blacklozenge","⧫","mord","ams"),j("\\bigstar","★","mord","ams"),j("\\aleph","ℵ"),j("\\beth","ℶ","mord","ams"),j("\\daleth","ℸ","mord","ams"),j("\\gimel","ℷ","mord","ams"),j("\\lbrace","{","mopen"),j("\\rbrace","}","mclose"),j("\\langle","⟨","mopen"),j("\\rangle","⟩","mclose"),j("\\lfloor","⌊","mopen"),j("\\rfloor","⌋","mclose"),j("\\lceil","⌈","mopen"),j("\\rceil","⌉","mclose"),j("\\vert","∣"),j("\\mvert","∣","mrel"),j("\\lvert","∣","mopen"),j("\\rvert","∣","mclose"),j("\\|","∥"),j("\\Vert","∥"),j("\\mVert","∥"),j("\\lVert","∥","mopen"),j("\\rVert","∥","mclose"),j("\\parallel","∥","mrel"),j("\\shortparallel","∥","mrel","ams"),j("\\lbrack","[","mopen"),j("\\rbrack","]","mclose"),j("\\{","{","mopen"),j("\\}","}","mclose"),j("(","(","mopen"),j(")",")","mclose"),j("[","[","mopen"),j("]","]","mclose"),j("\\ulcorner","┌","mopen","ams"),j("\\urcorner","┐","mclose","ams"),j("\\llcorner","└","mopen","ams"),j("\\lrcorner","┘","mclose","ams"),j("\\lgroup","⟮","mopen"),j("\\rgroup","⟯","mclose"),j("\\lmoustache","⎰","mopen"),j("\\rmoustache","⎱","mclose"),j("=","=","mrel"),j("\\ne","≠","mrel"),j("\\neq","≠","mrel"),j("<","<","mrel"),j("\\lt","<","mrel"),j(">",">","mrel"),j("\\gt",">","mrel"),j("\\le","≤","mrel"),j("\\leq","≤","mrel"),j("\\ge","≥","mrel"),j("\\geq","≥","mrel"),j("\\leqslant","⩽","mrel","ams"),j("\\geqslant","⩾","mrel","ams"),j("\\ll","≪","mrel"),j("\\gg","≫","mrel"),j("\\coloneq","≔","mrel"),j("\\measeq","≝","mrel"),j("\\eqdef","≞","mrel"),j("\\questeq","≟","mrel"),j(":",":","mrel"),j("\\cong","≅","mrel"),j("\\equiv","≡","mrel"),j("\\prec","≺","mrel"),j("\\preceq","⪯","mrel"),j("\\succ","≻","mrel"),j("\\succeq","⪰","mrel"),j("\\perp","⊥","mrel"),j("\\propto","∝","mrel"),j("\\Colon","∷","mrel"),j("\\smile","⌣","mrel"),j("\\frown","⌢","mrel"),j("\\sim","∼","mrel"),j("\\gtrsim","≳","mrel","ams"),j("\\approx","≈","mrel"),j("\\approxeq","≊","mrel","ams"),j("\\thickapprox","≈","mrel","ams"),j("\\lessapprox","⪅","mrel","ams"),j("\\gtrapprox","⪆","mrel","ams"),j("\\precapprox","⪷","mrel","ams"),j("\\succapprox","⪸","mrel","ams"),j("\\thicksim","∼","mrel","ams"),j("\\succsim","≿","mrel","ams"),j("\\precsim","≾","mrel","ams"),j("\\backsim","∽","mrel","ams"),j("\\eqsim","≂","mrel","ams"),j("\\backsimeq","⋍","mrel","ams"),j("\\simeq","≃","mrel"),j("\\lesssim","≲","mrel","ams"),j("\\nleq","≰","mrel","ams"),j("\\ngeq","≱","mrel","ams"),j("\\smallsmile","⌣","mrel","ams"),j("\\smallfrown","⌢","mrel","ams"),j("\\bowtie","⋈","mrel"),j("\\Join","⋈","mrel"),j("\\asymp","≍","mrel"),j("\\sqsubseteq","⊑","mrel"),j("\\sqsupseteq","⊒","mrel"),j("\\leqq","≦","mrel","ams"),j("\\eqslantless","⪕","mrel","ams"),j("\\lll","⋘","mrel","ams"),j("\\lessgtr","≶","mrel","ams"),j("\\lesseqgtr","⋚","mrel","ams"),j("\\lesseqqgtr","⪋","mrel","ams"),j("\\risingdotseq","≓","mrel","ams"),j("\\fallingdotseq","≒","mrel","ams"),j("\\subseteqq","⫅","mrel","ams"),j("\\Subset","⋐","mrel","ams"),j("\\sqsubset","⊏","mrel","ams"),j("\\preccurlyeq","≼","mrel","ams"),j("\\curlyeqprec","⋞","mrel","ams"),j("\\vDash","⊨","mrel","ams"),j("\\Vvdash","⊪","mrel","ams"),j("\\bumpeq","≏","mrel","ams"),j("\\Bumpeq","≎","mrel","ams"),j("\\geqq","≧","mrel","ams"),j("\\eqslantgtr","⪖","mrel","ams"),j("\\ggg","⋙","mrel","ams"),j("\\gtrless","≷","mrel","ams"),j("\\gtreqless","⋛","mrel","ams"),j("\\gtreqqless","⪌","mrel","ams"),j("\\supseteqq","⫆","mrel","ams"),j("\\Supset","⋑","mrel","ams"),j("\\sqsupset","⊐","mrel","ams"),j("\\succcurlyeq","≽","mrel","ams"),j("\\curlyeqsucc","⋟","mrel","ams"),j("\\Vdash","⊩","mrel","ams"),j("\\shortmid","∣","mrel","ams"),j("\\between","≬","mrel","ams"),j("\\pitchfork","⋔","mrel","ams"),j("\\varpropto","∝","mrel","ams"),j("\\backepsilon","∍","mrel","ams"),j("\\llless","⋘","mrel","ams"),j("\\gggtr","⋙","mrel","ams"),j("\\lhd","⊲","mbin","ams"),j("\\rhd","⊳","mbin","ams"),j("\\doteq","≐","mrel"),j("\\doteqdot","≑","mrel","ams"),j("\\Doteq","≑","mrel","ams"),j("\\eqcirc","≖","mrel","ams"),j("\\circeq","≗","mrel","ams"),j("\\lessdot","⋖","mbin","ams"),j("\\gtrdot","⋗","mbin","ams"),j("\\~","~","mrel"),j("\\leftrightarrow","↔","mrel"),j("\\Leftrightarrow","⇔","mrel"),j("\\models","⊨","mrel"),j("\\vdash","⊢","mrel"),j("\\therefore","∴","mrel","ams"),j("\\because","∵","mrel","ams"),j("\\dashv","⊣","mrel"),j("\\roundimplies","⥰","mrel"),j("+","+","mbin"),j("-","−","mbin"),j("−","−","mbin"),j("\\pm","±","mbin"),j("\\mp","∓","mbin"),j("*","∗","mbin"),j("\\times","×","mbin"),j("\\div","÷","mbin"),j("\\surd","√"),j("\\divides","∣","mbin"),j("\\ltimes","⋉","mbin","ams"),j("\\rtimes","⋊","mbin","ams"),j("\\leftthreetimes","⋋","mbin","ams"),j("\\rightthreetimes","⋌","mbin","ams"),j("\\intercal","⊺","mbin","ams"),j("\\dotplus","∔","mbin","ams"),j("\\doublebarwedge","⩞","mbin","ams"),j("\\divideontimes","⋇","mbin","ams"),j("\\centerdot","⋅","mbin","ams"),j("\\cdot","⋅","mbin"),j("\\infty","∞"),j("\\prime","′"),j("\\doubleprime","″"),j("\\angle","∠"),j("`","‘"),j("\\$","$"),j("\\%","%"),j("\\_","_"),j("\\alpha","α"),j("\\beta","β"),j("\\gamma","γ"),j("\\delta","δ"),j("\\epsilon","ϵ"),j("\\varepsilon","ε"),j("\\zeta","ζ"),j("\\eta","η"),j("\\theta","θ"),j("\\vartheta","ϑ"),j("\\iota","ι"),j("\\kappa","κ"),j("\\varkappa","ϰ","mord","ams"),j("\\lambda","λ"),j("\\mu","μ"),j("\\nu","ν"),j("\\xi","ξ"),j("\\omicron","o"),j("\\pi","π"),j("\\varpi","ϖ"),j("\\rho","ρ"),j("\\varrho","ϱ"),j("\\sigma","σ"),j("\\varsigma","ς"),j("\\tau","τ"),j("\\phi","ϕ"),j("\\varphi","φ"),j("\\upsilon","υ"),j("\\chi","χ"),j("\\psi","ψ"),j("\\omega","ω"),j("\\Gamma","Γ"),j("\\Delta","Δ"),j("\\Theta","Θ"),j("\\Lambda","Λ"),j("\\Xi","Ξ"),j("\\Pi","Π"),j("\\Sigma","Σ"),j("\\Upsilon","Υ"),j("\\Phi","Φ"),j("\\Psi","Ψ"),j("\\Omega","Ω"),j("\\digamma","ϝ","mord","ams"),j("\\emptyset","∅"),j("\\varnothing","∅","mord","ams"),j("\\cap","∩","mbin"),j("\\cup","∪","mbin"),j("\\setminus","∖","mbin"),j("\\smallsetminus","∖","mbin","ams"),j("\\complement","∁","mord","ams"),j("\\in","∈","mrel"),j("\\notin","∉","mrel"),j("\\not","̸","mrel"),j("\\ni","∋","mrel"),j("\\owns","∋","mrel"),j("\\subset","⊂","mrel"),j("\\supset","⊃","mrel"),j("\\subseteq","⊆","mrel"),j("\\supseteq","⊇","mrel"),j("\\subsetneq","⊊","mrel","ams"),j("\\varsubsetneq","","mrel","ams"),j("\\subsetneqq","⫋","mrel","ams"),j("\\varsubsetneqq","","mrel","ams"),j("\\nsubset","⊄","mrel","ams"),j("\\nsupset","⊅","mrel","ams"),j("\\nsubseteq","⊈","mrel","ams"),j("\\nsupseteq","⊉","mrel","ams"),j("\\ "," ","spacing"),j("~"," ","spacing"),j("\\space"," ","spacing"),j("\\!",null,"spacing"),j("\\,",null,"spacing"),j("\\:",null,"spacing"),j("\\;",null,"spacing"),j("\\enskip",null,"spacing"),j("\\enspace",null,"spacing"),j("\\quad",null,"spacing"),j("\\qquad",null,"spacing"),j("\\colon",":","mpunct"),j("\\cdotp","⋅","mpunct"),j("\\cdots","⋯","minner"),j("\\ddots","⋱","minner"),j("\\ldots","…","minner"),j("\\mathellipsis","…","minner"),j("\\vdots","⋮"),j("\\ldotp",".","mpunct"),j(",",",","mpunct"),j(";",";","mpunct"),j("\\land","∧","mbin"),j("\\wedge","∧","mbin"),j("\\lor","∨","mbin"),j("\\vee","∨","mbin"),j("\\lnot","¬"),j("\\neg","¬"),j("\\barwedge","⊼","mbin","ams"),j("\\veebar","⊻","mbin","ams"),j("\\nor","⊻","mbin","ams"),j("\\curlywedge","⋏","mbin","ams"),j("\\curlyvee","⋎","mbin","ams"),j("\\square","□","mord","ams"),j("\\Box","□","mord","ams"),j("\\blacksquare","■","mord","ams"),j("\\boxminus","⊟","mbin","ams"),j("\\boxplus","⊞","mbin","ams"),j("\\boxtimes","⊠","mbin","ams"),j("\\boxdot","⊡","mbin","ams"),j("\\circ","∘","mbin"),j("\\bigcirc","◯","mbin"),j("\\bullet","∙","mbin"),j("\\circleddash","⊝","mbin","ams"),j("\\circledast","⊛","mbin","ams"),j("\\oplus","⊕","mbin"),j("\\ominus","⊖","mbin"),j("\\otimes","⊗","mbin"),j("\\odot","⊙","mbin"),j("\\circledcirc","⊚","mbin","ams"),j("\\oslash","⊘","mbin"),j("\\circledS","Ⓢ","mord","ams"),j("\\circledR","®","mord","ams"),j("\\triangle","△"),j("\\bigtriangleup","△","mbin"),j("\\vartriangle","△","mrel","ams"),j("\\triangleq","≜","mrel","ams"),j("\\triangledown","▽","mord","ams"),j("\\bigtriangledown","▽","mbin"),j("\\triangleleft","◃","mbin"),j("\\vartriangleleft","⊲","mrel","ams"),j("\\trianglelefteq","⊴","mrel","ams"),j("\\ntriangleleft","⋪","mrel","ams"),j("\\ntrianglelefteq","⋬","mrel","ams"),j("\\triangleright","▹","mbin"),j("\\vartriangleright","⊳","mrel","ams"),j("\\trianglerighteq","⊵","mrel","ams"),j("\\ntriangleright","⋫","mrel","ams"),j("\\ntrianglerighteq","⋭","mrel","ams"),j("\\blacktriangle","▲","mord","ams"),j("\\blacktriangledown","▼","mord","ams"),j("\\blacktriangleleft","◀","mrel","ams"),j("\\blacktriangleright","▶","mrel","ams"),j("\\/","/"),j("|","∣","textord"),j("\\And","&","mbin"),j("\\imath","ı"),j("\\jmath","ȷ"),j("\\degree","°"),j("'","′"),j('"',"”");const Me=["(",")","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd"],Se=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],ze=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Le=[0,1.2,1.8,2.4,3],Ae=[{type:"small",mathstyle:d.scriptscriptstyle},{type:"small",mathstyle:d.scriptstyle},{type:"small",mathstyle:d.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],qe=[{type:"small",mathstyle:d.scriptscriptstyle},{type:"small",mathstyle:d.scriptstyle},{type:"small",mathstyle:d.textstyle},{type:"stack"}],$e=[{type:"small",mathstyle:d.scriptscriptstyle},{type:"small",mathstyle:d.scriptstyle},{type:"small",mathstyle:d.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Ce(e,t,i,a,r,n=""){if(!t||0===t.length||"."===t)return Te(e,r,e);let s;"<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),s=ze.includes(t)?Ae:Me.includes(t)?$e:qe;const l=function(e,t,i,a){for(let n=Math.min(2,3-a.mathstyle.size);nt)return i[n]}var r;return i[i.length-1]}(te("math",t),i,s,r);return"small"===l.type?function(e,t,i,a,r,n=""){const o=T(e,C("Main-Regular",te("math",t)),r.mathstyle,i,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier/i.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}(e,t,l.mathstyle,a,r,"ML__small-delim "+n):"large"===l.type?ke(e,t,l.size,a,r,n):we(e,t,i,a,r,n)}function De(e,t,i,a,r,n=""){if("."===t)return Te(e,r,n);const o=r.mathstyle.metrics.axisHeight*r.mathstyle.sizeMultiplier,s=Math.max(i-o,a+o);return Ce(e,t,Math.max(s/500*901,2*s-.5),!0,r,n)}function Te(e,t,i){return $("","sizing"+t.mathstyle.adjustTo(d.textstyle)+" nulldelimiter "+(i||""),e)}const Ee={},Ke={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49};function Ne(e,t){Ee[e]={decompose:t}}function Oe(e,i){var a,r;function n(e){return"mord"===e.type&&Boolean(e.symbol)&&/^[0-9,.]$/.test(e.symbol)}function o(e){return"text"===e.mode}const s=e instanceof m?e:new m(e),l=!s.atomIdsSettings||!s.atomIdsSettings.groupNumbers;let c=[];if(t(i)){if(0===i.length)return[];if(1===i.length)c=i[0].decompose(s),c&&l&&i[0].isSelected&&c.forEach(e=>e.selected(!0));else{let e=[],t="",d=!0,m=null;for(let p=0;pe.selected(!0))):(e.length>0&&(c=[...c,...e],e=[]),c=c.concat(a))}}e.length>0&&(c=[...c,...e],e=[])}}else i instanceof Be&&(c=i.decompose(s),c&&l&&i.isSelected&&c.forEach(e=>e.selected(!0)));if(!c||0===c.length)return null;if(s.mathstyle!==s.parentMathstyle){const e=s.mathstyle.sizeMultiplier/s.parentMathstyle.sizeMultiplier;for(const t of c)t.height*=e,t.depth*=e}if(s.size!==s.parentSize){const e=Ke[s.size]/Ke[s.parentSize];for(const t of c)t.height*=e,t.depth*=e}return c}class Be{constructor(e,t,i="",a={}){this.mode=e,this.type=t,this.body=i,a.isPhantom&&this.setPhantom(!0),this.applyStyle(a)}toLatex(e=!1){return function(e,i){if(!(i=void 0!==i&&i)&&e.latex)return e.latex;let a="",r=0,n=0,o=0;const s=e.symbol;let l=[];const c=(e,a)=>function(e,i,a){let r="";return t(i)?r=function(e,t,i){if(0===t.length)return"";if("first"===t[0].type){if(1===t.length)return"";t=t.slice(1)}return 0===t.length?"":f(y(t,"cssClass").map(t=>{const a=f(y(t,"color").map(t=>f(function(e){const t=[];let i=[],a="NONE";return e.forEach(e=>{"first"!==e.type&&(e.mode!==a?(i.length>0&&t.push(i),i=[e],a=e.mode):i.push(e))}),i.length>0&&t.push(i),t}(t).map(t=>function(e,t,i){var a;return(null===(a=b[t[0].mode])||void 0===a?void 0:a.emitLatexRun)?b[t[0].mode].emitLatexRun(e,t,i):""}(e,t,i)))));return!t[0].cssClass||void 0!==e&&e.cssClass===t[0].cssClass?a:"ML__boldsymbol"===t[0].cssClass?"\\boldsymbol{"+a+"}":"ML__emph"===t[0].cssClass?"\\emph{"+a+"}":"\\class{"+t[0].cssClass+"}{"+a+"}"}))}(e,i,a):"number"==typeof i||"boolean"==typeof i?r=i.toString():"string"==typeof i?r=i.replace(/\s/g,"~"):null!=i&&"function"==typeof i.toLatex&&(r=i.toLatex(a)),r}(e,a,i);switch(e.type){case"group":s?a=i?c(e,e.body):e.latex:(a=e.latexOpen||(e.cssId||e.cssClass?"":"{"),e.cssId&&(a+="\\cssId{"+e.cssId+"}{"),"ML__emph"===e.cssClass?a+="\\emph{"+c(e,e.body):(e.cssClass&&(a+="\\class{"+e.cssClass+"}{"),a+=c(e,e.body),e.cssClass&&(a+="}")),e.cssId&&(a+="}"),a+=e.latexClose||(e.cssId||e.cssClass?"":"}"));break;case"array":if(a+="\\begin{"+e.environmentName+"}","array"===e.environmentName){if(a+="{",void 0!==e.colFormat)for(o=0;o0&&(a+=" & "),a+=c(e,e.array[n][r]);n0&&("first"!==this.body[0].type?e=this.body[0].getInitialBaseElement():this.body[1]&&(e=this.body[1].getInitialBaseElement())),e||this}getFinalBaseElement(){return t(this.body)&&this.body.length>0?this.body[this.body.length-1].getFinalBaseElement():this}isCharacterBox(){const e=this.getInitialBaseElement();return/minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(e.type)}setPhantom(e){this.forEach(t=>{t.isPhantom=e})}forEach(e){if(e(this),t(this.body))for(const t of this.body)t&&t.forEach(e);else this.body&&"object"==typeof this.body&&e(this.body);if(this.superscript)for(const t of this.superscript)t&&t.forEach(e);if(this.subscript)for(const t of this.subscript)t&&t.forEach(e);if(this.overscript)for(const t of this.overscript)t&&t.forEach(e);if(this.underscript)for(const t of this.underscript)t&&t.forEach(e);if(this.numer)for(const t of this.numer)t&&t.forEach(e);if(this.denom)for(const t of this.denom)t&&t.forEach(e);if(this.index)for(const t of this.index)t&&t.forEach(e);if(this.array)for(const t of this.array)for(const i of t)for(const t of i)t.forEach(e)}filter(e){let i=[];e(this)&&i.push(this);for(const a of["body","superscript","subscript","overscript","underscript","numer","denom","index"])if(t(this[a]))for(const t of this[a])t&&(i=i.concat(t.filter(e)));if(t(this.array))for(const t of this.array)for(const a of t)a&&(i=i.concat(a.filter(e)));return i}decomposeGroup(e){const t=$(Oe(e.clone({mathstyle:this.mathstyle?d[this.mathstyle]:void 0}),this.body),"","mord");return this.cssId&&(t.cssId=this.cssId),t.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),t}decomposeOverlap(e){const t=$(Oe(e,this.body),"inner");return $([t,$(null,"fix")],"left"===this.align?"llap":"rlap","mord")}decomposeRule(e){const t=e.mathstyle,i=$("","rule","mord");let a=this.shift&&!isNaN(this.shift)?this.shift:0;a/=t.sizeMultiplier;const r=this.width/t.sizeMultiplier,n=this.height/t.sizeMultiplier;return i.setStyle("border-right-width",r,"em"),i.setStyle("border-top-width",n,"em"),i.setStyle("margin-top",-(n-a),"em"),i.setStyle("border-color",e.color),i.width=r,i.height=n+a,i.depth=-a,i}decompose(e,i=null){var a;let r=null;if(!this.type||/mord|minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(this.type)?(r="string"==typeof this.body?this.makeSpan(e,this.body):this.makeSpan(e,Oe(e,this.body)),r.type=k(this.type)?this.type:""):"group"===this.type||"root"===this.type?r=this.decomposeGroup(e):"delim"===this.type?(r=$(null,""),r.delim=this.delim):"sizeddelim"===this.type?r=this.bind(e,function(e,t,i,a,r=""){return"."===t?Te(e,a,r):("<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),Me.includes(t)||ze.includes(t)?ke(e,t,i,!1,a,r):Se.includes(t)?we(e,t,Le[i],!1,a,r):null)}(this.cls,this.delim,this.size,e)):"overlap"===this.type?r=this.decomposeOverlap(e):"rule"===this.type?r=this.decomposeRule(e):"msubsup"===this.type?(r=$("​","","mord"),i&&(r.height=i[0].height,r.depth=i[0].depth)):"space"===this.type?r=this.makeSpan(e," "):"spacing"===this.type?"​"===this.body?r=this.makeSpan(e,"​"):" "===this.body?r="math"===this.mode?this.makeSpan(e," "):this.makeSpan(e," "):this.width?(r=$("​","mspace "),this.width>0?r.setWidth(this.width):r.setStyle("margin-left",this.width,"em")):r=$("​","mspace "+(null!==(a={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.symbol])&&void 0!==a?a:"mediumspace")):"mathstyle"===this.type?e.setMathstyle(this.mathstyle):"command"===this.type||"error"===this.type?(r=this.makeSpan(e,this.body),r.classes="",this.isError&&(r.classes+=" ML__error"),this.isSuggestion&&(r.classes+=" ML__suggestion")):r="placeholder"===this.type?this.makeSpan(e,"⬚"):"first"===this.type?this.makeSpan(e,"​"):Ee[this.type].decompose(e,this),!r)return null;if(this.caret&&"msubsup"!==this.type&&"command"!==this.type&&"placeholder"!==this.type&&"first"!==this.type&&(t(r)?"leftright"===this.type&&(this.superscript||this.subscript)||(r[r.length-1].caret=this.caret):r.caret=this.caret),this.containsCaret&&(t(r)?(r[0].classes=(r[0].classes||"")+" ML__contains-caret",r[r.length-1].classes=(r[r.length-1].classes||"")+" ML__contains-caret"):r.classes=(r.classes||"")+" ML__contains-caret"),!this.limits&&(this.superscript||this.subscript))if(t(r)){const t=r[r.length-1];r[r.length-1]=this.attachSupsub(e,t,t.type)}else r=[this.attachSupsub(e,r,r.type)];return t(r)?r:[r]}attachSupsub(e,t,i){if(!this.superscript&&!this.subscript)return t;const a=e.mathstyle;let r=null,n=null;this.superscript&&(r=$(Oe(e.sup(),this.superscript),a.adjustTo(a.sup()))),this.subscript&&(n=$(Oe(e.sub(),this.subscript),a.adjustTo(a.sub())));let o,s=0,l=0;this.isCharacterBox()||(s=L(t)-a.metrics.supDrop,l=A(t)+a.metrics.subDrop),o=a===d.displaystyle?a.metrics.sup1:a.cramped?a.metrics.sup3:a.metrics.sup2;const c=.05/(d.textstyle.sizeMultiplier*a.sizeMultiplier);let m=null;if(n&&r){s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),l=Math.max(l,a.metrics.sub2);const i=.04;if(s-A(r)-(L(n)-l)<4*i){l=4*i-(s-r.depth)+L(n);const e=.8*a.metrics.xHeight-(s-A(r));e>0&&(s+=e,l-=e)}m=K(e,[n,l,r,-s],"individualShift"),this.isSymbol&&m.children[0].setLeft(-q(t))}else n&&!r?(l=Math.max(l,a.metrics.sub1,L(n)-.8*a.metrics.xHeight),m=K(e,[n],"shift",l),m.children[0].setRight(c),this.isCharacterBox()&&m.children[0].setLeft(-q(t))):!n&&r&&(s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),m=K(e,[r],"shift",-s),m.children[0].setRight(c));const p=$(m,"msubsup");return this.caret&&(p.caret=this.caret,this.caret=""),$([t,p],"",i)}attachLimits(e,t,i,a){const r=this.superscript?$(Oe(e.sup(),this.superscript),e.mathstyle.adjustTo(e.mathstyle.sup())):null,n=this.subscript?$(Oe(e.sub(),this.subscript),e.mathstyle.adjustTo(e.mathstyle.sub())):null;return function(e,t,i,a,r,n){if(!r&&!n)return t;t=$(t);let o=0,s=0;r&&(o=Math.max(.111,.2-A(r))),n&&(s=Math.max(.166,.6-L(n)));let l=null;return n&&r?(l=K(e,[.1,n,s,t,o,r,.1],"bottom",.1+L(n)+A(n)+s+A(t)+i),l.children[0].setLeft(-a),l.children[2].setLeft(a)):n&&!r?(l=K(e,[.1,n,s,t],"top",L(t)-i),l.children[0].setLeft(-a)):!n&&r&&(l=K(e,[t,o,r,.1],"bottom",A(t)+i),l.children[1].setLeft(a)),$(l,"op-limits","mop")}(e,t,i,a,r,n)}bind(e,t){return"first"!==this.type&&"​"!==this.body&&(this.id=function(e){let t;return e.atomIdsSettings&&("number"==typeof e.atomIdsSettings.seed?(t=e.atomIdsSettings.overrideID?e.atomIdsSettings.overrideID:e.atomIdsSettings.seed.toString(36),e.atomIdsSettings.seed+=1):t=Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36)),t}(e),this.id&&(t.attributes||(t.attributes={}),t.attributes["data-atom-id"]=this.id)),t}makeSpan(e,t){const i=$(t,"","textord"===this.type?"mord":k(this.type)?this.type:""),a=this.getStyle();a.letterShapeStyle=e.letterShapeStyle,i.applyStyle(a);const r=(null==a?void 0:a.fontSize)?a.fontSize:"size5";return r!==e.parentSize?(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+r):e.parentSize!==e.size&&(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+e.size),i.maxFontSize=Math.max(i.maxFontSize,e.mathstyle.sizeMultiplier||1),"text"===this.mode&&(i.classes+=" ML__text"),e.mathstyle.isTight()&&(i.isTight=!0),"math"!==this.mode&&(i.italic=0),i.setRight(i.italic),"number"==typeof e.opacity&&i.setStyle("opacity",e.opacity),this.bind(e,i),this.caret&&(this.superscript||this.subscript||(i.caret=this.caret,this.caret="",e.mathstyle.isTight()&&(i.isTight=!0))),i}}function Fe(e,i=[]){const a=new Be(e,"root",i||[]);return!t(a.body)||0!==a.body.length&&"first"===a.body[0].type||a.body.unshift(new Be(e,"first")),a}function Pe(e){return t(e)}const Re=[[8205,1],[65038,2],[127995,5],[129456,4],[917536,96]];let Ie;const He=[127462,127487];function We(e){var t;return void 0===Ie&&(Ie={},Re.forEach(e=>{for(let t=e[0];t<=e[0]+e[1]-1;t++)Ie[t]=!0})),null!==(t=Ie[e])&&void 0!==t&&t}function Ve(e){return e>=He[0]&&e<=He[1]}function Ue(e){if(/^[\x20-\xFF]*$/.test(e))return e;const t=[],i=function(e){const t=[];for(let i=0;i=55296&&a<=56319){const t=e.charCodeAt(i+1);if(t>=56320&&t<=57343){const e=a-55296,r=t-56320;a=Math.pow(2,16)+e*Math.pow(2,10)+r,i++}}t.push(a)}return t}(e);let a=0;for(;a=this.s.length}get(){return this.pos";if(this.obeyspaces&&this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]/))return"";const e=this.get();if("\\"===e){if(!this.end()){let e=this.match(/^[a-zA-Z*]+/);if(e)this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]*/);else if(e=this.get()," "===e)return"";return"\\"+e}}else{if("{"===e)return"<{>";if("}"===e)return"<}>";if("^"===e){if("^"===this.peek()){this.get();let e=this.match(/^\^\^[0-9a-f][0-9a-f][0-9a-f][0-9a-f]/);if(e)return String.fromCodePoint(parseInt(e.slice(2),16));if(e=this.match(/^[0-9a-f][0-9a-f]/),e)return String.fromCodePoint(parseInt(e,16))}return e}if("#"===e){if(!this.end()){let e=!1;if(/[0-9?]/.test(this.peek())&&(e=!0,this.pos+1"):"<$>"}return e}}function Ge(e,t){var i,a,r,n;let o=[],s=e.next();if(s)if("\\relax"===s);else if("\\noexpand"===s)s=e.next(),s&&o.push(s);else if("\\obeyspaces"===s)e.obeyspaces=!0;else if("\\space"===s||"~"===s)o.push("");else if("\\bgroup"===s)o.push("<{>");else if("\\egroup"===s)o.push("<}>");else if("\\string"===s)s=e.next(),s&&("\\"===s[0]?Array.from(s).forEach(e=>o.push("\\"===e?"\\backslash":e)):"<{>"===s?o.push("\\{"):""===s?o.push("~"):"<}>"===s&&o.push("\\}"));else if("\\csname"===s){for(;""===e.peek();)e.next();let r="",n=!1,l=[];do{if(0===l.length)if(/^#[0-9?]$/.test(e.peek())){const r=e.get().slice(1);l=Xe(null!==(a=null!==(i=null==t?void 0:t[r])&&void 0!==i?i:null==t?void 0:t["?"])&&void 0!==a?a:"\\placeholder{}",t),s=l[0]}else s=e.next(),l=s?[s]:[];n=0===l.length,n||"\\endcsname"!==s||(n=!0,l.shift()),n||(n="<$>"===s||"<$$>"===s||"<{>"===s||"<}>"===s||s.length>1&&"\\"===s[0]),n||(r+=l.shift())}while(!n);r&&o.push("\\"+r),o=o.concat(l)}else if("\\endcsname"===s);else if(s.length>1&&"#"===s[0]){const e=s.slice(1);o=o.concat(Xe(null!==(n=null!==(r=null==t?void 0:t[e])&&void 0!==r?r:null==t?void 0:t["?"])&&void 0!==n?n:"\\placeholder{}",t))}else o.push(s);return o}function Xe(e,t){const i=e.toString().split(/\r?\n/);let a="",r="";for(const e of i){a+=r,r=" ";const t=e.match(/((?:\\%)|[^%])*/);null!==t&&(a+=t[0])}const n=new je(a);let o=[];do{o=o.concat(Ge(n,t))}while(!n.end());return o}function Ze(e){const t=$("​","arraycolsep");return t.setWidth(e),t}function Ye(e,t,i,a){const r=[];for(const n of t){const t=$(Oe(e,a));t.depth=n.depth,t.height=n.height,r.push(t),r.push(n.pos-i)}return K(e,r,"individualShift")}function Qe(e){return!/^<({|}|\$|\$\$|space)>$/.test(e)}Ne("accent",(e,i)=>{const a=e.mathstyle;let r=Oe(e.cramp(),i.body);(i.superscript||i.subscript)&&(r=[i.attachSupsub(e,$(r,"","mord"),"mord")]);let n=0;t(i.body)&&1===i.body.length&&i.body[0].isCharacterBox()&&(n=function(e){if(!e)return 0;if(t(e)){let t=0;for(const i of e)t+=i.skew||0;return t}return e.skew}(r));let o,s=Math.min(L(r),a.metrics.xHeight);if(i.svgAccent)o=N(i.svgAccent),s=.111-s;else{const e=C("Main-Regular",i.accent,"math");e.italic=0;const t="⃗"===i.accent?" accent-vec":"";o=$($(e),"accent-body"+t)}return o=K(e,[r,-s,o]),o.children[1].setLeft(2*n),[$([o],"accent","mord")]}),Ne("array",(e,t)=>{var i;let a=t.colFormat;a&&0===a.length&&(a=[{align:"l"}]),a||(a=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]);const r=[];let n=0;for(const e of a)e.align&&n++;for(const e of t.array){let t=0;for(;t0&&(c+=p,s0&&b.push(K(e,i,"individualShift"))}const v=[];let x=!1,k=!1,_=0,w=!t.leftDelim;for(const t of a){if(t.align&&_>=b.length)break;if(t.align&&_{const i="number"==typeof t.padding?t.padding:.3,a=$(Oe(e,t.body),"","mord");a.setStyle("vertical-align",-A(a),"em"),a.setStyle("height",0);const r=$(a,"","mord"),n=$("","ML__box");n.setStyle("position","absolute"),n.setStyle("height",L(r)+A(r)+2*i,"em"),0!==i?n.setStyle("width","calc(100% + "+2*i+"em)"):n.setStyle("width","100%"),n.setStyle("top",-i,"em"),n.setStyle("left",-i,"em"),n.setStyle("z-index","-1"),n.setStyle("box-sizing","border-box"),t.backgroundcolor&&n.setStyle("background-color",t.backgroundcolor),t.framecolor&&n.setStyle("border","0.04em solid "+t.framecolor),t.border&&n.setStyle("border",t.border),r.setStyle("display","inline-block"),r.setStyle("height",L(r)+A(r),"em");const o=$([n,r]);return o.setStyle("position","relative"),o.setStyle("vertical-align",-i+A(r),"em"),o.height=L(r)+i,o.depth=A(r)+i,o.setLeft(i),o.setRight(i),o.setStyle("height",o.height+o.depth-2*i,"em"),o.setStyle("top",-i,"em"),o.setStyle("display","inline-block"),[o]}),Ne("enclose",(e,t)=>{const i=$(Oe(e,t.body),"","mord"),a="number"==typeof t.padding?t.padding:.3,r=$("","ML__notation");r.setStyle("position","absolute"),r.setStyle("height",L(i)+A(i)+2*a,"em"),r.height=L(i)+a,r.depth=A(i)+a,0!==a?r.setStyle("width","calc(100% + "+2*a+"em)"):r.setStyle("width","100%"),r.setStyle("top","0"),r.setStyle("left",-a,"em"),r.setStyle("z-index","-1"),t.backgroundcolor&&r.setStyle("background-color",t.backgroundcolor),t.notation.box&&r.setStyle("border",t.borderStyle),t.notation.actuarial&&(r.setStyle("border-top",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.madruwb&&(r.setStyle("border-bottom",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.roundedbox&&(r.setStyle("border-radius",(L(i)+A(i))/2,"em"),r.setStyle("border",t.borderStyle)),t.notation.circle&&(r.setStyle("border-radius","50%"),r.setStyle("border",t.borderStyle)),t.notation.top&&r.setStyle("border-top",t.borderStyle),t.notation.left&&r.setStyle("border-left",t.borderStyle),t.notation.right&&r.setStyle("border-right",t.borderStyle),t.notation.bottom&&r.setStyle("border-bottom",t.borderStyle);let n="";if(t.notation.horizontalstrike&&(n+='{const i="auto"===t.mathstyle?e.mathstyle:d[t.mathstyle],a=e.clone({mathstyle:i});let r=[];t.numerPrefix&&r.push($(t.numerPrefix,"mord"));const n=t.continuousFraction?i:i.fracNum();r=r.concat(Oe(a.clone({mathstyle:n}),t.numer));const o=E(r,e.mathstyle.adjustTo(n));let s=[];t.denomPrefix&&s.push($(t.denomPrefix,"mord"));const l=t.continuousFraction?i:i.fracDen();s=s.concat(Oe(a.clone({mathstyle:l}),t.denom));const c=E(s,e.mathstyle.adjustTo(l)),m=t.hasBarLine?.04/i.sizeMultiplier:0;let p,u,h=0;i.size===d.displaystyle.size?(p=i.metrics.num1,h=m>0?3*m:.28,u=i.metrics.denom1):(m>0?(p=i.metrics.num2,h=m):(p=i.metrics.num3,h=.12),u=i.metrics.denom2);const f=o?A(o):0,g=c?L(c):0;let y;if(0===m){const e=p-f-(g-u);e{if(!t.body)return t.leftDelim?new Be("math","mopen",t.leftDelim).decompose(e):t.rightDelim?new Be("math","mclose",t.rightDelim).decompose(e):null;const i=e.clone(),a=Oe(i,t.body),r=i.mathstyle;let n=0,o=0,s=[];if(n=L(a)*r.sizeMultiplier,o=A(a)*r.sizeMultiplier,t.leftDelim&&(s.push(t.bind(e,De("mopen",t.leftDelim,n,o,i,"ML__open"))),s[s.length-1].applyStyle(t.getStyle())),a){for(let r=0;r{const i=e.mathstyle,a=Oe(e.cramp(),t.body),r=.04/i.sizeMultiplier,n=$(null,e.mathstyle.adjustTo(d.textstyle)+" "+t.position+"-line");let o;if(n.height=r,n.maxFontSize=1,"overline"===t.position)o=K(e,[a,3*r,n,r]);else{const t=$(a);o=K(e,[r,n,3*r,t],"top",L(t))}return[$(o,t.position,"mord")]}),Ne("mop",(e,i)=>{var a;const r=e.mathstyle;let n,o=0,s=0;if(i.isSymbol){const t=r.size===d.displaystyle.size&&"\\smallint"!==i.symbol;n=C(t?"Size2-Regular":"Size1-Regular",i.body,"op-symbol "+(t?"large-op":"small-op"),"mop"),o=(n.height-n.depth)/2-r.metrics.axisHeight*r.sizeMultiplier,s=n.italic,n.applyStyle({color:i.isPhantom?"transparent":i.color,backgroundColor:i.isPhantom?"transparent":i.backgroundColor,cssId:i.cssId,cssClass:i.cssClass,letterShapeStyle:e.letterShapeStyle})}else n=t(i.body)?$(Oe(e,i.body),"","mop"):i.makeSpan(e,i.body);i.bind(e,n),i.isSymbol&&n.setTop(o);let l=n;if(i.superscript||i.subscript){const t=null!==(a=i.limits)&&void 0!==a?a:"auto";l="limits"===t||"auto"===t&&r.size===d.displaystyle.size?i.attachLimits(e,n,o,s):i.attachSupsub(e,n,"mop")}return[l]}),Ne("overunder",(e,t)=>{const i=t.svgBody?N(t.svgBody):Oe(e,t.body),a=e.clone({mathstyle:d.scriptstyle});let r,n;t.svgAbove?r=N(t.svgAbove):t.overscript&&t.overscript.length>0&&(r=$(Oe(a,t.overscript),e.mathstyle.adjustTo(a.mathstyle))),t.svgBelow?n=N(t.svgBelow):t.underscript&&t.underscript.length>0&&(n=$(Oe(a,t.underscript),e.mathstyle.adjustTo(a.mathstyle))),r&&n&&(n.setLeft(.3),n.setRight(.3),r.setLeft(.3),r.setRight(.3));let o=function(e,t,i,a,r){if(!i&&!a)return $(t,"op-over-under",r);let n=0,o=0;i&&(n=Math.max(.111,.2-A(i))),a&&(o=Math.max(.166,.6-L(a)));let s=null;return a&&i?s=K(e,[0,a,o,t,n,i,.166],"bottom",L(a)+A(a)+A(t)):a&&!i?s=K(e,[0,a,o,t],"top",L(t)):i&&!a&&(s=K(e,[A(t),t,Math.max(.166,n),i],"bottom",A(t))),$(s,"op-over-under",r)}(e,i,r,n,k(t.type)?t.type:"mrel");return(t.superscript||t.subscript)&&(o=t.attachLimits(e,o,0,0)),[o]}),Ne("phantom",(e,t)=>{if("vphantom"===t.phantomType){const i=$(Oe(e,t.body),"inner");return[$([i,$(null,"fix")],"rlap","mord")]}if("hphantom"===t.phantomType||"smash"===t.phantomType||"bsmash"===t.phantomType||"tsmash"===t.phantomType){const i=$(Oe(e,t.body),"","mord");return"bsmash"!==t.phantomType&&(i.height=0),"tsmash"!==t.phantomType&&(i.depth=0),[$(K(e,[i]),"","mord")]}return[$(Oe(e,t.body),"","mord")]}),Ne("surd",(e,t)=>{var i;const a=e.mathstyle,r=null!==(i=Oe(e.cramp(),t.body))&&void 0!==i?i:$(""),n=.04/a.sizeMultiplier;let o=n;a.idL(r)+A(r)+s&&(s=(s+c-(L(r)+A(r)))/2),l.setTop(l.height-L(r)-(s+n));const m=$(null,e.mathstyle.adjustTo(d.textstyle)+" sqrt-line");m.applyStyle(t.getStyle()),m.height=n;const p=K(e,[r,s,m,n]);if(void 0===t.index)return[t.bind(e,$([l,p],"sqrt","mord"))];const u=e.clone({mathstyle:d.scriptscriptstyle}),h=K(e,[$(Oe(u,t.index),a.adjustTo(d.scriptscriptstyle))],"shift",-.6*(Math.max(l.height,p.height)-Math.max(l.depth,p.depth)));return[t.bind(e,$([$(h,"root"),l,p],"sqrt","mord"))]});class Je{constructor(e,t,i,a){this.index=0,this.style={},this.parseMode="math",this.smartFence=!1,this.tabularMode=!1,this.atoms=[],this.endCount=0,this.tokens=e,this.args=t,this.macros=i,this.onError=e=>a({before:g(this.tokens.slice(this.index,this.index+10)),after:g(this.tokens.slice(Math.max(0,this.index-10),this.index)),...e})}swapAtoms(e=[]){const t=this.atoms;return this.atoms=e,t}swapParseMode(e){const t=this.parseMode;return this.parseMode=e,t}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index");)e=!0;return e}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){let e=!1;do{const t=this.matchWhitespace(),i=this.match("\\relax");e=!t&&!i}while(!e)}matchKeyword(e){const t=this.index;let i=this.end(),a="";for(;!i;){const t=this.get();Qe(t)?(a+=t,i=this.end()||a.length>=e.length):i=!0}const r=e.toUpperCase()===a.toUpperCase();return r||(this.index=t),r}scanString(){let e="",t=this.end();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===i?t=!0:Qe(i)?e+=this.get():"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.get()):t=!0}t=t||this.end()}return e}scanBalancedString(){let e="",t=this.end(),i=1;for(;!t;){if(this.match(""))e+=" ";else{const t=this.get();"<{>"===t?(e+="{",i+=1):"<}>"===t?(i-=1,i>0?e+="}":this.index-=1):e+="<$>"===t?"$":"<$$>"===t?"$$":t}t=0===i||this.end()}return e}matchLiteralArg(){var e;let t="";if(this.match("<{>")){let i=1;for(;i>0&&!this.end();){const a=this.get();"<}>"===a?(i-=1,i>0&&(t+="}")):"<{>"===a?(i+=1,t+="{"):t+=null!==(e={"":" ","<$$>":"$$","<$>":"$"}[a])&&void 0!==e?e:a}}return t}scanColor(){return be(this.scanString())}scanNumber(e=!0){var t,i;let a=!1,r=this.peek();for(;""===r||"+"===r||"-"===r;)this.get(),"-"===r&&(a=!a),r=this.peek();e=Boolean(e);let n=10,o=/[0-9]/;if(this.match("'"))n=8,o=/[0-7]/,e=!0;else if(this.match('"')||this.match("x"))n=16,o=/[0-9A-F]/,e=!0;else if(this.match("`"))return r=this.get(),r?r.startsWith("\\")&&2===r.length?(a?-1:1)*(null!==(t=r.codePointAt(1))&&void 0!==t?t:0):(a?-1:1)*(null!==(i=r.codePointAt(0))&&void 0!==i?i:0):NaN;let s="";for(;this.hasPattern(o);)s+=this.get();if(!e&&(this.match(".")||this.match(",")))for(s+=".";this.hasPattern(o);)s+=this.get();const l=e?parseInt(s,n):parseFloat(s);return a?-l:l}scanDimen(){const e=this.scanNumber(!1);let t;return this.matchWhitespace(),this.matchKeyword("pt")?t=s(e,"pt"):this.matchKeyword("mm")?t=s(e,"mm"):this.matchKeyword("cm")?t=s(e,"cm"):this.matchKeyword("ex")?t=s(e,"ex"):this.matchKeyword("px")?t=s(e,"px"):this.matchKeyword("em")?t=s(e,"em"):this.matchKeyword("bp")?t=s(e,"bp"):this.matchKeyword("dd")?t=s(e,"dd"):this.matchKeyword("pc")?t=s(e,"pc"):this.matchKeyword("in")?t=s(e,"in"):this.matchKeyword("mu")?t=s(e,"mu"):(this.onError({code:"missing-unit"}),t=s(e,"pt")),t}scanSkip(){const e=this.scanDimen();return this.matchWhitespace(),this.matchKeyword("plus")&&this.scanDimen(),this.matchWhitespace(),this.matchKeyword("minus")&&this.scanDimen(),e}scanColspec(){this.matchWhitespace();const e=[];for(;!this.end()&&"<}>"!==this.peek()&&"]"!==this.peek();){const t=this.get();if("c"===t||"r"===t||"l"===t)e.push({align:t});else if("|"===t)e.push({rule:!0});else if("@"===t){if(this.match("<{>")){const t=this.swapParseMode("math");e.push({gap:this.parse(e=>"<}>"===e)}),this.swapParseMode(t)}this.match("<}>")||this.onError({code:"unbalanced-braces"})}}return e}parseModeSet(){let e="";if(this.match("\\(")&&(e="\\)"),!e&&this.match("\\[")&&(e="\\]"),!e)return null;const t=this.swapParseMode("math"),i=new Be("math","group");return i.mathstyle="\\)"===e?"textstyle":"displaystyle",i.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(t),i.body&&0!==i.body.length?i:null}parseModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;const t=new Be("math","group");t.mathstyle="<$>"===e?"textstyle":"displaystyle",t.latexOpen="<$>"===e?"$":"$$",t.latexClose=t.latexOpen;const i=this.swapParseMode("math");return t.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(i),t.body&&0!==t.body.length?t:null}parseEnvironment(){if(!this.match("\\begin"))return null;const e=this.parseArgument("string");if(!e)return null;const t=ae(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const i=[];if(null==t?void 0:t.params)for(const a of t.params)if(a.isOptional)i.push(this.parseOptionalArgument(a.type));else{const t=this.parseArgument(a.type);t||this.onError({code:"missing-argument",arg:e}),i.push(t)}const a=this.parseMode,r=this.tabularMode,n=this.swapAtoms([]);this.tabularMode=t.tabular;const o=[],s=[];let l=[],c=!1;do{if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c&&this.match("\\end")&&(this.parseArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c)if(this.matchColumnSeparator())l.push(this.swapAtoms([]));else if(this.matchRowSeparator()){l.push(this.swapAtoms([]));let e=0;this.matchWhitespace(),this.match("[")&&(e=this.scanDimen(),this.matchWhitespace(),this.match("]")),s.push(e||0),o.push(l),l=[]}else this.atoms=this.atoms.concat(this.parse(e=>"<}>"===e||"&"===e||"\\end"===e||"\\cr"===e||"\\\\"===e))}while(!c);l.push(this.swapAtoms([])),l.length>0&&o.push(l);const d=this.swapAtoms(n);if(this.parseMode=a,this.tabularMode=r,!t.tabular&&0===d.length)return null;if(t.tabular&&0===o.length)return null;const m=new Be(this.parseMode,"array",d);return Object.assign(m,t.parser(e,i,o)),m.array=o,m.rowGaps=s,m.environmentName=e,m}parse(e){var t;const i=this.style;e||(e=e=>"<}>"===e);let a="",r=null,n=[],o=null;const s=this.swapAtoms([]);for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!a?(a=this.get(),r=re(a,"math",this.macros),r&&(n=this.parseArguments(r)[1]),o=this.swapAtoms([])):this.parseToken();let l;return a?(n.unshift(this.swapAtoms(s)),o&&n.unshift(o),l=[new Be(this.parseMode,r.type,null!==(t=r.value)&&void 0!==t?t:a.slice(1),r.parse?r.parse(a,n):null)],l[0].symbol=a):l=this.swapAtoms(s),this.style=i,l}parseGroup(){if(!this.match("<{>"))return null;const e=new Be(this.parseMode,"group");return e.body=this.parse(e=>"<}>"===e),this.match("<}>")||this.onError({code:"unbalanced-braces"}),e.latexOpen="{",e.latexClose="}",e}scanSmartFence(){if(this.matchWhitespace(),!this.match("("))return null;const e=new Be(this.parseMode,"leftright");e.leftDelim="(",e.inner=!1;const t=this.swapAtoms([]);let i=1;for(;!this.end()&&0!==i;)this.match("(")&&(i+=1),this.match(")")&&(i-=1),0!==i&&this.parseToken();return 0===i&&this.match(")"),e.rightDelim=0===i?")":"?",e.body=this.swapAtoms(t),e}scanDelim(){this.matchWhitespace();const e=this.get();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;let t=".";("\\"===e[0]||Qe(e))&&(t=e);const i=re(t,"math",this.macros);return i?i.mode&&!i.mode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:t}),null):"mopen"===i.type||"mclose"===i.type||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(t)?t:(this.onError({code:"unexpected-delimiter",arg:t}),null):(this.onError({code:"unknown-command",arg:t}),null)}parseLeftRight(){if(this.match("\\right")||this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),null;const e=this.style;let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const i=this.scanDelim();if(!i)return null;const a=this.swapAtoms([]);for(;!this.end()&&!this.match(t);)this.parseToken();this.style=e;const r=this.scanDelim(),n=new Be(this.parseMode,"leftright");return n.leftDelim=i,n.rightDelim=null!=r?r:void 0,n.inner="right"===t,n.body=this.swapAtoms(a),n}parseSupSub(){var e,t;if("math"!==this.parseMode)return!1;let i=!1,a=this.peek();for(;"^"===a||"_"===a||"'"===a;){const r="_"===a?"subscript":"superscript";if(this.match("^")||this.match("_")){const t=this.parseArgument("math");if(t){const a=this.lastSubsupAtom();a[r]=(null!==(e=a[r])&&void 0!==e?e:[]).concat(t),i=!0}}else if(this.match("'")){const e=this.lastSubsupAtom(),a=new Be(e.mode,"mord","′");a.symbol="\\prime",e.superscript=null!==(t=e.superscript)&&void 0!==t?t:[],e.superscript.push(a),i=!0}a=this.peek()}return i}parseLimits(){if(this.match("\\limits")){const e=this.lastSubsupAtom();return e.limits="limits",e.explicitLimits=!0,!0}if(this.match("\\nolimits")){const e=this.lastSubsupAtom();return e.limits="nolimits",e.explicitLimits=!0,!0}return!1}parseArguments(e){if(!e||!e.params)return[void 0,[]];let t;const i=[];let a=e.infix?2:0;for(;a")){if("delim"===e)return null!==(t=this.scanDelim())&&void 0!==t?t:".";if(/^(math|text)$/.test(e)){const t=this.swapParseMode(e),i=this.parseSimpleToken();return this.swapParseMode(t),i}}const a=this.parseMode;this.parseMode=e;const r=this.swapAtoms([]);if("string"===e)i=this.scanString(),this.skipUntilToken("<}>");else if("balanced-string"===e)i=this.scanBalancedString(),this.skipUntilToken("<}>");else if("number"===e)i=this.scanNumber(),this.skipUntilToken("<}>");else if("dimen"===e)i=this.scanDimen(),this.skipUntilToken("<}>");else if("skip"===e)i=this.scanSkip(),this.skipUntilToken("<}>");else if("colspec"===e)i=this.scanColspec(),this.skipUntilToken("<}>");else if("color"===e)i=this.scanColor()||"#ffffff",this.skipUntilToken("<}>");else if("delim"===e)i=this.scanDelim()||".",this.skipUntilToken("<}>");else{const t=this.index;let a=1;do{const e=this.get();"<}>"===e&&(a-=1),"<{>"===e&&(a+=1)}while(a>0&&!this.end());if(i=function(e,t,i,a){var r;return(null===(r=b[e])||void 0===r?void 0:r.parse)?b[e].parse(t,i,a):null}(e,this.tokens.slice(t,this.index-1),this.onError,{args:this.args,macros:this.macros,smartFence:this.smartFence,style:this.style,parse:(e,t,a)=>{const r=new Je(t,a.args,a.macros,this.onError);return r.parseMode=e,r.style=a.style,i=r.parse(),[i,t.slice(r.index)]}}),!i){this.index=t;do{this.atoms=this.atoms.concat(this.parse())}while(!this.match("<}>")&&!this.end())}}this.parseMode=a;const n=this.swapAtoms(r);return null!=i?i:n}parseOptionalArgument(e){var t;if(e="auto"===e?this.parseMode:e,this.matchWhitespace(),!this.match("["))return null;const i=this.parseMode;this.parseMode=e;const a=this.swapAtoms();let r;for(;!this.end()&&!this.match("]");)if("string"===e)r=this.scanString();else if("number"===e)r=this.scanNumber();else if("dimen"===e)r=this.scanDimen();else if("skip"===e)r=this.scanSkip();else if("colspec"===e)r=this.scanColspec();else if("color"===e)r=null!==(t=this.scanColor())&&void 0!==t?t:"#ffffff";else if("bbox"===e){const e=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/),t={};for(const i of e){const e=be(i);if(e)t.backgroundcolor=e;else{const e=i.match(/^\s*([0-9.]+)\s*([a-z][a-z])/);if(e)t.padding=s(e[1],e[2]);else{const e=i.match(/^\s*border\s*:\s*(.*)/);e&&(t.border=e[1])}}}r=t}else this.atoms=this.atoms.concat(this.parse(e=>"]"===e));this.parseMode=i;const n=this.swapAtoms(a);return null!=r?r:n}parseSimpleToken(){const e=this.get();if(!e)return null;let i=null;if(""===e)"text"===this.parseMode&&(i=new Be("text",""," ",this.style),i.symbol=" ");else if("\\"===e[0]){if("\\placeholder"===e)i=new Be(this.parseMode,"placeholder",this.parseArgument("string"),this.style),i.captureSelection=!0;else if("\\char"===e){const e=this.index;let t=Math.floor(this.scanNumber(!0));(!isFinite(t)||t<0||t>1114111)&&(t=10067),i=new Be(this.parseMode,"math"===this.parseMode?"mord":"",String.fromCodePoint(t)),i.symbol="\\char",i.latex="\\char"+g(this.tokens.slice(e,this.index))}else if("\\hskip"===e||"\\kern"===e){const t=this.scanSkip();isFinite(t)&&(i=new Be(this.parseMode,"spacing",null,this.style),i.width=t,i.symbol=e,i.latex=e)}else if(i=this.scanMacro(e),!i){const t=re(e,this.parseMode,{});if(!t)return this.onError({code:"unknown-command",arg:e}),i=new Be("math","error",e),i.symbol=e,i.latex=e,[i];if(t.mode&&!t.mode.includes(this.parseMode))return this.onError({code:"invalid-command",arg:e}),i=new Be("math","error",e),i.symbol=e,i.latex=e,[i];const a=this.index,[r,n]=this.parseArguments(t);if(!n)return null;if(t.infix)this.onError({code:"too-many-infix-commands",arg:e});else{if(t.parse){const a=t.parse(e,n);if(a.type)i=new Be(this.parseMode,t.type,r?this.parseArgument(r):null,{...this.style,...a});else{const e=this.parseMode;if(a.mode&&(this.parseMode=a.mode,delete a.mode),a.mathstyle){this.parseMode="math";const e=new Be("math","mathstyle");e.mathstyle=a.mathstyle,this.atoms.push(e)}if(r){const e=this.style;this.style={...this.style,...a},i=this.parseArgument(r),this.style=e}else this.style={...this.style,...a};this.parseMode=e}}else{const a={...this.style,variant:t.variant||this.style.variant,variantStyle:t.variantStyle||this.style.variantStyle};i=new Be(this.parseMode,t.type||"mop",t.value||e,a)}if(i instanceof Be&&!/^\\(llap|rlap|class|cssId)$/.test(e)){i.symbol=e;const t=g(this.tokens.slice(a,this.index));if(t&&(i.latex=i.symbol+t),i.isFunction&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}}}}else if(Qe(e)){const t=re(e,this.parseMode,this.macros);if(t){const a={...this.style};i=new Be(this.parseMode,t.type,t.value||e,a),t.isFunction&&(i.isFunction=!0)}else i=new Be(this.parseMode,"math"===this.parseMode?"mord":"",e,this.style);if(i.symbol=e,i.latex=J(this.parseMode,e),(null==t?void 0:t.isFunction)&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}else"<}>"===e?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e});return i&&!t(i)?[i]:i}scanMacro(e){var t;const i=e.slice(1);if(!this.macros||!this.macros[i])return null;const a=this.index,r=[];let n,o=0;"string"==typeof this.macros[i]?(n=this.macros[i],/(^|[^\\])#1/.test(n)&&(o=1),/(^|[^\\])#2/.test(n)&&(o=2),/(^|[^\\])#3/.test(n)&&(o=3),/(^|[^\\])#4/.test(n)&&(o=4),/(^|[^\\])#5/.test(n)&&(o=5),/(^|[^\\])#6/.test(n)&&(o=6),/(^|[^\\])#7/.test(n)&&(o=7),/(^|[^\\])#8/.test(n)&&(o=8),/(^|[^\\])#9/.test(n)&&(o=9)):(n=this.macros[i].def,o=this.macros[i].args||0);for(let e=1;e<=o;e++)r[e]=this.matchLiteralArg();r["?"]=null===(t=this.args)||void 0===t?void 0:t["?"];const s=new Be(this.parseMode,"group",et(n,this.parseMode,r,this.macros,!1,this.onError));return s.captureSelection=!0,s.symbol=e,s.latex=e+g(this.tokens.slice(a)),s}parseToken(){let e=this.parseEnvironment()||this.parseModeShift()||this.parseModeSet()||this.parseGroup()||this.parseLeftRight();return!(e||!this.parseSupSub()&&!this.parseLimits())||(e||(e=this.parseSimpleToken()),t(e)?this.atoms=this.atoms.concat(e):e&&this.atoms.push(e),null!==e)}}function et(e,t,i,a,r=!1,n){let o=[];const s=new Je(Xe(e,i),i,a,t=>{"function"==typeof n&&n({...t,latex:e})});for(s.parseMode=t||"math",r&&(s.smartFence=!0);!s.end();){const e=s.parse();e&&(o=o.concat(e))}return o}var tt,it;const at=null!==(it=null===(tt=document.currentScript)||void 0===tt?void 0:tt.src)&&void 0!==it?it:function(){const e=String((new Error).stack).replace(/^Error.*\n/,"").split("\n");if(0===e.length)return"";const t=e[0].match(/http.*js/);return t?t[0]:""}();async function rt(e,t){var i;if((null===(i=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))||void 0===i||!i)&&"fonts"in document){const i=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"];let a=!1;if(!/firefox/i.test(navigator.userAgent))try{a=i.every(e=>document.fonts.check("16px "+e))}catch(e){a=!1}if(!a){if(document.body.classList.contains("ML__fonts-loading"))return;document.body.classList.add("ML__fonts-loading");const i=new URL(null!=e?e:"./fonts",at).toString(),a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular",{style:"italic"}],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(e=>function(e,t,i={}){return new FontFace(e,`url(${t}.woff2) format('woff2'), url(${t}.woff) format('woff')`,i)}(e[0].replace(/-[a-zA-Z]+$/,""),i+"/"+e[0],e[1]));try{(await Promise.all(a.map(e=>{try{return e.load()}catch(e){"function"==typeof t&&t({code:"font-not-found",arg:e})}}))).forEach(e=>document.fonts.add(e)),document.body.classList.remove("ML__fonts-loading")}catch(e){}}}}function nt(e,t){var i,a;if(!t)return null;let r=null!==(i=null==e?void 0:e.getRootNode())&&void 0!==i?i:null===document||void 0===document?void 0:document.head;if(!r)return null;r===document&&(r=document.head);const n=function(e){let t=0;if(0===e.length)return t;for(let i=0;i{var e;const t=document.head.querySelector(`style[data-id="${n}"]`);if(t){const i=parseFloat(null!==(e=t.getAttribute("data-refcount"))&&void 0!==e?e:"0");1===i?t.remove():t.setAttribute("data-refcount",Number(i-1).toString())}}}}function ot(e){return 0===e.length||1===e.length&&"first"===e[0].type}function st(e){const t=e.siblings();for(let e=t.length-1;e>=0;e--)t[e].isSuggestion&&t.splice(e,1)}function lt(e){let t=1,i=e.ancestor(t);for(;i;)i.latex=void 0,t+=1,i=e.ancestor(t)}function ct(e,t){let i="";for(const t of e)i+=t.relation+":"+t.offset+"/";return t&&(i+="#"+t),i}function dt(e){const t={path:[],extent:0},i=e.split("#");i.length>1&&(t.extent=parseInt(i[1]));const a=i[0].split("/");for(const e of a){const i=e.match(/([^:]*):(.*)/);i&&t.path.push({relation:i[1],offset:parseInt(i[2])})}return t}function mt(e,t){let i=0,a=-1,r=!1;for(;!r;)a+=1,r=a>=e.length||a>=t.length,r=r||!(e[a].relation===t[a].relation&&e[a].offset===t[a].offset);return i=a===e.length&&a===t.length?0:a+1===e.length&&a+1===t.length&&e[a].relation===t[a].relation?1:2,i}function pt(e){return dt(ct(e)).path}function ut(e,t){let i=0;for(let a=0;a0;)a.col+=1,(!e[a.row]||a.col>=e[a.row].length)&&(a.col=0,a.row+=1),i-=1;return a}function ft(e,i){var a;let r;return"object"!=typeof i&&(i=ht(e,i)),t(e[i.row])&&(r=null!==(a=e[i.row][i.col])&&void 0!==a?a:null),!r||0!==r.length&&"first"===r[0].type||r.unshift(new Be("math","first")),r}function gt(e){let t=0,i=0,a=1;for(const t of e)i+=1,t.length>a&&(a=t.length);return t=i*a,t}function yt(e,t,i){const a={...t};if(a.row+=i,a.row<0){if(a.col+=i,a.row=e.length-1,a.col<0)return null;for(;a.row>=0&&!ft(e,a);)a.row-=1;if(a.row<0)return null}else if(a.row>=e.length){for(a.col+=i,a.row=0;a.rowe.length-1)return null}return a}class bt{constructor(e,t,i,a){this.options={mode:"math",removeExtraneousParentheses:!1,...e},this.root=Fe(this.options.mode),this.path=[{relation:"body",offset:0}],this.extent=0,this.setListeners(t),this.setHooks(i),this.mathfield=a,this.suppressChangeNotifications=!1}clone(){const e=new bt(this.options,this.listeners,this.hooks,this.mathfield);return e.root=this.root,e.path=pt(this.path),e}setListeners(e){this.listeners=e}setHooks(e){this.hooks={announce:(null==e?void 0:e.announce)?e.announce:(e,t,i,a)=>{},moveOut:(null==e?void 0:e.moveOut)?e.moveOut:()=>!0,tabOut:(null==e?void 0:e.tabOut)?e.tabOut:()=>!0}}announce(e,t,i=[]){this.hooks.announce(this.mathfield,e,t,i)}toString(){return ct(this.path,this.extent)}siblings(){var e;if(0===this.path.length)return[];let t;return this.parent().array?t=ft(this.parent().array,this.relation()):(t=null!==(e=this.parent()[this.relation()])&&void 0!==e?e:[],"string"==typeof t&&(t=[])),0!==t.length&&"first"===t[0].type||t.unshift(new Be(this.parent().mode,"first")),t}anchorOffset(){return this.path.length>0?this.path[this.path.length-1].offset:0}focusOffset(){return this.path.length>0?this.path[this.path.length-1].offset+this.extent:0}startOffset(){return Math.min(this.focusOffset(),this.anchorOffset())}endOffset(){return Math.max(this.focusOffset(),this.anchorOffset())}sibling(e){return this.siblings()[this.startOffset()+e]}ancestor(e){if(e>this.path.length)return null;let t=this.root;for(let i=0;i0?this.path[this.path.length-1].relation:""}insertFirstAtom(){this.siblings()}}function vt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionWillChange)||e.suppressChangeNotifications||e.listeners.onSelectionWillChange(e)}function xt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionDidChange)||e.suppressChangeNotifications||e.listeners.onSelectionDidChange(e)}function kt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentWillChange)||e.suppressChangeNotifications||e.listeners.onContentWillChange(e)}function _t(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentDidChange)||e.suppressChangeNotifications||e.listeners.onContentDidChange(e)}function wt(e){return!!e&&("mord"===e.type&&/[0-9.]/.test(e.body)||"mpunct"===e.type&&","===e.body)}function Mt(e){const t=e.siblings();if(t.length<=1)return null;let i=Math.min(e.endOffset(),t.length-1);if("command"!==t[i].type)return null;for(;i>0&&"command"===t[i].type;)i-=1;let a=e.startOffset()+1;for(;a<=t.length-1&&"command"===t[a].type;)a+=1;return a>i?{start:i+1,end:a}:null}function St(e){const t=Pt(e)?Vt(e):e.sibling(1);let i;if(t){if("command"===t.type)return"command";i=t.mode}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i=r.mode),a+=1,r=e.ancestor(a);return i}function zt(e){const t=Pt(e)?Vt(e):e.sibling(1);let i;if(t&&"first"!==t.type){if("command"===t.type)return{};i={color:t.color,backgroundColor:t.backgroundColor,fontFamily:t.fontFamily,fontShape:t.fontShape,fontSeries:t.fontSeries,fontSize:t.fontSize}}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i={color:r.color,backgroundColor:r.backgroundColor,fontFamily:r.fontFamily,fontShape:r.fontShape,fontSeries:r.fontSeries,fontSize:r.fontSize}),a+=1,r=e.ancestor(a);return i}function Lt(e,t=1,i=!0){var a;const r=e.suppressChangeNotifications;e.suppressChangeNotifications=!0;const n=e.clone(),o=e.extent;Ct(e,t),"placeholder"===Vt(e).type&&Ct(e,t);const s=Yt(e,(t,i)=>"placeholder"===i.type||t.length>1&&1===e.siblings().length,t);if(0===s.length){if(jt(e,n,o),i&&(null===(a=e.hooks)||void 0===a?void 0:a.tabOut)&&e.hooks.tabOut(e,t>0?"forward":"backward")&&document.activeElement){const e='a[href]:not([disabled]),\n button:not([disabled]),\n textarea:not([disabled]),\n input[type=text]:not([disabled]),\n select:not([disabled]),\n [contentEditable="true"],\n [tabindex]:not([disabled]):not([tabindex="-1"])',i=Array.prototype.filter.call(document.querySelectorAll(e),e=>(e.offsetWidth>0||e.offsetHeight>0)&&!e.contains(document.activeElement)||e===document.activeElement);let a=i.indexOf(document.activeElement)+t;a<0&&(a=i.length-1),a>=i.length&&(a=0),i[a].focus()}return e.suppressChangeNotifications=r,!1}return vt(e),jt(e,s[0]),"placeholder"===Vt(e).type&&Rt(e,-1),e.announce("move",n),xt(e),e.suppressChangeNotifications=r,!0}function At(e,t=0,i=0,a=""){const r=e.path[e.path.length-1].relation;a||(a=r);const n=e.parent();if(!n&&"body"!==a)return!1;const o=a.startsWith("cell");if(!o&&!n[a]||o&&!n.array)return!1;const s=a!==r;e.path[e.path.length-1].relation=a;const l=e.siblings().length;e.path[e.path.length-1].relation=r;const c=e.extent;"end"===i?i=l-t-1:"start"===i&&(i=-t),Rt(e,i);const d=e.extent!==c;Rt(e,c),t<0&&(t=l+t),t=Math.max(0,Math.min(t,l-1));const m=e.path[e.path.length-1].offset;return(s||m!==t||d)&&(s&&Xt(e),vt(e),e.path[e.path.length-1].relation=a,e.path[e.path.length-1].offset=t,Rt(e,i),xt(e)),!0}function qt(e,i){var a;i=null!=i?i:{};const r={body:"numer",numer:"denom",denom:"index",index:"overscript",overscript:"underscript",underscript:"subscript",subscript:"superscript"};if(e.anchorOffset()===e.siblings().length-1){Xt(e);let t=r[e.relation()];const n=e.parent();for(;t&&!n[t];)t=r[t];if(t)return void At(e,0,0,t);if(e.parent().array){const t=gt(e.parent().array);let i=parseInt(e.relation().match(/cell([0-9]*)$/)[1])+1;for(;i=0;){if(ft(e.parent().array,t)&&At(e,-1,0,"cell"+t))return void xt(e);t-=1}}return 1===e.path.length?(e.suppressChangeNotifications||!(null===(a=e.hooks)||void 0===a?void 0:a.moveOut)||e.hooks.moveOut(e,"backward"))&&(e.path[0].offset=e.root.body.length-1):(e.path.pop(),At(e,e.anchorOffset()-1)),void xt(e)}const n=Vt(e);if(!n.captureSelection){let i;if(n.array){i="";const t=gt(n.array);let a=t-1;for(;!i&&a0)for(It(e)&&t--;t>0;)qt(e),t--;else if(t<0)for(Ht(e)&&t++;0!==t;)$t(e),t++;e.announce("move",i)}return!0}function Dt(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;Ht(e);const r=e.relation();if("denom"===r)a?(vt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Rt(e,1),xt(e)):At(e,e.anchorOffset(),0,"numer"),e.announce("moveUp");else if(e.parent().array){let i=ht(e.parent().array,r);i=yt(e.parent().array,i,-1),i&&ft(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+ut(e.parent().array,i),At(e,e.anchorOffset()),e.announce("moveUp")):Ct(e,-1,t)}else e.announce("line");return!0}function Tt(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;It(e);const r=e.relation();if("numer"===r)a?(vt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Rt(e,1),xt(e)):At(e,e.anchorOffset(),0,"denom"),e.announce("moveDown");else if(e.parent().array){let i=ht(e.parent().array,r);i=yt(e.parent().array,i,1),i&&ft(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+ut(e.parent().array,i),At(e,e.anchorOffset()),e.announce("moveDown")):Ct(e,1,t)}else e.announce("line");return!0}function Et(e,t){let i=e.path[e.path.length-1].offset,a=0;const r=e.clone();a=e.extent+t;const n=i+a;if(n<0&&0!==a){if(e.path.length>1)return vt(e),e.path.pop(),Rt(e,-1),xt(e),e.announce("move",r),!0;i=e.path[e.path.length-1].offset,a=e.extent}else if(n>=e.siblings().length){if(e.path.length>1)return vt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Rt(e,1),xt(e),e.announce("move",r),!0;Pt(e)&&(i-=1),a-=1}return At(e,i,a),e.announce("move",r),!0}function Kt(e,t,i){var a;const r=null!==(a=(i=null!=i?i:{extend:!1}).extend)&&void 0!==a&&a;t=t<0?-1:1;const n=e.clone(),o=e.siblings(),s=e.focusOffset();let l=s+t;if(r&&(l=Math.min(Math.max(0,l),o.length-1)),l<0||l>=o.length)Ct(e,t,i);else{if(o[l]&&"text"===o[l].mode){if(l=function(e,t,i){i=i<0?-1:1;const a=e.siblings();if(!a[t])return t;if("text"!==a[t].mode)return t;let r;if(U.test(a[t].body)){let e,n=t;do{e="text"===a[n].mode&&U.test(a[n].body),n+=i}while(a[n]&&e);r=a[n]?n-2*i:n-i}else if(/\s/.test(a[t].body)){let e=t;for(;a[e]&&"text"===a[e].mode&&/\s/.test(a[e].body);)e+=i;if(a[e]){let t=!0;do{t="text"===a[e].mode&&!/\s/.test(a[e].body),e+=i}while(a[e]&&t);r=a[e]?e-2*i:e-i}else r=e-i}else{let e=t;for(;a[e]&&"text"===a[e].mode&&!/\s/.test(a[e].body);)e+=i;r=a[e]?e:e-i;let n=!0;for(;a[e]&&n;)n="text"===a[e].mode&&/\s/.test(a[e].body),n&&(r=e),e+=i;r=a[e]?e-2*i:e-i}return r-(i>0?0:1)}(e,l,t),l<0&&!r)return void At(e,0);if(l>o.length)return At(e,o.length-1),void Ct(e,t,i)}else{const e=o[l]?o[l].type:"";if("mopen"===e&&t>0||"mclose"===e&&t<0){let i="mopen"===e?1:-1;for(l+=t>0?1:-1;l>=0&&l0&&(l-=1)}else{for(;o[l]&&"math"===o[l].mode&&o[l].type===e;)l+=t;l-=t>0?1:0}}if(r){const t=e.anchorOffset();At(e,t,l-t)}else At(e,l);e.announce("move",n)}}function Nt(e,t=1,i){var a;i=null!=i?i:{extend:!1},t=t<0?-1:1;const r=e.clone(),n=[{relation:"body",offset:e.path[0].offset}];let o;return null!==(a=!i.extend)&&void 0!==a&&a?(n[0].offset=t<0?0:e.root.body.length-1,o=0):t<0?n[0].offset>0&&(o=-n[0].offset):n[0].offset=a)return At(e,e.endOffset()-1,1),!0;At(e,i,a-i)}else if("mord"===e.sibling(0).type&&/[0-9,.]/.test(e.sibling(0).body)){let i=e.startOffset(),a=e.endOffset();for(;wt(t[i]);)i-=1;for(;wt(t[a]);)a+=1;a-=1,At(e,i,a-i)}else At(e,0,"end");return!0}function Ft(e){return e.path=[{relation:"body",offset:0}],At(e,0,"end")}function Pt(e){return 0===e.extent}function Rt(e,t){return e.extent=t,!0}function It(e){return 0!==e.extent&&(At(e,e.endOffset()),!0)}function Ht(e){return 0!==e.extent&&(At(e,e.startOffset()),!0)}function Wt(e){if(e.path.length>1){const t=e.clone();return e.path.pop(),Rt(e,0),e.announce("move",t),!0}return e.announce("plonk"),!1}function Vt(e){if(e.parent().array)return ft(e.parent().array,e.relation())[e.anchorOffset()];const t=e.siblings();return t[Math.min(t.length-1,e.anchorOffset())]}function Ut(e,t,i,a={extendToWordBoundary:!1}){const r=mt(t,i);if(0===r)return a.extendToWordBoundary?Ut(e,t=Zt(e,t,-1),i=Zt(e,i,1)):jt(e,pt(t),0);if(1===r){const r=i[i.length-1].offset-t[t.length-1].offset;return a.extendToWordBoundary?Ut(e,t=Zt(e,t,r<0?1:-1),i=Zt(e,i,r<0?-1:1)):jt(e,pt(t),r)}let n=function(e,t){const i=[],a=Math.min(e.length-1,t.length-1);let r=0;for(;r<=a&&e[r].relation===t[r].relation&&e[r].offset===t[r].offset;)i.push(e[r]),r+=1;return i}(t,i);const o=n.length;if(t.length===o||i.length===o||t[o].relation!==i[o].relation)return jt(e,n,-1);n.push(t[o]),n=pt(n);let s=i[o].offset-t[o].offset+1;return s<=0?i.length>o+1?(n[o].relation=i[o].relation,n[o].offset=i[o].offset,n[n.length-1].offset-=1,s=2-s):(n[o].relation=i[o].relation,n[o].offset=i[o].offset,s=1-s):i.length<=t.length?n[n.length-1].offset-=1:i.length>t.length&&(n[o].offset-=1),jt(e,n,s)}function jt(e,i,a=0){let r;if("string"==typeof i)r=dt(i);else if(t(i)){const t=pt(i),n=e.path;e.path=t,0===a&&"placeholder"===Vt(e).type&&(t[t.length-1].offset=e.anchorOffset()-1,a=1),r={path:t,extent:a||0},e.path=n}else r=i;const n=0!==mt(e.path,r.path),o=r.extent!==e.extent;return(n||o)&&(n&&Xt(e),vt(e),e.path=pt(r.path),e.siblings().length=0?It(r):(Ht(r),Ct(r,1));const n=Vt(r);do{t.bind(r)(r.path,Vt(r))&&a.push(r.toString()),i>=0?qt(r,{iterateAll:!0}):$t(r,{iterateAll:!0})}while(n!==Vt(r));return a}const Qt="apple"===ii()?{id:"apple.en-intl",displayName:"English (international)",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","ı"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","Î"],KeyE:["e","E","´","´"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","˝"],KeyH:["h","H","˙","Ó"],KeyI:["i","I","ˆ","ˆ"],KeyJ:["j","J","∆","Ô"],KeyK:["k","K","˚",""],KeyL:["l","L","¬","Ò"],KeyM:["m","M","µ","Â"],KeyN:["n","N","˜","˜"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®","‰"],KeyS:["s","S","ß","Í"],KeyT:["t","T","†","ˇ"],KeyU:["u","U","¨","¨"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","˛"],KeyY:["y","Y","¥","Á"],KeyZ:["z","Z","Ω","¸"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","ˆ","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["-","_","–","—"],Equal:["=","+","≠","±"],BracketLeft:["[","{","“","”"],BracketRight:["]","}","‘","’"],Backslash:["\\","|","«","»"],Semicolon:[";",":","…","Ú"],Quote:["'",'"',"æ","Æ"],Backquote:["`","˜","`","`"],Comma:[",","<","≤","¯"],Period:[".",">","≥","˘"],Slash:["/","?","÷","¿"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}}:"windows"===ii()?{id:"windows.en-intl",displayName:"English (international)",platform:"windows",locale:"en",score:0,mapping:{KeyA:["a","A","á","Á"],KeyB:["b","B","",""],KeyC:["c","C","©","¢"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","é","É"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","í","Í"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","ø","Ø"],KeyM:["m","M","µ",""],KeyN:["n","N","ñ","Ñ"],KeyO:["o","O","ó","Ó"],KeyP:["p","P","ö","Ö"],KeyQ:["q","Q","ä","Ä"],KeyR:["r","R","®",""],KeyS:["s","S","ß","§"],KeyT:["t","T","þ","Þ"],KeyU:["u","U","ú","Ú"],KeyV:["v","V","",""],KeyW:["w","W","å","Å"],KeyX:["x","X","",""],KeyY:["y","Y","ü","Ü"],KeyZ:["z","Z","æ","Æ"],Digit1:["1","!","¡","¹"],Digit2:["2","@","²",""],Digit3:["3","#","³",""],Digit4:["4","$","¤","£"],Digit5:["5","%","€",""],Digit6:["6","^","¼",""],Digit7:["7","&","½",""],Digit8:["8","*","¾",""],Digit9:["9","(","‘",""],Digit0:["0",")","’",""],Space:[" "," ","",""],Minus:["-","_","¥",""],Equal:["=","+","×","÷"],BracketLeft:["[","{","«",""],BracketRight:["]","}","»",""],Backslash:["\\","|","¬","¦"],Semicolon:[";",":","¶","°"],Quote:["'",'"',"´","¨"],Backquote:["`","~","",""],Comma:[",","<","ç","Ç"],Period:[".",">","",""],Slash:["/","?","¿",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}}:{id:"linux.en",displayName:"English",platform:"linux",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Jt={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},ei=[];let ti;function ii(){let e="linux";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?e="apple":/^(win)/i.test(navigator.platform)?e="windows":/(android)/i.test(navigator.userAgent)?e="linux":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e="apple":/\bCrOS\b/i.test(navigator.userAgent)&&(e="linux")),e}function ai(e){e.platform===ii()&&ei.push(e)}function ri(e){ti=ei.find(t=>e.startsWith(t.locale))}function ni(){return null!=ti?ti:ei[0]}ai(Qt),ai({id:"apple.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","‡","Ω"],KeyB:["b","B","ß","∫"],KeyC:["c","C","©","¢"],KeyD:["d","D","∂","∆"],KeyE:["e","E","ê","Ê"],KeyF:["f","F","ƒ","·"],KeyG:["g","G","fi","fl"],KeyH:["h","H","Ì","Î"],KeyI:["i","I","î","ï"],KeyJ:["j","J","Ï","Í"],KeyK:["k","K","È","Ë"],KeyL:["l","L","¬","|"],KeyM:[",","?","∞","¿"],KeyN:["n","N","~","ı"],KeyO:["o","O","œ","Œ"],KeyP:["p","P","π","∏"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","®","‚"],KeyS:["s","S","Ò","∑"],KeyT:["t","T","†","™"],KeyU:["u","U","º","ª"],KeyV:["v","V","◊","√"],KeyW:["z","Z","Â","Å"],KeyX:["x","X","≈","⁄"],KeyY:["y","Y","Ú","Ÿ"],KeyZ:["w","W","‹","›"],Digit1:["&","1","","´"],Digit2:["é","2","ë","„"],Digit3:['"',"3","“","”"],Digit4:["'","4","‘","’"],Digit5:["(","5","{","["],Digit6:["§","6","¶","å"],Digit7:["è","7","«","»"],Digit8:["!","8","¡","Û"],Digit9:["ç","9","Ç","Á"],Digit0:["à","0","ø","Ø"],Space:[" "," "," "," "],Minus:[")","°","}","]"],Equal:["-","_","—","–"],BracketLeft:["^","¨","ô","Ô"],BracketRight:["$","*","€","¥"],Backslash:["`","£","@","#"],Semicolon:["m","M","µ","Ó"],Quote:["ù","%","Ù","‰"],Backquote:["<",">","≤","≥"],Comma:[";",".","…","•"],Period:[":","/","÷","\\"],Slash:["=","+","≠","±"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","•","Ÿ"],NumpadEqual:["=","=","=","="]}}),ai({id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","ß",""],KeyC:["c","C","©"," "],KeyD:["d","D","∂","∆"],KeyE:["e","E","€","€"],KeyF:["f","F","ƒ","fi"],KeyG:["g","G","","fl"],KeyH:["h","H","™"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","¶","¯"],KeyK:["k","K","§","ˇ"],KeyL:["l","L"," ","˘"],KeyM:["m","M","µ","˚"],KeyN:["n","N"," ","˙"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®"," "],KeyS:["s","S","∫"," "],KeyT:["t","T","†","‡"],KeyU:["u","U"," "," "],KeyV:["v","V","√","◊"],KeyW:["w","W","æ","Æ"],KeyX:["x","X","∑","›"],KeyY:["y","Y","¥"," "],KeyZ:["z","Z","Ω","‹"],Digit1:["1","!","|","ı"],Digit2:["2",'"',"@","˝"],Digit3:["3","·","#","•"],Digit4:["4","$","¢","£"],Digit5:["5","%","∞","‰"],Digit6:["6","&","¬"," "],Digit7:["7","/","÷","⁄"],Digit8:["8","(","“","‘"],Digit9:["9",")","”","’"],Digit0:["0","=","≠","≈"],Space:[" "," "," "," "],Minus:["'","?","´","¸"],Equal:["¡","¿","‚","˛"],BracketLeft:["`","^","[","ˆ"],BracketRight:["+","*","]","±"],Backslash:["ç","Ç","}","»"],Semicolon:["ñ","Ñ","~","˜"],Quote:["´","¨","{","«"],Backquote:["<",">","≤","≥"],Comma:[",",";","„",""],Period:[".",":","…","…"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["º","ª","\\","°"]}}),ai({id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","·","#",""],Digit4:["4","$","~",""],Digit5:["5","%","€",""],Digit6:["6","&","¬",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["¡","¿","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["ç","Ç","}",""],Semicolon:["ñ","Ñ","",""],Quote:["´","¨","{",""],Backquote:["º","ª","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ai({id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["z","Z","«","<"],Digit1:["1","!","|","¡"],Digit2:["2",'"',"@","⅛"],Digit3:["3","·","#","£"],Digit4:["4","$","~","$"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["'","?","\\","¿"],Equal:["¡","¿","̃","~"],BracketLeft:["̀","̂","[","̊"],BracketRight:["+","*","]","̄"],Backslash:["ç","Ç","}","̆"],Semicolon:["ñ","Ñ","~","̋"],Quote:["́","̈","{","{"],Backquote:["º","ª","\\","\\"],Comma:[",",";","─","×"],Period:[".",":","·","÷"],Slash:["-","_","̣","̇"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}}),ai({id:"linux.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","@","Ω"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:[",","?","́","̋"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["z","Z","«","<"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["w","W","ł","Ł"],Digit1:["&","1","¹","¡"],Digit2:["é","2","~","⅛"],Digit3:['"',"3","#","£"],Digit4:["'","4","{","$"],Digit5:["(","5","[","⅜"],Digit6:["-","6","|","⅝"],Digit7:["è","7","`","⅞"],Digit8:["_","8","\\","™"],Digit9:["ç","9","^","±"],Digit0:["à","0","@","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:[")","°","]","¿"],Equal:["=","+","}","̨"],BracketLeft:["̂","̈","̈","̊"],BracketRight:["$","£","¤","̄"],Backslash:["*","µ","̀","̆"],Semicolon:["m","M","µ","º"],Quote:["ù","%","̂","̌"],Backquote:["²","~","¬","¬"],Comma:[";",".","─","×"],Period:[":","/","·","÷"],Slash:["!","§","̣","̇"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"]}}),ai({id:"windows.french",locale:"fr",displayName:"French",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["é","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["è","7","`",""],Digit8:["_","8","\\",""],Digit9:["ç","9","^",""],Digit0:["à","0","@",""],Space:[" "," ","",""],Minus:[")","°","]",""],Equal:["=","+","}",""],BracketLeft:["^","¨","",""],BracketRight:["$","£","¤",""],Backslash:["*","µ","",""],Semicolon:["m","M","",""],Quote:["ù","%","",""],Backquote:["²","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","§","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ai({id:"windows.german",locale:"de",displayName:"German",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","µ",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"²",""],Digit3:["3","§","³",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["ß","?","\\","ẞ"],Equal:["´","`","",""],BracketLeft:["ü","Ü","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["ö","Ö","",""],Quote:["ä","Ä","",""],Backquote:["^","°","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}}),ai({id:"apple.german",locale:"de",displayName:"German",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","‹"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","™"],KeyE:["e","E","€","‰"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","Ì"],KeyH:["h","H","ª","Ó"],KeyI:["i","I","⁄","Û"],KeyJ:["j","J","º","ı"],KeyK:["k","K","∆","ˆ"],KeyL:["l","L","@","fl"],KeyM:["m","M","µ","˘"],KeyN:["n","N","~","›"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","«","»"],KeyR:["r","R","®","¸"],KeyS:["s","S","‚","Í"],KeyT:["t","T","†","˝"],KeyU:["u","U","¨","Á"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","Ù"],KeyY:["z","Z","Ω","ˇ"],KeyZ:["y","Y","¥","‡"],Digit1:["1","!","¡","¬"],Digit2:["2",'"',"“","”"],Digit3:["3","§","¶","#"],Digit4:["4","$","¢","£"],Digit5:["5","%","[","fi"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","˜"],Digit9:["9",")","}","·"],Digit0:["0","=","≠","¯"],Space:[" "," "," "," "],Minus:["ß","?","¿","˙"],Equal:["´","`","'","˚"],BracketLeft:["ü","Ü","•","°"],BracketRight:["+","*","±",""],Backslash:["#","'","‘","’"],Semicolon:["ö","Ö","œ","Œ"],Quote:["ä","Ä","æ","Æ"],Backquote:["<",">","≤","≥"],Comma:[",",";","∞","˛"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","°","„","“"],NumpadEqual:["=","=","=","="]}});const oi=[{key:"ctrl+alt+e",command:["insert","\\text{cmd+alt+e}"]},{key:"cmd+alt+a",command:["insert","\\text{cmd+alt+a}"]},{key:"ctrl+alt+a",command:["insert","\\text{ctrl+alt+a}"]},{key:"meta+alt+2",command:["insert","\\text{meta+alt+2}"]},{key:"ctrl+alt+shift+a",command:["insert","\\text{ctrl+alt+shift+a}"]},{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendToPreviousChar"},{key:"shift+[ArrowRight]",command:"extendToNextChar"},{key:"shift+[ArrowUp]",command:"extendUp"},{key:"shift+[ArrowDown]",command:"extendDown"},{key:"[Backspace]",command:"deletePreviousChar"},{key:"alt+[Delete]",command:"deletePreviousChar"},{key:"[Delete]",command:"deleteNextChar"},{key:"alt+[Backspace]",command:"deleteNextChar"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"alt+shift+[ArrowLeft]",command:"extendToPreviousWord"},{key:"alt+shift+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"ctrl+shift+[ArrowLeft]",command:"extendToGroupStart"},{key:"ctrl+shift+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Space]",ifMode:"math",command:"moveAfterParent"},{key:"shift+[Space]",ifMode:"math",command:"moveBeforeParent"},{key:"[Home]",command:"moveToMathFieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathFieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"cmd+shift+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathFieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathFieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"cmd+shift+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",ifMode:"math",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"math",command:"moveToPreviousPlaceholder"},{key:"[Tab]",ifMode:"text",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"text",command:"moveToPreviousPlaceholder"},{key:"[Escape]",ifMode:"math",command:["switch-mode","command"]},{key:"\\",ifMode:"math",command:["switch-mode","command"]},{key:"alt+[Equal]",ifMode:"math",command:["applyStyle",{mode:"text"}]},{key:"alt+[Equal]",ifMode:"text",command:["applyStyle",{mode:"math"}]},{key:"[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[Tab]",ifMode:"command",command:["complete",{acceptSuggestion:!0}]},{key:"[Return]",ifMode:"command",command:"complete"},{key:"[Enter]",ifMode:"command",command:"complete"},{key:"shift+[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[ArrowDown]",ifMode:"command",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"command",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deletePreviousChar"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"[Undo]",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+y",command:"redo"},{key:"ctrl+shift+z",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+z",command:"redo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathFieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathFieldEnd"},{key:"ctrl+shift+b",ifPlatform:"macos",command:"extendToPreviousChar"},{key:"ctrl+shift+f",ifPlatform:"macos",command:"extendToNextChar"},{key:"ctrl+shift+p",ifPlatform:"macos",command:"extendUp"},{key:"ctrl+shift+n",ifPlatform:"macos",command:"extendDown"},{key:"ctrl+shift+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"ctrl+shift+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"ctrl+alt+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"ctrl+alt+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"ctrl+shift+alt+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"ctrl+shift+alt+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deletePreviousChar"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteNextChar"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"shift+[Quote]",ifMode:"math",command:["switchMode","text","","“"]},{key:"shift+[Quote]",ifMode:"text",command:["switch-mode","math","”",""]},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Minus]",ifMode:"math",command:"moveToSubscript"},{key:"alt+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrack #0 \\right\\rbrack$$"]},{key:"alt+shift+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrace #0 \\right\\rbrace$$"]},{key:"[Return]",ifMode:"math",command:"addRowAfter"},{key:"[Enter]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"math",command:"addColumnAfter"},{key:"[Return]",ifMode:"text",command:"addRowAfter"},{key:"[Enter]",ifMode:"text",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"text",command:"addColumnAfter"},{key:"alt+p",ifMode:"math",command:["insert","$$\\pi$$"]},{key:"alt+v",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"alt+w",ifMode:"math",command:["insert","$$\\sum_{i=#?}^{#?}$$"]},{key:"alt+u",ifMode:"math",command:["insert","$$\\cup$$"]},{key:"alt+n",ifMode:"math",command:["insert","$$\\cap$$"]},{key:"alt+o",ifMode:"math",command:["insert","$$\\emptyset$$"]},{key:"alt+d",ifMode:"math",command:["insert","$$\\differentialD$$"]},{key:"alt+shift+o",ifMode:"math",command:["insert","$$\\varnothing$$"]},{key:"alt+shift+d",ifMode:"math",command:["insert","$$\\partial$$"]},{key:"alt+shift+p",ifMode:"math",command:["insert","$$\\prod_{i=#?}^{#?}$$"]},{key:"alt+shift+u",ifMode:"math",command:["insert","$$\\bigcup$$"]},{key:"alt+shift+n",ifMode:"math",command:["insert","$$\\bigcap$$"]},{key:"alt+shift+a",ifMode:"math",command:["insert","$$\\forall$$"]},{key:"alt+shift+e",ifMode:"math",command:["insert","$$\\exists$$"]},{key:"alt+[Digit5]",ifMode:"math",command:["insert","$\\infty$$"]},{key:"alt+[Digit6]",ifMode:"math",command:["insert","$$\\wedge$$"]},{key:"alt+shift+[Digit6]",ifMode:"math",command:["insert","$$\\vee$$"]},{key:"alt+[Digit9]",ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifMode:"math",command:["insert",")"]},{key:"alt+shift+[Backslash]",ifMode:"math",command:["insert","|"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","$$\\backslash$$"]},{key:"/",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+/",ifMode:"math",command:["insert","$$\\/$$"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+[Backquote]",ifMode:"math",command:["insert","$$\\~$$"]},{key:"alt+shift+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleVirtualKeyboard"},{key:"ctrl+alt+[ArrowUp]",command:["speak","parent",{withHighlighting:!1}]},{key:"ctrl+alt+[ArrowDown]",command:["speak","all",{withHighlighting:!1}]}],si={"\\theta":"alt+q","\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\prod":"alt+shift+p","\\sum":"alt+w","\\int":"alt+b","\\cup":"alt+u","\\cap":"alt+n","\\bigcup":"alt+shift+u","\\bigcap":"alt+shift+n","\\forall":"alt+shift+a","\\exists":"alt+shift+e","\\infty":"alt+[Digit5]","\\wedge":"alt+[Digit5]","\\vee":"alt+shift+[Digit6]","\\differentialD":"alt+d","\\partial":"alt+shift+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"alt+shift+o","\\~":"~"};function li(e){if((null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)){let t;if(/^(mac)/i.test(navigator.platform)?t="macos":/^(win)/i.test(navigator.platform)?t="windows":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos"),e.startsWith("!")&&!e.endsWith(t))return!0;if(e.endsWith(t))return!0}return!1}function ci(e){let i=e;return t(i)&&(i=i.length>0?i[0]+"("+i.slice(1).join("")+")":""),i}function di(e){var t;const i=li("macos")||li("ios"),a=e.split("+");let r="";for(const e of a)!i&&r&&(r+='+'),e.startsWith("Key")?r+=e.substr(3,1):e.startsWith("Digit")?r+=e.substr(5,1):r+=null!==(t={cmd:"⌘",meta:i?"⌘":"command",shift:i?"⇧":"shift",alt:i?"⌥":"alt",ctrl:i?"⌃":"control","\n":i?"⏎":"return","[return]":i?"⏎":"return","[enter]":i?"⌤":"enter","[tab]":i?"⇥":"tab","[escape]":"esc","[backspace]":i?"⌫":"backspace","[delete]":i?"⌦":"del","[pageup]":i?"⇞":"page up","[pagedown]":i?"⇟":"page down","[home]":i?"⤒":"home","[end]":i?"⤓":"end","[space]":"space","[equal]":"=","[minus]":"-","[comma]":",","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",bracketLeft:"[",bracketRight:"]",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"⇠",up:"⇡",right:"⇢",down:"⇣","[arrowleft]":"⇠","[arrowup]":"⇡","[arrowright]":"⇢","[arrowdown]":"⇣","[digit0]":"0","[digit1]":"1","[digit2]":"2","[digit3]":"3","[digit4]":"4","[digit5]":"5","[digit6]":"6","[digit7]":"7","[digit8]":"8","[digit9]":"9"}[e.toLowerCase()])&&void 0!==t?t:e.toUpperCase();return r}function mi(e,t){const i=[],a=[];return e.forEach(e=>{try{const t=function(e){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);let t=e.key.split("+");const i=t.pop();let a=e.ifPlatform;if(t=t.map(e=>{const t=e.toLowerCase();if("cmd"===t){if(a&&"macos"!==a&&"ios"!==a)throw new Error('Unexpected "cmd" modifier with platform "'+a+'"');return a||(a=li("ios")?"ios":"macos"),"meta"}if("win"===t){if(a&&"windows"!==a)throw new Error('Unexpected "win" modifier with platform "'+a+'"');return a="windows","meta"}return t}),!a||li(a)){if(/^\[(.*)\]$/.test(i))t.push(i);else{const a=function(e){var t,i;const a=null!==(t=ni())&&void 0!==t?t:Qt;for(const[t,i]of Object.entries(a.mapping)){if(i[0]===e)return"["+t+"]";if(i[1]===e)return"shift+["+t+"]";if(i[2]===e)return"alt+["+t+"]";if(i[3]===e)return"shift+alt+["+t+"]"}return null!==(i=Jt[e])&&void 0!==i?i:""}(i);if(!a)throw new Error('Invalid keybinding key "'+e.key+'"');t=t.concat(a.split("+"))}return{...e,ifPlatform:a,key:t.join("+")}}}(e);t&&i.push(t)}catch(e){a.push(e.message)}}),a.length>0&&t(a),i}function pi(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.addEventListener(r[1],i,t)}else e.addEventListener(t,i,a)}}function ui(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.removeEventListener(r[1],i,t)}else e.removeEventListener(t,i,a)}}function hi(e,t){let i=document.getElementById(e);return i?i.setAttribute("data-refcount",Number(parseInt(i.getAttribute("data-refcount"))+1).toString()):(i=document.createElement("div"),i.setAttribute("aria-hidden","true"),i.setAttribute("data-refcount","1"),i.className=t,i.id=e,document.body.appendChild(i)),i}function fi(e){if(!e)return;const t=parseInt(e.getAttribute("data-refcount"));t<=1?e.remove():e.setAttribute("data-refcount",Number(t-1).toString())}function gi(e){return e.element&&e.element.mathfield===e}function yi(e){const t=function e(t){if(t.classList.contains("ML__caret")||t.classList.contains("ML__text-caret")||t.classList.contains("ML__command-caret"))return t;let i;for(const a of t.children)if(i=e(a),i)break;return i}(e);if(t){const e=t.getBoundingClientRect();return{x:e.right,y:e.bottom,height:e.height}}return null}function bi(e){const t=e.querySelectorAll(".ML__selected");if(t&&t.length>0){const i={top:1/0,bottom:-1/0,left:1/0,right:-1/0};t.forEach(e=>{const t=e.getBoundingClientRect();t.lefti.right&&(i.right=t.right),t.bottom>i.bottom&&(i.bottom=t.bottom),t.top{if("mousedown"!==i.type||1===i.buttons){i.stopPropagation(),i.preventDefault(),t.classList.add("pressed"),a=Date.now(),"touchstart"===i.type&&(n=i.changedTouches[0].identifier);const o=t.getAttribute("data-"+e.config.namespace+"command-pressed");o&&e.$perform(JSON.parse(o));const l=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldStart");l&&(r=t,s&&clearTimeout(s),s=window.setTimeout((function(){t.classList.contains("pressed")&&e.$perform(JSON.parse(l))}),300))}}),pi(t,"mouseleave touchcancel",()=>{t.classList.remove("pressed")}),pi(t,"touchmove:passive",e=>{e.preventDefault();for(let t=0;t{1===e.buttons&&t.classList.add("pressed")}),pi(t,"mouseup touchend click",i=>{if(o){i.stopPropagation(),i.preventDefault();const e=o;return o=null,void e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}if(t.classList.remove("pressed"),t.classList.add("active"),"click"===i.type&&0!==i.detail)return i.stopPropagation(),void i.preventDefault();window.setTimeout((function(){t.classList.remove("active")}),150);let n=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldEnd");const s=Date.now();(t!==r||sequal to","\\supseteq":"superset of or
equal to","\\supset":"superset of","\\subset":"subset of","\\partial":"partial derivative","\\bigcup":"union","\\bigcap":"intersection","\\approx":"approximately equal to","\\notin":"not an element of","\\in":["element of","included in"],"\\infty":"infinity","\\land":"logical and","\\sqrt":"square root","\\prod":"product","\\sum":"summation","\\amalg":["amalgamation","coproduct","free product","disjoint union"],"\\cup":"union with","\\cap":"intersection with","\\int":"integral","\\iint":"surface integral","\\oint":"curve integral","\\iiint":"volume integral","\\iff":"if and only if","\\ln":"natural logarithm","\\boldsymbol":"bold","\\setminus":"set subtraction","\\stackrel":"relation with symbol above","\\stackbin":"operator with symbol above","\\underset":"symbol with annotation below","\\overset":"symbol with annotation above","\\hslash":["h-bar","Planck constant"],"\\gtrsim":"greater than or
similar to","\\propto":"proportional to","\\equiv":"equivalent to","\\!":["negative thin space","(-3 mu)"],"\\ ":["space","(6 mu)"],"\\,":["thin space","(3 mu)"],"\\:":["medium space","(4 mu)"],"\\;":["thick space","(5 mu)"],"\\quad":["1 em space","(18 mu)"],"\\qquad":["2 em space","(36 mu)"],"\\enskip":["½ em space","(9 mu)"],"\\mp":"minus or plus","\\pm":"plus or minus","\\Im":"Imaginary part of","\\Re":"Real part of","\\gothicCapitalR":"Real part of","\\gothicCapitalI":"Imaginary part part of","\\differentialD":"differential d","\\aleph":["aleph","infinite cardinal",'Wikipedia '],"\\beth":["beth","beth number",'Wikipedia '],"\\gimel":["gimel","gimel function",'Wikipedia '],"\\O":"empty set","\\N":"set of
natural numbers","\\Z":"set of
integers","\\Q":"set of
rational numbers","\\C":"set of
complex numbers","\\R":"set of
real numbers","\\P":"set of
prime numbers","\\lesseqqgtr":"less than, equal to or
greater than","\\gnapprox":"greater than and
not approximately","\\lnapprox":"lesser than and
not approximately","\\j":"dotless j","\\i":"dotless i","\\cdot":"centered dot","\\lmoustache":"left moustache","\\rmoustache":"right moustache","\\nabla":["nabla","del","differential vector operator"],"\\square":["square","d’Alembert operator",'Wikipedia '],"\\blacksquare":["black square","end of proof","tombstone","Halmos symbol"],"\\Box":"end of proof","\\colon":["such that","ratio"],"\\coloneq":["is defined by","is assigned"],"\\Colon":["is defined by","as"],"\\_":["underbar","underscore"],"\\ll":"much less than","\\gg":"much greater than","\\doteq":"approximately equal to","\\Doteq":"approximately equal to","\\doteqdot":"approximately equal to","\\cong":["isomorphism of","(for algebras, modules...)"],"\\det":["determinant of","(of a matrix)"],"\\dotplus":"Cartesian product algebra","\\otimes":["tensor product","(of algebras)","Kronecker product","(of matrices)"],"\\oplus":["direct sum","(of modules)"],"\\lb":"base-2 logarithm","\\lg":"base-10 logarithm","\\wp":["Weierstrass P",'Wikipedia '],"\\wr":["wreath product",'Wikipedia '],"\\top":["tautology","Proposition P is universally true"],"\\bot":["contradiction","Proposition P is contradictory"],"\\mid":["probability","of event A given B"],"\\mho":["Siemens","electrical conductance in SI unit",'Wikipedia '],"\\Longrightarrow":"implies","\\Longleftrightarrow":"if, and only if,","\\prec":"precedes","\\preceq":"precedes or is equal to","\\succ":"succeedes","\\succeq":"succeedes or is equal to","\\perp":["is perpendicular to","is independent of"],"\\models":["entails","double-turnstyle, models","is a semantic consequence of",'Wikipedia '],"\\vdash":["satisfies","turnstyle, assertion sign","syntactic inference",'Wikipedia '],"\\implies":["implies","logical consequence"],"\\impliedby":["implied by","logical consequence"],"\\surd":["surd","root of","checkmark"],"\\ltimes":["semi direct product",'Wikipedia '],"\\rtimes":["semi direct product",'Wikipedia '],"\\leftthreetimes":["semi direct product",'Wikipedia '],"\\rightthreetimes":["semi direct product",'Wikipedia '],"\\divideontimes":["divide on times"],"\\curlywedge":"nor","\\curlyvee":"nand","\\simeq":"is group isomorphic with","\\vartriangleleft":["is a normal subgroup of","is an ideal ring of"],"\\circ":["circle","ring","function composition"],"\\rlap":["overlap right","\\rlap{x}o"],"\\llap":["overlap left","o\\llap{/}"],"\\colorbox":["color box","\\colorbox{#fbc0bd}{...}"],"\\ast":["asterisk","reflexive closure (as a superscript)"],"\\bullet":"bullet","\\lim":"limit"};function ki(e,i,a){if(!i||0===i.length)return void Mi(e);const r=i,n=function(e,t){const i=et(e,"math",null,t.config.macros);return D($(Oe({mathstyle:d.displaystyle,macros:t.config.macros},i),"ML__base"),"ML__mathlive").toMarkup()}(i,e),o=function(e){let i=xi[e]||"";return t(i)&&(i=i.join("
")),i}(r),s=function(e,i){let a=[];if("string"==typeof i){const e=si[i];t(e)?a=e.slice():e&&a.push(e)}const r=ci(i),n=new RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");return e.forEach(e=>{n.test(ci(e.command))&&a.push(e)}),a.map(di)}(e.keybindings,r).join("
");let l=a?'
':"";l+='',l+='
'+n+"
",o&&(l+='
'+o+"
"),s&&(l+='
'+s+"
"),l+="
",l+=a?'
':"",function(e,t){e.popover.innerHTML=e.config.createHTML(t);const i=yi(e.field);i&&wi(e,i),e.popover.classList.add("is-visible")}(e,l);let c=e.popover.getElementsByClassName("ML__popover__content");c&&c.length>0&&vi(e,c[0],{default:["complete",{acceptSuggestion:!0}]}),c=e.popover.getElementsByClassName("ML__popover__prev-shortcut"),c&&c.length>0&&vi(e,c[0],"previousSuggestion"),c=e.popover.getElementsByClassName("ML__popover__next-shortcut"),c&&c.length>0&&vi(e,c[0],"nextSuggestion")}function _i(e,t){if(e.element&&e.element.mathfield===e&&e.popover.classList.contains("is-visible"))if(null==t?void 0:t.deferred)window.requestAnimationFrame(()=>_i(e));else if(Vt(e.model)&&"command"===Vt(e.model).type){const t=yi(e.field);t&&wi(e,t)}else Mi(e)}function wi(e,t){const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,r=window.innerWidth-document.documentElement.clientWidth,n=window.innerHeight-document.documentElement.clientHeight,o=e.virtualKeyboardVisible?e.virtualKeyboard.offsetHeight:0;t.x+e.popover.offsetWidth/2>a-r?e.popover.style.left=a-e.popover.offsetWidth-r+"px":t.x-e.popover.offsetWidth/2<0?e.popover.style.left="0":e.popover.style.left=t.x-e.popover.offsetWidth/2+"px",t.y+e.popover.offsetHeight+5>i-n-o?(e.popover.classList.add("ML__popover--reverse-direction"),e.popover.style.top=t.y-t.height-e.popover.offsetHeight-5+"px"):(e.popover.classList.remove("ML__popover--reverse-direction"),e.popover.style.top=t.y+5+"px")}function Mi(e){e.popover.classList.remove("is-visible")}function Si(e,t=!1){var i;let a="";const r=Mt(e);if(r){const n=t?e.anchorOffset()+1:r.end,o=e.siblings();for(let e=r.start;e"placeholder"===e.type));Rt(e,0),e.path[e.path.length-1].offset=i.start-1,0!==a.length&&Lt(e,1,!1)||At(e,i.start+t.length-1)}else e.siblings().splice(i.start,i.end-i.start),At(e,i.start-1,0);_t(e)}}const Ai={"\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrace":"{","\\rbrace":"}","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};function qi(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function $i(e,t){return e&&t.generateID?' extid="'+e+'"':""}function Ci(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="",o=-1,s=-1;const l=e.atoms[e.index];if(e.index0){if(a=!0,Di(e)&&(o=e.index,e.index+=1),Ti(e)&&(s=e.index,e.index+=1),o>=0&&s>=0)r=""+n,r+=Fi(e.atoms[s].subscript,0,0,i).mathML,r+=Fi(e.atoms[o].superscript,0,0,i).mathML,r+="";else if(o>=0){if(r=""+n,Di(e)){const t=Fi(e.atoms[o].superscript,0,0,i).mathML,a=Fi(e.atoms[o+1].superscript,0,0,i).mathML;r+=""!==t&&""!==t||""!==a&&""!==a?""===t||""===t?"":t:""}else r+=Fi(e.atoms[o].superscript,0,0,i).mathML;r+=""}else s>=0?(r=""+n,r+=Fi(e.atoms[s].subscript,0,0,i).mathML,r+=""):r=n;"mi"!==e.lastType&&"mn"!==e.lastType&&"mtext"!==e.lastType&&"fence"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),n.endsWith(">f")||n.endsWith(">g")?(r+="&x2061;",e.lastType="applyfunction"):e.lastType=/^(.*)<\/mo>$/.test(r)?"mo":"mi",e.mathML+=r}return a}function Di(e){return e.index"+e,r+=Fi(n.subscript,0,0,i).mathML,r+=Fi(n.superscript,0,0,i).mathML,r+=""):n.superscript?(r=""+e,r+=Fi(n.superscript,0,0,i).mathML,r+=""):n.subscript&&(r=""+e,r+=Fi(n.subscript,0,0,i).mathML,r+=""),r.length>0&&(a=!0,t.mathML+=r,t.lastType=""),a))}function Ki(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="";for(;e.index0&&(a=!0,n=""+n+"",e.mathML+=n,e.lastType="mtext"),a}function Ni(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="",o=function(e){let t=-1,i=e.index,a=!1,r=!1;for(;i=0&&o=0;)n+=e.atoms[e.index].body,e.index+=1;return n.length>0&&(a=!0,n=""+n+"",o<0&&Di(e)&&(o=e.index,e.index+=1),o>=0&&(n=""+n,n+=Fi(e.atoms[o].superscript,0,0,i).mathML,n+=""),e.mathML+=n,e.lastType="mn"),a}function Oi(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";if(e.index",r+=Pi(e.atoms[l],i),r+=Fi(e.atoms,l+1,c,i).mathML,r+=Pi(e.atoms[c],i),r+="","mi"!==e.lastType&&"mn"!==e.lastType&&"mfrac"!==e.lastType&&"fence"!==e.lastType||(r=""+r),e.index=c+1,Ei(r,e,i)&&(a=!0,e.lastType="",r=""),n="fence")}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Bi(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";const o=e.atoms[e.index];if(e.index":"")+e,r+=Fi(o.subscript,0,0,i).mathML,r+=Fi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):o.superscript?(r+=("nolimits"!==o.limits?"":"")+e,r+=Fi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):(r+=("nolimits"!==o.limits?"":"")+e,r+=Fi(o.subscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""),n="mo"}else{const t=e.atoms[e.index],o="\\operatorname"===t.symbol,s=o?'"+Ri(t.body)+"":Pi(t,i);r+=s,e.index+=1,Ei(r,e,i)&&(a=!0,e.lastType="",r=""),e.index-=1,o||/^(.*)<\/mo>$/.test(s)?n=o?"mi":"mo":(r+="",n="applyfunction")}"mi"!==e.lastType&&"mn"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),e.index+=1}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Fi(e,t,i,a){const r={atoms:e,index:null!=t?t:0,mathML:"",lastType:""};if("number"==typeof e||"boolean"==typeof e)r.mathML=e.toString();else if("string"==typeof e)r.mathML=e;else if(e instanceof Be)r.mathML=Ii(e,a);else if(Array.isArray(e)){let t=0;for(i=i||(e?e.length:0);r.index0&&"genfrac"===r.atoms[r.index].type&&(e=""+e),"genfrac"===r.atoms[r.index].type?r.lastType="mfrac":r.lastType="",e.length>0&&(r.mathML+=e,t+=1),r.index+=1}t>1&&(r.mathML=""+r.mathML+"")}return r}function Pi(e,t){let i="";const a=Ri(e.body);return a&&(i=""+a+""),i}function Ri(e){if(!e)return"";if("string"==typeof e)return qi(e);if(!Array.isArray(e)&&"string"==typeof e.body)return qi(e.body);let t="";for(const i of e)"string"==typeof i.body&&(t+=i.body);return qi(t)}function Ii(e,t){var i,a,r,n,o,s,l,c,d,m,p,u;const h={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋"},f={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."},g={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let y,b,v,x,k,_,w="",M="",S={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"}[e.fontFamily||e.font]||"";S&&(S=' mathvariant="'+S+'"');const z=e.symbol;if("text"===e.mode)w=""+e.body+"";else switch(e.type){case"first":break;case"group":case"root":w=Fi(e.body,0,0,t).mathML;break;case"array":if((e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(w+="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Ai[e.leftDelim]||e.leftDelim)+"")),w+="",y=0;y"+Fi(e.array[b][y],0,0,t).mathML+"";w+=""}w+="",(e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Ai[e.leftDelim]||e.rightDelim)+""),w+="");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(w+=""),e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Ai[e.leftDelim]||e.leftDelim)+""),e.hasBarLine?(w+="",w+=Fi(e.numer,0,0,t).mathML||" ",w+=Fi(e.denom,0,0,t).mathML||" ",w+=""):(w+="",w+=""+Fi(e.numer,0,0,t).mathML+"",w+=""+Fi(e.denom,0,0,t).mathML+"",w+=""),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Ai[e.rightDelim]||e.rightDelim)+""),(e.leftDelim||e.rightDelim)&&(w+="");break;case"surd":e.index?(w+="",w+=Fi(e.body,0,0,t).mathML,w+=Fi(e.index,0,0,t).mathML,w+=""):(w+="",w+=Fi(e.body,0,0,t).mathML,w+="");break;case"leftright":w="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Ai[e.leftDelim]||e.leftDelim)+""),e.body&&(w+=Fi(e.body,0,0,t).mathML),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Ai[e.rightDelim]||e.rightDelim)+""),w+="";break;case"sizeddelim":case"delim":w+='"+(Ai[e.delim]||e.delim)+"";break;case"accent":w+='",w+=Fi(e.body,0,0,t).mathML,w+=""+(Ai[z]||e.accent)+"",w+="";break;case"line":case"overlap":break;case"overunder":k=e.overscript,x=e.underscript,(e.svgAbove||k)&&(e.svgBelow||x)?_=e.body:k&&k.length>0?(_=e.body,(null===(a=null===(i=e.body)||void 0===i?void 0:i[0])||void 0===a?void 0:a.underscript)?(x=e.body[0].underscript,_=e.body[0].body):"first"===(null===(n=null===(r=e.body)||void 0===r?void 0:r[0])||void 0===n?void 0:n.type)&&(null===(s=null===(o=e.body)||void 0===o?void 0:o[1])||void 0===s?void 0:s.underscript)&&(x=e.body[1].underscript,_=e.body[1].body)):x&&x.length>0&&(_=e.body,(null===(c=null===(l=e.body)||void 0===l?void 0:l[0])||void 0===c?void 0:c.overscript)?(k=e.body[0].overscript,_=e.body[0].body):"first"===(null===(m=null===(d=e.body)||void 0===d?void 0:d[0])||void 0===m?void 0:m.type)&&(null===(u=null===(p=e.body)||void 0===p?void 0:p[1])||void 0===u?void 0:u.overscript)&&(k=e.body[1].overscript,_=e.body[1].body)),(e.svgAbove||k)&&(e.svgBelow||x)?(w+=``,w+=h[e.svgBody]||Fi(_,0,0,t).mathML,w+=h[e.svgBelow]||Fi(x,0,0,t).mathML,w+=h[e.svgAbove]||Fi(k,0,0,t).mathML,w+=""):e.svgAbove||k?(w+=``+(h[e.svgBody]||Fi(_,0,0,t).mathML),w+=h[e.svgAbove]||Fi(k,0,0,t).mathML,w+=""):(e.svgBelow||x)&&(w+=``+(h[e.svgBody]||Fi(_,0,0,t).mathML),w+=h[e.svgBelow]||Fi(x,0,0,t).mathML,w+="");break;case"placeholder":case"mord":{w=f[z]||z||("string"==typeof e.body?e.body:"");const i=z?z.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null;i?w="&#x"+i[1]+";":w.length>0&&"\\"===w.charAt(0)&&(w="string"==typeof e.body&&e.body.charCodeAt(0)>255?"&#x"+("000000"+e.body.charCodeAt(0).toString(16)).substr(-4)+";":"string"==typeof e.body?e.body.charAt(0):e.body);const a=/\d/.test(w)?"mn":"mi";w="<"+a+S+$i(e.id,t)+">"+qi(w)+"";break}case"mbin":case"mrel":case"textord":case"minner":w=z&&f[z]?""+f[z]+"":z&&Ai[z]?""+Ai[z]+"":Pi(e,t);break;case"mpunct":w='"+(Ai[z]||z)+"";break;case"mop":"​"!==e.body&&(w="",w+="\\operatorname"===z?e.body:z||e.body,w+="");break;case"mathstyle":break;case"box":w='"+Fi(e.body,0,0,t).mathML+"";break;case"spacing":w+='';break;case"enclose":w=''+Fi(e.body,0,0,t).mathML+"";break;case"space":w+=" "}return w}function Hi(e,t){return Fi(e,0,0,t).mathML}function Wi(e){let t=0;for(let i=0;i{gi(e)&&e.dirty&&Ui(e)}))}function Ui(e,t){t=null!=t?t:{},e.dirty=!1,window.mathlive||(window.mathlive={}),Vt(e.model)||(e.model.path=[{relation:"body",offset:0}]),e.model.root.forEach(e=>{e.caret="",e.isSelected=!1,e.containsCaret=!1});const i=e.$hasFocus();if(Pt(e.model)?Vt(e.model).caret=i&&!e.config.readOnly?e.mode:"":Gt(e.model,e=>{e.isSelected=!0}),i&&!e.config.readOnly){let t=e.model.ancestor(1),i=1,a=!1;for(;t&&!a;)"surd"!==t.type&&"leftright"!==t.type||(t.containsCaret=!0,a=!0),i+=1,t=e.model.ancestor(i)}const a=$(Oe({mathstyle:d.displaystyle,letterShapeStyle:e.config.letterShapeStyle,atomIdsSettings:{seed:Wi(e.model.root.toLatex(!1)),groupNumbers:t.forHighlighting},smartFence:e.config.smartFence,macros:e.config.macros},e.model.root),"ML__base");a.attributes={translate:"no","aria-hidden":"true"};const r=D(a,"ML__mathlive");e.field.innerHTML=e.config.createHTML(r.toMarkup(0,e.config.horizontalSpacingScale)),e.field.classList.toggle("ML__focused",i&&!e.config.readOnly),e.accessibleNode.innerHTML=e.config.createHTML(''+Hi(e.model.root,e.config)+"");const n=bi(e.field);if(null!==n){const t=document.createElement("div");t.classList.add("ML__selection"),t.style.position="absolute",t.style.left=Number(n.left).toString()+"px",t.style.top=Number(n.top).toString()+"px",t.style.width=Number(Math.ceil(n.right-n.left)).toString()+"px",t.style.height=Number(Math.ceil(n.bottom-n.top-1)).toString()+"px",e.field.insertBefore(t,e.field.childNodes[0])}}const ji={};function Gi(e,t){t=null!=t?t:{target:"mathfield",canUndo:!1},Object.keys(e).forEach(i=>{ji[i]={...t,fn:e[i]}})}function Xi(e,t=",",i){if(!e)return[];let a,r=[];for(let n of e)n&&n.length>0&&"first"===n[0].type&&(n=n.slice(1)),n&&n.length>0&&(a?r.push(a):a=new Be("math","mpunct",t,i),r=r.concat(n));return r}function Zi(e,i){const a=e.parent();if(a&&"array"===a.type&&t(a.array)){const t=e.relation();if(a.array){const r=ht(a.array,t);"after row"===i||"before row"===i?(r.col=0,r.row=r.row+("after row"===i?1:0),a.array.splice(r.row,0,[[]])):(r.col+="after column"===i?1:0,a.array[r.row].splice(r.col,0,[]));const n=ut(a.array,r);e.path.pop(),e.path.push({relation:"cell"+n.toString(),offset:0}),e.insertFirstAtom()}}}function Yi(e){var t;const i=e.parent();if("leftright"===i.type){i.type="array";const a=null!==(t={"(":"pmatrix","\\lbrack":"bmatrix","\\lbrace":"cases"}[i.leftDelim])&&void 0!==t?t:"matrix",r=ae(a),n=[[i.body]];Object.assign(i,r.parser(a,[],n)),i.mode=St(e),i.environmentName=a,i.array=n,i.rowGaps=[0],delete i.body,e.path[e.path.length-1].relation="cell0"}}function Qi(e){return kt(e),Yi(e),Zi(e,"after row"),_t(e),!0}function Ji(e){return kt(e),Yi(e),Zi(e,"after column"),_t(e),!0}function ea(e,t=0){kt(e),vt(e);const i=e.suppressChangeNotifications;if(e.suppressChangeNotifications=!0,t=t<0?-1:t>0?1:t,st(e),e.parent().array&&t<0&&0===e.startOffset()){const t=e.parent().array;if(function(e){const t={col:0,row:0};for(;t.row0){let e=t.length;"first"===t[0].type&&(e-=1),e>0&&(i+=1)}a.row+=1}return i}(t,i.col)&&(function(e,t){let i=0;for(;i"placeholder"!==e.type&&"first"!==e.type);e.parent()[t]=null,e.path.pop(),e.siblings().splice(e.anchorOffset(),0,...i),At(e,e.anchorOffset()-1),e.announce("deleted: "+t)}else if("denom"===t){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),At(e,e.anchorOffset()+t.length-1),e.announce("deleted: denominator")}else if("body"===t){const t=e.siblings().filter(e=>"placeholder"!==e.type);e.path.length>1&&(t.shift(),e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...t),At(e,e.anchorOffset()-1),e.announce("deleted: root"))}else Ct(e,-1),ta(e,-1)}else if(t>0)if(i!==a.length-1)/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(e.sibling(1).type)?Ct(e,1):(e.announce("deleted",null,a.slice(i+1,i+2)),a.splice(i+1,1));else if("numer"===e.relation()){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),At(e,e.anchorOffset()+t.length-1),e.announce("deleted: numerator")}else Ct(e,1),ta(e,-1)}else{const t=e.startOffset()+1,i=e.endOffset()+1;e.announce("deleted",null,a.slice(t,i)),a.splice(t,i-t),At(e,t-1)}lt(e),e.suppressChangeNotifications=i,xt(e),_t(e)}function ta(e,t=0){if(0===t)ea(e,0);else if(t>0)for(;t>0;)ea(e,1),t--;else for(;t<0;)ea(e,-1),t++;return!0}Gi({performWithFeedback:(e,t)=>function(e,t){return e.$focus(),e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),"moveToNextPlaceholder"===(t=t.replace(/-\w/g,e=>e[1].toUpperCase()))||"moveToPreviousPlaceholder"===t||"complete"===t?e.returnKeypressSound?(e.returnKeypressSound.load(),e.returnKeypressSound.play().catch(e=>{})):e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):"deletePreviousChar"!==t&&"deleteNextChar"!==t&&"deletePreviousWord"!==t&&"deleteNextWord"!==t&&"deleteToGroupStart"!==t&&"deleteToGroupEnd"!==t&&"deleteToMathFieldStart"!==t&&"deleteToMathFieldEnd"!==t||!e.deleteKeypressSound?e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):(e.deleteKeypressSound.load(),e.deleteKeypressSound.play().catch(e=>{})),e.$perform(t)}(e,t)}),Gi({addRowAfter:Qi,addColumnAfter:Ji,addRowBefore:function(e){return kt(e),Yi(e),Zi(e,"before row"),_t(e),!0},addColumnBefore:function(e){return kt(e),Yi(e),Zi(e,"before column"),_t(e),!0}},{target:"model",category:"array-edit"});const ia={"''":{mode:"math",value:"^{\\doubleprime}"},alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:{mode:"math",value:"\\pi"},"pi ":{mode:"text",value:"\\pi "},Pi:{mode:"math",value:"\\Pi"},theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:{mode:"math",value:"\\nabla"},grad:{mode:"math",value:"\\nabla"},del:{mode:"math",value:"\\partial"},"∞":"\\infty",oo:{mode:"math",after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":{mode:"math",value:"\\sum"},sum:{mode:"math",value:"\\sum_{#?}^{#?}"},prod:{mode:"math",value:"\\prod_{#?}^{#?}"},sqrt:{mode:"math",value:"\\sqrt"},"∆":{mode:"math",value:"\\differentialD"},"∂":{mode:"math",value:"\\differentialD"},arcsin:{mode:"math",value:"\\arcsin"},arccos:{mode:"math",value:"\\arccos"},arctan:{mode:"math",value:"\\arctan"},sin:{mode:"math",value:"\\sin"},sinh:{mode:"math",value:"\\sinh"},cos:{mode:"math",value:"\\cos"},cosh:{mode:"math",value:"\\cosh"},tan:{mode:"math",value:"\\tan"},tanh:{mode:"math",value:"\\tanh"},sec:{mode:"math",value:"\\sec"},csc:{mode:"math",value:"\\csc"},cot:{mode:"math",value:"\\cot"},log:{mode:"math",value:"\\log"},ln:{mode:"math",value:"\\ln"},exp:{mode:"math",value:"\\exp"},lim:{mode:"math",value:"\\lim_{#?}"},dx:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:{mode:"math",value:"\\forall"},EE:{mode:"math",value:"\\exists"},"!EE":{mode:"math",value:"\\nexists"},"&&":{mode:"math",value:"\\land"},xin:{mode:"math",after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{mode:"math",after:"nothing+letter+closefence",value:"\\in"},"!in":{mode:"math",value:"\\notin"},NN:"\\N",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",PP:"\\P",xx:{mode:"math",value:"\\times"},"+-":{mode:"math",value:"\\pm"},"!=":{mode:"math",value:"\\ne"},">=":{mode:"math",value:"\\ge"},"<=":{mode:"math",value:"\\le"},"<<":{mode:"math",value:"\\ll"},">>":{mode:"math",value:"\\gg"},"~~":{mode:"math",value:"\\approx"},"≈":{mode:"math",value:"\\approx"},"?=":{mode:"math",value:"\\questeq"},"÷":{mode:"math",value:"\\div"},"¬":{mode:"math",value:"\\neg"},":=":{mode:"math",value:"\\coloneq"},"::":{mode:"math",value:"\\Colon"},"(:":{mode:"math",value:"\\langle"},":)":{mode:"math",value:"\\rangle"},beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},"eta ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta "},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},"mu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu "},nu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},"nu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu "},"µ":"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega","Ω":"\\omega",forall:{mode:"math",value:"\\forall"},exists:{mode:"math",value:"\\exists"},"!exists":{mode:"math",value:"\\nexists"},":.":{mode:"math",value:"\\therefore"},liminf:"\\operatorname*{lim~inf}_{#?}",limsup:"\\operatorname*{lim~sup}_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:{mode:"math",value:"\\mod"},max:{mode:"math",value:"\\max"},min:{mode:"math",value:"\\min"},erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:{mode:"math",value:"\\operatorname{bessel}"},mean:{mode:"math",value:"\\operatorname{mean}"},median:{mode:"math",value:"\\operatorname{median}"},fft:{mode:"math",value:"\\operatorname{fft}"},lcm:{mode:"math",value:"\\operatorname{lcm}"},gcd:{mode:"math",value:"\\operatorname{gcd}"},randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:{mode:"math",value:"\\operatorname{Re}"},Im:{mode:"math",value:"\\operatorname{Im}"},mm:{mode:"math",after:"nothing+digit",value:"\\operatorname{mm}"},cm:{mode:"math",after:"nothing+digit",value:"\\operatorname{cm}"},km:{mode:"math",after:"nothing+digit",value:"\\operatorname{km}"},kg:{mode:"math",after:"nothing+digit",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","->":"\\to","|->":"\\mapsto","--\x3e":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","{":"\\{","}":"\\}","*":"\\cdot"};function aa(e,t,i){var a;return function(e,t){if(!t)return"";if("string"==typeof t)return t;if(!e)return t.value;let i=!1,a=!1,r=!1,n=!1,o=!1,s=!1,l=!1,c=!1,d=!1,m=!1,p=!1,u=!1,h=!1,f=!1,g=e[e.length-1],y=e.length-1;for(;g&&/msubsup|placeholder/.test(g.type);)y-=1,g=e[y];if(i=!g||"first"===g.type,g){if(void 0!==t.mode&&g.mode!==t.mode)return"";h="text"===g.mode,a=!h&&"mord"===g.type&&V.test(g.body),r=!h&&"mord"===g.type&&/[0-9]+$/.test(g.body),n=!h&&g.isFunction,o="genfrac"===g.type,s="surd"===g.type,l="mbin"===g.type,c="mrel"===g.type,d="mpunct"===g.type||"minner"===g.type,m=Boolean(g.array),p="mopen"===g.type,u="mclose"===g.type||"leftright"===g.type,f="space"===g.type}return void 0!==t.after?/nothing/.test(t.after)&&i||/letter/.test(t.after)&&a||/digit/.test(t.after)&&r||/function/.test(t.after)&&n||/frac/.test(t.after)&&o||/surd/.test(t.after)&&s||/binop/.test(t.after)&&l||/relop/.test(t.after)&&c||/punct/.test(t.after)&&d||/array/.test(t.after)&&m||/openfence/.test(t.after)&&p||/closefence/.test(t.after)&&u||/text/.test(t.after)&&h||/space/.test(t.after)&&f?t.value:"":t.value}(e,null!==(a=null==i?void 0:i[t])&&void 0!==a?a:ia[t])}function ra(e,t){if(!e)return["latex",""];if(e.length<=1)return["latex",e];if(!t||"ASCIIMath"!==t.format){const t=e.trim();if(t.startsWith("$$")&&t.endsWith("$$")||t.startsWith("\\[")&&t.endsWith("\\]")||t.startsWith("\\(")&&t.endsWith("\\)"))return["latex",t.substring(2,t.length-2)];if(t.startsWith("$")&&t.endsWith("$"))return["latex",t.substring(1,t.length-1)];if(e=e.replace(/\\\\([^\s\n])/g,"\\$1"),/\\/.test(e))return["latex",e]}return e=(e=(e=(e=(e=(e=e.replace(/\u2061/gu,"")).replace(/\u3016/gu,"{")).replace(/\u3017/gu,"}")).replace(/([^\\])sinx/g,"$1\\sin x")).replace(/([^\\])cosx/g,"$1\\cos x ")).replace(/\u2013/g,"-"),[(null==t?void 0:t.format)||"ASCIIMath",na(e,null!=t?t:{})]}function na(e,t){var i,a,r,n,o,s,l;if(!e)return"";let c,d=!1;if(d||"^"!==e[0]&&"_"!==e[0]||(c=oa(e.substr(1),{inlineShortcuts:null!==(i=null==t?void 0:t.inlineShortcuts)&&void 0!==i?i:{},noWrap:!0}),e=e[0]+"{"+c.match+"}",e+=na(c.rest,t),d=!0),d||(c=e.match(/^(sqrt|\u221a)(.*)/),c&&(c=oa(c[2],{inlineShortcuts:null!==(a=null==t?void 0:t.inlineShortcuts)&&void 0!==a?a:{},noWrap:!0}),e="\\sqrt{"+c.match+"}",e+=na(c.rest,t),d=!0)),d||(c=e.match(/^(\\cbrt|\u221b)(.*)/),c&&(c=oa(c[2],{inlineShortcuts:null!==(r=null==t?void 0:t.inlineShortcuts)&&void 0!==r?r:{},noWrap:!0}),e="\\sqrt[3]{"+c.match+"}",e+=na(c.rest,t),d=!0)),d||(c=e.match(/^abs(.*)/),c&&(c=oa(c[1],{inlineShortcuts:null!==(n=null==t?void 0:t.inlineShortcuts)&&void 0!==n?n:{},noWrap:!0}),e="\\left|"+c.match+"\\right|",e+=na(c.rest,t),d=!0)),d||(c=e.match(/^["”“](.*?)["”“](.*)/),c&&(e="\\text{"+c[1]+"}",e+=na(c[2],t),d=!0)),d||(c=e.match(/^([^a-zA-Z({[_^\\\s"]+)(.*)/),c&&(e=sa(c[1],t),e+=na(c[2],t),d=!0)),!d&&/^(f|g|h)[^a-zA-Z]/.test(e)&&(c=oa(e.substring(1),{inlineShortcuts:null!==(o=t.inlineShortcuts)&&void 0!==o?o:{},noWrap:!0}),e="("===e[1]?e[0]+"\\mleft("+c.match+"\\mright)":e[0]+c.match,e+=na(c.rest,t),d=!0),d||(c=e.match(/^([a-zA-Z]+)(.*)/),c&&(e=sa(c[1],t),e+=na(c[2],t),d=!0)),!d)if(c=oa(e,{inlineShortcuts:null!==(s=t.inlineShortcuts)&&void 0!==s?s:{},noWrap:!0}),c.match&&"/"===c.rest[0]){const i=oa(c.rest.substr(1),{inlineShortcuts:null!==(l=t.inlineShortcuts)&&void 0!==l?l:{},noWrap:!0});i.match&&(e="\\frac{"+c.match+"}{"+i.match+"}"+na(i.rest,t)),d=!0}else c.match&&(e="("===e[0]?"\\left("+c.match+"\\right)"+na(c.rest,t):c.match+na(c.rest,t),d=!0);return d||(c=e.match(/^(\s+)(.*)$/),c&&(e=" "+na(c[2],t),d=!0)),e}function oa(e,t){let i="",a=e=e.trim(),r=e.charAt(0),n={"(":")","{":"}","[":"]"}[r];if(n){let o=1,s=1;for(;s0;)e[s]===r&&o++,e[s]===n&&o--,s++;0===o?(t.noWrap&&"("===r?i=na(e.substring(1,s-1),t):("{"===r&&"}"===n&&(r="\\{",n="\\}"),i="\\left"+r+na(e.substring(1,s-1),t)+"\\right"+n),a=e.substring(s)):(i=e.substring(1,s),a="")}else{let r=e.match(/^([a-zA-Z]+)/);if(r){let i=aa(null,e,t.inlineShortcuts);if(i)return i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),{match:i,rest:e.substring(i.length)}}if(r=e.match(/^([a-zA-Z])/),r)return{match:r[1],rest:e.substring(1)};if(r=e.match(/^(-)?\d+(\.\d*)?/),r)return{match:r[0],rest:e.substring(r[0].length)};/^\\(left|right)/.test(e)||(r=e.match(/^(\\[a-zA-Z]+)/),r&&(a=e.substring(r[1].length),i=r[1]))}return{match:i,rest:a}}function sa(e,t){let i=aa(null,e,t);return i?(i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),i+=" "):i=e,i}function la(e,t,i){const a=e.parent();let r="leftright"===a.type?a.leftDelim+a.rightDelim:"";if("\\lbrace\\rbrace"===r&&(r="{}"),"\\{\\}"===r&&(r="{}"),"{}"===r&&/\||\\vert|\\Vert|\\mvert|\\mid/.test(t))return da(e,"\\,\\middle"+t+"\\, ",{mode:"math",format:"latex",style:i}),!0;"{"!==t&&"\\{"!==t||(t="\\lbrace"),"}"!==t&&"\\}"!==t||(t="\\rbrace"),"["===t&&(t="\\lbrack"),"]"===t&&(t="\\rbrack");const n=I[t];if(n&&("leftright"!==a.type||"|"!==a.leftDelim)){let a="";const r=Pt(e)||"placeholder"===Vt(e).type;a=e.sibling(0).isFunction?"\\mleft"+t+"\\mright":"\\left"+t+"\\right",a+=r?"?":n;let o=[];return r&&(o=e.siblings().splice(e.anchorOffset()+1,e.siblings().length)),da(e,a,{mode:"math",format:"latex",style:i}),r&&(e.sibling(0).body=o,Ct(e,-1)),!0}let o;if(Object.keys(I).forEach(e=>{t===I[e]&&(o=e)}),o){if(a&&"leftright"===a.type&&e.endOffset()===e.siblings().length-1)return kt(e),a.rightDelim=t,Ct(e,1),_t(e),!0;const r=e.siblings();let n;for(n=e.endOffset();n>=0&&("leftright"!==r[n].type||"?"!==r[n].rightDelim);n--);if(n>=0)return kt(e),r[n].rightDelim=t,r[n].body=r[n].body.concat(r.slice(n+1,e.endOffset()+1)),r.splice(n+1,e.endOffset()-n),At(e,n),_t(e),!0;if(a&&"leftright"===a.type&&"?"===a.rightDelim){kt(e),a.rightDelim=t;const i=r.slice(e.endOffset()+1);return r.splice(e.endOffset()+1),e.path.pop(),e.siblings().splice(e.endOffset()+1,0,...i),_t(e),!0}const o=e.ancestor(2);return!(!o||"leftright"!==o.type||"?"!==o.rightDelim||e.endOffset()!==r.length-1)&&(Ct(e,1),la(e,t,i))}return!1}function ca(e,t){if(Pt(e))return!1;function i(t,i){let a=!0;return Gt(e,e=>{a=a&&e[t]===i},{recursive:!0}),a}return t.color&&i("color",t.color)&&(t.color="none"),t.backgroundColor&&i("backgroundColor",t.backgroundColor)&&(t.backgroundColor="none"),t.fontFamily&&i("fontFamily",t.fontFamily)&&(t.fontFamily="none"),t.series&&(t.fontSeries=t.series),t.fontSeries&&i("fontSeries",t.fontSeries)&&(t.fontSeries="auto"),t.shape&&(t.fontShape=t.shape),t.fontShape&&i("fontShape",t.fontShape)&&(t.fontShape="auto"),t.size&&(t.fontSize=t.size),t.fontSize&&i("fontSize",t.fontSize)&&(t.fontSize="size5"),kt(e),Gt(e,e=>e.applyStyle(t),{recursive:!0}),_t(e),!0}function da(e,t,i){var a,r,n,o;if(null!==(a=i.smartFence)&&void 0!==a&&a){if(la(e,t,i.style))return}else{const i=e.parent();if("leftright"===(null==i?void 0:i.type)&&"?"===i.rightDelim&&e.endOffset()===e.siblings().length-1&&/^[)}\]|]$/.test(t))return kt(e),i.rightDelim=t,Ct(e,1),void _t(e)}const s=e.suppressChangeNotifications;i.suppressChangeNotifications&&(e.suppressChangeNotifications=!0),kt(e);const l=e.suppressChangeNotifications;e.suppressChangeNotifications=!0,i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto"),i.macros=null!==(r=i.macros)&&void 0!==r?r:e.options.macros;const c=i.mode||St(e);let d;const m=[Fe("math",Ot(e)).toLatex(!1)],p=null!==(n=i.placeholder)&&void 0!==n?n:"\\placeholder{}";m["?"]=p,"replaceSelection"!==i.insertionMode||Pt(e)?"replaceAll"===i.insertionMode?(e.root.body=[],e.root.latex="",e.path=[{relation:"body",offset:0}],e.extent=0):"insertBefore"===i.insertionMode?Ht(e):"insertAfter"===i.insertionMode&&It(e):ta(e);const u=e.siblings(),h=e.startOffset();if(h+10&&u[h]&&"placeholder"===u[h].type&&ta(e,-1),"math"===c&&"ASCIIMath"===i.format)[,t]=ra(t,{format:"ASCIIMath"}),d=et(t,"math",null,null==i?void 0:i.macros,!1,e.listeners.onError),pa(e,d);else if("text"===c||"auto"!==i.format&&"latex"!==i.format)"text"!==c&&"text"!==i.format||(d=et(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"\\textbackslash ")).replace(/#/g,"\\#")).replace(/\$/g,"\\$")).replace(/%/g,"\\%")).replace(/&/g,"\\&")).replace(/_/g,"\\_")).replace(/{/g,"\\textbraceleft ")).replace(/}/g,"\\textbraceright ")).replace(/\^/g,"\\textasciicircum ")).replace(/~/g,"\\textasciitilde ")).replace(/£/g,"\\textsterling "),"text",m,i.macros,!1,e.listeners.onError));else if("command"===c){d=[];for(const e of t)W.test(e)&&d.push(new Be("command","command",e))}else if(""===t)d=[new Be("command","command","\\")];else{if("auto"===i.format&&([i.format,t]=ra(t)),m[0])t=t.replace(/(^|[^\\])#@/g,"$1#0");else if(/(^|[^\\])#@/.test(t)){const i=function(e){const t=e.siblings();let i=e.startOffset();if("text"===t[i].mode)for(;i>=1&&"text"===t[i].mode;)i--;else for(;i>=1&&/^(mord|surd|msubsup|leftright|mop)$/.test(t[i].type);)i--;return i}(e);t=t.replace(/(^|[^\\])#@/g,"$1"+function(e,t,i){const a=e.siblings();if(ot(a))return"";if("first"===a[0].type&&0===t&&(t=1),"root"===e.parent().type&&1===t&&i===a.length-1)return e.parent().toLatex(!1);let r="",n=t;for(;n<=i;)r+=a[n].toLatex(!1),n++;return r}(e,i+1,e.startOffset())),function(e,t){t>0?e.siblings().splice(e.anchorOffset()+1,t):(e.siblings().splice(e.anchorOffset()+t+1,-t),At(e,e.anchorOffset()+t))}(e,i-e.startOffset())}else t=t.replace(/(^|[^\\])#@/g,"$1#?");/^\$\$(.*)\$\$$/.test(t)&&(t=t.substring(2,t.length-2)),m[0]||(m[0]=p),d=et(t,c,m,i.macros,null!==(o=i.smartFence)&&void 0!==o&&o,e.listeners.onError),"latex"!==i.format&&pa(e,d)}lt(e),function e(t,i){t&&i&&(Pe(t)?t.forEach(t=>e(t,i)):"object"==typeof t&&(t.color||t.backgroundColor||t.fontFamily||t.fontShape||t.fontSeries||t.fontSize||(t.applyStyle(i),e(t.body,i),e(t.numer,i),e(t.denom,i),e(t.index,i),e(t.overscript,i),e(t.underscript,i),e(t.subscript,i),e(t.superscript,i))))}(d,i.style);const f=e.parent();if("latex"!==i.format&&e.options.removeExtraneousParentheses&&f&&"leftright"===f.type&&"("===f.leftDelim&&ot(f.body)&&d&&1===d.length&&"genfrac"===d[0].type?(e.path.pop(),e.siblings()[e.anchorOffset()]=d[0]):("latex"!==i.format||1!==m.length||m[0]||"root"===f.type&&ot(f.body)&&(f.latex=t),e.siblings().splice(e.anchorOffset()+1,0,...d)),e.insertFirstAtom(),e.suppressChangeNotifications=l,"placeholder"===i.selectionMode){let t=[];for(const e of d)t=t.concat(e.filter(e=>"placeholder"===e.type));0!==t.length&&Lt(e,1,!1)?e.announce("move"):At(e,e.anchorOffset()+d.length)}else"before"===i.selectionMode||("after"===i.selectionMode?At(e,e.anchorOffset()+d.length):"item"===i.selectionMode&&At(e,e.anchorOffset(),d.length));_t(e),e.suppressChangeNotifications=s}function ma(e){if(e)return 1===e.length&&"leftright"===e[0].type&&"("===e[0].leftDelim&&(e=e[0].body),e}function pa(e,t){if(t&&e.options.removeExtraneousParentheses){for(let e=0;t[e];e++)if("leftright"===t[e].type&&"("===t[e].leftDelim&&Pe(t[e].body)){let i=0,a=0,r=0;for(let n=0;t[e].body[n];n++)"genfrac"===t[e].body[n].type&&(i++,a=n),"first"!==t[e].body[n].type&&r++;0===r&&1===i&&(t[e]=t[e].body[a])}t.forEach(t=>{if("genfrac"===t.type&&(pa(e,t.numer),pa(e,t.denom),t.numer=ma(t.numer),t.denom=ma(t.denom)),t.superscript&&(pa(e,t.superscript),t.superscript=ma(t.superscript)),t.subscript&&(pa(e,t.subscript),t.subscript=ma(t.subscript)),t.underscript&&(pa(e,t.underscript),t.underscript=ma(t.underscript)),t.overscript&&(pa(e,t.overscript),t.overscript=ma(t.overscript)),t.index&&(pa(e,t.index),t.index=ma(t.index)),"surd"===t.type?(pa(e,t.body),t.body=ma(t.body)):Pe(t.body)&&pa(e,t.body),t.array)for(let i=gt(t.array);i>=0;i--)pa(e,ft(t.array,i))})}}function ua(e){if(It(e),!Vt(e).superscript)if(Vt(e).subscript)Vt(e).superscript=[new Be(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.superscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.subscript)?(e.path[e.path.length-1].offset+=1,Vt(e).superscript=[new Be(e.parent().mode,"first")]):("limits"!==Vt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Be(e.parent().mode,"msubsup","​",zt(e))),e.path[e.path.length-1].offset+=1),Vt(e).superscript=[new Be(e.parent().mode,"first")])}return e.path.push({relation:"superscript",offset:0}),Bt(e),!0}Gi({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",denom:"numer",numer:"denom"}[e.relation()];return t||ua(e),e.parent()[t]||(e.parent()[t]=[new Be(e.parent().mode,"first")]),At(e,0,"end",t),!0},moveBeforeParent:e=>e.path.length>1?(e.path.pop(),At(e,e.anchorOffset()-1),!0):(e.announce("plonk"),!1),moveAfterParent:e=>Wt(e),moveToNextPlaceholder:e=>Lt(e,1),moveToPreviousPlaceholder:e=>Lt(e,-1),moveToNextChar:e=>Ct(e,1),moveToPreviousChar:e=>Ct(e,-1),moveUp:e=>Dt(e),moveDown:e=>Tt(e),moveToNextWord:e=>Kt(e,1),moveToPreviousWord:e=>Kt(e,-1),moveToGroupStart:e=>At(e,0),moveToGroupEnd:e=>At(e,-1),moveToMathFieldStart:e=>Nt(e,-1),moveToMathFieldEnd:e=>Nt(e,1),moveToSuperscript:e=>ua(e),moveToSubscript:e=>function(e){if(It(e),!Vt(e).subscript)if(Vt(e).superscript)Vt(e).subscript=[new Be(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.subscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.superscript)?(e.path[e.path.length-1].offset+=1,Vt(e).subscript=[new Be(e.parent().mode,"first")]):("limits"!==Vt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Be(e.parent().mode,"msubsup","​",zt(e))),e.path[e.path.length-1].offset+=1),Vt(e).subscript=[new Be(e.parent().mode,"first")])}return e.path.push({relation:"subscript",offset:0}),Bt(e),!0}(e)},{target:"model",category:"selection-anchor"}),Gi({selectGroup:e=>Bt(e),selectAll:e=>Ft(e),extendToNextChar:e=>Et(e,1),extendToPreviousChar:e=>Et(e,-1),extendToNextWord:e=>Kt(e,1,{extend:!0}),extendToPreviousWord:e=>Kt(e,-1,{extend:!0}),extendUp:e=>Dt(e,{extend:!0}),extendDown:e=>Tt(e,{extend:!0}),extendToNextBoundary:e=>Kt(e,1,{extend:!0}),extendToPreviousBoundary:e=>Kt(e,-1,{extend:!0}),extendToGroupStart:e=>Rt(e,-e.anchorOffset()),extendToGroupEnd:e=>Rt(e,e.siblings().length-e.anchorOffset()),extendToMathFieldStart:e=>Nt(e,-1,{extend:!0}),extendToMathFieldEnd:e=>Nt(e,1,{extend:!0})},{target:"model",category:"selection-extend"}),Gi({deleteAll:e=>(Ft(e),ta(e)),deleteNextChar:e=>ta(e,1),deletePreviousChar:e=>ta(e,-1),deleteNextWord:e=>(Kt(e,1,{extend:!0}),ta(e)),deletePreviousWord:e=>(Kt(e,-1,{extend:!0}),ta(e)),deleteToGroupStart:e=>(Rt(e,-e.anchorOffset()),ta(e)),deleteToGroupEnd:e=>(Nt(e,-1,{extend:!0}),ta(e)),deleteToMathFieldStart:e=>(Nt(e,-1,{extend:!0}),ta(e)),deleteToMathFieldEnd:e=>(Nt(e,1,{extend:!0}),ta(e))},{target:"model",category:"delete"});const ha=["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"];function fa(e){return!e.ctrlKey&&!e.metaKey&&"Dead"!==e.key&&ha.indexOf(e.code)>=0}function ga(e){const t=[];return(e=function(e){if(!e.code){const t=Object.entries(ni().mapping);let i,a=!1,r=!1;for(let n=0;n<4;n++){for(const[o,s]of t)if(s[n]===e.key){i=o,3===n?(a=!0,r=!0):2===n?a=!0:1===n&&(r=!0);break}if(i)break}return new KeyboardEvent(e.type,{...e,altKey:a,shiftKey:r,code:i})}return new KeyboardEvent(e.type,e)}(e)).ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),0===t.length?"["+e.code+"]":(t.push("["+e.code+"]"),t.join("+"))}function ya(e){var t;if(!e)return"";let i;return"Unidentified"===e.key&&e.target&&(i=e.target.value),i=null!==(t=null!=i?i:e.key)&&void 0!==t?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(i)&&(i=""),i}class ba{constructor(e){this.maximumDepth=1e3,this.record=!1,this.canCoalesce=!1,this.model=e,this.reset()}reset(){this.stack=[],this.index=-1}startRecording(){this.record=!0}canUndo(){return this.index>0}canRedo(){return this.index!==this.stack.length-1}undo(e){this.canUndo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"undo"),this.restore(this.stack[this.index-1],e),this.index-=1,e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"undo"),this.canCoalesce=!1)}redo(e){this.canRedo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"redo"),this.index+=1,this.restore(this.stack[this.index],e),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"redo"),this.canCoalesce=!1)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(e){this.record&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"snapshot"),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push({latex:this.model.root.toLatex(!1),selection:this.model.toString()}),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"snapshot"),this.canCoalesce=!1)}snapshotAndCoalesce(e){this.canCoalesce&&this.pop(),this.snapshot(e),this.canCoalesce=!0}save(){return{latex:this.model.root.toLatex(!1),selection:this.model.toString()}}restore(e,t){const i=this.model.suppressChangeNotifications;void 0!==t.suppressChangeNotifications&&(this.model.suppressChangeNotifications=t.suppressChangeNotifications),da(this.model,e?e.latex:"",{...t,format:"latex",mode:"math",insertionMode:"replaceAll",selectionMode:"after",smartFence:!1}),jt(this.model,e?e.selection:[{relation:"body",offset:0}]),this.model.suppressChangeNotifications=i}}const va={"−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega"},xa={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\langle":"(:","\\rangle":":)"};function ka(e){if(!e)return"";if(t(e)){let t="";if(0===e.length)return"";if("first"===e[0].type&&(e=e.slice(1)),0===e.length)return"";if("text"===e[0].mode){let i=0;for(t='"';e[i]&&"text"===e[i].mode;)t+=e[i].body,i++;t+='"'+ka(e.slice(i))}else if("math"===e[0].mode){let i=0;for(;e[i]&&"math"===e[i].mode;)t+=ka(e[i]),i++;t+=ka(e.slice(i))}return t.trim()}if("text"===e.mode)return'"'+e.body+'"';let i="";const a=e.symbol;let r;switch(e.type){case"group":case"root":i=ka(e.body);break;case"array":break;case"genfrac":(e.leftDelim||e.rightDelim)&&(i+="."!==e.leftDelim&&e.leftDelim?e.leftDelim:"{:"),e.hasBarLine?(i+="(",i+=ka(e.numer),i+=")/(",i+=ka(e.denom),i+=")"):(i+="("+ka(e.numer)+"),",i+="("+ka(e.denom)+")"),(e.leftDelim||e.rightDelim)&&(i+="."!==e.rightDelim&&e.rightDelim?e.rightDelim:"{:");break;case"surd":e.index?i+="root("+ka(e.index)+")("+ka(e.body)+")":i+="sqrt("+ka(e.body)+")";break;case"leftright":i+="."!==e.leftDelim&&e.leftDelim?e.leftDelim:"{:",i+=ka(e.body),i+="."!==e.rightDelim&&e.rightDelim?e.rightDelim:":}";break;case"sizeddelim":case"delim":case"overlap":case"overunder":break;case"mord":i=va[a]||a||("string"==typeof e.body?e.body:""),"\\"===i[0]&&(i=String(i)),r=a?a.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null,r?i=String.fromCharCode(parseInt("0x"+r[1])):i.length>0&&"\\"===i.charAt(0)&&(i="string"==typeof e.body?e.body.charAt(0):e.symbol);break;case"mbin":case"mrel":case"textord":case"minner":i=a&&va[a]?va[a]:a&&xa[a]?xa[a]:e.body;break;case"mopen":case"mclose":i+=e.body;break;case"mpunct":i=xa[a]||a;break;case"mop":"​"!==e.body&&(i="",i+="\\operatorname"===a?ka(e.body):e.body||a,i+=" ");break;case"mathstyle":case"box":case"spacing":case"enclose":break;case"space":i=" "}if(e.subscript){i+="_";const t=ka(e.subscript);t.length>1&&!/^(-)?\d+(\.\d*)?$/.test(t)?i+="("+t+")":i+=t}if(e.superscript){i+="^";const t=ka(e.superscript);t.length>1&&!/^(-)?\d+(\.\d*)?$/.test(t)?i+="("+t+")":i+=t}return i}const _a={};function wa(e){const t=_a.locale.substring(0,2);let i="";return _a.strings[_a.locale]&&(i=_a.strings[_a.locale][e]),!i&&_a.strings[t]&&(i=_a.strings[t][e]),i||(i=_a.strings.en[e]),i||(i=e),i}function Ma(e,t,i){st(e);const a=[],r=t.substr(i);for(const e of r){const t=new Be("command","command",e);t.isSuggestion=!0,a.push(t)}Array.prototype.splice.apply(e.siblings(),[e.anchorOffset()+1,0].concat(a))}function Sa(e,t){if(t=null!=t?t:{acceptSuggestion:!1},Mi(e),t.discard)return Li(e.model,null),e.switchMode("math"),!0;const i=Si(e.model,!t.acceptSuggestion);if(i){if("\\("===i||"\\)"===i)Li(e.model,[]),da(e.model,i.slice(1),{mode:e.mode});else{e.switchMode("math");const t=et(i,"math",null,e.config.macros);t?Li(e.model,t):zi(e.model,!0)}return e.snapshot(),e.model.announce("replacement"),!0}return!1}function za(e){!function(e){const t=e.siblings(),i=Mt(e);let a=i.start;for(;a1)}return Vi(e),!0}_a.plural=function(e,t,i){var a;(i=null!=i?i:{}).type=null!==(a=i.type)&&void 0!==a?a:"cardinal";const r=_a.locale.substring(0,2),n="ordinal"===i.type?_a._ordinal:_a._cardinal;let o,s="ordinal"===i.type?_a._ordinalPluralCategories.indexOf(n.select(e)):_a._cardinalPluralCategories.indexOf(n.select(e));return _a.strings[_a.locale]&&(o=_a.strings[_a.locale][t]),!o&&_a.strings[r]&&(o=_a.strings[r][t]),o||(o=_a.strings.en[t],o||(o=t),s="ordinal"===i.type?_a._ordinalPluralCategories.indexOf(_a._ordinalEnglish.select(e)):_a._cardinalPluralCategories.indexOf(_a._cardinalEnglish.select(e))),o.split(";")[s]||o.split(";")[0]},_a.merge=function(e,t){if(e&&t){const i=_a._locale;_a.locale=e,_a.strings[e]={..._a.strings[e],...t},_a.locale=i}else e&&!t&&Object.keys(e).forEach(t=>_a.merge(t,e[t]))},Object.defineProperty(_a,"locale",{set(e){_a._locale=e,_a._ordinal=null,_a._cardinal=null},get(){var e;return _a._locale||(_a._locale=null!==(e=null===navigator||void 0===navigator?void 0:navigator.language.slice(0,5))&&void 0!==e?e:"en"),_a._locale}}),Object.defineProperty(_a,"ordinal",{get:()=>(_a._ordinal||(_a._ordinalEnglish=new Intl.PluralRules("en",{type:"ordinal"}),_a._ordinalEnglishPluralCategories=_a._ordinalEnglish.resolvedOptions().pluralCategories,_a._ordinal=new Intl.PluralRules(_a.locale,{type:"ordinal"}),_a._ordinalPluralCategories=_a._ordinal.resolvedOptions().pluralCategories),_a._ordinal)}),Object.defineProperty(_a,"cardinal",{get:()=>(_a._cardinal||(_a._cardinalEnglish=new Intl.PluralRules("en",{type:"cardinal"}),_a._cardinalEnglishPluralCategories=_a._cardinalEnglish.resolvedOptions().pluralCategories,_a._cardinal=new Intl.PluralRules(_a.locale,{type:"cardinal"}),_a._cardinalPluralCategories=_a._ordinal.resolvedOptions().pluralCategories),_a._cardinal)}),_a.strings={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo"},ar:{"keyboard.tooltip.functions":"مهام","keyboard.tooltip.symbols":"حرف او رمز","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.command":"حالة تلقي الأوامر اللاتك","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.roman":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.roman":"Römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen"},el:{"keyboard.tooltip.functions":"συναρτήσεις","keyboard.tooltip.symbols":"σύμβολα","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.command":"Λειτουργία εντολών LaTeX","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.roman":"Ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer"},fa:{"keyboard.tooltip.functions":"توابع","keyboard.tooltip.symbols":"نمادها","keyboard.tooltip.greek":"حروف یونانی","keyboard.tooltip.command":"حالت دستور لاتک","keyboard.tooltip.numeric":"عددی","keyboard.tooltip.roman":"حروف رومی","tooltip.copy to clipboard":"کپی به کلیپبورد","tooltip.redo":"بازگشت به بعد","tooltip.toggle virtual keyboard":"نمایش/نهفتن کیبورد مجازی","tooltip.undo":"بازگشت به قبل"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.roman":"Lettres romaines","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalità di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.roman":"Lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare"},ja:{"keyboard.tooltip.functions":"関数","keyboard.tooltip.symbols":"シンボル","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.command":"LaTeXコマンドモード","keyboard.tooltip.numeric":"数値","keyboard.tooltip.roman":"ローマ字","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb poleceń LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.roman":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz wirtualną klawiaturę","tooltip.undo":"Cofnij"},ru:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Символы","keyboard.tooltip.greek":"Греческие буквы","keyboard.tooltip.command":"Режим командной строки LaTeX","keyboard.tooltip.numeric":"числовой","keyboard.tooltip.roman":"Латинские буквы","tooltip.copy to clipboard":"Скопировать в буфер обмена","tooltip.redo":"переделывать","tooltip.toggle virtual keyboard":"Переключить виртуальную клавиатуру","tooltip.undo":"расстегивать"}},Gi({complete:Sa,nextSuggestion:function(e){return e.suggestionIndex+=1,za(e),!1},previousSuggestion:function(e){if(e.suggestionIndex-=1,e.suggestionIndex<0){st(e.model);const t=ne(Si(e.model));e.suggestionIndex=t.length-1}return za(e),!1}},{target:"mathfield",category:"autocomplete"});const La={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ",a:'a',A:'capital A',"+":"plus ","-":"minus ",";":' semi-colon ',",":' comma ',"|":'Vertical bar',"(":'Open paren. ',")":' Close paren. ',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":' such that ',"\\colon":' such that ',"\\hbar":"etch bar ","\\iff":'if, and only if, ',"\\Longleftrightarrow":'if, and only if, ',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set n',"\\C":'the set c',"\\Z":'the set z',"\\Q":'the set q',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lbrace":'open brace',"\\{":'open brace',"\\rbrace":'close brace',"\\}":'close brace',"\\langle":'left angle bracket',"\\rangle":'right angle bracket',"\\lfloor":'open floor',"\\rfloor":'close floor',"\\lceil":'open ceiling',"\\rceil":'close ceiling',"\\vert":'vertical bar',"\\mvert":'divides',"\\lvert":'left vertical bar',"\\rvert":'right vertical bar',"\\lbrack":' open square bracket ',"\\rbrack":' close square bracket ',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"};function Aa(e){let t=0;if(Pe(e))for(const i of e)"first"!==i.type&&(t+=1);return 1===t}function qa(e){let t="";if(Pe(e))for(const i of e)"first"!==i.type&&"string"==typeof i.body&&(t+=i.body);return t}function $a(e,t){var i;const a={...t,textToSpeechRulesOptions:{...t.textToSpeechRulesOptions}};if(window.sre&&"sre"===a.textToSpeechRules){const t=Hi(e,a);return t?(a.textToSpeechMarkup&&(a.textToSpeechRulesOptions=null!==(i=a.textToSpeechRulesOptions)&&void 0!==i?i:{},a.textToSpeechRulesOptions.markup=a.textToSpeechMarkup,"ssml"===a.textToSpeechRulesOptions.markup&&(a.textToSpeechRulesOptions.markup="ssml_step"),a.textToSpeechRulesOptions.rate=a.speechEngineRate),a.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(a.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(t)):""}let r=function e(t,i,a){function r(e){return""+e+""}if(!i)return"";let n="";if(Pe(i)){let o=!1,s=!1;for(let l=0;l'),n+=i.body;else{i.id&&"math"===t&&(n+='');let o="",s="",l="",c=!1;switch(i.type){case"group":case"root":n+=e("math",i.body,a);break;case"genfrac":if(o=e("math",i.numer,a),s=e("math",i.denom,a),Aa(i.numer)&&Aa(i.denom)){const e={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[qa(i.numer)+"/"+qa(i.denom)];e?n=e:n+=o+" over "+s}else n+=' the fraction '+o+', over '+s+'. End fraction.';break;case"surd":if(l=e("math",i.body,a),i.index){let t=e("math",i.index,a);t=t.trim();const r=t.replace(//g,"");n+="3"===r?' the cube root of '+l+'. End cube root':"n"===r?' the nth root of '+l+'. End root':' the root with index: '+t+', of '+l+'. End root'}else Aa(i.body)?n+=" the square root of "+l+" , ":n+=' the square root of '+l+'. End square root';break;case"leftright":n+=La[i.leftDelim]||i.leftDelim,n+=e("math",i.body,a),n+=La[i.rightDelim]||i.rightDelim;break;case"rule":case"overunder":case"overlap":break;case"placeholder":n+="placeholder "+i.body;break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":case"textord":{const r=i.symbol;if("\\mathbin"===r||"\\mathrel"===r||"\\mathopen"===r||"\\mathclose"===r||"\\mathpunct"===r||"\\mathord"===r||"\\mathinner"===r){n=e(t,i.body,a);break}let o=i.body,s=i.symbol;if("delim"!==i.type&&"sizeddelim"!==i.type||(o=s=i.delim),"text"===t)n+=o;else{if("mbin"===i.type&&(n+=''),o){const e=La[o]||(s?La[s.trim()]:"");if(e)n+=" "+e;else{const e=s?function(e){let t="";return"\\"===e.charAt(0)&&(t=" "+e.replace("\\","")+" "),t}(s.trim()):"";n+=e||function(e){let t="";return a.textToSpeechMarkup?/[a-z]/.test(e)?t+=' '+e+"":/[A-Z]/.test(e)?t+=String("capital "+e.toLowerCase()):t+=e:/[a-z]/.test(e)?t+=" '"+e.toUpperCase()+"'":/[A-Z]/.test(e)?t+=" 'capital "+e.toUpperCase()+"'":t+=e,t}(o)}}else n+=e("math",i.body,a);"mbin"===i.type&&(n+='')}break}case"mop":if("​"!==i.body){const t=i.symbol;if("\\sum"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the summation from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the summation from '+t+' of ',c=!0}else n+=" the summation of";else if("\\prod"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the product from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the product from '+t+' of ',c=!0}else n+=" the product of ";else if("\\int"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let o=e("math",i.subscript,a);o=o.trim(),n+=' the integral from '+r(o)+' to '+r(t)+' of ',c=!0}else n+=' the integral of ';else"string"==typeof i.body?n+=La[i.body]||La[i.symbol]||" "+i.body:i.symbol&&("\\"===i.symbol[0]?n+=" "+i.symbol.substr(1):n+=" "+i.symbol)}break;case"enclose":l=e("math",i.body,a),Aa(i.body)?n+=" crossed out "+l+" , ":n+=" crossed out "+l+". End cross out"}if(!c&&i.superscript){let r=e(t,i.superscript,a);r=r.trim();const o=r.replace(/<[^>]*>/g,"");if(Aa(i.superscript)){if("math"===t){const e=function(e){if(Pe(e))for(const t of e)if("first"!==t.type&&t.id)return t.id.toString();return""}(i.superscript);e&&(n+='')}"′"===o?n+=" prime ":"2"===o?n+=" squared ":"3"===o?n+=" cubed ":isNaN(parseInt(o))?n+=" to the "+r+"; ":n+=' to the '+o+" power; "}else isNaN(parseInt(o))?n+=" raised to the "+r+"; ":n+=' raised to the '+o+" power; "}if(!c&&i.subscript){let t=e("math",i.subscript,a);t=t.trim(),Aa(i.subscript)?n+=" sub "+t:n+=" subscript "+t+". End subscript. "}}return n}("math",e,a);if("ssml"===a.textToSpeechMarkup){let e="";a.speechEngineRate&&(e=''),r=''+e+"

"+r+"

"+(e?"
":"")+""}else r="mac"===a.textToSpeechMarkup&&"mac"===function(e){let t="other";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?t="mac":/^(win)/i.test(navigator.platform)?t="win":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos")),"mac"===t?"mac":"!mac"}()?r.replace(//g,"").replace(//g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(//g,"[[slc $1]]").replace(/]*>/g,"").replace(/<\/say-as>/g,""):r.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return r}function Ca(e,t,i){return t+$a(i,{...e,textToSpeechMarkup:"",textToSpeechRulesOptions:{...e.textToSpeechRulesOptions,markup:"none"}})}function Da(e,t){if(!t&&window&&window.mathlive&&(t=window.mathlive.config),(t=null!=t?t:{}).speechEngine&&"local"!==t.speechEngine)if("amazon"===t.speechEngine){if(window&&window.AWS){const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"mp3",VoiceId:t.speechEngineVoice,Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes(t.speechEngineVoice)?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(a,(function(e,t){if(e);else if(null==t?void 0:t.AudioStream){const e=new Uint8Array(t.AudioStream),i=new Blob([e.buffer],{type:"audio/mpeg"}),a=URL.createObjectURL(i);new Audio(a).play().catch(e=>{})}}))}}else t.speechEngine;else{const t=new SpeechSynthesisUtterance(e);window&&window.speechSynthesis.speak(t)}}function Ta(e,t,i,a){let r="";"plonk"===t?(e.plonkSound&&(e.plonkSound.load(),e.plonkSound.play().catch(e=>{})),e.resetKeystrokeBuffer()):"delete"===t?r=Ca(e.config,"deleted: ",a):"focus"===t||/move/.test(t)?r=(Pt(e.model)?"":"selected: ")+function(e,t){function i(e,t){return"body"===t.relation?{enclose:"cross out",leftright:"fence",surd:"square root",root:"math field"}[e.type]:{numer:"numerator",denom:"denominator",index:"index",body:"parent",subscript:"subscript",superscript:"superscript"}[t.relation]}const a=t?t.path:[],r=e.model.path,n=r[r.length-1];let o="";for(;a.length>r.length;)o+="out of "+i(t.parent(),a[a.length-1])+"; ",a.pop();if(!Pt(e.model))return Ca(e.config,"",Ot(e.model));const s=i(e.model.parent(),n);0===n.offset&&(o+=(s?"start of "+s:"unknown")+": ");const l=e.model.sibling(Math.max(1,e.model.extent));return l?o+=Ca(e.config,"",l):0!==n.offset&&(o+=s?"end of "+s:"unknown"),o}(e,i):"replacement"===t?r=Ca(e.config,"",e.model.sibling(0)):"line"===t?(r=Ca(e.config,"",e.model.root),e.accessibleNode.innerHTML=e.config.createHTML(''+Hi(e.model.root,e.config)+""),e.textarea.setAttribute("aria-label","after: "+r)):r=a?Ca(e.config,t+" ",a):t;const n=/\u00a0/.test(e.ariaLiveText.textContent)?"   ":"   ";e.ariaLiveText.textContent=r+n}Gi({speak:(e,t,i)=>function(e,t,i){i=null!=i?i:{withHighlighting:!1};const a=function(e,t){let i=null;switch(t){case"all":i=e.model.root;break;case"selection":Pt(e.model)||(i=Ot(e.model));break;case"left":{const t=e.model.siblings(),a=e.model.startOffset();if(a>=1){i=[];for(let e=1;e<=a;e++)i.push(t[e])}break}case"right":{const t=e.model.siblings(),a=e.model.endOffset()+1;if(a<=t.length-1){i=[];for(let e=a;e<=t.length-1;e++)i.push(t[e])}break}case"group":i=e.model.siblings();break;case"parent":{const t=e.model.parent();t&&"root"!==t.type&&(i=e.model.parent());break}}return i}(e,t);if(null===a)return e.config.speakHook(function(e){let t="";switch(e){case"all":break;case"selection":t="no selection";break;case"left":t="at start";break;case"right":t="at end";break;case"group":break;case"parent":t="no parent"}return t}(t),e.config),!1;const r={...e.config};(i.withHighlighting||"amazon"===r.speechEngine)&&(r.textToSpeechMarkup=window.sre&&"sre"===r.textToSpeechRules?"ssml_step":"ssml");const n=$a(a,r);return i.withHighlighting?(window.mathlive.readAloudMathField=e,Ui(e,{forHighlighting:!0}),e.config.readAloudHook&&e.config.readAloudHook(e.field,n,e.config)):e.config.speakHook&&e.config.speakHook(n,r),!1}(e,t,i)},{target:"mathfield",category:"speech"});const Ea=()=>{};function Ka(e){if("string"==typeof e){const t=new Audio;return t.preload="none",t.src=e,t.volume=.5,t}return e}function Na(e){e instanceof HTMLAudioElement&&(e.pause(),e.removeAttribute("src"),e.load())}function Oa(e,i){const a=Ba(e,Object.keys(e));return Object.keys(i).forEach(e=>{var r,n;switch(e){case"scriptDepth":if(t(i.scriptDepth))a.scriptDepth=[i.scriptDepth[0],i.scriptDepth[1]];else{if("number"!=typeof i.scriptDepth)throw Error("Unexpected value for scriptDepth");a.scriptDepth=[i.scriptDepth,i.scriptDepth]}break;case"namespace":if(!/^[a-z]*[-]?$/.test(i.namespace))throw Error("namespace must be a string of lowercase characters only");/-$/.test(i.namespace)?a.namespace=i.namespace:a.namespace=i.namespace+"-";break;case"locale":a.locale="auto"===i.locale?_a.locale:i.locale;break;case"strings":_a.merge(i.strings);break;case"virtualKeyboardLayout":"auto"===i.virtualKeyboardLayout?a.virtualKeyboardLayout=null!==(r={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[_a.locale.substring(0,2)])&&void 0!==r?r:"qwerty":a.virtualKeyboardLayout=i.virtualKeyboardLayout;break;case"virtualKeyboardMode":{const e=null===(n=window.matchMedia)||void 0===n?void 0:n.call(window,"(any-pointer: coarse)").matches;"auto"===i.virtualKeyboardMode?a.virtualKeyboardMode=e?"onfocus":"off":a.virtualKeyboardMode=i.virtualKeyboardMode}break;case"letterShapeStyle":"auto"===i.letterShapeStyle?"fr"===_a.locale.substring(0,2)?a.letterShapeStyle="french":a.letterShapeStyle="tex":a.letterShapeStyle=i.letterShapeStyle;break;case"plonkSound":Na(a.plonkSound),a.plonkSound=Ka(i.plonkSound);break;case"keypressSound":if(Na(a.keypressSound),"string"==typeof i.keypressSound){const e=Ka(i.keypressSound);a.keypressSound={delete:e,return:e,spacebar:e,default:e}}else if(i.keypressSound instanceof HTMLAudioElement)a.keypressSound={delete:i.keypressSound,return:i.keypressSound,spacebar:i.keypressSound,default:i.keypressSound};else{if(!i.keypressSound.default)throw Error("Missing keypressSound.default");a.keypressSound={...i.keypressSound},a.keypressSound.return||(a.keypressSound.return=i.keypressSound.default),a.keypressSound.spacebar||(a.keypressSound.spacebar=i.keypressSound.default),a.keypressSound.delete||(a.keypressSound.delete=i.keypressSound.default)}break;case"onBlur":case"onFocus":case"onContentWillChange":case"onContentDidChange":case"onSelectionWillChange":case"onSelectionDidChange":case"onUndoStateWillChange":case"onUndoStateDidChange":case"onModeChange":case"onVirtualKeyboardToggle":case"onReadAloudStatus":case"onError":if(null===i[e])a[e]=Ea;else if("function"!=typeof i[e])throw Error(e+" must be a function or null");a[e]=i[e];break;default:t(i[e])?a[e]=[...i[e]]:"object"==typeof i[e]?a[e]={...i[e]}:a[e]=i[e]}}),void 0!==i.overrideDefaultInlineShortcuts&&(i.overrideDefaultInlineShortcuts?a.inlineShortcuts=i.inlineShortcuts:a.inlineShortcuts={...ia,...i.inlineShortcuts}),a}function Ba(e,i){let a;a="string"==typeof i?[i]:void 0===i?Object.keys(e):i;const r={};return a.forEach(i=>{t(r[i])?r[i]=[...r[i]]:"object"==typeof r[i]?r[i]={...r[i]}:r[i]=e[i]}),"string"==typeof i?r[i]:r}function Fa(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0);let a=0,r=!1;for(kt(e.model);!r;){const n=e.model.sibling(a);r=0===t||!n||"math"!==n.mode||!(/mord|textord|mpunct/.test(n.type)||"mop"===n.type&&/[a-zA-Z]+/.test(n.body))||Boolean(n.superscript)||Boolean(n.subscript)||i&&!i(n),r||(n.applyStyle({mode:"text"}),n.symbol=n.body,n.latex=""),a-=1,t-=1}_t(e.model)}function Pa(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0),kt(e.model);let a=0,r=!1;for(;!r;){const n=e.model.sibling(a);r=0===t||!n||"text"!==n.mode||" "===n.body||i&&!i(n),r||n.applyStyle({mode:"math"}),a-=1,t-=1}Ra(e),_t(e.model)}function Ra(e){let t=0;for(;e.model.sibling(t)&&"math"===e.model.sibling(t).mode;)t-=1;if(e.model.sibling(t)&&"text"===e.model.sibling(t).mode&&" "===e.model.sibling(t).body&&(!e.model.sibling(t-1)||"math"===e.model.sibling(t-1).mode)){kt(e.model),e.model.siblings().splice(t-1,1),_t(e.model);const i=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0,At(e.model,e.model.anchorOffset()-1),e.model.suppressChangeNotifications=i}}function Ia(e,t,i){!function(e){const t=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;if("Unidentified"===e.key)return;if("Dead"===e.key)return;const i=ei.filter(i=>{var a;return(null===(a=i.mapping[e.code])||void 0===a?void 0:a[t])===e.key});0!==i.length&&(i.forEach(e=>{e.score+=1}),ei.sort((e,t)=>t.score-e.score))}(i);const a=ni();if(e.keyboardLayout!==a.id&&(e.keyboardLayout=a.id,e.keybindings=mi(e.config.keybindings,t=>{"function"==typeof e.config.onError&&e.config.onError({code:"invalid-keybinding",arg:t.join("\n")})})),function(e,t){const i=e.keystrokeCaption;if(i&&e.keystrokeCaptionVisible){const a=e.element.getBoundingClientRect();i.style.left=a.left+"px",i.style.top=a.top-64+"px",i.innerHTML=e.config.createHTML(""+(di(t)||t)+""+i.innerHTML),i.style.visibility="visible",setTimeout((function(){i.childNodes.length>0&&i.removeChild(i.childNodes[i.childNodes.length-1]),0===i.childNodes.length&&(i.style.visibility="hidden")}),3e3)}}(e,t),clearTimeout(e.keystrokeBufferResetTimer),e.config.onKeystroke&&!e.config.onKeystroke(e,t,i))return(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1;let r,n,o,s=!1;if("command"!==e.mode&&(!i||!i.ctrlKey&&!i.metaKey))if(fa(i)){const t=ya(i),a=e.keystrokeBuffer+t;let o=0;for(;!r&&o{e.startsWith(n)&&!i.includes(e)&&i.push(e)});const o=(null==t?void 0:t.inlineShortcuts)?t.inlineShortcuts:null;o&&Object.keys(o).forEach(e=>{e.startsWith(n)&&i.push(e)})}return i}(a,e.config).length<=1?s=!0:e.config.inlineShortcutTimeout&&(e.keystrokeBufferResetTimer=setTimeout(()=>{e.resetKeystrokeBuffer()},e.config.inlineShortcutTimeout))}else e.resetKeystrokeBuffer();if(e.config.smartMode){const a=e.mode;r?e.mode="math":function(e,t,i){if(e.smartModeSuppressed)return!1;if(e.model.endOffset()<*|]$/.test(a))return Ra(e),!0}else{if("[Space]"===t)return Fa(e,void 0,e=>/[a-z][:,;.]$/.test(e.body)),!0;if(/[a-zA-Z]{3,}$/.test(r)&&!/(dxd|abc|xyz|uvw)$/.test(r))return Fa(e,void 0,e=>/[a-zA-Z]/.test(e.body)),!0;if(/(^|\W)(if|If)$/i.test(r))return Fa(e,1),!0;if(/(\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5){3,}$/u.test(r)&&!/(αβγ)$/.test(r))return Fa(e,void 0,e=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5)/u.test(e.body)),!0;if("?"===a)return!0;if("."===a&&!/[0-9-+]\.$/.test(r))return!0}return!1}(e,t,i)&&(e.mode={math:"text",text:"math"}[e.mode],o=""),e.mode!==a&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}if(r||o||(o=function(e,t,i){if(0===e.length)return"";for(let a=e.length-1;a>=0;a--)if(e[a].key===i&&(!e[a].ifMode||e[a].ifMode===t))return e[a].command;return""}(e.keybindings,e.mode,t)),!r&&!o)return!0;if(e.config.readOnly&&"insert"===o[0])return!0;zi(e.model,!1);const l=e.model.parent();if("moveAfterParent"===o&&l&&"leftright"===l.type&&e.model.endOffset()===e.model.siblings().length-1&&e.config.smartFence&&la(e.model,".",e.style)&&(o="",Vi(e)),"math"===e.mode&&"[Spacebar]"===t&&!r){const t=e.model.sibling(1),i=e.model.sibling(-1);(t&&"text"===t.mode||i&&"text"===i.mode)&&da(e.model," ",{mode:"text"})}if(o)e.$perform(o);else if(r){if(!/^(\\{|\\}|\\[|\\]|\\@|\\#|\\$|\\%|\\^|\\_|\\backslash)$/.test(r)){const t={...zt(e.model),...e.style};da(e.model,ya(i),{suppressChangeNotifications:!0,mode:e.mode,style:t});const a=e.mode;e.snapshotAndCoalesce(),e.restoreToUndoRecord(e.keystrokeBufferStates[n]),e.mode=a}kt(e.model);const t=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0;const a={...zt(e.model),...e.style};da(e.model,r,{format:"latex",mode:e.mode,style:a,smartFence:!0}),Ra(e),r.endsWith(" ")&&(e.mode="text",da(e.model," ",{mode:"text",style:a})),e.model.suppressChangeNotifications=t,_t(e.model),e.snapshot(),Vi(e),e.model.announce("replacement"),s&&e.resetKeystrokeBuffer()}return e.scrollIntoView(),(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1}function Ha(e,t,i){if(e.config.readOnly)return void e.model.announce("plonk");if((i=null!=i?i:{}).focus&&e.$focus(),i.feedback&&(e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{}))),i.commandMode&&"command"!==e.mode&&e.switchMode("command"),zi(e.model,!1),i.simulateKeystroke){const i=t.charAt(0);if(!Ia(e,i,new KeyboardEvent("keypress",{key:i})))return}let a="",r=!1;if(e.pasteInProgress)e.pasteInProgress=!1,da(e.model,t,{smartFence:e.config.smartFence,mode:"math"});else{const i={...zt(e.model),...e.style},n=Ue(t);for(const t of n)if("command"===e.mode){st(e.model),e.suggestionIndex=0;const i=Si(e.model),n=ne(i+t);r=n.length>1,0===n.length?(da(e.model,t,{mode:"command"}),/^\\[a-zA-Z\\*]+$/.test(i+t)&&zi(e.model,!0),Mi(e)):(da(e.model,t,{mode:"command"}),n[0].match!==i+t&&Ma(e.model,n[0].match,-n[0].match.length+i.length+1),a=n[0].match)}else if("math"===e.mode){const a={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(a){if("moveToSuperscript"===a){if(Wa(e)>=e.config.scriptDepth[1])return void e.model.announce("plonk")}else if("moveToSubscript"===a&&Va(e)>=e.config.scriptDepth[0])return void e.model.announce("plonk");e.$perform(a)}else e.config.smartSuperscript&&"superscript"===e.model.relation()&&/[0-9]/.test(t)&&0===e.model.siblings().filter(e=>"first"!==e.type).length?(da(e.model,t,{mode:"math",style:i}),Wt(e.model)):da(e.model,t,{mode:"math",style:i,smartFence:e.config.smartFence})}else"text"===e.mode&&da(e.model,t,{mode:"text",style:i})}"command"!==e.mode&&e.snapshotAndCoalesce(),e.dirty=!0,e.scrollIntoView(),ki(e,a,r)}function Wa(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!0:a.subscript&&(r=!1),i+=1,a=e.model.ancestor(i);return r?t:0}function Va(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!1:a.subscript&&(r=!0),i+=1,a=e.model.ancestor(i);return r?t:0}function Ua(e){return e.pasteInProgress=!0,!0}let ja;Gi({undo:e=>(Sa(e),e.undo(),!0),redo:e=>(Sa(e),e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},enterCommandMode:e=>(e.switchMode("command"),!0),toggleKeystrokeCaption:e=>(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaption.innerHTML="",e.keystrokeCaptionVisible||(e.keystrokeCaption.style.visibility="hidden"),!1),switchMode:(e,t)=>(e.switchMode(t),!0),insert:(e,t,i)=>e.$insert(t,i),typedText:(e,t)=>(Ha(e,t),!0)}),Gi({applyStyle:function(e,t){e.resetKeystrokeBuffer();const i=function(e){const t={};return"string"==typeof e.mode&&(t.mode=e.mode.toLowerCase()),"string"==typeof e.color&&(t.color=e.color),"string"==typeof e.backgroundColor&&(t.backgroundColor=e.backgroundColor),"string"==typeof e.fontFamily&&(t.fontFamily=e.fontFamily),"string"==typeof e.series&&(t.fontSeries=e.series),"string"==typeof e.fontSeries&&(t.fontSeries=e.fontSeries.toLowerCase()),t.fontSeries&&(t.fontSeries={bold:"b",medium:"m",normal:"m"}[t.fontSeries]||t.fontSeries),"string"==typeof e.shape&&(t.fontShape=e.shape),"string"==typeof e.fontShape&&(t.fontShape=e.fontShape.toLowerCase()),t.fontShape&&(t.fontShape={italic:"it",up:"n",upright:"n",normal:"n"}[t.fontShape]||t.fontShape),"string"==typeof e.size?t.fontSize=e.size:"number"==typeof e.size&&(t.fontSize="size"+Math.min(0,Math.max(10,e.size))),"string"==typeof e.fontSize&&(t.fontSize=e.fontSize.toLowerCase()),t.fontSize&&(t.fontSize={tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normal:"size5",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[t.fontSize]||t.fontSize),t}(t);if(i.mode){if(Pt(e.model))e.switchMode(i.mode);else{const t=e.mode,i="math"===(St(e.model)||e.config.defaultMode)?"text":"math";let a=e.$selectedText("ASCIIMath");if("math"===i&&/^"[^"]+"$/.test(a)&&(a=a.slice(1,-1)),e.$insert(a,{mode:i,selectionMode:"item",format:"text"===i?"text":"ASCIIMath"}),e.mode=i,e.groupIsSelected()){const t=e.model.parent();!t||"group"!==t.type&&"root"!==t.type||(t.mode=i)}e.mode!==t&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}delete i.mode}return Pt(e.model)?(e.style.fontSeries&&i.fontSeries===e.style.fontSeries&&(i.fontSeries="auto"),i.fontShape&&i.fontShape===e.style.fontShape&&(i.fontShape="auto"),i.color&&i.color===e.style.color&&(i.color="none"),i.backgroundColor&&i.backgroundColor===e.style.backgroundColor&&(i.backgroundColor="none"),i.fontSize&&i.fontSize===e.style.fontSize&&(i.fontSize="auto"),e.style={...e.style,...i}):(ca(e.model,i),e.snapshot()),!0}},{target:"mathfield"}),Gi({copyToClipboard:e=>(e.$focus(),Pt(e.model)&&e.$select(),document.execCommand("copy"),!1),cutToClipboard:e=>(e.$focus(),document.execCommand("cut"),!0),pasteFromClipboard:e=>(e.$focus(),document.execCommand("paste"),!0)},{target:"mathfield",category:"clipboard"});let Ga=0;function Xa(e,t,i,a){var r;let n;(a=null!=a?a:{}).bias=null!==(r=a.bias)&&void 0!==r?r:0;const o=function e(t,i,a){let r={element:null,distance:Number.POSITIVE_INFINITY},n=!0;if(t.getAttribute("data-atom-id")){r.element=t;const e=t.getBoundingClientRect(),o=i-(e.left+e.right)/2,s=a-(e.top+e.bottom)/2;r.distance=o*o+s*s,n=i>=e.left&&i<=e.right}if(n&&t.children)for(const n of t.children){const t=e(n,i,a);t.element&&t.distance<=r.distance&&(r=t)}return r}(e.field,t,i).element,s=o?o.getAttribute("data-atom-id"):null;if(s){const i=Yt(e.model,(e,t)=>t.captureSelection?t.filter(e=>e.id===s).length>0:t.id===s);if(i&&i.length>0)if(n=dt(i[0]).path,0===a.bias){const e=o.getBoundingClientRect();tf ()",classes:"tex",layers:["functions"]},symbols:{tooltip:"keyboard.tooltip.symbols",layer:"symbols",label:"∞≠∈",classes:"tex",layers:["symbols"]},command:{tooltip:"keyboard.tooltip.command",command:"enterCommandMode",label:"",layers:["lower-command","upper-command","symbols-command"]},style:{tooltip:"keyboard.tooltip.style",layer:"style",label:"bi𝔹"}},Ya={"\\varphi ":["Φ","\\Phi "],"\\varsigma ":["Σ","\\Sigma "],"\\epsilon ":["Ɛ",'{\\char"0190}'],"\\rho ":["Ρ",'{\\char"3A1}'],"\\tau ":["Τ",'{\\char"3A4}'],"\\upsilon ":["Υ","\\Upsilon "],"\\theta ":["Θ","\\Theta "],"\\iota ":["Ι",'{\\char"399}'],"\\omicron ":["Ο",'{\\char"39F}'],"\\pi ":["Π","\\Pi "],"\\alpha ":["Α",'{\\char"391}'],"\\sigma ":["Σ","\\Sigma "],"\\delta ":["Δ","\\Delta "],"\\phi ":["Φ","\\Phi "],"\\gamma ":["Γ","\\Gamma "],"\\eta ":["Η",'{\\char"397}'],"\\xi ":["Ξ","\\Xi "],"\\kappa ":["Κ",'{\\char"39A}'],"\\lambda ":["Λ","\\Lambda "],"\\zeta ":["Ζ",'{\\char"396}'],"\\chi ":["Χ",'{\\char"3A7}'],"\\psi ":["Ψ","\\Psi "],"\\omega ":["Ω","\\Omega "],"\\beta ":["Β",'{\\char"392}'],"\\nu ":["Ν",'{\\char"39D}'],"\\mu ":["Μ",'{\\char"39C}']},Qa={0:["\\emptyset","\\varnothing","\\infty",{latex:"#?_0",insert:"#@_0"},"\\circ","\\bigcirc","\\bullet"],2:["\\frac{1}{2}",{latex:"#?^2",insert:"#@^2"}],3:["\\frac{1}{3}",{latex:"#?^3",insert:"#@^3"}],".":[",",";","\\colon",{latex:":",aside:"ratio"},{latex:"\\cdotp",aside:"center dot",classes:"box"},{latex:"\\cdots",aside:"center ellipsis",classes:"box"},{latex:"\\ldotp",aside:"low dot",classes:"box"},{latex:"\\ldots",aside:"low ellipsis",classes:"box"},{latex:"\\vdots",aside:"",classes:"box"},{latex:"\\ddots",aside:"",classes:"box"},"\\odot","\\oslash","\\circledcirc"],"*":["\\cdot","\\ast","\\star","\\bigstar","\\ltimes","\\rtimes","\\rightthreetimes","\\leftthreetimes","\\intercal","\\prod",{latex:"\\prod_{n\\mathop=0}^{\\infty}",classes:"small"}],"+":["\\pm","\\mp","\\sum",{latex:"\\sum_{n\\mathop=0}^{\\infty}",classes:"small"},"\\dotplus","\\oplus"],"-":["\\pm","\\mp","\\ominus","\\vert #0 \\vert"],"/":["\\divideontimes","/","\\div"],"(":["\\left( #0\\right)","\\left[ #0\\right]","\\left\\{ #0\\right\\}","\\left\\langle #0\\right\\rangle","\\lfloor","\\llcorner","(","\\lbrack","\\lvert","\\lVert","\\lgroup","\\langle","\\lceil","\\ulcorner","\\lmoustache","\\lbrace"],")":["\\rfloor","\\lrcorner",")","\\rbrack","\\rvert","\\rVert","\\rgroup","\\rangle","\\rceil","\\urcorner","\\rmoustache","\\rbrace"],"=":["\\cong","\\asymp","\\equiv","\\differencedelta","\\varpropto","\\thickapprox","\\approxeq","\\thicksim","\\backsim","\\eqsim","\\simeq","\\Bumpeq","\\bumpeq","\\doteq","\\Doteq","\\fallingdotseq","\\risingdotseq","\\coloneq","\\eqcirc","\\circeq","\\triangleq","\\between"],"!=":["\\neq","\\ncong","","\\nsim"],"<":["\\leq","\\leqq","\\lneqq","\\ll","\\nless","\\nleq","\\precsim","\\lesssim","\\lessgtr","\\prec","\\preccurlyeq","\\lessdot","\\nprec"],">":["\\geq","\\geqq","\\gneqq","\\gg","\\ngtr","\\ngeq","\\succsim","\\gtrsim","\\gtrless","\\succ","\\succcurlyeq","\\gtrdot","\\nsucc"],set:["\\in","\\owns","\\subset","\\nsubset","\\supset","\\nsupset"],"!set":["\\notin","\\backepsilon"],subset:[],supset:[],infinity:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"],"numeric-pi":["\\prod","\\theta","\\rho","\\sin","\\cos","\\tan"],ee:["\\times 10^{#?}","\\ln","\\ln_{10}","\\log"],"^":["_{#?}"],int:[{latex:"\\int_{#?}^{#?}",classes:"small"},{latex:"\\int",classes:"small"},{latex:"\\smallint",classes:"small"},{latex:"\\iint",classes:"small"},{latex:"\\iiint",classes:"small"},{latex:"\\oint",classes:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",classes:"small"},{latex:"\\frac{\\partial}{\\partial x}",classes:"small"},"\\capitalDifferentialD","\\rd","\\partial"],nabla:["\\nabla\\times","\\nabla\\cdot","\\nabla^{2}"],"!":["!!","\\Gamma","\\Pi"],accents:["\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],b:[{latex:"\\beth",aside:"beth"}],B:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"}],d:[{latex:"\\daleth",aside:"daleth"}],D:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"}],g:[{latex:"\\gimel",aside:"gimel"}],G:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"}],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\N",aside:"set of natural numbers"}],p:[{latex:"\\P",aside:"set of primes"}],q:[{latex:"\\Q",aside:"set of rational numbers"}],r:[{latex:"\\R",aside:"set of real numbers"}],z:[{latex:"\\Z",aside:"set of integers"}],"x-var":["y","z","t","r",{latex:"f(#?)",classes:"small"},{latex:"g(#?)",classes:"small"},"x^2","x^n","x_n","x_{n+1}","x_i","x_{i+1}"],"n-var":["i","j","p","k","a","u"],ii:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"],logic:[{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},{latex:"\\ni",aside:"such that"},{latex:"\\Colon",aside:"such that"},{latex:"\\implies",aside:"implies"},{latex:"\\impliedby",aside:"implied by"},{latex:"\\iff",aside:"if and only if"},{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"},{latex:"\\therefore",aside:"therefore"},{latex:"\\because",aside:"because"},{latex:"^\\biconditional",aside:"biconditional"},"\\leftrightarrow","\\Leftrightarrow","\\to","\\models","\\vdash","\\gets","\\dashv","\\roundimplies"],"set-operators":["\\cap","\\cup","\\setminus","\\smallsetminus","\\complement"],"set-relations":["\\in","\\notin","\\ni","\\owns","\\subset","\\supset","\\subseteq","\\supseteq","\\subsetneq","\\supsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space
⁻³⧸₁₈ em"},{latex:'\\unicode{"203A}\\,\\unicode{"2039}',insert:"\\,",aside:"thin space
³⧸₁₈ em"},{latex:'\\unicode{"203A}\\:\\unicode{"2039}',insert:"\\:",aside:"medium space
⁴⧸₁₈ em"},{latex:'\\unicode{"203A}\\;\\unicode{"2039}',insert:"\\;",aside:"thick space
⁵⧸₁₈ em"},{latex:'\\unicode{"203A}\\ \\unicode{"2039}',insert:"\\ ",aside:"⅓ em"},{latex:'\\unicode{"203A}\\enspace\\unicode{"2039}',insert:"\\enspace",aside:"½ em"},{latex:'\\unicode{"203A}\\quad\\unicode{"2039}',insert:"\\quad",aside:"1 em"},{latex:'\\unicode{"203A}\\qquad\\unicode{"2039}',insert:"\\qquad",aside:"2 em"}],delete:[{label:'',command:'"deleteAll"'}],"->|":[]};let Ja={};const er={math:"\n
\n
    \n
  • x
  • \n
  • n
  • \n
  • \n \n
  • \n
  • e
  • \n
  • i
  • \n
  • \n
\n
    \n
  • <
  • \n
  • >
  • \n
  • \n \n
  • \n
  • x ²
  • \n
  • x
  • \n
  • \n
\n
    \n
  • (
  • \n
  • )
  • \n
  • \n \n
  • \n
  • \n
  • \n
\n \n
    \n
  • \n
  • \n
  • \n \n
  • \n \n
\n
\n ","lower-roman":"\n
\n
    \n \n \n
\n
    \n \n \n
\n
    \n \n \n
\n
    \n \n
  • ;
  • \n
  • ,
  • \n
  •  
  • \n \n
\n
","upper-roman":"\n
\n
    \n \n \n
\n
    \n \n \n
\n
    \n \n \n
\n
    \n \n
  • ;
  • \n
  • ;
  • \n
  •  
  • \n \n
\n
",symbols:"\n
\n
    \n \n
  • {
  • \n
  • }
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • o
  • \n
  • \n
  • \n\n
\n
    \n \n
  • [
  • \n
  • ]
  • \n
  • \n
  • \n
  • \n
  • !
  • \n
  • o
  • \n
  • o
  • \n
  • \n
  • \n\n
\n
    \n \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n\n
  • \n
\n
    \n \n
  • ,
  • \n
  • \n
  • :
  • \n
  • \n
  • \n
  • \n
  • ±
  • \n \n
\n
","lower-greek":"\n
\n
  • φ
  • \n
  • ς
  • \n
  • ϵ
  • \n
  • ρ
  • \n
  • τ
  • \n
  • υ
  • \n
  • θ
  • \n
  • ι
  • \n
  • ο
  • \n
  • π
  • \n
\n
  • α
  • \n
  • σ
  • \n
  • δ
  • \n
  • ϕ
  • \n
  • γ
  • \n
  • η
  • \n
  • ξ
  • \n
  • κ
  • \n
  • λ
  • \n
\n
  • \n
  • ζ
  • \n
  • χ
  • \n
  • ψ
  • \n
  • ω
  • \n
  • β
  • \n
  • ν
  • \n
  • μ
  • \n
  • \n
\n
    \n
  •  
  • \n
  • ,
  • \n
  • ε
  • \n
  • ϑ
  • \n
  • ϰ
  • \n
  • ϖ
  • \n
  • ϱ
  • \n \n
\n
","upper-greek":"\n
\n
  • Φ
  • \n
  • Σ
  • \n
  • Ɛ
  • \n
  • Ρ
  • \n
  • Τ
  • \n
  • Υ
  • \n
  • Θ
  • \n
  • Ι
  • \n
  • Ο
  • \n
  • Π
\n
  • Α
  • \n
  • Σ
  • \n
  • Δ
  • \n
  • Φ
  • \n
  • Γ
  • \n
  • Η
  • \n
  • Ξ
  • \n
  • Κ
  • \n
  • Λ
\n
  • \n
  • Ζ
  • \n
  • Χ
  • \n
  • Ψ
  • \n
  • Ω
  • \n
  • Β
  • \n
  • Ν
  • \n
  • Μ
  • \n
\n
    \n
  •  
  • \n
  • .
  • \n
  •  
  • \n \n
\n
","lower-command":"\n
\n
\n
\n
\n
    \n
  • 01#
  • \n
  • {
  • \n
  • }
  • \n
  • ^
  • \n
  • _
  • \n
  •  
  • \n \n
\n
","upper-command":"\n
\n
\n
\n
\n
    \n
  • \n
  • [
  • \n
  • ]
  • \n
  • (
  • \n
  • )
  • \n
  •  
  • \n \n
\n
","symbols-command":"\n
\n
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 0
\n
  • !
  • @
  • #
  • $
  • %
  • ^
  • &
  • *
  • +
  • =
\n
    \n
  • \\
  • \n
  • |
  • \n
  • /
  • \n
  • `
  • \n
  • ;
  • \n
  • :
  • \n
  • ?
  • \n
  • '
  • \n
  • \"
  • \n
  • \n
\n
    \n
  • abc
  • \n
  • <
  • \n
  • >
  • \n
  • ~
  • \n
  • ,
  • \n
  • .
  • \n
  •  
  • \n \n
\n
",functions:"\n
\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
\n
  • \n
  • (
  • \n
  • )
  • \n
  • \n
  • \n
  •  
  • \n \n
\n
",style:"\n
\n
    \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
\n
    \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
\n
    \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
\n
    \n
  • \n
  • \n
  • \n\n
  • \n
  • \n
  • \n
  • \n
\n
"};function tr(e,t,i){return e=e.replace(/(^|[^\\])#@/g,"$1#?"),D($(Oe({mathstyle:d.displaystyle,macros:i.config.macros},et(e,"math",t,i.config.macros)),"ML__base"),"ML__mathlive").toMarkup()}function ir(e,t,i){var a;let r="
";const n=t.replace(/\s+/g," ").split(" ");if(n.length>1){const t={...Za,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}};for(const e of n){if(!t[e])break;r+="
"+t[e].label+"
"}}return r+="
",r+=`\n
\n
\n \n
\n
\n \n
\n
\n \n
\n
\n `,""}function ar(e,t,i){var a;for(let r=0;r"+n.getAttribute("data-aside").replace(/"/g,'"')+""),void 0!==o&&(n.innerHTML=e.config.createHTML(o)),n.getAttribute("data-classes")&&n.classList.add(n.getAttribute("data-classes"));const s=null===(a=n.getAttribute("data-insert"))||void 0===a?void 0:a.replace(/"/g,'"');let l;if(s&&Ya[s]&&(n.setAttribute("data-shifted",Ya[s][0]),n.setAttribute("data-shifted-command",JSON.stringify(["insertAndUnshiftKeyboardLayer",Ya[s][1]]))),l=n.getAttribute("data-command")?JSON.parse(n.getAttribute("data-command")):n.getAttribute("data-insert")?["insert",n.getAttribute("data-insert"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:n.getAttribute("data-latex")?["insert",n.getAttribute("data-latex"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:["typedText",n.getAttribute("data-key")||n.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}],i&&(l=[i,l]),n.getAttribute("data-alt-keys")){const e=Ja[n.getAttribute("data-alt-keys")];e&&(l={default:l,pressAndHoldStart:["showAlternateKeys",n.getAttribute("data-alt-keys"),e],pressAndHoldEnd:"hideAlternateKeys"})}vi(e,n,l)}}function rr(e,t){const i={qwerty:{"lower-1":"qwertyuiop","lower-2":" asdfghjkl ","lower-3":"^zxcvbnm~","upper-1":"QWERTYUIOP","upper-2":" ASDFGHJKL ","upper-3":"^ZXCVBNM~","numpad-1":"789/","numpad-2":"456*","numpad-3":"123-","numpad-4":"0.=+"},azerty:{"lower-1":"azertyuiop","lower-2":"qsdfghjklm","lower-3":"^ wxcvbn ~","upper-1":"AZERTYUIOP","upper-2":"QSDFGHJKLM","upper-3":"^ WXCVBN ~"},qwertz:{"lower-1":"qwertzuiop","lower-2":" asdfghjkl ","lower-3":"^yxcvbnm~","upper-1":"QWERTZUIOP","upper-2":" ASDFGHJKL","upper-3":"^YXCVBNM~"},dvorak:{"lower-1":"^ pyfgcrl ","lower-2":"aoeuidhtns","lower-3":"qjkxbmwvz~","upper-1":"^ PYFGCRL ","upper-2":"AOEUIDHTNS","upper-3":"QJKXBMWVZ~"},colemak:{"lower-1":" qwfpgjluy ","lower-2":"arstdhneio","lower-3":"^zxcvbkm~","upper-1":" QWFPGNLUY ","upper-2":"ARSTDHNEIO","upper-3":"^ZXCVBKM~"}},a=i[e.config.virtualKeyboardLayout]?i[e.config.virtualKeyboardLayout]:i.qwerty;let r,n=t;n=n.replace(//g,"\n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n
  • ");let o=n.match(/()/);for(;o;){r="";const e=o[2].match(/[a-zA-Z][a-zA-Z0-9-]*=(['"])(.*?)\1/g),t={};for(const i of e){const e=i.match(/([a-zA-Z][a-zA-Z0-9-]*)=(['"])(.*?)\2/);t[e[1]]=e[3]}let s=a[t.name];if(s||(s=i.qwerty[t.name]),s)for(const e of s){let i=t.class||"";i&&(i=" "+i),"~"===e?(r+="
  • \'\n data-shifted-command=\'"deleteAll"\'\n data-alt-keys=\'delete\' data-command=\'["performWithFeedback","deletePreviousChar"]\'\n >⌫
  • '):" "===e?r+="
  • ":"^"===e?r+="
  • ":"/"===e?r+="
  • ÷
  • ":"*"===e?r+="
  • ×
  • ":"-"===e?r+="
  • ":/tt/.test(i)?r+="
  • '+e+"
  • ":r+="
  • "+e+"
  • "}n=n.replace(new RegExp(o[1]+o[2]+o[3]),r),o=n.match(/()/)}return n}function nr(e){const t=document.getElementById("mathlive-alternate-keys-panel");return t&&(t.classList.remove("is-visible"),t.innerHTML="",fi(t)),!1}function or(e){const t=e.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(let i=0;ili{display:flex;flex-flow:column;align-items:center;justify-content:center;font-size:30px;height:70px;width:70px;box-sizing:border-box;margin:0;background:transparent;border:1px solid transparent;border-radius:5px;pointer-events:all;color:var(--keyboard-alternate-text);fill:currentColor}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys ul>li{font-size:24px;height:50px;width:50px}}.ML__keyboard.alternate-keys ul>li.active,.ML__keyboard.alternate-keys ul>li.pressed,.ML__keyboard.alternate-keys ul>li:hover{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);background:var(--keyboard-alternate-background-active);color:var(--keyboard-text-active)}.ML__keyboard.alternate-keys ul>li.small{font-size:18px}.ML__keyboard.alternate-keys ul>li.small-button{width:42px;height:42px;margin:2px;background:#fbfbfb}.ML__keyboard.alternate-keys ul>li.small-button:hover{background:var(--keyboard-alternate-background-active)}.ML__keyboard.alternate-keys ul>li.box>div,.ML__keyboard.alternate-keys ul>li.box>span{border:1px dashed rgba(0,0,0,.24)}.ML__keyboard.alternate-keys ul>li .warning{min-height:60px;min-width:60px;background:#cd0030;color:#fff;padding:5px;display:flex;align-items:center;justify-content:center;border-radius:5px}.ML__keyboard.alternate-keys ul>li .warning.active,.ML__keyboard.alternate-keys ul>li .warning.pressed,.ML__keyboard.alternate-keys ul>li .warning:hover{background:red}.ML__keyboard.alternate-keys ul>li .warning svg{width:50px;height:50px}.ML__keyboard.alternate-keys ul>li aside{font-size:12px;line-height:12px;opacity:.78;padding-top:2px}.ML__keyboard>div.keyboard-layer{display:none;outline:none}.ML__keyboard>div.keyboard-layer.is-visible{display:flex;flex-flow:column}.ML__keyboard>div>div.keyboard-toolbar{align-self:center;display:flex;flex-flow:row;justify-content:space-between;width:736px}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard>div>div.keyboard-toolbar{width:556px}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar{width:365px;max-width:100vw}}.ML__keyboard>div>div.keyboard-toolbar svg{height:20px;width:20px}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar svg{height:13px;width:17px}}.ML__keyboard>div>div.keyboard-toolbar>.left{position:relative;display:flex;justify-content:flex-start;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>.right{display:flex;justify-content:flex-end;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>div>div{display:flex;align-items:baseline;justify-content:center;pointer-events:all;color:var(--keyboard-text);fill:currentColor;background:0;font-size:110%;cursor:pointer;min-height:0;padding:4px 10px;margin:7px 4px 6px;box-shadow:none;border:none;border-bottom:2px solid transparent}.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled.pressed svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled:hover svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled svg{color:var(--keyboard-text);opacity:.2}@media only screen and (max-width:414px){.ML__keyboard>div>div.keyboard-toolbar>div>div{font-size:100%;padding:0 6px 0 0}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar>div>div{padding-left:4px;padding-right:4px;font-size:90%}}.ML__keyboard>div>div.keyboard-toolbar>div>div.active,.ML__keyboard>div>div.keyboard-toolbar>div>div.pressed,.ML__keyboard>div>div.keyboard-toolbar>div>div:active,.ML__keyboard>div>div.keyboard-toolbar>div>div:hover{color:var(--keyboard-text-active)}.ML__keyboard>div>div.keyboard-toolbar>div>div.selected{color:var(--keyboard-text-active);border-bottom:2px solid var(--keyboard-text-active);margin-bottom:8px;padding-bottom:0}.ML__keyboard div .rows{border:0;border-collapse:separate;clear:both;margin:auto;display:flex;flex-flow:column;align-items:center}.ML__keyboard div .rows>ul{list-style:none;height:40px;margin:0 0 3px;padding:0}.ML__keyboard div .rows>ul>li{display:flex;flex-flow:column;align-items:center;justify-content:center;width:34px;margin-right:2px;height:40px;box-sizing:border-box;padding:8px 0;vertical-align:top;text-align:center;float:left;color:var(--keycap-text);fill:currentColor;font-size:20px;background:var(--keycap-background);border:1px solid var(--keycap-background-border);border-bottom-color:var(--keycap-background-border-bottom);border-radius:5px;pointer-events:all;position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ML__keyboard div .rows>ul>li:last-child{margin-right:0}.ML__keyboard div .rows>ul>li.small{font-size:16px}.ML__keyboard div .rows>ul>li.tt{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.bottom{justify-content:flex-end}.ML__keyboard div .rows>ul>li.left{align-items:flex-start;padding-left:4px}.ML__keyboard div .rows>ul>li.right{align-items:flex-end;padding-right:4px}.ML__keyboard div .rows>ul>li svg{width:20px;height:20px}.ML__keyboard div .rows>ul>li .warning{height:25px;width:25px;min-height:25px;min-width:25px;background:#cd0030;color:#fff;border-radius:100%;padding:5px;display:flex;align-items:center;justify-content:center;margin-bottom:-2px}.ML__keyboard div .rows>ul>li .warning svg{width:16px;height:16px}@media only screen and (max-width:768px){.ML__keyboard div .rows>ul>li .warning{height:16px;width:16px;min-height:16px;min-width:16px}.ML__keyboard div .rows>ul>li .warning svg{width:14px;height:14px}}.ML__keyboard div .rows>ul>li>.w0{width:0}.ML__keyboard div .rows>ul>li>.w5{width:16px}.ML__keyboard div .rows>ul>li>.w15{width:52px}.ML__keyboard div .rows>ul>li>.w20{width:70px}.ML__keyboard div .rows>ul>li>.w50{width:178px}.ML__keyboard div .rows>ul>li.separator{background:transparent;border:none;pointer-events:none}@media only screen and (max-width:560px){.ML__keyboard div .rows>ul>li.if-wide{display:none}}.ML__keyboard div .rows>ul>li.tex-math{font-size:25px}.ML__keyboard div .rows>ul>li.pressed,.ML__keyboard div .rows>ul>li:hover{background:var(--keycap-background-active);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.active,.ML__keyboard div .rows>ul>li.action:active,.ML__keyboard div .rows>ul>li.keycap.active,.ML__keyboard div .rows>ul>li.keycap:active{transform:translateY(-20px) scale(1.4);z-index:calc(var(--ML_keyboard-zindex, 105) - 5);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.modifier.active,.ML__keyboard div .rows>ul>li.modifier:active{background:var(--keyboard-text-active);color:var(--keycap-text-active)}.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:18px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:16px}}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton,.ML__keyboard div .rows>ul>li.fnbutton{font-size:12px}}.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:14px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:9px}}.ML__keyboard div .rows>ul>li.action,.ML__keyboard div .rows>ul>li.modifier{background-color:var(--keycap-modifier-background);border-bottom-color:var(--keycap-modifier-border);border-color:var(--keycap-modifier-border) var(--keycap-modifier-border) var(--keycap-modifier-border-bottom);font-size:65%;font-weight:100}.ML__keyboard div .rows>ul>li.action.selected,.ML__keyboard div .rows>ul>li.modifier.selected{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.selected.active,.ML__keyboard div .rows>ul>li.action.selected.pressed,.ML__keyboard div .rows>ul>li.action.selected:active,.ML__keyboard div .rows>ul>li.action.selected:hover,.ML__keyboard div .rows>ul>li.modifier.selected.active,.ML__keyboard div .rows>ul>li.modifier.selected.pressed,.ML__keyboard div .rows>ul>li.modifier.selected:active,.ML__keyboard div .rows>ul>li.modifier.selected:hover{color:#fff}.ML__keyboard div .rows>ul>li.keycap.w50{font-size:80%;padding-top:10px;font-weight:100}.ML__keyboard div .rows>ul>li small{color:#555}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li small{font-size:9px}}.ML__keyboard div .rows>ul>li aside{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:10px;line-height:10px;color:#666}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li aside{display:none}}@media only screen and (max-width:414px){.ML__keyboard div .rows>ul>li{width:29px;margin-right:2px}.ML__keyboard div .rows>ul>.w5{width:13.5px}.ML__keyboard div .rows>ul>.w15{width:44.5px}.ML__keyboard div .rows>ul>.w20{width:60px}.ML__keyboard div .rows>ul>.w50{width:153px}}@media only screen and (min-width:415px) and (max-width:768px){.ML__keyboard div .rows>ul>li{width:37px;margin-right:3px}.ML__keyboard div .rows>ul>.w5{width:17px}.ML__keyboard div .rows>ul>.w15{width:57px}.ML__keyboard div .rows>ul>.w20{width:77px}.ML__keyboard div .rows>ul>.w50{width:197px}}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:51px;margin-right:4px}.ML__keyboard div .rows>ul>.w5{width:23.5px}.ML__keyboard div .rows>ul>.w15{width:78.5px}.ML__keyboard div .rows>ul>.w20{width:106px}.ML__keyboard div .rows>ul>.w50{width:271px}}@media only screen and (min-width:1025px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:66px;margin-right:6px}.ML__keyboard div .rows>ul>.action,.ML__keyboard div .rows>ul>.modifier{font-size:80%}.ML__keyboard div .rows>ul>.w5{width:30px}.ML__keyboard div .rows>ul>.w15{width:102px}.ML__keyboard div .rows>ul>.w20{width:138px}.ML__keyboard div .rows>ul>.w50{width:354px}}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}div.ML__keyboard.material{--keyboard-background:rgba(209,213,217,0.9);--keyboard-background-border:#ddd;--keycap-background:transparent;--keycap-background-active:#cccfd1;--keycap-background-border:transparent;--keyboard-alternate-background:#efefef;--keyboard-alternate-text:#000;font-family:Roboto,sans-serif}div.ML__keyboard.material.alternate-keys{background:var(--keyboard-alternate-background);border:1px solid transparent;border-radius:5px;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}div.ML__keyboard.material.alternate-keys ul li.active,div.ML__keyboard.material.alternate-keys ul li.pressed,div.ML__keyboard.material.alternate-keys ul li:active,div.ML__keyboard.material.alternate-keys ul li:hover{border:1px solid transparent;background:#5f97fc;color:#fff;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>div{font-size:16px}div.ML__keyboard.material .keyboard-toolbar div.div.active,div.ML__keyboard.material .keyboard-toolbar div.div.pressed,div.ML__keyboard.material .keyboard-toolbar div div:active,div.ML__keyboard.material .keyboard-toolbar div div:hover{color:#5f97fc;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>.selected{color:#5f97fc;fill:currentColor;border-bottom:2px solid #5f97fc;margin-bottom:8px;padding-bottom:0}div.ML__keyboard.material div>.rows>ul>.keycap{background:transparent;border:1px solid transparent;border-radius:5px;color:var(--keycap-text);fill:currentColor;transition:none}div.ML__keyboard.material div>.rows>ul>.keycap.tt{color:#5f97fc}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]{margin-top:10px;margin-bottom:10px;height:20px;background:#e0e0e0}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].pressed,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:hover{background:#d0d0d0;box-shadow:none;transform:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):hover{border:1px solid transparent;background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{background:var(--keyboard-alternate-background);color:var(--keyboard-alternate-text);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);font-size:10px;vertical-align:top;width:19.5px;margin-right:10px;margin-left:10px;transform:translateY(-20px) scale(2);transition:none;justify-content:flex-start;padding:2px 0 0;z-index:calc(var(--ML_keyboard-zindex, 105) - 5)}}@media only screen and (max-width:414px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{width:16.5px}}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:last-child.active,div.ML__keyboard.material div>.rows>ul>.keycap:last-child:active{margin-right:0;margin-left:14px}}div.ML__keyboard.material div div.rows ul li.action,div.ML__keyboard.material div div.rows ul li.modifier{background:transparent;border:0;color:#869096;fill:currentColor;font-size:16px;transition:none}div.ML__keyboard.material div div.rows ul li.action.selected,div.ML__keyboard.material div div.rows ul li.modifier.selected{color:#5f97fc;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.action.active,div.ML__keyboard.material div div.rows ul li.action.pressed,div.ML__keyboard.material div div.rows ul li.action:active,div.ML__keyboard.material div div.rows ul li.action:hover,div.ML__keyboard.material div div.rows ul li.modifier.active,div.ML__keyboard.material div div.rows ul li.modifier.pressed,div.ML__keyboard.material div div.rows ul li.modifier:active,div.ML__keyboard.material div div.rows ul li.modifier:hover{border:0;color:var(--keycap-text);background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div div.rows ul li.bigfnbutton,div.ML__keyboard.material div div.rows ul li.fnbutton{background:transparent;border:0}div.ML__keyboard.material div div.rows ul li.bigfnbutton.selected,div.ML__keyboard.material div div.rows ul li.fnbutton.selected{color:#5f97fc;fill:currentColor;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.bigfnbutton.active,div.ML__keyboard.material div div.rows ul li.bigfnbutton.pressed,div.ML__keyboard.material div div.rows ul li.bigfnbutton:active,div.ML__keyboard.material div div.rows ul li.bigfnbutton:hover,div.ML__keyboard.material div div.rows ul li.fnbutton.active,div.ML__keyboard.material div div.rows ul li.fnbutton.pressed,div.ML__keyboard.material div div.rows ul li.fnbutton:active,div.ML__keyboard.material div div.rows ul li.fnbutton:hover{border:0;color:#5f97fc;fill:currentColor;background:var(--keycap-background-active);box-shadow:none}@media (prefers-color-scheme:dark){body:not([theme=light]) div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}'),Qa["foreground-color"]=[];for(const e of ge)Qa["foreground-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"color":"'+e+'"}]'});Qa["background-color"]=[];for(const e of fe)Qa["background-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"backgroundColor":"'+e+'"}]'});Ja={...Qa},Object.keys(Ja).forEach(e=>{Ja[e]=Ja[e].slice()});for(let e=0;e<26;e++){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[e];Ja[t]||(Ja[t]=[]),Ja[t].unshift({latex:"\\mathbb{"+t+"}",aside:"blackboard",insert:"\\mathbb{"+t+"}"}),Ja[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Ja[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Ja[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Ja[t].unshift({latex:"\\mathcal{"+t+"}",aside:"calligraphy",insert:"\\mathcal{"+t+"}"}),Ja[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<=26;e++){const t="abcdefghijklmnopqrstuvwxyz"[e];Ja[t]||(Ja[t]=[]),Ja[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Ja[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Ja[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Ja[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<10;e++){const t="0123456789"[e];Ja[t]||(Ja[t]=[]),Ja[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Ja[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Ja[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Ja[t].unshift({latex:"\\mathcal{"+t+"}",aside:"script",insert:"\\mathcal{"+t+"}"}),Ja[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}let n=e.config.virtualKeyboards;n||(n="all"),n=n.replace(/\ball\b/i,"numeric functions symbols roman greek");const o={...er,...null!==(i=e.config.customVirtualKeyboardLayers)&&void 0!==i?i:{}},s={...Za,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}},l=n.replace(/\s+/g," ").split(" ");for(const t of l){if(!s[t])break;let i=s[t].layers||[];s[t].layer&&i.push(s[t].layer),i=Array.from(new Set(i));for(const a of i){if(!o[a])break;if("object"==typeof o[a]){let e="";if(o[a].styles&&(e+=``),o[a].backdrop&&(e+=`
    `),o[a].container&&(e+=`
    `),o[a].rows){e+="
    ";for(const t of o[a].rows){e+="
      ";for(const i of t)e+="${i.label?i.label:""}`;e+="
    "}e+="
    "}o[a].container&&(e+="
    "),o[a].backdrop&&(e+="
    "),o[a]=e}r+="
    ",r+=ir(e,n,t);const i="function"==typeof o[a]?o[a]():o[a];r+=rr(e,i),r+="
    "}}const c=document.createElement("div");c.className="ML__keyboard",t?c.classList.add(t):e.config.virtualKeyboardTheme&&c.classList.add(e.config.virtualKeyboardTheme),c.innerHTML=e.config.createHTML(r),ar(e,[].slice.call(c.querySelectorAll(".keycap, .action, .fnbutton, .bigfnbutton")));const d=c.getElementsByClassName("layer-switch");for(let t=0;t{e.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),e.addEventListener("touchstart",e=>{e.preventDefault(),e.stopPropagation()},{passive:!1})}),m[0].classList.add("is-visible"),window.addEventListener("mouseup",(function(){nr(),or(e)})),window.addEventListener("blur",(function(){nr(),or(e)})),window.addEventListener("touchend",(function(){nr(),or(e)})),window.addEventListener("touchcancel",(function(){nr(),or(e)})),c}(e,t),pi(e.virtualKeyboard,"touchstart:passive mousedown",()=>{e.$focus()}),document.body.appendChild(e.virtualKeyboard)),window.setTimeout(()=>{e.virtualKeyboard.classList.add("is-visible")},1)):e.virtualKeyboard&&e.virtualKeyboard.classList.remove("is-visible"),"function"==typeof e.config.onVirtualKeyboardToggle&&e.config.onVirtualKeyboardToggle(e,e.virtualKeyboardVisible,e.virtualKeyboard),!1}Gi({showAlternateKeys:(e,t,i)=>{const a=hi("mathlive-alternate-keys-panel","ML__keyboard alternate-keys");e.virtualKeyboard.classList.contains("material")&&a.classList.add("material"),i.length>=7?a.style.width="286px":4===i.length||2===i.length?a.style.width="146px":1===i.length?a.style.width="86px":a.style.width="146px",a.style.height="auto";let r="";for(const e of i)r+="";r="
      "+r+"
    ",a.innerHTML=e.config.createHTML(r),ar(e,[].slice.call(a.getElementsByTagName("li")),"performAlternateKeys");const n=e.virtualKeyboard.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys="'+t+'"]').getBoundingClientRect();if(n){n.top-a.clientHeight<0&&(a.style.width="auto",i.length<=6?a.style.height="56px":i.length<=12?a.style.height="108px":a.style.height="205px");const e=(n.top-a.clientHeight+5).toString()+"px",t=Math.max(0,Math.min(window.innerWidth-a.offsetWidth,(n.left+n.right-a.offsetWidth)/2))+"px";a.style.transform="translate("+t+","+e+")",a.classList.add("is-visible")}return!1}},{target:"virtual-keyboard"}),Gi({shiftKeyboardLayer:e=>{const i=e.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(i)for(let a=0;anr(),performAlternateKeys:(e,t)=>(nr(),e.$perform(t)),switchKeyboardLayer:(e,t)=>lr(e,t),unshiftKeyboardLayer:e=>or(e),insertAndUnshiftKeyboardLayer:(e,t)=>(e.$insert(t),or(e),!0)},{target:"virtual-keyboard"}),Gi({toggleVirtualKeyboardAlt:e=>{let t=!1;return e.virtualKeyboard&&(t=e.virtualKeyboard.classList.contains("material"),e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),cr(e,t?"":"material"),!1},toggleVirtualKeyboardShift:e=>{var t,i;e.config.virtualKeyboardLayout={qwerty:"azerty",azerty:"qwertz",qwertz:"dvorak",dvorak:"colemak",colemak:"qwerty"}[e.config.virtualKeyboardLayout];const a=null!==(i=null===(t=e.virtualKeyboard)||void 0===t?void 0:t.querySelector("div.keyboard-layer.is-visible").id)&&void 0!==i?i:"";return e.virtualKeyboard&&(e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),cr(e),a&&lr(e,a),!1}},{target:"virtual-keyboard"}),Gi({toggleVirtualKeyboard:(e,t)=>mr(e,t),hideVirtualKeyboard:e=>dr(e),showVirtualKeyboard:(e,t)=>cr(e,t)},{target:"virtual-keyboard"});var pr='.ML__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__base{visibility:inherit;display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--ml_text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__mathlive{display:inline-block;line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-family:KaTeX_Main;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em;box-sizing:content-box}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .stretchy{display:block;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;position:absolute;width:50.2%;overflow:hidden}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;position:absolute;left:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-2-of-3{display:inline-flex;position:absolute;left:25%;width:50%;overflow:hidden}.ML__mathlive .slice-3-of-3{display:inline-flex;position:absolute;right:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-1-of-1{display:inline-flex;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .op-over-under{position:relative}.ML__mathlive .op-over-under>.vlist>span:first-child,.ML__mathlive .op-over-under>.vlist>span:last-child{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{font-family:KaTeX_Main;width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__placeholder{opacity:.7;padding-left:.4ex;padding-right:.4ex;padding-top:.4ex}';const ur="Nothing",hr="Group",fr="Multiply",gr="Power",yr="Divide",br="Add",vr="Negate";function xr(e,t){return e[t]&&!("isConstant"in e[t])?e[t]:null}const kr={arithmetic:{PI:{wikidata:"Q167",isConstant:!0,domain:"R+"},Abs:{wikidata:"Q3317982",isPure:!0,isListable:!0,isIdempotent:!0},Add:{wikidata:"Q32043",isAssociative:!0,isCommutative:!0,isListable:!0,isIdempotent:!0,isPure:!0},Chop:{isAssociative:!0,isListable:!0,isPure:!0,isIdempotent:!0},Ceil:{isPure:!0},Equal:{wikidata:"Q842346",isPure:!0},E:{isConstant:!0,value:{num:"2.7182818284590452354"}},Exp:{isPure:!0},Exp2:{isPure:!0},Exp10:{isPure:!0},Erf:{isPure:!0},Erfc:{isPure:!0},ExpMinusOne:{isPure:!0},Factorial:{wikidata:"Q120976",isPure:!0},Floor:{isPure:!0},Gamma:{isPure:!0},LogGamma:{isPure:!0},Log:{isPure:!0},Log2:{isPure:!0},Log10:{isPure:!0},LogOnePlus:{isPure:!0},MachineEpsilon:{isConstant:!0,value:{num:"2.220446049250313e-16"}},Multiply:{wikidata:"Q40276",isAssociative:!0,isCommutative:!0,isIdempotent:!0,isPure:!0},NotEqual:{wikidata:"Q28113351",isCommutative:!0,isPure:!0},Negate:{wikidata:"Q715358",isPure:!0},Power:{wikidata:"Q33456",isCommutative:!1,isPure:!0},Round:{isPure:!0},SignGamma:{isPure:!0},Sqrt:{isPure:!0},Root:{isCommutative:!1,isPure:!0},Subtract:{wikidata:"Q32043",isCommutative:!1,isPure:!0}},algebra:{},calculus:{},combinatorics:{},complex:{},core:{Evaluate:{},Group:{domain:"expression",isListable:!0,isPure:!1},Latex:{domain:"string",isListable:!1,isPure:!0},String:{domain:"string",isListable:!0,isPure:!0}},dimensions:{},lists:{},logic:{},inequalities:{},intervals:{},"linear-algebra":{},numeric:{},other:{},polynomials:{},physics:{"mu-0":{isConstant:!0,wikidata:"Q1515261",domain:"R+",value:125663706212e-17,unit:[fr,"H",[gr,"m",-1]]}},quantifiers:{},relations:{},rounding:{},sets:{CartesianProduct:{wikidata:"Q173740"},Intersection:{wikidata:"Q185359"},Complement:{wikidata:"Q242767"},Union:{wikidata:"Q185359"},SymmetricDifference:{wikidata:"Q1147242"}},statistics:{},transcendentals:{},trigonometry:{Arcosh:{isPure:!0},Arccos:{isPure:!0},Arcsin:{isPure:!0},Arctan:{isPure:!0},Arctan2:{isPure:!0},Arsinh:{isPure:!0},Artanh:{isPure:!0},Cos:{isPure:!0},Degrees:{isConstant:!0,value:{num:"0.017453292519943295769236907"}},FromPolarCoordinates:{isPure:!0},Haversine:{isPure:!0},Hypot:{isPure:!0},InverseHaversine:{isPure:!0},Sin:{isPure:!0},Sinh:{isPure:!0},Tan:{isPure:!0},Tanh:{isPure:!0},ToPolarCoordinates:{isPure:!0}},units:{}},_r={precision:15,decimalMarker:".",groupSeparator:"\\,",exponentProduct:"\\cdot",beginExponentMarker:"10^{",endExponentMarker:"}",arcSeparator:"\\,",notation:"auto",imaginaryNumber:"\\imaginaryI",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},wr={..._r,invisibleOperator:fr,skipSpace:!0,parseArgumentsOfUnknownLatexCommands:!0,parseNumbers:!0,promoteUnknownSymbols:/^[a-zA-Z]$/,promoteUnknownFunctions:/^[fg]$/,invisiblePlusOperator:br,preserveLatex:!1,dictionary:[]},Mr={..._r,invisibleMultiply:"",invisiblePlus:"",multiply:"\\times",dictionary:[]};function Sr(e){return Boolean(e)&&"object"==typeof e&&"num"in e}function zr(e){return Boolean(e)&&"object"==typeof e&&"sym"in e}function Lr(e){return Boolean(e)&&"object"==typeof e&&"fn"in e}function Ar(e){return"number"==typeof e?e:Sr(e)?parseFloat(e.num):Dr(e)===vr?-Ar(Nr(e,1)):NaN}function qr(e){if("number"==typeof e)return[e,1];if(Sr(e))return[Ar(e),1];if(Cr(e))return[NaN,NaN];const t=Dr(e);if(t===gr){const t=Ar(Nr(e,2));return 1===t?[Ar(Nr(e,1)),1]:-1===t?[1,Ar(Nr(e,1))]:[NaN,NaN]}return t===yr?[Ar(Nr(e,1)),Ar(Nr(e,2))]:t===fr&&Dr(Nr(e,2))===gr&&-1===Ar(Nr(Nr(e,2),2))?[Ar(Nr(e,1)),Ar(Nr(Nr(e,2),1))]:[NaN,NaN]}function $r(e){return Array.isArray(e)?e[0]:Lr(e)?e.fn[0]:null}function Cr(e){return null===e||!Array.isArray(e)&&("object"!=typeof e||!("fn"in e))}function Dr(e){const t=$r(e);return"string"==typeof t?t:""}function Tr(e){return"string"==typeof e?e:zr(e)?e.sym:null}function Er(e){return Array.isArray(e)?e.slice(1):Lr(e)?e.fn.slice(1):[]}function Kr(e,t){return Array.isArray(e)?e.map((e,i)=>0===i?e:t(e)):Lr(e)?e.fn.map((e,i)=>0===i?e:t(e)):e}function Nr(e,t){return Array.isArray(e)?e[t]:Lr(e)?e.fn[t]:null}function Or(e){return Array.isArray(e)?Math.max(0,e.length-1):Lr(e)?Math.max(0,e.fn.length-1):0}function Br(e,t){var i;let a=e;for(let e=0;e{const r=f(y(t,"variant").map(t=>{let r=t[0].variant;if(t[0].variantStyle&&"up"!==t[0].variantStyle&&(r+="-"+t[0].variantStyle),t.every(t=>{const i=re(t.symbol,e.mode,null);if(!i||!i.variant&&!i.variantStyle)return!1;let a=t.variant;return t.variantStyle&&"up"!==t.variantStyle&&(a+="-"+t.variantStyle),a===r}))return f(t.map(e=>e.toLatex(i)));let n="";return r&&r!==a&&(n={calligraphic:"\\mathcal{",fraktur:"\\mathfrak{","double-struck":"\\mathbb{",script:"\\mathscr{",monospace:"\\mathtt{","sans-serif":"\\mathsf{",normal:"\\mathrm{","normal-italic":"\\mathit{","normal-bold":"\\mathbf{","normal-bolditalic":"\\mathbfit{",ams:"","ams-italic":"\\mathit{","ams-bold":"\\mathbf{","ams-bolditalic":"\\mathbfit{",main:"","main-italic":"\\mathit{","main-bold":"\\mathbf{","main-bolditalic":"\\mathbfit{"}[r]),n+f(t.map(e=>e.toLatex(i)))+(n?"}":"")}));return!t[0].color||e&&e.color===t[0].color?r:"\\textcolor{"+ve(t[0].color)+"}{"+r+"}"}))},applyStyle:function(e,t){const i="auto"!==t.letterShapeStyle&&t.letterShapeStyle?t.letterShapeStyle:"tex";let a=t.variant||"normal",r=t.variantStyle||"";"normal"===a&&!r&&/\u00a3|\u0131|\u0237/.test(e.body)&&(a="main",r="italic"),"normal"!==a||r||1!==e.body.length||Ir.forEach((t,a)=>{t.test(e.body)&&"it"===Hr[i][a]&&(r="italic")}),"up"===r&&(r="");const n=r?a+"-"+r:a,[o,s]=Fr[n];return Pr[a]&&!Pr[a].test(e.body)?(e.body=Q(e.body,a,r),e.variant="",e.variantStyle="",null):(Rr.test(e.body)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),o)}});const Wr={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"};v("text",{emitLatexRun:function(e,t,i){const a=function(e,t,i){return f(y(t,"color").map(t=>{const i=function(e,t,i){return function(e,t,i){return f(y(t,"fontFamily").map(e=>{const t=function(e,t,i){return f(y(t,"fontSize").map(e=>{const t=function(e,t,i){return f(y(t,"fontSeries").map(e=>{const t=function(e,t,i){return f(y(t,"fontShape").map(e=>{const t=function(e,t,i){let a=!1;return f(t.map(e=>{let t="",i="";return e.latex?t=e.latex:"string"==typeof e.body?t=ee("text",e.body):e.symbol&&(t=e.symbol.replace(/\\/g,"\\backslash ")),!a||t&&!/^[a-zA-Z0-9*]/.test(t)||(i="{}"),a=/\\[a-zA-Z0-9]+\*?$/.test(t),i+t}))}(0,e);return"it"===e[0].fontShape?"\\textit{"+t+"}":"sl"===e[0].fontShape?"\\textsl{"+t+"}":"sc"===e[0].fontShape?"\\textsc{"+t+"}":"n"===e[0].fontShape?"\\textup{"+t+"}":e[0].fontShape?"\\fontshape{"+e[0].fontShape+"}"+t:t}))}(0,e);return"b"===e[0].fontSeries?"\\textbf{"+t+"}":"l"===e[0].fontSeries?"\\textlf{"+t+"}":"m"===e[0].fontSeries?"\\textmd{"+t+"}":e[0].fontSeries?"\\fontseries{"+e[0].fontSeries+"}"+t:t}))}(0,e),i={size1:"tiny",size2:"scriptsize",size3:"footnotesize",size4:"small",size5:"normalsize",size6:"large",size7:"Large",size8:"LARGE",size9:"huge",size10:"Huge"}[e[0].fontSize]||"";return i?"\\"+i+" "+t:t}))}(0,e),i={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[e[0].fontFamily]||"";return i?"\\"+i+"{"+t+"}":e[0].fontFamily?"\\fontfamily{"+e[0].fontFamily+"}"+t:t}))}(0,t)}(0,t);return!t[0].color||"none"===t[0].color||e&&e.color===t[0].color?i:"\\textcolor{"+ve(t[0].color)+"}{"+i+"}"}))}(e,t);return t.every(e=>e.fontSeries||e.fontShape||e.fontFamily)&&t[0].mode===e.mode?a:`\\text{${a}}`},applyStyle:function(e,t){const i=t.fontFamily;if(Wr[i]?e.classes+=" "+Wr[i]:i&&e.setStyle("font-family",i),t.fontShape&&(e.classes+=" "+({it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape]||"")),t.fontSeries){const i=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);i&&(e.classes+=" "+({ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[i[1]||""]||""),e.classes+=" "+({uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[i[2]||""]||""))}return"Main-Regular"},parse:(e,t,i)=>function(e,t,i){let a,r=[];for(;e.length>0;){const n=e.shift();if(""===n)a=new Be("text",""," ",i.style),a.symbol=" ",r.push(a);else if("\\"===n[0]){let t;e.unshift(n),[t,e]=i.parse("text",e,i),r=[...r,...t]}else if(1===n.length){const e=re(n,"text",i.macros);!e||e.mode&&!e.mode.includes("text")?t({code:"unexpected-token"}):(a=new Be("text",e?e.type:"",e?e.value:n,i.style),a.symbol=n,a.latex=X("text",n),r.push(a))}else if("<$>"===n||"<$$>"===n){const t=e.slice(0,e.findIndex(e=>e===n));e=e.slice(t.length+1);const[a]=i.parse("math",t,i);r=[...r,...a]}else"<{>"===n||"<}>"===n||t({code:"unexpected-token",arg:n})}return[r,e]}(e,t,i)[0]}),me(["ce","pu"],"{chemformula:balanced-string}",null,(e,t)=>({type:"group",mode:"chem",body:et(Ur.go(Vr.go(t[0],"\\pu"===e?"pu":"ce"))),latexOpen:"\\"+e+"{",latexClose:"}"}));var Vr={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var i,a="0",r={parenthesisLevel:0};e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var n=10,o=[];;){i!==e?(n=10,i=e):n--;var s=Vr.stateMachines[t],l=s.transitions[a]||s.transitions["*"];e:for(var c=0;c0))return o;if(m.revisit||(e=d.remainder),!m.toContinue)break e}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var i=0;i":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return Vr.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return Vr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return Vr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return Vr.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return Vr.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return Vr.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.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))/))return{match_:t[0],remainder:e.substr(t[0].length)};var i=Vr.patterns.findObserveGroups(e,"","$","$","");return i&&(t=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,i,a,r,n,o,s,l,c){var d=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var i=e.match(t);return i?i[0]:null},m=d(e,t);if(null===m)return null;if(e=e.substr(m.length),null===(m=d(e,i)))return null;var p=function(e,t,i){for(var a=0;t":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var i;if((e.d||"").match(/^[0-9]+$/)){var a=e.d;e.d=void 0,i=this.output(e),e.b=a}else i=this.output(e);return Vr.actions["o="](e,t),i},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var i=[];return Vr.concatArray(i,this.output(e)),Vr.concatArray(i,Vr.actions.bond(e,t,"-")),i}e.d=t},"- after o/d":function(e,t,i){var a=Vr.patterns.match_("orbital",e.o||""),r=Vr.patterns.match_("one lowercase greek letter $",e.o||""),n=Vr.patterns.match_("one lowercase latin letter $",e.o||""),o=Vr.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(a&&""===a.remainder||r||n||o);!s||e.a||e.b||e.p||e.d||e.q||a||!n||(e.o="$"+e.o+"$");var l=[];return s?(Vr.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(a=Vr.patterns.match_("digits",e.d||""),i&&a&&""===a.remainder?(Vr.concatArray(l,Vr.actions["d="](e,t)),Vr.concatArray(l,this.output(e))):(Vr.concatArray(l,this.output(e)),Vr.concatArray(l,Vr.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:Vr.go(t,"o")}},comma:function(e,t){var i=t.replace(/\s*$/,"");return i!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(e,t,i){var a,r,n;for(var o in e.r?(r="M"===e.rdt?Vr.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:Vr.go(e.rd),n="M"===e.rqt?Vr.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:Vr.go(e.rq),a={type_:"arrow",r:e.r,rd:r,rq:n}):(a=[],(e.a||e.b||e.p||e.o||e.q||e.d||i)&&(e.sb&&a.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===i?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&Vr.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),a.push({type_:"chemfive",a:Vr.go(e.a,"a"),b:Vr.go(e.b,"bd"),p:Vr.go(e.p,"pq"),o:Vr.go(e.o,"o"),q:Vr.go(e.q,"pq"),d:Vr.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType}))),e)"parenthesisLevel"!==o&&"beginsWithBond"!==o&&delete e[o];return a},"oxidation-output":function(e,t){var i=["{"];return Vr.concatArray(i,Vr.go(t,"oxidation")),i.push("}"),i},"frac-output":function(e,t){return{type_:"frac-ce",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Vr.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,i){return{type_:"operator",kind_:i||t}}}},a:{transitions:Vr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Vr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var i in e)delete e[i];return t}}}},pq:{transitions:Vr.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:Vr.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Vr.go(t[1],"pq")}}}},bd:{transitions:Vr.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Vr.go(t[1],"bd")}}}},oxidation:{transitions:Vr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"tex-math tight":{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"9,9":{transitions:Vr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),t[1]&&(Vr.concatArray(i,Vr.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?Vr.concatArray(i,Vr.go(t[2],"pu-9,9")):i.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?i.push({type_:"cdot"}):i.push({type_:"times"}))),t[3]&&i.push("10^{"+t[5]+"}"),i},"number^":function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),Vr.concatArray(i,Vr.go(t[1],"pu-9,9")),i.push("^{"+t[2]+"}"),i},operator:function(e,t,i){return{type_:"operator",kind_:i||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,i=Vr.patterns.match_("{(...)}",e.d||"");i&&""===i.remainder&&(e.d=i.match_);var a=Vr.patterns.match_("{(...)}",e.q||"");if(a&&""===a.remainder&&(e.q=a.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:Vr.go(e.d,"pu"),q:Vr.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:r.d,p2:r.q}:(t=r.d,r.d.length>1||r.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),Vr.concatArray(t,r.q))}else t=Vr.go(e.d,"pu-2");for(var n in e)delete e[n];return t}}},"pu-2":{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var i=Vr.patterns.match_("{(...)}",e.rm||"");t=i&&""===i.remainder?Vr.go(i.match_,"pu"):{type_:"rm",p1:e.rm}}for(var a in e)delete e[a];return t}}},"pu-9,9":{transitions:Vr.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var i=e.text_.length%3;0===i&&(i=3);for(var a=e.text_.length-3;a>0;a-=3)t.push(e.text_.substr(a,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,i)),t.reverse()}else t.push(e.text_);for(var r in e)delete e[r];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var i=e.text_.length-3,a=0;a":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function jr(e,t){return t>1?"solidus":"radical"}function Gr(e,t,i,a){if(i>=20)return[e,null];let r=[],n=[null!=e?e:ur],o=!1;for(;!o;){t.skipSpace();const e=t.matchExpression(20);null===e?(t.skipSpace(),t.match(",")?n.push(ur):o=!0):("Sequence"===Dr(e)?n=n.concat(Er(e)):n.push(e),t.skipSpace(),t.match(",")?t.skipSpace():t.match(";")?(r.push(["Subsequence",...n]),n=[]):o=!0)}return 0===r.length?r=n:r.push(["Subsequence",...n]),[null,["Subsequence",...r]]}function Xr(e,t){return"Sequence"===Dr(t)&&Er(t).some(e=>"Subsequence"===Dr(e))?Er(t).map(t=>e.emit(t)).join("; "):Er(t).map(t=>e.emit(t)).join(", ")}function Zr(e,t){const i=Jr(e),a=Jr(t);if(ia)return 1;let r=tn(e);isNaN(r)&&(r=Number(1/0));let n=tn(t);if(isNaN(n)&&(n=Number(1/0)),rn)return 1;const o=en(e),s=en(t);if(o===s)for(let i=1;i<=o;i++){const a=Zr(Nr(e,i),Nr(t,i));if(0!==a)return a}return s-o}function Yr(e,t){if(0===e)return-1/0;const i=Dr(e);if(i===gr){const t=Ar(Nr(e,2));return isFinite(t)?t:0}if(i===fr){let i=0;return Er(e).forEach(e=>{i+=Yr(e,t)}),i}return t.includes(Tr(e))?1:0}function Qr(e,t){const i=Dr(e);if(i===gr){if(Tr(Nr(e,1))===t){const t=Ar(Nr(e,2));if(isFinite(t))return t}return 0}if(i===fr){let i=0;for(const a of Er(e))i+=Qr(a,t);return i}return Tr(e)===t?1:0}function Jr(e){return $r(e)?Er(e).map(Jr).join(" "):"string"==typeof e?e:zr(e)?e.sym:""}function en(e){return $r(e)?Er(e).map(en).reduce((e,t)=>e+t,0):"string"==typeof e||Tr(e)?1:0}function tn(e){return $r(e)?NaN:"number"==typeof e?e:Sr(e)?Ar(e):0}function an(e){const t=$r(e);return t?t===hr&&1===Or(e)?an(Nr(e,1)):Kr(e,an):e}function rn(e){if(null===e)return null;const t=$r(e=an(e));return t===gr&&2===Or(e)?[gr,Nr(e,1),nn(Nr(e,2))]:t===yr&&2===Or(e)?[fr,[gr,Nr(e,1),-1],Nr(e,2)]:[gr,e,-1]}function nn(e){if(null===e)return e;if("number"==typeof(e=an(e)))e=-e;else if(e&&Sr(e))e="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num};else{const t=Dr(e),i=Or(e);if(t===vr&&1===i)return Nr(e,1);if(t===fr){let t=Nr(e,1);return t="number"==typeof t?-t:Sr(t)?"-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}:[vr,t],[fr,t,...Er(e).slice(1)]}if(t===hr&&1===i)return nn(Nr(Nr(e,1),1));e=[vr,e]}return e}function on(e,t){const i=$r(e);if(!i)return e;if(e=Kr(e,e=>on(e,t)),i!==t)return e;const a=Er(e);let r=[];for(let e=0;esn(e,t));let a=Er(t=on(an(t),br));a=a.map(t=>sn(e,t)).filter(e=>0!==Ar(e));const r=a.length;return 0===r?0:1===r?a[0]:[br,...a]}function ln(e,t){const i=$r(t);if(!i)return t;if(i!==yr)return Kr(t,t=>ln(e,t));if(2!==Or(t))return t;const a=ln(e,Nr(t,1)),r=ln(e,Nr(t,2));return 1===Ar(r)?a:[fr,a,rn(r)]}function cn(e,t){const i=$r(t);return i?"Exp"!==i?Kr(t,t=>cn(e,t)):1!==Or(t)?t:[gr,"E",cn(e,Nr(t,1))]:t}function dn(e,t){var i;if(Cr(t))return t;const a=Dr(t),r="List"===a,n=xr(e,a),o=null!==(i=null==n?void 0:n.sequenceHold)&&void 0!==i&&i,s=Er(t),l=[];for(let i of s){i=dn(e,i);const a=Dr(i);if("Identity"===a){const e=Nr(i,1);null!=e&&l.push(e)}else if(a===ur)r||l.push(i);else if("Sequence"!==a||o)l.push(i);else{const e=$r(t);for(const t of Er(i))"Subsequence"===Dr(t)?l.push([e,...Er(t)]):l.push(t)}}return[$r(t),...l]}function mn(e){const t=Dr(e);if("Sqrt"===t)return 2;if("Root"===t)return Ar(Nr(e,2));if(t!==gr)return 1;const i=Nr(e,2);if(!i)return 1;if(Dr(i)===gr&&-1===Ar(Nr(i,2))){const e=Ar(Nr(i,1));if(isFinite(e))return e}return 1}function pn(e,t){const i=$r(t);if(!i)return t;if(t=Kr(t,t=>pn(e,t)),i!==fr)return t;t=on(an(t),fr);const[a,r]=function(e){const t=Er(e),i=[],a=[];for(const e of t)2===mn(e)?i.push(Nr(e,1)):a.push(e);return[i,a]}(t);let n;n=0===a.length?r:1===a.length?Er(t=[fr,...r,[gr,a[0],[gr,2,-1]]]):Er(t=[fr,...r,[gr,[fr,...a],[gr,2,-1]]]);let o=!1,s=!1;if(n=n.map(e=>{if(Dr(e)===vr)return s=!0,o=!o,Nr(e,1);const t=Ar(e);return t<0?(s=!0,o=!o,-t):e}),o){const e=Ar(n[0]);n=isFinite(e)?Er(on([fr,-e,...n.slice(1)],fr)):Er(on([fr,-1,...n],fr))}else n=Er(on([fr,...n],fr));return n=n.filter(e=>1!==Ar(e)),0===n.length?1:1===n.length?n[0]:[fr,...n]}function un(e,t){const i=$r(t);if(!i)return t;if(i!==gr)return Kr(t,t=>un(e,t));if(2!==Or(t=an(t)))return t;const a=un(e,Nr(t,1)),r=Ar(a),n=Ar(un(e,Nr(t,2)));return 0===n?1:1===n?a:-1===r&&-1===n?-1:1===r&&-1===n||1===r?1:t}function hn(e,t){const i=Dr(t);if(i===vr){const e=Nr(t=an(t),1);if("number"==typeof e)t=-e;else{if(!e||!Sr(e)){if(Dr(e)===fr){let t=Nr(e,1);if("number"==typeof t)t=-t;else{if(!Sr(t))return[fr,-1,t,...Er(e).slice(1)];t="-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}}return[fr,t,...Er(e).slice(1)]}return[fr,-1,e]}if(0===Ar(e))return 0;t="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num}}}else if(i)return Kr(t,t=>hn(e,t));return t}function fn(e,t){if($r(t))return Kr(t,t=>fn(e,t));if("number"==typeof t){if(isNaN(t))return{num:"NaN"};if(!isFinite(t)&&t>0)return{num:"Infinity"};if(!isFinite(t)&&t<0)return{num:"-Infinity"}}else if(Sr(t)){if(isNaN(Number(t.num)))return{num:"NaN"};if(t.num.endsWith("n"))return{num:t.num.slice(0,-1)}}return t}function gn(e,t){const i=$r(t);if(!i)return t;if("Subtract"!==i)return Kr(t,t=>gn(e,t));if(2!==Or(t))return t;const a=gn(e,Nr(t,1)),r=Ar(a),n=gn(e,Nr(t,2)),o=Ar(n);return 0===r&&0===o?0:gn(e,[br,a,nn(n)])}function yn(e,t){const i=$r(t);if(!i)return t;if("Root"!==i&&"Sqrt"!==i)return Kr(t,t=>yn(e,t));if(Or(t)<1)return t;const a=yn(e,Nr(t,1));let r=2;return Or(t)>1&&(r=un(e,Nr(t,2))),1===Ar(r)?a:[gr,a,[yr,1,r]]}function bn(e){const t=Number(e);return"string"==typeof e&&t.toString()===e?isNaN(t)||!isFinite(t)?t.toString():t:e}function vn(e,t){if(null===t)return null;if(Array.isArray(t))return t.map((t,i)=>0===i?t:vn(e,t));if("object"==typeof t)if(1===Object.keys(t).length){if(Sr(t)){const e=bn(t.num);return"number"==typeof e?e:{num:e}}if(Lr(t))return t.fn.map(t=>vn(e,t));if(zr(t))return t.sym}else Lr(t)&&(t.fn=t.fn.map(t=>vn(e,t)));return t}function xn(e,t){if("number"==typeof t||"string"==typeof t)return t;if(Array.isArray(t))return Kr(t,t=>xn(e,t));if("object"==typeof t){if("num"in t){const e=bn(t.num);return"number"==typeof e?e:{num:e}}if("fn"in t)return Kr(t.fn,t=>xn(e,t))}return null}function kn(e,t){const i=function(e,t){const i=new Set;return function e(t,i,a){const r=Er(a);if(r.length>0)r.forEach(a=>e(t,i,a));else{const e=Tr(a);if(e&&!i.has(e)){const a=function(e,t){return e[t]&&"isConstant"in e[t]?e[t]:null}(t,e);a&&a.isConstant||i.add(e)}}}(e,i,t),i}(e,t);return function e(t,i,a){var r;let n=Er(a);if(0===n.length)return a;n=n.map(a=>e(t,i,a));const o=Dr(a);if(o===br)n.sort((e,t)=>function(e,t,i){const a=Yr(e,i),r=Yr(t,i);if(ar)return-1;for(const a of i){const i=Qr(e,a),r=Qr(t,a);if(i!==r)return r-i}const n=Jr(e),o=Jr(t);return n>o?-1:ne(t,i))}(e,function e(t,i){const a=Dr(i),r=xr(t,a);return(null==r?void 0:r.isIdempotent)?on(i,a):Kr(i,i=>e(t,i))}(e,t))}function Mn(e,t,i){let a=t;return i.forEach(t=>{const i={canonical:_n,"canonical-add":sn,"canonical-divide":ln,"canonical-exp":cn,"canonical-list":dn,"canonical-multiply":pn,"canonical-power":un,"canonical-negate":hn,"canonical-number":fn,"canonical-root":yn,"canonical-subtract":gn,full:vn,flatten:wn,sorted:kn,"stripped-metadata":xn}[t];a=i?i(e,a):null}),a}function Sn(e,t,i,a){return a=null!=a?a:2,"solidus"===t?e.wrapShort(i)+"^{1\\/"+e.emit(a)+"}":"quotient"===t?e.wrapShort(i)+"^{\\frac{1}{"+e.emit(a)+"}}":2===Ar(a)?"\\sqrt{"+e.emit(i)+"}":"\\sqrt["+e.emit(a)+"]{"+e.emit(i)+"}"}function zn(e,t,i,a){const r=t.matchOptionalLatexArgument(),n=t.matchRequiredLatexArgument();return null===n?[e,["Sqrt"]]:null!==r?[e,["Root",null!=n?n:ur,r]]:[e,["Sqrt",n]]}function Ln(e,t,i,a){if(2760&&(i=1===r.length&&1===r[0]?0===a.length?"1":1===a.length?e.emit(a[0]):An(e,[fr,...a]):e.emit([yr,1===a.length?a[0]:[fr,...a],1===r.length?r[0]:[fr,...r]])),i)return e.level+=1,i;let n=!1,o=null;const s=Or(t)+1;for(let a=1;a3?"inline-solidus":"quotient";if("inline-solidus"===i||"nice-solidus"===i){const a=e.wrapShort(Nr(t,1)),r=e.wrapShort(Nr(t,2));return"nice-solidus"===i?`^{${a}}\\!\\!/\\!_{${r}}`:`${a}\\/${r}`}return"reciprocal"===i?e.wrap(Nr(t,1))+e.wrap(Nr(t,2))+"^{-1}":"factor"===i?"\\frac{1}{"+e.emit(Nr(t,2))+"}"+e.wrap(Nr(t,1)):"\\frac{"+e.emit(Nr(t,1))+"}{"+e.emit(Nr(t,2))+"}"}function $n(e,t){const i=Nr(t,1),a=Nr(t,2);if(null===a)return e.emit(i);if(null===i)return"";const r=Dr(t);if("Sqrt"===r||"Root"===r)return Sn(e,jr(0,e.level),Nr(t,1),Nr(t,2));const n=Ar(a);if(-1===n)return e.emit([yr,"1",i]);if(n<0)return e.emit([yr,"1",[gr,i,-n]]);if(Dr(a)===yr){if(1===Ar(Nr(a,1)))return Sn(e,jr(0,e.level),i,Nr(a,2))}else if(Dr(a)===gr&&-1===Ar(Nr(a,2)))return Sn(e,jr(0,e.level),i,Nr(a,1));return e.wrapShort(i)+"^{"+e.emit(a)+"}"}function Cn(e,t,i,a){var r;let n=!1,o=0;if(t.skipSpace(),t.match("^")){if(t.skipSpace(),t.match("<{>")){t.skipSpace(),t.match("-")&&t.match("1")&&(n=!0);do{t.match("\\doubleprime")&&(o+=2),t.match("\\prime")&&(o+=1),t.match("'")&&(o+=1)}while(!t.match("<}>")&&!t.atEnd())}let e=!1;for(;!e;)t.skipSpace(),t.match("\\doubleprime")?o+=2:t.match("\\prime")||t.match("'")?o+=1:e=!0}let s=null!==(r={"\\arcsin":"Arcsin","\\arccos":"Arccos","\\arctan":"Arctan","\\arctg":"Arctan","\\arcctg":"Arctan","\\arcsec":"Arcsec","\\arccsc":" Arccsc","\\arsinh":"Arsinh","\\arcosh":"Arcosh","\\artanh":"Artanh","\\arcsech":"Arcsech","\\arccsch":"Arcsch","\\ch":"Cosh","\\cos":"Cos","\\cosec":"Csc","\\cosh":"Csch","\\cot":"Cot","\\cotg":"Cot","\\coth":"Coth","\\csc":"Csc","\\ctg":"Cot","\\cth":"Coth","\\sec":"Sec","\\sin":"Sin","\\sinh":"Sinh","\\sh":"Sinh","\\tan":"Tan","\\tanh":"Tanh","\\tg":"Tan","\\th":"Tanh"}[a])&&void 0!==r?r:a;n&&(s=["InverseFunction",s]),o>=1&&(s=["Derivative",o,s]);const l=t.matchArguments("implicit");return null===l?[null,s]:[null,[s,...l]]}function Dn(e){return Array.isArray(e)?g(e):e}function Tn(e,t){var i,a,r,n,o,s,l,c,d,m,p,u,h,f,g;const y={lookahead:1,name:new Map,prefix:[],infix:[],postfix:[],matchfix:[],superfix:[],subfix:[],symbol:[],environment:new Map};for(const b of e){const e=b;void 0===e.parse&&(e.parse=e.name),"string"==typeof e.trigger&&(e.trigger={symbol:e.trigger}),"string"==typeof e.emit&&void 0!==(null===(i=e.trigger)||void 0===i?void 0:i.symbol)&&/#[0-9]/.test(e.emit)&&t({code:"unexpected-argument",arg:e.name}),void 0===e.emit&&(void 0!==(null===(a=e.trigger)||void 0===a?void 0:a.postfix)?e.emit="#1"+Dn(e.trigger.postfix):void 0!==(null===(r=e.trigger)||void 0===r?void 0:r.prefix)?e.emit=Dn(e.trigger.prefix)+"#1":void 0!==(null===(n=e.trigger)||void 0===n?void 0:n.infix)?e.emit="#1"+Dn(e.trigger.infix)+"#2":void 0!==(null===(o=e.trigger)||void 0===o?void 0:o.symbol)?e.emit=Dn(e.trigger.symbol):void 0!==(null===(s=e.trigger)||void 0===s?void 0:s.superfix)?e.emit="#1^{"+Dn(null===(l=e.trigger)||void 0===l?void 0:l.superfix)+"}":void 0!==(null===(c=e.trigger)||void 0===c?void 0:c.subfix)?e.emit="#1_{"+Dn(null===(d=e.trigger)||void 0===d?void 0:d.subfix)+"}":e.emit=""),void 0!==(null===(m=e.trigger)||void 0===m?void 0:m.infix)&&(void 0===e.precedence&&t({code:"syntax-error",arg:"Infix operators require a precedence"}),e.associativity||(e.associativity="non")),void 0!==(null===(p=e.trigger)||void 0===p?void 0:p.symbol)&&(e.arguments=null!==(u=e.arguments)&&void 0!==u?u:"",e.optionalLatexArg=null!==(h=e.optionalLatexArg)&&void 0!==h?h:0,e.requiredLatexArg=null!==(f=e.requiredLatexArg)&&void 0!==f?f:0),void 0!==(null===(g=e.trigger)||void 0===g?void 0:g.matchfix)&&("function"===e.parse||e.closeFence||t({code:"syntax-error",arg:"Matchfix operators require a close fence or a custom parse function"})),void 0!==e.trigger&&(["infix","prefix","postfix","symbol","matchfix","superfix","subfix"].forEach(t=>{const i=(a=e.trigger[t],Array.isArray(a)?a.length:1);var a;y.lookahead=Math.max(y.lookahead,i),void 0===y[t][i]&&(y[t][i]=new Map),y[t][i].set(Dn(e.trigger[t]),e)}),void 0!==e.trigger.environment&&y.environment.set(e.trigger.environment,e)),e.name&&y.name.set(Dn(e.name),e),void 0!==e.trigger||e.name||t({code:"syntax-error",arg:"Need at least a trigger or a name"})}return y}function En(e="all"){let t;return"all"===e?(t=[],Object.keys(Kn).forEach(e=>{t=[...t,...Kn[e]]})):t=[...Kn[e]],t}const Kn={algebra:[{name:"To",trigger:{infix:"\\to"},precedence:270}],arithmetic:[{trigger:{symbol:"\\infty"},parse:{num:"Infinity"}},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","\\infty"]},emit:"\\tilde\\infty"},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","<{>","\\infty","<}>"]},emit:"\\tilde\\infty"},{name:"PI",trigger:{symbol:"\\pi"}},{name:"PI",trigger:{symbol:"π"},emit:"\\pi"},{name:"E",trigger:{symbol:"e"},emit:"e"},{name:"I",trigger:{symbol:"i"},emit:"\\imaginaryI"},{name:"I",trigger:{symbol:"\\imaginaryI"}},{name:br,trigger:{prefix:"+",infix:"+"},parse:function(e,t,i,a){if(2751&&(r=["List",...r]),[e,["PartialDerivative",a,r,i===ur?1:i]]}return[e,[yr,l,c]]},emit:qn,requiredLatexArg:2},{name:yr,trigger:{infix:"\\/"},emit:qn,associativity:"non",precedence:660},{name:yr,trigger:{infix:"/"},emit:qn,associativity:"non",precedence:660},{name:yr,trigger:{infix:"\\div"},emit:qn,associativity:"non",precedence:660},{name:gr,trigger:{infix:"^"},associativity:"non",precedence:720,emit:$n},{name:gr,trigger:{infix:["*","*"]},associativity:"non",precedence:720,emit:$n},{name:"Sqrt",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:zn,emit:$n},{name:"Root",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:zn},{name:"Norm",trigger:{matchfix:"\\lVert"},closeFence:"\\rVert"},{name:"Norm",trigger:{matchfix:"\\|"},closeFence:"\\|"},{name:"Norm",trigger:{matchfix:["|","|"]},closeFence:["|","|"]},{name:"Abs",trigger:{matchfix:"|"},closeFence:"|"},{name:"Abs",trigger:{matchfix:"\\lvert"},closeFence:"\\rvert"},{name:"Factorial",trigger:{postfix:"!"},precedence:810},{name:"Factorial2",trigger:{postfix:["!","!"]},precedence:810}],calculus:[{trigger:{symbol:"\\int"},parse:function(e,t,i,a){var r;let n=ur,o=ur,s=!1;for(;!s;)t.skipSpace(),t.match("_")?o=t.matchRequiredLatexArgument():t.match("^")?n=t.matchRequiredLatexArgument():s=!0;let l=null;if(t.match("<{>")){const e=t.getIndex();let i=1;for(;!t.atEnd()&&0!==i;)t.match("<{>")?i+=1:t.match("<}>")?i-=1:t.next();l=null!==(r=t.clone(e,t.getIndex()-1).matchExpression())&&void 0!==r?r:""}return[e,["Integral",l,n,o]]},emit:function(e,t){return""}}],core:[{name:"Latex",emit:function e(t,i){if(null===i)return"";const a=$r(i);if(null!==a){const r=Er(i);return"Latex"===a?r.map(i=>e(t,i)).join(""):0===r.length?t.emit(a):t.emit(a)+r.map(e=>"{"+t.emit(e)+"}").join("")}return t.emit(i)}},{name:hr,trigger:{matchfix:"("},parse:(e,t,i,a)=>{const r=t.getIndex();let n=!1,o=!0,s=0,l="";for(;!n&&o;){const e=t.next();t.atEnd()||")"===e?n=!0:/^[0-9a-zA-Z]$/.test(e)?(s=Math.max(s,parseInt(e,36)),l+=e):o=!1}if(t.skipSpace(),o&&t.match("_")){const i=Ar(t.matchRequiredLatexArgument());if(isFinite(i)&&s"Subsequence"===Dr(e));for(const n of Er(t))null!==n&&(a+=i+e.emit(n),i=r?"; ":", ");return e.wrapString(a,(e.level,"paren"))},separator:",",closeFence:")",precedence:20},{name:"List",trigger:{matchfix:"\\lbrack"},separator:",",closeFence:"\\rbrack",precedence:20},{name:"BaseForm",emit:(e,t)=>{const i=Ar(Nr(t,2));if(isFinite(i)&&i>0&&i<=36){const e=Ar(Nr(t,1));if(isFinite(e)){let t=Number(e).toString(i),a=0;if(2===i||10===i?a=4:16===i?a=2:i>16&&(a=4),a>0){const e=t;t="";for(let i=0;i0&&i%a==0&&(t="\\; "+t),t=e[e.length-i-1]+t}return"\\mathtt{"+t+"}_{"+Number(i).toString()+"}"}}return"\\operatorname{BaseForm}("+e.emit(Nr(t,1))+", "+e.emit(Nr(t,2))+")"}},{name:"Set",trigger:{matchfix:"\\lbrace"},separator:",",closeFence:"\\rbrace",precedence:20},{name:"Sequence",trigger:{infix:","},parse:Gr,emit:Xr,precedence:20},{name:"Subsequence",trigger:{infix:";"},parse:Gr,emit:Xr,precedence:20},{name:"Missing",trigger:"\\placeholder",emit:"\\placeholder",requiredLatexArg:1},{name:"Subscript",trigger:{infix:"_"},precedence:720,emit:(e,t)=>2===Or(t)?e.emit(Nr(t,1))+"_{"+e.emit(Nr(t,2))+"}":"_{"+e.emit(Nr(t,1))+"}",parse:(e,t,i,a)=>[null,["Subscript",e,t.matchRequiredLatexArgument()]]},{name:"Superplus",trigger:{superfix:"+"}},{name:"Subplus",trigger:{subfix:"+"}},{name:"Superminus",trigger:{superfix:"-"}},{name:"Subminus",trigger:{subfix:"-"}},{name:"Superstar",trigger:{superfix:"*"}},{name:"Superstar",trigger:{superfix:"\\star"}},{name:"Substar",trigger:{subfix:"*"}},{name:"Substar",trigger:{subfix:"\\star"}},{name:"Superdagger",trigger:{superfix:"\\dagger"}},{name:"Superdagger",trigger:{superfix:"\\dag"}},{name:"Prime",trigger:{superfix:"\\prime"},arguments:"group"},{trigger:{superfix:"\\doubleprime"},parse:e=>[null,["Prime",e,2]],arguments:"group"},{name:"InverseFunction",emit:(e,t)=>e.emit(Nr(t,1))+"^{-1}"},{name:"Derivative",trigger:"D",parse:(e,t)=>[e,["Derivative",1]],emit:(e,t)=>{const i=Ar(Nr(t,1));if(!isFinite(i))return"";const a=e.emit(Nr(t,2));return 1===i?a+"^{\\prime}":2===i?a+"^{\\doubleprime}":a+"^{("+Number(i).toString()+")}"}},{name:"Piecewise",trigger:{environment:"cases"},parse:(e,t)=>[null,["piecewise",t.matchTabular()]],emit:(e,t)=>{if("List"!==Dr(Nr(t,1)))return"";const i=Er(Nr(t,1));let a="",r="";for(const t of i){a+=r;const i=Nr(t,1);if(null!==i){a+=e.emit(i);const r=Nr(t,2);null!==r&&(a+="&"+e.emit(r))}r="\\\\"}return"\\begin{cases}"+a+"\\end{cases}"}}],inequalities:[{name:"NotLess",trigger:{infix:["!","<"]},associativity:"right",precedence:246},{name:"NotLess",trigger:{infix:"\\nless"},associativity:"right",precedence:246},{name:"Less",trigger:{infix:"<"},associativity:"right",precedence:245},{name:"Less",trigger:{infix:"\\lt"},associativity:"right",precedence:245},{name:"LessEqual",trigger:{infix:["<","="]},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\le"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leq"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leqslant"},associativity:"right",precedence:265},{name:"LessNotEqual",trigger:{infix:"\\lneqq"},associativity:"right",precedence:260},{name:"NotLessNotEqual",trigger:{infix:"\\nleqq"},associativity:"right",precedence:260},{name:"LessOverEqual",trigger:{infix:"\\leqq"},associativity:"right",precedence:265},{name:"GreaterOverEqual",trigger:{infix:"\\geqq"},associativity:"right",precedence:265},{name:"Equal",trigger:{infix:"="},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["*","="]},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["\\star","="]},associativity:"right",precedence:260},{name:"PlusEqual",trigger:{infix:["+","="]},associativity:"right",precedence:260},{name:"MinusEqual",trigger:{infix:["-","="]},associativity:"right",precedence:260},{name:"SlashEqual",trigger:{infix:["/","="]},associativity:"right",precedence:260},{name:"EqualEqual",trigger:{infix:["=","="]},associativity:"right",precedence:260},{name:"EqualEqualEqual",trigger:{infix:["=","=","="]},associativity:"right",precedence:265},{name:"TildeFullEqual",trigger:{infix:"\\cong"},associativity:"right",precedence:260},{name:"NotTildeFullEqual",trigger:{infix:"\\ncong"},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:[":","="]},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:"\\coloneq"},associativity:"right",precedence:260},{name:"Approx",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"NotApprox",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"ApproxEqual",trigger:{infix:"\\approxeq"},associativity:"right",precedence:260},{name:"NotApproxEqual",trigger:{infix:["!","\\approxeq"]},associativity:"right",precedence:250},{name:"Unequal",trigger:{infix:"\\ne"},associativity:"right",precedence:255},{name:"Unequal",trigger:{infix:["!","="]},associativity:"right",precedence:260},{name:"GreaterEqual",trigger:{infix:"\\ge"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:"\\geq"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:[">","="]},associativity:"right",precedence:243},{name:"GreaterEqual",trigger:{infix:"\\geqslant"},associativity:"right",precedence:265},{name:"GreaterNotEqual",trigger:{infix:"\\gneqq"},associativity:"right",precedence:260},{name:"NotGreaterNotEqual",trigger:{infix:"\\ngeqq"},associativity:"right",precedence:260},{name:"Greater",trigger:{infix:">"},associativity:"right",precedence:245},{name:"Greater",trigger:{infix:"\\gt"},associativity:"right",precedence:245},{name:"NotGreater",trigger:{infix:"\\ngtr"},associativity:"right",precedence:244},{name:"NotGreater",trigger:{infix:["!",">"]},associativity:"right",precedence:244},{name:"RingEqual",trigger:{infix:"\\circeq"},associativity:"right",precedence:260},{name:"TriangleEqual",trigger:{infix:"\\triangleq"},associativity:"right",precedence:260},{name:"DotEqual",trigger:{infix:"\\doteq"},associativity:"right",precedence:265},{name:"DotEqualDot",trigger:{infix:"\\doteqdot"},associativity:"right",precedence:265},{name:"FallingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"RisingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"QuestionEqual",trigger:{infix:"\\questeq"},associativity:"right",precedence:260},{name:"Equivalent",trigger:{infix:"\\equiv"},associativity:"right",precedence:260},{name:"MuchLess",trigger:{infix:"\\ll"},associativity:"right",precedence:260},{name:"MuchGreater",trigger:{infix:"\\gg"},associativity:"right",precedence:260},{name:"Precedes",trigger:{infix:"\\prec"},associativity:"right",precedence:260},{name:"Succeeds",trigger:{infix:"\\succ"},associativity:"right",precedence:260},{name:"PrecedesEqual",trigger:{infix:"\\preccurlyeq"},associativity:"right",precedence:260},{name:"SucceedsEqual",trigger:{infix:"\\curlyeqprec"},associativity:"right",precedence:260},{name:"NotPrecedes",trigger:{infix:"\\nprec"},associativity:"right",precedence:260},{name:"NotSucceeds",trigger:{infix:"\\nsucc"},associativity:"right",precedence:260},{name:"ElementOf",trigger:{infix:"\\in"},associativity:"right",precedence:240},{name:"NotElementOf",trigger:{infix:"\\notin"},associativity:"right",precedence:240},{name:"Contains",trigger:{infix:"\\ni"},associativity:"right",precedence:160},{name:"Subset",trigger:{infix:"\\subset"},associativity:"right",precedence:240},{name:"SquareSubset",trigger:{infix:"\\sqsubset"},associativity:"right",precedence:265},{name:"SquareSubsetEqal",trigger:{infix:"\\sqsubseteq"},associativity:"right",precedence:265},{name:"Superset",trigger:{infix:"\\supset"},associativity:"right",precedence:240},{name:"SquareSuperset",trigger:{infix:"\\sqsupset"},associativity:"right",precedence:265},{name:"SquareSupersetEuqal",trigger:{infix:"\\sqsupseteq"},associativity:"right",precedence:265},{name:"NotSubset",trigger:{infix:"\\nsubset"},associativity:"right",precedence:240},{name:"NotSuperset",trigger:{infix:"\\nsupset"},associativity:"right",precedence:240},{name:"SubsetEqual",trigger:{infix:"\\subseteq"},associativity:"right",precedence:240},{name:"SupersetEqual",trigger:{infix:"\\supseteq"},associativity:"right",precedence:240},{name:"NotSubsetNotEqual",trigger:{infix:"\\nsubseteq"},associativity:"right",precedence:240},{name:"NotSupersetNotEqual",trigger:{infix:"\\nsupseteq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\subsetneq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\supsetneq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\varsupsetneqq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\varsupsetneq"},associativity:"right",precedence:240},{name:"Between",trigger:{infix:"\\between"},associativity:"right",precedence:265}],other:[{name:"Overscript",trigger:{infix:"\\overset"},precedence:700},{name:"Underscript",trigger:{infix:"\\underset"},precedence:700},{name:"Increment",trigger:{postfix:["+","+"]},precedence:880},{name:"Decrement",trigger:{postfix:["-","-"]},precedence:880},{name:"PreIncrement",trigger:{prefix:["+","+"]},precedence:880},{name:"PreDecrement",trigger:{prefix:["-","-"]},precedence:880},{name:"Ring",trigger:{infix:"\\circ"},precedence:265},{name:"Transpose",trigger:{superfix:"T"}},{name:"ConjugateTranspose",trigger:{superfix:"H"}},{name:"StringJoin",trigger:{infix:["\\lt","\\gt"]},precedence:780},{name:"Starstar",trigger:{infix:["\\star","\\star"]},precedence:780},{name:"PartialDerivative",trigger:{prefix:"\\partial"},parse:(e,t,i,a)=>{var r;let n=!1,o=ur,s=ur;for(;!n;)t.skipSpace(),t.match("_")?s=t.matchRequiredLatexArgument():t.match("^")?o=t.matchRequiredLatexArgument():n=!0;"Sequence"===Dr(s)&&(s=["List",...Er(s)]);let l=null!==(r=t.matchRequiredLatexArgument())&&void 0!==r?r:ur;return l!==ur&&(l=[l,...t.matchArguments("group")]),[null,["PartialDerivative",l,s,o]]},emit:(e,t)=>{let i="\\partial";const a=Nr(t,1),r=Nr(t,2),n=Nr(t,3);return null!==r&&r!==ur&&("List"===$r(r)?i+="_{"+e.emit(["Sequence",...Er(r)])+"}":i+="_{"+e.emit(r)+"}"),null!==n&&n!==ur&&(i+="^{"+e.emit(n)+"}"),null!==a&&a!==ur&&(i+=e.emit(a)),i},precedence:740},{name:"OverBar",trigger:{symbol:"\\overline"},requiredLatexArg:1},{name:"UnderBar",trigger:{symbol:"\\underline"},requiredLatexArg:1},{name:"OverVector",trigger:{symbol:"\\vec"},requiredLatexArg:1},{name:"OverTile",trigger:{symbol:"\\tilde"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverRightArrow",trigger:{symbol:"\\overrightarrow"},requiredLatexArg:1},{name:"OverLeftArrow",trigger:{symbol:"\\overleftarrow"},requiredLatexArg:1},{name:"OverRightDoubleArrow",trigger:{symbol:"\\Overrightarrow"},requiredLatexArg:1},{name:"OverLeftHarpoon",trigger:{symbol:"\\overleftharpoon"},requiredLatexArg:1},{name:"OverRightHarpoon",trigger:{symbol:"\\overrightharpoon"},requiredLatexArg:1},{name:"OverLeftRightArrow",trigger:{symbol:"\\overleftrightarrow"},requiredLatexArg:1},{name:"OverBrace",trigger:{symbol:"\\overbrace"},requiredLatexArg:1},{name:"OverLineSegment",trigger:{symbol:"\\overlinesegment"},requiredLatexArg:1},{name:"OverGroup",trigger:{symbol:"\\overgroup"},requiredLatexArg:1}],physics:[{name:"mu-0",trigger:{symbol:["\\mu","_","0"]}}],symbols:[{trigger:{symbol:"\\alpha"},parse:"α"},{trigger:{symbol:"\\beta"},parse:"β"},{trigger:{symbol:"\\gamma"},parse:"γ"},{trigger:{symbol:"\\delta"},parse:"δ"},{trigger:{symbol:"\\epsilon"},parse:"ϵ"},{trigger:{symbol:"\\varepsilon"},parse:"ε"},{trigger:{symbol:"\\zeta"},parse:"ζ"},{trigger:{symbol:"\\eta"},parse:"η"},{trigger:{symbol:"\\theta"},parse:"θ"},{trigger:{symbol:"\\vartheta"},parse:"ϑ"},{trigger:{symbol:"\\iota"},parse:"ι"},{trigger:{symbol:"\\kappa"},parse:"κ"},{trigger:{symbol:"\\varkappa"},parse:"ϰ"},{trigger:{symbol:"\\lambda"},parse:"λ"},{trigger:{symbol:"\\mu"},parse:"μ"},{trigger:{symbol:"\\nu"},parse:"ν"},{trigger:{symbol:"\\xi"},parse:"ξ"},{trigger:{symbol:"\\omicron"},parse:"ο"},{trigger:{symbol:"\\varpi"},parse:"ϖ"},{trigger:{symbol:"\\rho"},parse:"ρ"},{trigger:{symbol:"\\varrho"},parse:"ϱ"},{trigger:{symbol:"\\sigma"},parse:"σ"},{trigger:{symbol:"\\varsigma"},parse:"ς"},{trigger:{symbol:"\\tau"},parse:"τ"},{trigger:{symbol:"\\phi"},parse:"ϕ"},{trigger:{symbol:"\\varphi"},parse:"φ"},{trigger:{symbol:"\\upsilon"},parse:"υ"},{trigger:{symbol:"\\chi"},parse:"χ"},{trigger:{symbol:"\\psi"},parse:"ψ"},{trigger:{symbol:"\\omega"},parse:"ω"},{trigger:{symbol:"\\Gamma"},parse:"Γ"},{trigger:{symbol:"\\Delta"},parse:"Δ"},{trigger:{symbol:"\\Theta"},parse:"Θ"},{trigger:{symbol:"\\Lambda"},parse:"Λ"},{trigger:{symbol:"\\Xi"},parse:"Ξ"},{trigger:{symbol:"\\Pi"},parse:"Π"},{trigger:{symbol:"\\Sigma"},parse:"Σ"},{trigger:{symbol:"\\Upsilon"},parse:"Υ"},{trigger:{symbol:"\\Phi"},parse:"Φ"},{trigger:{symbol:"\\Psi"},parse:"Ψ"},{trigger:{symbol:"\\Omega"},parse:"Ω"},{trigger:{symbol:"\\digamma"},parse:"ϝ"},{trigger:{symbol:"\\aleph"},parse:"ℵ"},{trigger:{symbol:"\\beth"},parse:"ℶ"},{trigger:{symbol:"\\daleth"},parse:"ℸ"},{trigger:{symbol:"\\gimel"},parse:"ℷ"},{trigger:{symbol:"\\Finv"},parse:"Ⅎ"},{trigger:{symbol:"\\Game"},parse:"⅁"},{trigger:{symbol:"\\wp"},parse:"℘"},{trigger:{symbol:"\\eth"},parse:"ð"},{trigger:{symbol:"\\mho"},parse:"℧"},{trigger:{symbol:"\\clubsuit"},parse:"♣"},{trigger:{symbol:"\\heartsuit"},parse:"♡"},{trigger:{symbol:"\\spadesuit"},parse:"♠"},{trigger:{symbol:"\\diamondsuit"},parse:"♢"},{trigger:{symbol:"\\sharp"},parse:"♯"},{trigger:{symbol:"\\flat"},parse:"♭"},{trigger:{symbol:"\\natural"},parse:"♮"}],trigonometry:[{name:"Arcsin",trigger:"\\arcsin",arguments:"implicit",parse:Cn},{name:"Arccos",trigger:"\\arccos",arguments:"implicit",parse:Cn},{name:"Arctan",trigger:"\\arctan",arguments:"implicit",parse:Cn},{name:"Arctan",trigger:"\\arctg",arguments:"implicit",parse:Cn},{name:"Arccot",trigger:"\\arcctg",arguments:"implicit",parse:Cn},{name:"Arcsec",trigger:"\\arcsec",arguments:"implicit",parse:Cn},{name:"Arccsc",trigger:"\\arccsc",arguments:"implicit",parse:Cn},{name:"Arsinh",trigger:"\\arsinh",arguments:"implicit",parse:Cn},{name:"Arcosh",trigger:"\\arcosh",arguments:"implicit",parse:Cn},{name:"Artanh",trigger:"\\artanh",arguments:"implicit",parse:Cn},{name:"Arsech",trigger:"\\arsech",arguments:"implicit",parse:Cn},{name:"Arcsch",trigger:"\\arcsch",arguments:"implicit",parse:Cn},{name:"Cosh",trigger:"\\ch",arguments:"implicit",parse:Cn},{name:"Cosec",trigger:"\\cosec",arguments:"implicit",parse:Cn},{name:"Cosh",trigger:"\\cosh",arguments:"implicit",parse:Cn},{name:"Cot",trigger:"\\cot",arguments:"implicit",parse:Cn},{name:"Cot",trigger:"\\cotg",arguments:"implicit",parse:Cn},{name:"Coth",trigger:"\\coth",arguments:"implicit",parse:Cn},{name:"Csc",trigger:"\\csc",arguments:"implicit",parse:Cn},{name:"Cot",trigger:"\\ctg",arguments:"implicit",parse:Cn},{name:"Coth",trigger:"\\cth",arguments:"implicit",parse:Cn},{name:"Sec",trigger:"\\sec",arguments:"implicit",parse:Cn},{name:"Sinh",trigger:"\\sinh",arguments:"implicit",parse:Cn},{name:"Sinh",trigger:"\\sh",arguments:"implicit",parse:Cn},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:Cn},{name:"Tanh",trigger:"\\tanh",arguments:"implicit",parse:Cn},{name:"Tan",trigger:"\\tg",arguments:"implicit",parse:Cn},{name:"Tanh",trigger:"\\th",arguments:"implicit",parse:Cn},{name:"Cos",trigger:"\\cos",arguments:"implicit",parse:Cn},{name:"Sin",trigger:"\\sin",arguments:"implicit",parse:Cn},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:Cn}]};class Nn{constructor(e,t){var i;let a;this.index=0,this.options={...wr,...t},this.tokens=e,this.onError=e=>t.onError({...e,before:this.latexBefore(),after:this.latexAfter()}),this.dictionary=null!==(i=t.indexedLatexDictionary)&&void 0!==i?i:Tn(t.dictionary,t.onError),this.invisibleOperatorPrecedence=0,this.options.invisibleOperator&&(a=this.dictionary.name.get(this.options.invisibleOperator),void 0===a?t.onError({code:"unknown-operator",arg:this.options.invisibleOperator}):void 0===a.precedence?t.onError({code:"expected-operator",arg:this.options.invisibleOperator}):this.invisibleOperatorPrecedence=a.precedence)}clone(e,t){return new Nn(this.tokens.slice(e,t),{...this.options,dictionary:[],indexedLatexDictionary:this.dictionary,onError:this.onError})}getIndex(){return this.index}setIndex(e){this.index=e}atEnd(){return this.index>=this.tokens.length}peek(){return this.tokens[this.index]}latex(e,t){return g(this.tokens.slice(e,t))}latexAhead(e){return g(this.tokens.slice(this.index,this.index+e))}latexBefore(){return this.latex(0,this.index)}latexAfter(){return this.latex(this.index)}lookAhead(){let e=Math.min(this.dictionary.lookahead,this.tokens.length-this.index);const t=[];for(;e>0;)t[e]=this.latexAhead(e--);return t}peekDefinition(e){let t;t="operator"===e?this.lookAhead().map((e,t)=>{var i,a,r,n,o;return null!==(n=null!==(a=null===(i=this.dictionary.infix[t])||void 0===i?void 0:i.get(e))&&void 0!==a?a:null===(r=this.dictionary.postfix[t])||void 0===r?void 0:r.get(e))&&void 0!==n?n:null===(o=this.dictionary.prefix[t])||void 0===o?void 0:o.get(e)}):this.lookAhead().map((t,i)=>{var a;return null===(a=this.dictionary[e][i])||void 0===a?void 0:a.get(t)});for(let e=t.length;e>0;e--)if(void 0!==t[e])return[t[e],e];return[null,0]}next(){return this.tokens[this.index++]}skipSpace(){if(!this.options.skipSpace)return!1;let e=!1;for(;this.match("");)e=!0;return e}match(e){return this.tokens[this.index]===e&&(this.index++,!0)}matchAll(e){let t=!0;"string"==typeof e&&(e=[e]);let i=0;do{t=this.tokens[this.index+i]===e[i++]}while(t&&ie!==this.options.groupSeparator).join(""):""}matchSignedInteger(){const e=this.index,t=this.matchSign(),i=this.matchDigits();return i?("-"===t?"-":"")+i:(this.index=e,"")}matchExponent(){const e=this.index;let t="";if(this.matchAny(["e","E","d","D"])){const e=this.matchSignedInteger();e&&(t="e"+e)}if(t)return t;if(this.match("\\times")&&(this.skipSpace(),this.match("1")&&this.match("0")&&this.match("^"))){if(/[0-9]/.test(this.peek()))return"e"+this.next();if(this.match("<{>")){this.skipSpace();const e=this.matchSignedInteger();if(this.skipSpace(),this.match("<}>")&&e)return"e"+e}}return this.index=e,""}matchNumber(){var e,t,i;if(!this.options.parseNumbers)return"";const a=this.index;let r=this.matchDigits();return r?(this.match(null!==(e=this.options.decimalMarker)&&void 0!==e?e:"")&&(r+="."+(null!==(t=this.matchDigits())&&void 0!==t?t:"")),r+=null!==(i=this.matchExponent())&&void 0!==i?i:"",r||(this.index=a,"")):""}matchOperator(e,t=null,i=0){const[a,r]=this.peekDefinition(e);if(null===a)return null;if("function"==typeof a.parse){const e=this.latexAhead(r);this.index+=r;let n=null;return[t,n]=a.parse(t,this,i,e),null===n?(this.index-=r,null):this.applyInvisibleOperator(t,n)}let n=a.precedence;if(n0;)l=this.matchOptionalLatexArgument(),null!==l&&s.push(l),c--;for(c=null!==(a=r.requiredLatexArg)&&void 0!==a?a:0;c>0;)l=this.matchRequiredLatexArgument(),null===l&&this.onError({code:"expected-argument"}),null!==l&&o.push(l),c--;const d=this.matchArguments(r.arguments);return null===d?0===o.length&&0===s.length?r.parse:[r.parse,...o,...s]:[r.parse,...o,...d,...s]}matchOptionalLatexArgument(){if(this.skipSpace(),this.match("[")){const e=this.index;let t=1;for(;!this.atEnd()&&0!==t;)this.match("[")?t+=1:this.match("]")?t-=1:this.next();return this.clone(e,this.index-1).matchExpression()}return null}matchRequiredLatexArgument(){var e;if(this.skipSpace(),this.match("<{>")){const t=this.index;let i=1;for(;!this.atEnd()&&0!==i;)this.match("<{>")?i+=1:this.match("<}>")?i-=1:this.next();return null!==(e=this.clone(t,this.index-1).matchExpression())&&void 0!==e?e:""}return/^[0-9]$/.test(this.peek())?parseFloat(this.next()):/^[^\\#]$/.test(this.peek())?this.next():this.matchExpression()}matchSupsub(e){let t=null;return this.skipSpace(),[["^","superfix"],["_","subfix"]].forEach(i=>{var a,r,n;if(null!==t)return;const[o,s]=i;if(!this.match(o))return;this.skipSpace();const l=this.index;let c,d=0;if(this.match("<{>")?(this.skipSpace(),[c,d]=this.peekDefinition(s),this.index+=d,this.skipSpace(),(null==c?void 0:c.name)&&this.match("<}>")?t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(a=c.parse)&&void 0!==a?a:c.name,e]:this.index=l):([c,d]=this.peekDefinition(s),(null==c?void 0:c.name)&&(this.index+=d,t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(r=c.parse)&&void 0!==r?r:c.name,e])),null===t&&(c=null===(n=this.dictionary.infix[1])||void 0===n?void 0:n.get(o),"function"==typeof(null==c?void 0:c.parse)?t=c.parse(e,this,0,o)[1]:"string"==typeof(null==c?void 0:c.parse)?([e,t]=this.applyOperator(c.parse,e,this.matchRequiredLatexArgument()),t=this.applyInvisibleOperator(e,t)):t=this.applyInvisibleOperator(e,o)),null!==t){const e=this.matchArguments(null==c?void 0:c.arguments);null!==e&&(t=[t,...e])}}),t}matchPostfix(e){if(null===e)return null;const[t,i]=this.peekDefinition("postfix");if(null===t)return null;if("function"==typeof t.parse){const a=this.latexAhead(i);return this.index+=i,[,e]=t.parse(e,this,0,a),null===e?(this.index-=i,null):e}return this.index+=i,[t.parse,e]}matchString(){let e="",t=this.atEnd();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===this.peek()?t=!0:/^<({|}|\$|\$\$|space)>$/.test(i)?"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.next()):t=!0:e+=this.next()}t=t||this.atEnd()}return e}matchEnvironmentName(e,t){if(this.match(e)){const e=this.index;if(this.match("<{>")){const e=this.matchString();if(this.match("<}>")&&e===t)return!0}this.index=e}return!1}matchTabular(){const e=["list"];let t=["list"],i=null,a=!1;for(;!this.atEnd()&&!a;)if(this.match("&"))t.push(i),i=null;else if(this.match("\\\\")||this.match("\\cr"))this.skipSpace(),this.matchOptionalLatexArgument(),null!==i&&t.push(i),e.push(t),t=["list"],i=null;else{const e=this.matchExpression();null===e&&(a=!0),i=null!==i?this.applyInvisibleOperator(i,e):e}return t.length>1&&e.push(t),e}matchEnvironment(){var e;if(this.match("\\begin")&&this.match("<{>")){const t=this.matchString();if(this.match("<}>")){const i=this.index;let a=this.index,r=1;for(;!this.atEnd()&&0!==r;)a=this.index,this.matchEnvironmentName("\\begin",t)?r+=1:this.matchEnvironmentName("\\end",t)?r-=1:this.next();const n=this.dictionary.environment.get(t);return"function"==typeof(null==n?void 0:n.parse)?n.parse(null,this.clone(i,a),0,t)[1]:null!==(e=null==n?void 0:n.parse)&&void 0!==e?e:null}}return null}applyOperator(e,t,i){var a,r,n,o;const s=this.dictionary.name.get(e);if(void 0===s)return this.onError({code:"unknown-operator"}),[t,i];if(void 0!==(null===(a=s.trigger)||void 0===a?void 0:a.prefix)&&null===t&&null!==i)return[null,[s.name,i]];if(void 0!==(null===(r=s.trigger)||void 0===r?void 0:r.postfix)&&null!==t)return[null,[s.name,t]];if((void 0!==(null===(n=s.trigger)||void 0===n?void 0:n.matchfix)||void 0!==(null===(o=s.trigger)||void 0===o?void 0:o.infix))&&null!==t&&null!==i){if("non"===s.associativity)return[null,[e,t,i]];if(Dr(t)===e){if("both"===s.associativity){if(Dr(i)===e){if(Array.isArray(t))return[null,t.concat(Er(i))];if(Lr(t))return[null,t.fn.concat(Er(i))]}else Array.isArray(t)&&t.push(i),Lr(t)&&t.fn.push(i);return[null,t]}return"left"===s.associativity?[null,[e,t,i]]:Array.isArray(t)?[null,[e,t[1],[e,t[2],i]]]:(Lr(t)&&(t.fn[2]=[e,t.fn[2],i]),[null,t])}return Dr(i)===e?"both"===s.associativity?(Array.isArray(i)&&i.splice(1,0,t),Lr(i)&&i.fn.splice(1,0,t),[null,i]):"right"===s.associativity?[null,[e,t,i]]:Array.isArray(i)?[null,[e,i[1],[e,i[2],t]]]:(Lr(i)&&(i.fn[2]=[e,i.fn[2],t]),[null,i]):[null,[e,t,i]]}return void 0!==s.trigger.infix?(this.onError({code:"expected-operand"}),[t,null]):[t,null]}applyInvisibleOperator(e,t){if(null===e)return t;if(null===t)return e;if(this.options.invisiblePlusOperator&&("number"==typeof e||Sr(e))&&Dr(t)===yr)return[e,t]=this.applyOperator(this.options.invisiblePlusOperator,e,t),null===e?t:null;if(this.options.invisibleOperator)return[e,t]=this.applyOperator(this.options.invisibleOperator,e,t),null===e?t:null;let i=["Latex"];return"Latex"===Dr(e)?i=i.concat(Er(e)):i.push(e),null!==t&&("Latex"===Dr(t)?i=i.concat(Er(t)):i.push(t)),this.options.invisibleOperator&&this.onError({code:"unexpected-sequence"}),i}matchUnknownLatexCommand(){const e=this.peek();if(!e||"\\"!==e[0])return null;this.next();const t=[],i=[];let a=!1;do{a=!0;let e=this.matchOptionalLatexArgument();null!==e&&(t.push(e),a=!1),this.skipSpace(),"<{>"===this.peek()&&(e=this.matchRequiredLatexArgument(),null!==e&&(i.push(e),a=!1))}while(!a);return t.length>0||i.length>0?[e,...i,...t]:e}matchPrimary(e){let t=null;const i=this.index,a=this.matchNumber();a&&(t={num:a}),null===t&&(t=this.matchSymbol()),null===t&&(t=this.matchEnvironment()),null===t&&(t=this.matchMatchfixOperator());let r=null;do{r=this.matchSupsub(t),t=null!=r?r:t}while(null!==r);let n=null;do{n=this.matchPostfix(t),t=null!=n?n:t}while(null!==n);return this.decorate(t,i)}matchExpression(e=0){let t=null;const i=this.index;if(this.skipSpace(),t=this.matchOperator("prefix"),null===t&&(t=this.matchPrimary(e)),null===t)return null;let a=!1;for(;!this.atEnd()&&!a;){this.skipSpace();let i=this.matchOperator("infix",t,e);if(null===i){const[e]=this.peekDefinition("operator");if(null===e){const e=this.matchExpression(this.invisibleOperatorPrecedence);null===e?a=!0:i=this.applyInvisibleOperator(t,e)}}null!==i?t=i:a=!0}return this.decorate(t,i)}decorate(e,t){if(this.options.preserveLatex){const i=this.latex(t,this.index);Array.isArray(e)?e={latex:i,fn:e}:"number"==typeof e?e={latex:i,num:Number(e).toString()}:"string"==typeof e?e={latex:i,sym:e}:"object"==typeof e&&null!==e&&(e.latex=i)}return e}}function On(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}const a=i!==e.length;return(e=e.replace(/(\d{3})/g,"$1"+t.groupSeparator)).endsWith(t.groupSeparator)&&(e=e.slice(0,-1)),e+(a?"\\ldots":"")}function Bn(e,t){var i;return e?t.beginExponentMarker?t.beginExponentMarker+e+(null!==(i=t.endExponentMarker)&&void 0!==i?i:""):"10^{"+e+"}":""}class Fn{constructor(e){this.level=-1,this.options=e,e.invisibleMultiply&&(/#1/.test(e.invisibleMultiply)&&/#2/.test(e.invisibleMultiply)||e.onError({code:"expected-argument",arg:"invisibleMultiply"})),this.onError=e.onError,this.dictionary=Tn(e.dictionary,e.onError)}wrap(e,t){if(null===e)return"";if(void 0===t)return"("+this.emit(e)+")";if("number"==typeof e||Sr(e)||"string"==typeof e||zr(e))return this.emit(e);const i=Dr(e);if(i){const a=this.dictionary.name.get(i);if(a&&void 0!==a.precedence&&a.precedence1?"upright":"asis"}(e,this.level)){case"upright":return"\\operatorname{"+i+"}";default:return i}}const a=Er(e);if(!t){if("string"==typeof i&&i.length>0&&"\\"===i[0]){let e=i;for(const t of a)e+="{"+this.emit(t)+"}";return e}return this.emit(i)+this.emit([hr,...a])}if(t.requiredLatexArg>0){let e="",i="",r=0;for(;r=0){const a=r.match(/(\d*)\.(\d*)([e|E]([-+]?[0-9]*))?/);if(!a)return"";const o=a[1],l=a[2].substring(0,Math.min(s.precision-o.length,a[2].length));if(n=null!==(i=a[4])&&void 0!==i?i:"","0"===o){let i=0;for(;"0"===l[i]&&i=s.precision)a="0",t="";else{a=r[i];const e=On(r.substr(i+1),s);e&&(a+=s.decimalMarker+e)}"0"!==a&&(r.length-1>s.precision&&!a.endsWith("}")&&!a.endsWith("\\ldots")&&(a+="\\ldots"),i>4&&(a+=s.exponentProduct+Bn((1-i).toString(),e))),r=a}else{r=o.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator);const e=On(l,s);e&&(r+=s.decimalMarker+e)}}else if(r.length>s.precision){const t=r.length;let i=r[0];const a=On(r.substr(1),s);a&&(i+=s.decimalMarker+a,"}"!==i[i.length-1]&&(i+="\\ldots")),"1"!==i?i+=s.exponentProduct:i="",r=i+Bn((t-2).toString(),e)}else{const t=r.match(/([0-9]*)\.?([0-9]*)([e|E]([-+]?[0-9]+))?/);t&&(r=t[1],t[2]&&(r+=e.decimalMarker+t[2]),n=null!==(a=t[4])&&void 0!==a?a:""),r=r.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator)}const o=Bn(n,e);return t+r+(o?e.exponentProduct+o:"")}if(n=function(e){return parseFloat(Number(e).toPrecision(15))}(r),"engineering"===s.notation)if(0===n)o="0";else{const t=Math.abs(n);let i=Math.round(Math.log10(t));i-=i%3,t<1e3&&(i=0);const a=t/Math.pow(10,i);let r="";const l=a.toString().match(/^(.*)\.(.*)$/);(null==l?void 0:l[1])&&l[2]&&(r=l[1]+s.decimalMarker+l[2]),s.groupSeparator&&(r=On(a.toExponential(),s));let c="";0!==i&&(c=Bn(i.toString(),e)),o=(n<0?"-":"")+r+c}else{const t="string"==typeof r?r:r.toString();let i,a,n,l=t.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);i=t,n="",(null==l?void 0:l[1])&&l[2]&&(i=l[1],a=Bn(l[2],e),a&&(a=e.exponentProduct+a)),l=i.match(/^(.*)\.(.*)$/),(null==l?void 0:l[1])&&l[2]&&(i=l[1],n=l[2]),s.groupSeparator&&(i=i.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator),n=On(n,s)),n&&(n=s.decimalMarker+n),o=i+n+(null!=a?a:"")}return o}(this.options,e);if(t)return this.level-=1,t;const i=Tr(e);if("<$>"===i)t="$";else if("<$$>"===i)t="$$";else if("<{>"===i)t="{";else if("<}>"===i)t="}";else if(""===i)t=" ";else{if(i&&("\\"===i[0]||"#"===i[0])){this.level-=1;const t=Er(e);return 0===t.length?i:i+"{"+t.map(e=>this.emit(e)).filter(e=>Boolean(e)).join("}{")+"}"}if(null!==i)t=this.emitSymbol(e,this.dictionary.name.get(i));else{const i=this.dictionary.name.get(Dr(e));i?"function"==typeof i.emit?t=i.emit(this,e):(t||void 0===i.precedence&&!i.trigger.superfix&&!i.trigger.subfix||(t=function(e,t,i){let a="";const r=Or(t),n=Dr(t);if(i.trigger.superfix||i.trigger.subfix)return 1!==r&&e.onError({code:"operator-requires-one-operand",arg:e.emitSymbol(n)}),Br(i.emit,[e.emit(Nr(t,1))]);if(i.trigger.postfix)return 1!==r&&e.onError({code:"postfix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Br(i.emit,[e.wrap(Nr(t,1),i.precedence)]);if(i.trigger.prefix)return 1!==r&&e.onError({code:"prefix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Br(i.emit,[e.wrap(Nr(t,1),i.precedence+1)]);if(i.trigger.infix){a=e.wrap(Nr(t,1),i.precedence);for(let n=2;n=1){let r="";for(const n of Er(t))n&&(a.push(r),a.push(e.emit(n)),r=i.separator)}return Array.isArray(i.closeFence)?a.push(g(i.closeFence)):"string"==typeof i.closeFence&&a.push(i.closeFence),f(a)}(this,e,i)),!t&&i.trigger.symbol&&(t=this.emitSymbol(e,i))):Array.isArray(e)||Lr(e)?t=this.emitSymbol(e):this.onError({code:"syntax-error",arg:JSON.stringify(e)})}}return this.level-=1,t}}function Pn(e,t){var i,a,r;const n=new Nn(Xe(e,[]),{..._r,...wr,onError:e=>{"undefined"!=typeof window&&(!e.before||e.after)},dictionary:En("all"),...t}),o=n.matchExpression();n.atEnd()||null===(i=null==t?void 0:t.onError)||void 0===i||i.call(t,{code:"syntax-error"});let s=null!==(a=null==t?void 0:t.form)&&void 0!==a?a:["canonical"];return Array.isArray(s)||(s=[s]),null!==(r=Mn(function(e="all"){let t;return"all"===e?(t={},Object.keys(kr).forEach(e=>{t={...t,...kr[e]}})):t={...kr[e]},t}("all"),o,s))&&void 0!==r?r:""}const Rn={"\\imaginaryI":"ⅈ","\\imaginaryJ":"ⅉ","\\pi":"π","\\exponentialE":"ℯ","﹢":"+","+":"+","−":"-","-":"-","﹣":"-","-":"-","\\times":"*","\\cdot":"*","⨉":"*","️✖":"*","️×":"*",".":"*","÷":"/","⁄":"/","/":"/","!":"factorial","\\mp":"minusplus","\\ne":"!=","\\coloneq":":=","\\questeq":"?=","\\approx":"approx","\\cong":"congruent","\\sim":"similar","\\equiv":"equiv","\\pm":"plusminus","\\land":"and","\\wedge":"and","\\lor":"or","\\vee":"or","\\oplus":"xor","\\veebar":"xor","\\lnot":"not","\\neg":"not","\\exists":"exists","\\nexists":"!exists","\\forall":"forAll","\\backepsilon":"suchThat","\\therefore":"therefore","\\because":"because","\\nabla":"nabla","\\circ":"circle","\\ominus":"ominus","\\odot":"odot","\\otimes":"otimes","\\zeta":"Zeta","\\Gamma":"Gamma","\\min":"min","\\max":"max","\\mod":"mod","\\lim":"lim","\\sum":"sum","\\prod":"prod","\\int":"integral","\\iint":"integral2","\\iiint":"integral3","\\Re":"Re","\\gothicCapitalR":"Re","\\Im":"Im","\\gothicCapitalI":"Im","\\binom":"nCr","\\partial":"partial","\\differentialD":"differentialD","\\capitalDifferentialD":"capitalDifferentialD","\\Finv":"Finv","\\Game":"Game","\\wp":"wp","\\ast":"ast","\\star":"star","\\asymp":"asymp","\\to":"to","\\gets":"gets","\\in":"elementof","\\notin":"!elementof","\\ni":"ownedby","\\owns":"ownedby","\\subset":"subset","\\supset":"superset","\\complement":"complement","\\rightarrow":"shortLogicalImplies","\\leftarrow":"shortLogicalImpliedBy","\\leftrightarrow":"shortLogicalEquivalent","\\longrightarrow":"logicalImplies","\\longleftarrow":"logicalImpliedBy","\\longleftrightarrow":"logicalEquivalent","\\Rightarrow":"shortImplies","\\Leftarrow":"shortImpliedBy","\\Leftrightarrow":"shortEquivalent","\\implies":"implies","\\Longrightarrow":"implies","\\impliedby":"impliedBy","\\Longleftarrow":"impliedBy","\\iff":"equivalent","\\Longleftrightarrow":"equivalent"},In={"+":"add","*":"multiply","-":"subtract","/":"divide","=":"equal",":=":"assign","!=":"ne","?=":"questeq",approx:"approx",congruent:"congruent",similar:"similar",equiv:"equiv","<":"lt",">":"gt","<=":"le",">=":"ge","≤":"le","≥":"ge",">>":"gg","<<":"ll","**":"pow","++":"increment","--":"decrement"},Hn={equal:"%0 = %1",ne:"%0 \\ne %1",questeq:"%0 \\questeq %1",approx:"%0 \\approx %1",congruent:"%0 \\cong %1",similar:"%0 \\sim %1",equiv:"%0 \\equiv %1",assign:"%0 := %1",lt:"%0 < %1",gt:"%0 > %1",le:"%0 \\le %1",ge:"%0 \\ge %1",sin:"\\sin%_%^ %0",cos:"\\cos%_%^ %0",tan:"\\tan%_%^ %0",cot:"\\cot%_%^ %0",sec:"\\sec%_%^ %0",csc:"\\csc%_%^ %0",sinh:"\\sinh %0",cosh:"\\cosh %0",tanh:"\\tanh %0",csch:"\\csch %0",sech:"\\sech %0",coth:"\\coth %0",arcsin:"\\arcsin %0",arccos:"\\arccos %0",arctan:"\\arctan %0",arccot:"\\arcctg %0",arcsec:"\\arcsec %0",arccsc:"\\arccsc %0",arsinh:"\\arsinh %0",arcosh:"\\arcosh %0",artanh:"\\artanh %0",arcsch:"\\arcsch %0",arsech:"\\arsech %0",arcoth:"\\arcoth %0",ln:"\\ln%_%^ %",log:"\\log%_%^ %",lg:"\\lg %",lb:"\\lb %",sum:"\\sum%_%^ %0",prod:"\\prod%_%^ %0",Zeta:"\\zeta%_%^ %",Gamma:"\\Gamma %",min:"\\min%_%^ %",max:"\\max%_%^ %",mod:"\\mod%_%^ %",lim:"\\lim%_%^ %",binom:"\\binom %",nabla:"\\nabla %",curl:"\\nabla\\times %0",div:"\\nabla\\cdot %0",floor:"\\lfloor %0 \\rfloor%_%^",ceil:"\\lceil %0 \\rceil%_%^",abs:"\\left| %0 \\right|%_%^",norm:"\\lVert %0 \\rVert%_%^",ucorner:"\\ulcorner %0 \\urcorner%_%^",lcorner:"\\llcorner %0 \\lrcorner%_%^",angle:"\\langle %0 \\rangle%_%^",group:"\\lgroup %0 \\rgroup%_%^",moustache:"\\lmoustache %0 \\rmoustache%_%^",brace:"\\lbrace %0 \\rbrace%_%^","sqrt[]":"\\sqrt[%^]{%0}",sqrt:"\\sqrt{%0}",lcm:"\\operatorname{lcm}%",gcd:"\\operatorname{gcd}%",erf:"\\operatorname{erf}%",erfc:"\\operatorname{erfc}%",randomReal:"\\operatorname{randomReal}%",randomInteger:"\\operatorname{randomInteger}%",and:"%0 \\land %1",or:"%0 \\lor %1",xor:"%0 \\oplus %1",not:"%0 \\lnot %1",circle:"%0 \\circ %1",ast:"%0 \\ast %1",star:"%0 \\star %1",asymp:"%0 \\asymp %1","/":"\\frac{%0}{%1}",Re:"\\Re{%0}",Im:"\\Im{%0}",factorial:"%0!",factorial2:"%0!!"},Wn={degree:880,nabla:740,curl:740,partial:740,differentialD:740,capitalDifferentialD:740,"**":720,odot:710,not:680,div:660,solidus:660,"/":660,setminus:650,"%":640,otimes:410,union:350,intersection:350,"*":390,ast:390,".":390,oplus:300,ominus:300,"+":275,"-":275,"+-":275,"-+":275,circle:265,circledast:265,circledcirc:265,star:265,"..":263,to:262,in:262,"|":261,congruent:265,equiv:260,"=":260,"!=":255,"?=":255,similar:250,approx:247,"<":245,">":243,">=":242,"≥":242,"<=":241,complement:240,subset:240,superset:240,elementof:240,"!elementof":240,exists:230,"!exists":230,forall:230,and:200,xor:195,or:190,suchThat:110,":":100,assign:80,":=":80,therefore:70,because:70,shortLogicalImplies:52,shortImplies:51,logicalImplies:50,implies:49,shortLogicalImpliedBy:48,shortImpliedBy:47,logicalImpliedBy:46,impliedBy:45,shortLogicalEquivalent:44,shortEquivalent:43,logicalEquivalent:42,equivalent:41,",":40,";":30};function Vn(e,i){return t(e.arg)?e.arg[i]:void 0}function Un(e){return e&&Wn[e]||-1}function jn(e){return/=|=>/.test(e)?"right":"left"}function Gn(e){if("f"===e||"g"===e)return!0;const t=Hn[e];return!!t&&!!/%[^01_^]?/.test(t)}function Xn(e){e=(e||"").trim();let t=Rn[e];if(!t)if(/^\\[^{}]+$/.test(e)){const i=re(e,"math",{});t=i&&i.value||e.slice(1)}else t=e;return t}function Zn(e){if(!e)return null;const t=Xn(io(e)),i=[Un(t),jn(t)];return i[0]<=0?null:i}function Yn(e){return null!==Zn(e)}const Qn={"\\lfloor\\rfloor":"floor","\\lceil\\rceil":"ceil","\\vert\\vert":"abs","\\lvert\\rvert":"abs","||":"abs","\\Vert\\Vert":"norm","\\lVert\\rVert":"norm","\\ulcorner\\urcorner":"ucorner","\\llcorner\\lrcorner":"lcorner","\\langle\\rangle":"angle","\\lgroup\\rgroup":"group","\\lmoustache\\rmoustache":"moustache","\\lbrace\\rbrace":"brace"},Jn={"!":"factorial","\\dag":"dagger","\\dagger":"dagger","\\ddagger":"dagger2","\\maltese":"maltese","\\backprime":"backprime","\\backdoubleprime":"backprime2","\\prime":"prime","\\doubleprime":"prime2","\\$":"$","\\%":"%","\\_":"_","\\degree":"degree"},eo={"+":"add","-":"add","*":"multiply","=":"equal",",":"list",";":"list2",and:"and",or:"or",xor:"xor",union:"union",shortLogicalEquivalent:"logicalEquivalent",logicalEquivalent:"logicalEquivalent",shortEquivalent:"equivalent",equivalent:"equivalent"},to={",":"list",";":"list2"};function io(e){if("string"==typeof e)return e;if(t(e)){let t="";for(const i of e)t+=io(i);return t}if(e.symbol&&!/^\\math(op|bin|rel|open|punct|ord|inner)/.test(e.symbol))return e.symbol;if("leftright"===e.type)return"";if("string"==typeof e.body)return e.body;if(t(e.body)){let t="";for(const i of e.body)t+=io(i);return t}return""}function ao(e){return"string"==typeof e.sym?function(e){let t=Hn[e];return t?t.replace("%1","").replace("%0","").replace("%",""):(e.length>1&&(t="\\"+e),t||(t=ee("math",e)),t)}(e.sym)||e.sym:""}function ro(e){return parseFloat(e.num)}function no(e){return"object"==typeof e&&void 0!==e.num}function oo(e){let t=0;return no(e)&&(t="object"==typeof e.num?void 0!==e.num.re?Ao(e.num.re):0:parseFloat(e.num)),t}function so(e){let t=0;return no(e)&&"object"==typeof e.num&&(t=void 0!==e.num.im?Ao(e.num.im):0),t}function lo(e){return e&&void 0!==e.sup}function co(e){return e&&void 0!==e.sub}function mo(e,t,i){let a=!1;const r=e.atoms[e.index];return r&&r.type===t&&(a=void 0===i||io(r)===i),a}function po(e,...t){const i={fn:e,arg:void 0};if(t){const e=[];for(const i of t)i&&e.push(i);e.length>0&&(i.arg=e)}return i}function uo(e){return"number"==typeof e?{num:e.toString()}:"string"==typeof e||"object"==typeof e?{num:e}:void 0}function ho(e){if(no(e)){const t=oo(e),i=so(e);return 0!==i?(0!==t&&(e.num.re=(-t).toString()),e.num.im=(-i).toString()):e.num=(-t).toString(),e}return po("negate",e)}function fo(e){const t=e.atoms[e.index+1];return t&&"msubsup"===t.type}function go(e,t){let i=e.atoms[e.index];return!i||void 0===i.superscript&&void 0===i.subscript?i=null:e.index+=1,i||(i=e.atoms[e.index+1],i&&"msubsup"===i.type&&(i.superscript||i.subscript)?e.index+=2:i=null),i?(void 0!==i.subscript&&(e.ast.sub=Mo(i.subscript,t)),void 0!==i.superscript&&("msubsup"===i.type?/['\u2032]|\\prime/.test(io(i.superscript))?(e.index+=1,i=e.atoms[e.index+1],i&&"msubsup"===i.type&&/['\u2032]|\\prime/.test(io(i.superscript))?e.ast.sup={sym:"″"}:(e.ast.sup={sym:"′"},e.index-=1)):/['\u2033]|\\doubleprime/.test(io(i.superscript))?e.ast.sup={sym:"″"}:e.ast&&(e.ast.sup=Mo(i.superscript,t)):e.ast.sup=Mo(i.superscript,t))):e.index+=1,e}function yo(e,t){const i=e.ast;if(vo(e,"!!"))return e.index+=1,e.ast=po("factorial2",i),yo(e=go(e,t),t);if(vo(e,"++"))return e.index+=1,e.ast=po("increment",i),yo(e=go(e,t),t);if(vo(e,"--"))return e.index+=1,e.ast=po("decrement",i),yo(e=go(e,t),t);const a=e.atoms[e.index];return(null==a?void 0:a.symbol)&&Jn[a.symbol]&&(e.ast=po(Jn[a.symbol],i),e=yo(e=go(e,t),t)),e}function bo(e,t,i,a){if(e.index=e.index||0,0===e.atoms.length||e.index>=e.atoms.length)return e.ast=void 0,e;const r=e.minPrec;e.minPrec=0;let n=e.atoms[e.index];if(t){if("mopen"===n.type&&io(n)===t)e.index+=1,n=(e=ko(e,a)).atoms[e.index],n&&"mclose"===n.type&&io(n)===i&&(fo(e)&&(e.ast={group:e.ast}),e=yo(e=go(e,a),a));else if("textord"===n.type&&io(n)===t)e.index+=1,n=(e=ko(e,a)).atoms[e.index],n&&"textord"===n.type&&io(n)===i&&(e.index+=1,e=yo(e=go(e,a),a));else if("\\lVert"===t&&"textord"===n.type&&"|"===n.symbol){if(n=e.atoms[e.index+1],n&&"textord"===n.type&&"|"===n.symbol){e.index+=2,n=(e=ko(e,a)).atoms[e.index];const t=e.atoms[e.index+1];n&&"textord"===n.type&&"|"===n.symbol&&t&&"textord"===t.type&&"|"===t.symbol&&(e.index+=2,e=yo(e=go(e,a),a))}}else if("sizeddelim"===n.type&&n.delim===t)e.index+=1,n=(e=ko(e,a)).atoms[e.index],n&&"sizeddelim"===n.type&&n.delim===i&&(e.index+=1,e=yo(e=go(e,a),a));else{if("leftright"!==n.type||n.leftDelim!==t||"?"!==n.rightDelim&&n.rightDelim!==i)return;e.ast=Mo(n.body,a),fo(e)&&(e.ast={group:e.ast}),e=yo(e=go(e,a),a)}return e.minPrec=r,e}{let o=!0;if("mopen"===n.type?(t=n.symbol,i=I[t]):"sizeddelim"===n.type?(t=n.delim,i=I[t]):"leftright"===n.type?(o=!1,t=n.leftDelim,"?"===(i=n.rightDelim)&&(i=I[t])):"textord"===n.type&&(t=n.symbol,i=I[t]),t&&i){if("|"===t&&"|"===i){const a=e.atoms[e.index+1];a&&"textord"===a.type&&"|"===a.symbol&&(t="\\lVert",i="\\rVert")}if(e=bo(e,t,i,a))return o&&(e.index+=1),e.ast={fn:Qn[t+i]||t+i,arg:[e.ast]},e.minPrec=r,e}}}function vo(e,t){return e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)&&t===io(e.atoms[e.index])+io(e.atoms[e.index+1])}function xo(e){if(e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)){if(!mo(e,"textord","\\nabla")){const t=e.atoms[e.index].symbol+e.atoms[e.index+1].symbol,i=/^(>=|<=|>>|<<|:=|!=)$/.test(t)?t:"";return i&&(e.index+=1),i}return e.index+=1,mo(e,"mbin","\\times")?(e.index+=1,e.ast="curl",e):mo(e,"mbin","\\cdot")?(e.index+=1,e.ast="div",e):void(e.index-=1)}}function ko(e,i){if(e.index=e.index||0,e.ast=void 0,0===e.atoms.length||e.index>=e.atoms.length)return e;e.minPrec=e.minPrec||0;let a=function e(i,a){if(i.index=i.index||0,i.ast=void 0,0===i.atoms.length||i.index>=i.atoms.length)return i;let r=i.atoms[i.index];if("text"===r.mode){let e="";for(;i.atoms[i.index]&&"text"===i.atoms[i.index].mode;)e+=i.atoms[i.index].body,i.index+=1;return i.ast={text:e},i}const n=Xn(io(r));if(xo(i))i.ast=po(i.ast,e(i,a).ast);else{if("root"===r.type)return i.index=0,i.atoms=r.body,e(i,a);if("mbin"===r.type&&"-"===n)i.index+=1,(i=e(i,a)).ast=ho(i.ast);else if("mbin"===r.type&&"+"===n)i.index+=1,(i=e(i,a)).ast=po("add",i.ast);else if("mord"===r.type&&/^[0-9.]$/.test(r.symbol)){let t="",n=!1,o=/^[0-9.eEdD]$/;for(;i.index0&&"\\"===d.charAt(0)&&"string"==typeof e.body&&(d=e.body)),l=Q(d,m,p).replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"),l!==d?(c={sym:l},m="normal"):c={sym:d};break;case"minner":case"mop":break;case"box":c=Mo(e.body,t);break;case"enclose":break;case"array":if("cardinality"===e.environmentName)c=po("card",Mo(e.array,t));else if(/array|matrix|pmatrix|bmatrix/.test(e.environmentName)){c={fn:"array",args:[]};for(const i of e.array)c.args.push(i.map(e=>Mo(e,t)))}else if("cases"===e.environmentName){c={fn:"cases",args:[]};for(const i of e.array)if(i[0]){const e=[];e.push(Mo(i[0],t));let a=Mo(i[1],t);a&&"text"===a.fn&&a.arg&&/^(if|when|for)$/i.test(a.arg[0].trim())&&(a=a.arg.filter(e=>"string"!=typeof e)),e.push(null!=a?a:{}),c.args.push(e)}}break;case"spacing":case"space":case"mathstyle":break;default:c=void 0}return c&&m&&"normal"!==m&&(c.variant=m),c&&"string"==typeof e.cssClass&&(c.class=e.cssClass),c&&"string"==typeof e.cssId&&(c.id=e.cssId),c}function wo(e){if(!e)return[];let i;if(t(e)){i=[];for(const t of e){const e=wo(t);i=i.concat(e)}}else{if("spacing"===e.type||"first"===e.type)return[];"box"===e.type?i=wo(e.body):(e.body&&t(e.body)&&(e.body=wo(e.body)),e.superscript&&t(e.superscript)&&(e.superscript=wo(e.superscript)),e.subscript&&t(e.subscript)&&(e.subscript=wo(e.subscript)),e.index&&t(e.index)&&(e.index=wo(e.index)),e.denom&&t(e.denom)&&(e.denom=wo(e.denom)),e.numer&&t(e.numer)&&(e.numer=wo(e.numer)),e.array&&t(e.array)&&(e.array=e.array.map(e=>e.map(e=>wo(e)))),i=[e])}return i}function Mo(e,t){return function(e,t){e.index=e.index||0,e.ast=void 0;const i=[];for(;e.atoms[e.index];)if("text"===e.atoms[e.index].mode){let t="";for(;e.atoms[e.index]&&"text"===e.atoms[e.index].mode;)t+=e.atoms[e.index].body,e.index+=1;i.push(po("text",t))}else{const a=ko(e,t).ast;if(!a)return;i.push(a)}return i.length>1?po("sequence",...i):i[0]||void 0}({atoms:wo(e)},t)}function So(e,t){return Mo(e,t)}function zo(e,...t){e=e||".. ";let i="";if(t.length>0){"."!==e[0]&&(i+=e[0]);let a="";for(const r of t)i+=a+r,a=e[2];"."!==e[1]&&(i+=e[1])}return i}function Lo(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}return i!==e.length&&(e+="\\ldots"),e.replace(/(\d{3})/g,"$1"+t.groupSeparator)}function Ao(e){return parseFloat(parseFloat(e).toPrecision(15))}function qo(e,t){let i,a="";if("number"==typeof t.precision){if("number"!=typeof e){let i="",a="";if("-"===e[0]?(i="-",e=e.substr(1)):"+"===e[0]&&(e=e.substr(1)),e.indexOf(".")>=0){const r=e.match(/(\d*).(\d*)([e|E]([-+]?[0-9]*))?/),n=r[1],o=r[2].substring(0,Math.min(t.precision-n.length,r[2].length));if(a=r[4]||"","0"===n){let a=0;for(;"0"===o[a]&&a=t.precision)r="0",i="";else{r=e[a];const i=Lo(e.substr(a+1),t);i&&(r+=t.decimalMarker+i)}"0"!==r&&(e.length-1>t.precision&&!r.endsWith("}")&&!r.endsWith("\\ldots")&&(r+="\\ldots"),a>4&&(r+=t.exponentProduct,t.exponentMarker?r+=t.exponentMarker+(1-a).toString():r+="10^{"+(1-a).toString()+"}")),e=r}else{e=n.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);const i=Lo(o,t);i&&(e+=t.decimalMarker+i)}}else if(e.length>t.precision){const i=e.length;let a=e[0];const r=Lo(e.substr(2),t);r&&(a+=t.decimalMarker+r,"}"!==a[a.length-1]&&(a+="\\ldots")),"1"!==a?a+=t.exponentProduct:a="",t.exponentMarker?a+=t.exponentMarker+(i-2).toString():a+="10^{"+(i-2).toString()+"}",e=a}else e=e.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);return a&&(a=t.exponentMarker?t.exponentMarker+a:t.exponentProduct+" 10^{"+a+"}"),i+e+a}i=Ao(e)}if("engineering"===t.scientificNotation)if(0===i)a="0";else{const e=Math.abs(i);let r=Math.round(Math.log10(e));r-=r%3,e<1e3&&(r=0);const n=e/Math.pow(10,r);let o="";const s=n.toString().match(/^(.*)\.(.*)$/);(null==s?void 0:s[1])&&s[2]&&(o=s[1]+t.decimalMarker+s[2]),t.groupSeparator&&(o=Lo(n.toExponential(),t));let l="";l=0===r?"":t.exponentMarker?t.exponentMarker+r:t.exponentProduct+" 10^{"+r+"}",a=(i<0?"-":"")+o+l}else{const i="string"==typeof e?e:e.toString();let r,n,o,s=i.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);r=i,o="",(null==s?void 0:s[1])&&s[2]&&(r=s[1],n=t.exponentMarker?t.exponentMarker+s[2]:t.exponentProduct+" 10^{"+s[2]+"}"),s=r.match(/^(.*)\.(.*)$/),(null==s?void 0:s[1])&&s[2]&&(r=s[1],o=s[2]),t.groupSeparator&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator),o=Lo(o,t)),o&&(o=t.decimalMarker+o),a=r+o+(n||"")}return a}class $o{constructor(e,t){this.stylesheets=[],this.config=Oa({namespace:"",substituteTextArea:void 0,readOnly:!1,createHTML:e=>e,fontsDirectory:"./fonts",defaultMode:"math",macros:R,horizontalSpacingScale:1,letterShapeStyle:"auto",smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,ignoreSpacebarInMathMode:!0,locale:_a.locale,strings:{},keybindings:oi,overrideDefaultInlineShortcuts:!1,inlineShortcuts:{},inlineShortcutTimeout:0,virtualKeyboardToggleGlyph:'',virtualKeyboardMode:"auto",virtualKeyboards:"all",virtualKeyboardLayout:"auto",customVirtualKeyboardLayers:{},customVirtualKeyboards:{},virtualKeyboardTheme:/android|cros/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?"material":"apple",keypressVibration:!0,keypressSound:null,plonkSound:null,textToSpeechRules:"mathlive",textToSpeechMarkup:"",textToSpeechRulesOptions:{},speechEngine:"local",speechEngineVoice:"Joanna",speechEngineRate:"100%",speakHook:Ea,readAloudHook:Ea,onAnnounce:Ta,onKeystroke:()=>!0,onMoveOutOf:()=>!0,onTabOutOf:()=>!0,onBlur:Ea,onFocus:Ea,onContentWillChange:Ea,onContentDidChange:Ea,onSelectionWillChange:Ea,onSelectionDidChange:Ea,onUndoStateWillChange:Ea,onUndoStateDidChange:Ea,onModeChange:Ea,onVirtualKeyboardToggle:Ea,onReadAloudStatus:Ea,onError:()=>{}},t),this.element=e,e.mathfield=this,this.originalContent=e.innerHTML;let i=this.element.textContent;i&&(i=i.trim()),rt(this.config.fontsDirectory,this.config.onError),this.stylesheets.push(nt(e,pr)),this.stylesheets.push(nt(e,'@-webkit-keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}@keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}.ML__caret:after{content:"";border:none;border-radius:2px;border-right:2px solid var(--caret);margin-right:-2px;position:relative;left:-1px;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text-caret:after{content:"";border:none;border-radius:1px;border-right:1px solid var(--caret);margin-right:-1px;position:relative;left:0;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__command-caret:after{content:"_";border:none;margin-right:-1ex;position:relative;color:var(--caret);-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__fieldcontainer{display:flex;flex-flow:row;justify-content:space-between;align-items:flex-end;min-height:39px;touch-action:none;width:100%;--hue:212;--highlight:hsl(var(--hue),97%,85%);--caret:hsl(var(--hue),40%,49%);--highlight-inactive:#ccc;--primary:hsl(var(--hue),40%,50%);--secondary:hsl(var(--hue),19%,26%);--on-secondary:hsl(var(--hue),19%,26%)}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}}body[theme=dark] .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}.ML__fieldcontainer:focus{outline:2px solid var(--primary);outline-offset:3px}.ML__fieldcontainer__field{align-self:center;position:relative;overflow:hidden;line-height:0;padding:2px;width:100%}.ML__virtual-keyboard-toggle{display:flex;align-self:center;align-items:center;flex-shrink:0;flex-direction:column;justify-content:center;width:34px;height:34px;padding:0;margin-right:4px;cursor:pointer;box-sizing:border-box;border-radius:50%;border:1px solid transparent;transition:background .2s cubic-bezier(.64,.09,.08,1);color:var(--primary);fill:currentColor;background:transparent}.ML__virtual-keyboard-toggle:hover{background:hsl(var(--hue),25%,35%);color:#fafafa;fill:currentColor;border-radius:50%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.ML__popover{visibility:hidden;min-width:160px;background-color:rgba(97,97,97,.95);color:#fff;text-align:center;border-radius:6px;position:fixed;z-index:1;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:all .2s cubic-bezier(.64,.09,.08,1)}.ML__popover:after{content:"";position:absolute;top:-5px;left:calc(50% - 3px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;font-size:1rem;border-bottom:5px solid rgba(97,97,97,.9)}.ML__popover--reverse-direction:after{top:auto;bottom:-5px;border-top:5px solid rgba(97,97,97,.9);border-bottom:0}.ML__textarea__textarea{transform:scale(0);resize:none;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;font-size:16px}.ML__focused .ML__text{background:hsla(var(--hue),40%,50%,.1)}.ML__smart-fence__close{opacity:.5}.ML__selection{background:var(--highlight-inactive);box-sizing:border-box}.ML__focused .ML__selection{background:var(--highlight)!important;color:var(--on-highlight)}.ML__contains-caret.ML__close,.ML__contains-caret.ML__open,.ML__contains-caret>.ML__close,.ML__contains-caret>.ML__open,.sqrt.ML__contains-caret>.sqrt-sign,.sqrt.ML__contains-caret>.vlist>span>.sqrt-line{color:var(--caret)}.ML__command{font-family:IBM Plex Mono,Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;letter-spacing:-1px;font-weight:400;line-height:1em;color:var(--primary)}:not(.ML__command)+.ML__command{margin-left:.25em}.ML__command+:not(.ML__command){padding-left:.25em}.ML__suggestion{opacity:.5}.ML__virtual-keyboard-toggle.pressed{background:hsla(0,0%,70%,.5)}.ML__virtual-keyboard-toggle:focus{outline:none;border-radius:50%;border:2px solid var(--primary)}.ML__virtual-keyboard-toggle.active,.ML__virtual-keyboard-toggle.active:hover{background:hsla(0,0%,70%,.5);color:#000;fill:currentColor}.ML__scroller{position:fixed;z-index:1;top:0;height:100vh;width:200px}[data-ML__tooltip]{position:relative}[data-ML__tooltip][data-placement=top]:after{top:inherit;bottom:100%}[data-ML__tooltip]:after{position:absolute;visibility:hidden;content:attr(data-ML__tooltip);display:inline-table;top:110%;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:200px;padding:8px;background:#616161;color:#fff;text-align:center;z-index:2;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);border-radius:2px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:400;font-size:12px;opacity:0;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1)}@media only screen and (max-width:767px){[data-ML__tooltip]:after{height:32px;padding:4px 16px;font-size:14px}}[data-ML__tooltip]:hover{position:relative}[data-ML__tooltip]:hover:after{visibility:visible;opacity:1;transform:scale(1)}[data-ML__tooltip][data-delay]:after{transition-delay:0s}[data-ML__tooltip][data-delay]:hover:after{transition-delay:1s}'));let a="";this.config.substituteTextArea?"string"==typeof this.config.substituteTextArea?a+=this.config.substituteTextArea:a+="":/android|ipad|ipod|iphone/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?a+="\n \n \n ":a+='',a+='',"manual"===this.config.virtualKeyboardMode?(a+=`
    `,this.config.virtualKeyboardToggleGlyph?a+=this.config.virtualKeyboardToggleGlyph:a+='',a+="
    "):a+="",a+="
    ",a+='\n
    \n \n \n
    \n ',this.element.innerHTML=this.config.createHTML(a);let r=0;"function"==typeof this.config.substituteTextArea?this.textarea=this.config.substituteTextArea():this.textarea=this.element.children[r++].firstElementChild,this.field=this.element.children[r].children[0],this.field.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation();const t=void 0===e.deltaX?e.detail:-e.deltaX;isFinite(t)&&this.field.scroll({top:0,left:this.field.scrollLeft-5*t})},{passive:!1}),this.virtualKeyboardToggleDOMNode=this.element.children[r++].children[1],vi(this,this.virtualKeyboardToggleDOMNode,{default:"toggleVirtualKeyboard",alt:"toggleVirtualKeyboardAlt",shift:"toggleVirtualKeyboardShift"}),this.ariaLiveText=this.element.children[r].children[0],this.accessibleNode=this.element.children[r++].children[1],this.popover=hi("mathlive-popover-panel","ML__popover"),this.stylesheets.push(nt(e,"div.ML__popover.is-visible{visibility:inherit;-webkit-animation:ML__fade-in .15s cubic-bezier(0,0,.2,1);animation:ML__fade-in .15s cubic-bezier(0,0,.2,1)}@-webkit-keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}@keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}.ML__popover__content{border-radius:6px;padding:2px;cursor:pointer;min-height:100px;display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:8px}.ML__popover__content a{color:#5ea6fd;padding-top:.3em;margin-top:.4em;display:block}.ML__popover__content a:hover{color:#5ea6fd;text-decoration:underline}.ML__popover__content.active,.ML__popover__content.pressed,.ML__popover__content:hover{background:hsla(0,0%,100%,.1)}.ML__popover__command{font-size:1.6rem}.ML__popover__prev-shortcut{height:31px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:4px;padding-bottom:2px}.ML__popover__next-shortcut:hover,.ML__popover__prev-shortcut:hover{opacity:.3}.ML__popover__next-shortcut.active,.ML__popover__next-shortcut.pressed,.ML__popover__prev-shortcut.active,.ML__popover__prev-shortcut.pressed{opacity:1}.ML__popover__next-shortcut>span,.ML__popover__prev-shortcut>span{padding:5px;border-radius:50%;width:20px;height:20px;display:inline-block}.ML__popover__prev-shortcut>span>span{margin-top:-2px;display:block}.ML__popover__next-shortcut>span>span{margin-top:2px;display:block}.ML__popover__next-shortcut:hover>span,.ML__popover__prev-shortcut:hover>span{background:hsla(0,0%,100%,.1)}.ML__popover__next-shortcut{height:34px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:2px;padding-bottom:4px}.ML__popover__shortcut{font-size:.8em;margin-top:.25em}.ML__popover__note,.ML__popover__shortcut{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;opacity:.7;padding-top:.25em}.ML__popover__note{font-size:.8rem;line-height:1em;padding-left:.5em;padding-right:.5em}.ML__shortcut-join{opacity:.5}")),this.keystrokeCaption=hi("mathlive-keystroke-caption-panel","ML__keystroke-caption"),this.stylesheets.push(nt(e,".ML__keystroke-caption{visibility:hidden;background:var(--secondary);border-color:var(--secondary-border);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);text-align:center;border-radius:6px;padding:16px;position:absolute;z-index:1;display:flex;flex-direction:row;justify-content:center;--keystroke:#fff;--on-keystroke:#555;--keystroke-border:#f7f7f7}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}}body[theme=dark] .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}.ML__keystroke-caption>span{min-width:14px;margin:0 8px 0 0;padding:4px;background-color:var(--keystroke);color:var(--on-keystroke);fill:currentColor;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1em;border-radius:6px;border:2px solid var(--keystroke-border)}")),this.keystrokeCaptionVisible=!1,this.virtualKeyboardVisible=!1,this.keystrokeBuffer="",this.keystrokeBufferStates=[],this.keystrokeBufferResetTimer=null,this.suggestionIndex=0,this.mode=this.config.defaultMode,this.smartModeSuppressed=!1,this.style={},this.blurred=!0,pi(this.element,"focus",this),pi(this.element,"blur",this),pi(this.textarea,"cut",this),pi(this.textarea,"copy",this),pi(this.textarea,"paste",this),function(e,t){let i,a=null,r=null,n=!1,o=!1;function s(e){clearTimeout(i),i=setTimeout((function(){clearTimeout(i),e()}))}function l(){if(function(e){return e.selectionStart!==e.selectionEnd}(e))return;const i=e.value;e.value="",i.length>0&&t.typedText(i)}const c=e;c.addEventListener("keydown",i=>{if(t.allowDeadKey()||"Dead"!==i.key&&"Unidentified"!==i.key&&229!==i.keyCode)o=!1;else{o=!0,n=!1;const i=t.blur,a=t.focus;t.blur=null,t.focus=null,"function"==typeof e.blur&&(e.blur(),e.focus()),t.blur=i,t.focus=a}return!(!n&&"CapsLock"!==i.code&&!/(Control|Meta|Alt|Shift)(Right|Left)/.test(i.code))||(a=i,r=null,t.keystroke(ga(i),i))},!0),c.addEventListener("keypress",e=>{n||(a&&r&&t.keystroke(ga(a),a),r=e,s(l))},!0),c.addEventListener("keyup",()=>{n||!a||r||l()},!0),c.addEventListener("paste",()=>{e.focus();const i=e.value;e.value="",i.length>0&&t.paste(i)},!0),c.addEventListener("blur",()=>{a=null,r=null,t.blur&&t.blur()},!0),c.addEventListener("focus",()=>{t.focus&&t.focus()},!0),c.addEventListener("compositionstart",()=>{n=!0},!0),c.addEventListener("compositionend",()=>{n=!1,o&&t.allowDeadKey()&&s(l)},!0),c.addEventListener("input",()=>{if(o){const i=t.blur,a=t.focus;t.blur=null,t.focus=null,e.blur(),e.focus(),t.blur=i,t.focus=a,o=!1,n=!1,t.allowDeadKey()&&s(l)}else n||s(l)})}(this.textarea,{allowDeadKey:()=>"text"===this.mode,typedText:e=>Ha(this,e),paste:()=>Ua(this),keystroke:(e,t)=>Ia(this,e,t),focus:()=>this._onFocus(),blur:()=>this._onBlur()}),window.PointerEvent?pi(this.field,"pointerdown",this):pi(this.field,"touchstart:active mousedown",this),pi(window,"resize",this),this.model=new bt({mode:this.config.defaultMode,macros:this.config.macros,removeExtraneousParentheses:this.config.removeExtraneousParentheses},{onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError},{announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)},this),this.undoManager=new ba(this.model),da(this.model,i,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:!0,macros:this.config.macros}),this.undoManager.startRecording(),this.undoManager.snapshot(this.config),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ni().locale)||ri(this.config.locale),this.keybindings=mi(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),Vi(this)}$setConfig(e){this.config=Oa(this.config,e),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ni().locale)||ri(this.config.locale),this.keybindings=mi(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),this.config.readOnly||this._onBlur(),Vi(this)}getConfig(e){return Ba(this.config,e)}handleEvent(e){switch(e.type){case"focus":this._onFocus();break;case"blur":this._onBlur();break;case"touchstart":case"mousedown":case"pointerdown":!function(e,t){const i=e;let a,r=!1,n=!1,o=!1;if(1!==t.buttons&&0!==t.buttons)return;let s=!1,l=!1;const c=t.touches?t.touches[0].clientX:t.clientX,d=t.touches?t.touches[0].clientY:t.clientY,m=Date.now(),p=setInterval(()=>{s?i.field.scroll({top:0,left:i.field.scrollLeft-16}):l&&i.field.scroll({top:0,left:i.field.scrollLeft+16})},32);function u(e){window.PointerEvent?(ui(i.field,"pointermove",h),ui(i.field,"pointerup pointercancel",u),i.field.releasePointerCapture(e.pointerId)):(ui(i.field,"touchmove",h),ui(i.field,"touchcancel touchend",u),ui(window,"mousemove",h),ui(window,"mouseup blur",u)),r=!1,clearInterval(p),i.element.querySelectorAll(".ML__scroller").forEach(e=>e.parentNode.removeChild(e)),e.preventDefault(),e.stopPropagation()}function h(t){const r=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,p="touch"===t.pointerType?20:5;if(Date.now()u.right,s=r=f.left&&c<=f.right&&d>=f.top&&d<=f.bottom){e.$hasFocus()||(o=!0,e.textarea.focus&&e.textarea.focus()),e.resetKeystrokeBuffer(),e.smartModeSuppressed=!1;const s=e.field.querySelector(".ML__mathlive").getBoundingClientRect();if(a=c>s.right?[{relation:"body",offset:e.model.root.body.length-1}]:Xa(e,c,d,{bias:0}),a){let s=document.createElement("div");s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.left-200+"px",s=document.createElement("div"),s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.right+"px",t.shiftKey?(Ut(e.model,e.model.path,a),a=pt(e.model.path),a[a.length-1].offset-=1):jt(e.model,a,0),o=!0,e.style={},3===t.detail||Ga>2?(u(t),3!==t.detail&&3!==Ga||Ft(e.model)):r||(r=!0,window.PointerEvent?(pi(i.field,"pointermove",h),pi(i.field,"pointerup pointercancel",u),i.field.setPointerCapture(t.pointerId)):(pi(window,"blur",u),t.touches?(pi(t.target,"touchmove",h),pi(t.target,"touchcancel touchend",u)):(pi(window,"mousemove",h),pi(window,"mouseup",u))),2!==t.detail&&2!==Ga||(n=!0,Bt(e.model)))}}else ja=null;o&&Vi(e),t.preventDefault()}(this,e);break;case"resize":this.resizeTimer&&window.cancelAnimationFrame(this.resizeTimer),this.resizeTimer=window.requestAnimationFrame(()=>gi(this)&&this._onResize());break;case"cut":t=this,setTimeout(function(){t.$clearSelection(),Vi(t)}.bind(t),0);break;case"copy":!function(e,t){Pt(e.model)?(t.clipboardData.setData("text/plain","$$"+e.$text("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$text("json")),t.clipboardData.setData("application/xml",e.$text("mathML"))):(t.clipboardData.setData("text/plain","$$"+e.$selectedText("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$selectedText("json")),t.clipboardData.setData("application/xml",e.$selectedText("mathML"))),t.preventDefault()}(this,e);break;case"paste":Ua(this)}var t}$revertToOriginalContent(){this.element.innerHTML=this.config.createHTML(this.originalContent),delete this.element.mathfield,delete this.accessibleNode,delete this.ariaLiveText,delete this.field,ui(this.textarea,"cut",this),ui(this.textarea,"copy",this),ui(this.textarea,"paste",this),this.textarea.remove(),delete this.textarea,this.virtualKeyboardToggleDOMNode.remove(),delete this.virtualKeyboardToggleDOMNode,fi(this.popover),delete this.popover,fi(this.keystrokeCaption),delete this.keystrokeCaption,fi(this.virtualKeyboard),delete this.virtualKeyboard,fi(document.getElementById("mathlive-alternate-keys-panel")),ui(this.element,"pointerdown",this),ui(this.element,"touchstart:active mousedown",this),ui(this.element,"focus",this),ui(this.element,"blur",this),ui(window,"resize",this),delete this.element,this.stylesheets.forEach(e=>e.release())}resetKeystrokeBuffer(){this.keystrokeBuffer="",this.keystrokeBufferStates=[],clearTimeout(this.keystrokeBufferResetTimer)}_onSelectionDidChange(){!function(e){const t=Mt(e);if(t){const i=e.siblings(),a=e.anchorOffset()+1;for(let e=t.start;e=0;t--)"command"===i[t].type?i.splice(t,1):e(i[t]);else if(e(i.body),e(i.superscript),e(i.subscript),e(i.underscript),e(i.overscript),e(i.numer),e(i.denom),e(i.index),i.array)for(let t=gt(i.array);t>=0;t--)e(ft(i.array,t))}(e.root.body),e.suppressChangeNotifications=i,_t(e)}(this.model))}_i(this,{deferred:!0}),"function"==typeof this.config.onSelectionDidChange&&this.config.onSelectionDidChange(this)}_onFocus(){this.config.readOnly||this.blurred&&(this.blurred=!1,this.textarea.focus&&this.textarea.focus(),"onfocus"===this.config.virtualKeyboardMode&&cr(this),_i(this),this.config.onFocus&&this.config.onFocus(this),Vi(this))}_onBlur(){this.blurred||(this.blurred=!0,this.ariaLiveText.textContent="","onfocus"===this.config.virtualKeyboardMode&&dr(this),Sa(this,{discard:!0}),Vi(this),this.config.onBlur&&this.config.onBlur(this))}_onResize(){this.element.classList.remove("ML__isNarrowWidth","ML__isWideWidth","ML__isExtendedWidth"),window.innerWidth>=1024?this.element.classList.add("ML__isExtendedWidth"):window.innerWidth>=768?this.element.classList.add("ML__isWideWidth"):this.element.classList.add("ML__isNarrowWidth"),_i(this)}$perform(e){return function(e,i){var a;if(!i)return!1;let r,n=[],o=!1,s=!1;if(t(i)?(r=i[0],n=i.slice(1)):r=i,r=r.replace(/-\w/g,e=>e[1].toUpperCase()),"model"===(null===(a=ji[r])||void 0===a?void 0:a.target)){if(/^(delete|transpose|add)/.test(r)&&e.resetKeystrokeBuffer(),/^(delete|transpose|add)/.test(r)&&"command"!==e.mode&&(e.popUndoStack(),e.snapshot()),ji[r].fn(e.model,...n),/^(delete|transpose|add)/.test(r)&&"command"!==e.mode&&e.snapshot(),/^(delete)/.test(r)&&"command"===e.mode){const t=ne(Si(e.model));0===t.length?Mi(e):ki(e,t[0].match,t.length>1)}s=!0,o=!0}else{if(!ji[r])throw Error('Unknown command "'+r+'"');s=ji[r].fn(e,...n),o=!0}return Pt(e.model)&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(r)||(e.resetKeystrokeBuffer(),e.style={}),s&&Vi(e),o}(this,e)}formatMathlist(e,t){let i="";if("latex"===(t=t||"latex")||"latex-expanded"===t)i=e.toLatex("latex-expanded"===t);else if("mathML"===t)i=Hi(e,this.config);else if("spoken"===t)i=$a(e,this.config);else if("spoken-text"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="",i=$a(e,this.config),this.config.textToSpeechMarkup=t}else if("spoken-ssml"===t||"spoken-ssml-withHighlighting"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="ssml",i=$a(e,this.config),this.config.textToSpeechMarkup=t}else if("mathjson"===t){const t=Pn(e.toLatex(!0),{form:"canonical"});i=JSON.stringify(t)}else if("json"===t){const t=So(e);i=JSON.stringify(t)}else if("json-2"===t){const t=So(e);i=JSON.stringify(t,null,2)}else"ASCIIMath"===t&&(i=ka(e));return i}$text(e){return this.formatMathlist(this.model.root,e)}$selectedText(e){const t=Ot(this.model);if(!t)return"";const i=Fe("math",t);return this.formatMathlist(i,e)}$selectionIsCollapsed(){return Pt(this.model)}$selectionDepth(){return this.model.path.length}$selectionAtStart(){return 0===this.model.startOffset()}$selectionAtEnd(){return this.model.endOffset()>=this.model.siblings().length-1}groupIsSelected(){return 0===this.model.startOffset()&&this.model.endOffset()>=this.model.siblings().length-1}$latex(e,t){return"string"==typeof e?(e!==this.model.root.toLatex()&&(t=null!=t?t:{mode:"math"},da(this.model,e,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:t.suppressChangeNotifications,macros:this.config.macros}),this.undoManager.snapshot(this.config),Vi(this)),e):this.model.root.toLatex()}$el(){return this.element}scrollIntoView(){var e;this.dirty&&Ui(this);let t=null===(e=yi(this.field))||void 0===e?void 0:e.x;const i=this.field.getBoundingClientRect();if(void 0===t){const e=bi(this.field);null!==e&&(t=e.right+i.left-this.field.scrollLeft)}if(void 0!==t){const e=t-window.scrollX;ei.right&&this.field.scroll({top:0,left:e-i.right+this.field.scrollLeft+20,behavior:"smooth"})}}$insert(e,t){if("string"==typeof e&&e.length>0){if((t=null!=t?t:{mode:"math"}).focus&&this.$focus(),t.feedback&&(this.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play())),"\\\\"===e)Qi(this.model);else if("&"===e)Ji(this.model);else{const i=this.style;da(this.model,e,{mode:this.mode,style:zt(this.model),...t}),t.resetStyle&&(this.style=i)}return this.undoManager.snapshot(this.config),Vi(this),!0}return!1}switchMode(e,t="",i=""){this.resetKeystrokeBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(e),t&&this.$insert(t,{format:"latex",mode:{math:"text",text:"math"}[e]}),zi(this.model,!1),"command"===e?(st(this.model),Mi(this),this.suggestionIndex=0,this.virtualKeyboardVisible&&lr(this,"lower-command"),da(this.model,"",{mode:"math"})):this.mode=e,i&&this.$insert(i,{format:"latex",mode:e}),"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),Vi(this)}$hasFocus(){return document.hasFocus()&&function e(t=document){var i,a;return(null===(a=null===(i=t.activeElement)||void 0===i?void 0:i.shadowRoot)||void 0===a?void 0:a.activeElement)?e(t.activeElement.shadowRoot):t.activeElement}(document)===this.textarea}$focus(){this.$hasFocus()||("function"==typeof this.textarea.focus&&this.textarea.focus(),this.model.announce("line"))}$blur(){this.$hasFocus()&&this.textarea.blur&&this.textarea.blur()}$select(){Ft(this.model)}$clearSelection(){ta(this.model)}$applyStyle(e){ca(this.model,e)}$keystroke(e,t){return Ia(this,e,t)}$typedText(e){Ha(this,e)}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(){this.undoManager.snapshot({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}snapshotAndCoalesce(){this.undoManager.snapshotAndCoalesce({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}getUndoRecord(){return this.undoManager.save()}restoreToUndoRecord(e){this.undoManager.restore(e,{...this.config,suppressChangeNotifications:!0})}undo(){return this.undoManager.undo({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}redo(){return this.undoManager.redo({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}}function Co(e,t,i){let a=i,r=0;const n=e.length;for(;a0&&r.push({type:"text",data:o.slice(0,c)}),l=!1);let d=!1;for(;!d;){if(l){if(s=o.indexOf(t,c),-1===s){d=!0;break}c!==s&&r.push({type:"text",data:o.slice(c,s)}),c=s}else{if(s=Co(i,o,c+t.length),-1===s){d=!0;break}r.push({type:"math",data:o.slice(c+t.length,s),rawData:o.slice(c,s+i.length),mathstyle:a}),c=s+i.length}l=!l}c";i.innerHTML=t.createHTML?t.createHTML(a):a}catch(t){i.textContent=e}return i.className="ML__sr-only",i}(e,i)),/\bspeakable-text\b/i.test(i.renderAccessibleContent)&&i.renderToSpeakableText){const a=document.createElement("span"),r=i.renderToSpeakableText(e,i);a.innerHTML=i.createHTML?i.createHTML(r):r,a.className="ML__sr-only",t.appendChild(a)}return t.appendChild(r),t}return r}function Ko(e,t){let i=null;if(t.TeX.processEnvironments&&/^\s*\\begin/.test(e))i=document.createDocumentFragment(),i.appendChild(Eo(e,void 0,t,!0));else{if(!e.trim())return null;const a=To(e,t.TeX.delimiters);if(1===a.length&&"text"===a[0].type)return null;i=document.createDocumentFragment();for(let e=0;e0?Oo(e[t].children,i):e[t];if("string"==typeof t){for(let r=0;r0?Oo(e[r].children,i):e[r];if(a=Oo(e[r].children,t),a)return a}return a}return null}function Bo(e,t){var i;const a=Oo(e,t);return a?null!==(i=a.classes)&&void 0!==i?i:"":null}function Fo(e,t){let i="";return e[t]&&(i+=''+t+"=",i+='',i+=e[t],i+='" '),i}var Po={mathlistToMarkup:function e(t,i=""){if(!t)return"";let a="";if(Array.isArray(t))for(let r=0;r"),"string"==typeof t.body&&t.body.length>0&&(a+=' ',a+=t.body,(t.body.charCodeAt(0)<32||t.body.charCodeAt(0)>127)&&(a+=" U+"+("000000"+t.body.charCodeAt(0).toString(16)).substr(-6)),a+=" "),"mathrm"===t.fontFamily?(a+='',a+=Fo(t,"fontFamily"),a+=""):a+=Fo(t,"fontFamily"),a+=Fo(t,"hasBarLine"),a+=Fo(t,"leftDelim"),a+=Fo(t,"rightDelim"),a+=Fo(t,"continuousFraction"),a+=Fo(t,"limits"),a+=Fo(t,"symbol"),a+=function(e,t){let i="";return e.framecolor&&(i+='framecolor=',i+='',i+='',i+=e.framecolor,i+=""),i}(t),a+=Fo(t,"mathstyle"),a+=Fo(t,"size"),a+=Fo(t,"cls"),a+=Fo(t,"delim"),a+=Fo(t,"shift"),a+=Fo(t,"width"),a+=Fo(t,"height"),a+=Fo(t,"position"),a+=e(t.overscript,i+"↑"),a+=e(t.underscript,i+"↓"),a+=e(t.superscript,i+"↑"),a+=e(t.subscript,i+"↓"),a+=e(t.body,i+"▶"),a+=e(t.numer,i+"▲"),a+=e(t.denom,i+"▼"),t.array)for(let r=0;r"+i+"⌗ row "+(r+1)+"/"+t.array.length;for(let n=0;n"),t.body&&t.body.length>0&&(a+=''+t.body+""),t.classes&&t.classes.length>0&&(a+=' '+t.classes+""),t.isTight&&(a+='  tight '),t.caret&&(a+='  caret '),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=' '+e+":",a+=' '+t.style[e]+"; ");t.children&&(a+=t.children.map(t=>e(t,i+"▷")).join("; "))}return a},spanToString:function e(t,i=""){let a="";if(Array.isArray(t))if(0===t.length)a+="[]\n";else{a+="[\n";for(let r=0;r0&&(a+=i+'body:"'+t.body+'",\n'),t.classes&&t.classes.length>0&&(a+=i+'classes:"'+t.classes+'",\n'),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=i+e+':"',a+=t.style[e]+'",\n');t.children&&t.children.length>0&&(a+=i+"children:"+t.children.map(t=>e(t,i)).join("; ")),a+=i+"}"}return a},hasClass:function(e,t,i){const a=Bo(e,t);if(!a)return!1;const r=a.split(" ");for(let e=0;e{if(e)return;if(!t||!t.AudioStream)return;const i=new TextDecoder("utf-8").decode(new Uint8Array(t.AudioStream));window.mathlive.readAloudMarks=i.split("\n").map(e=>e?JSON.parse(e):{}),window.mathlive.readAloudTokens=[];for(const e of window.mathlive.readAloudMarks)e.value&&window.mathlive.readAloudTokens.push(e.value);window.mathlive.readAloudCurrentMark="",n.OutputFormat="mp3",n.SpeechMarkTypes=[],r.synthesizeSpeech(n,(function(e,t){if(e)return;if(!t||!t.AudioStream)return;const i=new Uint8Array(t.AudioStream),a=new Blob([i.buffer],{type:"audio/mpeg"}),r=URL.createObjectURL(a);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener("ended",()=>{const e=window.mathlive.readAloudMathField;o&&o(e,"ended"),e?(Ui(e),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=""):function e(t){if(t.classList.remove("ML__highlight"),t.children)for(const i of t.children)e(i)}(window.mathlive.readAloudElement)}),window.mathlive.readAloudAudio.addEventListener("timeupdate",()=>{let e="";const t=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.time0&&Array.from(t.children).forEach(t=>{e(t,i)})):(t.classList.add("ML__highlight"),t.children&&t.children.length>0&&Array.from(t.children).forEach(t=>{e(t)}))}(window.mathlive.readAloudElement,window.mathlive.readAloudCurrentMark)))})),window.mathlive.readAloudAudio.src=r,o&&o(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()}))})}function Io(e,t,i=3e3,a="$0"){t.forEach(t=>{O[t]&&(O[t].frequency=i,O[t].category=e,O[t].template=a.replace(/\$0/g,t)),F[t]&&(F[t]={...F[t],frequency:i,category:e,template:a.replace(/\$0/g,t)})})}function Ho(e,t){var i;(t=null!=t?t:{}).mathstyle=t.mathstyle||"displaystyle",t.letterShapeStyle=t.letterShapeStyle||"auto",t.macros={...R,...null!==(i=t.macros)&&void 0!==i?i:{}};const a=et(e,"math",null,t.macros,!1,t.onError);let r=Oe({mathstyle:d[t.mathstyle],letterShapeStyle:t.letterShapeStyle},a);return r=function e(t){if(!t||0===t.length)return[];t[0].children=e(t[0].children);const i=[t[0]];for(let a=1;a0\\right\\}"),Io("Layout",["\\overset","\\underset","\\stackrel","\\stackbin"],1200,"$0{arg}{x=0}"),Io("Layout",["\\rlap","\\mathrlap"],1200,"$0{/}0"),Io("Layout",["\\llap","\\mathllap"],1200,"o$0{/}"),Io("Fractions",["\\frac"],4e3,"$0{\\placeholder{}}{\\placeholder{}}"),Io("Fractions",["\\binom","\\dfrac","\\tfrac","\\dbinom","\\tbinom","\\pdiff","\\cfrac"],1200,"$0{\\placeholder{}}{\\placeholder{}}"),Io("Fractions",["\\over","\\atop","\\choose"],1200,'\\unicode{"2B1A} $0 \\unicode{"2B1A}'),Io("Fractions",["\\overwithdelims","\\atopwithdelims"],1200,'{\\unicode{"2B1A} $0{\\lbrace}{\\rbrace} \\unicode{"2B1A}}'),Io("Extensible Operators",["\\sum","\\prod","\\bigcap","\\bigcup","\\int"],4e3),Io("Extensible Operators",["\\bigoplus","\\smallint","\\iint","\\oint"],3e3),Io("Extensible Operators",["\\bigwedge","\\bigvee","\\coprod","\\bigsqcup","\\bigotimes","\\bigodot","\\biguplus","\\intop","\\sqcup","\\sqcap","\\uplus","\\wr","\\Cap","\\Cup","\\doublecap","\\doublecup","\\amalg","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"],1200),Io("Accents",["\\vec"],4e3),Io("Accents",["\\bar","\\ddot","\\acute","\\tilde","\\check"],3e3,"$0{\\placeholder{}}"),Io("Accents",["\\^","\\`","\\'"],1200,"$0{e}"),Io("Accents",["\\c"],1200,"$0{c}"),Io("Accents",["\\~"],1200,"$0{n}"),Io("Accents",["\\mathring","\\hat","\\dot","\\breve","\\grave"],1200,"$0{\\placeholder{}}"),Io("Extensible Symbols",["\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftharpoon","\\overrightharpoon","\\overleftrightarrow","\\overbrace","\\overlinesegment","\\overgroup","\\widehat","\\widecheck","\\widetilde"],3e3,"$0{ABC}"),Io("Extensible Symbols",["\\underrightarrow","\\underleftarrow","\\underleftrightarrow","\\underbrace","\\underlinesegment","\\undergroup","\\utilde"],3e3,"$0{ABC}"),Io("Sizing",["\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],1200,"$0{x=0}"),Io("Sizing",["\\big","\\Big","\\bigg","\\Bigg"],1200,"$0($0)"),Io("Sizing",["\\bigl","\\Bigl","\\biggl","\\Biggl"],1200,"$0("),Io("Sizing",["\\bigr","\\Bigr","\\biggr","\\Biggr"],1200,"$0)"),Io("Sizing",["\\bigm","\\Bigm","\\biggm","\\Biggm"],1200,"$0|"),Io("Letterlike Symbols",["\\nabla","\\partial","\\doubleStruckCapitalN","\\N","\\doubleStruckCapitalR","\\R","\\doubleStruckCapitalQ","\\Q","\\doubleStruckCapitalC","\\C","\\doubleStruckCapitalZ","\\Z","\\exponentialE","\\forall","\\exists","\\nexists","\\$","\\%","\\And","\\degree"],4e3),Io("Letterlike Symbols",["\\doubleStruckCapitalP","\\P","\\ell","\\hbar","\\hslash","\\imath","\\jmath","\\imaginaryI","\\imaginaryJ","\\differentialD","\\rd","\\capitalDifferentialD","\\rD","\\differencedelta","\\mid","@","\\Re","\\Im"],3e3),Io("Letterlike Symbols",["\\top","\\bot","\\scriptCapitalE","\\scriptCapitalH","\\scriptCapitalL","\\gothicCapitalC","\\gothicCapitalH","\\gothicCapitalI","\\gothicCapitalR","\\Bbbk","\\Finv","\\Game","\\wp","\\eth","\\mho","\\pounds","\\yen","\\euro"],1200),Io("Crosses",["\\dagger","\\dag"],4e3),Io("Crosses",["\\ddag","\\ddagger","\\maltese","\\textdagger","\\textdaggerdbl"],1200),Io("Various",["\\checkmark","\\diagup","\\diagdown","\\angle","\\measuredangle","\\sphericalangle","\\prime","\\doubleprime","\\backprime","\\backdoubleprime","\\sharp","\\flat","\\natural","\\&","\\#","\\clubsuit","\\spadesuit","\\diamondsuit","\\heartsuit","\\backslash","\\infty","/","\\_","\\/","|","'"],1200),Io("Various",["\\unicode"],1200,'$0{"2B1A}'),Io("Arrows",["\\longrightarrow","\\rightarrow","\\Longrightarrow","\\Rightarrow"],4e3),Io("Arrows",["\\longmapsto","\\mapsto","\\Longleftrightarrow","\\rightleftarrows","\\leftarrow","\\curvearrowleft","\\uparrow","\\downarrow","\\hookrightarrow","\\rightharpoonup","\\rightleftharpoons"],3e3),Io("Arrows",["\\Leftarrow","\\longleftrightarrow","\\longleftarrow","\\Longleftarrow","\\searrow","\\nearrow","\\swarrow","\\nwarrow","\\Uparrow","\\Downarrow","\\updownarrow","\\Updownarrow","\\hookleftarrow","\\leftharpoonup","\\leftharpoondown","\\rightharpoondown","\\leftrightarrows","\\dashrightarrow","\\dashleftarrow","\\leftleftarrows","\\Lleftarrow","\\twoheadleftarrow","\\leftarrowtail","\\looparrowleft","\\leftrightharpoons","\\circlearrowleft","\\Lsh","\\upuparrows","\\downharpoonleft","\\multimap","\\leftrightsquigarrow","\\twoheadrightarrow","\\rightarrowtail","\\looparrowright","\\curvearrowright","\\circlearrowright","\\Rsh","\\downdownarrows","\\upharpoonright","\\downharpoonright","\\rightsquigarrow","\\leadsto","\\Rrightarrow","\\restriction"],1200),Io("Arrows",["\\upharpoonleft","\\rightrightarrows"],0),Io("Negated Arrows",["\\nrightarrow","\\nRightarrow","\\nleftrightarrow","\\nLeftrightarrow","\\nleftarrow","\\nLeftarrow"],1200),Io("Extensible Symbols",["\\xrightarrow","\\xleftarrow","\\xRightarrow","\\xLeftarrow","\\xleftharpoonup","\\xleftharpoondown","\\xrightharpoonup","\\xrightharpoondown","\\xlongequal","\\xtwoheadleftarrow","\\xtwoheadrightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xrightleftharpoons","\\xleftrightharpoons","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],1200,"$0[below]{above}=0"),Io("Negated Relations",["\\nless","\\nleqslant","\\lneq","\\lneqq","\\nleqq","\\unlhd","\\unrhd","\\lvertneqq","\\lnsim","\\lnapprox","\\nprec","\\npreceq","\\precnsim","\\precnapprox","\\nsim","\\nshortmid","\\nmid","\\nvdash","\\nvDash","\\ngtr","\\ngeqslant","\\ngeqq","\\gneq","\\gneqq","\\gvertneqq","\\gnsim","\\nsucc","\\succnsim","\\ncong","\\nshortparallel","\\nparallel","\\nVDash","\\nVdash","\\precneqq","\\succneqq","\\gnapprox","\\succnapprox","\\nsucceq"],1200),Io("Hebrew",["\\aleph","\\beth","\\daleth","\\gimel"],1200),Io("Fences",["\\lbrace","\\rbrace","\\vert","\\Vert","\\{","\\}","(",")","[","]"],4e3),Io("Fences",["\\langle","\\rangle","\\lfloor","\\rfloor","\\lceil","\\rceil","\\mvert","\\|","\\mVert"],3e3),Io("Fences",["\\lvert","\\rvert","\\lVert","\\rVert","\\lbrack","\\rbrack","\\ulcorner","\\urcorner","\\llcorner","\\lrcorner","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],1200),Io("Relations",["=","\\ne","\\neq","<",">","\\leqslant","\\geqslant","\\approx"],4e3),Io("Relations",["\\lt","\\gt","\\le","\\ge","\\leq","\\geq","\\gg","\\cong","\\equiv","\\prec","\\preceq","\\succ","\\perp","\\parallel","\\propto","\\smile","\\frown","\\sim","\\gtrsim"],3e3),Io("Relations",["\\coloneq","\\succeq","\\approxeq","\\thickapprox","\\lessapprox","\\gtrapprox","\\precapprox","\\succapprox","\\thicksim","\\succsim","\\precsim","\\backsim","\\eqsim","\\backsimeq","\\simeq","\\lesssim","\\nleq","\\ngeq","\\smallsmile","\\smallfrown","\\bowtie","\\asymp","\\leqq","\\eqslantless","\\ll","\\lll","\\lessgtr","\\lesseqgtr","\\lesseqqgtr","\\risingdotseq","\\fallingdotseq","\\preccurlyeq","\\curlyeqprec","\\vDash","\\Vvdash","\\bumpeq","\\Bumpeq","\\geqq","\\eqslantgtr","\\ggg","\\gtrless","\\gtreqless","\\gtreqqless","\\succcurlyeq","\\curlyeqsucc","\\Vdash","\\shortmid","\\shortparallel","\\between","\\pitchfork","\\varpropto","\\backepsilon","\\llless","\\gggtr","\\lhd","\\rhd","\\Join","\\doteq","\\doteqdot","\\Doteq","\\eqcirc","\\circeq","\\lessdot","\\gtrdot","\\measeq","\\eqdef","\\questeq"],1200),Io("Logic",["\\leftrightarrow","\\Leftrightarrow","\\to"],4e3),Io("Logic",["\\models","\\vdash"],3e3),Io("Logic",["\\therefore","\\because","\\implies","\\gets","\\dashv","\\impliedby","\\biconditional","\\roundimplies"],1200),Io("Operators",["+","-","*","\\cdot"],4e3),Io("Operators",["\\sqrt"],4e3,"$0{\\placeholder{}}"),Io("Operators",["\\pm","\\mp","\\times","\\div","\\surd"],3e3),Io("Operators",["\\ltimes","\\rtimes","\\leftthreetimes","\\rightthreetimes","\\intercal","\\dotplus","\\centerdot","\\doublebarwedge","\\divideontimes","\\divides"],1200),Io("Logic",["\\wedge","\\vee","\\neg"],4e3),Io("Logic",["\\lnot"],3e3),Io("Logic",["\\land","\\lor","\\barwedge","\\veebar","\\nor","\\curlywedge","\\curlyvee"],1200),Io("Greek",["\\alpha","\\beta","\\gamma","\\delta","\\epsilon","\\varepsilon","\\zeta","\\eta","\\theta","\\vartheta","\\iota","\\kappa","\\varkappa","\\lambda","\\mu","\\nu","\\xi","\\pi","\\varpi","\\rho","\\varrho","\\sigma","\\varsigma","\\tau","\\phi","\\varphi","\\upsilon","\\chi","\\psi","\\omega","\\Gamma","\\Delta","\\Theta","\\Lambda","\\Xi","\\Pi","\\Sigma","\\Upsilon","\\Phi","\\Psi","\\Omega","\\digamma","\\omicron"],3e3),Io("Sets",["\\emptyset","\\varnothing","\\cap","\\cup","\\in","\\notin","\\subset","\\supset","\\subseteq","\\supseteq","\\sqsubseteq"],4e3),Io("Sets",["\\setminus","\\not","\\ni","\\sqsupseteq","\\nsupseteqq","\\supsetneq","\\varsupsetneq","\\supsetneqq","\\varsupsetneqq"],3e3),Io("Sets",["\\smallsetminus","\\complement","\\owns","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\varsubsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq","\\nsubseteqq","\\subseteqq","\\Subset","\\sqsubset","\\supseteqq","\\Supset","\\sqsupset"],1200),Io("Spacing",["\\space, \\quad","\\qquad"],3e3,'\\unicode{"203A}$0\\unicode{"2039}'),Io("Spacing",["\\!","\\,","\\:","\\;","\\enskip","\\enspace"],1200,'\\unicode{"203A}$0\\unicode{"2039}'),Io("Spacing",["\\hspace","\\hspace*"],1200,'\\unicode{"203A}$0{1em}\\unicode{"2039}'),Io("Punctuation",["\\colon","\\cdotp","\\ldots","\\cdots","\\ddots","\\vdots","?","!",":",'"',",",".",";"],3e3),Io("Punctuation",["\\mathellipsis","\\ldotp","\\Colon"],1200),Io("Boxes",["\\square","\\Box"],3e3),Io("Boxes",["\\blacksquare","\\boxminus","\\boxplus","\\boxtimes","\\boxdot"],1200),Io("Circles",["\\circ","\\bullet","\\circleddash","\\oplus","\\otimes"],3e3),Io("Circles",["\\bigcirc","\\circledast","\\ominus","\\circledcirc","\\oslash","\\circledS","\\circledR","\\odot"],1200),Io("Triangles",["\\triangle","\\triangleq"],3e3),Io("Triangles",["\\bigtriangleup","\\vartriangle","\\triangledown","\\bigtriangledown","\\triangleleft","\\vartriangleleft","\\trianglelefteq","\\ntriangleleft","\\ntrianglelefteq","\\triangleright","\\vartriangleright","\\trianglerighteq","\\ntriangleright","\\ntrianglerighteq","\\blacktriangle","\\blacktriangledown","\\blacktriangleleft","\\blacktriangleright"],1200),Io("Shapes",["\\ast","\\star"],3e3),Io("Shapes",["\\diamond","\\Diamond","\\lozenge","\\blacklozenge","\\bigstar"],1200);var Xo={version:"0.55.0",latexToMarkup:Ho,latexToMathML:Wo,latexToSpeakableText:Vo,latexToAST:function(e,t){var i;return(t=null!=t?t:{}).macros={...R,...null!==(i=t.macros)&&void 0!==i?i:{}},So(et(e,"math",null,t.macros,!1,t.onError),t)},astToLatex:function(e,i){return function e(i,a){const r=Object.assign({precision:14,decimalMarker:".",groupSeparator:"\\, ",product:"\\cdot ",exponentProduct:"\\cdot ",exponentMarker:"",arcSeparator:"\\,",scientificNotation:"auto",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},a);let n="";if(void 0===i)return"";if("string"==typeof i)n=i;else if(i.latex)n=i.latex;else if(no(i)){const t=ro(i);if(t===-1/0)n="-\\infty ";else if(t===1/0)n="\\infty ";else if("object"!=typeof i.num||"string"!=typeof i.num.re&&"string"!=typeof i.num.im)n=isNaN(t)?"\\text{NaN}":qo(i.num,r);else{const e=oo(i),t=so(i);isNaN(e)||isNaN(t)?n="\\text{NaN}":Math.abs(t)<=Number.EPSILON&&Math.abs(e)<=Number.EPSILON?n="0":(Math.abs(e)>Number.EPSILON&&(n=qo(e,r)),Math.abs(t)>Number.EPSILON&&(Math.abs(e)>Number.EPSILON&&(n+=t>0?"+":""),n+=(1!==Math.abs(t)?qo(t,r):"")+"\\imaginaryI "))}lo(i)&&(n+="^{"+e(i.sup,r)+"}"),co(i)&&(n+="_{"+e(i.sub,r)+"}")}else if(i.group)n=e(i.group,r),no(i.group)||ao(i.group)?0!==so(i.group)&&(n=zo(i.fence||"(),",n)):n=zo(i.fence||"(),",n),lo(i)&&(n+="^{"+e(i.sup,r)+"}"),co(i)&&(n+="_{"+e(i.sub,r)+"}");else if(i.fn)if("bind"===i.fn){if(n=e(Vn(i,0),r)+"|_{",i.arg&&2===i.arg.length)n+=e(Vn(i,1));else{let t="";for(let a=1;ae(t,r)));else if("text"===i.fn)n="\\text{"+(i.arg[0]||"")+"}";else if("pow"===i.fn&&t(i.arg)&&i.arg.length>=2)n=e(Vn(i,0),r),no(Vn(i,0))||ao(Vn(i,0))||(n=zo(i.fence||"(),",n)),n+="^{"+e(Vn(i,1),r)+"}";else if("equal"===i.fn&&i.arg&&i.arg.length>2)n=i.arg.map(t=>e(t,r)).join(" = ");else{const a=function(e){let t=Hn[e];return t||(t=e.length>1?"\\operatorname{"+e+"}%^%_ %":e+"%^%_ %"),t}(i.fn);n=a;let o="";if(/%(?![01_^])/.test(a)&&t(i.arg)&&i.arg.length>1)n+=zo(i.fence||"(),",...i.arg.map(t=>e(t,r)));else if(t(i.arg)&&i.arg.length>0){const t=e(Vn(i,0),r),s=e(Vn(i,1),r),l=[...i.arg];/%0/.test(a)&&(n=n.replace("%0",t),l.shift()),/%1/.test(a)&&(n=n.replace("%1",s),l.shift()),l.length>0&&(o=zo(i.fence||"(),",...l.map(t=>e(t,r))))}else o=zo(i.fence||"(),","");n=lo(i)?n.replace("%^","^{"+e(i.sup,r)+"}"):n.replace("%^",""),n=co(i)?n.replace("%_","_{"+e(i.sub,r)+"}"):n.replace("%_",""),n=n.replace(/%(?![01_^])/,o),n=n.replace("%0","").replace("%1","")}else{const t=[];for(const a of i.arg)"add"===a.fn||"subtract"===a.fn||0!==oo(o=a)&&0!==so(o)||lo(i)&&0!==so(a)&&1!==so(a)?t.push(zo("() ",e(a,r))):t.push(e(a,r));if("multiply"===i.fn)n=!i.arg||2!==i.arg.length||!no(i.arg[0])&&"divide"!==i.arg[0].fn||no(i.arg[1])&&(0!==oo(i.arg[1])||1!==so(i.arg[1]))?t.join(" \\times "):t[0]+t[1];else if(i.arg&&1===i.arg.length)n="negate"===i.arg[0].fn||no(i.arg[0])&&ro(i.arg[0])<0?t[0]:"+"+t[0];else{n=t[0];for(let e=1;e=0&&(a+=t,a{},...null!=t?t:{}}).emit(e)}(e,t)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).MathLive={}); +/* MathLive 0.56.0 */ +var global,factory;global=this,factory=function(e){function t(e){return Array.isArray(e)}var i={"AMS-Regular":{65:[0,.68889,0,0],66:[0,.68889,0,0],67:[0,.68889,0,0],68:[0,.68889,0,0],69:[0,.68889,0,0],70:[0,.68889,0,0],71:[0,.68889,0,0],72:[0,.68889,0,0],73:[0,.68889,0,0],74:[.16667,.68889,0,0],75:[0,.68889,0,0],76:[0,.68889,0,0],77:[0,.68889,0,0],78:[0,.68889,0,0],79:[.16667,.68889,0,0],80:[0,.68889,0,0],81:[.16667,.68889,0,0],82:[0,.68889,0,0],83:[0,.68889,0,0],84:[0,.68889,0,0],85:[0,.68889,0,0],86:[0,.68889,0,0],87:[0,.68889,0,0],88:[0,.68889,0,0],89:[0,.68889,0,0],90:[0,.68889,0,0],107:[0,.68889,0,0],165:[0,.675,.025,0],174:[.15559,.69224,0,0],240:[0,.68889,0,0],295:[0,.68889,0,0],710:[0,.825,0,0],732:[0,.9,0,0],770:[0,.825,0,0],771:[0,.9,0,0],989:[.08167,.58167,0,0],1008:[0,.43056,.04028,0],8245:[0,.54986,0,0],8463:[0,.68889,0,0],8487:[0,.68889,0,0],8498:[0,.68889,0,0],8502:[0,.68889,0,0],8503:[0,.68889,0,0],8504:[0,.68889,0,0],8513:[0,.68889,0,0],8592:[-.03598,.46402,0,0],8594:[-.03598,.46402,0,0],8602:[-.13313,.36687,0,0],8603:[-.13313,.36687,0,0],8606:[.01354,.52239,0,0],8608:[.01354,.52239,0,0],8610:[.01354,.52239,0,0],8611:[.01354,.52239,0,0],8619:[0,.54986,0,0],8620:[0,.54986,0,0],8621:[-.13313,.37788,0,0],8622:[-.13313,.36687,0,0],8624:[0,.69224,0,0],8625:[0,.69224,0,0],8630:[0,.43056,0,0],8631:[0,.43056,0,0],8634:[.08198,.58198,0,0],8635:[.08198,.58198,0,0],8638:[.19444,.69224,0,0],8639:[.19444,.69224,0,0],8642:[.19444,.69224,0,0],8643:[.19444,.69224,0,0],8644:[.1808,.675,0,0],8646:[.1808,.675,0,0],8647:[.1808,.675,0,0],8648:[.19444,.69224,0,0],8649:[.1808,.675,0,0],8650:[.19444,.69224,0,0],8651:[.01354,.52239,0,0],8652:[.01354,.52239,0,0],8653:[-.13313,.36687,0,0],8654:[-.13313,.36687,0,0],8655:[-.13313,.36687,0,0],8666:[.13667,.63667,0,0],8667:[.13667,.63667,0,0],8669:[-.13313,.37788,0,0],8672:[-.064,.437,0,0],8674:[-.064,.437,0,0],8705:[0,.825,0,0],8708:[0,.68889,0,0],8709:[.08167,.58167,0,0],8717:[0,.43056,0,0],8722:[-.03598,.46402,0,0],8724:[.08198,.69224,0,0],8726:[.08167,.58167,0,0],8733:[0,.69224,0,0],8736:[0,.69224,0,0],8737:[0,.69224,0,0],8738:[.03517,.52239,0,0],8739:[.08167,.58167,0,0],8740:[.25142,.74111,0,0],8741:[.08167,.58167,0,0],8742:[.25142,.74111,0,0],8756:[0,.69224,0,0],8757:[0,.69224,0,0],8764:[-.13313,.36687,0,0],8765:[-.13313,.37788,0,0],8769:[-.13313,.36687,0,0],8770:[-.03625,.46375,0,0],8774:[.30274,.79383,0,0],8776:[-.01688,.48312,0,0],8778:[.08167,.58167,0,0],8782:[.06062,.54986,0,0],8783:[.06062,.54986,0,0],8785:[.08198,.58198,0,0],8786:[.08198,.58198,0,0],8787:[.08198,.58198,0,0],8790:[0,.69224,0,0],8791:[.22958,.72958,0,0],8796:[.08198,.91667,0,0],8806:[.25583,.75583,0,0],8807:[.25583,.75583,0,0],8808:[.25142,.75726,0,0],8809:[.25142,.75726,0,0],8812:[.25583,.75583,0,0],8814:[.20576,.70576,0,0],8815:[.20576,.70576,0,0],8816:[.30274,.79383,0,0],8817:[.30274,.79383,0,0],8818:[.22958,.72958,0,0],8819:[.22958,.72958,0,0],8822:[.1808,.675,0,0],8823:[.1808,.675,0,0],8828:[.13667,.63667,0,0],8829:[.13667,.63667,0,0],8830:[.22958,.72958,0,0],8831:[.22958,.72958,0,0],8832:[.20576,.70576,0,0],8833:[.20576,.70576,0,0],8840:[.30274,.79383,0,0],8841:[.30274,.79383,0,0],8842:[.13597,.63597,0,0],8843:[.13597,.63597,0,0],8847:[.03517,.54986,0,0],8848:[.03517,.54986,0,0],8858:[.08198,.58198,0,0],8859:[.08198,.58198,0,0],8861:[.08198,.58198,0,0],8862:[0,.675,0,0],8863:[0,.675,0,0],8864:[0,.675,0,0],8865:[0,.675,0,0],8872:[0,.69224,0,0],8873:[0,.69224,0,0],8874:[0,.69224,0,0],8876:[0,.68889,0,0],8877:[0,.68889,0,0],8878:[0,.68889,0,0],8879:[0,.68889,0,0],8882:[.03517,.54986,0,0],8883:[.03517,.54986,0,0],8884:[.13667,.63667,0,0],8885:[.13667,.63667,0,0],8888:[0,.54986,0,0],8890:[.19444,.43056,0,0],8891:[.19444,.69224,0,0],8892:[.19444,.69224,0,0],8901:[0,.54986,0,0],8903:[.08167,.58167,0,0],8905:[.08167,.58167,0,0],8906:[.08167,.58167,0,0],8907:[0,.69224,0,0],8908:[0,.69224,0,0],8909:[-.03598,.46402,0,0],8910:[0,.54986,0,0],8911:[0,.54986,0,0],8912:[.03517,.54986,0,0],8913:[.03517,.54986,0,0],8914:[0,.54986,0,0],8915:[0,.54986,0,0],8916:[0,.69224,0,0],8918:[.0391,.5391,0,0],8919:[.0391,.5391,0,0],8920:[.03517,.54986,0,0],8921:[.03517,.54986,0,0],8922:[.38569,.88569,0,0],8923:[.38569,.88569,0,0],8926:[.13667,.63667,0,0],8927:[.13667,.63667,0,0],8928:[.30274,.79383,0,0],8929:[.30274,.79383,0,0],8934:[.23222,.74111,0,0],8935:[.23222,.74111,0,0],8936:[.23222,.74111,0,0],8937:[.23222,.74111,0,0],8938:[.20576,.70576,0,0],8939:[.20576,.70576,0,0],8940:[.30274,.79383,0,0],8941:[.30274,.79383,0,0],8994:[.19444,.69224,0,0],8995:[.19444,.69224,0,0],9416:[.15559,.69224,0,0],9484:[0,.69224,0,0],9488:[0,.69224,0,0],9492:[0,.37788,0,0],9496:[0,.37788,0,0],9585:[.19444,.68889,0,0],9586:[.19444,.74111,0,0],9632:[0,.675,0,0],9633:[0,.675,0,0],9650:[0,.54986,0,0],9651:[0,.54986,0,0],9654:[.03517,.54986,0,0],9660:[0,.54986,0,0],9661:[0,.54986,0,0],9664:[.03517,.54986,0,0],9674:[.11111,.69224,0,0],9733:[.19444,.69224,0,0],10003:[0,.69224,0,0],10016:[0,.69224,0,0],10731:[.11111,.69224,0,0],10846:[.19444,.75583,0,0],10877:[.13667,.63667,0,0],10878:[.13667,.63667,0,0],10885:[.25583,.75583,0,0],10886:[.25583,.75583,0,0],10887:[.13597,.63597,0,0],10888:[.13597,.63597,0,0],10889:[.26167,.75726,0,0],10890:[.26167,.75726,0,0],10891:[.48256,.98256,0,0],10892:[.48256,.98256,0,0],10901:[.13667,.63667,0,0],10902:[.13667,.63667,0,0],10933:[.25142,.75726,0,0],10934:[.25142,.75726,0,0],10935:[.26167,.75726,0,0],10936:[.26167,.75726,0,0],10937:[.26167,.75726,0,0],10938:[.26167,.75726,0,0],10949:[.25583,.75583,0,0],10950:[.25583,.75583,0,0],10955:[.28481,.79383,0,0],10956:[.28481,.79383,0,0],57350:[.08167,.58167,0,0],57351:[.08167,.58167,0,0],57352:[.08167,.58167,0,0],57353:[0,.43056,.04028,0],57356:[.25142,.75726,0,0],57357:[.25142,.75726,0,0],57358:[.41951,.91951,0,0],57359:[.30274,.79383,0,0],57360:[.30274,.79383,0,0],57361:[.41951,.91951,0,0],57366:[.25142,.75726,0,0],57367:[.25142,.75726,0,0],57368:[.25142,.75726,0,0],57369:[.25142,.75726,0,0],57370:[.13597,.63597,0,0],57371:[.13597,.63597,0,0]},"Caligraphic-Regular":{48:[0,.43056,0,0],49:[0,.43056,0,0],50:[0,.43056,0,0],51:[.19444,.43056,0,0],52:[.19444,.43056,0,0],53:[.19444,.43056,0,0],54:[0,.64444,0,0],55:[.19444,.43056,0,0],56:[0,.64444,0,0],57:[.19444,.43056,0,0],65:[0,.68333,0,.19445],66:[0,.68333,.03041,.13889],67:[0,.68333,.05834,.13889],68:[0,.68333,.02778,.08334],69:[0,.68333,.08944,.11111],70:[0,.68333,.09931,.11111],71:[.09722,.68333,.0593,.11111],72:[0,.68333,.00965,.11111],73:[0,.68333,.07382,0],74:[.09722,.68333,.18472,.16667],75:[0,.68333,.01445,.05556],76:[0,.68333,0,.13889],77:[0,.68333,0,.13889],78:[0,.68333,.14736,.08334],79:[0,.68333,.02778,.11111],80:[0,.68333,.08222,.08334],81:[.09722,.68333,0,.11111],82:[0,.68333,0,.08334],83:[0,.68333,.075,.13889],84:[0,.68333,.25417,0],85:[0,.68333,.09931,.08334],86:[0,.68333,.08222,0],87:[0,.68333,.08222,.08334],88:[0,.68333,.14643,.13889],89:[.09722,.68333,.08222,.08334],90:[0,.68333,.07944,.13889]},"Fraktur-Regular":{33:[0,.69141,0,0],34:[0,.69141,0,0],38:[0,.69141,0,0],39:[0,.69141,0,0],40:[.24982,.74947,0,0],41:[.24982,.74947,0,0],42:[0,.62119,0,0],43:[.08319,.58283,0,0],44:[0,.10803,0,0],45:[.08319,.58283,0,0],46:[0,.10803,0,0],47:[.24982,.74947,0,0],48:[0,.47534,0,0],49:[0,.47534,0,0],50:[0,.47534,0,0],51:[.18906,.47534,0,0],52:[.18906,.47534,0,0],53:[.18906,.47534,0,0],54:[0,.69141,0,0],55:[.18906,.47534,0,0],56:[0,.69141,0,0],57:[.18906,.47534,0,0],58:[0,.47534,0,0],59:[.12604,.47534,0,0],61:[-.13099,.36866,0,0],63:[0,.69141,0,0],65:[0,.69141,0,0],66:[0,.69141,0,0],67:[0,.69141,0,0],68:[0,.69141,0,0],69:[0,.69141,0,0],70:[.12604,.69141,0,0],71:[0,.69141,0,0],72:[.06302,.69141,0,0],73:[0,.69141,0,0],74:[.12604,.69141,0,0],75:[0,.69141,0,0],76:[0,.69141,0,0],77:[0,.69141,0,0],78:[0,.69141,0,0],79:[0,.69141,0,0],80:[.18906,.69141,0,0],81:[.03781,.69141,0,0],82:[0,.69141,0,0],83:[0,.69141,0,0],84:[0,.69141,0,0],85:[0,.69141,0,0],86:[0,.69141,0,0],87:[0,.69141,0,0],88:[0,.69141,0,0],89:[.18906,.69141,0,0],90:[.12604,.69141,0,0],91:[.24982,.74947,0,0],93:[.24982,.74947,0,0],94:[0,.69141,0,0],97:[0,.47534,0,0],98:[0,.69141,0,0],99:[0,.47534,0,0],100:[0,.62119,0,0],101:[0,.47534,0,0],102:[.18906,.69141,0,0],103:[.18906,.47534,0,0],104:[.18906,.69141,0,0],105:[0,.69141,0,0],106:[0,.69141,0,0],107:[0,.69141,0,0],108:[0,.69141,0,0],109:[0,.47534,0,0],110:[0,.47534,0,0],111:[0,.47534,0,0],112:[.18906,.52396,0,0],113:[.18906,.47534,0,0],114:[0,.47534,0,0],115:[0,.47534,0,0],116:[0,.62119,0,0],117:[0,.47534,0,0],118:[0,.52396,0,0],119:[0,.52396,0,0],120:[.18906,.47534,0,0],121:[.18906,.47534,0,0],122:[.18906,.47534,0,0],8216:[0,.69141,0,0],8217:[0,.69141,0,0],58112:[0,.62119,0,0],58113:[0,.62119,0,0],58114:[.18906,.69141,0,0],58115:[.18906,.69141,0,0],58116:[.18906,.47534,0,0],58117:[0,.69141,0,0],58118:[0,.62119,0,0],58119:[0,.47534,0,0]},"Main-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.13333,.63333,0,0],44:[.19444,.15556,0,0],45:[0,.44444,0,0],46:[0,.15556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.44444,0,0],59:[.19444,.44444,0,0],60:[.08556,.58556,0,0],61:[-.10889,.39111,0,0],62:[.08556,.58556,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68611,0,0],66:[0,.68611,0,0],67:[0,.68611,0,0],68:[0,.68611,0,0],69:[0,.68611,0,0],70:[0,.68611,0,0],71:[0,.68611,0,0],72:[0,.68611,0,0],73:[0,.68611,0,0],74:[0,.68611,0,0],75:[0,.68611,0,0],76:[0,.68611,0,0],77:[0,.68611,0,0],78:[0,.68611,0,0],79:[0,.68611,0,0],80:[0,.68611,0,0],81:[.19444,.68611,0,0],82:[0,.68611,0,0],83:[0,.68611,0,0],84:[0,.68611,0,0],85:[0,.68611,0,0],86:[0,.68611,.01597,0],87:[0,.68611,.01597,0],88:[0,.68611,0,0],89:[0,.68611,.02875,0],90:[0,.68611,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.13444,.03194,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.10903,0],103:[.19444,.44444,.01597,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,0,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.01597,0],119:[0,.44444,.01597,0],120:[0,.44444,0,0],121:[.19444,.44444,.01597,0],122:[0,.44444,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],172:[0,.44444,0,0],176:[0,.69444,0,0],177:[.13333,.63333,0,0],184:[.17014,0,0,0],198:[0,.68611,0,0],215:[.13333,.63333,0,0],216:[.04861,.73472,0,0],223:[0,.69444,0,0],230:[0,.44444,0,0],247:[.13333,.63333,0,0],248:[.09722,.54167,0,0],305:[0,.44444,0,0],338:[0,.68611,0,0],339:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.59611,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],733:[0,.69444,0,0],915:[0,.68611,0,0],916:[0,.68611,0,0],920:[0,.68611,0,0],923:[0,.68611,0,0],926:[0,.68611,0,0],928:[0,.68611,0,0],931:[0,.68611,0,0],933:[0,.68611,0,0],934:[0,.68611,0,0],936:[0,.68611,0,0],937:[0,.68611,0,0],8211:[0,.44444,.03194,0],8212:[0,.44444,.03194,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8242:[0,.55556,0,0],8407:[0,.72444,.15486,0],8463:[0,.69444,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,0],8472:[.19444,.44444,0,0],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.10889,.39111,0,0],8593:[.19444,.69444,0,0],8594:[-.10889,.39111,0,0],8595:[.19444,.69444,0,0],8596:[-.10889,.39111,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8636:[-.10889,.39111,0,0],8637:[-.10889,.39111,0,0],8640:[-.10889,.39111,0,0],8641:[-.10889,.39111,0,0],8656:[-.10889,.39111,0,0],8657:[.19444,.69444,0,0],8658:[-.10889,.39111,0,0],8659:[.19444,.69444,0,0],8660:[-.10889,.39111,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.06389,0],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68611,0,0],8712:[.08556,.58556,0,0],8715:[.08556,.58556,0,0],8722:[.13333,.63333,0,0],8723:[.13333,.63333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.02778,.47222,0,0],8728:[-.02639,.47361,0,0],8729:[-.02639,.47361,0,0],8730:[.18,.82,0,0],8733:[0,.44444,0,0],8734:[0,.44444,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.12778,0],8764:[-.10889,.39111,0,0],8768:[.19444,.69444,0,0],8771:[.00222,.50222,0,0],8776:[.02444,.52444,0,0],8781:[.00222,.50222,0,0],8801:[.00222,.50222,0,0],8804:[.19667,.69667,0,0],8805:[.19667,.69667,0,0],8810:[.08556,.58556,0,0],8811:[.08556,.58556,0,0],8826:[.08556,.58556,0,0],8827:[.08556,.58556,0,0],8834:[.08556,.58556,0,0],8835:[.08556,.58556,0,0],8838:[.19667,.69667,0,0],8839:[.19667,.69667,0,0],8846:[0,.55556,0,0],8849:[.19667,.69667,0,0],8850:[.19667,.69667,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.13333,.63333,0,0],8854:[.13333,.63333,0,0],8855:[.13333,.63333,0,0],8856:[.13333,.63333,0,0],8857:[.13333,.63333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8900:[-.02639,.47361,0,0],8901:[-.02639,.47361,0,0],8902:[-.02778,.47222,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.13889,.36111,0,0],8995:[-.13889,.36111,0,0],9651:[.19444,.69444,0,0],9657:[-.02778,.47222,0,0],9661:[.19444,.69444,0,0],9667:[-.02778,.47222,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10815:[0,.68611,0,0],10927:[.19667,.69667,0,0],10928:[.19667,.69667,0,0],57376:[.19444,.69444,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0],34:[0,.69444,.07939,0],35:[.19444,.69444,.06833,0],37:[.05556,.75,.12861,0],38:[0,.69444,.08528,0],39:[0,.69444,.12945,0],40:[.25,.75,.15806,0],41:[.25,.75,.03306,0],42:[0,.75,.14333,0],43:[.10333,.60333,.03306,0],44:[.19444,.14722,0,0],45:[0,.44444,.02611,0],46:[0,.14722,0,0],47:[.25,.75,.15806,0],48:[0,.64444,.13167,0],49:[0,.64444,.13167,0],50:[0,.64444,.13167,0],51:[0,.64444,.13167,0],52:[.19444,.64444,.13167,0],53:[0,.64444,.13167,0],54:[0,.64444,.13167,0],55:[.19444,.64444,.13167,0],56:[0,.64444,.13167,0],57:[0,.64444,.13167,0],58:[0,.44444,.06695,0],59:[.19444,.44444,.06695,0],61:[-.10889,.39111,.06833,0],63:[0,.69444,.11472,0],64:[0,.69444,.09208,0],65:[0,.68611,0,0],66:[0,.68611,.0992,0],67:[0,.68611,.14208,0],68:[0,.68611,.09062,0],69:[0,.68611,.11431,0],70:[0,.68611,.12903,0],71:[0,.68611,.07347,0],72:[0,.68611,.17208,0],73:[0,.68611,.15681,0],74:[0,.68611,.145,0],75:[0,.68611,.14208,0],76:[0,.68611,0,0],77:[0,.68611,.17208,0],78:[0,.68611,.17208,0],79:[0,.68611,.09062,0],80:[0,.68611,.0992,0],81:[.19444,.68611,.09062,0],82:[0,.68611,.02559,0],83:[0,.68611,.11264,0],84:[0,.68611,.12903,0],85:[0,.68611,.17208,0],86:[0,.68611,.18625,0],87:[0,.68611,.18625,0],88:[0,.68611,.15681,0],89:[0,.68611,.19803,0],90:[0,.68611,.14208,0],91:[.25,.75,.1875,0],93:[.25,.75,.09972,0],94:[0,.69444,.06709,0],95:[.31,.13444,.09811,0],97:[0,.44444,.09426,0],98:[0,.69444,.07861,0],99:[0,.44444,.05222,0],100:[0,.69444,.10861,0],101:[0,.44444,.085,0],102:[.19444,.69444,.21778,0],103:[.19444,.44444,.105,0],104:[0,.69444,.09426,0],105:[0,.69326,.11387,0],106:[.19444,.69326,.1672,0],107:[0,.69444,.11111,0],108:[0,.69444,.10861,0],109:[0,.44444,.09426,0],110:[0,.44444,.09426,0],111:[0,.44444,.07861,0],112:[.19444,.44444,.07861,0],113:[.19444,.44444,.105,0],114:[0,.44444,.11111,0],115:[0,.44444,.08167,0],116:[0,.63492,.09639,0],117:[0,.44444,.09426,0],118:[0,.44444,.11111,0],119:[0,.44444,.11111,0],120:[0,.44444,.12583,0],121:[.19444,.44444,.105,0],122:[0,.44444,.13889,0],126:[.35,.34444,.11472,0],163:[0,.69444,0,0],168:[0,.69444,.11473,0],176:[0,.69444,0,0],184:[.17014,0,0,0],198:[0,.68611,.11431,0],216:[.04861,.73472,.09062,0],223:[.19444,.69444,.09736,0],230:[0,.44444,.085,0],248:[.09722,.54167,.09458,0],305:[0,.44444,.09426,0],338:[0,.68611,.11431,0],339:[0,.44444,.085,0],567:[.19444,.44444,.04611,0],710:[0,.69444,.06709,0],711:[0,.63194,.08271,0],713:[0,.59444,.10444,0],714:[0,.69444,.08528,0],715:[0,.69444,0,0],728:[0,.69444,.10333,0],729:[0,.69444,.12945,0],730:[0,.69444,0,0],732:[0,.69444,.11472,0],733:[0,.69444,.11472,0],915:[0,.68611,.12903,0],916:[0,.68611,0,0],920:[0,.68611,.09062,0],923:[0,.68611,0,0],926:[0,.68611,.15092,0],928:[0,.68611,.17208,0],931:[0,.68611,.11431,0],933:[0,.68611,.10778,0],934:[0,.68611,.05632,0],936:[0,.68611,.10778,0],937:[0,.68611,.0992,0],8211:[0,.44444,.09811,0],8212:[0,.44444,.09811,0],8216:[0,.69444,.12945,0],8217:[0,.69444,.12945,0],8220:[0,.69444,.16772,0],8221:[0,.69444,.07939,0]},"Main-Italic":{33:[0,.69444,.12417,0],34:[0,.69444,.06961,0],35:[.19444,.69444,.06616,0],37:[.05556,.75,.13639,0],38:[0,.69444,.09694,0],39:[0,.69444,.12417,0],40:[.25,.75,.16194,0],41:[.25,.75,.03694,0],42:[0,.75,.14917,0],43:[.05667,.56167,.03694,0],44:[.19444,.10556,0,0],45:[0,.43056,.02826,0],46:[0,.10556,0,0],47:[.25,.75,.16194,0],48:[0,.64444,.13556,0],49:[0,.64444,.13556,0],50:[0,.64444,.13556,0],51:[0,.64444,.13556,0],52:[.19444,.64444,.13556,0],53:[0,.64444,.13556,0],54:[0,.64444,.13556,0],55:[.19444,.64444,.13556,0],56:[0,.64444,.13556,0],57:[0,.64444,.13556,0],58:[0,.43056,.0582,0],59:[.19444,.43056,.0582,0],61:[-.13313,.36687,.06616,0],63:[0,.69444,.1225,0],64:[0,.69444,.09597,0],65:[0,.68333,0,0],66:[0,.68333,.10257,0],67:[0,.68333,.14528,0],68:[0,.68333,.09403,0],69:[0,.68333,.12028,0],70:[0,.68333,.13305,0],71:[0,.68333,.08722,0],72:[0,.68333,.16389,0],73:[0,.68333,.15806,0],74:[0,.68333,.14028,0],75:[0,.68333,.14528,0],76:[0,.68333,0,0],77:[0,.68333,.16389,0],78:[0,.68333,.16389,0],79:[0,.68333,.09403,0],80:[0,.68333,.10257,0],81:[.19444,.68333,.09403,0],82:[0,.68333,.03868,0],83:[0,.68333,.11972,0],84:[0,.68333,.13305,0],85:[0,.68333,.16389,0],86:[0,.68333,.18361,0],87:[0,.68333,.18361,0],88:[0,.68333,.15806,0],89:[0,.68333,.19383,0],90:[0,.68333,.14528,0],91:[.25,.75,.1875,0],93:[.25,.75,.10528,0],94:[0,.69444,.06646,0],95:[.31,.12056,.09208,0],97:[0,.43056,.07671,0],98:[0,.69444,.06312,0],99:[0,.43056,.05653,0],100:[0,.69444,.10333,0],101:[0,.43056,.07514,0],102:[.19444,.69444,.21194,0],103:[.19444,.43056,.08847,0],104:[0,.69444,.07671,0],105:[0,.65536,.1019,0],106:[.19444,.65536,.14467,0],107:[0,.69444,.10764,0],108:[0,.69444,.10333,0],109:[0,.43056,.07671,0],110:[0,.43056,.07671,0],111:[0,.43056,.06312,0],112:[.19444,.43056,.06312,0],113:[.19444,.43056,.08847,0],114:[0,.43056,.10764,0],115:[0,.43056,.08208,0],116:[0,.61508,.09486,0],117:[0,.43056,.07671,0],118:[0,.43056,.10764,0],119:[0,.43056,.10764,0],120:[0,.43056,.12042,0],121:[.19444,.43056,.08847,0],122:[0,.43056,.12292,0],126:[.35,.31786,.11585,0],163:[0,.69444,0,0],168:[0,.66786,.10474,0],176:[0,.69444,0,0],184:[.17014,0,0,0],198:[0,.68333,.12028,0],216:[.04861,.73194,.09403,0],223:[.19444,.69444,.10514,0],230:[0,.43056,.07514,0],248:[.09722,.52778,.09194,0],305:[0,.43056,0,.02778],338:[0,.68333,.12028,0],339:[0,.43056,.07514,0],567:[.19444,.43056,0,.08334],710:[0,.69444,.06646,0],711:[0,.62847,.08295,0],713:[0,.56167,.10333,0],714:[0,.69444,.09694,0],715:[0,.69444,0,0],728:[0,.69444,.10806,0],729:[0,.66786,.11752,0],730:[0,.69444,0,0],732:[0,.66786,.11585,0],733:[0,.69444,.1225,0],915:[0,.68333,.13305,0],916:[0,.68333,0,0],920:[0,.68333,.09403,0],923:[0,.68333,0,0],926:[0,.68333,.15294,0],928:[0,.68333,.16389,0],931:[0,.68333,.12028,0],933:[0,.68333,.11111,0],934:[0,.68333,.05986,0],936:[0,.68333,.11111,0],937:[0,.68333,.10257,0],8211:[0,.43056,.09208,0],8212:[0,.43056,.09208,0],8216:[0,.69444,.12417,0],8217:[0,.69444,.12417,0],8220:[0,.69444,.1685,0],8221:[0,.69444,.06961,0],8463:[0,.68889,0,0]},"Main-Regular":{32:[0,0,0,0],33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.19444,.10556,0,0],45:[0,.43056,0,0],46:[0,.10556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.43056,0,0],59:[.19444,.43056,0,0],60:[.0391,.5391,0,0],61:[-.13313,.36687,0,0],62:[.0391,.5391,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68333,0,0],66:[0,.68333,0,0],67:[0,.68333,0,0],68:[0,.68333,0,0],69:[0,.68333,0,0],70:[0,.68333,0,0],71:[0,.68333,0,0],72:[0,.68333,0,0],73:[0,.68333,0,0],74:[0,.68333,0,0],75:[0,.68333,0,0],76:[0,.68333,0,0],77:[0,.68333,0,0],78:[0,.68333,0,0],79:[0,.68333,0,0],80:[0,.68333,0,0],81:[.19444,.68333,0,0],82:[0,.68333,0,0],83:[0,.68333,0,0],84:[0,.68333,0,0],85:[0,.68333,0,0],86:[0,.68333,.01389,0],87:[0,.68333,.01389,0],88:[0,.68333,0,0],89:[0,.68333,.025,0],90:[0,.68333,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.12056,.02778,0],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,0],100:[0,.69444,0,0],101:[0,.43056,0,0],102:[0,.69444,.07778,0],103:[.19444,.43056,.01389,0],104:[0,.69444,0,0],105:[0,.66786,0,0],106:[.19444,.66786,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.19444,.43056,0,0],113:[.19444,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.61508,0,0],117:[0,.43056,0,0],118:[0,.43056,.01389,0],119:[0,.43056,.01389,0],120:[0,.43056,0,0],121:[.19444,.43056,.01389,0],122:[0,.43056,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.31786,0,0],160:[0,0,0,0],167:[.19444,.69444,0,0],168:[0,.66786,0,0],172:[0,.43056,0,0],176:[0,.69444,0,0],177:[.08333,.58333,0,0],182:[.19444,.69444,0,0],184:[.17014,0,0,0],198:[0,.68333,0,0],215:[.08333,.58333,0,0],216:[.04861,.73194,0,0],223:[0,.69444,0,0],230:[0,.43056,0,0],247:[.08333,.58333,0,0],248:[.09722,.52778,0,0],305:[0,.43056,0,0],338:[0,.68333,0,0],339:[0,.43056,0,0],567:[.19444,.43056,0,0],710:[0,.69444,0,0],711:[0,.62847,0,0],713:[0,.56778,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.66786,0,0],730:[0,.69444,0,0],732:[0,.66786,0,0],733:[0,.69444,0,0],915:[0,.68333,0,0],916:[0,.68333,0,0],920:[0,.68333,0,0],923:[0,.68333,0,0],926:[0,.68333,0,0],928:[0,.68333,0,0],931:[0,.68333,0,0],933:[0,.68333,0,0],934:[0,.68333,0,0],936:[0,.68333,0,0],937:[0,.68333,0,0],8211:[0,.43056,.02778,0],8212:[0,.43056,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8230:[0,.12,0,0],8242:[0,.55556,0,0],8407:[0,.71444,.15382,0],8463:[0,.68889,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,.11111],8472:[.19444,.43056,0,.11111],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.13313,.36687,0,0],8593:[.19444,.69444,0,0],8594:[-.13313,.36687,0,0],8595:[.19444,.69444,0,0],8596:[-.13313,.36687,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8614:[.011,.511,0,0],8617:[.011,.511,0,0],8618:[.011,.511,0,0],8636:[-.13313,.36687,0,0],8637:[-.13313,.36687,0,0],8640:[-.13313,.36687,0,0],8641:[-.13313,.36687,0,0],8652:[.011,.671,0,0],8656:[-.13313,.36687,0,0],8657:[.19444,.69444,0,0],8658:[-.13313,.36687,0,0],8659:[.19444,.69444,0,0],8660:[-.13313,.36687,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.05556,.08334],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68333,0,0],8712:[.0391,.5391,0,0],8715:[.0391,.5391,0,0],8722:[.08333,.58333,0,0],8723:[.08333,.58333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.03472,.46528,0,0],8728:[-.05555,.44445,0,0],8729:[-.05555,.44445,0,0],8730:[.2,.8,0,0],8733:[0,.43056,0,0],8734:[0,.43056,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.11111,0],8764:[-.13313,.36687,0,0],8768:[.19444,.69444,0,0],8771:[-.03625,.46375,0,0],8773:[-.022,.589,0,0],8776:[-.01688,.48312,0,0],8781:[-.03625,.46375,0,0],8784:[-.133,.67,0,0],8801:[-.03625,.46375,0,0],8804:[.13597,.63597,0,0],8805:[.13597,.63597,0,0],8810:[.0391,.5391,0,0],8811:[.0391,.5391,0,0],8826:[.0391,.5391,0,0],8827:[.0391,.5391,0,0],8834:[.0391,.5391,0,0],8835:[.0391,.5391,0,0],8838:[.13597,.63597,0,0],8839:[.13597,.63597,0,0],8846:[0,.55556,0,0],8849:[.13597,.63597,0,0],8850:[.13597,.63597,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.08333,.58333,0,0],8854:[.08333,.58333,0,0],8855:[.08333,.58333,0,0],8856:[.08333,.58333,0,0],8857:[.08333,.58333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8872:[.249,.75,0,0],8900:[-.05555,.44445,0,0],8901:[-.05555,.44445,0,0],8902:[-.03472,.46528,0,0],8904:[.005,.505,0,0],8942:[.03,.9,0,0],8943:[-.19,.31,0,0],8945:[-.1,.82,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.14236,.35764,0,0],8995:[-.14236,.35764,0,0],9136:[.244,.744,0,0],9137:[.244,.744,0,0],9651:[.19444,.69444,0,0],9657:[-.03472,.46528,0,0],9661:[.19444,.69444,0,0],9667:[-.03472,.46528,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10222:[.244,.744,0,0],10223:[.244,.744,0,0],10229:[.011,.511,0,0],10230:[.011,.511,0,0],10231:[.011,.511,0,0],10232:[.024,.525,0,0],10233:[.024,.525,0,0],10234:[.024,.525,0,0],10236:[.011,.511,0,0],10815:[0,.68333,0,0],10927:[.13597,.63597,0,0],10928:[.13597,.63597,0,0],57376:[.19444,.69444,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0],66:[0,.68611,.04835,0],67:[0,.68611,.06979,0],68:[0,.68611,.03194,0],69:[0,.68611,.05451,0],70:[0,.68611,.15972,0],71:[0,.68611,0,0],72:[0,.68611,.08229,0],73:[0,.68611,.07778,0],74:[0,.68611,.10069,0],75:[0,.68611,.06979,0],76:[0,.68611,0,0],77:[0,.68611,.11424,0],78:[0,.68611,.11424,0],79:[0,.68611,.03194,0],80:[0,.68611,.15972,0],81:[.19444,.68611,0,0],82:[0,.68611,.00421,0],83:[0,.68611,.05382,0],84:[0,.68611,.15972,0],85:[0,.68611,.11424,0],86:[0,.68611,.25555,0],87:[0,.68611,.15972,0],88:[0,.68611,.07778,0],89:[0,.68611,.25555,0],90:[0,.68611,.06979,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[.19444,.69444,.11042,0],103:[.19444,.44444,.03704,0],104:[0,.69444,0,0],105:[0,.69326,0,0],106:[.19444,.69326,.0622,0],107:[0,.69444,.01852,0],108:[0,.69444,.0088,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,.03704,0],114:[0,.44444,.03194,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.03704,0],119:[0,.44444,.02778,0],120:[0,.44444,0,0],121:[.19444,.44444,.03704,0],122:[0,.44444,.04213,0],915:[0,.68611,.15972,0],916:[0,.68611,0,0],920:[0,.68611,.03194,0],923:[0,.68611,0,0],926:[0,.68611,.07458,0],928:[0,.68611,.08229,0],931:[0,.68611,.05451,0],933:[0,.68611,.15972,0],934:[0,.68611,0,0],936:[0,.68611,.11653,0],937:[0,.68611,.04835,0],945:[0,.44444,0,0],946:[.19444,.69444,.03403,0],947:[.19444,.44444,.06389,0],948:[0,.69444,.03819,0],949:[0,.44444,0,0],950:[.19444,.69444,.06215,0],951:[.19444,.44444,.03704,0],952:[0,.69444,.03194,0],953:[0,.44444,0,0],954:[0,.44444,0,0],955:[0,.69444,0,0],956:[.19444,.44444,0,0],957:[0,.44444,.06898,0],958:[.19444,.69444,.03021,0],959:[0,.44444,0,0],960:[0,.44444,.03704,0],961:[.19444,.44444,0,0],962:[.09722,.44444,.07917,0],963:[0,.44444,.03704,0],964:[0,.44444,.13472,0],965:[0,.44444,.03704,0],966:[.19444,.44444,0,0],967:[.19444,.44444,0,0],968:[.19444,.69444,.03704,0],969:[0,.44444,.03704,0],977:[0,.69444,0,0],981:[.19444,.69444,0,0],982:[0,.44444,.03194,0],1009:[.19444,.44444,0,0],1013:[0,.44444,0,0]},"Math-Italic":{65:[0,.68333,0,.13889],66:[0,.68333,.05017,.08334],67:[0,.68333,.07153,.08334],68:[0,.68333,.02778,.05556],69:[0,.68333,.05764,.08334],70:[0,.68333,.13889,.08334],71:[0,.68333,0,.08334],72:[0,.68333,.08125,.05556],73:[0,.68333,.07847,.11111],74:[0,.68333,.09618,.16667],75:[0,.68333,.07153,.05556],76:[0,.68333,0,.02778],77:[0,.68333,.10903,.08334],78:[0,.68333,.10903,.08334],79:[0,.68333,.02778,.08334],80:[0,.68333,.13889,.08334],81:[.19444,.68333,0,.08334],82:[0,.68333,.00773,.08334],83:[0,.68333,.05764,.08334],84:[0,.68333,.13889,.08334],85:[0,.68333,.10903,.02778],86:[0,.68333,.22222,0],87:[0,.68333,.13889,0],88:[0,.68333,.07847,.08334],89:[0,.68333,.22222,0],90:[0,.68333,.07153,.08334],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,.05556],100:[0,.69444,0,.16667],101:[0,.43056,0,.05556],102:[.19444,.69444,.10764,.16667],103:[.19444,.43056,.03588,.02778],104:[0,.69444,0,0],105:[0,.65952,0,0],106:[.19444,.65952,.05724,0],107:[0,.69444,.03148,0],108:[0,.69444,.01968,.08334],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,.05556],112:[.19444,.43056,0,.08334],113:[.19444,.43056,.03588,.08334],114:[0,.43056,.02778,.05556],115:[0,.43056,0,.05556],116:[0,.61508,0,.08334],117:[0,.43056,0,.02778],118:[0,.43056,.03588,.02778],119:[0,.43056,.02691,.08334],120:[0,.43056,0,.02778],121:[.19444,.43056,.03588,.05556],122:[0,.43056,.04398,.05556],915:[0,.68333,.13889,.08334],916:[0,.68333,0,.16667],920:[0,.68333,.02778,.08334],923:[0,.68333,0,.16667],926:[0,.68333,.07569,.08334],928:[0,.68333,.08125,.05556],931:[0,.68333,.05764,.08334],933:[0,.68333,.13889,.05556],934:[0,.68333,0,.08334],936:[0,.68333,.11,.05556],937:[0,.68333,.05017,.08334],945:[0,.43056,.0037,.02778],946:[.19444,.69444,.05278,.08334],947:[.19444,.43056,.05556,0],948:[0,.69444,.03785,.05556],949:[0,.43056,0,.08334],950:[.19444,.69444,.07378,.08334],951:[.19444,.43056,.03588,.05556],952:[0,.69444,.02778,.08334],953:[0,.43056,0,.05556],954:[0,.43056,0,0],955:[0,.69444,0,0],956:[.19444,.43056,0,.02778],957:[0,.43056,.06366,.02778],958:[.19444,.69444,.04601,.11111],959:[0,.43056,0,.05556],960:[0,.43056,.03588,0],961:[.19444,.43056,0,.08334],962:[.09722,.43056,.07986,.08334],963:[0,.43056,.03588,0],964:[0,.43056,.1132,.02778],965:[0,.43056,.03588,.02778],966:[.19444,.43056,0,.08334],967:[.19444,.43056,0,.05556],968:[.19444,.69444,.03588,.11111],969:[0,.43056,.03588,0],977:[0,.69444,0,.08334],981:[.19444,.69444,0,.08334],982:[0,.43056,.02778,0],1009:[.19444,.43056,0,.08334],1013:[0,.43056,0,.05556]},"SansSerif-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.11667,.61667,0,0],44:[.10556,.13056,0,0],45:[0,.45833,0,0],46:[0,.13056,0,0],47:[.25,.75,0,0],48:[0,.69444,0,0],49:[0,.69444,0,0],50:[0,.69444,0,0],51:[0,.69444,0,0],52:[0,.69444,0,0],53:[0,.69444,0,0],54:[0,.69444,0,0],55:[0,.69444,0,0],56:[0,.69444,0,0],57:[0,.69444,0,0],58:[0,.45833,0,0],59:[.10556,.45833,0,0],61:[-.09375,.40625,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.10556,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01528,0],87:[0,.69444,.01528,0],88:[0,.69444,0,0],89:[0,.69444,.0275,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.10833,.03056,0],97:[0,.45833,0,0],98:[0,.69444,0,0],99:[0,.45833,0,0],100:[0,.69444,0,0],101:[0,.45833,0,0],102:[0,.69444,.07639,0],103:[.19444,.45833,.01528,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.45833,0,0],110:[0,.45833,0,0],111:[0,.45833,0,0],112:[.19444,.45833,0,0],113:[.19444,.45833,0,0],114:[0,.45833,.01528,0],115:[0,.45833,0,0],116:[0,.58929,0,0],117:[0,.45833,0,0],118:[0,.45833,.01528,0],119:[0,.45833,.01528,0],120:[0,.45833,0,0],121:[.19444,.45833,.01528,0],122:[0,.45833,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],176:[0,.69444,0,0],180:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.45833,0,0],567:[.19444,.45833,0,0],710:[0,.69444,0,0],711:[0,.63542,0,0],713:[0,.63778,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],733:[0,.69444,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.45833,.03056,0],8212:[0,.45833,.03056,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"SansSerif-Italic":{33:[0,.69444,.05733,0],34:[0,.69444,.00316,0],35:[.19444,.69444,.05087,0],36:[.05556,.75,.11156,0],37:[.05556,.75,.03126,0],38:[0,.69444,.03058,0],39:[0,.69444,.07816,0],40:[.25,.75,.13164,0],41:[.25,.75,.02536,0],42:[0,.75,.11775,0],43:[.08333,.58333,.02536,0],44:[.125,.08333,0,0],45:[0,.44444,.01946,0],46:[0,.08333,0,0],47:[.25,.75,.13164,0],48:[0,.65556,.11156,0],49:[0,.65556,.11156,0],50:[0,.65556,.11156,0],51:[0,.65556,.11156,0],52:[0,.65556,.11156,0],53:[0,.65556,.11156,0],54:[0,.65556,.11156,0],55:[0,.65556,.11156,0],56:[0,.65556,.11156,0],57:[0,.65556,.11156,0],58:[0,.44444,.02502,0],59:[.125,.44444,.02502,0],61:[-.13,.37,.05087,0],63:[0,.69444,.11809,0],64:[0,.69444,.07555,0],65:[0,.69444,0,0],66:[0,.69444,.08293,0],67:[0,.69444,.11983,0],68:[0,.69444,.07555,0],69:[0,.69444,.11983,0],70:[0,.69444,.13372,0],71:[0,.69444,.11983,0],72:[0,.69444,.08094,0],73:[0,.69444,.13372,0],74:[0,.69444,.08094,0],75:[0,.69444,.11983,0],76:[0,.69444,0,0],77:[0,.69444,.08094,0],78:[0,.69444,.08094,0],79:[0,.69444,.07555,0],80:[0,.69444,.08293,0],81:[.125,.69444,.07555,0],82:[0,.69444,.08293,0],83:[0,.69444,.09205,0],84:[0,.69444,.13372,0],85:[0,.69444,.08094,0],86:[0,.69444,.1615,0],87:[0,.69444,.1615,0],88:[0,.69444,.13372,0],89:[0,.69444,.17261,0],90:[0,.69444,.11983,0],91:[.25,.75,.15942,0],93:[.25,.75,.08719,0],94:[0,.69444,.0799,0],95:[.35,.09444,.08616,0],97:[0,.44444,.00981,0],98:[0,.69444,.03057,0],99:[0,.44444,.08336,0],100:[0,.69444,.09483,0],101:[0,.44444,.06778,0],102:[0,.69444,.21705,0],103:[.19444,.44444,.10836,0],104:[0,.69444,.01778,0],105:[0,.67937,.09718,0],106:[.19444,.67937,.09162,0],107:[0,.69444,.08336,0],108:[0,.69444,.09483,0],109:[0,.44444,.01778,0],110:[0,.44444,.01778,0],111:[0,.44444,.06613,0],112:[.19444,.44444,.0389,0],113:[.19444,.44444,.04169,0],114:[0,.44444,.10836,0],115:[0,.44444,.0778,0],116:[0,.57143,.07225,0],117:[0,.44444,.04169,0],118:[0,.44444,.10836,0],119:[0,.44444,.10836,0],120:[0,.44444,.09169,0],121:[.19444,.44444,.10836,0],122:[0,.44444,.08752,0],126:[.35,.32659,.08826,0],168:[0,.67937,.06385,0],176:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.44444,.04169,0],567:[.19444,.44444,.04169,0],710:[0,.69444,.0799,0],711:[0,.63194,.08432,0],713:[0,.60889,.08776,0],714:[0,.69444,.09205,0],715:[0,.69444,0,0],728:[0,.69444,.09483,0],729:[0,.67937,.07774,0],730:[0,.69444,0,0],732:[0,.67659,.08826,0],733:[0,.69444,.09205,0],915:[0,.69444,.13372,0],916:[0,.69444,0,0],920:[0,.69444,.07555,0],923:[0,.69444,0,0],926:[0,.69444,.12816,0],928:[0,.69444,.08094,0],931:[0,.69444,.11983,0],933:[0,.69444,.09031,0],934:[0,.69444,.04603,0],936:[0,.69444,.09031,0],937:[0,.69444,.08293,0],8211:[0,.44444,.08616,0],8212:[0,.44444,.08616,0],8216:[0,.69444,.07816,0],8217:[0,.69444,.07816,0],8220:[0,.69444,.14205,0],8221:[0,.69444,.00316,0]},"SansSerif-Regular":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.125,.08333,0,0],45:[0,.44444,0,0],46:[0,.08333,0,0],47:[.25,.75,0,0],48:[0,.65556,0,0],49:[0,.65556,0,0],50:[0,.65556,0,0],51:[0,.65556,0,0],52:[0,.65556,0,0],53:[0,.65556,0,0],54:[0,.65556,0,0],55:[0,.65556,0,0],56:[0,.65556,0,0],57:[0,.65556,0,0],58:[0,.44444,0,0],59:[.125,.44444,0,0],61:[-.13,.37,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.125,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01389,0],87:[0,.69444,.01389,0],88:[0,.69444,0,0],89:[0,.69444,.025,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.09444,.02778,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.06944,0],103:[.19444,.44444,.01389,0],104:[0,.69444,0,0],105:[0,.67937,0,0],106:[.19444,.67937,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,.01389,0],115:[0,.44444,0,0],116:[0,.57143,0,0],117:[0,.44444,0,0],118:[0,.44444,.01389,0],119:[0,.44444,.01389,0],120:[0,.44444,0,0],121:[.19444,.44444,.01389,0],122:[0,.44444,0,0],126:[.35,.32659,0,0],168:[0,.67937,0,0],176:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.60889,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.67937,0,0],730:[0,.69444,0,0],732:[0,.67659,0,0],733:[0,.69444,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.44444,.02778,0],8212:[0,.44444,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"Script-Regular":{65:[0,.7,.22925,0],66:[0,.7,.04087,0],67:[0,.7,.1689,0],68:[0,.7,.09371,0],69:[0,.7,.18583,0],70:[0,.7,.13634,0],71:[0,.7,.17322,0],72:[0,.7,.29694,0],73:[0,.7,.19189,0],74:[.27778,.7,.19189,0],75:[0,.7,.31259,0],76:[0,.7,.19189,0],77:[0,.7,.15981,0],78:[0,.7,.3525,0],79:[0,.7,.08078,0],80:[0,.7,.08078,0],81:[0,.7,.03305,0],82:[0,.7,.06259,0],83:[0,.7,.19189,0],84:[0,.7,.29087,0],85:[0,.7,.25815,0],86:[0,.7,.27523,0],87:[0,.7,.27523,0],88:[0,.7,.26006,0],89:[0,.7,.2939,0],90:[0,.7,.24037,0]},"Size1-Regular":{40:[.35001,.85,0,0],41:[.35001,.85,0,0],47:[.35001,.85,0,0],91:[.35001,.85,0,0],92:[.35001,.85,0,0],93:[.35001,.85,0,0],123:[.35001,.85,0,0],125:[.35001,.85,0,0],710:[0,.72222,0,0],732:[0,.72222,0,0],770:[0,.72222,0,0],771:[0,.72222,0,0],8214:[-99e-5,.601,0,0],8593:[1e-5,.6,0,0],8595:[1e-5,.6,0,0],8657:[1e-5,.6,0,0],8659:[1e-5,.6,0,0],8719:[.25001,.75,0,0],8720:[.25001,.75,0,0],8721:[.25001,.75,0,0],8730:[.35001,.85,0,0],8739:[-.00599,.606,0,0],8741:[-.00599,.606,0,0],8747:[.30612,.805,.19445,0],8748:[.306,.805,.19445,0],8749:[.306,.805,.19445,0],8750:[.30612,.805,.19445,0],8896:[.25001,.75,0,0],8897:[.25001,.75,0,0],8898:[.25001,.75,0,0],8899:[.25001,.75,0,0],8968:[.35001,.85,0,0],8969:[.35001,.85,0,0],8970:[.35001,.85,0,0],8971:[.35001,.85,0,0],9168:[-99e-5,.601,0,0],10216:[.35001,.85,0,0],10217:[.35001,.85,0,0],10752:[.25001,.75,0,0],10753:[.25001,.75,0,0],10754:[.25001,.75,0,0],10756:[.25001,.75,0,0],10758:[.25001,.75,0,0]},"Size2-Regular":{40:[.65002,1.15,0,0],41:[.65002,1.15,0,0],47:[.65002,1.15,0,0],91:[.65002,1.15,0,0],92:[.65002,1.15,0,0],93:[.65002,1.15,0,0],123:[.65002,1.15,0,0],125:[.65002,1.15,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8719:[.55001,1.05,0,0],8720:[.55001,1.05,0,0],8721:[.55001,1.05,0,0],8730:[.65002,1.15,0,0],8747:[.86225,1.36,.44445,0],8748:[.862,1.36,.44445,0],8749:[.862,1.36,.44445,0],8750:[.86225,1.36,.44445,0],8896:[.55001,1.05,0,0],8897:[.55001,1.05,0,0],8898:[.55001,1.05,0,0],8899:[.55001,1.05,0,0],8968:[.65002,1.15,0,0],8969:[.65002,1.15,0,0],8970:[.65002,1.15,0,0],8971:[.65002,1.15,0,0],10216:[.65002,1.15,0,0],10217:[.65002,1.15,0,0],10752:[.55001,1.05,0,0],10753:[.55001,1.05,0,0],10754:[.55001,1.05,0,0],10756:[.55001,1.05,0,0],10758:[.55001,1.05,0,0]},"Size3-Regular":{40:[.95003,1.45,0,0],41:[.95003,1.45,0,0],47:[.95003,1.45,0,0],91:[.95003,1.45,0,0],92:[.95003,1.45,0,0],93:[.95003,1.45,0,0],123:[.95003,1.45,0,0],125:[.95003,1.45,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8730:[.95003,1.45,0,0],8968:[.95003,1.45,0,0],8969:[.95003,1.45,0,0],8970:[.95003,1.45,0,0],8971:[.95003,1.45,0,0],10216:[.95003,1.45,0,0],10217:[.95003,1.45,0,0]},"Size4-Regular":{40:[1.25003,1.75,0,0],41:[1.25003,1.75,0,0],47:[1.25003,1.75,0,0],91:[1.25003,1.75,0,0],92:[1.25003,1.75,0,0],93:[1.25003,1.75,0,0],123:[1.25003,1.75,0,0],125:[1.25003,1.75,0,0],710:[0,.825,0,0],732:[0,.825,0,0],770:[0,.825,0,0],771:[0,.825,0,0],8730:[1.25003,1.75,0,0],8968:[1.25003,1.75,0,0],8969:[1.25003,1.75,0,0],8970:[1.25003,1.75,0,0],8971:[1.25003,1.75,0,0],9115:[.64502,1.155,0,0],9116:[1e-5,.6,0,0],9117:[.64502,1.155,0,0],9118:[.64502,1.155,0,0],9119:[1e-5,.6,0,0],9120:[.64502,1.155,0,0],9121:[.64502,1.155,0,0],9122:[-99e-5,.601,0,0],9123:[.64502,1.155,0,0],9124:[.64502,1.155,0,0],9125:[-99e-5,.601,0,0],9126:[.64502,1.155,0,0],9127:[1e-5,.9,0,0],9128:[.65002,1.15,0,0],9129:[.90001,0,0,0],9130:[0,.3,0,0],9131:[1e-5,.9,0,0],9132:[.65002,1.15,0,0],9133:[.90001,0,0,0],9143:[.88502,.915,0,0],10216:[1.25003,1.75,0,0],10217:[1.25003,1.75,0,0],57344:[-.00499,.605,0,0],57345:[-.00499,.605,0,0],57680:[0,.12,0,0],57681:[0,.12,0,0],57682:[0,.12,0,0],57683:[0,.12,0,0]},"Typewriter-Regular":{32:[0,0,0,0],33:[0,.61111,0,0],34:[0,.61111,0,0],35:[0,.61111,0,0],36:[.08333,.69444,0,0],37:[.08333,.69444,0,0],38:[0,.61111,0,0],39:[0,.61111,0,0],40:[.08333,.69444,0,0],41:[.08333,.69444,0,0],42:[0,.52083,0,0],43:[-.08056,.53055,0,0],44:[.13889,.125,0,0],45:[-.08056,.53055,0,0],46:[0,.125,0,0],47:[.08333,.69444,0,0],48:[0,.61111,0,0],49:[0,.61111,0,0],50:[0,.61111,0,0],51:[0,.61111,0,0],52:[0,.61111,0,0],53:[0,.61111,0,0],54:[0,.61111,0,0],55:[0,.61111,0,0],56:[0,.61111,0,0],57:[0,.61111,0,0],58:[0,.43056,0,0],59:[.13889,.43056,0,0],60:[-.05556,.55556,0,0],61:[-.19549,.41562,0,0],62:[-.05556,.55556,0,0],63:[0,.61111,0,0],64:[0,.61111,0,0],65:[0,.61111,0,0],66:[0,.61111,0,0],67:[0,.61111,0,0],68:[0,.61111,0,0],69:[0,.61111,0,0],70:[0,.61111,0,0],71:[0,.61111,0,0],72:[0,.61111,0,0],73:[0,.61111,0,0],74:[0,.61111,0,0],75:[0,.61111,0,0],76:[0,.61111,0,0],77:[0,.61111,0,0],78:[0,.61111,0,0],79:[0,.61111,0,0],80:[0,.61111,0,0],81:[.13889,.61111,0,0],82:[0,.61111,0,0],83:[0,.61111,0,0],84:[0,.61111,0,0],85:[0,.61111,0,0],86:[0,.61111,0,0],87:[0,.61111,0,0],88:[0,.61111,0,0],89:[0,.61111,0,0],90:[0,.61111,0,0],91:[.08333,.69444,0,0],92:[.08333,.69444,0,0],93:[.08333,.69444,0,0],94:[0,.61111,0,0],95:[.09514,0,0,0],96:[0,.61111,0,0],97:[0,.43056,0,0],98:[0,.61111,0,0],99:[0,.43056,0,0],100:[0,.61111,0,0],101:[0,.43056,0,0],102:[0,.61111,0,0],103:[.22222,.43056,0,0],104:[0,.61111,0,0],105:[0,.61111,0,0],106:[.22222,.61111,0,0],107:[0,.61111,0,0],108:[0,.61111,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.22222,.43056,0,0],113:[.22222,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.55358,0,0],117:[0,.43056,0,0],118:[0,.43056,0,0],119:[0,.43056,0,0],120:[0,.43056,0,0],121:[.22222,.43056,0,0],122:[0,.43056,0,0],123:[.08333,.69444,0,0],124:[.08333,.69444,0,0],125:[.08333,.69444,0,0],126:[0,.61111,0,0],127:[0,.61111,0,0],160:[0,0,0,0],176:[0,.61111,0,0],184:[.19445,0,0,0],305:[0,.43056,0,0],567:[.22222,.43056,0,0],711:[0,.56597,0,0],713:[0,.56555,0,0],714:[0,.61111,0,0],715:[0,.61111,0,0],728:[0,.61111,0,0],730:[0,.61111,0,0],770:[0,.61111,0,0],771:[0,.61111,0,0],776:[0,.61111,0,0],915:[0,.61111,0,0],916:[0,.61111,0,0],920:[0,.61111,0,0],923:[0,.61111,0,0],926:[0,.61111,0,0],928:[0,.61111,0,0],931:[0,.61111,0,0],933:[0,.61111,0,0],934:[0,.61111,0,0],936:[0,.61111,0,0],937:[0,.61111,0,0],8216:[0,.61111,0,0],8217:[0,.61111,0,0],8242:[0,.61111,0,0],9251:[.11111,.21944,0,0]}};const a=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,r={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25]},n={" ":" ","​":" ","Å":"A","Ç":"C","Ð":"D","Þ":"o","å":"a","ç":"c","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function o(e,t){let r=e.charCodeAt(0);e[0]in n?r=n[e[0]].charCodeAt(0):a.test(e[0])&&(r=77);const o=i[t][r];return o?{defaultMetrics:!1,depth:o[0],height:o[1],italic:o[2],skew:o[3]}:11034===r?{defaultMetrics:!0,depth:0,height:1,italic:0,skew:0}:{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}function s(e,t,i=NaN){if("string"==typeof e){const i=e.match(/([-+]?[0-9.]*)\s*([a-zA-Z]+)/);i?(e=parseFloat(i[1]),t=i[2].toLowerCase()):e=parseFloat(e)}const a={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:10,bp:1.00375,dd:1238/1157,pc:12,in:72.27,mu:10/18}[t]||1;if(isFinite(i)){const t=Math.pow(10,i);return Math.round(e/10*a*t)/t}return e/10*a}function l(e,t){return s(e,t)*(4/3)*10}class c{constructor(e,t,i,a){this.id=e,this.size=t,this.cramped=a,this.sizeMultiplier=i,this.metrics=Object.keys(r).reduce((e,t)=>({...e,[t]:r[t][this.size]}),{}),this.metrics.emPerEx=r.xHeight[this.size]/r.quad[this.size]}sup(){return d[[4,5,4,5,6,7,6,7][this.id]]}sub(){return d[[5,5,5,5,7,7,7,7][this.id]]}fracNum(){return d[[2,3,4,5,6,7,6,7][this.id]]}fracDen(){return d[[3,3,5,5,7,7,7,7][this.id]]}cramp(){return d[[1,1,3,3,5,5,7,7][this.id]]}cls(){return["displaystyle textstyle","textstyle","scriptstyle","scriptscriptstyle"][this.size]}adjustTo(e){let t=[["","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-textstyle displaystyle textstyle","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-scriptstyle textstyle displaystyle","reset-scriptstyle textstyle","","reset-scriptstyle scriptscriptstyle"],["reset-scriptscriptstyle textstyle displaystyle","reset-scriptscriptstyle textstyle","reset-scriptscriptstyle scriptstyle",""]][this.size][e.size];return t.length>0&&(t=" "+t),t}isTight(){return this.size>=2}}const d={0:new c(0,0,1,!1),1:new c(1,0,1,!0),2:new c(2,1,1,!1),3:new c(3,1,1,!0),4:new c(4,2,.7,!1),5:new c(5,2,.7,!0),6:new c(6,3,.5,!1),7:new c(7,3,.5,!0)};d.displaystyle=d[0],d.textstyle=d[2],d.scriptstyle=d[4],d.scriptscriptstyle=d[6];class m{constructor(e){var t,i,a,r,n,o;this.macros=null!==(t=e.macros)&&void 0!==t?t:{},this.atomIdsSettings=e.atomIdsSettings,this.mathstyle=null!==(i=e.mathstyle)&&void 0!==i?i:d.displaystyle,this.letterShapeStyle=null!==(a=e.letterShapeStyle)&&void 0!==a?a:"tex",this.size=null!==(r=e.size)&&void 0!==r?r:"size5",this.parentMathstyle=null!==(n=e.parentMathstyle)&&void 0!==n?n:this.mathstyle,this.parentSize=null!==(o=e.parentSize)&&void 0!==o?o:this.size,this.opacity=e.opacity,this.smartFence=e.smartFence}clone(e={}){const t=new m(this);return void 0!==e&&(Object.assign(t,e),e.mathstyle?(t.parentMathstyle=this.mathstyle,t.parentSize=this.size,"string"==typeof e.mathstyle&&(t.mathstyle=d[e.mathstyle])):t.mathstyle=this.mathstyle),t}setMathstyle(e){e&&"auto"!==e&&(this.mathstyle=d[e])}cramp(){return this.clone({mathstyle:this.mathstyle.cramp()})}sup(){return this.clone({mathstyle:this.mathstyle.sup()})}sub(){return this.clone({mathstyle:this.mathstyle.sub()})}}const p={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},u={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34]},h={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",widetilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",widetilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",widetilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",widetilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};function f(e){let t="",i="";for(const a of e)a&&(/[a-zA-Z*]/.test(a[0])&&(i+=t),t=/\\[a-zA-Z]+\*?$/.test(a)?" ":"",i+=a);return i}function g(e){return f(e.map(e=>{var t;return null!==(t={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])&&void 0!==t?t:e}))}function y(e,t){const i=[];let a,r=[];return e.forEach(e=>{if("first"!==e.type){let n;"variant"===t?(n=e.variant,e.variantStyle&&"up"!==e.variantStyle&&(n+="-"+e.variantStyle)):n=e[t],n!==a?(r.length>0&&i.push(r),r=[e],a=n):r.push(e)}}),r.length>0&&i.push(r),i}const b={};function v(e,t){b[e]={...t}}const x=["","mord","mbin","mop","mrel","mopen","mclose","mpunct","minner","spacing","first","command","error","placeholder","textord","none"];function k(e){return x.includes(e)}const _={"mord+mop":3,"mord+mbin":4,"mord+mrel":5,"mord+minner":3,"mop+mord":3,"mop+mop":3,"mop+mbin":5,"mop+minner":3,"mbin+mord":4,"mbin+mop":4,"mbin+mopen":4,"mbin+minner":4,"mrel+mord":5,"mrel+mop":5,"mrel+mopen":5,"mrel+minner":5,"mclose+mop":3,"mclose+mbin":4,"mclose+mrel":5,"mclose+minner":3,"mpunct+mord":3,"mpunct+mop":3,"mpunct+mbin":4,"mpunct+mrel":5,"mpunct+mopen":3,"mpunct+mpunct":3,"mpunct+minner":3},w={"mord+mop":3,"mop+mord":3,"mop+mop":3,"mclose+mop":3,"minner+mop":3};function M(e){if("string"==typeof e)return e;if("number"==typeof e)return Number(Math.ceil(100*e)/100).toString();if(void 0===e)return"";if(t(e)){let t="";for(const i of e)t+=M(i);return t}return""}class S{constructor(e,i="",a=""){this.classes=i,t(e)?this.children=[].concat(...e):"string"==typeof e?this.body=e:e&&"object"==typeof e&&(this.children=[e]),this.type=a,this.style=null,this.updateDimensions()}updateDimensions(){let e=0,t=0,i=1;this.children?this.children.forEach(a=>{a.height>e&&(e=a.height),a.depth>t&&(t=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}):"string"==typeof this.body&&(e=1.2,t=0),this.height=e,this.depth=t,this.maxFontSize=i}selected(e){e&&!/ML__selected/.test(this.classes)&&(this.classes.length>0&&(this.classes+=" "),this.classes+="ML__selected"),!e&&/ML__selected/.test(this.classes)&&(this.classes=this.classes.replace("ML__selected","")),this.children&&this.children.forEach(t=>t.selected(e))}applyStyle(e){if(!e)return;if(e.color&&("none"!==e.color?this.setStyle("color",e.color):this.setStyle("color","")),e.backgroundColor&&("none"!==e.backgroundColor?this.setStyle("background-color",e.backgroundColor):this.setStyle("background-color","")),e.cssClass&&(this.classes+=" "+e.cssClass),!this.body)return;const t=function(e,t){var i;return(null===(i=b[t.mode])||void 0===i?void 0:i.applyStyle)?b[t.mode].applyStyle(e,t):""}(this,e);if(this.body&&t){this.maxFontSize={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49}[e.fontSize]||1,this.height=0,this.depth=0,this.skew=0,this.italic=0;for(let e=0;e0&&(this.style||(this.style={}),this.style[e]=i)}setTop(e){e&&0!==e&&(this.style||(this.style={}),this.style.top=M(e)+"em",this.height-=e,this.depth+=e)}setLeft(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-left"]=M(e)+"em")}setRight(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-right"]=M(e)+"em")}setWidth(e){e&&0!==e&&(this.style||(this.style={}),this.style.width=M(e)+"em")}toMarkup(e=1,t=1){var i,a,r,n,o;let s="",l=this.body||"";if(this.children){let e="none";for(let r=0;r`${e}="${this.attributes[e]}"`).join(" "));const t=this.classes.split(" ");t.push(null!==(r={command:"ML__command",placeholder:"ML__placeholder",error:"ML__error"}[this.type])&&void 0!==r?r:""),this.caret&&"command"===this.type&&t.push("ML__command-caret");let i="";if(i=t.length>1?t.filter((e,t,i)=>e.length>0&&i.indexOf(e)===t).join(" "):t[0],i.length>0&&(s+=` class="${i}"`),e&&((null===(n=this.style)||void 0===n?void 0:n["margin-left"])?this.style["margin-left"]=M(parseFloat(this.style["margin-left"])+e/18)+"em":(this.style||(this.style={}),this.style["margin-left"]=M(e/18)+"em")),this.style){let e="";const t=/ML__selected/.test(this.classes);for(const i in this.style)Object.prototype.hasOwnProperty.call(this.style,i)&&("background-color"===i&&t||(e+=i+":"+this.style[i]+";"));e.length>0&&(s+=' style="'+e+'"')}s+=">",this.svgBody?s+=function(e){if(u[e]){const t=u[e][2];return``}const[t,i,a,r]=p[e];let n,o;const s=a/1e3;3===t.length?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):2===t.length?(n=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],o=[r]);const l=t.map((e,t)=>``).join("");return`${l}`}(this.svgBody):this.svgOverlay?(s+='",s+=""):s+=l,s+=""}else s="";return this.caret&&"command"!==this.type&&("text"===this.caret?s+='':s+=''),s}tryCoalesceWith(e){if(this.type!==e.type)return!1;if("error"===this.type||"placeholder"===this.type||"command"===this.type)return!1;if(this.svgBody||!this.body)return!1;if(e.svgBody||!e.body)return!1;const t=this.children&&this.children.length>0,i=e.children&&e.children.length>0;if(t||i)return!1;if((this.style?this.style.length:0)!==(e.style?e.style.length:0))return!1;const a=this.classes.trim().replace(/\s+/g," ").split(" "),r=e.classes.trim().replace(/\s+/g," ").split(" ");if(a.length!==r.length)return!1;a.sort(),r.sort();for(let e=0;e=e.length)return"none";const s=null!==(a=null===(i=e[t-1])||void 0===i?void 0:i.type)&&void 0!==a?a:"none",l=null!==(n=null===(r=e[t+1])||void 0===r?void 0:r.type)&&void 0!==n?n:"none";let c=null!==(o=e[t].type)&&void 0!==o?o:"none";return"first"===c?"none":"textord"===c?"mord":("mbin"===c&&(/first|none|mrel|mpunct|mopen|mbin|mop/.test(s)||/none|mrel|mpunct|mclose/.test(l))&&(c="mord"),c)}function L(e){return e?t(e)?e.reduce((e,t)=>Math.max(e,t.height),0):e.height:0}function A(e){return e?t(e)?e.reduce((e,t)=>Math.max(e,t.depth),0):e.depth:0}function q(e){return e?t(e)?e[e.length-1].italic:e.italic:0}function $(e,i="",a=""){if(t(e)){const t=e.filter(e=>Boolean(e));return 1===t.length?new S(t[0],i,a):new S(t,i,a)}return new S(e,i,a)}function C(e,t,i="",a=""){const r=new S(t,i,a),n=o(t,e);return r.height=n.height,r.depth=n.depth,r.skew=n.skew,r.italic=n.italic,r.setRight(r.italic),r}function D(e,i="",a=""){const r=$("","ML__strut");let n,o;return r.setStyle("height",L(e),"em"),0!==A(e)&&(n=$("","ML__strut--bottom"),n.setStyle("height",L(e)+A(e),"em"),n.setStyle("vertical-align",-A(e),"em")),o=t(e)?[r,n,...e]:[r,n,e],$(o,i,a)}function T(e,t,i,a,r){r=r||"";const n=E(t,(r+=" style-wrap ")+i.adjustTo(a));n.type=e;const o=a.sizeMultiplier/i.sizeMultiplier;return n.height*=o,n.depth*=o,n.maxFontSize=a.sizeMultiplier,n}function E(e,t="",i=""){const a=new S(e,t,i);let r=1;return r=e instanceof S?e.maxFontSize:e.reduce((e,t)=>Math.max(e,t.maxFontSize),r),a.height*=r,a.depth*=r,a}function K(e,i,a="shift",r=0){let n=0,o=0;a=a||"shift";for(let e=0;e0?"em":""),a.attributes={"aria-hidden":"true"}),"size5"!==e.size?new S(a,"fontsize-ensurer reset-"+e.size+" size5"):0!==i?a:null}(e,s),c=[];o=n;for(const e of i)if("number"==typeof e)o+=e;else if(e instanceof S){const t=$([l,e]);t.setTop(-e.depth-o),c.push(t),o+=e.height+e.depth}const d=$(c,"vlist");return d.depth=Math.max(n,A(d)||0),d.height=Math.max(-o,L(d)||0),d}function N(e){const t=new S(null);return t.svgBody=e,t.height=function(e){return p[e]?p[e][2]/1e3:u[e][2]}(e)/2,t.depth=t.height,t}const O={},B={"<":"<",">":">",o:"o","&":"\\&","{":"\\{","}":"\\}","[":"\\lbrack","]":"\\rbrack",":":"\\colon"," ":"~","¬":"\\neg","·":"\\cdot","¼":"\\frac{1}{4}","½":"\\frac{1}{2}","¾":"\\frac{3}{4}","⁰":"^{0}","ⁱ":"^{i}","¹":"^{1}","²":"^{2}","³":"^{3}","†":"\\dagger","‡":"\\ddagger","…":"\\ldots","⁴":"^{4}","⁵":"^{5}","⁶":"^{6}","⁷":"^{7}","⁸":"^{8}","⁹":"^{9}","⁺":"^{+}","⁻":"^{-}","⁼":"^{=}","ⁿ":"^{n}","₀":"_{0}","₁":"_{1}","₂":"_{2}","₃":"_{3}","₄":"_{4}","₅":"_{5}","₆":"_{6}","₇":"_{7}","₈":"_{8}","₉":"_{9}","₊":"_{+}","₋":"_{-}","₌":"_{=}","ₐ":"_{a}","ₑ":"_{e}","ₒ":"_{o}","ₓ":"_{x}","′":"\\prime","'":"\\prime","←":"\\gets","→":"\\to","△":"\\triangle","▽":"\\triangledown","∋":"\\owns","∗":"\\ast","∣":"\\vert","∥":"\\Vert","∧":"\\land","∨":"\\lor","⋅":"\\cdot","⋈":"\\bowtie","≠":"\\ne","≤":"\\le","≥":"\\ge","⊥":"\\bot","⟷":"\\biconditional","⟸":"\\impliedby","⟹":"\\implies","ℂ":"\\C","ℕ":"\\N","ℙ":"\\P","ℚ":"\\Q","ℝ":"\\R","ℤ":"\\Z"},F={},P={},R={iff:"\\;⟺\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",bra:"\\mathinner{\\langle{#1}|}",ket:"\\mathinner{|{#1}\\rangle}",braket:"\\mathinner{\\langle{#1}\\rangle}",set:"\\mathinner{\\lbrace #1 \\rbrace}",Bra:"\\left\\langle #1\\right|",Ket:"\\left|#1\\right\\rangle",Braket:"\\left\\langle{#1}\\right\\rangle",Set:"\\left\\lbrace #1 \\right\\rbrace",rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}"},I={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},H={"\\#":"#","\\&":"&","\\$":"$","\\%":"%","\\_":"_","\\euro":"€","\\maltese":"✠","\\{":"{","\\}":"}","\\nobreakspace":" ","\\ldots":"…","\\textellipsis":"…","\\backslash":"\\","`":"‘","'":"’","``":"“","''":"”","\\degree":"°","\\textasciicircum":"^","\\textasciitilde":"~","\\textasteriskcentered":"*","\\textbackslash":"\\","\\textbraceleft":"{","\\textbraceright":"}","\\textbullet":"•","\\textdollar":"$","\\textsterling":"£","\\textdagger":"†","\\textdaggerdbl":"‡","–":"–","—":"—","‘":"‘","’":"’","“":"“","”":"”",'"':"”","\\ss":"ß","\\ae":"æ","\\oe":"œ","\\AE":"Æ","\\OE":"Œ","\\O":"Ø","\\i":"ı","\\j":"ȷ","\\aa":"å","\\AA":"Å"},W=/[a-zA-Z0-9!@*()-=+{}[\]\\';:?/.,~<>`|'$%#&^_" ]/,V="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("\\p{Letter}","u"),U="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[0-9a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("[0-9\\p{Letter}]","u");function j(e,t,i="mord",a=""){O[e]={type:i,variant:a,value:t},B[t]||a||(B[t]=e),H[e]=t}function G(e,t){for(let i=e;i<=t;i++){const e=String.fromCodePoint(i);j(e,e)}}function X(e,t){return"math"===e?B[t]||t:"text"===e&&Object.keys(H).find(e=>H[e]===t)||t}const Z={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},Y=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Q(e,t,i){if(!/[A-Za-z0-9]/.test(e))return e;if(!t&&!i)return e;const a=e.codePointAt(0);for(let e=0;e=Y[e].offset&&a120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const i in Z)if(Object.prototype.hasOwnProperty.call(Z,i)&&Z[i]===e){e=null!==(t=i.codePointAt(0))&&void 0!==t?t:0;break}for(let t=0;t=Y[t].start&&e=1;)a.params.push({isOptional:!1,type:"math"}),r-=1}}}else"math"===t?a=O[e]:H[e]&&(a={value:H[e]});return!a||"mord"!==a.type||"f"!==a.value&&"g"!==a.value&&"h"!==a.value||(a.isFunction=!0),a}function ne(e){if(e.length<=1)return[];const t=[];for(const i in F)Object.prototype.hasOwnProperty.call(F,i)&&i.startsWith(e)&&!F[i].infix&&t.push({match:i,frequency:F[i].frequency});for(const i in O)Object.prototype.hasOwnProperty.call(O,i)&&i.startsWith(e)&&t.push({match:i,frequency:O[i].frequency});return t.sort((e,t)=>e.frequency===t.frequency?e.match.length-t.match.length:(t.frequency||0)-(e.frequency||0)),t}function oe(e){let t="auto";const i=e.match(/:([^=]+)/);return i&&(t=i[1].trim()),t}function se(e){if(!e)return[];let t=[],i=e.split("]");if("["===i[0].charAt(0)){t.push({isOptional:!0,type:oe(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(se(i[e]))}else if(i=e.split("}"),"{"===i[0].charAt(0)){t.push({isOptional:!1,type:oe(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(se(i[e]))}return t}function le(e){let t="",i=!0;return e.forEach(e=>{"string"==typeof e.body?t+=e.body:i=!1}),i?t:""}function ce(e,t,i,a=!1){"string"==typeof e&&(e=[e]);const r={tabular:a,params:se(t),parser:i};for(const t of e)P[t]=r}function de(e,t,i){ce(e,t,i,!0)}function me(e,t,i,a,r){"string"==typeof e&&(e=[e]),i||(i={});const n={params:se(t),mode:i.mode,infix:Boolean(i.infix),parse:a,emit:r};e.forEach(e=>{F["\\"+e]=n})}const pe={acute:"ˊ",grave:"ˋ",dot:"˙",ddot:"¨",mathring:"˚",tilde:"~",bar:"ˉ",breve:"˘",check:"ˇ",hat:"^",vec:"⃗"};me(Object.keys(pe),"{body:auto}",null,(function(e,t){return{type:"accent",accent:pe[e.slice(1)],limits:"accent",skipBoundary:!0,body:t[0]}})),me(["widehat","widecheck","widetilde"],"{body:auto}",null,(e,t)=>{const i=le(t[0]);return{type:"accent",svgAccent:e.slice(1)+(i.length>5?"4":["1","1","2","2","3","3"][i.length]),limits:"accent",skipBoundary:!0,body:t[0]}}),me("utilde","{body:auto}",null,(e,t)=>{const i=le(t[0]),a="widetilde"+(i.length>5?"4":["1","1","2","2","3","3"][i.length]);return{type:"overunder",body:t[0],svgBelow:a,skipBoundary:!0}},(e,t,i,a)=>`\\utilde{${a(i,i.body)}}`),me("^","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[t[0]]||"^"})),me("`","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[t[0]]||"`"})),me("'","{:string}",{},(function(e,t){return{type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[t[0]]||"^"}})),me("~","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[t[0]]||"´"})),me("c","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{c:"ç",C:"Ç"}[t[0]]||""})),me("enclose","{notation:string}[style:string]{body:auto}",null,(e,t)=>{const i={type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",captureSelection:!0,body:t[2]};if(t[1]){const e=t[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const t of e){const e=t.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(e)i.strokeWidth=l(e[1],"px"),isFinite(i.strokeWidth)||(i.strokeWidth=1),i.strokeStyle=e[2],i.strokeColor=e[3];else{const e=t.match(/\s*([a-z]*)\s*=\s*"(.*)"/);e&&("mathbackground"===e[1]?i.backgroundcolor=e[2]:"mathcolor"===e[1]?i.strokeColor=e[2]:"padding"===e[1]?i.padding=l(e[2],"px"):"shadow"===e[1]&&(i.shadow=e[2]))}}"dashed"===i.strokeStyle?i.svgStrokeStyle="5,5":"dotted"===i.strokeStyle&&(i.svgStrokeStyle="1,5")}return i.borderStyle=i.strokeWidth+"px "+i.strokeStyle+" "+i.strokeColor,i.notation={},t[0].split(/[, ]/).filter(e=>e.length>0).forEach(e=>{i.notation[e.toLowerCase()]=!0}),i.notation.updiagonalarrow&&(i.notation.updiagonalstrike=!1),i.notation.box&&(i.notation.left=!1,i.notation.right=!1,i.notation.bottom=!1,i.notation.top=!1),i}),me("cancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0},body:t[0]}})),me("bcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{downdiagonalstrike:!0},body:t[0]}})),me("xcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0,downdiagonalstrike:!0},body:t[0]}})),ce("math","",()=>({mathstyle:"textstyle"})),ce("displaymath","",(function(){return{mathstyle:"displaystyle"}})),de("array","{columns:colspec}",(e,t)=>({colFormat:t[0],mathstyle:"textstyle"})),de(["equation","equation","subequations"],"",()=>({colFormat:[{align:"c"}]})),de("multline","",(function(){return{colFormat:[{align:"m"}]}})),de(["align","align*","aligned","eqnarray"],"",(e,t,i)=>{let a=0;for(const e of i)a=Math.max(a,e.length);const r=[{gap:0},{align:"r"},{gap:0},{align:"l"}];let n=2;for(;n({colFormat:[{align:"r"},{align:"l"}]})),de(["gather","gathered"],"",()=>({colFormat:[{gap:.25},{align:"c"},{gap:0}],jot:.3})),de(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","smallmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*","smallmatrix*"],"[columns:colspec]",(e,t)=>{var i;const a={mathstyle:"textstyle"};switch(e){case"pmatrix":case"pmatrix*":a.leftDelim="(",a.rightDelim=")";break;case"bmatrix":case"bmatrix*":a.leftDelim="[",a.rightDelim="]";break;case"Bmatrix":case"Bmatrix*":a.leftDelim="\\lbrace",a.rightDelim="\\rbrace";break;case"vmatrix":case"vmatrix*":a.leftDelim="\\vert",a.rightDelim="\\vert";break;case"Vmatrix":case"Vmatrix*":a.leftDelim="\\Vert",a.rightDelim="\\Vert";break;case"smallmatrix":case"smallmatrix*":a.mathstyle="scriptstyle";break;case"matrix":case"matrix*":a.leftDelim=".",a.rightDelim="."}return a.colFormat=null!==(i=t[0])&&void 0!==i?i:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}],a}),de("cases","",()=>({arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",colFormat:[{align:"l"},{gap:1},{align:"l"}]})),ce("center","",(function(){return{colFormat:[{align:"c"}]}})),me(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overbrace","overlinesegment","overgroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgAbove:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),me(["underrightarrow","underleftarrow","underleftrightarrow","underbrace","underlinesegment","undergroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgBelow:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),me(["xrightarrow","xleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","xLeftrightarrow","xrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xrightleftarrows","xrightequilibrium","xleftequilibrium"],"[:auto]{:auto}",null,(e,t)=>{let i=t[1];return 0===(null==i?void 0:i.length)&&(i=null),{type:"overunder",mathtype:"mrel",svgBody:e.slice(1),overscript:i,underscript:t[0],skipBoundary:!0}},(e,t,i,a)=>e+(void 0!==i.underscript?`[${a(i,i.underscript)}]`:"")+`{${a(i,i.overscript)}}`),me(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","coth","ctg","cth","cotg","csc","cosec","deg","dim","exp","hom","inf","ker","lg","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main",variantStyle:"up"}})),me(["liminf","limsup"],"",null,e=>({type:"mop",limits:"limits",isSymbol:!1,body:{"\\liminf":"lim inf","\\limsup":"lim sup"}[e],variant:"main"})),me(["lim","mod"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,body:e.slice(1),variant:"main"}})),me(["det","max","min"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main"}})),me("sqrt","[index:auto]{radicand:auto}",null,(e,t)=>({type:"surd",body:t[1],index:t[0]}),(e,t,i,a)=>{let r="";return void 0!==i.index&&(r+=`[${a(i,i.index)}]`),r+=`{${a(i,i.body)}}`,e+r}),me(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{numerator}{denominator}",null,(e,t)=>{const i={type:"genfrac",numer:t[0],denom:t[1],mathstyle:"auto"};switch(e){case"\\dfrac":case"\\frac":case"\\tfrac":case"\\cfrac":i.hasBarLine=!0;break;case"\\\\atopfrac":i.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i.hasBarLine=!1,i.leftDelim="(",i.rightDelim=")"}switch(e){case"\\dfrac":case"\\dbinom":i.mathstyle="displaystyle";break;case"\\tfrac":case"\\tbinom":i.mathstyle="textstyle"}return"\\cfrac"===e&&(i.continuousFraction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),me(["over","atop","choose"],"",{infix:!0},(e,t)=>{const i=t[0],a=t[1];let r=!1,n=null,o=null;switch(e){case"\\atop":break;case"\\over":r=!0;break;case"\\choose":r=!1,n="(",o=")";break;default:throw new Error("Unrecognized genfrac command")}return{type:"genfrac",numer:i,denom:a,hasBarLine:r,leftDelim:n,rightDelim:o,mathstyle:"auto"}},(e,t,i,a)=>`{${a(i,i.numer)}${e} ${a(i,i.denom)}}`),me("pdiff","{numerator}{denominator}",null,(e,t)=>({type:"genfrac",numer:t[0],denom:t[1],numerPrefix:"∂",denomPrefix:"∂",hasBarLine:!0,leftDelim:null,rightDelim:null,mathstyle:"auto"}),(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),me(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","smallint","intop"],"",null,e=>({type:"mop",limits:"auto",isSymbol:!0,variant:"main",body:{coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[e.slice(1)]}));const ue={int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑",sqcup:"⊔",sqcap:"⊓",uplus:"⊎",wr:"≀",amalg:"⨿",Cap:"⋒",Cup:"⋓",doublecap:"⋒",doublecup:"⋓"};me(Object.keys(ue),"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!0,body:ue[e.slice(1)],variant:{"⋒":"ams","⋓":"ams"}[ue[e.slice(1)]]}})),me(["Re","Im"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:{"\\Re":"ℜ","\\Im":"ℑ"}[e],variant:"fraktur"}})),me("middle","{:delim}",null,(function(e,t){return{type:"delim",delim:t[0]}}));const he={m0:"#3f3d99",m1:"#993d71",m2:"#998b3d",m3:"#3d9956",m4:"#3d5a99",m5:"#993d90",m6:"#996d3d",m7:"#43993d",m8:"#3d7999",m9:"#843d99"},fe=["#d35d60","#7293cb","#e1974d","#84bb5d","#9066a7","#aD6a58","#f5a4ce","#fff590","#212121","#818787","#d4d5d2","#ffffff"],ge=["#cc2428","#3769b1","#da7e30","#409852","#6b4c9a","#922426","#e7298a","#ffe907","#000000","#525055","#adafaa","#ffffff"],ye={apricot:"#FBB982",aquamarine:"#00B5BE",bittersweet:"#C04F17",black:"#221E1F",blue:"#2D2F92",bluegreen:"#00B3B8",blueviolet:"#473992",brickred:"#B6321C",brown:"#792500",burntorange:"#F7921D",cadetblue:"#74729A",carnationpink:"#F282B4",cerulean:"#00A2E3",cornflowerblue:"#41B0E4",cyan:"#00AEEF",dandelion:"#FDBC42",darkorchid:"#A4538A",emerald:"#00A99D",forestgreen:"#009B55",fuchsia:"#8C368C",goldenrod:"#FFDF42",gray:"#949698",green:"#00A64F",greenyellow:"#DFE674",junglegreen:"#00A99A",lavender:"#F49EC4",limegreen:"#8DC73E",magenta:"#EC008C",mahogany:"#A9341F",maroon:"#AF3235",melon:"#F89E7B",midnightblue:"#006795",mulberry:"#A93C93",navyblue:"#006EB8",olivegreen:"#3C8031",orange:"#F58137",orangered:"#ED135A",orchid:"#AF72B0",peach:"#F7965A",periwinkle:"#7977B8",pinegreen:"#008B72",plum:"#92268F",processblue:"#00B0F0",purple:"#99479B",rawsienna:"#974006",red:"#ED1B23",redorange:"#F26035",redviolet:"#A1246B",rhodamine:"#EF559F",royalblue:"#0071BC",royalpurple:"#613F99",rubinered:"#ED017D",salmon:"#F69289",seagreen:"#3FBC9D",sepia:"#671800",skyblue:"#46C5DD",springgreen:"#C6DC67",tan:"#DA9D76",tealblue:"#00AEB3",thistle:"#D883B7",turquoise:"#00B4CE",violet:"#58429B",violetred:"#EF58A0",white:"#FFFFFF",wildstrawberry:"#EE2967",yellow:"#FFF200",yellowgreen:"#98CC70",yelloworange:"#FAA21A"};function be(e){var t;const i=e.toLowerCase().split("!");let a,r,n,o=255,s=255,l=255,c=-1;const d=i.length>0&&"-"===i[0].charAt(0);d&&(i[0]=i[0].slice(1));for(let e=0;e=0&&(o=(1-c)*o+c*a,s=(1-c)*s+c*r,l=(1-c)*l+c*n,c=-1),e+1=0&&(o=c*o+(1-c)*a,s=c*s+(1-c)*r,l=c*l+(1-c)*n),d&&(o=255-o,s=255-s,l=255-l),"#"+("00"+Math.round(o).toString(16)).slice(-2)+("00"+Math.round(s).toString(16)).slice(-2)+("00"+Math.round(l).toString(16)).slice(-2)}function ve(e){let t=e.toUpperCase();for(const e in ye)if(ye[e]===t){t=e;break}for(const e in he)if(he[e]===t){t=e;break}return t}me("ensuremath","{:math}",{},(e,t)=>({type:"group",mode:"math",body:t[0],skipBoundary:!0,latexOpen:"\\ensuremath{",latexClose:"}"}),(e,t,i,a)=>a(i,i.body)),me("color","{:color}",{},(e,t)=>({color:t[0]})),me("textcolor","{:color}{content:auto*}",{},(e,t)=>({color:t[0]})),me("boxed","{content:math}",null,(e,t)=>({type:"box",framecolor:"black",skipBoundary:!0,body:t[0]})),me("colorbox","{background-color:string}{content:auto}",{},(e,t)=>({type:"box",backgroundcolor:be(t[0]),skipBoundary:!0,body:t[1],verbatimBackgroundcolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimBackgroundcolor||ve(i.backgroundcolor)}}{${a(i,i.body)}}`),me("fcolorbox","{frame-color:string}{background-color:string}{content:auto}",{},(e,t)=>({type:"box",framecolor:be(t[0]),backgroundcolor:be(t[1]),skipBoundary:!0,body:t[2],verbatimBackgroundcolor:t[1],verbatimFramecolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimFramecolor||ve(i.framecolor)}{${i.verbatimBackgroundcolor||ve(i.backgroundcolor)}}{${a(i,i.body)}}`),me("bbox","[:bbox]{body:auto}",{},(e,t)=>{if(t[0]){const e=t[0];return{type:"box",padding:e.padding,border:e.border,backgroundcolor:e.backgroundcolor,skipBoundary:!0,body:t[1]}}return{type:"box",skipBoundary:!0,body:t[1]}},(e,t,i,a)=>{let r=e;if(isFinite(i.padding)||void 0!==i.border||void 0!==i.backgroundcolor){const e=[];isFinite(i.padding)&&e.push(Math.floor(100*i.padding)/100+"em"),i.border&&e.push("border:"+i.border),i.backgroundcolor&&e.push(ve(i.backgroundcolor)),r+=`[${e.join(",")}]`}return r+`{${a(i,i.body)}}`}),me(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"",{},(e,t)=>({mathstyle:e.slice(1)})),me(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{mode:"text"},(e,t)=>({fontSize:{tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[e.slice(1)]})),me("fontseries","{:string}",{mode:"text"},(e,t)=>({fontSeries:t[0]})),me("fontshape","{:string}",{mode:"text"},(e,t)=>({fontShape:t[0]})),me("fontfamily","{:string}",{mode:"text"},(e,t)=>({fontFamily:t[0]})),me("selectfont","",{mode:"text"},(e,t)=>({})),me("bf","",{},(e,t)=>({fontSeries:"b",fontShape:"n",fontFamily:"cmr"})),me(["boldsymbol","bm"],"{:math*}",{},(e,t)=>({mode:"math",cssClass:"ML__boldsymbol"})),me("bold","{:math*}",{},(e,t)=>({mode:"math",variantStyle:"bold"})),me("bfseries","",{mode:"text"},(e,t)=>({fontSeries:"b"})),me("mdseries","",{mode:"text"},(e,t)=>({fontSeries:"m"})),me("upshape","",{mode:"text"},(e,t)=>({fontShape:"n"})),me("slshape","",{mode:"text"},(e,t)=>({fontShape:"sl"})),me("scshape","",{mode:"text"},(e,t)=>({fontShape:"sc"})),me("textbf","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"b"})),me("textmd","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"m"})),me("textup","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n"})),me("textnormal","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n",fontSeries:"m"})),me("textsl","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sl"})),me("textit","{:text*}",{},(e,t)=>({mode:"text",fontShape:"it"})),me("textsc","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sc"})),me("textrm","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"roman"})),me("textsf","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"sans-serif"})),me("texttt","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"monospace"})),me("mathbf","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bold"})),me("mathit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"italic"})),me("mathbfit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bolditalic"})),me("mathrm","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"up"})),me("mathsf","{:math*}",{},(e,t)=>({mode:"math",variant:"sans-serif",variantStyle:"up"})),me("mathtt","{:math*}",{},(e,t)=>({mode:"math",variant:"monospace",variantStyle:"up"})),me("it","",{},(e,t)=>({fontSeries:"m",fontShape:"it",fontFamily:"cmr",variantStyle:"italic"})),me("rmfamily","",{},(e,t)=>({fontFamily:"roman"})),me("sffamily","",{},(e,t)=>({fontFamily:"sans-serif"})),me("ttfamily","",{},(e,t)=>({fontFamily:"monospace"})),me(["Bbb","mathbb"],"{:math*}",{},(e,t)=>({variant:"double-struck",variantStyle:"up"})),me(["frak","mathfrak"],"{:math*}",{},(e,t)=>({variant:"fraktur",variantStyle:"up"})),me("mathcal","{:math*}",{},(e,t)=>({variant:"calligraphic",variantStyle:"up"})),me("mathscr","{:math*}",{},(e,t)=>({variant:"script",variantStyle:"up"})),me("mbox","{:text}",null,(e,t)=>({type:"group",mode:"math",body:t[0]})),me("text","{:text*}",null,(e,t)=>({mode:"text"})),me("class","{name:string}{content:auto*}",null,(e,t)=>({cssClass:t[0]})),me("cssId","{id:string}{content:auto}",null,(e,t)=>({type:"group",body:t[1],cssId:t[0]})),me("em","",null,(e,t)=>({cssClass:"ML__emph"})),me("emph","{:auto}",null,(e,t)=>({cssClass:"ML__emph",body:t[0],type:"group",skipBoundary:!0}));const xe={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};function ke(e,t,i,a,r,n=""){const o=T(e,C("Size"+i+"-Regular",te("math",t),"delimsizing size"+i),r.mathstyle,d.textstyle,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}function _e(e,t){let i="";return"Size1-Regular"===t?i=" delim-size1":"Size4-Regular"===t&&(i=" delim-size4"),C(t,te("math",e),"delimsizinginner"+i)}function we(e,t,i,a,r,n=""){let s,l,c,m;s=c=m=te("math",t),l=null;let p="Size1-Regular";"\\vert"===t||"\\lvert"===t||"\\rvert"===t||"\\mvert"===t||"\\mid"===t?c=s=m="∣":"\\Vert"===t||"\\lVert"===t||"\\rVert"===t||"\\mVert"===t||"\\|"===t?c=s=m="∥":"\\uparrow"===t?c=m="⏐":"\\Uparrow"===t?c=m="‖":"\\downarrow"===t?s=c="⏐":"\\Downarrow"===t?s=c="‖":"\\updownarrow"===t?(s="↑",c="⏐",m="↓"):"\\Updownarrow"===t?(s="⇑",c="‖",m="⇓"):"["===t||"\\lbrack"===t?(s="⎡",c="⎢",m="⎣",p="Size4-Regular"):"]"===t||"\\rbrack"===t?(s="⎤",c="⎥",m="⎦",p="Size4-Regular"):"\\lfloor"===t?(c=s="⎢",m="⎣",p="Size4-Regular"):"\\lceil"===t?(s="⎡",c=m="⎢",p="Size4-Regular"):"\\rfloor"===t?(c=s="⎥",m="⎦",p="Size4-Regular"):"\\rceil"===t?(s="⎤",c=m="⎥",p="Size4-Regular"):"("===t?(s="⎛",c="⎜",m="⎝",p="Size4-Regular"):")"===t?(s="⎞",c="⎟",m="⎠",p="Size4-Regular"):"\\{"===t||"\\lbrace"===t?(s="⎧",l="⎨",m="⎩",c="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",l="⎬",m="⎭",c="⎪",p="Size4-Regular"):"\\lgroup"===t?(s="⎧",m="⎩",c="⎪",p="Size4-Regular"):"\\rgroup"===t?(s="⎫",m="⎭",c="⎪",p="Size4-Regular"):"\\lmoustache"===t?(s="⎧",m="⎭",c="⎪",p="Size4-Regular"):"\\rmoustache"===t?(s="⎫",m="⎩",c="⎪",p="Size4-Regular"):"\\surd"===t?(s="",m="⎷",c="",p="Size4-Regular"):"\\ulcorner"===t?(s="┌",c=m=" "):"\\urcorner"===t?(s="┐",c=m=" "):"\\llcorner"===t?(m="└",c=s=" "):"\\lrcorner"===t&&(s="┘",c=s=" ");const u=o(te("math",s),p),h=u.height+u.depth,f=o(te("math",c),p),g=f.height+f.depth,y=o(te("math",m),p),b=y.height+y.depth;let v=0,x=1;if(null!==l){const e=o(te("math",l),p);v=e.height+e.depth,x=2}const k=h+b+v,_=Math.ceil((i-k)/(x*g)),w=k+_*x*g;let M=r.mathstyle.metrics.axisHeight;a&&(M*=r.mathstyle.sizeMultiplier);const S=w/2-M,z=[];if(z.push(_e(m,p)),null===l)for(let e=0;e<_;e++)z.push(_e(c,p));else{for(let e=0;e<_;e++)z.push(_e(c,p));z.push(_e(l,p));for(let e=0;e<_;e++)z.push(_e(c,p))}z.push(_e(s,p));const L=K(r,z,"bottom",S);return L.setStyle("color",r.color),"number"==typeof r.opacity&&L.setStyle("opacity",r.opacity),T(e,$(L,"delimsizing mult"),r.mathstyle,d.textstyle,n)}me(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",null,(function(e,t){return{type:"sizeddelim",size:xe[e].size,cls:xe[e].mclass,delim:t[0]}})),me(["hspace","hspace*"],"{width:skip}",{},(function(e,t){return{type:"spacing",width:t[0]||0}})),me(["mathop","mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",null,(e,t)=>{const i={type:{"\\mathop":"mop","\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e],body:t[0],captureSelection:!0};return"\\mathop"===e&&(i.limits="limits",i.isFunction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.body)}}`),me(["operatorname","operatorname*"],"{operator:math}",null,(function(e,t){const i={type:"mop",captureSelection:!0,body:t[0],isFunction:!0};return i.body.forEach(e=>{e.isFunction=!1,e.variant||e.variantStyle||(e.variant="main",e.variantStyle="up"),e.type="mord",e.body={"∗":"*","−":"-"}[e.body]||e.body}),"\\operatorname"===e?i.limits="nolimits":"\\operatorname*"===e&&(i.limits="limits"),i})),me("unicode","{charcode:number}",null,(e,t)=>{let i=parseInt(t[0]);return isFinite(i)||(i=10067),{type:"mord",body:String.fromCodePoint(i),codepoint:i}},(e,t,i,a)=>`${e}{"${("000000"+i.codepoint.toString(16)).toUpperCase().substr(-6)}}`),me("rule","[raise:dimen]{width:dimen}{thickness:dimen}",null,(function(e,t){return{type:"rule",shift:t[0],width:t[1],height:t[2]}})),me("overline","{:auto}",null,(e,t)=>({type:"line",position:"overline",skipBoundary:!0,body:t[0]})),me("underline","{:auto}",null,(e,t)=>({type:"line",position:"underline",skipBoundary:!0,body:t[0]})),me("overset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),me("underset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",underscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),me(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0},(function(e,t){return{type:"genfrac",numer:t[0],denom:t[1],hasBarLine:!1,leftDelim:t[2],rightDelim:t[3],mathstyle:"auto"}}),(e,t,i,a)=>`${a(i,i.numer)} ${e}${i.leftDelim}${i.rightDelim}${a(i,i.denom)}`),me(["stackrel","stackbin"],"{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1],mathtype:"\\stackrel"===e?"mrel":"mbin"}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),me(["phantom","vphantom","hphantom"],"{:auto*}",{},(e,t)=>({type:"phantom",captureSelection:!0,phantomType:e.slice(1),isPhantom:!0}),(e,t,i,a)=>e+"{"+a(i,i.body)+"}"),me("smash","[:string]{:auto}",null,(function(e,t){let i="smash";return"b"===t[0]?i="bsmash":"t"===t[0]&&(i="tsmash"),{type:"phantom",phantomType:i,skipBoundary:!0,body:t[1]}})),me("rlap","{:auto}",null,(function(e,t){return{type:"overlap",align:"right",skipBoundary:!0,body:t[0]}})),me("llap","{:auto}",null,(function(e,t){return{type:"overlap",align:"left",skipBoundary:!0,body:t[0]}})),me("mathrlap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"right",skipBoundary:!0,body:t[0]}})),me("mathllap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"left",skipBoundary:!0,body:t[0]}})),function(e){for(let e=0;e<"0123456789/@.?!".length;e++){const t="0123456789/@.?!".charAt(e);j(t,t)}}(),G(65,90),G(97,122),j("\\forall","∀"),j("\\exists","∃"),j("\\nexists","∄","mord","ams"),j("\\mid","∣","mrel"),j("\\top","⊤"),j("\\bot","⊥"),j("\\sharp","♯"),j("\\flat","♭"),j("\\natural","♮"),j("\\#","#"),j("\\&","&"),j("\\clubsuit","♣"),j("\\heartsuit","♡"),j("\\spadesuit","♠"),j("\\diamondsuit","♢"),j("\\differencedelta","∆","mrel"),j("\\backslash","\\"),j("\\nabla","∇"),j("\\partial","∂"),j("\\ell","ℓ"),j("\\hbar","ℏ"),j("\\hslash","ℏ","mord","ams"),j("\\Finv","Ⅎ","mord","ams"),j("\\Game","⅁","mord","ams"),j("\\wp","℘"),j("\\eth","ð","mord","ams"),j("\\mho","℧","mord","ams"),j("\\Bbbk","k","mord","ams"),j("\\N","N","mord","double-struck"),j("\\R","R","mord","double-struck"),j("\\Q","Q","mord","double-struck"),j("\\C","C","mord","double-struck"),j("\\Z","Z","mord","double-struck"),j("\\P","P","mord","double-struck"),j("\\pounds","£"),j("\\yen","¥","mord","ams"),j("\\euro","€"),j("\\dagger","†","mbin"),j("\\dag","†","mbin"),j("\\ddag","‡","mbin"),j("\\ddagger","‡","mbin"),j("\\maltese","✠","mord","ams"),j("\\rightarrow","→","mrel"),j("\\to","→","mrel"),j("\\leftarrow","←","mrel"),j("\\gets","←","mrel"),j("\\Rightarrow","⇒","mrel"),j("\\Leftarrow","⇐","mrel"),j("\\longrightarrow","⟶","mrel"),j("\\longleftarrow","⟵","mrel"),j("\\Longrightarrow","⟹","mrel"),j("\\implies","⟹","mrel"),j("\\Longleftarrow","⟸","mrel"),j("\\impliedby","⟸","mrel"),j("\\dashrightarrow","⇢","mrel","ams"),j("\\dashleftarrow","⇠","mrel","ams"),j("\\Rrightarrow","⇛","mrel","ams"),j("\\Lleftarrow","⇚","mrel","ams"),j("\\longleftrightarrow","⟷","mrel"),j("\\biconditional","⟷","mrel"),j("\\Longleftrightarrow","⟺","mrel"),j("\\leftrightarrows","⇆","mrel","ams"),j("\\rightleftarrows","⇄","mrel","ams"),j("\\mapsto","↦","mrel"),j("\\longmapsto","⟼","mrel"),j("\\uparrow","↑","mrel"),j("\\downarrow","↓","mrel"),j("\\Uparrow","⇑","mrel"),j("\\Downarrow","⇓","mrel"),j("\\updownarrow","↕","mrel"),j("\\Updownarrow","⇕","mrel"),j("\\curvearrowright","↷","mrel","ams"),j("\\curvearrowleft","↶","mrel","ams"),j("\\hookrightarrow","↪","mrel"),j("\\hookleftarrow","↩","mrel"),j("\\rightharpoonup","⇀","mrel"),j("\\leftharpoonup","↼","mrel"),j("\\rightharpoondown","⇁","mrel"),j("\\leftharpoondown","↽","mrel"),j("\\rightrightarrows","⇉","mrel","ams"),j("\\leftleftarrows","⇇","mrel","ams"),j("\\upuparrows","⇈","mrel","ams"),j("\\downdownarrows","⇊","mrel","ams"),j("\\leftarrowtail","↢","mrel","ams"),j("\\rightarrowtail","↣","mrel","ams"),j("\\looparrowright","↬","mrel","ams"),j("\\looparrowleft","↫","mrel","ams"),j("\\twoheadleftarrow","↞","mrel","ams"),j("\\twoheadrightarrow","↠","mrel","ams"),j("\\rightleftharpoons","⇌","mrel"),j("\\leftrightharpoons","⇋","mrel","ams"),j("\\Rsh","↱","mrel","ams"),j("\\Lsh","↰","mrel","ams"),j("\\searrow","↘","mrel"),j("\\nearrow","↗","mrel"),j("\\swarrow","↙","mrel"),j("\\nwarrow","↖","mrel"),j("\\circlearrowright","↻","mrel","ams"),j("\\circlearrowleft","↺","mrel","ams"),j("\\restriction","↾","mrel","ams"),j("\\upharpoonright","↾","mrel","ams"),j("\\upharpoonleft","↿","mrel","ams"),j("\\downharpoonright","⇂","mrel","ams"),j("\\downharpoonleft","⇃","mrel","ams"),j("\\rightsquigarrow","⇝","mrel","ams"),j("\\leadsto","⇝","mrel","ams"),j("\\leftrightsquigarrow","↭","mrel","ams"),j("\\originalof","⊶","mrel"),j("\\laplace","⊶","mrel"),j("\\imageof","⊷","mrel"),j("\\Laplace","⊷","mrel"),j("\\multimap","⊸","mrel","ams"),j("\\nrightarrow","↛","mrel","ams"),j("\\nleftarrow","↚","mrel","ams"),j("\\nRightarrow","⇏","mrel","ams"),j("\\nLeftarrow","⇍","mrel","ams"),j("\\nleftrightarrow","↮","mrel","ams"),j("\\nLeftrightarrow","⇎","mrel","ams"),j("\\nless","≮","mrel","ams"),j("\\nleqslant","","mrel","ams"),j("\\lneq","⪇","mrel","ams"),j("\\lneqq","≨","mrel","ams"),j("\\nleqq","","mrel","ams"),j("\\unlhd","⊴","mbin","ams"),j("\\unrhd","⊵","mbin","ams"),j("\\lvertneqq","","mrel","ams"),j("\\lnsim","⋦","mrel","ams"),j("\\lnapprox","⪉","mrel","ams"),j("\\nprec","⊀","mrel","ams"),j("\\npreceq","⋠","mrel","ams"),j("\\precnsim","⋨","mrel","ams"),j("\\precnapprox","⪹","mrel","ams"),j("\\nsim","≁","mrel","ams"),j("\\nshortmid","","mrel","ams"),j("\\nmid","∤","mrel","ams"),j("\\nvdash","⊬","mrel","ams"),j("\\nvDash","⊭","mrel","ams"),j("\\ngtr","≯","mrel","ams"),j("\\ngeqslant","","mrel","ams"),j("\\ngeqq","","mrel","ams"),j("\\gneq","⪈","mrel","ams"),j("\\gneqq","≩","mrel","ams"),j("\\gvertneqq","","mrel","ams"),j("\\gnsim","⋧","mrel","ams"),j("\\gnapprox","⪊","mrel","ams"),j("\\nsucc","⊁","mrel","ams"),j("\\nsucceq","⋡","mrel","ams"),j("\\succnsim","⋩","mrel","ams"),j("\\succnapprox","⪺","mrel","ams"),j("\\ncong","≆","mrel","ams"),j("\\nshortparallel","","mrel","ams"),j("\\nparallel","∦","mrel","ams"),j("\\nVDash","⊯","mrel","ams"),j("\\nsupseteqq","","mrel","ams"),j("\\supsetneq","⊋","mrel","ams"),j("\\varsupsetneq","","mrel","ams"),j("\\supsetneqq","⫌","mrel","ams"),j("\\varsupsetneqq","","mrel","ams"),j("\\nVdash","⊮","mrel","ams"),j("\\precneqq","⪵","mrel","ams"),j("\\succneqq","⪶","mrel","ams"),j("\\nsubseteqq","","mrel","ams"),j("\\checkmark","✓","mord","ams"),j("\\diagup","╱","mord","ams"),j("\\diagdown","╲","mord","ams"),j("\\measuredangle","∡","mord","ams"),j("\\sphericalangle","∢","mord","ams"),j("\\backprime","‵","mord","ams"),j("\\backdoubleprime","‶","mord","ams"),j("\\ast","∗","mbin"),j("\\star","⋆","mbin"),j("\\diamond","⋄","mbin"),j("\\Diamond","◊","mord","ams"),j("\\lozenge","◊","mord","ams"),j("\\blacklozenge","⧫","mord","ams"),j("\\bigstar","★","mord","ams"),j("\\aleph","ℵ"),j("\\beth","ℶ","mord","ams"),j("\\daleth","ℸ","mord","ams"),j("\\gimel","ℷ","mord","ams"),j("\\lbrace","{","mopen"),j("\\rbrace","}","mclose"),j("\\langle","⟨","mopen"),j("\\rangle","⟩","mclose"),j("\\lfloor","⌊","mopen"),j("\\rfloor","⌋","mclose"),j("\\lceil","⌈","mopen"),j("\\rceil","⌉","mclose"),j("\\vert","∣"),j("\\mvert","∣","mrel"),j("\\lvert","∣","mopen"),j("\\rvert","∣","mclose"),j("\\|","∥"),j("\\Vert","∥"),j("\\mVert","∥"),j("\\lVert","∥","mopen"),j("\\rVert","∥","mclose"),j("\\parallel","∥","mrel"),j("\\shortparallel","∥","mrel","ams"),j("\\lbrack","[","mopen"),j("\\rbrack","]","mclose"),j("\\{","{","mopen"),j("\\}","}","mclose"),j("(","(","mopen"),j(")",")","mclose"),j("[","[","mopen"),j("]","]","mclose"),j("\\ulcorner","┌","mopen","ams"),j("\\urcorner","┐","mclose","ams"),j("\\llcorner","└","mopen","ams"),j("\\lrcorner","┘","mclose","ams"),j("\\lgroup","⟮","mopen"),j("\\rgroup","⟯","mclose"),j("\\lmoustache","⎰","mopen"),j("\\rmoustache","⎱","mclose"),j("=","=","mrel"),j("\\ne","≠","mrel"),j("\\neq","≠","mrel"),j("<","<","mrel"),j("\\lt","<","mrel"),j(">",">","mrel"),j("\\gt",">","mrel"),j("\\le","≤","mrel"),j("\\leq","≤","mrel"),j("\\ge","≥","mrel"),j("\\geq","≥","mrel"),j("\\leqslant","⩽","mrel","ams"),j("\\geqslant","⩾","mrel","ams"),j("\\ll","≪","mrel"),j("\\gg","≫","mrel"),j("\\coloneq","≔","mrel"),j("\\measeq","≝","mrel"),j("\\eqdef","≞","mrel"),j("\\questeq","≟","mrel"),j(":",":","mrel"),j("\\cong","≅","mrel"),j("\\equiv","≡","mrel"),j("\\prec","≺","mrel"),j("\\preceq","⪯","mrel"),j("\\succ","≻","mrel"),j("\\succeq","⪰","mrel"),j("\\perp","⊥","mrel"),j("\\propto","∝","mrel"),j("\\Colon","∷","mrel"),j("\\smile","⌣","mrel"),j("\\frown","⌢","mrel"),j("\\sim","∼","mrel"),j("\\gtrsim","≳","mrel","ams"),j("\\approx","≈","mrel"),j("\\approxeq","≊","mrel","ams"),j("\\thickapprox","≈","mrel","ams"),j("\\lessapprox","⪅","mrel","ams"),j("\\gtrapprox","⪆","mrel","ams"),j("\\precapprox","⪷","mrel","ams"),j("\\succapprox","⪸","mrel","ams"),j("\\thicksim","∼","mrel","ams"),j("\\succsim","≿","mrel","ams"),j("\\precsim","≾","mrel","ams"),j("\\backsim","∽","mrel","ams"),j("\\eqsim","≂","mrel","ams"),j("\\backsimeq","⋍","mrel","ams"),j("\\simeq","≃","mrel"),j("\\lesssim","≲","mrel","ams"),j("\\nleq","≰","mrel","ams"),j("\\ngeq","≱","mrel","ams"),j("\\smallsmile","⌣","mrel","ams"),j("\\smallfrown","⌢","mrel","ams"),j("\\bowtie","⋈","mrel"),j("\\Join","⋈","mrel"),j("\\asymp","≍","mrel"),j("\\sqsubseteq","⊑","mrel"),j("\\sqsupseteq","⊒","mrel"),j("\\leqq","≦","mrel","ams"),j("\\eqslantless","⪕","mrel","ams"),j("\\lll","⋘","mrel","ams"),j("\\lessgtr","≶","mrel","ams"),j("\\lesseqgtr","⋚","mrel","ams"),j("\\lesseqqgtr","⪋","mrel","ams"),j("\\risingdotseq","≓","mrel","ams"),j("\\fallingdotseq","≒","mrel","ams"),j("\\subseteqq","⫅","mrel","ams"),j("\\Subset","⋐","mrel","ams"),j("\\sqsubset","⊏","mrel","ams"),j("\\preccurlyeq","≼","mrel","ams"),j("\\curlyeqprec","⋞","mrel","ams"),j("\\vDash","⊨","mrel","ams"),j("\\Vvdash","⊪","mrel","ams"),j("\\bumpeq","≏","mrel","ams"),j("\\Bumpeq","≎","mrel","ams"),j("\\geqq","≧","mrel","ams"),j("\\eqslantgtr","⪖","mrel","ams"),j("\\ggg","⋙","mrel","ams"),j("\\gtrless","≷","mrel","ams"),j("\\gtreqless","⋛","mrel","ams"),j("\\gtreqqless","⪌","mrel","ams"),j("\\supseteqq","⫆","mrel","ams"),j("\\Supset","⋑","mrel","ams"),j("\\sqsupset","⊐","mrel","ams"),j("\\succcurlyeq","≽","mrel","ams"),j("\\curlyeqsucc","⋟","mrel","ams"),j("\\Vdash","⊩","mrel","ams"),j("\\shortmid","∣","mrel","ams"),j("\\between","≬","mrel","ams"),j("\\pitchfork","⋔","mrel","ams"),j("\\varpropto","∝","mrel","ams"),j("\\backepsilon","∍","mrel","ams"),j("\\llless","⋘","mrel","ams"),j("\\gggtr","⋙","mrel","ams"),j("\\lhd","⊲","mbin","ams"),j("\\rhd","⊳","mbin","ams"),j("\\doteq","≐","mrel"),j("\\doteqdot","≑","mrel","ams"),j("\\Doteq","≑","mrel","ams"),j("\\eqcirc","≖","mrel","ams"),j("\\circeq","≗","mrel","ams"),j("\\lessdot","⋖","mbin","ams"),j("\\gtrdot","⋗","mbin","ams"),j("\\~","~","mrel"),j("\\leftrightarrow","↔","mrel"),j("\\Leftrightarrow","⇔","mrel"),j("\\models","⊨","mrel"),j("\\vdash","⊢","mrel"),j("\\therefore","∴","mrel","ams"),j("\\because","∵","mrel","ams"),j("\\dashv","⊣","mrel"),j("\\roundimplies","⥰","mrel"),j("+","+","mbin"),j("-","−","mbin"),j("−","−","mbin"),j("\\pm","±","mbin"),j("\\mp","∓","mbin"),j("*","∗","mbin"),j("\\times","×","mbin"),j("\\div","÷","mbin"),j("\\surd","√"),j("\\divides","∣","mbin"),j("\\ltimes","⋉","mbin","ams"),j("\\rtimes","⋊","mbin","ams"),j("\\leftthreetimes","⋋","mbin","ams"),j("\\rightthreetimes","⋌","mbin","ams"),j("\\intercal","⊺","mbin","ams"),j("\\dotplus","∔","mbin","ams"),j("\\doublebarwedge","⩞","mbin","ams"),j("\\divideontimes","⋇","mbin","ams"),j("\\centerdot","⋅","mbin","ams"),j("\\cdot","⋅","mbin"),j("\\infty","∞"),j("\\prime","′"),j("\\doubleprime","″"),j("\\angle","∠"),j("`","‘"),j("\\$","$"),j("\\%","%"),j("\\_","_"),j("\\alpha","α"),j("\\beta","β"),j("\\gamma","γ"),j("\\delta","δ"),j("\\epsilon","ϵ"),j("\\varepsilon","ε"),j("\\zeta","ζ"),j("\\eta","η"),j("\\theta","θ"),j("\\vartheta","ϑ"),j("\\iota","ι"),j("\\kappa","κ"),j("\\varkappa","ϰ","mord","ams"),j("\\lambda","λ"),j("\\mu","μ"),j("\\nu","ν"),j("\\xi","ξ"),j("\\omicron","o"),j("\\pi","π"),j("\\varpi","ϖ"),j("\\rho","ρ"),j("\\varrho","ϱ"),j("\\sigma","σ"),j("\\varsigma","ς"),j("\\tau","τ"),j("\\phi","ϕ"),j("\\varphi","φ"),j("\\upsilon","υ"),j("\\chi","χ"),j("\\psi","ψ"),j("\\omega","ω"),j("\\Gamma","Γ"),j("\\Delta","Δ"),j("\\Theta","Θ"),j("\\Lambda","Λ"),j("\\Xi","Ξ"),j("\\Pi","Π"),j("\\Sigma","Σ"),j("\\Upsilon","Υ"),j("\\Phi","Φ"),j("\\Psi","Ψ"),j("\\Omega","Ω"),j("\\digamma","ϝ","mord","ams"),j("\\emptyset","∅"),j("\\varnothing","∅","mord","ams"),j("\\cap","∩","mbin"),j("\\cup","∪","mbin"),j("\\setminus","∖","mbin"),j("\\smallsetminus","∖","mbin","ams"),j("\\complement","∁","mord","ams"),j("\\in","∈","mrel"),j("\\notin","∉","mrel"),j("\\not","̸","mrel"),j("\\ni","∋","mrel"),j("\\owns","∋","mrel"),j("\\subset","⊂","mrel"),j("\\supset","⊃","mrel"),j("\\subseteq","⊆","mrel"),j("\\supseteq","⊇","mrel"),j("\\subsetneq","⊊","mrel","ams"),j("\\varsubsetneq","","mrel","ams"),j("\\subsetneqq","⫋","mrel","ams"),j("\\varsubsetneqq","","mrel","ams"),j("\\nsubset","⊄","mrel","ams"),j("\\nsupset","⊅","mrel","ams"),j("\\nsubseteq","⊈","mrel","ams"),j("\\nsupseteq","⊉","mrel","ams"),j("\\ "," ","spacing"),j("~"," ","spacing"),j("\\space"," ","spacing"),j("\\!",null,"spacing"),j("\\,",null,"spacing"),j("\\:",null,"spacing"),j("\\;",null,"spacing"),j("\\enskip",null,"spacing"),j("\\enspace",null,"spacing"),j("\\quad",null,"spacing"),j("\\qquad",null,"spacing"),j("\\colon",":","mpunct"),j("\\cdotp","⋅","mpunct"),j("\\cdots","⋯","minner"),j("\\ddots","⋱","minner"),j("\\ldots","…","minner"),j("\\mathellipsis","…","minner"),j("\\vdots","⋮"),j("\\ldotp",".","mpunct"),j(",",",","mpunct"),j(";",";","mpunct"),j("\\land","∧","mbin"),j("\\wedge","∧","mbin"),j("\\lor","∨","mbin"),j("\\vee","∨","mbin"),j("\\lnot","¬"),j("\\neg","¬"),j("\\barwedge","⊼","mbin","ams"),j("\\veebar","⊻","mbin","ams"),j("\\nor","⊻","mbin","ams"),j("\\curlywedge","⋏","mbin","ams"),j("\\curlyvee","⋎","mbin","ams"),j("\\square","□","mord","ams"),j("\\Box","□","mord","ams"),j("\\blacksquare","■","mord","ams"),j("\\boxminus","⊟","mbin","ams"),j("\\boxplus","⊞","mbin","ams"),j("\\boxtimes","⊠","mbin","ams"),j("\\boxdot","⊡","mbin","ams"),j("\\circ","∘","mbin"),j("\\bigcirc","◯","mbin"),j("\\bullet","∙","mbin"),j("\\circleddash","⊝","mbin","ams"),j("\\circledast","⊛","mbin","ams"),j("\\oplus","⊕","mbin"),j("\\ominus","⊖","mbin"),j("\\otimes","⊗","mbin"),j("\\odot","⊙","mbin"),j("\\circledcirc","⊚","mbin","ams"),j("\\oslash","⊘","mbin"),j("\\circledS","Ⓢ","mord","ams"),j("\\circledR","®","mord","ams"),j("\\triangle","△"),j("\\bigtriangleup","△","mbin"),j("\\vartriangle","△","mrel","ams"),j("\\triangleq","≜","mrel","ams"),j("\\triangledown","▽","mord","ams"),j("\\bigtriangledown","▽","mbin"),j("\\triangleleft","◃","mbin"),j("\\vartriangleleft","⊲","mrel","ams"),j("\\trianglelefteq","⊴","mrel","ams"),j("\\ntriangleleft","⋪","mrel","ams"),j("\\ntrianglelefteq","⋬","mrel","ams"),j("\\triangleright","▹","mbin"),j("\\vartriangleright","⊳","mrel","ams"),j("\\trianglerighteq","⊵","mrel","ams"),j("\\ntriangleright","⋫","mrel","ams"),j("\\ntrianglerighteq","⋭","mrel","ams"),j("\\blacktriangle","▲","mord","ams"),j("\\blacktriangledown","▼","mord","ams"),j("\\blacktriangleleft","◀","mrel","ams"),j("\\blacktriangleright","▶","mrel","ams"),j("\\/","/"),j("|","∣","textord"),j("\\And","&","mbin"),j("\\imath","ı"),j("\\jmath","ȷ"),j("\\degree","°"),j("'","′"),j('"',"”");const Me=["(",")","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd"],Se=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],ze=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],Le=[0,1.2,1.8,2.4,3],Ae=[{type:"small",mathstyle:d.scriptscriptstyle},{type:"small",mathstyle:d.scriptstyle},{type:"small",mathstyle:d.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],qe=[{type:"small",mathstyle:d.scriptscriptstyle},{type:"small",mathstyle:d.scriptstyle},{type:"small",mathstyle:d.textstyle},{type:"stack"}],$e=[{type:"small",mathstyle:d.scriptscriptstyle},{type:"small",mathstyle:d.scriptstyle},{type:"small",mathstyle:d.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function Ce(e,t,i,a,r,n=""){if(!t||0===t.length||"."===t)return Te(e,r,e);let s;"<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),s=ze.includes(t)?Ae:Me.includes(t)?$e:qe;const l=function(e,t,i,a){for(let n=Math.min(2,3-a.mathstyle.size);nt)return i[n]}var r;return i[i.length-1]}(te("math",t),i,s,r);return"small"===l.type?function(e,t,i,a,r,n=""){const o=T(e,C("Main-Regular",te("math",t)),r.mathstyle,i,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier/i.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}(e,t,l.mathstyle,a,r,"ML__small-delim "+n):"large"===l.type?ke(e,t,l.size,a,r,n):we(e,t,i,a,r,n)}function De(e,t,i,a,r,n=""){if("."===t)return Te(e,r,n);const o=r.mathstyle.metrics.axisHeight*r.mathstyle.sizeMultiplier,s=Math.max(i-o,a+o);return Ce(e,t,Math.max(s/500*901,2*s-.5),!0,r,n)}function Te(e,t,i){return $("","sizing"+t.mathstyle.adjustTo(d.textstyle)+" nulldelimiter "+(i||""),e)}const Ee={},Ke={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49};function Ne(e,t){Ee[e]={decompose:t}}function Oe(e,i){var a,r;function n(e){return"mord"===e.type&&Boolean(e.symbol)&&/^[0-9,.]$/.test(e.symbol)}function o(e){return"text"===e.mode}const s=e instanceof m?e:new m(e),l=!s.atomIdsSettings||!s.atomIdsSettings.groupNumbers;let c=[];if(t(i)){if(0===i.length)return[];if(1===i.length)c=i[0].decompose(s),c&&l&&i[0].isSelected&&c.forEach(e=>e.selected(!0));else{let e=[],t="",d=!0,m=null;for(let p=0;pe.selected(!0))):(e.length>0&&(c=[...c,...e],e=[]),c=c.concat(a))}}e.length>0&&(c=[...c,...e],e=[])}}else i instanceof Be&&(c=i.decompose(s),c&&l&&i.isSelected&&c.forEach(e=>e.selected(!0)));if(!c||0===c.length)return null;if(s.mathstyle!==s.parentMathstyle){const e=s.mathstyle.sizeMultiplier/s.parentMathstyle.sizeMultiplier;for(const t of c)t.height*=e,t.depth*=e}if(s.size!==s.parentSize){const e=Ke[s.size]/Ke[s.parentSize];for(const t of c)t.height*=e,t.depth*=e}return c}class Be{constructor(e,t,i="",a={}){this.mode=e,this.type=t,this.body=i,a.isPhantom&&this.setPhantom(!0),this.applyStyle(a)}toLatex(e=!1){return function(e,i){if(!(i=void 0!==i&&i)&&e.latex)return e.latex;let a="",r=0,n=0,o=0;const s=e.symbol;let l=[];const c=(e,a)=>function(e,i,a){let r="";return t(i)?r=function(e,t,i){if(0===t.length)return"";if("first"===t[0].type){if(1===t.length)return"";t=t.slice(1)}return 0===t.length?"":f(y(t,"cssClass").map(t=>{const a=f(y(t,"color").map(t=>f(function(e){const t=[];let i=[],a="NONE";return e.forEach(e=>{"first"!==e.type&&(e.mode!==a?(i.length>0&&t.push(i),i=[e],a=e.mode):i.push(e))}),i.length>0&&t.push(i),t}(t).map(t=>function(e,t,i){var a;return(null===(a=b[t[0].mode])||void 0===a?void 0:a.emitLatexRun)?b[t[0].mode].emitLatexRun(e,t,i):""}(e,t,i)))));return!t[0].cssClass||void 0!==e&&e.cssClass===t[0].cssClass?a:"ML__boldsymbol"===t[0].cssClass?"\\boldsymbol{"+a+"}":"ML__emph"===t[0].cssClass?"\\emph{"+a+"}":"\\class{"+t[0].cssClass+"}{"+a+"}"}))}(e,i,a):"number"==typeof i||"boolean"==typeof i?r=i.toString():"string"==typeof i?r=i.replace(/\s/g,"~"):null!=i&&"function"==typeof i.toLatex&&(r=i.toLatex(a)),r}(e,a,i);switch(e.type){case"group":s?a=i?c(e,e.body):e.latex:(a=e.latexOpen||(e.cssId||e.cssClass?"":"{"),e.cssId&&(a+="\\cssId{"+e.cssId+"}{"),"ML__emph"===e.cssClass?a+="\\emph{"+c(e,e.body):(e.cssClass&&(a+="\\class{"+e.cssClass+"}{"),a+=c(e,e.body),e.cssClass&&(a+="}")),e.cssId&&(a+="}"),a+=e.latexClose||(e.cssId||e.cssClass?"":"}"));break;case"array":if(a+="\\begin{"+e.environmentName+"}","array"===e.environmentName){if(a+="{",void 0!==e.colFormat)for(o=0;o0&&(a+=" & "),a+=c(e,e.array[n][r]);n0&&("first"!==this.body[0].type?e=this.body[0].getInitialBaseElement():this.body[1]&&(e=this.body[1].getInitialBaseElement())),e||this}getFinalBaseElement(){return t(this.body)&&this.body.length>0?this.body[this.body.length-1].getFinalBaseElement():this}isCharacterBox(){const e=this.getInitialBaseElement();return/minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(e.type)}setPhantom(e){this.forEach(t=>{t.isPhantom=e})}forEach(e){if(e(this),t(this.body))for(const t of this.body)t&&t.forEach(e);else this.body&&"object"==typeof this.body&&e(this.body);if(this.superscript)for(const t of this.superscript)t&&t.forEach(e);if(this.subscript)for(const t of this.subscript)t&&t.forEach(e);if(this.overscript)for(const t of this.overscript)t&&t.forEach(e);if(this.underscript)for(const t of this.underscript)t&&t.forEach(e);if(this.numer)for(const t of this.numer)t&&t.forEach(e);if(this.denom)for(const t of this.denom)t&&t.forEach(e);if(this.index)for(const t of this.index)t&&t.forEach(e);if(this.array)for(const t of this.array)for(const i of t)for(const t of i)t.forEach(e)}filter(e){let i=[];e(this)&&i.push(this);for(const a of["body","superscript","subscript","overscript","underscript","numer","denom","index"])if(t(this[a]))for(const t of this[a])t&&(i=i.concat(t.filter(e)));if(t(this.array))for(const t of this.array)for(const a of t)a&&(i=i.concat(a.filter(e)));return i}decomposeGroup(e){const t=$(Oe(e.clone({mathstyle:this.mathstyle?d[this.mathstyle]:void 0}),this.body),"","mord");return this.cssId&&(t.cssId=this.cssId),t.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),t}decomposeOverlap(e){const t=$(Oe(e,this.body),"inner");return $([t,$(null,"fix")],"left"===this.align?"llap":"rlap","mord")}decomposeRule(e){const t=e.mathstyle,i=$("","rule","mord");let a=this.shift&&!isNaN(this.shift)?this.shift:0;a/=t.sizeMultiplier;const r=this.width/t.sizeMultiplier,n=this.height/t.sizeMultiplier;return i.setStyle("border-right-width",r,"em"),i.setStyle("border-top-width",n,"em"),i.setStyle("margin-top",-(n-a),"em"),i.setStyle("border-color",e.color),i.width=r,i.height=n+a,i.depth=-a,i}decompose(e,i=null){var a;let r=null;if(!this.type||/mord|minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(this.type)?(r="string"==typeof this.body?this.makeSpan(e,this.body):this.makeSpan(e,Oe(e,this.body)),r.type=k(this.type)?this.type:""):"group"===this.type||"root"===this.type?r=this.decomposeGroup(e):"delim"===this.type?(r=$(null,""),r.delim=this.delim):"sizeddelim"===this.type?r=this.bind(e,function(e,t,i,a,r=""){return"."===t?Te(e,a,r):("<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),Me.includes(t)||ze.includes(t)?ke(e,t,i,!1,a,r):Se.includes(t)?we(e,t,Le[i],!1,a,r):null)}(this.cls,this.delim,this.size,e)):"overlap"===this.type?r=this.decomposeOverlap(e):"rule"===this.type?r=this.decomposeRule(e):"msubsup"===this.type?(r=$("​","","mord"),i&&(r.height=i[0].height,r.depth=i[0].depth)):"space"===this.type?r=this.makeSpan(e," "):"spacing"===this.type?"​"===this.body?r=this.makeSpan(e,"​"):" "===this.body?r="math"===this.mode?this.makeSpan(e," "):this.makeSpan(e," "):this.width?(r=$("​","mspace "),this.width>0?r.setWidth(this.width):r.setStyle("margin-left",this.width,"em")):r=$("​","mspace "+(null!==(a={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.symbol])&&void 0!==a?a:"mediumspace")):"mathstyle"===this.type?e.setMathstyle(this.mathstyle):"command"===this.type||"error"===this.type?(r=this.makeSpan(e,this.body),r.classes="",this.isError&&(r.classes+=" ML__error"),this.isSuggestion&&(r.classes+=" ML__suggestion")):r="placeholder"===this.type?this.makeSpan(e,"⬚"):"first"===this.type?this.makeSpan(e,"​"):Ee[this.type].decompose(e,this),!r)return null;if(this.caret&&"msubsup"!==this.type&&"command"!==this.type&&"placeholder"!==this.type&&"first"!==this.type&&(t(r)?"leftright"===this.type&&(this.superscript||this.subscript)||(r[r.length-1].caret=this.caret):r.caret=this.caret),this.containsCaret&&(t(r)?(r[0].classes=(r[0].classes||"")+" ML__contains-caret",r[r.length-1].classes=(r[r.length-1].classes||"")+" ML__contains-caret"):r.classes=(r.classes||"")+" ML__contains-caret"),!this.limits&&(this.superscript||this.subscript))if(t(r)){const t=r[r.length-1];r[r.length-1]=this.attachSupsub(e,t,t.type)}else r=[this.attachSupsub(e,r,r.type)];return t(r)?r:[r]}attachSupsub(e,t,i){if(!this.superscript&&!this.subscript)return t;const a=e.mathstyle;let r=null,n=null;this.superscript&&(r=$(Oe(e.sup(),this.superscript),a.adjustTo(a.sup()))),this.subscript&&(n=$(Oe(e.sub(),this.subscript),a.adjustTo(a.sub())));let o,s=0,l=0;this.isCharacterBox()||(s=L(t)-a.metrics.supDrop,l=A(t)+a.metrics.subDrop),o=a===d.displaystyle?a.metrics.sup1:a.cramped?a.metrics.sup3:a.metrics.sup2;const c=.05/(d.textstyle.sizeMultiplier*a.sizeMultiplier);let m=null;if(n&&r){s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),l=Math.max(l,a.metrics.sub2);const i=.04;if(s-A(r)-(L(n)-l)<4*i){l=4*i-(s-r.depth)+L(n);const e=.8*a.metrics.xHeight-(s-A(r));e>0&&(s+=e,l-=e)}m=K(e,[n,l,r,-s],"individualShift"),this.isSymbol&&m.children[0].setLeft(-q(t))}else n&&!r?(l=Math.max(l,a.metrics.sub1,L(n)-.8*a.metrics.xHeight),m=K(e,[n],"shift",l),m.children[0].setRight(c),this.isCharacterBox()&&m.children[0].setLeft(-q(t))):!n&&r&&(s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),m=K(e,[r],"shift",-s),m.children[0].setRight(c));const p=$(m,"msubsup");return this.caret&&(p.caret=this.caret,this.caret=""),$([t,p],"",i)}attachLimits(e,t,i,a){const r=this.superscript?$(Oe(e.sup(),this.superscript),e.mathstyle.adjustTo(e.mathstyle.sup())):null,n=this.subscript?$(Oe(e.sub(),this.subscript),e.mathstyle.adjustTo(e.mathstyle.sub())):null;return function(e,t,i,a,r,n){if(!r&&!n)return t;t=$(t);let o=0,s=0;r&&(o=Math.max(.111,.2-A(r))),n&&(s=Math.max(.166,.6-L(n)));let l=null;return n&&r?(l=K(e,[.1,n,s,t,o,r,.1],"bottom",.1+L(n)+A(n)+s+A(t)+i),l.children[0].setLeft(-a),l.children[2].setLeft(a)):n&&!r?(l=K(e,[.1,n,s,t],"top",L(t)-i),l.children[0].setLeft(-a)):!n&&r&&(l=K(e,[t,o,r,.1],"bottom",A(t)+i),l.children[1].setLeft(a)),$(l,"op-limits","mop")}(e,t,i,a,r,n)}bind(e,t){return"first"!==this.type&&"​"!==this.body&&(this.id=function(e){let t;return e.atomIdsSettings&&("number"==typeof e.atomIdsSettings.seed?(t=e.atomIdsSettings.overrideID?e.atomIdsSettings.overrideID:e.atomIdsSettings.seed.toString(36),e.atomIdsSettings.seed+=1):t=Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36)),t}(e),this.id&&(t.attributes||(t.attributes={}),t.attributes["data-atom-id"]=this.id)),t}makeSpan(e,t){const i=$(t,"","textord"===this.type?"mord":k(this.type)?this.type:""),a=this.getStyle();a.letterShapeStyle=e.letterShapeStyle,i.applyStyle(a);const r=(null==a?void 0:a.fontSize)?a.fontSize:"size5";return r!==e.parentSize?(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+r):e.parentSize!==e.size&&(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+e.size),i.maxFontSize=Math.max(i.maxFontSize,e.mathstyle.sizeMultiplier||1),"text"===this.mode&&(i.classes+=" ML__text"),e.mathstyle.isTight()&&(i.isTight=!0),"math"!==this.mode&&(i.italic=0),i.setRight(i.italic),"number"==typeof e.opacity&&i.setStyle("opacity",e.opacity),this.bind(e,i),this.caret&&(this.superscript||this.subscript||(i.caret=this.caret,this.caret="",e.mathstyle.isTight()&&(i.isTight=!0))),i}}function Fe(e,i=[]){const a=new Be(e,"root",i||[]);return!t(a.body)||0!==a.body.length&&"first"===a.body[0].type||a.body.unshift(new Be(e,"first")),a}function Pe(e){return t(e)}const Re=[[8205,1],[65038,2],[127995,5],[129456,4],[917536,96]];let Ie;const He=[127462,127487];function We(e){var t;return void 0===Ie&&(Ie={},Re.forEach(e=>{for(let t=e[0];t<=e[0]+e[1]-1;t++)Ie[t]=!0})),null!==(t=Ie[e])&&void 0!==t&&t}function Ve(e){return e>=He[0]&&e<=He[1]}function Ue(e){if(/^[\x20-\xFF]*$/.test(e))return e;const t=[],i=function(e){const t=[];for(let i=0;i=55296&&a<=56319){const t=e.charCodeAt(i+1);if(t>=56320&&t<=57343){const e=a-55296,r=t-56320;a=Math.pow(2,16)+e*Math.pow(2,10)+r,i++}}t.push(a)}return t}(e);let a=0;for(;a=this.s.length}get(){return this.pos";if(this.obeyspaces&&this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]/))return"";const e=this.get();if("\\"===e){if(!this.end()){let e=this.match(/^[a-zA-Z*]+/);if(e)this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]*/);else if(e=this.get()," "===e)return"";return"\\"+e}}else{if("{"===e)return"<{>";if("}"===e)return"<}>";if("^"===e){if("^"===this.peek()){this.get();let e=this.match(/^\^\^[0-9a-f][0-9a-f][0-9a-f][0-9a-f]/);if(e)return String.fromCodePoint(parseInt(e.slice(2),16));if(e=this.match(/^[0-9a-f][0-9a-f]/),e)return String.fromCodePoint(parseInt(e,16))}return e}if("#"===e){if(!this.end()){let e=!1;if(/[0-9?]/.test(this.peek())&&(e=!0,this.pos+1"):"<$>"}return e}}function Ge(e,t){var i,a,r,n;let o=[],s=e.next();if(s)if("\\relax"===s);else if("\\noexpand"===s)s=e.next(),s&&o.push(s);else if("\\obeyspaces"===s)e.obeyspaces=!0;else if("\\space"===s||"~"===s)o.push("");else if("\\bgroup"===s)o.push("<{>");else if("\\egroup"===s)o.push("<}>");else if("\\string"===s)s=e.next(),s&&("\\"===s[0]?Array.from(s).forEach(e=>o.push("\\"===e?"\\backslash":e)):"<{>"===s?o.push("\\{"):""===s?o.push("~"):"<}>"===s&&o.push("\\}"));else if("\\csname"===s){for(;""===e.peek();)e.next();let r="",n=!1,l=[];do{if(0===l.length)if(/^#[0-9?]$/.test(e.peek())){const r=e.get().slice(1);l=Xe(null!==(a=null!==(i=null==t?void 0:t[r])&&void 0!==i?i:null==t?void 0:t["?"])&&void 0!==a?a:"\\placeholder{}",t),s=l[0]}else s=e.next(),l=s?[s]:[];n=0===l.length,n||"\\endcsname"!==s||(n=!0,l.shift()),n||(n="<$>"===s||"<$$>"===s||"<{>"===s||"<}>"===s||s.length>1&&"\\"===s[0]),n||(r+=l.shift())}while(!n);r&&o.push("\\"+r),o=o.concat(l)}else if("\\endcsname"===s);else if(s.length>1&&"#"===s[0]){const e=s.slice(1);o=o.concat(Xe(null!==(n=null!==(r=null==t?void 0:t[e])&&void 0!==r?r:null==t?void 0:t["?"])&&void 0!==n?n:"\\placeholder{}",t))}else o.push(s);return o}function Xe(e,t){const i=e.toString().split(/\r?\n/);let a="",r="";for(const e of i){a+=r,r=" ";const t=e.match(/((?:\\%)|[^%])*/);null!==t&&(a+=t[0])}const n=new je(a);let o=[];do{o=o.concat(Ge(n,t))}while(!n.end());return o}function Ze(e){const t=$("​","arraycolsep");return t.setWidth(e),t}function Ye(e,t,i,a){const r=[];for(const n of t){const t=$(Oe(e,a));t.depth=n.depth,t.height=n.height,r.push(t),r.push(n.pos-i)}return K(e,r,"individualShift")}function Qe(e){return!/^<({|}|\$|\$\$|space)>$/.test(e)}Ne("accent",(e,i)=>{const a=e.mathstyle;let r=Oe(e.cramp(),i.body);(i.superscript||i.subscript)&&(r=[i.attachSupsub(e,$(r,"","mord"),"mord")]);let n=0;t(i.body)&&1===i.body.length&&i.body[0].isCharacterBox()&&(n=function(e){if(!e)return 0;if(t(e)){let t=0;for(const i of e)t+=i.skew||0;return t}return e.skew}(r));let o,s=Math.min(L(r),a.metrics.xHeight);if(i.svgAccent)o=N(i.svgAccent),s=.111-s;else{const e=C("Main-Regular",i.accent,"math");e.italic=0;const t="⃗"===i.accent?" accent-vec":"";o=$($(e),"accent-body"+t)}return o=K(e,[r,-s,o]),o.children[1].setLeft(2*n),[$([o],"accent","mord")]}),Ne("array",(e,t)=>{var i;let a=t.colFormat;a&&0===a.length&&(a=[{align:"l"}]),a||(a=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]);const r=[];let n=0;for(const e of a)e.align&&n++;for(const e of t.array){let t=0;for(;t0&&(c+=p,s0&&b.push(K(e,i,"individualShift"))}const v=[];let x=!1,k=!1,_=0,w=!t.leftDelim;for(const t of a){if(t.align&&_>=b.length)break;if(t.align&&_{const i="number"==typeof t.padding?t.padding:.3,a=$(Oe(e,t.body),"","mord");a.setStyle("vertical-align",-A(a),"em"),a.setStyle("height",0);const r=$(a,"","mord"),n=$("","ML__box");n.setStyle("position","absolute"),n.setStyle("height",L(r)+A(r)+2*i,"em"),0!==i?n.setStyle("width","calc(100% + "+2*i+"em)"):n.setStyle("width","100%"),n.setStyle("top",-i,"em"),n.setStyle("left",-i,"em"),n.setStyle("z-index","-1"),n.setStyle("box-sizing","border-box"),t.backgroundcolor&&n.setStyle("background-color",t.backgroundcolor),t.framecolor&&n.setStyle("border","0.04em solid "+t.framecolor),t.border&&n.setStyle("border",t.border),r.setStyle("display","inline-block"),r.setStyle("height",L(r)+A(r),"em");const o=$([n,r]);return o.setStyle("position","relative"),o.setStyle("vertical-align",-i+A(r),"em"),o.height=L(r)+i,o.depth=A(r)+i,o.setLeft(i),o.setRight(i),o.setStyle("height",o.height+o.depth-2*i,"em"),o.setStyle("top",-i,"em"),o.setStyle("display","inline-block"),[o]}),Ne("enclose",(e,t)=>{const i=$(Oe(e,t.body),"","mord"),a="number"==typeof t.padding?t.padding:.3,r=$("","ML__notation");r.setStyle("position","absolute"),r.setStyle("height",L(i)+A(i)+2*a,"em"),r.height=L(i)+a,r.depth=A(i)+a,0!==a?r.setStyle("width","calc(100% + "+2*a+"em)"):r.setStyle("width","100%"),r.setStyle("top","0"),r.setStyle("left",-a,"em"),r.setStyle("z-index","-1"),t.backgroundcolor&&r.setStyle("background-color",t.backgroundcolor),t.notation.box&&r.setStyle("border",t.borderStyle),t.notation.actuarial&&(r.setStyle("border-top",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.madruwb&&(r.setStyle("border-bottom",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.roundedbox&&(r.setStyle("border-radius",(L(i)+A(i))/2,"em"),r.setStyle("border",t.borderStyle)),t.notation.circle&&(r.setStyle("border-radius","50%"),r.setStyle("border",t.borderStyle)),t.notation.top&&r.setStyle("border-top",t.borderStyle),t.notation.left&&r.setStyle("border-left",t.borderStyle),t.notation.right&&r.setStyle("border-right",t.borderStyle),t.notation.bottom&&r.setStyle("border-bottom",t.borderStyle);let n="";if(t.notation.horizontalstrike&&(n+='{const i="auto"===t.mathstyle?e.mathstyle:d[t.mathstyle],a=e.clone({mathstyle:i});let r=[];t.numerPrefix&&r.push($(t.numerPrefix,"mord"));const n=t.continuousFraction?i:i.fracNum();r=r.concat(Oe(a.clone({mathstyle:n}),t.numer));const o=E(r,e.mathstyle.adjustTo(n));let s=[];t.denomPrefix&&s.push($(t.denomPrefix,"mord"));const l=t.continuousFraction?i:i.fracDen();s=s.concat(Oe(a.clone({mathstyle:l}),t.denom));const c=E(s,e.mathstyle.adjustTo(l)),m=t.hasBarLine?.04/i.sizeMultiplier:0;let p,u,h=0;i.size===d.displaystyle.size?(p=i.metrics.num1,h=m>0?3*m:.28,u=i.metrics.denom1):(m>0?(p=i.metrics.num2,h=m):(p=i.metrics.num3,h=.12),u=i.metrics.denom2);const f=o?A(o):0,g=c?L(c):0;let y;if(0===m){const e=p-f-(g-u);e{if(!t.body)return t.leftDelim?new Be("math","mopen",t.leftDelim).decompose(e):t.rightDelim?new Be("math","mclose",t.rightDelim).decompose(e):null;const i=e.clone(),a=Oe(i,t.body),r=i.mathstyle;let n=0,o=0,s=[];if(n=L(a)*r.sizeMultiplier,o=A(a)*r.sizeMultiplier,t.leftDelim&&(s.push(t.bind(e,De("mopen",t.leftDelim,n,o,i,"ML__open"))),s[s.length-1].applyStyle(t.getStyle())),a){for(let r=0;r{const i=e.mathstyle,a=Oe(e.cramp(),t.body),r=.04/i.sizeMultiplier,n=$(null,e.mathstyle.adjustTo(d.textstyle)+" "+t.position+"-line");let o;if(n.height=r,n.maxFontSize=1,"overline"===t.position)o=K(e,[a,3*r,n,r]);else{const t=$(a);o=K(e,[r,n,3*r,t],"top",L(t))}return[$(o,t.position,"mord")]}),Ne("mop",(e,i)=>{var a;const r=e.mathstyle;let n,o=0,s=0;if(i.isSymbol){const t=r.size===d.displaystyle.size&&"\\smallint"!==i.symbol;n=C(t?"Size2-Regular":"Size1-Regular",i.body,"op-symbol "+(t?"large-op":"small-op"),"mop"),o=(n.height-n.depth)/2-r.metrics.axisHeight*r.sizeMultiplier,s=n.italic,n.applyStyle({color:i.isPhantom?"transparent":i.color,backgroundColor:i.isPhantom?"transparent":i.backgroundColor,cssId:i.cssId,cssClass:i.cssClass,letterShapeStyle:e.letterShapeStyle})}else n=t(i.body)?$(Oe(e,i.body),"","mop"):i.makeSpan(e,i.body);i.bind(e,n),i.isSymbol&&n.setTop(o);let l=n;if(i.superscript||i.subscript){const t=null!==(a=i.limits)&&void 0!==a?a:"auto";l="limits"===t||"auto"===t&&r.size===d.displaystyle.size?i.attachLimits(e,n,o,s):i.attachSupsub(e,n,"mop")}return[l]}),Ne("overunder",(e,t)=>{const i=t.svgBody?N(t.svgBody):Oe(e,t.body),a=e.clone({mathstyle:d.scriptstyle});let r,n;t.svgAbove?r=N(t.svgAbove):t.overscript&&t.overscript.length>0&&(r=$(Oe(a,t.overscript),e.mathstyle.adjustTo(a.mathstyle))),t.svgBelow?n=N(t.svgBelow):t.underscript&&t.underscript.length>0&&(n=$(Oe(a,t.underscript),e.mathstyle.adjustTo(a.mathstyle))),r&&n&&(n.setLeft(.3),n.setRight(.3),r.setLeft(.3),r.setRight(.3));let o=function(e,t,i,a,r){if(!i&&!a)return $(t,"op-over-under",r);let n=0,o=0;i&&(n=Math.max(.111,.2-A(i))),a&&(o=Math.max(.166,.6-L(a)));let s=null;return a&&i?s=K(e,[0,a,o,t,n,i,.166],"bottom",L(a)+A(a)+A(t)):a&&!i?s=K(e,[0,a,o,t],"top",L(t)):i&&!a&&(s=K(e,[A(t),t,Math.max(.166,n),i],"bottom",A(t))),$(s,"op-over-under",r)}(e,i,r,n,k(t.type)?t.type:"mrel");return(t.superscript||t.subscript)&&(o=t.attachLimits(e,o,0,0)),[o]}),Ne("phantom",(e,t)=>{if("vphantom"===t.phantomType){const i=$(Oe(e,t.body),"inner");return[$([i,$(null,"fix")],"rlap","mord")]}if("hphantom"===t.phantomType||"smash"===t.phantomType||"bsmash"===t.phantomType||"tsmash"===t.phantomType){const i=$(Oe(e,t.body),"","mord");return"bsmash"!==t.phantomType&&(i.height=0),"tsmash"!==t.phantomType&&(i.depth=0),[$(K(e,[i]),"","mord")]}return[$(Oe(e,t.body),"","mord")]}),Ne("surd",(e,t)=>{var i;const a=e.mathstyle,r=null!==(i=Oe(e.cramp(),t.body))&&void 0!==i?i:$(""),n=.04/a.sizeMultiplier;let o=n;a.idL(r)+A(r)+s&&(s=(s+c-(L(r)+A(r)))/2),l.setTop(l.height-L(r)-(s+n));const m=$(null,e.mathstyle.adjustTo(d.textstyle)+" sqrt-line");m.applyStyle(t.getStyle()),m.height=n;const p=K(e,[r,s,m,n]);if(void 0===t.index)return[t.bind(e,$([l,p],"sqrt","mord"))];const u=e.clone({mathstyle:d.scriptscriptstyle}),h=K(e,[$(Oe(u,t.index),a.adjustTo(d.scriptscriptstyle))],"shift",-.6*(Math.max(l.height,p.height)-Math.max(l.depth,p.depth)));return[t.bind(e,$([$(h,"root"),l,p],"sqrt","mord"))]});class Je{constructor(e,t,i,a){this.index=0,this.style={},this.parseMode="math",this.smartFence=!1,this.tabularMode=!1,this.atoms=[],this.endCount=0,this.tokens=e,this.args=t,this.macros=i,this.onError=e=>a({before:g(this.tokens.slice(this.index,this.index+10)),after:g(this.tokens.slice(Math.max(0,this.index-10),this.index)),...e})}swapAtoms(e=[]){const t=this.atoms;return this.atoms=e,t}swapParseMode(e){const t=this.parseMode;return this.parseMode=e,t}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index");)e=!0;return e}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){let e=!1;do{const t=this.matchWhitespace(),i=this.match("\\relax");e=!t&&!i}while(!e)}matchKeyword(e){const t=this.index;let i=this.end(),a="";for(;!i;){const t=this.get();Qe(t)?(a+=t,i=this.end()||a.length>=e.length):i=!0}const r=e.toUpperCase()===a.toUpperCase();return r||(this.index=t),r}scanString(){let e="",t=this.end();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===i?t=!0:Qe(i)?e+=this.get():"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.get()):t=!0}t=t||this.end()}return e}scanBalancedString(){let e="",t=this.end(),i=1;for(;!t;){if(this.match(""))e+=" ";else{const t=this.get();"<{>"===t?(e+="{",i+=1):"<}>"===t?(i-=1,i>0?e+="}":this.index-=1):e+="<$>"===t?"$":"<$$>"===t?"$$":t}t=0===i||this.end()}return e}matchLiteralArg(){var e;let t="";if(this.match("<{>")){let i=1;for(;i>0&&!this.end();){const a=this.get();"<}>"===a?(i-=1,i>0&&(t+="}")):"<{>"===a?(i+=1,t+="{"):t+=null!==(e={"":" ","<$$>":"$$","<$>":"$"}[a])&&void 0!==e?e:a}}return t}scanColor(){return be(this.scanString())}scanNumber(e=!0){var t,i;let a=!1,r=this.peek();for(;""===r||"+"===r||"-"===r;)this.get(),"-"===r&&(a=!a),r=this.peek();e=Boolean(e);let n=10,o=/[0-9]/;if(this.match("'"))n=8,o=/[0-7]/,e=!0;else if(this.match('"')||this.match("x"))n=16,o=/[0-9A-F]/,e=!0;else if(this.match("`"))return r=this.get(),r?r.startsWith("\\")&&2===r.length?(a?-1:1)*(null!==(t=r.codePointAt(1))&&void 0!==t?t:0):(a?-1:1)*(null!==(i=r.codePointAt(0))&&void 0!==i?i:0):NaN;let s="";for(;this.hasPattern(o);)s+=this.get();if(!e&&(this.match(".")||this.match(",")))for(s+=".";this.hasPattern(o);)s+=this.get();const l=e?parseInt(s,n):parseFloat(s);return a?-l:l}scanDimen(){const e=this.scanNumber(!1);let t;return this.matchWhitespace(),this.matchKeyword("pt")?t=s(e,"pt"):this.matchKeyword("mm")?t=s(e,"mm"):this.matchKeyword("cm")?t=s(e,"cm"):this.matchKeyword("ex")?t=s(e,"ex"):this.matchKeyword("px")?t=s(e,"px"):this.matchKeyword("em")?t=s(e,"em"):this.matchKeyword("bp")?t=s(e,"bp"):this.matchKeyword("dd")?t=s(e,"dd"):this.matchKeyword("pc")?t=s(e,"pc"):this.matchKeyword("in")?t=s(e,"in"):this.matchKeyword("mu")?t=s(e,"mu"):(this.onError({code:"missing-unit"}),t=s(e,"pt")),t}scanSkip(){const e=this.scanDimen();return this.matchWhitespace(),this.matchKeyword("plus")&&this.scanDimen(),this.matchWhitespace(),this.matchKeyword("minus")&&this.scanDimen(),e}scanColspec(){this.matchWhitespace();const e=[];for(;!this.end()&&"<}>"!==this.peek()&&"]"!==this.peek();){const t=this.get();if("c"===t||"r"===t||"l"===t)e.push({align:t});else if("|"===t)e.push({rule:!0});else if("@"===t){if(this.match("<{>")){const t=this.swapParseMode("math");e.push({gap:this.parse(e=>"<}>"===e)}),this.swapParseMode(t)}this.match("<}>")||this.onError({code:"unbalanced-braces"})}}return e}parseModeSet(){let e="";if(this.match("\\(")&&(e="\\)"),!e&&this.match("\\[")&&(e="\\]"),!e)return null;const t=this.swapParseMode("math"),i=new Be("math","group");return i.mathstyle="\\)"===e?"textstyle":"displaystyle",i.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(t),i.body&&0!==i.body.length?i:null}parseModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;const t=new Be("math","group");t.mathstyle="<$>"===e?"textstyle":"displaystyle",t.latexOpen="<$>"===e?"$":"$$",t.latexClose=t.latexOpen;const i=this.swapParseMode("math");return t.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(i),t.body&&0!==t.body.length?t:null}parseEnvironment(){if(!this.match("\\begin"))return null;const e=this.parseArgument("string");if(!e)return null;const t=ae(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const i=[];if(null==t?void 0:t.params)for(const a of t.params)if(a.isOptional)i.push(this.parseOptionalArgument(a.type));else{const t=this.parseArgument(a.type);t||this.onError({code:"missing-argument",arg:e}),i.push(t)}const a=this.parseMode,r=this.tabularMode,n=this.swapAtoms([]);this.tabularMode=t.tabular;const o=[],s=[];let l=[],c=!1;do{if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c&&this.match("\\end")&&(this.parseArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c)if(this.matchColumnSeparator())l.push(this.swapAtoms([]));else if(this.matchRowSeparator()){l.push(this.swapAtoms([]));let e=0;this.matchWhitespace(),this.match("[")&&(e=this.scanDimen(),this.matchWhitespace(),this.match("]")),s.push(e||0),o.push(l),l=[]}else this.atoms=this.atoms.concat(this.parse(e=>"<}>"===e||"&"===e||"\\end"===e||"\\cr"===e||"\\\\"===e))}while(!c);l.push(this.swapAtoms([])),l.length>0&&o.push(l);const d=this.swapAtoms(n);if(this.parseMode=a,this.tabularMode=r,!t.tabular&&0===d.length)return null;if(t.tabular&&0===o.length)return null;const m=new Be(this.parseMode,"array",d);return Object.assign(m,t.parser(e,i,o)),m.array=o,m.rowGaps=s,m.environmentName=e,m}parse(e){var t;const i=this.style;e||(e=e=>"<}>"===e);let a="",r=null,n=[],o=null;const s=this.swapAtoms([]);for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!a?(a=this.get(),r=re(a,"math",this.macros),r&&(n=this.parseArguments(r)[1]),o=this.swapAtoms([])):this.parseToken();let l;return a?(n.unshift(this.swapAtoms(s)),o&&n.unshift(o),l=[new Be(this.parseMode,r.type,null!==(t=r.value)&&void 0!==t?t:a.slice(1),r.parse?r.parse(a,n):null)],l[0].symbol=a):l=this.swapAtoms(s),this.style=i,l}parseGroup(){if(!this.match("<{>"))return null;const e=new Be(this.parseMode,"group");return e.body=this.parse(e=>"<}>"===e),this.match("<}>")||this.onError({code:"unbalanced-braces"}),e.latexOpen="{",e.latexClose="}",e}scanSmartFence(){if(this.matchWhitespace(),!this.match("("))return null;const e=new Be(this.parseMode,"leftright");e.leftDelim="(",e.inner=!1;const t=this.swapAtoms([]);let i=1;for(;!this.end()&&0!==i;)this.match("(")&&(i+=1),this.match(")")&&(i-=1),0!==i&&this.parseToken();return 0===i&&this.match(")"),e.rightDelim=0===i?")":"?",e.body=this.swapAtoms(t),e}scanDelim(){this.matchWhitespace();const e=this.get();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;let t=".";("\\"===e[0]||Qe(e))&&(t=e);const i=re(t,"math",this.macros);return i?i.mode&&!i.mode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:t}),null):"mopen"===i.type||"mclose"===i.type||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(t)?t:(this.onError({code:"unexpected-delimiter",arg:t}),null):(this.onError({code:"unknown-command",arg:t}),null)}parseLeftRight(){if(this.match("\\right")||this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),null;const e=this.style;let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const i=this.scanDelim();if(!i)return null;const a=this.swapAtoms([]);for(;!this.end()&&!this.match(t);)this.parseToken();this.style=e;const r=this.scanDelim(),n=new Be(this.parseMode,"leftright");return n.leftDelim=i,n.rightDelim=null!=r?r:void 0,n.inner="right"===t,n.body=this.swapAtoms(a),n}parseSupSub(){var e,t;if("math"!==this.parseMode)return!1;let i=!1,a=this.peek();for(;"^"===a||"_"===a||"'"===a;){const r="_"===a?"subscript":"superscript";if(this.match("^")||this.match("_")){const t=this.parseArgument("math");if(t){const a=this.lastSubsupAtom();a[r]=(null!==(e=a[r])&&void 0!==e?e:[]).concat(t),i=!0}}else if(this.match("'")){const e=this.lastSubsupAtom(),a=new Be(e.mode,"mord","′");a.symbol="\\prime",e.superscript=null!==(t=e.superscript)&&void 0!==t?t:[],e.superscript.push(a),i=!0}a=this.peek()}return i}parseLimits(){if(this.match("\\limits")){const e=this.lastSubsupAtom();return e.limits="limits",e.explicitLimits=!0,!0}if(this.match("\\nolimits")){const e=this.lastSubsupAtom();return e.limits="nolimits",e.explicitLimits=!0,!0}return!1}parseArguments(e){if(!e||!e.params)return[void 0,[]];let t;const i=[];let a=e.infix?2:0;for(;a")){if("delim"===e)return null!==(t=this.scanDelim())&&void 0!==t?t:".";if(/^(math|text)$/.test(e)){const t=this.swapParseMode(e),i=this.parseSimpleToken();return this.swapParseMode(t),i}}const a=this.parseMode;this.parseMode=e;const r=this.swapAtoms([]);if("string"===e)i=this.scanString(),this.skipUntilToken("<}>");else if("balanced-string"===e)i=this.scanBalancedString(),this.skipUntilToken("<}>");else if("number"===e)i=this.scanNumber(),this.skipUntilToken("<}>");else if("dimen"===e)i=this.scanDimen(),this.skipUntilToken("<}>");else if("skip"===e)i=this.scanSkip(),this.skipUntilToken("<}>");else if("colspec"===e)i=this.scanColspec(),this.skipUntilToken("<}>");else if("color"===e)i=this.scanColor()||"#ffffff",this.skipUntilToken("<}>");else if("delim"===e)i=this.scanDelim()||".",this.skipUntilToken("<}>");else{const t=this.index;let a=1;do{const e=this.get();"<}>"===e&&(a-=1),"<{>"===e&&(a+=1)}while(a>0&&!this.end());if(i=function(e,t,i,a){var r;return(null===(r=b[e])||void 0===r?void 0:r.parse)?b[e].parse(t,i,a):null}(e,this.tokens.slice(t,this.index-1),this.onError,{args:this.args,macros:this.macros,smartFence:this.smartFence,style:this.style,parse:(e,t,a)=>{const r=new Je(t,a.args,a.macros,this.onError);return r.parseMode=e,r.style=a.style,i=r.parse(),[i,t.slice(r.index)]}}),!i){this.index=t;do{this.atoms=this.atoms.concat(this.parse())}while(!this.match("<}>")&&!this.end())}}this.parseMode=a;const n=this.swapAtoms(r);return null!=i?i:n}parseOptionalArgument(e){var t;if(e="auto"===e?this.parseMode:e,this.matchWhitespace(),!this.match("["))return null;const i=this.parseMode;this.parseMode=e;const a=this.swapAtoms();let r;for(;!this.end()&&!this.match("]");)if("string"===e)r=this.scanString();else if("number"===e)r=this.scanNumber();else if("dimen"===e)r=this.scanDimen();else if("skip"===e)r=this.scanSkip();else if("colspec"===e)r=this.scanColspec();else if("color"===e)r=null!==(t=this.scanColor())&&void 0!==t?t:"#ffffff";else if("bbox"===e){const e=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/),t={};for(const i of e){const e=be(i);if(e)t.backgroundcolor=e;else{const e=i.match(/^\s*([0-9.]+)\s*([a-z][a-z])/);if(e)t.padding=s(e[1],e[2]);else{const e=i.match(/^\s*border\s*:\s*(.*)/);e&&(t.border=e[1])}}}r=t}else this.atoms=this.atoms.concat(this.parse(e=>"]"===e));this.parseMode=i;const n=this.swapAtoms(a);return null!=r?r:n}parseSimpleToken(){const e=this.get();if(!e)return null;let i=null;if(""===e)"text"===this.parseMode&&(i=new Be("text",""," ",this.style),i.symbol=" ");else if("\\"===e[0]){if("\\placeholder"===e)i=new Be(this.parseMode,"placeholder",this.parseArgument("string"),this.style),i.captureSelection=!0;else if("\\char"===e){const e=this.index;let t=Math.floor(this.scanNumber(!0));(!isFinite(t)||t<0||t>1114111)&&(t=10067),i=new Be(this.parseMode,"math"===this.parseMode?"mord":"",String.fromCodePoint(t)),i.symbol="\\char",i.latex="\\char"+g(this.tokens.slice(e,this.index))}else if("\\hskip"===e||"\\kern"===e){const t=this.scanSkip();isFinite(t)&&(i=new Be(this.parseMode,"spacing",null,this.style),i.width=t,i.symbol=e,i.latex=e)}else if(i=this.scanMacro(e),!i){const t=re(e,this.parseMode,{});if(!t)return this.onError({code:"unknown-command",arg:e}),i=new Be("math","error",e),i.symbol=e,i.latex=e,[i];if(t.mode&&!t.mode.includes(this.parseMode))return this.onError({code:"invalid-command",arg:e}),i=new Be("math","error",e),i.symbol=e,i.latex=e,[i];const a=this.index,[r,n]=this.parseArguments(t);if(!n)return null;if(t.infix)this.onError({code:"too-many-infix-commands",arg:e});else{if(t.parse){const a=t.parse(e,n);if(a.type)i=new Be(this.parseMode,t.type,r?this.parseArgument(r):null,{...this.style,...a});else{const e=this.parseMode;if(a.mode&&(this.parseMode=a.mode,delete a.mode),a.mathstyle){this.parseMode="math";const e=new Be("math","mathstyle");e.mathstyle=a.mathstyle,this.atoms.push(e)}if(r){const e=this.style;this.style={...this.style,...a},i=this.parseArgument(r),this.style=e}else this.style={...this.style,...a};this.parseMode=e}}else{const a={...this.style,variant:t.variant||this.style.variant,variantStyle:t.variantStyle||this.style.variantStyle};i=new Be(this.parseMode,t.type||"mop",t.value||e,a)}if(i instanceof Be&&!/^\\(llap|rlap|class|cssId)$/.test(e)){i.symbol=e;const t=g(this.tokens.slice(a,this.index));if(t&&(i.latex=i.symbol+t),i.isFunction&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}}}}else if(Qe(e)){const t=re(e,this.parseMode,this.macros);if(t){const a={...this.style};i=new Be(this.parseMode,t.type,t.value||e,a),t.isFunction&&(i.isFunction=!0)}else i=new Be(this.parseMode,"math"===this.parseMode?"mord":"",e,this.style);if(i.symbol=e,i.latex=J(this.parseMode,e),(null==t?void 0:t.isFunction)&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}else"<}>"===e?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:e});return i&&!t(i)?[i]:i}scanMacro(e){var t;const i=e.slice(1);if(!this.macros||!this.macros[i])return null;const a=this.index,r=[];let n,o=0;"string"==typeof this.macros[i]?(n=this.macros[i],/(^|[^\\])#1/.test(n)&&(o=1),/(^|[^\\])#2/.test(n)&&(o=2),/(^|[^\\])#3/.test(n)&&(o=3),/(^|[^\\])#4/.test(n)&&(o=4),/(^|[^\\])#5/.test(n)&&(o=5),/(^|[^\\])#6/.test(n)&&(o=6),/(^|[^\\])#7/.test(n)&&(o=7),/(^|[^\\])#8/.test(n)&&(o=8),/(^|[^\\])#9/.test(n)&&(o=9)):(n=this.macros[i].def,o=this.macros[i].args||0);for(let e=1;e<=o;e++)r[e]=this.matchLiteralArg();r["?"]=null===(t=this.args)||void 0===t?void 0:t["?"];const s=new Be(this.parseMode,"group",et(n,this.parseMode,r,this.macros,!1,this.onError));return s.captureSelection=!0,s.symbol=e,s.latex=e+g(this.tokens.slice(a)),s}parseToken(){let e=this.parseEnvironment()||this.parseModeShift()||this.parseModeSet()||this.parseGroup()||this.parseLeftRight();return!(e||!this.parseSupSub()&&!this.parseLimits())||(e||(e=this.parseSimpleToken()),t(e)?this.atoms=this.atoms.concat(e):e&&this.atoms.push(e),null!==e)}}function et(e,t,i,a,r=!1,n){let o=[];const s=new Je(Xe(e,i),i,a,t=>{"function"==typeof n&&n({...t,latex:e})});for(s.parseMode=t||"math",r&&(s.smartFence=!0);!s.end();){const e=s.parse();e&&(o=o.concat(e))}return o}var tt,it;const at=null!==(it=null===(tt=document.currentScript)||void 0===tt?void 0:tt.src)&&void 0!==it?it:function(){const e=String((new Error).stack).replace(/^Error.*\n/,"").split("\n");if(0===e.length)return"";const t=e[0].match(/http.*js/);return t?t[0]:""}();async function rt(e,t){var i;if((null===(i=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))||void 0===i||!i)&&"fonts"in document){const i=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"];let a=!1;if(!/firefox/i.test(navigator.userAgent))try{a=i.every(e=>document.fonts.check("16px "+e))}catch(e){a=!1}if(!a){if(document.body.classList.contains("ML__fonts-loading"))return;document.body.classList.add("ML__fonts-loading");const i=new URL(null!=e?e:"./fonts",at).toString(),a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular",{style:"italic"}],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(e=>function(e,t,i={}){return new FontFace(e,`url(${t}.woff2) format('woff2'), url(${t}.woff) format('woff')`,i)}(e[0].replace(/-[a-zA-Z]+$/,""),i+"/"+e[0],e[1]));try{(await Promise.all(a.map(e=>{try{return e.load()}catch(e){"function"==typeof t&&t({code:"font-not-found",arg:e})}}))).forEach(e=>document.fonts.add(e)),document.body.classList.remove("ML__fonts-loading")}catch(e){}}}}function nt(e,t){var i,a;if(!t)return null;let r=null!==(i=null==e?void 0:e.getRootNode())&&void 0!==i?i:null===document||void 0===document?void 0:document.head;if(!r)return null;r===document&&(r=document.head);const n=function(e){let t=0;if(0===e.length)return t;for(let i=0;i{var e;const t=document.head.querySelector(`style[data-id="${n}"]`);if(t){const i=parseFloat(null!==(e=t.getAttribute("data-refcount"))&&void 0!==e?e:"0");1===i?t.remove():t.setAttribute("data-refcount",Number(i-1).toString())}}}}function ot(e){return 0===e.length||1===e.length&&"first"===e[0].type}function st(e){const t=e.siblings();for(let e=t.length-1;e>=0;e--)t[e].isSuggestion&&t.splice(e,1)}function lt(e){let t=1,i=e.ancestor(t);for(;i;)i.latex=void 0,t+=1,i=e.ancestor(t)}function ct(e,t){let i="";for(const t of e)i+=t.relation+":"+t.offset+"/";return t&&(i+="#"+t),i}function dt(e){const t={path:[],extent:0},i=e.split("#");i.length>1&&(t.extent=parseInt(i[1]));const a=i[0].split("/");for(const e of a){const i=e.match(/([^:]*):(.*)/);i&&t.path.push({relation:i[1],offset:parseInt(i[2])})}return t}function mt(e,t){let i=0,a=-1,r=!1;for(;!r;)a+=1,r=a>=e.length||a>=t.length,r=r||!(e[a].relation===t[a].relation&&e[a].offset===t[a].offset);return i=a===e.length&&a===t.length?0:a+1===e.length&&a+1===t.length&&e[a].relation===t[a].relation?1:2,i}function pt(e){return dt(ct(e)).path}function ut(e,t){let i=0;for(let a=0;a0;)a.col+=1,(!e[a.row]||a.col>=e[a.row].length)&&(a.col=0,a.row+=1),i-=1;return a}function ft(e,i){var a;let r;return"object"!=typeof i&&(i=ht(e,i)),t(e[i.row])&&(r=null!==(a=e[i.row][i.col])&&void 0!==a?a:null),!r||0!==r.length&&"first"===r[0].type||r.unshift(new Be("math","first")),r}function gt(e){let t=0,i=0,a=1;for(const t of e)i+=1,t.length>a&&(a=t.length);return t=i*a,t}function yt(e,t,i){const a={...t};if(a.row+=i,a.row<0){if(a.col+=i,a.row=e.length-1,a.col<0)return null;for(;a.row>=0&&!ft(e,a);)a.row-=1;if(a.row<0)return null}else if(a.row>=e.length){for(a.col+=i,a.row=0;a.rowe.length-1)return null}return a}class bt{constructor(e,t,i,a){this.options={mode:"math",removeExtraneousParentheses:!1,...e},this.root=Fe(this.options.mode),this.path=[{relation:"body",offset:0}],this.extent=0,this.setListeners(t),this.setHooks(i),this.mathfield=a,this.suppressChangeNotifications=!1}clone(){const e=new bt(this.options,this.listeners,this.hooks,this.mathfield);return e.root=this.root,e.path=pt(this.path),e}setListeners(e){this.listeners=e}setHooks(e){this.hooks={announce:(null==e?void 0:e.announce)?e.announce:(e,t,i,a)=>{},moveOut:(null==e?void 0:e.moveOut)?e.moveOut:()=>!0,tabOut:(null==e?void 0:e.tabOut)?e.tabOut:()=>!0}}announce(e,t,i=[]){this.hooks.announce(this.mathfield,e,t,i)}toString(){return ct(this.path,this.extent)}siblings(){var e;if(0===this.path.length)return[];let t;return this.parent().array?t=ft(this.parent().array,this.relation()):(t=null!==(e=this.parent()[this.relation()])&&void 0!==e?e:[],"string"==typeof t&&(t=[])),0!==t.length&&"first"===t[0].type||t.unshift(new Be(this.parent().mode,"first")),t}anchorOffset(){return this.path.length>0?this.path[this.path.length-1].offset:0}focusOffset(){return this.path.length>0?this.path[this.path.length-1].offset+this.extent:0}startOffset(){return Math.min(this.focusOffset(),this.anchorOffset())}endOffset(){return Math.max(this.focusOffset(),this.anchorOffset())}sibling(e){return this.siblings()[this.startOffset()+e]}ancestor(e){if(e>this.path.length)return null;let t=this.root;for(let i=0;i0?this.path[this.path.length-1].relation:""}insertFirstAtom(){this.siblings()}}function vt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionWillChange)||e.suppressChangeNotifications||e.listeners.onSelectionWillChange(e)}function xt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionDidChange)||e.suppressChangeNotifications||e.listeners.onSelectionDidChange(e)}function kt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentWillChange)||e.suppressChangeNotifications||e.listeners.onContentWillChange(e)}function _t(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentDidChange)||e.suppressChangeNotifications||e.listeners.onContentDidChange(e)}function wt(e){return!!e&&("mord"===e.type&&/[0-9.]/.test(e.body)||"mpunct"===e.type&&","===e.body)}function Mt(e){const t=e.siblings();if(t.length<=1)return null;let i=Math.min(e.endOffset(),t.length-1);if("command"!==t[i].type)return null;for(;i>0&&"command"===t[i].type;)i-=1;let a=e.startOffset()+1;for(;a<=t.length-1&&"command"===t[a].type;)a+=1;return a>i?{start:i+1,end:a}:null}function St(e){const t=Pt(e)?Vt(e):e.sibling(1);let i;if(t){if("command"===t.type)return"command";i=t.mode}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i=r.mode),a+=1,r=e.ancestor(a);return i}function zt(e){const t=Pt(e)?Vt(e):e.sibling(1);let i;if(t&&"first"!==t.type){if("command"===t.type)return{};i={color:t.color,backgroundColor:t.backgroundColor,fontFamily:t.fontFamily,fontShape:t.fontShape,fontSeries:t.fontSeries,fontSize:t.fontSize}}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i={color:r.color,backgroundColor:r.backgroundColor,fontFamily:r.fontFamily,fontShape:r.fontShape,fontSeries:r.fontSeries,fontSize:r.fontSize}),a+=1,r=e.ancestor(a);return i}function Lt(e,t=1,i=!0){var a;const r=e.suppressChangeNotifications;e.suppressChangeNotifications=!0;const n=e.clone(),o=e.extent;Ct(e,t),"placeholder"===Vt(e).type&&Ct(e,t);const s=Yt(e,(t,i)=>"placeholder"===i.type||t.length>1&&1===e.siblings().length,t);if(0===s.length){if(jt(e,n,o),i&&(null===(a=e.hooks)||void 0===a?void 0:a.tabOut)&&e.hooks.tabOut(e,t>0?"forward":"backward")&&document.activeElement){const e='a[href]:not([disabled]),\n button:not([disabled]),\n textarea:not([disabled]),\n input[type=text]:not([disabled]),\n select:not([disabled]),\n [contentEditable="true"],\n [tabindex]:not([disabled]):not([tabindex="-1"])',i=Array.prototype.filter.call(document.querySelectorAll(e),e=>(e.offsetWidth>0||e.offsetHeight>0)&&!e.contains(document.activeElement)||e===document.activeElement);let a=i.indexOf(document.activeElement)+t;a<0&&(a=i.length-1),a>=i.length&&(a=0),i[a].focus()}return e.suppressChangeNotifications=r,!1}return vt(e),jt(e,s[0]),"placeholder"===Vt(e).type&&Rt(e,-1),e.announce("move",n),xt(e),e.suppressChangeNotifications=r,!0}function At(e,t=0,i=0,a=""){const r=e.path[e.path.length-1].relation;a||(a=r);const n=e.parent();if(!n&&"body"!==a)return!1;const o=a.startsWith("cell");if(!o&&!n[a]||o&&!n.array)return!1;const s=a!==r;e.path[e.path.length-1].relation=a;const l=e.siblings().length;e.path[e.path.length-1].relation=r;const c=e.extent;"end"===i?i=l-t-1:"start"===i&&(i=-t),Rt(e,i);const d=e.extent!==c;Rt(e,c),t<0&&(t=l+t),t=Math.max(0,Math.min(t,l-1));const m=e.path[e.path.length-1].offset;return(s||m!==t||d)&&(s&&Xt(e),vt(e),e.path[e.path.length-1].relation=a,e.path[e.path.length-1].offset=t,Rt(e,i),xt(e)),!0}function qt(e,i){var a;i=null!=i?i:{};const r={body:"numer",numer:"denom",denom:"index",index:"overscript",overscript:"underscript",underscript:"subscript",subscript:"superscript"};if(e.anchorOffset()===e.siblings().length-1){Xt(e);let t=r[e.relation()];const n=e.parent();for(;t&&!n[t];)t=r[t];if(t)return void At(e,0,0,t);if(e.parent().array){const t=gt(e.parent().array);let i=parseInt(e.relation().match(/cell([0-9]*)$/)[1])+1;for(;i=0;){if(ft(e.parent().array,t)&&At(e,-1,0,"cell"+t))return void xt(e);t-=1}}return 1===e.path.length?(e.suppressChangeNotifications||!(null===(a=e.hooks)||void 0===a?void 0:a.moveOut)||e.hooks.moveOut(e,"backward"))&&(e.path[0].offset=e.root.body.length-1):(e.path.pop(),At(e,e.anchorOffset()-1)),void xt(e)}const n=Vt(e);if(!n.captureSelection){let i;if(n.array){i="";const t=gt(n.array);let a=t-1;for(;!i&&a0)for(It(e)&&t--;t>0;)qt(e),t--;else if(t<0)for(Ht(e)&&t++;0!==t;)$t(e),t++;e.announce("move",i)}return!0}function Dt(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;Ht(e);const r=e.relation();if("denom"===r)a?(vt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Rt(e,1),xt(e)):At(e,e.anchorOffset(),0,"numer"),e.announce("moveUp");else if(e.parent().array){let i=ht(e.parent().array,r);i=yt(e.parent().array,i,-1),i&&ft(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+ut(e.parent().array,i),At(e,e.anchorOffset()),e.announce("moveUp")):Ct(e,-1,t)}else e.announce("line");return!0}function Tt(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;It(e);const r=e.relation();if("numer"===r)a?(vt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Rt(e,1),xt(e)):At(e,e.anchorOffset(),0,"denom"),e.announce("moveDown");else if(e.parent().array){let i=ht(e.parent().array,r);i=yt(e.parent().array,i,1),i&&ft(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+ut(e.parent().array,i),At(e,e.anchorOffset()),e.announce("moveDown")):Ct(e,1,t)}else e.announce("line");return!0}function Et(e,t){let i=e.path[e.path.length-1].offset,a=0;const r=e.clone();a=e.extent+t;const n=i+a;if(n<0&&0!==a){if(e.path.length>1)return vt(e),e.path.pop(),Rt(e,-1),xt(e),e.announce("move",r),!0;i=e.path[e.path.length-1].offset,a=e.extent}else if(n>=e.siblings().length){if(e.path.length>1)return vt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Rt(e,1),xt(e),e.announce("move",r),!0;Pt(e)&&(i-=1),a-=1}return At(e,i,a),e.announce("move",r),!0}function Kt(e,t,i){var a;const r=null!==(a=(i=null!=i?i:{extend:!1}).extend)&&void 0!==a&&a;t=t<0?-1:1;const n=e.clone(),o=e.siblings(),s=e.focusOffset();let l=s+t;if(r&&(l=Math.min(Math.max(0,l),o.length-1)),l<0||l>=o.length)Ct(e,t,i);else{if(o[l]&&"text"===o[l].mode){if(l=function(e,t,i){i=i<0?-1:1;const a=e.siblings();if(!a[t])return t;if("text"!==a[t].mode)return t;let r;if(U.test(a[t].body)){let e,n=t;do{e="text"===a[n].mode&&U.test(a[n].body),n+=i}while(a[n]&&e);r=a[n]?n-2*i:n-i}else if(/\s/.test(a[t].body)){let e=t;for(;a[e]&&"text"===a[e].mode&&/\s/.test(a[e].body);)e+=i;if(a[e]){let t=!0;do{t="text"===a[e].mode&&!/\s/.test(a[e].body),e+=i}while(a[e]&&t);r=a[e]?e-2*i:e-i}else r=e-i}else{let e=t;for(;a[e]&&"text"===a[e].mode&&!/\s/.test(a[e].body);)e+=i;r=a[e]?e:e-i;let n=!0;for(;a[e]&&n;)n="text"===a[e].mode&&/\s/.test(a[e].body),n&&(r=e),e+=i;r=a[e]?e-2*i:e-i}return r-(i>0?0:1)}(e,l,t),l<0&&!r)return void At(e,0);if(l>o.length)return At(e,o.length-1),void Ct(e,t,i)}else{const e=o[l]?o[l].type:"";if("mopen"===e&&t>0||"mclose"===e&&t<0){let i="mopen"===e?1:-1;for(l+=t>0?1:-1;l>=0&&l0&&(l-=1)}else{for(;o[l]&&"math"===o[l].mode&&o[l].type===e;)l+=t;l-=t>0?1:0}}if(r){const t=e.anchorOffset();At(e,t,l-t)}else At(e,l);e.announce("move",n)}}function Nt(e,t=1,i){var a;i=null!=i?i:{extend:!1},t=t<0?-1:1;const r=e.clone(),n=[{relation:"body",offset:e.path[0].offset}];let o;return null!==(a=!i.extend)&&void 0!==a&&a?(n[0].offset=t<0?0:e.root.body.length-1,o=0):t<0?n[0].offset>0&&(o=-n[0].offset):n[0].offset=a)return At(e,e.endOffset()-1,1),!0;At(e,i,a-i)}else if("mord"===e.sibling(0).type&&/[0-9,.]/.test(e.sibling(0).body)){let i=e.startOffset(),a=e.endOffset();for(;wt(t[i]);)i-=1;for(;wt(t[a]);)a+=1;a-=1,At(e,i,a-i)}else At(e,0,"end");return!0}function Ft(e){return e.path=[{relation:"body",offset:0}],At(e,0,"end")}function Pt(e){return 0===e.extent}function Rt(e,t){return e.extent=t,!0}function It(e){return 0!==e.extent&&(At(e,e.endOffset()),!0)}function Ht(e){return 0!==e.extent&&(At(e,e.startOffset()),!0)}function Wt(e){if(e.path.length>1){const t=e.clone();return e.path.pop(),Rt(e,0),e.announce("move",t),!0}return e.announce("plonk"),!1}function Vt(e){if(e.parent().array)return ft(e.parent().array,e.relation())[e.anchorOffset()];const t=e.siblings();return t[Math.min(t.length-1,e.anchorOffset())]}function Ut(e,t,i,a={extendToWordBoundary:!1}){const r=mt(t,i);if(0===r)return a.extendToWordBoundary?Ut(e,t=Zt(e,t,-1),i=Zt(e,i,1)):jt(e,pt(t),0);if(1===r){const r=i[i.length-1].offset-t[t.length-1].offset;return a.extendToWordBoundary?Ut(e,t=Zt(e,t,r<0?1:-1),i=Zt(e,i,r<0?-1:1)):jt(e,pt(t),r)}let n=function(e,t){const i=[],a=Math.min(e.length-1,t.length-1);let r=0;for(;r<=a&&e[r].relation===t[r].relation&&e[r].offset===t[r].offset;)i.push(e[r]),r+=1;return i}(t,i);const o=n.length;if(t.length===o||i.length===o||t[o].relation!==i[o].relation)return jt(e,n,-1);n.push(t[o]),n=pt(n);let s=i[o].offset-t[o].offset+1;return s<=0?i.length>o+1?(n[o].relation=i[o].relation,n[o].offset=i[o].offset,n[n.length-1].offset-=1,s=2-s):(n[o].relation=i[o].relation,n[o].offset=i[o].offset,s=1-s):i.length<=t.length?n[n.length-1].offset-=1:i.length>t.length&&(n[o].offset-=1),jt(e,n,s)}function jt(e,i,a=0){let r;if("string"==typeof i)r=dt(i);else if(t(i)){const t=pt(i),n=e.path;e.path=t,0===a&&"placeholder"===Vt(e).type&&(t[t.length-1].offset=e.anchorOffset()-1,a=1),r={path:t,extent:a||0},e.path=n}else r=i;const n=0!==mt(e.path,r.path),o=r.extent!==e.extent;return(n||o)&&(n&&Xt(e),vt(e),e.path=pt(r.path),e.siblings().length=0?It(r):(Ht(r),Ct(r,1));const n=Vt(r);do{t.bind(r)(r.path,Vt(r))&&a.push(r.toString()),i>=0?qt(r,{iterateAll:!0}):$t(r,{iterateAll:!0})}while(n!==Vt(r));return a}const Qt="apple"===ii()?{id:"apple.en-intl",displayName:"English (international)",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","ı"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","Î"],KeyE:["e","E","´","´"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","˝"],KeyH:["h","H","˙","Ó"],KeyI:["i","I","ˆ","ˆ"],KeyJ:["j","J","∆","Ô"],KeyK:["k","K","˚",""],KeyL:["l","L","¬","Ò"],KeyM:["m","M","µ","Â"],KeyN:["n","N","˜","˜"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®","‰"],KeyS:["s","S","ß","Í"],KeyT:["t","T","†","ˇ"],KeyU:["u","U","¨","¨"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","˛"],KeyY:["y","Y","¥","Á"],KeyZ:["z","Z","Ω","¸"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","ˆ","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["-","_","–","—"],Equal:["=","+","≠","±"],BracketLeft:["[","{","“","”"],BracketRight:["]","}","‘","’"],Backslash:["\\","|","«","»"],Semicolon:[";",":","…","Ú"],Quote:["'",'"',"æ","Æ"],Backquote:["`","˜","`","`"],Comma:[",","<","≤","¯"],Period:[".",">","≥","˘"],Slash:["/","?","÷","¿"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}}:"windows"===ii()?{id:"windows.en-intl",displayName:"English (international)",platform:"windows",locale:"en",score:0,mapping:{KeyA:["a","A","á","Á"],KeyB:["b","B","",""],KeyC:["c","C","©","¢"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","é","É"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","í","Í"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","ø","Ø"],KeyM:["m","M","µ",""],KeyN:["n","N","ñ","Ñ"],KeyO:["o","O","ó","Ó"],KeyP:["p","P","ö","Ö"],KeyQ:["q","Q","ä","Ä"],KeyR:["r","R","®",""],KeyS:["s","S","ß","§"],KeyT:["t","T","þ","Þ"],KeyU:["u","U","ú","Ú"],KeyV:["v","V","",""],KeyW:["w","W","å","Å"],KeyX:["x","X","",""],KeyY:["y","Y","ü","Ü"],KeyZ:["z","Z","æ","Æ"],Digit1:["1","!","¡","¹"],Digit2:["2","@","²",""],Digit3:["3","#","³",""],Digit4:["4","$","¤","£"],Digit5:["5","%","€",""],Digit6:["6","^","¼",""],Digit7:["7","&","½",""],Digit8:["8","*","¾",""],Digit9:["9","(","‘",""],Digit0:["0",")","’",""],Space:[" "," ","",""],Minus:["-","_","¥",""],Equal:["=","+","×","÷"],BracketLeft:["[","{","«",""],BracketRight:["]","}","»",""],Backslash:["\\","|","¬","¦"],Semicolon:[";",":","¶","°"],Quote:["'",'"',"´","¨"],Backquote:["`","~","",""],Comma:[",","<","ç","Ç"],Period:[".",">","",""],Slash:["/","?","¿",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}}:{id:"linux.en",displayName:"English",platform:"linux",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Jt={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},ei=[];let ti;function ii(){let e="linux";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?e="apple":/^(win)/i.test(navigator.platform)?e="windows":/(android)/i.test(navigator.userAgent)?e="linux":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e="apple":/\bCrOS\b/i.test(navigator.userAgent)&&(e="linux")),e}function ai(e){e.platform===ii()&&ei.push(e)}function ri(e){ti=ei.find(t=>e.startsWith(t.locale))}function ni(){return null!=ti?ti:ei[0]}ai(Qt),ai({id:"apple.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","‡","Ω"],KeyB:["b","B","ß","∫"],KeyC:["c","C","©","¢"],KeyD:["d","D","∂","∆"],KeyE:["e","E","ê","Ê"],KeyF:["f","F","ƒ","·"],KeyG:["g","G","fi","fl"],KeyH:["h","H","Ì","Î"],KeyI:["i","I","î","ï"],KeyJ:["j","J","Ï","Í"],KeyK:["k","K","È","Ë"],KeyL:["l","L","¬","|"],KeyM:[",","?","∞","¿"],KeyN:["n","N","~","ı"],KeyO:["o","O","œ","Œ"],KeyP:["p","P","π","∏"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","®","‚"],KeyS:["s","S","Ò","∑"],KeyT:["t","T","†","™"],KeyU:["u","U","º","ª"],KeyV:["v","V","◊","√"],KeyW:["z","Z","Â","Å"],KeyX:["x","X","≈","⁄"],KeyY:["y","Y","Ú","Ÿ"],KeyZ:["w","W","‹","›"],Digit1:["&","1","","´"],Digit2:["é","2","ë","„"],Digit3:['"',"3","“","”"],Digit4:["'","4","‘","’"],Digit5:["(","5","{","["],Digit6:["§","6","¶","å"],Digit7:["è","7","«","»"],Digit8:["!","8","¡","Û"],Digit9:["ç","9","Ç","Á"],Digit0:["à","0","ø","Ø"],Space:[" "," "," "," "],Minus:[")","°","}","]"],Equal:["-","_","—","–"],BracketLeft:["^","¨","ô","Ô"],BracketRight:["$","*","€","¥"],Backslash:["`","£","@","#"],Semicolon:["m","M","µ","Ó"],Quote:["ù","%","Ù","‰"],Backquote:["<",">","≤","≥"],Comma:[";",".","…","•"],Period:[":","/","÷","\\"],Slash:["=","+","≠","±"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","•","Ÿ"],NumpadEqual:["=","=","=","="]}}),ai({id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","ß",""],KeyC:["c","C","©"," "],KeyD:["d","D","∂","∆"],KeyE:["e","E","€","€"],KeyF:["f","F","ƒ","fi"],KeyG:["g","G","","fl"],KeyH:["h","H","™"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","¶","¯"],KeyK:["k","K","§","ˇ"],KeyL:["l","L"," ","˘"],KeyM:["m","M","µ","˚"],KeyN:["n","N"," ","˙"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®"," "],KeyS:["s","S","∫"," "],KeyT:["t","T","†","‡"],KeyU:["u","U"," "," "],KeyV:["v","V","√","◊"],KeyW:["w","W","æ","Æ"],KeyX:["x","X","∑","›"],KeyY:["y","Y","¥"," "],KeyZ:["z","Z","Ω","‹"],Digit1:["1","!","|","ı"],Digit2:["2",'"',"@","˝"],Digit3:["3","·","#","•"],Digit4:["4","$","¢","£"],Digit5:["5","%","∞","‰"],Digit6:["6","&","¬"," "],Digit7:["7","/","÷","⁄"],Digit8:["8","(","“","‘"],Digit9:["9",")","”","’"],Digit0:["0","=","≠","≈"],Space:[" "," "," "," "],Minus:["'","?","´","¸"],Equal:["¡","¿","‚","˛"],BracketLeft:["`","^","[","ˆ"],BracketRight:["+","*","]","±"],Backslash:["ç","Ç","}","»"],Semicolon:["ñ","Ñ","~","˜"],Quote:["´","¨","{","«"],Backquote:["<",">","≤","≥"],Comma:[",",";","„",""],Period:[".",":","…","…"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["º","ª","\\","°"]}}),ai({id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","·","#",""],Digit4:["4","$","~",""],Digit5:["5","%","€",""],Digit6:["6","&","¬",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["¡","¿","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["ç","Ç","}",""],Semicolon:["ñ","Ñ","",""],Quote:["´","¨","{",""],Backquote:["º","ª","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ai({id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["z","Z","«","<"],Digit1:["1","!","|","¡"],Digit2:["2",'"',"@","⅛"],Digit3:["3","·","#","£"],Digit4:["4","$","~","$"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["'","?","\\","¿"],Equal:["¡","¿","̃","~"],BracketLeft:["̀","̂","[","̊"],BracketRight:["+","*","]","̄"],Backslash:["ç","Ç","}","̆"],Semicolon:["ñ","Ñ","~","̋"],Quote:["́","̈","{","{"],Backquote:["º","ª","\\","\\"],Comma:[",",";","─","×"],Period:[".",":","·","÷"],Slash:["-","_","̣","̇"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}}),ai({id:"linux.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","@","Ω"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:[",","?","́","̋"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["z","Z","«","<"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["w","W","ł","Ł"],Digit1:["&","1","¹","¡"],Digit2:["é","2","~","⅛"],Digit3:['"',"3","#","£"],Digit4:["'","4","{","$"],Digit5:["(","5","[","⅜"],Digit6:["-","6","|","⅝"],Digit7:["è","7","`","⅞"],Digit8:["_","8","\\","™"],Digit9:["ç","9","^","±"],Digit0:["à","0","@","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:[")","°","]","¿"],Equal:["=","+","}","̨"],BracketLeft:["̂","̈","̈","̊"],BracketRight:["$","£","¤","̄"],Backslash:["*","µ","̀","̆"],Semicolon:["m","M","µ","º"],Quote:["ù","%","̂","̌"],Backquote:["²","~","¬","¬"],Comma:[";",".","─","×"],Period:[":","/","·","÷"],Slash:["!","§","̣","̇"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"]}}),ai({id:"windows.french",locale:"fr",displayName:"French",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["é","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["è","7","`",""],Digit8:["_","8","\\",""],Digit9:["ç","9","^",""],Digit0:["à","0","@",""],Space:[" "," ","",""],Minus:[")","°","]",""],Equal:["=","+","}",""],BracketLeft:["^","¨","",""],BracketRight:["$","£","¤",""],Backslash:["*","µ","",""],Semicolon:["m","M","",""],Quote:["ù","%","",""],Backquote:["²","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","§","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ai({id:"windows.german",locale:"de",displayName:"German",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","µ",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"²",""],Digit3:["3","§","³",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["ß","?","\\","ẞ"],Equal:["´","`","",""],BracketLeft:["ü","Ü","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["ö","Ö","",""],Quote:["ä","Ä","",""],Backquote:["^","°","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}}),ai({id:"apple.german",locale:"de",displayName:"German",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","‹"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","™"],KeyE:["e","E","€","‰"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","Ì"],KeyH:["h","H","ª","Ó"],KeyI:["i","I","⁄","Û"],KeyJ:["j","J","º","ı"],KeyK:["k","K","∆","ˆ"],KeyL:["l","L","@","fl"],KeyM:["m","M","µ","˘"],KeyN:["n","N","~","›"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","«","»"],KeyR:["r","R","®","¸"],KeyS:["s","S","‚","Í"],KeyT:["t","T","†","˝"],KeyU:["u","U","¨","Á"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","Ù"],KeyY:["z","Z","Ω","ˇ"],KeyZ:["y","Y","¥","‡"],Digit1:["1","!","¡","¬"],Digit2:["2",'"',"“","”"],Digit3:["3","§","¶","#"],Digit4:["4","$","¢","£"],Digit5:["5","%","[","fi"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","˜"],Digit9:["9",")","}","·"],Digit0:["0","=","≠","¯"],Space:[" "," "," "," "],Minus:["ß","?","¿","˙"],Equal:["´","`","'","˚"],BracketLeft:["ü","Ü","•","°"],BracketRight:["+","*","±",""],Backslash:["#","'","‘","’"],Semicolon:["ö","Ö","œ","Œ"],Quote:["ä","Ä","æ","Æ"],Backquote:["<",">","≤","≥"],Comma:[",",";","∞","˛"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","°","„","“"],NumpadEqual:["=","=","=","="]}});const oi=[{key:"ctrl+alt+e",command:["insert","\\text{cmd+alt+e}"]},{key:"cmd+alt+a",command:["insert","\\text{cmd+alt+a}"]},{key:"ctrl+alt+a",command:["insert","\\text{ctrl+alt+a}"]},{key:"meta+alt+2",command:["insert","\\text{meta+alt+2}"]},{key:"ctrl+alt+shift+a",command:["insert","\\text{ctrl+alt+shift+a}"]},{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendToPreviousChar"},{key:"shift+[ArrowRight]",command:"extendToNextChar"},{key:"shift+[ArrowUp]",command:"extendUp"},{key:"shift+[ArrowDown]",command:"extendDown"},{key:"[Backspace]",command:"deletePreviousChar"},{key:"alt+[Delete]",command:"deletePreviousChar"},{key:"[Delete]",command:"deleteNextChar"},{key:"alt+[Backspace]",command:"deleteNextChar"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"alt+shift+[ArrowLeft]",command:"extendToPreviousWord"},{key:"alt+shift+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"ctrl+shift+[ArrowLeft]",command:"extendToGroupStart"},{key:"ctrl+shift+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Space]",ifMode:"math",command:"moveAfterParent"},{key:"shift+[Space]",ifMode:"math",command:"moveBeforeParent"},{key:"[Home]",command:"moveToMathFieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathFieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"cmd+shift+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathFieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathFieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"cmd+shift+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",ifMode:"math",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"math",command:"moveToPreviousPlaceholder"},{key:"[Tab]",ifMode:"text",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"text",command:"moveToPreviousPlaceholder"},{key:"[Escape]",ifMode:"math",command:["switch-mode","command"]},{key:"\\",ifMode:"math",command:["switch-mode","command"]},{key:"alt+[Equal]",ifMode:"math",command:["applyStyle",{mode:"text"}]},{key:"alt+[Equal]",ifMode:"text",command:["applyStyle",{mode:"math"}]},{key:"[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[Tab]",ifMode:"command",command:["complete",{acceptSuggestion:!0}]},{key:"[Return]",ifMode:"command",command:"complete"},{key:"[Enter]",ifMode:"command",command:"complete"},{key:"shift+[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[ArrowDown]",ifMode:"command",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"command",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deletePreviousChar"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"[Undo]",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+y",command:"redo"},{key:"ctrl+shift+z",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+z",command:"redo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathFieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathFieldEnd"},{key:"ctrl+shift+b",ifPlatform:"macos",command:"extendToPreviousChar"},{key:"ctrl+shift+f",ifPlatform:"macos",command:"extendToNextChar"},{key:"ctrl+shift+p",ifPlatform:"macos",command:"extendUp"},{key:"ctrl+shift+n",ifPlatform:"macos",command:"extendDown"},{key:"ctrl+shift+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"ctrl+shift+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"ctrl+alt+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"ctrl+alt+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"ctrl+shift+alt+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"ctrl+shift+alt+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deletePreviousChar"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteNextChar"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"shift+[Quote]",ifMode:"math",command:["switchMode","text","","“"]},{key:"shift+[Quote]",ifMode:"text",command:["switch-mode","math","”",""]},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Minus]",ifMode:"math",command:"moveToSubscript"},{key:"alt+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrack #0 \\right\\rbrack$$"]},{key:"alt+shift+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrace #0 \\right\\rbrace$$"]},{key:"[Return]",ifMode:"math",command:"addRowAfter"},{key:"[Enter]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"math",command:"addColumnAfter"},{key:"[Return]",ifMode:"text",command:"addRowAfter"},{key:"[Enter]",ifMode:"text",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"text",command:"addColumnAfter"},{key:"alt+p",ifMode:"math",command:["insert","$$\\pi$$"]},{key:"alt+v",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"alt+w",ifMode:"math",command:["insert","$$\\sum_{i=#?}^{#?}$$"]},{key:"alt+u",ifMode:"math",command:["insert","$$\\cup$$"]},{key:"alt+n",ifMode:"math",command:["insert","$$\\cap$$"]},{key:"alt+o",ifMode:"math",command:["insert","$$\\emptyset$$"]},{key:"alt+d",ifMode:"math",command:["insert","$$\\differentialD$$"]},{key:"alt+shift+o",ifMode:"math",command:["insert","$$\\varnothing$$"]},{key:"alt+shift+d",ifMode:"math",command:["insert","$$\\partial$$"]},{key:"alt+shift+p",ifMode:"math",command:["insert","$$\\prod_{i=#?}^{#?}$$"]},{key:"alt+shift+u",ifMode:"math",command:["insert","$$\\bigcup$$"]},{key:"alt+shift+n",ifMode:"math",command:["insert","$$\\bigcap$$"]},{key:"alt+shift+a",ifMode:"math",command:["insert","$$\\forall$$"]},{key:"alt+shift+e",ifMode:"math",command:["insert","$$\\exists$$"]},{key:"alt+[Digit5]",ifMode:"math",command:["insert","$\\infty$$"]},{key:"alt+[Digit6]",ifMode:"math",command:["insert","$$\\wedge$$"]},{key:"alt+shift+[Digit6]",ifMode:"math",command:["insert","$$\\vee$$"]},{key:"alt+[Digit9]",ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifMode:"math",command:["insert",")"]},{key:"alt+shift+[Backslash]",ifMode:"math",command:["insert","|"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","$$\\backslash$$"]},{key:"/",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+/",ifMode:"math",command:["insert","$$\\/$$"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+[Backquote]",ifMode:"math",command:["insert","$$\\~$$"]},{key:"alt+shift+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleVirtualKeyboard"},{key:"ctrl+alt+[ArrowUp]",command:["speak","parent",{withHighlighting:!1}]},{key:"ctrl+alt+[ArrowDown]",command:["speak","all",{withHighlighting:!1}]}],si={"\\theta":"alt+q","\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\prod":"alt+shift+p","\\sum":"alt+w","\\int":"alt+b","\\cup":"alt+u","\\cap":"alt+n","\\bigcup":"alt+shift+u","\\bigcap":"alt+shift+n","\\forall":"alt+shift+a","\\exists":"alt+shift+e","\\infty":"alt+[Digit5]","\\wedge":"alt+[Digit5]","\\vee":"alt+shift+[Digit6]","\\differentialD":"alt+d","\\partial":"alt+shift+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"alt+shift+o","\\~":"~"};function li(e){if((null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)){let t;if(/^(mac)/i.test(navigator.platform)?t="macos":/^(win)/i.test(navigator.platform)?t="windows":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos"),e.startsWith("!")&&!e.endsWith(t))return!0;if(e.endsWith(t))return!0}return!1}function ci(e){let i=e;return t(i)&&(i=i.length>0?i[0]+"("+i.slice(1).join("")+")":""),i}function di(e){var t;const i=li("macos")||li("ios"),a=e.split("+");let r="";for(const e of a)!i&&r&&(r+='+'),e.startsWith("Key")?r+=e.substr(3,1):e.startsWith("Digit")?r+=e.substr(5,1):r+=null!==(t={cmd:"⌘",meta:i?"⌘":"command",shift:i?"⇧":"shift",alt:i?"⌥":"alt",ctrl:i?"⌃":"control","\n":i?"⏎":"return","[return]":i?"⏎":"return","[enter]":i?"⌤":"enter","[tab]":i?"⇥":"tab","[escape]":"esc","[backspace]":i?"⌫":"backspace","[delete]":i?"⌦":"del","[pageup]":i?"⇞":"page up","[pagedown]":i?"⇟":"page down","[home]":i?"⤒":"home","[end]":i?"⤓":"end","[space]":"space","[equal]":"=","[minus]":"-","[comma]":",","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",bracketLeft:"[",bracketRight:"]",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"⇠",up:"⇡",right:"⇢",down:"⇣","[arrowleft]":"⇠","[arrowup]":"⇡","[arrowright]":"⇢","[arrowdown]":"⇣","[digit0]":"0","[digit1]":"1","[digit2]":"2","[digit3]":"3","[digit4]":"4","[digit5]":"5","[digit6]":"6","[digit7]":"7","[digit8]":"8","[digit9]":"9"}[e.toLowerCase()])&&void 0!==t?t:e.toUpperCase();return r}function mi(e,t){const i=[],a=[];return e.forEach(e=>{try{const t=function(e){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);let t=e.key.split("+");const i=t.pop();let a=e.ifPlatform;if(t=t.map(e=>{const t=e.toLowerCase();if("cmd"===t){if(a&&"macos"!==a&&"ios"!==a)throw new Error('Unexpected "cmd" modifier with platform "'+a+'"');return a||(a=li("ios")?"ios":"macos"),"meta"}if("win"===t){if(a&&"windows"!==a)throw new Error('Unexpected "win" modifier with platform "'+a+'"');return a="windows","meta"}return t}),!a||li(a)){if(/^\[(.*)\]$/.test(i))t.push(i);else{const a=function(e){var t,i;const a=null!==(t=ni())&&void 0!==t?t:Qt;for(const[t,i]of Object.entries(a.mapping)){if(i[0]===e)return"["+t+"]";if(i[1]===e)return"shift+["+t+"]";if(i[2]===e)return"alt+["+t+"]";if(i[3]===e)return"shift+alt+["+t+"]"}return null!==(i=Jt[e])&&void 0!==i?i:""}(i);if(!a)throw new Error('Invalid keybinding key "'+e.key+'"');t=t.concat(a.split("+"))}return{...e,ifPlatform:a,key:t.join("+")}}}(e);t&&i.push(t)}catch(e){a.push(e.message)}}),a.length>0&&t(a),i}function pi(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.addEventListener(r[1],i,t)}else e.addEventListener(t,i,a)}}function ui(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.removeEventListener(r[1],i,t)}else e.removeEventListener(t,i,a)}}function hi(e,t){let i=document.getElementById(e);return i?i.setAttribute("data-refcount",Number(parseInt(i.getAttribute("data-refcount"))+1).toString()):(i=document.createElement("div"),i.setAttribute("aria-hidden","true"),i.setAttribute("data-refcount","1"),i.className=t,i.id=e,document.body.appendChild(i)),i}function fi(e){if(!e)return;const t=parseInt(e.getAttribute("data-refcount"));t<=1?e.remove():e.setAttribute("data-refcount",Number(t-1).toString())}function gi(e){return e.element&&e.element.mathfield===e}function yi(e){const t=function e(t){if(t.classList.contains("ML__caret")||t.classList.contains("ML__text-caret")||t.classList.contains("ML__command-caret"))return t;let i;for(const a of t.children)if(i=e(a),i)break;return i}(e);if(t){const e=t.getBoundingClientRect();return{x:e.right,y:e.bottom,height:e.height}}return null}function bi(e){const t=e.querySelectorAll(".ML__selected");if(t&&t.length>0){const i={top:1/0,bottom:-1/0,left:1/0,right:-1/0};t.forEach(e=>{const t=e.getBoundingClientRect();t.lefti.right&&(i.right=t.right),t.bottom>i.bottom&&(i.bottom=t.bottom),t.top{if("mousedown"!==i.type||1===i.buttons){i.stopPropagation(),i.preventDefault(),t.classList.add("pressed"),a=Date.now(),"touchstart"===i.type&&(n=i.changedTouches[0].identifier);const o=t.getAttribute("data-"+e.config.namespace+"command-pressed");o&&e.$perform(JSON.parse(o));const l=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldStart");l&&(r=t,s&&clearTimeout(s),s=window.setTimeout((function(){t.classList.contains("pressed")&&e.$perform(JSON.parse(l))}),300))}}),pi(t,"mouseleave touchcancel",()=>{t.classList.remove("pressed")}),pi(t,"touchmove:passive",e=>{e.preventDefault();for(let t=0;t{1===e.buttons&&t.classList.add("pressed")}),pi(t,"mouseup touchend click",i=>{if(o){i.stopPropagation(),i.preventDefault();const e=o;return o=null,void e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}if(t.classList.remove("pressed"),t.classList.add("active"),"click"===i.type&&0!==i.detail)return i.stopPropagation(),void i.preventDefault();window.setTimeout((function(){t.classList.remove("active")}),150);let n=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldEnd");const s=Date.now();(t!==r||sequal to","\\supseteq":"superset of or
    equal to","\\supset":"superset of","\\subset":"subset of","\\partial":"partial derivative","\\bigcup":"union","\\bigcap":"intersection","\\approx":"approximately equal to","\\notin":"not an element of","\\in":["element of","included in"],"\\infty":"infinity","\\land":"logical and","\\sqrt":"square root","\\prod":"product","\\sum":"summation","\\amalg":["amalgamation","coproduct","free product","disjoint union"],"\\cup":"union with","\\cap":"intersection with","\\int":"integral","\\iint":"surface integral","\\oint":"curve integral","\\iiint":"volume integral","\\iff":"if and only if","\\ln":"natural logarithm","\\boldsymbol":"bold","\\setminus":"set subtraction","\\stackrel":"relation with symbol above","\\stackbin":"operator with symbol above","\\underset":"symbol with annotation below","\\overset":"symbol with annotation above","\\hslash":["h-bar","Planck constant"],"\\gtrsim":"greater than or
    similar to","\\propto":"proportional to","\\equiv":"equivalent to","\\!":["negative thin space","(-3 mu)"],"\\ ":["space","(6 mu)"],"\\,":["thin space","(3 mu)"],"\\:":["medium space","(4 mu)"],"\\;":["thick space","(5 mu)"],"\\quad":["1 em space","(18 mu)"],"\\qquad":["2 em space","(36 mu)"],"\\enskip":["½ em space","(9 mu)"],"\\mp":"minus or plus","\\pm":"plus or minus","\\Im":"Imaginary part of","\\Re":"Real part of","\\gothicCapitalR":"Real part of","\\gothicCapitalI":"Imaginary part part of","\\differentialD":"differential d","\\aleph":["aleph","infinite cardinal",'Wikipedia '],"\\beth":["beth","beth number",'Wikipedia '],"\\gimel":["gimel","gimel function",'Wikipedia '],"\\O":"empty set","\\N":"set of
    natural numbers","\\Z":"set of
    integers","\\Q":"set of
    rational numbers","\\C":"set of
    complex numbers","\\R":"set of
    real numbers","\\P":"set of
    prime numbers","\\lesseqqgtr":"less than, equal to or
    greater than","\\gnapprox":"greater than and
    not approximately","\\lnapprox":"lesser than and
    not approximately","\\j":"dotless j","\\i":"dotless i","\\cdot":"centered dot","\\lmoustache":"left moustache","\\rmoustache":"right moustache","\\nabla":["nabla","del","differential vector operator"],"\\square":["square","d’Alembert operator",'Wikipedia '],"\\blacksquare":["black square","end of proof","tombstone","Halmos symbol"],"\\Box":"end of proof","\\colon":["such that","ratio"],"\\coloneq":["is defined by","is assigned"],"\\Colon":["is defined by","as"],"\\_":["underbar","underscore"],"\\ll":"much less than","\\gg":"much greater than","\\doteq":"approximately equal to","\\Doteq":"approximately equal to","\\doteqdot":"approximately equal to","\\cong":["isomorphism of","(for algebras, modules...)"],"\\det":["determinant of","(of a matrix)"],"\\dotplus":"Cartesian product algebra","\\otimes":["tensor product","(of algebras)","Kronecker product","(of matrices)"],"\\oplus":["direct sum","(of modules)"],"\\lb":"base-2 logarithm","\\lg":"base-10 logarithm","\\wp":["Weierstrass P",'Wikipedia '],"\\wr":["wreath product",'Wikipedia '],"\\top":["tautology","Proposition P is universally true"],"\\bot":["contradiction","Proposition P is contradictory"],"\\mid":["probability","of event A given B"],"\\mho":["Siemens","electrical conductance in SI unit",'Wikipedia '],"\\Longrightarrow":"implies","\\Longleftrightarrow":"if, and only if,","\\prec":"precedes","\\preceq":"precedes or is equal to","\\succ":"succeedes","\\succeq":"succeedes or is equal to","\\perp":["is perpendicular to","is independent of"],"\\models":["entails","double-turnstyle, models","is a semantic consequence of",'Wikipedia '],"\\vdash":["satisfies","turnstyle, assertion sign","syntactic inference",'Wikipedia '],"\\implies":["implies","logical consequence"],"\\impliedby":["implied by","logical consequence"],"\\surd":["surd","root of","checkmark"],"\\ltimes":["semi direct product",'Wikipedia '],"\\rtimes":["semi direct product",'Wikipedia '],"\\leftthreetimes":["semi direct product",'Wikipedia '],"\\rightthreetimes":["semi direct product",'Wikipedia '],"\\divideontimes":["divide on times"],"\\curlywedge":"nor","\\curlyvee":"nand","\\simeq":"is group isomorphic with","\\vartriangleleft":["is a normal subgroup of","is an ideal ring of"],"\\circ":["circle","ring","function composition"],"\\rlap":["overlap right","\\rlap{x}o"],"\\llap":["overlap left","o\\llap{/}"],"\\colorbox":["color box","\\colorbox{#fbc0bd}{...}"],"\\ast":["asterisk","reflexive closure (as a superscript)"],"\\bullet":"bullet","\\lim":"limit"};function ki(e,i,a){if(!i||0===i.length)return void Mi(e);const r=i,n=function(e,t){const i=et(e,"math",null,t.config.macros);return D($(Oe({mathstyle:d.displaystyle,macros:t.config.macros},i),"ML__base"),"ML__mathlive").toMarkup()}(i,e),o=function(e){let i=xi[e]||"";return t(i)&&(i=i.join("
    ")),i}(r),s=function(e,i){let a=[];if("string"==typeof i){const e=si[i];t(e)?a=e.slice():e&&a.push(e)}const r=ci(i),n=new RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");return e.forEach(e=>{n.test(ci(e.command))&&a.push(e)}),a.map(di)}(e.keybindings,r).join("
    ");let l=a?'
    ':"";l+='',l+='
    '+n+"
    ",o&&(l+='
    '+o+"
    "),s&&(l+='
    '+s+"
    "),l+="
    ",l+=a?'
    ':"",function(e,t){e.popover.innerHTML=e.config.createHTML(t);const i=yi(e.field);i&&wi(e,i),e.popover.classList.add("is-visible")}(e,l);let c=e.popover.getElementsByClassName("ML__popover__content");c&&c.length>0&&vi(e,c[0],{default:["complete",{acceptSuggestion:!0}]}),c=e.popover.getElementsByClassName("ML__popover__prev-shortcut"),c&&c.length>0&&vi(e,c[0],"previousSuggestion"),c=e.popover.getElementsByClassName("ML__popover__next-shortcut"),c&&c.length>0&&vi(e,c[0],"nextSuggestion")}function _i(e,t){if(e.element&&e.element.mathfield===e&&e.popover.classList.contains("is-visible"))if(null==t?void 0:t.deferred)window.requestAnimationFrame(()=>_i(e));else if(Vt(e.model)&&"command"===Vt(e.model).type){const t=yi(e.field);t&&wi(e,t)}else Mi(e)}function wi(e,t){const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,r=window.innerWidth-document.documentElement.clientWidth,n=window.innerHeight-document.documentElement.clientHeight,o=e.virtualKeyboardVisible?e.virtualKeyboard.offsetHeight:0;t.x+e.popover.offsetWidth/2>a-r?e.popover.style.left=a-e.popover.offsetWidth-r+"px":t.x-e.popover.offsetWidth/2<0?e.popover.style.left="0":e.popover.style.left=t.x-e.popover.offsetWidth/2+"px",t.y+e.popover.offsetHeight+5>i-n-o?(e.popover.classList.add("ML__popover--reverse-direction"),e.popover.style.top=t.y-t.height-e.popover.offsetHeight-5+"px"):(e.popover.classList.remove("ML__popover--reverse-direction"),e.popover.style.top=t.y+5+"px")}function Mi(e){e.popover.classList.remove("is-visible")}function Si(e,t=!1){var i;let a="";const r=Mt(e);if(r){const n=t?e.anchorOffset()+1:r.end,o=e.siblings();for(let e=r.start;e"placeholder"===e.type));Rt(e,0),e.path[e.path.length-1].offset=i.start-1,0!==a.length&&Lt(e,1,!1)||At(e,i.start+t.length-1)}else e.siblings().splice(i.start,i.end-i.start),At(e,i.start-1,0);_t(e)}}const Ai={"\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrace":"{","\\rbrace":"}","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};function qi(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function $i(e,t){return e&&t.generateID?' extid="'+e+'"':""}function Ci(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="",o=-1,s=-1;const l=e.atoms[e.index];if(e.index0){if(a=!0,Di(e)&&(o=e.index,e.index+=1),Ti(e)&&(s=e.index,e.index+=1),o>=0&&s>=0)r=""+n,r+=Fi(e.atoms[s].subscript,0,0,i).mathML,r+=Fi(e.atoms[o].superscript,0,0,i).mathML,r+="";else if(o>=0){if(r=""+n,Di(e)){const t=Fi(e.atoms[o].superscript,0,0,i).mathML,a=Fi(e.atoms[o+1].superscript,0,0,i).mathML;r+=""!==t&&""!==t||""!==a&&""!==a?""===t||""===t?"":t:""}else r+=Fi(e.atoms[o].superscript,0,0,i).mathML;r+=""}else s>=0?(r=""+n,r+=Fi(e.atoms[s].subscript,0,0,i).mathML,r+=""):r=n;"mi"!==e.lastType&&"mn"!==e.lastType&&"mtext"!==e.lastType&&"fence"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),n.endsWith(">f")||n.endsWith(">g")?(r+="&x2061;",e.lastType="applyfunction"):e.lastType=/^(.*)<\/mo>$/.test(r)?"mo":"mi",e.mathML+=r}return a}function Di(e){return e.index"+e,r+=Fi(n.subscript,0,0,i).mathML,r+=Fi(n.superscript,0,0,i).mathML,r+=""):n.superscript?(r=""+e,r+=Fi(n.superscript,0,0,i).mathML,r+=""):n.subscript&&(r=""+e,r+=Fi(n.subscript,0,0,i).mathML,r+=""),r.length>0&&(a=!0,t.mathML+=r,t.lastType=""),a))}function Ki(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="";for(;e.index0&&(a=!0,n=""+n+"",e.mathML+=n,e.lastType="mtext"),a}function Ni(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="",o=function(e){let t=-1,i=e.index,a=!1,r=!1;for(;i=0&&o=0;)n+=e.atoms[e.index].body,e.index+=1;return n.length>0&&(a=!0,n=""+n+"",o<0&&Di(e)&&(o=e.index,e.index+=1),o>=0&&(n=""+n,n+=Fi(e.atoms[o].superscript,0,0,i).mathML,n+=""),e.mathML+=n,e.lastType="mn"),a}function Oi(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";if(e.index",r+=Pi(e.atoms[l],i),r+=Fi(e.atoms,l+1,c,i).mathML,r+=Pi(e.atoms[c],i),r+="","mi"!==e.lastType&&"mn"!==e.lastType&&"mfrac"!==e.lastType&&"fence"!==e.lastType||(r=""+r),e.index=c+1,Ei(r,e,i)&&(a=!0,e.lastType="",r=""),n="fence")}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Bi(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";const o=e.atoms[e.index];if(e.index":"")+e,r+=Fi(o.subscript,0,0,i).mathML,r+=Fi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):o.superscript?(r+=("nolimits"!==o.limits?"":"")+e,r+=Fi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):(r+=("nolimits"!==o.limits?"":"")+e,r+=Fi(o.subscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""),n="mo"}else{const t=e.atoms[e.index],o="\\operatorname"===t.symbol,s=o?'"+Ri(t.body)+"":Pi(t,i);r+=s,e.index+=1,Ei(r,e,i)&&(a=!0,e.lastType="",r=""),e.index-=1,o||/^(.*)<\/mo>$/.test(s)?n=o?"mi":"mo":(r+="",n="applyfunction")}"mi"!==e.lastType&&"mn"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),e.index+=1}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Fi(e,t,i,a){const r={atoms:e,index:null!=t?t:0,mathML:"",lastType:""};if("number"==typeof e||"boolean"==typeof e)r.mathML=e.toString();else if("string"==typeof e)r.mathML=e;else if(e instanceof Be)r.mathML=Ii(e,a);else if(Array.isArray(e)){let t=0;for(i=i||(e?e.length:0);r.index0&&"genfrac"===r.atoms[r.index].type&&(e=""+e),"genfrac"===r.atoms[r.index].type?r.lastType="mfrac":r.lastType="",e.length>0&&(r.mathML+=e,t+=1),r.index+=1}t>1&&(r.mathML=""+r.mathML+"")}return r}function Pi(e,t){let i="";const a=Ri(e.body);return a&&(i=""+a+""),i}function Ri(e){if(!e)return"";if("string"==typeof e)return qi(e);if(!Array.isArray(e)&&"string"==typeof e.body)return qi(e.body);let t="";for(const i of e)"string"==typeof i.body&&(t+=i.body);return qi(t)}function Ii(e,t){var i,a,r,n,o,s,l,c,d,m,p,u;const h={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋"},f={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."},g={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let y,b,v,x,k,_,w="",M="",S={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"}[e.fontFamily||e.font]||"";S&&(S=' mathvariant="'+S+'"');const z=e.symbol;if("text"===e.mode)w=""+e.body+"";else switch(e.type){case"first":break;case"group":case"root":w=Fi(e.body,0,0,t).mathML;break;case"array":if((e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(w+="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Ai[e.leftDelim]||e.leftDelim)+"")),w+="",y=0;y"+Fi(e.array[b][y],0,0,t).mathML+"";w+=""}w+="",(e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Ai[e.leftDelim]||e.rightDelim)+""),w+="");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(w+=""),e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Ai[e.leftDelim]||e.leftDelim)+""),e.hasBarLine?(w+="",w+=Fi(e.numer,0,0,t).mathML||" ",w+=Fi(e.denom,0,0,t).mathML||" ",w+=""):(w+="",w+=""+Fi(e.numer,0,0,t).mathML+"",w+=""+Fi(e.denom,0,0,t).mathML+"",w+=""),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Ai[e.rightDelim]||e.rightDelim)+""),(e.leftDelim||e.rightDelim)&&(w+="");break;case"surd":e.index?(w+="",w+=Fi(e.body,0,0,t).mathML,w+=Fi(e.index,0,0,t).mathML,w+=""):(w+="",w+=Fi(e.body,0,0,t).mathML,w+="");break;case"leftright":w="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Ai[e.leftDelim]||e.leftDelim)+""),e.body&&(w+=Fi(e.body,0,0,t).mathML),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Ai[e.rightDelim]||e.rightDelim)+""),w+="";break;case"sizeddelim":case"delim":w+='"+(Ai[e.delim]||e.delim)+"";break;case"accent":w+='",w+=Fi(e.body,0,0,t).mathML,w+=""+(Ai[z]||e.accent)+"",w+="";break;case"line":case"overlap":break;case"overunder":k=e.overscript,x=e.underscript,(e.svgAbove||k)&&(e.svgBelow||x)?_=e.body:k&&k.length>0?(_=e.body,(null===(a=null===(i=e.body)||void 0===i?void 0:i[0])||void 0===a?void 0:a.underscript)?(x=e.body[0].underscript,_=e.body[0].body):"first"===(null===(n=null===(r=e.body)||void 0===r?void 0:r[0])||void 0===n?void 0:n.type)&&(null===(s=null===(o=e.body)||void 0===o?void 0:o[1])||void 0===s?void 0:s.underscript)&&(x=e.body[1].underscript,_=e.body[1].body)):x&&x.length>0&&(_=e.body,(null===(c=null===(l=e.body)||void 0===l?void 0:l[0])||void 0===c?void 0:c.overscript)?(k=e.body[0].overscript,_=e.body[0].body):"first"===(null===(m=null===(d=e.body)||void 0===d?void 0:d[0])||void 0===m?void 0:m.type)&&(null===(u=null===(p=e.body)||void 0===p?void 0:p[1])||void 0===u?void 0:u.overscript)&&(k=e.body[1].overscript,_=e.body[1].body)),(e.svgAbove||k)&&(e.svgBelow||x)?(w+=``,w+=h[e.svgBody]||Fi(_,0,0,t).mathML,w+=h[e.svgBelow]||Fi(x,0,0,t).mathML,w+=h[e.svgAbove]||Fi(k,0,0,t).mathML,w+=""):e.svgAbove||k?(w+=``+(h[e.svgBody]||Fi(_,0,0,t).mathML),w+=h[e.svgAbove]||Fi(k,0,0,t).mathML,w+=""):(e.svgBelow||x)&&(w+=``+(h[e.svgBody]||Fi(_,0,0,t).mathML),w+=h[e.svgBelow]||Fi(x,0,0,t).mathML,w+="");break;case"placeholder":case"mord":{w=f[z]||z||("string"==typeof e.body?e.body:"");const i=z?z.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null;i?w="&#x"+i[1]+";":w.length>0&&"\\"===w.charAt(0)&&(w="string"==typeof e.body&&e.body.charCodeAt(0)>255?"&#x"+("000000"+e.body.charCodeAt(0).toString(16)).substr(-4)+";":"string"==typeof e.body?e.body.charAt(0):e.body);const a=/\d/.test(w)?"mn":"mi";w="<"+a+S+$i(e.id,t)+">"+qi(w)+"";break}case"mbin":case"mrel":case"textord":case"minner":w=z&&f[z]?""+f[z]+"":z&&Ai[z]?""+Ai[z]+"":Pi(e,t);break;case"mpunct":w='"+(Ai[z]||z)+"";break;case"mop":"​"!==e.body&&(w="",w+="\\operatorname"===z?e.body:z||e.body,w+="");break;case"mathstyle":break;case"box":w='"+Fi(e.body,0,0,t).mathML+"";break;case"spacing":w+='';break;case"enclose":w=''+Fi(e.body,0,0,t).mathML+"";break;case"space":w+=" "}return w}function Hi(e,t){return Fi(e,0,0,t).mathML}function Wi(e){let t=0;for(let i=0;i{gi(e)&&e.dirty&&Ui(e)}))}function Ui(e,t){t=null!=t?t:{},e.dirty=!1,window.mathlive||(window.mathlive={}),Vt(e.model)||(e.model.path=[{relation:"body",offset:0}]),e.model.root.forEach(e=>{e.caret="",e.isSelected=!1,e.containsCaret=!1});const i=e.$hasFocus();if(Pt(e.model)?Vt(e.model).caret=i&&!e.config.readOnly?e.mode:"":Gt(e.model,e=>{e.isSelected=!0}),i&&!e.config.readOnly){let t=e.model.ancestor(1),i=1,a=!1;for(;t&&!a;)"surd"!==t.type&&"leftright"!==t.type||(t.containsCaret=!0,a=!0),i+=1,t=e.model.ancestor(i)}const a=$(Oe({mathstyle:d.displaystyle,letterShapeStyle:e.config.letterShapeStyle,atomIdsSettings:{seed:Wi(e.model.root.toLatex(!1)),groupNumbers:t.forHighlighting},smartFence:e.config.smartFence,macros:e.config.macros},e.model.root),"ML__base");a.attributes={translate:"no","aria-hidden":"true"};const r=D(a,"ML__mathlive");e.field.innerHTML=e.config.createHTML(r.toMarkup(0,e.config.horizontalSpacingScale)),e.field.classList.toggle("ML__focused",i&&!e.config.readOnly),e.accessibleNode.innerHTML=e.config.createHTML(''+Hi(e.model.root,e.config)+"");const n=bi(e.field);if(null!==n){const t=document.createElement("div");t.classList.add("ML__selection"),t.style.position="absolute",t.style.left=Number(n.left).toString()+"px",t.style.top=Number(n.top).toString()+"px",t.style.width=Number(Math.ceil(n.right-n.left)).toString()+"px",t.style.height=Number(Math.ceil(n.bottom-n.top-1)).toString()+"px",e.field.insertBefore(t,e.field.childNodes[0])}}const ji={};function Gi(e,t){t=null!=t?t:{target:"mathfield",canUndo:!1},Object.keys(e).forEach(i=>{ji[i]={...t,fn:e[i]}})}function Xi(e,t=",",i){if(!e)return[];let a,r=[];for(let n of e)n&&n.length>0&&"first"===n[0].type&&(n=n.slice(1)),n&&n.length>0&&(a?r.push(a):a=new Be("math","mpunct",t,i),r=r.concat(n));return r}function Zi(e,i){const a=e.parent();if(a&&"array"===a.type&&t(a.array)){const t=e.relation();if(a.array){const r=ht(a.array,t);"after row"===i||"before row"===i?(r.col=0,r.row=r.row+("after row"===i?1:0),a.array.splice(r.row,0,[[]])):(r.col+="after column"===i?1:0,a.array[r.row].splice(r.col,0,[]));const n=ut(a.array,r);e.path.pop(),e.path.push({relation:"cell"+n.toString(),offset:0}),e.insertFirstAtom()}}}function Yi(e){var t;const i=e.parent();if("leftright"===i.type){i.type="array";const a=null!==(t={"(":"pmatrix","\\lbrack":"bmatrix","\\lbrace":"cases"}[i.leftDelim])&&void 0!==t?t:"matrix",r=ae(a),n=[[i.body]];Object.assign(i,r.parser(a,[],n)),i.mode=St(e),i.environmentName=a,i.array=n,i.rowGaps=[0],delete i.body,e.path[e.path.length-1].relation="cell0"}}function Qi(e){return kt(e),Yi(e),Zi(e,"after row"),_t(e),!0}function Ji(e){return kt(e),Yi(e),Zi(e,"after column"),_t(e),!0}function ea(e,t=0){kt(e),vt(e);const i=e.suppressChangeNotifications;if(e.suppressChangeNotifications=!0,t=t<0?-1:t>0?1:t,st(e),e.parent().array&&t<0&&0===e.startOffset()){const t=e.parent().array;if(function(e){const t={col:0,row:0};for(;t.row0){let e=t.length;"first"===t[0].type&&(e-=1),e>0&&(i+=1)}a.row+=1}return i}(t,i.col)&&(function(e,t){let i=0;for(;i"placeholder"!==e.type&&"first"!==e.type);e.parent()[t]=null,e.path.pop(),e.siblings().splice(e.anchorOffset(),0,...i),At(e,e.anchorOffset()-1),e.announce("deleted: "+t)}else if("denom"===t){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),At(e,e.anchorOffset()+t.length-1),e.announce("deleted: denominator")}else if("body"===t){const t=e.siblings().filter(e=>"placeholder"!==e.type);e.path.length>1&&(t.shift(),e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...t),At(e,e.anchorOffset()-1),e.announce("deleted: root"))}else Ct(e,-1),ta(e,-1)}else if(t>0)if(i!==a.length-1)/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(e.sibling(1).type)?Ct(e,1):(e.announce("deleted",null,a.slice(i+1,i+2)),a.splice(i+1,1));else if("numer"===e.relation()){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),At(e,e.anchorOffset()+t.length-1),e.announce("deleted: numerator")}else Ct(e,1),ta(e,-1)}else{const t=e.startOffset()+1,i=e.endOffset()+1;e.announce("deleted",null,a.slice(t,i)),a.splice(t,i-t),At(e,t-1)}lt(e),e.suppressChangeNotifications=i,xt(e),_t(e)}function ta(e,t=0){if(0===t)ea(e,0);else if(t>0)for(;t>0;)ea(e,1),t--;else for(;t<0;)ea(e,-1),t++;return!0}Gi({performWithFeedback:(e,t)=>function(e,t){return e.$focus(),e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),"moveToNextPlaceholder"===(t=t.replace(/-\w/g,e=>e[1].toUpperCase()))||"moveToPreviousPlaceholder"===t||"complete"===t?e.returnKeypressSound?(e.returnKeypressSound.load(),e.returnKeypressSound.play().catch(e=>{})):e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):"deletePreviousChar"!==t&&"deleteNextChar"!==t&&"deletePreviousWord"!==t&&"deleteNextWord"!==t&&"deleteToGroupStart"!==t&&"deleteToGroupEnd"!==t&&"deleteToMathFieldStart"!==t&&"deleteToMathFieldEnd"!==t||!e.deleteKeypressSound?e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):(e.deleteKeypressSound.load(),e.deleteKeypressSound.play().catch(e=>{})),e.$perform(t)}(e,t)}),Gi({addRowAfter:Qi,addColumnAfter:Ji,addRowBefore:function(e){return kt(e),Yi(e),Zi(e,"before row"),_t(e),!0},addColumnBefore:function(e){return kt(e),Yi(e),Zi(e,"before column"),_t(e),!0}},{target:"model",category:"array-edit"});const ia={"''":{mode:"math",value:"^{\\doubleprime}"},alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:{mode:"math",value:"\\pi"},"pi ":{mode:"text",value:"\\pi "},Pi:{mode:"math",value:"\\Pi"},theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:{mode:"math",value:"\\nabla"},grad:{mode:"math",value:"\\nabla"},del:{mode:"math",value:"\\partial"},"∞":"\\infty",oo:{mode:"math",after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":{mode:"math",value:"\\sum"},sum:{mode:"math",value:"\\sum_{#?}^{#?}"},prod:{mode:"math",value:"\\prod_{#?}^{#?}"},sqrt:{mode:"math",value:"\\sqrt"},"∆":{mode:"math",value:"\\differentialD"},"∂":{mode:"math",value:"\\differentialD"},arcsin:{mode:"math",value:"\\arcsin"},arccos:{mode:"math",value:"\\arccos"},arctan:{mode:"math",value:"\\arctan"},sin:{mode:"math",value:"\\sin"},sinh:{mode:"math",value:"\\sinh"},cos:{mode:"math",value:"\\cos"},cosh:{mode:"math",value:"\\cosh"},tan:{mode:"math",value:"\\tan"},tanh:{mode:"math",value:"\\tanh"},sec:{mode:"math",value:"\\sec"},csc:{mode:"math",value:"\\csc"},cot:{mode:"math",value:"\\cot"},log:{mode:"math",value:"\\log"},ln:{mode:"math",value:"\\ln"},exp:{mode:"math",value:"\\exp"},lim:{mode:"math",value:"\\lim_{#?}"},dx:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:{mode:"math",value:"\\forall"},EE:{mode:"math",value:"\\exists"},"!EE":{mode:"math",value:"\\nexists"},"&&":{mode:"math",value:"\\land"},xin:{mode:"math",after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{mode:"math",after:"nothing+letter+closefence",value:"\\in"},"!in":{mode:"math",value:"\\notin"},NN:"\\N",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",PP:"\\P",xx:{mode:"math",value:"\\times"},"+-":{mode:"math",value:"\\pm"},"!=":{mode:"math",value:"\\ne"},">=":{mode:"math",value:"\\ge"},"<=":{mode:"math",value:"\\le"},"<<":{mode:"math",value:"\\ll"},">>":{mode:"math",value:"\\gg"},"~~":{mode:"math",value:"\\approx"},"≈":{mode:"math",value:"\\approx"},"?=":{mode:"math",value:"\\questeq"},"÷":{mode:"math",value:"\\div"},"¬":{mode:"math",value:"\\neg"},":=":{mode:"math",value:"\\coloneq"},"::":{mode:"math",value:"\\Colon"},"(:":{mode:"math",value:"\\langle"},":)":{mode:"math",value:"\\rangle"},beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},"eta ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta "},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},"mu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu "},nu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},"nu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu "},"µ":"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega","Ω":"\\omega",forall:{mode:"math",value:"\\forall"},exists:{mode:"math",value:"\\exists"},"!exists":{mode:"math",value:"\\nexists"},":.":{mode:"math",value:"\\therefore"},liminf:"\\operatorname*{lim~inf}_{#?}",limsup:"\\operatorname*{lim~sup}_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:{mode:"math",value:"\\mod"},max:{mode:"math",value:"\\max"},min:{mode:"math",value:"\\min"},erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:{mode:"math",value:"\\operatorname{bessel}"},mean:{mode:"math",value:"\\operatorname{mean}"},median:{mode:"math",value:"\\operatorname{median}"},fft:{mode:"math",value:"\\operatorname{fft}"},lcm:{mode:"math",value:"\\operatorname{lcm}"},gcd:{mode:"math",value:"\\operatorname{gcd}"},randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:{mode:"math",value:"\\operatorname{Re}"},Im:{mode:"math",value:"\\operatorname{Im}"},mm:{mode:"math",after:"nothing+digit",value:"\\operatorname{mm}"},cm:{mode:"math",after:"nothing+digit",value:"\\operatorname{cm}"},km:{mode:"math",after:"nothing+digit",value:"\\operatorname{km}"},kg:{mode:"math",after:"nothing+digit",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","->":"\\to","|->":"\\mapsto","--\x3e":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","{":"\\{","}":"\\}","*":"\\cdot"};function aa(e,t,i){var a;return function(e,t){if(!t)return"";if("string"==typeof t)return t;if(!e)return t.value;let i=!1,a=!1,r=!1,n=!1,o=!1,s=!1,l=!1,c=!1,d=!1,m=!1,p=!1,u=!1,h=!1,f=!1,g=e[e.length-1],y=e.length-1;for(;g&&/msubsup|placeholder/.test(g.type);)y-=1,g=e[y];if(i=!g||"first"===g.type,g){if(void 0!==t.mode&&g.mode!==t.mode)return"";h="text"===g.mode,a=!h&&"mord"===g.type&&V.test(g.body),r=!h&&"mord"===g.type&&/[0-9]+$/.test(g.body),n=!h&&g.isFunction,o="genfrac"===g.type,s="surd"===g.type,l="mbin"===g.type,c="mrel"===g.type,d="mpunct"===g.type||"minner"===g.type,m=Boolean(g.array),p="mopen"===g.type,u="mclose"===g.type||"leftright"===g.type,f="space"===g.type}return void 0!==t.after?/nothing/.test(t.after)&&i||/letter/.test(t.after)&&a||/digit/.test(t.after)&&r||/function/.test(t.after)&&n||/frac/.test(t.after)&&o||/surd/.test(t.after)&&s||/binop/.test(t.after)&&l||/relop/.test(t.after)&&c||/punct/.test(t.after)&&d||/array/.test(t.after)&&m||/openfence/.test(t.after)&&p||/closefence/.test(t.after)&&u||/text/.test(t.after)&&h||/space/.test(t.after)&&f?t.value:"":t.value}(e,null!==(a=null==i?void 0:i[t])&&void 0!==a?a:ia[t])}function ra(e,t){if(!e)return["latex",""];if(e.length<=1)return["latex",e];if(!t||"ASCIIMath"!==t.format){const t=e.trim();if(t.startsWith("$$")&&t.endsWith("$$")||t.startsWith("\\[")&&t.endsWith("\\]")||t.startsWith("\\(")&&t.endsWith("\\)"))return["latex",t.substring(2,t.length-2)];if(t.startsWith("$")&&t.endsWith("$"))return["latex",t.substring(1,t.length-1)];if(e=e.replace(/\\\\([^\s\n])/g,"\\$1"),/\\/.test(e))return["latex",e]}return e=(e=(e=(e=(e=(e=e.replace(/\u2061/gu,"")).replace(/\u3016/gu,"{")).replace(/\u3017/gu,"}")).replace(/([^\\])sinx/g,"$1\\sin x")).replace(/([^\\])cosx/g,"$1\\cos x ")).replace(/\u2013/g,"-"),[(null==t?void 0:t.format)||"ASCIIMath",na(e,null!=t?t:{})]}function na(e,t){var i,a,r,n,o,s,l;if(!e)return"";let c,d=!1;if(d||"^"!==e[0]&&"_"!==e[0]||(c=oa(e.substr(1),{inlineShortcuts:null!==(i=null==t?void 0:t.inlineShortcuts)&&void 0!==i?i:{},noWrap:!0}),e=e[0]+"{"+c.match+"}",e+=na(c.rest,t),d=!0),d||(c=e.match(/^(sqrt|\u221a)(.*)/),c&&(c=oa(c[2],{inlineShortcuts:null!==(a=null==t?void 0:t.inlineShortcuts)&&void 0!==a?a:{},noWrap:!0}),e="\\sqrt{"+c.match+"}",e+=na(c.rest,t),d=!0)),d||(c=e.match(/^(\\cbrt|\u221b)(.*)/),c&&(c=oa(c[2],{inlineShortcuts:null!==(r=null==t?void 0:t.inlineShortcuts)&&void 0!==r?r:{},noWrap:!0}),e="\\sqrt[3]{"+c.match+"}",e+=na(c.rest,t),d=!0)),d||(c=e.match(/^abs(.*)/),c&&(c=oa(c[1],{inlineShortcuts:null!==(n=null==t?void 0:t.inlineShortcuts)&&void 0!==n?n:{},noWrap:!0}),e="\\left|"+c.match+"\\right|",e+=na(c.rest,t),d=!0)),d||(c=e.match(/^["”“](.*?)["”“](.*)/),c&&(e="\\text{"+c[1]+"}",e+=na(c[2],t),d=!0)),d||(c=e.match(/^([^a-zA-Z({[_^\\\s"]+)(.*)/),c&&(e=sa(c[1],t),e+=na(c[2],t),d=!0)),!d&&/^(f|g|h)[^a-zA-Z]/.test(e)&&(c=oa(e.substring(1),{inlineShortcuts:null!==(o=t.inlineShortcuts)&&void 0!==o?o:{},noWrap:!0}),e="("===e[1]?e[0]+"\\mleft("+c.match+"\\mright)":e[0]+c.match,e+=na(c.rest,t),d=!0),d||(c=e.match(/^([a-zA-Z]+)(.*)/),c&&(e=sa(c[1],t),e+=na(c[2],t),d=!0)),!d)if(c=oa(e,{inlineShortcuts:null!==(s=t.inlineShortcuts)&&void 0!==s?s:{},noWrap:!0}),c.match&&"/"===c.rest[0]){const i=oa(c.rest.substr(1),{inlineShortcuts:null!==(l=t.inlineShortcuts)&&void 0!==l?l:{},noWrap:!0});i.match&&(e="\\frac{"+c.match+"}{"+i.match+"}"+na(i.rest,t)),d=!0}else c.match&&(e="("===e[0]?"\\left("+c.match+"\\right)"+na(c.rest,t):c.match+na(c.rest,t),d=!0);return d||(c=e.match(/^(\s+)(.*)$/),c&&(e=" "+na(c[2],t),d=!0)),e}function oa(e,t){let i="",a=e=e.trim(),r=e.charAt(0),n={"(":")","{":"}","[":"]"}[r];if(n){let o=1,s=1;for(;s0;)e[s]===r&&o++,e[s]===n&&o--,s++;0===o?(t.noWrap&&"("===r?i=na(e.substring(1,s-1),t):("{"===r&&"}"===n&&(r="\\{",n="\\}"),i="\\left"+r+na(e.substring(1,s-1),t)+"\\right"+n),a=e.substring(s)):(i=e.substring(1,s),a="")}else{let r=e.match(/^([a-zA-Z]+)/);if(r){let i=aa(null,e,t.inlineShortcuts);if(i)return i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),{match:i,rest:e.substring(i.length)}}if(r=e.match(/^([a-zA-Z])/),r)return{match:r[1],rest:e.substring(1)};if(r=e.match(/^(-)?\d+(\.\d*)?/),r)return{match:r[0],rest:e.substring(r[0].length)};/^\\(left|right)/.test(e)||(r=e.match(/^(\\[a-zA-Z]+)/),r&&(a=e.substring(r[1].length),i=r[1]))}return{match:i,rest:a}}function sa(e,t){let i=aa(null,e,t);return i?(i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),i+=" "):i=e,i}function la(e,t,i){const a=e.parent();let r="leftright"===a.type?a.leftDelim+a.rightDelim:"";if("\\lbrace\\rbrace"===r&&(r="{}"),"\\{\\}"===r&&(r="{}"),"{}"===r&&/\||\\vert|\\Vert|\\mvert|\\mid/.test(t))return da(e,"\\,\\middle"+t+"\\, ",{mode:"math",format:"latex",style:i}),!0;"{"!==t&&"\\{"!==t||(t="\\lbrace"),"}"!==t&&"\\}"!==t||(t="\\rbrace"),"["===t&&(t="\\lbrack"),"]"===t&&(t="\\rbrack");const n=I[t];if(n&&("leftright"!==a.type||"|"!==a.leftDelim)){let a="";const r=Pt(e)||"placeholder"===Vt(e).type;a=e.sibling(0).isFunction?"\\mleft"+t+"\\mright":"\\left"+t+"\\right",a+=r?"?":n;let o=[];return r&&(o=e.siblings().splice(e.anchorOffset()+1,e.siblings().length)),da(e,a,{mode:"math",format:"latex",style:i}),r&&(e.sibling(0).body=o,Ct(e,-1)),!0}let o;if(Object.keys(I).forEach(e=>{t===I[e]&&(o=e)}),o){if(a&&"leftright"===a.type&&e.endOffset()===e.siblings().length-1)return kt(e),a.rightDelim=t,Ct(e,1),_t(e),!0;const r=e.siblings();let n;for(n=e.endOffset();n>=0&&("leftright"!==r[n].type||"?"!==r[n].rightDelim);n--);if(n>=0)return kt(e),r[n].rightDelim=t,r[n].body=r[n].body.concat(r.slice(n+1,e.endOffset()+1)),r.splice(n+1,e.endOffset()-n),At(e,n),_t(e),!0;if(a&&"leftright"===a.type&&"?"===a.rightDelim){kt(e),a.rightDelim=t;const i=r.slice(e.endOffset()+1);return r.splice(e.endOffset()+1),e.path.pop(),e.siblings().splice(e.endOffset()+1,0,...i),_t(e),!0}const o=e.ancestor(2);return!(!o||"leftright"!==o.type||"?"!==o.rightDelim||e.endOffset()!==r.length-1)&&(Ct(e,1),la(e,t,i))}return!1}function ca(e,t){if(Pt(e))return!1;function i(t,i){let a=!0;return Gt(e,e=>{a=a&&e[t]===i},{recursive:!0}),a}return t.color&&i("color",t.color)&&(t.color="none"),t.backgroundColor&&i("backgroundColor",t.backgroundColor)&&(t.backgroundColor="none"),t.fontFamily&&i("fontFamily",t.fontFamily)&&(t.fontFamily="none"),t.series&&(t.fontSeries=t.series),t.fontSeries&&i("fontSeries",t.fontSeries)&&(t.fontSeries="auto"),t.shape&&(t.fontShape=t.shape),t.fontShape&&i("fontShape",t.fontShape)&&(t.fontShape="auto"),t.size&&(t.fontSize=t.size),t.fontSize&&i("fontSize",t.fontSize)&&(t.fontSize="size5"),kt(e),Gt(e,e=>e.applyStyle(t),{recursive:!0}),_t(e),!0}function da(e,t,i){var a,r,n,o;if(null!==(a=i.smartFence)&&void 0!==a&&a){if(la(e,t,i.style))return}else{const i=e.parent();if("leftright"===(null==i?void 0:i.type)&&"?"===i.rightDelim&&e.endOffset()===e.siblings().length-1&&/^[)}\]|]$/.test(t))return kt(e),i.rightDelim=t,Ct(e,1),void _t(e)}const s=e.suppressChangeNotifications;i.suppressChangeNotifications&&(e.suppressChangeNotifications=!0),kt(e);const l=e.suppressChangeNotifications;e.suppressChangeNotifications=!0,i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto"),i.macros=null!==(r=i.macros)&&void 0!==r?r:e.options.macros;const c=i.mode||St(e);let d;const m=[Fe("math",Ot(e)).toLatex(!1)],p=null!==(n=i.placeholder)&&void 0!==n?n:"\\placeholder{}";m["?"]=p,"replaceSelection"!==i.insertionMode||Pt(e)?"replaceAll"===i.insertionMode?(e.root.body=[],e.root.latex="",e.path=[{relation:"body",offset:0}],e.extent=0):"insertBefore"===i.insertionMode?Ht(e):"insertAfter"===i.insertionMode&&It(e):ta(e);const u=e.siblings(),h=e.startOffset();if(h+10&&u[h]&&"placeholder"===u[h].type&&ta(e,-1),"math"===c&&"ASCIIMath"===i.format)[,t]=ra(t,{format:"ASCIIMath"}),d=et(t,"math",null,null==i?void 0:i.macros,!1,e.listeners.onError),pa(e,d);else if("text"===c||"auto"!==i.format&&"latex"!==i.format)"text"!==c&&"text"!==i.format||(d=et(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"\\textbackslash ")).replace(/#/g,"\\#")).replace(/\$/g,"\\$")).replace(/%/g,"\\%")).replace(/&/g,"\\&")).replace(/_/g,"\\_")).replace(/{/g,"\\textbraceleft ")).replace(/}/g,"\\textbraceright ")).replace(/\^/g,"\\textasciicircum ")).replace(/~/g,"\\textasciitilde ")).replace(/£/g,"\\textsterling "),"text",m,i.macros,!1,e.listeners.onError));else if("command"===c){d=[];for(const e of t)W.test(e)&&d.push(new Be("command","command",e))}else if(""===t)d=[new Be("command","command","\\")];else{if("auto"===i.format&&([i.format,t]=ra(t)),m[0])t=t.replace(/(^|[^\\])#@/g,"$1#0");else if(/(^|[^\\])#@/.test(t)){const i=function(e){const t=e.siblings();let i=e.startOffset();if("text"===t[i].mode)for(;i>=1&&"text"===t[i].mode;)i--;else for(;i>=1&&/^(mord|surd|msubsup|leftright|mop)$/.test(t[i].type);)i--;return i}(e);t=t.replace(/(^|[^\\])#@/g,"$1"+function(e,t,i){const a=e.siblings();if(ot(a))return"";if("first"===a[0].type&&0===t&&(t=1),"root"===e.parent().type&&1===t&&i===a.length-1)return e.parent().toLatex(!1);let r="",n=t;for(;n<=i;)r+=a[n].toLatex(!1),n++;return r}(e,i+1,e.startOffset())),function(e,t){t>0?e.siblings().splice(e.anchorOffset()+1,t):(e.siblings().splice(e.anchorOffset()+t+1,-t),At(e,e.anchorOffset()+t))}(e,i-e.startOffset())}else t=t.replace(/(^|[^\\])#@/g,"$1#?");/^\$\$(.*)\$\$$/.test(t)&&(t=t.substring(2,t.length-2)),m[0]||(m[0]=p),d=et(t,c,m,i.macros,null!==(o=i.smartFence)&&void 0!==o&&o,e.listeners.onError),"latex"!==i.format&&pa(e,d)}lt(e),function e(t,i){t&&i&&(Pe(t)?t.forEach(t=>e(t,i)):"object"==typeof t&&(t.color||t.backgroundColor||t.fontFamily||t.fontShape||t.fontSeries||t.fontSize||(t.applyStyle(i),e(t.body,i),e(t.numer,i),e(t.denom,i),e(t.index,i),e(t.overscript,i),e(t.underscript,i),e(t.subscript,i),e(t.superscript,i))))}(d,i.style);const f=e.parent();if("latex"!==i.format&&e.options.removeExtraneousParentheses&&f&&"leftright"===f.type&&"("===f.leftDelim&&ot(f.body)&&d&&1===d.length&&"genfrac"===d[0].type?(e.path.pop(),e.siblings()[e.anchorOffset()]=d[0]):("latex"!==i.format||1!==m.length||m[0]||"root"===f.type&&ot(f.body)&&(f.latex=t),e.siblings().splice(e.anchorOffset()+1,0,...d)),e.insertFirstAtom(),e.suppressChangeNotifications=l,"placeholder"===i.selectionMode){let t=[];for(const e of d)t=t.concat(e.filter(e=>"placeholder"===e.type));0!==t.length&&Lt(e,1,!1)?e.announce("move"):At(e,e.anchorOffset()+d.length)}else"before"===i.selectionMode||("after"===i.selectionMode?At(e,e.anchorOffset()+d.length):"item"===i.selectionMode&&At(e,e.anchorOffset(),d.length));_t(e),e.suppressChangeNotifications=s}function ma(e){if(e)return 1===e.length&&"leftright"===e[0].type&&"("===e[0].leftDelim&&(e=e[0].body),e}function pa(e,t){if(t&&e.options.removeExtraneousParentheses){for(let e=0;t[e];e++)if("leftright"===t[e].type&&"("===t[e].leftDelim&&Pe(t[e].body)){let i=0,a=0,r=0;for(let n=0;t[e].body[n];n++)"genfrac"===t[e].body[n].type&&(i++,a=n),"first"!==t[e].body[n].type&&r++;0===r&&1===i&&(t[e]=t[e].body[a])}t.forEach(t=>{if("genfrac"===t.type&&(pa(e,t.numer),pa(e,t.denom),t.numer=ma(t.numer),t.denom=ma(t.denom)),t.superscript&&(pa(e,t.superscript),t.superscript=ma(t.superscript)),t.subscript&&(pa(e,t.subscript),t.subscript=ma(t.subscript)),t.underscript&&(pa(e,t.underscript),t.underscript=ma(t.underscript)),t.overscript&&(pa(e,t.overscript),t.overscript=ma(t.overscript)),t.index&&(pa(e,t.index),t.index=ma(t.index)),"surd"===t.type?(pa(e,t.body),t.body=ma(t.body)):Pe(t.body)&&pa(e,t.body),t.array)for(let i=gt(t.array);i>=0;i--)pa(e,ft(t.array,i))})}}function ua(e){if(It(e),!Vt(e).superscript)if(Vt(e).subscript)Vt(e).superscript=[new Be(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.superscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.subscript)?(e.path[e.path.length-1].offset+=1,Vt(e).superscript=[new Be(e.parent().mode,"first")]):("limits"!==Vt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Be(e.parent().mode,"msubsup","​",zt(e))),e.path[e.path.length-1].offset+=1),Vt(e).superscript=[new Be(e.parent().mode,"first")])}return e.path.push({relation:"superscript",offset:0}),Bt(e),!0}Gi({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",denom:"numer",numer:"denom"}[e.relation()];return t||ua(e),e.parent()[t]||(e.parent()[t]=[new Be(e.parent().mode,"first")]),At(e,0,"end",t),!0},moveBeforeParent:e=>e.path.length>1?(e.path.pop(),At(e,e.anchorOffset()-1),!0):(e.announce("plonk"),!1),moveAfterParent:e=>Wt(e),moveToNextPlaceholder:e=>Lt(e,1),moveToPreviousPlaceholder:e=>Lt(e,-1),moveToNextChar:e=>Ct(e,1),moveToPreviousChar:e=>Ct(e,-1),moveUp:e=>Dt(e),moveDown:e=>Tt(e),moveToNextWord:e=>Kt(e,1),moveToPreviousWord:e=>Kt(e,-1),moveToGroupStart:e=>At(e,0),moveToGroupEnd:e=>At(e,-1),moveToMathFieldStart:e=>Nt(e,-1),moveToMathFieldEnd:e=>Nt(e,1),moveToSuperscript:e=>ua(e),moveToSubscript:e=>function(e){if(It(e),!Vt(e).subscript)if(Vt(e).superscript)Vt(e).subscript=[new Be(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.subscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.superscript)?(e.path[e.path.length-1].offset+=1,Vt(e).subscript=[new Be(e.parent().mode,"first")]):("limits"!==Vt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Be(e.parent().mode,"msubsup","​",zt(e))),e.path[e.path.length-1].offset+=1),Vt(e).subscript=[new Be(e.parent().mode,"first")])}return e.path.push({relation:"subscript",offset:0}),Bt(e),!0}(e)},{target:"model",category:"selection-anchor"}),Gi({selectGroup:e=>Bt(e),selectAll:e=>Ft(e),extendToNextChar:e=>Et(e,1),extendToPreviousChar:e=>Et(e,-1),extendToNextWord:e=>Kt(e,1,{extend:!0}),extendToPreviousWord:e=>Kt(e,-1,{extend:!0}),extendUp:e=>Dt(e,{extend:!0}),extendDown:e=>Tt(e,{extend:!0}),extendToNextBoundary:e=>Kt(e,1,{extend:!0}),extendToPreviousBoundary:e=>Kt(e,-1,{extend:!0}),extendToGroupStart:e=>Rt(e,-e.anchorOffset()),extendToGroupEnd:e=>Rt(e,e.siblings().length-e.anchorOffset()),extendToMathFieldStart:e=>Nt(e,-1,{extend:!0}),extendToMathFieldEnd:e=>Nt(e,1,{extend:!0})},{target:"model",category:"selection-extend"}),Gi({deleteAll:e=>(Ft(e),ta(e)),deleteNextChar:e=>ta(e,1),deletePreviousChar:e=>ta(e,-1),deleteNextWord:e=>(Kt(e,1,{extend:!0}),ta(e)),deletePreviousWord:e=>(Kt(e,-1,{extend:!0}),ta(e)),deleteToGroupStart:e=>(Rt(e,-e.anchorOffset()),ta(e)),deleteToGroupEnd:e=>(Nt(e,-1,{extend:!0}),ta(e)),deleteToMathFieldStart:e=>(Nt(e,-1,{extend:!0}),ta(e)),deleteToMathFieldEnd:e=>(Nt(e,1,{extend:!0}),ta(e))},{target:"model",category:"delete"});const ha=["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"];function fa(e){return!e.ctrlKey&&!e.metaKey&&"Dead"!==e.key&&ha.indexOf(e.code)>=0}function ga(e){const t=[];return(e=function(e){if(!e.code){const t=Object.entries(ni().mapping);let i,a=!1,r=!1;for(let n=0;n<4;n++){for(const[o,s]of t)if(s[n]===e.key){i=o,3===n?(a=!0,r=!0):2===n?a=!0:1===n&&(r=!0);break}if(i)break}return new KeyboardEvent(e.type,{...e,altKey:a,shiftKey:r,code:i})}return new KeyboardEvent(e.type,e)}(e)).ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),0===t.length?"["+e.code+"]":(t.push("["+e.code+"]"),t.join("+"))}function ya(e){var t;if(!e)return"";let i;return"Unidentified"===e.key&&e.target&&(i=e.target.value),i=null!==(t=null!=i?i:e.key)&&void 0!==t?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(i)&&(i=""),i}class ba{constructor(e){this.maximumDepth=1e3,this.record=!1,this.canCoalesce=!1,this.model=e,this.reset()}reset(){this.stack=[],this.index=-1}startRecording(){this.record=!0}canUndo(){return this.index>0}canRedo(){return this.index!==this.stack.length-1}undo(e){this.canUndo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"undo"),this.restore(this.stack[this.index-1],e),this.index-=1,e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"undo"),this.canCoalesce=!1)}redo(e){this.canRedo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"redo"),this.index+=1,this.restore(this.stack[this.index],e),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"redo"),this.canCoalesce=!1)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(e){this.record&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"snapshot"),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push({latex:this.model.root.toLatex(!1),selection:this.model.toString()}),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"snapshot"),this.canCoalesce=!1)}snapshotAndCoalesce(e){this.canCoalesce&&this.pop(),this.snapshot(e),this.canCoalesce=!0}save(){return{latex:this.model.root.toLatex(!1),selection:this.model.toString()}}restore(e,t){const i=this.model.suppressChangeNotifications;void 0!==t.suppressChangeNotifications&&(this.model.suppressChangeNotifications=t.suppressChangeNotifications),da(this.model,e?e.latex:"",{...t,format:"latex",mode:"math",insertionMode:"replaceAll",selectionMode:"after",smartFence:!1}),jt(this.model,e?e.selection:[{relation:"body",offset:0}]),this.model.suppressChangeNotifications=i}}const va={"−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega"},xa={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\langle":"(:","\\rangle":":)"};function ka(e){if(!e)return"";if(t(e)){let t="";if(0===e.length)return"";if("first"===e[0].type&&(e=e.slice(1)),0===e.length)return"";if("text"===e[0].mode){let i=0;for(t='"';e[i]&&"text"===e[i].mode;)t+=e[i].body,i++;t+='"'+ka(e.slice(i))}else if("math"===e[0].mode){let i=0;for(;e[i]&&"math"===e[i].mode;)t+=ka(e[i]),i++;t+=ka(e.slice(i))}return t.trim()}if("text"===e.mode)return'"'+e.body+'"';let i="";const a=e.symbol;let r;switch(e.type){case"group":case"root":i=ka(e.body);break;case"array":break;case"genfrac":(e.leftDelim||e.rightDelim)&&(i+="."!==e.leftDelim&&e.leftDelim?e.leftDelim:"{:"),e.hasBarLine?(i+="(",i+=ka(e.numer),i+=")/(",i+=ka(e.denom),i+=")"):(i+="("+ka(e.numer)+"),",i+="("+ka(e.denom)+")"),(e.leftDelim||e.rightDelim)&&(i+="."!==e.rightDelim&&e.rightDelim?e.rightDelim:"{:");break;case"surd":e.index?i+="root("+ka(e.index)+")("+ka(e.body)+")":i+="sqrt("+ka(e.body)+")";break;case"leftright":i+="."!==e.leftDelim&&e.leftDelim?e.leftDelim:"{:",i+=ka(e.body),i+="."!==e.rightDelim&&e.rightDelim?e.rightDelim:":}";break;case"sizeddelim":case"delim":case"overlap":case"overunder":break;case"mord":i=va[a]||a||("string"==typeof e.body?e.body:""),"\\"===i[0]&&(i=String(i)),r=a?a.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null,r?i=String.fromCharCode(parseInt("0x"+r[1])):i.length>0&&"\\"===i.charAt(0)&&(i="string"==typeof e.body?e.body.charAt(0):e.symbol);break;case"mbin":case"mrel":case"textord":case"minner":i=a&&va[a]?va[a]:a&&xa[a]?xa[a]:e.body;break;case"mopen":case"mclose":i+=e.body;break;case"mpunct":i=xa[a]||a;break;case"mop":"​"!==e.body&&(i="",i+="\\operatorname"===a?ka(e.body):e.body||a,i+=" ");break;case"mathstyle":case"box":case"spacing":case"enclose":break;case"space":i=" "}if(e.subscript){i+="_";const t=ka(e.subscript);t.length>1&&!/^(-)?\d+(\.\d*)?$/.test(t)?i+="("+t+")":i+=t}if(e.superscript){i+="^";const t=ka(e.superscript);t.length>1&&!/^(-)?\d+(\.\d*)?$/.test(t)?i+="("+t+")":i+=t}return i}const _a={};function wa(e){const t=_a.locale.substring(0,2);let i="";return _a.strings[_a.locale]&&(i=_a.strings[_a.locale][e]),!i&&_a.strings[t]&&(i=_a.strings[t][e]),i||(i=_a.strings.en[e]),i||(i=e),i}function Ma(e,t,i){st(e);const a=[],r=t.substr(i);for(const e of r){const t=new Be("command","command",e);t.isSuggestion=!0,a.push(t)}Array.prototype.splice.apply(e.siblings(),[e.anchorOffset()+1,0].concat(a))}function Sa(e,t){if(t=null!=t?t:{acceptSuggestion:!1},Mi(e),t.discard)return Li(e.model,null),e.switchMode("math"),!0;const i=Si(e.model,!t.acceptSuggestion);if(i){if("\\("===i||"\\)"===i)Li(e.model,[]),da(e.model,i.slice(1),{mode:e.mode});else{e.switchMode("math");const t=et(i,"math",null,e.config.macros);t?Li(e.model,t):zi(e.model,!0)}return e.snapshot(),e.model.announce("replacement"),!0}return!1}function za(e){!function(e){const t=e.siblings(),i=Mt(e);let a=i.start;for(;a1)}return Vi(e),!0}_a.plural=function(e,t,i){var a;(i=null!=i?i:{}).type=null!==(a=i.type)&&void 0!==a?a:"cardinal";const r=_a.locale.substring(0,2),n="ordinal"===i.type?_a._ordinal:_a._cardinal;let o,s="ordinal"===i.type?_a._ordinalPluralCategories.indexOf(n.select(e)):_a._cardinalPluralCategories.indexOf(n.select(e));return _a.strings[_a.locale]&&(o=_a.strings[_a.locale][t]),!o&&_a.strings[r]&&(o=_a.strings[r][t]),o||(o=_a.strings.en[t],o||(o=t),s="ordinal"===i.type?_a._ordinalPluralCategories.indexOf(_a._ordinalEnglish.select(e)):_a._cardinalPluralCategories.indexOf(_a._cardinalEnglish.select(e))),o.split(";")[s]||o.split(";")[0]},_a.merge=function(e,t){if(e&&t){const i=_a._locale;_a.locale=e,_a.strings[e]={..._a.strings[e],...t},_a.locale=i}else e&&!t&&Object.keys(e).forEach(t=>_a.merge(t,e[t]))},Object.defineProperty(_a,"locale",{set(e){_a._locale=e,_a._ordinal=null,_a._cardinal=null},get(){var e;return _a._locale||(_a._locale=null!==(e=null===navigator||void 0===navigator?void 0:navigator.language.slice(0,5))&&void 0!==e?e:"en"),_a._locale}}),Object.defineProperty(_a,"ordinal",{get:()=>(_a._ordinal||(_a._ordinalEnglish=new Intl.PluralRules("en",{type:"ordinal"}),_a._ordinalEnglishPluralCategories=_a._ordinalEnglish.resolvedOptions().pluralCategories,_a._ordinal=new Intl.PluralRules(_a.locale,{type:"ordinal"}),_a._ordinalPluralCategories=_a._ordinal.resolvedOptions().pluralCategories),_a._ordinal)}),Object.defineProperty(_a,"cardinal",{get:()=>(_a._cardinal||(_a._cardinalEnglish=new Intl.PluralRules("en",{type:"cardinal"}),_a._cardinalEnglishPluralCategories=_a._cardinalEnglish.resolvedOptions().pluralCategories,_a._cardinal=new Intl.PluralRules(_a.locale,{type:"cardinal"}),_a._cardinalPluralCategories=_a._ordinal.resolvedOptions().pluralCategories),_a._cardinal)}),_a.strings={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo"},ar:{"keyboard.tooltip.functions":"مهام","keyboard.tooltip.symbols":"حرف او رمز","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.command":"حالة تلقي الأوامر اللاتك","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.roman":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.roman":"Römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen"},el:{"keyboard.tooltip.functions":"συναρτήσεις","keyboard.tooltip.symbols":"σύμβολα","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.command":"Λειτουργία εντολών LaTeX","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.roman":"Ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer"},fa:{"keyboard.tooltip.functions":"توابع","keyboard.tooltip.symbols":"نمادها","keyboard.tooltip.greek":"حروف یونانی","keyboard.tooltip.command":"حالت دستور لاتک","keyboard.tooltip.numeric":"عددی","keyboard.tooltip.roman":"حروف رومی","tooltip.copy to clipboard":"کپی به کلیپبورد","tooltip.redo":"بازگشت به بعد","tooltip.toggle virtual keyboard":"نمایش/نهفتن کیبورد مجازی","tooltip.undo":"بازگشت به قبل"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.roman":"Lettres romaines","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalità di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.roman":"Lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare"},ja:{"keyboard.tooltip.functions":"関数","keyboard.tooltip.symbols":"シンボル","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.command":"LaTeXコマンドモード","keyboard.tooltip.numeric":"数値","keyboard.tooltip.roman":"ローマ字","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb poleceń LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.roman":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz wirtualną klawiaturę","tooltip.undo":"Cofnij"},ru:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Символы","keyboard.tooltip.greek":"Греческие буквы","keyboard.tooltip.command":"Режим командной строки LaTeX","keyboard.tooltip.numeric":"числовой","keyboard.tooltip.roman":"Латинские буквы","tooltip.copy to clipboard":"Скопировать в буфер обмена","tooltip.redo":"переделывать","tooltip.toggle virtual keyboard":"Переключить виртуальную клавиатуру","tooltip.undo":"расстегивать"}},Gi({complete:Sa,nextSuggestion:function(e){return e.suggestionIndex+=1,za(e),!1},previousSuggestion:function(e){if(e.suggestionIndex-=1,e.suggestionIndex<0){st(e.model);const t=ne(Si(e.model));e.suggestionIndex=t.length-1}return za(e),!1}},{target:"mathfield",category:"autocomplete"});const La={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ",a:'a',A:'capital A',"+":"plus ","-":"minus ",";":' semi-colon ',",":' comma ',"|":'Vertical bar',"(":'Open paren. ',")":' Close paren. ',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":' such that ',"\\colon":' such that ',"\\hbar":"etch bar ","\\iff":'if, and only if, ',"\\Longleftrightarrow":'if, and only if, ',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set n',"\\C":'the set c',"\\Z":'the set z',"\\Q":'the set q',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lbrace":'open brace',"\\{":'open brace',"\\rbrace":'close brace',"\\}":'close brace',"\\langle":'left angle bracket',"\\rangle":'right angle bracket',"\\lfloor":'open floor',"\\rfloor":'close floor',"\\lceil":'open ceiling',"\\rceil":'close ceiling',"\\vert":'vertical bar',"\\mvert":'divides',"\\lvert":'left vertical bar',"\\rvert":'right vertical bar',"\\lbrack":' open square bracket ',"\\rbrack":' close square bracket ',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"};function Aa(e){let t=0;if(Pe(e))for(const i of e)"first"!==i.type&&(t+=1);return 1===t}function qa(e){let t="";if(Pe(e))for(const i of e)"first"!==i.type&&"string"==typeof i.body&&(t+=i.body);return t}function $a(e,t){var i;const a={...t,textToSpeechRulesOptions:{...t.textToSpeechRulesOptions}};if(window.sre&&"sre"===a.textToSpeechRules){const t=Hi(e,a);return t?(a.textToSpeechMarkup&&(a.textToSpeechRulesOptions=null!==(i=a.textToSpeechRulesOptions)&&void 0!==i?i:{},a.textToSpeechRulesOptions.markup=a.textToSpeechMarkup,"ssml"===a.textToSpeechRulesOptions.markup&&(a.textToSpeechRulesOptions.markup="ssml_step"),a.textToSpeechRulesOptions.rate=a.speechEngineRate),a.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(a.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(t)):""}let r=function e(t,i,a){function r(e){return""+e+""}if(!i)return"";let n="";if(Pe(i)){let o=!1,s=!1;for(let l=0;l'),n+=i.body;else{i.id&&"math"===t&&(n+='');let o="",s="",l="",c=!1;switch(i.type){case"group":case"root":n+=e("math",i.body,a);break;case"genfrac":if(o=e("math",i.numer,a),s=e("math",i.denom,a),Aa(i.numer)&&Aa(i.denom)){const e={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[qa(i.numer)+"/"+qa(i.denom)];e?n=e:n+=o+" over "+s}else n+=' the fraction '+o+', over '+s+'. End fraction.';break;case"surd":if(l=e("math",i.body,a),i.index){let t=e("math",i.index,a);t=t.trim();const r=t.replace(//g,"");n+="3"===r?' the cube root of '+l+'. End cube root':"n"===r?' the nth root of '+l+'. End root':' the root with index: '+t+', of '+l+'. End root'}else Aa(i.body)?n+=" the square root of "+l+" , ":n+=' the square root of '+l+'. End square root';break;case"leftright":n+=La[i.leftDelim]||i.leftDelim,n+=e("math",i.body,a),n+=La[i.rightDelim]||i.rightDelim;break;case"rule":case"overunder":case"overlap":break;case"placeholder":n+="placeholder "+i.body;break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":case"textord":{const r=i.symbol;if("\\mathbin"===r||"\\mathrel"===r||"\\mathopen"===r||"\\mathclose"===r||"\\mathpunct"===r||"\\mathord"===r||"\\mathinner"===r){n=e(t,i.body,a);break}let o=i.body,s=i.symbol;if("delim"!==i.type&&"sizeddelim"!==i.type||(o=s=i.delim),"text"===t)n+=o;else{if("mbin"===i.type&&(n+=''),o){const e=La[o]||(s?La[s.trim()]:"");if(e)n+=" "+e;else{const e=s?function(e){let t="";return"\\"===e.charAt(0)&&(t=" "+e.replace("\\","")+" "),t}(s.trim()):"";n+=e||function(e){let t="";return a.textToSpeechMarkup?/[a-z]/.test(e)?t+=' '+e+"":/[A-Z]/.test(e)?t+=String("capital "+e.toLowerCase()):t+=e:/[a-z]/.test(e)?t+=" '"+e.toUpperCase()+"'":/[A-Z]/.test(e)?t+=" 'capital "+e.toUpperCase()+"'":t+=e,t}(o)}}else n+=e("math",i.body,a);"mbin"===i.type&&(n+='')}break}case"mop":if("​"!==i.body){const t=i.symbol;if("\\sum"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the summation from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the summation from '+t+' of ',c=!0}else n+=" the summation of";else if("\\prod"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the product from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the product from '+t+' of ',c=!0}else n+=" the product of ";else if("\\int"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let o=e("math",i.subscript,a);o=o.trim(),n+=' the integral from '+r(o)+' to '+r(t)+' of ',c=!0}else n+=' the integral of ';else"string"==typeof i.body?n+=La[i.body]||La[i.symbol]||" "+i.body:i.symbol&&("\\"===i.symbol[0]?n+=" "+i.symbol.substr(1):n+=" "+i.symbol)}break;case"enclose":l=e("math",i.body,a),Aa(i.body)?n+=" crossed out "+l+" , ":n+=" crossed out "+l+". End cross out"}if(!c&&i.superscript){let r=e(t,i.superscript,a);r=r.trim();const o=r.replace(/<[^>]*>/g,"");if(Aa(i.superscript)){if("math"===t){const e=function(e){if(Pe(e))for(const t of e)if("first"!==t.type&&t.id)return t.id.toString();return""}(i.superscript);e&&(n+='')}"′"===o?n+=" prime ":"2"===o?n+=" squared ":"3"===o?n+=" cubed ":isNaN(parseInt(o))?n+=" to the "+r+"; ":n+=' to the '+o+" power; "}else isNaN(parseInt(o))?n+=" raised to the "+r+"; ":n+=' raised to the '+o+" power; "}if(!c&&i.subscript){let t=e("math",i.subscript,a);t=t.trim(),Aa(i.subscript)?n+=" sub "+t:n+=" subscript "+t+". End subscript. "}}return n}("math",e,a);if("ssml"===a.textToSpeechMarkup){let e="";a.speechEngineRate&&(e=''),r=''+e+"

    "+r+"

    "+(e?"
    ":"")+""}else r="mac"===a.textToSpeechMarkup&&"mac"===function(e){let t="other";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?t="mac":/^(win)/i.test(navigator.platform)?t="win":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos")),"mac"===t?"mac":"!mac"}()?r.replace(//g,"").replace(//g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(//g,"[[slc $1]]").replace(/]*>/g,"").replace(/<\/say-as>/g,""):r.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return r}function Ca(e,t,i){return t+$a(i,{...e,textToSpeechMarkup:"",textToSpeechRulesOptions:{...e.textToSpeechRulesOptions,markup:"none"}})}function Da(e,t){if(!t&&window&&window.mathlive&&(t=window.mathlive.config),(t=null!=t?t:{}).speechEngine&&"local"!==t.speechEngine)if("amazon"===t.speechEngine){if(window&&window.AWS){const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"mp3",VoiceId:t.speechEngineVoice,Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes(t.speechEngineVoice)?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(a,(function(e,t){if(e);else if(null==t?void 0:t.AudioStream){const e=new Uint8Array(t.AudioStream),i=new Blob([e.buffer],{type:"audio/mpeg"}),a=URL.createObjectURL(i);new Audio(a).play().catch(e=>{})}}))}}else t.speechEngine;else{const t=new SpeechSynthesisUtterance(e);window&&window.speechSynthesis.speak(t)}}function Ta(e,t,i,a){let r="";"plonk"===t?(e.plonkSound&&(e.plonkSound.load(),e.plonkSound.play().catch(e=>{})),e.resetKeystrokeBuffer()):"delete"===t?r=Ca(e.config,"deleted: ",a):"focus"===t||/move/.test(t)?r=(Pt(e.model)?"":"selected: ")+function(e,t){function i(e,t){return"body"===t.relation?{enclose:"cross out",leftright:"fence",surd:"square root",root:"math field"}[e.type]:{numer:"numerator",denom:"denominator",index:"index",body:"parent",subscript:"subscript",superscript:"superscript"}[t.relation]}const a=t?t.path:[],r=e.model.path,n=r[r.length-1];let o="";for(;a.length>r.length;)o+="out of "+i(t.parent(),a[a.length-1])+"; ",a.pop();if(!Pt(e.model))return Ca(e.config,"",Ot(e.model));const s=i(e.model.parent(),n);0===n.offset&&(o+=(s?"start of "+s:"unknown")+": ");const l=e.model.sibling(Math.max(1,e.model.extent));return l?o+=Ca(e.config,"",l):0!==n.offset&&(o+=s?"end of "+s:"unknown"),o}(e,i):"replacement"===t?r=Ca(e.config,"",e.model.sibling(0)):"line"===t?(r=Ca(e.config,"",e.model.root),e.accessibleNode.innerHTML=e.config.createHTML(''+Hi(e.model.root,e.config)+""),e.textarea.setAttribute("aria-label","after: "+r)):r=a?Ca(e.config,t+" ",a):t;const n=/\u00a0/.test(e.ariaLiveText.textContent)?"   ":"   ";e.ariaLiveText.textContent=r+n}Gi({speak:(e,t,i)=>function(e,t,i){i=null!=i?i:{withHighlighting:!1};const a=function(e,t){let i=null;switch(t){case"all":i=e.model.root;break;case"selection":Pt(e.model)||(i=Ot(e.model));break;case"left":{const t=e.model.siblings(),a=e.model.startOffset();if(a>=1){i=[];for(let e=1;e<=a;e++)i.push(t[e])}break}case"right":{const t=e.model.siblings(),a=e.model.endOffset()+1;if(a<=t.length-1){i=[];for(let e=a;e<=t.length-1;e++)i.push(t[e])}break}case"group":i=e.model.siblings();break;case"parent":{const t=e.model.parent();t&&"root"!==t.type&&(i=e.model.parent());break}}return i}(e,t);if(null===a)return e.config.speakHook(function(e){let t="";switch(e){case"all":break;case"selection":t="no selection";break;case"left":t="at start";break;case"right":t="at end";break;case"group":break;case"parent":t="no parent"}return t}(t),e.config),!1;const r={...e.config};(i.withHighlighting||"amazon"===r.speechEngine)&&(r.textToSpeechMarkup=window.sre&&"sre"===r.textToSpeechRules?"ssml_step":"ssml");const n=$a(a,r);return i.withHighlighting?(window.mathlive.readAloudMathField=e,Ui(e,{forHighlighting:!0}),e.config.readAloudHook&&e.config.readAloudHook(e.field,n,e.config)):e.config.speakHook&&e.config.speakHook(n,r),!1}(e,t,i)},{target:"mathfield",category:"speech"});const Ea=()=>{};function Ka(e){if("string"==typeof e){const t=new Audio;return t.preload="none",t.src=e,t.volume=.5,t}return e}function Na(e){e instanceof HTMLAudioElement&&(e.pause(),e.removeAttribute("src"),e.load())}function Oa(e,i){const a=Ba(e,Object.keys(e));return Object.keys(i).forEach(e=>{var r,n;switch(e){case"scriptDepth":if(t(i.scriptDepth))a.scriptDepth=[i.scriptDepth[0],i.scriptDepth[1]];else{if("number"!=typeof i.scriptDepth)throw Error("Unexpected value for scriptDepth");a.scriptDepth=[i.scriptDepth,i.scriptDepth]}break;case"namespace":if(!/^[a-z]*[-]?$/.test(i.namespace))throw Error("namespace must be a string of lowercase characters only");/-$/.test(i.namespace)?a.namespace=i.namespace:a.namespace=i.namespace+"-";break;case"locale":a.locale="auto"===i.locale?_a.locale:i.locale;break;case"strings":_a.merge(i.strings);break;case"virtualKeyboardLayout":"auto"===i.virtualKeyboardLayout?a.virtualKeyboardLayout=null!==(r={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[_a.locale.substring(0,2)])&&void 0!==r?r:"qwerty":a.virtualKeyboardLayout=i.virtualKeyboardLayout;break;case"virtualKeyboardMode":{const e=null===(n=window.matchMedia)||void 0===n?void 0:n.call(window,"(any-pointer: coarse)").matches;"auto"===i.virtualKeyboardMode?a.virtualKeyboardMode=e?"onfocus":"off":a.virtualKeyboardMode=i.virtualKeyboardMode}break;case"letterShapeStyle":"auto"===i.letterShapeStyle?"fr"===_a.locale.substring(0,2)?a.letterShapeStyle="french":a.letterShapeStyle="tex":a.letterShapeStyle=i.letterShapeStyle;break;case"plonkSound":Na(a.plonkSound),a.plonkSound=Ka(i.plonkSound);break;case"keypressSound":if(Na(a.keypressSound),"string"==typeof i.keypressSound){const e=Ka(i.keypressSound);a.keypressSound={delete:e,return:e,spacebar:e,default:e}}else if(i.keypressSound instanceof HTMLAudioElement)a.keypressSound={delete:i.keypressSound,return:i.keypressSound,spacebar:i.keypressSound,default:i.keypressSound};else{if(!i.keypressSound.default)throw Error("Missing keypressSound.default");a.keypressSound={...i.keypressSound},a.keypressSound.return||(a.keypressSound.return=i.keypressSound.default),a.keypressSound.spacebar||(a.keypressSound.spacebar=i.keypressSound.default),a.keypressSound.delete||(a.keypressSound.delete=i.keypressSound.default)}break;case"onBlur":case"onFocus":case"onContentWillChange":case"onContentDidChange":case"onSelectionWillChange":case"onSelectionDidChange":case"onUndoStateWillChange":case"onUndoStateDidChange":case"onModeChange":case"onVirtualKeyboardToggle":case"onReadAloudStatus":case"onError":if(null===i[e])a[e]=Ea;else if("function"!=typeof i[e])throw Error(e+" must be a function or null");a[e]=i[e];break;default:t(i[e])?a[e]=[...i[e]]:"object"==typeof i[e]?a[e]={...i[e]}:a[e]=i[e]}}),void 0!==i.overrideDefaultInlineShortcuts&&(i.overrideDefaultInlineShortcuts?a.inlineShortcuts=i.inlineShortcuts:a.inlineShortcuts={...ia,...i.inlineShortcuts}),a}function Ba(e,i){let a;a="string"==typeof i?[i]:void 0===i?Object.keys(e):i;const r={};return a.forEach(i=>{t(r[i])?r[i]=[...r[i]]:"object"==typeof r[i]?r[i]={...r[i]}:r[i]=e[i]}),"string"==typeof i?r[i]:r}function Fa(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0);let a=0,r=!1;for(kt(e.model);!r;){const n=e.model.sibling(a);r=0===t||!n||"math"!==n.mode||!(/mord|textord|mpunct/.test(n.type)||"mop"===n.type&&/[a-zA-Z]+/.test(n.body))||Boolean(n.superscript)||Boolean(n.subscript)||i&&!i(n),r||(n.applyStyle({mode:"text"}),n.symbol=n.body,n.latex=""),a-=1,t-=1}_t(e.model)}function Pa(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0),kt(e.model);let a=0,r=!1;for(;!r;){const n=e.model.sibling(a);r=0===t||!n||"text"!==n.mode||" "===n.body||i&&!i(n),r||n.applyStyle({mode:"math"}),a-=1,t-=1}Ra(e),_t(e.model)}function Ra(e){let t=0;for(;e.model.sibling(t)&&"math"===e.model.sibling(t).mode;)t-=1;if(e.model.sibling(t)&&"text"===e.model.sibling(t).mode&&" "===e.model.sibling(t).body&&(!e.model.sibling(t-1)||"math"===e.model.sibling(t-1).mode)){kt(e.model),e.model.siblings().splice(t-1,1),_t(e.model);const i=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0,At(e.model,e.model.anchorOffset()-1),e.model.suppressChangeNotifications=i}}function Ia(e,t,i){!function(e){const t=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;if("Unidentified"===e.key)return;if("Dead"===e.key)return;const i=ei.filter(i=>{var a;return(null===(a=i.mapping[e.code])||void 0===a?void 0:a[t])===e.key});0!==i.length&&(i.forEach(e=>{e.score+=1}),ei.sort((e,t)=>t.score-e.score))}(i);const a=ni();if(e.keyboardLayout!==a.id&&(e.keyboardLayout=a.id,e.keybindings=mi(e.config.keybindings,t=>{"function"==typeof e.config.onError&&e.config.onError({code:"invalid-keybinding",arg:t.join("\n")})})),function(e,t){const i=e.keystrokeCaption;if(i&&e.keystrokeCaptionVisible){const a=e.element.getBoundingClientRect();i.style.left=a.left+"px",i.style.top=a.top-64+"px",i.innerHTML=e.config.createHTML(""+(di(t)||t)+""+i.innerHTML),i.style.visibility="visible",setTimeout((function(){i.childNodes.length>0&&i.removeChild(i.childNodes[i.childNodes.length-1]),0===i.childNodes.length&&(i.style.visibility="hidden")}),3e3)}}(e,t),clearTimeout(e.keystrokeBufferResetTimer),e.config.onKeystroke&&!e.config.onKeystroke(e,t,i))return(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1;let r,n,o,s=!1;if("command"!==e.mode&&(!i||!i.ctrlKey&&!i.metaKey))if(fa(i)){const t=ya(i),a=e.keystrokeBuffer+t;let o=0;for(;!r&&o{e.startsWith(n)&&!i.includes(e)&&i.push(e)});const o=(null==t?void 0:t.inlineShortcuts)?t.inlineShortcuts:null;o&&Object.keys(o).forEach(e=>{e.startsWith(n)&&i.push(e)})}return i}(a,e.config).length<=1?s=!0:e.config.inlineShortcutTimeout&&(e.keystrokeBufferResetTimer=setTimeout(()=>{e.resetKeystrokeBuffer()},e.config.inlineShortcutTimeout))}else e.resetKeystrokeBuffer();if(e.config.smartMode){const a=e.mode;r?e.mode="math":function(e,t,i){if(e.smartModeSuppressed)return!1;if(e.model.endOffset()<*|]$/.test(a))return Ra(e),!0}else{if("[Space]"===t)return Fa(e,void 0,e=>/[a-z][:,;.]$/.test(e.body)),!0;if(/[a-zA-Z]{3,}$/.test(r)&&!/(dxd|abc|xyz|uvw)$/.test(r))return Fa(e,void 0,e=>/[a-zA-Z]/.test(e.body)),!0;if(/(^|\W)(if|If)$/i.test(r))return Fa(e,1),!0;if(/(\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5){3,}$/u.test(r)&&!/(αβγ)$/.test(r))return Fa(e,void 0,e=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5)/u.test(e.body)),!0;if("?"===a)return!0;if("."===a&&!/[0-9-+]\.$/.test(r))return!0}return!1}(e,t,i)&&(e.mode={math:"text",text:"math"}[e.mode],o=""),e.mode!==a&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}if(r||o||(o=function(e,t,i){if(0===e.length)return"";for(let a=e.length-1;a>=0;a--)if(e[a].key===i&&(!e[a].ifMode||e[a].ifMode===t))return e[a].command;return""}(e.keybindings,e.mode,t)),!r&&!o)return!0;if(e.config.readOnly&&"insert"===o[0])return!0;zi(e.model,!1);const l=e.model.parent();if("moveAfterParent"===o&&l&&"leftright"===l.type&&e.model.endOffset()===e.model.siblings().length-1&&e.config.smartFence&&la(e.model,".",e.style)&&(o="",Vi(e)),"math"===e.mode&&"[Spacebar]"===t&&!r){const t=e.model.sibling(1),i=e.model.sibling(-1);(t&&"text"===t.mode||i&&"text"===i.mode)&&da(e.model," ",{mode:"text"})}if(o)e.$perform(o);else if(r){if(!/^(\\{|\\}|\\[|\\]|\\@|\\#|\\$|\\%|\\^|\\_|\\backslash)$/.test(r)){const t={...zt(e.model),...e.style};da(e.model,ya(i),{suppressChangeNotifications:!0,mode:e.mode,style:t});const a=e.mode;e.snapshotAndCoalesce(),e.restoreToUndoRecord(e.keystrokeBufferStates[n]),e.mode=a}kt(e.model);const t=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0;const a={...zt(e.model),...e.style};da(e.model,r,{format:"latex",mode:e.mode,style:a,smartFence:!0}),Ra(e),r.endsWith(" ")&&(e.mode="text",da(e.model," ",{mode:"text",style:a})),e.model.suppressChangeNotifications=t,_t(e.model),e.snapshot(),Vi(e),e.model.announce("replacement"),s&&e.resetKeystrokeBuffer()}return e.scrollIntoView(),(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1}function Ha(e,t,i){if(e.config.readOnly)return void e.model.announce("plonk");if((i=null!=i?i:{}).focus&&e.$focus(),i.feedback&&(e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{}))),i.commandMode&&"command"!==e.mode&&e.switchMode("command"),zi(e.model,!1),i.simulateKeystroke){const i=t.charAt(0);if(!Ia(e,i,new KeyboardEvent("keypress",{key:i})))return}let a="",r=!1;if(e.pasteInProgress)e.pasteInProgress=!1,da(e.model,t,{smartFence:e.config.smartFence,mode:"math"});else{const i={...zt(e.model),...e.style},n=Ue(t);for(const t of n)if("command"===e.mode){st(e.model),e.suggestionIndex=0;const i=Si(e.model),n=ne(i+t);r=n.length>1,0===n.length?(da(e.model,t,{mode:"command"}),/^\\[a-zA-Z\\*]+$/.test(i+t)&&zi(e.model,!0),Mi(e)):(da(e.model,t,{mode:"command"}),n[0].match!==i+t&&Ma(e.model,n[0].match,-n[0].match.length+i.length+1),a=n[0].match)}else if("math"===e.mode){const a={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(a){if("moveToSuperscript"===a){if(Wa(e)>=e.config.scriptDepth[1])return void e.model.announce("plonk")}else if("moveToSubscript"===a&&Va(e)>=e.config.scriptDepth[0])return void e.model.announce("plonk");e.$perform(a)}else e.config.smartSuperscript&&"superscript"===e.model.relation()&&/[0-9]/.test(t)&&0===e.model.siblings().filter(e=>"first"!==e.type).length?(da(e.model,t,{mode:"math",style:i}),Wt(e.model)):da(e.model,t,{mode:"math",style:i,smartFence:e.config.smartFence})}else"text"===e.mode&&da(e.model,t,{mode:"text",style:i})}"command"!==e.mode&&e.snapshotAndCoalesce(),e.dirty=!0,e.scrollIntoView(),ki(e,a,r)}function Wa(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!0:a.subscript&&(r=!1),i+=1,a=e.model.ancestor(i);return r?t:0}function Va(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!1:a.subscript&&(r=!0),i+=1,a=e.model.ancestor(i);return r?t:0}function Ua(e){return e.pasteInProgress=!0,!0}let ja;Gi({undo:e=>(Sa(e),e.undo(),!0),redo:e=>(Sa(e),e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},enterCommandMode:e=>(e.switchMode("command"),!0),toggleKeystrokeCaption:e=>(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaption.innerHTML="",e.keystrokeCaptionVisible||(e.keystrokeCaption.style.visibility="hidden"),!1),switchMode:(e,t)=>(e.switchMode(t),!0),insert:(e,t,i)=>e.$insert(t,i),typedText:(e,t)=>(Ha(e,t),!0)}),Gi({applyStyle:function(e,t){e.resetKeystrokeBuffer();const i=function(e){const t={};return"string"==typeof e.mode&&(t.mode=e.mode.toLowerCase()),"string"==typeof e.color&&(t.color=e.color),"string"==typeof e.backgroundColor&&(t.backgroundColor=e.backgroundColor),"string"==typeof e.fontFamily&&(t.fontFamily=e.fontFamily),"string"==typeof e.series&&(t.fontSeries=e.series),"string"==typeof e.fontSeries&&(t.fontSeries=e.fontSeries.toLowerCase()),t.fontSeries&&(t.fontSeries={bold:"b",medium:"m",normal:"m"}[t.fontSeries]||t.fontSeries),"string"==typeof e.shape&&(t.fontShape=e.shape),"string"==typeof e.fontShape&&(t.fontShape=e.fontShape.toLowerCase()),t.fontShape&&(t.fontShape={italic:"it",up:"n",upright:"n",normal:"n"}[t.fontShape]||t.fontShape),"string"==typeof e.size?t.fontSize=e.size:"number"==typeof e.size&&(t.fontSize="size"+Math.min(0,Math.max(10,e.size))),"string"==typeof e.fontSize&&(t.fontSize=e.fontSize.toLowerCase()),t.fontSize&&(t.fontSize={tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normal:"size5",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[t.fontSize]||t.fontSize),t}(t);if(i.mode){if(Pt(e.model))e.switchMode(i.mode);else{const t=e.mode,i="math"===(St(e.model)||e.config.defaultMode)?"text":"math";let a=e.$selectedText("ASCIIMath");if("math"===i&&/^"[^"]+"$/.test(a)&&(a=a.slice(1,-1)),e.$insert(a,{mode:i,selectionMode:"item",format:"text"===i?"text":"ASCIIMath"}),e.mode=i,e.groupIsSelected()){const t=e.model.parent();!t||"group"!==t.type&&"root"!==t.type||(t.mode=i)}e.mode!==t&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}delete i.mode}return Pt(e.model)?(e.style.fontSeries&&i.fontSeries===e.style.fontSeries&&(i.fontSeries="auto"),i.fontShape&&i.fontShape===e.style.fontShape&&(i.fontShape="auto"),i.color&&i.color===e.style.color&&(i.color="none"),i.backgroundColor&&i.backgroundColor===e.style.backgroundColor&&(i.backgroundColor="none"),i.fontSize&&i.fontSize===e.style.fontSize&&(i.fontSize="auto"),e.style={...e.style,...i}):(ca(e.model,i),e.snapshot()),!0}},{target:"mathfield"}),Gi({copyToClipboard:e=>(e.$focus(),Pt(e.model)&&e.$select(),document.execCommand("copy"),!1),cutToClipboard:e=>(e.$focus(),document.execCommand("cut"),!0),pasteFromClipboard:e=>(e.$focus(),document.execCommand("paste"),!0)},{target:"mathfield",category:"clipboard"});let Ga=0;function Xa(e,t,i,a){var r;let n;(a=null!=a?a:{}).bias=null!==(r=a.bias)&&void 0!==r?r:0;const o=function e(t,i,a){let r={element:null,distance:Number.POSITIVE_INFINITY},n=!0;if(t.getAttribute("data-atom-id")){r.element=t;const e=t.getBoundingClientRect(),o=i-(e.left+e.right)/2,s=a-(e.top+e.bottom)/2;r.distance=o*o+s*s,n=i>=e.left&&i<=e.right}if(n&&t.children)for(const n of t.children){const t=e(n,i,a);t.element&&t.distance<=r.distance&&(r=t)}return r}(e.field,t,i).element,s=o?o.getAttribute("data-atom-id"):null;if(s){const i=Yt(e.model,(e,t)=>t.captureSelection?t.filter(e=>e.id===s).length>0:t.id===s);if(i&&i.length>0)if(n=dt(i[0]).path,0===a.bias){const e=o.getBoundingClientRect();tf ()",classes:"tex",layers:["functions"]},symbols:{tooltip:"keyboard.tooltip.symbols",layer:"symbols",label:"∞≠∈",classes:"tex",layers:["symbols"]},command:{tooltip:"keyboard.tooltip.command",command:"enterCommandMode",label:"",layers:["lower-command","upper-command","symbols-command"]},style:{tooltip:"keyboard.tooltip.style",layer:"style",label:"bi𝔹"}},Ya={"\\varphi ":["Φ","\\Phi "],"\\varsigma ":["Σ","\\Sigma "],"\\epsilon ":["Ɛ",'{\\char"0190}'],"\\rho ":["Ρ",'{\\char"3A1}'],"\\tau ":["Τ",'{\\char"3A4}'],"\\upsilon ":["Υ","\\Upsilon "],"\\theta ":["Θ","\\Theta "],"\\iota ":["Ι",'{\\char"399}'],"\\omicron ":["Ο",'{\\char"39F}'],"\\pi ":["Π","\\Pi "],"\\alpha ":["Α",'{\\char"391}'],"\\sigma ":["Σ","\\Sigma "],"\\delta ":["Δ","\\Delta "],"\\phi ":["Φ","\\Phi "],"\\gamma ":["Γ","\\Gamma "],"\\eta ":["Η",'{\\char"397}'],"\\xi ":["Ξ","\\Xi "],"\\kappa ":["Κ",'{\\char"39A}'],"\\lambda ":["Λ","\\Lambda "],"\\zeta ":["Ζ",'{\\char"396}'],"\\chi ":["Χ",'{\\char"3A7}'],"\\psi ":["Ψ","\\Psi "],"\\omega ":["Ω","\\Omega "],"\\beta ":["Β",'{\\char"392}'],"\\nu ":["Ν",'{\\char"39D}'],"\\mu ":["Μ",'{\\char"39C}']},Qa={0:["\\emptyset","\\varnothing","\\infty",{latex:"#?_0",insert:"#@_0"},"\\circ","\\bigcirc","\\bullet"],2:["\\frac{1}{2}",{latex:"#?^2",insert:"#@^2"}],3:["\\frac{1}{3}",{latex:"#?^3",insert:"#@^3"}],".":[",",";","\\colon",{latex:":",aside:"ratio"},{latex:"\\cdotp",aside:"center dot",classes:"box"},{latex:"\\cdots",aside:"center ellipsis",classes:"box"},{latex:"\\ldotp",aside:"low dot",classes:"box"},{latex:"\\ldots",aside:"low ellipsis",classes:"box"},{latex:"\\vdots",aside:"",classes:"box"},{latex:"\\ddots",aside:"",classes:"box"},"\\odot","\\oslash","\\circledcirc"],"*":["\\cdot","\\ast","\\star","\\bigstar","\\ltimes","\\rtimes","\\rightthreetimes","\\leftthreetimes","\\intercal","\\prod",{latex:"\\prod_{n\\mathop=0}^{\\infty}",classes:"small"}],"+":["\\pm","\\mp","\\sum",{latex:"\\sum_{n\\mathop=0}^{\\infty}",classes:"small"},"\\dotplus","\\oplus"],"-":["\\pm","\\mp","\\ominus","\\vert #0 \\vert"],"/":["\\divideontimes","/","\\div"],"(":["\\left( #0\\right)","\\left[ #0\\right]","\\left\\{ #0\\right\\}","\\left\\langle #0\\right\\rangle","\\lfloor","\\llcorner","(","\\lbrack","\\lvert","\\lVert","\\lgroup","\\langle","\\lceil","\\ulcorner","\\lmoustache","\\lbrace"],")":["\\rfloor","\\lrcorner",")","\\rbrack","\\rvert","\\rVert","\\rgroup","\\rangle","\\rceil","\\urcorner","\\rmoustache","\\rbrace"],"=":["\\cong","\\asymp","\\equiv","\\differencedelta","\\varpropto","\\thickapprox","\\approxeq","\\thicksim","\\backsim","\\eqsim","\\simeq","\\Bumpeq","\\bumpeq","\\doteq","\\Doteq","\\fallingdotseq","\\risingdotseq","\\coloneq","\\eqcirc","\\circeq","\\triangleq","\\between"],"!=":["\\neq","\\ncong","","\\nsim"],"<":["\\leq","\\leqq","\\lneqq","\\ll","\\nless","\\nleq","\\precsim","\\lesssim","\\lessgtr","\\prec","\\preccurlyeq","\\lessdot","\\nprec"],">":["\\geq","\\geqq","\\gneqq","\\gg","\\ngtr","\\ngeq","\\succsim","\\gtrsim","\\gtrless","\\succ","\\succcurlyeq","\\gtrdot","\\nsucc"],set:["\\in","\\owns","\\subset","\\nsubset","\\supset","\\nsupset"],"!set":["\\notin","\\backepsilon"],subset:[],supset:[],infinity:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"],"numeric-pi":["\\prod","\\theta","\\rho","\\sin","\\cos","\\tan"],ee:["\\times 10^{#?}","\\ln","\\ln_{10}","\\log"],"^":["_{#?}"],int:[{latex:"\\int_{#?}^{#?}",classes:"small"},{latex:"\\int",classes:"small"},{latex:"\\smallint",classes:"small"},{latex:"\\iint",classes:"small"},{latex:"\\iiint",classes:"small"},{latex:"\\oint",classes:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",classes:"small"},{latex:"\\frac{\\partial}{\\partial x}",classes:"small"},"\\capitalDifferentialD","\\rd","\\partial"],nabla:["\\nabla\\times","\\nabla\\cdot","\\nabla^{2}"],"!":["!!","\\Gamma","\\Pi"],accents:["\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],b:[{latex:"\\beth",aside:"beth"}],B:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"}],d:[{latex:"\\daleth",aside:"daleth"}],D:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"}],g:[{latex:"\\gimel",aside:"gimel"}],G:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"}],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\N",aside:"set of natural numbers"}],p:[{latex:"\\P",aside:"set of primes"}],q:[{latex:"\\Q",aside:"set of rational numbers"}],r:[{latex:"\\R",aside:"set of real numbers"}],z:[{latex:"\\Z",aside:"set of integers"}],"x-var":["y","z","t","r",{latex:"f(#?)",classes:"small"},{latex:"g(#?)",classes:"small"},"x^2","x^n","x_n","x_{n+1}","x_i","x_{i+1}"],"n-var":["i","j","p","k","a","u"],ii:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"],logic:[{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},{latex:"\\ni",aside:"such that"},{latex:"\\Colon",aside:"such that"},{latex:"\\implies",aside:"implies"},{latex:"\\impliedby",aside:"implied by"},{latex:"\\iff",aside:"if and only if"},{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"},{latex:"\\therefore",aside:"therefore"},{latex:"\\because",aside:"because"},{latex:"^\\biconditional",aside:"biconditional"},"\\leftrightarrow","\\Leftrightarrow","\\to","\\models","\\vdash","\\gets","\\dashv","\\roundimplies"],"set-operators":["\\cap","\\cup","\\setminus","\\smallsetminus","\\complement"],"set-relations":["\\in","\\notin","\\ni","\\owns","\\subset","\\supset","\\subseteq","\\supseteq","\\subsetneq","\\supsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space
    ⁻³⧸₁₈ em"},{latex:'\\unicode{"203A}\\,\\unicode{"2039}',insert:"\\,",aside:"thin space
    ³⧸₁₈ em"},{latex:'\\unicode{"203A}\\:\\unicode{"2039}',insert:"\\:",aside:"medium space
    ⁴⧸₁₈ em"},{latex:'\\unicode{"203A}\\;\\unicode{"2039}',insert:"\\;",aside:"thick space
    ⁵⧸₁₈ em"},{latex:'\\unicode{"203A}\\ \\unicode{"2039}',insert:"\\ ",aside:"⅓ em"},{latex:'\\unicode{"203A}\\enspace\\unicode{"2039}',insert:"\\enspace",aside:"½ em"},{latex:'\\unicode{"203A}\\quad\\unicode{"2039}',insert:"\\quad",aside:"1 em"},{latex:'\\unicode{"203A}\\qquad\\unicode{"2039}',insert:"\\qquad",aside:"2 em"}],delete:[{label:'',command:'"deleteAll"'}],"->|":[]};let Ja={};const er={math:"\n
    \n
      \n
    • x
    • \n
    • n
    • \n
    • \n \n
    • \n
    • e
    • \n
    • i
    • \n
    • \n
    \n
      \n
    • <
    • \n
    • >
    • \n
    • \n \n
    • \n
    • x ²
    • \n
    • x
    • \n
    • \n
    \n
      \n
    • (
    • \n
    • )
    • \n
    • \n \n
    • \n
    • \n
    • \n
    \n \n
      \n
    • \n
    • \n
    • \n \n
    • \n \n
    \n
    \n ","lower-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ,
    • \n
    •  
    • \n \n
    \n
    ","upper-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ;
    • \n
    •  
    • \n \n
    \n
    ",symbols:"\n
    \n
      \n \n
    • {
    • \n
    • }
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • [
    • \n
    • ]
    • \n
    • \n
    • \n
    • \n
    • !
    • \n
    • o
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n\n
    • \n
    \n
      \n \n
    • ,
    • \n
    • \n
    • :
    • \n
    • \n
    • \n
    • \n
    • ±
    • \n \n
    \n
    ","lower-greek":"\n
    \n
    • φ
    • \n
    • ς
    • \n
    • ϵ
    • \n
    • ρ
    • \n
    • τ
    • \n
    • υ
    • \n
    • θ
    • \n
    • ι
    • \n
    • ο
    • \n
    • π
    • \n
    \n
    • α
    • \n
    • σ
    • \n
    • δ
    • \n
    • ϕ
    • \n
    • γ
    • \n
    • η
    • \n
    • ξ
    • \n
    • κ
    • \n
    • λ
    • \n
    \n
    • \n
    • ζ
    • \n
    • χ
    • \n
    • ψ
    • \n
    • ω
    • \n
    • β
    • \n
    • ν
    • \n
    • μ
    • \n
    • \n
    \n
      \n
    •  
    • \n
    • ,
    • \n
    • ε
    • \n
    • ϑ
    • \n
    • ϰ
    • \n
    • ϖ
    • \n
    • ϱ
    • \n \n
    \n
    ","upper-greek":"\n
    \n
    • Φ
    • \n
    • Σ
    • \n
    • Ɛ
    • \n
    • Ρ
    • \n
    • Τ
    • \n
    • Υ
    • \n
    • Θ
    • \n
    • Ι
    • \n
    • Ο
    • \n
    • Π
    \n
    • Α
    • \n
    • Σ
    • \n
    • Δ
    • \n
    • Φ
    • \n
    • Γ
    • \n
    • Η
    • \n
    • Ξ
    • \n
    • Κ
    • \n
    • Λ
    \n
    • \n
    • Ζ
    • \n
    • Χ
    • \n
    • Ψ
    • \n
    • Ω
    • \n
    • Β
    • \n
    • Ν
    • \n
    • Μ
    • \n
    \n
      \n
    •  
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ","lower-command":"\n
    \n
    \n
    \n
    \n
      \n
    • 01#
    • \n
    • {
    • \n
    • }
    • \n
    • ^
    • \n
    • _
    • \n
    •  
    • \n \n
    \n
    ","upper-command":"\n
    \n
    \n
    \n
    \n
      \n
    • \n
    • [
    • \n
    • ]
    • \n
    • (
    • \n
    • )
    • \n
    •  
    • \n \n
    \n
    ","symbols-command":"\n
    \n
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 0
    \n
    • !
    • @
    • #
    • $
    • %
    • ^
    • &
    • *
    • +
    • =
    \n
      \n
    • \\
    • \n
    • |
    • \n
    • /
    • \n
    • `
    • \n
    • ;
    • \n
    • :
    • \n
    • ?
    • \n
    • '
    • \n
    • \"
    • \n
    • \n
    \n
      \n
    • abc
    • \n
    • <
    • \n
    • >
    • \n
    • ~
    • \n
    • ,
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ",functions:"\n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • (
    • \n
    • )
    • \n
    • \n
    • \n
    •  
    • \n \n
    \n
    ",style:"\n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n\n
    • \n
    • \n
    • \n
    • \n
    \n
    "};function tr(e,t,i){return e=e.replace(/(^|[^\\])#@/g,"$1#?"),D($(Oe({mathstyle:d.displaystyle,macros:i.config.macros},et(e,"math",t,i.config.macros)),"ML__base"),"ML__mathlive").toMarkup()}function ir(e,t,i){var a;let r="
    ";const n=t.replace(/\s+/g," ").split(" ");if(n.length>1){const t={...Za,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}};for(const e of n){if(!t[e])break;r+="
    "+t[e].label+"
    "}}return r+="
    ",r+=`\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n `,""}function ar(e,t,i){var a;for(let r=0;r"+n.getAttribute("data-aside").replace(/"/g,'"')+""),void 0!==o&&(n.innerHTML=e.config.createHTML(o)),n.getAttribute("data-classes")&&n.classList.add(n.getAttribute("data-classes"));const s=null===(a=n.getAttribute("data-insert"))||void 0===a?void 0:a.replace(/"/g,'"');let l;if(s&&Ya[s]&&(n.setAttribute("data-shifted",Ya[s][0]),n.setAttribute("data-shifted-command",JSON.stringify(["insertAndUnshiftKeyboardLayer",Ya[s][1]]))),l=n.getAttribute("data-command")?JSON.parse(n.getAttribute("data-command")):n.getAttribute("data-insert")?["insert",n.getAttribute("data-insert"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:n.getAttribute("data-latex")?["insert",n.getAttribute("data-latex"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:["typedText",n.getAttribute("data-key")||n.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}],i&&(l=[i,l]),n.getAttribute("data-alt-keys")){const e=Ja[n.getAttribute("data-alt-keys")];e&&(l={default:l,pressAndHoldStart:["showAlternateKeys",n.getAttribute("data-alt-keys"),e],pressAndHoldEnd:"hideAlternateKeys"})}vi(e,n,l)}}function rr(e,t){const i={qwerty:{"lower-1":"qwertyuiop","lower-2":" asdfghjkl ","lower-3":"^zxcvbnm~","upper-1":"QWERTYUIOP","upper-2":" ASDFGHJKL ","upper-3":"^ZXCVBNM~","numpad-1":"789/","numpad-2":"456*","numpad-3":"123-","numpad-4":"0.=+"},azerty:{"lower-1":"azertyuiop","lower-2":"qsdfghjklm","lower-3":"^ wxcvbn ~","upper-1":"AZERTYUIOP","upper-2":"QSDFGHJKLM","upper-3":"^ WXCVBN ~"},qwertz:{"lower-1":"qwertzuiop","lower-2":" asdfghjkl ","lower-3":"^yxcvbnm~","upper-1":"QWERTZUIOP","upper-2":" ASDFGHJKL","upper-3":"^YXCVBNM~"},dvorak:{"lower-1":"^ pyfgcrl ","lower-2":"aoeuidhtns","lower-3":"qjkxbmwvz~","upper-1":"^ PYFGCRL ","upper-2":"AOEUIDHTNS","upper-3":"QJKXBMWVZ~"},colemak:{"lower-1":" qwfpgjluy ","lower-2":"arstdhneio","lower-3":"^zxcvbkm~","upper-1":" QWFPGNLUY ","upper-2":"ARSTDHNEIO","upper-3":"^ZXCVBKM~"}},a=i[e.config.virtualKeyboardLayout]?i[e.config.virtualKeyboardLayout]:i.qwerty;let r,n=t;n=n.replace(//g,"\n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n
  • ");let o=n.match(/()/);for(;o;){r="";const e=o[2].match(/[a-zA-Z][a-zA-Z0-9-]*=(['"])(.*?)\1/g),t={};for(const i of e){const e=i.match(/([a-zA-Z][a-zA-Z0-9-]*)=(['"])(.*?)\2/);t[e[1]]=e[3]}let s=a[t.name];if(s||(s=i.qwerty[t.name]),s)for(const e of s){let i=t.class||"";i&&(i=" "+i),"~"===e?(r+="
  • \'\n data-shifted-command=\'"deleteAll"\'\n data-alt-keys=\'delete\' data-command=\'["performWithFeedback","deletePreviousChar"]\'\n >⌫
  • '):" "===e?r+="
  • ":"^"===e?r+="
  • ":"/"===e?r+="
  • ÷
  • ":"*"===e?r+="
  • ×
  • ":"-"===e?r+="
  • ":/tt/.test(i)?r+="
  • '+e+"
  • ":r+="
  • "+e+"
  • "}n=n.replace(new RegExp(o[1]+o[2]+o[3]),r),o=n.match(/()/)}return n}function nr(e){const t=document.getElementById("mathlive-alternate-keys-panel");return t&&(t.classList.remove("is-visible"),t.innerHTML="",fi(t)),!1}function or(e){const t=e.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(let i=0;ili{display:flex;flex-flow:column;align-items:center;justify-content:center;font-size:30px;height:70px;width:70px;box-sizing:border-box;margin:0;background:transparent;border:1px solid transparent;border-radius:5px;pointer-events:all;color:var(--keyboard-alternate-text);fill:currentColor}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys ul>li{font-size:24px;height:50px;width:50px}}.ML__keyboard.alternate-keys ul>li.active,.ML__keyboard.alternate-keys ul>li.pressed,.ML__keyboard.alternate-keys ul>li:hover{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);background:var(--keyboard-alternate-background-active);color:var(--keyboard-text-active)}.ML__keyboard.alternate-keys ul>li.small{font-size:18px}.ML__keyboard.alternate-keys ul>li.small-button{width:42px;height:42px;margin:2px;background:#fbfbfb}.ML__keyboard.alternate-keys ul>li.small-button:hover{background:var(--keyboard-alternate-background-active)}.ML__keyboard.alternate-keys ul>li.box>div,.ML__keyboard.alternate-keys ul>li.box>span{border:1px dashed rgba(0,0,0,.24)}.ML__keyboard.alternate-keys ul>li .warning{min-height:60px;min-width:60px;background:#cd0030;color:#fff;padding:5px;display:flex;align-items:center;justify-content:center;border-radius:5px}.ML__keyboard.alternate-keys ul>li .warning.active,.ML__keyboard.alternate-keys ul>li .warning.pressed,.ML__keyboard.alternate-keys ul>li .warning:hover{background:red}.ML__keyboard.alternate-keys ul>li .warning svg{width:50px;height:50px}.ML__keyboard.alternate-keys ul>li aside{font-size:12px;line-height:12px;opacity:.78;padding-top:2px}.ML__keyboard>div.keyboard-layer{display:none;outline:none}.ML__keyboard>div.keyboard-layer.is-visible{display:flex;flex-flow:column}.ML__keyboard>div>div.keyboard-toolbar{align-self:center;display:flex;flex-flow:row;justify-content:space-between;width:736px}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard>div>div.keyboard-toolbar{width:556px}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar{width:365px;max-width:100vw}}.ML__keyboard>div>div.keyboard-toolbar svg{height:20px;width:20px}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar svg{height:13px;width:17px}}.ML__keyboard>div>div.keyboard-toolbar>.left{position:relative;display:flex;justify-content:flex-start;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>.right{display:flex;justify-content:flex-end;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>div>div{display:flex;align-items:baseline;justify-content:center;pointer-events:all;color:var(--keyboard-text);fill:currentColor;background:0;font-size:110%;cursor:pointer;min-height:0;padding:4px 10px;margin:7px 4px 6px;box-shadow:none;border:none;border-bottom:2px solid transparent}.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled.pressed svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled:hover svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled svg{color:var(--keyboard-text);opacity:.2}@media only screen and (max-width:414px){.ML__keyboard>div>div.keyboard-toolbar>div>div{font-size:100%;padding:0 6px 0 0}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar>div>div{padding-left:4px;padding-right:4px;font-size:90%}}.ML__keyboard>div>div.keyboard-toolbar>div>div.active,.ML__keyboard>div>div.keyboard-toolbar>div>div.pressed,.ML__keyboard>div>div.keyboard-toolbar>div>div:active,.ML__keyboard>div>div.keyboard-toolbar>div>div:hover{color:var(--keyboard-text-active)}.ML__keyboard>div>div.keyboard-toolbar>div>div.selected{color:var(--keyboard-text-active);border-bottom:2px solid var(--keyboard-text-active);margin-bottom:8px;padding-bottom:0}.ML__keyboard div .rows{border:0;border-collapse:separate;clear:both;margin:auto;display:flex;flex-flow:column;align-items:center}.ML__keyboard div .rows>ul{list-style:none;height:40px;margin:0 0 3px;padding:0}.ML__keyboard div .rows>ul>li{display:flex;flex-flow:column;align-items:center;justify-content:center;width:34px;margin-right:2px;height:40px;box-sizing:border-box;padding:8px 0;vertical-align:top;text-align:center;float:left;color:var(--keycap-text);fill:currentColor;font-size:20px;background:var(--keycap-background);border:1px solid var(--keycap-background-border);border-bottom-color:var(--keycap-background-border-bottom);border-radius:5px;pointer-events:all;position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ML__keyboard div .rows>ul>li:last-child{margin-right:0}.ML__keyboard div .rows>ul>li.small{font-size:16px}.ML__keyboard div .rows>ul>li.tt{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.bottom{justify-content:flex-end}.ML__keyboard div .rows>ul>li.left{align-items:flex-start;padding-left:4px}.ML__keyboard div .rows>ul>li.right{align-items:flex-end;padding-right:4px}.ML__keyboard div .rows>ul>li svg{width:20px;height:20px}.ML__keyboard div .rows>ul>li .warning{height:25px;width:25px;min-height:25px;min-width:25px;background:#cd0030;color:#fff;border-radius:100%;padding:5px;display:flex;align-items:center;justify-content:center;margin-bottom:-2px}.ML__keyboard div .rows>ul>li .warning svg{width:16px;height:16px}@media only screen and (max-width:768px){.ML__keyboard div .rows>ul>li .warning{height:16px;width:16px;min-height:16px;min-width:16px}.ML__keyboard div .rows>ul>li .warning svg{width:14px;height:14px}}.ML__keyboard div .rows>ul>li>.w0{width:0}.ML__keyboard div .rows>ul>li>.w5{width:16px}.ML__keyboard div .rows>ul>li>.w15{width:52px}.ML__keyboard div .rows>ul>li>.w20{width:70px}.ML__keyboard div .rows>ul>li>.w50{width:178px}.ML__keyboard div .rows>ul>li.separator{background:transparent;border:none;pointer-events:none}@media only screen and (max-width:560px){.ML__keyboard div .rows>ul>li.if-wide{display:none}}.ML__keyboard div .rows>ul>li.tex-math{font-size:25px}.ML__keyboard div .rows>ul>li.pressed,.ML__keyboard div .rows>ul>li:hover{background:var(--keycap-background-active);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.active,.ML__keyboard div .rows>ul>li.action:active,.ML__keyboard div .rows>ul>li.keycap.active,.ML__keyboard div .rows>ul>li.keycap:active{transform:translateY(-20px) scale(1.4);z-index:calc(var(--ML_keyboard-zindex, 105) - 5);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.modifier.active,.ML__keyboard div .rows>ul>li.modifier:active{background:var(--keyboard-text-active);color:var(--keycap-text-active)}.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:18px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:16px}}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton,.ML__keyboard div .rows>ul>li.fnbutton{font-size:12px}}.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:14px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:9px}}.ML__keyboard div .rows>ul>li.action,.ML__keyboard div .rows>ul>li.modifier{background-color:var(--keycap-modifier-background);border-bottom-color:var(--keycap-modifier-border);border-color:var(--keycap-modifier-border) var(--keycap-modifier-border) var(--keycap-modifier-border-bottom);font-size:65%;font-weight:100}.ML__keyboard div .rows>ul>li.action.selected,.ML__keyboard div .rows>ul>li.modifier.selected{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.selected.active,.ML__keyboard div .rows>ul>li.action.selected.pressed,.ML__keyboard div .rows>ul>li.action.selected:active,.ML__keyboard div .rows>ul>li.action.selected:hover,.ML__keyboard div .rows>ul>li.modifier.selected.active,.ML__keyboard div .rows>ul>li.modifier.selected.pressed,.ML__keyboard div .rows>ul>li.modifier.selected:active,.ML__keyboard div .rows>ul>li.modifier.selected:hover{color:#fff}.ML__keyboard div .rows>ul>li.keycap.w50{font-size:80%;padding-top:10px;font-weight:100}.ML__keyboard div .rows>ul>li small{color:#555}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li small{font-size:9px}}.ML__keyboard div .rows>ul>li aside{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:10px;line-height:10px;color:#666}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li aside{display:none}}@media only screen and (max-width:414px){.ML__keyboard div .rows>ul>li{width:29px;margin-right:2px}.ML__keyboard div .rows>ul>.w5{width:13.5px}.ML__keyboard div .rows>ul>.w15{width:44.5px}.ML__keyboard div .rows>ul>.w20{width:60px}.ML__keyboard div .rows>ul>.w50{width:153px}}@media only screen and (min-width:415px) and (max-width:768px){.ML__keyboard div .rows>ul>li{width:37px;margin-right:3px}.ML__keyboard div .rows>ul>.w5{width:17px}.ML__keyboard div .rows>ul>.w15{width:57px}.ML__keyboard div .rows>ul>.w20{width:77px}.ML__keyboard div .rows>ul>.w50{width:197px}}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:51px;margin-right:4px}.ML__keyboard div .rows>ul>.w5{width:23.5px}.ML__keyboard div .rows>ul>.w15{width:78.5px}.ML__keyboard div .rows>ul>.w20{width:106px}.ML__keyboard div .rows>ul>.w50{width:271px}}@media only screen and (min-width:1025px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:66px;margin-right:6px}.ML__keyboard div .rows>ul>.action,.ML__keyboard div .rows>ul>.modifier{font-size:80%}.ML__keyboard div .rows>ul>.w5{width:30px}.ML__keyboard div .rows>ul>.w15{width:102px}.ML__keyboard div .rows>ul>.w20{width:138px}.ML__keyboard div .rows>ul>.w50{width:354px}}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}div.ML__keyboard.material{--keyboard-background:rgba(209,213,217,0.9);--keyboard-background-border:#ddd;--keycap-background:transparent;--keycap-background-active:#cccfd1;--keycap-background-border:transparent;--keyboard-alternate-background:#efefef;--keyboard-alternate-text:#000;font-family:Roboto,sans-serif}div.ML__keyboard.material.alternate-keys{background:var(--keyboard-alternate-background);border:1px solid transparent;border-radius:5px;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}div.ML__keyboard.material.alternate-keys ul li.active,div.ML__keyboard.material.alternate-keys ul li.pressed,div.ML__keyboard.material.alternate-keys ul li:active,div.ML__keyboard.material.alternate-keys ul li:hover{border:1px solid transparent;background:#5f97fc;color:#fff;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>div{font-size:16px}div.ML__keyboard.material .keyboard-toolbar div.div.active,div.ML__keyboard.material .keyboard-toolbar div.div.pressed,div.ML__keyboard.material .keyboard-toolbar div div:active,div.ML__keyboard.material .keyboard-toolbar div div:hover{color:#5f97fc;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>.selected{color:#5f97fc;fill:currentColor;border-bottom:2px solid #5f97fc;margin-bottom:8px;padding-bottom:0}div.ML__keyboard.material div>.rows>ul>.keycap{background:transparent;border:1px solid transparent;border-radius:5px;color:var(--keycap-text);fill:currentColor;transition:none}div.ML__keyboard.material div>.rows>ul>.keycap.tt{color:#5f97fc}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]{margin-top:10px;margin-bottom:10px;height:20px;background:#e0e0e0}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].pressed,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:hover{background:#d0d0d0;box-shadow:none;transform:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):hover{border:1px solid transparent;background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{background:var(--keyboard-alternate-background);color:var(--keyboard-alternate-text);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);font-size:10px;vertical-align:top;width:19.5px;margin-right:10px;margin-left:10px;transform:translateY(-20px) scale(2);transition:none;justify-content:flex-start;padding:2px 0 0;z-index:calc(var(--ML_keyboard-zindex, 105) - 5)}}@media only screen and (max-width:414px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{width:16.5px}}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:last-child.active,div.ML__keyboard.material div>.rows>ul>.keycap:last-child:active{margin-right:0;margin-left:14px}}div.ML__keyboard.material div div.rows ul li.action,div.ML__keyboard.material div div.rows ul li.modifier{background:transparent;border:0;color:#869096;fill:currentColor;font-size:16px;transition:none}div.ML__keyboard.material div div.rows ul li.action.selected,div.ML__keyboard.material div div.rows ul li.modifier.selected{color:#5f97fc;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.action.active,div.ML__keyboard.material div div.rows ul li.action.pressed,div.ML__keyboard.material div div.rows ul li.action:active,div.ML__keyboard.material div div.rows ul li.action:hover,div.ML__keyboard.material div div.rows ul li.modifier.active,div.ML__keyboard.material div div.rows ul li.modifier.pressed,div.ML__keyboard.material div div.rows ul li.modifier:active,div.ML__keyboard.material div div.rows ul li.modifier:hover{border:0;color:var(--keycap-text);background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div div.rows ul li.bigfnbutton,div.ML__keyboard.material div div.rows ul li.fnbutton{background:transparent;border:0}div.ML__keyboard.material div div.rows ul li.bigfnbutton.selected,div.ML__keyboard.material div div.rows ul li.fnbutton.selected{color:#5f97fc;fill:currentColor;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.bigfnbutton.active,div.ML__keyboard.material div div.rows ul li.bigfnbutton.pressed,div.ML__keyboard.material div div.rows ul li.bigfnbutton:active,div.ML__keyboard.material div div.rows ul li.bigfnbutton:hover,div.ML__keyboard.material div div.rows ul li.fnbutton.active,div.ML__keyboard.material div div.rows ul li.fnbutton.pressed,div.ML__keyboard.material div div.rows ul li.fnbutton:active,div.ML__keyboard.material div div.rows ul li.fnbutton:hover{border:0;color:#5f97fc;fill:currentColor;background:var(--keycap-background-active);box-shadow:none}@media (prefers-color-scheme:dark){body:not([theme=light]) div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}'),Qa["foreground-color"]=[];for(const e of ge)Qa["foreground-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"color":"'+e+'"}]'});Qa["background-color"]=[];for(const e of fe)Qa["background-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"backgroundColor":"'+e+'"}]'});Ja={...Qa},Object.keys(Ja).forEach(e=>{Ja[e]=Ja[e].slice()});for(let e=0;e<26;e++){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[e];Ja[t]||(Ja[t]=[]),Ja[t].unshift({latex:"\\mathbb{"+t+"}",aside:"blackboard",insert:"\\mathbb{"+t+"}"}),Ja[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Ja[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Ja[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Ja[t].unshift({latex:"\\mathcal{"+t+"}",aside:"calligraphy",insert:"\\mathcal{"+t+"}"}),Ja[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<=26;e++){const t="abcdefghijklmnopqrstuvwxyz"[e];Ja[t]||(Ja[t]=[]),Ja[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Ja[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Ja[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Ja[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<10;e++){const t="0123456789"[e];Ja[t]||(Ja[t]=[]),Ja[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Ja[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Ja[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Ja[t].unshift({latex:"\\mathcal{"+t+"}",aside:"script",insert:"\\mathcal{"+t+"}"}),Ja[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}let n=e.config.virtualKeyboards;n||(n="all"),n=n.replace(/\ball\b/i,"numeric functions symbols roman greek");const o={...er,...null!==(i=e.config.customVirtualKeyboardLayers)&&void 0!==i?i:{}},s={...Za,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}},l=n.replace(/\s+/g," ").split(" ");for(const t of l){if(!s[t])break;let i=s[t].layers||[];s[t].layer&&i.push(s[t].layer),i=Array.from(new Set(i));for(const a of i){if(!o[a])break;if("object"==typeof o[a]){let e="";if(o[a].styles&&(e+=``),o[a].backdrop&&(e+=`
    `),o[a].container&&(e+=`
    `),o[a].rows){e+="
    ";for(const t of o[a].rows){e+="
      ";for(const i of t)e+="${i.label?i.label:""}`;e+="
    "}e+="
    "}o[a].container&&(e+="
    "),o[a].backdrop&&(e+="
    "),o[a]=e}r+="
    ",r+=ir(e,n,t);const i="function"==typeof o[a]?o[a]():o[a];r+=rr(e,i),r+="
    "}}const c=document.createElement("div");c.className="ML__keyboard",t?c.classList.add(t):e.config.virtualKeyboardTheme&&c.classList.add(e.config.virtualKeyboardTheme),c.innerHTML=e.config.createHTML(r),ar(e,[].slice.call(c.querySelectorAll(".keycap, .action, .fnbutton, .bigfnbutton")));const d=c.getElementsByClassName("layer-switch");for(let t=0;t{e.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),e.addEventListener("touchstart",e=>{e.preventDefault(),e.stopPropagation()},{passive:!1})}),m[0].classList.add("is-visible"),window.addEventListener("mouseup",(function(){nr(),or(e)})),window.addEventListener("blur",(function(){nr(),or(e)})),window.addEventListener("touchend",(function(){nr(),or(e)})),window.addEventListener("touchcancel",(function(){nr(),or(e)})),c}(e,t),pi(e.virtualKeyboard,"touchstart:passive mousedown",()=>{e.$focus()}),document.body.appendChild(e.virtualKeyboard)),window.setTimeout(()=>{e.virtualKeyboard.classList.add("is-visible")},1)):e.virtualKeyboard&&e.virtualKeyboard.classList.remove("is-visible"),"function"==typeof e.config.onVirtualKeyboardToggle&&e.config.onVirtualKeyboardToggle(e,e.virtualKeyboardVisible,e.virtualKeyboard),!1}Gi({showAlternateKeys:(e,t,i)=>{const a=hi("mathlive-alternate-keys-panel","ML__keyboard alternate-keys");e.virtualKeyboard.classList.contains("material")&&a.classList.add("material"),i.length>=7?a.style.width="286px":4===i.length||2===i.length?a.style.width="146px":1===i.length?a.style.width="86px":a.style.width="146px",a.style.height="auto";let r="";for(const e of i)r+="";r="
      "+r+"
    ",a.innerHTML=e.config.createHTML(r),ar(e,[].slice.call(a.getElementsByTagName("li")),"performAlternateKeys");const n=e.virtualKeyboard.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys="'+t+'"]').getBoundingClientRect();if(n){n.top-a.clientHeight<0&&(a.style.width="auto",i.length<=6?a.style.height="56px":i.length<=12?a.style.height="108px":a.style.height="205px");const e=(n.top-a.clientHeight+5).toString()+"px",t=Math.max(0,Math.min(window.innerWidth-a.offsetWidth,(n.left+n.right-a.offsetWidth)/2))+"px";a.style.transform="translate("+t+","+e+")",a.classList.add("is-visible")}return!1}},{target:"virtual-keyboard"}),Gi({shiftKeyboardLayer:e=>{const i=e.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(i)for(let a=0;anr(),performAlternateKeys:(e,t)=>(nr(),e.$perform(t)),switchKeyboardLayer:(e,t)=>lr(e,t),unshiftKeyboardLayer:e=>or(e),insertAndUnshiftKeyboardLayer:(e,t)=>(e.$insert(t),or(e),!0)},{target:"virtual-keyboard"}),Gi({toggleVirtualKeyboardAlt:e=>{let t=!1;return e.virtualKeyboard&&(t=e.virtualKeyboard.classList.contains("material"),e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),cr(e,t?"":"material"),!1},toggleVirtualKeyboardShift:e=>{var t,i;e.config.virtualKeyboardLayout={qwerty:"azerty",azerty:"qwertz",qwertz:"dvorak",dvorak:"colemak",colemak:"qwerty"}[e.config.virtualKeyboardLayout];const a=null!==(i=null===(t=e.virtualKeyboard)||void 0===t?void 0:t.querySelector("div.keyboard-layer.is-visible").id)&&void 0!==i?i:"";return e.virtualKeyboard&&(e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),cr(e),a&&lr(e,a),!1}},{target:"virtual-keyboard"}),Gi({toggleVirtualKeyboard:(e,t)=>mr(e,t),hideVirtualKeyboard:e=>dr(e),showVirtualKeyboard:(e,t)=>cr(e,t)},{target:"virtual-keyboard"});var pr='.ML__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__base{visibility:inherit;display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--ml_text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__mathlive{display:inline-block;line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-family:KaTeX_Main;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em;box-sizing:content-box}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .stretchy{display:block;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;position:absolute;width:50.2%;overflow:hidden}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;position:absolute;left:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-2-of-3{display:inline-flex;position:absolute;left:25%;width:50%;overflow:hidden}.ML__mathlive .slice-3-of-3{display:inline-flex;position:absolute;right:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-1-of-1{display:inline-flex;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .op-over-under{position:relative}.ML__mathlive .op-over-under>.vlist>span:first-child,.ML__mathlive .op-over-under>.vlist>span:last-child{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{font-family:KaTeX_Main;width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__placeholder{opacity:.7;padding-left:.4ex;padding-right:.4ex;padding-top:.4ex}';const ur="Nothing",hr="Group",fr="Multiply",gr="Power",yr="Divide",br="Add",vr="Negate";function xr(e,t){return e[t]&&!("isConstant"in e[t])?e[t]:null}const kr={arithmetic:{PI:{wikidata:"Q167",isConstant:!0,domain:"R+"},Abs:{wikidata:"Q3317982",isPure:!0,isListable:!0,isIdempotent:!0},Add:{wikidata:"Q32043",isAssociative:!0,isCommutative:!0,isListable:!0,isIdempotent:!0,isPure:!0},Chop:{isAssociative:!0,isListable:!0,isPure:!0,isIdempotent:!0},Ceil:{isPure:!0},Equal:{wikidata:"Q842346",isPure:!0},E:{isConstant:!0,value:{num:"2.7182818284590452354"}},Exp:{isPure:!0},Exp2:{isPure:!0},Exp10:{isPure:!0},Erf:{isPure:!0},Erfc:{isPure:!0},ExpMinusOne:{isPure:!0},Factorial:{wikidata:"Q120976",isPure:!0},Floor:{isPure:!0},Gamma:{isPure:!0},LogGamma:{isPure:!0},Log:{isPure:!0},Log2:{isPure:!0},Log10:{isPure:!0},LogOnePlus:{isPure:!0},MachineEpsilon:{isConstant:!0,value:{num:"2.220446049250313e-16"}},Multiply:{wikidata:"Q40276",isAssociative:!0,isCommutative:!0,isIdempotent:!0,isPure:!0},NotEqual:{wikidata:"Q28113351",isCommutative:!0,isPure:!0},Negate:{wikidata:"Q715358",isPure:!0},Power:{wikidata:"Q33456",isCommutative:!1,isPure:!0},Round:{isPure:!0},SignGamma:{isPure:!0},Sqrt:{isPure:!0},Root:{isCommutative:!1,isPure:!0},Subtract:{wikidata:"Q32043",isCommutative:!1,isPure:!0}},algebra:{},calculus:{},combinatorics:{},complex:{},core:{Evaluate:{},Group:{domain:"expression",isListable:!0,isPure:!1},Latex:{domain:"string",isListable:!1,isPure:!0},String:{domain:"string",isListable:!0,isPure:!0}},dimensions:{},lists:{},logic:{},inequalities:{},intervals:{},"linear-algebra":{},numeric:{},other:{},polynomials:{},physics:{"mu-0":{isConstant:!0,wikidata:"Q1515261",domain:"R+",value:125663706212e-17,unit:[fr,"H",[gr,"m",-1]]}},quantifiers:{},relations:{},rounding:{},sets:{CartesianProduct:{wikidata:"Q173740"},Intersection:{wikidata:"Q185359"},Complement:{wikidata:"Q242767"},Union:{wikidata:"Q185359"},SymmetricDifference:{wikidata:"Q1147242"}},statistics:{},transcendentals:{},trigonometry:{Arcosh:{isPure:!0},Arccos:{isPure:!0},Arcsin:{isPure:!0},Arctan:{isPure:!0},Arctan2:{isPure:!0},Arsinh:{isPure:!0},Artanh:{isPure:!0},Cos:{isPure:!0},Degrees:{isConstant:!0,value:{num:"0.017453292519943295769236907"}},FromPolarCoordinates:{isPure:!0},Haversine:{isPure:!0},Hypot:{isPure:!0},InverseHaversine:{isPure:!0},Sin:{isPure:!0},Sinh:{isPure:!0},Tan:{isPure:!0},Tanh:{isPure:!0},ToPolarCoordinates:{isPure:!0}},units:{}},_r={precision:15,decimalMarker:".",groupSeparator:"\\,",exponentProduct:"\\cdot",beginExponentMarker:"10^{",endExponentMarker:"}",arcSeparator:"\\,",notation:"auto",imaginaryNumber:"\\imaginaryI",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},wr={..._r,invisibleOperator:fr,skipSpace:!0,parseArgumentsOfUnknownLatexCommands:!0,parseNumbers:!0,promoteUnknownSymbols:/^[a-zA-Z]$/,promoteUnknownFunctions:/^[fg]$/,invisiblePlusOperator:br,preserveLatex:!1,dictionary:[]},Mr={..._r,invisibleMultiply:"",invisiblePlus:"",multiply:"\\times",dictionary:[]};function Sr(e){return Boolean(e)&&"object"==typeof e&&"num"in e}function zr(e){return Boolean(e)&&"object"==typeof e&&"sym"in e}function Lr(e){return Boolean(e)&&"object"==typeof e&&"fn"in e}function Ar(e){return"number"==typeof e?e:Sr(e)?parseFloat(e.num):Dr(e)===vr?-Ar(Nr(e,1)):NaN}function qr(e){if("number"==typeof e)return[e,1];if(Sr(e))return[Ar(e),1];if(Cr(e))return[NaN,NaN];const t=Dr(e);if(t===gr){const t=Ar(Nr(e,2));return 1===t?[Ar(Nr(e,1)),1]:-1===t?[1,Ar(Nr(e,1))]:[NaN,NaN]}return t===yr?[Ar(Nr(e,1)),Ar(Nr(e,2))]:t===fr&&Dr(Nr(e,2))===gr&&-1===Ar(Nr(Nr(e,2),2))?[Ar(Nr(e,1)),Ar(Nr(Nr(e,2),1))]:[NaN,NaN]}function $r(e){return Array.isArray(e)?e[0]:Lr(e)?e.fn[0]:null}function Cr(e){return null===e||!Array.isArray(e)&&("object"!=typeof e||!("fn"in e))}function Dr(e){const t=$r(e);return"string"==typeof t?t:""}function Tr(e){return"string"==typeof e?e:zr(e)?e.sym:null}function Er(e){return Array.isArray(e)?e.slice(1):Lr(e)?e.fn.slice(1):[]}function Kr(e,t){return Array.isArray(e)?e.map((e,i)=>0===i?e:t(e)):Lr(e)?e.fn.map((e,i)=>0===i?e:t(e)):e}function Nr(e,t){return Array.isArray(e)?e[t]:Lr(e)?e.fn[t]:null}function Or(e){return Array.isArray(e)?Math.max(0,e.length-1):Lr(e)?Math.max(0,e.fn.length-1):0}function Br(e,t){var i;let a=e;for(let e=0;e{const r=f(y(t,"variant").map(t=>{let r=t[0].variant;if(t[0].variantStyle&&"up"!==t[0].variantStyle&&(r+="-"+t[0].variantStyle),t.every(t=>{const i=re(t.symbol,e.mode,null);if(!i||!i.variant&&!i.variantStyle)return!1;let a=t.variant;return t.variantStyle&&"up"!==t.variantStyle&&(a+="-"+t.variantStyle),a===r}))return f(t.map(e=>e.toLatex(i)));let n="";return r&&r!==a&&(n={calligraphic:"\\mathcal{",fraktur:"\\mathfrak{","double-struck":"\\mathbb{",script:"\\mathscr{",monospace:"\\mathtt{","sans-serif":"\\mathsf{",normal:"\\mathrm{","normal-italic":"\\mathit{","normal-bold":"\\mathbf{","normal-bolditalic":"\\mathbfit{",ams:"","ams-italic":"\\mathit{","ams-bold":"\\mathbf{","ams-bolditalic":"\\mathbfit{",main:"","main-italic":"\\mathit{","main-bold":"\\mathbf{","main-bolditalic":"\\mathbfit{"}[r]),n+f(t.map(e=>e.toLatex(i)))+(n?"}":"")}));return!t[0].color||e&&e.color===t[0].color?r:"\\textcolor{"+ve(t[0].color)+"}{"+r+"}"}))},applyStyle:function(e,t){const i="auto"!==t.letterShapeStyle&&t.letterShapeStyle?t.letterShapeStyle:"tex";let a=t.variant||"normal",r=t.variantStyle||"";"normal"===a&&!r&&/\u00a3|\u0131|\u0237/.test(e.body)&&(a="main",r="italic"),"normal"!==a||r||1!==e.body.length||Ir.forEach((t,a)=>{t.test(e.body)&&"it"===Hr[i][a]&&(r="italic")}),"up"===r&&(r="");const n=r?a+"-"+r:a,[o,s]=Fr[n];return Pr[a]&&!Pr[a].test(e.body)?(e.body=Q(e.body,a,r),e.variant="",e.variantStyle="",null):(Rr.test(e.body)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),o)}});const Wr={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"};v("text",{emitLatexRun:function(e,t,i){const a=function(e,t,i){return f(y(t,"color").map(t=>{const i=function(e,t,i){return function(e,t,i){return f(y(t,"fontFamily").map(e=>{const t=function(e,t,i){return f(y(t,"fontSize").map(e=>{const t=function(e,t,i){return f(y(t,"fontSeries").map(e=>{const t=function(e,t,i){return f(y(t,"fontShape").map(e=>{const t=function(e,t,i){let a=!1;return f(t.map(e=>{let t="",i="";return e.latex?t=e.latex:"string"==typeof e.body?t=ee("text",e.body):e.symbol&&(t=e.symbol.replace(/\\/g,"\\backslash ")),!a||t&&!/^[a-zA-Z0-9*]/.test(t)||(i="{}"),a=/\\[a-zA-Z0-9]+\*?$/.test(t),i+t}))}(0,e);return"it"===e[0].fontShape?"\\textit{"+t+"}":"sl"===e[0].fontShape?"\\textsl{"+t+"}":"sc"===e[0].fontShape?"\\textsc{"+t+"}":"n"===e[0].fontShape?"\\textup{"+t+"}":e[0].fontShape?"\\fontshape{"+e[0].fontShape+"}"+t:t}))}(0,e);return"b"===e[0].fontSeries?"\\textbf{"+t+"}":"l"===e[0].fontSeries?"\\textlf{"+t+"}":"m"===e[0].fontSeries?"\\textmd{"+t+"}":e[0].fontSeries?"\\fontseries{"+e[0].fontSeries+"}"+t:t}))}(0,e),i={size1:"tiny",size2:"scriptsize",size3:"footnotesize",size4:"small",size5:"normalsize",size6:"large",size7:"Large",size8:"LARGE",size9:"huge",size10:"Huge"}[e[0].fontSize]||"";return i?"\\"+i+" "+t:t}))}(0,e),i={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[e[0].fontFamily]||"";return i?"\\"+i+"{"+t+"}":e[0].fontFamily?"\\fontfamily{"+e[0].fontFamily+"}"+t:t}))}(0,t)}(0,t);return!t[0].color||"none"===t[0].color||e&&e.color===t[0].color?i:"\\textcolor{"+ve(t[0].color)+"}{"+i+"}"}))}(e,t);return t.every(e=>e.fontSeries||e.fontShape||e.fontFamily)&&t[0].mode===e.mode?a:`\\text{${a}}`},applyStyle:function(e,t){const i=t.fontFamily;if(Wr[i]?e.classes+=" "+Wr[i]:i&&e.setStyle("font-family",i),t.fontShape&&(e.classes+=" "+({it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape]||"")),t.fontSeries){const i=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);i&&(e.classes+=" "+({ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[i[1]||""]||""),e.classes+=" "+({uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[i[2]||""]||""))}return"Main-Regular"},parse:(e,t,i)=>function(e,t,i){let a,r=[];for(;e.length>0;){const n=e.shift();if(""===n)a=new Be("text",""," ",i.style),a.symbol=" ",r.push(a);else if("\\"===n[0]){let t;e.unshift(n),[t,e]=i.parse("text",e,i),r=[...r,...t]}else if(1===n.length){const e=re(n,"text",i.macros);!e||e.mode&&!e.mode.includes("text")?t({code:"unexpected-token"}):(a=new Be("text",e?e.type:"",e?e.value:n,i.style),a.symbol=n,a.latex=X("text",n),r.push(a))}else if("<$>"===n||"<$$>"===n){const t=e.slice(0,e.findIndex(e=>e===n));e=e.slice(t.length+1);const[a]=i.parse("math",t,i);r=[...r,...a]}else"<{>"===n||"<}>"===n||t({code:"unexpected-token",arg:n})}return[r,e]}(e,t,i)[0]}),me(["ce","pu"],"{chemformula:balanced-string}",null,(e,t)=>({type:"group",mode:"chem",body:et(Ur.go(Vr.go(t[0],"\\pu"===e?"pu":"ce"))),latexOpen:"\\"+e+"{",latexClose:"}"}));var Vr={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var i,a="0",r={parenthesisLevel:0};e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var n=10,o=[];;){i!==e?(n=10,i=e):n--;var s=Vr.stateMachines[t],l=s.transitions[a]||s.transitions["*"];e:for(var c=0;c0))return o;if(m.revisit||(e=d.remainder),!m.toContinue)break e}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var i=0;i":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return Vr.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return Vr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return Vr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return Vr.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return Vr.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return Vr.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return Vr.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.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))/))return{match_:t[0],remainder:e.substr(t[0].length)};var i=Vr.patterns.findObserveGroups(e,"","$","$","");return i&&(t=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,i,a,r,n,o,s,l,c){var d=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var i=e.match(t);return i?i[0]:null},m=d(e,t);if(null===m)return null;if(e=e.substr(m.length),null===(m=d(e,i)))return null;var p=function(e,t,i){for(var a=0;t":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var i;if((e.d||"").match(/^[0-9]+$/)){var a=e.d;e.d=void 0,i=this.output(e),e.b=a}else i=this.output(e);return Vr.actions["o="](e,t),i},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var i=[];return Vr.concatArray(i,this.output(e)),Vr.concatArray(i,Vr.actions.bond(e,t,"-")),i}e.d=t},"- after o/d":function(e,t,i){var a=Vr.patterns.match_("orbital",e.o||""),r=Vr.patterns.match_("one lowercase greek letter $",e.o||""),n=Vr.patterns.match_("one lowercase latin letter $",e.o||""),o=Vr.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(a&&""===a.remainder||r||n||o);!s||e.a||e.b||e.p||e.d||e.q||a||!n||(e.o="$"+e.o+"$");var l=[];return s?(Vr.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(a=Vr.patterns.match_("digits",e.d||""),i&&a&&""===a.remainder?(Vr.concatArray(l,Vr.actions["d="](e,t)),Vr.concatArray(l,this.output(e))):(Vr.concatArray(l,this.output(e)),Vr.concatArray(l,Vr.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:Vr.go(t,"o")}},comma:function(e,t){var i=t.replace(/\s*$/,"");return i!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(e,t,i){var a,r,n;for(var o in e.r?(r="M"===e.rdt?Vr.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:Vr.go(e.rd),n="M"===e.rqt?Vr.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:Vr.go(e.rq),a={type_:"arrow",r:e.r,rd:r,rq:n}):(a=[],(e.a||e.b||e.p||e.o||e.q||e.d||i)&&(e.sb&&a.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===i?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&Vr.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),a.push({type_:"chemfive",a:Vr.go(e.a,"a"),b:Vr.go(e.b,"bd"),p:Vr.go(e.p,"pq"),o:Vr.go(e.o,"o"),q:Vr.go(e.q,"pq"),d:Vr.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType}))),e)"parenthesisLevel"!==o&&"beginsWithBond"!==o&&delete e[o];return a},"oxidation-output":function(e,t){var i=["{"];return Vr.concatArray(i,Vr.go(t,"oxidation")),i.push("}"),i},"frac-output":function(e,t){return{type_:"frac-ce",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:Vr.go(t[0]),p2:Vr.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Vr.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,i){return{type_:"operator",kind_:i||t}}}},a:{transitions:Vr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Vr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var i in e)delete e[i];return t}}}},pq:{transitions:Vr.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:Vr.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Vr.go(t[1],"pq")}}}},bd:{transitions:Vr.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Vr.go(t[1],"bd")}}}},oxidation:{transitions:Vr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"tex-math tight":{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"9,9":{transitions:Vr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),t[1]&&(Vr.concatArray(i,Vr.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?Vr.concatArray(i,Vr.go(t[2],"pu-9,9")):i.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?i.push({type_:"cdot"}):i.push({type_:"times"}))),t[3]&&i.push("10^{"+t[5]+"}"),i},"number^":function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),Vr.concatArray(i,Vr.go(t[1],"pu-9,9")),i.push("^{"+t[2]+"}"),i},operator:function(e,t,i){return{type_:"operator",kind_:i||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,i=Vr.patterns.match_("{(...)}",e.d||"");i&&""===i.remainder&&(e.d=i.match_);var a=Vr.patterns.match_("{(...)}",e.q||"");if(a&&""===a.remainder&&(e.q=a.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:Vr.go(e.d,"pu"),q:Vr.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:r.d,p2:r.q}:(t=r.d,r.d.length>1||r.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),Vr.concatArray(t,r.q))}else t=Vr.go(e.d,"pu-2");for(var n in e)delete e[n];return t}}},"pu-2":{transitions:Vr.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var i=Vr.patterns.match_("{(...)}",e.rm||"");t=i&&""===i.remainder?Vr.go(i.match_,"pu"):{type_:"rm",p1:e.rm}}for(var a in e)delete e[a];return t}}},"pu-9,9":{transitions:Vr.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var i=e.text_.length%3;0===i&&(i=3);for(var a=e.text_.length-3;a>0;a-=3)t.push(e.text_.substr(a,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,i)),t.reverse()}else t.push(e.text_);for(var r in e)delete e[r];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var i=e.text_.length-3,a=0;a":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function jr(e,t){return t>1?"solidus":"radical"}function Gr(e,t,i,a){if(i>=20)return[e,null];let r=[],n=[null!=e?e:ur],o=!1;for(;!o;){t.skipSpace();const e=t.matchExpression(20);null===e?(t.skipSpace(),t.match(",")?n.push(ur):o=!0):("Sequence"===Dr(e)?n=n.concat(Er(e)):n.push(e),t.skipSpace(),t.match(",")?t.skipSpace():t.match(";")?(r.push(["Subsequence",...n]),n=[]):o=!0)}return 0===r.length?r=n:r.push(["Subsequence",...n]),[null,["Subsequence",...r]]}function Xr(e,t){return"Sequence"===Dr(t)&&Er(t).some(e=>"Subsequence"===Dr(e))?Er(t).map(t=>e.emit(t)).join("; "):Er(t).map(t=>e.emit(t)).join(", ")}function Zr(e,t){const i=Jr(e),a=Jr(t);if(ia)return 1;let r=tn(e);isNaN(r)&&(r=Number(1/0));let n=tn(t);if(isNaN(n)&&(n=Number(1/0)),rn)return 1;const o=en(e),s=en(t);if(o===s)for(let i=1;i<=o;i++){const a=Zr(Nr(e,i),Nr(t,i));if(0!==a)return a}return s-o}function Yr(e,t){if(0===e)return-1/0;const i=Dr(e);if(i===gr){const t=Ar(Nr(e,2));return isFinite(t)?t:0}if(i===fr){let i=0;return Er(e).forEach(e=>{i+=Yr(e,t)}),i}return t.includes(Tr(e))?1:0}function Qr(e,t){const i=Dr(e);if(i===gr){if(Tr(Nr(e,1))===t){const t=Ar(Nr(e,2));if(isFinite(t))return t}return 0}if(i===fr){let i=0;for(const a of Er(e))i+=Qr(a,t);return i}return Tr(e)===t?1:0}function Jr(e){return $r(e)?Er(e).map(Jr).join(" "):"string"==typeof e?e:zr(e)?e.sym:""}function en(e){return $r(e)?Er(e).map(en).reduce((e,t)=>e+t,0):"string"==typeof e||Tr(e)?1:0}function tn(e){return $r(e)?NaN:"number"==typeof e?e:Sr(e)?Ar(e):0}function an(e){const t=$r(e);return t?t===hr&&1===Or(e)?an(Nr(e,1)):Kr(e,an):e}function rn(e){if(null===e)return null;const t=$r(e=an(e));return t===gr&&2===Or(e)?[gr,Nr(e,1),nn(Nr(e,2))]:t===yr&&2===Or(e)?[fr,[gr,Nr(e,1),-1],Nr(e,2)]:[gr,e,-1]}function nn(e){if(null===e)return e;if("number"==typeof(e=an(e)))e=-e;else if(e&&Sr(e))e="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num};else{const t=Dr(e),i=Or(e);if(t===vr&&1===i)return Nr(e,1);if(t===fr){let t=Nr(e,1);return t="number"==typeof t?-t:Sr(t)?"-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}:[vr,t],[fr,t,...Er(e).slice(1)]}if(t===hr&&1===i)return nn(Nr(Nr(e,1),1));e=[vr,e]}return e}function on(e,t){const i=$r(e);if(!i)return e;if(e=Kr(e,e=>on(e,t)),i!==t)return e;const a=Er(e);let r=[];for(let e=0;esn(e,t));let a=Er(t=on(an(t),br));a=a.map(t=>sn(e,t)).filter(e=>0!==Ar(e));const r=a.length;return 0===r?0:1===r?a[0]:[br,...a]}function ln(e,t){const i=$r(t);if(!i)return t;if(i!==yr)return Kr(t,t=>ln(e,t));if(2!==Or(t))return t;const a=ln(e,Nr(t,1)),r=ln(e,Nr(t,2));return 1===Ar(r)?a:[fr,a,rn(r)]}function cn(e,t){const i=$r(t);return i?"Exp"!==i?Kr(t,t=>cn(e,t)):1!==Or(t)?t:[gr,"E",cn(e,Nr(t,1))]:t}function dn(e,t){var i;if(Cr(t))return t;const a=Dr(t),r="List"===a,n=xr(e,a),o=null!==(i=null==n?void 0:n.sequenceHold)&&void 0!==i&&i,s=Er(t),l=[];for(let i of s){i=dn(e,i);const a=Dr(i);if("Identity"===a){const e=Nr(i,1);null!=e&&l.push(e)}else if(a===ur)r||l.push(i);else if("Sequence"!==a||o)l.push(i);else{const e=$r(t);for(const t of Er(i))"Subsequence"===Dr(t)?l.push([e,...Er(t)]):l.push(t)}}return[$r(t),...l]}function mn(e){const t=Dr(e);if("Sqrt"===t)return 2;if("Root"===t)return Ar(Nr(e,2));if(t!==gr)return 1;const i=Nr(e,2);if(!i)return 1;if(Dr(i)===gr&&-1===Ar(Nr(i,2))){const e=Ar(Nr(i,1));if(isFinite(e))return e}return 1}function pn(e,t){const i=$r(t);if(!i)return t;if(t=Kr(t,t=>pn(e,t)),i!==fr)return t;t=on(an(t),fr);const[a,r]=function(e){const t=Er(e),i=[],a=[];for(const e of t)2===mn(e)?i.push(Nr(e,1)):a.push(e);return[i,a]}(t);let n;n=0===a.length?r:1===a.length?Er(t=[fr,...r,[gr,a[0],[gr,2,-1]]]):Er(t=[fr,...r,[gr,[fr,...a],[gr,2,-1]]]);let o=!1,s=!1;if(n=n.map(e=>{if(Dr(e)===vr)return s=!0,o=!o,Nr(e,1);const t=Ar(e);return t<0?(s=!0,o=!o,-t):e}),o){const e=Ar(n[0]);n=isFinite(e)?Er(on([fr,-e,...n.slice(1)],fr)):Er(on([fr,-1,...n],fr))}else n=Er(on([fr,...n],fr));return n=n.filter(e=>1!==Ar(e)),0===n.length?1:1===n.length?n[0]:[fr,...n]}function un(e,t){const i=$r(t);if(!i)return t;if(i!==gr)return Kr(t,t=>un(e,t));if(2!==Or(t=an(t)))return t;const a=un(e,Nr(t,1)),r=Ar(a),n=Ar(un(e,Nr(t,2)));return 0===n?1:1===n?a:-1===r&&-1===n?-1:1===r&&-1===n||1===r?1:t}function hn(e,t){const i=Dr(t);if(i===vr){const e=Nr(t=an(t),1);if("number"==typeof e)t=-e;else{if(!e||!Sr(e)){if(Dr(e)===fr){let t=Nr(e,1);if("number"==typeof t)t=-t;else{if(!Sr(t))return[fr,-1,t,...Er(e).slice(1)];t="-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}}return[fr,t,...Er(e).slice(1)]}return[fr,-1,e]}if(0===Ar(e))return 0;t="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num}}}else if(i)return Kr(t,t=>hn(e,t));return t}function fn(e,t){if($r(t))return Kr(t,t=>fn(e,t));if("number"==typeof t){if(isNaN(t))return{num:"NaN"};if(!isFinite(t)&&t>0)return{num:"Infinity"};if(!isFinite(t)&&t<0)return{num:"-Infinity"}}else if(Sr(t)){if(isNaN(Number(t.num)))return{num:"NaN"};if(t.num.endsWith("n"))return{num:t.num.slice(0,-1)}}return t}function gn(e,t){const i=$r(t);if(!i)return t;if("Subtract"!==i)return Kr(t,t=>gn(e,t));if(2!==Or(t))return t;const a=gn(e,Nr(t,1)),r=Ar(a),n=gn(e,Nr(t,2)),o=Ar(n);return 0===r&&0===o?0:gn(e,[br,a,nn(n)])}function yn(e,t){const i=$r(t);if(!i)return t;if("Root"!==i&&"Sqrt"!==i)return Kr(t,t=>yn(e,t));if(Or(t)<1)return t;const a=yn(e,Nr(t,1));let r=2;return Or(t)>1&&(r=un(e,Nr(t,2))),1===Ar(r)?a:[gr,a,[yr,1,r]]}function bn(e){const t=Number(e);return"string"==typeof e&&t.toString()===e?isNaN(t)||!isFinite(t)?t.toString():t:e}function vn(e,t){if(null===t)return null;if(Array.isArray(t))return t.map((t,i)=>0===i?t:vn(e,t));if("object"==typeof t)if(1===Object.keys(t).length){if(Sr(t)){const e=bn(t.num);return"number"==typeof e?e:{num:e}}if(Lr(t))return t.fn.map(t=>vn(e,t));if(zr(t))return t.sym}else Lr(t)&&(t.fn=t.fn.map(t=>vn(e,t)));return t}function xn(e,t){if("number"==typeof t||"string"==typeof t)return t;if(Array.isArray(t))return Kr(t,t=>xn(e,t));if("object"==typeof t){if("num"in t){const e=bn(t.num);return"number"==typeof e?e:{num:e}}if("fn"in t)return Kr(t.fn,t=>xn(e,t))}return null}function kn(e,t){const i=function(e,t){const i=new Set;return function e(t,i,a){const r=Er(a);if(r.length>0)r.forEach(a=>e(t,i,a));else{const e=Tr(a);if(e&&!i.has(e)){const a=function(e,t){return e[t]&&"isConstant"in e[t]?e[t]:null}(t,e);a&&a.isConstant||i.add(e)}}}(e,i,t),i}(e,t);return function e(t,i,a){var r;let n=Er(a);if(0===n.length)return a;n=n.map(a=>e(t,i,a));const o=Dr(a);if(o===br)n.sort((e,t)=>function(e,t,i){const a=Yr(e,i),r=Yr(t,i);if(ar)return-1;for(const a of i){const i=Qr(e,a),r=Qr(t,a);if(i!==r)return r-i}const n=Jr(e),o=Jr(t);return n>o?-1:ne(t,i))}(e,function e(t,i){const a=Dr(i),r=xr(t,a);return(null==r?void 0:r.isIdempotent)?on(i,a):Kr(i,i=>e(t,i))}(e,t))}function Mn(e,t,i){let a=t;return i.forEach(t=>{const i={canonical:_n,"canonical-add":sn,"canonical-divide":ln,"canonical-exp":cn,"canonical-list":dn,"canonical-multiply":pn,"canonical-power":un,"canonical-negate":hn,"canonical-number":fn,"canonical-root":yn,"canonical-subtract":gn,full:vn,flatten:wn,sorted:kn,"stripped-metadata":xn}[t];a=i?i(e,a):null}),a}function Sn(e,t,i,a){return a=null!=a?a:2,"solidus"===t?e.wrapShort(i)+"^{1\\/"+e.emit(a)+"}":"quotient"===t?e.wrapShort(i)+"^{\\frac{1}{"+e.emit(a)+"}}":2===Ar(a)?"\\sqrt{"+e.emit(i)+"}":"\\sqrt["+e.emit(a)+"]{"+e.emit(i)+"}"}function zn(e,t,i,a){const r=t.matchOptionalLatexArgument(),n=t.matchRequiredLatexArgument();return null===n?[e,["Sqrt"]]:null!==r?[e,["Root",null!=n?n:ur,r]]:[e,["Sqrt",n]]}function Ln(e,t,i,a){if(2760&&(i=1===r.length&&1===r[0]?0===a.length?"1":1===a.length?e.emit(a[0]):An(e,[fr,...a]):e.emit([yr,1===a.length?a[0]:[fr,...a],1===r.length?r[0]:[fr,...r]])),i)return e.level+=1,i;let n=!1,o=null;const s=Or(t)+1;for(let a=1;a3?"inline-solidus":"quotient";if("inline-solidus"===i||"nice-solidus"===i){const a=e.wrapShort(Nr(t,1)),r=e.wrapShort(Nr(t,2));return"nice-solidus"===i?`^{${a}}\\!\\!/\\!_{${r}}`:`${a}\\/${r}`}return"reciprocal"===i?e.wrap(Nr(t,1))+e.wrap(Nr(t,2))+"^{-1}":"factor"===i?"\\frac{1}{"+e.emit(Nr(t,2))+"}"+e.wrap(Nr(t,1)):"\\frac{"+e.emit(Nr(t,1))+"}{"+e.emit(Nr(t,2))+"}"}function $n(e,t){const i=Nr(t,1),a=Nr(t,2);if(null===a)return e.emit(i);if(null===i)return"";const r=Dr(t);if("Sqrt"===r||"Root"===r)return Sn(e,jr(0,e.level),Nr(t,1),Nr(t,2));const n=Ar(a);if(-1===n)return e.emit([yr,"1",i]);if(n<0)return e.emit([yr,"1",[gr,i,-n]]);if(Dr(a)===yr){if(1===Ar(Nr(a,1)))return Sn(e,jr(0,e.level),i,Nr(a,2))}else if(Dr(a)===gr&&-1===Ar(Nr(a,2)))return Sn(e,jr(0,e.level),i,Nr(a,1));return e.wrapShort(i)+"^{"+e.emit(a)+"}"}function Cn(e,t,i,a){var r;let n=!1,o=0;if(t.skipSpace(),t.match("^")){if(t.skipSpace(),t.match("<{>")){t.skipSpace(),t.match("-")&&t.match("1")&&(n=!0);do{t.match("\\doubleprime")&&(o+=2),t.match("\\prime")&&(o+=1),t.match("'")&&(o+=1)}while(!t.match("<}>")&&!t.atEnd())}let e=!1;for(;!e;)t.skipSpace(),t.match("\\doubleprime")?o+=2:t.match("\\prime")||t.match("'")?o+=1:e=!0}let s=null!==(r={"\\arcsin":"Arcsin","\\arccos":"Arccos","\\arctan":"Arctan","\\arctg":"Arctan","\\arcctg":"Arctan","\\arcsec":"Arcsec","\\arccsc":" Arccsc","\\arsinh":"Arsinh","\\arcosh":"Arcosh","\\artanh":"Artanh","\\arcsech":"Arcsech","\\arccsch":"Arcsch","\\ch":"Cosh","\\cos":"Cos","\\cosec":"Csc","\\cosh":"Csch","\\cot":"Cot","\\cotg":"Cot","\\coth":"Coth","\\csc":"Csc","\\ctg":"Cot","\\cth":"Coth","\\sec":"Sec","\\sin":"Sin","\\sinh":"Sinh","\\sh":"Sinh","\\tan":"Tan","\\tanh":"Tanh","\\tg":"Tan","\\th":"Tanh"}[a])&&void 0!==r?r:a;n&&(s=["InverseFunction",s]),o>=1&&(s=["Derivative",o,s]);const l=t.matchArguments("implicit");return null===l?[null,s]:[null,[s,...l]]}function Dn(e){return Array.isArray(e)?g(e):e}function Tn(e,t){var i,a,r,n,o,s,l,c,d,m,p,u,h,f,g;const y={lookahead:1,name:new Map,prefix:[],infix:[],postfix:[],matchfix:[],superfix:[],subfix:[],symbol:[],environment:new Map};for(const b of e){const e=b;void 0===e.parse&&(e.parse=e.name),"string"==typeof e.trigger&&(e.trigger={symbol:e.trigger}),"string"==typeof e.emit&&void 0!==(null===(i=e.trigger)||void 0===i?void 0:i.symbol)&&/#[0-9]/.test(e.emit)&&t({code:"unexpected-argument",arg:e.name}),void 0===e.emit&&(void 0!==(null===(a=e.trigger)||void 0===a?void 0:a.postfix)?e.emit="#1"+Dn(e.trigger.postfix):void 0!==(null===(r=e.trigger)||void 0===r?void 0:r.prefix)?e.emit=Dn(e.trigger.prefix)+"#1":void 0!==(null===(n=e.trigger)||void 0===n?void 0:n.infix)?e.emit="#1"+Dn(e.trigger.infix)+"#2":void 0!==(null===(o=e.trigger)||void 0===o?void 0:o.symbol)?e.emit=Dn(e.trigger.symbol):void 0!==(null===(s=e.trigger)||void 0===s?void 0:s.superfix)?e.emit="#1^{"+Dn(null===(l=e.trigger)||void 0===l?void 0:l.superfix)+"}":void 0!==(null===(c=e.trigger)||void 0===c?void 0:c.subfix)?e.emit="#1_{"+Dn(null===(d=e.trigger)||void 0===d?void 0:d.subfix)+"}":e.emit=""),void 0!==(null===(m=e.trigger)||void 0===m?void 0:m.infix)&&(void 0===e.precedence&&t({code:"syntax-error",arg:"Infix operators require a precedence"}),e.associativity||(e.associativity="non")),void 0!==(null===(p=e.trigger)||void 0===p?void 0:p.symbol)&&(e.arguments=null!==(u=e.arguments)&&void 0!==u?u:"",e.optionalLatexArg=null!==(h=e.optionalLatexArg)&&void 0!==h?h:0,e.requiredLatexArg=null!==(f=e.requiredLatexArg)&&void 0!==f?f:0),void 0!==(null===(g=e.trigger)||void 0===g?void 0:g.matchfix)&&("function"===e.parse||e.closeFence||t({code:"syntax-error",arg:"Matchfix operators require a close fence or a custom parse function"})),void 0!==e.trigger&&(["infix","prefix","postfix","symbol","matchfix","superfix","subfix"].forEach(t=>{const i=(a=e.trigger[t],Array.isArray(a)?a.length:1);var a;y.lookahead=Math.max(y.lookahead,i),void 0===y[t][i]&&(y[t][i]=new Map),y[t][i].set(Dn(e.trigger[t]),e)}),void 0!==e.trigger.environment&&y.environment.set(e.trigger.environment,e)),e.name&&y.name.set(Dn(e.name),e),void 0!==e.trigger||e.name||t({code:"syntax-error",arg:"Need at least a trigger or a name"})}return y}function En(e="all"){let t;return"all"===e?(t=[],Object.keys(Kn).forEach(e=>{t=[...t,...Kn[e]]})):t=[...Kn[e]],t}const Kn={algebra:[{name:"To",trigger:{infix:"\\to"},precedence:270}],arithmetic:[{trigger:{symbol:"\\infty"},parse:{num:"Infinity"}},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","\\infty"]},emit:"\\tilde\\infty"},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","<{>","\\infty","<}>"]},emit:"\\tilde\\infty"},{name:"PI",trigger:{symbol:"\\pi"}},{name:"PI",trigger:{symbol:"π"},emit:"\\pi"},{name:"E",trigger:{symbol:"e"},emit:"e"},{name:"I",trigger:{symbol:"i"},emit:"\\imaginaryI"},{name:"I",trigger:{symbol:"\\imaginaryI"}},{name:br,trigger:{prefix:"+",infix:"+"},parse:function(e,t,i,a){if(2751&&(r=["List",...r]),[e,["PartialDerivative",a,r,i===ur?1:i]]}return[e,[yr,l,c]]},emit:qn,requiredLatexArg:2},{name:yr,trigger:{infix:"\\/"},emit:qn,associativity:"non",precedence:660},{name:yr,trigger:{infix:"/"},emit:qn,associativity:"non",precedence:660},{name:yr,trigger:{infix:"\\div"},emit:qn,associativity:"non",precedence:660},{name:gr,trigger:{infix:"^"},associativity:"non",precedence:720,emit:$n},{name:gr,trigger:{infix:["*","*"]},associativity:"non",precedence:720,emit:$n},{name:"Sqrt",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:zn,emit:$n},{name:"Root",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:zn},{name:"Norm",trigger:{matchfix:"\\lVert"},closeFence:"\\rVert"},{name:"Norm",trigger:{matchfix:"\\|"},closeFence:"\\|"},{name:"Norm",trigger:{matchfix:["|","|"]},closeFence:["|","|"]},{name:"Abs",trigger:{matchfix:"|"},closeFence:"|"},{name:"Abs",trigger:{matchfix:"\\lvert"},closeFence:"\\rvert"},{name:"Factorial",trigger:{postfix:"!"},precedence:810},{name:"Factorial2",trigger:{postfix:["!","!"]},precedence:810}],calculus:[{trigger:{symbol:"\\int"},parse:function(e,t,i,a){var r;let n=ur,o=ur,s=!1;for(;!s;)t.skipSpace(),t.match("_")?o=t.matchRequiredLatexArgument():t.match("^")?n=t.matchRequiredLatexArgument():s=!0;let l=null;if(t.match("<{>")){const e=t.getIndex();let i=1;for(;!t.atEnd()&&0!==i;)t.match("<{>")?i+=1:t.match("<}>")?i-=1:t.next();l=null!==(r=t.clone(e,t.getIndex()-1).matchExpression())&&void 0!==r?r:""}return[e,["Integral",l,n,o]]},emit:function(e,t){return""}}],core:[{name:"Latex",emit:function e(t,i){if(null===i)return"";const a=$r(i);if(null!==a){const r=Er(i);return"Latex"===a?r.map(i=>e(t,i)).join(""):0===r.length?t.emit(a):t.emit(a)+r.map(e=>"{"+t.emit(e)+"}").join("")}return t.emit(i)}},{name:hr,trigger:{matchfix:"("},parse:(e,t,i,a)=>{const r=t.getIndex();let n=!1,o=!0,s=0,l="";for(;!n&&o;){const e=t.next();t.atEnd()||")"===e?n=!0:/^[0-9a-zA-Z]$/.test(e)?(s=Math.max(s,parseInt(e,36)),l+=e):o=!1}if(t.skipSpace(),o&&t.match("_")){const i=Ar(t.matchRequiredLatexArgument());if(isFinite(i)&&s"Subsequence"===Dr(e));for(const n of Er(t))null!==n&&(a+=i+e.emit(n),i=r?"; ":", ");return e.wrapString(a,(e.level,"paren"))},separator:",",closeFence:")",precedence:20},{name:"List",trigger:{matchfix:"\\lbrack"},separator:",",closeFence:"\\rbrack",precedence:20},{name:"BaseForm",emit:(e,t)=>{const i=Ar(Nr(t,2));if(isFinite(i)&&i>0&&i<=36){const e=Ar(Nr(t,1));if(isFinite(e)){let t=Number(e).toString(i),a=0;if(2===i||10===i?a=4:16===i?a=2:i>16&&(a=4),a>0){const e=t;t="";for(let i=0;i0&&i%a==0&&(t="\\; "+t),t=e[e.length-i-1]+t}return"\\mathtt{"+t+"}_{"+Number(i).toString()+"}"}}return"\\operatorname{BaseForm}("+e.emit(Nr(t,1))+", "+e.emit(Nr(t,2))+")"}},{name:"Set",trigger:{matchfix:"\\lbrace"},separator:",",closeFence:"\\rbrace",precedence:20},{name:"Sequence",trigger:{infix:","},parse:Gr,emit:Xr,precedence:20},{name:"Subsequence",trigger:{infix:";"},parse:Gr,emit:Xr,precedence:20},{name:"Missing",trigger:"\\placeholder",emit:"\\placeholder",requiredLatexArg:1},{name:"Subscript",trigger:{infix:"_"},precedence:720,emit:(e,t)=>2===Or(t)?e.emit(Nr(t,1))+"_{"+e.emit(Nr(t,2))+"}":"_{"+e.emit(Nr(t,1))+"}",parse:(e,t,i,a)=>[null,["Subscript",e,t.matchRequiredLatexArgument()]]},{name:"Superplus",trigger:{superfix:"+"}},{name:"Subplus",trigger:{subfix:"+"}},{name:"Superminus",trigger:{superfix:"-"}},{name:"Subminus",trigger:{subfix:"-"}},{name:"Superstar",trigger:{superfix:"*"}},{name:"Superstar",trigger:{superfix:"\\star"}},{name:"Substar",trigger:{subfix:"*"}},{name:"Substar",trigger:{subfix:"\\star"}},{name:"Superdagger",trigger:{superfix:"\\dagger"}},{name:"Superdagger",trigger:{superfix:"\\dag"}},{name:"Prime",trigger:{superfix:"\\prime"},arguments:"group"},{trigger:{superfix:"\\doubleprime"},parse:e=>[null,["Prime",e,2]],arguments:"group"},{name:"InverseFunction",emit:(e,t)=>e.emit(Nr(t,1))+"^{-1}"},{name:"Derivative",trigger:"D",parse:(e,t)=>[e,["Derivative",1]],emit:(e,t)=>{const i=Ar(Nr(t,1));if(!isFinite(i))return"";const a=e.emit(Nr(t,2));return 1===i?a+"^{\\prime}":2===i?a+"^{\\doubleprime}":a+"^{("+Number(i).toString()+")}"}},{name:"Piecewise",trigger:{environment:"cases"},parse:(e,t)=>[null,["piecewise",t.matchTabular()]],emit:(e,t)=>{if("List"!==Dr(Nr(t,1)))return"";const i=Er(Nr(t,1));let a="",r="";for(const t of i){a+=r;const i=Nr(t,1);if(null!==i){a+=e.emit(i);const r=Nr(t,2);null!==r&&(a+="&"+e.emit(r))}r="\\\\"}return"\\begin{cases}"+a+"\\end{cases}"}}],inequalities:[{name:"NotLess",trigger:{infix:["!","<"]},associativity:"right",precedence:246},{name:"NotLess",trigger:{infix:"\\nless"},associativity:"right",precedence:246},{name:"Less",trigger:{infix:"<"},associativity:"right",precedence:245},{name:"Less",trigger:{infix:"\\lt"},associativity:"right",precedence:245},{name:"LessEqual",trigger:{infix:["<","="]},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\le"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leq"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leqslant"},associativity:"right",precedence:265},{name:"LessNotEqual",trigger:{infix:"\\lneqq"},associativity:"right",precedence:260},{name:"NotLessNotEqual",trigger:{infix:"\\nleqq"},associativity:"right",precedence:260},{name:"LessOverEqual",trigger:{infix:"\\leqq"},associativity:"right",precedence:265},{name:"GreaterOverEqual",trigger:{infix:"\\geqq"},associativity:"right",precedence:265},{name:"Equal",trigger:{infix:"="},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["*","="]},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["\\star","="]},associativity:"right",precedence:260},{name:"PlusEqual",trigger:{infix:["+","="]},associativity:"right",precedence:260},{name:"MinusEqual",trigger:{infix:["-","="]},associativity:"right",precedence:260},{name:"SlashEqual",trigger:{infix:["/","="]},associativity:"right",precedence:260},{name:"EqualEqual",trigger:{infix:["=","="]},associativity:"right",precedence:260},{name:"EqualEqualEqual",trigger:{infix:["=","=","="]},associativity:"right",precedence:265},{name:"TildeFullEqual",trigger:{infix:"\\cong"},associativity:"right",precedence:260},{name:"NotTildeFullEqual",trigger:{infix:"\\ncong"},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:[":","="]},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:"\\coloneq"},associativity:"right",precedence:260},{name:"Approx",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"NotApprox",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"ApproxEqual",trigger:{infix:"\\approxeq"},associativity:"right",precedence:260},{name:"NotApproxEqual",trigger:{infix:["!","\\approxeq"]},associativity:"right",precedence:250},{name:"Unequal",trigger:{infix:"\\ne"},associativity:"right",precedence:255},{name:"Unequal",trigger:{infix:["!","="]},associativity:"right",precedence:260},{name:"GreaterEqual",trigger:{infix:"\\ge"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:"\\geq"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:[">","="]},associativity:"right",precedence:243},{name:"GreaterEqual",trigger:{infix:"\\geqslant"},associativity:"right",precedence:265},{name:"GreaterNotEqual",trigger:{infix:"\\gneqq"},associativity:"right",precedence:260},{name:"NotGreaterNotEqual",trigger:{infix:"\\ngeqq"},associativity:"right",precedence:260},{name:"Greater",trigger:{infix:">"},associativity:"right",precedence:245},{name:"Greater",trigger:{infix:"\\gt"},associativity:"right",precedence:245},{name:"NotGreater",trigger:{infix:"\\ngtr"},associativity:"right",precedence:244},{name:"NotGreater",trigger:{infix:["!",">"]},associativity:"right",precedence:244},{name:"RingEqual",trigger:{infix:"\\circeq"},associativity:"right",precedence:260},{name:"TriangleEqual",trigger:{infix:"\\triangleq"},associativity:"right",precedence:260},{name:"DotEqual",trigger:{infix:"\\doteq"},associativity:"right",precedence:265},{name:"DotEqualDot",trigger:{infix:"\\doteqdot"},associativity:"right",precedence:265},{name:"FallingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"RisingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"QuestionEqual",trigger:{infix:"\\questeq"},associativity:"right",precedence:260},{name:"Equivalent",trigger:{infix:"\\equiv"},associativity:"right",precedence:260},{name:"MuchLess",trigger:{infix:"\\ll"},associativity:"right",precedence:260},{name:"MuchGreater",trigger:{infix:"\\gg"},associativity:"right",precedence:260},{name:"Precedes",trigger:{infix:"\\prec"},associativity:"right",precedence:260},{name:"Succeeds",trigger:{infix:"\\succ"},associativity:"right",precedence:260},{name:"PrecedesEqual",trigger:{infix:"\\preccurlyeq"},associativity:"right",precedence:260},{name:"SucceedsEqual",trigger:{infix:"\\curlyeqprec"},associativity:"right",precedence:260},{name:"NotPrecedes",trigger:{infix:"\\nprec"},associativity:"right",precedence:260},{name:"NotSucceeds",trigger:{infix:"\\nsucc"},associativity:"right",precedence:260},{name:"ElementOf",trigger:{infix:"\\in"},associativity:"right",precedence:240},{name:"NotElementOf",trigger:{infix:"\\notin"},associativity:"right",precedence:240},{name:"Contains",trigger:{infix:"\\ni"},associativity:"right",precedence:160},{name:"Subset",trigger:{infix:"\\subset"},associativity:"right",precedence:240},{name:"SquareSubset",trigger:{infix:"\\sqsubset"},associativity:"right",precedence:265},{name:"SquareSubsetEqal",trigger:{infix:"\\sqsubseteq"},associativity:"right",precedence:265},{name:"Superset",trigger:{infix:"\\supset"},associativity:"right",precedence:240},{name:"SquareSuperset",trigger:{infix:"\\sqsupset"},associativity:"right",precedence:265},{name:"SquareSupersetEuqal",trigger:{infix:"\\sqsupseteq"},associativity:"right",precedence:265},{name:"NotSubset",trigger:{infix:"\\nsubset"},associativity:"right",precedence:240},{name:"NotSuperset",trigger:{infix:"\\nsupset"},associativity:"right",precedence:240},{name:"SubsetEqual",trigger:{infix:"\\subseteq"},associativity:"right",precedence:240},{name:"SupersetEqual",trigger:{infix:"\\supseteq"},associativity:"right",precedence:240},{name:"NotSubsetNotEqual",trigger:{infix:"\\nsubseteq"},associativity:"right",precedence:240},{name:"NotSupersetNotEqual",trigger:{infix:"\\nsupseteq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\subsetneq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\supsetneq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\varsupsetneqq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\varsupsetneq"},associativity:"right",precedence:240},{name:"Between",trigger:{infix:"\\between"},associativity:"right",precedence:265}],other:[{name:"Overscript",trigger:{infix:"\\overset"},precedence:700},{name:"Underscript",trigger:{infix:"\\underset"},precedence:700},{name:"Increment",trigger:{postfix:["+","+"]},precedence:880},{name:"Decrement",trigger:{postfix:["-","-"]},precedence:880},{name:"PreIncrement",trigger:{prefix:["+","+"]},precedence:880},{name:"PreDecrement",trigger:{prefix:["-","-"]},precedence:880},{name:"Ring",trigger:{infix:"\\circ"},precedence:265},{name:"Transpose",trigger:{superfix:"T"}},{name:"ConjugateTranspose",trigger:{superfix:"H"}},{name:"StringJoin",trigger:{infix:["\\lt","\\gt"]},precedence:780},{name:"Starstar",trigger:{infix:["\\star","\\star"]},precedence:780},{name:"PartialDerivative",trigger:{prefix:"\\partial"},parse:(e,t,i,a)=>{var r;let n=!1,o=ur,s=ur;for(;!n;)t.skipSpace(),t.match("_")?s=t.matchRequiredLatexArgument():t.match("^")?o=t.matchRequiredLatexArgument():n=!0;"Sequence"===Dr(s)&&(s=["List",...Er(s)]);let l=null!==(r=t.matchRequiredLatexArgument())&&void 0!==r?r:ur;return l!==ur&&(l=[l,...t.matchArguments("group")]),[null,["PartialDerivative",l,s,o]]},emit:(e,t)=>{let i="\\partial";const a=Nr(t,1),r=Nr(t,2),n=Nr(t,3);return null!==r&&r!==ur&&("List"===$r(r)?i+="_{"+e.emit(["Sequence",...Er(r)])+"}":i+="_{"+e.emit(r)+"}"),null!==n&&n!==ur&&(i+="^{"+e.emit(n)+"}"),null!==a&&a!==ur&&(i+=e.emit(a)),i},precedence:740},{name:"OverBar",trigger:{symbol:"\\overline"},requiredLatexArg:1},{name:"UnderBar",trigger:{symbol:"\\underline"},requiredLatexArg:1},{name:"OverVector",trigger:{symbol:"\\vec"},requiredLatexArg:1},{name:"OverTile",trigger:{symbol:"\\tilde"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverRightArrow",trigger:{symbol:"\\overrightarrow"},requiredLatexArg:1},{name:"OverLeftArrow",trigger:{symbol:"\\overleftarrow"},requiredLatexArg:1},{name:"OverRightDoubleArrow",trigger:{symbol:"\\Overrightarrow"},requiredLatexArg:1},{name:"OverLeftHarpoon",trigger:{symbol:"\\overleftharpoon"},requiredLatexArg:1},{name:"OverRightHarpoon",trigger:{symbol:"\\overrightharpoon"},requiredLatexArg:1},{name:"OverLeftRightArrow",trigger:{symbol:"\\overleftrightarrow"},requiredLatexArg:1},{name:"OverBrace",trigger:{symbol:"\\overbrace"},requiredLatexArg:1},{name:"OverLineSegment",trigger:{symbol:"\\overlinesegment"},requiredLatexArg:1},{name:"OverGroup",trigger:{symbol:"\\overgroup"},requiredLatexArg:1}],physics:[{name:"mu-0",trigger:{symbol:["\\mu","_","0"]}}],symbols:[{trigger:{symbol:"\\alpha"},parse:"α"},{trigger:{symbol:"\\beta"},parse:"β"},{trigger:{symbol:"\\gamma"},parse:"γ"},{trigger:{symbol:"\\delta"},parse:"δ"},{trigger:{symbol:"\\epsilon"},parse:"ϵ"},{trigger:{symbol:"\\varepsilon"},parse:"ε"},{trigger:{symbol:"\\zeta"},parse:"ζ"},{trigger:{symbol:"\\eta"},parse:"η"},{trigger:{symbol:"\\theta"},parse:"θ"},{trigger:{symbol:"\\vartheta"},parse:"ϑ"},{trigger:{symbol:"\\iota"},parse:"ι"},{trigger:{symbol:"\\kappa"},parse:"κ"},{trigger:{symbol:"\\varkappa"},parse:"ϰ"},{trigger:{symbol:"\\lambda"},parse:"λ"},{trigger:{symbol:"\\mu"},parse:"μ"},{trigger:{symbol:"\\nu"},parse:"ν"},{trigger:{symbol:"\\xi"},parse:"ξ"},{trigger:{symbol:"\\omicron"},parse:"ο"},{trigger:{symbol:"\\varpi"},parse:"ϖ"},{trigger:{symbol:"\\rho"},parse:"ρ"},{trigger:{symbol:"\\varrho"},parse:"ϱ"},{trigger:{symbol:"\\sigma"},parse:"σ"},{trigger:{symbol:"\\varsigma"},parse:"ς"},{trigger:{symbol:"\\tau"},parse:"τ"},{trigger:{symbol:"\\phi"},parse:"ϕ"},{trigger:{symbol:"\\varphi"},parse:"φ"},{trigger:{symbol:"\\upsilon"},parse:"υ"},{trigger:{symbol:"\\chi"},parse:"χ"},{trigger:{symbol:"\\psi"},parse:"ψ"},{trigger:{symbol:"\\omega"},parse:"ω"},{trigger:{symbol:"\\Gamma"},parse:"Γ"},{trigger:{symbol:"\\Delta"},parse:"Δ"},{trigger:{symbol:"\\Theta"},parse:"Θ"},{trigger:{symbol:"\\Lambda"},parse:"Λ"},{trigger:{symbol:"\\Xi"},parse:"Ξ"},{trigger:{symbol:"\\Pi"},parse:"Π"},{trigger:{symbol:"\\Sigma"},parse:"Σ"},{trigger:{symbol:"\\Upsilon"},parse:"Υ"},{trigger:{symbol:"\\Phi"},parse:"Φ"},{trigger:{symbol:"\\Psi"},parse:"Ψ"},{trigger:{symbol:"\\Omega"},parse:"Ω"},{trigger:{symbol:"\\digamma"},parse:"ϝ"},{trigger:{symbol:"\\aleph"},parse:"ℵ"},{trigger:{symbol:"\\beth"},parse:"ℶ"},{trigger:{symbol:"\\daleth"},parse:"ℸ"},{trigger:{symbol:"\\gimel"},parse:"ℷ"},{trigger:{symbol:"\\Finv"},parse:"Ⅎ"},{trigger:{symbol:"\\Game"},parse:"⅁"},{trigger:{symbol:"\\wp"},parse:"℘"},{trigger:{symbol:"\\eth"},parse:"ð"},{trigger:{symbol:"\\mho"},parse:"℧"},{trigger:{symbol:"\\clubsuit"},parse:"♣"},{trigger:{symbol:"\\heartsuit"},parse:"♡"},{trigger:{symbol:"\\spadesuit"},parse:"♠"},{trigger:{symbol:"\\diamondsuit"},parse:"♢"},{trigger:{symbol:"\\sharp"},parse:"♯"},{trigger:{symbol:"\\flat"},parse:"♭"},{trigger:{symbol:"\\natural"},parse:"♮"}],trigonometry:[{name:"Arcsin",trigger:"\\arcsin",arguments:"implicit",parse:Cn},{name:"Arccos",trigger:"\\arccos",arguments:"implicit",parse:Cn},{name:"Arctan",trigger:"\\arctan",arguments:"implicit",parse:Cn},{name:"Arctan",trigger:"\\arctg",arguments:"implicit",parse:Cn},{name:"Arccot",trigger:"\\arcctg",arguments:"implicit",parse:Cn},{name:"Arcsec",trigger:"\\arcsec",arguments:"implicit",parse:Cn},{name:"Arccsc",trigger:"\\arccsc",arguments:"implicit",parse:Cn},{name:"Arsinh",trigger:"\\arsinh",arguments:"implicit",parse:Cn},{name:"Arcosh",trigger:"\\arcosh",arguments:"implicit",parse:Cn},{name:"Artanh",trigger:"\\artanh",arguments:"implicit",parse:Cn},{name:"Arsech",trigger:"\\arsech",arguments:"implicit",parse:Cn},{name:"Arcsch",trigger:"\\arcsch",arguments:"implicit",parse:Cn},{name:"Cosh",trigger:"\\ch",arguments:"implicit",parse:Cn},{name:"Cosec",trigger:"\\cosec",arguments:"implicit",parse:Cn},{name:"Cosh",trigger:"\\cosh",arguments:"implicit",parse:Cn},{name:"Cot",trigger:"\\cot",arguments:"implicit",parse:Cn},{name:"Cot",trigger:"\\cotg",arguments:"implicit",parse:Cn},{name:"Coth",trigger:"\\coth",arguments:"implicit",parse:Cn},{name:"Csc",trigger:"\\csc",arguments:"implicit",parse:Cn},{name:"Cot",trigger:"\\ctg",arguments:"implicit",parse:Cn},{name:"Coth",trigger:"\\cth",arguments:"implicit",parse:Cn},{name:"Sec",trigger:"\\sec",arguments:"implicit",parse:Cn},{name:"Sinh",trigger:"\\sinh",arguments:"implicit",parse:Cn},{name:"Sinh",trigger:"\\sh",arguments:"implicit",parse:Cn},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:Cn},{name:"Tanh",trigger:"\\tanh",arguments:"implicit",parse:Cn},{name:"Tan",trigger:"\\tg",arguments:"implicit",parse:Cn},{name:"Tanh",trigger:"\\th",arguments:"implicit",parse:Cn},{name:"Cos",trigger:"\\cos",arguments:"implicit",parse:Cn},{name:"Sin",trigger:"\\sin",arguments:"implicit",parse:Cn},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:Cn}]};class Nn{constructor(e,t){var i;let a;this.index=0,this.options={...wr,...t},this.tokens=e,this.onError=e=>t.onError({...e,before:this.latexBefore(),after:this.latexAfter()}),this.dictionary=null!==(i=t.indexedLatexDictionary)&&void 0!==i?i:Tn(t.dictionary,t.onError),this.invisibleOperatorPrecedence=0,this.options.invisibleOperator&&(a=this.dictionary.name.get(this.options.invisibleOperator),void 0===a?t.onError({code:"unknown-operator",arg:this.options.invisibleOperator}):void 0===a.precedence?t.onError({code:"expected-operator",arg:this.options.invisibleOperator}):this.invisibleOperatorPrecedence=a.precedence)}clone(e,t){return new Nn(this.tokens.slice(e,t),{...this.options,dictionary:[],indexedLatexDictionary:this.dictionary,onError:this.onError})}getIndex(){return this.index}setIndex(e){this.index=e}atEnd(){return this.index>=this.tokens.length}peek(){return this.tokens[this.index]}latex(e,t){return g(this.tokens.slice(e,t))}latexAhead(e){return g(this.tokens.slice(this.index,this.index+e))}latexBefore(){return this.latex(0,this.index)}latexAfter(){return this.latex(this.index)}lookAhead(){let e=Math.min(this.dictionary.lookahead,this.tokens.length-this.index);const t=[];for(;e>0;)t[e]=this.latexAhead(e--);return t}peekDefinition(e){let t;t="operator"===e?this.lookAhead().map((e,t)=>{var i,a,r,n,o;return null!==(n=null!==(a=null===(i=this.dictionary.infix[t])||void 0===i?void 0:i.get(e))&&void 0!==a?a:null===(r=this.dictionary.postfix[t])||void 0===r?void 0:r.get(e))&&void 0!==n?n:null===(o=this.dictionary.prefix[t])||void 0===o?void 0:o.get(e)}):this.lookAhead().map((t,i)=>{var a;return null===(a=this.dictionary[e][i])||void 0===a?void 0:a.get(t)});for(let e=t.length;e>0;e--)if(void 0!==t[e])return[t[e],e];return[null,0]}next(){return this.tokens[this.index++]}skipSpace(){if(!this.options.skipSpace)return!1;let e=!1;for(;this.match("");)e=!0;return e}match(e){return this.tokens[this.index]===e&&(this.index++,!0)}matchAll(e){let t=!0;"string"==typeof e&&(e=[e]);let i=0;do{t=this.tokens[this.index+i]===e[i++]}while(t&&ie!==this.options.groupSeparator).join(""):""}matchSignedInteger(){const e=this.index,t=this.matchSign(),i=this.matchDigits();return i?("-"===t?"-":"")+i:(this.index=e,"")}matchExponent(){const e=this.index;let t="";if(this.matchAny(["e","E","d","D"])){const e=this.matchSignedInteger();e&&(t="e"+e)}if(t)return t;if(this.match("\\times")&&(this.skipSpace(),this.match("1")&&this.match("0")&&this.match("^"))){if(/[0-9]/.test(this.peek()))return"e"+this.next();if(this.match("<{>")){this.skipSpace();const e=this.matchSignedInteger();if(this.skipSpace(),this.match("<}>")&&e)return"e"+e}}return this.index=e,""}matchNumber(){var e,t,i;if(!this.options.parseNumbers)return"";const a=this.index;let r=this.matchDigits();return r?(this.match(null!==(e=this.options.decimalMarker)&&void 0!==e?e:"")&&(r+="."+(null!==(t=this.matchDigits())&&void 0!==t?t:"")),r+=null!==(i=this.matchExponent())&&void 0!==i?i:"",r||(this.index=a,"")):""}matchOperator(e,t=null,i=0){const[a,r]=this.peekDefinition(e);if(null===a)return null;if("function"==typeof a.parse){const e=this.latexAhead(r);this.index+=r;let n=null;return[t,n]=a.parse(t,this,i,e),null===n?(this.index-=r,null):this.applyInvisibleOperator(t,n)}let n=a.precedence;if(n0;)l=this.matchOptionalLatexArgument(),null!==l&&s.push(l),c--;for(c=null!==(a=r.requiredLatexArg)&&void 0!==a?a:0;c>0;)l=this.matchRequiredLatexArgument(),null===l&&this.onError({code:"expected-argument"}),null!==l&&o.push(l),c--;const d=this.matchArguments(r.arguments);return null===d?0===o.length&&0===s.length?r.parse:[r.parse,...o,...s]:[r.parse,...o,...d,...s]}matchOptionalLatexArgument(){if(this.skipSpace(),this.match("[")){const e=this.index;let t=1;for(;!this.atEnd()&&0!==t;)this.match("[")?t+=1:this.match("]")?t-=1:this.next();return this.clone(e,this.index-1).matchExpression()}return null}matchRequiredLatexArgument(){var e;if(this.skipSpace(),this.match("<{>")){const t=this.index;let i=1;for(;!this.atEnd()&&0!==i;)this.match("<{>")?i+=1:this.match("<}>")?i-=1:this.next();return null!==(e=this.clone(t,this.index-1).matchExpression())&&void 0!==e?e:""}return/^[0-9]$/.test(this.peek())?parseFloat(this.next()):/^[^\\#]$/.test(this.peek())?this.next():this.matchExpression()}matchSupsub(e){let t=null;return this.skipSpace(),[["^","superfix"],["_","subfix"]].forEach(i=>{var a,r,n;if(null!==t)return;const[o,s]=i;if(!this.match(o))return;this.skipSpace();const l=this.index;let c,d=0;if(this.match("<{>")?(this.skipSpace(),[c,d]=this.peekDefinition(s),this.index+=d,this.skipSpace(),(null==c?void 0:c.name)&&this.match("<}>")?t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(a=c.parse)&&void 0!==a?a:c.name,e]:this.index=l):([c,d]=this.peekDefinition(s),(null==c?void 0:c.name)&&(this.index+=d,t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(r=c.parse)&&void 0!==r?r:c.name,e])),null===t&&(c=null===(n=this.dictionary.infix[1])||void 0===n?void 0:n.get(o),"function"==typeof(null==c?void 0:c.parse)?t=c.parse(e,this,0,o)[1]:"string"==typeof(null==c?void 0:c.parse)?([e,t]=this.applyOperator(c.parse,e,this.matchRequiredLatexArgument()),t=this.applyInvisibleOperator(e,t)):t=this.applyInvisibleOperator(e,o)),null!==t){const e=this.matchArguments(null==c?void 0:c.arguments);null!==e&&(t=[t,...e])}}),t}matchPostfix(e){if(null===e)return null;const[t,i]=this.peekDefinition("postfix");if(null===t)return null;if("function"==typeof t.parse){const a=this.latexAhead(i);return this.index+=i,[,e]=t.parse(e,this,0,a),null===e?(this.index-=i,null):e}return this.index+=i,[t.parse,e]}matchString(){let e="",t=this.atEnd();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===this.peek()?t=!0:/^<({|}|\$|\$\$|space)>$/.test(i)?"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.next()):t=!0:e+=this.next()}t=t||this.atEnd()}return e}matchEnvironmentName(e,t){if(this.match(e)){const e=this.index;if(this.match("<{>")){const e=this.matchString();if(this.match("<}>")&&e===t)return!0}this.index=e}return!1}matchTabular(){const e=["list"];let t=["list"],i=null,a=!1;for(;!this.atEnd()&&!a;)if(this.match("&"))t.push(i),i=null;else if(this.match("\\\\")||this.match("\\cr"))this.skipSpace(),this.matchOptionalLatexArgument(),null!==i&&t.push(i),e.push(t),t=["list"],i=null;else{const e=this.matchExpression();null===e&&(a=!0),i=null!==i?this.applyInvisibleOperator(i,e):e}return t.length>1&&e.push(t),e}matchEnvironment(){var e;if(this.match("\\begin")&&this.match("<{>")){const t=this.matchString();if(this.match("<}>")){const i=this.index;let a=this.index,r=1;for(;!this.atEnd()&&0!==r;)a=this.index,this.matchEnvironmentName("\\begin",t)?r+=1:this.matchEnvironmentName("\\end",t)?r-=1:this.next();const n=this.dictionary.environment.get(t);return"function"==typeof(null==n?void 0:n.parse)?n.parse(null,this.clone(i,a),0,t)[1]:null!==(e=null==n?void 0:n.parse)&&void 0!==e?e:null}}return null}applyOperator(e,t,i){var a,r,n,o;const s=this.dictionary.name.get(e);if(void 0===s)return this.onError({code:"unknown-operator"}),[t,i];if(void 0!==(null===(a=s.trigger)||void 0===a?void 0:a.prefix)&&null===t&&null!==i)return[null,[s.name,i]];if(void 0!==(null===(r=s.trigger)||void 0===r?void 0:r.postfix)&&null!==t)return[null,[s.name,t]];if((void 0!==(null===(n=s.trigger)||void 0===n?void 0:n.matchfix)||void 0!==(null===(o=s.trigger)||void 0===o?void 0:o.infix))&&null!==t&&null!==i){if("non"===s.associativity)return[null,[e,t,i]];if(Dr(t)===e){if("both"===s.associativity){if(Dr(i)===e){if(Array.isArray(t))return[null,t.concat(Er(i))];if(Lr(t))return[null,t.fn.concat(Er(i))]}else Array.isArray(t)&&t.push(i),Lr(t)&&t.fn.push(i);return[null,t]}return"left"===s.associativity?[null,[e,t,i]]:Array.isArray(t)?[null,[e,t[1],[e,t[2],i]]]:(Lr(t)&&(t.fn[2]=[e,t.fn[2],i]),[null,t])}return Dr(i)===e?"both"===s.associativity?(Array.isArray(i)&&i.splice(1,0,t),Lr(i)&&i.fn.splice(1,0,t),[null,i]):"right"===s.associativity?[null,[e,t,i]]:Array.isArray(i)?[null,[e,i[1],[e,i[2],t]]]:(Lr(i)&&(i.fn[2]=[e,i.fn[2],t]),[null,i]):[null,[e,t,i]]}return void 0!==s.trigger.infix?(this.onError({code:"expected-operand"}),[t,null]):[t,null]}applyInvisibleOperator(e,t){if(null===e)return t;if(null===t)return e;if(this.options.invisiblePlusOperator&&("number"==typeof e||Sr(e))&&Dr(t)===yr)return[e,t]=this.applyOperator(this.options.invisiblePlusOperator,e,t),null===e?t:null;if(this.options.invisibleOperator)return[e,t]=this.applyOperator(this.options.invisibleOperator,e,t),null===e?t:null;let i=["Latex"];return"Latex"===Dr(e)?i=i.concat(Er(e)):i.push(e),null!==t&&("Latex"===Dr(t)?i=i.concat(Er(t)):i.push(t)),this.options.invisibleOperator&&this.onError({code:"unexpected-sequence"}),i}matchUnknownLatexCommand(){const e=this.peek();if(!e||"\\"!==e[0])return null;this.next();const t=[],i=[];let a=!1;do{a=!0;let e=this.matchOptionalLatexArgument();null!==e&&(t.push(e),a=!1),this.skipSpace(),"<{>"===this.peek()&&(e=this.matchRequiredLatexArgument(),null!==e&&(i.push(e),a=!1))}while(!a);return t.length>0||i.length>0?[e,...i,...t]:e}matchPrimary(e){let t=null;const i=this.index,a=this.matchNumber();a&&(t={num:a}),null===t&&(t=this.matchSymbol()),null===t&&(t=this.matchEnvironment()),null===t&&(t=this.matchMatchfixOperator());let r=null;do{r=this.matchSupsub(t),t=null!=r?r:t}while(null!==r);let n=null;do{n=this.matchPostfix(t),t=null!=n?n:t}while(null!==n);return this.decorate(t,i)}matchExpression(e=0){let t=null;const i=this.index;if(this.skipSpace(),t=this.matchOperator("prefix"),null===t&&(t=this.matchPrimary(e)),null===t)return null;let a=!1;for(;!this.atEnd()&&!a;){this.skipSpace();let i=this.matchOperator("infix",t,e);if(null===i){const[e]=this.peekDefinition("operator");if(null===e){const e=this.matchExpression(this.invisibleOperatorPrecedence);null===e?a=!0:i=this.applyInvisibleOperator(t,e)}}null!==i?t=i:a=!0}return this.decorate(t,i)}decorate(e,t){if(this.options.preserveLatex){const i=this.latex(t,this.index);Array.isArray(e)?e={latex:i,fn:e}:"number"==typeof e?e={latex:i,num:Number(e).toString()}:"string"==typeof e?e={latex:i,sym:e}:"object"==typeof e&&null!==e&&(e.latex=i)}return e}}function On(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}const a=i!==e.length;return(e=e.replace(/(\d{3})/g,"$1"+t.groupSeparator)).endsWith(t.groupSeparator)&&(e=e.slice(0,-1)),e+(a?"\\ldots":"")}function Bn(e,t){var i;return e?t.beginExponentMarker?t.beginExponentMarker+e+(null!==(i=t.endExponentMarker)&&void 0!==i?i:""):"10^{"+e+"}":""}class Fn{constructor(e){this.level=-1,this.options=e,e.invisibleMultiply&&(/#1/.test(e.invisibleMultiply)&&/#2/.test(e.invisibleMultiply)||e.onError({code:"expected-argument",arg:"invisibleMultiply"})),this.onError=e.onError,this.dictionary=Tn(e.dictionary,e.onError)}wrap(e,t){if(null===e)return"";if(void 0===t)return"("+this.emit(e)+")";if("number"==typeof e||Sr(e)||"string"==typeof e||zr(e))return this.emit(e);const i=Dr(e);if(i){const a=this.dictionary.name.get(i);if(a&&void 0!==a.precedence&&a.precedence1?"upright":"asis"}(e,this.level)){case"upright":return"\\operatorname{"+i+"}";default:return i}}const a=Er(e);if(!t){if("string"==typeof i&&i.length>0&&"\\"===i[0]){let e=i;for(const t of a)e+="{"+this.emit(t)+"}";return e}return this.emit(i)+this.emit([hr,...a])}if(t.requiredLatexArg>0){let e="",i="",r=0;for(;r=0){const a=r.match(/(\d*)\.(\d*)([e|E]([-+]?[0-9]*))?/);if(!a)return"";const o=a[1],l=a[2].substring(0,Math.min(s.precision-o.length,a[2].length));if(n=null!==(i=a[4])&&void 0!==i?i:"","0"===o){let i=0;for(;"0"===l[i]&&i=s.precision)a="0",t="";else{a=r[i];const e=On(r.substr(i+1),s);e&&(a+=s.decimalMarker+e)}"0"!==a&&(r.length-1>s.precision&&!a.endsWith("}")&&!a.endsWith("\\ldots")&&(a+="\\ldots"),i>4&&(a+=s.exponentProduct+Bn((1-i).toString(),e))),r=a}else{r=o.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator);const e=On(l,s);e&&(r+=s.decimalMarker+e)}}else if(r.length>s.precision){const t=r.length;let i=r[0];const a=On(r.substr(1),s);a&&(i+=s.decimalMarker+a,"}"!==i[i.length-1]&&(i+="\\ldots")),"1"!==i?i+=s.exponentProduct:i="",r=i+Bn((t-2).toString(),e)}else{const t=r.match(/([0-9]*)\.?([0-9]*)([e|E]([-+]?[0-9]+))?/);t&&(r=t[1],t[2]&&(r+=e.decimalMarker+t[2]),n=null!==(a=t[4])&&void 0!==a?a:""),r=r.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator)}const o=Bn(n,e);return t+r+(o?e.exponentProduct+o:"")}if(n=function(e){return parseFloat(Number(e).toPrecision(15))}(r),"engineering"===s.notation)if(0===n)o="0";else{const t=Math.abs(n);let i=Math.round(Math.log10(t));i-=i%3,t<1e3&&(i=0);const a=t/Math.pow(10,i);let r="";const l=a.toString().match(/^(.*)\.(.*)$/);(null==l?void 0:l[1])&&l[2]&&(r=l[1]+s.decimalMarker+l[2]),s.groupSeparator&&(r=On(a.toExponential(),s));let c="";0!==i&&(c=Bn(i.toString(),e)),o=(n<0?"-":"")+r+c}else{const t="string"==typeof r?r:r.toString();let i,a,n,l=t.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);i=t,n="",(null==l?void 0:l[1])&&l[2]&&(i=l[1],a=Bn(l[2],e),a&&(a=e.exponentProduct+a)),l=i.match(/^(.*)\.(.*)$/),(null==l?void 0:l[1])&&l[2]&&(i=l[1],n=l[2]),s.groupSeparator&&(i=i.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator),n=On(n,s)),n&&(n=s.decimalMarker+n),o=i+n+(null!=a?a:"")}return o}(this.options,e);if(t)return this.level-=1,t;const i=Tr(e);if("<$>"===i)t="$";else if("<$$>"===i)t="$$";else if("<{>"===i)t="{";else if("<}>"===i)t="}";else if(""===i)t=" ";else{if(i&&("\\"===i[0]||"#"===i[0])){this.level-=1;const t=Er(e);return 0===t.length?i:i+"{"+t.map(e=>this.emit(e)).filter(e=>Boolean(e)).join("}{")+"}"}if(null!==i)t=this.emitSymbol(e,this.dictionary.name.get(i));else{const i=this.dictionary.name.get(Dr(e));i?"function"==typeof i.emit?t=i.emit(this,e):(t||void 0===i.precedence&&!i.trigger.superfix&&!i.trigger.subfix||(t=function(e,t,i){let a="";const r=Or(t),n=Dr(t);if(i.trigger.superfix||i.trigger.subfix)return 1!==r&&e.onError({code:"operator-requires-one-operand",arg:e.emitSymbol(n)}),Br(i.emit,[e.emit(Nr(t,1))]);if(i.trigger.postfix)return 1!==r&&e.onError({code:"postfix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Br(i.emit,[e.wrap(Nr(t,1),i.precedence)]);if(i.trigger.prefix)return 1!==r&&e.onError({code:"prefix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Br(i.emit,[e.wrap(Nr(t,1),i.precedence+1)]);if(i.trigger.infix){a=e.wrap(Nr(t,1),i.precedence);for(let n=2;n=1){let r="";for(const n of Er(t))n&&(a.push(r),a.push(e.emit(n)),r=i.separator)}return Array.isArray(i.closeFence)?a.push(g(i.closeFence)):"string"==typeof i.closeFence&&a.push(i.closeFence),f(a)}(this,e,i)),!t&&i.trigger.symbol&&(t=this.emitSymbol(e,i))):Array.isArray(e)||Lr(e)?t=this.emitSymbol(e):this.onError({code:"syntax-error",arg:JSON.stringify(e)})}}return this.level-=1,t}}function Pn(e,t){var i,a,r;const n=new Nn(Xe(e,[]),{..._r,...wr,onError:e=>{"undefined"!=typeof window&&(!e.before||e.after)},dictionary:En("all"),...t}),o=n.matchExpression();n.atEnd()||null===(i=null==t?void 0:t.onError)||void 0===i||i.call(t,{code:"syntax-error"});let s=null!==(a=null==t?void 0:t.form)&&void 0!==a?a:["canonical"];return Array.isArray(s)||(s=[s]),null!==(r=Mn(function(e="all"){let t;return"all"===e?(t={},Object.keys(kr).forEach(e=>{t={...t,...kr[e]}})):t={...kr[e]},t}("all"),o,s))&&void 0!==r?r:""}const Rn={"\\imaginaryI":"ⅈ","\\imaginaryJ":"ⅉ","\\pi":"π","\\exponentialE":"ℯ","﹢":"+","+":"+","−":"-","-":"-","﹣":"-","-":"-","\\times":"*","\\cdot":"*","⨉":"*","️✖":"*","️×":"*",".":"*","÷":"/","⁄":"/","/":"/","!":"factorial","\\mp":"minusplus","\\ne":"!=","\\coloneq":":=","\\questeq":"?=","\\approx":"approx","\\cong":"congruent","\\sim":"similar","\\equiv":"equiv","\\pm":"plusminus","\\land":"and","\\wedge":"and","\\lor":"or","\\vee":"or","\\oplus":"xor","\\veebar":"xor","\\lnot":"not","\\neg":"not","\\exists":"exists","\\nexists":"!exists","\\forall":"forAll","\\backepsilon":"suchThat","\\therefore":"therefore","\\because":"because","\\nabla":"nabla","\\circ":"circle","\\ominus":"ominus","\\odot":"odot","\\otimes":"otimes","\\zeta":"Zeta","\\Gamma":"Gamma","\\min":"min","\\max":"max","\\mod":"mod","\\lim":"lim","\\sum":"sum","\\prod":"prod","\\int":"integral","\\iint":"integral2","\\iiint":"integral3","\\Re":"Re","\\gothicCapitalR":"Re","\\Im":"Im","\\gothicCapitalI":"Im","\\binom":"nCr","\\partial":"partial","\\differentialD":"differentialD","\\capitalDifferentialD":"capitalDifferentialD","\\Finv":"Finv","\\Game":"Game","\\wp":"wp","\\ast":"ast","\\star":"star","\\asymp":"asymp","\\to":"to","\\gets":"gets","\\in":"elementof","\\notin":"!elementof","\\ni":"ownedby","\\owns":"ownedby","\\subset":"subset","\\supset":"superset","\\complement":"complement","\\rightarrow":"shortLogicalImplies","\\leftarrow":"shortLogicalImpliedBy","\\leftrightarrow":"shortLogicalEquivalent","\\longrightarrow":"logicalImplies","\\longleftarrow":"logicalImpliedBy","\\longleftrightarrow":"logicalEquivalent","\\Rightarrow":"shortImplies","\\Leftarrow":"shortImpliedBy","\\Leftrightarrow":"shortEquivalent","\\implies":"implies","\\Longrightarrow":"implies","\\impliedby":"impliedBy","\\Longleftarrow":"impliedBy","\\iff":"equivalent","\\Longleftrightarrow":"equivalent"},In={"+":"add","*":"multiply","-":"subtract","/":"divide","=":"equal",":=":"assign","!=":"ne","?=":"questeq",approx:"approx",congruent:"congruent",similar:"similar",equiv:"equiv","<":"lt",">":"gt","<=":"le",">=":"ge","≤":"le","≥":"ge",">>":"gg","<<":"ll","**":"pow","++":"increment","--":"decrement"},Hn={equal:"%0 = %1",ne:"%0 \\ne %1",questeq:"%0 \\questeq %1",approx:"%0 \\approx %1",congruent:"%0 \\cong %1",similar:"%0 \\sim %1",equiv:"%0 \\equiv %1",assign:"%0 := %1",lt:"%0 < %1",gt:"%0 > %1",le:"%0 \\le %1",ge:"%0 \\ge %1",sin:"\\sin%_%^ %0",cos:"\\cos%_%^ %0",tan:"\\tan%_%^ %0",cot:"\\cot%_%^ %0",sec:"\\sec%_%^ %0",csc:"\\csc%_%^ %0",sinh:"\\sinh %0",cosh:"\\cosh %0",tanh:"\\tanh %0",csch:"\\csch %0",sech:"\\sech %0",coth:"\\coth %0",arcsin:"\\arcsin %0",arccos:"\\arccos %0",arctan:"\\arctan %0",arccot:"\\arcctg %0",arcsec:"\\arcsec %0",arccsc:"\\arccsc %0",arsinh:"\\arsinh %0",arcosh:"\\arcosh %0",artanh:"\\artanh %0",arcsch:"\\arcsch %0",arsech:"\\arsech %0",arcoth:"\\arcoth %0",ln:"\\ln%_%^ %",log:"\\log%_%^ %",lg:"\\lg %",lb:"\\lb %",sum:"\\sum%_%^ %0",prod:"\\prod%_%^ %0",Zeta:"\\zeta%_%^ %",Gamma:"\\Gamma %",min:"\\min%_%^ %",max:"\\max%_%^ %",mod:"\\mod%_%^ %",lim:"\\lim%_%^ %",binom:"\\binom %",nabla:"\\nabla %",curl:"\\nabla\\times %0",div:"\\nabla\\cdot %0",floor:"\\lfloor %0 \\rfloor%_%^",ceil:"\\lceil %0 \\rceil%_%^",abs:"\\left| %0 \\right|%_%^",norm:"\\lVert %0 \\rVert%_%^",ucorner:"\\ulcorner %0 \\urcorner%_%^",lcorner:"\\llcorner %0 \\lrcorner%_%^",angle:"\\langle %0 \\rangle%_%^",group:"\\lgroup %0 \\rgroup%_%^",moustache:"\\lmoustache %0 \\rmoustache%_%^",brace:"\\lbrace %0 \\rbrace%_%^","sqrt[]":"\\sqrt[%^]{%0}",sqrt:"\\sqrt{%0}",lcm:"\\operatorname{lcm}%",gcd:"\\operatorname{gcd}%",erf:"\\operatorname{erf}%",erfc:"\\operatorname{erfc}%",randomReal:"\\operatorname{randomReal}%",randomInteger:"\\operatorname{randomInteger}%",and:"%0 \\land %1",or:"%0 \\lor %1",xor:"%0 \\oplus %1",not:"%0 \\lnot %1",circle:"%0 \\circ %1",ast:"%0 \\ast %1",star:"%0 \\star %1",asymp:"%0 \\asymp %1","/":"\\frac{%0}{%1}",Re:"\\Re{%0}",Im:"\\Im{%0}",factorial:"%0!",factorial2:"%0!!"},Wn={degree:880,nabla:740,curl:740,partial:740,differentialD:740,capitalDifferentialD:740,"**":720,odot:710,not:680,div:660,solidus:660,"/":660,setminus:650,"%":640,otimes:410,union:350,intersection:350,"*":390,ast:390,".":390,oplus:300,ominus:300,"+":275,"-":275,"+-":275,"-+":275,circle:265,circledast:265,circledcirc:265,star:265,"..":263,to:262,in:262,"|":261,congruent:265,equiv:260,"=":260,"!=":255,"?=":255,similar:250,approx:247,"<":245,">":243,">=":242,"≥":242,"<=":241,complement:240,subset:240,superset:240,elementof:240,"!elementof":240,exists:230,"!exists":230,forall:230,and:200,xor:195,or:190,suchThat:110,":":100,assign:80,":=":80,therefore:70,because:70,shortLogicalImplies:52,shortImplies:51,logicalImplies:50,implies:49,shortLogicalImpliedBy:48,shortImpliedBy:47,logicalImpliedBy:46,impliedBy:45,shortLogicalEquivalent:44,shortEquivalent:43,logicalEquivalent:42,equivalent:41,",":40,";":30};function Vn(e,i){return t(e.arg)?e.arg[i]:void 0}function Un(e){return e&&Wn[e]||-1}function jn(e){return/=|=>/.test(e)?"right":"left"}function Gn(e){if("f"===e||"g"===e)return!0;const t=Hn[e];return!!t&&!!/%[^01_^]?/.test(t)}function Xn(e){e=(e||"").trim();let t=Rn[e];if(!t)if(/^\\[^{}]+$/.test(e)){const i=re(e,"math",{});t=i&&i.value||e.slice(1)}else t=e;return t}function Zn(e){if(!e)return null;const t=Xn(io(e)),i=[Un(t),jn(t)];return i[0]<=0?null:i}function Yn(e){return null!==Zn(e)}const Qn={"\\lfloor\\rfloor":"floor","\\lceil\\rceil":"ceil","\\vert\\vert":"abs","\\lvert\\rvert":"abs","||":"abs","\\Vert\\Vert":"norm","\\lVert\\rVert":"norm","\\ulcorner\\urcorner":"ucorner","\\llcorner\\lrcorner":"lcorner","\\langle\\rangle":"angle","\\lgroup\\rgroup":"group","\\lmoustache\\rmoustache":"moustache","\\lbrace\\rbrace":"brace"},Jn={"!":"factorial","\\dag":"dagger","\\dagger":"dagger","\\ddagger":"dagger2","\\maltese":"maltese","\\backprime":"backprime","\\backdoubleprime":"backprime2","\\prime":"prime","\\doubleprime":"prime2","\\$":"$","\\%":"%","\\_":"_","\\degree":"degree"},eo={"+":"add","-":"add","*":"multiply","=":"equal",",":"list",";":"list2",and:"and",or:"or",xor:"xor",union:"union",shortLogicalEquivalent:"logicalEquivalent",logicalEquivalent:"logicalEquivalent",shortEquivalent:"equivalent",equivalent:"equivalent"},to={",":"list",";":"list2"};function io(e){if("string"==typeof e)return e;if(t(e)){let t="";for(const i of e)t+=io(i);return t}if(e.symbol&&!/^\\math(op|bin|rel|open|punct|ord|inner)/.test(e.symbol))return e.symbol;if("leftright"===e.type)return"";if("string"==typeof e.body)return e.body;if(t(e.body)){let t="";for(const i of e.body)t+=io(i);return t}return""}function ao(e){return"string"==typeof e.sym?function(e){let t=Hn[e];return t?t.replace("%1","").replace("%0","").replace("%",""):(e.length>1&&(t="\\"+e),t||(t=ee("math",e)),t)}(e.sym)||e.sym:""}function ro(e){return parseFloat(e.num)}function no(e){return"object"==typeof e&&void 0!==e.num}function oo(e){let t=0;return no(e)&&(t="object"==typeof e.num?void 0!==e.num.re?Ao(e.num.re):0:parseFloat(e.num)),t}function so(e){let t=0;return no(e)&&"object"==typeof e.num&&(t=void 0!==e.num.im?Ao(e.num.im):0),t}function lo(e){return e&&void 0!==e.sup}function co(e){return e&&void 0!==e.sub}function mo(e,t,i){let a=!1;const r=e.atoms[e.index];return r&&r.type===t&&(a=void 0===i||io(r)===i),a}function po(e,...t){const i={fn:e,arg:void 0};if(t){const e=[];for(const i of t)i&&e.push(i);e.length>0&&(i.arg=e)}return i}function uo(e){return"number"==typeof e?{num:e.toString()}:"string"==typeof e||"object"==typeof e?{num:e}:void 0}function ho(e){if(no(e)){const t=oo(e),i=so(e);return 0!==i?(0!==t&&(e.num.re=(-t).toString()),e.num.im=(-i).toString()):e.num=(-t).toString(),e}return po("negate",e)}function fo(e){const t=e.atoms[e.index+1];return t&&"msubsup"===t.type}function go(e,t){let i=e.atoms[e.index];return!i||void 0===i.superscript&&void 0===i.subscript?i=null:e.index+=1,i||(i=e.atoms[e.index+1],i&&"msubsup"===i.type&&(i.superscript||i.subscript)?e.index+=2:i=null),i?(void 0!==i.subscript&&(e.ast.sub=Mo(i.subscript,t)),void 0!==i.superscript&&("msubsup"===i.type?/['\u2032]|\\prime/.test(io(i.superscript))?(e.index+=1,i=e.atoms[e.index+1],i&&"msubsup"===i.type&&/['\u2032]|\\prime/.test(io(i.superscript))?e.ast.sup={sym:"″"}:(e.ast.sup={sym:"′"},e.index-=1)):/['\u2033]|\\doubleprime/.test(io(i.superscript))?e.ast.sup={sym:"″"}:e.ast&&(e.ast.sup=Mo(i.superscript,t)):e.ast.sup=Mo(i.superscript,t))):e.index+=1,e}function yo(e,t){const i=e.ast;if(vo(e,"!!"))return e.index+=1,e.ast=po("factorial2",i),yo(e=go(e,t),t);if(vo(e,"++"))return e.index+=1,e.ast=po("increment",i),yo(e=go(e,t),t);if(vo(e,"--"))return e.index+=1,e.ast=po("decrement",i),yo(e=go(e,t),t);const a=e.atoms[e.index];return(null==a?void 0:a.symbol)&&Jn[a.symbol]&&(e.ast=po(Jn[a.symbol],i),e=yo(e=go(e,t),t)),e}function bo(e,t,i,a){if(e.index=e.index||0,0===e.atoms.length||e.index>=e.atoms.length)return e.ast=void 0,e;const r=e.minPrec;e.minPrec=0;let n=e.atoms[e.index];if(t){if("mopen"===n.type&&io(n)===t)e.index+=1,n=(e=ko(e,a)).atoms[e.index],n&&"mclose"===n.type&&io(n)===i&&(fo(e)&&(e.ast={group:e.ast}),e=yo(e=go(e,a),a));else if("textord"===n.type&&io(n)===t)e.index+=1,n=(e=ko(e,a)).atoms[e.index],n&&"textord"===n.type&&io(n)===i&&(e.index+=1,e=yo(e=go(e,a),a));else if("\\lVert"===t&&"textord"===n.type&&"|"===n.symbol){if(n=e.atoms[e.index+1],n&&"textord"===n.type&&"|"===n.symbol){e.index+=2,n=(e=ko(e,a)).atoms[e.index];const t=e.atoms[e.index+1];n&&"textord"===n.type&&"|"===n.symbol&&t&&"textord"===t.type&&"|"===t.symbol&&(e.index+=2,e=yo(e=go(e,a),a))}}else if("sizeddelim"===n.type&&n.delim===t)e.index+=1,n=(e=ko(e,a)).atoms[e.index],n&&"sizeddelim"===n.type&&n.delim===i&&(e.index+=1,e=yo(e=go(e,a),a));else{if("leftright"!==n.type||n.leftDelim!==t||"?"!==n.rightDelim&&n.rightDelim!==i)return;e.ast=Mo(n.body,a),fo(e)&&(e.ast={group:e.ast}),e=yo(e=go(e,a),a)}return e.minPrec=r,e}{let o=!0;if("mopen"===n.type?(t=n.symbol,i=I[t]):"sizeddelim"===n.type?(t=n.delim,i=I[t]):"leftright"===n.type?(o=!1,t=n.leftDelim,"?"===(i=n.rightDelim)&&(i=I[t])):"textord"===n.type&&(t=n.symbol,i=I[t]),t&&i){if("|"===t&&"|"===i){const a=e.atoms[e.index+1];a&&"textord"===a.type&&"|"===a.symbol&&(t="\\lVert",i="\\rVert")}if(e=bo(e,t,i,a))return o&&(e.index+=1),e.ast={fn:Qn[t+i]||t+i,arg:[e.ast]},e.minPrec=r,e}}}function vo(e,t){return e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)&&t===io(e.atoms[e.index])+io(e.atoms[e.index+1])}function xo(e){if(e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)){if(!mo(e,"textord","\\nabla")){const t=e.atoms[e.index].symbol+e.atoms[e.index+1].symbol,i=/^(>=|<=|>>|<<|:=|!=)$/.test(t)?t:"";return i&&(e.index+=1),i}return e.index+=1,mo(e,"mbin","\\times")?(e.index+=1,e.ast="curl",e):mo(e,"mbin","\\cdot")?(e.index+=1,e.ast="div",e):void(e.index-=1)}}function ko(e,i){if(e.index=e.index||0,e.ast=void 0,0===e.atoms.length||e.index>=e.atoms.length)return e;e.minPrec=e.minPrec||0;let a=function e(i,a){if(i.index=i.index||0,i.ast=void 0,0===i.atoms.length||i.index>=i.atoms.length)return i;let r=i.atoms[i.index];if("text"===r.mode){let e="";for(;i.atoms[i.index]&&"text"===i.atoms[i.index].mode;)e+=i.atoms[i.index].body,i.index+=1;return i.ast={text:e},i}const n=Xn(io(r));if(xo(i))i.ast=po(i.ast,e(i,a).ast);else{if("root"===r.type)return i.index=0,i.atoms=r.body,e(i,a);if("mbin"===r.type&&"-"===n)i.index+=1,(i=e(i,a)).ast=ho(i.ast);else if("mbin"===r.type&&"+"===n)i.index+=1,(i=e(i,a)).ast=po("add",i.ast);else if("mord"===r.type&&/^[0-9.]$/.test(r.symbol)){let t="",n=!1,o=/^[0-9.eEdD]$/;for(;i.index0&&"\\"===d.charAt(0)&&"string"==typeof e.body&&(d=e.body)),l=Q(d,m,p).replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"),l!==d?(c={sym:l},m="normal"):c={sym:d};break;case"minner":case"mop":break;case"box":c=Mo(e.body,t);break;case"enclose":break;case"array":if("cardinality"===e.environmentName)c=po("card",Mo(e.array,t));else if(/array|matrix|pmatrix|bmatrix/.test(e.environmentName)){c={fn:"array",args:[]};for(const i of e.array)c.args.push(i.map(e=>Mo(e,t)))}else if("cases"===e.environmentName){c={fn:"cases",args:[]};for(const i of e.array)if(i[0]){const e=[];e.push(Mo(i[0],t));let a=Mo(i[1],t);a&&"text"===a.fn&&a.arg&&/^(if|when|for)$/i.test(a.arg[0].trim())&&(a=a.arg.filter(e=>"string"!=typeof e)),e.push(null!=a?a:{}),c.args.push(e)}}break;case"spacing":case"space":case"mathstyle":break;default:c=void 0}return c&&m&&"normal"!==m&&(c.variant=m),c&&"string"==typeof e.cssClass&&(c.class=e.cssClass),c&&"string"==typeof e.cssId&&(c.id=e.cssId),c}function wo(e){if(!e)return[];let i;if(t(e)){i=[];for(const t of e){const e=wo(t);i=i.concat(e)}}else{if("spacing"===e.type||"first"===e.type)return[];"box"===e.type?i=wo(e.body):(e.body&&t(e.body)&&(e.body=wo(e.body)),e.superscript&&t(e.superscript)&&(e.superscript=wo(e.superscript)),e.subscript&&t(e.subscript)&&(e.subscript=wo(e.subscript)),e.index&&t(e.index)&&(e.index=wo(e.index)),e.denom&&t(e.denom)&&(e.denom=wo(e.denom)),e.numer&&t(e.numer)&&(e.numer=wo(e.numer)),e.array&&t(e.array)&&(e.array=e.array.map(e=>e.map(e=>wo(e)))),i=[e])}return i}function Mo(e,t){return function(e,t){e.index=e.index||0,e.ast=void 0;const i=[];for(;e.atoms[e.index];)if("text"===e.atoms[e.index].mode){let t="";for(;e.atoms[e.index]&&"text"===e.atoms[e.index].mode;)t+=e.atoms[e.index].body,e.index+=1;i.push(po("text",t))}else{const a=ko(e,t).ast;if(!a)return;i.push(a)}return i.length>1?po("sequence",...i):i[0]||void 0}({atoms:wo(e)},t)}function So(e,t){return Mo(e,t)}function zo(e,...t){e=e||".. ";let i="";if(t.length>0){"."!==e[0]&&(i+=e[0]);let a="";for(const r of t)i+=a+r,a=e[2];"."!==e[1]&&(i+=e[1])}return i}function Lo(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}return i!==e.length&&(e+="\\ldots"),e.replace(/(\d{3})/g,"$1"+t.groupSeparator)}function Ao(e){return parseFloat(parseFloat(e).toPrecision(15))}function qo(e,t){let i,a="";if("number"==typeof t.precision){if("number"!=typeof e){let i="",a="";if("-"===e[0]?(i="-",e=e.substr(1)):"+"===e[0]&&(e=e.substr(1)),e.indexOf(".")>=0){const r=e.match(/(\d*).(\d*)([e|E]([-+]?[0-9]*))?/),n=r[1],o=r[2].substring(0,Math.min(t.precision-n.length,r[2].length));if(a=r[4]||"","0"===n){let a=0;for(;"0"===o[a]&&a=t.precision)r="0",i="";else{r=e[a];const i=Lo(e.substr(a+1),t);i&&(r+=t.decimalMarker+i)}"0"!==r&&(e.length-1>t.precision&&!r.endsWith("}")&&!r.endsWith("\\ldots")&&(r+="\\ldots"),a>4&&(r+=t.exponentProduct,t.exponentMarker?r+=t.exponentMarker+(1-a).toString():r+="10^{"+(1-a).toString()+"}")),e=r}else{e=n.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);const i=Lo(o,t);i&&(e+=t.decimalMarker+i)}}else if(e.length>t.precision){const i=e.length;let a=e[0];const r=Lo(e.substr(2),t);r&&(a+=t.decimalMarker+r,"}"!==a[a.length-1]&&(a+="\\ldots")),"1"!==a?a+=t.exponentProduct:a="",t.exponentMarker?a+=t.exponentMarker+(i-2).toString():a+="10^{"+(i-2).toString()+"}",e=a}else e=e.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);return a&&(a=t.exponentMarker?t.exponentMarker+a:t.exponentProduct+" 10^{"+a+"}"),i+e+a}i=Ao(e)}if("engineering"===t.scientificNotation)if(0===i)a="0";else{const e=Math.abs(i);let r=Math.round(Math.log10(e));r-=r%3,e<1e3&&(r=0);const n=e/Math.pow(10,r);let o="";const s=n.toString().match(/^(.*)\.(.*)$/);(null==s?void 0:s[1])&&s[2]&&(o=s[1]+t.decimalMarker+s[2]),t.groupSeparator&&(o=Lo(n.toExponential(),t));let l="";l=0===r?"":t.exponentMarker?t.exponentMarker+r:t.exponentProduct+" 10^{"+r+"}",a=(i<0?"-":"")+o+l}else{const i="string"==typeof e?e:e.toString();let r,n,o,s=i.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);r=i,o="",(null==s?void 0:s[1])&&s[2]&&(r=s[1],n=t.exponentMarker?t.exponentMarker+s[2]:t.exponentProduct+" 10^{"+s[2]+"}"),s=r.match(/^(.*)\.(.*)$/),(null==s?void 0:s[1])&&s[2]&&(r=s[1],o=s[2]),t.groupSeparator&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator),o=Lo(o,t)),o&&(o=t.decimalMarker+o),a=r+o+(n||"")}return a}class $o{constructor(e,t){this.stylesheets=[],this.config=Oa({namespace:"",substituteTextArea:void 0,readOnly:!1,createHTML:e=>e,fontsDirectory:"./fonts",defaultMode:"math",macros:R,horizontalSpacingScale:1,letterShapeStyle:"auto",smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,ignoreSpacebarInMathMode:!0,locale:_a.locale,strings:{},keybindings:oi,overrideDefaultInlineShortcuts:!1,inlineShortcuts:{},inlineShortcutTimeout:0,virtualKeyboardToggleGlyph:'',virtualKeyboardMode:"auto",virtualKeyboards:"all",virtualKeyboardLayout:"auto",customVirtualKeyboardLayers:{},customVirtualKeyboards:{},virtualKeyboardTheme:/android|cros/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?"material":"apple",keypressVibration:!0,keypressSound:null,plonkSound:null,textToSpeechRules:"mathlive",textToSpeechMarkup:"",textToSpeechRulesOptions:{},speechEngine:"local",speechEngineVoice:"Joanna",speechEngineRate:"100%",speakHook:Ea,readAloudHook:Ea,onAnnounce:Ta,onKeystroke:()=>!0,onMoveOutOf:()=>!0,onTabOutOf:()=>!0,onBlur:Ea,onFocus:Ea,onContentWillChange:Ea,onContentDidChange:Ea,onSelectionWillChange:Ea,onSelectionDidChange:Ea,onUndoStateWillChange:Ea,onUndoStateDidChange:Ea,onModeChange:Ea,onVirtualKeyboardToggle:Ea,onReadAloudStatus:Ea,onError:()=>{}},t),this.element=e,e.mathfield=this,this.originalContent=e.innerHTML;let i=this.element.textContent;i&&(i=i.trim()),rt(this.config.fontsDirectory,this.config.onError),this.stylesheets.push(nt(e,pr)),this.stylesheets.push(nt(e,'@-webkit-keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}@keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}.ML__caret:after{content:"";border:none;border-radius:2px;border-right:2px solid var(--caret);margin-right:-2px;position:relative;left:-1px;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text-caret:after{content:"";border:none;border-radius:1px;border-right:1px solid var(--caret);margin-right:-1px;position:relative;left:0;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__command-caret:after{content:"_";border:none;margin-right:-1ex;position:relative;color:var(--caret);-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__fieldcontainer{display:flex;flex-flow:row;justify-content:space-between;align-items:flex-end;min-height:39px;touch-action:none;width:100%;--hue:212;--highlight:hsl(var(--hue),97%,85%);--caret:hsl(var(--hue),40%,49%);--highlight-inactive:#ccc;--primary:hsl(var(--hue),40%,50%);--secondary:hsl(var(--hue),19%,26%);--on-secondary:hsl(var(--hue),19%,26%)}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}}body[theme=dark] .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}.ML__fieldcontainer:focus{outline:2px solid var(--primary);outline-offset:3px}.ML__fieldcontainer__field{align-self:center;position:relative;overflow:hidden;line-height:0;padding:2px;width:100%}.ML__virtual-keyboard-toggle{display:flex;align-self:center;align-items:center;flex-shrink:0;flex-direction:column;justify-content:center;width:34px;height:34px;padding:0;margin-right:4px;cursor:pointer;box-sizing:border-box;border-radius:50%;border:1px solid transparent;transition:background .2s cubic-bezier(.64,.09,.08,1);color:var(--primary);fill:currentColor;background:transparent}.ML__virtual-keyboard-toggle:hover{background:hsl(var(--hue),25%,35%);color:#fafafa;fill:currentColor;border-radius:50%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.ML__popover{visibility:hidden;min-width:160px;background-color:rgba(97,97,97,.95);color:#fff;text-align:center;border-radius:6px;position:fixed;z-index:1;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:all .2s cubic-bezier(.64,.09,.08,1)}.ML__popover:after{content:"";position:absolute;top:-5px;left:calc(50% - 3px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;font-size:1rem;border-bottom:5px solid rgba(97,97,97,.9)}.ML__popover--reverse-direction:after{top:auto;bottom:-5px;border-top:5px solid rgba(97,97,97,.9);border-bottom:0}.ML__textarea__textarea{transform:scale(0);resize:none;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;font-size:16px}.ML__focused .ML__text{background:hsla(var(--hue),40%,50%,.1)}.ML__smart-fence__close{opacity:.5}.ML__selection{background:var(--highlight-inactive);box-sizing:border-box}.ML__focused .ML__selection{background:var(--highlight)!important;color:var(--on-highlight)}.ML__contains-caret.ML__close,.ML__contains-caret.ML__open,.ML__contains-caret>.ML__close,.ML__contains-caret>.ML__open,.sqrt.ML__contains-caret>.sqrt-sign,.sqrt.ML__contains-caret>.vlist>span>.sqrt-line{color:var(--caret)}.ML__command{font-family:IBM Plex Mono,Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;letter-spacing:-1px;font-weight:400;line-height:1em;color:var(--primary)}:not(.ML__command)+.ML__command{margin-left:.25em}.ML__command+:not(.ML__command){padding-left:.25em}.ML__suggestion{opacity:.5}.ML__virtual-keyboard-toggle.pressed{background:hsla(0,0%,70%,.5)}.ML__virtual-keyboard-toggle:focus{outline:none;border-radius:50%;border:2px solid var(--primary)}.ML__virtual-keyboard-toggle.active,.ML__virtual-keyboard-toggle.active:hover{background:hsla(0,0%,70%,.5);color:#000;fill:currentColor}.ML__scroller{position:fixed;z-index:1;top:0;height:100vh;width:200px}[data-ML__tooltip]{position:relative}[data-ML__tooltip][data-placement=top]:after{top:inherit;bottom:100%}[data-ML__tooltip]:after{position:absolute;visibility:hidden;content:attr(data-ML__tooltip);display:inline-table;top:110%;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:200px;padding:8px;background:#616161;color:#fff;text-align:center;z-index:2;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);border-radius:2px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:400;font-size:12px;opacity:0;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1)}@media only screen and (max-width:767px){[data-ML__tooltip]:after{height:32px;padding:4px 16px;font-size:14px}}[data-ML__tooltip]:hover{position:relative}[data-ML__tooltip]:hover:after{visibility:visible;opacity:1;transform:scale(1)}[data-ML__tooltip][data-delay]:after{transition-delay:0s}[data-ML__tooltip][data-delay]:hover:after{transition-delay:1s}'));let a="";this.config.substituteTextArea?"string"==typeof this.config.substituteTextArea?a+=this.config.substituteTextArea:a+="":/android|ipad|ipod|iphone/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?a+="\n \n \n ":a+='',a+='',"manual"===this.config.virtualKeyboardMode?(a+=`
    `,this.config.virtualKeyboardToggleGlyph?a+=this.config.virtualKeyboardToggleGlyph:a+='',a+="
    "):a+="",a+="
    ",a+='\n
    \n \n \n
    \n ',this.element.innerHTML=this.config.createHTML(a);let r=0;"function"==typeof this.config.substituteTextArea?this.textarea=this.config.substituteTextArea():this.textarea=this.element.children[r++].firstElementChild,this.field=this.element.children[r].children[0],this.field.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation();const t=void 0===e.deltaX?e.detail:-e.deltaX;isFinite(t)&&this.field.scroll({top:0,left:this.field.scrollLeft-5*t})},{passive:!1}),this.virtualKeyboardToggleDOMNode=this.element.children[r++].children[1],vi(this,this.virtualKeyboardToggleDOMNode,{default:"toggleVirtualKeyboard",alt:"toggleVirtualKeyboardAlt",shift:"toggleVirtualKeyboardShift"}),this.ariaLiveText=this.element.children[r].children[0],this.accessibleNode=this.element.children[r++].children[1],this.popover=hi("mathlive-popover-panel","ML__popover"),this.stylesheets.push(nt(e,"div.ML__popover.is-visible{visibility:inherit;-webkit-animation:ML__fade-in .15s cubic-bezier(0,0,.2,1);animation:ML__fade-in .15s cubic-bezier(0,0,.2,1)}@-webkit-keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}@keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}.ML__popover__content{border-radius:6px;padding:2px;cursor:pointer;min-height:100px;display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:8px}.ML__popover__content a{color:#5ea6fd;padding-top:.3em;margin-top:.4em;display:block}.ML__popover__content a:hover{color:#5ea6fd;text-decoration:underline}.ML__popover__content.active,.ML__popover__content.pressed,.ML__popover__content:hover{background:hsla(0,0%,100%,.1)}.ML__popover__command{font-size:1.6rem}.ML__popover__prev-shortcut{height:31px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:4px;padding-bottom:2px}.ML__popover__next-shortcut:hover,.ML__popover__prev-shortcut:hover{opacity:.3}.ML__popover__next-shortcut.active,.ML__popover__next-shortcut.pressed,.ML__popover__prev-shortcut.active,.ML__popover__prev-shortcut.pressed{opacity:1}.ML__popover__next-shortcut>span,.ML__popover__prev-shortcut>span{padding:5px;border-radius:50%;width:20px;height:20px;display:inline-block}.ML__popover__prev-shortcut>span>span{margin-top:-2px;display:block}.ML__popover__next-shortcut>span>span{margin-top:2px;display:block}.ML__popover__next-shortcut:hover>span,.ML__popover__prev-shortcut:hover>span{background:hsla(0,0%,100%,.1)}.ML__popover__next-shortcut{height:34px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:2px;padding-bottom:4px}.ML__popover__shortcut{font-size:.8em;margin-top:.25em}.ML__popover__note,.ML__popover__shortcut{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;opacity:.7;padding-top:.25em}.ML__popover__note{font-size:.8rem;line-height:1em;padding-left:.5em;padding-right:.5em}.ML__shortcut-join{opacity:.5}")),this.keystrokeCaption=hi("mathlive-keystroke-caption-panel","ML__keystroke-caption"),this.stylesheets.push(nt(e,".ML__keystroke-caption{visibility:hidden;background:var(--secondary);border-color:var(--secondary-border);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);text-align:center;border-radius:6px;padding:16px;position:absolute;z-index:1;display:flex;flex-direction:row;justify-content:center;--keystroke:#fff;--on-keystroke:#555;--keystroke-border:#f7f7f7}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}}body[theme=dark] .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}.ML__keystroke-caption>span{min-width:14px;margin:0 8px 0 0;padding:4px;background-color:var(--keystroke);color:var(--on-keystroke);fill:currentColor;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1em;border-radius:6px;border:2px solid var(--keystroke-border)}")),this.keystrokeCaptionVisible=!1,this.virtualKeyboardVisible=!1,this.keystrokeBuffer="",this.keystrokeBufferStates=[],this.keystrokeBufferResetTimer=null,this.suggestionIndex=0,this.mode=this.config.defaultMode,this.smartModeSuppressed=!1,this.style={},this.blurred=!0,pi(this.element,"focus",this),pi(this.element,"blur",this),pi(this.textarea,"cut",this),pi(this.textarea,"copy",this),pi(this.textarea,"paste",this),function(e,t){let i,a=null,r=null,n=!1,o=!1;function s(e){clearTimeout(i),i=setTimeout((function(){clearTimeout(i),e()}))}function l(){if(function(e){return e.selectionStart!==e.selectionEnd}(e))return;const i=e.value;e.value="",i.length>0&&t.typedText(i)}const c=e;c.addEventListener("keydown",i=>{if(t.allowDeadKey()||"Dead"!==i.key&&"Unidentified"!==i.key&&229!==i.keyCode)o=!1;else{o=!0,n=!1;const i=t.blur,a=t.focus;t.blur=null,t.focus=null,"function"==typeof e.blur&&(e.blur(),e.focus()),t.blur=i,t.focus=a}return!(!n&&"CapsLock"!==i.code&&!/(Control|Meta|Alt|Shift)(Right|Left)/.test(i.code))||(a=i,r=null,t.keystroke(ga(i),i))},!0),c.addEventListener("keypress",e=>{n||(a&&r&&t.keystroke(ga(a),a),r=e,s(l))},!0),c.addEventListener("keyup",()=>{n||!a||r||l()},!0),c.addEventListener("paste",()=>{e.focus();const i=e.value;e.value="",i.length>0&&t.paste(i)},!0),c.addEventListener("blur",()=>{a=null,r=null,t.blur&&t.blur()},!0),c.addEventListener("focus",()=>{t.focus&&t.focus()},!0),c.addEventListener("compositionstart",()=>{n=!0},!0),c.addEventListener("compositionend",()=>{n=!1,o&&t.allowDeadKey()&&s(l)},!0),c.addEventListener("input",()=>{if(o){const i=t.blur,a=t.focus;t.blur=null,t.focus=null,e.blur(),e.focus(),t.blur=i,t.focus=a,o=!1,n=!1,t.allowDeadKey()&&s(l)}else n||s(l)})}(this.textarea,{allowDeadKey:()=>"text"===this.mode,typedText:e=>Ha(this,e),paste:()=>Ua(this),keystroke:(e,t)=>Ia(this,e,t),focus:()=>this._onFocus(),blur:()=>this._onBlur()}),window.PointerEvent?pi(this.field,"pointerdown",this):pi(this.field,"touchstart:active mousedown",this),pi(window,"resize",this),this.model=new bt({mode:this.config.defaultMode,macros:this.config.macros,removeExtraneousParentheses:this.config.removeExtraneousParentheses},{onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError},{announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)},this),this.undoManager=new ba(this.model),da(this.model,i,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:!0,macros:this.config.macros}),this.undoManager.startRecording(),this.undoManager.snapshot(this.config),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ni().locale)||ri(this.config.locale),this.keybindings=mi(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),Vi(this)}$setConfig(e){this.config=Oa(this.config,e),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ni().locale)||ri(this.config.locale),this.keybindings=mi(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),this.config.readOnly||this._onBlur(),Vi(this)}getConfig(e){return Ba(this.config,e)}handleEvent(e){switch(e.type){case"focus":this._onFocus();break;case"blur":this._onBlur();break;case"touchstart":case"mousedown":case"pointerdown":!function(e,t){const i=e;let a,r=!1,n=!1,o=!1;if(1!==t.buttons&&0!==t.buttons)return;let s=!1,l=!1;const c=t.touches?t.touches[0].clientX:t.clientX,d=t.touches?t.touches[0].clientY:t.clientY,m=Date.now(),p=setInterval(()=>{s?i.field.scroll({top:0,left:i.field.scrollLeft-16}):l&&i.field.scroll({top:0,left:i.field.scrollLeft+16})},32);function u(e){window.PointerEvent?(ui(i.field,"pointermove",h),ui(i.field,"pointerup pointercancel",u),i.field.releasePointerCapture(e.pointerId)):(ui(i.field,"touchmove",h),ui(i.field,"touchcancel touchend",u),ui(window,"mousemove",h),ui(window,"mouseup blur",u)),r=!1,clearInterval(p),i.element.querySelectorAll(".ML__scroller").forEach(e=>e.parentNode.removeChild(e)),e.preventDefault(),e.stopPropagation()}function h(t){const r=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,p="touch"===t.pointerType?20:5;if(Date.now()u.right,s=r=f.left&&c<=f.right&&d>=f.top&&d<=f.bottom){e.$hasFocus()||(o=!0,e.textarea.focus&&e.textarea.focus()),e.resetKeystrokeBuffer(),e.smartModeSuppressed=!1;const s=e.field.querySelector(".ML__mathlive").getBoundingClientRect();if(a=c>s.right?[{relation:"body",offset:e.model.root.body.length-1}]:Xa(e,c,d,{bias:0}),a){let s=document.createElement("div");s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.left-200+"px",s=document.createElement("div"),s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.right+"px",t.shiftKey?(Ut(e.model,e.model.path,a),a=pt(e.model.path),a[a.length-1].offset-=1):jt(e.model,a,0),o=!0,e.style={},3===t.detail||Ga>2?(u(t),3!==t.detail&&3!==Ga||Ft(e.model)):r||(r=!0,window.PointerEvent?(pi(i.field,"pointermove",h),pi(i.field,"pointerup pointercancel",u),i.field.setPointerCapture(t.pointerId)):(pi(window,"blur",u),t.touches?(pi(t.target,"touchmove",h),pi(t.target,"touchcancel touchend",u)):(pi(window,"mousemove",h),pi(window,"mouseup",u))),2!==t.detail&&2!==Ga||(n=!0,Bt(e.model)))}}else ja=null;o&&Vi(e),t.preventDefault()}(this,e);break;case"resize":this.resizeTimer&&window.cancelAnimationFrame(this.resizeTimer),this.resizeTimer=window.requestAnimationFrame(()=>gi(this)&&this._onResize());break;case"cut":t=this,setTimeout(function(){t.$clearSelection(),Vi(t)}.bind(t),0);break;case"copy":!function(e,t){Pt(e.model)?(t.clipboardData.setData("text/plain","$$"+e.$text("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$text("json")),t.clipboardData.setData("application/xml",e.$text("mathML"))):(t.clipboardData.setData("text/plain","$$"+e.$selectedText("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$selectedText("json")),t.clipboardData.setData("application/xml",e.$selectedText("mathML"))),t.preventDefault()}(this,e);break;case"paste":Ua(this)}var t}$revertToOriginalContent(){this.element.innerHTML=this.config.createHTML(this.originalContent),delete this.element.mathfield,delete this.accessibleNode,delete this.ariaLiveText,delete this.field,ui(this.textarea,"cut",this),ui(this.textarea,"copy",this),ui(this.textarea,"paste",this),this.textarea.remove(),delete this.textarea,this.virtualKeyboardToggleDOMNode.remove(),delete this.virtualKeyboardToggleDOMNode,fi(this.popover),delete this.popover,fi(this.keystrokeCaption),delete this.keystrokeCaption,fi(this.virtualKeyboard),delete this.virtualKeyboard,fi(document.getElementById("mathlive-alternate-keys-panel")),ui(this.element,"pointerdown",this),ui(this.element,"touchstart:active mousedown",this),ui(this.element,"focus",this),ui(this.element,"blur",this),ui(window,"resize",this),delete this.element,this.stylesheets.forEach(e=>e.release())}resetKeystrokeBuffer(){this.keystrokeBuffer="",this.keystrokeBufferStates=[],clearTimeout(this.keystrokeBufferResetTimer)}_onSelectionDidChange(){!function(e){const t=Mt(e);if(t){const i=e.siblings(),a=e.anchorOffset()+1;for(let e=t.start;e=0;t--)"command"===i[t].type?i.splice(t,1):e(i[t]);else if(e(i.body),e(i.superscript),e(i.subscript),e(i.underscript),e(i.overscript),e(i.numer),e(i.denom),e(i.index),i.array)for(let t=gt(i.array);t>=0;t--)e(ft(i.array,t))}(e.root.body),e.suppressChangeNotifications=i,_t(e)}(this.model))}_i(this,{deferred:!0}),"function"==typeof this.config.onSelectionDidChange&&this.config.onSelectionDidChange(this)}_onFocus(){this.config.readOnly||this.blurred&&(this.blurred=!1,this.textarea.focus&&this.textarea.focus(),"onfocus"===this.config.virtualKeyboardMode&&cr(this),_i(this),this.config.onFocus&&this.config.onFocus(this),Vi(this))}_onBlur(){this.blurred||(this.blurred=!0,this.ariaLiveText.textContent="","onfocus"===this.config.virtualKeyboardMode&&dr(this),Sa(this,{discard:!0}),Vi(this),this.config.onBlur&&this.config.onBlur(this))}_onResize(){this.element.classList.remove("ML__isNarrowWidth","ML__isWideWidth","ML__isExtendedWidth"),window.innerWidth>=1024?this.element.classList.add("ML__isExtendedWidth"):window.innerWidth>=768?this.element.classList.add("ML__isWideWidth"):this.element.classList.add("ML__isNarrowWidth"),_i(this)}$perform(e){return function(e,i){var a;if(!i)return!1;let r,n=[],o=!1,s=!1;if(t(i)?(r=i[0],n=i.slice(1)):r=i,r=r.replace(/-\w/g,e=>e[1].toUpperCase()),"model"===(null===(a=ji[r])||void 0===a?void 0:a.target)){if(/^(delete|transpose|add)/.test(r)&&e.resetKeystrokeBuffer(),/^(delete|transpose|add)/.test(r)&&"command"!==e.mode&&(e.popUndoStack(),e.snapshot()),ji[r].fn(e.model,...n),/^(delete|transpose|add)/.test(r)&&"command"!==e.mode&&e.snapshot(),/^(delete)/.test(r)&&"command"===e.mode){const t=ne(Si(e.model));0===t.length?Mi(e):ki(e,t[0].match,t.length>1)}s=!0,o=!0}else{if(!ji[r])throw Error('Unknown command "'+r+'"');s=ji[r].fn(e,...n),o=!0}return Pt(e.model)&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(r)||(e.resetKeystrokeBuffer(),e.style={}),s&&Vi(e),o}(this,e)}formatMathlist(e,t){let i="";if("latex"===(t=t||"latex")||"latex-expanded"===t)i=e.toLatex("latex-expanded"===t);else if("mathML"===t)i=Hi(e,this.config);else if("spoken"===t)i=$a(e,this.config);else if("spoken-text"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="",i=$a(e,this.config),this.config.textToSpeechMarkup=t}else if("spoken-ssml"===t||"spoken-ssml-withHighlighting"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="ssml",i=$a(e,this.config),this.config.textToSpeechMarkup=t}else if("mathjson"===t){const t=Pn(e.toLatex(!0),{form:"canonical"});i=JSON.stringify(t)}else if("json"===t){const t=So(e);i=JSON.stringify(t)}else if("json-2"===t){const t=So(e);i=JSON.stringify(t,null,2)}else"ASCIIMath"===t&&(i=ka(e));return i}$text(e){return this.formatMathlist(this.model.root,e)}$selectedText(e){const t=Ot(this.model);if(!t)return"";const i=Fe("math",t);return this.formatMathlist(i,e)}$selectionIsCollapsed(){return Pt(this.model)}$selectionDepth(){return this.model.path.length}$selectionAtStart(){return 0===this.model.startOffset()}$selectionAtEnd(){return this.model.endOffset()>=this.model.siblings().length-1}groupIsSelected(){return 0===this.model.startOffset()&&this.model.endOffset()>=this.model.siblings().length-1}$latex(e,t){return"string"==typeof e?(e!==this.model.root.toLatex()&&(t=null!=t?t:{mode:"math"},da(this.model,e,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:t.suppressChangeNotifications,macros:this.config.macros}),this.undoManager.snapshot(this.config),Vi(this)),e):this.model.root.toLatex()}$el(){return this.element}scrollIntoView(){var e;this.dirty&&Ui(this);let t=null===(e=yi(this.field))||void 0===e?void 0:e.x;const i=this.field.getBoundingClientRect();if(void 0===t){const e=bi(this.field);null!==e&&(t=e.right+i.left-this.field.scrollLeft)}if(void 0!==t){const e=t-window.scrollX;ei.right&&this.field.scroll({top:0,left:e-i.right+this.field.scrollLeft+20,behavior:"smooth"})}}$insert(e,t){if("string"==typeof e&&e.length>0){if((t=null!=t?t:{mode:"math"}).focus&&this.$focus(),t.feedback&&(this.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play())),"\\\\"===e)Qi(this.model);else if("&"===e)Ji(this.model);else{const i=this.style;da(this.model,e,{mode:this.mode,style:zt(this.model),...t}),t.resetStyle&&(this.style=i)}return this.undoManager.snapshot(this.config),Vi(this),!0}return!1}switchMode(e,t="",i=""){this.resetKeystrokeBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(e),t&&this.$insert(t,{format:"latex",mode:{math:"text",text:"math"}[e]}),zi(this.model,!1),"command"===e?(st(this.model),Mi(this),this.suggestionIndex=0,this.virtualKeyboardVisible&&lr(this,"lower-command"),da(this.model,"",{mode:"math"})):this.mode=e,i&&this.$insert(i,{format:"latex",mode:e}),"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),Vi(this)}$hasFocus(){return document.hasFocus()&&function e(t=document){var i,a;return(null===(a=null===(i=t.activeElement)||void 0===i?void 0:i.shadowRoot)||void 0===a?void 0:a.activeElement)?e(t.activeElement.shadowRoot):t.activeElement}(document)===this.textarea}$focus(){this.$hasFocus()||("function"==typeof this.textarea.focus&&this.textarea.focus(),this.model.announce("line"))}$blur(){this.$hasFocus()&&this.textarea.blur&&this.textarea.blur()}$select(){Ft(this.model)}$clearSelection(){ta(this.model)}$applyStyle(e){ca(this.model,e)}$keystroke(e,t){return Ia(this,e,t)}$typedText(e){Ha(this,e)}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(){this.undoManager.snapshot({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}snapshotAndCoalesce(){this.undoManager.snapshotAndCoalesce({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}getUndoRecord(){return this.undoManager.save()}restoreToUndoRecord(e){this.undoManager.restore(e,{...this.config,suppressChangeNotifications:!0})}undo(){return this.undoManager.undo({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}redo(){return this.undoManager.redo({...this.config,onUndoStateDidChange:(e,t)=>{sr(this),this.config.onUndoStateDidChange(e,t)}})}}function Co(e,t,i){let a=i,r=0;const n=e.length;for(;a0&&r.push({type:"text",data:o.slice(0,c)}),l=!1);let d=!1;for(;!d;){if(l){if(s=o.indexOf(t,c),-1===s){d=!0;break}c!==s&&r.push({type:"text",data:o.slice(c,s)}),c=s}else{if(s=Co(i,o,c+t.length),-1===s){d=!0;break}r.push({type:"math",data:o.slice(c+t.length,s),rawData:o.slice(c,s+i.length),mathstyle:a}),c=s+i.length}l=!l}c";i.innerHTML=t.createHTML?t.createHTML(a):a}catch(t){i.textContent=e}return i.className="ML__sr-only",i}(e,i)),/\bspeakable-text\b/i.test(i.renderAccessibleContent)&&i.renderToSpeakableText){const a=document.createElement("span"),r=i.renderToSpeakableText(e,i);a.innerHTML=i.createHTML?i.createHTML(r):r,a.className="ML__sr-only",t.appendChild(a)}return t.appendChild(r),t}return r}function Ko(e,t){let i=null;if(t.TeX.processEnvironments&&/^\s*\\begin/.test(e))i=document.createDocumentFragment(),i.appendChild(Eo(e,void 0,t,!0));else{if(!e.trim())return null;const a=To(e,t.TeX.delimiters);if(1===a.length&&"text"===a[0].type)return null;i=document.createDocumentFragment();for(let e=0;e0?Oo(e[t].children,i):e[t];if("string"==typeof t){for(let r=0;r0?Oo(e[r].children,i):e[r];if(a=Oo(e[r].children,t),a)return a}return a}return null}function Bo(e,t){var i;const a=Oo(e,t);return a?null!==(i=a.classes)&&void 0!==i?i:"":null}function Fo(e,t){let i="";return e[t]&&(i+=''+t+"=",i+='',i+=e[t],i+='" '),i}var Po={mathlistToMarkup:function e(t,i=""){if(!t)return"";let a="";if(Array.isArray(t))for(let r=0;r"),"string"==typeof t.body&&t.body.length>0&&(a+=' ',a+=t.body,(t.body.charCodeAt(0)<32||t.body.charCodeAt(0)>127)&&(a+=" U+"+("000000"+t.body.charCodeAt(0).toString(16)).substr(-6)),a+=" "),"mathrm"===t.fontFamily?(a+='',a+=Fo(t,"fontFamily"),a+=""):a+=Fo(t,"fontFamily"),a+=Fo(t,"hasBarLine"),a+=Fo(t,"leftDelim"),a+=Fo(t,"rightDelim"),a+=Fo(t,"continuousFraction"),a+=Fo(t,"limits"),a+=Fo(t,"symbol"),a+=function(e,t){let i="";return e.framecolor&&(i+='framecolor=',i+='',i+='',i+=e.framecolor,i+=""),i}(t),a+=Fo(t,"mathstyle"),a+=Fo(t,"size"),a+=Fo(t,"cls"),a+=Fo(t,"delim"),a+=Fo(t,"shift"),a+=Fo(t,"width"),a+=Fo(t,"height"),a+=Fo(t,"position"),a+=e(t.overscript,i+"↑"),a+=e(t.underscript,i+"↓"),a+=e(t.superscript,i+"↑"),a+=e(t.subscript,i+"↓"),a+=e(t.body,i+"▶"),a+=e(t.numer,i+"▲"),a+=e(t.denom,i+"▼"),t.array)for(let r=0;r"+i+"⌗ row "+(r+1)+"/"+t.array.length;for(let n=0;n"),t.body&&t.body.length>0&&(a+=''+t.body+""),t.classes&&t.classes.length>0&&(a+=' '+t.classes+""),t.isTight&&(a+='  tight '),t.caret&&(a+='  caret '),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=' '+e+":",a+=' '+t.style[e]+"; ");t.children&&(a+=t.children.map(t=>e(t,i+"▷")).join("; "))}return a},spanToString:function e(t,i=""){let a="";if(Array.isArray(t))if(0===t.length)a+="[]\n";else{a+="[\n";for(let r=0;r0&&(a+=i+'body:"'+t.body+'",\n'),t.classes&&t.classes.length>0&&(a+=i+'classes:"'+t.classes+'",\n'),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=i+e+':"',a+=t.style[e]+'",\n');t.children&&t.children.length>0&&(a+=i+"children:"+t.children.map(t=>e(t,i)).join("; ")),a+=i+"}"}return a},hasClass:function(e,t,i){const a=Bo(e,t);if(!a)return!1;const r=a.split(" ");for(let e=0;e{if(e)return;if(!t||!t.AudioStream)return;const i=new TextDecoder("utf-8").decode(new Uint8Array(t.AudioStream));window.mathlive.readAloudMarks=i.split("\n").map(e=>e?JSON.parse(e):{}),window.mathlive.readAloudTokens=[];for(const e of window.mathlive.readAloudMarks)e.value&&window.mathlive.readAloudTokens.push(e.value);window.mathlive.readAloudCurrentMark="",n.OutputFormat="mp3",n.SpeechMarkTypes=[],r.synthesizeSpeech(n,(function(e,t){if(e)return;if(!t||!t.AudioStream)return;const i=new Uint8Array(t.AudioStream),a=new Blob([i.buffer],{type:"audio/mpeg"}),r=URL.createObjectURL(a);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener("ended",()=>{const e=window.mathlive.readAloudMathField;o&&o(e,"ended"),e?(Ui(e),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=""):function e(t){if(t.classList.remove("ML__highlight"),t.children)for(const i of t.children)e(i)}(window.mathlive.readAloudElement)}),window.mathlive.readAloudAudio.addEventListener("timeupdate",()=>{let e="";const t=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.time0&&Array.from(t.children).forEach(t=>{e(t,i)})):(t.classList.add("ML__highlight"),t.children&&t.children.length>0&&Array.from(t.children).forEach(t=>{e(t)}))}(window.mathlive.readAloudElement,window.mathlive.readAloudCurrentMark)))})),window.mathlive.readAloudAudio.src=r,o&&o(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()}))})}function Io(e,t,i=3e3,a="$0"){t.forEach(t=>{O[t]&&(O[t].frequency=i,O[t].category=e,O[t].template=a.replace(/\$0/g,t)),F[t]&&(F[t]={...F[t],frequency:i,category:e,template:a.replace(/\$0/g,t)})})}function Ho(e,t){var i;(t=null!=t?t:{}).mathstyle=t.mathstyle||"displaystyle",t.letterShapeStyle=t.letterShapeStyle||"auto",t.macros={...R,...null!==(i=t.macros)&&void 0!==i?i:{}};const a=et(e,"math",null,t.macros,!1,t.onError);let r=Oe({mathstyle:d[t.mathstyle],letterShapeStyle:t.letterShapeStyle},a);return r=function e(t){if(!t||0===t.length)return[];t[0].children=e(t[0].children);const i=[t[0]];for(let a=1;a0\\right\\}"),Io("Layout",["\\overset","\\underset","\\stackrel","\\stackbin"],1200,"$0{arg}{x=0}"),Io("Layout",["\\rlap","\\mathrlap"],1200,"$0{/}0"),Io("Layout",["\\llap","\\mathllap"],1200,"o$0{/}"),Io("Fractions",["\\frac"],4e3,"$0{\\placeholder{}}{\\placeholder{}}"),Io("Fractions",["\\binom","\\dfrac","\\tfrac","\\dbinom","\\tbinom","\\pdiff","\\cfrac"],1200,"$0{\\placeholder{}}{\\placeholder{}}"),Io("Fractions",["\\over","\\atop","\\choose"],1200,'\\unicode{"2B1A} $0 \\unicode{"2B1A}'),Io("Fractions",["\\overwithdelims","\\atopwithdelims"],1200,'{\\unicode{"2B1A} $0{\\lbrace}{\\rbrace} \\unicode{"2B1A}}'),Io("Extensible Operators",["\\sum","\\prod","\\bigcap","\\bigcup","\\int"],4e3),Io("Extensible Operators",["\\bigoplus","\\smallint","\\iint","\\oint"],3e3),Io("Extensible Operators",["\\bigwedge","\\bigvee","\\coprod","\\bigsqcup","\\bigotimes","\\bigodot","\\biguplus","\\intop","\\sqcup","\\sqcap","\\uplus","\\wr","\\Cap","\\Cup","\\doublecap","\\doublecup","\\amalg","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"],1200),Io("Accents",["\\vec"],4e3),Io("Accents",["\\bar","\\ddot","\\acute","\\tilde","\\check"],3e3,"$0{\\placeholder{}}"),Io("Accents",["\\^","\\`","\\'"],1200,"$0{e}"),Io("Accents",["\\c"],1200,"$0{c}"),Io("Accents",["\\~"],1200,"$0{n}"),Io("Accents",["\\mathring","\\hat","\\dot","\\breve","\\grave"],1200,"$0{\\placeholder{}}"),Io("Extensible Symbols",["\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftharpoon","\\overrightharpoon","\\overleftrightarrow","\\overbrace","\\overlinesegment","\\overgroup","\\widehat","\\widecheck","\\widetilde"],3e3,"$0{ABC}"),Io("Extensible Symbols",["\\underrightarrow","\\underleftarrow","\\underleftrightarrow","\\underbrace","\\underlinesegment","\\undergroup","\\utilde"],3e3,"$0{ABC}"),Io("Sizing",["\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],1200,"$0{x=0}"),Io("Sizing",["\\big","\\Big","\\bigg","\\Bigg"],1200,"$0($0)"),Io("Sizing",["\\bigl","\\Bigl","\\biggl","\\Biggl"],1200,"$0("),Io("Sizing",["\\bigr","\\Bigr","\\biggr","\\Biggr"],1200,"$0)"),Io("Sizing",["\\bigm","\\Bigm","\\biggm","\\Biggm"],1200,"$0|"),Io("Letterlike Symbols",["\\nabla","\\partial","\\doubleStruckCapitalN","\\N","\\doubleStruckCapitalR","\\R","\\doubleStruckCapitalQ","\\Q","\\doubleStruckCapitalC","\\C","\\doubleStruckCapitalZ","\\Z","\\exponentialE","\\forall","\\exists","\\nexists","\\$","\\%","\\And","\\degree"],4e3),Io("Letterlike Symbols",["\\doubleStruckCapitalP","\\P","\\ell","\\hbar","\\hslash","\\imath","\\jmath","\\imaginaryI","\\imaginaryJ","\\differentialD","\\rd","\\capitalDifferentialD","\\rD","\\differencedelta","\\mid","@","\\Re","\\Im"],3e3),Io("Letterlike Symbols",["\\top","\\bot","\\scriptCapitalE","\\scriptCapitalH","\\scriptCapitalL","\\gothicCapitalC","\\gothicCapitalH","\\gothicCapitalI","\\gothicCapitalR","\\Bbbk","\\Finv","\\Game","\\wp","\\eth","\\mho","\\pounds","\\yen","\\euro"],1200),Io("Crosses",["\\dagger","\\dag"],4e3),Io("Crosses",["\\ddag","\\ddagger","\\maltese","\\textdagger","\\textdaggerdbl"],1200),Io("Various",["\\checkmark","\\diagup","\\diagdown","\\angle","\\measuredangle","\\sphericalangle","\\prime","\\doubleprime","\\backprime","\\backdoubleprime","\\sharp","\\flat","\\natural","\\&","\\#","\\clubsuit","\\spadesuit","\\diamondsuit","\\heartsuit","\\backslash","\\infty","/","\\_","\\/","|","'"],1200),Io("Various",["\\unicode"],1200,'$0{"2B1A}'),Io("Arrows",["\\longrightarrow","\\rightarrow","\\Longrightarrow","\\Rightarrow"],4e3),Io("Arrows",["\\longmapsto","\\mapsto","\\Longleftrightarrow","\\rightleftarrows","\\leftarrow","\\curvearrowleft","\\uparrow","\\downarrow","\\hookrightarrow","\\rightharpoonup","\\rightleftharpoons"],3e3),Io("Arrows",["\\Leftarrow","\\longleftrightarrow","\\longleftarrow","\\Longleftarrow","\\searrow","\\nearrow","\\swarrow","\\nwarrow","\\Uparrow","\\Downarrow","\\updownarrow","\\Updownarrow","\\hookleftarrow","\\leftharpoonup","\\leftharpoondown","\\rightharpoondown","\\leftrightarrows","\\dashrightarrow","\\dashleftarrow","\\leftleftarrows","\\Lleftarrow","\\twoheadleftarrow","\\leftarrowtail","\\looparrowleft","\\leftrightharpoons","\\circlearrowleft","\\Lsh","\\upuparrows","\\downharpoonleft","\\multimap","\\leftrightsquigarrow","\\twoheadrightarrow","\\rightarrowtail","\\looparrowright","\\curvearrowright","\\circlearrowright","\\Rsh","\\downdownarrows","\\upharpoonright","\\downharpoonright","\\rightsquigarrow","\\leadsto","\\Rrightarrow","\\restriction"],1200),Io("Arrows",["\\upharpoonleft","\\rightrightarrows"],0),Io("Negated Arrows",["\\nrightarrow","\\nRightarrow","\\nleftrightarrow","\\nLeftrightarrow","\\nleftarrow","\\nLeftarrow"],1200),Io("Extensible Symbols",["\\xrightarrow","\\xleftarrow","\\xRightarrow","\\xLeftarrow","\\xleftharpoonup","\\xleftharpoondown","\\xrightharpoonup","\\xrightharpoondown","\\xlongequal","\\xtwoheadleftarrow","\\xtwoheadrightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xrightleftharpoons","\\xleftrightharpoons","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],1200,"$0[below]{above}=0"),Io("Negated Relations",["\\nless","\\nleqslant","\\lneq","\\lneqq","\\nleqq","\\unlhd","\\unrhd","\\lvertneqq","\\lnsim","\\lnapprox","\\nprec","\\npreceq","\\precnsim","\\precnapprox","\\nsim","\\nshortmid","\\nmid","\\nvdash","\\nvDash","\\ngtr","\\ngeqslant","\\ngeqq","\\gneq","\\gneqq","\\gvertneqq","\\gnsim","\\nsucc","\\succnsim","\\ncong","\\nshortparallel","\\nparallel","\\nVDash","\\nVdash","\\precneqq","\\succneqq","\\gnapprox","\\succnapprox","\\nsucceq"],1200),Io("Hebrew",["\\aleph","\\beth","\\daleth","\\gimel"],1200),Io("Fences",["\\lbrace","\\rbrace","\\vert","\\Vert","\\{","\\}","(",")","[","]"],4e3),Io("Fences",["\\langle","\\rangle","\\lfloor","\\rfloor","\\lceil","\\rceil","\\mvert","\\|","\\mVert"],3e3),Io("Fences",["\\lvert","\\rvert","\\lVert","\\rVert","\\lbrack","\\rbrack","\\ulcorner","\\urcorner","\\llcorner","\\lrcorner","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],1200),Io("Relations",["=","\\ne","\\neq","<",">","\\leqslant","\\geqslant","\\approx"],4e3),Io("Relations",["\\lt","\\gt","\\le","\\ge","\\leq","\\geq","\\gg","\\cong","\\equiv","\\prec","\\preceq","\\succ","\\perp","\\parallel","\\propto","\\smile","\\frown","\\sim","\\gtrsim"],3e3),Io("Relations",["\\coloneq","\\succeq","\\approxeq","\\thickapprox","\\lessapprox","\\gtrapprox","\\precapprox","\\succapprox","\\thicksim","\\succsim","\\precsim","\\backsim","\\eqsim","\\backsimeq","\\simeq","\\lesssim","\\nleq","\\ngeq","\\smallsmile","\\smallfrown","\\bowtie","\\asymp","\\leqq","\\eqslantless","\\ll","\\lll","\\lessgtr","\\lesseqgtr","\\lesseqqgtr","\\risingdotseq","\\fallingdotseq","\\preccurlyeq","\\curlyeqprec","\\vDash","\\Vvdash","\\bumpeq","\\Bumpeq","\\geqq","\\eqslantgtr","\\ggg","\\gtrless","\\gtreqless","\\gtreqqless","\\succcurlyeq","\\curlyeqsucc","\\Vdash","\\shortmid","\\shortparallel","\\between","\\pitchfork","\\varpropto","\\backepsilon","\\llless","\\gggtr","\\lhd","\\rhd","\\Join","\\doteq","\\doteqdot","\\Doteq","\\eqcirc","\\circeq","\\lessdot","\\gtrdot","\\measeq","\\eqdef","\\questeq"],1200),Io("Logic",["\\leftrightarrow","\\Leftrightarrow","\\to"],4e3),Io("Logic",["\\models","\\vdash"],3e3),Io("Logic",["\\therefore","\\because","\\implies","\\gets","\\dashv","\\impliedby","\\biconditional","\\roundimplies"],1200),Io("Operators",["+","-","*","\\cdot"],4e3),Io("Operators",["\\sqrt"],4e3,"$0{\\placeholder{}}"),Io("Operators",["\\pm","\\mp","\\times","\\div","\\surd"],3e3),Io("Operators",["\\ltimes","\\rtimes","\\leftthreetimes","\\rightthreetimes","\\intercal","\\dotplus","\\centerdot","\\doublebarwedge","\\divideontimes","\\divides"],1200),Io("Logic",["\\wedge","\\vee","\\neg"],4e3),Io("Logic",["\\lnot"],3e3),Io("Logic",["\\land","\\lor","\\barwedge","\\veebar","\\nor","\\curlywedge","\\curlyvee"],1200),Io("Greek",["\\alpha","\\beta","\\gamma","\\delta","\\epsilon","\\varepsilon","\\zeta","\\eta","\\theta","\\vartheta","\\iota","\\kappa","\\varkappa","\\lambda","\\mu","\\nu","\\xi","\\pi","\\varpi","\\rho","\\varrho","\\sigma","\\varsigma","\\tau","\\phi","\\varphi","\\upsilon","\\chi","\\psi","\\omega","\\Gamma","\\Delta","\\Theta","\\Lambda","\\Xi","\\Pi","\\Sigma","\\Upsilon","\\Phi","\\Psi","\\Omega","\\digamma","\\omicron"],3e3),Io("Sets",["\\emptyset","\\varnothing","\\cap","\\cup","\\in","\\notin","\\subset","\\supset","\\subseteq","\\supseteq","\\sqsubseteq"],4e3),Io("Sets",["\\setminus","\\not","\\ni","\\sqsupseteq","\\nsupseteqq","\\supsetneq","\\varsupsetneq","\\supsetneqq","\\varsupsetneqq"],3e3),Io("Sets",["\\smallsetminus","\\complement","\\owns","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\varsubsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq","\\nsubseteqq","\\subseteqq","\\Subset","\\sqsubset","\\supseteqq","\\Supset","\\sqsupset"],1200),Io("Spacing",["\\space, \\quad","\\qquad"],3e3,'\\unicode{"203A}$0\\unicode{"2039}'),Io("Spacing",["\\!","\\,","\\:","\\;","\\enskip","\\enspace"],1200,'\\unicode{"203A}$0\\unicode{"2039}'),Io("Spacing",["\\hspace","\\hspace*"],1200,'\\unicode{"203A}$0{1em}\\unicode{"2039}'),Io("Punctuation",["\\colon","\\cdotp","\\ldots","\\cdots","\\ddots","\\vdots","?","!",":",'"',",",".",";"],3e3),Io("Punctuation",["\\mathellipsis","\\ldotp","\\Colon"],1200),Io("Boxes",["\\square","\\Box"],3e3),Io("Boxes",["\\blacksquare","\\boxminus","\\boxplus","\\boxtimes","\\boxdot"],1200),Io("Circles",["\\circ","\\bullet","\\circleddash","\\oplus","\\otimes"],3e3),Io("Circles",["\\bigcirc","\\circledast","\\ominus","\\circledcirc","\\oslash","\\circledS","\\circledR","\\odot"],1200),Io("Triangles",["\\triangle","\\triangleq"],3e3),Io("Triangles",["\\bigtriangleup","\\vartriangle","\\triangledown","\\bigtriangledown","\\triangleleft","\\vartriangleleft","\\trianglelefteq","\\ntriangleleft","\\ntrianglelefteq","\\triangleright","\\vartriangleright","\\trianglerighteq","\\ntriangleright","\\ntrianglerighteq","\\blacktriangle","\\blacktriangledown","\\blacktriangleleft","\\blacktriangleright"],1200),Io("Shapes",["\\ast","\\star"],3e3),Io("Shapes",["\\diamond","\\Diamond","\\lozenge","\\blacklozenge","\\bigstar"],1200);var Xo={version:"0.56.0",latexToMarkup:Ho,latexToMathML:Wo,latexToSpeakableText:Vo,latexToAST:function(e,t){var i;return(t=null!=t?t:{}).macros={...R,...null!==(i=t.macros)&&void 0!==i?i:{}},So(et(e,"math",null,t.macros,!1,t.onError),t)},astToLatex:function(e,i){return function e(i,a){const r=Object.assign({precision:14,decimalMarker:".",groupSeparator:"\\, ",product:"\\cdot ",exponentProduct:"\\cdot ",exponentMarker:"",arcSeparator:"\\,",scientificNotation:"auto",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},a);let n="";if(void 0===i)return"";if("string"==typeof i)n=i;else if(i.latex)n=i.latex;else if(no(i)){const t=ro(i);if(t===-1/0)n="-\\infty ";else if(t===1/0)n="\\infty ";else if("object"!=typeof i.num||"string"!=typeof i.num.re&&"string"!=typeof i.num.im)n=isNaN(t)?"\\text{NaN}":qo(i.num,r);else{const e=oo(i),t=so(i);isNaN(e)||isNaN(t)?n="\\text{NaN}":Math.abs(t)<=Number.EPSILON&&Math.abs(e)<=Number.EPSILON?n="0":(Math.abs(e)>Number.EPSILON&&(n=qo(e,r)),Math.abs(t)>Number.EPSILON&&(Math.abs(e)>Number.EPSILON&&(n+=t>0?"+":""),n+=(1!==Math.abs(t)?qo(t,r):"")+"\\imaginaryI "))}lo(i)&&(n+="^{"+e(i.sup,r)+"}"),co(i)&&(n+="_{"+e(i.sub,r)+"}")}else if(i.group)n=e(i.group,r),no(i.group)||ao(i.group)?0!==so(i.group)&&(n=zo(i.fence||"(),",n)):n=zo(i.fence||"(),",n),lo(i)&&(n+="^{"+e(i.sup,r)+"}"),co(i)&&(n+="_{"+e(i.sub,r)+"}");else if(i.fn)if("bind"===i.fn){if(n=e(Vn(i,0),r)+"|_{",i.arg&&2===i.arg.length)n+=e(Vn(i,1));else{let t="";for(let a=1;ae(t,r)));else if("text"===i.fn)n="\\text{"+(i.arg[0]||"")+"}";else if("pow"===i.fn&&t(i.arg)&&i.arg.length>=2)n=e(Vn(i,0),r),no(Vn(i,0))||ao(Vn(i,0))||(n=zo(i.fence||"(),",n)),n+="^{"+e(Vn(i,1),r)+"}";else if("equal"===i.fn&&i.arg&&i.arg.length>2)n=i.arg.map(t=>e(t,r)).join(" = ");else{const a=function(e){let t=Hn[e];return t||(t=e.length>1?"\\operatorname{"+e+"}%^%_ %":e+"%^%_ %"),t}(i.fn);n=a;let o="";if(/%(?![01_^])/.test(a)&&t(i.arg)&&i.arg.length>1)n+=zo(i.fence||"(),",...i.arg.map(t=>e(t,r)));else if(t(i.arg)&&i.arg.length>0){const t=e(Vn(i,0),r),s=e(Vn(i,1),r),l=[...i.arg];/%0/.test(a)&&(n=n.replace("%0",t),l.shift()),/%1/.test(a)&&(n=n.replace("%1",s),l.shift()),l.length>0&&(o=zo(i.fence||"(),",...l.map(t=>e(t,r))))}else o=zo(i.fence||"(),","");n=lo(i)?n.replace("%^","^{"+e(i.sup,r)+"}"):n.replace("%^",""),n=co(i)?n.replace("%_","_{"+e(i.sub,r)+"}"):n.replace("%_",""),n=n.replace(/%(?![01_^])/,o),n=n.replace("%0","").replace("%1","")}else{const t=[];for(const a of i.arg)"add"===a.fn||"subtract"===a.fn||0!==oo(o=a)&&0!==so(o)||lo(i)&&0!==so(a)&&1!==so(a)?t.push(zo("() ",e(a,r))):t.push(e(a,r));if("multiply"===i.fn)n=!i.arg||2!==i.arg.length||!no(i.arg[0])&&"divide"!==i.arg[0].fn||no(i.arg[1])&&(0!==oo(i.arg[1])||1!==so(i.arg[1]))?t.join(" \\times "):t[0]+t[1];else if(i.arg&&1===i.arg.length)n="negate"===i.arg[0].fn||no(i.arg[0])&&ro(i.arg[0])<0?t[0]:"+"+t[0];else{n=t[0];for(let e=1;e=0&&(a+=t,a{},...null!=t?t:{}}).emit(e)}(e,t)},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?factory(exports):"function"==typeof define&&define.amd?define(["exports"],factory):factory((global="undefined"!=typeof globalThis?globalThis:global||self).MathLive={}); diff --git a/dist/mathlive.min.mjs b/dist/mathlive.min.mjs index d76c56a03..2abee4471 100644 --- a/dist/mathlive.min.mjs +++ b/dist/mathlive.min.mjs @@ -1,2 +1,2 @@ -/* MathLive 0.55.0 */ -function e(e){return Array.isArray(e)}var t={"AMS-Regular":{65:[0,.68889,0,0],66:[0,.68889,0,0],67:[0,.68889,0,0],68:[0,.68889,0,0],69:[0,.68889,0,0],70:[0,.68889,0,0],71:[0,.68889,0,0],72:[0,.68889,0,0],73:[0,.68889,0,0],74:[.16667,.68889,0,0],75:[0,.68889,0,0],76:[0,.68889,0,0],77:[0,.68889,0,0],78:[0,.68889,0,0],79:[.16667,.68889,0,0],80:[0,.68889,0,0],81:[.16667,.68889,0,0],82:[0,.68889,0,0],83:[0,.68889,0,0],84:[0,.68889,0,0],85:[0,.68889,0,0],86:[0,.68889,0,0],87:[0,.68889,0,0],88:[0,.68889,0,0],89:[0,.68889,0,0],90:[0,.68889,0,0],107:[0,.68889,0,0],165:[0,.675,.025,0],174:[.15559,.69224,0,0],240:[0,.68889,0,0],295:[0,.68889,0,0],710:[0,.825,0,0],732:[0,.9,0,0],770:[0,.825,0,0],771:[0,.9,0,0],989:[.08167,.58167,0,0],1008:[0,.43056,.04028,0],8245:[0,.54986,0,0],8463:[0,.68889,0,0],8487:[0,.68889,0,0],8498:[0,.68889,0,0],8502:[0,.68889,0,0],8503:[0,.68889,0,0],8504:[0,.68889,0,0],8513:[0,.68889,0,0],8592:[-.03598,.46402,0,0],8594:[-.03598,.46402,0,0],8602:[-.13313,.36687,0,0],8603:[-.13313,.36687,0,0],8606:[.01354,.52239,0,0],8608:[.01354,.52239,0,0],8610:[.01354,.52239,0,0],8611:[.01354,.52239,0,0],8619:[0,.54986,0,0],8620:[0,.54986,0,0],8621:[-.13313,.37788,0,0],8622:[-.13313,.36687,0,0],8624:[0,.69224,0,0],8625:[0,.69224,0,0],8630:[0,.43056,0,0],8631:[0,.43056,0,0],8634:[.08198,.58198,0,0],8635:[.08198,.58198,0,0],8638:[.19444,.69224,0,0],8639:[.19444,.69224,0,0],8642:[.19444,.69224,0,0],8643:[.19444,.69224,0,0],8644:[.1808,.675,0,0],8646:[.1808,.675,0,0],8647:[.1808,.675,0,0],8648:[.19444,.69224,0,0],8649:[.1808,.675,0,0],8650:[.19444,.69224,0,0],8651:[.01354,.52239,0,0],8652:[.01354,.52239,0,0],8653:[-.13313,.36687,0,0],8654:[-.13313,.36687,0,0],8655:[-.13313,.36687,0,0],8666:[.13667,.63667,0,0],8667:[.13667,.63667,0,0],8669:[-.13313,.37788,0,0],8672:[-.064,.437,0,0],8674:[-.064,.437,0,0],8705:[0,.825,0,0],8708:[0,.68889,0,0],8709:[.08167,.58167,0,0],8717:[0,.43056,0,0],8722:[-.03598,.46402,0,0],8724:[.08198,.69224,0,0],8726:[.08167,.58167,0,0],8733:[0,.69224,0,0],8736:[0,.69224,0,0],8737:[0,.69224,0,0],8738:[.03517,.52239,0,0],8739:[.08167,.58167,0,0],8740:[.25142,.74111,0,0],8741:[.08167,.58167,0,0],8742:[.25142,.74111,0,0],8756:[0,.69224,0,0],8757:[0,.69224,0,0],8764:[-.13313,.36687,0,0],8765:[-.13313,.37788,0,0],8769:[-.13313,.36687,0,0],8770:[-.03625,.46375,0,0],8774:[.30274,.79383,0,0],8776:[-.01688,.48312,0,0],8778:[.08167,.58167,0,0],8782:[.06062,.54986,0,0],8783:[.06062,.54986,0,0],8785:[.08198,.58198,0,0],8786:[.08198,.58198,0,0],8787:[.08198,.58198,0,0],8790:[0,.69224,0,0],8791:[.22958,.72958,0,0],8796:[.08198,.91667,0,0],8806:[.25583,.75583,0,0],8807:[.25583,.75583,0,0],8808:[.25142,.75726,0,0],8809:[.25142,.75726,0,0],8812:[.25583,.75583,0,0],8814:[.20576,.70576,0,0],8815:[.20576,.70576,0,0],8816:[.30274,.79383,0,0],8817:[.30274,.79383,0,0],8818:[.22958,.72958,0,0],8819:[.22958,.72958,0,0],8822:[.1808,.675,0,0],8823:[.1808,.675,0,0],8828:[.13667,.63667,0,0],8829:[.13667,.63667,0,0],8830:[.22958,.72958,0,0],8831:[.22958,.72958,0,0],8832:[.20576,.70576,0,0],8833:[.20576,.70576,0,0],8840:[.30274,.79383,0,0],8841:[.30274,.79383,0,0],8842:[.13597,.63597,0,0],8843:[.13597,.63597,0,0],8847:[.03517,.54986,0,0],8848:[.03517,.54986,0,0],8858:[.08198,.58198,0,0],8859:[.08198,.58198,0,0],8861:[.08198,.58198,0,0],8862:[0,.675,0,0],8863:[0,.675,0,0],8864:[0,.675,0,0],8865:[0,.675,0,0],8872:[0,.69224,0,0],8873:[0,.69224,0,0],8874:[0,.69224,0,0],8876:[0,.68889,0,0],8877:[0,.68889,0,0],8878:[0,.68889,0,0],8879:[0,.68889,0,0],8882:[.03517,.54986,0,0],8883:[.03517,.54986,0,0],8884:[.13667,.63667,0,0],8885:[.13667,.63667,0,0],8888:[0,.54986,0,0],8890:[.19444,.43056,0,0],8891:[.19444,.69224,0,0],8892:[.19444,.69224,0,0],8901:[0,.54986,0,0],8903:[.08167,.58167,0,0],8905:[.08167,.58167,0,0],8906:[.08167,.58167,0,0],8907:[0,.69224,0,0],8908:[0,.69224,0,0],8909:[-.03598,.46402,0,0],8910:[0,.54986,0,0],8911:[0,.54986,0,0],8912:[.03517,.54986,0,0],8913:[.03517,.54986,0,0],8914:[0,.54986,0,0],8915:[0,.54986,0,0],8916:[0,.69224,0,0],8918:[.0391,.5391,0,0],8919:[.0391,.5391,0,0],8920:[.03517,.54986,0,0],8921:[.03517,.54986,0,0],8922:[.38569,.88569,0,0],8923:[.38569,.88569,0,0],8926:[.13667,.63667,0,0],8927:[.13667,.63667,0,0],8928:[.30274,.79383,0,0],8929:[.30274,.79383,0,0],8934:[.23222,.74111,0,0],8935:[.23222,.74111,0,0],8936:[.23222,.74111,0,0],8937:[.23222,.74111,0,0],8938:[.20576,.70576,0,0],8939:[.20576,.70576,0,0],8940:[.30274,.79383,0,0],8941:[.30274,.79383,0,0],8994:[.19444,.69224,0,0],8995:[.19444,.69224,0,0],9416:[.15559,.69224,0,0],9484:[0,.69224,0,0],9488:[0,.69224,0,0],9492:[0,.37788,0,0],9496:[0,.37788,0,0],9585:[.19444,.68889,0,0],9586:[.19444,.74111,0,0],9632:[0,.675,0,0],9633:[0,.675,0,0],9650:[0,.54986,0,0],9651:[0,.54986,0,0],9654:[.03517,.54986,0,0],9660:[0,.54986,0,0],9661:[0,.54986,0,0],9664:[.03517,.54986,0,0],9674:[.11111,.69224,0,0],9733:[.19444,.69224,0,0],10003:[0,.69224,0,0],10016:[0,.69224,0,0],10731:[.11111,.69224,0,0],10846:[.19444,.75583,0,0],10877:[.13667,.63667,0,0],10878:[.13667,.63667,0,0],10885:[.25583,.75583,0,0],10886:[.25583,.75583,0,0],10887:[.13597,.63597,0,0],10888:[.13597,.63597,0,0],10889:[.26167,.75726,0,0],10890:[.26167,.75726,0,0],10891:[.48256,.98256,0,0],10892:[.48256,.98256,0,0],10901:[.13667,.63667,0,0],10902:[.13667,.63667,0,0],10933:[.25142,.75726,0,0],10934:[.25142,.75726,0,0],10935:[.26167,.75726,0,0],10936:[.26167,.75726,0,0],10937:[.26167,.75726,0,0],10938:[.26167,.75726,0,0],10949:[.25583,.75583,0,0],10950:[.25583,.75583,0,0],10955:[.28481,.79383,0,0],10956:[.28481,.79383,0,0],57350:[.08167,.58167,0,0],57351:[.08167,.58167,0,0],57352:[.08167,.58167,0,0],57353:[0,.43056,.04028,0],57356:[.25142,.75726,0,0],57357:[.25142,.75726,0,0],57358:[.41951,.91951,0,0],57359:[.30274,.79383,0,0],57360:[.30274,.79383,0,0],57361:[.41951,.91951,0,0],57366:[.25142,.75726,0,0],57367:[.25142,.75726,0,0],57368:[.25142,.75726,0,0],57369:[.25142,.75726,0,0],57370:[.13597,.63597,0,0],57371:[.13597,.63597,0,0]},"Caligraphic-Regular":{48:[0,.43056,0,0],49:[0,.43056,0,0],50:[0,.43056,0,0],51:[.19444,.43056,0,0],52:[.19444,.43056,0,0],53:[.19444,.43056,0,0],54:[0,.64444,0,0],55:[.19444,.43056,0,0],56:[0,.64444,0,0],57:[.19444,.43056,0,0],65:[0,.68333,0,.19445],66:[0,.68333,.03041,.13889],67:[0,.68333,.05834,.13889],68:[0,.68333,.02778,.08334],69:[0,.68333,.08944,.11111],70:[0,.68333,.09931,.11111],71:[.09722,.68333,.0593,.11111],72:[0,.68333,.00965,.11111],73:[0,.68333,.07382,0],74:[.09722,.68333,.18472,.16667],75:[0,.68333,.01445,.05556],76:[0,.68333,0,.13889],77:[0,.68333,0,.13889],78:[0,.68333,.14736,.08334],79:[0,.68333,.02778,.11111],80:[0,.68333,.08222,.08334],81:[.09722,.68333,0,.11111],82:[0,.68333,0,.08334],83:[0,.68333,.075,.13889],84:[0,.68333,.25417,0],85:[0,.68333,.09931,.08334],86:[0,.68333,.08222,0],87:[0,.68333,.08222,.08334],88:[0,.68333,.14643,.13889],89:[.09722,.68333,.08222,.08334],90:[0,.68333,.07944,.13889]},"Fraktur-Regular":{33:[0,.69141,0,0],34:[0,.69141,0,0],38:[0,.69141,0,0],39:[0,.69141,0,0],40:[.24982,.74947,0,0],41:[.24982,.74947,0,0],42:[0,.62119,0,0],43:[.08319,.58283,0,0],44:[0,.10803,0,0],45:[.08319,.58283,0,0],46:[0,.10803,0,0],47:[.24982,.74947,0,0],48:[0,.47534,0,0],49:[0,.47534,0,0],50:[0,.47534,0,0],51:[.18906,.47534,0,0],52:[.18906,.47534,0,0],53:[.18906,.47534,0,0],54:[0,.69141,0,0],55:[.18906,.47534,0,0],56:[0,.69141,0,0],57:[.18906,.47534,0,0],58:[0,.47534,0,0],59:[.12604,.47534,0,0],61:[-.13099,.36866,0,0],63:[0,.69141,0,0],65:[0,.69141,0,0],66:[0,.69141,0,0],67:[0,.69141,0,0],68:[0,.69141,0,0],69:[0,.69141,0,0],70:[.12604,.69141,0,0],71:[0,.69141,0,0],72:[.06302,.69141,0,0],73:[0,.69141,0,0],74:[.12604,.69141,0,0],75:[0,.69141,0,0],76:[0,.69141,0,0],77:[0,.69141,0,0],78:[0,.69141,0,0],79:[0,.69141,0,0],80:[.18906,.69141,0,0],81:[.03781,.69141,0,0],82:[0,.69141,0,0],83:[0,.69141,0,0],84:[0,.69141,0,0],85:[0,.69141,0,0],86:[0,.69141,0,0],87:[0,.69141,0,0],88:[0,.69141,0,0],89:[.18906,.69141,0,0],90:[.12604,.69141,0,0],91:[.24982,.74947,0,0],93:[.24982,.74947,0,0],94:[0,.69141,0,0],97:[0,.47534,0,0],98:[0,.69141,0,0],99:[0,.47534,0,0],100:[0,.62119,0,0],101:[0,.47534,0,0],102:[.18906,.69141,0,0],103:[.18906,.47534,0,0],104:[.18906,.69141,0,0],105:[0,.69141,0,0],106:[0,.69141,0,0],107:[0,.69141,0,0],108:[0,.69141,0,0],109:[0,.47534,0,0],110:[0,.47534,0,0],111:[0,.47534,0,0],112:[.18906,.52396,0,0],113:[.18906,.47534,0,0],114:[0,.47534,0,0],115:[0,.47534,0,0],116:[0,.62119,0,0],117:[0,.47534,0,0],118:[0,.52396,0,0],119:[0,.52396,0,0],120:[.18906,.47534,0,0],121:[.18906,.47534,0,0],122:[.18906,.47534,0,0],8216:[0,.69141,0,0],8217:[0,.69141,0,0],58112:[0,.62119,0,0],58113:[0,.62119,0,0],58114:[.18906,.69141,0,0],58115:[.18906,.69141,0,0],58116:[.18906,.47534,0,0],58117:[0,.69141,0,0],58118:[0,.62119,0,0],58119:[0,.47534,0,0]},"Main-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.13333,.63333,0,0],44:[.19444,.15556,0,0],45:[0,.44444,0,0],46:[0,.15556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.44444,0,0],59:[.19444,.44444,0,0],60:[.08556,.58556,0,0],61:[-.10889,.39111,0,0],62:[.08556,.58556,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68611,0,0],66:[0,.68611,0,0],67:[0,.68611,0,0],68:[0,.68611,0,0],69:[0,.68611,0,0],70:[0,.68611,0,0],71:[0,.68611,0,0],72:[0,.68611,0,0],73:[0,.68611,0,0],74:[0,.68611,0,0],75:[0,.68611,0,0],76:[0,.68611,0,0],77:[0,.68611,0,0],78:[0,.68611,0,0],79:[0,.68611,0,0],80:[0,.68611,0,0],81:[.19444,.68611,0,0],82:[0,.68611,0,0],83:[0,.68611,0,0],84:[0,.68611,0,0],85:[0,.68611,0,0],86:[0,.68611,.01597,0],87:[0,.68611,.01597,0],88:[0,.68611,0,0],89:[0,.68611,.02875,0],90:[0,.68611,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.13444,.03194,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.10903,0],103:[.19444,.44444,.01597,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,0,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.01597,0],119:[0,.44444,.01597,0],120:[0,.44444,0,0],121:[.19444,.44444,.01597,0],122:[0,.44444,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],172:[0,.44444,0,0],176:[0,.69444,0,0],177:[.13333,.63333,0,0],184:[.17014,0,0,0],198:[0,.68611,0,0],215:[.13333,.63333,0,0],216:[.04861,.73472,0,0],223:[0,.69444,0,0],230:[0,.44444,0,0],247:[.13333,.63333,0,0],248:[.09722,.54167,0,0],305:[0,.44444,0,0],338:[0,.68611,0,0],339:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.59611,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],733:[0,.69444,0,0],915:[0,.68611,0,0],916:[0,.68611,0,0],920:[0,.68611,0,0],923:[0,.68611,0,0],926:[0,.68611,0,0],928:[0,.68611,0,0],931:[0,.68611,0,0],933:[0,.68611,0,0],934:[0,.68611,0,0],936:[0,.68611,0,0],937:[0,.68611,0,0],8211:[0,.44444,.03194,0],8212:[0,.44444,.03194,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8242:[0,.55556,0,0],8407:[0,.72444,.15486,0],8463:[0,.69444,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,0],8472:[.19444,.44444,0,0],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.10889,.39111,0,0],8593:[.19444,.69444,0,0],8594:[-.10889,.39111,0,0],8595:[.19444,.69444,0,0],8596:[-.10889,.39111,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8636:[-.10889,.39111,0,0],8637:[-.10889,.39111,0,0],8640:[-.10889,.39111,0,0],8641:[-.10889,.39111,0,0],8656:[-.10889,.39111,0,0],8657:[.19444,.69444,0,0],8658:[-.10889,.39111,0,0],8659:[.19444,.69444,0,0],8660:[-.10889,.39111,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.06389,0],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68611,0,0],8712:[.08556,.58556,0,0],8715:[.08556,.58556,0,0],8722:[.13333,.63333,0,0],8723:[.13333,.63333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.02778,.47222,0,0],8728:[-.02639,.47361,0,0],8729:[-.02639,.47361,0,0],8730:[.18,.82,0,0],8733:[0,.44444,0,0],8734:[0,.44444,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.12778,0],8764:[-.10889,.39111,0,0],8768:[.19444,.69444,0,0],8771:[.00222,.50222,0,0],8776:[.02444,.52444,0,0],8781:[.00222,.50222,0,0],8801:[.00222,.50222,0,0],8804:[.19667,.69667,0,0],8805:[.19667,.69667,0,0],8810:[.08556,.58556,0,0],8811:[.08556,.58556,0,0],8826:[.08556,.58556,0,0],8827:[.08556,.58556,0,0],8834:[.08556,.58556,0,0],8835:[.08556,.58556,0,0],8838:[.19667,.69667,0,0],8839:[.19667,.69667,0,0],8846:[0,.55556,0,0],8849:[.19667,.69667,0,0],8850:[.19667,.69667,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.13333,.63333,0,0],8854:[.13333,.63333,0,0],8855:[.13333,.63333,0,0],8856:[.13333,.63333,0,0],8857:[.13333,.63333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8900:[-.02639,.47361,0,0],8901:[-.02639,.47361,0,0],8902:[-.02778,.47222,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.13889,.36111,0,0],8995:[-.13889,.36111,0,0],9651:[.19444,.69444,0,0],9657:[-.02778,.47222,0,0],9661:[.19444,.69444,0,0],9667:[-.02778,.47222,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10815:[0,.68611,0,0],10927:[.19667,.69667,0,0],10928:[.19667,.69667,0,0],57376:[.19444,.69444,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0],34:[0,.69444,.07939,0],35:[.19444,.69444,.06833,0],37:[.05556,.75,.12861,0],38:[0,.69444,.08528,0],39:[0,.69444,.12945,0],40:[.25,.75,.15806,0],41:[.25,.75,.03306,0],42:[0,.75,.14333,0],43:[.10333,.60333,.03306,0],44:[.19444,.14722,0,0],45:[0,.44444,.02611,0],46:[0,.14722,0,0],47:[.25,.75,.15806,0],48:[0,.64444,.13167,0],49:[0,.64444,.13167,0],50:[0,.64444,.13167,0],51:[0,.64444,.13167,0],52:[.19444,.64444,.13167,0],53:[0,.64444,.13167,0],54:[0,.64444,.13167,0],55:[.19444,.64444,.13167,0],56:[0,.64444,.13167,0],57:[0,.64444,.13167,0],58:[0,.44444,.06695,0],59:[.19444,.44444,.06695,0],61:[-.10889,.39111,.06833,0],63:[0,.69444,.11472,0],64:[0,.69444,.09208,0],65:[0,.68611,0,0],66:[0,.68611,.0992,0],67:[0,.68611,.14208,0],68:[0,.68611,.09062,0],69:[0,.68611,.11431,0],70:[0,.68611,.12903,0],71:[0,.68611,.07347,0],72:[0,.68611,.17208,0],73:[0,.68611,.15681,0],74:[0,.68611,.145,0],75:[0,.68611,.14208,0],76:[0,.68611,0,0],77:[0,.68611,.17208,0],78:[0,.68611,.17208,0],79:[0,.68611,.09062,0],80:[0,.68611,.0992,0],81:[.19444,.68611,.09062,0],82:[0,.68611,.02559,0],83:[0,.68611,.11264,0],84:[0,.68611,.12903,0],85:[0,.68611,.17208,0],86:[0,.68611,.18625,0],87:[0,.68611,.18625,0],88:[0,.68611,.15681,0],89:[0,.68611,.19803,0],90:[0,.68611,.14208,0],91:[.25,.75,.1875,0],93:[.25,.75,.09972,0],94:[0,.69444,.06709,0],95:[.31,.13444,.09811,0],97:[0,.44444,.09426,0],98:[0,.69444,.07861,0],99:[0,.44444,.05222,0],100:[0,.69444,.10861,0],101:[0,.44444,.085,0],102:[.19444,.69444,.21778,0],103:[.19444,.44444,.105,0],104:[0,.69444,.09426,0],105:[0,.69326,.11387,0],106:[.19444,.69326,.1672,0],107:[0,.69444,.11111,0],108:[0,.69444,.10861,0],109:[0,.44444,.09426,0],110:[0,.44444,.09426,0],111:[0,.44444,.07861,0],112:[.19444,.44444,.07861,0],113:[.19444,.44444,.105,0],114:[0,.44444,.11111,0],115:[0,.44444,.08167,0],116:[0,.63492,.09639,0],117:[0,.44444,.09426,0],118:[0,.44444,.11111,0],119:[0,.44444,.11111,0],120:[0,.44444,.12583,0],121:[.19444,.44444,.105,0],122:[0,.44444,.13889,0],126:[.35,.34444,.11472,0],163:[0,.69444,0,0],168:[0,.69444,.11473,0],176:[0,.69444,0,0],184:[.17014,0,0,0],198:[0,.68611,.11431,0],216:[.04861,.73472,.09062,0],223:[.19444,.69444,.09736,0],230:[0,.44444,.085,0],248:[.09722,.54167,.09458,0],305:[0,.44444,.09426,0],338:[0,.68611,.11431,0],339:[0,.44444,.085,0],567:[.19444,.44444,.04611,0],710:[0,.69444,.06709,0],711:[0,.63194,.08271,0],713:[0,.59444,.10444,0],714:[0,.69444,.08528,0],715:[0,.69444,0,0],728:[0,.69444,.10333,0],729:[0,.69444,.12945,0],730:[0,.69444,0,0],732:[0,.69444,.11472,0],733:[0,.69444,.11472,0],915:[0,.68611,.12903,0],916:[0,.68611,0,0],920:[0,.68611,.09062,0],923:[0,.68611,0,0],926:[0,.68611,.15092,0],928:[0,.68611,.17208,0],931:[0,.68611,.11431,0],933:[0,.68611,.10778,0],934:[0,.68611,.05632,0],936:[0,.68611,.10778,0],937:[0,.68611,.0992,0],8211:[0,.44444,.09811,0],8212:[0,.44444,.09811,0],8216:[0,.69444,.12945,0],8217:[0,.69444,.12945,0],8220:[0,.69444,.16772,0],8221:[0,.69444,.07939,0]},"Main-Italic":{33:[0,.69444,.12417,0],34:[0,.69444,.06961,0],35:[.19444,.69444,.06616,0],37:[.05556,.75,.13639,0],38:[0,.69444,.09694,0],39:[0,.69444,.12417,0],40:[.25,.75,.16194,0],41:[.25,.75,.03694,0],42:[0,.75,.14917,0],43:[.05667,.56167,.03694,0],44:[.19444,.10556,0,0],45:[0,.43056,.02826,0],46:[0,.10556,0,0],47:[.25,.75,.16194,0],48:[0,.64444,.13556,0],49:[0,.64444,.13556,0],50:[0,.64444,.13556,0],51:[0,.64444,.13556,0],52:[.19444,.64444,.13556,0],53:[0,.64444,.13556,0],54:[0,.64444,.13556,0],55:[.19444,.64444,.13556,0],56:[0,.64444,.13556,0],57:[0,.64444,.13556,0],58:[0,.43056,.0582,0],59:[.19444,.43056,.0582,0],61:[-.13313,.36687,.06616,0],63:[0,.69444,.1225,0],64:[0,.69444,.09597,0],65:[0,.68333,0,0],66:[0,.68333,.10257,0],67:[0,.68333,.14528,0],68:[0,.68333,.09403,0],69:[0,.68333,.12028,0],70:[0,.68333,.13305,0],71:[0,.68333,.08722,0],72:[0,.68333,.16389,0],73:[0,.68333,.15806,0],74:[0,.68333,.14028,0],75:[0,.68333,.14528,0],76:[0,.68333,0,0],77:[0,.68333,.16389,0],78:[0,.68333,.16389,0],79:[0,.68333,.09403,0],80:[0,.68333,.10257,0],81:[.19444,.68333,.09403,0],82:[0,.68333,.03868,0],83:[0,.68333,.11972,0],84:[0,.68333,.13305,0],85:[0,.68333,.16389,0],86:[0,.68333,.18361,0],87:[0,.68333,.18361,0],88:[0,.68333,.15806,0],89:[0,.68333,.19383,0],90:[0,.68333,.14528,0],91:[.25,.75,.1875,0],93:[.25,.75,.10528,0],94:[0,.69444,.06646,0],95:[.31,.12056,.09208,0],97:[0,.43056,.07671,0],98:[0,.69444,.06312,0],99:[0,.43056,.05653,0],100:[0,.69444,.10333,0],101:[0,.43056,.07514,0],102:[.19444,.69444,.21194,0],103:[.19444,.43056,.08847,0],104:[0,.69444,.07671,0],105:[0,.65536,.1019,0],106:[.19444,.65536,.14467,0],107:[0,.69444,.10764,0],108:[0,.69444,.10333,0],109:[0,.43056,.07671,0],110:[0,.43056,.07671,0],111:[0,.43056,.06312,0],112:[.19444,.43056,.06312,0],113:[.19444,.43056,.08847,0],114:[0,.43056,.10764,0],115:[0,.43056,.08208,0],116:[0,.61508,.09486,0],117:[0,.43056,.07671,0],118:[0,.43056,.10764,0],119:[0,.43056,.10764,0],120:[0,.43056,.12042,0],121:[.19444,.43056,.08847,0],122:[0,.43056,.12292,0],126:[.35,.31786,.11585,0],163:[0,.69444,0,0],168:[0,.66786,.10474,0],176:[0,.69444,0,0],184:[.17014,0,0,0],198:[0,.68333,.12028,0],216:[.04861,.73194,.09403,0],223:[.19444,.69444,.10514,0],230:[0,.43056,.07514,0],248:[.09722,.52778,.09194,0],305:[0,.43056,0,.02778],338:[0,.68333,.12028,0],339:[0,.43056,.07514,0],567:[.19444,.43056,0,.08334],710:[0,.69444,.06646,0],711:[0,.62847,.08295,0],713:[0,.56167,.10333,0],714:[0,.69444,.09694,0],715:[0,.69444,0,0],728:[0,.69444,.10806,0],729:[0,.66786,.11752,0],730:[0,.69444,0,0],732:[0,.66786,.11585,0],733:[0,.69444,.1225,0],915:[0,.68333,.13305,0],916:[0,.68333,0,0],920:[0,.68333,.09403,0],923:[0,.68333,0,0],926:[0,.68333,.15294,0],928:[0,.68333,.16389,0],931:[0,.68333,.12028,0],933:[0,.68333,.11111,0],934:[0,.68333,.05986,0],936:[0,.68333,.11111,0],937:[0,.68333,.10257,0],8211:[0,.43056,.09208,0],8212:[0,.43056,.09208,0],8216:[0,.69444,.12417,0],8217:[0,.69444,.12417,0],8220:[0,.69444,.1685,0],8221:[0,.69444,.06961,0],8463:[0,.68889,0,0]},"Main-Regular":{32:[0,0,0,0],33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.19444,.10556,0,0],45:[0,.43056,0,0],46:[0,.10556,0,0],47:[.25,.75,0,0],48:[0,.64444,0,0],49:[0,.64444,0,0],50:[0,.64444,0,0],51:[0,.64444,0,0],52:[0,.64444,0,0],53:[0,.64444,0,0],54:[0,.64444,0,0],55:[0,.64444,0,0],56:[0,.64444,0,0],57:[0,.64444,0,0],58:[0,.43056,0,0],59:[.19444,.43056,0,0],60:[.0391,.5391,0,0],61:[-.13313,.36687,0,0],62:[.0391,.5391,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.68333,0,0],66:[0,.68333,0,0],67:[0,.68333,0,0],68:[0,.68333,0,0],69:[0,.68333,0,0],70:[0,.68333,0,0],71:[0,.68333,0,0],72:[0,.68333,0,0],73:[0,.68333,0,0],74:[0,.68333,0,0],75:[0,.68333,0,0],76:[0,.68333,0,0],77:[0,.68333,0,0],78:[0,.68333,0,0],79:[0,.68333,0,0],80:[0,.68333,0,0],81:[.19444,.68333,0,0],82:[0,.68333,0,0],83:[0,.68333,0,0],84:[0,.68333,0,0],85:[0,.68333,0,0],86:[0,.68333,.01389,0],87:[0,.68333,.01389,0],88:[0,.68333,0,0],89:[0,.68333,.025,0],90:[0,.68333,0,0],91:[.25,.75,0,0],92:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.31,.12056,.02778,0],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,0],100:[0,.69444,0,0],101:[0,.43056,0,0],102:[0,.69444,.07778,0],103:[.19444,.43056,.01389,0],104:[0,.69444,0,0],105:[0,.66786,0,0],106:[.19444,.66786,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.19444,.43056,0,0],113:[.19444,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.61508,0,0],117:[0,.43056,0,0],118:[0,.43056,.01389,0],119:[0,.43056,.01389,0],120:[0,.43056,0,0],121:[.19444,.43056,.01389,0],122:[0,.43056,0,0],123:[.25,.75,0,0],124:[.25,.75,0,0],125:[.25,.75,0,0],126:[.35,.31786,0,0],160:[0,0,0,0],167:[.19444,.69444,0,0],168:[0,.66786,0,0],172:[0,.43056,0,0],176:[0,.69444,0,0],177:[.08333,.58333,0,0],182:[.19444,.69444,0,0],184:[.17014,0,0,0],198:[0,.68333,0,0],215:[.08333,.58333,0,0],216:[.04861,.73194,0,0],223:[0,.69444,0,0],230:[0,.43056,0,0],247:[.08333,.58333,0,0],248:[.09722,.52778,0,0],305:[0,.43056,0,0],338:[0,.68333,0,0],339:[0,.43056,0,0],567:[.19444,.43056,0,0],710:[0,.69444,0,0],711:[0,.62847,0,0],713:[0,.56778,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.66786,0,0],730:[0,.69444,0,0],732:[0,.66786,0,0],733:[0,.69444,0,0],915:[0,.68333,0,0],916:[0,.68333,0,0],920:[0,.68333,0,0],923:[0,.68333,0,0],926:[0,.68333,0,0],928:[0,.68333,0,0],931:[0,.68333,0,0],933:[0,.68333,0,0],934:[0,.68333,0,0],936:[0,.68333,0,0],937:[0,.68333,0,0],8211:[0,.43056,.02778,0],8212:[0,.43056,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0],8224:[.19444,.69444,0,0],8225:[.19444,.69444,0,0],8230:[0,.12,0,0],8242:[0,.55556,0,0],8407:[0,.71444,.15382,0],8463:[0,.68889,0,0],8465:[0,.69444,0,0],8467:[0,.69444,0,.11111],8472:[.19444,.43056,0,.11111],8476:[0,.69444,0,0],8501:[0,.69444,0,0],8592:[-.13313,.36687,0,0],8593:[.19444,.69444,0,0],8594:[-.13313,.36687,0,0],8595:[.19444,.69444,0,0],8596:[-.13313,.36687,0,0],8597:[.25,.75,0,0],8598:[.19444,.69444,0,0],8599:[.19444,.69444,0,0],8600:[.19444,.69444,0,0],8601:[.19444,.69444,0,0],8614:[.011,.511,0,0],8617:[.011,.511,0,0],8618:[.011,.511,0,0],8636:[-.13313,.36687,0,0],8637:[-.13313,.36687,0,0],8640:[-.13313,.36687,0,0],8641:[-.13313,.36687,0,0],8652:[.011,.671,0,0],8656:[-.13313,.36687,0,0],8657:[.19444,.69444,0,0],8658:[-.13313,.36687,0,0],8659:[.19444,.69444,0,0],8660:[-.13313,.36687,0,0],8661:[.25,.75,0,0],8704:[0,.69444,0,0],8706:[0,.69444,.05556,.08334],8707:[0,.69444,0,0],8709:[.05556,.75,0,0],8711:[0,.68333,0,0],8712:[.0391,.5391,0,0],8715:[.0391,.5391,0,0],8722:[.08333,.58333,0,0],8723:[.08333,.58333,0,0],8725:[.25,.75,0,0],8726:[.25,.75,0,0],8727:[-.03472,.46528,0,0],8728:[-.05555,.44445,0,0],8729:[-.05555,.44445,0,0],8730:[.2,.8,0,0],8733:[0,.43056,0,0],8734:[0,.43056,0,0],8736:[0,.69224,0,0],8739:[.25,.75,0,0],8741:[.25,.75,0,0],8743:[0,.55556,0,0],8744:[0,.55556,0,0],8745:[0,.55556,0,0],8746:[0,.55556,0,0],8747:[.19444,.69444,.11111,0],8764:[-.13313,.36687,0,0],8768:[.19444,.69444,0,0],8771:[-.03625,.46375,0,0],8773:[-.022,.589,0,0],8776:[-.01688,.48312,0,0],8781:[-.03625,.46375,0,0],8784:[-.133,.67,0,0],8801:[-.03625,.46375,0,0],8804:[.13597,.63597,0,0],8805:[.13597,.63597,0,0],8810:[.0391,.5391,0,0],8811:[.0391,.5391,0,0],8826:[.0391,.5391,0,0],8827:[.0391,.5391,0,0],8834:[.0391,.5391,0,0],8835:[.0391,.5391,0,0],8838:[.13597,.63597,0,0],8839:[.13597,.63597,0,0],8846:[0,.55556,0,0],8849:[.13597,.63597,0,0],8850:[.13597,.63597,0,0],8851:[0,.55556,0,0],8852:[0,.55556,0,0],8853:[.08333,.58333,0,0],8854:[.08333,.58333,0,0],8855:[.08333,.58333,0,0],8856:[.08333,.58333,0,0],8857:[.08333,.58333,0,0],8866:[0,.69444,0,0],8867:[0,.69444,0,0],8868:[0,.69444,0,0],8869:[0,.69444,0,0],8872:[.249,.75,0,0],8900:[-.05555,.44445,0,0],8901:[-.05555,.44445,0,0],8902:[-.03472,.46528,0,0],8904:[.005,.505,0,0],8942:[.03,.9,0,0],8943:[-.19,.31,0,0],8945:[-.1,.82,0,0],8968:[.25,.75,0,0],8969:[.25,.75,0,0],8970:[.25,.75,0,0],8971:[.25,.75,0,0],8994:[-.14236,.35764,0,0],8995:[-.14236,.35764,0,0],9136:[.244,.744,0,0],9137:[.244,.744,0,0],9651:[.19444,.69444,0,0],9657:[-.03472,.46528,0,0],9661:[.19444,.69444,0,0],9667:[-.03472,.46528,0,0],9711:[.19444,.69444,0,0],9824:[.12963,.69444,0,0],9825:[.12963,.69444,0,0],9826:[.12963,.69444,0,0],9827:[.12963,.69444,0,0],9837:[0,.75,0,0],9838:[.19444,.69444,0,0],9839:[.19444,.69444,0,0],10216:[.25,.75,0,0],10217:[.25,.75,0,0],10222:[.244,.744,0,0],10223:[.244,.744,0,0],10229:[.011,.511,0,0],10230:[.011,.511,0,0],10231:[.011,.511,0,0],10232:[.024,.525,0,0],10233:[.024,.525,0,0],10234:[.024,.525,0,0],10236:[.011,.511,0,0],10815:[0,.68333,0,0],10927:[.13597,.63597,0,0],10928:[.13597,.63597,0,0],57376:[.19444,.69444,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0],66:[0,.68611,.04835,0],67:[0,.68611,.06979,0],68:[0,.68611,.03194,0],69:[0,.68611,.05451,0],70:[0,.68611,.15972,0],71:[0,.68611,0,0],72:[0,.68611,.08229,0],73:[0,.68611,.07778,0],74:[0,.68611,.10069,0],75:[0,.68611,.06979,0],76:[0,.68611,0,0],77:[0,.68611,.11424,0],78:[0,.68611,.11424,0],79:[0,.68611,.03194,0],80:[0,.68611,.15972,0],81:[.19444,.68611,0,0],82:[0,.68611,.00421,0],83:[0,.68611,.05382,0],84:[0,.68611,.15972,0],85:[0,.68611,.11424,0],86:[0,.68611,.25555,0],87:[0,.68611,.15972,0],88:[0,.68611,.07778,0],89:[0,.68611,.25555,0],90:[0,.68611,.06979,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[.19444,.69444,.11042,0],103:[.19444,.44444,.03704,0],104:[0,.69444,0,0],105:[0,.69326,0,0],106:[.19444,.69326,.0622,0],107:[0,.69444,.01852,0],108:[0,.69444,.0088,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,.03704,0],114:[0,.44444,.03194,0],115:[0,.44444,0,0],116:[0,.63492,0,0],117:[0,.44444,0,0],118:[0,.44444,.03704,0],119:[0,.44444,.02778,0],120:[0,.44444,0,0],121:[.19444,.44444,.03704,0],122:[0,.44444,.04213,0],915:[0,.68611,.15972,0],916:[0,.68611,0,0],920:[0,.68611,.03194,0],923:[0,.68611,0,0],926:[0,.68611,.07458,0],928:[0,.68611,.08229,0],931:[0,.68611,.05451,0],933:[0,.68611,.15972,0],934:[0,.68611,0,0],936:[0,.68611,.11653,0],937:[0,.68611,.04835,0],945:[0,.44444,0,0],946:[.19444,.69444,.03403,0],947:[.19444,.44444,.06389,0],948:[0,.69444,.03819,0],949:[0,.44444,0,0],950:[.19444,.69444,.06215,0],951:[.19444,.44444,.03704,0],952:[0,.69444,.03194,0],953:[0,.44444,0,0],954:[0,.44444,0,0],955:[0,.69444,0,0],956:[.19444,.44444,0,0],957:[0,.44444,.06898,0],958:[.19444,.69444,.03021,0],959:[0,.44444,0,0],960:[0,.44444,.03704,0],961:[.19444,.44444,0,0],962:[.09722,.44444,.07917,0],963:[0,.44444,.03704,0],964:[0,.44444,.13472,0],965:[0,.44444,.03704,0],966:[.19444,.44444,0,0],967:[.19444,.44444,0,0],968:[.19444,.69444,.03704,0],969:[0,.44444,.03704,0],977:[0,.69444,0,0],981:[.19444,.69444,0,0],982:[0,.44444,.03194,0],1009:[.19444,.44444,0,0],1013:[0,.44444,0,0]},"Math-Italic":{65:[0,.68333,0,.13889],66:[0,.68333,.05017,.08334],67:[0,.68333,.07153,.08334],68:[0,.68333,.02778,.05556],69:[0,.68333,.05764,.08334],70:[0,.68333,.13889,.08334],71:[0,.68333,0,.08334],72:[0,.68333,.08125,.05556],73:[0,.68333,.07847,.11111],74:[0,.68333,.09618,.16667],75:[0,.68333,.07153,.05556],76:[0,.68333,0,.02778],77:[0,.68333,.10903,.08334],78:[0,.68333,.10903,.08334],79:[0,.68333,.02778,.08334],80:[0,.68333,.13889,.08334],81:[.19444,.68333,0,.08334],82:[0,.68333,.00773,.08334],83:[0,.68333,.05764,.08334],84:[0,.68333,.13889,.08334],85:[0,.68333,.10903,.02778],86:[0,.68333,.22222,0],87:[0,.68333,.13889,0],88:[0,.68333,.07847,.08334],89:[0,.68333,.22222,0],90:[0,.68333,.07153,.08334],97:[0,.43056,0,0],98:[0,.69444,0,0],99:[0,.43056,0,.05556],100:[0,.69444,0,.16667],101:[0,.43056,0,.05556],102:[.19444,.69444,.10764,.16667],103:[.19444,.43056,.03588,.02778],104:[0,.69444,0,0],105:[0,.65952,0,0],106:[.19444,.65952,.05724,0],107:[0,.69444,.03148,0],108:[0,.69444,.01968,.08334],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,.05556],112:[.19444,.43056,0,.08334],113:[.19444,.43056,.03588,.08334],114:[0,.43056,.02778,.05556],115:[0,.43056,0,.05556],116:[0,.61508,0,.08334],117:[0,.43056,0,.02778],118:[0,.43056,.03588,.02778],119:[0,.43056,.02691,.08334],120:[0,.43056,0,.02778],121:[.19444,.43056,.03588,.05556],122:[0,.43056,.04398,.05556],915:[0,.68333,.13889,.08334],916:[0,.68333,0,.16667],920:[0,.68333,.02778,.08334],923:[0,.68333,0,.16667],926:[0,.68333,.07569,.08334],928:[0,.68333,.08125,.05556],931:[0,.68333,.05764,.08334],933:[0,.68333,.13889,.05556],934:[0,.68333,0,.08334],936:[0,.68333,.11,.05556],937:[0,.68333,.05017,.08334],945:[0,.43056,.0037,.02778],946:[.19444,.69444,.05278,.08334],947:[.19444,.43056,.05556,0],948:[0,.69444,.03785,.05556],949:[0,.43056,0,.08334],950:[.19444,.69444,.07378,.08334],951:[.19444,.43056,.03588,.05556],952:[0,.69444,.02778,.08334],953:[0,.43056,0,.05556],954:[0,.43056,0,0],955:[0,.69444,0,0],956:[.19444,.43056,0,.02778],957:[0,.43056,.06366,.02778],958:[.19444,.69444,.04601,.11111],959:[0,.43056,0,.05556],960:[0,.43056,.03588,0],961:[.19444,.43056,0,.08334],962:[.09722,.43056,.07986,.08334],963:[0,.43056,.03588,0],964:[0,.43056,.1132,.02778],965:[0,.43056,.03588,.02778],966:[.19444,.43056,0,.08334],967:[.19444,.43056,0,.05556],968:[.19444,.69444,.03588,.11111],969:[0,.43056,.03588,0],977:[0,.69444,0,.08334],981:[.19444,.69444,0,.08334],982:[0,.43056,.02778,0],1009:[.19444,.43056,0,.08334],1013:[0,.43056,0,.05556]},"SansSerif-Bold":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.11667,.61667,0,0],44:[.10556,.13056,0,0],45:[0,.45833,0,0],46:[0,.13056,0,0],47:[.25,.75,0,0],48:[0,.69444,0,0],49:[0,.69444,0,0],50:[0,.69444,0,0],51:[0,.69444,0,0],52:[0,.69444,0,0],53:[0,.69444,0,0],54:[0,.69444,0,0],55:[0,.69444,0,0],56:[0,.69444,0,0],57:[0,.69444,0,0],58:[0,.45833,0,0],59:[.10556,.45833,0,0],61:[-.09375,.40625,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.10556,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01528,0],87:[0,.69444,.01528,0],88:[0,.69444,0,0],89:[0,.69444,.0275,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.10833,.03056,0],97:[0,.45833,0,0],98:[0,.69444,0,0],99:[0,.45833,0,0],100:[0,.69444,0,0],101:[0,.45833,0,0],102:[0,.69444,.07639,0],103:[.19444,.45833,.01528,0],104:[0,.69444,0,0],105:[0,.69444,0,0],106:[.19444,.69444,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.45833,0,0],110:[0,.45833,0,0],111:[0,.45833,0,0],112:[.19444,.45833,0,0],113:[.19444,.45833,0,0],114:[0,.45833,.01528,0],115:[0,.45833,0,0],116:[0,.58929,0,0],117:[0,.45833,0,0],118:[0,.45833,.01528,0],119:[0,.45833,.01528,0],120:[0,.45833,0,0],121:[.19444,.45833,.01528,0],122:[0,.45833,0,0],126:[.35,.34444,0,0],168:[0,.69444,0,0],176:[0,.69444,0,0],180:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.45833,0,0],567:[.19444,.45833,0,0],710:[0,.69444,0,0],711:[0,.63542,0,0],713:[0,.63778,0,0],728:[0,.69444,0,0],729:[0,.69444,0,0],730:[0,.69444,0,0],732:[0,.69444,0,0],733:[0,.69444,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.45833,.03056,0],8212:[0,.45833,.03056,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"SansSerif-Italic":{33:[0,.69444,.05733,0],34:[0,.69444,.00316,0],35:[.19444,.69444,.05087,0],36:[.05556,.75,.11156,0],37:[.05556,.75,.03126,0],38:[0,.69444,.03058,0],39:[0,.69444,.07816,0],40:[.25,.75,.13164,0],41:[.25,.75,.02536,0],42:[0,.75,.11775,0],43:[.08333,.58333,.02536,0],44:[.125,.08333,0,0],45:[0,.44444,.01946,0],46:[0,.08333,0,0],47:[.25,.75,.13164,0],48:[0,.65556,.11156,0],49:[0,.65556,.11156,0],50:[0,.65556,.11156,0],51:[0,.65556,.11156,0],52:[0,.65556,.11156,0],53:[0,.65556,.11156,0],54:[0,.65556,.11156,0],55:[0,.65556,.11156,0],56:[0,.65556,.11156,0],57:[0,.65556,.11156,0],58:[0,.44444,.02502,0],59:[.125,.44444,.02502,0],61:[-.13,.37,.05087,0],63:[0,.69444,.11809,0],64:[0,.69444,.07555,0],65:[0,.69444,0,0],66:[0,.69444,.08293,0],67:[0,.69444,.11983,0],68:[0,.69444,.07555,0],69:[0,.69444,.11983,0],70:[0,.69444,.13372,0],71:[0,.69444,.11983,0],72:[0,.69444,.08094,0],73:[0,.69444,.13372,0],74:[0,.69444,.08094,0],75:[0,.69444,.11983,0],76:[0,.69444,0,0],77:[0,.69444,.08094,0],78:[0,.69444,.08094,0],79:[0,.69444,.07555,0],80:[0,.69444,.08293,0],81:[.125,.69444,.07555,0],82:[0,.69444,.08293,0],83:[0,.69444,.09205,0],84:[0,.69444,.13372,0],85:[0,.69444,.08094,0],86:[0,.69444,.1615,0],87:[0,.69444,.1615,0],88:[0,.69444,.13372,0],89:[0,.69444,.17261,0],90:[0,.69444,.11983,0],91:[.25,.75,.15942,0],93:[.25,.75,.08719,0],94:[0,.69444,.0799,0],95:[.35,.09444,.08616,0],97:[0,.44444,.00981,0],98:[0,.69444,.03057,0],99:[0,.44444,.08336,0],100:[0,.69444,.09483,0],101:[0,.44444,.06778,0],102:[0,.69444,.21705,0],103:[.19444,.44444,.10836,0],104:[0,.69444,.01778,0],105:[0,.67937,.09718,0],106:[.19444,.67937,.09162,0],107:[0,.69444,.08336,0],108:[0,.69444,.09483,0],109:[0,.44444,.01778,0],110:[0,.44444,.01778,0],111:[0,.44444,.06613,0],112:[.19444,.44444,.0389,0],113:[.19444,.44444,.04169,0],114:[0,.44444,.10836,0],115:[0,.44444,.0778,0],116:[0,.57143,.07225,0],117:[0,.44444,.04169,0],118:[0,.44444,.10836,0],119:[0,.44444,.10836,0],120:[0,.44444,.09169,0],121:[.19444,.44444,.10836,0],122:[0,.44444,.08752,0],126:[.35,.32659,.08826,0],168:[0,.67937,.06385,0],176:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.44444,.04169,0],567:[.19444,.44444,.04169,0],710:[0,.69444,.0799,0],711:[0,.63194,.08432,0],713:[0,.60889,.08776,0],714:[0,.69444,.09205,0],715:[0,.69444,0,0],728:[0,.69444,.09483,0],729:[0,.67937,.07774,0],730:[0,.69444,0,0],732:[0,.67659,.08826,0],733:[0,.69444,.09205,0],915:[0,.69444,.13372,0],916:[0,.69444,0,0],920:[0,.69444,.07555,0],923:[0,.69444,0,0],926:[0,.69444,.12816,0],928:[0,.69444,.08094,0],931:[0,.69444,.11983,0],933:[0,.69444,.09031,0],934:[0,.69444,.04603,0],936:[0,.69444,.09031,0],937:[0,.69444,.08293,0],8211:[0,.44444,.08616,0],8212:[0,.44444,.08616,0],8216:[0,.69444,.07816,0],8217:[0,.69444,.07816,0],8220:[0,.69444,.14205,0],8221:[0,.69444,.00316,0]},"SansSerif-Regular":{33:[0,.69444,0,0],34:[0,.69444,0,0],35:[.19444,.69444,0,0],36:[.05556,.75,0,0],37:[.05556,.75,0,0],38:[0,.69444,0,0],39:[0,.69444,0,0],40:[.25,.75,0,0],41:[.25,.75,0,0],42:[0,.75,0,0],43:[.08333,.58333,0,0],44:[.125,.08333,0,0],45:[0,.44444,0,0],46:[0,.08333,0,0],47:[.25,.75,0,0],48:[0,.65556,0,0],49:[0,.65556,0,0],50:[0,.65556,0,0],51:[0,.65556,0,0],52:[0,.65556,0,0],53:[0,.65556,0,0],54:[0,.65556,0,0],55:[0,.65556,0,0],56:[0,.65556,0,0],57:[0,.65556,0,0],58:[0,.44444,0,0],59:[.125,.44444,0,0],61:[-.13,.37,0,0],63:[0,.69444,0,0],64:[0,.69444,0,0],65:[0,.69444,0,0],66:[0,.69444,0,0],67:[0,.69444,0,0],68:[0,.69444,0,0],69:[0,.69444,0,0],70:[0,.69444,0,0],71:[0,.69444,0,0],72:[0,.69444,0,0],73:[0,.69444,0,0],74:[0,.69444,0,0],75:[0,.69444,0,0],76:[0,.69444,0,0],77:[0,.69444,0,0],78:[0,.69444,0,0],79:[0,.69444,0,0],80:[0,.69444,0,0],81:[.125,.69444,0,0],82:[0,.69444,0,0],83:[0,.69444,0,0],84:[0,.69444,0,0],85:[0,.69444,0,0],86:[0,.69444,.01389,0],87:[0,.69444,.01389,0],88:[0,.69444,0,0],89:[0,.69444,.025,0],90:[0,.69444,0,0],91:[.25,.75,0,0],93:[.25,.75,0,0],94:[0,.69444,0,0],95:[.35,.09444,.02778,0],97:[0,.44444,0,0],98:[0,.69444,0,0],99:[0,.44444,0,0],100:[0,.69444,0,0],101:[0,.44444,0,0],102:[0,.69444,.06944,0],103:[.19444,.44444,.01389,0],104:[0,.69444,0,0],105:[0,.67937,0,0],106:[.19444,.67937,0,0],107:[0,.69444,0,0],108:[0,.69444,0,0],109:[0,.44444,0,0],110:[0,.44444,0,0],111:[0,.44444,0,0],112:[.19444,.44444,0,0],113:[.19444,.44444,0,0],114:[0,.44444,.01389,0],115:[0,.44444,0,0],116:[0,.57143,0,0],117:[0,.44444,0,0],118:[0,.44444,.01389,0],119:[0,.44444,.01389,0],120:[0,.44444,0,0],121:[.19444,.44444,.01389,0],122:[0,.44444,0,0],126:[.35,.32659,0,0],168:[0,.67937,0,0],176:[0,.69444,0,0],184:[.17014,0,0,0],305:[0,.44444,0,0],567:[.19444,.44444,0,0],710:[0,.69444,0,0],711:[0,.63194,0,0],713:[0,.60889,0,0],714:[0,.69444,0,0],715:[0,.69444,0,0],728:[0,.69444,0,0],729:[0,.67937,0,0],730:[0,.69444,0,0],732:[0,.67659,0,0],733:[0,.69444,0,0],915:[0,.69444,0,0],916:[0,.69444,0,0],920:[0,.69444,0,0],923:[0,.69444,0,0],926:[0,.69444,0,0],928:[0,.69444,0,0],931:[0,.69444,0,0],933:[0,.69444,0,0],934:[0,.69444,0,0],936:[0,.69444,0,0],937:[0,.69444,0,0],8211:[0,.44444,.02778,0],8212:[0,.44444,.02778,0],8216:[0,.69444,0,0],8217:[0,.69444,0,0],8220:[0,.69444,0,0],8221:[0,.69444,0,0]},"Script-Regular":{65:[0,.7,.22925,0],66:[0,.7,.04087,0],67:[0,.7,.1689,0],68:[0,.7,.09371,0],69:[0,.7,.18583,0],70:[0,.7,.13634,0],71:[0,.7,.17322,0],72:[0,.7,.29694,0],73:[0,.7,.19189,0],74:[.27778,.7,.19189,0],75:[0,.7,.31259,0],76:[0,.7,.19189,0],77:[0,.7,.15981,0],78:[0,.7,.3525,0],79:[0,.7,.08078,0],80:[0,.7,.08078,0],81:[0,.7,.03305,0],82:[0,.7,.06259,0],83:[0,.7,.19189,0],84:[0,.7,.29087,0],85:[0,.7,.25815,0],86:[0,.7,.27523,0],87:[0,.7,.27523,0],88:[0,.7,.26006,0],89:[0,.7,.2939,0],90:[0,.7,.24037,0]},"Size1-Regular":{40:[.35001,.85,0,0],41:[.35001,.85,0,0],47:[.35001,.85,0,0],91:[.35001,.85,0,0],92:[.35001,.85,0,0],93:[.35001,.85,0,0],123:[.35001,.85,0,0],125:[.35001,.85,0,0],710:[0,.72222,0,0],732:[0,.72222,0,0],770:[0,.72222,0,0],771:[0,.72222,0,0],8214:[-99e-5,.601,0,0],8593:[1e-5,.6,0,0],8595:[1e-5,.6,0,0],8657:[1e-5,.6,0,0],8659:[1e-5,.6,0,0],8719:[.25001,.75,0,0],8720:[.25001,.75,0,0],8721:[.25001,.75,0,0],8730:[.35001,.85,0,0],8739:[-.00599,.606,0,0],8741:[-.00599,.606,0,0],8747:[.30612,.805,.19445,0],8748:[.306,.805,.19445,0],8749:[.306,.805,.19445,0],8750:[.30612,.805,.19445,0],8896:[.25001,.75,0,0],8897:[.25001,.75,0,0],8898:[.25001,.75,0,0],8899:[.25001,.75,0,0],8968:[.35001,.85,0,0],8969:[.35001,.85,0,0],8970:[.35001,.85,0,0],8971:[.35001,.85,0,0],9168:[-99e-5,.601,0,0],10216:[.35001,.85,0,0],10217:[.35001,.85,0,0],10752:[.25001,.75,0,0],10753:[.25001,.75,0,0],10754:[.25001,.75,0,0],10756:[.25001,.75,0,0],10758:[.25001,.75,0,0]},"Size2-Regular":{40:[.65002,1.15,0,0],41:[.65002,1.15,0,0],47:[.65002,1.15,0,0],91:[.65002,1.15,0,0],92:[.65002,1.15,0,0],93:[.65002,1.15,0,0],123:[.65002,1.15,0,0],125:[.65002,1.15,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8719:[.55001,1.05,0,0],8720:[.55001,1.05,0,0],8721:[.55001,1.05,0,0],8730:[.65002,1.15,0,0],8747:[.86225,1.36,.44445,0],8748:[.862,1.36,.44445,0],8749:[.862,1.36,.44445,0],8750:[.86225,1.36,.44445,0],8896:[.55001,1.05,0,0],8897:[.55001,1.05,0,0],8898:[.55001,1.05,0,0],8899:[.55001,1.05,0,0],8968:[.65002,1.15,0,0],8969:[.65002,1.15,0,0],8970:[.65002,1.15,0,0],8971:[.65002,1.15,0,0],10216:[.65002,1.15,0,0],10217:[.65002,1.15,0,0],10752:[.55001,1.05,0,0],10753:[.55001,1.05,0,0],10754:[.55001,1.05,0,0],10756:[.55001,1.05,0,0],10758:[.55001,1.05,0,0]},"Size3-Regular":{40:[.95003,1.45,0,0],41:[.95003,1.45,0,0],47:[.95003,1.45,0,0],91:[.95003,1.45,0,0],92:[.95003,1.45,0,0],93:[.95003,1.45,0,0],123:[.95003,1.45,0,0],125:[.95003,1.45,0,0],710:[0,.75,0,0],732:[0,.75,0,0],770:[0,.75,0,0],771:[0,.75,0,0],8730:[.95003,1.45,0,0],8968:[.95003,1.45,0,0],8969:[.95003,1.45,0,0],8970:[.95003,1.45,0,0],8971:[.95003,1.45,0,0],10216:[.95003,1.45,0,0],10217:[.95003,1.45,0,0]},"Size4-Regular":{40:[1.25003,1.75,0,0],41:[1.25003,1.75,0,0],47:[1.25003,1.75,0,0],91:[1.25003,1.75,0,0],92:[1.25003,1.75,0,0],93:[1.25003,1.75,0,0],123:[1.25003,1.75,0,0],125:[1.25003,1.75,0,0],710:[0,.825,0,0],732:[0,.825,0,0],770:[0,.825,0,0],771:[0,.825,0,0],8730:[1.25003,1.75,0,0],8968:[1.25003,1.75,0,0],8969:[1.25003,1.75,0,0],8970:[1.25003,1.75,0,0],8971:[1.25003,1.75,0,0],9115:[.64502,1.155,0,0],9116:[1e-5,.6,0,0],9117:[.64502,1.155,0,0],9118:[.64502,1.155,0,0],9119:[1e-5,.6,0,0],9120:[.64502,1.155,0,0],9121:[.64502,1.155,0,0],9122:[-99e-5,.601,0,0],9123:[.64502,1.155,0,0],9124:[.64502,1.155,0,0],9125:[-99e-5,.601,0,0],9126:[.64502,1.155,0,0],9127:[1e-5,.9,0,0],9128:[.65002,1.15,0,0],9129:[.90001,0,0,0],9130:[0,.3,0,0],9131:[1e-5,.9,0,0],9132:[.65002,1.15,0,0],9133:[.90001,0,0,0],9143:[.88502,.915,0,0],10216:[1.25003,1.75,0,0],10217:[1.25003,1.75,0,0],57344:[-.00499,.605,0,0],57345:[-.00499,.605,0,0],57680:[0,.12,0,0],57681:[0,.12,0,0],57682:[0,.12,0,0],57683:[0,.12,0,0]},"Typewriter-Regular":{32:[0,0,0,0],33:[0,.61111,0,0],34:[0,.61111,0,0],35:[0,.61111,0,0],36:[.08333,.69444,0,0],37:[.08333,.69444,0,0],38:[0,.61111,0,0],39:[0,.61111,0,0],40:[.08333,.69444,0,0],41:[.08333,.69444,0,0],42:[0,.52083,0,0],43:[-.08056,.53055,0,0],44:[.13889,.125,0,0],45:[-.08056,.53055,0,0],46:[0,.125,0,0],47:[.08333,.69444,0,0],48:[0,.61111,0,0],49:[0,.61111,0,0],50:[0,.61111,0,0],51:[0,.61111,0,0],52:[0,.61111,0,0],53:[0,.61111,0,0],54:[0,.61111,0,0],55:[0,.61111,0,0],56:[0,.61111,0,0],57:[0,.61111,0,0],58:[0,.43056,0,0],59:[.13889,.43056,0,0],60:[-.05556,.55556,0,0],61:[-.19549,.41562,0,0],62:[-.05556,.55556,0,0],63:[0,.61111,0,0],64:[0,.61111,0,0],65:[0,.61111,0,0],66:[0,.61111,0,0],67:[0,.61111,0,0],68:[0,.61111,0,0],69:[0,.61111,0,0],70:[0,.61111,0,0],71:[0,.61111,0,0],72:[0,.61111,0,0],73:[0,.61111,0,0],74:[0,.61111,0,0],75:[0,.61111,0,0],76:[0,.61111,0,0],77:[0,.61111,0,0],78:[0,.61111,0,0],79:[0,.61111,0,0],80:[0,.61111,0,0],81:[.13889,.61111,0,0],82:[0,.61111,0,0],83:[0,.61111,0,0],84:[0,.61111,0,0],85:[0,.61111,0,0],86:[0,.61111,0,0],87:[0,.61111,0,0],88:[0,.61111,0,0],89:[0,.61111,0,0],90:[0,.61111,0,0],91:[.08333,.69444,0,0],92:[.08333,.69444,0,0],93:[.08333,.69444,0,0],94:[0,.61111,0,0],95:[.09514,0,0,0],96:[0,.61111,0,0],97:[0,.43056,0,0],98:[0,.61111,0,0],99:[0,.43056,0,0],100:[0,.61111,0,0],101:[0,.43056,0,0],102:[0,.61111,0,0],103:[.22222,.43056,0,0],104:[0,.61111,0,0],105:[0,.61111,0,0],106:[.22222,.61111,0,0],107:[0,.61111,0,0],108:[0,.61111,0,0],109:[0,.43056,0,0],110:[0,.43056,0,0],111:[0,.43056,0,0],112:[.22222,.43056,0,0],113:[.22222,.43056,0,0],114:[0,.43056,0,0],115:[0,.43056,0,0],116:[0,.55358,0,0],117:[0,.43056,0,0],118:[0,.43056,0,0],119:[0,.43056,0,0],120:[0,.43056,0,0],121:[.22222,.43056,0,0],122:[0,.43056,0,0],123:[.08333,.69444,0,0],124:[.08333,.69444,0,0],125:[.08333,.69444,0,0],126:[0,.61111,0,0],127:[0,.61111,0,0],160:[0,0,0,0],176:[0,.61111,0,0],184:[.19445,0,0,0],305:[0,.43056,0,0],567:[.22222,.43056,0,0],711:[0,.56597,0,0],713:[0,.56555,0,0],714:[0,.61111,0,0],715:[0,.61111,0,0],728:[0,.61111,0,0],730:[0,.61111,0,0],770:[0,.61111,0,0],771:[0,.61111,0,0],776:[0,.61111,0,0],915:[0,.61111,0,0],916:[0,.61111,0,0],920:[0,.61111,0,0],923:[0,.61111,0,0],926:[0,.61111,0,0],928:[0,.61111,0,0],931:[0,.61111,0,0],933:[0,.61111,0,0],934:[0,.61111,0,0],936:[0,.61111,0,0],937:[0,.61111,0,0],8216:[0,.61111,0,0],8217:[0,.61111,0,0],8242:[0,.61111,0,0],9251:[.11111,.21944,0,0]}};const i=/[\u3040-\u309F]|[\u30A0-\u30FF]|[\u4E00-\u9FAF]|[\uAC00-\uD7AF]/,a={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25]},r={" ":" ","​":" ","Å":"A","Ç":"C","Ð":"D","Þ":"o","å":"a","ç":"c","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"};function n(e,a){let n=e.charCodeAt(0);e[0]in r?n=r[e[0]].charCodeAt(0):i.test(e[0])&&(n=77);const o=t[a][n];return o?{defaultMetrics:!1,depth:o[0],height:o[1],italic:o[2],skew:o[3]}:11034===n?{defaultMetrics:!0,depth:0,height:1,italic:0,skew:0}:{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}function o(e,t,i=NaN){if("string"==typeof e){const i=e.match(/([-+]?[0-9.]*)\s*([a-zA-Z]+)/);i?(e=parseFloat(i[1]),t=i[2].toLowerCase()):e=parseFloat(e)}const a={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:3/4,em:10,bp:1.00375,dd:1238/1157,pc:12,in:72.27,mu:10/18}[t]||1;if(isFinite(i)){const t=Math.pow(10,i);return Math.round(e/10*a*t)/t}return e/10*a}function s(e,t){return o(e,t)*(4/3)*10}class l{constructor(e,t,i,r){this.id=e,this.size=t,this.cramped=r,this.sizeMultiplier=i,this.metrics=Object.keys(a).reduce((e,t)=>({...e,[t]:a[t][this.size]}),{}),this.metrics.emPerEx=a.xHeight[this.size]/a.quad[this.size]}sup(){return c[[4,5,4,5,6,7,6,7][this.id]]}sub(){return c[[5,5,5,5,7,7,7,7][this.id]]}fracNum(){return c[[2,3,4,5,6,7,6,7][this.id]]}fracDen(){return c[[3,3,5,5,7,7,7,7][this.id]]}cramp(){return c[[1,1,3,3,5,5,7,7][this.id]]}cls(){return["displaystyle textstyle","textstyle","scriptstyle","scriptscriptstyle"][this.size]}adjustTo(e){let t=[["","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-textstyle displaystyle textstyle","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-scriptstyle textstyle displaystyle","reset-scriptstyle textstyle","","reset-scriptstyle scriptscriptstyle"],["reset-scriptscriptstyle textstyle displaystyle","reset-scriptscriptstyle textstyle","reset-scriptscriptstyle scriptstyle",""]][this.size][e.size];return t.length>0&&(t=" "+t),t}isTight(){return this.size>=2}}const c={0:new l(0,0,1,!1),1:new l(1,0,1,!0),2:new l(2,1,1,!1),3:new l(3,1,1,!0),4:new l(4,2,.7,!1),5:new l(5,2,.7,!0),6:new l(6,3,.5,!1),7:new l(7,3,.5,!0)};c.displaystyle=c[0],c.textstyle=c[2],c.scriptstyle=c[4],c.scriptscriptstyle=c[6];class d{constructor(e){var t,i,a,r,n,o;this.macros=null!==(t=e.macros)&&void 0!==t?t:{},this.atomIdsSettings=e.atomIdsSettings,this.mathstyle=null!==(i=e.mathstyle)&&void 0!==i?i:c.displaystyle,this.letterShapeStyle=null!==(a=e.letterShapeStyle)&&void 0!==a?a:"tex",this.size=null!==(r=e.size)&&void 0!==r?r:"size5",this.parentMathstyle=null!==(n=e.parentMathstyle)&&void 0!==n?n:this.mathstyle,this.parentSize=null!==(o=e.parentSize)&&void 0!==o?o:this.size,this.opacity=e.opacity,this.smartFence=e.smartFence}clone(e={}){const t=new d(this);return void 0!==e&&(Object.assign(t,e),e.mathstyle?(t.parentMathstyle=this.mathstyle,t.parentSize=this.size,"string"==typeof e.mathstyle&&(t.mathstyle=c[e.mathstyle])):t.mathstyle=this.mathstyle),t}setMathstyle(e){e&&"auto"!==e&&(this.mathstyle=c[e])}cramp(){return this.clone({mathstyle:this.mathstyle.cramp()})}sup(){return this.clone({mathstyle:this.mathstyle.sup()})}sub(){return this.clone({mathstyle:this.mathstyle.sub()})}}const m={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},p={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34]},u={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",widetilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",widetilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",widetilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",widetilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};function h(e){let t="",i="";for(const a of e)a&&(/[a-zA-Z*]/.test(a[0])&&(i+=t),t=/\\[a-zA-Z]+\*?$/.test(a)?" ":"",i+=a);return i}function f(e){return h(e.map(e=>{var t;return null!==(t={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])&&void 0!==t?t:e}))}function g(e,t){const i=[];let a,r=[];return e.forEach(e=>{if("first"!==e.type){let n;"variant"===t?(n=e.variant,e.variantStyle&&"up"!==e.variantStyle&&(n+="-"+e.variantStyle)):n=e[t],n!==a?(r.length>0&&i.push(r),r=[e],a=n):r.push(e)}}),r.length>0&&i.push(r),i}const y={};function b(e,t){y[e]={...t}}const v=["","mord","mbin","mop","mrel","mopen","mclose","mpunct","minner","spacing","first","command","error","placeholder","textord","none"];function x(e){return v.includes(e)}const k={"mord+mop":3,"mord+mbin":4,"mord+mrel":5,"mord+minner":3,"mop+mord":3,"mop+mop":3,"mop+mbin":5,"mop+minner":3,"mbin+mord":4,"mbin+mop":4,"mbin+mopen":4,"mbin+minner":4,"mrel+mord":5,"mrel+mop":5,"mrel+mopen":5,"mrel+minner":5,"mclose+mop":3,"mclose+mbin":4,"mclose+mrel":5,"mclose+minner":3,"mpunct+mord":3,"mpunct+mop":3,"mpunct+mbin":4,"mpunct+mrel":5,"mpunct+mopen":3,"mpunct+mpunct":3,"mpunct+minner":3},_={"mord+mop":3,"mop+mord":3,"mop+mop":3,"mclose+mop":3,"minner+mop":3};function w(t){if("string"==typeof t)return t;if("number"==typeof t)return Number(Math.ceil(100*t)/100).toString();if(void 0===t)return"";if(e(t)){let e="";for(const i of t)e+=w(i);return e}return""}class M{constructor(t,i="",a=""){this.classes=i,e(t)?this.children=[].concat(...t):"string"==typeof t?this.body=t:t&&"object"==typeof t&&(this.children=[t]),this.type=a,this.style=null,this.updateDimensions()}updateDimensions(){let e=0,t=0,i=1;this.children?this.children.forEach(a=>{a.height>e&&(e=a.height),a.depth>t&&(t=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}):"string"==typeof this.body&&(e=1.2,t=0),this.height=e,this.depth=t,this.maxFontSize=i}selected(e){e&&!/ML__selected/.test(this.classes)&&(this.classes.length>0&&(this.classes+=" "),this.classes+="ML__selected"),!e&&/ML__selected/.test(this.classes)&&(this.classes=this.classes.replace("ML__selected","")),this.children&&this.children.forEach(t=>t.selected(e))}applyStyle(e){if(!e)return;if(e.color&&("none"!==e.color?this.setStyle("color",e.color):this.setStyle("color","")),e.backgroundColor&&("none"!==e.backgroundColor?this.setStyle("background-color",e.backgroundColor):this.setStyle("background-color","")),e.cssClass&&(this.classes+=" "+e.cssClass),!this.body)return;const t=function(e,t){var i;return(null===(i=y[t.mode])||void 0===i?void 0:i.applyStyle)?y[t.mode].applyStyle(e,t):""}(this,e);if(this.body&&t){this.maxFontSize={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49}[e.fontSize]||1,this.height=0,this.depth=0,this.skew=0,this.italic=0;for(let e=0;e0&&(this.style||(this.style={}),this.style[e]=i)}setTop(e){e&&0!==e&&(this.style||(this.style={}),this.style.top=w(e)+"em",this.height-=e,this.depth+=e)}setLeft(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-left"]=w(e)+"em")}setRight(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-right"]=w(e)+"em")}setWidth(e){e&&0!==e&&(this.style||(this.style={}),this.style.width=w(e)+"em")}toMarkup(e=1,t=1){var i,a,r,n,o;let s="",l=this.body||"";if(this.children){let e="none";for(let r=0;r`${e}="${this.attributes[e]}"`).join(" "));const t=this.classes.split(" ");t.push(null!==(r={command:"ML__command",placeholder:"ML__placeholder",error:"ML__error"}[this.type])&&void 0!==r?r:""),this.caret&&"command"===this.type&&t.push("ML__command-caret");let i="";if(i=t.length>1?t.filter((e,t,i)=>e.length>0&&i.indexOf(e)===t).join(" "):t[0],i.length>0&&(s+=` class="${i}"`),e&&((null===(n=this.style)||void 0===n?void 0:n["margin-left"])?this.style["margin-left"]=w(parseFloat(this.style["margin-left"])+e/18)+"em":(this.style||(this.style={}),this.style["margin-left"]=w(e/18)+"em")),this.style){let e="";const t=/ML__selected/.test(this.classes);for(const i in this.style)Object.prototype.hasOwnProperty.call(this.style,i)&&("background-color"===i&&t||(e+=i+":"+this.style[i]+";"));e.length>0&&(s+=' style="'+e+'"')}s+=">",this.svgBody?s+=function(e){if(p[e]){const t=p[e][2];return``}const[t,i,a,r]=m[e];let n,o;const s=a/1e3;3===t.length?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):2===t.length?(n=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],o=[r]);const l=t.map((e,t)=>``).join("");return`${l}`}(this.svgBody):this.svgOverlay?(s+='",s+=""):s+=l,s+=""}else s="";return this.caret&&"command"!==this.type&&("text"===this.caret?s+='':s+=''),s}tryCoalesceWith(e){if(this.type!==e.type)return!1;if("error"===this.type||"placeholder"===this.type||"command"===this.type)return!1;if(this.svgBody||!this.body)return!1;if(e.svgBody||!e.body)return!1;const t=this.children&&this.children.length>0,i=e.children&&e.children.length>0;if(t||i)return!1;if((this.style?this.style.length:0)!==(e.style?e.style.length:0))return!1;const a=this.classes.trim().replace(/\s+/g," ").split(" "),r=e.classes.trim().replace(/\s+/g," ").split(" ");if(a.length!==r.length)return!1;a.sort(),r.sort();for(let e=0;e=e.length)return"none";const s=null!==(a=null===(i=e[t-1])||void 0===i?void 0:i.type)&&void 0!==a?a:"none",l=null!==(n=null===(r=e[t+1])||void 0===r?void 0:r.type)&&void 0!==n?n:"none";let c=null!==(o=e[t].type)&&void 0!==o?o:"none";return"first"===c?"none":"textord"===c?"mord":("mbin"===c&&(/first|none|mrel|mpunct|mopen|mbin|mop/.test(s)||/none|mrel|mpunct|mclose/.test(l))&&(c="mord"),c)}function z(t){return t?e(t)?t.reduce((e,t)=>Math.max(e,t.height),0):t.height:0}function L(t){return t?e(t)?t.reduce((e,t)=>Math.max(e,t.depth),0):t.depth:0}function A(t){return t?e(t)?t[t.length-1].italic:t.italic:0}function q(t,i="",a=""){if(e(t)){const e=t.filter(e=>Boolean(e));return 1===e.length?new M(e[0],i,a):new M(e,i,a)}return new M(t,i,a)}function $(e,t,i="",a=""){const r=new M(t,i,a),o=n(t,e);return r.height=o.height,r.depth=o.depth,r.skew=o.skew,r.italic=o.italic,r.setRight(r.italic),r}function C(t,i="",a=""){const r=q("","ML__strut");let n,o;return r.setStyle("height",z(t),"em"),0!==L(t)&&(n=q("","ML__strut--bottom"),n.setStyle("height",z(t)+L(t),"em"),n.setStyle("vertical-align",-L(t),"em")),o=e(t)?[r,n,...t]:[r,n,t],q(o,i,a)}function D(e,t,i,a,r){r=r||"";const n=T(t,(r+=" style-wrap ")+i.adjustTo(a));n.type=e;const o=a.sizeMultiplier/i.sizeMultiplier;return n.height*=o,n.depth*=o,n.maxFontSize=a.sizeMultiplier,n}function T(e,t="",i=""){const a=new M(e,t,i);let r=1;return r=e instanceof M?e.maxFontSize:e.reduce((e,t)=>Math.max(e,t.maxFontSize),r),a.height*=r,a.depth*=r,a}function E(t,i,a="shift",r=0){let n=0,o=0;a=a||"shift";for(let t=0;t0?"em":""),a.attributes={"aria-hidden":"true"}),"size5"!==e.size?new M(a,"fontsize-ensurer reset-"+e.size+" size5"):0!==i?a:null}(t,s),c=[];o=n;for(const e of i)if("number"==typeof e)o+=e;else if(e instanceof M){const t=q([l,e]);t.setTop(-e.depth-o),c.push(t),o+=e.height+e.depth}const d=q(c,"vlist");return d.depth=Math.max(n,L(d)||0),d.height=Math.max(-o,z(d)||0),d}function K(e){const t=new M(null);return t.svgBody=e,t.height=function(e){return m[e]?m[e][2]/1e3:p[e][2]}(e)/2,t.depth=t.height,t}const N={},O={"<":"<",">":">",o:"o","&":"\\&","{":"\\{","}":"\\}","[":"\\lbrack","]":"\\rbrack",":":"\\colon"," ":"~","¬":"\\neg","·":"\\cdot","¼":"\\frac{1}{4}","½":"\\frac{1}{2}","¾":"\\frac{3}{4}","⁰":"^{0}","ⁱ":"^{i}","¹":"^{1}","²":"^{2}","³":"^{3}","†":"\\dagger","‡":"\\ddagger","…":"\\ldots","⁴":"^{4}","⁵":"^{5}","⁶":"^{6}","⁷":"^{7}","⁸":"^{8}","⁹":"^{9}","⁺":"^{+}","⁻":"^{-}","⁼":"^{=}","ⁿ":"^{n}","₀":"_{0}","₁":"_{1}","₂":"_{2}","₃":"_{3}","₄":"_{4}","₅":"_{5}","₆":"_{6}","₇":"_{7}","₈":"_{8}","₉":"_{9}","₊":"_{+}","₋":"_{-}","₌":"_{=}","ₐ":"_{a}","ₑ":"_{e}","ₒ":"_{o}","ₓ":"_{x}","′":"\\prime","'":"\\prime","←":"\\gets","→":"\\to","△":"\\triangle","▽":"\\triangledown","∋":"\\owns","∗":"\\ast","∣":"\\vert","∥":"\\Vert","∧":"\\land","∨":"\\lor","⋅":"\\cdot","⋈":"\\bowtie","≠":"\\ne","≤":"\\le","≥":"\\ge","⊥":"\\bot","⟷":"\\biconditional","⟸":"\\impliedby","⟹":"\\implies","ℂ":"\\C","ℕ":"\\N","ℙ":"\\P","ℚ":"\\Q","ℝ":"\\R","ℤ":"\\Z"},B={},F={},P={iff:"\\;⟺\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",bra:"\\mathinner{\\langle{#1}|}",ket:"\\mathinner{|{#1}\\rangle}",braket:"\\mathinner{\\langle{#1}\\rangle}",set:"\\mathinner{\\lbrace #1 \\rbrace}",Bra:"\\left\\langle #1\\right|",Ket:"\\left|#1\\right\\rangle",Braket:"\\left\\langle{#1}\\right\\rangle",Set:"\\left\\lbrace #1 \\right\\rbrace",rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}"},R={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},I={"\\#":"#","\\&":"&","\\$":"$","\\%":"%","\\_":"_","\\euro":"€","\\maltese":"✠","\\{":"{","\\}":"}","\\nobreakspace":" ","\\ldots":"…","\\textellipsis":"…","\\backslash":"\\","`":"‘","'":"’","``":"“","''":"”","\\degree":"°","\\textasciicircum":"^","\\textasciitilde":"~","\\textasteriskcentered":"*","\\textbackslash":"\\","\\textbraceleft":"{","\\textbraceright":"}","\\textbullet":"•","\\textdollar":"$","\\textsterling":"£","\\textdagger":"†","\\textdaggerdbl":"‡","–":"–","—":"—","‘":"‘","’":"’","“":"“","”":"”",'"':"”","\\ss":"ß","\\ae":"æ","\\oe":"œ","\\AE":"Æ","\\OE":"Œ","\\O":"Ø","\\i":"ı","\\j":"ȷ","\\aa":"å","\\AA":"Å"},H=/[a-zA-Z0-9!@*()-=+{}[\]\\';:?/.,~<>`|'$%#&^_" ]/,W="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("\\p{Letter}","u"),V="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[0-9a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("[0-9\\p{Letter}]","u");function U(e,t,i="mord",a=""){N[e]={type:i,variant:a,value:t},O[t]||a||(O[t]=e),I[e]=t}function j(e,t){for(let i=e;i<=t;i++){const e=String.fromCodePoint(i);U(e,e)}}function G(e,t){return"math"===e?O[t]||t:"text"===e&&Object.keys(I).find(e=>I[e]===t)||t}const X={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},Z=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Y(e,t,i){if(!/[A-Za-z0-9]/.test(e))return e;if(!t&&!i)return e;const a=e.codePointAt(0);for(let e=0;e=Z[e].offset&&a120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const i in X)if(Object.prototype.hasOwnProperty.call(X,i)&&X[i]===e){e=null!==(t=i.codePointAt(0))&&void 0!==t?t:0;break}for(let t=0;t=Z[t].start&&e=1;)a.params.push({isOptional:!1,type:"math"}),r-=1}}}else"math"===t?a=N[e]:I[e]&&(a={value:I[e]});return!a||"mord"!==a.type||"f"!==a.value&&"g"!==a.value&&"h"!==a.value||(a.isFunction=!0),a}function re(e){if(e.length<=1)return[];const t=[];for(const i in B)Object.prototype.hasOwnProperty.call(B,i)&&i.startsWith(e)&&!B[i].infix&&t.push({match:i,frequency:B[i].frequency});for(const i in N)Object.prototype.hasOwnProperty.call(N,i)&&i.startsWith(e)&&t.push({match:i,frequency:N[i].frequency});return t.sort((e,t)=>e.frequency===t.frequency?e.match.length-t.match.length:(t.frequency||0)-(e.frequency||0)),t}function ne(e){let t="auto";const i=e.match(/:([^=]+)/);return i&&(t=i[1].trim()),t}function oe(e){if(!e)return[];let t=[],i=e.split("]");if("["===i[0].charAt(0)){t.push({isOptional:!0,type:ne(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(oe(i[e]))}else if(i=e.split("}"),"{"===i[0].charAt(0)){t.push({isOptional:!1,type:ne(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(oe(i[e]))}return t}function se(e){let t="",i=!0;return e.forEach(e=>{"string"==typeof e.body?t+=e.body:i=!1}),i?t:""}function le(e,t,i,a=!1){"string"==typeof e&&(e=[e]);const r={tabular:a,params:oe(t),parser:i};for(const t of e)F[t]=r}function ce(e,t,i){le(e,t,i,!0)}function de(e,t,i,a,r){"string"==typeof e&&(e=[e]),i||(i={});const n={params:oe(t),mode:i.mode,infix:Boolean(i.infix),parse:a,emit:r};e.forEach(e=>{B["\\"+e]=n})}const me={acute:"ˊ",grave:"ˋ",dot:"˙",ddot:"¨",mathring:"˚",tilde:"~",bar:"ˉ",breve:"˘",check:"ˇ",hat:"^",vec:"⃗"};de(Object.keys(me),"{body:auto}",null,(function(e,t){return{type:"accent",accent:me[e.slice(1)],limits:"accent",skipBoundary:!0,body:t[0]}})),de(["widehat","widecheck","widetilde"],"{body:auto}",null,(e,t)=>{const i=se(t[0]);return{type:"accent",svgAccent:e.slice(1)+(i.length>5?"4":["1","1","2","2","3","3"][i.length]),limits:"accent",skipBoundary:!0,body:t[0]}}),de("utilde","{body:auto}",null,(e,t)=>{const i=se(t[0]),a="widetilde"+(i.length>5?"4":["1","1","2","2","3","3"][i.length]);return{type:"overunder",body:t[0],svgBelow:a,skipBoundary:!0}},(e,t,i,a)=>`\\utilde{${a(i,i.body)}}`),de("^","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[t[0]]||"^"})),de("`","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[t[0]]||"`"})),de("'","{:string}",{},(function(e,t){return{type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[t[0]]||"^"}})),de("~","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[t[0]]||"´"})),de("c","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{c:"ç",C:"Ç"}[t[0]]||""})),de("enclose","{notation:string}[style:string]{body:auto}",null,(e,t)=>{const i={type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",captureSelection:!0,body:t[2]};if(t[1]){const e=t[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const t of e){const e=t.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(e)i.strokeWidth=s(e[1],"px"),isFinite(i.strokeWidth)||(i.strokeWidth=1),i.strokeStyle=e[2],i.strokeColor=e[3];else{const e=t.match(/\s*([a-z]*)\s*=\s*"(.*)"/);e&&("mathbackground"===e[1]?i.backgroundcolor=e[2]:"mathcolor"===e[1]?i.strokeColor=e[2]:"padding"===e[1]?i.padding=s(e[2],"px"):"shadow"===e[1]&&(i.shadow=e[2]))}}"dashed"===i.strokeStyle?i.svgStrokeStyle="5,5":"dotted"===i.strokeStyle&&(i.svgStrokeStyle="1,5")}return i.borderStyle=i.strokeWidth+"px "+i.strokeStyle+" "+i.strokeColor,i.notation={},t[0].split(/[, ]/).filter(e=>e.length>0).forEach(e=>{i.notation[e.toLowerCase()]=!0}),i.notation.updiagonalarrow&&(i.notation.updiagonalstrike=!1),i.notation.box&&(i.notation.left=!1,i.notation.right=!1,i.notation.bottom=!1,i.notation.top=!1),i}),de("cancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0},body:t[0]}})),de("bcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{downdiagonalstrike:!0},body:t[0]}})),de("xcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0,downdiagonalstrike:!0},body:t[0]}})),le("math","",()=>({mathstyle:"textstyle"})),le("displaymath","",(function(){return{mathstyle:"displaystyle"}})),ce("array","{columns:colspec}",(e,t)=>({colFormat:t[0],mathstyle:"textstyle"})),ce(["equation","equation","subequations"],"",()=>({colFormat:[{align:"c"}]})),ce("multline","",(function(){return{colFormat:[{align:"m"}]}})),ce(["align","align*","aligned","eqnarray"],"",(e,t,i)=>{let a=0;for(const e of i)a=Math.max(a,e.length);const r=[{gap:0},{align:"r"},{gap:0},{align:"l"}];let n=2;for(;n({colFormat:[{align:"r"},{align:"l"}]})),ce(["gather","gathered"],"",()=>({colFormat:[{gap:.25},{align:"c"},{gap:0}],jot:.3})),ce(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","smallmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*","smallmatrix*"],"[columns:colspec]",(e,t)=>{var i;const a={mathstyle:"textstyle"};switch(e){case"pmatrix":case"pmatrix*":a.leftDelim="(",a.rightDelim=")";break;case"bmatrix":case"bmatrix*":a.leftDelim="[",a.rightDelim="]";break;case"Bmatrix":case"Bmatrix*":a.leftDelim="\\lbrace",a.rightDelim="\\rbrace";break;case"vmatrix":case"vmatrix*":a.leftDelim="\\vert",a.rightDelim="\\vert";break;case"Vmatrix":case"Vmatrix*":a.leftDelim="\\Vert",a.rightDelim="\\Vert";break;case"smallmatrix":case"smallmatrix*":a.mathstyle="scriptstyle";break;case"matrix":case"matrix*":a.leftDelim=".",a.rightDelim="."}return a.colFormat=null!==(i=t[0])&&void 0!==i?i:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}],a}),ce("cases","",()=>({arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",colFormat:[{align:"l"},{gap:1},{align:"l"}]})),le("center","",(function(){return{colFormat:[{align:"c"}]}})),de(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overbrace","overlinesegment","overgroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgAbove:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),de(["underrightarrow","underleftarrow","underleftrightarrow","underbrace","underlinesegment","undergroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgBelow:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),de(["xrightarrow","xleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","xLeftrightarrow","xrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xrightleftarrows","xrightequilibrium","xleftequilibrium"],"[:auto]{:auto}",null,(e,t)=>{let i=t[1];return 0===(null==i?void 0:i.length)&&(i=null),{type:"overunder",mathtype:"mrel",svgBody:e.slice(1),overscript:i,underscript:t[0],skipBoundary:!0}},(e,t,i,a)=>e+(void 0!==i.underscript?`[${a(i,i.underscript)}]`:"")+`{${a(i,i.overscript)}}`),de(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","coth","ctg","cth","cotg","csc","cosec","deg","dim","exp","hom","inf","ker","lg","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main",variantStyle:"up"}})),de(["liminf","limsup"],"",null,e=>({type:"mop",limits:"limits",isSymbol:!1,body:{"\\liminf":"lim inf","\\limsup":"lim sup"}[e],variant:"main"})),de(["lim","mod"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,body:e.slice(1),variant:"main"}})),de(["det","max","min"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main"}})),de("sqrt","[index:auto]{radicand:auto}",null,(e,t)=>({type:"surd",body:t[1],index:t[0]}),(e,t,i,a)=>{let r="";return void 0!==i.index&&(r+=`[${a(i,i.index)}]`),r+=`{${a(i,i.body)}}`,e+r}),de(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{numerator}{denominator}",null,(e,t)=>{const i={type:"genfrac",numer:t[0],denom:t[1],mathstyle:"auto"};switch(e){case"\\dfrac":case"\\frac":case"\\tfrac":case"\\cfrac":i.hasBarLine=!0;break;case"\\\\atopfrac":i.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i.hasBarLine=!1,i.leftDelim="(",i.rightDelim=")"}switch(e){case"\\dfrac":case"\\dbinom":i.mathstyle="displaystyle";break;case"\\tfrac":case"\\tbinom":i.mathstyle="textstyle"}return"\\cfrac"===e&&(i.continuousFraction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),de(["over","atop","choose"],"",{infix:!0},(e,t)=>{const i=t[0],a=t[1];let r=!1,n=null,o=null;switch(e){case"\\atop":break;case"\\over":r=!0;break;case"\\choose":r=!1,n="(",o=")";break;default:throw new Error("Unrecognized genfrac command")}return{type:"genfrac",numer:i,denom:a,hasBarLine:r,leftDelim:n,rightDelim:o,mathstyle:"auto"}},(e,t,i,a)=>`{${a(i,i.numer)}${e} ${a(i,i.denom)}}`),de("pdiff","{numerator}{denominator}",null,(e,t)=>({type:"genfrac",numer:t[0],denom:t[1],numerPrefix:"∂",denomPrefix:"∂",hasBarLine:!0,leftDelim:null,rightDelim:null,mathstyle:"auto"}),(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),de(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","smallint","intop"],"",null,e=>({type:"mop",limits:"auto",isSymbol:!0,variant:"main",body:{coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[e.slice(1)]}));const pe={int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑",sqcup:"⊔",sqcap:"⊓",uplus:"⊎",wr:"≀",amalg:"⨿",Cap:"⋒",Cup:"⋓",doublecap:"⋒",doublecup:"⋓"};de(Object.keys(pe),"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!0,body:pe[e.slice(1)],variant:{"⋒":"ams","⋓":"ams"}[pe[e.slice(1)]]}})),de(["Re","Im"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:{"\\Re":"ℜ","\\Im":"ℑ"}[e],variant:"fraktur"}})),de("middle","{:delim}",null,(function(e,t){return{type:"delim",delim:t[0]}}));const ue={m0:"#3f3d99",m1:"#993d71",m2:"#998b3d",m3:"#3d9956",m4:"#3d5a99",m5:"#993d90",m6:"#996d3d",m7:"#43993d",m8:"#3d7999",m9:"#843d99"},he=["#d35d60","#7293cb","#e1974d","#84bb5d","#9066a7","#aD6a58","#f5a4ce","#fff590","#212121","#818787","#d4d5d2","#ffffff"],fe=["#cc2428","#3769b1","#da7e30","#409852","#6b4c9a","#922426","#e7298a","#ffe907","#000000","#525055","#adafaa","#ffffff"],ge={apricot:"#FBB982",aquamarine:"#00B5BE",bittersweet:"#C04F17",black:"#221E1F",blue:"#2D2F92",bluegreen:"#00B3B8",blueviolet:"#473992",brickred:"#B6321C",brown:"#792500",burntorange:"#F7921D",cadetblue:"#74729A",carnationpink:"#F282B4",cerulean:"#00A2E3",cornflowerblue:"#41B0E4",cyan:"#00AEEF",dandelion:"#FDBC42",darkorchid:"#A4538A",emerald:"#00A99D",forestgreen:"#009B55",fuchsia:"#8C368C",goldenrod:"#FFDF42",gray:"#949698",green:"#00A64F",greenyellow:"#DFE674",junglegreen:"#00A99A",lavender:"#F49EC4",limegreen:"#8DC73E",magenta:"#EC008C",mahogany:"#A9341F",maroon:"#AF3235",melon:"#F89E7B",midnightblue:"#006795",mulberry:"#A93C93",navyblue:"#006EB8",olivegreen:"#3C8031",orange:"#F58137",orangered:"#ED135A",orchid:"#AF72B0",peach:"#F7965A",periwinkle:"#7977B8",pinegreen:"#008B72",plum:"#92268F",processblue:"#00B0F0",purple:"#99479B",rawsienna:"#974006",red:"#ED1B23",redorange:"#F26035",redviolet:"#A1246B",rhodamine:"#EF559F",royalblue:"#0071BC",royalpurple:"#613F99",rubinered:"#ED017D",salmon:"#F69289",seagreen:"#3FBC9D",sepia:"#671800",skyblue:"#46C5DD",springgreen:"#C6DC67",tan:"#DA9D76",tealblue:"#00AEB3",thistle:"#D883B7",turquoise:"#00B4CE",violet:"#58429B",violetred:"#EF58A0",white:"#FFFFFF",wildstrawberry:"#EE2967",yellow:"#FFF200",yellowgreen:"#98CC70",yelloworange:"#FAA21A"};function ye(e){var t;const i=e.toLowerCase().split("!");let a,r,n,o=255,s=255,l=255,c=-1;const d=i.length>0&&"-"===i[0].charAt(0);d&&(i[0]=i[0].slice(1));for(let e=0;e=0&&(o=(1-c)*o+c*a,s=(1-c)*s+c*r,l=(1-c)*l+c*n,c=-1),e+1=0&&(o=c*o+(1-c)*a,s=c*s+(1-c)*r,l=c*l+(1-c)*n),d&&(o=255-o,s=255-s,l=255-l),"#"+("00"+Math.round(o).toString(16)).slice(-2)+("00"+Math.round(s).toString(16)).slice(-2)+("00"+Math.round(l).toString(16)).slice(-2)}function be(e){let t=e.toUpperCase();for(const e in ge)if(ge[e]===t){t=e;break}for(const e in ue)if(ue[e]===t){t=e;break}return t}de("ensuremath","{:math}",{},(e,t)=>({type:"group",mode:"math",body:t[0],skipBoundary:!0,latexOpen:"\\ensuremath{",latexClose:"}"}),(e,t,i,a)=>a(i,i.body)),de("color","{:color}",{},(e,t)=>({color:t[0]})),de("textcolor","{:color}{content:auto*}",{},(e,t)=>({color:t[0]})),de("boxed","{content:math}",null,(e,t)=>({type:"box",framecolor:"black",skipBoundary:!0,body:t[0]})),de("colorbox","{background-color:string}{content:auto}",{},(e,t)=>({type:"box",backgroundcolor:ye(t[0]),skipBoundary:!0,body:t[1],verbatimBackgroundcolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimBackgroundcolor||be(i.backgroundcolor)}}{${a(i,i.body)}}`),de("fcolorbox","{frame-color:string}{background-color:string}{content:auto}",{},(e,t)=>({type:"box",framecolor:ye(t[0]),backgroundcolor:ye(t[1]),skipBoundary:!0,body:t[2],verbatimBackgroundcolor:t[1],verbatimFramecolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimFramecolor||be(i.framecolor)}{${i.verbatimBackgroundcolor||be(i.backgroundcolor)}}{${a(i,i.body)}}`),de("bbox","[:bbox]{body:auto}",{},(e,t)=>{if(t[0]){const e=t[0];return{type:"box",padding:e.padding,border:e.border,backgroundcolor:e.backgroundcolor,skipBoundary:!0,body:t[1]}}return{type:"box",skipBoundary:!0,body:t[1]}},(e,t,i,a)=>{let r=e;if(isFinite(i.padding)||void 0!==i.border||void 0!==i.backgroundcolor){const e=[];isFinite(i.padding)&&e.push(Math.floor(100*i.padding)/100+"em"),i.border&&e.push("border:"+i.border),i.backgroundcolor&&e.push(be(i.backgroundcolor)),r+=`[${e.join(",")}]`}return r+`{${a(i,i.body)}}`}),de(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"",{},(e,t)=>({mathstyle:e.slice(1)})),de(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{mode:"text"},(e,t)=>({fontSize:{tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[e.slice(1)]})),de("fontseries","{:string}",{mode:"text"},(e,t)=>({fontSeries:t[0]})),de("fontshape","{:string}",{mode:"text"},(e,t)=>({fontShape:t[0]})),de("fontfamily","{:string}",{mode:"text"},(e,t)=>({fontFamily:t[0]})),de("selectfont","",{mode:"text"},(e,t)=>({})),de("bf","",{},(e,t)=>({fontSeries:"b",fontShape:"n",fontFamily:"cmr"})),de(["boldsymbol","bm"],"{:math*}",{},(e,t)=>({mode:"math",cssClass:"ML__boldsymbol"})),de("bold","{:math*}",{},(e,t)=>({mode:"math",variantStyle:"bold"})),de("bfseries","",{mode:"text"},(e,t)=>({fontSeries:"b"})),de("mdseries","",{mode:"text"},(e,t)=>({fontSeries:"m"})),de("upshape","",{mode:"text"},(e,t)=>({fontShape:"n"})),de("slshape","",{mode:"text"},(e,t)=>({fontShape:"sl"})),de("scshape","",{mode:"text"},(e,t)=>({fontShape:"sc"})),de("textbf","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"b"})),de("textmd","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"m"})),de("textup","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n"})),de("textnormal","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n",fontSeries:"m"})),de("textsl","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sl"})),de("textit","{:text*}",{},(e,t)=>({mode:"text",fontShape:"it"})),de("textsc","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sc"})),de("textrm","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"roman"})),de("textsf","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"sans-serif"})),de("texttt","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"monospace"})),de("mathbf","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bold"})),de("mathit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"italic"})),de("mathbfit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bolditalic"})),de("mathrm","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"up"})),de("mathsf","{:math*}",{},(e,t)=>({mode:"math",variant:"sans-serif",variantStyle:"up"})),de("mathtt","{:math*}",{},(e,t)=>({mode:"math",variant:"monospace",variantStyle:"up"})),de("it","",{},(e,t)=>({fontSeries:"m",fontShape:"it",fontFamily:"cmr",variantStyle:"italic"})),de("rmfamily","",{},(e,t)=>({fontFamily:"roman"})),de("sffamily","",{},(e,t)=>({fontFamily:"sans-serif"})),de("ttfamily","",{},(e,t)=>({fontFamily:"monospace"})),de(["Bbb","mathbb"],"{:math*}",{},(e,t)=>({variant:"double-struck",variantStyle:"up"})),de(["frak","mathfrak"],"{:math*}",{},(e,t)=>({variant:"fraktur",variantStyle:"up"})),de("mathcal","{:math*}",{},(e,t)=>({variant:"calligraphic",variantStyle:"up"})),de("mathscr","{:math*}",{},(e,t)=>({variant:"script",variantStyle:"up"})),de("mbox","{:text}",null,(e,t)=>({type:"group",mode:"math",body:t[0]})),de("text","{:text*}",null,(e,t)=>({mode:"text"})),de("class","{name:string}{content:auto*}",null,(e,t)=>({cssClass:t[0]})),de("cssId","{id:string}{content:auto}",null,(e,t)=>({type:"group",body:t[1],cssId:t[0]})),de("em","",null,(e,t)=>({cssClass:"ML__emph"})),de("emph","{:auto}",null,(e,t)=>({cssClass:"ML__emph",body:t[0],type:"group",skipBoundary:!0}));const ve={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};function xe(e,t,i,a,r,n=""){const o=D(e,$("Size"+i+"-Regular",ee("math",t),"delimsizing size"+i),r.mathstyle,c.textstyle,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}function ke(e,t){let i="";return"Size1-Regular"===t?i=" delim-size1":"Size4-Regular"===t&&(i=" delim-size4"),$(t,ee("math",e),"delimsizinginner"+i)}function _e(e,t,i,a,r,o=""){let s,l,d,m;s=d=m=ee("math",t),l=null;let p="Size1-Regular";"\\vert"===t||"\\lvert"===t||"\\rvert"===t||"\\mvert"===t||"\\mid"===t?d=s=m="∣":"\\Vert"===t||"\\lVert"===t||"\\rVert"===t||"\\mVert"===t||"\\|"===t?d=s=m="∥":"\\uparrow"===t?d=m="⏐":"\\Uparrow"===t?d=m="‖":"\\downarrow"===t?s=d="⏐":"\\Downarrow"===t?s=d="‖":"\\updownarrow"===t?(s="↑",d="⏐",m="↓"):"\\Updownarrow"===t?(s="⇑",d="‖",m="⇓"):"["===t||"\\lbrack"===t?(s="⎡",d="⎢",m="⎣",p="Size4-Regular"):"]"===t||"\\rbrack"===t?(s="⎤",d="⎥",m="⎦",p="Size4-Regular"):"\\lfloor"===t?(d=s="⎢",m="⎣",p="Size4-Regular"):"\\lceil"===t?(s="⎡",d=m="⎢",p="Size4-Regular"):"\\rfloor"===t?(d=s="⎥",m="⎦",p="Size4-Regular"):"\\rceil"===t?(s="⎤",d=m="⎥",p="Size4-Regular"):"("===t?(s="⎛",d="⎜",m="⎝",p="Size4-Regular"):")"===t?(s="⎞",d="⎟",m="⎠",p="Size4-Regular"):"\\{"===t||"\\lbrace"===t?(s="⎧",l="⎨",m="⎩",d="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",l="⎬",m="⎭",d="⎪",p="Size4-Regular"):"\\lgroup"===t?(s="⎧",m="⎩",d="⎪",p="Size4-Regular"):"\\rgroup"===t?(s="⎫",m="⎭",d="⎪",p="Size4-Regular"):"\\lmoustache"===t?(s="⎧",m="⎭",d="⎪",p="Size4-Regular"):"\\rmoustache"===t?(s="⎫",m="⎩",d="⎪",p="Size4-Regular"):"\\surd"===t?(s="",m="⎷",d="",p="Size4-Regular"):"\\ulcorner"===t?(s="┌",d=m=" "):"\\urcorner"===t?(s="┐",d=m=" "):"\\llcorner"===t?(m="└",d=s=" "):"\\lrcorner"===t&&(s="┘",d=s=" ");const u=n(ee("math",s),p),h=u.height+u.depth,f=n(ee("math",d),p),g=f.height+f.depth,y=n(ee("math",m),p),b=y.height+y.depth;let v=0,x=1;if(null!==l){const e=n(ee("math",l),p);v=e.height+e.depth,x=2}const k=h+b+v,_=Math.ceil((i-k)/(x*g)),w=k+_*x*g;let M=r.mathstyle.metrics.axisHeight;a&&(M*=r.mathstyle.sizeMultiplier);const S=w/2-M,z=[];if(z.push(ke(m,p)),null===l)for(let e=0;e<_;e++)z.push(ke(d,p));else{for(let e=0;e<_;e++)z.push(ke(d,p));z.push(ke(l,p));for(let e=0;e<_;e++)z.push(ke(d,p))}z.push(ke(s,p));const L=E(r,z,"bottom",S);return L.setStyle("color",r.color),"number"==typeof r.opacity&&L.setStyle("opacity",r.opacity),D(e,q(L,"delimsizing mult"),r.mathstyle,c.textstyle,o)}de(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",null,(function(e,t){return{type:"sizeddelim",size:ve[e].size,cls:ve[e].mclass,delim:t[0]}})),de(["hspace","hspace*"],"{width:skip}",{},(function(e,t){return{type:"spacing",width:t[0]||0}})),de(["mathop","mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",null,(e,t)=>{const i={type:{"\\mathop":"mop","\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e],body:t[0],captureSelection:!0};return"\\mathop"===e&&(i.limits="limits",i.isFunction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.body)}}`),de(["operatorname","operatorname*"],"{operator:math}",null,(function(e,t){const i={type:"mop",captureSelection:!0,body:t[0],isFunction:!0};return i.body.forEach(e=>{e.isFunction=!1,e.variant||e.variantStyle||(e.variant="main",e.variantStyle="up"),e.type="mord",e.body={"∗":"*","−":"-"}[e.body]||e.body}),"\\operatorname"===e?i.limits="nolimits":"\\operatorname*"===e&&(i.limits="limits"),i})),de("unicode","{charcode:number}",null,(e,t)=>{let i=parseInt(t[0]);return isFinite(i)||(i=10067),{type:"mord",body:String.fromCodePoint(i),codepoint:i}},(e,t,i,a)=>`${e}{"${("000000"+i.codepoint.toString(16)).toUpperCase().substr(-6)}}`),de("rule","[raise:dimen]{width:dimen}{thickness:dimen}",null,(function(e,t){return{type:"rule",shift:t[0],width:t[1],height:t[2]}})),de("overline","{:auto}",null,(e,t)=>({type:"line",position:"overline",skipBoundary:!0,body:t[0]})),de("underline","{:auto}",null,(e,t)=>({type:"line",position:"underline",skipBoundary:!0,body:t[0]})),de("overset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),de("underset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",underscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),de(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0},(function(e,t){return{type:"genfrac",numer:t[0],denom:t[1],hasBarLine:!1,leftDelim:t[2],rightDelim:t[3],mathstyle:"auto"}}),(e,t,i,a)=>`${a(i,i.numer)} ${e}${i.leftDelim}${i.rightDelim}${a(i,i.denom)}`),de(["stackrel","stackbin"],"{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1],mathtype:"\\stackrel"===e?"mrel":"mbin"}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),de(["phantom","vphantom","hphantom"],"{:auto*}",{},(e,t)=>({type:"phantom",captureSelection:!0,phantomType:e.slice(1),isPhantom:!0}),(e,t,i,a)=>e+"{"+a(i,i.body)+"}"),de("smash","[:string]{:auto}",null,(function(e,t){let i="smash";return"b"===t[0]?i="bsmash":"t"===t[0]&&(i="tsmash"),{type:"phantom",phantomType:i,skipBoundary:!0,body:t[1]}})),de("rlap","{:auto}",null,(function(e,t){return{type:"overlap",align:"right",skipBoundary:!0,body:t[0]}})),de("llap","{:auto}",null,(function(e,t){return{type:"overlap",align:"left",skipBoundary:!0,body:t[0]}})),de("mathrlap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"right",skipBoundary:!0,body:t[0]}})),de("mathllap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"left",skipBoundary:!0,body:t[0]}})),function(e){for(let e=0;e<"0123456789/@.?!".length;e++){const t="0123456789/@.?!".charAt(e);U(t,t)}}(),j(65,90),j(97,122),U("\\forall","∀"),U("\\exists","∃"),U("\\nexists","∄","mord","ams"),U("\\mid","∣","mrel"),U("\\top","⊤"),U("\\bot","⊥"),U("\\sharp","♯"),U("\\flat","♭"),U("\\natural","♮"),U("\\#","#"),U("\\&","&"),U("\\clubsuit","♣"),U("\\heartsuit","♡"),U("\\spadesuit","♠"),U("\\diamondsuit","♢"),U("\\differencedelta","∆","mrel"),U("\\backslash","\\"),U("\\nabla","∇"),U("\\partial","∂"),U("\\ell","ℓ"),U("\\hbar","ℏ"),U("\\hslash","ℏ","mord","ams"),U("\\Finv","Ⅎ","mord","ams"),U("\\Game","⅁","mord","ams"),U("\\wp","℘"),U("\\eth","ð","mord","ams"),U("\\mho","℧","mord","ams"),U("\\Bbbk","k","mord","ams"),U("\\N","N","mord","double-struck"),U("\\R","R","mord","double-struck"),U("\\Q","Q","mord","double-struck"),U("\\C","C","mord","double-struck"),U("\\Z","Z","mord","double-struck"),U("\\P","P","mord","double-struck"),U("\\pounds","£"),U("\\yen","¥","mord","ams"),U("\\euro","€"),U("\\dagger","†","mbin"),U("\\dag","†","mbin"),U("\\ddag","‡","mbin"),U("\\ddagger","‡","mbin"),U("\\maltese","✠","mord","ams"),U("\\rightarrow","→","mrel"),U("\\to","→","mrel"),U("\\leftarrow","←","mrel"),U("\\gets","←","mrel"),U("\\Rightarrow","⇒","mrel"),U("\\Leftarrow","⇐","mrel"),U("\\longrightarrow","⟶","mrel"),U("\\longleftarrow","⟵","mrel"),U("\\Longrightarrow","⟹","mrel"),U("\\implies","⟹","mrel"),U("\\Longleftarrow","⟸","mrel"),U("\\impliedby","⟸","mrel"),U("\\dashrightarrow","⇢","mrel","ams"),U("\\dashleftarrow","⇠","mrel","ams"),U("\\Rrightarrow","⇛","mrel","ams"),U("\\Lleftarrow","⇚","mrel","ams"),U("\\longleftrightarrow","⟷","mrel"),U("\\biconditional","⟷","mrel"),U("\\Longleftrightarrow","⟺","mrel"),U("\\leftrightarrows","⇆","mrel","ams"),U("\\rightleftarrows","⇄","mrel","ams"),U("\\mapsto","↦","mrel"),U("\\longmapsto","⟼","mrel"),U("\\uparrow","↑","mrel"),U("\\downarrow","↓","mrel"),U("\\Uparrow","⇑","mrel"),U("\\Downarrow","⇓","mrel"),U("\\updownarrow","↕","mrel"),U("\\Updownarrow","⇕","mrel"),U("\\curvearrowright","↷","mrel","ams"),U("\\curvearrowleft","↶","mrel","ams"),U("\\hookrightarrow","↪","mrel"),U("\\hookleftarrow","↩","mrel"),U("\\rightharpoonup","⇀","mrel"),U("\\leftharpoonup","↼","mrel"),U("\\rightharpoondown","⇁","mrel"),U("\\leftharpoondown","↽","mrel"),U("\\rightrightarrows","⇉","mrel","ams"),U("\\leftleftarrows","⇇","mrel","ams"),U("\\upuparrows","⇈","mrel","ams"),U("\\downdownarrows","⇊","mrel","ams"),U("\\leftarrowtail","↢","mrel","ams"),U("\\rightarrowtail","↣","mrel","ams"),U("\\looparrowright","↬","mrel","ams"),U("\\looparrowleft","↫","mrel","ams"),U("\\twoheadleftarrow","↞","mrel","ams"),U("\\twoheadrightarrow","↠","mrel","ams"),U("\\rightleftharpoons","⇌","mrel"),U("\\leftrightharpoons","⇋","mrel","ams"),U("\\Rsh","↱","mrel","ams"),U("\\Lsh","↰","mrel","ams"),U("\\searrow","↘","mrel"),U("\\nearrow","↗","mrel"),U("\\swarrow","↙","mrel"),U("\\nwarrow","↖","mrel"),U("\\circlearrowright","↻","mrel","ams"),U("\\circlearrowleft","↺","mrel","ams"),U("\\restriction","↾","mrel","ams"),U("\\upharpoonright","↾","mrel","ams"),U("\\upharpoonleft","↿","mrel","ams"),U("\\downharpoonright","⇂","mrel","ams"),U("\\downharpoonleft","⇃","mrel","ams"),U("\\rightsquigarrow","⇝","mrel","ams"),U("\\leadsto","⇝","mrel","ams"),U("\\leftrightsquigarrow","↭","mrel","ams"),U("\\originalof","⊶","mrel"),U("\\laplace","⊶","mrel"),U("\\imageof","⊷","mrel"),U("\\Laplace","⊷","mrel"),U("\\multimap","⊸","mrel","ams"),U("\\nrightarrow","↛","mrel","ams"),U("\\nleftarrow","↚","mrel","ams"),U("\\nRightarrow","⇏","mrel","ams"),U("\\nLeftarrow","⇍","mrel","ams"),U("\\nleftrightarrow","↮","mrel","ams"),U("\\nLeftrightarrow","⇎","mrel","ams"),U("\\nless","≮","mrel","ams"),U("\\nleqslant","","mrel","ams"),U("\\lneq","⪇","mrel","ams"),U("\\lneqq","≨","mrel","ams"),U("\\nleqq","","mrel","ams"),U("\\unlhd","⊴","mbin","ams"),U("\\unrhd","⊵","mbin","ams"),U("\\lvertneqq","","mrel","ams"),U("\\lnsim","⋦","mrel","ams"),U("\\lnapprox","⪉","mrel","ams"),U("\\nprec","⊀","mrel","ams"),U("\\npreceq","⋠","mrel","ams"),U("\\precnsim","⋨","mrel","ams"),U("\\precnapprox","⪹","mrel","ams"),U("\\nsim","≁","mrel","ams"),U("\\nshortmid","","mrel","ams"),U("\\nmid","∤","mrel","ams"),U("\\nvdash","⊬","mrel","ams"),U("\\nvDash","⊭","mrel","ams"),U("\\ngtr","≯","mrel","ams"),U("\\ngeqslant","","mrel","ams"),U("\\ngeqq","","mrel","ams"),U("\\gneq","⪈","mrel","ams"),U("\\gneqq","≩","mrel","ams"),U("\\gvertneqq","","mrel","ams"),U("\\gnsim","⋧","mrel","ams"),U("\\gnapprox","⪊","mrel","ams"),U("\\nsucc","⊁","mrel","ams"),U("\\nsucceq","⋡","mrel","ams"),U("\\succnsim","⋩","mrel","ams"),U("\\succnapprox","⪺","mrel","ams"),U("\\ncong","≆","mrel","ams"),U("\\nshortparallel","","mrel","ams"),U("\\nparallel","∦","mrel","ams"),U("\\nVDash","⊯","mrel","ams"),U("\\nsupseteqq","","mrel","ams"),U("\\supsetneq","⊋","mrel","ams"),U("\\varsupsetneq","","mrel","ams"),U("\\supsetneqq","⫌","mrel","ams"),U("\\varsupsetneqq","","mrel","ams"),U("\\nVdash","⊮","mrel","ams"),U("\\precneqq","⪵","mrel","ams"),U("\\succneqq","⪶","mrel","ams"),U("\\nsubseteqq","","mrel","ams"),U("\\checkmark","✓","mord","ams"),U("\\diagup","╱","mord","ams"),U("\\diagdown","╲","mord","ams"),U("\\measuredangle","∡","mord","ams"),U("\\sphericalangle","∢","mord","ams"),U("\\backprime","‵","mord","ams"),U("\\backdoubleprime","‶","mord","ams"),U("\\ast","∗","mbin"),U("\\star","⋆","mbin"),U("\\diamond","⋄","mbin"),U("\\Diamond","◊","mord","ams"),U("\\lozenge","◊","mord","ams"),U("\\blacklozenge","⧫","mord","ams"),U("\\bigstar","★","mord","ams"),U("\\aleph","ℵ"),U("\\beth","ℶ","mord","ams"),U("\\daleth","ℸ","mord","ams"),U("\\gimel","ℷ","mord","ams"),U("\\lbrace","{","mopen"),U("\\rbrace","}","mclose"),U("\\langle","⟨","mopen"),U("\\rangle","⟩","mclose"),U("\\lfloor","⌊","mopen"),U("\\rfloor","⌋","mclose"),U("\\lceil","⌈","mopen"),U("\\rceil","⌉","mclose"),U("\\vert","∣"),U("\\mvert","∣","mrel"),U("\\lvert","∣","mopen"),U("\\rvert","∣","mclose"),U("\\|","∥"),U("\\Vert","∥"),U("\\mVert","∥"),U("\\lVert","∥","mopen"),U("\\rVert","∥","mclose"),U("\\parallel","∥","mrel"),U("\\shortparallel","∥","mrel","ams"),U("\\lbrack","[","mopen"),U("\\rbrack","]","mclose"),U("\\{","{","mopen"),U("\\}","}","mclose"),U("(","(","mopen"),U(")",")","mclose"),U("[","[","mopen"),U("]","]","mclose"),U("\\ulcorner","┌","mopen","ams"),U("\\urcorner","┐","mclose","ams"),U("\\llcorner","└","mopen","ams"),U("\\lrcorner","┘","mclose","ams"),U("\\lgroup","⟮","mopen"),U("\\rgroup","⟯","mclose"),U("\\lmoustache","⎰","mopen"),U("\\rmoustache","⎱","mclose"),U("=","=","mrel"),U("\\ne","≠","mrel"),U("\\neq","≠","mrel"),U("<","<","mrel"),U("\\lt","<","mrel"),U(">",">","mrel"),U("\\gt",">","mrel"),U("\\le","≤","mrel"),U("\\leq","≤","mrel"),U("\\ge","≥","mrel"),U("\\geq","≥","mrel"),U("\\leqslant","⩽","mrel","ams"),U("\\geqslant","⩾","mrel","ams"),U("\\ll","≪","mrel"),U("\\gg","≫","mrel"),U("\\coloneq","≔","mrel"),U("\\measeq","≝","mrel"),U("\\eqdef","≞","mrel"),U("\\questeq","≟","mrel"),U(":",":","mrel"),U("\\cong","≅","mrel"),U("\\equiv","≡","mrel"),U("\\prec","≺","mrel"),U("\\preceq","⪯","mrel"),U("\\succ","≻","mrel"),U("\\succeq","⪰","mrel"),U("\\perp","⊥","mrel"),U("\\propto","∝","mrel"),U("\\Colon","∷","mrel"),U("\\smile","⌣","mrel"),U("\\frown","⌢","mrel"),U("\\sim","∼","mrel"),U("\\gtrsim","≳","mrel","ams"),U("\\approx","≈","mrel"),U("\\approxeq","≊","mrel","ams"),U("\\thickapprox","≈","mrel","ams"),U("\\lessapprox","⪅","mrel","ams"),U("\\gtrapprox","⪆","mrel","ams"),U("\\precapprox","⪷","mrel","ams"),U("\\succapprox","⪸","mrel","ams"),U("\\thicksim","∼","mrel","ams"),U("\\succsim","≿","mrel","ams"),U("\\precsim","≾","mrel","ams"),U("\\backsim","∽","mrel","ams"),U("\\eqsim","≂","mrel","ams"),U("\\backsimeq","⋍","mrel","ams"),U("\\simeq","≃","mrel"),U("\\lesssim","≲","mrel","ams"),U("\\nleq","≰","mrel","ams"),U("\\ngeq","≱","mrel","ams"),U("\\smallsmile","⌣","mrel","ams"),U("\\smallfrown","⌢","mrel","ams"),U("\\bowtie","⋈","mrel"),U("\\Join","⋈","mrel"),U("\\asymp","≍","mrel"),U("\\sqsubseteq","⊑","mrel"),U("\\sqsupseteq","⊒","mrel"),U("\\leqq","≦","mrel","ams"),U("\\eqslantless","⪕","mrel","ams"),U("\\lll","⋘","mrel","ams"),U("\\lessgtr","≶","mrel","ams"),U("\\lesseqgtr","⋚","mrel","ams"),U("\\lesseqqgtr","⪋","mrel","ams"),U("\\risingdotseq","≓","mrel","ams"),U("\\fallingdotseq","≒","mrel","ams"),U("\\subseteqq","⫅","mrel","ams"),U("\\Subset","⋐","mrel","ams"),U("\\sqsubset","⊏","mrel","ams"),U("\\preccurlyeq","≼","mrel","ams"),U("\\curlyeqprec","⋞","mrel","ams"),U("\\vDash","⊨","mrel","ams"),U("\\Vvdash","⊪","mrel","ams"),U("\\bumpeq","≏","mrel","ams"),U("\\Bumpeq","≎","mrel","ams"),U("\\geqq","≧","mrel","ams"),U("\\eqslantgtr","⪖","mrel","ams"),U("\\ggg","⋙","mrel","ams"),U("\\gtrless","≷","mrel","ams"),U("\\gtreqless","⋛","mrel","ams"),U("\\gtreqqless","⪌","mrel","ams"),U("\\supseteqq","⫆","mrel","ams"),U("\\Supset","⋑","mrel","ams"),U("\\sqsupset","⊐","mrel","ams"),U("\\succcurlyeq","≽","mrel","ams"),U("\\curlyeqsucc","⋟","mrel","ams"),U("\\Vdash","⊩","mrel","ams"),U("\\shortmid","∣","mrel","ams"),U("\\between","≬","mrel","ams"),U("\\pitchfork","⋔","mrel","ams"),U("\\varpropto","∝","mrel","ams"),U("\\backepsilon","∍","mrel","ams"),U("\\llless","⋘","mrel","ams"),U("\\gggtr","⋙","mrel","ams"),U("\\lhd","⊲","mbin","ams"),U("\\rhd","⊳","mbin","ams"),U("\\doteq","≐","mrel"),U("\\doteqdot","≑","mrel","ams"),U("\\Doteq","≑","mrel","ams"),U("\\eqcirc","≖","mrel","ams"),U("\\circeq","≗","mrel","ams"),U("\\lessdot","⋖","mbin","ams"),U("\\gtrdot","⋗","mbin","ams"),U("\\~","~","mrel"),U("\\leftrightarrow","↔","mrel"),U("\\Leftrightarrow","⇔","mrel"),U("\\models","⊨","mrel"),U("\\vdash","⊢","mrel"),U("\\therefore","∴","mrel","ams"),U("\\because","∵","mrel","ams"),U("\\dashv","⊣","mrel"),U("\\roundimplies","⥰","mrel"),U("+","+","mbin"),U("-","−","mbin"),U("−","−","mbin"),U("\\pm","±","mbin"),U("\\mp","∓","mbin"),U("*","∗","mbin"),U("\\times","×","mbin"),U("\\div","÷","mbin"),U("\\surd","√"),U("\\divides","∣","mbin"),U("\\ltimes","⋉","mbin","ams"),U("\\rtimes","⋊","mbin","ams"),U("\\leftthreetimes","⋋","mbin","ams"),U("\\rightthreetimes","⋌","mbin","ams"),U("\\intercal","⊺","mbin","ams"),U("\\dotplus","∔","mbin","ams"),U("\\doublebarwedge","⩞","mbin","ams"),U("\\divideontimes","⋇","mbin","ams"),U("\\centerdot","⋅","mbin","ams"),U("\\cdot","⋅","mbin"),U("\\infty","∞"),U("\\prime","′"),U("\\doubleprime","″"),U("\\angle","∠"),U("`","‘"),U("\\$","$"),U("\\%","%"),U("\\_","_"),U("\\alpha","α"),U("\\beta","β"),U("\\gamma","γ"),U("\\delta","δ"),U("\\epsilon","ϵ"),U("\\varepsilon","ε"),U("\\zeta","ζ"),U("\\eta","η"),U("\\theta","θ"),U("\\vartheta","ϑ"),U("\\iota","ι"),U("\\kappa","κ"),U("\\varkappa","ϰ","mord","ams"),U("\\lambda","λ"),U("\\mu","μ"),U("\\nu","ν"),U("\\xi","ξ"),U("\\omicron","o"),U("\\pi","π"),U("\\varpi","ϖ"),U("\\rho","ρ"),U("\\varrho","ϱ"),U("\\sigma","σ"),U("\\varsigma","ς"),U("\\tau","τ"),U("\\phi","ϕ"),U("\\varphi","φ"),U("\\upsilon","υ"),U("\\chi","χ"),U("\\psi","ψ"),U("\\omega","ω"),U("\\Gamma","Γ"),U("\\Delta","Δ"),U("\\Theta","Θ"),U("\\Lambda","Λ"),U("\\Xi","Ξ"),U("\\Pi","Π"),U("\\Sigma","Σ"),U("\\Upsilon","Υ"),U("\\Phi","Φ"),U("\\Psi","Ψ"),U("\\Omega","Ω"),U("\\digamma","ϝ","mord","ams"),U("\\emptyset","∅"),U("\\varnothing","∅","mord","ams"),U("\\cap","∩","mbin"),U("\\cup","∪","mbin"),U("\\setminus","∖","mbin"),U("\\smallsetminus","∖","mbin","ams"),U("\\complement","∁","mord","ams"),U("\\in","∈","mrel"),U("\\notin","∉","mrel"),U("\\not","̸","mrel"),U("\\ni","∋","mrel"),U("\\owns","∋","mrel"),U("\\subset","⊂","mrel"),U("\\supset","⊃","mrel"),U("\\subseteq","⊆","mrel"),U("\\supseteq","⊇","mrel"),U("\\subsetneq","⊊","mrel","ams"),U("\\varsubsetneq","","mrel","ams"),U("\\subsetneqq","⫋","mrel","ams"),U("\\varsubsetneqq","","mrel","ams"),U("\\nsubset","⊄","mrel","ams"),U("\\nsupset","⊅","mrel","ams"),U("\\nsubseteq","⊈","mrel","ams"),U("\\nsupseteq","⊉","mrel","ams"),U("\\ "," ","spacing"),U("~"," ","spacing"),U("\\space"," ","spacing"),U("\\!",null,"spacing"),U("\\,",null,"spacing"),U("\\:",null,"spacing"),U("\\;",null,"spacing"),U("\\enskip",null,"spacing"),U("\\enspace",null,"spacing"),U("\\quad",null,"spacing"),U("\\qquad",null,"spacing"),U("\\colon",":","mpunct"),U("\\cdotp","⋅","mpunct"),U("\\cdots","⋯","minner"),U("\\ddots","⋱","minner"),U("\\ldots","…","minner"),U("\\mathellipsis","…","minner"),U("\\vdots","⋮"),U("\\ldotp",".","mpunct"),U(",",",","mpunct"),U(";",";","mpunct"),U("\\land","∧","mbin"),U("\\wedge","∧","mbin"),U("\\lor","∨","mbin"),U("\\vee","∨","mbin"),U("\\lnot","¬"),U("\\neg","¬"),U("\\barwedge","⊼","mbin","ams"),U("\\veebar","⊻","mbin","ams"),U("\\nor","⊻","mbin","ams"),U("\\curlywedge","⋏","mbin","ams"),U("\\curlyvee","⋎","mbin","ams"),U("\\square","□","mord","ams"),U("\\Box","□","mord","ams"),U("\\blacksquare","■","mord","ams"),U("\\boxminus","⊟","mbin","ams"),U("\\boxplus","⊞","mbin","ams"),U("\\boxtimes","⊠","mbin","ams"),U("\\boxdot","⊡","mbin","ams"),U("\\circ","∘","mbin"),U("\\bigcirc","◯","mbin"),U("\\bullet","∙","mbin"),U("\\circleddash","⊝","mbin","ams"),U("\\circledast","⊛","mbin","ams"),U("\\oplus","⊕","mbin"),U("\\ominus","⊖","mbin"),U("\\otimes","⊗","mbin"),U("\\odot","⊙","mbin"),U("\\circledcirc","⊚","mbin","ams"),U("\\oslash","⊘","mbin"),U("\\circledS","Ⓢ","mord","ams"),U("\\circledR","®","mord","ams"),U("\\triangle","△"),U("\\bigtriangleup","△","mbin"),U("\\vartriangle","△","mrel","ams"),U("\\triangleq","≜","mrel","ams"),U("\\triangledown","▽","mord","ams"),U("\\bigtriangledown","▽","mbin"),U("\\triangleleft","◃","mbin"),U("\\vartriangleleft","⊲","mrel","ams"),U("\\trianglelefteq","⊴","mrel","ams"),U("\\ntriangleleft","⋪","mrel","ams"),U("\\ntrianglelefteq","⋬","mrel","ams"),U("\\triangleright","▹","mbin"),U("\\vartriangleright","⊳","mrel","ams"),U("\\trianglerighteq","⊵","mrel","ams"),U("\\ntriangleright","⋫","mrel","ams"),U("\\ntrianglerighteq","⋭","mrel","ams"),U("\\blacktriangle","▲","mord","ams"),U("\\blacktriangledown","▼","mord","ams"),U("\\blacktriangleleft","◀","mrel","ams"),U("\\blacktriangleright","▶","mrel","ams"),U("\\/","/"),U("|","∣","textord"),U("\\And","&","mbin"),U("\\imath","ı"),U("\\jmath","ȷ"),U("\\degree","°"),U("'","′"),U('"',"”");const we=["(",")","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd"],Me=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],Se=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ze=[0,1.2,1.8,2.4,3],Le=[{type:"small",mathstyle:c.scriptscriptstyle},{type:"small",mathstyle:c.scriptstyle},{type:"small",mathstyle:c.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ae=[{type:"small",mathstyle:c.scriptscriptstyle},{type:"small",mathstyle:c.scriptstyle},{type:"small",mathstyle:c.textstyle},{type:"stack"}],qe=[{type:"small",mathstyle:c.scriptscriptstyle},{type:"small",mathstyle:c.scriptstyle},{type:"small",mathstyle:c.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function $e(e,t,i,a,r,o=""){if(!t||0===t.length||"."===t)return De(e,r,e);let s;"<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),s=Se.includes(t)?Le:we.includes(t)?qe:Ae;const l=function(e,t,i,a){for(let o=Math.min(2,3-a.mathstyle.size);ot)return i[o]}var r;return i[i.length-1]}(ee("math",t),i,s,r);return"small"===l.type?function(e,t,i,a,r,n=""){const o=D(e,$("Main-Regular",ee("math",t)),r.mathstyle,i,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier/i.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}(e,t,l.mathstyle,a,r,"ML__small-delim "+o):"large"===l.type?xe(e,t,l.size,a,r,o):_e(e,t,i,a,r,o)}function Ce(e,t,i,a,r,n=""){if("."===t)return De(e,r,n);const o=r.mathstyle.metrics.axisHeight*r.mathstyle.sizeMultiplier,s=Math.max(i-o,a+o);return $e(e,t,Math.max(s/500*901,2*s-.5),!0,r,n)}function De(e,t,i){return q("","sizing"+t.mathstyle.adjustTo(c.textstyle)+" nulldelimiter "+(i||""),e)}const Te={},Ee={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49};function Ke(e,t){Te[e]={decompose:t}}function Ne(t,i){var a,r;function n(e){return"mord"===e.type&&Boolean(e.symbol)&&/^[0-9,.]$/.test(e.symbol)}function o(e){return"text"===e.mode}const s=t instanceof d?t:new d(t),l=!s.atomIdsSettings||!s.atomIdsSettings.groupNumbers;let c=[];if(e(i)){if(0===i.length)return[];if(1===i.length)c=i[0].decompose(s),c&&l&&i[0].isSelected&&c.forEach(e=>e.selected(!0));else{let e=[],t="",d=!0,m=null;for(let p=0;pe.selected(!0))):(e.length>0&&(c=[...c,...e],e=[]),c=c.concat(a))}}e.length>0&&(c=[...c,...e],e=[])}}else i instanceof Oe&&(c=i.decompose(s),c&&l&&i.isSelected&&c.forEach(e=>e.selected(!0)));if(!c||0===c.length)return null;if(s.mathstyle!==s.parentMathstyle){const e=s.mathstyle.sizeMultiplier/s.parentMathstyle.sizeMultiplier;for(const t of c)t.height*=e,t.depth*=e}if(s.size!==s.parentSize){const e=Ee[s.size]/Ee[s.parentSize];for(const t of c)t.height*=e,t.depth*=e}return c}class Oe{constructor(e,t,i="",a={}){this.mode=e,this.type=t,this.body=i,a.isPhantom&&this.setPhantom(!0),this.applyStyle(a)}toLatex(t=!1){return function(t,i){if(!(i=void 0!==i&&i)&&t.latex)return t.latex;let a="",r=0,n=0,o=0;const s=t.symbol;let l=[];const c=(t,a)=>function(t,i,a){let r="";return e(i)?r=function(e,t,i){if(0===t.length)return"";if("first"===t[0].type){if(1===t.length)return"";t=t.slice(1)}return 0===t.length?"":h(g(t,"cssClass").map(t=>{const a=h(g(t,"color").map(t=>h(function(e){const t=[];let i=[],a="NONE";return e.forEach(e=>{"first"!==e.type&&(e.mode!==a?(i.length>0&&t.push(i),i=[e],a=e.mode):i.push(e))}),i.length>0&&t.push(i),t}(t).map(t=>function(e,t,i){var a;return(null===(a=y[t[0].mode])||void 0===a?void 0:a.emitLatexRun)?y[t[0].mode].emitLatexRun(e,t,i):""}(e,t,i)))));return!t[0].cssClass||void 0!==e&&e.cssClass===t[0].cssClass?a:"ML__boldsymbol"===t[0].cssClass?"\\boldsymbol{"+a+"}":"ML__emph"===t[0].cssClass?"\\emph{"+a+"}":"\\class{"+t[0].cssClass+"}{"+a+"}"}))}(t,i,a):"number"==typeof i||"boolean"==typeof i?r=i.toString():"string"==typeof i?r=i.replace(/\s/g,"~"):null!=i&&"function"==typeof i.toLatex&&(r=i.toLatex(a)),r}(t,a,i);switch(t.type){case"group":s?a=i?c(t,t.body):t.latex:(a=t.latexOpen||(t.cssId||t.cssClass?"":"{"),t.cssId&&(a+="\\cssId{"+t.cssId+"}{"),"ML__emph"===t.cssClass?a+="\\emph{"+c(t,t.body):(t.cssClass&&(a+="\\class{"+t.cssClass+"}{"),a+=c(t,t.body),t.cssClass&&(a+="}")),t.cssId&&(a+="}"),a+=t.latexClose||(t.cssId||t.cssClass?"":"}"));break;case"array":if(a+="\\begin{"+t.environmentName+"}","array"===t.environmentName){if(a+="{",void 0!==t.colFormat)for(o=0;o0&&(a+=" & "),a+=c(t,t.array[n][r]);n0&&("first"!==this.body[0].type?t=this.body[0].getInitialBaseElement():this.body[1]&&(t=this.body[1].getInitialBaseElement())),t||this}getFinalBaseElement(){return e(this.body)&&this.body.length>0?this.body[this.body.length-1].getFinalBaseElement():this}isCharacterBox(){const e=this.getInitialBaseElement();return/minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(e.type)}setPhantom(e){this.forEach(t=>{t.isPhantom=e})}forEach(t){if(t(this),e(this.body))for(const e of this.body)e&&e.forEach(t);else this.body&&"object"==typeof this.body&&t(this.body);if(this.superscript)for(const e of this.superscript)e&&e.forEach(t);if(this.subscript)for(const e of this.subscript)e&&e.forEach(t);if(this.overscript)for(const e of this.overscript)e&&e.forEach(t);if(this.underscript)for(const e of this.underscript)e&&e.forEach(t);if(this.numer)for(const e of this.numer)e&&e.forEach(t);if(this.denom)for(const e of this.denom)e&&e.forEach(t);if(this.index)for(const e of this.index)e&&e.forEach(t);if(this.array)for(const e of this.array)for(const i of e)for(const e of i)e.forEach(t)}filter(t){let i=[];t(this)&&i.push(this);for(const a of["body","superscript","subscript","overscript","underscript","numer","denom","index"])if(e(this[a]))for(const e of this[a])e&&(i=i.concat(e.filter(t)));if(e(this.array))for(const e of this.array)for(const a of e)a&&(i=i.concat(a.filter(t)));return i}decomposeGroup(e){const t=q(Ne(e.clone({mathstyle:this.mathstyle?c[this.mathstyle]:void 0}),this.body),"","mord");return this.cssId&&(t.cssId=this.cssId),t.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),t}decomposeOverlap(e){const t=q(Ne(e,this.body),"inner");return q([t,q(null,"fix")],"left"===this.align?"llap":"rlap","mord")}decomposeRule(e){const t=e.mathstyle,i=q("","rule","mord");let a=this.shift&&!isNaN(this.shift)?this.shift:0;a/=t.sizeMultiplier;const r=this.width/t.sizeMultiplier,n=this.height/t.sizeMultiplier;return i.setStyle("border-right-width",r,"em"),i.setStyle("border-top-width",n,"em"),i.setStyle("margin-top",-(n-a),"em"),i.setStyle("border-color",e.color),i.width=r,i.height=n+a,i.depth=-a,i}decompose(t,i=null){var a;let r=null;if(!this.type||/mord|minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(this.type)?(r="string"==typeof this.body?this.makeSpan(t,this.body):this.makeSpan(t,Ne(t,this.body)),r.type=x(this.type)?this.type:""):"group"===this.type||"root"===this.type?r=this.decomposeGroup(t):"delim"===this.type?(r=q(null,""),r.delim=this.delim):"sizeddelim"===this.type?r=this.bind(t,function(e,t,i,a,r=""){return"."===t?De(e,a,r):("<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),we.includes(t)||Se.includes(t)?xe(e,t,i,!1,a,r):Me.includes(t)?_e(e,t,ze[i],!1,a,r):null)}(this.cls,this.delim,this.size,t)):"overlap"===this.type?r=this.decomposeOverlap(t):"rule"===this.type?r=this.decomposeRule(t):"msubsup"===this.type?(r=q("​","","mord"),i&&(r.height=i[0].height,r.depth=i[0].depth)):"space"===this.type?r=this.makeSpan(t," "):"spacing"===this.type?"​"===this.body?r=this.makeSpan(t,"​"):" "===this.body?r="math"===this.mode?this.makeSpan(t," "):this.makeSpan(t," "):this.width?(r=q("​","mspace "),this.width>0?r.setWidth(this.width):r.setStyle("margin-left",this.width,"em")):r=q("​","mspace "+(null!==(a={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.symbol])&&void 0!==a?a:"mediumspace")):"mathstyle"===this.type?t.setMathstyle(this.mathstyle):"command"===this.type||"error"===this.type?(r=this.makeSpan(t,this.body),r.classes="",this.isError&&(r.classes+=" ML__error"),this.isSuggestion&&(r.classes+=" ML__suggestion")):r="placeholder"===this.type?this.makeSpan(t,"⬚"):"first"===this.type?this.makeSpan(t,"​"):Te[this.type].decompose(t,this),!r)return null;if(this.caret&&"msubsup"!==this.type&&"command"!==this.type&&"placeholder"!==this.type&&"first"!==this.type&&(e(r)?"leftright"===this.type&&(this.superscript||this.subscript)||(r[r.length-1].caret=this.caret):r.caret=this.caret),this.containsCaret&&(e(r)?(r[0].classes=(r[0].classes||"")+" ML__contains-caret",r[r.length-1].classes=(r[r.length-1].classes||"")+" ML__contains-caret"):r.classes=(r.classes||"")+" ML__contains-caret"),!this.limits&&(this.superscript||this.subscript))if(e(r)){const e=r[r.length-1];r[r.length-1]=this.attachSupsub(t,e,e.type)}else r=[this.attachSupsub(t,r,r.type)];return e(r)?r:[r]}attachSupsub(e,t,i){if(!this.superscript&&!this.subscript)return t;const a=e.mathstyle;let r=null,n=null;this.superscript&&(r=q(Ne(e.sup(),this.superscript),a.adjustTo(a.sup()))),this.subscript&&(n=q(Ne(e.sub(),this.subscript),a.adjustTo(a.sub())));let o,s=0,l=0;this.isCharacterBox()||(s=z(t)-a.metrics.supDrop,l=L(t)+a.metrics.subDrop),o=a===c.displaystyle?a.metrics.sup1:a.cramped?a.metrics.sup3:a.metrics.sup2;const d=.05/(c.textstyle.sizeMultiplier*a.sizeMultiplier);let m=null;if(n&&r){s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),l=Math.max(l,a.metrics.sub2);const i=.04;if(s-L(r)-(z(n)-l)<4*i){l=4*i-(s-r.depth)+z(n);const e=.8*a.metrics.xHeight-(s-L(r));e>0&&(s+=e,l-=e)}m=E(e,[n,l,r,-s],"individualShift"),this.isSymbol&&m.children[0].setLeft(-A(t))}else n&&!r?(l=Math.max(l,a.metrics.sub1,z(n)-.8*a.metrics.xHeight),m=E(e,[n],"shift",l),m.children[0].setRight(d),this.isCharacterBox()&&m.children[0].setLeft(-A(t))):!n&&r&&(s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),m=E(e,[r],"shift",-s),m.children[0].setRight(d));const p=q(m,"msubsup");return this.caret&&(p.caret=this.caret,this.caret=""),q([t,p],"",i)}attachLimits(e,t,i,a){const r=this.superscript?q(Ne(e.sup(),this.superscript),e.mathstyle.adjustTo(e.mathstyle.sup())):null,n=this.subscript?q(Ne(e.sub(),this.subscript),e.mathstyle.adjustTo(e.mathstyle.sub())):null;return function(e,t,i,a,r,n){if(!r&&!n)return t;t=q(t);let o=0,s=0;r&&(o=Math.max(.111,.2-L(r))),n&&(s=Math.max(.166,.6-z(n)));let l=null;return n&&r?(l=E(e,[.1,n,s,t,o,r,.1],"bottom",.1+z(n)+L(n)+s+L(t)+i),l.children[0].setLeft(-a),l.children[2].setLeft(a)):n&&!r?(l=E(e,[.1,n,s,t],"top",z(t)-i),l.children[0].setLeft(-a)):!n&&r&&(l=E(e,[t,o,r,.1],"bottom",L(t)+i),l.children[1].setLeft(a)),q(l,"op-limits","mop")}(e,t,i,a,r,n)}bind(e,t){return"first"!==this.type&&"​"!==this.body&&(this.id=function(e){let t;return e.atomIdsSettings&&("number"==typeof e.atomIdsSettings.seed?(t=e.atomIdsSettings.overrideID?e.atomIdsSettings.overrideID:e.atomIdsSettings.seed.toString(36),e.atomIdsSettings.seed+=1):t=Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36)),t}(e),this.id&&(t.attributes||(t.attributes={}),t.attributes["data-atom-id"]=this.id)),t}makeSpan(e,t){const i=q(t,"","textord"===this.type?"mord":x(this.type)?this.type:""),a=this.getStyle();a.letterShapeStyle=e.letterShapeStyle,i.applyStyle(a);const r=(null==a?void 0:a.fontSize)?a.fontSize:"size5";return r!==e.parentSize?(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+r):e.parentSize!==e.size&&(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+e.size),i.maxFontSize=Math.max(i.maxFontSize,e.mathstyle.sizeMultiplier||1),"text"===this.mode&&(i.classes+=" ML__text"),e.mathstyle.isTight()&&(i.isTight=!0),"math"!==this.mode&&(i.italic=0),i.setRight(i.italic),"number"==typeof e.opacity&&i.setStyle("opacity",e.opacity),this.bind(e,i),this.caret&&(this.superscript||this.subscript||(i.caret=this.caret,this.caret="",e.mathstyle.isTight()&&(i.isTight=!0))),i}}function Be(t,i=[]){const a=new Oe(t,"root",i||[]);return!e(a.body)||0!==a.body.length&&"first"===a.body[0].type||a.body.unshift(new Oe(t,"first")),a}function Fe(t){return e(t)}const Pe=[[8205,1],[65038,2],[127995,5],[129456,4],[917536,96]];let Re;const Ie=[127462,127487];function He(e){var t;return void 0===Re&&(Re={},Pe.forEach(e=>{for(let t=e[0];t<=e[0]+e[1]-1;t++)Re[t]=!0})),null!==(t=Re[e])&&void 0!==t&&t}function We(e){return e>=Ie[0]&&e<=Ie[1]}function Ve(e){if(/^[\x20-\xFF]*$/.test(e))return e;const t=[],i=function(e){const t=[];for(let i=0;i=55296&&a<=56319){const t=e.charCodeAt(i+1);if(t>=56320&&t<=57343){const e=a-55296,r=t-56320;a=Math.pow(2,16)+e*Math.pow(2,10)+r,i++}}t.push(a)}return t}(e);let a=0;for(;a=this.s.length}get(){return this.pos";if(this.obeyspaces&&this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]/))return"";const e=this.get();if("\\"===e){if(!this.end()){let e=this.match(/^[a-zA-Z*]+/);if(e)this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]*/);else if(e=this.get()," "===e)return"";return"\\"+e}}else{if("{"===e)return"<{>";if("}"===e)return"<}>";if("^"===e){if("^"===this.peek()){this.get();let e=this.match(/^\^\^[0-9a-f][0-9a-f][0-9a-f][0-9a-f]/);if(e)return String.fromCodePoint(parseInt(e.slice(2),16));if(e=this.match(/^[0-9a-f][0-9a-f]/),e)return String.fromCodePoint(parseInt(e,16))}return e}if("#"===e){if(!this.end()){let e=!1;if(/[0-9?]/.test(this.peek())&&(e=!0,this.pos+1"):"<$>"}return e}}function je(e,t){var i,a,r,n;let o=[],s=e.next();if(s)if("\\relax"===s);else if("\\noexpand"===s)s=e.next(),s&&o.push(s);else if("\\obeyspaces"===s)e.obeyspaces=!0;else if("\\space"===s||"~"===s)o.push("");else if("\\bgroup"===s)o.push("<{>");else if("\\egroup"===s)o.push("<}>");else if("\\string"===s)s=e.next(),s&&("\\"===s[0]?Array.from(s).forEach(e=>o.push("\\"===e?"\\backslash":e)):"<{>"===s?o.push("\\{"):""===s?o.push("~"):"<}>"===s&&o.push("\\}"));else if("\\csname"===s){for(;""===e.peek();)e.next();let r="",n=!1,l=[];do{if(0===l.length)if(/^#[0-9?]$/.test(e.peek())){const r=e.get().slice(1);l=Ge(null!==(a=null!==(i=null==t?void 0:t[r])&&void 0!==i?i:null==t?void 0:t["?"])&&void 0!==a?a:"\\placeholder{}",t),s=l[0]}else s=e.next(),l=s?[s]:[];n=0===l.length,n||"\\endcsname"!==s||(n=!0,l.shift()),n||(n="<$>"===s||"<$$>"===s||"<{>"===s||"<}>"===s||s.length>1&&"\\"===s[0]),n||(r+=l.shift())}while(!n);r&&o.push("\\"+r),o=o.concat(l)}else if("\\endcsname"===s);else if(s.length>1&&"#"===s[0]){const e=s.slice(1);o=o.concat(Ge(null!==(n=null!==(r=null==t?void 0:t[e])&&void 0!==r?r:null==t?void 0:t["?"])&&void 0!==n?n:"\\placeholder{}",t))}else o.push(s);return o}function Ge(e,t){const i=e.toString().split(/\r?\n/);let a="",r="";for(const e of i){a+=r,r=" ";const t=e.match(/((?:\\%)|[^%])*/);null!==t&&(a+=t[0])}const n=new Ue(a);let o=[];do{o=o.concat(je(n,t))}while(!n.end());return o}function Xe(e){const t=q("​","arraycolsep");return t.setWidth(e),t}function Ze(e,t,i,a){const r=[];for(const n of t){const t=q(Ne(e,a));t.depth=n.depth,t.height=n.height,r.push(t),r.push(n.pos-i)}return E(e,r,"individualShift")}function Ye(e){return!/^<({|}|\$|\$\$|space)>$/.test(e)}Ke("accent",(t,i)=>{const a=t.mathstyle;let r=Ne(t.cramp(),i.body);(i.superscript||i.subscript)&&(r=[i.attachSupsub(t,q(r,"","mord"),"mord")]);let n=0;e(i.body)&&1===i.body.length&&i.body[0].isCharacterBox()&&(n=function(t){if(!t)return 0;if(e(t)){let e=0;for(const i of t)e+=i.skew||0;return e}return t.skew}(r));let o,s=Math.min(z(r),a.metrics.xHeight);if(i.svgAccent)o=K(i.svgAccent),s=.111-s;else{const e=$("Main-Regular",i.accent,"math");e.italic=0;const t="⃗"===i.accent?" accent-vec":"";o=q(q(e),"accent-body"+t)}return o=E(t,[r,-s,o]),o.children[1].setLeft(2*n),[q([o],"accent","mord")]}),Ke("array",(e,t)=>{var i;let a=t.colFormat;a&&0===a.length&&(a=[{align:"l"}]),a||(a=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]);const r=[];let n=0;for(const e of a)e.align&&n++;for(const e of t.array){let t=0;for(;t0&&(d+=p,s0&&b.push(E(e,i,"individualShift"))}const v=[];let x=!1,k=!1,_=0,w=!t.leftDelim;for(const t of a){if(t.align&&_>=b.length)break;if(t.align&&_{const i="number"==typeof t.padding?t.padding:.3,a=q(Ne(e,t.body),"","mord");a.setStyle("vertical-align",-L(a),"em"),a.setStyle("height",0);const r=q(a,"","mord"),n=q("","ML__box");n.setStyle("position","absolute"),n.setStyle("height",z(r)+L(r)+2*i,"em"),0!==i?n.setStyle("width","calc(100% + "+2*i+"em)"):n.setStyle("width","100%"),n.setStyle("top",-i,"em"),n.setStyle("left",-i,"em"),n.setStyle("z-index","-1"),n.setStyle("box-sizing","border-box"),t.backgroundcolor&&n.setStyle("background-color",t.backgroundcolor),t.framecolor&&n.setStyle("border","0.04em solid "+t.framecolor),t.border&&n.setStyle("border",t.border),r.setStyle("display","inline-block"),r.setStyle("height",z(r)+L(r),"em");const o=q([n,r]);return o.setStyle("position","relative"),o.setStyle("vertical-align",-i+L(r),"em"),o.height=z(r)+i,o.depth=L(r)+i,o.setLeft(i),o.setRight(i),o.setStyle("height",o.height+o.depth-2*i,"em"),o.setStyle("top",-i,"em"),o.setStyle("display","inline-block"),[o]}),Ke("enclose",(e,t)=>{const i=q(Ne(e,t.body),"","mord"),a="number"==typeof t.padding?t.padding:.3,r=q("","ML__notation");r.setStyle("position","absolute"),r.setStyle("height",z(i)+L(i)+2*a,"em"),r.height=z(i)+a,r.depth=L(i)+a,0!==a?r.setStyle("width","calc(100% + "+2*a+"em)"):r.setStyle("width","100%"),r.setStyle("top","0"),r.setStyle("left",-a,"em"),r.setStyle("z-index","-1"),t.backgroundcolor&&r.setStyle("background-color",t.backgroundcolor),t.notation.box&&r.setStyle("border",t.borderStyle),t.notation.actuarial&&(r.setStyle("border-top",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.madruwb&&(r.setStyle("border-bottom",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.roundedbox&&(r.setStyle("border-radius",(z(i)+L(i))/2,"em"),r.setStyle("border",t.borderStyle)),t.notation.circle&&(r.setStyle("border-radius","50%"),r.setStyle("border",t.borderStyle)),t.notation.top&&r.setStyle("border-top",t.borderStyle),t.notation.left&&r.setStyle("border-left",t.borderStyle),t.notation.right&&r.setStyle("border-right",t.borderStyle),t.notation.bottom&&r.setStyle("border-bottom",t.borderStyle);let n="";if(t.notation.horizontalstrike&&(n+='{const i="auto"===t.mathstyle?e.mathstyle:c[t.mathstyle],a=e.clone({mathstyle:i});let r=[];t.numerPrefix&&r.push(q(t.numerPrefix,"mord"));const n=t.continuousFraction?i:i.fracNum();r=r.concat(Ne(a.clone({mathstyle:n}),t.numer));const o=T(r,e.mathstyle.adjustTo(n));let s=[];t.denomPrefix&&s.push(q(t.denomPrefix,"mord"));const l=t.continuousFraction?i:i.fracDen();s=s.concat(Ne(a.clone({mathstyle:l}),t.denom));const d=T(s,e.mathstyle.adjustTo(l)),m=t.hasBarLine?.04/i.sizeMultiplier:0;let p,u,h=0;i.size===c.displaystyle.size?(p=i.metrics.num1,h=m>0?3*m:.28,u=i.metrics.denom1):(m>0?(p=i.metrics.num2,h=m):(p=i.metrics.num3,h=.12),u=i.metrics.denom2);const f=o?L(o):0,g=d?z(d):0;let y;if(0===m){const e=p-f-(g-u);e{if(!t.body)return t.leftDelim?new Oe("math","mopen",t.leftDelim).decompose(e):t.rightDelim?new Oe("math","mclose",t.rightDelim).decompose(e):null;const i=e.clone(),a=Ne(i,t.body),r=i.mathstyle;let n=0,o=0,s=[];if(n=z(a)*r.sizeMultiplier,o=L(a)*r.sizeMultiplier,t.leftDelim&&(s.push(t.bind(e,Ce("mopen",t.leftDelim,n,o,i,"ML__open"))),s[s.length-1].applyStyle(t.getStyle())),a){for(let r=0;r{const i=e.mathstyle,a=Ne(e.cramp(),t.body),r=.04/i.sizeMultiplier,n=q(null,e.mathstyle.adjustTo(c.textstyle)+" "+t.position+"-line");let o;if(n.height=r,n.maxFontSize=1,"overline"===t.position)o=E(e,[a,3*r,n,r]);else{const t=q(a);o=E(e,[r,n,3*r,t],"top",z(t))}return[q(o,t.position,"mord")]}),Ke("mop",(t,i)=>{var a;const r=t.mathstyle;let n,o=0,s=0;if(i.isSymbol){const e=r.size===c.displaystyle.size&&"\\smallint"!==i.symbol;n=$(e?"Size2-Regular":"Size1-Regular",i.body,"op-symbol "+(e?"large-op":"small-op"),"mop"),o=(n.height-n.depth)/2-r.metrics.axisHeight*r.sizeMultiplier,s=n.italic,n.applyStyle({color:i.isPhantom?"transparent":i.color,backgroundColor:i.isPhantom?"transparent":i.backgroundColor,cssId:i.cssId,cssClass:i.cssClass,letterShapeStyle:t.letterShapeStyle})}else n=e(i.body)?q(Ne(t,i.body),"","mop"):i.makeSpan(t,i.body);i.bind(t,n),i.isSymbol&&n.setTop(o);let l=n;if(i.superscript||i.subscript){const e=null!==(a=i.limits)&&void 0!==a?a:"auto";l="limits"===e||"auto"===e&&r.size===c.displaystyle.size?i.attachLimits(t,n,o,s):i.attachSupsub(t,n,"mop")}return[l]}),Ke("overunder",(e,t)=>{const i=t.svgBody?K(t.svgBody):Ne(e,t.body),a=e.clone({mathstyle:c.scriptstyle});let r,n;t.svgAbove?r=K(t.svgAbove):t.overscript&&t.overscript.length>0&&(r=q(Ne(a,t.overscript),e.mathstyle.adjustTo(a.mathstyle))),t.svgBelow?n=K(t.svgBelow):t.underscript&&t.underscript.length>0&&(n=q(Ne(a,t.underscript),e.mathstyle.adjustTo(a.mathstyle))),r&&n&&(n.setLeft(.3),n.setRight(.3),r.setLeft(.3),r.setRight(.3));let o=function(e,t,i,a,r){if(!i&&!a)return q(t,"op-over-under",r);let n=0,o=0;i&&(n=Math.max(.111,.2-L(i))),a&&(o=Math.max(.166,.6-z(a)));let s=null;return a&&i?s=E(e,[0,a,o,t,n,i,.166],"bottom",z(a)+L(a)+L(t)):a&&!i?s=E(e,[0,a,o,t],"top",z(t)):i&&!a&&(s=E(e,[L(t),t,Math.max(.166,n),i],"bottom",L(t))),q(s,"op-over-under",r)}(e,i,r,n,x(t.type)?t.type:"mrel");return(t.superscript||t.subscript)&&(o=t.attachLimits(e,o,0,0)),[o]}),Ke("phantom",(e,t)=>{if("vphantom"===t.phantomType){const i=q(Ne(e,t.body),"inner");return[q([i,q(null,"fix")],"rlap","mord")]}if("hphantom"===t.phantomType||"smash"===t.phantomType||"bsmash"===t.phantomType||"tsmash"===t.phantomType){const i=q(Ne(e,t.body),"","mord");return"bsmash"!==t.phantomType&&(i.height=0),"tsmash"!==t.phantomType&&(i.depth=0),[q(E(e,[i]),"","mord")]}return[q(Ne(e,t.body),"","mord")]}),Ke("surd",(e,t)=>{var i;const a=e.mathstyle,r=null!==(i=Ne(e.cramp(),t.body))&&void 0!==i?i:q(""),n=.04/a.sizeMultiplier;let o=n;a.idz(r)+L(r)+s&&(s=(s+d-(z(r)+L(r)))/2),l.setTop(l.height-z(r)-(s+n));const m=q(null,e.mathstyle.adjustTo(c.textstyle)+" sqrt-line");m.applyStyle(t.getStyle()),m.height=n;const p=E(e,[r,s,m,n]);if(void 0===t.index)return[t.bind(e,q([l,p],"sqrt","mord"))];const u=e.clone({mathstyle:c.scriptscriptstyle}),h=E(e,[q(Ne(u,t.index),a.adjustTo(c.scriptscriptstyle))],"shift",-.6*(Math.max(l.height,p.height)-Math.max(l.depth,p.depth)));return[t.bind(e,q([q(h,"root"),l,p],"sqrt","mord"))]});class Qe{constructor(e,t,i,a){this.index=0,this.style={},this.parseMode="math",this.smartFence=!1,this.tabularMode=!1,this.atoms=[],this.endCount=0,this.tokens=e,this.args=t,this.macros=i,this.onError=e=>a({before:f(this.tokens.slice(this.index,this.index+10)),after:f(this.tokens.slice(Math.max(0,this.index-10),this.index)),...e})}swapAtoms(e=[]){const t=this.atoms;return this.atoms=e,t}swapParseMode(e){const t=this.parseMode;return this.parseMode=e,t}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index");)e=!0;return e}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){let e=!1;do{const t=this.matchWhitespace(),i=this.match("\\relax");e=!t&&!i}while(!e)}matchKeyword(e){const t=this.index;let i=this.end(),a="";for(;!i;){const t=this.get();Ye(t)?(a+=t,i=this.end()||a.length>=e.length):i=!0}const r=e.toUpperCase()===a.toUpperCase();return r||(this.index=t),r}scanString(){let e="",t=this.end();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===i?t=!0:Ye(i)?e+=this.get():"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.get()):t=!0}t=t||this.end()}return e}scanBalancedString(){let e="",t=this.end(),i=1;for(;!t;){if(this.match(""))e+=" ";else{const t=this.get();"<{>"===t?(e+="{",i+=1):"<}>"===t?(i-=1,i>0?e+="}":this.index-=1):e+="<$>"===t?"$":"<$$>"===t?"$$":t}t=0===i||this.end()}return e}matchLiteralArg(){var e;let t="";if(this.match("<{>")){let i=1;for(;i>0&&!this.end();){const a=this.get();"<}>"===a?(i-=1,i>0&&(t+="}")):"<{>"===a?(i+=1,t+="{"):t+=null!==(e={"":" ","<$$>":"$$","<$>":"$"}[a])&&void 0!==e?e:a}}return t}scanColor(){return ye(this.scanString())}scanNumber(e=!0){var t,i;let a=!1,r=this.peek();for(;""===r||"+"===r||"-"===r;)this.get(),"-"===r&&(a=!a),r=this.peek();e=Boolean(e);let n=10,o=/[0-9]/;if(this.match("'"))n=8,o=/[0-7]/,e=!0;else if(this.match('"')||this.match("x"))n=16,o=/[0-9A-F]/,e=!0;else if(this.match("`"))return r=this.get(),r?r.startsWith("\\")&&2===r.length?(a?-1:1)*(null!==(t=r.codePointAt(1))&&void 0!==t?t:0):(a?-1:1)*(null!==(i=r.codePointAt(0))&&void 0!==i?i:0):NaN;let s="";for(;this.hasPattern(o);)s+=this.get();if(!e&&(this.match(".")||this.match(",")))for(s+=".";this.hasPattern(o);)s+=this.get();const l=e?parseInt(s,n):parseFloat(s);return a?-l:l}scanDimen(){const e=this.scanNumber(!1);let t;return this.matchWhitespace(),this.matchKeyword("pt")?t=o(e,"pt"):this.matchKeyword("mm")?t=o(e,"mm"):this.matchKeyword("cm")?t=o(e,"cm"):this.matchKeyword("ex")?t=o(e,"ex"):this.matchKeyword("px")?t=o(e,"px"):this.matchKeyword("em")?t=o(e,"em"):this.matchKeyword("bp")?t=o(e,"bp"):this.matchKeyword("dd")?t=o(e,"dd"):this.matchKeyword("pc")?t=o(e,"pc"):this.matchKeyword("in")?t=o(e,"in"):this.matchKeyword("mu")?t=o(e,"mu"):(this.onError({code:"missing-unit"}),t=o(e,"pt")),t}scanSkip(){const e=this.scanDimen();return this.matchWhitespace(),this.matchKeyword("plus")&&this.scanDimen(),this.matchWhitespace(),this.matchKeyword("minus")&&this.scanDimen(),e}scanColspec(){this.matchWhitespace();const e=[];for(;!this.end()&&"<}>"!==this.peek()&&"]"!==this.peek();){const t=this.get();if("c"===t||"r"===t||"l"===t)e.push({align:t});else if("|"===t)e.push({rule:!0});else if("@"===t){if(this.match("<{>")){const t=this.swapParseMode("math");e.push({gap:this.parse(e=>"<}>"===e)}),this.swapParseMode(t)}this.match("<}>")||this.onError({code:"unbalanced-braces"})}}return e}parseModeSet(){let e="";if(this.match("\\(")&&(e="\\)"),!e&&this.match("\\[")&&(e="\\]"),!e)return null;const t=this.swapParseMode("math"),i=new Oe("math","group");return i.mathstyle="\\)"===e?"textstyle":"displaystyle",i.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(t),i.body&&0!==i.body.length?i:null}parseModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;const t=new Oe("math","group");t.mathstyle="<$>"===e?"textstyle":"displaystyle",t.latexOpen="<$>"===e?"$":"$$",t.latexClose=t.latexOpen;const i=this.swapParseMode("math");return t.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(i),t.body&&0!==t.body.length?t:null}parseEnvironment(){if(!this.match("\\begin"))return null;const e=this.parseArgument("string");if(!e)return null;const t=ie(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const i=[];if(null==t?void 0:t.params)for(const a of t.params)if(a.isOptional)i.push(this.parseOptionalArgument(a.type));else{const t=this.parseArgument(a.type);t||this.onError({code:"missing-argument",arg:e}),i.push(t)}const a=this.parseMode,r=this.tabularMode,n=this.swapAtoms([]);this.tabularMode=t.tabular;const o=[],s=[];let l=[],c=!1;do{if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c&&this.match("\\end")&&(this.parseArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c)if(this.matchColumnSeparator())l.push(this.swapAtoms([]));else if(this.matchRowSeparator()){l.push(this.swapAtoms([]));let e=0;this.matchWhitespace(),this.match("[")&&(e=this.scanDimen(),this.matchWhitespace(),this.match("]")),s.push(e||0),o.push(l),l=[]}else this.atoms=this.atoms.concat(this.parse(e=>"<}>"===e||"&"===e||"\\end"===e||"\\cr"===e||"\\\\"===e))}while(!c);l.push(this.swapAtoms([])),l.length>0&&o.push(l);const d=this.swapAtoms(n);if(this.parseMode=a,this.tabularMode=r,!t.tabular&&0===d.length)return null;if(t.tabular&&0===o.length)return null;const m=new Oe(this.parseMode,"array",d);return Object.assign(m,t.parser(e,i,o)),m.array=o,m.rowGaps=s,m.environmentName=e,m}parse(e){var t;const i=this.style;e||(e=e=>"<}>"===e);let a="",r=null,n=[],o=null;const s=this.swapAtoms([]);for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!a?(a=this.get(),r=ae(a,"math",this.macros),r&&(n=this.parseArguments(r)[1]),o=this.swapAtoms([])):this.parseToken();let l;return a?(n.unshift(this.swapAtoms(s)),o&&n.unshift(o),l=[new Oe(this.parseMode,r.type,null!==(t=r.value)&&void 0!==t?t:a.slice(1),r.parse?r.parse(a,n):null)],l[0].symbol=a):l=this.swapAtoms(s),this.style=i,l}parseGroup(){if(!this.match("<{>"))return null;const e=new Oe(this.parseMode,"group");return e.body=this.parse(e=>"<}>"===e),this.match("<}>")||this.onError({code:"unbalanced-braces"}),e.latexOpen="{",e.latexClose="}",e}scanSmartFence(){if(this.matchWhitespace(),!this.match("("))return null;const e=new Oe(this.parseMode,"leftright");e.leftDelim="(",e.inner=!1;const t=this.swapAtoms([]);let i=1;for(;!this.end()&&0!==i;)this.match("(")&&(i+=1),this.match(")")&&(i-=1),0!==i&&this.parseToken();return 0===i&&this.match(")"),e.rightDelim=0===i?")":"?",e.body=this.swapAtoms(t),e}scanDelim(){this.matchWhitespace();const e=this.get();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;let t=".";("\\"===e[0]||Ye(e))&&(t=e);const i=ae(t,"math",this.macros);return i?i.mode&&!i.mode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:t}),null):"mopen"===i.type||"mclose"===i.type||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(t)?t:(this.onError({code:"unexpected-delimiter",arg:t}),null):(this.onError({code:"unknown-command",arg:t}),null)}parseLeftRight(){if(this.match("\\right")||this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),null;const e=this.style;let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const i=this.scanDelim();if(!i)return null;const a=this.swapAtoms([]);for(;!this.end()&&!this.match(t);)this.parseToken();this.style=e;const r=this.scanDelim(),n=new Oe(this.parseMode,"leftright");return n.leftDelim=i,n.rightDelim=null!=r?r:void 0,n.inner="right"===t,n.body=this.swapAtoms(a),n}parseSupSub(){var e,t;if("math"!==this.parseMode)return!1;let i=!1,a=this.peek();for(;"^"===a||"_"===a||"'"===a;){const r="_"===a?"subscript":"superscript";if(this.match("^")||this.match("_")){const t=this.parseArgument("math");if(t){const a=this.lastSubsupAtom();a[r]=(null!==(e=a[r])&&void 0!==e?e:[]).concat(t),i=!0}}else if(this.match("'")){const e=this.lastSubsupAtom(),a=new Oe(e.mode,"mord","′");a.symbol="\\prime",e.superscript=null!==(t=e.superscript)&&void 0!==t?t:[],e.superscript.push(a),i=!0}a=this.peek()}return i}parseLimits(){if(this.match("\\limits")){const e=this.lastSubsupAtom();return e.limits="limits",e.explicitLimits=!0,!0}if(this.match("\\nolimits")){const e=this.lastSubsupAtom();return e.limits="nolimits",e.explicitLimits=!0,!0}return!1}parseArguments(e){if(!e||!e.params)return[void 0,[]];let t;const i=[];let a=e.infix?2:0;for(;a")){if("delim"===e)return null!==(t=this.scanDelim())&&void 0!==t?t:".";if(/^(math|text)$/.test(e)){const t=this.swapParseMode(e),i=this.parseSimpleToken();return this.swapParseMode(t),i}}const a=this.parseMode;this.parseMode=e;const r=this.swapAtoms([]);if("string"===e)i=this.scanString(),this.skipUntilToken("<}>");else if("balanced-string"===e)i=this.scanBalancedString(),this.skipUntilToken("<}>");else if("number"===e)i=this.scanNumber(),this.skipUntilToken("<}>");else if("dimen"===e)i=this.scanDimen(),this.skipUntilToken("<}>");else if("skip"===e)i=this.scanSkip(),this.skipUntilToken("<}>");else if("colspec"===e)i=this.scanColspec(),this.skipUntilToken("<}>");else if("color"===e)i=this.scanColor()||"#ffffff",this.skipUntilToken("<}>");else if("delim"===e)i=this.scanDelim()||".",this.skipUntilToken("<}>");else{const t=this.index;let a=1;do{const e=this.get();"<}>"===e&&(a-=1),"<{>"===e&&(a+=1)}while(a>0&&!this.end());if(i=function(e,t,i,a){var r;return(null===(r=y[e])||void 0===r?void 0:r.parse)?y[e].parse(t,i,a):null}(e,this.tokens.slice(t,this.index-1),this.onError,{args:this.args,macros:this.macros,smartFence:this.smartFence,style:this.style,parse:(e,t,a)=>{const r=new Qe(t,a.args,a.macros,this.onError);return r.parseMode=e,r.style=a.style,i=r.parse(),[i,t.slice(r.index)]}}),!i){this.index=t;do{this.atoms=this.atoms.concat(this.parse())}while(!this.match("<}>")&&!this.end())}}this.parseMode=a;const n=this.swapAtoms(r);return null!=i?i:n}parseOptionalArgument(e){var t;if(e="auto"===e?this.parseMode:e,this.matchWhitespace(),!this.match("["))return null;const i=this.parseMode;this.parseMode=e;const a=this.swapAtoms();let r;for(;!this.end()&&!this.match("]");)if("string"===e)r=this.scanString();else if("number"===e)r=this.scanNumber();else if("dimen"===e)r=this.scanDimen();else if("skip"===e)r=this.scanSkip();else if("colspec"===e)r=this.scanColspec();else if("color"===e)r=null!==(t=this.scanColor())&&void 0!==t?t:"#ffffff";else if("bbox"===e){const e=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/),t={};for(const i of e){const e=ye(i);if(e)t.backgroundcolor=e;else{const e=i.match(/^\s*([0-9.]+)\s*([a-z][a-z])/);if(e)t.padding=o(e[1],e[2]);else{const e=i.match(/^\s*border\s*:\s*(.*)/);e&&(t.border=e[1])}}}r=t}else this.atoms=this.atoms.concat(this.parse(e=>"]"===e));this.parseMode=i;const n=this.swapAtoms(a);return null!=r?r:n}parseSimpleToken(){const t=this.get();if(!t)return null;let i=null;if(""===t)"text"===this.parseMode&&(i=new Oe("text",""," ",this.style),i.symbol=" ");else if("\\"===t[0]){if("\\placeholder"===t)i=new Oe(this.parseMode,"placeholder",this.parseArgument("string"),this.style),i.captureSelection=!0;else if("\\char"===t){const e=this.index;let t=Math.floor(this.scanNumber(!0));(!isFinite(t)||t<0||t>1114111)&&(t=10067),i=new Oe(this.parseMode,"math"===this.parseMode?"mord":"",String.fromCodePoint(t)),i.symbol="\\char",i.latex="\\char"+f(this.tokens.slice(e,this.index))}else if("\\hskip"===t||"\\kern"===t){const e=this.scanSkip();isFinite(e)&&(i=new Oe(this.parseMode,"spacing",null,this.style),i.width=e,i.symbol=t,i.latex=t)}else if(i=this.scanMacro(t),!i){const e=ae(t,this.parseMode,{});if(!e)return this.onError({code:"unknown-command",arg:t}),i=new Oe("math","error",t),i.symbol=t,i.latex=t,[i];if(e.mode&&!e.mode.includes(this.parseMode))return this.onError({code:"invalid-command",arg:t}),i=new Oe("math","error",t),i.symbol=t,i.latex=t,[i];const a=this.index,[r,n]=this.parseArguments(e);if(!n)return null;if(e.infix)this.onError({code:"too-many-infix-commands",arg:t});else{if(e.parse){const a=e.parse(t,n);if(a.type)i=new Oe(this.parseMode,e.type,r?this.parseArgument(r):null,{...this.style,...a});else{const e=this.parseMode;if(a.mode&&(this.parseMode=a.mode,delete a.mode),a.mathstyle){this.parseMode="math";const e=new Oe("math","mathstyle");e.mathstyle=a.mathstyle,this.atoms.push(e)}if(r){const e=this.style;this.style={...this.style,...a},i=this.parseArgument(r),this.style=e}else this.style={...this.style,...a};this.parseMode=e}}else{const a={...this.style,variant:e.variant||this.style.variant,variantStyle:e.variantStyle||this.style.variantStyle};i=new Oe(this.parseMode,e.type||"mop",e.value||t,a)}if(i instanceof Oe&&!/^\\(llap|rlap|class|cssId)$/.test(t)){i.symbol=t;const e=f(this.tokens.slice(a,this.index));if(e&&(i.latex=i.symbol+e),i.isFunction&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}}}}else if(Ye(t)){const e=ae(t,this.parseMode,this.macros);if(e){const a={...this.style};i=new Oe(this.parseMode,e.type,e.value||t,a),e.isFunction&&(i.isFunction=!0)}else i=new Oe(this.parseMode,"math"===this.parseMode?"mord":"",t,this.style);if(i.symbol=t,i.latex=Q(this.parseMode,t),(null==e?void 0:e.isFunction)&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}else"<}>"===t?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:t});return i&&!e(i)?[i]:i}scanMacro(e){var t;const i=e.slice(1);if(!this.macros||!this.macros[i])return null;const a=this.index,r=[];let n,o=0;"string"==typeof this.macros[i]?(n=this.macros[i],/(^|[^\\])#1/.test(n)&&(o=1),/(^|[^\\])#2/.test(n)&&(o=2),/(^|[^\\])#3/.test(n)&&(o=3),/(^|[^\\])#4/.test(n)&&(o=4),/(^|[^\\])#5/.test(n)&&(o=5),/(^|[^\\])#6/.test(n)&&(o=6),/(^|[^\\])#7/.test(n)&&(o=7),/(^|[^\\])#8/.test(n)&&(o=8),/(^|[^\\])#9/.test(n)&&(o=9)):(n=this.macros[i].def,o=this.macros[i].args||0);for(let e=1;e<=o;e++)r[e]=this.matchLiteralArg();r["?"]=null===(t=this.args)||void 0===t?void 0:t["?"];const s=new Oe(this.parseMode,"group",Je(n,this.parseMode,r,this.macros,!1,this.onError));return s.captureSelection=!0,s.symbol=e,s.latex=e+f(this.tokens.slice(a)),s}parseToken(){let t=this.parseEnvironment()||this.parseModeShift()||this.parseModeSet()||this.parseGroup()||this.parseLeftRight();return!(t||!this.parseSupSub()&&!this.parseLimits())||(t||(t=this.parseSimpleToken()),e(t)?this.atoms=this.atoms.concat(t):t&&this.atoms.push(t),null!==t)}}function Je(e,t,i,a,r=!1,n){let o=[];const s=new Qe(Ge(e,i),i,a,t=>{"function"==typeof n&&n({...t,latex:e})});for(s.parseMode=t||"math",r&&(s.smartFence=!0);!s.end();){const e=s.parse();e&&(o=o.concat(e))}return o}var et,tt;const it=null!==(tt=null===(et=document.currentScript)||void 0===et?void 0:et.src)&&void 0!==tt?tt:function(){const e=String((new Error).stack).replace(/^Error.*\n/,"").split("\n");if(0===e.length)return"";const t=e[0].match(/http.*js/);return t?t[0]:""}();async function at(e,t){var i;if((null===(i=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))||void 0===i||!i)&&"fonts"in document){const i=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"];let a=!1;if(!/firefox/i.test(navigator.userAgent))try{a=i.every(e=>document.fonts.check("16px "+e))}catch(e){a=!1}if(!a){if(document.body.classList.contains("ML__fonts-loading"))return;document.body.classList.add("ML__fonts-loading");const i=new URL(null!=e?e:"./fonts",it).toString(),a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular",{style:"italic"}],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(e=>function(e,t,i={}){return new FontFace(e,`url(${t}.woff2) format('woff2'), url(${t}.woff) format('woff')`,i)}(e[0].replace(/-[a-zA-Z]+$/,""),i+"/"+e[0],e[1]));try{(await Promise.all(a.map(e=>{try{return e.load()}catch(e){"function"==typeof t&&t({code:"font-not-found",arg:e})}}))).forEach(e=>document.fonts.add(e)),document.body.classList.remove("ML__fonts-loading")}catch(e){}}}}function rt(e,t){var i,a;if(!t)return null;let r=null!==(i=null==e?void 0:e.getRootNode())&&void 0!==i?i:null===document||void 0===document?void 0:document.head;if(!r)return null;r===document&&(r=document.head);const n=function(e){let t=0;if(0===e.length)return t;for(let i=0;i{var e;const t=document.head.querySelector(`style[data-id="${n}"]`);if(t){const i=parseFloat(null!==(e=t.getAttribute("data-refcount"))&&void 0!==e?e:"0");1===i?t.remove():t.setAttribute("data-refcount",Number(i-1).toString())}}}}function nt(e){return 0===e.length||1===e.length&&"first"===e[0].type}function ot(e){const t=e.siblings();for(let e=t.length-1;e>=0;e--)t[e].isSuggestion&&t.splice(e,1)}function st(e){let t=1,i=e.ancestor(t);for(;i;)i.latex=void 0,t+=1,i=e.ancestor(t)}function lt(e,t){let i="";for(const t of e)i+=t.relation+":"+t.offset+"/";return t&&(i+="#"+t),i}function ct(e){const t={path:[],extent:0},i=e.split("#");i.length>1&&(t.extent=parseInt(i[1]));const a=i[0].split("/");for(const e of a){const i=e.match(/([^:]*):(.*)/);i&&t.path.push({relation:i[1],offset:parseInt(i[2])})}return t}function dt(e,t){let i=0,a=-1,r=!1;for(;!r;)a+=1,r=a>=e.length||a>=t.length,r=r||!(e[a].relation===t[a].relation&&e[a].offset===t[a].offset);return i=a===e.length&&a===t.length?0:a+1===e.length&&a+1===t.length&&e[a].relation===t[a].relation?1:2,i}function mt(e){return ct(lt(e)).path}function pt(e,t){let i=0;for(let a=0;a0;)a.col+=1,(!e[a.row]||a.col>=e[a.row].length)&&(a.col=0,a.row+=1),i-=1;return a}function ht(t,i){var a;let r;return"object"!=typeof i&&(i=ut(t,i)),e(t[i.row])&&(r=null!==(a=t[i.row][i.col])&&void 0!==a?a:null),!r||0!==r.length&&"first"===r[0].type||r.unshift(new Oe("math","first")),r}function ft(e){let t=0,i=0,a=1;for(const t of e)i+=1,t.length>a&&(a=t.length);return t=i*a,t}function gt(e,t,i){const a={...t};if(a.row+=i,a.row<0){if(a.col+=i,a.row=e.length-1,a.col<0)return null;for(;a.row>=0&&!ht(e,a);)a.row-=1;if(a.row<0)return null}else if(a.row>=e.length){for(a.col+=i,a.row=0;a.rowe.length-1)return null}return a}class yt{constructor(e,t,i,a){this.options={mode:"math",removeExtraneousParentheses:!1,...e},this.root=Be(this.options.mode),this.path=[{relation:"body",offset:0}],this.extent=0,this.setListeners(t),this.setHooks(i),this.mathfield=a,this.suppressChangeNotifications=!1}clone(){const e=new yt(this.options,this.listeners,this.hooks,this.mathfield);return e.root=this.root,e.path=mt(this.path),e}setListeners(e){this.listeners=e}setHooks(e){this.hooks={announce:(null==e?void 0:e.announce)?e.announce:(e,t,i,a)=>{},moveOut:(null==e?void 0:e.moveOut)?e.moveOut:()=>!0,tabOut:(null==e?void 0:e.tabOut)?e.tabOut:()=>!0}}announce(e,t,i=[]){this.hooks.announce(this.mathfield,e,t,i)}toString(){return lt(this.path,this.extent)}siblings(){var e;if(0===this.path.length)return[];let t;return this.parent().array?t=ht(this.parent().array,this.relation()):(t=null!==(e=this.parent()[this.relation()])&&void 0!==e?e:[],"string"==typeof t&&(t=[])),0!==t.length&&"first"===t[0].type||t.unshift(new Oe(this.parent().mode,"first")),t}anchorOffset(){return this.path.length>0?this.path[this.path.length-1].offset:0}focusOffset(){return this.path.length>0?this.path[this.path.length-1].offset+this.extent:0}startOffset(){return Math.min(this.focusOffset(),this.anchorOffset())}endOffset(){return Math.max(this.focusOffset(),this.anchorOffset())}sibling(e){return this.siblings()[this.startOffset()+e]}ancestor(e){if(e>this.path.length)return null;let t=this.root;for(let i=0;i0?this.path[this.path.length-1].relation:""}insertFirstAtom(){this.siblings()}}function bt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionWillChange)||e.suppressChangeNotifications||e.listeners.onSelectionWillChange(e)}function vt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionDidChange)||e.suppressChangeNotifications||e.listeners.onSelectionDidChange(e)}function xt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentWillChange)||e.suppressChangeNotifications||e.listeners.onContentWillChange(e)}function kt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentDidChange)||e.suppressChangeNotifications||e.listeners.onContentDidChange(e)}function _t(e){return!!e&&("mord"===e.type&&/[0-9.]/.test(e.body)||"mpunct"===e.type&&","===e.body)}function wt(e){const t=e.siblings();if(t.length<=1)return null;let i=Math.min(e.endOffset(),t.length-1);if("command"!==t[i].type)return null;for(;i>0&&"command"===t[i].type;)i-=1;let a=e.startOffset()+1;for(;a<=t.length-1&&"command"===t[a].type;)a+=1;return a>i?{start:i+1,end:a}:null}function Mt(e){const t=Ft(e)?Wt(e):e.sibling(1);let i;if(t){if("command"===t.type)return"command";i=t.mode}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i=r.mode),a+=1,r=e.ancestor(a);return i}function St(e){const t=Ft(e)?Wt(e):e.sibling(1);let i;if(t&&"first"!==t.type){if("command"===t.type)return{};i={color:t.color,backgroundColor:t.backgroundColor,fontFamily:t.fontFamily,fontShape:t.fontShape,fontSeries:t.fontSeries,fontSize:t.fontSize}}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i={color:r.color,backgroundColor:r.backgroundColor,fontFamily:r.fontFamily,fontShape:r.fontShape,fontSeries:r.fontSeries,fontSize:r.fontSize}),a+=1,r=e.ancestor(a);return i}function zt(e,t=1,i=!0){var a;const r=e.suppressChangeNotifications;e.suppressChangeNotifications=!0;const n=e.clone(),o=e.extent;$t(e,t),"placeholder"===Wt(e).type&&$t(e,t);const s=Zt(e,(t,i)=>"placeholder"===i.type||t.length>1&&1===e.siblings().length,t);if(0===s.length){if(Ut(e,n,o),i&&(null===(a=e.hooks)||void 0===a?void 0:a.tabOut)&&e.hooks.tabOut(e,t>0?"forward":"backward")&&document.activeElement){const e='a[href]:not([disabled]),\n button:not([disabled]),\n textarea:not([disabled]),\n input[type=text]:not([disabled]),\n select:not([disabled]),\n [contentEditable="true"],\n [tabindex]:not([disabled]):not([tabindex="-1"])',i=Array.prototype.filter.call(document.querySelectorAll(e),e=>(e.offsetWidth>0||e.offsetHeight>0)&&!e.contains(document.activeElement)||e===document.activeElement);let a=i.indexOf(document.activeElement)+t;a<0&&(a=i.length-1),a>=i.length&&(a=0),i[a].focus()}return e.suppressChangeNotifications=r,!1}return bt(e),Ut(e,s[0]),"placeholder"===Wt(e).type&&Pt(e,-1),e.announce("move",n),vt(e),e.suppressChangeNotifications=r,!0}function Lt(e,t=0,i=0,a=""){const r=e.path[e.path.length-1].relation;a||(a=r);const n=e.parent();if(!n&&"body"!==a)return!1;const o=a.startsWith("cell");if(!o&&!n[a]||o&&!n.array)return!1;const s=a!==r;e.path[e.path.length-1].relation=a;const l=e.siblings().length;e.path[e.path.length-1].relation=r;const c=e.extent;"end"===i?i=l-t-1:"start"===i&&(i=-t),Pt(e,i);const d=e.extent!==c;Pt(e,c),t<0&&(t=l+t),t=Math.max(0,Math.min(t,l-1));const m=e.path[e.path.length-1].offset;return(s||m!==t||d)&&(s&&Gt(e),bt(e),e.path[e.path.length-1].relation=a,e.path[e.path.length-1].offset=t,Pt(e,i),vt(e)),!0}function At(t,i){var a;i=null!=i?i:{};const r={body:"numer",numer:"denom",denom:"index",index:"overscript",overscript:"underscript",underscript:"subscript",subscript:"superscript"};if(t.anchorOffset()===t.siblings().length-1){Gt(t);let e=r[t.relation()];const n=t.parent();for(;e&&!n[e];)e=r[e];if(e)return void Lt(t,0,0,e);if(t.parent().array){const e=ft(t.parent().array);let i=parseInt(t.relation().match(/cell([0-9]*)$/)[1])+1;for(;i=0;){if(ht(t.parent().array,e)&&Lt(t,-1,0,"cell"+e))return void vt(t);e-=1}}return 1===t.path.length?(t.suppressChangeNotifications||!(null===(a=t.hooks)||void 0===a?void 0:a.moveOut)||t.hooks.moveOut(t,"backward"))&&(t.path[0].offset=t.root.body.length-1):(t.path.pop(),Lt(t,t.anchorOffset()-1)),void vt(t)}const n=Wt(t);if(!n.captureSelection){let i;if(n.array){i="";const e=ft(n.array);let a=e-1;for(;!i&&a0)for(Rt(e)&&t--;t>0;)At(e),t--;else if(t<0)for(It(e)&&t++;0!==t;)qt(e),t++;e.announce("move",i)}return!0}function Ct(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;It(e);const r=e.relation();if("denom"===r)a?(bt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Pt(e,1),vt(e)):Lt(e,e.anchorOffset(),0,"numer"),e.announce("moveUp");else if(e.parent().array){let i=ut(e.parent().array,r);i=gt(e.parent().array,i,-1),i&&ht(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+pt(e.parent().array,i),Lt(e,e.anchorOffset()),e.announce("moveUp")):$t(e,-1,t)}else e.announce("line");return!0}function Dt(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;Rt(e);const r=e.relation();if("numer"===r)a?(bt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Pt(e,1),vt(e)):Lt(e,e.anchorOffset(),0,"denom"),e.announce("moveDown");else if(e.parent().array){let i=ut(e.parent().array,r);i=gt(e.parent().array,i,1),i&&ht(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+pt(e.parent().array,i),Lt(e,e.anchorOffset()),e.announce("moveDown")):$t(e,1,t)}else e.announce("line");return!0}function Tt(e,t){let i=e.path[e.path.length-1].offset,a=0;const r=e.clone();a=e.extent+t;const n=i+a;if(n<0&&0!==a){if(e.path.length>1)return bt(e),e.path.pop(),Pt(e,-1),vt(e),e.announce("move",r),!0;i=e.path[e.path.length-1].offset,a=e.extent}else if(n>=e.siblings().length){if(e.path.length>1)return bt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Pt(e,1),vt(e),e.announce("move",r),!0;Ft(e)&&(i-=1),a-=1}return Lt(e,i,a),e.announce("move",r),!0}function Et(e,t,i){var a;const r=null!==(a=(i=null!=i?i:{extend:!1}).extend)&&void 0!==a&&a;t=t<0?-1:1;const n=e.clone(),o=e.siblings(),s=e.focusOffset();let l=s+t;if(r&&(l=Math.min(Math.max(0,l),o.length-1)),l<0||l>=o.length)$t(e,t,i);else{if(o[l]&&"text"===o[l].mode){if(l=function(e,t,i){i=i<0?-1:1;const a=e.siblings();if(!a[t])return t;if("text"!==a[t].mode)return t;let r;if(V.test(a[t].body)){let e,n=t;do{e="text"===a[n].mode&&V.test(a[n].body),n+=i}while(a[n]&&e);r=a[n]?n-2*i:n-i}else if(/\s/.test(a[t].body)){let e=t;for(;a[e]&&"text"===a[e].mode&&/\s/.test(a[e].body);)e+=i;if(a[e]){let t=!0;do{t="text"===a[e].mode&&!/\s/.test(a[e].body),e+=i}while(a[e]&&t);r=a[e]?e-2*i:e-i}else r=e-i}else{let e=t;for(;a[e]&&"text"===a[e].mode&&!/\s/.test(a[e].body);)e+=i;r=a[e]?e:e-i;let n=!0;for(;a[e]&&n;)n="text"===a[e].mode&&/\s/.test(a[e].body),n&&(r=e),e+=i;r=a[e]?e-2*i:e-i}return r-(i>0?0:1)}(e,l,t),l<0&&!r)return void Lt(e,0);if(l>o.length)return Lt(e,o.length-1),void $t(e,t,i)}else{const e=o[l]?o[l].type:"";if("mopen"===e&&t>0||"mclose"===e&&t<0){let i="mopen"===e?1:-1;for(l+=t>0?1:-1;l>=0&&l0&&(l-=1)}else{for(;o[l]&&"math"===o[l].mode&&o[l].type===e;)l+=t;l-=t>0?1:0}}if(r){const t=e.anchorOffset();Lt(e,t,l-t)}else Lt(e,l);e.announce("move",n)}}function Kt(e,t=1,i){var a;i=null!=i?i:{extend:!1},t=t<0?-1:1;const r=e.clone(),n=[{relation:"body",offset:e.path[0].offset}];let o;return null!==(a=!i.extend)&&void 0!==a&&a?(n[0].offset=t<0?0:e.root.body.length-1,o=0):t<0?n[0].offset>0&&(o=-n[0].offset):n[0].offset=a)return Lt(e,e.endOffset()-1,1),!0;Lt(e,i,a-i)}else if("mord"===e.sibling(0).type&&/[0-9,.]/.test(e.sibling(0).body)){let i=e.startOffset(),a=e.endOffset();for(;_t(t[i]);)i-=1;for(;_t(t[a]);)a+=1;a-=1,Lt(e,i,a-i)}else Lt(e,0,"end");return!0}function Bt(e){return e.path=[{relation:"body",offset:0}],Lt(e,0,"end")}function Ft(e){return 0===e.extent}function Pt(e,t){return e.extent=t,!0}function Rt(e){return 0!==e.extent&&(Lt(e,e.endOffset()),!0)}function It(e){return 0!==e.extent&&(Lt(e,e.startOffset()),!0)}function Ht(e){if(e.path.length>1){const t=e.clone();return e.path.pop(),Pt(e,0),e.announce("move",t),!0}return e.announce("plonk"),!1}function Wt(e){if(e.parent().array)return ht(e.parent().array,e.relation())[e.anchorOffset()];const t=e.siblings();return t[Math.min(t.length-1,e.anchorOffset())]}function Vt(e,t,i,a={extendToWordBoundary:!1}){const r=dt(t,i);if(0===r)return a.extendToWordBoundary?Vt(e,t=Xt(e,t,-1),i=Xt(e,i,1)):Ut(e,mt(t),0);if(1===r){const r=i[i.length-1].offset-t[t.length-1].offset;return a.extendToWordBoundary?Vt(e,t=Xt(e,t,r<0?1:-1),i=Xt(e,i,r<0?-1:1)):Ut(e,mt(t),r)}let n=function(e,t){const i=[],a=Math.min(e.length-1,t.length-1);let r=0;for(;r<=a&&e[r].relation===t[r].relation&&e[r].offset===t[r].offset;)i.push(e[r]),r+=1;return i}(t,i);const o=n.length;if(t.length===o||i.length===o||t[o].relation!==i[o].relation)return Ut(e,n,-1);n.push(t[o]),n=mt(n);let s=i[o].offset-t[o].offset+1;return s<=0?i.length>o+1?(n[o].relation=i[o].relation,n[o].offset=i[o].offset,n[n.length-1].offset-=1,s=2-s):(n[o].relation=i[o].relation,n[o].offset=i[o].offset,s=1-s):i.length<=t.length?n[n.length-1].offset-=1:i.length>t.length&&(n[o].offset-=1),Ut(e,n,s)}function Ut(t,i,a=0){let r;if("string"==typeof i)r=ct(i);else if(e(i)){const e=mt(i),n=t.path;t.path=e,0===a&&"placeholder"===Wt(t).type&&(e[e.length-1].offset=t.anchorOffset()-1,a=1),r={path:e,extent:a||0},t.path=n}else r=i;const n=0!==dt(t.path,r.path),o=r.extent!==t.extent;return(n||o)&&(n&&Gt(t),bt(t),t.path=mt(r.path),t.siblings().length=0?Rt(r):(It(r),$t(r,1));const n=Wt(r);do{t.bind(r)(r.path,Wt(r))&&a.push(r.toString()),i>=0?At(r,{iterateAll:!0}):qt(r,{iterateAll:!0})}while(n!==Wt(r));return a}const Yt="apple"===ti()?{id:"apple.en-intl",displayName:"English (international)",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","ı"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","Î"],KeyE:["e","E","´","´"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","˝"],KeyH:["h","H","˙","Ó"],KeyI:["i","I","ˆ","ˆ"],KeyJ:["j","J","∆","Ô"],KeyK:["k","K","˚",""],KeyL:["l","L","¬","Ò"],KeyM:["m","M","µ","Â"],KeyN:["n","N","˜","˜"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®","‰"],KeyS:["s","S","ß","Í"],KeyT:["t","T","†","ˇ"],KeyU:["u","U","¨","¨"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","˛"],KeyY:["y","Y","¥","Á"],KeyZ:["z","Z","Ω","¸"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","ˆ","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["-","_","–","—"],Equal:["=","+","≠","±"],BracketLeft:["[","{","“","”"],BracketRight:["]","}","‘","’"],Backslash:["\\","|","«","»"],Semicolon:[";",":","…","Ú"],Quote:["'",'"',"æ","Æ"],Backquote:["`","˜","`","`"],Comma:[",","<","≤","¯"],Period:[".",">","≥","˘"],Slash:["/","?","÷","¿"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}}:"windows"===ti()?{id:"windows.en-intl",displayName:"English (international)",platform:"windows",locale:"en",score:0,mapping:{KeyA:["a","A","á","Á"],KeyB:["b","B","",""],KeyC:["c","C","©","¢"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","é","É"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","í","Í"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","ø","Ø"],KeyM:["m","M","µ",""],KeyN:["n","N","ñ","Ñ"],KeyO:["o","O","ó","Ó"],KeyP:["p","P","ö","Ö"],KeyQ:["q","Q","ä","Ä"],KeyR:["r","R","®",""],KeyS:["s","S","ß","§"],KeyT:["t","T","þ","Þ"],KeyU:["u","U","ú","Ú"],KeyV:["v","V","",""],KeyW:["w","W","å","Å"],KeyX:["x","X","",""],KeyY:["y","Y","ü","Ü"],KeyZ:["z","Z","æ","Æ"],Digit1:["1","!","¡","¹"],Digit2:["2","@","²",""],Digit3:["3","#","³",""],Digit4:["4","$","¤","£"],Digit5:["5","%","€",""],Digit6:["6","^","¼",""],Digit7:["7","&","½",""],Digit8:["8","*","¾",""],Digit9:["9","(","‘",""],Digit0:["0",")","’",""],Space:[" "," ","",""],Minus:["-","_","¥",""],Equal:["=","+","×","÷"],BracketLeft:["[","{","«",""],BracketRight:["]","}","»",""],Backslash:["\\","|","¬","¦"],Semicolon:[";",":","¶","°"],Quote:["'",'"',"´","¨"],Backquote:["`","~","",""],Comma:[",","<","ç","Ç"],Period:[".",">","",""],Slash:["/","?","¿",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}}:{id:"linux.en",displayName:"English",platform:"linux",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Qt={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Jt=[];let ei;function ti(){let e="linux";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?e="apple":/^(win)/i.test(navigator.platform)?e="windows":/(android)/i.test(navigator.userAgent)?e="linux":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e="apple":/\bCrOS\b/i.test(navigator.userAgent)&&(e="linux")),e}function ii(e){e.platform===ti()&&Jt.push(e)}function ai(e){ei=Jt.find(t=>e.startsWith(t.locale))}function ri(){return null!=ei?ei:Jt[0]}ii(Yt),ii({id:"apple.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","‡","Ω"],KeyB:["b","B","ß","∫"],KeyC:["c","C","©","¢"],KeyD:["d","D","∂","∆"],KeyE:["e","E","ê","Ê"],KeyF:["f","F","ƒ","·"],KeyG:["g","G","fi","fl"],KeyH:["h","H","Ì","Î"],KeyI:["i","I","î","ï"],KeyJ:["j","J","Ï","Í"],KeyK:["k","K","È","Ë"],KeyL:["l","L","¬","|"],KeyM:[",","?","∞","¿"],KeyN:["n","N","~","ı"],KeyO:["o","O","œ","Œ"],KeyP:["p","P","π","∏"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","®","‚"],KeyS:["s","S","Ò","∑"],KeyT:["t","T","†","™"],KeyU:["u","U","º","ª"],KeyV:["v","V","◊","√"],KeyW:["z","Z","Â","Å"],KeyX:["x","X","≈","⁄"],KeyY:["y","Y","Ú","Ÿ"],KeyZ:["w","W","‹","›"],Digit1:["&","1","","´"],Digit2:["é","2","ë","„"],Digit3:['"',"3","“","”"],Digit4:["'","4","‘","’"],Digit5:["(","5","{","["],Digit6:["§","6","¶","å"],Digit7:["è","7","«","»"],Digit8:["!","8","¡","Û"],Digit9:["ç","9","Ç","Á"],Digit0:["à","0","ø","Ø"],Space:[" "," "," "," "],Minus:[")","°","}","]"],Equal:["-","_","—","–"],BracketLeft:["^","¨","ô","Ô"],BracketRight:["$","*","€","¥"],Backslash:["`","£","@","#"],Semicolon:["m","M","µ","Ó"],Quote:["ù","%","Ù","‰"],Backquote:["<",">","≤","≥"],Comma:[";",".","…","•"],Period:[":","/","÷","\\"],Slash:["=","+","≠","±"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","•","Ÿ"],NumpadEqual:["=","=","=","="]}}),ii({id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","ß",""],KeyC:["c","C","©"," "],KeyD:["d","D","∂","∆"],KeyE:["e","E","€","€"],KeyF:["f","F","ƒ","fi"],KeyG:["g","G","","fl"],KeyH:["h","H","™"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","¶","¯"],KeyK:["k","K","§","ˇ"],KeyL:["l","L"," ","˘"],KeyM:["m","M","µ","˚"],KeyN:["n","N"," ","˙"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®"," "],KeyS:["s","S","∫"," "],KeyT:["t","T","†","‡"],KeyU:["u","U"," "," "],KeyV:["v","V","√","◊"],KeyW:["w","W","æ","Æ"],KeyX:["x","X","∑","›"],KeyY:["y","Y","¥"," "],KeyZ:["z","Z","Ω","‹"],Digit1:["1","!","|","ı"],Digit2:["2",'"',"@","˝"],Digit3:["3","·","#","•"],Digit4:["4","$","¢","£"],Digit5:["5","%","∞","‰"],Digit6:["6","&","¬"," "],Digit7:["7","/","÷","⁄"],Digit8:["8","(","“","‘"],Digit9:["9",")","”","’"],Digit0:["0","=","≠","≈"],Space:[" "," "," "," "],Minus:["'","?","´","¸"],Equal:["¡","¿","‚","˛"],BracketLeft:["`","^","[","ˆ"],BracketRight:["+","*","]","±"],Backslash:["ç","Ç","}","»"],Semicolon:["ñ","Ñ","~","˜"],Quote:["´","¨","{","«"],Backquote:["<",">","≤","≥"],Comma:[",",";","„",""],Period:[".",":","…","…"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["º","ª","\\","°"]}}),ii({id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","·","#",""],Digit4:["4","$","~",""],Digit5:["5","%","€",""],Digit6:["6","&","¬",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["¡","¿","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["ç","Ç","}",""],Semicolon:["ñ","Ñ","",""],Quote:["´","¨","{",""],Backquote:["º","ª","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ii({id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["z","Z","«","<"],Digit1:["1","!","|","¡"],Digit2:["2",'"',"@","⅛"],Digit3:["3","·","#","£"],Digit4:["4","$","~","$"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["'","?","\\","¿"],Equal:["¡","¿","̃","~"],BracketLeft:["̀","̂","[","̊"],BracketRight:["+","*","]","̄"],Backslash:["ç","Ç","}","̆"],Semicolon:["ñ","Ñ","~","̋"],Quote:["́","̈","{","{"],Backquote:["º","ª","\\","\\"],Comma:[",",";","─","×"],Period:[".",":","·","÷"],Slash:["-","_","̣","̇"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}}),ii({id:"linux.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","@","Ω"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:[",","?","́","̋"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["z","Z","«","<"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["w","W","ł","Ł"],Digit1:["&","1","¹","¡"],Digit2:["é","2","~","⅛"],Digit3:['"',"3","#","£"],Digit4:["'","4","{","$"],Digit5:["(","5","[","⅜"],Digit6:["-","6","|","⅝"],Digit7:["è","7","`","⅞"],Digit8:["_","8","\\","™"],Digit9:["ç","9","^","±"],Digit0:["à","0","@","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:[")","°","]","¿"],Equal:["=","+","}","̨"],BracketLeft:["̂","̈","̈","̊"],BracketRight:["$","£","¤","̄"],Backslash:["*","µ","̀","̆"],Semicolon:["m","M","µ","º"],Quote:["ù","%","̂","̌"],Backquote:["²","~","¬","¬"],Comma:[";",".","─","×"],Period:[":","/","·","÷"],Slash:["!","§","̣","̇"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"]}}),ii({id:"windows.french",locale:"fr",displayName:"French",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["é","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["è","7","`",""],Digit8:["_","8","\\",""],Digit9:["ç","9","^",""],Digit0:["à","0","@",""],Space:[" "," ","",""],Minus:[")","°","]",""],Equal:["=","+","}",""],BracketLeft:["^","¨","",""],BracketRight:["$","£","¤",""],Backslash:["*","µ","",""],Semicolon:["m","M","",""],Quote:["ù","%","",""],Backquote:["²","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","§","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ii({id:"windows.german",locale:"de",displayName:"German",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","µ",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"²",""],Digit3:["3","§","³",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["ß","?","\\","ẞ"],Equal:["´","`","",""],BracketLeft:["ü","Ü","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["ö","Ö","",""],Quote:["ä","Ä","",""],Backquote:["^","°","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}}),ii({id:"apple.german",locale:"de",displayName:"German",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","‹"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","™"],KeyE:["e","E","€","‰"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","Ì"],KeyH:["h","H","ª","Ó"],KeyI:["i","I","⁄","Û"],KeyJ:["j","J","º","ı"],KeyK:["k","K","∆","ˆ"],KeyL:["l","L","@","fl"],KeyM:["m","M","µ","˘"],KeyN:["n","N","~","›"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","«","»"],KeyR:["r","R","®","¸"],KeyS:["s","S","‚","Í"],KeyT:["t","T","†","˝"],KeyU:["u","U","¨","Á"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","Ù"],KeyY:["z","Z","Ω","ˇ"],KeyZ:["y","Y","¥","‡"],Digit1:["1","!","¡","¬"],Digit2:["2",'"',"“","”"],Digit3:["3","§","¶","#"],Digit4:["4","$","¢","£"],Digit5:["5","%","[","fi"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","˜"],Digit9:["9",")","}","·"],Digit0:["0","=","≠","¯"],Space:[" "," "," "," "],Minus:["ß","?","¿","˙"],Equal:["´","`","'","˚"],BracketLeft:["ü","Ü","•","°"],BracketRight:["+","*","±",""],Backslash:["#","'","‘","’"],Semicolon:["ö","Ö","œ","Œ"],Quote:["ä","Ä","æ","Æ"],Backquote:["<",">","≤","≥"],Comma:[",",";","∞","˛"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","°","„","“"],NumpadEqual:["=","=","=","="]}});const ni=[{key:"ctrl+alt+e",command:["insert","\\text{cmd+alt+e}"]},{key:"cmd+alt+a",command:["insert","\\text{cmd+alt+a}"]},{key:"ctrl+alt+a",command:["insert","\\text{ctrl+alt+a}"]},{key:"meta+alt+2",command:["insert","\\text{meta+alt+2}"]},{key:"ctrl+alt+shift+a",command:["insert","\\text{ctrl+alt+shift+a}"]},{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendToPreviousChar"},{key:"shift+[ArrowRight]",command:"extendToNextChar"},{key:"shift+[ArrowUp]",command:"extendUp"},{key:"shift+[ArrowDown]",command:"extendDown"},{key:"[Backspace]",command:"deletePreviousChar"},{key:"alt+[Delete]",command:"deletePreviousChar"},{key:"[Delete]",command:"deleteNextChar"},{key:"alt+[Backspace]",command:"deleteNextChar"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"alt+shift+[ArrowLeft]",command:"extendToPreviousWord"},{key:"alt+shift+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"ctrl+shift+[ArrowLeft]",command:"extendToGroupStart"},{key:"ctrl+shift+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Space]",ifMode:"math",command:"moveAfterParent"},{key:"shift+[Space]",ifMode:"math",command:"moveBeforeParent"},{key:"[Home]",command:"moveToMathFieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathFieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"cmd+shift+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathFieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathFieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"cmd+shift+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",ifMode:"math",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"math",command:"moveToPreviousPlaceholder"},{key:"[Tab]",ifMode:"text",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"text",command:"moveToPreviousPlaceholder"},{key:"[Escape]",ifMode:"math",command:["switch-mode","command"]},{key:"\\",ifMode:"math",command:["switch-mode","command"]},{key:"alt+[Equal]",ifMode:"math",command:["applyStyle",{mode:"text"}]},{key:"alt+[Equal]",ifMode:"text",command:["applyStyle",{mode:"math"}]},{key:"[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[Tab]",ifMode:"command",command:["complete",{acceptSuggestion:!0}]},{key:"[Return]",ifMode:"command",command:"complete"},{key:"[Enter]",ifMode:"command",command:"complete"},{key:"shift+[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[ArrowDown]",ifMode:"command",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"command",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deletePreviousChar"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"[Undo]",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+y",command:"redo"},{key:"ctrl+shift+z",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+z",command:"redo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathFieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathFieldEnd"},{key:"ctrl+shift+b",ifPlatform:"macos",command:"extendToPreviousChar"},{key:"ctrl+shift+f",ifPlatform:"macos",command:"extendToNextChar"},{key:"ctrl+shift+p",ifPlatform:"macos",command:"extendUp"},{key:"ctrl+shift+n",ifPlatform:"macos",command:"extendDown"},{key:"ctrl+shift+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"ctrl+shift+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"ctrl+alt+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"ctrl+alt+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"ctrl+shift+alt+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"ctrl+shift+alt+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deletePreviousChar"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteNextChar"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"shift+[Quote]",ifMode:"math",command:["switchMode","text","","“"]},{key:"shift+[Quote]",ifMode:"text",command:["switch-mode","math","”",""]},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Minus]",ifMode:"math",command:"moveToSubscript"},{key:"alt+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrack #0 \\right\\rbrack$$"]},{key:"alt+shift+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrace #0 \\right\\rbrace$$"]},{key:"[Return]",ifMode:"math",command:"addRowAfter"},{key:"[Enter]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"math",command:"addColumnAfter"},{key:"[Return]",ifMode:"text",command:"addRowAfter"},{key:"[Enter]",ifMode:"text",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"text",command:"addColumnAfter"},{key:"alt+p",ifMode:"math",command:["insert","$$\\pi$$"]},{key:"alt+v",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"alt+w",ifMode:"math",command:["insert","$$\\sum_{i=#?}^{#?}$$"]},{key:"alt+u",ifMode:"math",command:["insert","$$\\cup$$"]},{key:"alt+n",ifMode:"math",command:["insert","$$\\cap$$"]},{key:"alt+o",ifMode:"math",command:["insert","$$\\emptyset$$"]},{key:"alt+d",ifMode:"math",command:["insert","$$\\differentialD$$"]},{key:"alt+shift+o",ifMode:"math",command:["insert","$$\\varnothing$$"]},{key:"alt+shift+d",ifMode:"math",command:["insert","$$\\partial$$"]},{key:"alt+shift+p",ifMode:"math",command:["insert","$$\\prod_{i=#?}^{#?}$$"]},{key:"alt+shift+u",ifMode:"math",command:["insert","$$\\bigcup$$"]},{key:"alt+shift+n",ifMode:"math",command:["insert","$$\\bigcap$$"]},{key:"alt+shift+a",ifMode:"math",command:["insert","$$\\forall$$"]},{key:"alt+shift+e",ifMode:"math",command:["insert","$$\\exists$$"]},{key:"alt+[Digit5]",ifMode:"math",command:["insert","$\\infty$$"]},{key:"alt+[Digit6]",ifMode:"math",command:["insert","$$\\wedge$$"]},{key:"alt+shift+[Digit6]",ifMode:"math",command:["insert","$$\\vee$$"]},{key:"alt+[Digit9]",ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifMode:"math",command:["insert",")"]},{key:"alt+shift+[Backslash]",ifMode:"math",command:["insert","|"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","$$\\backslash$$"]},{key:"/",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+/",ifMode:"math",command:["insert","$$\\/$$"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+[Backquote]",ifMode:"math",command:["insert","$$\\~$$"]},{key:"alt+shift+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleVirtualKeyboard"},{key:"ctrl+alt+[ArrowUp]",command:["speak","parent",{withHighlighting:!1}]},{key:"ctrl+alt+[ArrowDown]",command:["speak","all",{withHighlighting:!1}]}],oi={"\\theta":"alt+q","\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\prod":"alt+shift+p","\\sum":"alt+w","\\int":"alt+b","\\cup":"alt+u","\\cap":"alt+n","\\bigcup":"alt+shift+u","\\bigcap":"alt+shift+n","\\forall":"alt+shift+a","\\exists":"alt+shift+e","\\infty":"alt+[Digit5]","\\wedge":"alt+[Digit5]","\\vee":"alt+shift+[Digit6]","\\differentialD":"alt+d","\\partial":"alt+shift+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"alt+shift+o","\\~":"~"};function si(e){if((null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)){let t;if(/^(mac)/i.test(navigator.platform)?t="macos":/^(win)/i.test(navigator.platform)?t="windows":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos"),e.startsWith("!")&&!e.endsWith(t))return!0;if(e.endsWith(t))return!0}return!1}function li(t){let i=t;return e(i)&&(i=i.length>0?i[0]+"("+i.slice(1).join("")+")":""),i}function ci(e){var t;const i=si("macos")||si("ios"),a=e.split("+");let r="";for(const e of a)!i&&r&&(r+='+'),e.startsWith("Key")?r+=e.substr(3,1):e.startsWith("Digit")?r+=e.substr(5,1):r+=null!==(t={cmd:"⌘",meta:i?"⌘":"command",shift:i?"⇧":"shift",alt:i?"⌥":"alt",ctrl:i?"⌃":"control","\n":i?"⏎":"return","[return]":i?"⏎":"return","[enter]":i?"⌤":"enter","[tab]":i?"⇥":"tab","[escape]":"esc","[backspace]":i?"⌫":"backspace","[delete]":i?"⌦":"del","[pageup]":i?"⇞":"page up","[pagedown]":i?"⇟":"page down","[home]":i?"⤒":"home","[end]":i?"⤓":"end","[space]":"space","[equal]":"=","[minus]":"-","[comma]":",","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",bracketLeft:"[",bracketRight:"]",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"⇠",up:"⇡",right:"⇢",down:"⇣","[arrowleft]":"⇠","[arrowup]":"⇡","[arrowright]":"⇢","[arrowdown]":"⇣","[digit0]":"0","[digit1]":"1","[digit2]":"2","[digit3]":"3","[digit4]":"4","[digit5]":"5","[digit6]":"6","[digit7]":"7","[digit8]":"8","[digit9]":"9"}[e.toLowerCase()])&&void 0!==t?t:e.toUpperCase();return r}function di(e,t){const i=[],a=[];return e.forEach(e=>{try{const t=function(e){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);let t=e.key.split("+");const i=t.pop();let a=e.ifPlatform;if(t=t.map(e=>{const t=e.toLowerCase();if("cmd"===t){if(a&&"macos"!==a&&"ios"!==a)throw new Error('Unexpected "cmd" modifier with platform "'+a+'"');return a||(a=si("ios")?"ios":"macos"),"meta"}if("win"===t){if(a&&"windows"!==a)throw new Error('Unexpected "win" modifier with platform "'+a+'"');return a="windows","meta"}return t}),!a||si(a)){if(/^\[(.*)\]$/.test(i))t.push(i);else{const a=function(e){var t,i;const a=null!==(t=ri())&&void 0!==t?t:Yt;for(const[t,i]of Object.entries(a.mapping)){if(i[0]===e)return"["+t+"]";if(i[1]===e)return"shift+["+t+"]";if(i[2]===e)return"alt+["+t+"]";if(i[3]===e)return"shift+alt+["+t+"]"}return null!==(i=Qt[e])&&void 0!==i?i:""}(i);if(!a)throw new Error('Invalid keybinding key "'+e.key+'"');t=t.concat(a.split("+"))}return{...e,ifPlatform:a,key:t.join("+")}}}(e);t&&i.push(t)}catch(e){a.push(e.message)}}),a.length>0&&t(a),i}function mi(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.addEventListener(r[1],i,t)}else e.addEventListener(t,i,a)}}function pi(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.removeEventListener(r[1],i,t)}else e.removeEventListener(t,i,a)}}function ui(e,t){let i=document.getElementById(e);return i?i.setAttribute("data-refcount",Number(parseInt(i.getAttribute("data-refcount"))+1).toString()):(i=document.createElement("div"),i.setAttribute("aria-hidden","true"),i.setAttribute("data-refcount","1"),i.className=t,i.id=e,document.body.appendChild(i)),i}function hi(e){if(!e)return;const t=parseInt(e.getAttribute("data-refcount"));t<=1?e.remove():e.setAttribute("data-refcount",Number(t-1).toString())}function fi(e){return e.element&&e.element.mathfield===e}function gi(e){const t=function e(t){if(t.classList.contains("ML__caret")||t.classList.contains("ML__text-caret")||t.classList.contains("ML__command-caret"))return t;let i;for(const a of t.children)if(i=e(a),i)break;return i}(e);if(t){const e=t.getBoundingClientRect();return{x:e.right,y:e.bottom,height:e.height}}return null}function yi(e){const t=e.querySelectorAll(".ML__selected");if(t&&t.length>0){const i={top:1/0,bottom:-1/0,left:1/0,right:-1/0};t.forEach(e=>{const t=e.getBoundingClientRect();t.lefti.right&&(i.right=t.right),t.bottom>i.bottom&&(i.bottom=t.bottom),t.top{if("mousedown"!==i.type||1===i.buttons){i.stopPropagation(),i.preventDefault(),t.classList.add("pressed"),a=Date.now(),"touchstart"===i.type&&(n=i.changedTouches[0].identifier);const o=t.getAttribute("data-"+e.config.namespace+"command-pressed");o&&e.$perform(JSON.parse(o));const l=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldStart");l&&(r=t,s&&clearTimeout(s),s=window.setTimeout((function(){t.classList.contains("pressed")&&e.$perform(JSON.parse(l))}),300))}}),mi(t,"mouseleave touchcancel",()=>{t.classList.remove("pressed")}),mi(t,"touchmove:passive",e=>{e.preventDefault();for(let t=0;t{1===e.buttons&&t.classList.add("pressed")}),mi(t,"mouseup touchend click",i=>{if(o){i.stopPropagation(),i.preventDefault();const e=o;return o=null,void e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}if(t.classList.remove("pressed"),t.classList.add("active"),"click"===i.type&&0!==i.detail)return i.stopPropagation(),void i.preventDefault();window.setTimeout((function(){t.classList.remove("active")}),150);let n=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldEnd");const s=Date.now();(t!==r||sequal to","\\supseteq":"superset of or
    equal to","\\supset":"superset of","\\subset":"subset of","\\partial":"partial derivative","\\bigcup":"union","\\bigcap":"intersection","\\approx":"approximately equal to","\\notin":"not an element of","\\in":["element of","included in"],"\\infty":"infinity","\\land":"logical and","\\sqrt":"square root","\\prod":"product","\\sum":"summation","\\amalg":["amalgamation","coproduct","free product","disjoint union"],"\\cup":"union with","\\cap":"intersection with","\\int":"integral","\\iint":"surface integral","\\oint":"curve integral","\\iiint":"volume integral","\\iff":"if and only if","\\ln":"natural logarithm","\\boldsymbol":"bold","\\setminus":"set subtraction","\\stackrel":"relation with symbol above","\\stackbin":"operator with symbol above","\\underset":"symbol with annotation below","\\overset":"symbol with annotation above","\\hslash":["h-bar","Planck constant"],"\\gtrsim":"greater than or
    similar to","\\propto":"proportional to","\\equiv":"equivalent to","\\!":["negative thin space","(-3 mu)"],"\\ ":["space","(6 mu)"],"\\,":["thin space","(3 mu)"],"\\:":["medium space","(4 mu)"],"\\;":["thick space","(5 mu)"],"\\quad":["1 em space","(18 mu)"],"\\qquad":["2 em space","(36 mu)"],"\\enskip":["½ em space","(9 mu)"],"\\mp":"minus or plus","\\pm":"plus or minus","\\Im":"Imaginary part of","\\Re":"Real part of","\\gothicCapitalR":"Real part of","\\gothicCapitalI":"Imaginary part part of","\\differentialD":"differential d","\\aleph":["aleph","infinite cardinal",'Wikipedia '],"\\beth":["beth","beth number",'Wikipedia '],"\\gimel":["gimel","gimel function",'Wikipedia '],"\\O":"empty set","\\N":"set of
    natural numbers","\\Z":"set of
    integers","\\Q":"set of
    rational numbers","\\C":"set of
    complex numbers","\\R":"set of
    real numbers","\\P":"set of
    prime numbers","\\lesseqqgtr":"less than, equal to or
    greater than","\\gnapprox":"greater than and
    not approximately","\\lnapprox":"lesser than and
    not approximately","\\j":"dotless j","\\i":"dotless i","\\cdot":"centered dot","\\lmoustache":"left moustache","\\rmoustache":"right moustache","\\nabla":["nabla","del","differential vector operator"],"\\square":["square","d’Alembert operator",'Wikipedia '],"\\blacksquare":["black square","end of proof","tombstone","Halmos symbol"],"\\Box":"end of proof","\\colon":["such that","ratio"],"\\coloneq":["is defined by","is assigned"],"\\Colon":["is defined by","as"],"\\_":["underbar","underscore"],"\\ll":"much less than","\\gg":"much greater than","\\doteq":"approximately equal to","\\Doteq":"approximately equal to","\\doteqdot":"approximately equal to","\\cong":["isomorphism of","(for algebras, modules...)"],"\\det":["determinant of","(of a matrix)"],"\\dotplus":"Cartesian product algebra","\\otimes":["tensor product","(of algebras)","Kronecker product","(of matrices)"],"\\oplus":["direct sum","(of modules)"],"\\lb":"base-2 logarithm","\\lg":"base-10 logarithm","\\wp":["Weierstrass P",'Wikipedia '],"\\wr":["wreath product",'Wikipedia '],"\\top":["tautology","Proposition P is universally true"],"\\bot":["contradiction","Proposition P is contradictory"],"\\mid":["probability","of event A given B"],"\\mho":["Siemens","electrical conductance in SI unit",'Wikipedia '],"\\Longrightarrow":"implies","\\Longleftrightarrow":"if, and only if,","\\prec":"precedes","\\preceq":"precedes or is equal to","\\succ":"succeedes","\\succeq":"succeedes or is equal to","\\perp":["is perpendicular to","is independent of"],"\\models":["entails","double-turnstyle, models","is a semantic consequence of",'Wikipedia '],"\\vdash":["satisfies","turnstyle, assertion sign","syntactic inference",'Wikipedia '],"\\implies":["implies","logical consequence"],"\\impliedby":["implied by","logical consequence"],"\\surd":["surd","root of","checkmark"],"\\ltimes":["semi direct product",'Wikipedia '],"\\rtimes":["semi direct product",'Wikipedia '],"\\leftthreetimes":["semi direct product",'Wikipedia '],"\\rightthreetimes":["semi direct product",'Wikipedia '],"\\divideontimes":["divide on times"],"\\curlywedge":"nor","\\curlyvee":"nand","\\simeq":"is group isomorphic with","\\vartriangleleft":["is a normal subgroup of","is an ideal ring of"],"\\circ":["circle","ring","function composition"],"\\rlap":["overlap right","\\rlap{x}o"],"\\llap":["overlap left","o\\llap{/}"],"\\colorbox":["color box","\\colorbox{#fbc0bd}{...}"],"\\ast":["asterisk","reflexive closure (as a superscript)"],"\\bullet":"bullet","\\lim":"limit"};function xi(t,i,a){if(!i||0===i.length)return void wi(t);const r=i,n=function(e,t){const i=Je(e,"math",null,t.config.macros);return C(q(Ne({mathstyle:c.displaystyle,macros:t.config.macros},i),"ML__base"),"ML__mathlive").toMarkup()}(i,t),o=function(t){let i=vi[t]||"";return e(i)&&(i=i.join("
    ")),i}(r),s=function(t,i){let a=[];if("string"==typeof i){const t=oi[i];e(t)?a=t.slice():t&&a.push(t)}const r=li(i),n=new RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");return t.forEach(e=>{n.test(li(e.command))&&a.push(e)}),a.map(ci)}(t.keybindings,r).join("
    ");let l=a?'
    ':"";l+='',l+='
    '+n+"
    ",o&&(l+='
    '+o+"
    "),s&&(l+='
    '+s+"
    "),l+="
    ",l+=a?'
    ':"",function(e,t){e.popover.innerHTML=e.config.createHTML(t);const i=gi(e.field);i&&_i(e,i),e.popover.classList.add("is-visible")}(t,l);let d=t.popover.getElementsByClassName("ML__popover__content");d&&d.length>0&&bi(t,d[0],{default:["complete",{acceptSuggestion:!0}]}),d=t.popover.getElementsByClassName("ML__popover__prev-shortcut"),d&&d.length>0&&bi(t,d[0],"previousSuggestion"),d=t.popover.getElementsByClassName("ML__popover__next-shortcut"),d&&d.length>0&&bi(t,d[0],"nextSuggestion")}function ki(e,t){if(e.element&&e.element.mathfield===e&&e.popover.classList.contains("is-visible"))if(null==t?void 0:t.deferred)window.requestAnimationFrame(()=>ki(e));else if(Wt(e.model)&&"command"===Wt(e.model).type){const t=gi(e.field);t&&_i(e,t)}else wi(e)}function _i(e,t){const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,r=window.innerWidth-document.documentElement.clientWidth,n=window.innerHeight-document.documentElement.clientHeight,o=e.virtualKeyboardVisible?e.virtualKeyboard.offsetHeight:0;t.x+e.popover.offsetWidth/2>a-r?e.popover.style.left=a-e.popover.offsetWidth-r+"px":t.x-e.popover.offsetWidth/2<0?e.popover.style.left="0":e.popover.style.left=t.x-e.popover.offsetWidth/2+"px",t.y+e.popover.offsetHeight+5>i-n-o?(e.popover.classList.add("ML__popover--reverse-direction"),e.popover.style.top=t.y-t.height-e.popover.offsetHeight-5+"px"):(e.popover.classList.remove("ML__popover--reverse-direction"),e.popover.style.top=t.y+5+"px")}function wi(e){e.popover.classList.remove("is-visible")}function Mi(e,t=!1){var i;let a="";const r=wt(e);if(r){const n=t?e.anchorOffset()+1:r.end,o=e.siblings();for(let e=r.start;e"placeholder"===e.type));Pt(e,0),e.path[e.path.length-1].offset=i.start-1,0!==a.length&&zt(e,1,!1)||Lt(e,i.start+t.length-1)}else e.siblings().splice(i.start,i.end-i.start),Lt(e,i.start-1,0);kt(e)}}const Li={"\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrace":"{","\\rbrace":"}","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};function Ai(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function qi(e,t){return e&&t.generateID?' extid="'+e+'"':""}function $i(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="",o=-1,s=-1;const l=e.atoms[e.index];if(e.index0){if(a=!0,Ci(e)&&(o=e.index,e.index+=1),Di(e)&&(s=e.index,e.index+=1),o>=0&&s>=0)r=""+n,r+=Bi(e.atoms[s].subscript,0,0,i).mathML,r+=Bi(e.atoms[o].superscript,0,0,i).mathML,r+="";else if(o>=0){if(r=""+n,Ci(e)){const t=Bi(e.atoms[o].superscript,0,0,i).mathML,a=Bi(e.atoms[o+1].superscript,0,0,i).mathML;r+=""!==t&&""!==t||""!==a&&""!==a?""===t||""===t?"":t:""}else r+=Bi(e.atoms[o].superscript,0,0,i).mathML;r+=""}else s>=0?(r=""+n,r+=Bi(e.atoms[s].subscript,0,0,i).mathML,r+=""):r=n;"mi"!==e.lastType&&"mn"!==e.lastType&&"mtext"!==e.lastType&&"fence"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),n.endsWith(">f")||n.endsWith(">g")?(r+="&x2061;",e.lastType="applyfunction"):e.lastType=/^(.*)<\/mo>$/.test(r)?"mo":"mi",e.mathML+=r}return a}function Ci(e){return e.index"+e,r+=Bi(n.subscript,0,0,i).mathML,r+=Bi(n.superscript,0,0,i).mathML,r+=""):n.superscript?(r=""+e,r+=Bi(n.superscript,0,0,i).mathML,r+=""):n.subscript&&(r=""+e,r+=Bi(n.subscript,0,0,i).mathML,r+=""),r.length>0&&(a=!0,t.mathML+=r,t.lastType=""),a))}function Ei(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="";for(;e.index0&&(a=!0,n=""+n+"",e.mathML+=n,e.lastType="mtext"),a}function Ki(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="",o=function(e){let t=-1,i=e.index,a=!1,r=!1;for(;i=0&&o=0;)n+=e.atoms[e.index].body,e.index+=1;return n.length>0&&(a=!0,n=""+n+"",o<0&&Ci(e)&&(o=e.index,e.index+=1),o>=0&&(n=""+n,n+=Bi(e.atoms[o].superscript,0,0,i).mathML,n+=""),e.mathML+=n,e.lastType="mn"),a}function Ni(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";if(e.index",r+=Fi(e.atoms[l],i),r+=Bi(e.atoms,l+1,c,i).mathML,r+=Fi(e.atoms[c],i),r+="","mi"!==e.lastType&&"mn"!==e.lastType&&"mfrac"!==e.lastType&&"fence"!==e.lastType||(r=""+r),e.index=c+1,Ti(r,e,i)&&(a=!0,e.lastType="",r=""),n="fence")}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Oi(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";const o=e.atoms[e.index];if(e.index":"")+e,r+=Bi(o.subscript,0,0,i).mathML,r+=Bi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):o.superscript?(r+=("nolimits"!==o.limits?"":"")+e,r+=Bi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):(r+=("nolimits"!==o.limits?"":"")+e,r+=Bi(o.subscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""),n="mo"}else{const t=e.atoms[e.index],o="\\operatorname"===t.symbol,s=o?'"+Pi(t.body)+"":Fi(t,i);r+=s,e.index+=1,Ti(r,e,i)&&(a=!0,e.lastType="",r=""),e.index-=1,o||/^(.*)<\/mo>$/.test(s)?n=o?"mi":"mo":(r+="",n="applyfunction")}"mi"!==e.lastType&&"mn"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),e.index+=1}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Bi(e,t,i,a){const r={atoms:e,index:null!=t?t:0,mathML:"",lastType:""};if("number"==typeof e||"boolean"==typeof e)r.mathML=e.toString();else if("string"==typeof e)r.mathML=e;else if(e instanceof Oe)r.mathML=Ri(e,a);else if(Array.isArray(e)){let t=0;for(i=i||(e?e.length:0);r.index0&&"genfrac"===r.atoms[r.index].type&&(e=""+e),"genfrac"===r.atoms[r.index].type?r.lastType="mfrac":r.lastType="",e.length>0&&(r.mathML+=e,t+=1),r.index+=1}t>1&&(r.mathML=""+r.mathML+"")}return r}function Fi(e,t){let i="";const a=Pi(e.body);return a&&(i=""+a+""),i}function Pi(e){if(!e)return"";if("string"==typeof e)return Ai(e);if(!Array.isArray(e)&&"string"==typeof e.body)return Ai(e.body);let t="";for(const i of e)"string"==typeof i.body&&(t+=i.body);return Ai(t)}function Ri(e,t){var i,a,r,n,o,s,l,c,d,m,p,u;const h={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋"},f={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."},g={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let y,b,v,x,k,_,w="",M="",S={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"}[e.fontFamily||e.font]||"";S&&(S=' mathvariant="'+S+'"');const z=e.symbol;if("text"===e.mode)w=""+e.body+"";else switch(e.type){case"first":break;case"group":case"root":w=Bi(e.body,0,0,t).mathML;break;case"array":if((e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(w+="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Li[e.leftDelim]||e.leftDelim)+"")),w+="",y=0;y"+Bi(e.array[b][y],0,0,t).mathML+"";w+=""}w+="",(e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Li[e.leftDelim]||e.rightDelim)+""),w+="");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(w+=""),e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Li[e.leftDelim]||e.leftDelim)+""),e.hasBarLine?(w+="",w+=Bi(e.numer,0,0,t).mathML||" ",w+=Bi(e.denom,0,0,t).mathML||" ",w+=""):(w+="",w+=""+Bi(e.numer,0,0,t).mathML+"",w+=""+Bi(e.denom,0,0,t).mathML+"",w+=""),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Li[e.rightDelim]||e.rightDelim)+""),(e.leftDelim||e.rightDelim)&&(w+="");break;case"surd":e.index?(w+="",w+=Bi(e.body,0,0,t).mathML,w+=Bi(e.index,0,0,t).mathML,w+=""):(w+="",w+=Bi(e.body,0,0,t).mathML,w+="");break;case"leftright":w="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Li[e.leftDelim]||e.leftDelim)+""),e.body&&(w+=Bi(e.body,0,0,t).mathML),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Li[e.rightDelim]||e.rightDelim)+""),w+="";break;case"sizeddelim":case"delim":w+='"+(Li[e.delim]||e.delim)+"";break;case"accent":w+='",w+=Bi(e.body,0,0,t).mathML,w+=""+(Li[z]||e.accent)+"",w+="";break;case"line":case"overlap":break;case"overunder":k=e.overscript,x=e.underscript,(e.svgAbove||k)&&(e.svgBelow||x)?_=e.body:k&&k.length>0?(_=e.body,(null===(a=null===(i=e.body)||void 0===i?void 0:i[0])||void 0===a?void 0:a.underscript)?(x=e.body[0].underscript,_=e.body[0].body):"first"===(null===(n=null===(r=e.body)||void 0===r?void 0:r[0])||void 0===n?void 0:n.type)&&(null===(s=null===(o=e.body)||void 0===o?void 0:o[1])||void 0===s?void 0:s.underscript)&&(x=e.body[1].underscript,_=e.body[1].body)):x&&x.length>0&&(_=e.body,(null===(c=null===(l=e.body)||void 0===l?void 0:l[0])||void 0===c?void 0:c.overscript)?(k=e.body[0].overscript,_=e.body[0].body):"first"===(null===(m=null===(d=e.body)||void 0===d?void 0:d[0])||void 0===m?void 0:m.type)&&(null===(u=null===(p=e.body)||void 0===p?void 0:p[1])||void 0===u?void 0:u.overscript)&&(k=e.body[1].overscript,_=e.body[1].body)),(e.svgAbove||k)&&(e.svgBelow||x)?(w+=``,w+=h[e.svgBody]||Bi(_,0,0,t).mathML,w+=h[e.svgBelow]||Bi(x,0,0,t).mathML,w+=h[e.svgAbove]||Bi(k,0,0,t).mathML,w+=""):e.svgAbove||k?(w+=``+(h[e.svgBody]||Bi(_,0,0,t).mathML),w+=h[e.svgAbove]||Bi(k,0,0,t).mathML,w+=""):(e.svgBelow||x)&&(w+=``+(h[e.svgBody]||Bi(_,0,0,t).mathML),w+=h[e.svgBelow]||Bi(x,0,0,t).mathML,w+="");break;case"placeholder":case"mord":{w=f[z]||z||("string"==typeof e.body?e.body:"");const i=z?z.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null;i?w="&#x"+i[1]+";":w.length>0&&"\\"===w.charAt(0)&&(w="string"==typeof e.body&&e.body.charCodeAt(0)>255?"&#x"+("000000"+e.body.charCodeAt(0).toString(16)).substr(-4)+";":"string"==typeof e.body?e.body.charAt(0):e.body);const a=/\d/.test(w)?"mn":"mi";w="<"+a+S+qi(e.id,t)+">"+Ai(w)+"";break}case"mbin":case"mrel":case"textord":case"minner":w=z&&f[z]?""+f[z]+"":z&&Li[z]?""+Li[z]+"":Fi(e,t);break;case"mpunct":w='"+(Li[z]||z)+"";break;case"mop":"​"!==e.body&&(w="",w+="\\operatorname"===z?e.body:z||e.body,w+="");break;case"mathstyle":break;case"box":w='"+Bi(e.body,0,0,t).mathML+"";break;case"spacing":w+='';break;case"enclose":w=''+Bi(e.body,0,0,t).mathML+"";break;case"space":w+=" "}return w}function Ii(e,t){return Bi(e,0,0,t).mathML}function Hi(e){let t=0;for(let i=0;i{fi(e)&&e.dirty&&Vi(e)}))}function Vi(e,t){t=null!=t?t:{},e.dirty=!1,window.mathlive||(window.mathlive={}),Wt(e.model)||(e.model.path=[{relation:"body",offset:0}]),e.model.root.forEach(e=>{e.caret="",e.isSelected=!1,e.containsCaret=!1});const i=e.$hasFocus();if(Ft(e.model)?Wt(e.model).caret=i&&!e.config.readOnly?e.mode:"":jt(e.model,e=>{e.isSelected=!0}),i&&!e.config.readOnly){let t=e.model.ancestor(1),i=1,a=!1;for(;t&&!a;)"surd"!==t.type&&"leftright"!==t.type||(t.containsCaret=!0,a=!0),i+=1,t=e.model.ancestor(i)}const a=q(Ne({mathstyle:c.displaystyle,letterShapeStyle:e.config.letterShapeStyle,atomIdsSettings:{seed:Hi(e.model.root.toLatex(!1)),groupNumbers:t.forHighlighting},smartFence:e.config.smartFence,macros:e.config.macros},e.model.root),"ML__base");a.attributes={translate:"no","aria-hidden":"true"};const r=C(a,"ML__mathlive");e.field.innerHTML=e.config.createHTML(r.toMarkup(0,e.config.horizontalSpacingScale)),e.field.classList.toggle("ML__focused",i&&!e.config.readOnly),e.accessibleNode.innerHTML=e.config.createHTML(''+Ii(e.model.root,e.config)+"");const n=yi(e.field);if(null!==n){const t=document.createElement("div");t.classList.add("ML__selection"),t.style.position="absolute",t.style.left=Number(n.left).toString()+"px",t.style.top=Number(n.top).toString()+"px",t.style.width=Number(Math.ceil(n.right-n.left)).toString()+"px",t.style.height=Number(Math.ceil(n.bottom-n.top-1)).toString()+"px",e.field.insertBefore(t,e.field.childNodes[0])}}const Ui={};function ji(e,t){t=null!=t?t:{target:"mathfield",canUndo:!1},Object.keys(e).forEach(i=>{Ui[i]={...t,fn:e[i]}})}function Gi(e,t=",",i){if(!e)return[];let a,r=[];for(let n of e)n&&n.length>0&&"first"===n[0].type&&(n=n.slice(1)),n&&n.length>0&&(a?r.push(a):a=new Oe("math","mpunct",t,i),r=r.concat(n));return r}function Xi(t,i){const a=t.parent();if(a&&"array"===a.type&&e(a.array)){const e=t.relation();if(a.array){const r=ut(a.array,e);"after row"===i||"before row"===i?(r.col=0,r.row=r.row+("after row"===i?1:0),a.array.splice(r.row,0,[[]])):(r.col+="after column"===i?1:0,a.array[r.row].splice(r.col,0,[]));const n=pt(a.array,r);t.path.pop(),t.path.push({relation:"cell"+n.toString(),offset:0}),t.insertFirstAtom()}}}function Zi(e){var t;const i=e.parent();if("leftright"===i.type){i.type="array";const a=null!==(t={"(":"pmatrix","\\lbrack":"bmatrix","\\lbrace":"cases"}[i.leftDelim])&&void 0!==t?t:"matrix",r=ie(a),n=[[i.body]];Object.assign(i,r.parser(a,[],n)),i.mode=Mt(e),i.environmentName=a,i.array=n,i.rowGaps=[0],delete i.body,e.path[e.path.length-1].relation="cell0"}}function Yi(e){return xt(e),Zi(e),Xi(e,"after row"),kt(e),!0}function Qi(e){return xt(e),Zi(e),Xi(e,"after column"),kt(e),!0}function Ji(e,t=0){xt(e),bt(e);const i=e.suppressChangeNotifications;if(e.suppressChangeNotifications=!0,t=t<0?-1:t>0?1:t,ot(e),e.parent().array&&t<0&&0===e.startOffset()){const t=e.parent().array;if(function(e){const t={col:0,row:0};for(;t.row0){let e=t.length;"first"===t[0].type&&(e-=1),e>0&&(i+=1)}a.row+=1}return i}(t,i.col)&&(function(e,t){let i=0;for(;i"placeholder"!==e.type&&"first"!==e.type);e.parent()[t]=null,e.path.pop(),e.siblings().splice(e.anchorOffset(),0,...i),Lt(e,e.anchorOffset()-1),e.announce("deleted: "+t)}else if("denom"===t){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),Lt(e,e.anchorOffset()+t.length-1),e.announce("deleted: denominator")}else if("body"===t){const t=e.siblings().filter(e=>"placeholder"!==e.type);e.path.length>1&&(t.shift(),e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...t),Lt(e,e.anchorOffset()-1),e.announce("deleted: root"))}else $t(e,-1),ea(e,-1)}else if(t>0)if(i!==a.length-1)/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(e.sibling(1).type)?$t(e,1):(e.announce("deleted",null,a.slice(i+1,i+2)),a.splice(i+1,1));else if("numer"===e.relation()){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),Lt(e,e.anchorOffset()+t.length-1),e.announce("deleted: numerator")}else $t(e,1),ea(e,-1)}else{const t=e.startOffset()+1,i=e.endOffset()+1;e.announce("deleted",null,a.slice(t,i)),a.splice(t,i-t),Lt(e,t-1)}st(e),e.suppressChangeNotifications=i,vt(e),kt(e)}function ea(e,t=0){if(0===t)Ji(e,0);else if(t>0)for(;t>0;)Ji(e,1),t--;else for(;t<0;)Ji(e,-1),t++;return!0}ji({performWithFeedback:(e,t)=>function(e,t){return e.$focus(),e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),"moveToNextPlaceholder"===(t=t.replace(/-\w/g,e=>e[1].toUpperCase()))||"moveToPreviousPlaceholder"===t||"complete"===t?e.returnKeypressSound?(e.returnKeypressSound.load(),e.returnKeypressSound.play().catch(e=>{})):e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):"deletePreviousChar"!==t&&"deleteNextChar"!==t&&"deletePreviousWord"!==t&&"deleteNextWord"!==t&&"deleteToGroupStart"!==t&&"deleteToGroupEnd"!==t&&"deleteToMathFieldStart"!==t&&"deleteToMathFieldEnd"!==t||!e.deleteKeypressSound?e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):(e.deleteKeypressSound.load(),e.deleteKeypressSound.play().catch(e=>{})),e.$perform(t)}(e,t)}),ji({addRowAfter:Yi,addColumnAfter:Qi,addRowBefore:function(e){return xt(e),Zi(e),Xi(e,"before row"),kt(e),!0},addColumnBefore:function(e){return xt(e),Zi(e),Xi(e,"before column"),kt(e),!0}},{target:"model",category:"array-edit"});const ta={"''":{mode:"math",value:"^{\\doubleprime}"},alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:{mode:"math",value:"\\pi"},"pi ":{mode:"text",value:"\\pi "},Pi:{mode:"math",value:"\\Pi"},theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:{mode:"math",value:"\\nabla"},grad:{mode:"math",value:"\\nabla"},del:{mode:"math",value:"\\partial"},"∞":"\\infty",oo:{mode:"math",after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":{mode:"math",value:"\\sum"},sum:{mode:"math",value:"\\sum_{#?}^{#?}"},prod:{mode:"math",value:"\\prod_{#?}^{#?}"},sqrt:{mode:"math",value:"\\sqrt"},"∆":{mode:"math",value:"\\differentialD"},"∂":{mode:"math",value:"\\differentialD"},arcsin:{mode:"math",value:"\\arcsin"},arccos:{mode:"math",value:"\\arccos"},arctan:{mode:"math",value:"\\arctan"},sin:{mode:"math",value:"\\sin"},sinh:{mode:"math",value:"\\sinh"},cos:{mode:"math",value:"\\cos"},cosh:{mode:"math",value:"\\cosh"},tan:{mode:"math",value:"\\tan"},tanh:{mode:"math",value:"\\tanh"},sec:{mode:"math",value:"\\sec"},csc:{mode:"math",value:"\\csc"},cot:{mode:"math",value:"\\cot"},log:{mode:"math",value:"\\log"},ln:{mode:"math",value:"\\ln"},exp:{mode:"math",value:"\\exp"},lim:{mode:"math",value:"\\lim_{#?}"},dx:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:{mode:"math",value:"\\forall"},EE:{mode:"math",value:"\\exists"},"!EE":{mode:"math",value:"\\nexists"},"&&":{mode:"math",value:"\\land"},xin:{mode:"math",after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{mode:"math",after:"nothing+letter+closefence",value:"\\in"},"!in":{mode:"math",value:"\\notin"},NN:"\\N",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",PP:"\\P",xx:{mode:"math",value:"\\times"},"+-":{mode:"math",value:"\\pm"},"!=":{mode:"math",value:"\\ne"},">=":{mode:"math",value:"\\ge"},"<=":{mode:"math",value:"\\le"},"<<":{mode:"math",value:"\\ll"},">>":{mode:"math",value:"\\gg"},"~~":{mode:"math",value:"\\approx"},"≈":{mode:"math",value:"\\approx"},"?=":{mode:"math",value:"\\questeq"},"÷":{mode:"math",value:"\\div"},"¬":{mode:"math",value:"\\neg"},":=":{mode:"math",value:"\\coloneq"},"::":{mode:"math",value:"\\Colon"},"(:":{mode:"math",value:"\\langle"},":)":{mode:"math",value:"\\rangle"},beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},"eta ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta "},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},"mu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu "},nu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},"nu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu "},"µ":"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega","Ω":"\\omega",forall:{mode:"math",value:"\\forall"},exists:{mode:"math",value:"\\exists"},"!exists":{mode:"math",value:"\\nexists"},":.":{mode:"math",value:"\\therefore"},liminf:"\\operatorname*{lim~inf}_{#?}",limsup:"\\operatorname*{lim~sup}_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:{mode:"math",value:"\\mod"},max:{mode:"math",value:"\\max"},min:{mode:"math",value:"\\min"},erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:{mode:"math",value:"\\operatorname{bessel}"},mean:{mode:"math",value:"\\operatorname{mean}"},median:{mode:"math",value:"\\operatorname{median}"},fft:{mode:"math",value:"\\operatorname{fft}"},lcm:{mode:"math",value:"\\operatorname{lcm}"},gcd:{mode:"math",value:"\\operatorname{gcd}"},randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:{mode:"math",value:"\\operatorname{Re}"},Im:{mode:"math",value:"\\operatorname{Im}"},mm:{mode:"math",after:"nothing+digit",value:"\\operatorname{mm}"},cm:{mode:"math",after:"nothing+digit",value:"\\operatorname{cm}"},km:{mode:"math",after:"nothing+digit",value:"\\operatorname{km}"},kg:{mode:"math",after:"nothing+digit",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","->":"\\to","|->":"\\mapsto","--\x3e":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","{":"\\{","}":"\\}","*":"\\cdot"};function ia(e,t,i){var a;return function(e,t){if(!t)return"";if("string"==typeof t)return t;if(!e)return t.value;let i=!1,a=!1,r=!1,n=!1,o=!1,s=!1,l=!1,c=!1,d=!1,m=!1,p=!1,u=!1,h=!1,f=!1,g=e[e.length-1],y=e.length-1;for(;g&&/msubsup|placeholder/.test(g.type);)y-=1,g=e[y];if(i=!g||"first"===g.type,g){if(void 0!==t.mode&&g.mode!==t.mode)return"";h="text"===g.mode,a=!h&&"mord"===g.type&&W.test(g.body),r=!h&&"mord"===g.type&&/[0-9]+$/.test(g.body),n=!h&&g.isFunction,o="genfrac"===g.type,s="surd"===g.type,l="mbin"===g.type,c="mrel"===g.type,d="mpunct"===g.type||"minner"===g.type,m=Boolean(g.array),p="mopen"===g.type,u="mclose"===g.type||"leftright"===g.type,f="space"===g.type}return void 0!==t.after?/nothing/.test(t.after)&&i||/letter/.test(t.after)&&a||/digit/.test(t.after)&&r||/function/.test(t.after)&&n||/frac/.test(t.after)&&o||/surd/.test(t.after)&&s||/binop/.test(t.after)&&l||/relop/.test(t.after)&&c||/punct/.test(t.after)&&d||/array/.test(t.after)&&m||/openfence/.test(t.after)&&p||/closefence/.test(t.after)&&u||/text/.test(t.after)&&h||/space/.test(t.after)&&f?t.value:"":t.value}(e,null!==(a=null==i?void 0:i[t])&&void 0!==a?a:ta[t])}function aa(e,t){if(!e)return["latex",""];if(e.length<=1)return["latex",e];if(!t||"ASCIIMath"!==t.format){const t=e.trim();if(t.startsWith("$$")&&t.endsWith("$$")||t.startsWith("\\[")&&t.endsWith("\\]")||t.startsWith("\\(")&&t.endsWith("\\)"))return["latex",t.substring(2,t.length-2)];if(t.startsWith("$")&&t.endsWith("$"))return["latex",t.substring(1,t.length-1)];if(e=e.replace(/\\\\([^\s\n])/g,"\\$1"),/\\/.test(e))return["latex",e]}return e=(e=(e=(e=(e=(e=e.replace(/\u2061/gu,"")).replace(/\u3016/gu,"{")).replace(/\u3017/gu,"}")).replace(/([^\\])sinx/g,"$1\\sin x")).replace(/([^\\])cosx/g,"$1\\cos x ")).replace(/\u2013/g,"-"),[(null==t?void 0:t.format)||"ASCIIMath",ra(e,null!=t?t:{})]}function ra(e,t){var i,a,r,n,o,s,l;if(!e)return"";let c,d=!1;if(d||"^"!==e[0]&&"_"!==e[0]||(c=na(e.substr(1),{inlineShortcuts:null!==(i=null==t?void 0:t.inlineShortcuts)&&void 0!==i?i:{},noWrap:!0}),e=e[0]+"{"+c.match+"}",e+=ra(c.rest,t),d=!0),d||(c=e.match(/^(sqrt|\u221a)(.*)/),c&&(c=na(c[2],{inlineShortcuts:null!==(a=null==t?void 0:t.inlineShortcuts)&&void 0!==a?a:{},noWrap:!0}),e="\\sqrt{"+c.match+"}",e+=ra(c.rest,t),d=!0)),d||(c=e.match(/^(\\cbrt|\u221b)(.*)/),c&&(c=na(c[2],{inlineShortcuts:null!==(r=null==t?void 0:t.inlineShortcuts)&&void 0!==r?r:{},noWrap:!0}),e="\\sqrt[3]{"+c.match+"}",e+=ra(c.rest,t),d=!0)),d||(c=e.match(/^abs(.*)/),c&&(c=na(c[1],{inlineShortcuts:null!==(n=null==t?void 0:t.inlineShortcuts)&&void 0!==n?n:{},noWrap:!0}),e="\\left|"+c.match+"\\right|",e+=ra(c.rest,t),d=!0)),d||(c=e.match(/^["”“](.*?)["”“](.*)/),c&&(e="\\text{"+c[1]+"}",e+=ra(c[2],t),d=!0)),d||(c=e.match(/^([^a-zA-Z({[_^\\\s"]+)(.*)/),c&&(e=oa(c[1],t),e+=ra(c[2],t),d=!0)),!d&&/^(f|g|h)[^a-zA-Z]/.test(e)&&(c=na(e.substring(1),{inlineShortcuts:null!==(o=t.inlineShortcuts)&&void 0!==o?o:{},noWrap:!0}),e="("===e[1]?e[0]+"\\mleft("+c.match+"\\mright)":e[0]+c.match,e+=ra(c.rest,t),d=!0),d||(c=e.match(/^([a-zA-Z]+)(.*)/),c&&(e=oa(c[1],t),e+=ra(c[2],t),d=!0)),!d)if(c=na(e,{inlineShortcuts:null!==(s=t.inlineShortcuts)&&void 0!==s?s:{},noWrap:!0}),c.match&&"/"===c.rest[0]){const i=na(c.rest.substr(1),{inlineShortcuts:null!==(l=t.inlineShortcuts)&&void 0!==l?l:{},noWrap:!0});i.match&&(e="\\frac{"+c.match+"}{"+i.match+"}"+ra(i.rest,t)),d=!0}else c.match&&(e="("===e[0]?"\\left("+c.match+"\\right)"+ra(c.rest,t):c.match+ra(c.rest,t),d=!0);return d||(c=e.match(/^(\s+)(.*)$/),c&&(e=" "+ra(c[2],t),d=!0)),e}function na(e,t){let i="",a=e=e.trim(),r=e.charAt(0),n={"(":")","{":"}","[":"]"}[r];if(n){let o=1,s=1;for(;s0;)e[s]===r&&o++,e[s]===n&&o--,s++;0===o?(t.noWrap&&"("===r?i=ra(e.substring(1,s-1),t):("{"===r&&"}"===n&&(r="\\{",n="\\}"),i="\\left"+r+ra(e.substring(1,s-1),t)+"\\right"+n),a=e.substring(s)):(i=e.substring(1,s),a="")}else{let r=e.match(/^([a-zA-Z]+)/);if(r){let i=ia(null,e,t.inlineShortcuts);if(i)return i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),{match:i,rest:e.substring(i.length)}}if(r=e.match(/^([a-zA-Z])/),r)return{match:r[1],rest:e.substring(1)};if(r=e.match(/^(-)?\d+(\.\d*)?/),r)return{match:r[0],rest:e.substring(r[0].length)};/^\\(left|right)/.test(e)||(r=e.match(/^(\\[a-zA-Z]+)/),r&&(a=e.substring(r[1].length),i=r[1]))}return{match:i,rest:a}}function oa(e,t){let i=ia(null,e,t);return i?(i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),i+=" "):i=e,i}function sa(e,t,i){const a=e.parent();let r="leftright"===a.type?a.leftDelim+a.rightDelim:"";if("\\lbrace\\rbrace"===r&&(r="{}"),"\\{\\}"===r&&(r="{}"),"{}"===r&&/\||\\vert|\\Vert|\\mvert|\\mid/.test(t))return ca(e,"\\,\\middle"+t+"\\, ",{mode:"math",format:"latex",style:i}),!0;"{"!==t&&"\\{"!==t||(t="\\lbrace"),"}"!==t&&"\\}"!==t||(t="\\rbrace"),"["===t&&(t="\\lbrack"),"]"===t&&(t="\\rbrack");const n=R[t];if(n&&("leftright"!==a.type||"|"!==a.leftDelim)){let a="";const r=Ft(e)||"placeholder"===Wt(e).type;a=e.sibling(0).isFunction?"\\mleft"+t+"\\mright":"\\left"+t+"\\right",a+=r?"?":n;let o=[];return r&&(o=e.siblings().splice(e.anchorOffset()+1,e.siblings().length)),ca(e,a,{mode:"math",format:"latex",style:i}),r&&(e.sibling(0).body=o,$t(e,-1)),!0}let o;if(Object.keys(R).forEach(e=>{t===R[e]&&(o=e)}),o){if(a&&"leftright"===a.type&&e.endOffset()===e.siblings().length-1)return xt(e),a.rightDelim=t,$t(e,1),kt(e),!0;const r=e.siblings();let n;for(n=e.endOffset();n>=0&&("leftright"!==r[n].type||"?"!==r[n].rightDelim);n--);if(n>=0)return xt(e),r[n].rightDelim=t,r[n].body=r[n].body.concat(r.slice(n+1,e.endOffset()+1)),r.splice(n+1,e.endOffset()-n),Lt(e,n),kt(e),!0;if(a&&"leftright"===a.type&&"?"===a.rightDelim){xt(e),a.rightDelim=t;const i=r.slice(e.endOffset()+1);return r.splice(e.endOffset()+1),e.path.pop(),e.siblings().splice(e.endOffset()+1,0,...i),kt(e),!0}const o=e.ancestor(2);return!(!o||"leftright"!==o.type||"?"!==o.rightDelim||e.endOffset()!==r.length-1)&&($t(e,1),sa(e,t,i))}return!1}function la(e,t){if(Ft(e))return!1;function i(t,i){let a=!0;return jt(e,e=>{a=a&&e[t]===i},{recursive:!0}),a}return t.color&&i("color",t.color)&&(t.color="none"),t.backgroundColor&&i("backgroundColor",t.backgroundColor)&&(t.backgroundColor="none"),t.fontFamily&&i("fontFamily",t.fontFamily)&&(t.fontFamily="none"),t.series&&(t.fontSeries=t.series),t.fontSeries&&i("fontSeries",t.fontSeries)&&(t.fontSeries="auto"),t.shape&&(t.fontShape=t.shape),t.fontShape&&i("fontShape",t.fontShape)&&(t.fontShape="auto"),t.size&&(t.fontSize=t.size),t.fontSize&&i("fontSize",t.fontSize)&&(t.fontSize="size5"),xt(e),jt(e,e=>e.applyStyle(t),{recursive:!0}),kt(e),!0}function ca(e,t,i){var a,r,n,o;if(null!==(a=i.smartFence)&&void 0!==a&&a){if(sa(e,t,i.style))return}else{const i=e.parent();if("leftright"===(null==i?void 0:i.type)&&"?"===i.rightDelim&&e.endOffset()===e.siblings().length-1&&/^[)}\]|]$/.test(t))return xt(e),i.rightDelim=t,$t(e,1),void kt(e)}const s=e.suppressChangeNotifications;i.suppressChangeNotifications&&(e.suppressChangeNotifications=!0),xt(e);const l=e.suppressChangeNotifications;e.suppressChangeNotifications=!0,i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto"),i.macros=null!==(r=i.macros)&&void 0!==r?r:e.options.macros;const c=i.mode||Mt(e);let d;const m=[Be("math",Nt(e)).toLatex(!1)],p=null!==(n=i.placeholder)&&void 0!==n?n:"\\placeholder{}";m["?"]=p,"replaceSelection"!==i.insertionMode||Ft(e)?"replaceAll"===i.insertionMode?(e.root.body=[],e.root.latex="",e.path=[{relation:"body",offset:0}],e.extent=0):"insertBefore"===i.insertionMode?It(e):"insertAfter"===i.insertionMode&&Rt(e):ea(e);const u=e.siblings(),h=e.startOffset();if(h+10&&u[h]&&"placeholder"===u[h].type&&ea(e,-1),"math"===c&&"ASCIIMath"===i.format)[,t]=aa(t,{format:"ASCIIMath"}),d=Je(t,"math",null,null==i?void 0:i.macros,!1,e.listeners.onError),ma(e,d);else if("text"===c||"auto"!==i.format&&"latex"!==i.format)"text"!==c&&"text"!==i.format||(d=Je(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"\\textbackslash ")).replace(/#/g,"\\#")).replace(/\$/g,"\\$")).replace(/%/g,"\\%")).replace(/&/g,"\\&")).replace(/_/g,"\\_")).replace(/{/g,"\\textbraceleft ")).replace(/}/g,"\\textbraceright ")).replace(/\^/g,"\\textasciicircum ")).replace(/~/g,"\\textasciitilde ")).replace(/£/g,"\\textsterling "),"text",m,i.macros,!1,e.listeners.onError));else if("command"===c){d=[];for(const e of t)H.test(e)&&d.push(new Oe("command","command",e))}else if(""===t)d=[new Oe("command","command","\\")];else{if("auto"===i.format&&([i.format,t]=aa(t)),m[0])t=t.replace(/(^|[^\\])#@/g,"$1#0");else if(/(^|[^\\])#@/.test(t)){const i=function(e){const t=e.siblings();let i=e.startOffset();if("text"===t[i].mode)for(;i>=1&&"text"===t[i].mode;)i--;else for(;i>=1&&/^(mord|surd|msubsup|leftright|mop)$/.test(t[i].type);)i--;return i}(e);t=t.replace(/(^|[^\\])#@/g,"$1"+function(e,t,i){const a=e.siblings();if(nt(a))return"";if("first"===a[0].type&&0===t&&(t=1),"root"===e.parent().type&&1===t&&i===a.length-1)return e.parent().toLatex(!1);let r="",n=t;for(;n<=i;)r+=a[n].toLatex(!1),n++;return r}(e,i+1,e.startOffset())),function(e,t){t>0?e.siblings().splice(e.anchorOffset()+1,t):(e.siblings().splice(e.anchorOffset()+t+1,-t),Lt(e,e.anchorOffset()+t))}(e,i-e.startOffset())}else t=t.replace(/(^|[^\\])#@/g,"$1#?");/^\$\$(.*)\$\$$/.test(t)&&(t=t.substring(2,t.length-2)),m[0]||(m[0]=p),d=Je(t,c,m,i.macros,null!==(o=i.smartFence)&&void 0!==o&&o,e.listeners.onError),"latex"!==i.format&&ma(e,d)}st(e),function e(t,i){t&&i&&(Fe(t)?t.forEach(t=>e(t,i)):"object"==typeof t&&(t.color||t.backgroundColor||t.fontFamily||t.fontShape||t.fontSeries||t.fontSize||(t.applyStyle(i),e(t.body,i),e(t.numer,i),e(t.denom,i),e(t.index,i),e(t.overscript,i),e(t.underscript,i),e(t.subscript,i),e(t.superscript,i))))}(d,i.style);const f=e.parent();if("latex"!==i.format&&e.options.removeExtraneousParentheses&&f&&"leftright"===f.type&&"("===f.leftDelim&&nt(f.body)&&d&&1===d.length&&"genfrac"===d[0].type?(e.path.pop(),e.siblings()[e.anchorOffset()]=d[0]):("latex"!==i.format||1!==m.length||m[0]||"root"===f.type&&nt(f.body)&&(f.latex=t),e.siblings().splice(e.anchorOffset()+1,0,...d)),e.insertFirstAtom(),e.suppressChangeNotifications=l,"placeholder"===i.selectionMode){let t=[];for(const e of d)t=t.concat(e.filter(e=>"placeholder"===e.type));0!==t.length&&zt(e,1,!1)?e.announce("move"):Lt(e,e.anchorOffset()+d.length)}else"before"===i.selectionMode||("after"===i.selectionMode?Lt(e,e.anchorOffset()+d.length):"item"===i.selectionMode&&Lt(e,e.anchorOffset(),d.length));kt(e),e.suppressChangeNotifications=s}function da(e){if(e)return 1===e.length&&"leftright"===e[0].type&&"("===e[0].leftDelim&&(e=e[0].body),e}function ma(e,t){if(t&&e.options.removeExtraneousParentheses){for(let e=0;t[e];e++)if("leftright"===t[e].type&&"("===t[e].leftDelim&&Fe(t[e].body)){let i=0,a=0,r=0;for(let n=0;t[e].body[n];n++)"genfrac"===t[e].body[n].type&&(i++,a=n),"first"!==t[e].body[n].type&&r++;0===r&&1===i&&(t[e]=t[e].body[a])}t.forEach(t=>{if("genfrac"===t.type&&(ma(e,t.numer),ma(e,t.denom),t.numer=da(t.numer),t.denom=da(t.denom)),t.superscript&&(ma(e,t.superscript),t.superscript=da(t.superscript)),t.subscript&&(ma(e,t.subscript),t.subscript=da(t.subscript)),t.underscript&&(ma(e,t.underscript),t.underscript=da(t.underscript)),t.overscript&&(ma(e,t.overscript),t.overscript=da(t.overscript)),t.index&&(ma(e,t.index),t.index=da(t.index)),"surd"===t.type?(ma(e,t.body),t.body=da(t.body)):Fe(t.body)&&ma(e,t.body),t.array)for(let i=ft(t.array);i>=0;i--)ma(e,ht(t.array,i))})}}function pa(e){if(Rt(e),!Wt(e).superscript)if(Wt(e).subscript)Wt(e).superscript=[new Oe(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.superscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.subscript)?(e.path[e.path.length-1].offset+=1,Wt(e).superscript=[new Oe(e.parent().mode,"first")]):("limits"!==Wt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Oe(e.parent().mode,"msubsup","​",St(e))),e.path[e.path.length-1].offset+=1),Wt(e).superscript=[new Oe(e.parent().mode,"first")])}return e.path.push({relation:"superscript",offset:0}),Ot(e),!0}ji({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",denom:"numer",numer:"denom"}[e.relation()];return t||pa(e),e.parent()[t]||(e.parent()[t]=[new Oe(e.parent().mode,"first")]),Lt(e,0,"end",t),!0},moveBeforeParent:e=>e.path.length>1?(e.path.pop(),Lt(e,e.anchorOffset()-1),!0):(e.announce("plonk"),!1),moveAfterParent:e=>Ht(e),moveToNextPlaceholder:e=>zt(e,1),moveToPreviousPlaceholder:e=>zt(e,-1),moveToNextChar:e=>$t(e,1),moveToPreviousChar:e=>$t(e,-1),moveUp:e=>Ct(e),moveDown:e=>Dt(e),moveToNextWord:e=>Et(e,1),moveToPreviousWord:e=>Et(e,-1),moveToGroupStart:e=>Lt(e,0),moveToGroupEnd:e=>Lt(e,-1),moveToMathFieldStart:e=>Kt(e,-1),moveToMathFieldEnd:e=>Kt(e,1),moveToSuperscript:e=>pa(e),moveToSubscript:e=>function(e){if(Rt(e),!Wt(e).subscript)if(Wt(e).superscript)Wt(e).subscript=[new Oe(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.subscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.superscript)?(e.path[e.path.length-1].offset+=1,Wt(e).subscript=[new Oe(e.parent().mode,"first")]):("limits"!==Wt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Oe(e.parent().mode,"msubsup","​",St(e))),e.path[e.path.length-1].offset+=1),Wt(e).subscript=[new Oe(e.parent().mode,"first")])}return e.path.push({relation:"subscript",offset:0}),Ot(e),!0}(e)},{target:"model",category:"selection-anchor"}),ji({selectGroup:e=>Ot(e),selectAll:e=>Bt(e),extendToNextChar:e=>Tt(e,1),extendToPreviousChar:e=>Tt(e,-1),extendToNextWord:e=>Et(e,1,{extend:!0}),extendToPreviousWord:e=>Et(e,-1,{extend:!0}),extendUp:e=>Ct(e,{extend:!0}),extendDown:e=>Dt(e,{extend:!0}),extendToNextBoundary:e=>Et(e,1,{extend:!0}),extendToPreviousBoundary:e=>Et(e,-1,{extend:!0}),extendToGroupStart:e=>Pt(e,-e.anchorOffset()),extendToGroupEnd:e=>Pt(e,e.siblings().length-e.anchorOffset()),extendToMathFieldStart:e=>Kt(e,-1,{extend:!0}),extendToMathFieldEnd:e=>Kt(e,1,{extend:!0})},{target:"model",category:"selection-extend"}),ji({deleteAll:e=>(Bt(e),ea(e)),deleteNextChar:e=>ea(e,1),deletePreviousChar:e=>ea(e,-1),deleteNextWord:e=>(Et(e,1,{extend:!0}),ea(e)),deletePreviousWord:e=>(Et(e,-1,{extend:!0}),ea(e)),deleteToGroupStart:e=>(Pt(e,-e.anchorOffset()),ea(e)),deleteToGroupEnd:e=>(Kt(e,-1,{extend:!0}),ea(e)),deleteToMathFieldStart:e=>(Kt(e,-1,{extend:!0}),ea(e)),deleteToMathFieldEnd:e=>(Kt(e,1,{extend:!0}),ea(e))},{target:"model",category:"delete"});const ua=["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"];function ha(e){return!e.ctrlKey&&!e.metaKey&&"Dead"!==e.key&&ua.indexOf(e.code)>=0}function fa(e){const t=[];return(e=function(e){if(!e.code){const t=Object.entries(ri().mapping);let i,a=!1,r=!1;for(let n=0;n<4;n++){for(const[o,s]of t)if(s[n]===e.key){i=o,3===n?(a=!0,r=!0):2===n?a=!0:1===n&&(r=!0);break}if(i)break}return new KeyboardEvent(e.type,{...e,altKey:a,shiftKey:r,code:i})}return new KeyboardEvent(e.type,e)}(e)).ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),0===t.length?"["+e.code+"]":(t.push("["+e.code+"]"),t.join("+"))}function ga(e){var t;if(!e)return"";let i;return"Unidentified"===e.key&&e.target&&(i=e.target.value),i=null!==(t=null!=i?i:e.key)&&void 0!==t?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(i)&&(i=""),i}class ya{constructor(e){this.maximumDepth=1e3,this.record=!1,this.canCoalesce=!1,this.model=e,this.reset()}reset(){this.stack=[],this.index=-1}startRecording(){this.record=!0}canUndo(){return this.index>0}canRedo(){return this.index!==this.stack.length-1}undo(e){this.canUndo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"undo"),this.restore(this.stack[this.index-1],e),this.index-=1,e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"undo"),this.canCoalesce=!1)}redo(e){this.canRedo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"redo"),this.index+=1,this.restore(this.stack[this.index],e),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"redo"),this.canCoalesce=!1)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(e){this.record&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"snapshot"),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push({latex:this.model.root.toLatex(!1),selection:this.model.toString()}),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"snapshot"),this.canCoalesce=!1)}snapshotAndCoalesce(e){this.canCoalesce&&this.pop(),this.snapshot(e),this.canCoalesce=!0}save(){return{latex:this.model.root.toLatex(!1),selection:this.model.toString()}}restore(e,t){const i=this.model.suppressChangeNotifications;void 0!==t.suppressChangeNotifications&&(this.model.suppressChangeNotifications=t.suppressChangeNotifications),ca(this.model,e?e.latex:"",{...t,format:"latex",mode:"math",insertionMode:"replaceAll",selectionMode:"after",smartFence:!1}),Ut(this.model,e?e.selection:[{relation:"body",offset:0}]),this.model.suppressChangeNotifications=i}}const ba={"−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega"},va={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\langle":"(:","\\rangle":":)"};function xa(t){if(!t)return"";if(e(t)){let e="";if(0===t.length)return"";if("first"===t[0].type&&(t=t.slice(1)),0===t.length)return"";if("text"===t[0].mode){let i=0;for(e='"';t[i]&&"text"===t[i].mode;)e+=t[i].body,i++;e+='"'+xa(t.slice(i))}else if("math"===t[0].mode){let i=0;for(;t[i]&&"math"===t[i].mode;)e+=xa(t[i]),i++;e+=xa(t.slice(i))}return e.trim()}if("text"===t.mode)return'"'+t.body+'"';let i="";const a=t.symbol;let r;switch(t.type){case"group":case"root":i=xa(t.body);break;case"array":break;case"genfrac":(t.leftDelim||t.rightDelim)&&(i+="."!==t.leftDelim&&t.leftDelim?t.leftDelim:"{:"),t.hasBarLine?(i+="(",i+=xa(t.numer),i+=")/(",i+=xa(t.denom),i+=")"):(i+="("+xa(t.numer)+"),",i+="("+xa(t.denom)+")"),(t.leftDelim||t.rightDelim)&&(i+="."!==t.rightDelim&&t.rightDelim?t.rightDelim:"{:");break;case"surd":t.index?i+="root("+xa(t.index)+")("+xa(t.body)+")":i+="sqrt("+xa(t.body)+")";break;case"leftright":i+="."!==t.leftDelim&&t.leftDelim?t.leftDelim:"{:",i+=xa(t.body),i+="."!==t.rightDelim&&t.rightDelim?t.rightDelim:":}";break;case"sizeddelim":case"delim":case"overlap":case"overunder":break;case"mord":i=ba[a]||a||("string"==typeof t.body?t.body:""),"\\"===i[0]&&(i=String(i)),r=a?a.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null,r?i=String.fromCharCode(parseInt("0x"+r[1])):i.length>0&&"\\"===i.charAt(0)&&(i="string"==typeof t.body?t.body.charAt(0):t.symbol);break;case"mbin":case"mrel":case"textord":case"minner":i=a&&ba[a]?ba[a]:a&&va[a]?va[a]:t.body;break;case"mopen":case"mclose":i+=t.body;break;case"mpunct":i=va[a]||a;break;case"mop":"​"!==t.body&&(i="",i+="\\operatorname"===a?xa(t.body):t.body||a,i+=" ");break;case"mathstyle":case"box":case"spacing":case"enclose":break;case"space":i=" "}if(t.subscript){i+="_";const e=xa(t.subscript);e.length>1&&!/^(-)?\d+(\.\d*)?$/.test(e)?i+="("+e+")":i+=e}if(t.superscript){i+="^";const e=xa(t.superscript);e.length>1&&!/^(-)?\d+(\.\d*)?$/.test(e)?i+="("+e+")":i+=e}return i}const ka={};function _a(e){const t=ka.locale.substring(0,2);let i="";return ka.strings[ka.locale]&&(i=ka.strings[ka.locale][e]),!i&&ka.strings[t]&&(i=ka.strings[t][e]),i||(i=ka.strings.en[e]),i||(i=e),i}function wa(e,t,i){ot(e);const a=[],r=t.substr(i);for(const e of r){const t=new Oe("command","command",e);t.isSuggestion=!0,a.push(t)}Array.prototype.splice.apply(e.siblings(),[e.anchorOffset()+1,0].concat(a))}function Ma(e,t){if(t=null!=t?t:{acceptSuggestion:!1},wi(e),t.discard)return zi(e.model,null),e.switchMode("math"),!0;const i=Mi(e.model,!t.acceptSuggestion);if(i){if("\\("===i||"\\)"===i)zi(e.model,[]),ca(e.model,i.slice(1),{mode:e.mode});else{e.switchMode("math");const t=Je(i,"math",null,e.config.macros);t?zi(e.model,t):Si(e.model,!0)}return e.snapshot(),e.model.announce("replacement"),!0}return!1}function Sa(e){!function(e){const t=e.siblings(),i=wt(e);let a=i.start;for(;a1)}return Wi(e),!0}ka.plural=function(e,t,i){var a;(i=null!=i?i:{}).type=null!==(a=i.type)&&void 0!==a?a:"cardinal";const r=ka.locale.substring(0,2),n="ordinal"===i.type?ka._ordinal:ka._cardinal;let o,s="ordinal"===i.type?ka._ordinalPluralCategories.indexOf(n.select(e)):ka._cardinalPluralCategories.indexOf(n.select(e));return ka.strings[ka.locale]&&(o=ka.strings[ka.locale][t]),!o&&ka.strings[r]&&(o=ka.strings[r][t]),o||(o=ka.strings.en[t],o||(o=t),s="ordinal"===i.type?ka._ordinalPluralCategories.indexOf(ka._ordinalEnglish.select(e)):ka._cardinalPluralCategories.indexOf(ka._cardinalEnglish.select(e))),o.split(";")[s]||o.split(";")[0]},ka.merge=function(e,t){if(e&&t){const i=ka._locale;ka.locale=e,ka.strings[e]={...ka.strings[e],...t},ka.locale=i}else e&&!t&&Object.keys(e).forEach(t=>ka.merge(t,e[t]))},Object.defineProperty(ka,"locale",{set(e){ka._locale=e,ka._ordinal=null,ka._cardinal=null},get(){var e;return ka._locale||(ka._locale=null!==(e=null===navigator||void 0===navigator?void 0:navigator.language.slice(0,5))&&void 0!==e?e:"en"),ka._locale}}),Object.defineProperty(ka,"ordinal",{get:()=>(ka._ordinal||(ka._ordinalEnglish=new Intl.PluralRules("en",{type:"ordinal"}),ka._ordinalEnglishPluralCategories=ka._ordinalEnglish.resolvedOptions().pluralCategories,ka._ordinal=new Intl.PluralRules(ka.locale,{type:"ordinal"}),ka._ordinalPluralCategories=ka._ordinal.resolvedOptions().pluralCategories),ka._ordinal)}),Object.defineProperty(ka,"cardinal",{get:()=>(ka._cardinal||(ka._cardinalEnglish=new Intl.PluralRules("en",{type:"cardinal"}),ka._cardinalEnglishPluralCategories=ka._cardinalEnglish.resolvedOptions().pluralCategories,ka._cardinal=new Intl.PluralRules(ka.locale,{type:"cardinal"}),ka._cardinalPluralCategories=ka._ordinal.resolvedOptions().pluralCategories),ka._cardinal)}),ka.strings={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo"},ar:{"keyboard.tooltip.functions":"مهام","keyboard.tooltip.symbols":"حرف او رمز","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.command":"حالة تلقي الأوامر اللاتك","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.roman":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.roman":"Römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen"},el:{"keyboard.tooltip.functions":"συναρτήσεις","keyboard.tooltip.symbols":"σύμβολα","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.command":"Λειτουργία εντολών LaTeX","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.roman":"Ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer"},fa:{"keyboard.tooltip.functions":"توابع","keyboard.tooltip.symbols":"نمادها","keyboard.tooltip.greek":"حروف یونانی","keyboard.tooltip.command":"حالت دستور لاتک","keyboard.tooltip.numeric":"عددی","keyboard.tooltip.roman":"حروف رومی","tooltip.copy to clipboard":"کپی به کلیپبورد","tooltip.redo":"بازگشت به بعد","tooltip.toggle virtual keyboard":"نمایش/نهفتن کیبورد مجازی","tooltip.undo":"بازگشت به قبل"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.roman":"Lettres romaines","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalità di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.roman":"Lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare"},ja:{"keyboard.tooltip.functions":"関数","keyboard.tooltip.symbols":"シンボル","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.command":"LaTeXコマンドモード","keyboard.tooltip.numeric":"数値","keyboard.tooltip.roman":"ローマ字","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb poleceń LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.roman":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz wirtualną klawiaturę","tooltip.undo":"Cofnij"},ru:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Символы","keyboard.tooltip.greek":"Греческие буквы","keyboard.tooltip.command":"Режим командной строки LaTeX","keyboard.tooltip.numeric":"числовой","keyboard.tooltip.roman":"Латинские буквы","tooltip.copy to clipboard":"Скопировать в буфер обмена","tooltip.redo":"переделывать","tooltip.toggle virtual keyboard":"Переключить виртуальную клавиатуру","tooltip.undo":"расстегивать"}},ji({complete:Ma,nextSuggestion:function(e){return e.suggestionIndex+=1,Sa(e),!1},previousSuggestion:function(e){if(e.suggestionIndex-=1,e.suggestionIndex<0){ot(e.model);const t=re(Mi(e.model));e.suggestionIndex=t.length-1}return Sa(e),!1}},{target:"mathfield",category:"autocomplete"});const za={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ",a:'a',A:'capital A',"+":"plus ","-":"minus ",";":' semi-colon ',",":' comma ',"|":'Vertical bar',"(":'Open paren. ',")":' Close paren. ',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":' such that ',"\\colon":' such that ',"\\hbar":"etch bar ","\\iff":'if, and only if, ',"\\Longleftrightarrow":'if, and only if, ',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set n',"\\C":'the set c',"\\Z":'the set z',"\\Q":'the set q',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lbrace":'open brace',"\\{":'open brace',"\\rbrace":'close brace',"\\}":'close brace',"\\langle":'left angle bracket',"\\rangle":'right angle bracket',"\\lfloor":'open floor',"\\rfloor":'close floor',"\\lceil":'open ceiling',"\\rceil":'close ceiling',"\\vert":'vertical bar',"\\mvert":'divides',"\\lvert":'left vertical bar',"\\rvert":'right vertical bar',"\\lbrack":' open square bracket ',"\\rbrack":' close square bracket ',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"};function La(e){let t=0;if(Fe(e))for(const i of e)"first"!==i.type&&(t+=1);return 1===t}function Aa(e){let t="";if(Fe(e))for(const i of e)"first"!==i.type&&"string"==typeof i.body&&(t+=i.body);return t}function qa(e,t){var i;const a={...t,textToSpeechRulesOptions:{...t.textToSpeechRulesOptions}};if(window.sre&&"sre"===a.textToSpeechRules){const t=Ii(e,a);return t?(a.textToSpeechMarkup&&(a.textToSpeechRulesOptions=null!==(i=a.textToSpeechRulesOptions)&&void 0!==i?i:{},a.textToSpeechRulesOptions.markup=a.textToSpeechMarkup,"ssml"===a.textToSpeechRulesOptions.markup&&(a.textToSpeechRulesOptions.markup="ssml_step"),a.textToSpeechRulesOptions.rate=a.speechEngineRate),a.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(a.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(t)):""}let r=function e(t,i,a){function r(e){return""+e+""}if(!i)return"";let n="";if(Fe(i)){let o=!1,s=!1;for(let l=0;l'),n+=i.body;else{i.id&&"math"===t&&(n+='');let o="",s="",l="",c=!1;switch(i.type){case"group":case"root":n+=e("math",i.body,a);break;case"genfrac":if(o=e("math",i.numer,a),s=e("math",i.denom,a),La(i.numer)&&La(i.denom)){const e={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[Aa(i.numer)+"/"+Aa(i.denom)];e?n=e:n+=o+" over "+s}else n+=' the fraction '+o+', over '+s+'. End fraction.';break;case"surd":if(l=e("math",i.body,a),i.index){let t=e("math",i.index,a);t=t.trim();const r=t.replace(//g,"");n+="3"===r?' the cube root of '+l+'. End cube root':"n"===r?' the nth root of '+l+'. End root':' the root with index: '+t+', of '+l+'. End root'}else La(i.body)?n+=" the square root of "+l+" , ":n+=' the square root of '+l+'. End square root';break;case"leftright":n+=za[i.leftDelim]||i.leftDelim,n+=e("math",i.body,a),n+=za[i.rightDelim]||i.rightDelim;break;case"rule":case"overunder":case"overlap":break;case"placeholder":n+="placeholder "+i.body;break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":case"textord":{const r=i.symbol;if("\\mathbin"===r||"\\mathrel"===r||"\\mathopen"===r||"\\mathclose"===r||"\\mathpunct"===r||"\\mathord"===r||"\\mathinner"===r){n=e(t,i.body,a);break}let o=i.body,s=i.symbol;if("delim"!==i.type&&"sizeddelim"!==i.type||(o=s=i.delim),"text"===t)n+=o;else{if("mbin"===i.type&&(n+=''),o){const e=za[o]||(s?za[s.trim()]:"");if(e)n+=" "+e;else{const e=s?function(e){let t="";return"\\"===e.charAt(0)&&(t=" "+e.replace("\\","")+" "),t}(s.trim()):"";n+=e||function(e){let t="";return a.textToSpeechMarkup?/[a-z]/.test(e)?t+=' '+e+"":/[A-Z]/.test(e)?t+=String("capital "+e.toLowerCase()):t+=e:/[a-z]/.test(e)?t+=" '"+e.toUpperCase()+"'":/[A-Z]/.test(e)?t+=" 'capital "+e.toUpperCase()+"'":t+=e,t}(o)}}else n+=e("math",i.body,a);"mbin"===i.type&&(n+='')}break}case"mop":if("​"!==i.body){const t=i.symbol;if("\\sum"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the summation from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the summation from '+t+' of ',c=!0}else n+=" the summation of";else if("\\prod"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the product from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the product from '+t+' of ',c=!0}else n+=" the product of ";else if("\\int"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let o=e("math",i.subscript,a);o=o.trim(),n+=' the integral from '+r(o)+' to '+r(t)+' of ',c=!0}else n+=' the integral of ';else"string"==typeof i.body?n+=za[i.body]||za[i.symbol]||" "+i.body:i.symbol&&("\\"===i.symbol[0]?n+=" "+i.symbol.substr(1):n+=" "+i.symbol)}break;case"enclose":l=e("math",i.body,a),La(i.body)?n+=" crossed out "+l+" , ":n+=" crossed out "+l+". End cross out"}if(!c&&i.superscript){let r=e(t,i.superscript,a);r=r.trim();const o=r.replace(/<[^>]*>/g,"");if(La(i.superscript)){if("math"===t){const e=function(e){if(Fe(e))for(const t of e)if("first"!==t.type&&t.id)return t.id.toString();return""}(i.superscript);e&&(n+='')}"′"===o?n+=" prime ":"2"===o?n+=" squared ":"3"===o?n+=" cubed ":isNaN(parseInt(o))?n+=" to the "+r+"; ":n+=' to the '+o+" power; "}else isNaN(parseInt(o))?n+=" raised to the "+r+"; ":n+=' raised to the '+o+" power; "}if(!c&&i.subscript){let t=e("math",i.subscript,a);t=t.trim(),La(i.subscript)?n+=" sub "+t:n+=" subscript "+t+". End subscript. "}}return n}("math",e,a);if("ssml"===a.textToSpeechMarkup){let e="";a.speechEngineRate&&(e=''),r=''+e+"

    "+r+"

    "+(e?"
    ":"")+""}else r="mac"===a.textToSpeechMarkup&&"mac"===function(e){let t="other";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?t="mac":/^(win)/i.test(navigator.platform)?t="win":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos")),"mac"===t?"mac":"!mac"}()?r.replace(//g,"").replace(//g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(//g,"[[slc $1]]").replace(/]*>/g,"").replace(/<\/say-as>/g,""):r.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return r}function $a(e,t,i){return t+qa(i,{...e,textToSpeechMarkup:"",textToSpeechRulesOptions:{...e.textToSpeechRulesOptions,markup:"none"}})}function Ca(e,t){if(!t&&window&&window.mathlive&&(t=window.mathlive.config),(t=null!=t?t:{}).speechEngine&&"local"!==t.speechEngine)if("amazon"===t.speechEngine){if(window&&window.AWS){const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"mp3",VoiceId:t.speechEngineVoice,Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes(t.speechEngineVoice)?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(a,(function(e,t){if(e);else if(null==t?void 0:t.AudioStream){const e=new Uint8Array(t.AudioStream),i=new Blob([e.buffer],{type:"audio/mpeg"}),a=URL.createObjectURL(i);new Audio(a).play().catch(e=>{})}}))}}else t.speechEngine;else{const t=new SpeechSynthesisUtterance(e);window&&window.speechSynthesis.speak(t)}}function Da(e,t,i,a){let r="";"plonk"===t?(e.plonkSound&&(e.plonkSound.load(),e.plonkSound.play().catch(e=>{})),e.resetKeystrokeBuffer()):"delete"===t?r=$a(e.config,"deleted: ",a):"focus"===t||/move/.test(t)?r=(Ft(e.model)?"":"selected: ")+function(e,t){function i(e,t){return"body"===t.relation?{enclose:"cross out",leftright:"fence",surd:"square root",root:"math field"}[e.type]:{numer:"numerator",denom:"denominator",index:"index",body:"parent",subscript:"subscript",superscript:"superscript"}[t.relation]}const a=t?t.path:[],r=e.model.path,n=r[r.length-1];let o="";for(;a.length>r.length;)o+="out of "+i(t.parent(),a[a.length-1])+"; ",a.pop();if(!Ft(e.model))return $a(e.config,"",Nt(e.model));const s=i(e.model.parent(),n);0===n.offset&&(o+=(s?"start of "+s:"unknown")+": ");const l=e.model.sibling(Math.max(1,e.model.extent));return l?o+=$a(e.config,"",l):0!==n.offset&&(o+=s?"end of "+s:"unknown"),o}(e,i):"replacement"===t?r=$a(e.config,"",e.model.sibling(0)):"line"===t?(r=$a(e.config,"",e.model.root),e.accessibleNode.innerHTML=e.config.createHTML(''+Ii(e.model.root,e.config)+""),e.textarea.setAttribute("aria-label","after: "+r)):r=a?$a(e.config,t+" ",a):t;const n=/\u00a0/.test(e.ariaLiveText.textContent)?"   ":"   ";e.ariaLiveText.textContent=r+n}ji({speak:(e,t,i)=>function(e,t,i){i=null!=i?i:{withHighlighting:!1};const a=function(e,t){let i=null;switch(t){case"all":i=e.model.root;break;case"selection":Ft(e.model)||(i=Nt(e.model));break;case"left":{const t=e.model.siblings(),a=e.model.startOffset();if(a>=1){i=[];for(let e=1;e<=a;e++)i.push(t[e])}break}case"right":{const t=e.model.siblings(),a=e.model.endOffset()+1;if(a<=t.length-1){i=[];for(let e=a;e<=t.length-1;e++)i.push(t[e])}break}case"group":i=e.model.siblings();break;case"parent":{const t=e.model.parent();t&&"root"!==t.type&&(i=e.model.parent());break}}return i}(e,t);if(null===a)return e.config.speakHook(function(e){let t="";switch(e){case"all":break;case"selection":t="no selection";break;case"left":t="at start";break;case"right":t="at end";break;case"group":break;case"parent":t="no parent"}return t}(t),e.config),!1;const r={...e.config};(i.withHighlighting||"amazon"===r.speechEngine)&&(r.textToSpeechMarkup=window.sre&&"sre"===r.textToSpeechRules?"ssml_step":"ssml");const n=qa(a,r);return i.withHighlighting?(window.mathlive.readAloudMathField=e,Vi(e,{forHighlighting:!0}),e.config.readAloudHook&&e.config.readAloudHook(e.field,n,e.config)):e.config.speakHook&&e.config.speakHook(n,r),!1}(e,t,i)},{target:"mathfield",category:"speech"});const Ta=()=>{};function Ea(e){if("string"==typeof e){const t=new Audio;return t.preload="none",t.src=e,t.volume=.5,t}return e}function Ka(e){e instanceof HTMLAudioElement&&(e.pause(),e.removeAttribute("src"),e.load())}function Na(t,i){const a=Oa(t,Object.keys(t));return Object.keys(i).forEach(t=>{var r,n;switch(t){case"scriptDepth":if(e(i.scriptDepth))a.scriptDepth=[i.scriptDepth[0],i.scriptDepth[1]];else{if("number"!=typeof i.scriptDepth)throw Error("Unexpected value for scriptDepth");a.scriptDepth=[i.scriptDepth,i.scriptDepth]}break;case"namespace":if(!/^[a-z]*[-]?$/.test(i.namespace))throw Error("namespace must be a string of lowercase characters only");/-$/.test(i.namespace)?a.namespace=i.namespace:a.namespace=i.namespace+"-";break;case"locale":a.locale="auto"===i.locale?ka.locale:i.locale;break;case"strings":ka.merge(i.strings);break;case"virtualKeyboardLayout":"auto"===i.virtualKeyboardLayout?a.virtualKeyboardLayout=null!==(r={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[ka.locale.substring(0,2)])&&void 0!==r?r:"qwerty":a.virtualKeyboardLayout=i.virtualKeyboardLayout;break;case"virtualKeyboardMode":{const e=null===(n=window.matchMedia)||void 0===n?void 0:n.call(window,"(any-pointer: coarse)").matches;"auto"===i.virtualKeyboardMode?a.virtualKeyboardMode=e?"onfocus":"off":a.virtualKeyboardMode=i.virtualKeyboardMode}break;case"letterShapeStyle":"auto"===i.letterShapeStyle?"fr"===ka.locale.substring(0,2)?a.letterShapeStyle="french":a.letterShapeStyle="tex":a.letterShapeStyle=i.letterShapeStyle;break;case"plonkSound":Ka(a.plonkSound),a.plonkSound=Ea(i.plonkSound);break;case"keypressSound":if(Ka(a.keypressSound),"string"==typeof i.keypressSound){const e=Ea(i.keypressSound);a.keypressSound={delete:e,return:e,spacebar:e,default:e}}else if(i.keypressSound instanceof HTMLAudioElement)a.keypressSound={delete:i.keypressSound,return:i.keypressSound,spacebar:i.keypressSound,default:i.keypressSound};else{if(!i.keypressSound.default)throw Error("Missing keypressSound.default");a.keypressSound={...i.keypressSound},a.keypressSound.return||(a.keypressSound.return=i.keypressSound.default),a.keypressSound.spacebar||(a.keypressSound.spacebar=i.keypressSound.default),a.keypressSound.delete||(a.keypressSound.delete=i.keypressSound.default)}break;case"onBlur":case"onFocus":case"onContentWillChange":case"onContentDidChange":case"onSelectionWillChange":case"onSelectionDidChange":case"onUndoStateWillChange":case"onUndoStateDidChange":case"onModeChange":case"onVirtualKeyboardToggle":case"onReadAloudStatus":case"onError":if(null===i[t])a[t]=Ta;else if("function"!=typeof i[t])throw Error(t+" must be a function or null");a[t]=i[t];break;default:e(i[t])?a[t]=[...i[t]]:"object"==typeof i[t]?a[t]={...i[t]}:a[t]=i[t]}}),void 0!==i.overrideDefaultInlineShortcuts&&(i.overrideDefaultInlineShortcuts?a.inlineShortcuts=i.inlineShortcuts:a.inlineShortcuts={...ta,...i.inlineShortcuts}),a}function Oa(t,i){let a;a="string"==typeof i?[i]:void 0===i?Object.keys(t):i;const r={};return a.forEach(i=>{e(r[i])?r[i]=[...r[i]]:"object"==typeof r[i]?r[i]={...r[i]}:r[i]=t[i]}),"string"==typeof i?r[i]:r}function Ba(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0);let a=0,r=!1;for(xt(e.model);!r;){const n=e.model.sibling(a);r=0===t||!n||"math"!==n.mode||!(/mord|textord|mpunct/.test(n.type)||"mop"===n.type&&/[a-zA-Z]+/.test(n.body))||Boolean(n.superscript)||Boolean(n.subscript)||i&&!i(n),r||(n.applyStyle({mode:"text"}),n.symbol=n.body,n.latex=""),a-=1,t-=1}kt(e.model)}function Fa(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0),xt(e.model);let a=0,r=!1;for(;!r;){const n=e.model.sibling(a);r=0===t||!n||"text"!==n.mode||" "===n.body||i&&!i(n),r||n.applyStyle({mode:"math"}),a-=1,t-=1}Pa(e),kt(e.model)}function Pa(e){let t=0;for(;e.model.sibling(t)&&"math"===e.model.sibling(t).mode;)t-=1;if(e.model.sibling(t)&&"text"===e.model.sibling(t).mode&&" "===e.model.sibling(t).body&&(!e.model.sibling(t-1)||"math"===e.model.sibling(t-1).mode)){xt(e.model),e.model.siblings().splice(t-1,1),kt(e.model);const i=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0,Lt(e.model,e.model.anchorOffset()-1),e.model.suppressChangeNotifications=i}}function Ra(e,t,i){!function(e){const t=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;if("Unidentified"===e.key)return;if("Dead"===e.key)return;const i=Jt.filter(i=>{var a;return(null===(a=i.mapping[e.code])||void 0===a?void 0:a[t])===e.key});0!==i.length&&(i.forEach(e=>{e.score+=1}),Jt.sort((e,t)=>t.score-e.score))}(i);const a=ri();if(e.keyboardLayout!==a.id&&(e.keyboardLayout=a.id,e.keybindings=di(e.config.keybindings,t=>{"function"==typeof e.config.onError&&e.config.onError({code:"invalid-keybinding",arg:t.join("\n")})})),function(e,t){const i=e.keystrokeCaption;if(i&&e.keystrokeCaptionVisible){const a=e.element.getBoundingClientRect();i.style.left=a.left+"px",i.style.top=a.top-64+"px",i.innerHTML=e.config.createHTML(""+(ci(t)||t)+""+i.innerHTML),i.style.visibility="visible",setTimeout((function(){i.childNodes.length>0&&i.removeChild(i.childNodes[i.childNodes.length-1]),0===i.childNodes.length&&(i.style.visibility="hidden")}),3e3)}}(e,t),clearTimeout(e.keystrokeBufferResetTimer),e.config.onKeystroke&&!e.config.onKeystroke(e,t,i))return(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1;let r,n,o,s=!1;if("command"!==e.mode&&(!i||!i.ctrlKey&&!i.metaKey))if(ha(i)){const t=ga(i),a=e.keystrokeBuffer+t;let o=0;for(;!r&&o{e.startsWith(n)&&!i.includes(e)&&i.push(e)});const o=(null==t?void 0:t.inlineShortcuts)?t.inlineShortcuts:null;o&&Object.keys(o).forEach(e=>{e.startsWith(n)&&i.push(e)})}return i}(a,e.config).length<=1?s=!0:e.config.inlineShortcutTimeout&&(e.keystrokeBufferResetTimer=setTimeout(()=>{e.resetKeystrokeBuffer()},e.config.inlineShortcutTimeout))}else e.resetKeystrokeBuffer();if(e.config.smartMode){const a=e.mode;r?e.mode="math":function(e,t,i){if(e.smartModeSuppressed)return!1;if(e.model.endOffset()<*|]$/.test(a))return Pa(e),!0}else{if("[Space]"===t)return Ba(e,void 0,e=>/[a-z][:,;.]$/.test(e.body)),!0;if(/[a-zA-Z]{3,}$/.test(r)&&!/(dxd|abc|xyz|uvw)$/.test(r))return Ba(e,void 0,e=>/[a-zA-Z]/.test(e.body)),!0;if(/(^|\W)(if|If)$/i.test(r))return Ba(e,1),!0;if(/(\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5){3,}$/u.test(r)&&!/(αβγ)$/.test(r))return Ba(e,void 0,e=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5)/u.test(e.body)),!0;if("?"===a)return!0;if("."===a&&!/[0-9-+]\.$/.test(r))return!0}return!1}(e,t,i)&&(e.mode={math:"text",text:"math"}[e.mode],o=""),e.mode!==a&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}if(r||o||(o=function(e,t,i){if(0===e.length)return"";for(let a=e.length-1;a>=0;a--)if(e[a].key===i&&(!e[a].ifMode||e[a].ifMode===t))return e[a].command;return""}(e.keybindings,e.mode,t)),!r&&!o)return!0;if(e.config.readOnly&&"insert"===o[0])return!0;Si(e.model,!1);const l=e.model.parent();if("moveAfterParent"===o&&l&&"leftright"===l.type&&e.model.endOffset()===e.model.siblings().length-1&&e.config.smartFence&&sa(e.model,".",e.style)&&(o="",Wi(e)),"math"===e.mode&&"[Spacebar]"===t&&!r){const t=e.model.sibling(1),i=e.model.sibling(-1);(t&&"text"===t.mode||i&&"text"===i.mode)&&ca(e.model," ",{mode:"text"})}if(o)e.$perform(o);else if(r){if(!/^(\\{|\\}|\\[|\\]|\\@|\\#|\\$|\\%|\\^|\\_|\\backslash)$/.test(r)){const t={...St(e.model),...e.style};ca(e.model,ga(i),{suppressChangeNotifications:!0,mode:e.mode,style:t});const a=e.mode;e.snapshotAndCoalesce(),e.restoreToUndoRecord(e.keystrokeBufferStates[n]),e.mode=a}xt(e.model);const t=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0;const a={...St(e.model),...e.style};ca(e.model,r,{format:"latex",mode:e.mode,style:a,smartFence:!0}),Pa(e),r.endsWith(" ")&&(e.mode="text",ca(e.model," ",{mode:"text",style:a})),e.model.suppressChangeNotifications=t,kt(e.model),e.snapshot(),Wi(e),e.model.announce("replacement"),s&&e.resetKeystrokeBuffer()}return e.scrollIntoView(),(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1}function Ia(e,t,i){if(e.config.readOnly)return void e.model.announce("plonk");if((i=null!=i?i:{}).focus&&e.$focus(),i.feedback&&(e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{}))),i.commandMode&&"command"!==e.mode&&e.switchMode("command"),Si(e.model,!1),i.simulateKeystroke){const i=t.charAt(0);if(!Ra(e,i,new KeyboardEvent("keypress",{key:i})))return}let a="",r=!1;if(e.pasteInProgress)e.pasteInProgress=!1,ca(e.model,t,{smartFence:e.config.smartFence,mode:"math"});else{const i={...St(e.model),...e.style},n=Ve(t);for(const t of n)if("command"===e.mode){ot(e.model),e.suggestionIndex=0;const i=Mi(e.model),n=re(i+t);r=n.length>1,0===n.length?(ca(e.model,t,{mode:"command"}),/^\\[a-zA-Z\\*]+$/.test(i+t)&&Si(e.model,!0),wi(e)):(ca(e.model,t,{mode:"command"}),n[0].match!==i+t&&wa(e.model,n[0].match,-n[0].match.length+i.length+1),a=n[0].match)}else if("math"===e.mode){const a={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(a){if("moveToSuperscript"===a){if(Ha(e)>=e.config.scriptDepth[1])return void e.model.announce("plonk")}else if("moveToSubscript"===a&&Wa(e)>=e.config.scriptDepth[0])return void e.model.announce("plonk");e.$perform(a)}else e.config.smartSuperscript&&"superscript"===e.model.relation()&&/[0-9]/.test(t)&&0===e.model.siblings().filter(e=>"first"!==e.type).length?(ca(e.model,t,{mode:"math",style:i}),Ht(e.model)):ca(e.model,t,{mode:"math",style:i,smartFence:e.config.smartFence})}else"text"===e.mode&&ca(e.model,t,{mode:"text",style:i})}"command"!==e.mode&&e.snapshotAndCoalesce(),e.dirty=!0,e.scrollIntoView(),xi(e,a,r)}function Ha(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!0:a.subscript&&(r=!1),i+=1,a=e.model.ancestor(i);return r?t:0}function Wa(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!1:a.subscript&&(r=!0),i+=1,a=e.model.ancestor(i);return r?t:0}function Va(e){return e.pasteInProgress=!0,!0}let Ua;ji({undo:e=>(Ma(e),e.undo(),!0),redo:e=>(Ma(e),e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},enterCommandMode:e=>(e.switchMode("command"),!0),toggleKeystrokeCaption:e=>(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaption.innerHTML="",e.keystrokeCaptionVisible||(e.keystrokeCaption.style.visibility="hidden"),!1),switchMode:(e,t)=>(e.switchMode(t),!0),insert:(e,t,i)=>e.$insert(t,i),typedText:(e,t)=>(Ia(e,t),!0)}),ji({applyStyle:function(e,t){e.resetKeystrokeBuffer();const i=function(e){const t={};return"string"==typeof e.mode&&(t.mode=e.mode.toLowerCase()),"string"==typeof e.color&&(t.color=e.color),"string"==typeof e.backgroundColor&&(t.backgroundColor=e.backgroundColor),"string"==typeof e.fontFamily&&(t.fontFamily=e.fontFamily),"string"==typeof e.series&&(t.fontSeries=e.series),"string"==typeof e.fontSeries&&(t.fontSeries=e.fontSeries.toLowerCase()),t.fontSeries&&(t.fontSeries={bold:"b",medium:"m",normal:"m"}[t.fontSeries]||t.fontSeries),"string"==typeof e.shape&&(t.fontShape=e.shape),"string"==typeof e.fontShape&&(t.fontShape=e.fontShape.toLowerCase()),t.fontShape&&(t.fontShape={italic:"it",up:"n",upright:"n",normal:"n"}[t.fontShape]||t.fontShape),"string"==typeof e.size?t.fontSize=e.size:"number"==typeof e.size&&(t.fontSize="size"+Math.min(0,Math.max(10,e.size))),"string"==typeof e.fontSize&&(t.fontSize=e.fontSize.toLowerCase()),t.fontSize&&(t.fontSize={tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normal:"size5",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[t.fontSize]||t.fontSize),t}(t);if(i.mode){if(Ft(e.model))e.switchMode(i.mode);else{const t=e.mode,i="math"===(Mt(e.model)||e.config.defaultMode)?"text":"math";let a=e.$selectedText("ASCIIMath");if("math"===i&&/^"[^"]+"$/.test(a)&&(a=a.slice(1,-1)),e.$insert(a,{mode:i,selectionMode:"item",format:"text"===i?"text":"ASCIIMath"}),e.mode=i,e.groupIsSelected()){const t=e.model.parent();!t||"group"!==t.type&&"root"!==t.type||(t.mode=i)}e.mode!==t&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}delete i.mode}return Ft(e.model)?(e.style.fontSeries&&i.fontSeries===e.style.fontSeries&&(i.fontSeries="auto"),i.fontShape&&i.fontShape===e.style.fontShape&&(i.fontShape="auto"),i.color&&i.color===e.style.color&&(i.color="none"),i.backgroundColor&&i.backgroundColor===e.style.backgroundColor&&(i.backgroundColor="none"),i.fontSize&&i.fontSize===e.style.fontSize&&(i.fontSize="auto"),e.style={...e.style,...i}):(la(e.model,i),e.snapshot()),!0}},{target:"mathfield"}),ji({copyToClipboard:e=>(e.$focus(),Ft(e.model)&&e.$select(),document.execCommand("copy"),!1),cutToClipboard:e=>(e.$focus(),document.execCommand("cut"),!0),pasteFromClipboard:e=>(e.$focus(),document.execCommand("paste"),!0)},{target:"mathfield",category:"clipboard"});let ja=0;function Ga(e,t,i,a){var r;let n;(a=null!=a?a:{}).bias=null!==(r=a.bias)&&void 0!==r?r:0;const o=function e(t,i,a){let r={element:null,distance:Number.POSITIVE_INFINITY},n=!0;if(t.getAttribute("data-atom-id")){r.element=t;const e=t.getBoundingClientRect(),o=i-(e.left+e.right)/2,s=a-(e.top+e.bottom)/2;r.distance=o*o+s*s,n=i>=e.left&&i<=e.right}if(n&&t.children)for(const n of t.children){const t=e(n,i,a);t.element&&t.distance<=r.distance&&(r=t)}return r}(e.field,t,i).element,s=o?o.getAttribute("data-atom-id"):null;if(s){const i=Zt(e.model,(e,t)=>t.captureSelection?t.filter(e=>e.id===s).length>0:t.id===s);if(i&&i.length>0)if(n=ct(i[0]).path,0===a.bias){const e=o.getBoundingClientRect();tf ()",classes:"tex",layers:["functions"]},symbols:{tooltip:"keyboard.tooltip.symbols",layer:"symbols",label:"∞≠∈",classes:"tex",layers:["symbols"]},command:{tooltip:"keyboard.tooltip.command",command:"enterCommandMode",label:"",layers:["lower-command","upper-command","symbols-command"]},style:{tooltip:"keyboard.tooltip.style",layer:"style",label:"bi𝔹"}},Za={"\\varphi ":["Φ","\\Phi "],"\\varsigma ":["Σ","\\Sigma "],"\\epsilon ":["Ɛ",'{\\char"0190}'],"\\rho ":["Ρ",'{\\char"3A1}'],"\\tau ":["Τ",'{\\char"3A4}'],"\\upsilon ":["Υ","\\Upsilon "],"\\theta ":["Θ","\\Theta "],"\\iota ":["Ι",'{\\char"399}'],"\\omicron ":["Ο",'{\\char"39F}'],"\\pi ":["Π","\\Pi "],"\\alpha ":["Α",'{\\char"391}'],"\\sigma ":["Σ","\\Sigma "],"\\delta ":["Δ","\\Delta "],"\\phi ":["Φ","\\Phi "],"\\gamma ":["Γ","\\Gamma "],"\\eta ":["Η",'{\\char"397}'],"\\xi ":["Ξ","\\Xi "],"\\kappa ":["Κ",'{\\char"39A}'],"\\lambda ":["Λ","\\Lambda "],"\\zeta ":["Ζ",'{\\char"396}'],"\\chi ":["Χ",'{\\char"3A7}'],"\\psi ":["Ψ","\\Psi "],"\\omega ":["Ω","\\Omega "],"\\beta ":["Β",'{\\char"392}'],"\\nu ":["Ν",'{\\char"39D}'],"\\mu ":["Μ",'{\\char"39C}']},Ya={0:["\\emptyset","\\varnothing","\\infty",{latex:"#?_0",insert:"#@_0"},"\\circ","\\bigcirc","\\bullet"],2:["\\frac{1}{2}",{latex:"#?^2",insert:"#@^2"}],3:["\\frac{1}{3}",{latex:"#?^3",insert:"#@^3"}],".":[",",";","\\colon",{latex:":",aside:"ratio"},{latex:"\\cdotp",aside:"center dot",classes:"box"},{latex:"\\cdots",aside:"center ellipsis",classes:"box"},{latex:"\\ldotp",aside:"low dot",classes:"box"},{latex:"\\ldots",aside:"low ellipsis",classes:"box"},{latex:"\\vdots",aside:"",classes:"box"},{latex:"\\ddots",aside:"",classes:"box"},"\\odot","\\oslash","\\circledcirc"],"*":["\\cdot","\\ast","\\star","\\bigstar","\\ltimes","\\rtimes","\\rightthreetimes","\\leftthreetimes","\\intercal","\\prod",{latex:"\\prod_{n\\mathop=0}^{\\infty}",classes:"small"}],"+":["\\pm","\\mp","\\sum",{latex:"\\sum_{n\\mathop=0}^{\\infty}",classes:"small"},"\\dotplus","\\oplus"],"-":["\\pm","\\mp","\\ominus","\\vert #0 \\vert"],"/":["\\divideontimes","/","\\div"],"(":["\\left( #0\\right)","\\left[ #0\\right]","\\left\\{ #0\\right\\}","\\left\\langle #0\\right\\rangle","\\lfloor","\\llcorner","(","\\lbrack","\\lvert","\\lVert","\\lgroup","\\langle","\\lceil","\\ulcorner","\\lmoustache","\\lbrace"],")":["\\rfloor","\\lrcorner",")","\\rbrack","\\rvert","\\rVert","\\rgroup","\\rangle","\\rceil","\\urcorner","\\rmoustache","\\rbrace"],"=":["\\cong","\\asymp","\\equiv","\\differencedelta","\\varpropto","\\thickapprox","\\approxeq","\\thicksim","\\backsim","\\eqsim","\\simeq","\\Bumpeq","\\bumpeq","\\doteq","\\Doteq","\\fallingdotseq","\\risingdotseq","\\coloneq","\\eqcirc","\\circeq","\\triangleq","\\between"],"!=":["\\neq","\\ncong","","\\nsim"],"<":["\\leq","\\leqq","\\lneqq","\\ll","\\nless","\\nleq","\\precsim","\\lesssim","\\lessgtr","\\prec","\\preccurlyeq","\\lessdot","\\nprec"],">":["\\geq","\\geqq","\\gneqq","\\gg","\\ngtr","\\ngeq","\\succsim","\\gtrsim","\\gtrless","\\succ","\\succcurlyeq","\\gtrdot","\\nsucc"],set:["\\in","\\owns","\\subset","\\nsubset","\\supset","\\nsupset"],"!set":["\\notin","\\backepsilon"],subset:[],supset:[],infinity:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"],"numeric-pi":["\\prod","\\theta","\\rho","\\sin","\\cos","\\tan"],ee:["\\times 10^{#?}","\\ln","\\ln_{10}","\\log"],"^":["_{#?}"],int:[{latex:"\\int_{#?}^{#?}",classes:"small"},{latex:"\\int",classes:"small"},{latex:"\\smallint",classes:"small"},{latex:"\\iint",classes:"small"},{latex:"\\iiint",classes:"small"},{latex:"\\oint",classes:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",classes:"small"},{latex:"\\frac{\\partial}{\\partial x}",classes:"small"},"\\capitalDifferentialD","\\rd","\\partial"],nabla:["\\nabla\\times","\\nabla\\cdot","\\nabla^{2}"],"!":["!!","\\Gamma","\\Pi"],accents:["\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],b:[{latex:"\\beth",aside:"beth"}],B:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"}],d:[{latex:"\\daleth",aside:"daleth"}],D:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"}],g:[{latex:"\\gimel",aside:"gimel"}],G:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"}],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\N",aside:"set of natural numbers"}],p:[{latex:"\\P",aside:"set of primes"}],q:[{latex:"\\Q",aside:"set of rational numbers"}],r:[{latex:"\\R",aside:"set of real numbers"}],z:[{latex:"\\Z",aside:"set of integers"}],"x-var":["y","z","t","r",{latex:"f(#?)",classes:"small"},{latex:"g(#?)",classes:"small"},"x^2","x^n","x_n","x_{n+1}","x_i","x_{i+1}"],"n-var":["i","j","p","k","a","u"],ii:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"],logic:[{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},{latex:"\\ni",aside:"such that"},{latex:"\\Colon",aside:"such that"},{latex:"\\implies",aside:"implies"},{latex:"\\impliedby",aside:"implied by"},{latex:"\\iff",aside:"if and only if"},{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"},{latex:"\\therefore",aside:"therefore"},{latex:"\\because",aside:"because"},{latex:"^\\biconditional",aside:"biconditional"},"\\leftrightarrow","\\Leftrightarrow","\\to","\\models","\\vdash","\\gets","\\dashv","\\roundimplies"],"set-operators":["\\cap","\\cup","\\setminus","\\smallsetminus","\\complement"],"set-relations":["\\in","\\notin","\\ni","\\owns","\\subset","\\supset","\\subseteq","\\supseteq","\\subsetneq","\\supsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space
    ⁻³⧸₁₈ em"},{latex:'\\unicode{"203A}\\,\\unicode{"2039}',insert:"\\,",aside:"thin space
    ³⧸₁₈ em"},{latex:'\\unicode{"203A}\\:\\unicode{"2039}',insert:"\\:",aside:"medium space
    ⁴⧸₁₈ em"},{latex:'\\unicode{"203A}\\;\\unicode{"2039}',insert:"\\;",aside:"thick space
    ⁵⧸₁₈ em"},{latex:'\\unicode{"203A}\\ \\unicode{"2039}',insert:"\\ ",aside:"⅓ em"},{latex:'\\unicode{"203A}\\enspace\\unicode{"2039}',insert:"\\enspace",aside:"½ em"},{latex:'\\unicode{"203A}\\quad\\unicode{"2039}',insert:"\\quad",aside:"1 em"},{latex:'\\unicode{"203A}\\qquad\\unicode{"2039}',insert:"\\qquad",aside:"2 em"}],delete:[{label:'',command:'"deleteAll"'}],"->|":[]};let Qa={};const Ja={math:"\n
    \n
      \n
    • x
    • \n
    • n
    • \n
    • \n \n
    • \n
    • e
    • \n
    • i
    • \n
    • \n
    \n
      \n
    • <
    • \n
    • >
    • \n
    • \n \n
    • \n
    • x ²
    • \n
    • x
    • \n
    • \n
    \n
      \n
    • (
    • \n
    • )
    • \n
    • \n \n
    • \n
    • \n
    • \n
    \n \n
      \n
    • \n
    • \n
    • \n \n
    • \n \n
    \n
    \n ","lower-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ,
    • \n
    •  
    • \n \n
    \n
    ","upper-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ;
    • \n
    •  
    • \n \n
    \n
    ",symbols:"\n
    \n
      \n \n
    • {
    • \n
    • }
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • [
    • \n
    • ]
    • \n
    • \n
    • \n
    • \n
    • !
    • \n
    • o
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n\n
    • \n
    \n
      \n \n
    • ,
    • \n
    • \n
    • :
    • \n
    • \n
    • \n
    • \n
    • ±
    • \n \n
    \n
    ","lower-greek":"\n
    \n
    • φ
    • \n
    • ς
    • \n
    • ϵ
    • \n
    • ρ
    • \n
    • τ
    • \n
    • υ
    • \n
    • θ
    • \n
    • ι
    • \n
    • ο
    • \n
    • π
    • \n
    \n
    • α
    • \n
    • σ
    • \n
    • δ
    • \n
    • ϕ
    • \n
    • γ
    • \n
    • η
    • \n
    • ξ
    • \n
    • κ
    • \n
    • λ
    • \n
    \n
    • \n
    • ζ
    • \n
    • χ
    • \n
    • ψ
    • \n
    • ω
    • \n
    • β
    • \n
    • ν
    • \n
    • μ
    • \n
    • \n
    \n
      \n
    •  
    • \n
    • ,
    • \n
    • ε
    • \n
    • ϑ
    • \n
    • ϰ
    • \n
    • ϖ
    • \n
    • ϱ
    • \n \n
    \n
    ","upper-greek":"\n
    \n
    • Φ
    • \n
    • Σ
    • \n
    • Ɛ
    • \n
    • Ρ
    • \n
    • Τ
    • \n
    • Υ
    • \n
    • Θ
    • \n
    • Ι
    • \n
    • Ο
    • \n
    • Π
    \n
    • Α
    • \n
    • Σ
    • \n
    • Δ
    • \n
    • Φ
    • \n
    • Γ
    • \n
    • Η
    • \n
    • Ξ
    • \n
    • Κ
    • \n
    • Λ
    \n
    • \n
    • Ζ
    • \n
    • Χ
    • \n
    • Ψ
    • \n
    • Ω
    • \n
    • Β
    • \n
    • Ν
    • \n
    • Μ
    • \n
    \n
      \n
    •  
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ","lower-command":"\n
    \n
    \n
    \n
    \n
      \n
    • 01#
    • \n
    • {
    • \n
    • }
    • \n
    • ^
    • \n
    • _
    • \n
    •  
    • \n \n
    \n
    ","upper-command":"\n
    \n
    \n
    \n
    \n
      \n
    • \n
    • [
    • \n
    • ]
    • \n
    • (
    • \n
    • )
    • \n
    •  
    • \n \n
    \n
    ","symbols-command":"\n
    \n
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 0
    \n
    • !
    • @
    • #
    • $
    • %
    • ^
    • &
    • *
    • +
    • =
    \n
      \n
    • \\
    • \n
    • |
    • \n
    • /
    • \n
    • `
    • \n
    • ;
    • \n
    • :
    • \n
    • ?
    • \n
    • '
    • \n
    • \"
    • \n
    • \n
    \n
      \n
    • abc
    • \n
    • <
    • \n
    • >
    • \n
    • ~
    • \n
    • ,
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ",functions:"\n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • (
    • \n
    • )
    • \n
    • \n
    • \n
    •  
    • \n \n
    \n
    ",style:"\n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n\n
    • \n
    • \n
    • \n
    • \n
    \n
    "};function er(e,t,i){return e=e.replace(/(^|[^\\])#@/g,"$1#?"),C(q(Ne({mathstyle:c.displaystyle,macros:i.config.macros},Je(e,"math",t,i.config.macros)),"ML__base"),"ML__mathlive").toMarkup()}function tr(e,t,i){var a;let r="
    ";const n=t.replace(/\s+/g," ").split(" ");if(n.length>1){const t={...Xa,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}};for(const e of n){if(!t[e])break;r+="
    "+t[e].label+"
    "}}return r+="
    ",r+=`\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n `,""}function ir(e,t,i){var a;for(let r=0;r"+n.getAttribute("data-aside").replace(/"/g,'"')+""),void 0!==o&&(n.innerHTML=e.config.createHTML(o)),n.getAttribute("data-classes")&&n.classList.add(n.getAttribute("data-classes"));const s=null===(a=n.getAttribute("data-insert"))||void 0===a?void 0:a.replace(/"/g,'"');let l;if(s&&Za[s]&&(n.setAttribute("data-shifted",Za[s][0]),n.setAttribute("data-shifted-command",JSON.stringify(["insertAndUnshiftKeyboardLayer",Za[s][1]]))),l=n.getAttribute("data-command")?JSON.parse(n.getAttribute("data-command")):n.getAttribute("data-insert")?["insert",n.getAttribute("data-insert"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:n.getAttribute("data-latex")?["insert",n.getAttribute("data-latex"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:["typedText",n.getAttribute("data-key")||n.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}],i&&(l=[i,l]),n.getAttribute("data-alt-keys")){const e=Qa[n.getAttribute("data-alt-keys")];e&&(l={default:l,pressAndHoldStart:["showAlternateKeys",n.getAttribute("data-alt-keys"),e],pressAndHoldEnd:"hideAlternateKeys"})}bi(e,n,l)}}function ar(e,t){const i={qwerty:{"lower-1":"qwertyuiop","lower-2":" asdfghjkl ","lower-3":"^zxcvbnm~","upper-1":"QWERTYUIOP","upper-2":" ASDFGHJKL ","upper-3":"^ZXCVBNM~","numpad-1":"789/","numpad-2":"456*","numpad-3":"123-","numpad-4":"0.=+"},azerty:{"lower-1":"azertyuiop","lower-2":"qsdfghjklm","lower-3":"^ wxcvbn ~","upper-1":"AZERTYUIOP","upper-2":"QSDFGHJKLM","upper-3":"^ WXCVBN ~"},qwertz:{"lower-1":"qwertzuiop","lower-2":" asdfghjkl ","lower-3":"^yxcvbnm~","upper-1":"QWERTZUIOP","upper-2":" ASDFGHJKL","upper-3":"^YXCVBNM~"},dvorak:{"lower-1":"^ pyfgcrl ","lower-2":"aoeuidhtns","lower-3":"qjkxbmwvz~","upper-1":"^ PYFGCRL ","upper-2":"AOEUIDHTNS","upper-3":"QJKXBMWVZ~"},colemak:{"lower-1":" qwfpgjluy ","lower-2":"arstdhneio","lower-3":"^zxcvbkm~","upper-1":" QWFPGNLUY ","upper-2":"ARSTDHNEIO","upper-3":"^ZXCVBKM~"}},a=i[e.config.virtualKeyboardLayout]?i[e.config.virtualKeyboardLayout]:i.qwerty;let r,n=t;n=n.replace(//g,"\n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n
  • ");let o=n.match(/()/);for(;o;){r="";const e=o[2].match(/[a-zA-Z][a-zA-Z0-9-]*=(['"])(.*?)\1/g),t={};for(const i of e){const e=i.match(/([a-zA-Z][a-zA-Z0-9-]*)=(['"])(.*?)\2/);t[e[1]]=e[3]}let s=a[t.name];if(s||(s=i.qwerty[t.name]),s)for(const e of s){let i=t.class||"";i&&(i=" "+i),"~"===e?(r+="
  • \'\n data-shifted-command=\'"deleteAll"\'\n data-alt-keys=\'delete\' data-command=\'["performWithFeedback","deletePreviousChar"]\'\n >⌫
  • '):" "===e?r+="
  • ":"^"===e?r+="
  • ":"/"===e?r+="
  • ÷
  • ":"*"===e?r+="
  • ×
  • ":"-"===e?r+="
  • ":/tt/.test(i)?r+="
  • '+e+"
  • ":r+="
  • "+e+"
  • "}n=n.replace(new RegExp(o[1]+o[2]+o[3]),r),o=n.match(/()/)}return n}function rr(e){const t=document.getElementById("mathlive-alternate-keys-panel");return t&&(t.classList.remove("is-visible"),t.innerHTML="",hi(t)),!1}function nr(e){const t=e.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(let i=0;ili{display:flex;flex-flow:column;align-items:center;justify-content:center;font-size:30px;height:70px;width:70px;box-sizing:border-box;margin:0;background:transparent;border:1px solid transparent;border-radius:5px;pointer-events:all;color:var(--keyboard-alternate-text);fill:currentColor}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys ul>li{font-size:24px;height:50px;width:50px}}.ML__keyboard.alternate-keys ul>li.active,.ML__keyboard.alternate-keys ul>li.pressed,.ML__keyboard.alternate-keys ul>li:hover{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);background:var(--keyboard-alternate-background-active);color:var(--keyboard-text-active)}.ML__keyboard.alternate-keys ul>li.small{font-size:18px}.ML__keyboard.alternate-keys ul>li.small-button{width:42px;height:42px;margin:2px;background:#fbfbfb}.ML__keyboard.alternate-keys ul>li.small-button:hover{background:var(--keyboard-alternate-background-active)}.ML__keyboard.alternate-keys ul>li.box>div,.ML__keyboard.alternate-keys ul>li.box>span{border:1px dashed rgba(0,0,0,.24)}.ML__keyboard.alternate-keys ul>li .warning{min-height:60px;min-width:60px;background:#cd0030;color:#fff;padding:5px;display:flex;align-items:center;justify-content:center;border-radius:5px}.ML__keyboard.alternate-keys ul>li .warning.active,.ML__keyboard.alternate-keys ul>li .warning.pressed,.ML__keyboard.alternate-keys ul>li .warning:hover{background:red}.ML__keyboard.alternate-keys ul>li .warning svg{width:50px;height:50px}.ML__keyboard.alternate-keys ul>li aside{font-size:12px;line-height:12px;opacity:.78;padding-top:2px}.ML__keyboard>div.keyboard-layer{display:none;outline:none}.ML__keyboard>div.keyboard-layer.is-visible{display:flex;flex-flow:column}.ML__keyboard>div>div.keyboard-toolbar{align-self:center;display:flex;flex-flow:row;justify-content:space-between;width:736px}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard>div>div.keyboard-toolbar{width:556px}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar{width:365px;max-width:100vw}}.ML__keyboard>div>div.keyboard-toolbar svg{height:20px;width:20px}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar svg{height:13px;width:17px}}.ML__keyboard>div>div.keyboard-toolbar>.left{position:relative;display:flex;justify-content:flex-start;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>.right{display:flex;justify-content:flex-end;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>div>div{display:flex;align-items:baseline;justify-content:center;pointer-events:all;color:var(--keyboard-text);fill:currentColor;background:0;font-size:110%;cursor:pointer;min-height:0;padding:4px 10px;margin:7px 4px 6px;box-shadow:none;border:none;border-bottom:2px solid transparent}.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled.pressed svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled:hover svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled svg{color:var(--keyboard-text);opacity:.2}@media only screen and (max-width:414px){.ML__keyboard>div>div.keyboard-toolbar>div>div{font-size:100%;padding:0 6px 0 0}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar>div>div{padding-left:4px;padding-right:4px;font-size:90%}}.ML__keyboard>div>div.keyboard-toolbar>div>div.active,.ML__keyboard>div>div.keyboard-toolbar>div>div.pressed,.ML__keyboard>div>div.keyboard-toolbar>div>div:active,.ML__keyboard>div>div.keyboard-toolbar>div>div:hover{color:var(--keyboard-text-active)}.ML__keyboard>div>div.keyboard-toolbar>div>div.selected{color:var(--keyboard-text-active);border-bottom:2px solid var(--keyboard-text-active);margin-bottom:8px;padding-bottom:0}.ML__keyboard div .rows{border:0;border-collapse:separate;clear:both;margin:auto;display:flex;flex-flow:column;align-items:center}.ML__keyboard div .rows>ul{list-style:none;height:40px;margin:0 0 3px;padding:0}.ML__keyboard div .rows>ul>li{display:flex;flex-flow:column;align-items:center;justify-content:center;width:34px;margin-right:2px;height:40px;box-sizing:border-box;padding:8px 0;vertical-align:top;text-align:center;float:left;color:var(--keycap-text);fill:currentColor;font-size:20px;background:var(--keycap-background);border:1px solid var(--keycap-background-border);border-bottom-color:var(--keycap-background-border-bottom);border-radius:5px;pointer-events:all;position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ML__keyboard div .rows>ul>li:last-child{margin-right:0}.ML__keyboard div .rows>ul>li.small{font-size:16px}.ML__keyboard div .rows>ul>li.tt{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.bottom{justify-content:flex-end}.ML__keyboard div .rows>ul>li.left{align-items:flex-start;padding-left:4px}.ML__keyboard div .rows>ul>li.right{align-items:flex-end;padding-right:4px}.ML__keyboard div .rows>ul>li svg{width:20px;height:20px}.ML__keyboard div .rows>ul>li .warning{height:25px;width:25px;min-height:25px;min-width:25px;background:#cd0030;color:#fff;border-radius:100%;padding:5px;display:flex;align-items:center;justify-content:center;margin-bottom:-2px}.ML__keyboard div .rows>ul>li .warning svg{width:16px;height:16px}@media only screen and (max-width:768px){.ML__keyboard div .rows>ul>li .warning{height:16px;width:16px;min-height:16px;min-width:16px}.ML__keyboard div .rows>ul>li .warning svg{width:14px;height:14px}}.ML__keyboard div .rows>ul>li>.w0{width:0}.ML__keyboard div .rows>ul>li>.w5{width:16px}.ML__keyboard div .rows>ul>li>.w15{width:52px}.ML__keyboard div .rows>ul>li>.w20{width:70px}.ML__keyboard div .rows>ul>li>.w50{width:178px}.ML__keyboard div .rows>ul>li.separator{background:transparent;border:none;pointer-events:none}@media only screen and (max-width:560px){.ML__keyboard div .rows>ul>li.if-wide{display:none}}.ML__keyboard div .rows>ul>li.tex-math{font-size:25px}.ML__keyboard div .rows>ul>li.pressed,.ML__keyboard div .rows>ul>li:hover{background:var(--keycap-background-active);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.active,.ML__keyboard div .rows>ul>li.action:active,.ML__keyboard div .rows>ul>li.keycap.active,.ML__keyboard div .rows>ul>li.keycap:active{transform:translateY(-20px) scale(1.4);z-index:calc(var(--ML_keyboard-zindex, 105) - 5);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.modifier.active,.ML__keyboard div .rows>ul>li.modifier:active{background:var(--keyboard-text-active);color:var(--keycap-text-active)}.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:18px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:16px}}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton,.ML__keyboard div .rows>ul>li.fnbutton{font-size:12px}}.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:14px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:9px}}.ML__keyboard div .rows>ul>li.action,.ML__keyboard div .rows>ul>li.modifier{background-color:var(--keycap-modifier-background);border-bottom-color:var(--keycap-modifier-border);border-color:var(--keycap-modifier-border) var(--keycap-modifier-border) var(--keycap-modifier-border-bottom);font-size:65%;font-weight:100}.ML__keyboard div .rows>ul>li.action.selected,.ML__keyboard div .rows>ul>li.modifier.selected{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.selected.active,.ML__keyboard div .rows>ul>li.action.selected.pressed,.ML__keyboard div .rows>ul>li.action.selected:active,.ML__keyboard div .rows>ul>li.action.selected:hover,.ML__keyboard div .rows>ul>li.modifier.selected.active,.ML__keyboard div .rows>ul>li.modifier.selected.pressed,.ML__keyboard div .rows>ul>li.modifier.selected:active,.ML__keyboard div .rows>ul>li.modifier.selected:hover{color:#fff}.ML__keyboard div .rows>ul>li.keycap.w50{font-size:80%;padding-top:10px;font-weight:100}.ML__keyboard div .rows>ul>li small{color:#555}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li small{font-size:9px}}.ML__keyboard div .rows>ul>li aside{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:10px;line-height:10px;color:#666}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li aside{display:none}}@media only screen and (max-width:414px){.ML__keyboard div .rows>ul>li{width:29px;margin-right:2px}.ML__keyboard div .rows>ul>.w5{width:13.5px}.ML__keyboard div .rows>ul>.w15{width:44.5px}.ML__keyboard div .rows>ul>.w20{width:60px}.ML__keyboard div .rows>ul>.w50{width:153px}}@media only screen and (min-width:415px) and (max-width:768px){.ML__keyboard div .rows>ul>li{width:37px;margin-right:3px}.ML__keyboard div .rows>ul>.w5{width:17px}.ML__keyboard div .rows>ul>.w15{width:57px}.ML__keyboard div .rows>ul>.w20{width:77px}.ML__keyboard div .rows>ul>.w50{width:197px}}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:51px;margin-right:4px}.ML__keyboard div .rows>ul>.w5{width:23.5px}.ML__keyboard div .rows>ul>.w15{width:78.5px}.ML__keyboard div .rows>ul>.w20{width:106px}.ML__keyboard div .rows>ul>.w50{width:271px}}@media only screen and (min-width:1025px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:66px;margin-right:6px}.ML__keyboard div .rows>ul>.action,.ML__keyboard div .rows>ul>.modifier{font-size:80%}.ML__keyboard div .rows>ul>.w5{width:30px}.ML__keyboard div .rows>ul>.w15{width:102px}.ML__keyboard div .rows>ul>.w20{width:138px}.ML__keyboard div .rows>ul>.w50{width:354px}}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}div.ML__keyboard.material{--keyboard-background:rgba(209,213,217,0.9);--keyboard-background-border:#ddd;--keycap-background:transparent;--keycap-background-active:#cccfd1;--keycap-background-border:transparent;--keyboard-alternate-background:#efefef;--keyboard-alternate-text:#000;font-family:Roboto,sans-serif}div.ML__keyboard.material.alternate-keys{background:var(--keyboard-alternate-background);border:1px solid transparent;border-radius:5px;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}div.ML__keyboard.material.alternate-keys ul li.active,div.ML__keyboard.material.alternate-keys ul li.pressed,div.ML__keyboard.material.alternate-keys ul li:active,div.ML__keyboard.material.alternate-keys ul li:hover{border:1px solid transparent;background:#5f97fc;color:#fff;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>div{font-size:16px}div.ML__keyboard.material .keyboard-toolbar div.div.active,div.ML__keyboard.material .keyboard-toolbar div.div.pressed,div.ML__keyboard.material .keyboard-toolbar div div:active,div.ML__keyboard.material .keyboard-toolbar div div:hover{color:#5f97fc;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>.selected{color:#5f97fc;fill:currentColor;border-bottom:2px solid #5f97fc;margin-bottom:8px;padding-bottom:0}div.ML__keyboard.material div>.rows>ul>.keycap{background:transparent;border:1px solid transparent;border-radius:5px;color:var(--keycap-text);fill:currentColor;transition:none}div.ML__keyboard.material div>.rows>ul>.keycap.tt{color:#5f97fc}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]{margin-top:10px;margin-bottom:10px;height:20px;background:#e0e0e0}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].pressed,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:hover{background:#d0d0d0;box-shadow:none;transform:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):hover{border:1px solid transparent;background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{background:var(--keyboard-alternate-background);color:var(--keyboard-alternate-text);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);font-size:10px;vertical-align:top;width:19.5px;margin-right:10px;margin-left:10px;transform:translateY(-20px) scale(2);transition:none;justify-content:flex-start;padding:2px 0 0;z-index:calc(var(--ML_keyboard-zindex, 105) - 5)}}@media only screen and (max-width:414px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{width:16.5px}}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:last-child.active,div.ML__keyboard.material div>.rows>ul>.keycap:last-child:active{margin-right:0;margin-left:14px}}div.ML__keyboard.material div div.rows ul li.action,div.ML__keyboard.material div div.rows ul li.modifier{background:transparent;border:0;color:#869096;fill:currentColor;font-size:16px;transition:none}div.ML__keyboard.material div div.rows ul li.action.selected,div.ML__keyboard.material div div.rows ul li.modifier.selected{color:#5f97fc;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.action.active,div.ML__keyboard.material div div.rows ul li.action.pressed,div.ML__keyboard.material div div.rows ul li.action:active,div.ML__keyboard.material div div.rows ul li.action:hover,div.ML__keyboard.material div div.rows ul li.modifier.active,div.ML__keyboard.material div div.rows ul li.modifier.pressed,div.ML__keyboard.material div div.rows ul li.modifier:active,div.ML__keyboard.material div div.rows ul li.modifier:hover{border:0;color:var(--keycap-text);background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div div.rows ul li.bigfnbutton,div.ML__keyboard.material div div.rows ul li.fnbutton{background:transparent;border:0}div.ML__keyboard.material div div.rows ul li.bigfnbutton.selected,div.ML__keyboard.material div div.rows ul li.fnbutton.selected{color:#5f97fc;fill:currentColor;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.bigfnbutton.active,div.ML__keyboard.material div div.rows ul li.bigfnbutton.pressed,div.ML__keyboard.material div div.rows ul li.bigfnbutton:active,div.ML__keyboard.material div div.rows ul li.bigfnbutton:hover,div.ML__keyboard.material div div.rows ul li.fnbutton.active,div.ML__keyboard.material div div.rows ul li.fnbutton.pressed,div.ML__keyboard.material div div.rows ul li.fnbutton:active,div.ML__keyboard.material div div.rows ul li.fnbutton:hover{border:0;color:#5f97fc;fill:currentColor;background:var(--keycap-background-active);box-shadow:none}@media (prefers-color-scheme:dark){body:not([theme=light]) div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}'),Ya["foreground-color"]=[];for(const e of fe)Ya["foreground-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"color":"'+e+'"}]'});Ya["background-color"]=[];for(const e of he)Ya["background-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"backgroundColor":"'+e+'"}]'});Qa={...Ya},Object.keys(Qa).forEach(e=>{Qa[e]=Qa[e].slice()});for(let e=0;e<26;e++){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[e];Qa[t]||(Qa[t]=[]),Qa[t].unshift({latex:"\\mathbb{"+t+"}",aside:"blackboard",insert:"\\mathbb{"+t+"}"}),Qa[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Qa[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Qa[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Qa[t].unshift({latex:"\\mathcal{"+t+"}",aside:"calligraphy",insert:"\\mathcal{"+t+"}"}),Qa[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<=26;e++){const t="abcdefghijklmnopqrstuvwxyz"[e];Qa[t]||(Qa[t]=[]),Qa[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Qa[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Qa[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Qa[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<10;e++){const t="0123456789"[e];Qa[t]||(Qa[t]=[]),Qa[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Qa[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Qa[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Qa[t].unshift({latex:"\\mathcal{"+t+"}",aside:"script",insert:"\\mathcal{"+t+"}"}),Qa[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}let n=e.config.virtualKeyboards;n||(n="all"),n=n.replace(/\ball\b/i,"numeric functions symbols roman greek");const o={...Ja,...null!==(i=e.config.customVirtualKeyboardLayers)&&void 0!==i?i:{}},s={...Xa,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}},l=n.replace(/\s+/g," ").split(" ");for(const t of l){if(!s[t])break;let i=s[t].layers||[];s[t].layer&&i.push(s[t].layer),i=Array.from(new Set(i));for(const a of i){if(!o[a])break;if("object"==typeof o[a]){let e="";if(o[a].styles&&(e+=``),o[a].backdrop&&(e+=`
    `),o[a].container&&(e+=`
    `),o[a].rows){e+="
    ";for(const t of o[a].rows){e+="
      ";for(const i of t)e+="${i.label?i.label:""}`;e+="
    "}e+="
    "}o[a].container&&(e+="
    "),o[a].backdrop&&(e+="
    "),o[a]=e}r+="
    ",r+=tr(e,n,t);const i="function"==typeof o[a]?o[a]():o[a];r+=ar(e,i),r+="
    "}}const c=document.createElement("div");c.className="ML__keyboard",t?c.classList.add(t):e.config.virtualKeyboardTheme&&c.classList.add(e.config.virtualKeyboardTheme),c.innerHTML=e.config.createHTML(r),ir(e,[].slice.call(c.querySelectorAll(".keycap, .action, .fnbutton, .bigfnbutton")));const d=c.getElementsByClassName("layer-switch");for(let t=0;t{e.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),e.addEventListener("touchstart",e=>{e.preventDefault(),e.stopPropagation()},{passive:!1})}),m[0].classList.add("is-visible"),window.addEventListener("mouseup",(function(){rr(),nr(e)})),window.addEventListener("blur",(function(){rr(),nr(e)})),window.addEventListener("touchend",(function(){rr(),nr(e)})),window.addEventListener("touchcancel",(function(){rr(),nr(e)})),c}(e,t),mi(e.virtualKeyboard,"touchstart:passive mousedown",()=>{e.$focus()}),document.body.appendChild(e.virtualKeyboard)),window.setTimeout(()=>{e.virtualKeyboard.classList.add("is-visible")},1)):e.virtualKeyboard&&e.virtualKeyboard.classList.remove("is-visible"),"function"==typeof e.config.onVirtualKeyboardToggle&&e.config.onVirtualKeyboardToggle(e,e.virtualKeyboardVisible,e.virtualKeyboard),!1}ji({showAlternateKeys:(e,t,i)=>{const a=ui("mathlive-alternate-keys-panel","ML__keyboard alternate-keys");e.virtualKeyboard.classList.contains("material")&&a.classList.add("material"),i.length>=7?a.style.width="286px":4===i.length||2===i.length?a.style.width="146px":1===i.length?a.style.width="86px":a.style.width="146px",a.style.height="auto";let r="";for(const e of i)r+="";r="
      "+r+"
    ",a.innerHTML=e.config.createHTML(r),ir(e,[].slice.call(a.getElementsByTagName("li")),"performAlternateKeys");const n=e.virtualKeyboard.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys="'+t+'"]').getBoundingClientRect();if(n){n.top-a.clientHeight<0&&(a.style.width="auto",i.length<=6?a.style.height="56px":i.length<=12?a.style.height="108px":a.style.height="205px");const e=(n.top-a.clientHeight+5).toString()+"px",t=Math.max(0,Math.min(window.innerWidth-a.offsetWidth,(n.left+n.right-a.offsetWidth)/2))+"px";a.style.transform="translate("+t+","+e+")",a.classList.add("is-visible")}return!1}},{target:"virtual-keyboard"}),ji({shiftKeyboardLayer:t=>{const i=t.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(i)for(let a=0;arr(),performAlternateKeys:(e,t)=>(rr(),e.$perform(t)),switchKeyboardLayer:(e,t)=>sr(e,t),unshiftKeyboardLayer:e=>nr(e),insertAndUnshiftKeyboardLayer:(e,t)=>(e.$insert(t),nr(e),!0)},{target:"virtual-keyboard"}),ji({toggleVirtualKeyboardAlt:e=>{let t=!1;return e.virtualKeyboard&&(t=e.virtualKeyboard.classList.contains("material"),e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),lr(e,t?"":"material"),!1},toggleVirtualKeyboardShift:e=>{var t,i;e.config.virtualKeyboardLayout={qwerty:"azerty",azerty:"qwertz",qwertz:"dvorak",dvorak:"colemak",colemak:"qwerty"}[e.config.virtualKeyboardLayout];const a=null!==(i=null===(t=e.virtualKeyboard)||void 0===t?void 0:t.querySelector("div.keyboard-layer.is-visible").id)&&void 0!==i?i:"";return e.virtualKeyboard&&(e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),lr(e),a&&sr(e,a),!1}},{target:"virtual-keyboard"}),ji({toggleVirtualKeyboard:(e,t)=>dr(e,t),hideVirtualKeyboard:e=>cr(e),showVirtualKeyboard:(e,t)=>lr(e,t)},{target:"virtual-keyboard"});var mr='.ML__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__base{visibility:inherit;display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--ml_text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__mathlive{display:inline-block;line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-family:KaTeX_Main;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em;box-sizing:content-box}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .stretchy{display:block;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;position:absolute;width:50.2%;overflow:hidden}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;position:absolute;left:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-2-of-3{display:inline-flex;position:absolute;left:25%;width:50%;overflow:hidden}.ML__mathlive .slice-3-of-3{display:inline-flex;position:absolute;right:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-1-of-1{display:inline-flex;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .op-over-under{position:relative}.ML__mathlive .op-over-under>.vlist>span:first-child,.ML__mathlive .op-over-under>.vlist>span:last-child{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{font-family:KaTeX_Main;width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__placeholder{opacity:.7;padding-left:.4ex;padding-right:.4ex;padding-top:.4ex}';const pr="Nothing",ur="Group",hr="Multiply",fr="Power",gr="Divide",yr="Add",br="Negate";function vr(e,t){return e[t]&&!("isConstant"in e[t])?e[t]:null}const xr={arithmetic:{PI:{wikidata:"Q167",isConstant:!0,domain:"R+"},Abs:{wikidata:"Q3317982",isPure:!0,isListable:!0,isIdempotent:!0},Add:{wikidata:"Q32043",isAssociative:!0,isCommutative:!0,isListable:!0,isIdempotent:!0,isPure:!0},Chop:{isAssociative:!0,isListable:!0,isPure:!0,isIdempotent:!0},Ceil:{isPure:!0},Equal:{wikidata:"Q842346",isPure:!0},E:{isConstant:!0,value:{num:"2.7182818284590452354"}},Exp:{isPure:!0},Exp2:{isPure:!0},Exp10:{isPure:!0},Erf:{isPure:!0},Erfc:{isPure:!0},ExpMinusOne:{isPure:!0},Factorial:{wikidata:"Q120976",isPure:!0},Floor:{isPure:!0},Gamma:{isPure:!0},LogGamma:{isPure:!0},Log:{isPure:!0},Log2:{isPure:!0},Log10:{isPure:!0},LogOnePlus:{isPure:!0},MachineEpsilon:{isConstant:!0,value:{num:"2.220446049250313e-16"}},Multiply:{wikidata:"Q40276",isAssociative:!0,isCommutative:!0,isIdempotent:!0,isPure:!0},NotEqual:{wikidata:"Q28113351",isCommutative:!0,isPure:!0},Negate:{wikidata:"Q715358",isPure:!0},Power:{wikidata:"Q33456",isCommutative:!1,isPure:!0},Round:{isPure:!0},SignGamma:{isPure:!0},Sqrt:{isPure:!0},Root:{isCommutative:!1,isPure:!0},Subtract:{wikidata:"Q32043",isCommutative:!1,isPure:!0}},algebra:{},calculus:{},combinatorics:{},complex:{},core:{Evaluate:{},Group:{domain:"expression",isListable:!0,isPure:!1},Latex:{domain:"string",isListable:!1,isPure:!0},String:{domain:"string",isListable:!0,isPure:!0}},dimensions:{},lists:{},logic:{},inequalities:{},intervals:{},"linear-algebra":{},numeric:{},other:{},polynomials:{},physics:{"mu-0":{isConstant:!0,wikidata:"Q1515261",domain:"R+",value:125663706212e-17,unit:[hr,"H",[fr,"m",-1]]}},quantifiers:{},relations:{},rounding:{},sets:{CartesianProduct:{wikidata:"Q173740"},Intersection:{wikidata:"Q185359"},Complement:{wikidata:"Q242767"},Union:{wikidata:"Q185359"},SymmetricDifference:{wikidata:"Q1147242"}},statistics:{},transcendentals:{},trigonometry:{Arcosh:{isPure:!0},Arccos:{isPure:!0},Arcsin:{isPure:!0},Arctan:{isPure:!0},Arctan2:{isPure:!0},Arsinh:{isPure:!0},Artanh:{isPure:!0},Cos:{isPure:!0},Degrees:{isConstant:!0,value:{num:"0.017453292519943295769236907"}},FromPolarCoordinates:{isPure:!0},Haversine:{isPure:!0},Hypot:{isPure:!0},InverseHaversine:{isPure:!0},Sin:{isPure:!0},Sinh:{isPure:!0},Tan:{isPure:!0},Tanh:{isPure:!0},ToPolarCoordinates:{isPure:!0}},units:{}},kr={precision:15,decimalMarker:".",groupSeparator:"\\,",exponentProduct:"\\cdot",beginExponentMarker:"10^{",endExponentMarker:"}",arcSeparator:"\\,",notation:"auto",imaginaryNumber:"\\imaginaryI",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},_r={...kr,invisibleOperator:hr,skipSpace:!0,parseArgumentsOfUnknownLatexCommands:!0,parseNumbers:!0,promoteUnknownSymbols:/^[a-zA-Z]$/,promoteUnknownFunctions:/^[fg]$/,invisiblePlusOperator:yr,preserveLatex:!1,dictionary:[]},wr={...kr,invisibleMultiply:"",invisiblePlus:"",multiply:"\\times",dictionary:[]};function Mr(e){return Boolean(e)&&"object"==typeof e&&"num"in e}function Sr(e){return Boolean(e)&&"object"==typeof e&&"sym"in e}function zr(e){return Boolean(e)&&"object"==typeof e&&"fn"in e}function Lr(e){return"number"==typeof e?e:Mr(e)?parseFloat(e.num):Cr(e)===br?-Lr(Kr(e,1)):NaN}function Ar(e){if("number"==typeof e)return[e,1];if(Mr(e))return[Lr(e),1];if($r(e))return[NaN,NaN];const t=Cr(e);if(t===fr){const t=Lr(Kr(e,2));return 1===t?[Lr(Kr(e,1)),1]:-1===t?[1,Lr(Kr(e,1))]:[NaN,NaN]}return t===gr?[Lr(Kr(e,1)),Lr(Kr(e,2))]:t===hr&&Cr(Kr(e,2))===fr&&-1===Lr(Kr(Kr(e,2),2))?[Lr(Kr(e,1)),Lr(Kr(Kr(e,2),1))]:[NaN,NaN]}function qr(e){return Array.isArray(e)?e[0]:zr(e)?e.fn[0]:null}function $r(e){return null===e||!Array.isArray(e)&&("object"!=typeof e||!("fn"in e))}function Cr(e){const t=qr(e);return"string"==typeof t?t:""}function Dr(e){return"string"==typeof e?e:Sr(e)?e.sym:null}function Tr(e){return Array.isArray(e)?e.slice(1):zr(e)?e.fn.slice(1):[]}function Er(e,t){return Array.isArray(e)?e.map((e,i)=>0===i?e:t(e)):zr(e)?e.fn.map((e,i)=>0===i?e:t(e)):e}function Kr(e,t){return Array.isArray(e)?e[t]:zr(e)?e.fn[t]:null}function Nr(e){return Array.isArray(e)?Math.max(0,e.length-1):zr(e)?Math.max(0,e.fn.length-1):0}function Or(e,t){var i;let a=e;for(let e=0;e{const r=h(g(t,"variant").map(t=>{let r=t[0].variant;if(t[0].variantStyle&&"up"!==t[0].variantStyle&&(r+="-"+t[0].variantStyle),t.every(t=>{const i=ae(t.symbol,e.mode,null);if(!i||!i.variant&&!i.variantStyle)return!1;let a=t.variant;return t.variantStyle&&"up"!==t.variantStyle&&(a+="-"+t.variantStyle),a===r}))return h(t.map(e=>e.toLatex(i)));let n="";return r&&r!==a&&(n={calligraphic:"\\mathcal{",fraktur:"\\mathfrak{","double-struck":"\\mathbb{",script:"\\mathscr{",monospace:"\\mathtt{","sans-serif":"\\mathsf{",normal:"\\mathrm{","normal-italic":"\\mathit{","normal-bold":"\\mathbf{","normal-bolditalic":"\\mathbfit{",ams:"","ams-italic":"\\mathit{","ams-bold":"\\mathbf{","ams-bolditalic":"\\mathbfit{",main:"","main-italic":"\\mathit{","main-bold":"\\mathbf{","main-bolditalic":"\\mathbfit{"}[r]),n+h(t.map(e=>e.toLatex(i)))+(n?"}":"")}));return!t[0].color||e&&e.color===t[0].color?r:"\\textcolor{"+be(t[0].color)+"}{"+r+"}"}))},applyStyle:function(e,t){const i="auto"!==t.letterShapeStyle&&t.letterShapeStyle?t.letterShapeStyle:"tex";let a=t.variant||"normal",r=t.variantStyle||"";"normal"===a&&!r&&/\u00a3|\u0131|\u0237/.test(e.body)&&(a="main",r="italic"),"normal"!==a||r||1!==e.body.length||Rr.forEach((t,a)=>{t.test(e.body)&&"it"===Ir[i][a]&&(r="italic")}),"up"===r&&(r="");const n=r?a+"-"+r:a,[o,s]=Br[n];return Fr[a]&&!Fr[a].test(e.body)?(e.body=Y(e.body,a,r),e.variant="",e.variantStyle="",null):(Pr.test(e.body)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),o)}});const Hr={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"};b("text",{emitLatexRun:function(e,t,i){const a=function(e,t,i){return h(g(t,"color").map(t=>{const i=function(e,t,i){return function(e,t,i){return h(g(t,"fontFamily").map(e=>{const t=function(e,t,i){return h(g(t,"fontSize").map(e=>{const t=function(e,t,i){return h(g(t,"fontSeries").map(e=>{const t=function(e,t,i){return h(g(t,"fontShape").map(e=>{const t=function(e,t,i){let a=!1;return h(t.map(e=>{let t="",i="";return e.latex?t=e.latex:"string"==typeof e.body?t=J("text",e.body):e.symbol&&(t=e.symbol.replace(/\\/g,"\\backslash ")),!a||t&&!/^[a-zA-Z0-9*]/.test(t)||(i="{}"),a=/\\[a-zA-Z0-9]+\*?$/.test(t),i+t}))}(0,e);return"it"===e[0].fontShape?"\\textit{"+t+"}":"sl"===e[0].fontShape?"\\textsl{"+t+"}":"sc"===e[0].fontShape?"\\textsc{"+t+"}":"n"===e[0].fontShape?"\\textup{"+t+"}":e[0].fontShape?"\\fontshape{"+e[0].fontShape+"}"+t:t}))}(0,e);return"b"===e[0].fontSeries?"\\textbf{"+t+"}":"l"===e[0].fontSeries?"\\textlf{"+t+"}":"m"===e[0].fontSeries?"\\textmd{"+t+"}":e[0].fontSeries?"\\fontseries{"+e[0].fontSeries+"}"+t:t}))}(0,e),i={size1:"tiny",size2:"scriptsize",size3:"footnotesize",size4:"small",size5:"normalsize",size6:"large",size7:"Large",size8:"LARGE",size9:"huge",size10:"Huge"}[e[0].fontSize]||"";return i?"\\"+i+" "+t:t}))}(0,e),i={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[e[0].fontFamily]||"";return i?"\\"+i+"{"+t+"}":e[0].fontFamily?"\\fontfamily{"+e[0].fontFamily+"}"+t:t}))}(0,t)}(0,t);return!t[0].color||"none"===t[0].color||e&&e.color===t[0].color?i:"\\textcolor{"+be(t[0].color)+"}{"+i+"}"}))}(e,t);return t.every(e=>e.fontSeries||e.fontShape||e.fontFamily)&&t[0].mode===e.mode?a:`\\text{${a}}`},applyStyle:function(e,t){const i=t.fontFamily;if(Hr[i]?e.classes+=" "+Hr[i]:i&&e.setStyle("font-family",i),t.fontShape&&(e.classes+=" "+({it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape]||"")),t.fontSeries){const i=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);i&&(e.classes+=" "+({ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[i[1]||""]||""),e.classes+=" "+({uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[i[2]||""]||""))}return"Main-Regular"},parse:(e,t,i)=>function(e,t,i){let a,r=[];for(;e.length>0;){const n=e.shift();if(""===n)a=new Oe("text",""," ",i.style),a.symbol=" ",r.push(a);else if("\\"===n[0]){let t;e.unshift(n),[t,e]=i.parse("text",e,i),r=[...r,...t]}else if(1===n.length){const e=ae(n,"text",i.macros);!e||e.mode&&!e.mode.includes("text")?t({code:"unexpected-token"}):(a=new Oe("text",e?e.type:"",e?e.value:n,i.style),a.symbol=n,a.latex=G("text",n),r.push(a))}else if("<$>"===n||"<$$>"===n){const t=e.slice(0,e.findIndex(e=>e===n));e=e.slice(t.length+1);const[a]=i.parse("math",t,i);r=[...r,...a]}else"<{>"===n||"<}>"===n||t({code:"unexpected-token",arg:n})}return[r,e]}(e,t,i)[0]}),de(["ce","pu"],"{chemformula:balanced-string}",null,(e,t)=>({type:"group",mode:"chem",body:Je(Vr.go(Wr.go(t[0],"\\pu"===e?"pu":"ce"))),latexOpen:"\\"+e+"{",latexClose:"}"}));var Wr={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var i,a="0",r={parenthesisLevel:0};e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var n=10,o=[];;){i!==e?(n=10,i=e):n--;var s=Wr.stateMachines[t],l=s.transitions[a]||s.transitions["*"];e:for(var c=0;c0))return o;if(m.revisit||(e=d.remainder),!m.toContinue)break e}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var i=0;i":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return Wr.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return Wr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return Wr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return Wr.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return Wr.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return Wr.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.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))/))return{match_:t[0],remainder:e.substr(t[0].length)};var i=Wr.patterns.findObserveGroups(e,"","$","$","");return i&&(t=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,i,a,r,n,o,s,l,c){var d=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var i=e.match(t);return i?i[0]:null},m=d(e,t);if(null===m)return null;if(e=e.substr(m.length),null===(m=d(e,i)))return null;var p=function(e,t,i){for(var a=0;t":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var i;if((e.d||"").match(/^[0-9]+$/)){var a=e.d;e.d=void 0,i=this.output(e),e.b=a}else i=this.output(e);return Wr.actions["o="](e,t),i},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var i=[];return Wr.concatArray(i,this.output(e)),Wr.concatArray(i,Wr.actions.bond(e,t,"-")),i}e.d=t},"- after o/d":function(e,t,i){var a=Wr.patterns.match_("orbital",e.o||""),r=Wr.patterns.match_("one lowercase greek letter $",e.o||""),n=Wr.patterns.match_("one lowercase latin letter $",e.o||""),o=Wr.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(a&&""===a.remainder||r||n||o);!s||e.a||e.b||e.p||e.d||e.q||a||!n||(e.o="$"+e.o+"$");var l=[];return s?(Wr.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(a=Wr.patterns.match_("digits",e.d||""),i&&a&&""===a.remainder?(Wr.concatArray(l,Wr.actions["d="](e,t)),Wr.concatArray(l,this.output(e))):(Wr.concatArray(l,this.output(e)),Wr.concatArray(l,Wr.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:Wr.go(t,"o")}},comma:function(e,t){var i=t.replace(/\s*$/,"");return i!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(e,t,i){var a,r,n;for(var o in e.r?(r="M"===e.rdt?Wr.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:Wr.go(e.rd),n="M"===e.rqt?Wr.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:Wr.go(e.rq),a={type_:"arrow",r:e.r,rd:r,rq:n}):(a=[],(e.a||e.b||e.p||e.o||e.q||e.d||i)&&(e.sb&&a.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===i?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&Wr.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),a.push({type_:"chemfive",a:Wr.go(e.a,"a"),b:Wr.go(e.b,"bd"),p:Wr.go(e.p,"pq"),o:Wr.go(e.o,"o"),q:Wr.go(e.q,"pq"),d:Wr.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType}))),e)"parenthesisLevel"!==o&&"beginsWithBond"!==o&&delete e[o];return a},"oxidation-output":function(e,t){var i=["{"];return Wr.concatArray(i,Wr.go(t,"oxidation")),i.push("}"),i},"frac-output":function(e,t){return{type_:"frac-ce",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Wr.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,i){return{type_:"operator",kind_:i||t}}}},a:{transitions:Wr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Wr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var i in e)delete e[i];return t}}}},pq:{transitions:Wr.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:Wr.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Wr.go(t[1],"pq")}}}},bd:{transitions:Wr.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Wr.go(t[1],"bd")}}}},oxidation:{transitions:Wr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"tex-math tight":{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"9,9":{transitions:Wr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),t[1]&&(Wr.concatArray(i,Wr.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?Wr.concatArray(i,Wr.go(t[2],"pu-9,9")):i.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?i.push({type_:"cdot"}):i.push({type_:"times"}))),t[3]&&i.push("10^{"+t[5]+"}"),i},"number^":function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),Wr.concatArray(i,Wr.go(t[1],"pu-9,9")),i.push("^{"+t[2]+"}"),i},operator:function(e,t,i){return{type_:"operator",kind_:i||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,i=Wr.patterns.match_("{(...)}",e.d||"");i&&""===i.remainder&&(e.d=i.match_);var a=Wr.patterns.match_("{(...)}",e.q||"");if(a&&""===a.remainder&&(e.q=a.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:Wr.go(e.d,"pu"),q:Wr.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:r.d,p2:r.q}:(t=r.d,r.d.length>1||r.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),Wr.concatArray(t,r.q))}else t=Wr.go(e.d,"pu-2");for(var n in e)delete e[n];return t}}},"pu-2":{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var i=Wr.patterns.match_("{(...)}",e.rm||"");t=i&&""===i.remainder?Wr.go(i.match_,"pu"):{type_:"rm",p1:e.rm}}for(var a in e)delete e[a];return t}}},"pu-9,9":{transitions:Wr.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var i=e.text_.length%3;0===i&&(i=3);for(var a=e.text_.length-3;a>0;a-=3)t.push(e.text_.substr(a,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,i)),t.reverse()}else t.push(e.text_);for(var r in e)delete e[r];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var i=e.text_.length-3,a=0;a":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function Ur(e,t){return t>1?"solidus":"radical"}function jr(e,t,i,a){if(i>=20)return[e,null];let r=[],n=[null!=e?e:pr],o=!1;for(;!o;){t.skipSpace();const e=t.matchExpression(20);null===e?(t.skipSpace(),t.match(",")?n.push(pr):o=!0):("Sequence"===Cr(e)?n=n.concat(Tr(e)):n.push(e),t.skipSpace(),t.match(",")?t.skipSpace():t.match(";")?(r.push(["Subsequence",...n]),n=[]):o=!0)}return 0===r.length?r=n:r.push(["Subsequence",...n]),[null,["Subsequence",...r]]}function Gr(e,t){return"Sequence"===Cr(t)&&Tr(t).some(e=>"Subsequence"===Cr(e))?Tr(t).map(t=>e.emit(t)).join("; "):Tr(t).map(t=>e.emit(t)).join(", ")}function Xr(e,t){const i=Qr(e),a=Qr(t);if(ia)return 1;let r=en(e);isNaN(r)&&(r=Number(1/0));let n=en(t);if(isNaN(n)&&(n=Number(1/0)),rn)return 1;const o=Jr(e),s=Jr(t);if(o===s)for(let i=1;i<=o;i++){const a=Xr(Kr(e,i),Kr(t,i));if(0!==a)return a}return s-o}function Zr(e,t){if(0===e)return-1/0;const i=Cr(e);if(i===fr){const t=Lr(Kr(e,2));return isFinite(t)?t:0}if(i===hr){let i=0;return Tr(e).forEach(e=>{i+=Zr(e,t)}),i}return t.includes(Dr(e))?1:0}function Yr(e,t){const i=Cr(e);if(i===fr){if(Dr(Kr(e,1))===t){const t=Lr(Kr(e,2));if(isFinite(t))return t}return 0}if(i===hr){let i=0;for(const a of Tr(e))i+=Yr(a,t);return i}return Dr(e)===t?1:0}function Qr(e){return qr(e)?Tr(e).map(Qr).join(" "):"string"==typeof e?e:Sr(e)?e.sym:""}function Jr(e){return qr(e)?Tr(e).map(Jr).reduce((e,t)=>e+t,0):"string"==typeof e||Dr(e)?1:0}function en(e){return qr(e)?NaN:"number"==typeof e?e:Mr(e)?Lr(e):0}function tn(e){const t=qr(e);return t?t===ur&&1===Nr(e)?tn(Kr(e,1)):Er(e,tn):e}function an(e){if(null===e)return null;const t=qr(e=tn(e));return t===fr&&2===Nr(e)?[fr,Kr(e,1),rn(Kr(e,2))]:t===gr&&2===Nr(e)?[hr,[fr,Kr(e,1),-1],Kr(e,2)]:[fr,e,-1]}function rn(e){if(null===e)return e;if("number"==typeof(e=tn(e)))e=-e;else if(e&&Mr(e))e="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num};else{const t=Cr(e),i=Nr(e);if(t===br&&1===i)return Kr(e,1);if(t===hr){let t=Kr(e,1);return t="number"==typeof t?-t:Mr(t)?"-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}:[br,t],[hr,t,...Tr(e).slice(1)]}if(t===ur&&1===i)return rn(Kr(Kr(e,1),1));e=[br,e]}return e}function nn(e,t){const i=qr(e);if(!i)return e;if(e=Er(e,e=>nn(e,t)),i!==t)return e;const a=Tr(e);let r=[];for(let e=0;eon(e,t));let a=Tr(t=nn(tn(t),yr));a=a.map(t=>on(e,t)).filter(e=>0!==Lr(e));const r=a.length;return 0===r?0:1===r?a[0]:[yr,...a]}function sn(e,t){const i=qr(t);if(!i)return t;if(i!==gr)return Er(t,t=>sn(e,t));if(2!==Nr(t))return t;const a=sn(e,Kr(t,1)),r=sn(e,Kr(t,2));return 1===Lr(r)?a:[hr,a,an(r)]}function ln(e,t){const i=qr(t);return i?"Exp"!==i?Er(t,t=>ln(e,t)):1!==Nr(t)?t:[fr,"E",ln(e,Kr(t,1))]:t}function cn(e,t){var i;if($r(t))return t;const a=Cr(t),r="List"===a,n=vr(e,a),o=null!==(i=null==n?void 0:n.sequenceHold)&&void 0!==i&&i,s=Tr(t),l=[];for(let i of s){i=cn(e,i);const a=Cr(i);if("Identity"===a){const e=Kr(i,1);null!=e&&l.push(e)}else if(a===pr)r||l.push(i);else if("Sequence"!==a||o)l.push(i);else{const e=qr(t);for(const t of Tr(i))"Subsequence"===Cr(t)?l.push([e,...Tr(t)]):l.push(t)}}return[qr(t),...l]}function dn(e){const t=Cr(e);if("Sqrt"===t)return 2;if("Root"===t)return Lr(Kr(e,2));if(t!==fr)return 1;const i=Kr(e,2);if(!i)return 1;if(Cr(i)===fr&&-1===Lr(Kr(i,2))){const e=Lr(Kr(i,1));if(isFinite(e))return e}return 1}function mn(e,t){const i=qr(t);if(!i)return t;if(t=Er(t,t=>mn(e,t)),i!==hr)return t;t=nn(tn(t),hr);const[a,r]=function(e){const t=Tr(e),i=[],a=[];for(const e of t)2===dn(e)?i.push(Kr(e,1)):a.push(e);return[i,a]}(t);let n;n=0===a.length?r:1===a.length?Tr(t=[hr,...r,[fr,a[0],[fr,2,-1]]]):Tr(t=[hr,...r,[fr,[hr,...a],[fr,2,-1]]]);let o=!1,s=!1;if(n=n.map(e=>{if(Cr(e)===br)return s=!0,o=!o,Kr(e,1);const t=Lr(e);return t<0?(s=!0,o=!o,-t):e}),o){const e=Lr(n[0]);n=isFinite(e)?Tr(nn([hr,-e,...n.slice(1)],hr)):Tr(nn([hr,-1,...n],hr))}else n=Tr(nn([hr,...n],hr));return n=n.filter(e=>1!==Lr(e)),0===n.length?1:1===n.length?n[0]:[hr,...n]}function pn(e,t){const i=qr(t);if(!i)return t;if(i!==fr)return Er(t,t=>pn(e,t));if(2!==Nr(t=tn(t)))return t;const a=pn(e,Kr(t,1)),r=Lr(a),n=Lr(pn(e,Kr(t,2)));return 0===n?1:1===n?a:-1===r&&-1===n?-1:1===r&&-1===n||1===r?1:t}function un(e,t){const i=Cr(t);if(i===br){const e=Kr(t=tn(t),1);if("number"==typeof e)t=-e;else{if(!e||!Mr(e)){if(Cr(e)===hr){let t=Kr(e,1);if("number"==typeof t)t=-t;else{if(!Mr(t))return[hr,-1,t,...Tr(e).slice(1)];t="-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}}return[hr,t,...Tr(e).slice(1)]}return[hr,-1,e]}if(0===Lr(e))return 0;t="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num}}}else if(i)return Er(t,t=>un(e,t));return t}function hn(e,t){if(qr(t))return Er(t,t=>hn(e,t));if("number"==typeof t){if(isNaN(t))return{num:"NaN"};if(!isFinite(t)&&t>0)return{num:"Infinity"};if(!isFinite(t)&&t<0)return{num:"-Infinity"}}else if(Mr(t)){if(isNaN(Number(t.num)))return{num:"NaN"};if(t.num.endsWith("n"))return{num:t.num.slice(0,-1)}}return t}function fn(e,t){const i=qr(t);if(!i)return t;if("Subtract"!==i)return Er(t,t=>fn(e,t));if(2!==Nr(t))return t;const a=fn(e,Kr(t,1)),r=Lr(a),n=fn(e,Kr(t,2)),o=Lr(n);return 0===r&&0===o?0:fn(e,[yr,a,rn(n)])}function gn(e,t){const i=qr(t);if(!i)return t;if("Root"!==i&&"Sqrt"!==i)return Er(t,t=>gn(e,t));if(Nr(t)<1)return t;const a=gn(e,Kr(t,1));let r=2;return Nr(t)>1&&(r=pn(e,Kr(t,2))),1===Lr(r)?a:[fr,a,[gr,1,r]]}function yn(e){const t=Number(e);return"string"==typeof e&&t.toString()===e?isNaN(t)||!isFinite(t)?t.toString():t:e}function bn(e,t){if(null===t)return null;if(Array.isArray(t))return t.map((t,i)=>0===i?t:bn(e,t));if("object"==typeof t)if(1===Object.keys(t).length){if(Mr(t)){const e=yn(t.num);return"number"==typeof e?e:{num:e}}if(zr(t))return t.fn.map(t=>bn(e,t));if(Sr(t))return t.sym}else zr(t)&&(t.fn=t.fn.map(t=>bn(e,t)));return t}function vn(e,t){if("number"==typeof t||"string"==typeof t)return t;if(Array.isArray(t))return Er(t,t=>vn(e,t));if("object"==typeof t){if("num"in t){const e=yn(t.num);return"number"==typeof e?e:{num:e}}if("fn"in t)return Er(t.fn,t=>vn(e,t))}return null}function xn(e,t){const i=function(e,t){const i=new Set;return function e(t,i,a){const r=Tr(a);if(r.length>0)r.forEach(a=>e(t,i,a));else{const e=Dr(a);if(e&&!i.has(e)){const a=function(e,t){return e[t]&&"isConstant"in e[t]?e[t]:null}(t,e);a&&a.isConstant||i.add(e)}}}(e,i,t),i}(e,t);return function e(t,i,a){var r;let n=Tr(a);if(0===n.length)return a;n=n.map(a=>e(t,i,a));const o=Cr(a);if(o===yr)n.sort((e,t)=>function(e,t,i){const a=Zr(e,i),r=Zr(t,i);if(ar)return-1;for(const a of i){const i=Yr(e,a),r=Yr(t,a);if(i!==r)return r-i}const n=Qr(e),o=Qr(t);return n>o?-1:ne(t,i))}(e,function e(t,i){const a=Cr(i),r=vr(t,a);return(null==r?void 0:r.isIdempotent)?nn(i,a):Er(i,i=>e(t,i))}(e,t))}function wn(e,t,i){let a=t;return i.forEach(t=>{const i={canonical:kn,"canonical-add":on,"canonical-divide":sn,"canonical-exp":ln,"canonical-list":cn,"canonical-multiply":mn,"canonical-power":pn,"canonical-negate":un,"canonical-number":hn,"canonical-root":gn,"canonical-subtract":fn,full:bn,flatten:_n,sorted:xn,"stripped-metadata":vn}[t];a=i?i(e,a):null}),a}function Mn(e,t,i,a){return a=null!=a?a:2,"solidus"===t?e.wrapShort(i)+"^{1\\/"+e.emit(a)+"}":"quotient"===t?e.wrapShort(i)+"^{\\frac{1}{"+e.emit(a)+"}}":2===Lr(a)?"\\sqrt{"+e.emit(i)+"}":"\\sqrt["+e.emit(a)+"]{"+e.emit(i)+"}"}function Sn(e,t,i,a){const r=t.matchOptionalLatexArgument(),n=t.matchRequiredLatexArgument();return null===n?[e,["Sqrt"]]:null!==r?[e,["Root",null!=n?n:pr,r]]:[e,["Sqrt",n]]}function zn(e,t,i,a){if(2760&&(i=1===r.length&&1===r[0]?0===a.length?"1":1===a.length?e.emit(a[0]):Ln(e,[hr,...a]):e.emit([gr,1===a.length?a[0]:[hr,...a],1===r.length?r[0]:[hr,...r]])),i)return e.level+=1,i;let n=!1,o=null;const s=Nr(t)+1;for(let a=1;a3?"inline-solidus":"quotient";if("inline-solidus"===i||"nice-solidus"===i){const a=e.wrapShort(Kr(t,1)),r=e.wrapShort(Kr(t,2));return"nice-solidus"===i?`^{${a}}\\!\\!/\\!_{${r}}`:`${a}\\/${r}`}return"reciprocal"===i?e.wrap(Kr(t,1))+e.wrap(Kr(t,2))+"^{-1}":"factor"===i?"\\frac{1}{"+e.emit(Kr(t,2))+"}"+e.wrap(Kr(t,1)):"\\frac{"+e.emit(Kr(t,1))+"}{"+e.emit(Kr(t,2))+"}"}function qn(e,t){const i=Kr(t,1),a=Kr(t,2);if(null===a)return e.emit(i);if(null===i)return"";const r=Cr(t);if("Sqrt"===r||"Root"===r)return Mn(e,Ur(0,e.level),Kr(t,1),Kr(t,2));const n=Lr(a);if(-1===n)return e.emit([gr,"1",i]);if(n<0)return e.emit([gr,"1",[fr,i,-n]]);if(Cr(a)===gr){if(1===Lr(Kr(a,1)))return Mn(e,Ur(0,e.level),i,Kr(a,2))}else if(Cr(a)===fr&&-1===Lr(Kr(a,2)))return Mn(e,Ur(0,e.level),i,Kr(a,1));return e.wrapShort(i)+"^{"+e.emit(a)+"}"}function $n(e,t,i,a){var r;let n=!1,o=0;if(t.skipSpace(),t.match("^")){if(t.skipSpace(),t.match("<{>")){t.skipSpace(),t.match("-")&&t.match("1")&&(n=!0);do{t.match("\\doubleprime")&&(o+=2),t.match("\\prime")&&(o+=1),t.match("'")&&(o+=1)}while(!t.match("<}>")&&!t.atEnd())}let e=!1;for(;!e;)t.skipSpace(),t.match("\\doubleprime")?o+=2:t.match("\\prime")||t.match("'")?o+=1:e=!0}let s=null!==(r={"\\arcsin":"Arcsin","\\arccos":"Arccos","\\arctan":"Arctan","\\arctg":"Arctan","\\arcctg":"Arctan","\\arcsec":"Arcsec","\\arccsc":" Arccsc","\\arsinh":"Arsinh","\\arcosh":"Arcosh","\\artanh":"Artanh","\\arcsech":"Arcsech","\\arccsch":"Arcsch","\\ch":"Cosh","\\cos":"Cos","\\cosec":"Csc","\\cosh":"Csch","\\cot":"Cot","\\cotg":"Cot","\\coth":"Coth","\\csc":"Csc","\\ctg":"Cot","\\cth":"Coth","\\sec":"Sec","\\sin":"Sin","\\sinh":"Sinh","\\sh":"Sinh","\\tan":"Tan","\\tanh":"Tanh","\\tg":"Tan","\\th":"Tanh"}[a])&&void 0!==r?r:a;n&&(s=["InverseFunction",s]),o>=1&&(s=["Derivative",o,s]);const l=t.matchArguments("implicit");return null===l?[null,s]:[null,[s,...l]]}function Cn(e){return Array.isArray(e)?f(e):e}function Dn(e,t){var i,a,r,n,o,s,l,c,d,m,p,u,h,f,g;const y={lookahead:1,name:new Map,prefix:[],infix:[],postfix:[],matchfix:[],superfix:[],subfix:[],symbol:[],environment:new Map};for(const b of e){const e=b;void 0===e.parse&&(e.parse=e.name),"string"==typeof e.trigger&&(e.trigger={symbol:e.trigger}),"string"==typeof e.emit&&void 0!==(null===(i=e.trigger)||void 0===i?void 0:i.symbol)&&/#[0-9]/.test(e.emit)&&t({code:"unexpected-argument",arg:e.name}),void 0===e.emit&&(void 0!==(null===(a=e.trigger)||void 0===a?void 0:a.postfix)?e.emit="#1"+Cn(e.trigger.postfix):void 0!==(null===(r=e.trigger)||void 0===r?void 0:r.prefix)?e.emit=Cn(e.trigger.prefix)+"#1":void 0!==(null===(n=e.trigger)||void 0===n?void 0:n.infix)?e.emit="#1"+Cn(e.trigger.infix)+"#2":void 0!==(null===(o=e.trigger)||void 0===o?void 0:o.symbol)?e.emit=Cn(e.trigger.symbol):void 0!==(null===(s=e.trigger)||void 0===s?void 0:s.superfix)?e.emit="#1^{"+Cn(null===(l=e.trigger)||void 0===l?void 0:l.superfix)+"}":void 0!==(null===(c=e.trigger)||void 0===c?void 0:c.subfix)?e.emit="#1_{"+Cn(null===(d=e.trigger)||void 0===d?void 0:d.subfix)+"}":e.emit=""),void 0!==(null===(m=e.trigger)||void 0===m?void 0:m.infix)&&(void 0===e.precedence&&t({code:"syntax-error",arg:"Infix operators require a precedence"}),e.associativity||(e.associativity="non")),void 0!==(null===(p=e.trigger)||void 0===p?void 0:p.symbol)&&(e.arguments=null!==(u=e.arguments)&&void 0!==u?u:"",e.optionalLatexArg=null!==(h=e.optionalLatexArg)&&void 0!==h?h:0,e.requiredLatexArg=null!==(f=e.requiredLatexArg)&&void 0!==f?f:0),void 0!==(null===(g=e.trigger)||void 0===g?void 0:g.matchfix)&&("function"===e.parse||e.closeFence||t({code:"syntax-error",arg:"Matchfix operators require a close fence or a custom parse function"})),void 0!==e.trigger&&(["infix","prefix","postfix","symbol","matchfix","superfix","subfix"].forEach(t=>{const i=(a=e.trigger[t],Array.isArray(a)?a.length:1);var a;y.lookahead=Math.max(y.lookahead,i),void 0===y[t][i]&&(y[t][i]=new Map),y[t][i].set(Cn(e.trigger[t]),e)}),void 0!==e.trigger.environment&&y.environment.set(e.trigger.environment,e)),e.name&&y.name.set(Cn(e.name),e),void 0!==e.trigger||e.name||t({code:"syntax-error",arg:"Need at least a trigger or a name"})}return y}function Tn(e="all"){let t;return"all"===e?(t=[],Object.keys(En).forEach(e=>{t=[...t,...En[e]]})):t=[...En[e]],t}const En={algebra:[{name:"To",trigger:{infix:"\\to"},precedence:270}],arithmetic:[{trigger:{symbol:"\\infty"},parse:{num:"Infinity"}},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","\\infty"]},emit:"\\tilde\\infty"},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","<{>","\\infty","<}>"]},emit:"\\tilde\\infty"},{name:"PI",trigger:{symbol:"\\pi"}},{name:"PI",trigger:{symbol:"π"},emit:"\\pi"},{name:"E",trigger:{symbol:"e"},emit:"e"},{name:"I",trigger:{symbol:"i"},emit:"\\imaginaryI"},{name:"I",trigger:{symbol:"\\imaginaryI"}},{name:yr,trigger:{prefix:"+",infix:"+"},parse:function(e,t,i,a){if(2751&&(r=["List",...r]),[e,["PartialDerivative",a,r,i===pr?1:i]]}return[e,[gr,l,c]]},emit:An,requiredLatexArg:2},{name:gr,trigger:{infix:"\\/"},emit:An,associativity:"non",precedence:660},{name:gr,trigger:{infix:"/"},emit:An,associativity:"non",precedence:660},{name:gr,trigger:{infix:"\\div"},emit:An,associativity:"non",precedence:660},{name:fr,trigger:{infix:"^"},associativity:"non",precedence:720,emit:qn},{name:fr,trigger:{infix:["*","*"]},associativity:"non",precedence:720,emit:qn},{name:"Sqrt",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:Sn,emit:qn},{name:"Root",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:Sn},{name:"Norm",trigger:{matchfix:"\\lVert"},closeFence:"\\rVert"},{name:"Norm",trigger:{matchfix:"\\|"},closeFence:"\\|"},{name:"Norm",trigger:{matchfix:["|","|"]},closeFence:["|","|"]},{name:"Abs",trigger:{matchfix:"|"},closeFence:"|"},{name:"Abs",trigger:{matchfix:"\\lvert"},closeFence:"\\rvert"},{name:"Factorial",trigger:{postfix:"!"},precedence:810},{name:"Factorial2",trigger:{postfix:["!","!"]},precedence:810}],calculus:[{trigger:{symbol:"\\int"},parse:function(e,t,i,a){var r;let n=pr,o=pr,s=!1;for(;!s;)t.skipSpace(),t.match("_")?o=t.matchRequiredLatexArgument():t.match("^")?n=t.matchRequiredLatexArgument():s=!0;let l=null;if(t.match("<{>")){const e=t.getIndex();let i=1;for(;!t.atEnd()&&0!==i;)t.match("<{>")?i+=1:t.match("<}>")?i-=1:t.next();l=null!==(r=t.clone(e,t.getIndex()-1).matchExpression())&&void 0!==r?r:""}return[e,["Integral",l,n,o]]},emit:function(e,t){return""}}],core:[{name:"Latex",emit:function e(t,i){if(null===i)return"";const a=qr(i);if(null!==a){const r=Tr(i);return"Latex"===a?r.map(i=>e(t,i)).join(""):0===r.length?t.emit(a):t.emit(a)+r.map(e=>"{"+t.emit(e)+"}").join("")}return t.emit(i)}},{name:ur,trigger:{matchfix:"("},parse:(e,t,i,a)=>{const r=t.getIndex();let n=!1,o=!0,s=0,l="";for(;!n&&o;){const e=t.next();t.atEnd()||")"===e?n=!0:/^[0-9a-zA-Z]$/.test(e)?(s=Math.max(s,parseInt(e,36)),l+=e):o=!1}if(t.skipSpace(),o&&t.match("_")){const i=Lr(t.matchRequiredLatexArgument());if(isFinite(i)&&s"Subsequence"===Cr(e));for(const n of Tr(t))null!==n&&(a+=i+e.emit(n),i=r?"; ":", ");return e.wrapString(a,(e.level,"paren"))},separator:",",closeFence:")",precedence:20},{name:"List",trigger:{matchfix:"\\lbrack"},separator:",",closeFence:"\\rbrack",precedence:20},{name:"BaseForm",emit:(e,t)=>{const i=Lr(Kr(t,2));if(isFinite(i)&&i>0&&i<=36){const e=Lr(Kr(t,1));if(isFinite(e)){let t=Number(e).toString(i),a=0;if(2===i||10===i?a=4:16===i?a=2:i>16&&(a=4),a>0){const e=t;t="";for(let i=0;i0&&i%a==0&&(t="\\; "+t),t=e[e.length-i-1]+t}return"\\mathtt{"+t+"}_{"+Number(i).toString()+"}"}}return"\\operatorname{BaseForm}("+e.emit(Kr(t,1))+", "+e.emit(Kr(t,2))+")"}},{name:"Set",trigger:{matchfix:"\\lbrace"},separator:",",closeFence:"\\rbrace",precedence:20},{name:"Sequence",trigger:{infix:","},parse:jr,emit:Gr,precedence:20},{name:"Subsequence",trigger:{infix:";"},parse:jr,emit:Gr,precedence:20},{name:"Missing",trigger:"\\placeholder",emit:"\\placeholder",requiredLatexArg:1},{name:"Subscript",trigger:{infix:"_"},precedence:720,emit:(e,t)=>2===Nr(t)?e.emit(Kr(t,1))+"_{"+e.emit(Kr(t,2))+"}":"_{"+e.emit(Kr(t,1))+"}",parse:(e,t,i,a)=>[null,["Subscript",e,t.matchRequiredLatexArgument()]]},{name:"Superplus",trigger:{superfix:"+"}},{name:"Subplus",trigger:{subfix:"+"}},{name:"Superminus",trigger:{superfix:"-"}},{name:"Subminus",trigger:{subfix:"-"}},{name:"Superstar",trigger:{superfix:"*"}},{name:"Superstar",trigger:{superfix:"\\star"}},{name:"Substar",trigger:{subfix:"*"}},{name:"Substar",trigger:{subfix:"\\star"}},{name:"Superdagger",trigger:{superfix:"\\dagger"}},{name:"Superdagger",trigger:{superfix:"\\dag"}},{name:"Prime",trigger:{superfix:"\\prime"},arguments:"group"},{trigger:{superfix:"\\doubleprime"},parse:e=>[null,["Prime",e,2]],arguments:"group"},{name:"InverseFunction",emit:(e,t)=>e.emit(Kr(t,1))+"^{-1}"},{name:"Derivative",trigger:"D",parse:(e,t)=>[e,["Derivative",1]],emit:(e,t)=>{const i=Lr(Kr(t,1));if(!isFinite(i))return"";const a=e.emit(Kr(t,2));return 1===i?a+"^{\\prime}":2===i?a+"^{\\doubleprime}":a+"^{("+Number(i).toString()+")}"}},{name:"Piecewise",trigger:{environment:"cases"},parse:(e,t)=>[null,["piecewise",t.matchTabular()]],emit:(e,t)=>{if("List"!==Cr(Kr(t,1)))return"";const i=Tr(Kr(t,1));let a="",r="";for(const t of i){a+=r;const i=Kr(t,1);if(null!==i){a+=e.emit(i);const r=Kr(t,2);null!==r&&(a+="&"+e.emit(r))}r="\\\\"}return"\\begin{cases}"+a+"\\end{cases}"}}],inequalities:[{name:"NotLess",trigger:{infix:["!","<"]},associativity:"right",precedence:246},{name:"NotLess",trigger:{infix:"\\nless"},associativity:"right",precedence:246},{name:"Less",trigger:{infix:"<"},associativity:"right",precedence:245},{name:"Less",trigger:{infix:"\\lt"},associativity:"right",precedence:245},{name:"LessEqual",trigger:{infix:["<","="]},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\le"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leq"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leqslant"},associativity:"right",precedence:265},{name:"LessNotEqual",trigger:{infix:"\\lneqq"},associativity:"right",precedence:260},{name:"NotLessNotEqual",trigger:{infix:"\\nleqq"},associativity:"right",precedence:260},{name:"LessOverEqual",trigger:{infix:"\\leqq"},associativity:"right",precedence:265},{name:"GreaterOverEqual",trigger:{infix:"\\geqq"},associativity:"right",precedence:265},{name:"Equal",trigger:{infix:"="},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["*","="]},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["\\star","="]},associativity:"right",precedence:260},{name:"PlusEqual",trigger:{infix:["+","="]},associativity:"right",precedence:260},{name:"MinusEqual",trigger:{infix:["-","="]},associativity:"right",precedence:260},{name:"SlashEqual",trigger:{infix:["/","="]},associativity:"right",precedence:260},{name:"EqualEqual",trigger:{infix:["=","="]},associativity:"right",precedence:260},{name:"EqualEqualEqual",trigger:{infix:["=","=","="]},associativity:"right",precedence:265},{name:"TildeFullEqual",trigger:{infix:"\\cong"},associativity:"right",precedence:260},{name:"NotTildeFullEqual",trigger:{infix:"\\ncong"},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:[":","="]},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:"\\coloneq"},associativity:"right",precedence:260},{name:"Approx",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"NotApprox",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"ApproxEqual",trigger:{infix:"\\approxeq"},associativity:"right",precedence:260},{name:"NotApproxEqual",trigger:{infix:["!","\\approxeq"]},associativity:"right",precedence:250},{name:"Unequal",trigger:{infix:"\\ne"},associativity:"right",precedence:255},{name:"Unequal",trigger:{infix:["!","="]},associativity:"right",precedence:260},{name:"GreaterEqual",trigger:{infix:"\\ge"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:"\\geq"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:[">","="]},associativity:"right",precedence:243},{name:"GreaterEqual",trigger:{infix:"\\geqslant"},associativity:"right",precedence:265},{name:"GreaterNotEqual",trigger:{infix:"\\gneqq"},associativity:"right",precedence:260},{name:"NotGreaterNotEqual",trigger:{infix:"\\ngeqq"},associativity:"right",precedence:260},{name:"Greater",trigger:{infix:">"},associativity:"right",precedence:245},{name:"Greater",trigger:{infix:"\\gt"},associativity:"right",precedence:245},{name:"NotGreater",trigger:{infix:"\\ngtr"},associativity:"right",precedence:244},{name:"NotGreater",trigger:{infix:["!",">"]},associativity:"right",precedence:244},{name:"RingEqual",trigger:{infix:"\\circeq"},associativity:"right",precedence:260},{name:"TriangleEqual",trigger:{infix:"\\triangleq"},associativity:"right",precedence:260},{name:"DotEqual",trigger:{infix:"\\doteq"},associativity:"right",precedence:265},{name:"DotEqualDot",trigger:{infix:"\\doteqdot"},associativity:"right",precedence:265},{name:"FallingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"RisingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"QuestionEqual",trigger:{infix:"\\questeq"},associativity:"right",precedence:260},{name:"Equivalent",trigger:{infix:"\\equiv"},associativity:"right",precedence:260},{name:"MuchLess",trigger:{infix:"\\ll"},associativity:"right",precedence:260},{name:"MuchGreater",trigger:{infix:"\\gg"},associativity:"right",precedence:260},{name:"Precedes",trigger:{infix:"\\prec"},associativity:"right",precedence:260},{name:"Succeeds",trigger:{infix:"\\succ"},associativity:"right",precedence:260},{name:"PrecedesEqual",trigger:{infix:"\\preccurlyeq"},associativity:"right",precedence:260},{name:"SucceedsEqual",trigger:{infix:"\\curlyeqprec"},associativity:"right",precedence:260},{name:"NotPrecedes",trigger:{infix:"\\nprec"},associativity:"right",precedence:260},{name:"NotSucceeds",trigger:{infix:"\\nsucc"},associativity:"right",precedence:260},{name:"ElementOf",trigger:{infix:"\\in"},associativity:"right",precedence:240},{name:"NotElementOf",trigger:{infix:"\\notin"},associativity:"right",precedence:240},{name:"Contains",trigger:{infix:"\\ni"},associativity:"right",precedence:160},{name:"Subset",trigger:{infix:"\\subset"},associativity:"right",precedence:240},{name:"SquareSubset",trigger:{infix:"\\sqsubset"},associativity:"right",precedence:265},{name:"SquareSubsetEqal",trigger:{infix:"\\sqsubseteq"},associativity:"right",precedence:265},{name:"Superset",trigger:{infix:"\\supset"},associativity:"right",precedence:240},{name:"SquareSuperset",trigger:{infix:"\\sqsupset"},associativity:"right",precedence:265},{name:"SquareSupersetEuqal",trigger:{infix:"\\sqsupseteq"},associativity:"right",precedence:265},{name:"NotSubset",trigger:{infix:"\\nsubset"},associativity:"right",precedence:240},{name:"NotSuperset",trigger:{infix:"\\nsupset"},associativity:"right",precedence:240},{name:"SubsetEqual",trigger:{infix:"\\subseteq"},associativity:"right",precedence:240},{name:"SupersetEqual",trigger:{infix:"\\supseteq"},associativity:"right",precedence:240},{name:"NotSubsetNotEqual",trigger:{infix:"\\nsubseteq"},associativity:"right",precedence:240},{name:"NotSupersetNotEqual",trigger:{infix:"\\nsupseteq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\subsetneq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\supsetneq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\varsupsetneqq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\varsupsetneq"},associativity:"right",precedence:240},{name:"Between",trigger:{infix:"\\between"},associativity:"right",precedence:265}],other:[{name:"Overscript",trigger:{infix:"\\overset"},precedence:700},{name:"Underscript",trigger:{infix:"\\underset"},precedence:700},{name:"Increment",trigger:{postfix:["+","+"]},precedence:880},{name:"Decrement",trigger:{postfix:["-","-"]},precedence:880},{name:"PreIncrement",trigger:{prefix:["+","+"]},precedence:880},{name:"PreDecrement",trigger:{prefix:["-","-"]},precedence:880},{name:"Ring",trigger:{infix:"\\circ"},precedence:265},{name:"Transpose",trigger:{superfix:"T"}},{name:"ConjugateTranspose",trigger:{superfix:"H"}},{name:"StringJoin",trigger:{infix:["\\lt","\\gt"]},precedence:780},{name:"Starstar",trigger:{infix:["\\star","\\star"]},precedence:780},{name:"PartialDerivative",trigger:{prefix:"\\partial"},parse:(e,t,i,a)=>{var r;let n=!1,o=pr,s=pr;for(;!n;)t.skipSpace(),t.match("_")?s=t.matchRequiredLatexArgument():t.match("^")?o=t.matchRequiredLatexArgument():n=!0;"Sequence"===Cr(s)&&(s=["List",...Tr(s)]);let l=null!==(r=t.matchRequiredLatexArgument())&&void 0!==r?r:pr;return l!==pr&&(l=[l,...t.matchArguments("group")]),[null,["PartialDerivative",l,s,o]]},emit:(e,t)=>{let i="\\partial";const a=Kr(t,1),r=Kr(t,2),n=Kr(t,3);return null!==r&&r!==pr&&("List"===qr(r)?i+="_{"+e.emit(["Sequence",...Tr(r)])+"}":i+="_{"+e.emit(r)+"}"),null!==n&&n!==pr&&(i+="^{"+e.emit(n)+"}"),null!==a&&a!==pr&&(i+=e.emit(a)),i},precedence:740},{name:"OverBar",trigger:{symbol:"\\overline"},requiredLatexArg:1},{name:"UnderBar",trigger:{symbol:"\\underline"},requiredLatexArg:1},{name:"OverVector",trigger:{symbol:"\\vec"},requiredLatexArg:1},{name:"OverTile",trigger:{symbol:"\\tilde"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverRightArrow",trigger:{symbol:"\\overrightarrow"},requiredLatexArg:1},{name:"OverLeftArrow",trigger:{symbol:"\\overleftarrow"},requiredLatexArg:1},{name:"OverRightDoubleArrow",trigger:{symbol:"\\Overrightarrow"},requiredLatexArg:1},{name:"OverLeftHarpoon",trigger:{symbol:"\\overleftharpoon"},requiredLatexArg:1},{name:"OverRightHarpoon",trigger:{symbol:"\\overrightharpoon"},requiredLatexArg:1},{name:"OverLeftRightArrow",trigger:{symbol:"\\overleftrightarrow"},requiredLatexArg:1},{name:"OverBrace",trigger:{symbol:"\\overbrace"},requiredLatexArg:1},{name:"OverLineSegment",trigger:{symbol:"\\overlinesegment"},requiredLatexArg:1},{name:"OverGroup",trigger:{symbol:"\\overgroup"},requiredLatexArg:1}],physics:[{name:"mu-0",trigger:{symbol:["\\mu","_","0"]}}],symbols:[{trigger:{symbol:"\\alpha"},parse:"α"},{trigger:{symbol:"\\beta"},parse:"β"},{trigger:{symbol:"\\gamma"},parse:"γ"},{trigger:{symbol:"\\delta"},parse:"δ"},{trigger:{symbol:"\\epsilon"},parse:"ϵ"},{trigger:{symbol:"\\varepsilon"},parse:"ε"},{trigger:{symbol:"\\zeta"},parse:"ζ"},{trigger:{symbol:"\\eta"},parse:"η"},{trigger:{symbol:"\\theta"},parse:"θ"},{trigger:{symbol:"\\vartheta"},parse:"ϑ"},{trigger:{symbol:"\\iota"},parse:"ι"},{trigger:{symbol:"\\kappa"},parse:"κ"},{trigger:{symbol:"\\varkappa"},parse:"ϰ"},{trigger:{symbol:"\\lambda"},parse:"λ"},{trigger:{symbol:"\\mu"},parse:"μ"},{trigger:{symbol:"\\nu"},parse:"ν"},{trigger:{symbol:"\\xi"},parse:"ξ"},{trigger:{symbol:"\\omicron"},parse:"ο"},{trigger:{symbol:"\\varpi"},parse:"ϖ"},{trigger:{symbol:"\\rho"},parse:"ρ"},{trigger:{symbol:"\\varrho"},parse:"ϱ"},{trigger:{symbol:"\\sigma"},parse:"σ"},{trigger:{symbol:"\\varsigma"},parse:"ς"},{trigger:{symbol:"\\tau"},parse:"τ"},{trigger:{symbol:"\\phi"},parse:"ϕ"},{trigger:{symbol:"\\varphi"},parse:"φ"},{trigger:{symbol:"\\upsilon"},parse:"υ"},{trigger:{symbol:"\\chi"},parse:"χ"},{trigger:{symbol:"\\psi"},parse:"ψ"},{trigger:{symbol:"\\omega"},parse:"ω"},{trigger:{symbol:"\\Gamma"},parse:"Γ"},{trigger:{symbol:"\\Delta"},parse:"Δ"},{trigger:{symbol:"\\Theta"},parse:"Θ"},{trigger:{symbol:"\\Lambda"},parse:"Λ"},{trigger:{symbol:"\\Xi"},parse:"Ξ"},{trigger:{symbol:"\\Pi"},parse:"Π"},{trigger:{symbol:"\\Sigma"},parse:"Σ"},{trigger:{symbol:"\\Upsilon"},parse:"Υ"},{trigger:{symbol:"\\Phi"},parse:"Φ"},{trigger:{symbol:"\\Psi"},parse:"Ψ"},{trigger:{symbol:"\\Omega"},parse:"Ω"},{trigger:{symbol:"\\digamma"},parse:"ϝ"},{trigger:{symbol:"\\aleph"},parse:"ℵ"},{trigger:{symbol:"\\beth"},parse:"ℶ"},{trigger:{symbol:"\\daleth"},parse:"ℸ"},{trigger:{symbol:"\\gimel"},parse:"ℷ"},{trigger:{symbol:"\\Finv"},parse:"Ⅎ"},{trigger:{symbol:"\\Game"},parse:"⅁"},{trigger:{symbol:"\\wp"},parse:"℘"},{trigger:{symbol:"\\eth"},parse:"ð"},{trigger:{symbol:"\\mho"},parse:"℧"},{trigger:{symbol:"\\clubsuit"},parse:"♣"},{trigger:{symbol:"\\heartsuit"},parse:"♡"},{trigger:{symbol:"\\spadesuit"},parse:"♠"},{trigger:{symbol:"\\diamondsuit"},parse:"♢"},{trigger:{symbol:"\\sharp"},parse:"♯"},{trigger:{symbol:"\\flat"},parse:"♭"},{trigger:{symbol:"\\natural"},parse:"♮"}],trigonometry:[{name:"Arcsin",trigger:"\\arcsin",arguments:"implicit",parse:$n},{name:"Arccos",trigger:"\\arccos",arguments:"implicit",parse:$n},{name:"Arctan",trigger:"\\arctan",arguments:"implicit",parse:$n},{name:"Arctan",trigger:"\\arctg",arguments:"implicit",parse:$n},{name:"Arccot",trigger:"\\arcctg",arguments:"implicit",parse:$n},{name:"Arcsec",trigger:"\\arcsec",arguments:"implicit",parse:$n},{name:"Arccsc",trigger:"\\arccsc",arguments:"implicit",parse:$n},{name:"Arsinh",trigger:"\\arsinh",arguments:"implicit",parse:$n},{name:"Arcosh",trigger:"\\arcosh",arguments:"implicit",parse:$n},{name:"Artanh",trigger:"\\artanh",arguments:"implicit",parse:$n},{name:"Arsech",trigger:"\\arsech",arguments:"implicit",parse:$n},{name:"Arcsch",trigger:"\\arcsch",arguments:"implicit",parse:$n},{name:"Cosh",trigger:"\\ch",arguments:"implicit",parse:$n},{name:"Cosec",trigger:"\\cosec",arguments:"implicit",parse:$n},{name:"Cosh",trigger:"\\cosh",arguments:"implicit",parse:$n},{name:"Cot",trigger:"\\cot",arguments:"implicit",parse:$n},{name:"Cot",trigger:"\\cotg",arguments:"implicit",parse:$n},{name:"Coth",trigger:"\\coth",arguments:"implicit",parse:$n},{name:"Csc",trigger:"\\csc",arguments:"implicit",parse:$n},{name:"Cot",trigger:"\\ctg",arguments:"implicit",parse:$n},{name:"Coth",trigger:"\\cth",arguments:"implicit",parse:$n},{name:"Sec",trigger:"\\sec",arguments:"implicit",parse:$n},{name:"Sinh",trigger:"\\sinh",arguments:"implicit",parse:$n},{name:"Sinh",trigger:"\\sh",arguments:"implicit",parse:$n},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:$n},{name:"Tanh",trigger:"\\tanh",arguments:"implicit",parse:$n},{name:"Tan",trigger:"\\tg",arguments:"implicit",parse:$n},{name:"Tanh",trigger:"\\th",arguments:"implicit",parse:$n},{name:"Cos",trigger:"\\cos",arguments:"implicit",parse:$n},{name:"Sin",trigger:"\\sin",arguments:"implicit",parse:$n},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:$n}]};class Kn{constructor(e,t){var i;let a;this.index=0,this.options={..._r,...t},this.tokens=e,this.onError=e=>t.onError({...e,before:this.latexBefore(),after:this.latexAfter()}),this.dictionary=null!==(i=t.indexedLatexDictionary)&&void 0!==i?i:Dn(t.dictionary,t.onError),this.invisibleOperatorPrecedence=0,this.options.invisibleOperator&&(a=this.dictionary.name.get(this.options.invisibleOperator),void 0===a?t.onError({code:"unknown-operator",arg:this.options.invisibleOperator}):void 0===a.precedence?t.onError({code:"expected-operator",arg:this.options.invisibleOperator}):this.invisibleOperatorPrecedence=a.precedence)}clone(e,t){return new Kn(this.tokens.slice(e,t),{...this.options,dictionary:[],indexedLatexDictionary:this.dictionary,onError:this.onError})}getIndex(){return this.index}setIndex(e){this.index=e}atEnd(){return this.index>=this.tokens.length}peek(){return this.tokens[this.index]}latex(e,t){return f(this.tokens.slice(e,t))}latexAhead(e){return f(this.tokens.slice(this.index,this.index+e))}latexBefore(){return this.latex(0,this.index)}latexAfter(){return this.latex(this.index)}lookAhead(){let e=Math.min(this.dictionary.lookahead,this.tokens.length-this.index);const t=[];for(;e>0;)t[e]=this.latexAhead(e--);return t}peekDefinition(e){let t;t="operator"===e?this.lookAhead().map((e,t)=>{var i,a,r,n,o;return null!==(n=null!==(a=null===(i=this.dictionary.infix[t])||void 0===i?void 0:i.get(e))&&void 0!==a?a:null===(r=this.dictionary.postfix[t])||void 0===r?void 0:r.get(e))&&void 0!==n?n:null===(o=this.dictionary.prefix[t])||void 0===o?void 0:o.get(e)}):this.lookAhead().map((t,i)=>{var a;return null===(a=this.dictionary[e][i])||void 0===a?void 0:a.get(t)});for(let e=t.length;e>0;e--)if(void 0!==t[e])return[t[e],e];return[null,0]}next(){return this.tokens[this.index++]}skipSpace(){if(!this.options.skipSpace)return!1;let e=!1;for(;this.match("");)e=!0;return e}match(e){return this.tokens[this.index]===e&&(this.index++,!0)}matchAll(e){let t=!0;"string"==typeof e&&(e=[e]);let i=0;do{t=this.tokens[this.index+i]===e[i++]}while(t&&ie!==this.options.groupSeparator).join(""):""}matchSignedInteger(){const e=this.index,t=this.matchSign(),i=this.matchDigits();return i?("-"===t?"-":"")+i:(this.index=e,"")}matchExponent(){const e=this.index;let t="";if(this.matchAny(["e","E","d","D"])){const e=this.matchSignedInteger();e&&(t="e"+e)}if(t)return t;if(this.match("\\times")&&(this.skipSpace(),this.match("1")&&this.match("0")&&this.match("^"))){if(/[0-9]/.test(this.peek()))return"e"+this.next();if(this.match("<{>")){this.skipSpace();const e=this.matchSignedInteger();if(this.skipSpace(),this.match("<}>")&&e)return"e"+e}}return this.index=e,""}matchNumber(){var e,t,i;if(!this.options.parseNumbers)return"";const a=this.index;let r=this.matchDigits();return r?(this.match(null!==(e=this.options.decimalMarker)&&void 0!==e?e:"")&&(r+="."+(null!==(t=this.matchDigits())&&void 0!==t?t:"")),r+=null!==(i=this.matchExponent())&&void 0!==i?i:"",r||(this.index=a,"")):""}matchOperator(e,t=null,i=0){const[a,r]=this.peekDefinition(e);if(null===a)return null;if("function"==typeof a.parse){const e=this.latexAhead(r);this.index+=r;let n=null;return[t,n]=a.parse(t,this,i,e),null===n?(this.index-=r,null):this.applyInvisibleOperator(t,n)}let n=a.precedence;if(n0;)l=this.matchOptionalLatexArgument(),null!==l&&s.push(l),c--;for(c=null!==(a=r.requiredLatexArg)&&void 0!==a?a:0;c>0;)l=this.matchRequiredLatexArgument(),null===l&&this.onError({code:"expected-argument"}),null!==l&&o.push(l),c--;const d=this.matchArguments(r.arguments);return null===d?0===o.length&&0===s.length?r.parse:[r.parse,...o,...s]:[r.parse,...o,...d,...s]}matchOptionalLatexArgument(){if(this.skipSpace(),this.match("[")){const e=this.index;let t=1;for(;!this.atEnd()&&0!==t;)this.match("[")?t+=1:this.match("]")?t-=1:this.next();return this.clone(e,this.index-1).matchExpression()}return null}matchRequiredLatexArgument(){var e;if(this.skipSpace(),this.match("<{>")){const t=this.index;let i=1;for(;!this.atEnd()&&0!==i;)this.match("<{>")?i+=1:this.match("<}>")?i-=1:this.next();return null!==(e=this.clone(t,this.index-1).matchExpression())&&void 0!==e?e:""}return/^[0-9]$/.test(this.peek())?parseFloat(this.next()):/^[^\\#]$/.test(this.peek())?this.next():this.matchExpression()}matchSupsub(e){let t=null;return this.skipSpace(),[["^","superfix"],["_","subfix"]].forEach(i=>{var a,r,n;if(null!==t)return;const[o,s]=i;if(!this.match(o))return;this.skipSpace();const l=this.index;let c,d=0;if(this.match("<{>")?(this.skipSpace(),[c,d]=this.peekDefinition(s),this.index+=d,this.skipSpace(),(null==c?void 0:c.name)&&this.match("<}>")?t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(a=c.parse)&&void 0!==a?a:c.name,e]:this.index=l):([c,d]=this.peekDefinition(s),(null==c?void 0:c.name)&&(this.index+=d,t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(r=c.parse)&&void 0!==r?r:c.name,e])),null===t&&(c=null===(n=this.dictionary.infix[1])||void 0===n?void 0:n.get(o),"function"==typeof(null==c?void 0:c.parse)?t=c.parse(e,this,0,o)[1]:"string"==typeof(null==c?void 0:c.parse)?([e,t]=this.applyOperator(c.parse,e,this.matchRequiredLatexArgument()),t=this.applyInvisibleOperator(e,t)):t=this.applyInvisibleOperator(e,o)),null!==t){const e=this.matchArguments(null==c?void 0:c.arguments);null!==e&&(t=[t,...e])}}),t}matchPostfix(e){if(null===e)return null;const[t,i]=this.peekDefinition("postfix");if(null===t)return null;if("function"==typeof t.parse){const a=this.latexAhead(i);return this.index+=i,[,e]=t.parse(e,this,0,a),null===e?(this.index-=i,null):e}return this.index+=i,[t.parse,e]}matchString(){let e="",t=this.atEnd();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===this.peek()?t=!0:/^<({|}|\$|\$\$|space)>$/.test(i)?"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.next()):t=!0:e+=this.next()}t=t||this.atEnd()}return e}matchEnvironmentName(e,t){if(this.match(e)){const e=this.index;if(this.match("<{>")){const e=this.matchString();if(this.match("<}>")&&e===t)return!0}this.index=e}return!1}matchTabular(){const e=["list"];let t=["list"],i=null,a=!1;for(;!this.atEnd()&&!a;)if(this.match("&"))t.push(i),i=null;else if(this.match("\\\\")||this.match("\\cr"))this.skipSpace(),this.matchOptionalLatexArgument(),null!==i&&t.push(i),e.push(t),t=["list"],i=null;else{const e=this.matchExpression();null===e&&(a=!0),i=null!==i?this.applyInvisibleOperator(i,e):e}return t.length>1&&e.push(t),e}matchEnvironment(){var e;if(this.match("\\begin")&&this.match("<{>")){const t=this.matchString();if(this.match("<}>")){const i=this.index;let a=this.index,r=1;for(;!this.atEnd()&&0!==r;)a=this.index,this.matchEnvironmentName("\\begin",t)?r+=1:this.matchEnvironmentName("\\end",t)?r-=1:this.next();const n=this.dictionary.environment.get(t);return"function"==typeof(null==n?void 0:n.parse)?n.parse(null,this.clone(i,a),0,t)[1]:null!==(e=null==n?void 0:n.parse)&&void 0!==e?e:null}}return null}applyOperator(e,t,i){var a,r,n,o;const s=this.dictionary.name.get(e);if(void 0===s)return this.onError({code:"unknown-operator"}),[t,i];if(void 0!==(null===(a=s.trigger)||void 0===a?void 0:a.prefix)&&null===t&&null!==i)return[null,[s.name,i]];if(void 0!==(null===(r=s.trigger)||void 0===r?void 0:r.postfix)&&null!==t)return[null,[s.name,t]];if((void 0!==(null===(n=s.trigger)||void 0===n?void 0:n.matchfix)||void 0!==(null===(o=s.trigger)||void 0===o?void 0:o.infix))&&null!==t&&null!==i){if("non"===s.associativity)return[null,[e,t,i]];if(Cr(t)===e){if("both"===s.associativity){if(Cr(i)===e){if(Array.isArray(t))return[null,t.concat(Tr(i))];if(zr(t))return[null,t.fn.concat(Tr(i))]}else Array.isArray(t)&&t.push(i),zr(t)&&t.fn.push(i);return[null,t]}return"left"===s.associativity?[null,[e,t,i]]:Array.isArray(t)?[null,[e,t[1],[e,t[2],i]]]:(zr(t)&&(t.fn[2]=[e,t.fn[2],i]),[null,t])}return Cr(i)===e?"both"===s.associativity?(Array.isArray(i)&&i.splice(1,0,t),zr(i)&&i.fn.splice(1,0,t),[null,i]):"right"===s.associativity?[null,[e,t,i]]:Array.isArray(i)?[null,[e,i[1],[e,i[2],t]]]:(zr(i)&&(i.fn[2]=[e,i.fn[2],t]),[null,i]):[null,[e,t,i]]}return void 0!==s.trigger.infix?(this.onError({code:"expected-operand"}),[t,null]):[t,null]}applyInvisibleOperator(e,t){if(null===e)return t;if(null===t)return e;if(this.options.invisiblePlusOperator&&("number"==typeof e||Mr(e))&&Cr(t)===gr)return[e,t]=this.applyOperator(this.options.invisiblePlusOperator,e,t),null===e?t:null;if(this.options.invisibleOperator)return[e,t]=this.applyOperator(this.options.invisibleOperator,e,t),null===e?t:null;let i=["Latex"];return"Latex"===Cr(e)?i=i.concat(Tr(e)):i.push(e),null!==t&&("Latex"===Cr(t)?i=i.concat(Tr(t)):i.push(t)),this.options.invisibleOperator&&this.onError({code:"unexpected-sequence"}),i}matchUnknownLatexCommand(){const e=this.peek();if(!e||"\\"!==e[0])return null;this.next();const t=[],i=[];let a=!1;do{a=!0;let e=this.matchOptionalLatexArgument();null!==e&&(t.push(e),a=!1),this.skipSpace(),"<{>"===this.peek()&&(e=this.matchRequiredLatexArgument(),null!==e&&(i.push(e),a=!1))}while(!a);return t.length>0||i.length>0?[e,...i,...t]:e}matchPrimary(e){let t=null;const i=this.index,a=this.matchNumber();a&&(t={num:a}),null===t&&(t=this.matchSymbol()),null===t&&(t=this.matchEnvironment()),null===t&&(t=this.matchMatchfixOperator());let r=null;do{r=this.matchSupsub(t),t=null!=r?r:t}while(null!==r);let n=null;do{n=this.matchPostfix(t),t=null!=n?n:t}while(null!==n);return this.decorate(t,i)}matchExpression(e=0){let t=null;const i=this.index;if(this.skipSpace(),t=this.matchOperator("prefix"),null===t&&(t=this.matchPrimary(e)),null===t)return null;let a=!1;for(;!this.atEnd()&&!a;){this.skipSpace();let i=this.matchOperator("infix",t,e);if(null===i){const[e]=this.peekDefinition("operator");if(null===e){const e=this.matchExpression(this.invisibleOperatorPrecedence);null===e?a=!0:i=this.applyInvisibleOperator(t,e)}}null!==i?t=i:a=!0}return this.decorate(t,i)}decorate(e,t){if(this.options.preserveLatex){const i=this.latex(t,this.index);Array.isArray(e)?e={latex:i,fn:e}:"number"==typeof e?e={latex:i,num:Number(e).toString()}:"string"==typeof e?e={latex:i,sym:e}:"object"==typeof e&&null!==e&&(e.latex=i)}return e}}function Nn(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}const a=i!==e.length;return(e=e.replace(/(\d{3})/g,"$1"+t.groupSeparator)).endsWith(t.groupSeparator)&&(e=e.slice(0,-1)),e+(a?"\\ldots":"")}function On(e,t){var i;return e?t.beginExponentMarker?t.beginExponentMarker+e+(null!==(i=t.endExponentMarker)&&void 0!==i?i:""):"10^{"+e+"}":""}class Bn{constructor(e){this.level=-1,this.options=e,e.invisibleMultiply&&(/#1/.test(e.invisibleMultiply)&&/#2/.test(e.invisibleMultiply)||e.onError({code:"expected-argument",arg:"invisibleMultiply"})),this.onError=e.onError,this.dictionary=Dn(e.dictionary,e.onError)}wrap(e,t){if(null===e)return"";if(void 0===t)return"("+this.emit(e)+")";if("number"==typeof e||Mr(e)||"string"==typeof e||Sr(e))return this.emit(e);const i=Cr(e);if(i){const a=this.dictionary.name.get(i);if(a&&void 0!==a.precedence&&a.precedence1?"upright":"asis"}(e,this.level)){case"upright":return"\\operatorname{"+i+"}";default:return i}}const a=Tr(e);if(!t){if("string"==typeof i&&i.length>0&&"\\"===i[0]){let e=i;for(const t of a)e+="{"+this.emit(t)+"}";return e}return this.emit(i)+this.emit([ur,...a])}if(t.requiredLatexArg>0){let e="",i="",r=0;for(;r=0){const a=r.match(/(\d*)\.(\d*)([e|E]([-+]?[0-9]*))?/);if(!a)return"";const o=a[1],l=a[2].substring(0,Math.min(s.precision-o.length,a[2].length));if(n=null!==(i=a[4])&&void 0!==i?i:"","0"===o){let i=0;for(;"0"===l[i]&&i=s.precision)a="0",t="";else{a=r[i];const e=Nn(r.substr(i+1),s);e&&(a+=s.decimalMarker+e)}"0"!==a&&(r.length-1>s.precision&&!a.endsWith("}")&&!a.endsWith("\\ldots")&&(a+="\\ldots"),i>4&&(a+=s.exponentProduct+On((1-i).toString(),e))),r=a}else{r=o.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator);const e=Nn(l,s);e&&(r+=s.decimalMarker+e)}}else if(r.length>s.precision){const t=r.length;let i=r[0];const a=Nn(r.substr(1),s);a&&(i+=s.decimalMarker+a,"}"!==i[i.length-1]&&(i+="\\ldots")),"1"!==i?i+=s.exponentProduct:i="",r=i+On((t-2).toString(),e)}else{const t=r.match(/([0-9]*)\.?([0-9]*)([e|E]([-+]?[0-9]+))?/);t&&(r=t[1],t[2]&&(r+=e.decimalMarker+t[2]),n=null!==(a=t[4])&&void 0!==a?a:""),r=r.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator)}const o=On(n,e);return t+r+(o?e.exponentProduct+o:"")}if(n=function(e){return parseFloat(Number(e).toPrecision(15))}(r),"engineering"===s.notation)if(0===n)o="0";else{const t=Math.abs(n);let i=Math.round(Math.log10(t));i-=i%3,t<1e3&&(i=0);const a=t/Math.pow(10,i);let r="";const l=a.toString().match(/^(.*)\.(.*)$/);(null==l?void 0:l[1])&&l[2]&&(r=l[1]+s.decimalMarker+l[2]),s.groupSeparator&&(r=Nn(a.toExponential(),s));let c="";0!==i&&(c=On(i.toString(),e)),o=(n<0?"-":"")+r+c}else{const t="string"==typeof r?r:r.toString();let i,a,n,l=t.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);i=t,n="",(null==l?void 0:l[1])&&l[2]&&(i=l[1],a=On(l[2],e),a&&(a=e.exponentProduct+a)),l=i.match(/^(.*)\.(.*)$/),(null==l?void 0:l[1])&&l[2]&&(i=l[1],n=l[2]),s.groupSeparator&&(i=i.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator),n=Nn(n,s)),n&&(n=s.decimalMarker+n),o=i+n+(null!=a?a:"")}return o}(this.options,e);if(t)return this.level-=1,t;const i=Dr(e);if("<$>"===i)t="$";else if("<$$>"===i)t="$$";else if("<{>"===i)t="{";else if("<}>"===i)t="}";else if(""===i)t=" ";else{if(i&&("\\"===i[0]||"#"===i[0])){this.level-=1;const t=Tr(e);return 0===t.length?i:i+"{"+t.map(e=>this.emit(e)).filter(e=>Boolean(e)).join("}{")+"}"}if(null!==i)t=this.emitSymbol(e,this.dictionary.name.get(i));else{const i=this.dictionary.name.get(Cr(e));i?"function"==typeof i.emit?t=i.emit(this,e):(t||void 0===i.precedence&&!i.trigger.superfix&&!i.trigger.subfix||(t=function(e,t,i){let a="";const r=Nr(t),n=Cr(t);if(i.trigger.superfix||i.trigger.subfix)return 1!==r&&e.onError({code:"operator-requires-one-operand",arg:e.emitSymbol(n)}),Or(i.emit,[e.emit(Kr(t,1))]);if(i.trigger.postfix)return 1!==r&&e.onError({code:"postfix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Or(i.emit,[e.wrap(Kr(t,1),i.precedence)]);if(i.trigger.prefix)return 1!==r&&e.onError({code:"prefix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Or(i.emit,[e.wrap(Kr(t,1),i.precedence+1)]);if(i.trigger.infix){a=e.wrap(Kr(t,1),i.precedence);for(let n=2;n=1){let r="";for(const n of Tr(t))n&&(a.push(r),a.push(e.emit(n)),r=i.separator)}return Array.isArray(i.closeFence)?a.push(f(i.closeFence)):"string"==typeof i.closeFence&&a.push(i.closeFence),h(a)}(this,e,i)),!t&&i.trigger.symbol&&(t=this.emitSymbol(e,i))):Array.isArray(e)||zr(e)?t=this.emitSymbol(e):this.onError({code:"syntax-error",arg:JSON.stringify(e)})}}return this.level-=1,t}}function Fn(e,t){var i,a,r;const n=new Kn(Ge(e,[]),{...kr,..._r,onError:e=>{"undefined"!=typeof window&&(!e.before||e.after)},dictionary:Tn("all"),...t}),o=n.matchExpression();n.atEnd()||null===(i=null==t?void 0:t.onError)||void 0===i||i.call(t,{code:"syntax-error"});let s=null!==(a=null==t?void 0:t.form)&&void 0!==a?a:["canonical"];return Array.isArray(s)||(s=[s]),null!==(r=wn(function(e="all"){let t;return"all"===e?(t={},Object.keys(xr).forEach(e=>{t={...t,...xr[e]}})):t={...xr[e]},t}("all"),o,s))&&void 0!==r?r:""}const Pn={"\\imaginaryI":"ⅈ","\\imaginaryJ":"ⅉ","\\pi":"π","\\exponentialE":"ℯ","﹢":"+","+":"+","−":"-","-":"-","﹣":"-","-":"-","\\times":"*","\\cdot":"*","⨉":"*","️✖":"*","️×":"*",".":"*","÷":"/","⁄":"/","/":"/","!":"factorial","\\mp":"minusplus","\\ne":"!=","\\coloneq":":=","\\questeq":"?=","\\approx":"approx","\\cong":"congruent","\\sim":"similar","\\equiv":"equiv","\\pm":"plusminus","\\land":"and","\\wedge":"and","\\lor":"or","\\vee":"or","\\oplus":"xor","\\veebar":"xor","\\lnot":"not","\\neg":"not","\\exists":"exists","\\nexists":"!exists","\\forall":"forAll","\\backepsilon":"suchThat","\\therefore":"therefore","\\because":"because","\\nabla":"nabla","\\circ":"circle","\\ominus":"ominus","\\odot":"odot","\\otimes":"otimes","\\zeta":"Zeta","\\Gamma":"Gamma","\\min":"min","\\max":"max","\\mod":"mod","\\lim":"lim","\\sum":"sum","\\prod":"prod","\\int":"integral","\\iint":"integral2","\\iiint":"integral3","\\Re":"Re","\\gothicCapitalR":"Re","\\Im":"Im","\\gothicCapitalI":"Im","\\binom":"nCr","\\partial":"partial","\\differentialD":"differentialD","\\capitalDifferentialD":"capitalDifferentialD","\\Finv":"Finv","\\Game":"Game","\\wp":"wp","\\ast":"ast","\\star":"star","\\asymp":"asymp","\\to":"to","\\gets":"gets","\\in":"elementof","\\notin":"!elementof","\\ni":"ownedby","\\owns":"ownedby","\\subset":"subset","\\supset":"superset","\\complement":"complement","\\rightarrow":"shortLogicalImplies","\\leftarrow":"shortLogicalImpliedBy","\\leftrightarrow":"shortLogicalEquivalent","\\longrightarrow":"logicalImplies","\\longleftarrow":"logicalImpliedBy","\\longleftrightarrow":"logicalEquivalent","\\Rightarrow":"shortImplies","\\Leftarrow":"shortImpliedBy","\\Leftrightarrow":"shortEquivalent","\\implies":"implies","\\Longrightarrow":"implies","\\impliedby":"impliedBy","\\Longleftarrow":"impliedBy","\\iff":"equivalent","\\Longleftrightarrow":"equivalent"},Rn={"+":"add","*":"multiply","-":"subtract","/":"divide","=":"equal",":=":"assign","!=":"ne","?=":"questeq",approx:"approx",congruent:"congruent",similar:"similar",equiv:"equiv","<":"lt",">":"gt","<=":"le",">=":"ge","≤":"le","≥":"ge",">>":"gg","<<":"ll","**":"pow","++":"increment","--":"decrement"},In={equal:"%0 = %1",ne:"%0 \\ne %1",questeq:"%0 \\questeq %1",approx:"%0 \\approx %1",congruent:"%0 \\cong %1",similar:"%0 \\sim %1",equiv:"%0 \\equiv %1",assign:"%0 := %1",lt:"%0 < %1",gt:"%0 > %1",le:"%0 \\le %1",ge:"%0 \\ge %1",sin:"\\sin%_%^ %0",cos:"\\cos%_%^ %0",tan:"\\tan%_%^ %0",cot:"\\cot%_%^ %0",sec:"\\sec%_%^ %0",csc:"\\csc%_%^ %0",sinh:"\\sinh %0",cosh:"\\cosh %0",tanh:"\\tanh %0",csch:"\\csch %0",sech:"\\sech %0",coth:"\\coth %0",arcsin:"\\arcsin %0",arccos:"\\arccos %0",arctan:"\\arctan %0",arccot:"\\arcctg %0",arcsec:"\\arcsec %0",arccsc:"\\arccsc %0",arsinh:"\\arsinh %0",arcosh:"\\arcosh %0",artanh:"\\artanh %0",arcsch:"\\arcsch %0",arsech:"\\arsech %0",arcoth:"\\arcoth %0",ln:"\\ln%_%^ %",log:"\\log%_%^ %",lg:"\\lg %",lb:"\\lb %",sum:"\\sum%_%^ %0",prod:"\\prod%_%^ %0",Zeta:"\\zeta%_%^ %",Gamma:"\\Gamma %",min:"\\min%_%^ %",max:"\\max%_%^ %",mod:"\\mod%_%^ %",lim:"\\lim%_%^ %",binom:"\\binom %",nabla:"\\nabla %",curl:"\\nabla\\times %0",div:"\\nabla\\cdot %0",floor:"\\lfloor %0 \\rfloor%_%^",ceil:"\\lceil %0 \\rceil%_%^",abs:"\\left| %0 \\right|%_%^",norm:"\\lVert %0 \\rVert%_%^",ucorner:"\\ulcorner %0 \\urcorner%_%^",lcorner:"\\llcorner %0 \\lrcorner%_%^",angle:"\\langle %0 \\rangle%_%^",group:"\\lgroup %0 \\rgroup%_%^",moustache:"\\lmoustache %0 \\rmoustache%_%^",brace:"\\lbrace %0 \\rbrace%_%^","sqrt[]":"\\sqrt[%^]{%0}",sqrt:"\\sqrt{%0}",lcm:"\\operatorname{lcm}%",gcd:"\\operatorname{gcd}%",erf:"\\operatorname{erf}%",erfc:"\\operatorname{erfc}%",randomReal:"\\operatorname{randomReal}%",randomInteger:"\\operatorname{randomInteger}%",and:"%0 \\land %1",or:"%0 \\lor %1",xor:"%0 \\oplus %1",not:"%0 \\lnot %1",circle:"%0 \\circ %1",ast:"%0 \\ast %1",star:"%0 \\star %1",asymp:"%0 \\asymp %1","/":"\\frac{%0}{%1}",Re:"\\Re{%0}",Im:"\\Im{%0}",factorial:"%0!",factorial2:"%0!!"},Hn={degree:880,nabla:740,curl:740,partial:740,differentialD:740,capitalDifferentialD:740,"**":720,odot:710,not:680,div:660,solidus:660,"/":660,setminus:650,"%":640,otimes:410,union:350,intersection:350,"*":390,ast:390,".":390,oplus:300,ominus:300,"+":275,"-":275,"+-":275,"-+":275,circle:265,circledast:265,circledcirc:265,star:265,"..":263,to:262,in:262,"|":261,congruent:265,equiv:260,"=":260,"!=":255,"?=":255,similar:250,approx:247,"<":245,">":243,">=":242,"≥":242,"<=":241,complement:240,subset:240,superset:240,elementof:240,"!elementof":240,exists:230,"!exists":230,forall:230,and:200,xor:195,or:190,suchThat:110,":":100,assign:80,":=":80,therefore:70,because:70,shortLogicalImplies:52,shortImplies:51,logicalImplies:50,implies:49,shortLogicalImpliedBy:48,shortImpliedBy:47,logicalImpliedBy:46,impliedBy:45,shortLogicalEquivalent:44,shortEquivalent:43,logicalEquivalent:42,equivalent:41,",":40,";":30};function Wn(t,i){return e(t.arg)?t.arg[i]:void 0}function Vn(e){return e&&Hn[e]||-1}function Un(e){return/=|=>/.test(e)?"right":"left"}function jn(e){if("f"===e||"g"===e)return!0;const t=In[e];return!!t&&!!/%[^01_^]?/.test(t)}function Gn(e){e=(e||"").trim();let t=Pn[e];if(!t)if(/^\\[^{}]+$/.test(e)){const i=ae(e,"math",{});t=i&&i.value||e.slice(1)}else t=e;return t}function Xn(e){if(!e)return null;const t=Gn(to(e)),i=[Vn(t),Un(t)];return i[0]<=0?null:i}function Zn(e){return null!==Xn(e)}const Yn={"\\lfloor\\rfloor":"floor","\\lceil\\rceil":"ceil","\\vert\\vert":"abs","\\lvert\\rvert":"abs","||":"abs","\\Vert\\Vert":"norm","\\lVert\\rVert":"norm","\\ulcorner\\urcorner":"ucorner","\\llcorner\\lrcorner":"lcorner","\\langle\\rangle":"angle","\\lgroup\\rgroup":"group","\\lmoustache\\rmoustache":"moustache","\\lbrace\\rbrace":"brace"},Qn={"!":"factorial","\\dag":"dagger","\\dagger":"dagger","\\ddagger":"dagger2","\\maltese":"maltese","\\backprime":"backprime","\\backdoubleprime":"backprime2","\\prime":"prime","\\doubleprime":"prime2","\\$":"$","\\%":"%","\\_":"_","\\degree":"degree"},Jn={"+":"add","-":"add","*":"multiply","=":"equal",",":"list",";":"list2",and:"and",or:"or",xor:"xor",union:"union",shortLogicalEquivalent:"logicalEquivalent",logicalEquivalent:"logicalEquivalent",shortEquivalent:"equivalent",equivalent:"equivalent"},eo={",":"list",";":"list2"};function to(t){if("string"==typeof t)return t;if(e(t)){let e="";for(const i of t)e+=to(i);return e}if(t.symbol&&!/^\\math(op|bin|rel|open|punct|ord|inner)/.test(t.symbol))return t.symbol;if("leftright"===t.type)return"";if("string"==typeof t.body)return t.body;if(e(t.body)){let e="";for(const i of t.body)e+=to(i);return e}return""}function io(e){return"string"==typeof e.sym?function(e){let t=In[e];return t?t.replace("%1","").replace("%0","").replace("%",""):(e.length>1&&(t="\\"+e),t||(t=J("math",e)),t)}(e.sym)||e.sym:""}function ao(e){return parseFloat(e.num)}function ro(e){return"object"==typeof e&&void 0!==e.num}function no(e){let t=0;return ro(e)&&(t="object"==typeof e.num?void 0!==e.num.re?Lo(e.num.re):0:parseFloat(e.num)),t}function oo(e){let t=0;return ro(e)&&"object"==typeof e.num&&(t=void 0!==e.num.im?Lo(e.num.im):0),t}function so(e){return e&&void 0!==e.sup}function lo(e){return e&&void 0!==e.sub}function co(e,t,i){let a=!1;const r=e.atoms[e.index];return r&&r.type===t&&(a=void 0===i||to(r)===i),a}function mo(e,...t){const i={fn:e,arg:void 0};if(t){const e=[];for(const i of t)i&&e.push(i);e.length>0&&(i.arg=e)}return i}function po(e){return"number"==typeof e?{num:e.toString()}:"string"==typeof e||"object"==typeof e?{num:e}:void 0}function uo(e){if(ro(e)){const t=no(e),i=oo(e);return 0!==i?(0!==t&&(e.num.re=(-t).toString()),e.num.im=(-i).toString()):e.num=(-t).toString(),e}return mo("negate",e)}function ho(e){const t=e.atoms[e.index+1];return t&&"msubsup"===t.type}function fo(e,t){let i=e.atoms[e.index];return!i||void 0===i.superscript&&void 0===i.subscript?i=null:e.index+=1,i||(i=e.atoms[e.index+1],i&&"msubsup"===i.type&&(i.superscript||i.subscript)?e.index+=2:i=null),i?(void 0!==i.subscript&&(e.ast.sub=wo(i.subscript,t)),void 0!==i.superscript&&("msubsup"===i.type?/['\u2032]|\\prime/.test(to(i.superscript))?(e.index+=1,i=e.atoms[e.index+1],i&&"msubsup"===i.type&&/['\u2032]|\\prime/.test(to(i.superscript))?e.ast.sup={sym:"″"}:(e.ast.sup={sym:"′"},e.index-=1)):/['\u2033]|\\doubleprime/.test(to(i.superscript))?e.ast.sup={sym:"″"}:e.ast&&(e.ast.sup=wo(i.superscript,t)):e.ast.sup=wo(i.superscript,t))):e.index+=1,e}function go(e,t){const i=e.ast;if(bo(e,"!!"))return e.index+=1,e.ast=mo("factorial2",i),go(e=fo(e,t),t);if(bo(e,"++"))return e.index+=1,e.ast=mo("increment",i),go(e=fo(e,t),t);if(bo(e,"--"))return e.index+=1,e.ast=mo("decrement",i),go(e=fo(e,t),t);const a=e.atoms[e.index];return(null==a?void 0:a.symbol)&&Qn[a.symbol]&&(e.ast=mo(Qn[a.symbol],i),e=go(e=fo(e,t),t)),e}function yo(e,t,i,a){if(e.index=e.index||0,0===e.atoms.length||e.index>=e.atoms.length)return e.ast=void 0,e;const r=e.minPrec;e.minPrec=0;let n=e.atoms[e.index];if(t){if("mopen"===n.type&&to(n)===t)e.index+=1,n=(e=xo(e,a)).atoms[e.index],n&&"mclose"===n.type&&to(n)===i&&(ho(e)&&(e.ast={group:e.ast}),e=go(e=fo(e,a),a));else if("textord"===n.type&&to(n)===t)e.index+=1,n=(e=xo(e,a)).atoms[e.index],n&&"textord"===n.type&&to(n)===i&&(e.index+=1,e=go(e=fo(e,a),a));else if("\\lVert"===t&&"textord"===n.type&&"|"===n.symbol){if(n=e.atoms[e.index+1],n&&"textord"===n.type&&"|"===n.symbol){e.index+=2,n=(e=xo(e,a)).atoms[e.index];const t=e.atoms[e.index+1];n&&"textord"===n.type&&"|"===n.symbol&&t&&"textord"===t.type&&"|"===t.symbol&&(e.index+=2,e=go(e=fo(e,a),a))}}else if("sizeddelim"===n.type&&n.delim===t)e.index+=1,n=(e=xo(e,a)).atoms[e.index],n&&"sizeddelim"===n.type&&n.delim===i&&(e.index+=1,e=go(e=fo(e,a),a));else{if("leftright"!==n.type||n.leftDelim!==t||"?"!==n.rightDelim&&n.rightDelim!==i)return;e.ast=wo(n.body,a),ho(e)&&(e.ast={group:e.ast}),e=go(e=fo(e,a),a)}return e.minPrec=r,e}{let o=!0;if("mopen"===n.type?(t=n.symbol,i=R[t]):"sizeddelim"===n.type?(t=n.delim,i=R[t]):"leftright"===n.type?(o=!1,t=n.leftDelim,"?"===(i=n.rightDelim)&&(i=R[t])):"textord"===n.type&&(t=n.symbol,i=R[t]),t&&i){if("|"===t&&"|"===i){const a=e.atoms[e.index+1];a&&"textord"===a.type&&"|"===a.symbol&&(t="\\lVert",i="\\rVert")}if(e=yo(e,t,i,a))return o&&(e.index+=1),e.ast={fn:Yn[t+i]||t+i,arg:[e.ast]},e.minPrec=r,e}}}function bo(e,t){return e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)&&t===to(e.atoms[e.index])+to(e.atoms[e.index+1])}function vo(e){if(e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)){if(!co(e,"textord","\\nabla")){const t=e.atoms[e.index].symbol+e.atoms[e.index+1].symbol,i=/^(>=|<=|>>|<<|:=|!=)$/.test(t)?t:"";return i&&(e.index+=1),i}return e.index+=1,co(e,"mbin","\\times")?(e.index+=1,e.ast="curl",e):co(e,"mbin","\\cdot")?(e.index+=1,e.ast="div",e):void(e.index-=1)}}function xo(t,i){if(t.index=t.index||0,t.ast=void 0,0===t.atoms.length||t.index>=t.atoms.length)return t;t.minPrec=t.minPrec||0;let a=function t(i,a){if(i.index=i.index||0,i.ast=void 0,0===i.atoms.length||i.index>=i.atoms.length)return i;let r=i.atoms[i.index];if("text"===r.mode){let e="";for(;i.atoms[i.index]&&"text"===i.atoms[i.index].mode;)e+=i.atoms[i.index].body,i.index+=1;return i.ast={text:e},i}const n=Gn(to(r));if(vo(i))i.ast=mo(i.ast,t(i,a).ast);else{if("root"===r.type)return i.index=0,i.atoms=r.body,t(i,a);if("mbin"===r.type&&"-"===n)i.index+=1,(i=t(i,a)).ast=uo(i.ast);else if("mbin"===r.type&&"+"===n)i.index+=1,(i=t(i,a)).ast=mo("add",i.ast);else if("mord"===r.type&&/^[0-9.]$/.test(r.symbol)){let e="",n=!1,o=/^[0-9.eEdD]$/;for(;i.index0&&"\\"===d.charAt(0)&&"string"==typeof e.body&&(d=e.body)),l=Y(d,m,p).replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"),l!==d?(c={sym:l},m="normal"):c={sym:d};break;case"minner":case"mop":break;case"box":c=wo(e.body,t);break;case"enclose":break;case"array":if("cardinality"===e.environmentName)c=mo("card",wo(e.array,t));else if(/array|matrix|pmatrix|bmatrix/.test(e.environmentName)){c={fn:"array",args:[]};for(const i of e.array)c.args.push(i.map(e=>wo(e,t)))}else if("cases"===e.environmentName){c={fn:"cases",args:[]};for(const i of e.array)if(i[0]){const e=[];e.push(wo(i[0],t));let a=wo(i[1],t);a&&"text"===a.fn&&a.arg&&/^(if|when|for)$/i.test(a.arg[0].trim())&&(a=a.arg.filter(e=>"string"!=typeof e)),e.push(null!=a?a:{}),c.args.push(e)}}break;case"spacing":case"space":case"mathstyle":break;default:c=void 0}return c&&m&&"normal"!==m&&(c.variant=m),c&&"string"==typeof e.cssClass&&(c.class=e.cssClass),c&&"string"==typeof e.cssId&&(c.id=e.cssId),c}function _o(t){if(!t)return[];let i;if(e(t)){i=[];for(const e of t){const t=_o(e);i=i.concat(t)}}else{if("spacing"===t.type||"first"===t.type)return[];"box"===t.type?i=_o(t.body):(t.body&&e(t.body)&&(t.body=_o(t.body)),t.superscript&&e(t.superscript)&&(t.superscript=_o(t.superscript)),t.subscript&&e(t.subscript)&&(t.subscript=_o(t.subscript)),t.index&&e(t.index)&&(t.index=_o(t.index)),t.denom&&e(t.denom)&&(t.denom=_o(t.denom)),t.numer&&e(t.numer)&&(t.numer=_o(t.numer)),t.array&&e(t.array)&&(t.array=t.array.map(e=>e.map(e=>_o(e)))),i=[t])}return i}function wo(e,t){return function(e,t){e.index=e.index||0,e.ast=void 0;const i=[];for(;e.atoms[e.index];)if("text"===e.atoms[e.index].mode){let t="";for(;e.atoms[e.index]&&"text"===e.atoms[e.index].mode;)t+=e.atoms[e.index].body,e.index+=1;i.push(mo("text",t))}else{const a=xo(e,t).ast;if(!a)return;i.push(a)}return i.length>1?mo("sequence",...i):i[0]||void 0}({atoms:_o(e)},t)}function Mo(e,t){return wo(e,t)}function So(e,...t){e=e||".. ";let i="";if(t.length>0){"."!==e[0]&&(i+=e[0]);let a="";for(const r of t)i+=a+r,a=e[2];"."!==e[1]&&(i+=e[1])}return i}function zo(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}return i!==e.length&&(e+="\\ldots"),e.replace(/(\d{3})/g,"$1"+t.groupSeparator)}function Lo(e){return parseFloat(parseFloat(e).toPrecision(15))}function Ao(e,t){let i,a="";if("number"==typeof t.precision){if("number"!=typeof e){let i="",a="";if("-"===e[0]?(i="-",e=e.substr(1)):"+"===e[0]&&(e=e.substr(1)),e.indexOf(".")>=0){const r=e.match(/(\d*).(\d*)([e|E]([-+]?[0-9]*))?/),n=r[1],o=r[2].substring(0,Math.min(t.precision-n.length,r[2].length));if(a=r[4]||"","0"===n){let a=0;for(;"0"===o[a]&&a=t.precision)r="0",i="";else{r=e[a];const i=zo(e.substr(a+1),t);i&&(r+=t.decimalMarker+i)}"0"!==r&&(e.length-1>t.precision&&!r.endsWith("}")&&!r.endsWith("\\ldots")&&(r+="\\ldots"),a>4&&(r+=t.exponentProduct,t.exponentMarker?r+=t.exponentMarker+(1-a).toString():r+="10^{"+(1-a).toString()+"}")),e=r}else{e=n.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);const i=zo(o,t);i&&(e+=t.decimalMarker+i)}}else if(e.length>t.precision){const i=e.length;let a=e[0];const r=zo(e.substr(2),t);r&&(a+=t.decimalMarker+r,"}"!==a[a.length-1]&&(a+="\\ldots")),"1"!==a?a+=t.exponentProduct:a="",t.exponentMarker?a+=t.exponentMarker+(i-2).toString():a+="10^{"+(i-2).toString()+"}",e=a}else e=e.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);return a&&(a=t.exponentMarker?t.exponentMarker+a:t.exponentProduct+" 10^{"+a+"}"),i+e+a}i=Lo(e)}if("engineering"===t.scientificNotation)if(0===i)a="0";else{const e=Math.abs(i);let r=Math.round(Math.log10(e));r-=r%3,e<1e3&&(r=0);const n=e/Math.pow(10,r);let o="";const s=n.toString().match(/^(.*)\.(.*)$/);(null==s?void 0:s[1])&&s[2]&&(o=s[1]+t.decimalMarker+s[2]),t.groupSeparator&&(o=zo(n.toExponential(),t));let l="";l=0===r?"":t.exponentMarker?t.exponentMarker+r:t.exponentProduct+" 10^{"+r+"}",a=(i<0?"-":"")+o+l}else{const i="string"==typeof e?e:e.toString();let r,n,o,s=i.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);r=i,o="",(null==s?void 0:s[1])&&s[2]&&(r=s[1],n=t.exponentMarker?t.exponentMarker+s[2]:t.exponentProduct+" 10^{"+s[2]+"}"),s=r.match(/^(.*)\.(.*)$/),(null==s?void 0:s[1])&&s[2]&&(r=s[1],o=s[2]),t.groupSeparator&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator),o=zo(o,t)),o&&(o=t.decimalMarker+o),a=r+o+(n||"")}return a}class qo{constructor(e,t){this.stylesheets=[],this.config=Na({namespace:"",substituteTextArea:void 0,readOnly:!1,createHTML:e=>e,fontsDirectory:"./fonts",defaultMode:"math",macros:P,horizontalSpacingScale:1,letterShapeStyle:"auto",smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,ignoreSpacebarInMathMode:!0,locale:ka.locale,strings:{},keybindings:ni,overrideDefaultInlineShortcuts:!1,inlineShortcuts:{},inlineShortcutTimeout:0,virtualKeyboardToggleGlyph:'',virtualKeyboardMode:"auto",virtualKeyboards:"all",virtualKeyboardLayout:"auto",customVirtualKeyboardLayers:{},customVirtualKeyboards:{},virtualKeyboardTheme:/android|cros/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?"material":"apple",keypressVibration:!0,keypressSound:null,plonkSound:null,textToSpeechRules:"mathlive",textToSpeechMarkup:"",textToSpeechRulesOptions:{},speechEngine:"local",speechEngineVoice:"Joanna",speechEngineRate:"100%",speakHook:Ta,readAloudHook:Ta,onAnnounce:Da,onKeystroke:()=>!0,onMoveOutOf:()=>!0,onTabOutOf:()=>!0,onBlur:Ta,onFocus:Ta,onContentWillChange:Ta,onContentDidChange:Ta,onSelectionWillChange:Ta,onSelectionDidChange:Ta,onUndoStateWillChange:Ta,onUndoStateDidChange:Ta,onModeChange:Ta,onVirtualKeyboardToggle:Ta,onReadAloudStatus:Ta,onError:()=>{}},t),this.element=e,e.mathfield=this,this.originalContent=e.innerHTML;let i=this.element.textContent;i&&(i=i.trim()),at(this.config.fontsDirectory,this.config.onError),this.stylesheets.push(rt(e,mr)),this.stylesheets.push(rt(e,'@-webkit-keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}@keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}.ML__caret:after{content:"";border:none;border-radius:2px;border-right:2px solid var(--caret);margin-right:-2px;position:relative;left:-1px;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text-caret:after{content:"";border:none;border-radius:1px;border-right:1px solid var(--caret);margin-right:-1px;position:relative;left:0;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__command-caret:after{content:"_";border:none;margin-right:-1ex;position:relative;color:var(--caret);-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__fieldcontainer{display:flex;flex-flow:row;justify-content:space-between;align-items:flex-end;min-height:39px;touch-action:none;width:100%;--hue:212;--highlight:hsl(var(--hue),97%,85%);--caret:hsl(var(--hue),40%,49%);--highlight-inactive:#ccc;--primary:hsl(var(--hue),40%,50%);--secondary:hsl(var(--hue),19%,26%);--on-secondary:hsl(var(--hue),19%,26%)}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}}body[theme=dark] .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}.ML__fieldcontainer:focus{outline:2px solid var(--primary);outline-offset:3px}.ML__fieldcontainer__field{align-self:center;position:relative;overflow:hidden;line-height:0;padding:2px;width:100%}.ML__virtual-keyboard-toggle{display:flex;align-self:center;align-items:center;flex-shrink:0;flex-direction:column;justify-content:center;width:34px;height:34px;padding:0;margin-right:4px;cursor:pointer;box-sizing:border-box;border-radius:50%;border:1px solid transparent;transition:background .2s cubic-bezier(.64,.09,.08,1);color:var(--primary);fill:currentColor;background:transparent}.ML__virtual-keyboard-toggle:hover{background:hsl(var(--hue),25%,35%);color:#fafafa;fill:currentColor;border-radius:50%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.ML__popover{visibility:hidden;min-width:160px;background-color:rgba(97,97,97,.95);color:#fff;text-align:center;border-radius:6px;position:fixed;z-index:1;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:all .2s cubic-bezier(.64,.09,.08,1)}.ML__popover:after{content:"";position:absolute;top:-5px;left:calc(50% - 3px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;font-size:1rem;border-bottom:5px solid rgba(97,97,97,.9)}.ML__popover--reverse-direction:after{top:auto;bottom:-5px;border-top:5px solid rgba(97,97,97,.9);border-bottom:0}.ML__textarea__textarea{transform:scale(0);resize:none;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;font-size:16px}.ML__focused .ML__text{background:hsla(var(--hue),40%,50%,.1)}.ML__smart-fence__close{opacity:.5}.ML__selection{background:var(--highlight-inactive);box-sizing:border-box}.ML__focused .ML__selection{background:var(--highlight)!important;color:var(--on-highlight)}.ML__contains-caret.ML__close,.ML__contains-caret.ML__open,.ML__contains-caret>.ML__close,.ML__contains-caret>.ML__open,.sqrt.ML__contains-caret>.sqrt-sign,.sqrt.ML__contains-caret>.vlist>span>.sqrt-line{color:var(--caret)}.ML__command{font-family:IBM Plex Mono,Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;letter-spacing:-1px;font-weight:400;line-height:1em;color:var(--primary)}:not(.ML__command)+.ML__command{margin-left:.25em}.ML__command+:not(.ML__command){padding-left:.25em}.ML__suggestion{opacity:.5}.ML__virtual-keyboard-toggle.pressed{background:hsla(0,0%,70%,.5)}.ML__virtual-keyboard-toggle:focus{outline:none;border-radius:50%;border:2px solid var(--primary)}.ML__virtual-keyboard-toggle.active,.ML__virtual-keyboard-toggle.active:hover{background:hsla(0,0%,70%,.5);color:#000;fill:currentColor}.ML__scroller{position:fixed;z-index:1;top:0;height:100vh;width:200px}[data-ML__tooltip]{position:relative}[data-ML__tooltip][data-placement=top]:after{top:inherit;bottom:100%}[data-ML__tooltip]:after{position:absolute;visibility:hidden;content:attr(data-ML__tooltip);display:inline-table;top:110%;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:200px;padding:8px;background:#616161;color:#fff;text-align:center;z-index:2;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);border-radius:2px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:400;font-size:12px;opacity:0;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1)}@media only screen and (max-width:767px){[data-ML__tooltip]:after{height:32px;padding:4px 16px;font-size:14px}}[data-ML__tooltip]:hover{position:relative}[data-ML__tooltip]:hover:after{visibility:visible;opacity:1;transform:scale(1)}[data-ML__tooltip][data-delay]:after{transition-delay:0s}[data-ML__tooltip][data-delay]:hover:after{transition-delay:1s}'));let a="";this.config.substituteTextArea?"string"==typeof this.config.substituteTextArea?a+=this.config.substituteTextArea:a+="":/android|ipad|ipod|iphone/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?a+="\n \n \n ":a+='',a+='',"manual"===this.config.virtualKeyboardMode?(a+=`
    `,this.config.virtualKeyboardToggleGlyph?a+=this.config.virtualKeyboardToggleGlyph:a+='',a+="
    "):a+="",a+="
    ",a+='\n
    \n \n \n
    \n ',this.element.innerHTML=this.config.createHTML(a);let r=0;"function"==typeof this.config.substituteTextArea?this.textarea=this.config.substituteTextArea():this.textarea=this.element.children[r++].firstElementChild,this.field=this.element.children[r].children[0],this.field.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation();const t=void 0===e.deltaX?e.detail:-e.deltaX;isFinite(t)&&this.field.scroll({top:0,left:this.field.scrollLeft-5*t})},{passive:!1}),this.virtualKeyboardToggleDOMNode=this.element.children[r++].children[1],bi(this,this.virtualKeyboardToggleDOMNode,{default:"toggleVirtualKeyboard",alt:"toggleVirtualKeyboardAlt",shift:"toggleVirtualKeyboardShift"}),this.ariaLiveText=this.element.children[r].children[0],this.accessibleNode=this.element.children[r++].children[1],this.popover=ui("mathlive-popover-panel","ML__popover"),this.stylesheets.push(rt(e,"div.ML__popover.is-visible{visibility:inherit;-webkit-animation:ML__fade-in .15s cubic-bezier(0,0,.2,1);animation:ML__fade-in .15s cubic-bezier(0,0,.2,1)}@-webkit-keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}@keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}.ML__popover__content{border-radius:6px;padding:2px;cursor:pointer;min-height:100px;display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:8px}.ML__popover__content a{color:#5ea6fd;padding-top:.3em;margin-top:.4em;display:block}.ML__popover__content a:hover{color:#5ea6fd;text-decoration:underline}.ML__popover__content.active,.ML__popover__content.pressed,.ML__popover__content:hover{background:hsla(0,0%,100%,.1)}.ML__popover__command{font-size:1.6rem}.ML__popover__prev-shortcut{height:31px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:4px;padding-bottom:2px}.ML__popover__next-shortcut:hover,.ML__popover__prev-shortcut:hover{opacity:.3}.ML__popover__next-shortcut.active,.ML__popover__next-shortcut.pressed,.ML__popover__prev-shortcut.active,.ML__popover__prev-shortcut.pressed{opacity:1}.ML__popover__next-shortcut>span,.ML__popover__prev-shortcut>span{padding:5px;border-radius:50%;width:20px;height:20px;display:inline-block}.ML__popover__prev-shortcut>span>span{margin-top:-2px;display:block}.ML__popover__next-shortcut>span>span{margin-top:2px;display:block}.ML__popover__next-shortcut:hover>span,.ML__popover__prev-shortcut:hover>span{background:hsla(0,0%,100%,.1)}.ML__popover__next-shortcut{height:34px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:2px;padding-bottom:4px}.ML__popover__shortcut{font-size:.8em;margin-top:.25em}.ML__popover__note,.ML__popover__shortcut{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;opacity:.7;padding-top:.25em}.ML__popover__note{font-size:.8rem;line-height:1em;padding-left:.5em;padding-right:.5em}.ML__shortcut-join{opacity:.5}")),this.keystrokeCaption=ui("mathlive-keystroke-caption-panel","ML__keystroke-caption"),this.stylesheets.push(rt(e,".ML__keystroke-caption{visibility:hidden;background:var(--secondary);border-color:var(--secondary-border);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);text-align:center;border-radius:6px;padding:16px;position:absolute;z-index:1;display:flex;flex-direction:row;justify-content:center;--keystroke:#fff;--on-keystroke:#555;--keystroke-border:#f7f7f7}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}}body[theme=dark] .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}.ML__keystroke-caption>span{min-width:14px;margin:0 8px 0 0;padding:4px;background-color:var(--keystroke);color:var(--on-keystroke);fill:currentColor;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1em;border-radius:6px;border:2px solid var(--keystroke-border)}")),this.keystrokeCaptionVisible=!1,this.virtualKeyboardVisible=!1,this.keystrokeBuffer="",this.keystrokeBufferStates=[],this.keystrokeBufferResetTimer=null,this.suggestionIndex=0,this.mode=this.config.defaultMode,this.smartModeSuppressed=!1,this.style={},this.blurred=!0,mi(this.element,"focus",this),mi(this.element,"blur",this),mi(this.textarea,"cut",this),mi(this.textarea,"copy",this),mi(this.textarea,"paste",this),function(e,t){let i,a=null,r=null,n=!1,o=!1;function s(e){clearTimeout(i),i=setTimeout((function(){clearTimeout(i),e()}))}function l(){if(function(e){return e.selectionStart!==e.selectionEnd}(e))return;const i=e.value;e.value="",i.length>0&&t.typedText(i)}const c=e;c.addEventListener("keydown",i=>{if(t.allowDeadKey()||"Dead"!==i.key&&"Unidentified"!==i.key&&229!==i.keyCode)o=!1;else{o=!0,n=!1;const i=t.blur,a=t.focus;t.blur=null,t.focus=null,"function"==typeof e.blur&&(e.blur(),e.focus()),t.blur=i,t.focus=a}return!(!n&&"CapsLock"!==i.code&&!/(Control|Meta|Alt|Shift)(Right|Left)/.test(i.code))||(a=i,r=null,t.keystroke(fa(i),i))},!0),c.addEventListener("keypress",e=>{n||(a&&r&&t.keystroke(fa(a),a),r=e,s(l))},!0),c.addEventListener("keyup",()=>{n||!a||r||l()},!0),c.addEventListener("paste",()=>{e.focus();const i=e.value;e.value="",i.length>0&&t.paste(i)},!0),c.addEventListener("blur",()=>{a=null,r=null,t.blur&&t.blur()},!0),c.addEventListener("focus",()=>{t.focus&&t.focus()},!0),c.addEventListener("compositionstart",()=>{n=!0},!0),c.addEventListener("compositionend",()=>{n=!1,o&&t.allowDeadKey()&&s(l)},!0),c.addEventListener("input",()=>{if(o){const i=t.blur,a=t.focus;t.blur=null,t.focus=null,e.blur(),e.focus(),t.blur=i,t.focus=a,o=!1,n=!1,t.allowDeadKey()&&s(l)}else n||s(l)})}(this.textarea,{allowDeadKey:()=>"text"===this.mode,typedText:e=>Ia(this,e),paste:()=>Va(this),keystroke:(e,t)=>Ra(this,e,t),focus:()=>this._onFocus(),blur:()=>this._onBlur()}),window.PointerEvent?mi(this.field,"pointerdown",this):mi(this.field,"touchstart:active mousedown",this),mi(window,"resize",this),this.model=new yt({mode:this.config.defaultMode,macros:this.config.macros,removeExtraneousParentheses:this.config.removeExtraneousParentheses},{onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError},{announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)},this),this.undoManager=new ya(this.model),ca(this.model,i,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:!0,macros:this.config.macros}),this.undoManager.startRecording(),this.undoManager.snapshot(this.config),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ri().locale)||ai(this.config.locale),this.keybindings=di(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),Wi(this)}$setConfig(e){this.config=Na(this.config,e),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ri().locale)||ai(this.config.locale),this.keybindings=di(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),this.config.readOnly||this._onBlur(),Wi(this)}getConfig(e){return Oa(this.config,e)}handleEvent(e){switch(e.type){case"focus":this._onFocus();break;case"blur":this._onBlur();break;case"touchstart":case"mousedown":case"pointerdown":!function(e,t){const i=e;let a,r=!1,n=!1,o=!1;if(1!==t.buttons&&0!==t.buttons)return;let s=!1,l=!1;const c=t.touches?t.touches[0].clientX:t.clientX,d=t.touches?t.touches[0].clientY:t.clientY,m=Date.now(),p=setInterval(()=>{s?i.field.scroll({top:0,left:i.field.scrollLeft-16}):l&&i.field.scroll({top:0,left:i.field.scrollLeft+16})},32);function u(e){window.PointerEvent?(pi(i.field,"pointermove",h),pi(i.field,"pointerup pointercancel",u),i.field.releasePointerCapture(e.pointerId)):(pi(i.field,"touchmove",h),pi(i.field,"touchcancel touchend",u),pi(window,"mousemove",h),pi(window,"mouseup blur",u)),r=!1,clearInterval(p),i.element.querySelectorAll(".ML__scroller").forEach(e=>e.parentNode.removeChild(e)),e.preventDefault(),e.stopPropagation()}function h(t){const r=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,p="touch"===t.pointerType?20:5;if(Date.now()u.right,s=r=f.left&&c<=f.right&&d>=f.top&&d<=f.bottom){e.$hasFocus()||(o=!0,e.textarea.focus&&e.textarea.focus()),e.resetKeystrokeBuffer(),e.smartModeSuppressed=!1;const s=e.field.querySelector(".ML__mathlive").getBoundingClientRect();if(a=c>s.right?[{relation:"body",offset:e.model.root.body.length-1}]:Ga(e,c,d,{bias:0}),a){let s=document.createElement("div");s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.left-200+"px",s=document.createElement("div"),s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.right+"px",t.shiftKey?(Vt(e.model,e.model.path,a),a=mt(e.model.path),a[a.length-1].offset-=1):Ut(e.model,a,0),o=!0,e.style={},3===t.detail||ja>2?(u(t),3!==t.detail&&3!==ja||Bt(e.model)):r||(r=!0,window.PointerEvent?(mi(i.field,"pointermove",h),mi(i.field,"pointerup pointercancel",u),i.field.setPointerCapture(t.pointerId)):(mi(window,"blur",u),t.touches?(mi(t.target,"touchmove",h),mi(t.target,"touchcancel touchend",u)):(mi(window,"mousemove",h),mi(window,"mouseup",u))),2!==t.detail&&2!==ja||(n=!0,Ot(e.model)))}}else Ua=null;o&&Wi(e),t.preventDefault()}(this,e);break;case"resize":this.resizeTimer&&window.cancelAnimationFrame(this.resizeTimer),this.resizeTimer=window.requestAnimationFrame(()=>fi(this)&&this._onResize());break;case"cut":t=this,setTimeout(function(){t.$clearSelection(),Wi(t)}.bind(t),0);break;case"copy":!function(e,t){Ft(e.model)?(t.clipboardData.setData("text/plain","$$"+e.$text("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$text("json")),t.clipboardData.setData("application/xml",e.$text("mathML"))):(t.clipboardData.setData("text/plain","$$"+e.$selectedText("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$selectedText("json")),t.clipboardData.setData("application/xml",e.$selectedText("mathML"))),t.preventDefault()}(this,e);break;case"paste":Va(this)}var t}$revertToOriginalContent(){this.element.innerHTML=this.config.createHTML(this.originalContent),delete this.element.mathfield,delete this.accessibleNode,delete this.ariaLiveText,delete this.field,pi(this.textarea,"cut",this),pi(this.textarea,"copy",this),pi(this.textarea,"paste",this),this.textarea.remove(),delete this.textarea,this.virtualKeyboardToggleDOMNode.remove(),delete this.virtualKeyboardToggleDOMNode,hi(this.popover),delete this.popover,hi(this.keystrokeCaption),delete this.keystrokeCaption,hi(this.virtualKeyboard),delete this.virtualKeyboard,hi(document.getElementById("mathlive-alternate-keys-panel")),pi(this.element,"pointerdown",this),pi(this.element,"touchstart:active mousedown",this),pi(this.element,"focus",this),pi(this.element,"blur",this),pi(window,"resize",this),delete this.element,this.stylesheets.forEach(e=>e.release())}resetKeystrokeBuffer(){this.keystrokeBuffer="",this.keystrokeBufferStates=[],clearTimeout(this.keystrokeBufferResetTimer)}_onSelectionDidChange(){!function(e){const t=wt(e);if(t){const i=e.siblings(),a=e.anchorOffset()+1;for(let e=t.start;e=0;e--)"command"===i[e].type?i.splice(e,1):t(i[e]);else if(t(i.body),t(i.superscript),t(i.subscript),t(i.underscript),t(i.overscript),t(i.numer),t(i.denom),t(i.index),i.array)for(let e=ft(i.array);e>=0;e--)t(ht(i.array,e))}(t.root.body),t.suppressChangeNotifications=i,kt(t)}(this.model))}ki(this,{deferred:!0}),"function"==typeof this.config.onSelectionDidChange&&this.config.onSelectionDidChange(this)}_onFocus(){this.config.readOnly||this.blurred&&(this.blurred=!1,this.textarea.focus&&this.textarea.focus(),"onfocus"===this.config.virtualKeyboardMode&&lr(this),ki(this),this.config.onFocus&&this.config.onFocus(this),Wi(this))}_onBlur(){this.blurred||(this.blurred=!0,this.ariaLiveText.textContent="","onfocus"===this.config.virtualKeyboardMode&&cr(this),Ma(this,{discard:!0}),Wi(this),this.config.onBlur&&this.config.onBlur(this))}_onResize(){this.element.classList.remove("ML__isNarrowWidth","ML__isWideWidth","ML__isExtendedWidth"),window.innerWidth>=1024?this.element.classList.add("ML__isExtendedWidth"):window.innerWidth>=768?this.element.classList.add("ML__isWideWidth"):this.element.classList.add("ML__isNarrowWidth"),ki(this)}$perform(t){return function(t,i){var a;if(!i)return!1;let r,n=[],o=!1,s=!1;if(e(i)?(r=i[0],n=i.slice(1)):r=i,r=r.replace(/-\w/g,e=>e[1].toUpperCase()),"model"===(null===(a=Ui[r])||void 0===a?void 0:a.target)){if(/^(delete|transpose|add)/.test(r)&&t.resetKeystrokeBuffer(),/^(delete|transpose|add)/.test(r)&&"command"!==t.mode&&(t.popUndoStack(),t.snapshot()),Ui[r].fn(t.model,...n),/^(delete|transpose|add)/.test(r)&&"command"!==t.mode&&t.snapshot(),/^(delete)/.test(r)&&"command"===t.mode){const e=re(Mi(t.model));0===e.length?wi(t):xi(t,e[0].match,e.length>1)}s=!0,o=!0}else{if(!Ui[r])throw Error('Unknown command "'+r+'"');s=Ui[r].fn(t,...n),o=!0}return Ft(t.model)&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(r)||(t.resetKeystrokeBuffer(),t.style={}),s&&Wi(t),o}(this,t)}formatMathlist(e,t){let i="";if("latex"===(t=t||"latex")||"latex-expanded"===t)i=e.toLatex("latex-expanded"===t);else if("mathML"===t)i=Ii(e,this.config);else if("spoken"===t)i=qa(e,this.config);else if("spoken-text"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="",i=qa(e,this.config),this.config.textToSpeechMarkup=t}else if("spoken-ssml"===t||"spoken-ssml-withHighlighting"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="ssml",i=qa(e,this.config),this.config.textToSpeechMarkup=t}else if("mathjson"===t){const t=Fn(e.toLatex(!0),{form:"canonical"});i=JSON.stringify(t)}else if("json"===t){const t=Mo(e);i=JSON.stringify(t)}else if("json-2"===t){const t=Mo(e);i=JSON.stringify(t,null,2)}else"ASCIIMath"===t&&(i=xa(e));return i}$text(e){return this.formatMathlist(this.model.root,e)}$selectedText(e){const t=Nt(this.model);if(!t)return"";const i=Be("math",t);return this.formatMathlist(i,e)}$selectionIsCollapsed(){return Ft(this.model)}$selectionDepth(){return this.model.path.length}$selectionAtStart(){return 0===this.model.startOffset()}$selectionAtEnd(){return this.model.endOffset()>=this.model.siblings().length-1}groupIsSelected(){return 0===this.model.startOffset()&&this.model.endOffset()>=this.model.siblings().length-1}$latex(e,t){return"string"==typeof e?(e!==this.model.root.toLatex()&&(t=null!=t?t:{mode:"math"},ca(this.model,e,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:t.suppressChangeNotifications,macros:this.config.macros}),this.undoManager.snapshot(this.config),Wi(this)),e):this.model.root.toLatex()}$el(){return this.element}scrollIntoView(){var e;this.dirty&&Vi(this);let t=null===(e=gi(this.field))||void 0===e?void 0:e.x;const i=this.field.getBoundingClientRect();if(void 0===t){const e=yi(this.field);null!==e&&(t=e.right+i.left-this.field.scrollLeft)}if(void 0!==t){const e=t-window.scrollX;ei.right&&this.field.scroll({top:0,left:e-i.right+this.field.scrollLeft+20,behavior:"smooth"})}}$insert(e,t){if("string"==typeof e&&e.length>0){if((t=null!=t?t:{mode:"math"}).focus&&this.$focus(),t.feedback&&(this.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play())),"\\\\"===e)Yi(this.model);else if("&"===e)Qi(this.model);else{const i=this.style;ca(this.model,e,{mode:this.mode,style:St(this.model),...t}),t.resetStyle&&(this.style=i)}return this.undoManager.snapshot(this.config),Wi(this),!0}return!1}switchMode(e,t="",i=""){this.resetKeystrokeBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(e),t&&this.$insert(t,{format:"latex",mode:{math:"text",text:"math"}[e]}),Si(this.model,!1),"command"===e?(ot(this.model),wi(this),this.suggestionIndex=0,this.virtualKeyboardVisible&&sr(this,"lower-command"),ca(this.model,"",{mode:"math"})):this.mode=e,i&&this.$insert(i,{format:"latex",mode:e}),"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),Wi(this)}$hasFocus(){return document.hasFocus()&&function e(t=document){var i,a;return(null===(a=null===(i=t.activeElement)||void 0===i?void 0:i.shadowRoot)||void 0===a?void 0:a.activeElement)?e(t.activeElement.shadowRoot):t.activeElement}(document)===this.textarea}$focus(){this.$hasFocus()||("function"==typeof this.textarea.focus&&this.textarea.focus(),this.model.announce("line"))}$blur(){this.$hasFocus()&&this.textarea.blur&&this.textarea.blur()}$select(){Bt(this.model)}$clearSelection(){ea(this.model)}$applyStyle(e){la(this.model,e)}$keystroke(e,t){return Ra(this,e,t)}$typedText(e){Ia(this,e)}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(){this.undoManager.snapshot({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}snapshotAndCoalesce(){this.undoManager.snapshotAndCoalesce({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}getUndoRecord(){return this.undoManager.save()}restoreToUndoRecord(e){this.undoManager.restore(e,{...this.config,suppressChangeNotifications:!0})}undo(){return this.undoManager.undo({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}redo(){return this.undoManager.redo({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}}function $o(e,t,i){let a=i,r=0;const n=e.length;for(;a0&&r.push({type:"text",data:o.slice(0,c)}),l=!1);let d=!1;for(;!d;){if(l){if(s=o.indexOf(t,c),-1===s){d=!0;break}c!==s&&r.push({type:"text",data:o.slice(c,s)}),c=s}else{if(s=$o(i,o,c+t.length),-1===s){d=!0;break}r.push({type:"math",data:o.slice(c+t.length,s),rawData:o.slice(c,s+i.length),mathstyle:a}),c=s+i.length}l=!l}c";i.innerHTML=t.createHTML?t.createHTML(a):a}catch(t){i.textContent=e}return i.className="ML__sr-only",i}(e,i)),/\bspeakable-text\b/i.test(i.renderAccessibleContent)&&i.renderToSpeakableText){const a=document.createElement("span"),r=i.renderToSpeakableText(e,i);a.innerHTML=i.createHTML?i.createHTML(r):r,a.className="ML__sr-only",t.appendChild(a)}return t.appendChild(r),t}return r}function Eo(e,t){let i=null;if(t.TeX.processEnvironments&&/^\s*\\begin/.test(e))i=document.createDocumentFragment(),i.appendChild(To(e,void 0,t,!0));else{if(!e.trim())return null;const a=Do(e,t.TeX.delimiters);if(1===a.length&&"text"===a[0].type)return null;i=document.createDocumentFragment();for(let e=0;e0?No(e[t].children,i):e[t];if("string"==typeof t){for(let r=0;r0?No(e[r].children,i):e[r];if(a=No(e[r].children,t),a)return a}return a}return null}function Oo(e,t){var i;const a=No(e,t);return a?null!==(i=a.classes)&&void 0!==i?i:"":null}function Bo(e,t){let i="";return e[t]&&(i+=''+t+"=",i+='',i+=e[t],i+='" '),i}var Fo={mathlistToMarkup:function e(t,i=""){if(!t)return"";let a="";if(Array.isArray(t))for(let r=0;r"),"string"==typeof t.body&&t.body.length>0&&(a+=' ',a+=t.body,(t.body.charCodeAt(0)<32||t.body.charCodeAt(0)>127)&&(a+=" U+"+("000000"+t.body.charCodeAt(0).toString(16)).substr(-6)),a+=" "),"mathrm"===t.fontFamily?(a+='',a+=Bo(t,"fontFamily"),a+=""):a+=Bo(t,"fontFamily"),a+=Bo(t,"hasBarLine"),a+=Bo(t,"leftDelim"),a+=Bo(t,"rightDelim"),a+=Bo(t,"continuousFraction"),a+=Bo(t,"limits"),a+=Bo(t,"symbol"),a+=function(e,t){let i="";return e.framecolor&&(i+='framecolor=',i+='',i+='',i+=e.framecolor,i+=""),i}(t),a+=Bo(t,"mathstyle"),a+=Bo(t,"size"),a+=Bo(t,"cls"),a+=Bo(t,"delim"),a+=Bo(t,"shift"),a+=Bo(t,"width"),a+=Bo(t,"height"),a+=Bo(t,"position"),a+=e(t.overscript,i+"↑"),a+=e(t.underscript,i+"↓"),a+=e(t.superscript,i+"↑"),a+=e(t.subscript,i+"↓"),a+=e(t.body,i+"▶"),a+=e(t.numer,i+"▲"),a+=e(t.denom,i+"▼"),t.array)for(let r=0;r"+i+"⌗ row "+(r+1)+"/"+t.array.length;for(let n=0;n"),t.body&&t.body.length>0&&(a+=''+t.body+""),t.classes&&t.classes.length>0&&(a+=' '+t.classes+""),t.isTight&&(a+='  tight '),t.caret&&(a+='  caret '),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=' '+e+":",a+=' '+t.style[e]+"; ");t.children&&(a+=t.children.map(t=>e(t,i+"▷")).join("; "))}return a},spanToString:function e(t,i=""){let a="";if(Array.isArray(t))if(0===t.length)a+="[]\n";else{a+="[\n";for(let r=0;r0&&(a+=i+'body:"'+t.body+'",\n'),t.classes&&t.classes.length>0&&(a+=i+'classes:"'+t.classes+'",\n'),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=i+e+':"',a+=t.style[e]+'",\n');t.children&&t.children.length>0&&(a+=i+"children:"+t.children.map(t=>e(t,i)).join("; ")),a+=i+"}"}return a},hasClass:function(e,t,i){const a=Oo(e,t);if(!a)return!1;const r=a.split(" ");for(let e=0;e{if(e)return;if(!t||!t.AudioStream)return;const i=new TextDecoder("utf-8").decode(new Uint8Array(t.AudioStream));window.mathlive.readAloudMarks=i.split("\n").map(e=>e?JSON.parse(e):{}),window.mathlive.readAloudTokens=[];for(const e of window.mathlive.readAloudMarks)e.value&&window.mathlive.readAloudTokens.push(e.value);window.mathlive.readAloudCurrentMark="",n.OutputFormat="mp3",n.SpeechMarkTypes=[],r.synthesizeSpeech(n,(function(e,t){if(e)return;if(!t||!t.AudioStream)return;const i=new Uint8Array(t.AudioStream),a=new Blob([i.buffer],{type:"audio/mpeg"}),r=URL.createObjectURL(a);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener("ended",()=>{const e=window.mathlive.readAloudMathField;o&&o(e,"ended"),e?(Vi(e),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=""):function e(t){if(t.classList.remove("ML__highlight"),t.children)for(const i of t.children)e(i)}(window.mathlive.readAloudElement)}),window.mathlive.readAloudAudio.addEventListener("timeupdate",()=>{let e="";const t=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.time0&&Array.from(t.children).forEach(t=>{e(t,i)})):(t.classList.add("ML__highlight"),t.children&&t.children.length>0&&Array.from(t.children).forEach(t=>{e(t)}))}(window.mathlive.readAloudElement,window.mathlive.readAloudCurrentMark)))})),window.mathlive.readAloudAudio.src=r,o&&o(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()}))})}function Ro(e,t,i=3e3,a="$0"){t.forEach(t=>{N[t]&&(N[t].frequency=i,N[t].category=e,N[t].template=a.replace(/\$0/g,t)),B[t]&&(B[t]={...B[t],frequency:i,category:e,template:a.replace(/\$0/g,t)})})}function Io(e,t){var i;(t=null!=t?t:{}).mathstyle=t.mathstyle||"displaystyle",t.letterShapeStyle=t.letterShapeStyle||"auto",t.macros={...P,...null!==(i=t.macros)&&void 0!==i?i:{}};const a=Je(e,"math",null,t.macros,!1,t.onError);let r=Ne({mathstyle:c[t.mathstyle],letterShapeStyle:t.letterShapeStyle},a);return r=function e(t){if(!t||0===t.length)return[];t[0].children=e(t[0].children);const i=[t[0]];for(let a=1;a{},...null!=t?t:{}}).emit(e)}(e,t)}function Uo(e,t){var i;return(t=null!=t?t:{}).macros=null!==(i=t.macros)&&void 0!==i?i:{},Object.assign(t.macros,P),qa(Je(e,"math",null,t.macros,!1,t.onError),t)}function jo(e){if("string"==typeof e){const t=document.getElementById(e);if(null===t)throw Error(`The element with ID "${e}" could not be found.`);return t}return e}function Go(e,t){var i,a,r,n;(t=null!=t?t:{}).renderToMarkup=null!==(i=t.renderToMarkup)&&void 0!==i?i:Io,t.renderToMathML=null!==(a=t.renderToMathML)&&void 0!==a?a:Ho,t.renderToSpeakableText=null!==(r=t.renderToSpeakableText)&&void 0!==r?r:Uo,t.macros=null!==(n=t.macros)&&void 0!==n?n:P,function(e,t){try{if((t={...Ko,...t}).ignoreClassPattern=new RegExp(t.ignoreClass),t.processClassPattern=new RegExp(t.processClass),t.processScriptTypePattern=new RegExp(t.processScriptType),t.macros=P,t.namespace){if(!/^[a-z]+[-]?$/.test(t.namespace))throw Error("options.namespace must be a string of lowercase characters only");/-$/.test(t.namespace)||(t.namespace+="-")}!function e(t,i){const a=t.getAttribute("data-"+i.namespace+"original-content");if(a){const e=To(a,t.getAttribute("data-"+i.namespace+"mathstyle"),i,!1);null!=e&&(t.textContent="",t.appendChild(e))}else{if(1===t.childNodes.length&&3===t.childNodes[0].nodeType){const e=t.childNodes[0].textContent;if(i.TeX.processEnvironments&&/^\s*\\begin/.test(e))return t.textContent="",void t.appendChild(To(e,void 0,i,!0));const a=Do(e,i.TeX.delimiters);if(1===a.length&&"math"===a[0].type)return t.textContent="",void t.appendChild(To(a[0].data,a[0].mathstyle,i,!0));if(1===a.length&&"text"===a[0].type)return}for(let a=0;a0\\right\\}"),Ro("Layout",["\\overset","\\underset","\\stackrel","\\stackbin"],1200,"$0{arg}{x=0}"),Ro("Layout",["\\rlap","\\mathrlap"],1200,"$0{/}0"),Ro("Layout",["\\llap","\\mathllap"],1200,"o$0{/}"),Ro("Fractions",["\\frac"],4e3,"$0{\\placeholder{}}{\\placeholder{}}"),Ro("Fractions",["\\binom","\\dfrac","\\tfrac","\\dbinom","\\tbinom","\\pdiff","\\cfrac"],1200,"$0{\\placeholder{}}{\\placeholder{}}"),Ro("Fractions",["\\over","\\atop","\\choose"],1200,'\\unicode{"2B1A} $0 \\unicode{"2B1A}'),Ro("Fractions",["\\overwithdelims","\\atopwithdelims"],1200,'{\\unicode{"2B1A} $0{\\lbrace}{\\rbrace} \\unicode{"2B1A}}'),Ro("Extensible Operators",["\\sum","\\prod","\\bigcap","\\bigcup","\\int"],4e3),Ro("Extensible Operators",["\\bigoplus","\\smallint","\\iint","\\oint"],3e3),Ro("Extensible Operators",["\\bigwedge","\\bigvee","\\coprod","\\bigsqcup","\\bigotimes","\\bigodot","\\biguplus","\\intop","\\sqcup","\\sqcap","\\uplus","\\wr","\\Cap","\\Cup","\\doublecap","\\doublecup","\\amalg","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"],1200),Ro("Accents",["\\vec"],4e3),Ro("Accents",["\\bar","\\ddot","\\acute","\\tilde","\\check"],3e3,"$0{\\placeholder{}}"),Ro("Accents",["\\^","\\`","\\'"],1200,"$0{e}"),Ro("Accents",["\\c"],1200,"$0{c}"),Ro("Accents",["\\~"],1200,"$0{n}"),Ro("Accents",["\\mathring","\\hat","\\dot","\\breve","\\grave"],1200,"$0{\\placeholder{}}"),Ro("Extensible Symbols",["\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftharpoon","\\overrightharpoon","\\overleftrightarrow","\\overbrace","\\overlinesegment","\\overgroup","\\widehat","\\widecheck","\\widetilde"],3e3,"$0{ABC}"),Ro("Extensible Symbols",["\\underrightarrow","\\underleftarrow","\\underleftrightarrow","\\underbrace","\\underlinesegment","\\undergroup","\\utilde"],3e3,"$0{ABC}"),Ro("Sizing",["\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],1200,"$0{x=0}"),Ro("Sizing",["\\big","\\Big","\\bigg","\\Bigg"],1200,"$0($0)"),Ro("Sizing",["\\bigl","\\Bigl","\\biggl","\\Biggl"],1200,"$0("),Ro("Sizing",["\\bigr","\\Bigr","\\biggr","\\Biggr"],1200,"$0)"),Ro("Sizing",["\\bigm","\\Bigm","\\biggm","\\Biggm"],1200,"$0|"),Ro("Letterlike Symbols",["\\nabla","\\partial","\\doubleStruckCapitalN","\\N","\\doubleStruckCapitalR","\\R","\\doubleStruckCapitalQ","\\Q","\\doubleStruckCapitalC","\\C","\\doubleStruckCapitalZ","\\Z","\\exponentialE","\\forall","\\exists","\\nexists","\\$","\\%","\\And","\\degree"],4e3),Ro("Letterlike Symbols",["\\doubleStruckCapitalP","\\P","\\ell","\\hbar","\\hslash","\\imath","\\jmath","\\imaginaryI","\\imaginaryJ","\\differentialD","\\rd","\\capitalDifferentialD","\\rD","\\differencedelta","\\mid","@","\\Re","\\Im"],3e3),Ro("Letterlike Symbols",["\\top","\\bot","\\scriptCapitalE","\\scriptCapitalH","\\scriptCapitalL","\\gothicCapitalC","\\gothicCapitalH","\\gothicCapitalI","\\gothicCapitalR","\\Bbbk","\\Finv","\\Game","\\wp","\\eth","\\mho","\\pounds","\\yen","\\euro"],1200),Ro("Crosses",["\\dagger","\\dag"],4e3),Ro("Crosses",["\\ddag","\\ddagger","\\maltese","\\textdagger","\\textdaggerdbl"],1200),Ro("Various",["\\checkmark","\\diagup","\\diagdown","\\angle","\\measuredangle","\\sphericalangle","\\prime","\\doubleprime","\\backprime","\\backdoubleprime","\\sharp","\\flat","\\natural","\\&","\\#","\\clubsuit","\\spadesuit","\\diamondsuit","\\heartsuit","\\backslash","\\infty","/","\\_","\\/","|","'"],1200),Ro("Various",["\\unicode"],1200,'$0{"2B1A}'),Ro("Arrows",["\\longrightarrow","\\rightarrow","\\Longrightarrow","\\Rightarrow"],4e3),Ro("Arrows",["\\longmapsto","\\mapsto","\\Longleftrightarrow","\\rightleftarrows","\\leftarrow","\\curvearrowleft","\\uparrow","\\downarrow","\\hookrightarrow","\\rightharpoonup","\\rightleftharpoons"],3e3),Ro("Arrows",["\\Leftarrow","\\longleftrightarrow","\\longleftarrow","\\Longleftarrow","\\searrow","\\nearrow","\\swarrow","\\nwarrow","\\Uparrow","\\Downarrow","\\updownarrow","\\Updownarrow","\\hookleftarrow","\\leftharpoonup","\\leftharpoondown","\\rightharpoondown","\\leftrightarrows","\\dashrightarrow","\\dashleftarrow","\\leftleftarrows","\\Lleftarrow","\\twoheadleftarrow","\\leftarrowtail","\\looparrowleft","\\leftrightharpoons","\\circlearrowleft","\\Lsh","\\upuparrows","\\downharpoonleft","\\multimap","\\leftrightsquigarrow","\\twoheadrightarrow","\\rightarrowtail","\\looparrowright","\\curvearrowright","\\circlearrowright","\\Rsh","\\downdownarrows","\\upharpoonright","\\downharpoonright","\\rightsquigarrow","\\leadsto","\\Rrightarrow","\\restriction"],1200),Ro("Arrows",["\\upharpoonleft","\\rightrightarrows"],0),Ro("Negated Arrows",["\\nrightarrow","\\nRightarrow","\\nleftrightarrow","\\nLeftrightarrow","\\nleftarrow","\\nLeftarrow"],1200),Ro("Extensible Symbols",["\\xrightarrow","\\xleftarrow","\\xRightarrow","\\xLeftarrow","\\xleftharpoonup","\\xleftharpoondown","\\xrightharpoonup","\\xrightharpoondown","\\xlongequal","\\xtwoheadleftarrow","\\xtwoheadrightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xrightleftharpoons","\\xleftrightharpoons","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],1200,"$0[below]{above}=0"),Ro("Negated Relations",["\\nless","\\nleqslant","\\lneq","\\lneqq","\\nleqq","\\unlhd","\\unrhd","\\lvertneqq","\\lnsim","\\lnapprox","\\nprec","\\npreceq","\\precnsim","\\precnapprox","\\nsim","\\nshortmid","\\nmid","\\nvdash","\\nvDash","\\ngtr","\\ngeqslant","\\ngeqq","\\gneq","\\gneqq","\\gvertneqq","\\gnsim","\\nsucc","\\succnsim","\\ncong","\\nshortparallel","\\nparallel","\\nVDash","\\nVdash","\\precneqq","\\succneqq","\\gnapprox","\\succnapprox","\\nsucceq"],1200),Ro("Hebrew",["\\aleph","\\beth","\\daleth","\\gimel"],1200),Ro("Fences",["\\lbrace","\\rbrace","\\vert","\\Vert","\\{","\\}","(",")","[","]"],4e3),Ro("Fences",["\\langle","\\rangle","\\lfloor","\\rfloor","\\lceil","\\rceil","\\mvert","\\|","\\mVert"],3e3),Ro("Fences",["\\lvert","\\rvert","\\lVert","\\rVert","\\lbrack","\\rbrack","\\ulcorner","\\urcorner","\\llcorner","\\lrcorner","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],1200),Ro("Relations",["=","\\ne","\\neq","<",">","\\leqslant","\\geqslant","\\approx"],4e3),Ro("Relations",["\\lt","\\gt","\\le","\\ge","\\leq","\\geq","\\gg","\\cong","\\equiv","\\prec","\\preceq","\\succ","\\perp","\\parallel","\\propto","\\smile","\\frown","\\sim","\\gtrsim"],3e3),Ro("Relations",["\\coloneq","\\succeq","\\approxeq","\\thickapprox","\\lessapprox","\\gtrapprox","\\precapprox","\\succapprox","\\thicksim","\\succsim","\\precsim","\\backsim","\\eqsim","\\backsimeq","\\simeq","\\lesssim","\\nleq","\\ngeq","\\smallsmile","\\smallfrown","\\bowtie","\\asymp","\\leqq","\\eqslantless","\\ll","\\lll","\\lessgtr","\\lesseqgtr","\\lesseqqgtr","\\risingdotseq","\\fallingdotseq","\\preccurlyeq","\\curlyeqprec","\\vDash","\\Vvdash","\\bumpeq","\\Bumpeq","\\geqq","\\eqslantgtr","\\ggg","\\gtrless","\\gtreqless","\\gtreqqless","\\succcurlyeq","\\curlyeqsucc","\\Vdash","\\shortmid","\\shortparallel","\\between","\\pitchfork","\\varpropto","\\backepsilon","\\llless","\\gggtr","\\lhd","\\rhd","\\Join","\\doteq","\\doteqdot","\\Doteq","\\eqcirc","\\circeq","\\lessdot","\\gtrdot","\\measeq","\\eqdef","\\questeq"],1200),Ro("Logic",["\\leftrightarrow","\\Leftrightarrow","\\to"],4e3),Ro("Logic",["\\models","\\vdash"],3e3),Ro("Logic",["\\therefore","\\because","\\implies","\\gets","\\dashv","\\impliedby","\\biconditional","\\roundimplies"],1200),Ro("Operators",["+","-","*","\\cdot"],4e3),Ro("Operators",["\\sqrt"],4e3,"$0{\\placeholder{}}"),Ro("Operators",["\\pm","\\mp","\\times","\\div","\\surd"],3e3),Ro("Operators",["\\ltimes","\\rtimes","\\leftthreetimes","\\rightthreetimes","\\intercal","\\dotplus","\\centerdot","\\doublebarwedge","\\divideontimes","\\divides"],1200),Ro("Logic",["\\wedge","\\vee","\\neg"],4e3),Ro("Logic",["\\lnot"],3e3),Ro("Logic",["\\land","\\lor","\\barwedge","\\veebar","\\nor","\\curlywedge","\\curlyvee"],1200),Ro("Greek",["\\alpha","\\beta","\\gamma","\\delta","\\epsilon","\\varepsilon","\\zeta","\\eta","\\theta","\\vartheta","\\iota","\\kappa","\\varkappa","\\lambda","\\mu","\\nu","\\xi","\\pi","\\varpi","\\rho","\\varrho","\\sigma","\\varsigma","\\tau","\\phi","\\varphi","\\upsilon","\\chi","\\psi","\\omega","\\Gamma","\\Delta","\\Theta","\\Lambda","\\Xi","\\Pi","\\Sigma","\\Upsilon","\\Phi","\\Psi","\\Omega","\\digamma","\\omicron"],3e3),Ro("Sets",["\\emptyset","\\varnothing","\\cap","\\cup","\\in","\\notin","\\subset","\\supset","\\subseteq","\\supseteq","\\sqsubseteq"],4e3),Ro("Sets",["\\setminus","\\not","\\ni","\\sqsupseteq","\\nsupseteqq","\\supsetneq","\\varsupsetneq","\\supsetneqq","\\varsupsetneqq"],3e3),Ro("Sets",["\\smallsetminus","\\complement","\\owns","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\varsubsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq","\\nsubseteqq","\\subseteqq","\\Subset","\\sqsubset","\\supseteqq","\\Supset","\\sqsupset"],1200),Ro("Spacing",["\\space, \\quad","\\qquad"],3e3,'\\unicode{"203A}$0\\unicode{"2039}'),Ro("Spacing",["\\!","\\,","\\:","\\;","\\enskip","\\enspace"],1200,'\\unicode{"203A}$0\\unicode{"2039}'),Ro("Spacing",["\\hspace","\\hspace*"],1200,'\\unicode{"203A}$0{1em}\\unicode{"2039}'),Ro("Punctuation",["\\colon","\\cdotp","\\ldots","\\cdots","\\ddots","\\vdots","?","!",":",'"',",",".",";"],3e3),Ro("Punctuation",["\\mathellipsis","\\ldotp","\\Colon"],1200),Ro("Boxes",["\\square","\\Box"],3e3),Ro("Boxes",["\\blacksquare","\\boxminus","\\boxplus","\\boxtimes","\\boxdot"],1200),Ro("Circles",["\\circ","\\bullet","\\circleddash","\\oplus","\\otimes"],3e3),Ro("Circles",["\\bigcirc","\\circledast","\\ominus","\\circledcirc","\\oslash","\\circledS","\\circledR","\\odot"],1200),Ro("Triangles",["\\triangle","\\triangleq"],3e3),Ro("Triangles",["\\bigtriangleup","\\vartriangle","\\triangledown","\\bigtriangledown","\\triangleleft","\\vartriangleleft","\\trianglelefteq","\\ntriangleleft","\\ntrianglelefteq","\\triangleright","\\vartriangleright","\\trianglerighteq","\\ntriangleright","\\ntrianglerighteq","\\blacktriangle","\\blacktriangledown","\\blacktriangleleft","\\blacktriangleright"],1200),Ro("Shapes",["\\ast","\\star"],3e3),Ro("Shapes",["\\diamond","\\Diamond","\\lozenge","\\blacklozenge","\\bigstar"],1200);var Zo={version:"0.55.0",latexToMarkup:Io,latexToMathML:Ho,latexToSpeakableText:Uo,latexToAST:function(e,t){var i;return(t=null!=t?t:{}).macros={...P,...null!==(i=t.macros)&&void 0!==i?i:{}},Mo(Je(e,"math",null,t.macros,!1,t.onError),t)},astToLatex:function(t,i){return function t(i,a){const r=Object.assign({precision:14,decimalMarker:".",groupSeparator:"\\, ",product:"\\cdot ",exponentProduct:"\\cdot ",exponentMarker:"",arcSeparator:"\\,",scientificNotation:"auto",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},a);let n="";if(void 0===i)return"";if("string"==typeof i)n=i;else if(i.latex)n=i.latex;else if(ro(i)){const e=ao(i);if(e===-1/0)n="-\\infty ";else if(e===1/0)n="\\infty ";else if("object"!=typeof i.num||"string"!=typeof i.num.re&&"string"!=typeof i.num.im)n=isNaN(e)?"\\text{NaN}":Ao(i.num,r);else{const e=no(i),t=oo(i);isNaN(e)||isNaN(t)?n="\\text{NaN}":Math.abs(t)<=Number.EPSILON&&Math.abs(e)<=Number.EPSILON?n="0":(Math.abs(e)>Number.EPSILON&&(n=Ao(e,r)),Math.abs(t)>Number.EPSILON&&(Math.abs(e)>Number.EPSILON&&(n+=t>0?"+":""),n+=(1!==Math.abs(t)?Ao(t,r):"")+"\\imaginaryI "))}so(i)&&(n+="^{"+t(i.sup,r)+"}"),lo(i)&&(n+="_{"+t(i.sub,r)+"}")}else if(i.group)n=t(i.group,r),ro(i.group)||io(i.group)?0!==oo(i.group)&&(n=So(i.fence||"(),",n)):n=So(i.fence||"(),",n),so(i)&&(n+="^{"+t(i.sup,r)+"}"),lo(i)&&(n+="_{"+t(i.sub,r)+"}");else if(i.fn)if("bind"===i.fn){if(n=t(Wn(i,0),r)+"|_{",i.arg&&2===i.arg.length)n+=t(Wn(i,1));else{let e="";for(let a=1;at(e,r)));else if("text"===i.fn)n="\\text{"+(i.arg[0]||"")+"}";else if("pow"===i.fn&&e(i.arg)&&i.arg.length>=2)n=t(Wn(i,0),r),ro(Wn(i,0))||io(Wn(i,0))||(n=So(i.fence||"(),",n)),n+="^{"+t(Wn(i,1),r)+"}";else if("equal"===i.fn&&i.arg&&i.arg.length>2)n=i.arg.map(e=>t(e,r)).join(" = ");else{const a=function(e){let t=In[e];return t||(t=e.length>1?"\\operatorname{"+e+"}%^%_ %":e+"%^%_ %"),t}(i.fn);n=a;let o="";if(/%(?![01_^])/.test(a)&&e(i.arg)&&i.arg.length>1)n+=So(i.fence||"(),",...i.arg.map(e=>t(e,r)));else if(e(i.arg)&&i.arg.length>0){const e=t(Wn(i,0),r),s=t(Wn(i,1),r),l=[...i.arg];/%0/.test(a)&&(n=n.replace("%0",e),l.shift()),/%1/.test(a)&&(n=n.replace("%1",s),l.shift()),l.length>0&&(o=So(i.fence||"(),",...l.map(e=>t(e,r))))}else o=So(i.fence||"(),","");n=so(i)?n.replace("%^","^{"+t(i.sup,r)+"}"):n.replace("%^",""),n=lo(i)?n.replace("%_","_{"+t(i.sub,r)+"}"):n.replace("%_",""),n=n.replace(/%(?![01_^])/,o),n=n.replace("%0","").replace("%1","")}else{const e=[];for(const a of i.arg)"add"===a.fn||"subtract"===a.fn||0!==no(o=a)&&0!==oo(o)||so(i)&&0!==oo(a)&&1!==oo(a)?e.push(So("() ",t(a,r))):e.push(t(a,r));if("multiply"===i.fn)n=!i.arg||2!==i.arg.length||!ro(i.arg[0])&&"divide"!==i.arg[0].fn||ro(i.arg[1])&&(0!==no(i.arg[1])||1!==oo(i.arg[1]))?e.join(" \\times "):e[0]+e[1];else if(i.arg&&1===i.arg.length)n="negate"===i.arg[0].fn||ro(i.arg[0])&&ao(i.arg[0])<0?e[0]:"+"+e[0];else{n=e[0];for(let t=1;t=0&&(a+=t,a({...e,[t]:a[t][this.size]}),{}),this.metrics.emPerEx=a.xHeight[this.size]/a.quad[this.size]}sup(){return c[[4,5,4,5,6,7,6,7][this.id]]}sub(){return c[[5,5,5,5,7,7,7,7][this.id]]}fracNum(){return c[[2,3,4,5,6,7,6,7][this.id]]}fracDen(){return c[[3,3,5,5,7,7,7,7][this.id]]}cramp(){return c[[1,1,3,3,5,5,7,7][this.id]]}cls(){return["displaystyle textstyle","textstyle","scriptstyle","scriptscriptstyle"][this.size]}adjustTo(e){let t=[["","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-textstyle displaystyle textstyle","","reset-textstyle scriptstyle","reset-textstyle scriptscriptstyle"],["reset-scriptstyle textstyle displaystyle","reset-scriptstyle textstyle","","reset-scriptstyle scriptscriptstyle"],["reset-scriptscriptstyle textstyle displaystyle","reset-scriptscriptstyle textstyle","reset-scriptscriptstyle scriptstyle",""]][this.size][e.size];return t.length>0&&(t=" "+t),t}isTight(){return this.size>=2}}const c={0:new l(0,0,1,!1),1:new l(1,0,1,!0),2:new l(2,1,1,!1),3:new l(3,1,1,!0),4:new l(4,2,.7,!1),5:new l(5,2,.7,!0),6:new l(6,3,.5,!1),7:new l(7,3,.5,!0)};c.displaystyle=c[0],c.textstyle=c[2],c.scriptstyle=c[4],c.scriptscriptstyle=c[6];class d{constructor(e){var t,i,a,r,n,o;this.macros=null!==(t=e.macros)&&void 0!==t?t:{},this.atomIdsSettings=e.atomIdsSettings,this.mathstyle=null!==(i=e.mathstyle)&&void 0!==i?i:c.displaystyle,this.letterShapeStyle=null!==(a=e.letterShapeStyle)&&void 0!==a?a:"tex",this.size=null!==(r=e.size)&&void 0!==r?r:"size5",this.parentMathstyle=null!==(n=e.parentMathstyle)&&void 0!==n?n:this.mathstyle,this.parentSize=null!==(o=e.parentSize)&&void 0!==o?o:this.size,this.opacity=e.opacity,this.smartFence=e.smartFence}clone(e={}){const t=new d(this);return void 0!==e&&(Object.assign(t,e),e.mathstyle?(t.parentMathstyle=this.mathstyle,t.parentSize=this.size,"string"==typeof e.mathstyle&&(t.mathstyle=c[e.mathstyle])):t.mathstyle=this.mathstyle),t}setMathstyle(e){e&&"auto"!==e&&(this.mathstyle=c[e])}cramp(){return this.clone({mathstyle:this.mathstyle.cramp()})}sup(){return this.clone({mathstyle:this.mathstyle.sup()})}sub(){return this.clone({mathstyle:this.mathstyle.sub()})}}const m={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},p={widehat1:[1062,239,.24],widehat2:[2364,300,.3],widehat3:[2364,360,.36],widehat4:[2364,420,.42],widecheck1:[1062,239,.24],widecheck2:[2364,300,.3],widecheck3:[2364,360,.36],widecheck4:[2364,420,.42],widetilde1:[600,260,.26],widetilde2:[1033,286,.286],widetilde3:[2339,306,.306],widetilde4:[2340,312,.34]},u={doubleleftarrow:"M262 157\nl10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3\n 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28\n 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5\nc2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5\n 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87\n-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7\n-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z\nm8 0v40h399730v-40zm0 194v40h399730v-40z",doublerightarrow:"M399738 392l\n-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5\n 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88\n-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68\n-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18\n-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782\nc-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3\n-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z",leftarrow:"M400000 241H110l3-3c68.7-52.7 113.7-120\n 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8\n-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247\nc-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208\n 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3\n 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202\n l-3-3h399890zM100 241v40h399900v-40z",leftbrace:"M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117\n-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7\n 5-6 9-10 13-.7 1-7.3 1-20 1H6z",leftbraceunder:"M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13\n 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688\n 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7\n-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z",leftgroup:"M400000 80\nH435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0\n 435 0h399565z",leftgroupunder:"M400000 262\nH435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219\n 435 219h399565z",leftharpoon:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3\n-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5\n-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7\n-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z",leftharpoonplus:"M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5\n 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3\n-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7\n-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z\nm0 0v40h400000v-40z",leftharpoondown:"M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333\n 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5\n 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667\n-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z",leftharpoondownplus:"M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12\n 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7\n-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0\nv40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z",lefthook:"M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5\n-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3\n-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21\n 71.5 23h399859zM103 281v-40h399897v40z",leftlinesegment:"M40 281 V428 H0 V94 H40 V241 H400000 v40z\nM40 281 V428 H0 V94 H40 V241 H400000 v40z",leftmapsto:"M40 281 V448H0V74H40V241H400000v40z\nM40 281 V448H0V74H40V241H400000v40z",leftToFrom:"M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23\n-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8\nc28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3\n 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z",longequal:"M0 50 h400000 v40H0z m0 194h40000v40H0z\nM0 50 h400000 v40H0z m0 194h40000v40H0z",midbrace:"M200428 334\nc-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14\n-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7\n 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11\n 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z",midbraceunder:"M199572 214\nc100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14\n 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3\n 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0\n-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z",oiintSize1:"M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6\n-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z\nm368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8\n60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z",oiintSize2:"M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8\n-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z\nm502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2\nc0 110 84 276 504 276s502.4-166 502.4-276z",oiiintSize1:"M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6\n-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z\nm525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0\n85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z",oiiintSize2:"M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8\n-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z\nm770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1\nc0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z",rightarrow:"M0 241v40h399891c-47.3 35.3-84 78-110 128\n-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20\n 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7\n 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85\n-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n 151.7 139 205zm0 0v40h399900v-40z",rightbrace:"M400000 542l\n-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5\ns-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1\nc124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z",rightbraceunder:"M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3\n 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237\n-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z",rightgroup:"M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0\n 3-1 3-3v-38c-76-158-257-219-435-219H0z",rightgroupunder:"M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18\n 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z",rightharpoon:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3\n-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2\n-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58\n 69.2 92 94.5zm0 0v40h399900v-40z",rightharpoonplus:"M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11\n-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7\n 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z\nm0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z",rightharpoondown:"M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8\n 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5\n-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95\n-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z",rightharpoondownplus:"M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8\n 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3\n 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3\n-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z\nm0-194v40h400000v-40zm0 0v40h400000v-40z",righthook:"M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3\n 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0\n-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21\n 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z",rightlinesegment:"M399960 241 V94 h40 V428 h-40 V281 H0 v-40z\nM399960 241 V94 h40 V428 h-40 V281 H0 v-40z",rightToFrom:"M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23\n 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32\n-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142\n-167z M100 147v40h399900v-40zM0 341v40h399900v-40z",twoheadleftarrow:"M0 167c68 40\n 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69\n-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3\n-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19\n-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101\n 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z",twoheadrightarrow:"M400000 167\nc-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3\n 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42\n 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333\n-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70\n 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z",widetilde1:"M200 55.538c-77 0-168 73.953-177 73.953-3 0-7\n-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0\n 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0\n 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128\n-68.267.847-113-73.952-191-73.952z",widetilde2:"M344 55.266c-142 0-300.638 81.316-311.5 86.418\n-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9\n 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114\nc1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751\n 181.476 676 181.476c-149 0-189-126.21-332-126.21z",widetilde3:"M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457\n-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0\n 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697\n 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696\n -338 0-409-156.573-744-156.573z",widetilde4:"M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345\n-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409\n 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9\n 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409\n -175.236-744-175.236z",vec:"M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5\n3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11\n10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63\n-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1\n-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59\nH213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359\nc-16-25.333-24-45-24-59z",widehat1:"M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22\nc-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z",widehat2:"M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat3:"M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widehat4:"M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10\n-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z",widecheck1:"M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,\n-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z",widecheck2:"M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck3:"M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",widecheck4:"M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,\n-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z",baraboveleftarrow:"M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202\nc4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5\nc-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130\ns-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47\n121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6\ns2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11\nc0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z\nM100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z",rightarrowabovebar:"M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32\n-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0\n13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39\n-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5\n-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5\n-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67\n151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z",baraboveshortleftharpoon:"M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17\nc2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21\nc-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40\nc-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z\nM0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z",rightharpoonaboveshortbar:"M0,241 l0,40c399126,0,399993,0,399993,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z",shortbaraboveleftharpoon:"M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11\nc1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,\n1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,\n-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z\nM93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z",shortrightharpoonabovebar:"M53,241l0,40c398570,0,399437,0,399437,0\nc4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,\n-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6\nc-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z\nM500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z"};function h(e){let t="",i="";for(const a of e)a&&(/[a-zA-Z*]/.test(a[0])&&(i+=t),t=/\\[a-zA-Z]+\*?$/.test(a)?" ":"",i+=a);return i}function f(e){return h(e.map(e=>{var t;return null!==(t={"":" ","<$$>":"$$","<$>":"$","<{>":"{","<}>":"}"}[e])&&void 0!==t?t:e}))}function g(e,t){const i=[];let a,r=[];return e.forEach(e=>{if("first"!==e.type){let n;"variant"===t?(n=e.variant,e.variantStyle&&"up"!==e.variantStyle&&(n+="-"+e.variantStyle)):n=e[t],n!==a?(r.length>0&&i.push(r),r=[e],a=n):r.push(e)}}),r.length>0&&i.push(r),i}const y={};function b(e,t){y[e]={...t}}const v=["","mord","mbin","mop","mrel","mopen","mclose","mpunct","minner","spacing","first","command","error","placeholder","textord","none"];function x(e){return v.includes(e)}const k={"mord+mop":3,"mord+mbin":4,"mord+mrel":5,"mord+minner":3,"mop+mord":3,"mop+mop":3,"mop+mbin":5,"mop+minner":3,"mbin+mord":4,"mbin+mop":4,"mbin+mopen":4,"mbin+minner":4,"mrel+mord":5,"mrel+mop":5,"mrel+mopen":5,"mrel+minner":5,"mclose+mop":3,"mclose+mbin":4,"mclose+mrel":5,"mclose+minner":3,"mpunct+mord":3,"mpunct+mop":3,"mpunct+mbin":4,"mpunct+mrel":5,"mpunct+mopen":3,"mpunct+mpunct":3,"mpunct+minner":3},_={"mord+mop":3,"mop+mord":3,"mop+mop":3,"mclose+mop":3,"minner+mop":3};function w(t){if("string"==typeof t)return t;if("number"==typeof t)return Number(Math.ceil(100*t)/100).toString();if(void 0===t)return"";if(e(t)){let e="";for(const i of t)e+=w(i);return e}return""}class M{constructor(t,i="",a=""){this.classes=i,e(t)?this.children=[].concat(...t):"string"==typeof t?this.body=t:t&&"object"==typeof t&&(this.children=[t]),this.type=a,this.style=null,this.updateDimensions()}updateDimensions(){let e=0,t=0,i=1;this.children?this.children.forEach(a=>{a.height>e&&(e=a.height),a.depth>t&&(t=a.depth),a.maxFontSize>i&&(i=a.maxFontSize)}):"string"==typeof this.body&&(e=1.2,t=0),this.height=e,this.depth=t,this.maxFontSize=i}selected(e){e&&!/ML__selected/.test(this.classes)&&(this.classes.length>0&&(this.classes+=" "),this.classes+="ML__selected"),!e&&/ML__selected/.test(this.classes)&&(this.classes=this.classes.replace("ML__selected","")),this.children&&this.children.forEach(t=>t.selected(e))}applyStyle(e){if(!e)return;if(e.color&&("none"!==e.color?this.setStyle("color",e.color):this.setStyle("color","")),e.backgroundColor&&("none"!==e.backgroundColor?this.setStyle("background-color",e.backgroundColor):this.setStyle("background-color","")),e.cssClass&&(this.classes+=" "+e.cssClass),!this.body)return;const t=function(e,t){var i;return(null===(i=y[t.mode])||void 0===i?void 0:i.applyStyle)?y[t.mode].applyStyle(e,t):""}(this,e);if(this.body&&t){this.maxFontSize={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49}[e.fontSize]||1,this.height=0,this.depth=0,this.skew=0,this.italic=0;for(let e=0;e0&&(this.style||(this.style={}),this.style[e]=i)}setTop(e){e&&0!==e&&(this.style||(this.style={}),this.style.top=w(e)+"em",this.height-=e,this.depth+=e)}setLeft(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-left"]=w(e)+"em")}setRight(e){e&&0!==e&&(this.style||(this.style={}),this.style["margin-right"]=w(e)+"em")}setWidth(e){e&&0!==e&&(this.style||(this.style={}),this.style.width=w(e)+"em")}toMarkup(e=1,t=1){var i,a,r,n,o;let s="",l=this.body||"";if(this.children){let e="none";for(let r=0;r`${e}="${this.attributes[e]}"`).join(" "));const t=this.classes.split(" ");t.push(null!==(r={command:"ML__command",placeholder:"ML__placeholder",error:"ML__error"}[this.type])&&void 0!==r?r:""),this.caret&&"command"===this.type&&t.push("ML__command-caret");let i="";if(i=t.length>1?t.filter((e,t,i)=>e.length>0&&i.indexOf(e)===t).join(" "):t[0],i.length>0&&(s+=` class="${i}"`),e&&((null===(n=this.style)||void 0===n?void 0:n["margin-left"])?this.style["margin-left"]=w(parseFloat(this.style["margin-left"])+e/18)+"em":(this.style||(this.style={}),this.style["margin-left"]=w(e/18)+"em")),this.style){let e="";const t=/ML__selected/.test(this.classes);for(const i in this.style)Object.prototype.hasOwnProperty.call(this.style,i)&&("background-color"===i&&t||(e+=i+":"+this.style[i]+";"));e.length>0&&(s+=' style="'+e+'"')}s+=">",this.svgBody?s+=function(e){if(p[e]){const t=p[e][2];return``}const[t,i,a,r]=m[e];let n,o;const s=a/1e3;3===t.length?(n=["slice-1-of-3","slice-2-of-3","slice-3-of-3"],o=["xMinYMin","xMidYMin","xMaxYMin"]):2===t.length?(n=["slice-1-of-2","slice-2-of-2"],o=["xMinYMin","xMaxYMin"]):(n=["slice-1-of-1"],o=[r]);const l=t.map((e,t)=>``).join("");return`${l}`}(this.svgBody):this.svgOverlay?(s+='",s+=""):s+=l,s+=""}else s="";return this.caret&&"command"!==this.type&&("text"===this.caret?s+='':s+=''),s}tryCoalesceWith(e){if(this.type!==e.type)return!1;if("error"===this.type||"placeholder"===this.type||"command"===this.type)return!1;if(this.svgBody||!this.body)return!1;if(e.svgBody||!e.body)return!1;const t=this.children&&this.children.length>0,i=e.children&&e.children.length>0;if(t||i)return!1;if((this.style?this.style.length:0)!==(e.style?e.style.length:0))return!1;const a=this.classes.trim().replace(/\s+/g," ").split(" "),r=e.classes.trim().replace(/\s+/g," ").split(" ");if(a.length!==r.length)return!1;a.sort(),r.sort();for(let e=0;e=e.length)return"none";const s=null!==(a=null===(i=e[t-1])||void 0===i?void 0:i.type)&&void 0!==a?a:"none",l=null!==(n=null===(r=e[t+1])||void 0===r?void 0:r.type)&&void 0!==n?n:"none";let c=null!==(o=e[t].type)&&void 0!==o?o:"none";return"first"===c?"none":"textord"===c?"mord":("mbin"===c&&(/first|none|mrel|mpunct|mopen|mbin|mop/.test(s)||/none|mrel|mpunct|mclose/.test(l))&&(c="mord"),c)}function z(t){return t?e(t)?t.reduce((e,t)=>Math.max(e,t.height),0):t.height:0}function L(t){return t?e(t)?t.reduce((e,t)=>Math.max(e,t.depth),0):t.depth:0}function A(t){return t?e(t)?t[t.length-1].italic:t.italic:0}function q(t,i="",a=""){if(e(t)){const e=t.filter(e=>Boolean(e));return 1===e.length?new M(e[0],i,a):new M(e,i,a)}return new M(t,i,a)}function $(e,t,i="",a=""){const r=new M(t,i,a),o=n(t,e);return r.height=o.height,r.depth=o.depth,r.skew=o.skew,r.italic=o.italic,r.setRight(r.italic),r}function C(t,i="",a=""){const r=q("","ML__strut");let n,o;return r.setStyle("height",z(t),"em"),0!==L(t)&&(n=q("","ML__strut--bottom"),n.setStyle("height",z(t)+L(t),"em"),n.setStyle("vertical-align",-L(t),"em")),o=e(t)?[r,n,...t]:[r,n,t],q(o,i,a)}function D(e,t,i,a,r){r=r||"";const n=T(t,(r+=" style-wrap ")+i.adjustTo(a));n.type=e;const o=a.sizeMultiplier/i.sizeMultiplier;return n.height*=o,n.depth*=o,n.maxFontSize=a.sizeMultiplier,n}function T(e,t="",i=""){const a=new M(e,t,i);let r=1;return r=e instanceof M?e.maxFontSize:e.reduce((e,t)=>Math.max(e,t.maxFontSize),r),a.height*=r,a.depth*=r,a}function E(t,i,a="shift",r=0){let n=0,o=0;a=a||"shift";for(let t=0;t0?"em":""),a.attributes={"aria-hidden":"true"}),"size5"!==e.size?new M(a,"fontsize-ensurer reset-"+e.size+" size5"):0!==i?a:null}(t,s),c=[];o=n;for(const e of i)if("number"==typeof e)o+=e;else if(e instanceof M){const t=q([l,e]);t.setTop(-e.depth-o),c.push(t),o+=e.height+e.depth}const d=q(c,"vlist");return d.depth=Math.max(n,L(d)||0),d.height=Math.max(-o,z(d)||0),d}function K(e){const t=new M(null);return t.svgBody=e,t.height=function(e){return m[e]?m[e][2]/1e3:p[e][2]}(e)/2,t.depth=t.height,t}const N={},O={"<":"<",">":">",o:"o","&":"\\&","{":"\\{","}":"\\}","[":"\\lbrack","]":"\\rbrack",":":"\\colon"," ":"~","¬":"\\neg","·":"\\cdot","¼":"\\frac{1}{4}","½":"\\frac{1}{2}","¾":"\\frac{3}{4}","⁰":"^{0}","ⁱ":"^{i}","¹":"^{1}","²":"^{2}","³":"^{3}","†":"\\dagger","‡":"\\ddagger","…":"\\ldots","⁴":"^{4}","⁵":"^{5}","⁶":"^{6}","⁷":"^{7}","⁸":"^{8}","⁹":"^{9}","⁺":"^{+}","⁻":"^{-}","⁼":"^{=}","ⁿ":"^{n}","₀":"_{0}","₁":"_{1}","₂":"_{2}","₃":"_{3}","₄":"_{4}","₅":"_{5}","₆":"_{6}","₇":"_{7}","₈":"_{8}","₉":"_{9}","₊":"_{+}","₋":"_{-}","₌":"_{=}","ₐ":"_{a}","ₑ":"_{e}","ₒ":"_{o}","ₓ":"_{x}","′":"\\prime","'":"\\prime","←":"\\gets","→":"\\to","△":"\\triangle","▽":"\\triangledown","∋":"\\owns","∗":"\\ast","∣":"\\vert","∥":"\\Vert","∧":"\\land","∨":"\\lor","⋅":"\\cdot","⋈":"\\bowtie","≠":"\\ne","≤":"\\le","≥":"\\ge","⊥":"\\bot","⟷":"\\biconditional","⟸":"\\impliedby","⟹":"\\implies","ℂ":"\\C","ℕ":"\\N","ℙ":"\\P","ℚ":"\\Q","ℝ":"\\R","ℤ":"\\Z"},B={},F={},P={iff:"\\;⟺\\;",nicefrac:"^{#1}\\!\\!/\\!_{#2}",bra:"\\mathinner{\\langle{#1}|}",ket:"\\mathinner{|{#1}\\rangle}",braket:"\\mathinner{\\langle{#1}\\rangle}",set:"\\mathinner{\\lbrace #1 \\rbrace}",Bra:"\\left\\langle #1\\right|",Ket:"\\left|#1\\right\\rangle",Braket:"\\left\\langle{#1}\\right\\rangle",Set:"\\left\\lbrace #1 \\right\\rbrace",rd:"\\mathrm{d}",rD:"\\mathrm{D}",doubleStruckCapitalN:"\\mathbb{N}",doubleStruckCapitalR:"\\mathbb{R}",doubleStruckCapitalQ:"\\mathbb{Q}",doubleStruckCapitalZ:"\\mathbb{Z}",doubleStruckCapitalP:"\\mathbb{P}",scriptCapitalE:"\\mathscr{E}",scriptCapitalH:"\\mathscr{H}",scriptCapitalL:"\\mathscr{L}",gothicCapitalC:"\\mathfrak{C}",gothicCapitalH:"\\mathfrak{H}",gothicCapitalI:"\\mathfrak{I}",gothicCapitalR:"\\mathfrak{R}",imaginaryI:"\\mathrm{i}",imaginaryJ:"\\mathrm{j}",exponentialE:"\\mathrm{e}",differentialD:"\\mathrm{d}",capitalDifferentialD:"\\mathrm{D}"},R={"(":")","{":"}","[":"]","|":"|","\\lbrace":"\\rbrace","\\{":"\\}","\\langle":"\\rangle","\\lfloor":"\\rfloor","\\lceil":"\\rceil","\\vert":"\\vert","\\lvert":"\\rvert","\\Vert":"\\Vert","\\lVert":"\\rVert","\\lbrack":"\\rbrack","\\ulcorner":"\\urcorner","\\llcorner":"\\lrcorner","\\lgroup":"\\rgroup","\\lmoustache":"\\rmoustache"},I={"\\#":"#","\\&":"&","\\$":"$","\\%":"%","\\_":"_","\\euro":"€","\\maltese":"✠","\\{":"{","\\}":"}","\\nobreakspace":" ","\\ldots":"…","\\textellipsis":"…","\\backslash":"\\","`":"‘","'":"’","``":"“","''":"”","\\degree":"°","\\textasciicircum":"^","\\textasciitilde":"~","\\textasteriskcentered":"*","\\textbackslash":"\\","\\textbraceleft":"{","\\textbraceright":"}","\\textbullet":"•","\\textdollar":"$","\\textsterling":"£","\\textdagger":"†","\\textdaggerdbl":"‡","–":"–","—":"—","‘":"‘","’":"’","“":"“","”":"”",'"':"”","\\ss":"ß","\\ae":"æ","\\oe":"œ","\\AE":"Æ","\\OE":"Œ","\\O":"Ø","\\i":"ı","\\j":"ȷ","\\aa":"å","\\AA":"Å"},H=/[a-zA-Z0-9!@*()-=+{}[\]\\';:?/.,~<>`|'$%#&^_" ]/,W="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("\\p{Letter}","u"),V="undefined"!=typeof navigator&&/firefox|edge|Trident/i.test(navigator.userAgent)?/[0-9a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp("[0-9\\p{Letter}]","u");function U(e,t,i="mord",a=""){N[e]={type:i,variant:a,value:t},O[t]||a||(O[t]=e),I[e]=t}function j(e,t){for(let i=e;i<=t;i++){const e=String.fromCodePoint(i);U(e,e)}}function G(e,t){return"math"===e?O[t]||t:"text"===e&&Object.keys(I).find(e=>I[e]===t)||t}const X={119893:8462,119965:8492,119968:8496,119969:8497,119971:8459,119972:8464,119975:8466,119976:8499,119981:8475,119994:8495,119996:8458,120004:8500,120070:8493,120075:8460,120076:8465,120085:8476,120093:8488,120122:8450,120127:8461,120133:8469,120135:8473,120136:8474,120137:8477,120145:8484},Z=[{start:119808,len:26,offset:65,style:"bold"},{start:119834,len:26,offset:97,style:"bold"},{start:119860,len:26,offset:65,style:"italic"},{start:119886,len:26,offset:97,style:"italic"},{start:119912,len:26,offset:65,style:"bolditalic"},{start:119938,len:26,offset:97,style:"bolditalic"},{start:119964,len:26,offset:65,variant:"script"},{start:119990,len:26,offset:97,variant:"script"},{start:120016,len:26,offset:65,variant:"script",style:"bold"},{start:120042,len:26,offset:97,variant:"script",style:"bold"},{start:120068,len:26,offset:65,variant:"fraktur"},{start:120094,len:26,offset:97,variant:"fraktur"},{start:120172,len:26,offset:65,variant:"fraktur",style:"bold"},{start:120198,len:26,offset:97,variant:"fraktur",style:"bold"},{start:120120,len:26,offset:65,variant:"double-struck"},{start:120146,len:26,offset:97,variant:"double-struck"},{start:120224,len:26,offset:65,variant:"sans-serif"},{start:120250,len:26,offset:97,variant:"sans-serif"},{start:120276,len:26,offset:65,variant:"sans-serif",style:"bold"},{start:120302,len:26,offset:97,variant:"sans-serif",style:"bold"},{start:120328,len:26,offset:65,variant:"sans-serif",style:"italic"},{start:120354,len:26,offset:97,variant:"sans-serif",style:"italic"},{start:120380,len:26,offset:65,variant:"sans-serif",style:"bolditalic"},{start:120406,len:26,offset:97,variant:"sans-serif",style:"bolditalic"},{start:120432,len:26,offset:65,variant:"monospace"},{start:120458,len:26,offset:97,variant:"monospace"},{start:120488,len:25,offset:913,style:"bold"},{start:120514,len:25,offset:945,style:"bold"},{start:120546,len:25,offset:913,style:"italic"},{start:120572,len:25,offset:945,style:"italic"},{start:120604,len:25,offset:913,style:"bolditalic"},{start:120630,len:25,offset:945,style:"bolditalic"},{start:120662,len:25,offset:913,variant:"sans-serif",style:"bold"},{start:120688,len:25,offset:945,variant:"sans-serif",style:"bold"},{start:120720,len:25,offset:913,variant:"sans-serif",style:"bolditalic"},{start:120746,len:25,offset:945,variant:"sans-serif",style:"bolditalic"},{start:120782,len:10,offset:48,variant:"",style:"bold"},{start:120792,len:10,offset:48,variant:"double-struck"},{start:120803,len:10,offset:48,variant:"sans-serif"},{start:120812,len:10,offset:48,variant:"sans-serif",style:"bold"},{start:120822,len:10,offset:48,variant:"monospace"}];function Y(e,t,i){if(!/[A-Za-z0-9]/.test(e))return e;if(!t&&!i)return e;const a=e.codePointAt(0);for(let e=0;e=Z[e].offset&&a120831)&&(e<8448||e>8527))return{char:String.fromCodePoint(e)};for(const i in X)if(Object.prototype.hasOwnProperty.call(X,i)&&X[i]===e){e=null!==(t=i.codePointAt(0))&&void 0!==t?t:0;break}for(let t=0;t=Z[t].start&&e=1;)a.params.push({isOptional:!1,type:"math"}),r-=1}}}else"math"===t?a=N[e]:I[e]&&(a={value:I[e]});return!a||"mord"!==a.type||"f"!==a.value&&"g"!==a.value&&"h"!==a.value||(a.isFunction=!0),a}function re(e){if(e.length<=1)return[];const t=[];for(const i in B)Object.prototype.hasOwnProperty.call(B,i)&&i.startsWith(e)&&!B[i].infix&&t.push({match:i,frequency:B[i].frequency});for(const i in N)Object.prototype.hasOwnProperty.call(N,i)&&i.startsWith(e)&&t.push({match:i,frequency:N[i].frequency});return t.sort((e,t)=>e.frequency===t.frequency?e.match.length-t.match.length:(t.frequency||0)-(e.frequency||0)),t}function ne(e){let t="auto";const i=e.match(/:([^=]+)/);return i&&(t=i[1].trim()),t}function oe(e){if(!e)return[];let t=[],i=e.split("]");if("["===i[0].charAt(0)){t.push({isOptional:!0,type:ne(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(oe(i[e]))}else if(i=e.split("}"),"{"===i[0].charAt(0)){t.push({isOptional:!1,type:ne(i[0].slice(1))});for(let e=1;e<=i.length;e++)t=t.concat(oe(i[e]))}return t}function se(e){let t="",i=!0;return e.forEach(e=>{"string"==typeof e.body?t+=e.body:i=!1}),i?t:""}function le(e,t,i,a=!1){"string"==typeof e&&(e=[e]);const r={tabular:a,params:oe(t),parser:i};for(const t of e)F[t]=r}function ce(e,t,i){le(e,t,i,!0)}function de(e,t,i,a,r){"string"==typeof e&&(e=[e]),i||(i={});const n={params:oe(t),mode:i.mode,infix:Boolean(i.infix),parse:a,emit:r};e.forEach(e=>{B["\\"+e]=n})}const me={acute:"ˊ",grave:"ˋ",dot:"˙",ddot:"¨",mathring:"˚",tilde:"~",bar:"ˉ",breve:"˘",check:"ˇ",hat:"^",vec:"⃗"};de(Object.keys(me),"{body:auto}",null,(function(e,t){return{type:"accent",accent:me[e.slice(1)],limits:"accent",skipBoundary:!0,body:t[0]}})),de(["widehat","widecheck","widetilde"],"{body:auto}",null,(e,t)=>{const i=se(t[0]);return{type:"accent",svgAccent:e.slice(1)+(i.length>5?"4":["1","1","2","2","3","3"][i.length]),limits:"accent",skipBoundary:!0,body:t[0]}}),de("utilde","{body:auto}",null,(e,t)=>{const i=se(t[0]),a="widetilde"+(i.length>5?"4":["1","1","2","2","3","3"][i.length]);return{type:"overunder",body:t[0],svgBelow:a,skipBoundary:!0}},(e,t,i,a)=>`\\utilde{${a(i,i.body)}}`),de("^","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"â",e:"ê",i:"î",o:"ô",u:"û",A:"Â",E:"Ê",I:"Î",O:"Ô",U:"Û"}[t[0]]||"^"})),de("`","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"à",e:"è",i:"ì",o:"ò",u:"ù",A:"À",E:"È",I:"Ì",O:"Ò",U:"Ù"}[t[0]]||"`"})),de("'","{:string}",{},(function(e,t){return{type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{a:"á",e:"é",i:"í",o:"ó",u:"ú",A:"Á",E:"É",I:"Í",O:"Ó",U:"Ú"}[t[0]]||"^"}})),de("~","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{n:"ñ",N:"Ñ",a:"ã",o:"õ",A:"Ã",O:"Õ"}[t[0]]||"´"})),de("c","{:string}",{},(e,t)=>({type:"mord",limits:"nolimits",isSymbol:!0,isFunction:!1,body:t[0]&&{c:"ç",C:"Ç"}[t[0]]||""})),de("enclose","{notation:string}[style:string]{body:auto}",null,(e,t)=>{const i={type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",backgroundcolor:"transparent",padding:"auto",shadow:"auto",captureSelection:!0,body:t[2]};if(t[1]){const e=t[1].split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/);for(const t of e){const e=t.match(/\s*(\S+)\s+(\S+)\s+(.*)/);if(e)i.strokeWidth=s(e[1],"px"),isFinite(i.strokeWidth)||(i.strokeWidth=1),i.strokeStyle=e[2],i.strokeColor=e[3];else{const e=t.match(/\s*([a-z]*)\s*=\s*"(.*)"/);e&&("mathbackground"===e[1]?i.backgroundcolor=e[2]:"mathcolor"===e[1]?i.strokeColor=e[2]:"padding"===e[1]?i.padding=s(e[2],"px"):"shadow"===e[1]&&(i.shadow=e[2]))}}"dashed"===i.strokeStyle?i.svgStrokeStyle="5,5":"dotted"===i.strokeStyle&&(i.svgStrokeStyle="1,5")}return i.borderStyle=i.strokeWidth+"px "+i.strokeStyle+" "+i.strokeColor,i.notation={},t[0].split(/[, ]/).filter(e=>e.length>0).forEach(e=>{i.notation[e.toLowerCase()]=!0}),i.notation.updiagonalarrow&&(i.notation.updiagonalstrike=!1),i.notation.box&&(i.notation.left=!1,i.notation.right=!1,i.notation.bottom=!1,i.notation.top=!1),i}),de("cancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0},body:t[0]}})),de("bcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{downdiagonalstrike:!0},body:t[0]}})),de("xcancel","{body:auto}",null,(function(e,t){return{type:"enclose",strokeColor:"currentColor",strokeWidth:1,strokeStyle:"solid",borderStyle:"1px solid currentColor",backgroundcolor:"transparent",padding:"auto",shadow:"auto",notation:{updiagonalstrike:!0,downdiagonalstrike:!0},body:t[0]}})),le("math","",()=>({mathstyle:"textstyle"})),le("displaymath","",(function(){return{mathstyle:"displaystyle"}})),ce("array","{columns:colspec}",(e,t)=>({colFormat:t[0],mathstyle:"textstyle"})),ce(["equation","equation","subequations"],"",()=>({colFormat:[{align:"c"}]})),ce("multline","",(function(){return{colFormat:[{align:"m"}]}})),ce(["align","align*","aligned","eqnarray"],"",(e,t,i)=>{let a=0;for(const e of i)a=Math.max(a,e.length);const r=[{gap:0},{align:"r"},{gap:0},{align:"l"}];let n=2;for(;n({colFormat:[{align:"r"},{align:"l"}]})),ce(["gather","gathered"],"",()=>({colFormat:[{gap:.25},{align:"c"},{gap:0}],jot:.3})),ce(["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","smallmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*","smallmatrix*"],"[columns:colspec]",(e,t)=>{var i;const a={mathstyle:"textstyle"};switch(e){case"pmatrix":case"pmatrix*":a.leftDelim="(",a.rightDelim=")";break;case"bmatrix":case"bmatrix*":a.leftDelim="[",a.rightDelim="]";break;case"Bmatrix":case"Bmatrix*":a.leftDelim="\\lbrace",a.rightDelim="\\rbrace";break;case"vmatrix":case"vmatrix*":a.leftDelim="\\vert",a.rightDelim="\\vert";break;case"Vmatrix":case"Vmatrix*":a.leftDelim="\\Vert",a.rightDelim="\\Vert";break;case"smallmatrix":case"smallmatrix*":a.mathstyle="scriptstyle";break;case"matrix":case"matrix*":a.leftDelim=".",a.rightDelim="."}return a.colFormat=null!==(i=t[0])&&void 0!==i?i:[{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"},{align:"c"}],a}),ce("cases","",()=>({arraystretch:1.2,leftDelim:"\\lbrace",rightDelim:".",colFormat:[{align:"l"},{gap:1},{align:"l"}]})),le("center","",(function(){return{colFormat:[{align:"c"}]}})),de(["overrightarrow","overleftarrow","Overrightarrow","overleftharpoon","overrightharpoon","overleftrightarrow","overbrace","overlinesegment","overgroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgAbove:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),de(["underrightarrow","underleftarrow","underleftrightarrow","underbrace","underlinesegment","undergroup"],"{:auto}",null,(e,t)=>({type:"overunder",body:t[0],svgBelow:e.slice(1),skipBoundary:!0,limits:"overunder"}),(e,t,i,a)=>`${e}{${a(i,i.body)}}`),de(["xrightarrow","xleftarrow","xRightarrow","xLeftarrow","xleftharpoonup","xleftharpoondown","xrightharpoonup","xrightharpoondown","xlongequal","xtwoheadleftarrow","xtwoheadrightarrow","xleftrightarrow","xLeftrightarrow","xrightleftharpoons","xleftrightharpoons","xhookleftarrow","xhookrightarrow","xmapsto","xtofrom","xrightleftarrows","xrightequilibrium","xleftequilibrium"],"[:auto]{:auto}",null,(e,t)=>{let i=t[1];return 0===(null==i?void 0:i.length)&&(i=null),{type:"overunder",mathtype:"mrel",svgBody:e.slice(1),overscript:i,underscript:t[0],skipBoundary:!0}},(e,t,i,a)=>e+(void 0!==i.underscript?`[${a(i,i.underscript)}]`:"")+`{${a(i,i.overscript)}}`),de(["arccos","arcsin","arctan","arctg","arcctg","arg","ch","cos","cosh","cot","coth","ctg","cth","cotg","csc","cosec","deg","dim","exp","hom","inf","ker","lg","lb","lg","ln","log","Pr","sec","sh","sin","sinh","sup","tan","tanh","tg","th"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main",variantStyle:"up"}})),de(["liminf","limsup"],"",null,e=>({type:"mop",limits:"limits",isSymbol:!1,body:{"\\liminf":"lim inf","\\limsup":"lim sup"}[e],variant:"main"})),de(["lim","mod"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,body:e.slice(1),variant:"main"}})),de(["det","max","min"],"",null,(function(e){return{type:"mop",limits:"limits",isSymbol:!1,isFunction:!0,body:e.slice(1),variant:"main"}})),de("sqrt","[index:auto]{radicand:auto}",null,(e,t)=>({type:"surd",body:t[1],index:t[0]}),(e,t,i,a)=>{let r="";return void 0!==i.index&&(r+=`[${a(i,i.index)}]`),r+=`{${a(i,i.body)}}`,e+r}),de(["frac","dfrac","tfrac","cfrac","binom","dbinom","tbinom"],"{numerator}{denominator}",null,(e,t)=>{const i={type:"genfrac",numer:t[0],denom:t[1],mathstyle:"auto"};switch(e){case"\\dfrac":case"\\frac":case"\\tfrac":case"\\cfrac":i.hasBarLine=!0;break;case"\\\\atopfrac":i.hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":i.hasBarLine=!1,i.leftDelim="(",i.rightDelim=")"}switch(e){case"\\dfrac":case"\\dbinom":i.mathstyle="displaystyle";break;case"\\tfrac":case"\\tbinom":i.mathstyle="textstyle"}return"\\cfrac"===e&&(i.continuousFraction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),de(["over","atop","choose"],"",{infix:!0},(e,t)=>{const i=t[0],a=t[1];let r=!1,n=null,o=null;switch(e){case"\\atop":break;case"\\over":r=!0;break;case"\\choose":r=!1,n="(",o=")";break;default:throw new Error("Unrecognized genfrac command")}return{type:"genfrac",numer:i,denom:a,hasBarLine:r,leftDelim:n,rightDelim:o,mathstyle:"auto"}},(e,t,i,a)=>`{${a(i,i.numer)}${e} ${a(i,i.denom)}}`),de("pdiff","{numerator}{denominator}",null,(e,t)=>({type:"genfrac",numer:t[0],denom:t[1],numerPrefix:"∂",denomPrefix:"∂",hasBarLine:!0,leftDelim:null,rightDelim:null,mathstyle:"auto"}),(e,t,i,a)=>`${e}{${a(i,i.numer)}}{${a(i,i.denom)}}`),de(["sum","prod","bigcup","bigcap","coprod","bigvee","bigwedge","biguplus","bigotimes","bigoplus","bigodot","bigsqcup","smallint","intop"],"",null,e=>({type:"mop",limits:"auto",isSymbol:!0,variant:"main",body:{coprod:"∐",bigvee:"⋁",bigwedge:"⋀",biguplus:"⨄",bigcap:"⋂",bigcup:"⋃",intop:"∫",prod:"∏",sum:"∑",bigotimes:"⨂",bigoplus:"⨁",bigodot:"⨀",bigsqcup:"⨆",smallint:"∫"}[e.slice(1)]}));const pe={int:"∫",iint:"∬",iiint:"∭",oint:"∮",oiint:"∯",oiiint:"∰",intclockwise:"∱",varointclockwise:"∲",ointctrclockwise:"∳",intctrclockwise:"⨑",sqcup:"⊔",sqcap:"⊓",uplus:"⊎",wr:"≀",amalg:"⨿",Cap:"⋒",Cup:"⋓",doublecap:"⋒",doublecup:"⋓"};de(Object.keys(pe),"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!0,body:pe[e.slice(1)],variant:{"⋒":"ams","⋓":"ams"}[pe[e.slice(1)]]}})),de(["Re","Im"],"",null,(function(e){return{type:"mop",limits:"nolimits",isSymbol:!1,isFunction:!0,body:{"\\Re":"ℜ","\\Im":"ℑ"}[e],variant:"fraktur"}})),de("middle","{:delim}",null,(function(e,t){return{type:"delim",delim:t[0]}}));const ue={m0:"#3f3d99",m1:"#993d71",m2:"#998b3d",m3:"#3d9956",m4:"#3d5a99",m5:"#993d90",m6:"#996d3d",m7:"#43993d",m8:"#3d7999",m9:"#843d99"},he=["#d35d60","#7293cb","#e1974d","#84bb5d","#9066a7","#aD6a58","#f5a4ce","#fff590","#212121","#818787","#d4d5d2","#ffffff"],fe=["#cc2428","#3769b1","#da7e30","#409852","#6b4c9a","#922426","#e7298a","#ffe907","#000000","#525055","#adafaa","#ffffff"],ge={apricot:"#FBB982",aquamarine:"#00B5BE",bittersweet:"#C04F17",black:"#221E1F",blue:"#2D2F92",bluegreen:"#00B3B8",blueviolet:"#473992",brickred:"#B6321C",brown:"#792500",burntorange:"#F7921D",cadetblue:"#74729A",carnationpink:"#F282B4",cerulean:"#00A2E3",cornflowerblue:"#41B0E4",cyan:"#00AEEF",dandelion:"#FDBC42",darkorchid:"#A4538A",emerald:"#00A99D",forestgreen:"#009B55",fuchsia:"#8C368C",goldenrod:"#FFDF42",gray:"#949698",green:"#00A64F",greenyellow:"#DFE674",junglegreen:"#00A99A",lavender:"#F49EC4",limegreen:"#8DC73E",magenta:"#EC008C",mahogany:"#A9341F",maroon:"#AF3235",melon:"#F89E7B",midnightblue:"#006795",mulberry:"#A93C93",navyblue:"#006EB8",olivegreen:"#3C8031",orange:"#F58137",orangered:"#ED135A",orchid:"#AF72B0",peach:"#F7965A",periwinkle:"#7977B8",pinegreen:"#008B72",plum:"#92268F",processblue:"#00B0F0",purple:"#99479B",rawsienna:"#974006",red:"#ED1B23",redorange:"#F26035",redviolet:"#A1246B",rhodamine:"#EF559F",royalblue:"#0071BC",royalpurple:"#613F99",rubinered:"#ED017D",salmon:"#F69289",seagreen:"#3FBC9D",sepia:"#671800",skyblue:"#46C5DD",springgreen:"#C6DC67",tan:"#DA9D76",tealblue:"#00AEB3",thistle:"#D883B7",turquoise:"#00B4CE",violet:"#58429B",violetred:"#EF58A0",white:"#FFFFFF",wildstrawberry:"#EE2967",yellow:"#FFF200",yellowgreen:"#98CC70",yelloworange:"#FAA21A"};function ye(e){var t;const i=e.toLowerCase().split("!");let a,r,n,o=255,s=255,l=255,c=-1;const d=i.length>0&&"-"===i[0].charAt(0);d&&(i[0]=i[0].slice(1));for(let e=0;e=0&&(o=(1-c)*o+c*a,s=(1-c)*s+c*r,l=(1-c)*l+c*n,c=-1),e+1=0&&(o=c*o+(1-c)*a,s=c*s+(1-c)*r,l=c*l+(1-c)*n),d&&(o=255-o,s=255-s,l=255-l),"#"+("00"+Math.round(o).toString(16)).slice(-2)+("00"+Math.round(s).toString(16)).slice(-2)+("00"+Math.round(l).toString(16)).slice(-2)}function be(e){let t=e.toUpperCase();for(const e in ge)if(ge[e]===t){t=e;break}for(const e in ue)if(ue[e]===t){t=e;break}return t}de("ensuremath","{:math}",{},(e,t)=>({type:"group",mode:"math",body:t[0],skipBoundary:!0,latexOpen:"\\ensuremath{",latexClose:"}"}),(e,t,i,a)=>a(i,i.body)),de("color","{:color}",{},(e,t)=>({color:t[0]})),de("textcolor","{:color}{content:auto*}",{},(e,t)=>({color:t[0]})),de("boxed","{content:math}",null,(e,t)=>({type:"box",framecolor:"black",skipBoundary:!0,body:t[0]})),de("colorbox","{background-color:string}{content:auto}",{},(e,t)=>({type:"box",backgroundcolor:ye(t[0]),skipBoundary:!0,body:t[1],verbatimBackgroundcolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimBackgroundcolor||be(i.backgroundcolor)}}{${a(i,i.body)}}`),de("fcolorbox","{frame-color:string}{background-color:string}{content:auto}",{},(e,t)=>({type:"box",framecolor:ye(t[0]),backgroundcolor:ye(t[1]),skipBoundary:!0,body:t[2],verbatimBackgroundcolor:t[1],verbatimFramecolor:t[0]}),(e,t,i,a)=>`${e}{${i.verbatimFramecolor||be(i.framecolor)}{${i.verbatimBackgroundcolor||be(i.backgroundcolor)}}{${a(i,i.body)}}`),de("bbox","[:bbox]{body:auto}",{},(e,t)=>{if(t[0]){const e=t[0];return{type:"box",padding:e.padding,border:e.border,backgroundcolor:e.backgroundcolor,skipBoundary:!0,body:t[1]}}return{type:"box",skipBoundary:!0,body:t[1]}},(e,t,i,a)=>{let r=e;if(isFinite(i.padding)||void 0!==i.border||void 0!==i.backgroundcolor){const e=[];isFinite(i.padding)&&e.push(Math.floor(100*i.padding)/100+"em"),i.border&&e.push("border:"+i.border),i.backgroundcolor&&e.push(be(i.backgroundcolor)),r+=`[${e.join(",")}]`}return r+`{${a(i,i.body)}}`}),de(["displaystyle","textstyle","scriptstyle","scriptscriptstyle"],"",{},(e,t)=>({mathstyle:e.slice(1)})),de(["tiny","scriptsize","footnotesize","small","normalsize","large","Large","LARGE","huge","Huge"],"",{mode:"text"},(e,t)=>({fontSize:{tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[e.slice(1)]})),de("fontseries","{:string}",{mode:"text"},(e,t)=>({fontSeries:t[0]})),de("fontshape","{:string}",{mode:"text"},(e,t)=>({fontShape:t[0]})),de("fontfamily","{:string}",{mode:"text"},(e,t)=>({fontFamily:t[0]})),de("selectfont","",{mode:"text"},(e,t)=>({})),de("bf","",{},(e,t)=>({fontSeries:"b",fontShape:"n",fontFamily:"cmr"})),de(["boldsymbol","bm"],"{:math*}",{},(e,t)=>({mode:"math",cssClass:"ML__boldsymbol"})),de("bold","{:math*}",{},(e,t)=>({mode:"math",variantStyle:"bold"})),de("bfseries","",{mode:"text"},(e,t)=>({fontSeries:"b"})),de("mdseries","",{mode:"text"},(e,t)=>({fontSeries:"m"})),de("upshape","",{mode:"text"},(e,t)=>({fontShape:"n"})),de("slshape","",{mode:"text"},(e,t)=>({fontShape:"sl"})),de("scshape","",{mode:"text"},(e,t)=>({fontShape:"sc"})),de("textbf","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"b"})),de("textmd","{:text*}",{},(e,t)=>({mode:"text",fontSeries:"m"})),de("textup","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n"})),de("textnormal","{:text*}",{},(e,t)=>({mode:"text",fontShape:"n",fontSeries:"m"})),de("textsl","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sl"})),de("textit","{:text*}",{},(e,t)=>({mode:"text",fontShape:"it"})),de("textsc","{:text*}",{},(e,t)=>({mode:"text",fontShape:"sc"})),de("textrm","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"roman"})),de("textsf","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"sans-serif"})),de("texttt","{:text*}",{},(e,t)=>({mode:"text",fontFamily:"monospace"})),de("mathbf","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bold"})),de("mathit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"italic"})),de("mathbfit","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"bolditalic"})),de("mathrm","{:math*}",{},(e,t)=>({mode:"math",variant:"normal",variantStyle:"up"})),de("mathsf","{:math*}",{},(e,t)=>({mode:"math",variant:"sans-serif",variantStyle:"up"})),de("mathtt","{:math*}",{},(e,t)=>({mode:"math",variant:"monospace",variantStyle:"up"})),de("it","",{},(e,t)=>({fontSeries:"m",fontShape:"it",fontFamily:"cmr",variantStyle:"italic"})),de("rmfamily","",{},(e,t)=>({fontFamily:"roman"})),de("sffamily","",{},(e,t)=>({fontFamily:"sans-serif"})),de("ttfamily","",{},(e,t)=>({fontFamily:"monospace"})),de(["Bbb","mathbb"],"{:math*}",{},(e,t)=>({variant:"double-struck",variantStyle:"up"})),de(["frak","mathfrak"],"{:math*}",{},(e,t)=>({variant:"fraktur",variantStyle:"up"})),de("mathcal","{:math*}",{},(e,t)=>({variant:"calligraphic",variantStyle:"up"})),de("mathscr","{:math*}",{},(e,t)=>({variant:"script",variantStyle:"up"})),de("mbox","{:text}",null,(e,t)=>({type:"group",mode:"math",body:t[0]})),de("text","{:text*}",null,(e,t)=>({mode:"text"})),de("class","{name:string}{content:auto*}",null,(e,t)=>({cssClass:t[0]})),de("cssId","{id:string}{content:auto}",null,(e,t)=>({type:"group",body:t[1],cssId:t[0]})),de("em","",null,(e,t)=>({cssClass:"ML__emph"})),de("emph","{:auto}",null,(e,t)=>({cssClass:"ML__emph",body:t[0],type:"group",skipBoundary:!0}));const ve={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}};function xe(e,t,i,a,r,n=""){const o=D(e,$("Size"+i+"-Regular",ee("math",t),"delimsizing size"+i),r.mathstyle,c.textstyle,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}function ke(e,t){let i="";return"Size1-Regular"===t?i=" delim-size1":"Size4-Regular"===t&&(i=" delim-size4"),$(t,ee("math",e),"delimsizinginner"+i)}function _e(e,t,i,a,r,o=""){let s,l,d,m;s=d=m=ee("math",t),l=null;let p="Size1-Regular";"\\vert"===t||"\\lvert"===t||"\\rvert"===t||"\\mvert"===t||"\\mid"===t?d=s=m="∣":"\\Vert"===t||"\\lVert"===t||"\\rVert"===t||"\\mVert"===t||"\\|"===t?d=s=m="∥":"\\uparrow"===t?d=m="⏐":"\\Uparrow"===t?d=m="‖":"\\downarrow"===t?s=d="⏐":"\\Downarrow"===t?s=d="‖":"\\updownarrow"===t?(s="↑",d="⏐",m="↓"):"\\Updownarrow"===t?(s="⇑",d="‖",m="⇓"):"["===t||"\\lbrack"===t?(s="⎡",d="⎢",m="⎣",p="Size4-Regular"):"]"===t||"\\rbrack"===t?(s="⎤",d="⎥",m="⎦",p="Size4-Regular"):"\\lfloor"===t?(d=s="⎢",m="⎣",p="Size4-Regular"):"\\lceil"===t?(s="⎡",d=m="⎢",p="Size4-Regular"):"\\rfloor"===t?(d=s="⎥",m="⎦",p="Size4-Regular"):"\\rceil"===t?(s="⎤",d=m="⎥",p="Size4-Regular"):"("===t?(s="⎛",d="⎜",m="⎝",p="Size4-Regular"):")"===t?(s="⎞",d="⎟",m="⎠",p="Size4-Regular"):"\\{"===t||"\\lbrace"===t?(s="⎧",l="⎨",m="⎩",d="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(s="⎫",l="⎬",m="⎭",d="⎪",p="Size4-Regular"):"\\lgroup"===t?(s="⎧",m="⎩",d="⎪",p="Size4-Regular"):"\\rgroup"===t?(s="⎫",m="⎭",d="⎪",p="Size4-Regular"):"\\lmoustache"===t?(s="⎧",m="⎭",d="⎪",p="Size4-Regular"):"\\rmoustache"===t?(s="⎫",m="⎩",d="⎪",p="Size4-Regular"):"\\surd"===t?(s="",m="⎷",d="",p="Size4-Regular"):"\\ulcorner"===t?(s="┌",d=m=" "):"\\urcorner"===t?(s="┐",d=m=" "):"\\llcorner"===t?(m="└",d=s=" "):"\\lrcorner"===t&&(s="┘",d=s=" ");const u=n(ee("math",s),p),h=u.height+u.depth,f=n(ee("math",d),p),g=f.height+f.depth,y=n(ee("math",m),p),b=y.height+y.depth;let v=0,x=1;if(null!==l){const e=n(ee("math",l),p);v=e.height+e.depth,x=2}const k=h+b+v,_=Math.ceil((i-k)/(x*g)),w=k+_*x*g;let M=r.mathstyle.metrics.axisHeight;a&&(M*=r.mathstyle.sizeMultiplier);const S=w/2-M,z=[];if(z.push(ke(m,p)),null===l)for(let e=0;e<_;e++)z.push(ke(d,p));else{for(let e=0;e<_;e++)z.push(ke(d,p));z.push(ke(l,p));for(let e=0;e<_;e++)z.push(ke(d,p))}z.push(ke(s,p));const L=E(r,z,"bottom",S);return L.setStyle("color",r.color),"number"==typeof r.opacity&&L.setStyle("opacity",r.opacity),D(e,q(L,"delimsizing mult"),r.mathstyle,c.textstyle,o)}de(["bigl","Bigl","biggl","Biggl","bigr","Bigr","biggr","Biggr","bigm","Bigm","biggm","Biggm","big","Big","bigg","Bigg"],"{:delim}",null,(function(e,t){return{type:"sizeddelim",size:ve[e].size,cls:ve[e].mclass,delim:t[0]}})),de(["hspace","hspace*"],"{width:skip}",{},(function(e,t){return{type:"spacing",width:t[0]||0}})),de(["mathop","mathbin","mathrel","mathopen","mathclose","mathpunct","mathord","mathinner"],"{:auto}",null,(e,t)=>{const i={type:{"\\mathop":"mop","\\mathbin":"mbin","\\mathrel":"mrel","\\mathopen":"mopen","\\mathclose":"mclose","\\mathpunct":"mpunct","\\mathord":"mord","\\mathinner":"minner"}[e],body:t[0],captureSelection:!0};return"\\mathop"===e&&(i.limits="limits",i.isFunction=!0),i},(e,t,i,a)=>`${e}{${a(i,i.body)}}`),de(["operatorname","operatorname*"],"{operator:math}",null,(function(e,t){const i={type:"mop",captureSelection:!0,body:t[0],isFunction:!0};return i.body.forEach(e=>{e.isFunction=!1,e.variant||e.variantStyle||(e.variant="main",e.variantStyle="up"),e.type="mord",e.body={"∗":"*","−":"-"}[e.body]||e.body}),"\\operatorname"===e?i.limits="nolimits":"\\operatorname*"===e&&(i.limits="limits"),i})),de("unicode","{charcode:number}",null,(e,t)=>{let i=parseInt(t[0]);return isFinite(i)||(i=10067),{type:"mord",body:String.fromCodePoint(i),codepoint:i}},(e,t,i,a)=>`${e}{"${("000000"+i.codepoint.toString(16)).toUpperCase().substr(-6)}}`),de("rule","[raise:dimen]{width:dimen}{thickness:dimen}",null,(function(e,t){return{type:"rule",shift:t[0],width:t[1],height:t[2]}})),de("overline","{:auto}",null,(e,t)=>({type:"line",position:"overline",skipBoundary:!0,body:t[0]})),de("underline","{:auto}",null,(e,t)=>({type:"line",position:"underline",skipBoundary:!0,body:t[0]})),de("overset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),de("underset","{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",underscript:t[0],skipBoundary:!0,body:t[1]}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),de(["overwithdelims","atopwithdelims"],"{numer:auto}{denom:auto}{left-delim:delim}{right-delim:delim}",{infix:!0},(function(e,t){return{type:"genfrac",numer:t[0],denom:t[1],hasBarLine:!1,leftDelim:t[2],rightDelim:t[3],mathstyle:"auto"}}),(e,t,i,a)=>`${a(i,i.numer)} ${e}${i.leftDelim}${i.rightDelim}${a(i,i.denom)}`),de(["stackrel","stackbin"],"{annotation:auto}{symbol:auto}",null,(function(e,t){return{type:"overunder",overscript:t[0],skipBoundary:!0,body:t[1],mathtype:"\\stackrel"===e?"mrel":"mbin"}}),(e,t,i,a)=>`${e}{${a(i,i.overscript)}}{${a(i,i.body)}}`),de(["phantom","vphantom","hphantom"],"{:auto*}",{},(e,t)=>({type:"phantom",captureSelection:!0,phantomType:e.slice(1),isPhantom:!0}),(e,t,i,a)=>e+"{"+a(i,i.body)+"}"),de("smash","[:string]{:auto}",null,(function(e,t){let i="smash";return"b"===t[0]?i="bsmash":"t"===t[0]&&(i="tsmash"),{type:"phantom",phantomType:i,skipBoundary:!0,body:t[1]}})),de("rlap","{:auto}",null,(function(e,t){return{type:"overlap",align:"right",skipBoundary:!0,body:t[0]}})),de("llap","{:auto}",null,(function(e,t){return{type:"overlap",align:"left",skipBoundary:!0,body:t[0]}})),de("mathrlap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"right",skipBoundary:!0,body:t[0]}})),de("mathllap","{:auto}",null,(function(e,t){return{type:"overlap",mode:"math",align:"left",skipBoundary:!0,body:t[0]}})),function(e){for(let e=0;e<"0123456789/@.?!".length;e++){const t="0123456789/@.?!".charAt(e);U(t,t)}}(),j(65,90),j(97,122),U("\\forall","∀"),U("\\exists","∃"),U("\\nexists","∄","mord","ams"),U("\\mid","∣","mrel"),U("\\top","⊤"),U("\\bot","⊥"),U("\\sharp","♯"),U("\\flat","♭"),U("\\natural","♮"),U("\\#","#"),U("\\&","&"),U("\\clubsuit","♣"),U("\\heartsuit","♡"),U("\\spadesuit","♠"),U("\\diamondsuit","♢"),U("\\differencedelta","∆","mrel"),U("\\backslash","\\"),U("\\nabla","∇"),U("\\partial","∂"),U("\\ell","ℓ"),U("\\hbar","ℏ"),U("\\hslash","ℏ","mord","ams"),U("\\Finv","Ⅎ","mord","ams"),U("\\Game","⅁","mord","ams"),U("\\wp","℘"),U("\\eth","ð","mord","ams"),U("\\mho","℧","mord","ams"),U("\\Bbbk","k","mord","ams"),U("\\N","N","mord","double-struck"),U("\\R","R","mord","double-struck"),U("\\Q","Q","mord","double-struck"),U("\\C","C","mord","double-struck"),U("\\Z","Z","mord","double-struck"),U("\\P","P","mord","double-struck"),U("\\pounds","£"),U("\\yen","¥","mord","ams"),U("\\euro","€"),U("\\dagger","†","mbin"),U("\\dag","†","mbin"),U("\\ddag","‡","mbin"),U("\\ddagger","‡","mbin"),U("\\maltese","✠","mord","ams"),U("\\rightarrow","→","mrel"),U("\\to","→","mrel"),U("\\leftarrow","←","mrel"),U("\\gets","←","mrel"),U("\\Rightarrow","⇒","mrel"),U("\\Leftarrow","⇐","mrel"),U("\\longrightarrow","⟶","mrel"),U("\\longleftarrow","⟵","mrel"),U("\\Longrightarrow","⟹","mrel"),U("\\implies","⟹","mrel"),U("\\Longleftarrow","⟸","mrel"),U("\\impliedby","⟸","mrel"),U("\\dashrightarrow","⇢","mrel","ams"),U("\\dashleftarrow","⇠","mrel","ams"),U("\\Rrightarrow","⇛","mrel","ams"),U("\\Lleftarrow","⇚","mrel","ams"),U("\\longleftrightarrow","⟷","mrel"),U("\\biconditional","⟷","mrel"),U("\\Longleftrightarrow","⟺","mrel"),U("\\leftrightarrows","⇆","mrel","ams"),U("\\rightleftarrows","⇄","mrel","ams"),U("\\mapsto","↦","mrel"),U("\\longmapsto","⟼","mrel"),U("\\uparrow","↑","mrel"),U("\\downarrow","↓","mrel"),U("\\Uparrow","⇑","mrel"),U("\\Downarrow","⇓","mrel"),U("\\updownarrow","↕","mrel"),U("\\Updownarrow","⇕","mrel"),U("\\curvearrowright","↷","mrel","ams"),U("\\curvearrowleft","↶","mrel","ams"),U("\\hookrightarrow","↪","mrel"),U("\\hookleftarrow","↩","mrel"),U("\\rightharpoonup","⇀","mrel"),U("\\leftharpoonup","↼","mrel"),U("\\rightharpoondown","⇁","mrel"),U("\\leftharpoondown","↽","mrel"),U("\\rightrightarrows","⇉","mrel","ams"),U("\\leftleftarrows","⇇","mrel","ams"),U("\\upuparrows","⇈","mrel","ams"),U("\\downdownarrows","⇊","mrel","ams"),U("\\leftarrowtail","↢","mrel","ams"),U("\\rightarrowtail","↣","mrel","ams"),U("\\looparrowright","↬","mrel","ams"),U("\\looparrowleft","↫","mrel","ams"),U("\\twoheadleftarrow","↞","mrel","ams"),U("\\twoheadrightarrow","↠","mrel","ams"),U("\\rightleftharpoons","⇌","mrel"),U("\\leftrightharpoons","⇋","mrel","ams"),U("\\Rsh","↱","mrel","ams"),U("\\Lsh","↰","mrel","ams"),U("\\searrow","↘","mrel"),U("\\nearrow","↗","mrel"),U("\\swarrow","↙","mrel"),U("\\nwarrow","↖","mrel"),U("\\circlearrowright","↻","mrel","ams"),U("\\circlearrowleft","↺","mrel","ams"),U("\\restriction","↾","mrel","ams"),U("\\upharpoonright","↾","mrel","ams"),U("\\upharpoonleft","↿","mrel","ams"),U("\\downharpoonright","⇂","mrel","ams"),U("\\downharpoonleft","⇃","mrel","ams"),U("\\rightsquigarrow","⇝","mrel","ams"),U("\\leadsto","⇝","mrel","ams"),U("\\leftrightsquigarrow","↭","mrel","ams"),U("\\originalof","⊶","mrel"),U("\\laplace","⊶","mrel"),U("\\imageof","⊷","mrel"),U("\\Laplace","⊷","mrel"),U("\\multimap","⊸","mrel","ams"),U("\\nrightarrow","↛","mrel","ams"),U("\\nleftarrow","↚","mrel","ams"),U("\\nRightarrow","⇏","mrel","ams"),U("\\nLeftarrow","⇍","mrel","ams"),U("\\nleftrightarrow","↮","mrel","ams"),U("\\nLeftrightarrow","⇎","mrel","ams"),U("\\nless","≮","mrel","ams"),U("\\nleqslant","","mrel","ams"),U("\\lneq","⪇","mrel","ams"),U("\\lneqq","≨","mrel","ams"),U("\\nleqq","","mrel","ams"),U("\\unlhd","⊴","mbin","ams"),U("\\unrhd","⊵","mbin","ams"),U("\\lvertneqq","","mrel","ams"),U("\\lnsim","⋦","mrel","ams"),U("\\lnapprox","⪉","mrel","ams"),U("\\nprec","⊀","mrel","ams"),U("\\npreceq","⋠","mrel","ams"),U("\\precnsim","⋨","mrel","ams"),U("\\precnapprox","⪹","mrel","ams"),U("\\nsim","≁","mrel","ams"),U("\\nshortmid","","mrel","ams"),U("\\nmid","∤","mrel","ams"),U("\\nvdash","⊬","mrel","ams"),U("\\nvDash","⊭","mrel","ams"),U("\\ngtr","≯","mrel","ams"),U("\\ngeqslant","","mrel","ams"),U("\\ngeqq","","mrel","ams"),U("\\gneq","⪈","mrel","ams"),U("\\gneqq","≩","mrel","ams"),U("\\gvertneqq","","mrel","ams"),U("\\gnsim","⋧","mrel","ams"),U("\\gnapprox","⪊","mrel","ams"),U("\\nsucc","⊁","mrel","ams"),U("\\nsucceq","⋡","mrel","ams"),U("\\succnsim","⋩","mrel","ams"),U("\\succnapprox","⪺","mrel","ams"),U("\\ncong","≆","mrel","ams"),U("\\nshortparallel","","mrel","ams"),U("\\nparallel","∦","mrel","ams"),U("\\nVDash","⊯","mrel","ams"),U("\\nsupseteqq","","mrel","ams"),U("\\supsetneq","⊋","mrel","ams"),U("\\varsupsetneq","","mrel","ams"),U("\\supsetneqq","⫌","mrel","ams"),U("\\varsupsetneqq","","mrel","ams"),U("\\nVdash","⊮","mrel","ams"),U("\\precneqq","⪵","mrel","ams"),U("\\succneqq","⪶","mrel","ams"),U("\\nsubseteqq","","mrel","ams"),U("\\checkmark","✓","mord","ams"),U("\\diagup","╱","mord","ams"),U("\\diagdown","╲","mord","ams"),U("\\measuredangle","∡","mord","ams"),U("\\sphericalangle","∢","mord","ams"),U("\\backprime","‵","mord","ams"),U("\\backdoubleprime","‶","mord","ams"),U("\\ast","∗","mbin"),U("\\star","⋆","mbin"),U("\\diamond","⋄","mbin"),U("\\Diamond","◊","mord","ams"),U("\\lozenge","◊","mord","ams"),U("\\blacklozenge","⧫","mord","ams"),U("\\bigstar","★","mord","ams"),U("\\aleph","ℵ"),U("\\beth","ℶ","mord","ams"),U("\\daleth","ℸ","mord","ams"),U("\\gimel","ℷ","mord","ams"),U("\\lbrace","{","mopen"),U("\\rbrace","}","mclose"),U("\\langle","⟨","mopen"),U("\\rangle","⟩","mclose"),U("\\lfloor","⌊","mopen"),U("\\rfloor","⌋","mclose"),U("\\lceil","⌈","mopen"),U("\\rceil","⌉","mclose"),U("\\vert","∣"),U("\\mvert","∣","mrel"),U("\\lvert","∣","mopen"),U("\\rvert","∣","mclose"),U("\\|","∥"),U("\\Vert","∥"),U("\\mVert","∥"),U("\\lVert","∥","mopen"),U("\\rVert","∥","mclose"),U("\\parallel","∥","mrel"),U("\\shortparallel","∥","mrel","ams"),U("\\lbrack","[","mopen"),U("\\rbrack","]","mclose"),U("\\{","{","mopen"),U("\\}","}","mclose"),U("(","(","mopen"),U(")",")","mclose"),U("[","[","mopen"),U("]","]","mclose"),U("\\ulcorner","┌","mopen","ams"),U("\\urcorner","┐","mclose","ams"),U("\\llcorner","└","mopen","ams"),U("\\lrcorner","┘","mclose","ams"),U("\\lgroup","⟮","mopen"),U("\\rgroup","⟯","mclose"),U("\\lmoustache","⎰","mopen"),U("\\rmoustache","⎱","mclose"),U("=","=","mrel"),U("\\ne","≠","mrel"),U("\\neq","≠","mrel"),U("<","<","mrel"),U("\\lt","<","mrel"),U(">",">","mrel"),U("\\gt",">","mrel"),U("\\le","≤","mrel"),U("\\leq","≤","mrel"),U("\\ge","≥","mrel"),U("\\geq","≥","mrel"),U("\\leqslant","⩽","mrel","ams"),U("\\geqslant","⩾","mrel","ams"),U("\\ll","≪","mrel"),U("\\gg","≫","mrel"),U("\\coloneq","≔","mrel"),U("\\measeq","≝","mrel"),U("\\eqdef","≞","mrel"),U("\\questeq","≟","mrel"),U(":",":","mrel"),U("\\cong","≅","mrel"),U("\\equiv","≡","mrel"),U("\\prec","≺","mrel"),U("\\preceq","⪯","mrel"),U("\\succ","≻","mrel"),U("\\succeq","⪰","mrel"),U("\\perp","⊥","mrel"),U("\\propto","∝","mrel"),U("\\Colon","∷","mrel"),U("\\smile","⌣","mrel"),U("\\frown","⌢","mrel"),U("\\sim","∼","mrel"),U("\\gtrsim","≳","mrel","ams"),U("\\approx","≈","mrel"),U("\\approxeq","≊","mrel","ams"),U("\\thickapprox","≈","mrel","ams"),U("\\lessapprox","⪅","mrel","ams"),U("\\gtrapprox","⪆","mrel","ams"),U("\\precapprox","⪷","mrel","ams"),U("\\succapprox","⪸","mrel","ams"),U("\\thicksim","∼","mrel","ams"),U("\\succsim","≿","mrel","ams"),U("\\precsim","≾","mrel","ams"),U("\\backsim","∽","mrel","ams"),U("\\eqsim","≂","mrel","ams"),U("\\backsimeq","⋍","mrel","ams"),U("\\simeq","≃","mrel"),U("\\lesssim","≲","mrel","ams"),U("\\nleq","≰","mrel","ams"),U("\\ngeq","≱","mrel","ams"),U("\\smallsmile","⌣","mrel","ams"),U("\\smallfrown","⌢","mrel","ams"),U("\\bowtie","⋈","mrel"),U("\\Join","⋈","mrel"),U("\\asymp","≍","mrel"),U("\\sqsubseteq","⊑","mrel"),U("\\sqsupseteq","⊒","mrel"),U("\\leqq","≦","mrel","ams"),U("\\eqslantless","⪕","mrel","ams"),U("\\lll","⋘","mrel","ams"),U("\\lessgtr","≶","mrel","ams"),U("\\lesseqgtr","⋚","mrel","ams"),U("\\lesseqqgtr","⪋","mrel","ams"),U("\\risingdotseq","≓","mrel","ams"),U("\\fallingdotseq","≒","mrel","ams"),U("\\subseteqq","⫅","mrel","ams"),U("\\Subset","⋐","mrel","ams"),U("\\sqsubset","⊏","mrel","ams"),U("\\preccurlyeq","≼","mrel","ams"),U("\\curlyeqprec","⋞","mrel","ams"),U("\\vDash","⊨","mrel","ams"),U("\\Vvdash","⊪","mrel","ams"),U("\\bumpeq","≏","mrel","ams"),U("\\Bumpeq","≎","mrel","ams"),U("\\geqq","≧","mrel","ams"),U("\\eqslantgtr","⪖","mrel","ams"),U("\\ggg","⋙","mrel","ams"),U("\\gtrless","≷","mrel","ams"),U("\\gtreqless","⋛","mrel","ams"),U("\\gtreqqless","⪌","mrel","ams"),U("\\supseteqq","⫆","mrel","ams"),U("\\Supset","⋑","mrel","ams"),U("\\sqsupset","⊐","mrel","ams"),U("\\succcurlyeq","≽","mrel","ams"),U("\\curlyeqsucc","⋟","mrel","ams"),U("\\Vdash","⊩","mrel","ams"),U("\\shortmid","∣","mrel","ams"),U("\\between","≬","mrel","ams"),U("\\pitchfork","⋔","mrel","ams"),U("\\varpropto","∝","mrel","ams"),U("\\backepsilon","∍","mrel","ams"),U("\\llless","⋘","mrel","ams"),U("\\gggtr","⋙","mrel","ams"),U("\\lhd","⊲","mbin","ams"),U("\\rhd","⊳","mbin","ams"),U("\\doteq","≐","mrel"),U("\\doteqdot","≑","mrel","ams"),U("\\Doteq","≑","mrel","ams"),U("\\eqcirc","≖","mrel","ams"),U("\\circeq","≗","mrel","ams"),U("\\lessdot","⋖","mbin","ams"),U("\\gtrdot","⋗","mbin","ams"),U("\\~","~","mrel"),U("\\leftrightarrow","↔","mrel"),U("\\Leftrightarrow","⇔","mrel"),U("\\models","⊨","mrel"),U("\\vdash","⊢","mrel"),U("\\therefore","∴","mrel","ams"),U("\\because","∵","mrel","ams"),U("\\dashv","⊣","mrel"),U("\\roundimplies","⥰","mrel"),U("+","+","mbin"),U("-","−","mbin"),U("−","−","mbin"),U("\\pm","±","mbin"),U("\\mp","∓","mbin"),U("*","∗","mbin"),U("\\times","×","mbin"),U("\\div","÷","mbin"),U("\\surd","√"),U("\\divides","∣","mbin"),U("\\ltimes","⋉","mbin","ams"),U("\\rtimes","⋊","mbin","ams"),U("\\leftthreetimes","⋋","mbin","ams"),U("\\rightthreetimes","⋌","mbin","ams"),U("\\intercal","⊺","mbin","ams"),U("\\dotplus","∔","mbin","ams"),U("\\doublebarwedge","⩞","mbin","ams"),U("\\divideontimes","⋇","mbin","ams"),U("\\centerdot","⋅","mbin","ams"),U("\\cdot","⋅","mbin"),U("\\infty","∞"),U("\\prime","′"),U("\\doubleprime","″"),U("\\angle","∠"),U("`","‘"),U("\\$","$"),U("\\%","%"),U("\\_","_"),U("\\alpha","α"),U("\\beta","β"),U("\\gamma","γ"),U("\\delta","δ"),U("\\epsilon","ϵ"),U("\\varepsilon","ε"),U("\\zeta","ζ"),U("\\eta","η"),U("\\theta","θ"),U("\\vartheta","ϑ"),U("\\iota","ι"),U("\\kappa","κ"),U("\\varkappa","ϰ","mord","ams"),U("\\lambda","λ"),U("\\mu","μ"),U("\\nu","ν"),U("\\xi","ξ"),U("\\omicron","o"),U("\\pi","π"),U("\\varpi","ϖ"),U("\\rho","ρ"),U("\\varrho","ϱ"),U("\\sigma","σ"),U("\\varsigma","ς"),U("\\tau","τ"),U("\\phi","ϕ"),U("\\varphi","φ"),U("\\upsilon","υ"),U("\\chi","χ"),U("\\psi","ψ"),U("\\omega","ω"),U("\\Gamma","Γ"),U("\\Delta","Δ"),U("\\Theta","Θ"),U("\\Lambda","Λ"),U("\\Xi","Ξ"),U("\\Pi","Π"),U("\\Sigma","Σ"),U("\\Upsilon","Υ"),U("\\Phi","Φ"),U("\\Psi","Ψ"),U("\\Omega","Ω"),U("\\digamma","ϝ","mord","ams"),U("\\emptyset","∅"),U("\\varnothing","∅","mord","ams"),U("\\cap","∩","mbin"),U("\\cup","∪","mbin"),U("\\setminus","∖","mbin"),U("\\smallsetminus","∖","mbin","ams"),U("\\complement","∁","mord","ams"),U("\\in","∈","mrel"),U("\\notin","∉","mrel"),U("\\not","̸","mrel"),U("\\ni","∋","mrel"),U("\\owns","∋","mrel"),U("\\subset","⊂","mrel"),U("\\supset","⊃","mrel"),U("\\subseteq","⊆","mrel"),U("\\supseteq","⊇","mrel"),U("\\subsetneq","⊊","mrel","ams"),U("\\varsubsetneq","","mrel","ams"),U("\\subsetneqq","⫋","mrel","ams"),U("\\varsubsetneqq","","mrel","ams"),U("\\nsubset","⊄","mrel","ams"),U("\\nsupset","⊅","mrel","ams"),U("\\nsubseteq","⊈","mrel","ams"),U("\\nsupseteq","⊉","mrel","ams"),U("\\ "," ","spacing"),U("~"," ","spacing"),U("\\space"," ","spacing"),U("\\!",null,"spacing"),U("\\,",null,"spacing"),U("\\:",null,"spacing"),U("\\;",null,"spacing"),U("\\enskip",null,"spacing"),U("\\enspace",null,"spacing"),U("\\quad",null,"spacing"),U("\\qquad",null,"spacing"),U("\\colon",":","mpunct"),U("\\cdotp","⋅","mpunct"),U("\\cdots","⋯","minner"),U("\\ddots","⋱","minner"),U("\\ldots","…","minner"),U("\\mathellipsis","…","minner"),U("\\vdots","⋮"),U("\\ldotp",".","mpunct"),U(",",",","mpunct"),U(";",";","mpunct"),U("\\land","∧","mbin"),U("\\wedge","∧","mbin"),U("\\lor","∨","mbin"),U("\\vee","∨","mbin"),U("\\lnot","¬"),U("\\neg","¬"),U("\\barwedge","⊼","mbin","ams"),U("\\veebar","⊻","mbin","ams"),U("\\nor","⊻","mbin","ams"),U("\\curlywedge","⋏","mbin","ams"),U("\\curlyvee","⋎","mbin","ams"),U("\\square","□","mord","ams"),U("\\Box","□","mord","ams"),U("\\blacksquare","■","mord","ams"),U("\\boxminus","⊟","mbin","ams"),U("\\boxplus","⊞","mbin","ams"),U("\\boxtimes","⊠","mbin","ams"),U("\\boxdot","⊡","mbin","ams"),U("\\circ","∘","mbin"),U("\\bigcirc","◯","mbin"),U("\\bullet","∙","mbin"),U("\\circleddash","⊝","mbin","ams"),U("\\circledast","⊛","mbin","ams"),U("\\oplus","⊕","mbin"),U("\\ominus","⊖","mbin"),U("\\otimes","⊗","mbin"),U("\\odot","⊙","mbin"),U("\\circledcirc","⊚","mbin","ams"),U("\\oslash","⊘","mbin"),U("\\circledS","Ⓢ","mord","ams"),U("\\circledR","®","mord","ams"),U("\\triangle","△"),U("\\bigtriangleup","△","mbin"),U("\\vartriangle","△","mrel","ams"),U("\\triangleq","≜","mrel","ams"),U("\\triangledown","▽","mord","ams"),U("\\bigtriangledown","▽","mbin"),U("\\triangleleft","◃","mbin"),U("\\vartriangleleft","⊲","mrel","ams"),U("\\trianglelefteq","⊴","mrel","ams"),U("\\ntriangleleft","⋪","mrel","ams"),U("\\ntrianglelefteq","⋬","mrel","ams"),U("\\triangleright","▹","mbin"),U("\\vartriangleright","⊳","mrel","ams"),U("\\trianglerighteq","⊵","mrel","ams"),U("\\ntriangleright","⋫","mrel","ams"),U("\\ntrianglerighteq","⋭","mrel","ams"),U("\\blacktriangle","▲","mord","ams"),U("\\blacktriangledown","▼","mord","ams"),U("\\blacktriangleleft","◀","mrel","ams"),U("\\blacktriangleright","▶","mrel","ams"),U("\\/","/"),U("|","∣","textord"),U("\\And","&","mbin"),U("\\imath","ı"),U("\\jmath","ȷ"),U("\\degree","°"),U("'","′"),U('"',"”");const we=["(",")","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\\lceil","\\rceil","\\surd"],Me=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\mvert","\\mid","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],Se=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ze=[0,1.2,1.8,2.4,3],Le=[{type:"small",mathstyle:c.scriptscriptstyle},{type:"small",mathstyle:c.scriptstyle},{type:"small",mathstyle:c.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ae=[{type:"small",mathstyle:c.scriptscriptstyle},{type:"small",mathstyle:c.scriptstyle},{type:"small",mathstyle:c.textstyle},{type:"stack"}],qe=[{type:"small",mathstyle:c.scriptscriptstyle},{type:"small",mathstyle:c.scriptstyle},{type:"small",mathstyle:c.textstyle},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}];function $e(e,t,i,a,r,o=""){if(!t||0===t.length||"."===t)return De(e,r,e);let s;"<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),s=Se.includes(t)?Le:we.includes(t)?qe:Ae;const l=function(e,t,i,a){for(let o=Math.min(2,3-a.mathstyle.size);ot)return i[o]}var r;return i[i.length-1]}(ee("math",t),i,s,r);return"small"===l.type?function(e,t,i,a,r,n=""){const o=D(e,$("Main-Regular",ee("math",t)),r.mathstyle,i,n);return a&&o.setTop((1-r.mathstyle.sizeMultiplier/i.sizeMultiplier)*r.mathstyle.metrics.axisHeight),o.setStyle("color",r.color),"number"==typeof r.opacity&&o.setStyle("opacity",r.opacity),o}(e,t,l.mathstyle,a,r,"ML__small-delim "+o):"large"===l.type?xe(e,t,l.size,a,r,o):_e(e,t,i,a,r,o)}function Ce(e,t,i,a,r,n=""){if("."===t)return De(e,r,n);const o=r.mathstyle.metrics.axisHeight*r.mathstyle.sizeMultiplier,s=Math.max(i-o,a+o);return $e(e,t,Math.max(s/500*901,2*s-.5),!0,r,n)}function De(e,t,i){return q("","sizing"+t.mathstyle.adjustTo(c.textstyle)+" nulldelimiter "+(i||""),e)}const Te={},Ee={size1:.5,size2:.7,size3:.8,size4:.9,size5:1,size6:1.2,size7:1.44,size8:1.73,size9:2.07,size10:2.49};function Ke(e,t){Te[e]={decompose:t}}function Ne(t,i){var a,r;function n(e){return"mord"===e.type&&Boolean(e.symbol)&&/^[0-9,.]$/.test(e.symbol)}function o(e){return"text"===e.mode}const s=t instanceof d?t:new d(t),l=!s.atomIdsSettings||!s.atomIdsSettings.groupNumbers;let c=[];if(e(i)){if(0===i.length)return[];if(1===i.length)c=i[0].decompose(s),c&&l&&i[0].isSelected&&c.forEach(e=>e.selected(!0));else{let e=[],t="",d=!0,m=null;for(let p=0;pe.selected(!0))):(e.length>0&&(c=[...c,...e],e=[]),c=c.concat(a))}}e.length>0&&(c=[...c,...e],e=[])}}else i instanceof Oe&&(c=i.decompose(s),c&&l&&i.isSelected&&c.forEach(e=>e.selected(!0)));if(!c||0===c.length)return null;if(s.mathstyle!==s.parentMathstyle){const e=s.mathstyle.sizeMultiplier/s.parentMathstyle.sizeMultiplier;for(const t of c)t.height*=e,t.depth*=e}if(s.size!==s.parentSize){const e=Ee[s.size]/Ee[s.parentSize];for(const t of c)t.height*=e,t.depth*=e}return c}class Oe{constructor(e,t,i="",a={}){this.mode=e,this.type=t,this.body=i,a.isPhantom&&this.setPhantom(!0),this.applyStyle(a)}toLatex(t=!1){return function(t,i){if(!(i=void 0!==i&&i)&&t.latex)return t.latex;let a="",r=0,n=0,o=0;const s=t.symbol;let l=[];const c=(t,a)=>function(t,i,a){let r="";return e(i)?r=function(e,t,i){if(0===t.length)return"";if("first"===t[0].type){if(1===t.length)return"";t=t.slice(1)}return 0===t.length?"":h(g(t,"cssClass").map(t=>{const a=h(g(t,"color").map(t=>h(function(e){const t=[];let i=[],a="NONE";return e.forEach(e=>{"first"!==e.type&&(e.mode!==a?(i.length>0&&t.push(i),i=[e],a=e.mode):i.push(e))}),i.length>0&&t.push(i),t}(t).map(t=>function(e,t,i){var a;return(null===(a=y[t[0].mode])||void 0===a?void 0:a.emitLatexRun)?y[t[0].mode].emitLatexRun(e,t,i):""}(e,t,i)))));return!t[0].cssClass||void 0!==e&&e.cssClass===t[0].cssClass?a:"ML__boldsymbol"===t[0].cssClass?"\\boldsymbol{"+a+"}":"ML__emph"===t[0].cssClass?"\\emph{"+a+"}":"\\class{"+t[0].cssClass+"}{"+a+"}"}))}(t,i,a):"number"==typeof i||"boolean"==typeof i?r=i.toString():"string"==typeof i?r=i.replace(/\s/g,"~"):null!=i&&"function"==typeof i.toLatex&&(r=i.toLatex(a)),r}(t,a,i);switch(t.type){case"group":s?a=i?c(t,t.body):t.latex:(a=t.latexOpen||(t.cssId||t.cssClass?"":"{"),t.cssId&&(a+="\\cssId{"+t.cssId+"}{"),"ML__emph"===t.cssClass?a+="\\emph{"+c(t,t.body):(t.cssClass&&(a+="\\class{"+t.cssClass+"}{"),a+=c(t,t.body),t.cssClass&&(a+="}")),t.cssId&&(a+="}"),a+=t.latexClose||(t.cssId||t.cssClass?"":"}"));break;case"array":if(a+="\\begin{"+t.environmentName+"}","array"===t.environmentName){if(a+="{",void 0!==t.colFormat)for(o=0;o0&&(a+=" & "),a+=c(t,t.array[n][r]);n0&&("first"!==this.body[0].type?t=this.body[0].getInitialBaseElement():this.body[1]&&(t=this.body[1].getInitialBaseElement())),t||this}getFinalBaseElement(){return e(this.body)&&this.body.length>0?this.body[this.body.length-1].getFinalBaseElement():this}isCharacterBox(){const e=this.getInitialBaseElement();return/minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(e.type)}setPhantom(e){this.forEach(t=>{t.isPhantom=e})}forEach(t){if(t(this),e(this.body))for(const e of this.body)e&&e.forEach(t);else this.body&&"object"==typeof this.body&&t(this.body);if(this.superscript)for(const e of this.superscript)e&&e.forEach(t);if(this.subscript)for(const e of this.subscript)e&&e.forEach(t);if(this.overscript)for(const e of this.overscript)e&&e.forEach(t);if(this.underscript)for(const e of this.underscript)e&&e.forEach(t);if(this.numer)for(const e of this.numer)e&&e.forEach(t);if(this.denom)for(const e of this.denom)e&&e.forEach(t);if(this.index)for(const e of this.index)e&&e.forEach(t);if(this.array)for(const e of this.array)for(const i of e)for(const e of i)e.forEach(t)}filter(t){let i=[];t(this)&&i.push(this);for(const a of["body","superscript","subscript","overscript","underscript","numer","denom","index"])if(e(this[a]))for(const e of this[a])e&&(i=i.concat(e.filter(t)));if(e(this.array))for(const e of this.array)for(const a of e)a&&(i=i.concat(a.filter(t)));return i}decomposeGroup(e){const t=q(Ne(e.clone({mathstyle:this.mathstyle?c[this.mathstyle]:void 0}),this.body),"","mord");return this.cssId&&(t.cssId=this.cssId),t.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),t}decomposeOverlap(e){const t=q(Ne(e,this.body),"inner");return q([t,q(null,"fix")],"left"===this.align?"llap":"rlap","mord")}decomposeRule(e){const t=e.mathstyle,i=q("","rule","mord");let a=this.shift&&!isNaN(this.shift)?this.shift:0;a/=t.sizeMultiplier;const r=this.width/t.sizeMultiplier,n=this.height/t.sizeMultiplier;return i.setStyle("border-right-width",r,"em"),i.setStyle("border-top-width",n,"em"),i.setStyle("margin-top",-(n-a),"em"),i.setStyle("border-color",e.color),i.width=r,i.height=n+a,i.depth=-a,i}decompose(t,i=null){var a;let r=null;if(!this.type||/mord|minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(this.type)?(r="string"==typeof this.body?this.makeSpan(t,this.body):this.makeSpan(t,Ne(t,this.body)),r.type=x(this.type)?this.type:""):"group"===this.type||"root"===this.type?r=this.decomposeGroup(t):"delim"===this.type?(r=q(null,""),r.delim=this.delim):"sizeddelim"===this.type?r=this.bind(t,function(e,t,i,a,r=""){return"."===t?De(e,a,r):("<"===t||"\\lt"===t?t="\\langle":">"!==t&&"\\gt"!==t||(t="\\rangle"),we.includes(t)||Se.includes(t)?xe(e,t,i,!1,a,r):Me.includes(t)?_e(e,t,ze[i],!1,a,r):null)}(this.cls,this.delim,this.size,t)):"overlap"===this.type?r=this.decomposeOverlap(t):"rule"===this.type?r=this.decomposeRule(t):"msubsup"===this.type?(r=q("​","","mord"),i&&(r.height=i[0].height,r.depth=i[0].depth)):"space"===this.type?r=this.makeSpan(t," "):"spacing"===this.type?"​"===this.body?r=this.makeSpan(t,"​"):" "===this.body?r="math"===this.mode?this.makeSpan(t," "):this.makeSpan(t," "):this.width?(r=q("​","mspace "),this.width>0?r.setWidth(this.width):r.setStyle("margin-left",this.width,"em")):r=q("​","mspace "+(null!==(a={"\\qquad":"qquad","\\quad":"quad","\\enspace":"enspace","\\;":"thickspace","\\:":"mediumspace","\\,":"thinspace","\\!":"negativethinspace"}[this.symbol])&&void 0!==a?a:"mediumspace")):"mathstyle"===this.type?t.setMathstyle(this.mathstyle):"command"===this.type||"error"===this.type?(r=this.makeSpan(t,this.body),r.classes="",this.isError&&(r.classes+=" ML__error"),this.isSuggestion&&(r.classes+=" ML__suggestion")):r="placeholder"===this.type?this.makeSpan(t,"⬚"):"first"===this.type?this.makeSpan(t,"​"):Te[this.type].decompose(t,this),!r)return null;if(this.caret&&"msubsup"!==this.type&&"command"!==this.type&&"placeholder"!==this.type&&"first"!==this.type&&(e(r)?"leftright"===this.type&&(this.superscript||this.subscript)||(r[r.length-1].caret=this.caret):r.caret=this.caret),this.containsCaret&&(e(r)?(r[0].classes=(r[0].classes||"")+" ML__contains-caret",r[r.length-1].classes=(r[r.length-1].classes||"")+" ML__contains-caret"):r.classes=(r.classes||"")+" ML__contains-caret"),!this.limits&&(this.superscript||this.subscript))if(e(r)){const e=r[r.length-1];r[r.length-1]=this.attachSupsub(t,e,e.type)}else r=[this.attachSupsub(t,r,r.type)];return e(r)?r:[r]}attachSupsub(e,t,i){if(!this.superscript&&!this.subscript)return t;const a=e.mathstyle;let r=null,n=null;this.superscript&&(r=q(Ne(e.sup(),this.superscript),a.adjustTo(a.sup()))),this.subscript&&(n=q(Ne(e.sub(),this.subscript),a.adjustTo(a.sub())));let o,s=0,l=0;this.isCharacterBox()||(s=z(t)-a.metrics.supDrop,l=L(t)+a.metrics.subDrop),o=a===c.displaystyle?a.metrics.sup1:a.cramped?a.metrics.sup3:a.metrics.sup2;const d=.05/(c.textstyle.sizeMultiplier*a.sizeMultiplier);let m=null;if(n&&r){s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),l=Math.max(l,a.metrics.sub2);const i=.04;if(s-L(r)-(z(n)-l)<4*i){l=4*i-(s-r.depth)+z(n);const e=.8*a.metrics.xHeight-(s-L(r));e>0&&(s+=e,l-=e)}m=E(e,[n,l,r,-s],"individualShift"),this.isSymbol&&m.children[0].setLeft(-A(t))}else n&&!r?(l=Math.max(l,a.metrics.sub1,z(n)-.8*a.metrics.xHeight),m=E(e,[n],"shift",l),m.children[0].setRight(d),this.isCharacterBox()&&m.children[0].setLeft(-A(t))):!n&&r&&(s=Math.max(s,o,r.depth+.25*a.metrics.xHeight),m=E(e,[r],"shift",-s),m.children[0].setRight(d));const p=q(m,"msubsup");return this.caret&&(p.caret=this.caret,this.caret=""),q([t,p],"",i)}attachLimits(e,t,i,a){const r=this.superscript?q(Ne(e.sup(),this.superscript),e.mathstyle.adjustTo(e.mathstyle.sup())):null,n=this.subscript?q(Ne(e.sub(),this.subscript),e.mathstyle.adjustTo(e.mathstyle.sub())):null;return function(e,t,i,a,r,n){if(!r&&!n)return t;t=q(t);let o=0,s=0;r&&(o=Math.max(.111,.2-L(r))),n&&(s=Math.max(.166,.6-z(n)));let l=null;return n&&r?(l=E(e,[.1,n,s,t,o,r,.1],"bottom",.1+z(n)+L(n)+s+L(t)+i),l.children[0].setLeft(-a),l.children[2].setLeft(a)):n&&!r?(l=E(e,[.1,n,s,t],"top",z(t)-i),l.children[0].setLeft(-a)):!n&&r&&(l=E(e,[t,o,r,.1],"bottom",L(t)+i),l.children[1].setLeft(a)),q(l,"op-limits","mop")}(e,t,i,a,r,n)}bind(e,t){return"first"!==this.type&&"​"!==this.body&&(this.id=function(e){let t;return e.atomIdsSettings&&("number"==typeof e.atomIdsSettings.seed?(t=e.atomIdsSettings.overrideID?e.atomIdsSettings.overrideID:e.atomIdsSettings.seed.toString(36),e.atomIdsSettings.seed+=1):t=Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36)),t}(e),this.id&&(t.attributes||(t.attributes={}),t.attributes["data-atom-id"]=this.id)),t}makeSpan(e,t){const i=q(t,"","textord"===this.type?"mord":x(this.type)?this.type:""),a=this.getStyle();a.letterShapeStyle=e.letterShapeStyle,i.applyStyle(a);const r=(null==a?void 0:a.fontSize)?a.fontSize:"size5";return r!==e.parentSize?(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+r):e.parentSize!==e.size&&(i.classes+=" sizing reset-"+e.parentSize,i.classes+=" "+e.size),i.maxFontSize=Math.max(i.maxFontSize,e.mathstyle.sizeMultiplier||1),"text"===this.mode&&(i.classes+=" ML__text"),e.mathstyle.isTight()&&(i.isTight=!0),"math"!==this.mode&&(i.italic=0),i.setRight(i.italic),"number"==typeof e.opacity&&i.setStyle("opacity",e.opacity),this.bind(e,i),this.caret&&(this.superscript||this.subscript||(i.caret=this.caret,this.caret="",e.mathstyle.isTight()&&(i.isTight=!0))),i}}function Be(t,i=[]){const a=new Oe(t,"root",i||[]);return!e(a.body)||0!==a.body.length&&"first"===a.body[0].type||a.body.unshift(new Oe(t,"first")),a}function Fe(t){return e(t)}const Pe=[[8205,1],[65038,2],[127995,5],[129456,4],[917536,96]];let Re;const Ie=[127462,127487];function He(e){var t;return void 0===Re&&(Re={},Pe.forEach(e=>{for(let t=e[0];t<=e[0]+e[1]-1;t++)Re[t]=!0})),null!==(t=Re[e])&&void 0!==t&&t}function We(e){return e>=Ie[0]&&e<=Ie[1]}function Ve(e){if(/^[\x20-\xFF]*$/.test(e))return e;const t=[],i=function(e){const t=[];for(let i=0;i=55296&&a<=56319){const t=e.charCodeAt(i+1);if(t>=56320&&t<=57343){const e=a-55296,r=t-56320;a=Math.pow(2,16)+e*Math.pow(2,10)+r,i++}}t.push(a)}return t}(e);let a=0;for(;a=this.s.length}get(){return this.pos";if(this.obeyspaces&&this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]/))return"";const e=this.get();if("\\"===e){if(!this.end()){let e=this.match(/^[a-zA-Z*]+/);if(e)this.match(/^[ \f\n\r\t\v\xA0\u2028\u2029]*/);else if(e=this.get()," "===e)return"";return"\\"+e}}else{if("{"===e)return"<{>";if("}"===e)return"<}>";if("^"===e){if("^"===this.peek()){this.get();let e=this.match(/^\^\^[0-9a-f][0-9a-f][0-9a-f][0-9a-f]/);if(e)return String.fromCodePoint(parseInt(e.slice(2),16));if(e=this.match(/^[0-9a-f][0-9a-f]/),e)return String.fromCodePoint(parseInt(e,16))}return e}if("#"===e){if(!this.end()){let e=!1;if(/[0-9?]/.test(this.peek())&&(e=!0,this.pos+1"):"<$>"}return e}}function je(e,t){var i,a,r,n;let o=[],s=e.next();if(s)if("\\relax"===s);else if("\\noexpand"===s)s=e.next(),s&&o.push(s);else if("\\obeyspaces"===s)e.obeyspaces=!0;else if("\\space"===s||"~"===s)o.push("");else if("\\bgroup"===s)o.push("<{>");else if("\\egroup"===s)o.push("<}>");else if("\\string"===s)s=e.next(),s&&("\\"===s[0]?Array.from(s).forEach(e=>o.push("\\"===e?"\\backslash":e)):"<{>"===s?o.push("\\{"):""===s?o.push("~"):"<}>"===s&&o.push("\\}"));else if("\\csname"===s){for(;""===e.peek();)e.next();let r="",n=!1,l=[];do{if(0===l.length)if(/^#[0-9?]$/.test(e.peek())){const r=e.get().slice(1);l=Ge(null!==(a=null!==(i=null==t?void 0:t[r])&&void 0!==i?i:null==t?void 0:t["?"])&&void 0!==a?a:"\\placeholder{}",t),s=l[0]}else s=e.next(),l=s?[s]:[];n=0===l.length,n||"\\endcsname"!==s||(n=!0,l.shift()),n||(n="<$>"===s||"<$$>"===s||"<{>"===s||"<}>"===s||s.length>1&&"\\"===s[0]),n||(r+=l.shift())}while(!n);r&&o.push("\\"+r),o=o.concat(l)}else if("\\endcsname"===s);else if(s.length>1&&"#"===s[0]){const e=s.slice(1);o=o.concat(Ge(null!==(n=null!==(r=null==t?void 0:t[e])&&void 0!==r?r:null==t?void 0:t["?"])&&void 0!==n?n:"\\placeholder{}",t))}else o.push(s);return o}function Ge(e,t){const i=e.toString().split(/\r?\n/);let a="",r="";for(const e of i){a+=r,r=" ";const t=e.match(/((?:\\%)|[^%])*/);null!==t&&(a+=t[0])}const n=new Ue(a);let o=[];do{o=o.concat(je(n,t))}while(!n.end());return o}function Xe(e){const t=q("​","arraycolsep");return t.setWidth(e),t}function Ze(e,t,i,a){const r=[];for(const n of t){const t=q(Ne(e,a));t.depth=n.depth,t.height=n.height,r.push(t),r.push(n.pos-i)}return E(e,r,"individualShift")}function Ye(e){return!/^<({|}|\$|\$\$|space)>$/.test(e)}Ke("accent",(t,i)=>{const a=t.mathstyle;let r=Ne(t.cramp(),i.body);(i.superscript||i.subscript)&&(r=[i.attachSupsub(t,q(r,"","mord"),"mord")]);let n=0;e(i.body)&&1===i.body.length&&i.body[0].isCharacterBox()&&(n=function(t){if(!t)return 0;if(e(t)){let e=0;for(const i of t)e+=i.skew||0;return e}return t.skew}(r));let o,s=Math.min(z(r),a.metrics.xHeight);if(i.svgAccent)o=K(i.svgAccent),s=.111-s;else{const e=$("Main-Regular",i.accent,"math");e.italic=0;const t="⃗"===i.accent?" accent-vec":"";o=q(q(e),"accent-body"+t)}return o=E(t,[r,-s,o]),o.children[1].setLeft(2*n),[q([o],"accent","mord")]}),Ke("array",(e,t)=>{var i;let a=t.colFormat;a&&0===a.length&&(a=[{align:"l"}]),a||(a=[{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"},{align:"l"}]);const r=[];let n=0;for(const e of a)e.align&&n++;for(const e of t.array){let t=0;for(;t0&&(d+=p,s0&&b.push(E(e,i,"individualShift"))}const v=[];let x=!1,k=!1,_=0,w=!t.leftDelim;for(const t of a){if(t.align&&_>=b.length)break;if(t.align&&_{const i="number"==typeof t.padding?t.padding:.3,a=q(Ne(e,t.body),"","mord");a.setStyle("vertical-align",-L(a),"em"),a.setStyle("height",0);const r=q(a,"","mord"),n=q("","ML__box");n.setStyle("position","absolute"),n.setStyle("height",z(r)+L(r)+2*i,"em"),0!==i?n.setStyle("width","calc(100% + "+2*i+"em)"):n.setStyle("width","100%"),n.setStyle("top",-i,"em"),n.setStyle("left",-i,"em"),n.setStyle("z-index","-1"),n.setStyle("box-sizing","border-box"),t.backgroundcolor&&n.setStyle("background-color",t.backgroundcolor),t.framecolor&&n.setStyle("border","0.04em solid "+t.framecolor),t.border&&n.setStyle("border",t.border),r.setStyle("display","inline-block"),r.setStyle("height",z(r)+L(r),"em");const o=q([n,r]);return o.setStyle("position","relative"),o.setStyle("vertical-align",-i+L(r),"em"),o.height=z(r)+i,o.depth=L(r)+i,o.setLeft(i),o.setRight(i),o.setStyle("height",o.height+o.depth-2*i,"em"),o.setStyle("top",-i,"em"),o.setStyle("display","inline-block"),[o]}),Ke("enclose",(e,t)=>{const i=q(Ne(e,t.body),"","mord"),a="number"==typeof t.padding?t.padding:.3,r=q("","ML__notation");r.setStyle("position","absolute"),r.setStyle("height",z(i)+L(i)+2*a,"em"),r.height=z(i)+a,r.depth=L(i)+a,0!==a?r.setStyle("width","calc(100% + "+2*a+"em)"):r.setStyle("width","100%"),r.setStyle("top","0"),r.setStyle("left",-a,"em"),r.setStyle("z-index","-1"),t.backgroundcolor&&r.setStyle("background-color",t.backgroundcolor),t.notation.box&&r.setStyle("border",t.borderStyle),t.notation.actuarial&&(r.setStyle("border-top",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.madruwb&&(r.setStyle("border-bottom",t.borderStyle),r.setStyle("border-right",t.borderStyle)),t.notation.roundedbox&&(r.setStyle("border-radius",(z(i)+L(i))/2,"em"),r.setStyle("border",t.borderStyle)),t.notation.circle&&(r.setStyle("border-radius","50%"),r.setStyle("border",t.borderStyle)),t.notation.top&&r.setStyle("border-top",t.borderStyle),t.notation.left&&r.setStyle("border-left",t.borderStyle),t.notation.right&&r.setStyle("border-right",t.borderStyle),t.notation.bottom&&r.setStyle("border-bottom",t.borderStyle);let n="";if(t.notation.horizontalstrike&&(n+='{const i="auto"===t.mathstyle?e.mathstyle:c[t.mathstyle],a=e.clone({mathstyle:i});let r=[];t.numerPrefix&&r.push(q(t.numerPrefix,"mord"));const n=t.continuousFraction?i:i.fracNum();r=r.concat(Ne(a.clone({mathstyle:n}),t.numer));const o=T(r,e.mathstyle.adjustTo(n));let s=[];t.denomPrefix&&s.push(q(t.denomPrefix,"mord"));const l=t.continuousFraction?i:i.fracDen();s=s.concat(Ne(a.clone({mathstyle:l}),t.denom));const d=T(s,e.mathstyle.adjustTo(l)),m=t.hasBarLine?.04/i.sizeMultiplier:0;let p,u,h=0;i.size===c.displaystyle.size?(p=i.metrics.num1,h=m>0?3*m:.28,u=i.metrics.denom1):(m>0?(p=i.metrics.num2,h=m):(p=i.metrics.num3,h=.12),u=i.metrics.denom2);const f=o?L(o):0,g=d?z(d):0;let y;if(0===m){const e=p-f-(g-u);e{if(!t.body)return t.leftDelim?new Oe("math","mopen",t.leftDelim).decompose(e):t.rightDelim?new Oe("math","mclose",t.rightDelim).decompose(e):null;const i=e.clone(),a=Ne(i,t.body),r=i.mathstyle;let n=0,o=0,s=[];if(n=z(a)*r.sizeMultiplier,o=L(a)*r.sizeMultiplier,t.leftDelim&&(s.push(t.bind(e,Ce("mopen",t.leftDelim,n,o,i,"ML__open"))),s[s.length-1].applyStyle(t.getStyle())),a){for(let r=0;r{const i=e.mathstyle,a=Ne(e.cramp(),t.body),r=.04/i.sizeMultiplier,n=q(null,e.mathstyle.adjustTo(c.textstyle)+" "+t.position+"-line");let o;if(n.height=r,n.maxFontSize=1,"overline"===t.position)o=E(e,[a,3*r,n,r]);else{const t=q(a);o=E(e,[r,n,3*r,t],"top",z(t))}return[q(o,t.position,"mord")]}),Ke("mop",(t,i)=>{var a;const r=t.mathstyle;let n,o=0,s=0;if(i.isSymbol){const e=r.size===c.displaystyle.size&&"\\smallint"!==i.symbol;n=$(e?"Size2-Regular":"Size1-Regular",i.body,"op-symbol "+(e?"large-op":"small-op"),"mop"),o=(n.height-n.depth)/2-r.metrics.axisHeight*r.sizeMultiplier,s=n.italic,n.applyStyle({color:i.isPhantom?"transparent":i.color,backgroundColor:i.isPhantom?"transparent":i.backgroundColor,cssId:i.cssId,cssClass:i.cssClass,letterShapeStyle:t.letterShapeStyle})}else n=e(i.body)?q(Ne(t,i.body),"","mop"):i.makeSpan(t,i.body);i.bind(t,n),i.isSymbol&&n.setTop(o);let l=n;if(i.superscript||i.subscript){const e=null!==(a=i.limits)&&void 0!==a?a:"auto";l="limits"===e||"auto"===e&&r.size===c.displaystyle.size?i.attachLimits(t,n,o,s):i.attachSupsub(t,n,"mop")}return[l]}),Ke("overunder",(e,t)=>{const i=t.svgBody?K(t.svgBody):Ne(e,t.body),a=e.clone({mathstyle:c.scriptstyle});let r,n;t.svgAbove?r=K(t.svgAbove):t.overscript&&t.overscript.length>0&&(r=q(Ne(a,t.overscript),e.mathstyle.adjustTo(a.mathstyle))),t.svgBelow?n=K(t.svgBelow):t.underscript&&t.underscript.length>0&&(n=q(Ne(a,t.underscript),e.mathstyle.adjustTo(a.mathstyle))),r&&n&&(n.setLeft(.3),n.setRight(.3),r.setLeft(.3),r.setRight(.3));let o=function(e,t,i,a,r){if(!i&&!a)return q(t,"op-over-under",r);let n=0,o=0;i&&(n=Math.max(.111,.2-L(i))),a&&(o=Math.max(.166,.6-z(a)));let s=null;return a&&i?s=E(e,[0,a,o,t,n,i,.166],"bottom",z(a)+L(a)+L(t)):a&&!i?s=E(e,[0,a,o,t],"top",z(t)):i&&!a&&(s=E(e,[L(t),t,Math.max(.166,n),i],"bottom",L(t))),q(s,"op-over-under",r)}(e,i,r,n,x(t.type)?t.type:"mrel");return(t.superscript||t.subscript)&&(o=t.attachLimits(e,o,0,0)),[o]}),Ke("phantom",(e,t)=>{if("vphantom"===t.phantomType){const i=q(Ne(e,t.body),"inner");return[q([i,q(null,"fix")],"rlap","mord")]}if("hphantom"===t.phantomType||"smash"===t.phantomType||"bsmash"===t.phantomType||"tsmash"===t.phantomType){const i=q(Ne(e,t.body),"","mord");return"bsmash"!==t.phantomType&&(i.height=0),"tsmash"!==t.phantomType&&(i.depth=0),[q(E(e,[i]),"","mord")]}return[q(Ne(e,t.body),"","mord")]}),Ke("surd",(e,t)=>{var i;const a=e.mathstyle,r=null!==(i=Ne(e.cramp(),t.body))&&void 0!==i?i:q(""),n=.04/a.sizeMultiplier;let o=n;a.idz(r)+L(r)+s&&(s=(s+d-(z(r)+L(r)))/2),l.setTop(l.height-z(r)-(s+n));const m=q(null,e.mathstyle.adjustTo(c.textstyle)+" sqrt-line");m.applyStyle(t.getStyle()),m.height=n;const p=E(e,[r,s,m,n]);if(void 0===t.index)return[t.bind(e,q([l,p],"sqrt","mord"))];const u=e.clone({mathstyle:c.scriptscriptstyle}),h=E(e,[q(Ne(u,t.index),a.adjustTo(c.scriptscriptstyle))],"shift",-.6*(Math.max(l.height,p.height)-Math.max(l.depth,p.depth)));return[t.bind(e,q([q(h,"root"),l,p],"sqrt","mord"))]});class Qe{constructor(e,t,i,a){this.index=0,this.style={},this.parseMode="math",this.smartFence=!1,this.tabularMode=!1,this.atoms=[],this.endCount=0,this.tokens=e,this.args=t,this.macros=i,this.onError=e=>a({before:f(this.tokens.slice(this.index,this.index+10)),after:f(this.tokens.slice(Math.max(0,this.index-10),this.index)),...e})}swapAtoms(e=[]){const t=this.atoms;return this.atoms=e,t}swapParseMode(e){const t=this.parseMode;return this.parseMode=e,t}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index");)e=!0;return e}skipUntilToken(e){let t=this.tokens[this.index];for(;t&&t!==e;)t=this.tokens[++this.index];t===e&&this.index++}skipFiller(){let e=!1;do{const t=this.matchWhitespace(),i=this.match("\\relax");e=!t&&!i}while(!e)}matchKeyword(e){const t=this.index;let i=this.end(),a="";for(;!i;){const t=this.get();Ye(t)?(a+=t,i=this.end()||a.length>=e.length):i=!0}const r=e.toUpperCase()===a.toUpperCase();return r||(this.index=t),r}scanString(){let e="",t=this.end();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===i?t=!0:Ye(i)?e+=this.get():"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.get()):t=!0}t=t||this.end()}return e}scanBalancedString(){let e="",t=this.end(),i=1;for(;!t;){if(this.match(""))e+=" ";else{const t=this.get();"<{>"===t?(e+="{",i+=1):"<}>"===t?(i-=1,i>0?e+="}":this.index-=1):e+="<$>"===t?"$":"<$$>"===t?"$$":t}t=0===i||this.end()}return e}matchLiteralArg(){var e;let t="";if(this.match("<{>")){let i=1;for(;i>0&&!this.end();){const a=this.get();"<}>"===a?(i-=1,i>0&&(t+="}")):"<{>"===a?(i+=1,t+="{"):t+=null!==(e={"":" ","<$$>":"$$","<$>":"$"}[a])&&void 0!==e?e:a}}return t}scanColor(){return ye(this.scanString())}scanNumber(e=!0){var t,i;let a=!1,r=this.peek();for(;""===r||"+"===r||"-"===r;)this.get(),"-"===r&&(a=!a),r=this.peek();e=Boolean(e);let n=10,o=/[0-9]/;if(this.match("'"))n=8,o=/[0-7]/,e=!0;else if(this.match('"')||this.match("x"))n=16,o=/[0-9A-F]/,e=!0;else if(this.match("`"))return r=this.get(),r?r.startsWith("\\")&&2===r.length?(a?-1:1)*(null!==(t=r.codePointAt(1))&&void 0!==t?t:0):(a?-1:1)*(null!==(i=r.codePointAt(0))&&void 0!==i?i:0):NaN;let s="";for(;this.hasPattern(o);)s+=this.get();if(!e&&(this.match(".")||this.match(",")))for(s+=".";this.hasPattern(o);)s+=this.get();const l=e?parseInt(s,n):parseFloat(s);return a?-l:l}scanDimen(){const e=this.scanNumber(!1);let t;return this.matchWhitespace(),this.matchKeyword("pt")?t=o(e,"pt"):this.matchKeyword("mm")?t=o(e,"mm"):this.matchKeyword("cm")?t=o(e,"cm"):this.matchKeyword("ex")?t=o(e,"ex"):this.matchKeyword("px")?t=o(e,"px"):this.matchKeyword("em")?t=o(e,"em"):this.matchKeyword("bp")?t=o(e,"bp"):this.matchKeyword("dd")?t=o(e,"dd"):this.matchKeyword("pc")?t=o(e,"pc"):this.matchKeyword("in")?t=o(e,"in"):this.matchKeyword("mu")?t=o(e,"mu"):(this.onError({code:"missing-unit"}),t=o(e,"pt")),t}scanSkip(){const e=this.scanDimen();return this.matchWhitespace(),this.matchKeyword("plus")&&this.scanDimen(),this.matchWhitespace(),this.matchKeyword("minus")&&this.scanDimen(),e}scanColspec(){this.matchWhitespace();const e=[];for(;!this.end()&&"<}>"!==this.peek()&&"]"!==this.peek();){const t=this.get();if("c"===t||"r"===t||"l"===t)e.push({align:t});else if("|"===t)e.push({rule:!0});else if("@"===t){if(this.match("<{>")){const t=this.swapParseMode("math");e.push({gap:this.parse(e=>"<}>"===e)}),this.swapParseMode(t)}this.match("<}>")||this.onError({code:"unbalanced-braces"})}}return e}parseModeSet(){let e="";if(this.match("\\(")&&(e="\\)"),!e&&this.match("\\[")&&(e="\\]"),!e)return null;const t=this.swapParseMode("math"),i=new Oe("math","group");return i.mathstyle="\\)"===e?"textstyle":"displaystyle",i.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(t),i.body&&0!==i.body.length?i:null}parseModeShift(){let e="";if(this.match("<$>")&&(e="<$>"),!e&&this.match("<$$>")&&(e="<$$>"),!e)return null;const t=new Oe("math","group");t.mathstyle="<$>"===e?"textstyle":"displaystyle",t.latexOpen="<$>"===e?"$":"$$",t.latexClose=t.latexOpen;const i=this.swapParseMode("math");return t.body=this.parse(t=>t===e),this.match(e)||this.onError({code:"unbalanced-mode-shift"}),this.swapParseMode(i),t.body&&0!==t.body.length?t:null}parseEnvironment(){if(!this.match("\\begin"))return null;const e=this.parseArgument("string");if(!e)return null;const t=ie(e);if(!t)return this.onError({code:"unknown-environment",arg:e}),null;const i=[];if(null==t?void 0:t.params)for(const a of t.params)if(a.isOptional)i.push(this.parseOptionalArgument(a.type));else{const t=this.parseArgument(a.type);t||this.onError({code:"missing-argument",arg:e}),i.push(t)}const a=this.parseMode,r=this.tabularMode,n=this.swapAtoms([]);this.tabularMode=t.tabular;const o=[],s=[];let l=[],c=!1;do{if(this.end()&&(this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c&&this.match("\\end")&&(this.parseArgument("string")!==e&&this.onError({code:"unbalanced-environment",arg:e}),c=!0),!c)if(this.matchColumnSeparator())l.push(this.swapAtoms([]));else if(this.matchRowSeparator()){l.push(this.swapAtoms([]));let e=0;this.matchWhitespace(),this.match("[")&&(e=this.scanDimen(),this.matchWhitespace(),this.match("]")),s.push(e||0),o.push(l),l=[]}else this.atoms=this.atoms.concat(this.parse(e=>"<}>"===e||"&"===e||"\\end"===e||"\\cr"===e||"\\\\"===e))}while(!c);l.push(this.swapAtoms([])),l.length>0&&o.push(l);const d=this.swapAtoms(n);if(this.parseMode=a,this.tabularMode=r,!t.tabular&&0===d.length)return null;if(t.tabular&&0===o.length)return null;const m=new Oe(this.parseMode,"array",d);return Object.assign(m,t.parser(e,i,o)),m.array=o,m.rowGaps=s,m.environmentName=e,m}parse(e){var t;const i=this.style;e||(e=e=>"<}>"===e);let a="",r=null,n=[],o=null;const s=this.swapAtoms([]);for(;!this.end()&&!e(this.peek());)this.hasInfixCommand()&&!a?(a=this.get(),r=ae(a,"math",this.macros),r&&(n=this.parseArguments(r)[1]),o=this.swapAtoms([])):this.parseToken();let l;return a?(n.unshift(this.swapAtoms(s)),o&&n.unshift(o),l=[new Oe(this.parseMode,r.type,null!==(t=r.value)&&void 0!==t?t:a.slice(1),r.parse?r.parse(a,n):null)],l[0].symbol=a):l=this.swapAtoms(s),this.style=i,l}parseGroup(){if(!this.match("<{>"))return null;const e=new Oe(this.parseMode,"group");return e.body=this.parse(e=>"<}>"===e),this.match("<}>")||this.onError({code:"unbalanced-braces"}),e.latexOpen="{",e.latexClose="}",e}scanSmartFence(){if(this.matchWhitespace(),!this.match("("))return null;const e=new Oe(this.parseMode,"leftright");e.leftDelim="(",e.inner=!1;const t=this.swapAtoms([]);let i=1;for(;!this.end()&&0!==i;)this.match("(")&&(i+=1),this.match(")")&&(i-=1),0!==i&&this.parseToken();return 0===i&&this.match(")"),e.rightDelim=0===i?")":"?",e.body=this.swapAtoms(t),e}scanDelim(){this.matchWhitespace();const e=this.get();if(!e)return this.onError({code:"unexpected-end-of-string"}),null;let t=".";("\\"===e[0]||Ye(e))&&(t=e);const i=ae(t,"math",this.macros);return i?i.mode&&!i.mode.includes(this.parseMode)?(this.onError({code:"unexpected-delimiter",arg:t}),null):"mopen"===i.type||"mclose"===i.type||/^(\.|\?|\||<|>|\\vert|\\Vert|\\\||\\surd|\\uparrow|\\downarrow|\\Uparrow|\\Downarrow|\\updownarrow|\\Updownarrow|\\mid|\\mvert|\\mVert)$/.test(t)?t:(this.onError({code:"unexpected-delimiter",arg:t}),null):(this.onError({code:"unknown-command",arg:t}),null)}parseLeftRight(){if(this.match("\\right")||this.match("\\mright"))return this.onError({code:"unbalanced-braces"}),null;const e=this.style;let t="\\right";if(!this.match("\\left")){if(!this.match("\\mleft"))return null;t="\\mright"}const i=this.scanDelim();if(!i)return null;const a=this.swapAtoms([]);for(;!this.end()&&!this.match(t);)this.parseToken();this.style=e;const r=this.scanDelim(),n=new Oe(this.parseMode,"leftright");return n.leftDelim=i,n.rightDelim=null!=r?r:void 0,n.inner="right"===t,n.body=this.swapAtoms(a),n}parseSupSub(){var e,t;if("math"!==this.parseMode)return!1;let i=!1,a=this.peek();for(;"^"===a||"_"===a||"'"===a;){const r="_"===a?"subscript":"superscript";if(this.match("^")||this.match("_")){const t=this.parseArgument("math");if(t){const a=this.lastSubsupAtom();a[r]=(null!==(e=a[r])&&void 0!==e?e:[]).concat(t),i=!0}}else if(this.match("'")){const e=this.lastSubsupAtom(),a=new Oe(e.mode,"mord","′");a.symbol="\\prime",e.superscript=null!==(t=e.superscript)&&void 0!==t?t:[],e.superscript.push(a),i=!0}a=this.peek()}return i}parseLimits(){if(this.match("\\limits")){const e=this.lastSubsupAtom();return e.limits="limits",e.explicitLimits=!0,!0}if(this.match("\\nolimits")){const e=this.lastSubsupAtom();return e.limits="nolimits",e.explicitLimits=!0,!0}return!1}parseArguments(e){if(!e||!e.params)return[void 0,[]];let t;const i=[];let a=e.infix?2:0;for(;a")){if("delim"===e)return null!==(t=this.scanDelim())&&void 0!==t?t:".";if(/^(math|text)$/.test(e)){const t=this.swapParseMode(e),i=this.parseSimpleToken();return this.swapParseMode(t),i}}const a=this.parseMode;this.parseMode=e;const r=this.swapAtoms([]);if("string"===e)i=this.scanString(),this.skipUntilToken("<}>");else if("balanced-string"===e)i=this.scanBalancedString(),this.skipUntilToken("<}>");else if("number"===e)i=this.scanNumber(),this.skipUntilToken("<}>");else if("dimen"===e)i=this.scanDimen(),this.skipUntilToken("<}>");else if("skip"===e)i=this.scanSkip(),this.skipUntilToken("<}>");else if("colspec"===e)i=this.scanColspec(),this.skipUntilToken("<}>");else if("color"===e)i=this.scanColor()||"#ffffff",this.skipUntilToken("<}>");else if("delim"===e)i=this.scanDelim()||".",this.skipUntilToken("<}>");else{const t=this.index;let a=1;do{const e=this.get();"<}>"===e&&(a-=1),"<{>"===e&&(a+=1)}while(a>0&&!this.end());if(i=function(e,t,i,a){var r;return(null===(r=y[e])||void 0===r?void 0:r.parse)?y[e].parse(t,i,a):null}(e,this.tokens.slice(t,this.index-1),this.onError,{args:this.args,macros:this.macros,smartFence:this.smartFence,style:this.style,parse:(e,t,a)=>{const r=new Qe(t,a.args,a.macros,this.onError);return r.parseMode=e,r.style=a.style,i=r.parse(),[i,t.slice(r.index)]}}),!i){this.index=t;do{this.atoms=this.atoms.concat(this.parse())}while(!this.match("<}>")&&!this.end())}}this.parseMode=a;const n=this.swapAtoms(r);return null!=i?i:n}parseOptionalArgument(e){var t;if(e="auto"===e?this.parseMode:e,this.matchWhitespace(),!this.match("["))return null;const i=this.parseMode;this.parseMode=e;const a=this.swapAtoms();let r;for(;!this.end()&&!this.match("]");)if("string"===e)r=this.scanString();else if("number"===e)r=this.scanNumber();else if("dimen"===e)r=this.scanDimen();else if("skip"===e)r=this.scanSkip();else if("colspec"===e)r=this.scanColspec();else if("color"===e)r=null!==(t=this.scanColor())&&void 0!==t?t:"#ffffff";else if("bbox"===e){const e=this.scanString().toLowerCase().trim().split(/,(?![^(]*\)(?:(?:[^(]*\)){2})*[^"]*$)/),t={};for(const i of e){const e=ye(i);if(e)t.backgroundcolor=e;else{const e=i.match(/^\s*([0-9.]+)\s*([a-z][a-z])/);if(e)t.padding=o(e[1],e[2]);else{const e=i.match(/^\s*border\s*:\s*(.*)/);e&&(t.border=e[1])}}}r=t}else this.atoms=this.atoms.concat(this.parse(e=>"]"===e));this.parseMode=i;const n=this.swapAtoms(a);return null!=r?r:n}parseSimpleToken(){const t=this.get();if(!t)return null;let i=null;if(""===t)"text"===this.parseMode&&(i=new Oe("text",""," ",this.style),i.symbol=" ");else if("\\"===t[0]){if("\\placeholder"===t)i=new Oe(this.parseMode,"placeholder",this.parseArgument("string"),this.style),i.captureSelection=!0;else if("\\char"===t){const e=this.index;let t=Math.floor(this.scanNumber(!0));(!isFinite(t)||t<0||t>1114111)&&(t=10067),i=new Oe(this.parseMode,"math"===this.parseMode?"mord":"",String.fromCodePoint(t)),i.symbol="\\char",i.latex="\\char"+f(this.tokens.slice(e,this.index))}else if("\\hskip"===t||"\\kern"===t){const e=this.scanSkip();isFinite(e)&&(i=new Oe(this.parseMode,"spacing",null,this.style),i.width=e,i.symbol=t,i.latex=t)}else if(i=this.scanMacro(t),!i){const e=ae(t,this.parseMode,{});if(!e)return this.onError({code:"unknown-command",arg:t}),i=new Oe("math","error",t),i.symbol=t,i.latex=t,[i];if(e.mode&&!e.mode.includes(this.parseMode))return this.onError({code:"invalid-command",arg:t}),i=new Oe("math","error",t),i.symbol=t,i.latex=t,[i];const a=this.index,[r,n]=this.parseArguments(e);if(!n)return null;if(e.infix)this.onError({code:"too-many-infix-commands",arg:t});else{if(e.parse){const a=e.parse(t,n);if(a.type)i=new Oe(this.parseMode,e.type,r?this.parseArgument(r):null,{...this.style,...a});else{const e=this.parseMode;if(a.mode&&(this.parseMode=a.mode,delete a.mode),a.mathstyle){this.parseMode="math";const e=new Oe("math","mathstyle");e.mathstyle=a.mathstyle,this.atoms.push(e)}if(r){const e=this.style;this.style={...this.style,...a},i=this.parseArgument(r),this.style=e}else this.style={...this.style,...a};this.parseMode=e}}else{const a={...this.style,variant:e.variant||this.style.variant,variantStyle:e.variantStyle||this.style.variantStyle};i=new Oe(this.parseMode,e.type||"mop",e.value||t,a)}if(i instanceof Oe&&!/^\\(llap|rlap|class|cssId)$/.test(t)){i.symbol=t;const e=f(this.tokens.slice(a,this.index));if(e&&(i.latex=i.symbol+e),i.isFunction&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}}}}else if(Ye(t)){const e=ae(t,this.parseMode,this.macros);if(e){const a={...this.style};i=new Oe(this.parseMode,e.type,e.value||t,a),e.isFunction&&(i.isFunction=!0)}else i=new Oe(this.parseMode,"math"===this.parseMode?"mord":"",t,this.style);if(i.symbol=t,i.latex=Q(this.parseMode,t),(null==e?void 0:e.isFunction)&&this.smartFence){const e=this.scanSmartFence();e&&(i=[i,e])}}else"<}>"===t?this.onError({latex:"",code:"unbalanced-braces"}):this.onError({latex:"",code:"unexpected-token",arg:t});return i&&!e(i)?[i]:i}scanMacro(e){var t;const i=e.slice(1);if(!this.macros||!this.macros[i])return null;const a=this.index,r=[];let n,o=0;"string"==typeof this.macros[i]?(n=this.macros[i],/(^|[^\\])#1/.test(n)&&(o=1),/(^|[^\\])#2/.test(n)&&(o=2),/(^|[^\\])#3/.test(n)&&(o=3),/(^|[^\\])#4/.test(n)&&(o=4),/(^|[^\\])#5/.test(n)&&(o=5),/(^|[^\\])#6/.test(n)&&(o=6),/(^|[^\\])#7/.test(n)&&(o=7),/(^|[^\\])#8/.test(n)&&(o=8),/(^|[^\\])#9/.test(n)&&(o=9)):(n=this.macros[i].def,o=this.macros[i].args||0);for(let e=1;e<=o;e++)r[e]=this.matchLiteralArg();r["?"]=null===(t=this.args)||void 0===t?void 0:t["?"];const s=new Oe(this.parseMode,"group",Je(n,this.parseMode,r,this.macros,!1,this.onError));return s.captureSelection=!0,s.symbol=e,s.latex=e+f(this.tokens.slice(a)),s}parseToken(){let t=this.parseEnvironment()||this.parseModeShift()||this.parseModeSet()||this.parseGroup()||this.parseLeftRight();return!(t||!this.parseSupSub()&&!this.parseLimits())||(t||(t=this.parseSimpleToken()),e(t)?this.atoms=this.atoms.concat(t):t&&this.atoms.push(t),null!==t)}}function Je(e,t,i,a,r=!1,n){let o=[];const s=new Qe(Ge(e,i),i,a,t=>{"function"==typeof n&&n({...t,latex:e})});for(s.parseMode=t||"math",r&&(s.smartFence=!0);!s.end();){const e=s.parse();e&&(o=o.concat(e))}return o}var et,tt;const it=null!==(tt=null===(et=document.currentScript)||void 0===et?void 0:et.src)&&void 0!==tt?tt:function(){const e=String((new Error).stack).replace(/^Error.*\n/,"").split("\n");if(0===e.length)return"";const t=e[0].match(/http.*js/);return t?t[0]:""}();async function at(e,t){var i;if((null===(i=getComputedStyle(document.documentElement).getPropertyValue("--ML__static-fonts"))||void 0===i||!i)&&"fonts"in document){const i=["KaTeX_Main","KaTeX_Math","KaTeX_AMS","KaTeX_Caligraphic","KaTeX_Fraktur","KaTeX_SansSerif","KaTeX_Script","KaTeX_Size1","KaTeX_Size2","KaTeX_Size3","KaTeX_Size4"];let a=!1;if(!/firefox/i.test(navigator.userAgent))try{a=i.every(e=>document.fonts.check("16px "+e))}catch(e){a=!1}if(!a){if(document.body.classList.contains("ML__fonts-loading"))return;document.body.classList.add("ML__fonts-loading");const i=new URL(null!=e?e:"./fonts",it).toString(),a=[["KaTeX_Main-Regular"],["KaTeX_Main-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_Main-Bold",{weight:"bold"}],["KaTeX_Main-Italic",{style:"italic"}],["KaTeX_Math-Italic",{style:"italic"}],["KaTeX_Math-BoldItalic",{style:"italic",weight:"bold"}],["KaTeX_AMS-Regular"],["KaTeX_Caligraphic-Regular"],["KaTeX_Caligraphic-Bold",{weight:"bold"}],["KaTeX_Fraktur-Regular"],["KaTeX_Fraktur-Bold",{weight:"bold"}],["KaTeX_SansSerif-Regular",{style:"italic"}],["KaTeX_SansSerif-Bold",{weight:"bold"}],["KaTeX_SansSerif-Italic",{style:"italic"}],["KaTeX_Script-Regular"],["KaTeX_Typewriter-Regular"],["KaTeX_Size1-Regular"],["KaTeX_Size2-Regular"],["KaTeX_Size3-Regular"],["KaTeX_Size4-Regular"]].map(e=>function(e,t,i={}){return new FontFace(e,`url(${t}.woff2) format('woff2'), url(${t}.woff) format('woff')`,i)}(e[0].replace(/-[a-zA-Z]+$/,""),i+"/"+e[0],e[1]));try{(await Promise.all(a.map(e=>{try{return e.load()}catch(e){"function"==typeof t&&t({code:"font-not-found",arg:e})}}))).forEach(e=>document.fonts.add(e)),document.body.classList.remove("ML__fonts-loading")}catch(e){}}}}function rt(e,t){var i,a;if(!t)return null;let r=null!==(i=null==e?void 0:e.getRootNode())&&void 0!==i?i:null===document||void 0===document?void 0:document.head;if(!r)return null;r===document&&(r=document.head);const n=function(e){let t=0;if(0===e.length)return t;for(let i=0;i{var e;const t=document.head.querySelector(`style[data-id="${n}"]`);if(t){const i=parseFloat(null!==(e=t.getAttribute("data-refcount"))&&void 0!==e?e:"0");1===i?t.remove():t.setAttribute("data-refcount",Number(i-1).toString())}}}}function nt(e){return 0===e.length||1===e.length&&"first"===e[0].type}function ot(e){const t=e.siblings();for(let e=t.length-1;e>=0;e--)t[e].isSuggestion&&t.splice(e,1)}function st(e){let t=1,i=e.ancestor(t);for(;i;)i.latex=void 0,t+=1,i=e.ancestor(t)}function lt(e,t){let i="";for(const t of e)i+=t.relation+":"+t.offset+"/";return t&&(i+="#"+t),i}function ct(e){const t={path:[],extent:0},i=e.split("#");i.length>1&&(t.extent=parseInt(i[1]));const a=i[0].split("/");for(const e of a){const i=e.match(/([^:]*):(.*)/);i&&t.path.push({relation:i[1],offset:parseInt(i[2])})}return t}function dt(e,t){let i=0,a=-1,r=!1;for(;!r;)a+=1,r=a>=e.length||a>=t.length,r=r||!(e[a].relation===t[a].relation&&e[a].offset===t[a].offset);return i=a===e.length&&a===t.length?0:a+1===e.length&&a+1===t.length&&e[a].relation===t[a].relation?1:2,i}function mt(e){return ct(lt(e)).path}function pt(e,t){let i=0;for(let a=0;a0;)a.col+=1,(!e[a.row]||a.col>=e[a.row].length)&&(a.col=0,a.row+=1),i-=1;return a}function ht(t,i){var a;let r;return"object"!=typeof i&&(i=ut(t,i)),e(t[i.row])&&(r=null!==(a=t[i.row][i.col])&&void 0!==a?a:null),!r||0!==r.length&&"first"===r[0].type||r.unshift(new Oe("math","first")),r}function ft(e){let t=0,i=0,a=1;for(const t of e)i+=1,t.length>a&&(a=t.length);return t=i*a,t}function gt(e,t,i){const a={...t};if(a.row+=i,a.row<0){if(a.col+=i,a.row=e.length-1,a.col<0)return null;for(;a.row>=0&&!ht(e,a);)a.row-=1;if(a.row<0)return null}else if(a.row>=e.length){for(a.col+=i,a.row=0;a.rowe.length-1)return null}return a}class yt{constructor(e,t,i,a){this.options={mode:"math",removeExtraneousParentheses:!1,...e},this.root=Be(this.options.mode),this.path=[{relation:"body",offset:0}],this.extent=0,this.setListeners(t),this.setHooks(i),this.mathfield=a,this.suppressChangeNotifications=!1}clone(){const e=new yt(this.options,this.listeners,this.hooks,this.mathfield);return e.root=this.root,e.path=mt(this.path),e}setListeners(e){this.listeners=e}setHooks(e){this.hooks={announce:(null==e?void 0:e.announce)?e.announce:(e,t,i,a)=>{},moveOut:(null==e?void 0:e.moveOut)?e.moveOut:()=>!0,tabOut:(null==e?void 0:e.tabOut)?e.tabOut:()=>!0}}announce(e,t,i=[]){this.hooks.announce(this.mathfield,e,t,i)}toString(){return lt(this.path,this.extent)}siblings(){var e;if(0===this.path.length)return[];let t;return this.parent().array?t=ht(this.parent().array,this.relation()):(t=null!==(e=this.parent()[this.relation()])&&void 0!==e?e:[],"string"==typeof t&&(t=[])),0!==t.length&&"first"===t[0].type||t.unshift(new Oe(this.parent().mode,"first")),t}anchorOffset(){return this.path.length>0?this.path[this.path.length-1].offset:0}focusOffset(){return this.path.length>0?this.path[this.path.length-1].offset+this.extent:0}startOffset(){return Math.min(this.focusOffset(),this.anchorOffset())}endOffset(){return Math.max(this.focusOffset(),this.anchorOffset())}sibling(e){return this.siblings()[this.startOffset()+e]}ancestor(e){if(e>this.path.length)return null;let t=this.root;for(let i=0;i0?this.path[this.path.length-1].relation:""}insertFirstAtom(){this.siblings()}}function bt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionWillChange)||e.suppressChangeNotifications||e.listeners.onSelectionWillChange(e)}function vt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onSelectionDidChange)||e.suppressChangeNotifications||e.listeners.onSelectionDidChange(e)}function xt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentWillChange)||e.suppressChangeNotifications||e.listeners.onContentWillChange(e)}function kt(e){var t;"function"!=typeof(null===(t=e.listeners)||void 0===t?void 0:t.onContentDidChange)||e.suppressChangeNotifications||e.listeners.onContentDidChange(e)}function _t(e){return!!e&&("mord"===e.type&&/[0-9.]/.test(e.body)||"mpunct"===e.type&&","===e.body)}function wt(e){const t=e.siblings();if(t.length<=1)return null;let i=Math.min(e.endOffset(),t.length-1);if("command"!==t[i].type)return null;for(;i>0&&"command"===t[i].type;)i-=1;let a=e.startOffset()+1;for(;a<=t.length-1&&"command"===t[a].type;)a+=1;return a>i?{start:i+1,end:a}:null}function Mt(e){const t=Ft(e)?Wt(e):e.sibling(1);let i;if(t){if("command"===t.type)return"command";i=t.mode}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i=r.mode),a+=1,r=e.ancestor(a);return i}function St(e){const t=Ft(e)?Wt(e):e.sibling(1);let i;if(t&&"first"!==t.type){if("command"===t.type)return{};i={color:t.color,backgroundColor:t.backgroundColor,fontFamily:t.fontFamily,fontShape:t.fontShape,fontSeries:t.fontSeries,fontSize:t.fontSize}}let a=1,r=e.ancestor(a);for(;!i&&r;)r&&(i={color:r.color,backgroundColor:r.backgroundColor,fontFamily:r.fontFamily,fontShape:r.fontShape,fontSeries:r.fontSeries,fontSize:r.fontSize}),a+=1,r=e.ancestor(a);return i}function zt(e,t=1,i=!0){var a;const r=e.suppressChangeNotifications;e.suppressChangeNotifications=!0;const n=e.clone(),o=e.extent;$t(e,t),"placeholder"===Wt(e).type&&$t(e,t);const s=Zt(e,(t,i)=>"placeholder"===i.type||t.length>1&&1===e.siblings().length,t);if(0===s.length){if(Ut(e,n,o),i&&(null===(a=e.hooks)||void 0===a?void 0:a.tabOut)&&e.hooks.tabOut(e,t>0?"forward":"backward")&&document.activeElement){const e='a[href]:not([disabled]),\n button:not([disabled]),\n textarea:not([disabled]),\n input[type=text]:not([disabled]),\n select:not([disabled]),\n [contentEditable="true"],\n [tabindex]:not([disabled]):not([tabindex="-1"])',i=Array.prototype.filter.call(document.querySelectorAll(e),e=>(e.offsetWidth>0||e.offsetHeight>0)&&!e.contains(document.activeElement)||e===document.activeElement);let a=i.indexOf(document.activeElement)+t;a<0&&(a=i.length-1),a>=i.length&&(a=0),i[a].focus()}return e.suppressChangeNotifications=r,!1}return bt(e),Ut(e,s[0]),"placeholder"===Wt(e).type&&Pt(e,-1),e.announce("move",n),vt(e),e.suppressChangeNotifications=r,!0}function Lt(e,t=0,i=0,a=""){const r=e.path[e.path.length-1].relation;a||(a=r);const n=e.parent();if(!n&&"body"!==a)return!1;const o=a.startsWith("cell");if(!o&&!n[a]||o&&!n.array)return!1;const s=a!==r;e.path[e.path.length-1].relation=a;const l=e.siblings().length;e.path[e.path.length-1].relation=r;const c=e.extent;"end"===i?i=l-t-1:"start"===i&&(i=-t),Pt(e,i);const d=e.extent!==c;Pt(e,c),t<0&&(t=l+t),t=Math.max(0,Math.min(t,l-1));const m=e.path[e.path.length-1].offset;return(s||m!==t||d)&&(s&&Gt(e),bt(e),e.path[e.path.length-1].relation=a,e.path[e.path.length-1].offset=t,Pt(e,i),vt(e)),!0}function At(t,i){var a;i=null!=i?i:{};const r={body:"numer",numer:"denom",denom:"index",index:"overscript",overscript:"underscript",underscript:"subscript",subscript:"superscript"};if(t.anchorOffset()===t.siblings().length-1){Gt(t);let e=r[t.relation()];const n=t.parent();for(;e&&!n[e];)e=r[e];if(e)return void Lt(t,0,0,e);if(t.parent().array){const e=ft(t.parent().array);let i=parseInt(t.relation().match(/cell([0-9]*)$/)[1])+1;for(;i=0;){if(ht(t.parent().array,e)&&Lt(t,-1,0,"cell"+e))return void vt(t);e-=1}}return 1===t.path.length?(t.suppressChangeNotifications||!(null===(a=t.hooks)||void 0===a?void 0:a.moveOut)||t.hooks.moveOut(t,"backward"))&&(t.path[0].offset=t.root.body.length-1):(t.path.pop(),Lt(t,t.anchorOffset()-1)),void vt(t)}const n=Wt(t);if(!n.captureSelection){let i;if(n.array){i="";const e=ft(n.array);let a=e-1;for(;!i&&a0)for(Rt(e)&&t--;t>0;)At(e),t--;else if(t<0)for(It(e)&&t++;0!==t;)qt(e),t++;e.announce("move",i)}return!0}function Ct(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;It(e);const r=e.relation();if("denom"===r)a?(bt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Pt(e,1),vt(e)):Lt(e,e.anchorOffset(),0,"numer"),e.announce("moveUp");else if(e.parent().array){let i=ut(e.parent().array,r);i=gt(e.parent().array,i,-1),i&&ht(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+pt(e.parent().array,i),Lt(e,e.anchorOffset()),e.announce("moveUp")):$t(e,-1,t)}else e.announce("line");return!0}function Dt(e,t){var i;const a=null!==(i=(t=null!=t?t:{extend:!1}).extend)&&void 0!==i&&i;Rt(e);const r=e.relation();if("numer"===r)a?(bt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Pt(e,1),vt(e)):Lt(e,e.anchorOffset(),0,"denom"),e.announce("moveDown");else if(e.parent().array){let i=ut(e.parent().array,r);i=gt(e.parent().array,i,1),i&&ht(e.parent().array,i)?(e.path[e.path.length-1].relation="cell"+pt(e.parent().array,i),Lt(e,e.anchorOffset()),e.announce("moveDown")):$t(e,1,t)}else e.announce("line");return!0}function Tt(e,t){let i=e.path[e.path.length-1].offset,a=0;const r=e.clone();a=e.extent+t;const n=i+a;if(n<0&&0!==a){if(e.path.length>1)return bt(e),e.path.pop(),Pt(e,-1),vt(e),e.announce("move",r),!0;i=e.path[e.path.length-1].offset,a=e.extent}else if(n>=e.siblings().length){if(e.path.length>1)return bt(e),e.path.pop(),e.path[e.path.length-1].offset-=1,Pt(e,1),vt(e),e.announce("move",r),!0;Ft(e)&&(i-=1),a-=1}return Lt(e,i,a),e.announce("move",r),!0}function Et(e,t,i){var a;const r=null!==(a=(i=null!=i?i:{extend:!1}).extend)&&void 0!==a&&a;t=t<0?-1:1;const n=e.clone(),o=e.siblings(),s=e.focusOffset();let l=s+t;if(r&&(l=Math.min(Math.max(0,l),o.length-1)),l<0||l>=o.length)$t(e,t,i);else{if(o[l]&&"text"===o[l].mode){if(l=function(e,t,i){i=i<0?-1:1;const a=e.siblings();if(!a[t])return t;if("text"!==a[t].mode)return t;let r;if(V.test(a[t].body)){let e,n=t;do{e="text"===a[n].mode&&V.test(a[n].body),n+=i}while(a[n]&&e);r=a[n]?n-2*i:n-i}else if(/\s/.test(a[t].body)){let e=t;for(;a[e]&&"text"===a[e].mode&&/\s/.test(a[e].body);)e+=i;if(a[e]){let t=!0;do{t="text"===a[e].mode&&!/\s/.test(a[e].body),e+=i}while(a[e]&&t);r=a[e]?e-2*i:e-i}else r=e-i}else{let e=t;for(;a[e]&&"text"===a[e].mode&&!/\s/.test(a[e].body);)e+=i;r=a[e]?e:e-i;let n=!0;for(;a[e]&&n;)n="text"===a[e].mode&&/\s/.test(a[e].body),n&&(r=e),e+=i;r=a[e]?e-2*i:e-i}return r-(i>0?0:1)}(e,l,t),l<0&&!r)return void Lt(e,0);if(l>o.length)return Lt(e,o.length-1),void $t(e,t,i)}else{const e=o[l]?o[l].type:"";if("mopen"===e&&t>0||"mclose"===e&&t<0){let i="mopen"===e?1:-1;for(l+=t>0?1:-1;l>=0&&l0&&(l-=1)}else{for(;o[l]&&"math"===o[l].mode&&o[l].type===e;)l+=t;l-=t>0?1:0}}if(r){const t=e.anchorOffset();Lt(e,t,l-t)}else Lt(e,l);e.announce("move",n)}}function Kt(e,t=1,i){var a;i=null!=i?i:{extend:!1},t=t<0?-1:1;const r=e.clone(),n=[{relation:"body",offset:e.path[0].offset}];let o;return null!==(a=!i.extend)&&void 0!==a&&a?(n[0].offset=t<0?0:e.root.body.length-1,o=0):t<0?n[0].offset>0&&(o=-n[0].offset):n[0].offset=a)return Lt(e,e.endOffset()-1,1),!0;Lt(e,i,a-i)}else if("mord"===e.sibling(0).type&&/[0-9,.]/.test(e.sibling(0).body)){let i=e.startOffset(),a=e.endOffset();for(;_t(t[i]);)i-=1;for(;_t(t[a]);)a+=1;a-=1,Lt(e,i,a-i)}else Lt(e,0,"end");return!0}function Bt(e){return e.path=[{relation:"body",offset:0}],Lt(e,0,"end")}function Ft(e){return 0===e.extent}function Pt(e,t){return e.extent=t,!0}function Rt(e){return 0!==e.extent&&(Lt(e,e.endOffset()),!0)}function It(e){return 0!==e.extent&&(Lt(e,e.startOffset()),!0)}function Ht(e){if(e.path.length>1){const t=e.clone();return e.path.pop(),Pt(e,0),e.announce("move",t),!0}return e.announce("plonk"),!1}function Wt(e){if(e.parent().array)return ht(e.parent().array,e.relation())[e.anchorOffset()];const t=e.siblings();return t[Math.min(t.length-1,e.anchorOffset())]}function Vt(e,t,i,a={extendToWordBoundary:!1}){const r=dt(t,i);if(0===r)return a.extendToWordBoundary?Vt(e,t=Xt(e,t,-1),i=Xt(e,i,1)):Ut(e,mt(t),0);if(1===r){const r=i[i.length-1].offset-t[t.length-1].offset;return a.extendToWordBoundary?Vt(e,t=Xt(e,t,r<0?1:-1),i=Xt(e,i,r<0?-1:1)):Ut(e,mt(t),r)}let n=function(e,t){const i=[],a=Math.min(e.length-1,t.length-1);let r=0;for(;r<=a&&e[r].relation===t[r].relation&&e[r].offset===t[r].offset;)i.push(e[r]),r+=1;return i}(t,i);const o=n.length;if(t.length===o||i.length===o||t[o].relation!==i[o].relation)return Ut(e,n,-1);n.push(t[o]),n=mt(n);let s=i[o].offset-t[o].offset+1;return s<=0?i.length>o+1?(n[o].relation=i[o].relation,n[o].offset=i[o].offset,n[n.length-1].offset-=1,s=2-s):(n[o].relation=i[o].relation,n[o].offset=i[o].offset,s=1-s):i.length<=t.length?n[n.length-1].offset-=1:i.length>t.length&&(n[o].offset-=1),Ut(e,n,s)}function Ut(t,i,a=0){let r;if("string"==typeof i)r=ct(i);else if(e(i)){const e=mt(i),n=t.path;t.path=e,0===a&&"placeholder"===Wt(t).type&&(e[e.length-1].offset=t.anchorOffset()-1,a=1),r={path:e,extent:a||0},t.path=n}else r=i;const n=0!==dt(t.path,r.path),o=r.extent!==t.extent;return(n||o)&&(n&&Gt(t),bt(t),t.path=mt(r.path),t.siblings().length=0?Rt(r):(It(r),$t(r,1));const n=Wt(r);do{t.bind(r)(r.path,Wt(r))&&a.push(r.toString()),i>=0?At(r,{iterateAll:!0}):qt(r,{iterateAll:!0})}while(n!==Wt(r));return a}const Yt="apple"===ti()?{id:"apple.en-intl",displayName:"English (international)",platform:"apple",locale:"en",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","ı"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","Î"],KeyE:["e","E","´","´"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","˝"],KeyH:["h","H","˙","Ó"],KeyI:["i","I","ˆ","ˆ"],KeyJ:["j","J","∆","Ô"],KeyK:["k","K","˚",""],KeyL:["l","L","¬","Ò"],KeyM:["m","M","µ","Â"],KeyN:["n","N","˜","˜"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®","‰"],KeyS:["s","S","ß","Í"],KeyT:["t","T","†","ˇ"],KeyU:["u","U","¨","¨"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","˛"],KeyY:["y","Y","¥","Á"],KeyZ:["z","Z","Ω","¸"],Digit1:["1","!","¡","⁄"],Digit2:["2","@","™","€"],Digit3:["3","#","£","‹"],Digit4:["4","$","¢","›"],Digit5:["5","%","∞","fi"],Digit6:["6","ˆ","§","fl"],Digit7:["7","&","¶","‡"],Digit8:["8","*","•","°"],Digit9:["9","(","ª","·"],Digit0:["0",")","º","‚"],Space:[" "," "," "," "],Minus:["-","_","–","—"],Equal:["=","+","≠","±"],BracketLeft:["[","{","“","”"],BracketRight:["]","}","‘","’"],Backslash:["\\","|","«","»"],Semicolon:[";",":","…","Ú"],Quote:["'",'"',"æ","Æ"],Backquote:["`","˜","`","`"],Comma:[",","<","≤","¯"],Period:[".",">","≥","˘"],Slash:["/","?","÷","¿"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[".",".",".","."],IntlBackslash:["§","±","§","±"],NumpadEqual:["=","=","=","="],AudioVolumeUp:["","=","","="]}}:"windows"===ti()?{id:"windows.en-intl",displayName:"English (international)",platform:"windows",locale:"en",score:0,mapping:{KeyA:["a","A","á","Á"],KeyB:["b","B","",""],KeyC:["c","C","©","¢"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","é","É"],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","í","Í"],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","ø","Ø"],KeyM:["m","M","µ",""],KeyN:["n","N","ñ","Ñ"],KeyO:["o","O","ó","Ó"],KeyP:["p","P","ö","Ö"],KeyQ:["q","Q","ä","Ä"],KeyR:["r","R","®",""],KeyS:["s","S","ß","§"],KeyT:["t","T","þ","Þ"],KeyU:["u","U","ú","Ú"],KeyV:["v","V","",""],KeyW:["w","W","å","Å"],KeyX:["x","X","",""],KeyY:["y","Y","ü","Ü"],KeyZ:["z","Z","æ","Æ"],Digit1:["1","!","¡","¹"],Digit2:["2","@","²",""],Digit3:["3","#","³",""],Digit4:["4","$","¤","£"],Digit5:["5","%","€",""],Digit6:["6","^","¼",""],Digit7:["7","&","½",""],Digit8:["8","*","¾",""],Digit9:["9","(","‘",""],Digit0:["0",")","’",""],Space:[" "," ","",""],Minus:["-","_","¥",""],Equal:["=","+","×","÷"],BracketLeft:["[","{","«",""],BracketRight:["]","}","»",""],Backslash:["\\","|","¬","¦"],Semicolon:[";",":","¶","°"],Quote:["'",'"',"´","¨"],Backquote:["`","~","",""],Comma:[",","<","ç","Ç"],Period:[".",">","",""],Slash:["/","?","¿",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["\\","|","",""]}}:{id:"linux.en",displayName:"English",platform:"linux",locale:"en",score:0,mapping:{KeyA:["a","A","a","A"],KeyB:["b","B","b","B"],KeyC:["c","C","c","C"],KeyD:["d","D","d","D"],KeyE:["e","E","e","E"],KeyF:["f","F","f","F"],KeyG:["g","G","g","G"],KeyH:["h","H","h","H"],KeyI:["i","I","i","I"],KeyJ:["j","J","j","J"],KeyK:["k","K","k","K"],KeyL:["l","L","l","L"],KeyM:["m","M","m","M"],KeyN:["n","N","n","N"],KeyO:["o","O","o","O"],KeyP:["p","P","p","P"],KeyQ:["q","Q","q","Q"],KeyR:["r","R","r","R"],KeyS:["s","S","s","S"],KeyT:["t","T","t","T"],KeyU:["u","U","u","U"],KeyV:["v","V","v","V"],KeyW:["w","W","w","W"],KeyX:["x","X","x","X"],KeyY:["y","Y","y","Y"],KeyZ:["z","Z","z","Z"],Digit1:["1","!","1","!"],Digit2:["2","@","2","@"],Digit3:["3","#","3","#"],Digit4:["4","$","4","$"],Digit5:["5","%","5","%"],Digit6:["6","^","6","^"],Digit7:["7","&","7","&"],Digit8:["8","*","8","*"],Digit9:["9","(","9","("],Digit0:["0",")","0",")"],Space:[" "," "," "," "],Minus:["-","_","-","_"],Equal:["=","+","=","+"],BracketLeft:["[","{","[","{"],BracketRight:["]","}","]","}"],Backslash:["\\","|","\\","|"],Semicolon:[";",":",";",":"],Quote:["'",'"',"'",'"'],Backquote:["`","~","`","~"],Comma:[",","<",",","<"],Period:[".",">",".",">"],Slash:["/","?","/","?"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}},Qt={enter:"[Enter]",escape:"[Escape]",backspace:"[Backspace]",tab:"[Tab]",space:"[Space]",pausebreak:"[Pause]",insert:"[Insert]",home:"[Home]",pageup:"[PageUp]",delete:"[Delete]",end:"[End]",pagedown:"[PageDown]",right:"[ArrowRight]",left:"[ArrowLeft]",down:"[ArrowDown]",up:"[ArrowUp]",numpad0:"[Numpad0]",numpad1:"[Numpad1]",numpad2:"[Numpad2]",numpad3:"[Numpad3]",numpad4:"[Numpad4]",numpad5:"[Numpad5]",numpad6:"[Numpad6]",numpad7:"[Numpad7]",numpad8:"[Numpad8]",numpad9:"[Numpad9]",numpad_divide:"[NumpadDivide]",numpad_multiply:"[NumpadMultiply]",numpad_subtract:"[NumpadSubtract]",numpad_add:"[NumpadAdd]",numpad_decimal:"[NumpadDecimal]",numpad_separator:"[NumpadComma]",capslock:"[Capslock]",f1:"[F1]",f2:"[F2]",f3:"[F3]",f4:"[F4]",f5:"[F5]",f6:"[F6]",f7:"[F7]",f8:"[F8]",f9:"[F9]",f10:"[F10]",f11:"[F11]",f12:"[F12]",f13:"[F13]",f14:"[F14]",f15:"[F15]",f16:"[F16]",f17:"[F17]",f18:"[F18]",f19:"[F19]"},Jt=[];let ei;function ti(){let e="linux";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?e="apple":/^(win)/i.test(navigator.platform)?e="windows":/(android)/i.test(navigator.userAgent)?e="linux":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e="apple":/\bCrOS\b/i.test(navigator.userAgent)&&(e="linux")),e}function ii(e){e.platform===ti()&&Jt.push(e)}function ai(e){ei=Jt.find(t=>e.startsWith(t.locale))}function ri(){return null!=ei?ei:Jt[0]}ii(Yt),ii({id:"apple.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","‡","Ω"],KeyB:["b","B","ß","∫"],KeyC:["c","C","©","¢"],KeyD:["d","D","∂","∆"],KeyE:["e","E","ê","Ê"],KeyF:["f","F","ƒ","·"],KeyG:["g","G","fi","fl"],KeyH:["h","H","Ì","Î"],KeyI:["i","I","î","ï"],KeyJ:["j","J","Ï","Í"],KeyK:["k","K","È","Ë"],KeyL:["l","L","¬","|"],KeyM:[",","?","∞","¿"],KeyN:["n","N","~","ı"],KeyO:["o","O","œ","Œ"],KeyP:["p","P","π","∏"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","®","‚"],KeyS:["s","S","Ò","∑"],KeyT:["t","T","†","™"],KeyU:["u","U","º","ª"],KeyV:["v","V","◊","√"],KeyW:["z","Z","Â","Å"],KeyX:["x","X","≈","⁄"],KeyY:["y","Y","Ú","Ÿ"],KeyZ:["w","W","‹","›"],Digit1:["&","1","","´"],Digit2:["é","2","ë","„"],Digit3:['"',"3","“","”"],Digit4:["'","4","‘","’"],Digit5:["(","5","{","["],Digit6:["§","6","¶","å"],Digit7:["è","7","«","»"],Digit8:["!","8","¡","Û"],Digit9:["ç","9","Ç","Á"],Digit0:["à","0","ø","Ø"],Space:[" "," "," "," "],Minus:[")","°","}","]"],Equal:["-","_","—","–"],BracketLeft:["^","¨","ô","Ô"],BracketRight:["$","*","€","¥"],Backslash:["`","£","@","#"],Semicolon:["m","M","µ","Ó"],Quote:["ù","%","Ù","‰"],Backquote:["<",">","≤","≥"],Comma:[";",".","…","•"],Period:[":","/","÷","\\"],Slash:["=","+","≠","±"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",".",",","."],IntlBackslash:["@","#","•","Ÿ"],NumpadEqual:["=","=","=","="]}}),ii({id:"apple.spanish",locale:"es",displayName:"Spanish ISO",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","ß",""],KeyC:["c","C","©"," "],KeyD:["d","D","∂","∆"],KeyE:["e","E","€","€"],KeyF:["f","F","ƒ","fi"],KeyG:["g","G","","fl"],KeyH:["h","H","™"," "],KeyI:["i","I"," "," "],KeyJ:["j","J","¶","¯"],KeyK:["k","K","§","ˇ"],KeyL:["l","L"," ","˘"],KeyM:["m","M","µ","˚"],KeyN:["n","N"," ","˙"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","œ","Œ"],KeyR:["r","R","®"," "],KeyS:["s","S","∫"," "],KeyT:["t","T","†","‡"],KeyU:["u","U"," "," "],KeyV:["v","V","√","◊"],KeyW:["w","W","æ","Æ"],KeyX:["x","X","∑","›"],KeyY:["y","Y","¥"," "],KeyZ:["z","Z","Ω","‹"],Digit1:["1","!","|","ı"],Digit2:["2",'"',"@","˝"],Digit3:["3","·","#","•"],Digit4:["4","$","¢","£"],Digit5:["5","%","∞","‰"],Digit6:["6","&","¬"," "],Digit7:["7","/","÷","⁄"],Digit8:["8","(","“","‘"],Digit9:["9",")","”","’"],Digit0:["0","=","≠","≈"],Space:[" "," "," "," "],Minus:["'","?","´","¸"],Equal:["¡","¿","‚","˛"],BracketLeft:["`","^","[","ˆ"],BracketRight:["+","*","]","±"],Backslash:["ç","Ç","}","»"],Semicolon:["ñ","Ñ","~","˜"],Quote:["´","¨","{","«"],Backquote:["<",">","≤","≥"],Comma:[",",";","„",""],Period:[".",":","…","…"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],Numpad1:["1","1","1","1"],Numpad2:["2","2","2","2"],Numpad3:["3","3","3","3"],Numpad4:["4","4","4","4"],Numpad5:["5","5","5","5"],Numpad6:["6","6","6","6"],Numpad7:["7","7","7","7"],Numpad8:["8","8","8","8"],Numpad9:["9","9","9","9"],Numpad0:["0","0","0","0"],NumpadDecimal:[",",",",",",","],IntlBackslash:["º","ª","\\","°"]}}),ii({id:"windows.spanish",locale:"es",displayName:"Spanish",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["z","Z","",""],Digit1:["1","!","|",""],Digit2:["2",'"',"@",""],Digit3:["3","·","#",""],Digit4:["4","$","~",""],Digit5:["5","%","€",""],Digit6:["6","&","¬",""],Digit7:["7","/","",""],Digit8:["8","(","",""],Digit9:["9",")","",""],Digit0:["0","=","",""],Space:[" "," ","",""],Minus:["'","?","",""],Equal:["¡","¿","",""],BracketLeft:["`","^","[",""],BracketRight:["+","*","]",""],Backslash:["ç","Ç","}",""],Semicolon:["ñ","Ñ","",""],Quote:["´","¨","{",""],Backquote:["º","ª","\\",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ii({id:"linux.spanish",locale:"es",displayName:"Spanish",platform:"linux",score:0,mapping:{KeyA:["a","A","æ","Æ"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:["m","M","µ","º"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["q","Q","@","Ω"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["w","W","ł","Ł"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["z","Z","«","<"],Digit1:["1","!","|","¡"],Digit2:["2",'"',"@","⅛"],Digit3:["3","·","#","£"],Digit4:["4","$","~","$"],Digit5:["5","%","½","⅜"],Digit6:["6","&","¬","⅝"],Digit7:["7","/","{","⅞"],Digit8:["8","(","[","™"],Digit9:["9",")","]","±"],Digit0:["0","=","}","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:["'","?","\\","¿"],Equal:["¡","¿","̃","~"],BracketLeft:["̀","̂","[","̊"],BracketRight:["+","*","]","̄"],Backslash:["ç","Ç","}","̆"],Semicolon:["ñ","Ñ","~","̋"],Quote:["́","̈","{","{"],Backquote:["º","ª","\\","\\"],Comma:[",",";","─","×"],Period:[".",":","·","÷"],Slash:["-","_","̣","̇"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadEnter:["\r","\r","\r","\r"],Numpad1:["","1","","1"],Numpad2:["","2","","2"],Numpad3:["","3","","3"],Numpad4:["","4","","4"],Numpad5:["","5","","5"],Numpad6:["","6","","6"],Numpad7:["","7","","7"],Numpad8:["","8","","8"],Numpad9:["","9","","9"],Numpad0:["","0","","0"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"],NumpadEqual:["=","=","=","="],NumpadComma:[".",".",".","."],NumpadParenLeft:["(","(","(","("],NumpadParenRight:[")",")",")",")"]}}),ii({id:"linux.french",locale:"fr",displayName:"French",platform:"apple",score:0,mapping:{KeyA:["q","Q","@","Ω"],KeyB:["b","B","”","’"],KeyC:["c","C","¢","©"],KeyD:["d","D","ð","Ð"],KeyE:["e","E","€","¢"],KeyF:["f","F","đ","ª"],KeyG:["g","G","ŋ","Ŋ"],KeyH:["h","H","ħ","Ħ"],KeyI:["i","I","→","ı"],KeyJ:["j","J","̉","̛"],KeyK:["k","K","ĸ","&"],KeyL:["l","L","ł","Ł"],KeyM:[",","?","́","̋"],KeyN:["n","N","n","N"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","þ","Þ"],KeyQ:["a","A","æ","Æ"],KeyR:["r","R","¶","®"],KeyS:["s","S","ß","§"],KeyT:["t","T","ŧ","Ŧ"],KeyU:["u","U","↓","↑"],KeyV:["v","V","“","‘"],KeyW:["z","Z","«","<"],KeyX:["x","X","»",">"],KeyY:["y","Y","←","¥"],KeyZ:["w","W","ł","Ł"],Digit1:["&","1","¹","¡"],Digit2:["é","2","~","⅛"],Digit3:['"',"3","#","£"],Digit4:["'","4","{","$"],Digit5:["(","5","[","⅜"],Digit6:["-","6","|","⅝"],Digit7:["è","7","`","⅞"],Digit8:["_","8","\\","™"],Digit9:["ç","9","^","±"],Digit0:["à","0","@","°"],Enter:["\r","\r","\r","\r"],Escape:["","","",""],Backspace:["\b","\b","\b","\b"],Tab:["\t","","\t",""],Space:[" "," "," "," "],Minus:[")","°","]","¿"],Equal:["=","+","}","̨"],BracketLeft:["̂","̈","̈","̊"],BracketRight:["$","£","¤","̄"],Backslash:["*","µ","̀","̆"],Semicolon:["m","M","µ","º"],Quote:["ù","%","̂","̌"],Backquote:["²","~","¬","¬"],Comma:[";",".","─","×"],Period:[":","/","·","÷"],Slash:["!","§","̣","̇"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:["",".","","."],IntlBackslash:["<",">","|","¦"]}}),ii({id:"windows.french",locale:"fr",displayName:"French",platform:"windows",score:0,mapping:{KeyA:["q","Q","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:[",","?","",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["a","A","",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["z","Z","",""],KeyX:["x","X","",""],KeyY:["y","Y","",""],KeyZ:["w","W","",""],Digit1:["&","1","",""],Digit2:["é","2","~",""],Digit3:['"',"3","#",""],Digit4:["'","4","{",""],Digit5:["(","5","[",""],Digit6:["-","6","|",""],Digit7:["è","7","`",""],Digit8:["_","8","\\",""],Digit9:["ç","9","^",""],Digit0:["à","0","@",""],Space:[" "," ","",""],Minus:[")","°","]",""],Equal:["=","+","}",""],BracketLeft:["^","¨","",""],BracketRight:["$","£","¤",""],Backslash:["*","µ","",""],Semicolon:["m","M","",""],Quote:["ù","%","",""],Backquote:["²","","",""],Comma:[";",".","",""],Period:[":","/","",""],Slash:["!","§","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","",""]}}),ii({id:"windows.german",locale:"de",displayName:"German",platform:"windows",score:0,mapping:{KeyA:["a","A","",""],KeyB:["b","B","",""],KeyC:["c","C","",""],KeyD:["d","D","",""],KeyE:["e","E","€",""],KeyF:["f","F","",""],KeyG:["g","G","",""],KeyH:["h","H","",""],KeyI:["i","I","",""],KeyJ:["j","J","",""],KeyK:["k","K","",""],KeyL:["l","L","",""],KeyM:["m","M","µ",""],KeyN:["n","N","",""],KeyO:["o","O","",""],KeyP:["p","P","",""],KeyQ:["q","Q","@",""],KeyR:["r","R","",""],KeyS:["s","S","",""],KeyT:["t","T","",""],KeyU:["u","U","",""],KeyV:["v","V","",""],KeyW:["w","W","",""],KeyX:["x","X","",""],KeyY:["z","Z","",""],KeyZ:["y","Y","",""],Digit1:["1","!","",""],Digit2:["2",'"',"²",""],Digit3:["3","§","³",""],Digit4:["4","$","",""],Digit5:["5","%","",""],Digit6:["6","&","",""],Digit7:["7","/","{",""],Digit8:["8","(","[",""],Digit9:["9",")","]",""],Digit0:["0","=","}",""],Space:[" "," ","",""],Minus:["ß","?","\\","ẞ"],Equal:["´","`","",""],BracketLeft:["ü","Ü","",""],BracketRight:["+","*","~",""],Backslash:["#","'","",""],Semicolon:["ö","Ö","",""],Quote:["ä","Ä","",""],Backquote:["^","°","",""],Comma:[",",";","",""],Period:[".",":","",""],Slash:["-","_","",""],NumpadDivide:["/","/","",""],NumpadMultiply:["*","*","",""],NumpadSubtract:["-","-","",""],NumpadAdd:["+","+","",""],IntlBackslash:["<",">","|",""]}}),ii({id:"apple.german",locale:"de",displayName:"German",platform:"apple",score:0,mapping:{KeyA:["a","A","å","Å"],KeyB:["b","B","∫","‹"],KeyC:["c","C","ç","Ç"],KeyD:["d","D","∂","™"],KeyE:["e","E","€","‰"],KeyF:["f","F","ƒ","Ï"],KeyG:["g","G","©","Ì"],KeyH:["h","H","ª","Ó"],KeyI:["i","I","⁄","Û"],KeyJ:["j","J","º","ı"],KeyK:["k","K","∆","ˆ"],KeyL:["l","L","@","fl"],KeyM:["m","M","µ","˘"],KeyN:["n","N","~","›"],KeyO:["o","O","ø","Ø"],KeyP:["p","P","π","∏"],KeyQ:["q","Q","«","»"],KeyR:["r","R","®","¸"],KeyS:["s","S","‚","Í"],KeyT:["t","T","†","˝"],KeyU:["u","U","¨","Á"],KeyV:["v","V","√","◊"],KeyW:["w","W","∑","„"],KeyX:["x","X","≈","Ù"],KeyY:["z","Z","Ω","ˇ"],KeyZ:["y","Y","¥","‡"],Digit1:["1","!","¡","¬"],Digit2:["2",'"',"“","”"],Digit3:["3","§","¶","#"],Digit4:["4","$","¢","£"],Digit5:["5","%","[","fi"],Digit6:["6","&","]","^"],Digit7:["7","/","|","\\"],Digit8:["8","(","{","˜"],Digit9:["9",")","}","·"],Digit0:["0","=","≠","¯"],Space:[" "," "," "," "],Minus:["ß","?","¿","˙"],Equal:["´","`","'","˚"],BracketLeft:["ü","Ü","•","°"],BracketRight:["+","*","±",""],Backslash:["#","'","‘","’"],Semicolon:["ö","Ö","œ","Œ"],Quote:["ä","Ä","æ","Æ"],Backquote:["<",">","≤","≥"],Comma:[",",";","∞","˛"],Period:[".",":","…","÷"],Slash:["-","_","–","—"],NumpadDivide:["/","/","/","/"],NumpadMultiply:["*","*","*","*"],NumpadSubtract:["-","-","-","-"],NumpadAdd:["+","+","+","+"],NumpadDecimal:[",",",",".","."],IntlBackslash:["^","°","„","“"],NumpadEqual:["=","=","=","="]}});const ni=[{key:"ctrl+alt+e",command:["insert","\\text{cmd+alt+e}"]},{key:"cmd+alt+a",command:["insert","\\text{cmd+alt+a}"]},{key:"ctrl+alt+a",command:["insert","\\text{ctrl+alt+a}"]},{key:"meta+alt+2",command:["insert","\\text{meta+alt+2}"]},{key:"ctrl+alt+shift+a",command:["insert","\\text{ctrl+alt+shift+a}"]},{key:"left",command:"moveToPreviousChar"},{key:"right",command:"moveToNextChar"},{key:"up",command:"moveUp"},{key:"down",command:"moveDown"},{key:"shift+[ArrowLeft]",command:"extendToPreviousChar"},{key:"shift+[ArrowRight]",command:"extendToNextChar"},{key:"shift+[ArrowUp]",command:"extendUp"},{key:"shift+[ArrowDown]",command:"extendDown"},{key:"[Backspace]",command:"deletePreviousChar"},{key:"alt+[Delete]",command:"deletePreviousChar"},{key:"[Delete]",command:"deleteNextChar"},{key:"alt+[Backspace]",command:"deleteNextChar"},{key:"alt+[ArrowLeft]",command:"moveToPreviousWord"},{key:"alt+[ArrowRight]",command:"moveToNextWord"},{key:"alt+shift+[ArrowLeft]",command:"extendToPreviousWord"},{key:"alt+shift+[ArrowRight]",command:"extendToNextWord"},{key:"ctrl+[ArrowLeft]",command:"moveToGroupStart"},{key:"ctrl+[ArrowRight]",command:"moveToGroupEnd"},{key:"ctrl+shift+[ArrowLeft]",command:"extendToGroupStart"},{key:"ctrl+shift+[ArrowRight]",command:"extendToGroupEnd"},{key:"[Space]",ifMode:"math",command:"moveAfterParent"},{key:"shift+[Space]",ifMode:"math",command:"moveBeforeParent"},{key:"[Home]",command:"moveToMathFieldStart"},{key:"cmd+[ArrowLeft]",command:"moveToMathFieldStart"},{key:"shift+[Home]",command:"extendToMathFieldStart"},{key:"cmd+shift+[ArrowLeft]",command:"extendToMathFieldStart"},{key:"[End]",command:"moveToMathFieldEnd"},{key:"cmd+[ArrowRight]",command:"moveToMathFieldEnd"},{key:"shift+[End]",command:"extendToMathFieldEnd"},{key:"cmd+shift+[ArrowRight]",command:"extendToMathFieldEnd"},{key:"[Pageup]",command:"moveToGroupStart"},{key:"[Pagedown]",command:"moveToGroupEnd"},{key:"[Tab]",ifMode:"math",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"math",command:"moveToPreviousPlaceholder"},{key:"[Tab]",ifMode:"text",command:"moveToNextPlaceholder"},{key:"shift+[Tab]",ifMode:"text",command:"moveToPreviousPlaceholder"},{key:"[Escape]",ifMode:"math",command:["switch-mode","command"]},{key:"\\",ifMode:"math",command:["switch-mode","command"]},{key:"alt+[Equal]",ifMode:"math",command:["applyStyle",{mode:"text"}]},{key:"alt+[Equal]",ifMode:"text",command:["applyStyle",{mode:"math"}]},{key:"[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[Tab]",ifMode:"command",command:["complete",{acceptSuggestion:!0}]},{key:"[Return]",ifMode:"command",command:"complete"},{key:"[Enter]",ifMode:"command",command:"complete"},{key:"shift+[Escape]",ifMode:"command",command:["complete",{discard:!0}]},{key:"[ArrowDown]",ifMode:"command",command:"nextSuggestion"},{key:"[ArrowUp]",ifMode:"command",command:"previousSuggestion"},{key:"ctrl+a",ifPlatform:"!macos",command:"selectAll"},{key:"cmd+a",command:"selectAll"},{key:"[Cut]",command:"cutToClipboard"},{key:"[Copy]",command:"copyToClipboard"},{key:"[Paste]",command:"pasteFromClipboard"},{key:"[Clear]",command:"deletePreviousChar"},{key:"ctrl+z",ifPlatform:"!macos",command:"undo"},{key:"cmd+z",command:"undo"},{key:"[Undo]",command:"undo"},{key:"ctrl+y",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+y",command:"redo"},{key:"ctrl+shift+z",ifPlatform:"!macos",command:"redo"},{key:"cmd+shift+z",command:"redo"},{key:"[Redo]",command:"redo"},{key:"[EraseEof]",command:"deleteToGroupEnd"},{key:"ctrl+b",ifPlatform:"macos",command:"moveToPreviousChar"},{key:"ctrl+f",ifPlatform:"macos",command:"moveToNextChar"},{key:"ctrl+p",ifPlatform:"macos",command:"moveUp"},{key:"ctrl+n",ifPlatform:"macos",command:"moveDown"},{key:"ctrl+a",ifPlatform:"macos",command:"moveToMathFieldStart"},{key:"ctrl+e",ifPlatform:"macos",command:"moveToMathFieldEnd"},{key:"ctrl+shift+b",ifPlatform:"macos",command:"extendToPreviousChar"},{key:"ctrl+shift+f",ifPlatform:"macos",command:"extendToNextChar"},{key:"ctrl+shift+p",ifPlatform:"macos",command:"extendUp"},{key:"ctrl+shift+n",ifPlatform:"macos",command:"extendDown"},{key:"ctrl+shift+a",ifPlatform:"macos",command:"extendToMathFieldStart"},{key:"ctrl+shift+e",ifPlatform:"macos",command:"extendToMathFieldEnd"},{key:"ctrl+alt+b",ifPlatform:"macos",command:"moveToPreviousWord"},{key:"ctrl+alt+f",ifPlatform:"macos",command:"moveToNextWord"},{key:"ctrl+shift+alt+b",ifPlatform:"macos",command:"extendToPreviousWord"},{key:"ctrl+shift+alt+f",ifPlatform:"macos",command:"extendToNextWord"},{key:"ctrl+h",ifPlatform:"macos",command:"deletePreviousChar"},{key:"ctrl+d",ifPlatform:"macos",command:"deleteNextChar"},{key:"ctrl+l",ifPlatform:"macos",command:"scrollIntoView"},{key:"shift+[Quote]",ifMode:"math",command:["switchMode","text","","“"]},{key:"shift+[Quote]",ifMode:"text",command:["switch-mode","math","”",""]},{key:"ctrl+[Digit2]",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"ctrl+[Digit5]",ifMode:"math",command:"moveToOpposite"},{key:"ctrl+[Digit6]",ifMode:"math",command:"moveToSuperscript"},{key:"ctrl+[Minus]",ifMode:"math",command:"moveToSubscript"},{key:"alt+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrack #0 \\right\\rbrack$$"]},{key:"alt+shift+[BracketLeft]",ifMode:"math",command:["insert","$$\\left\\lbrace #0 \\right\\rbrace$$"]},{key:"[Return]",ifMode:"math",command:"addRowAfter"},{key:"[Enter]",ifMode:"math",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"math",command:"addColumnAfter"},{key:"[Return]",ifMode:"text",command:"addRowAfter"},{key:"[Enter]",ifMode:"text",command:"addRowAfter"},{key:"ctrl+[Comma]",ifMode:"text",command:"addColumnAfter"},{key:"alt+p",ifMode:"math",command:["insert","$$\\pi$$"]},{key:"alt+v",ifMode:"math",command:["insert","$$\\sqrt{#0}$$"]},{key:"alt+w",ifMode:"math",command:["insert","$$\\sum_{i=#?}^{#?}$$"]},{key:"alt+u",ifMode:"math",command:["insert","$$\\cup$$"]},{key:"alt+n",ifMode:"math",command:["insert","$$\\cap$$"]},{key:"alt+o",ifMode:"math",command:["insert","$$\\emptyset$$"]},{key:"alt+d",ifMode:"math",command:["insert","$$\\differentialD$$"]},{key:"alt+shift+o",ifMode:"math",command:["insert","$$\\varnothing$$"]},{key:"alt+shift+d",ifMode:"math",command:["insert","$$\\partial$$"]},{key:"alt+shift+p",ifMode:"math",command:["insert","$$\\prod_{i=#?}^{#?}$$"]},{key:"alt+shift+u",ifMode:"math",command:["insert","$$\\bigcup$$"]},{key:"alt+shift+n",ifMode:"math",command:["insert","$$\\bigcap$$"]},{key:"alt+shift+a",ifMode:"math",command:["insert","$$\\forall$$"]},{key:"alt+shift+e",ifMode:"math",command:["insert","$$\\exists$$"]},{key:"alt+[Digit5]",ifMode:"math",command:["insert","$\\infty$$"]},{key:"alt+[Digit6]",ifMode:"math",command:["insert","$$\\wedge$$"]},{key:"alt+shift+[Digit6]",ifMode:"math",command:["insert","$$\\vee$$"]},{key:"alt+[Digit9]",ifMode:"math",command:["insert","("]},{key:"alt+[Digit0]",ifMode:"math",command:["insert",")"]},{key:"alt+shift+[Backslash]",ifMode:"math",command:["insert","|"]},{key:"alt+[Backslash]",ifMode:"math",command:["insert","$$\\backslash$$"]},{key:"/",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+/",ifMode:"math",command:["insert","$$\\/$$"]},{key:"[NumpadDivide]",ifMode:"math",command:["insert","$$\\frac{#@}{#?}$$"]},{key:"alt+[NumpadDivide]",ifMode:"math",command:["insert","\\frac{#?}{#@}"]},{key:"shift+[Backquote]",ifMode:"math",command:["insert","$$\\~$$"]},{key:"alt+shift+k",command:"toggleKeystrokeCaption"},{key:"alt+[Space]",command:"toggleVirtualKeyboard"},{key:"ctrl+alt+[ArrowUp]",command:["speak","parent",{withHighlighting:!1}]},{key:"ctrl+alt+[ArrowDown]",command:["speak","all",{withHighlighting:!1}]}],oi={"\\theta":"alt+q","\\sqrt":["alt+v","ctrl+[Digit2]"],"\\pi":"alt+p","\\prod":"alt+shift+p","\\sum":"alt+w","\\int":"alt+b","\\cup":"alt+u","\\cap":"alt+n","\\bigcup":"alt+shift+u","\\bigcap":"alt+shift+n","\\forall":"alt+shift+a","\\exists":"alt+shift+e","\\infty":"alt+[Digit5]","\\wedge":"alt+[Digit5]","\\vee":"alt+shift+[Digit6]","\\differentialD":"alt+d","\\partial":"alt+shift+d","\\frac":"Slash","\\emptyset":"alt+o","\\varnothing":"alt+shift+o","\\~":"~"};function si(e){if((null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)){let t;if(/^(mac)/i.test(navigator.platform)?t="macos":/^(win)/i.test(navigator.platform)?t="windows":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos"),e.startsWith("!")&&!e.endsWith(t))return!0;if(e.endsWith(t))return!0}return!1}function li(t){let i=t;return e(i)&&(i=i.length>0?i[0]+"("+i.slice(1).join("")+")":""),i}function ci(e){var t;const i=si("macos")||si("ios"),a=e.split("+");let r="";for(const e of a)!i&&r&&(r+='+'),e.startsWith("Key")?r+=e.substr(3,1):e.startsWith("Digit")?r+=e.substr(5,1):r+=null!==(t={cmd:"⌘",meta:i?"⌘":"command",shift:i?"⇧":"shift",alt:i?"⌥":"alt",ctrl:i?"⌃":"control","\n":i?"⏎":"return","[return]":i?"⏎":"return","[enter]":i?"⌤":"enter","[tab]":i?"⇥":"tab","[escape]":"esc","[backspace]":i?"⌫":"backspace","[delete]":i?"⌦":"del","[pageup]":i?"⇞":"page up","[pagedown]":i?"⇟":"page down","[home]":i?"⤒":"home","[end]":i?"⤓":"end","[space]":"space","[equal]":"=","[minus]":"-","[comma]":",","[backslash]":"\\","[bracketleft]":"[","[bracketright]":"]",semicolon:";",period:".",comma:",",minus:"-",equal:"=",quote:"'",bracketLeft:"[",bracketRight:"]",backslash:"\\",intlbackslash:"\\",backquote:"`",slash:"/",numpadmultiply:"* 🔢",numpaddivide:"/ 🔢",numpadsubtract:"- 🔢",numpadadd:"+ 🔢",numpaddecimal:". 🔢",numpadcomma:", 🔢",help:"help",left:"⇠",up:"⇡",right:"⇢",down:"⇣","[arrowleft]":"⇠","[arrowup]":"⇡","[arrowright]":"⇢","[arrowdown]":"⇣","[digit0]":"0","[digit1]":"1","[digit2]":"2","[digit3]":"3","[digit4]":"4","[digit5]":"5","[digit6]":"6","[digit7]":"7","[digit8]":"8","[digit9]":"9"}[e.toLowerCase()])&&void 0!==t?t:e.toUpperCase();return r}function di(e,t){const i=[],a=[];return e.forEach(e=>{try{const t=function(e){if(e.ifPlatform&&!/^!?(macos|windows|android|ios|chromeos|other)$/.test(e.ifPlatform))throw new Error(`Unexpected platform "${e.ifPlatform}" for keybinding ${e.key}`);let t=e.key.split("+");const i=t.pop();let a=e.ifPlatform;if(t=t.map(e=>{const t=e.toLowerCase();if("cmd"===t){if(a&&"macos"!==a&&"ios"!==a)throw new Error('Unexpected "cmd" modifier with platform "'+a+'"');return a||(a=si("ios")?"ios":"macos"),"meta"}if("win"===t){if(a&&"windows"!==a)throw new Error('Unexpected "win" modifier with platform "'+a+'"');return a="windows","meta"}return t}),!a||si(a)){if(/^\[(.*)\]$/.test(i))t.push(i);else{const a=function(e){var t,i;const a=null!==(t=ri())&&void 0!==t?t:Yt;for(const[t,i]of Object.entries(a.mapping)){if(i[0]===e)return"["+t+"]";if(i[1]===e)return"shift+["+t+"]";if(i[2]===e)return"alt+["+t+"]";if(i[3]===e)return"shift+alt+["+t+"]"}return null!==(i=Qt[e])&&void 0!==i?i:""}(i);if(!a)throw new Error('Invalid keybinding key "'+e.key+'"');t=t.concat(a.split("+"))}return{...e,ifPlatform:a,key:t.join("+")}}}(e);t&&i.push(t)}catch(e){a.push(e.message)}}),a.length>0&&t(a),i}function mi(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.addEventListener(r[1],i,t)}else e.addEventListener(t,i,a)}}function pi(e,t,i,a){const r=t.split(" ");for(const t of r){const r=t.match(/(.*):(.*)/);if(r){const t=null!=a?a:{};"active"===r[2]?t.passive=!1:t[r[2]]=!0,e.removeEventListener(r[1],i,t)}else e.removeEventListener(t,i,a)}}function ui(e,t){let i=document.getElementById(e);return i?i.setAttribute("data-refcount",Number(parseInt(i.getAttribute("data-refcount"))+1).toString()):(i=document.createElement("div"),i.setAttribute("aria-hidden","true"),i.setAttribute("data-refcount","1"),i.className=t,i.id=e,document.body.appendChild(i)),i}function hi(e){if(!e)return;const t=parseInt(e.getAttribute("data-refcount"));t<=1?e.remove():e.setAttribute("data-refcount",Number(t-1).toString())}function fi(e){return e.element&&e.element.mathfield===e}function gi(e){const t=function e(t){if(t.classList.contains("ML__caret")||t.classList.contains("ML__text-caret")||t.classList.contains("ML__command-caret"))return t;let i;for(const a of t.children)if(i=e(a),i)break;return i}(e);if(t){const e=t.getBoundingClientRect();return{x:e.right,y:e.bottom,height:e.height}}return null}function yi(e){const t=e.querySelectorAll(".ML__selected");if(t&&t.length>0){const i={top:1/0,bottom:-1/0,left:1/0,right:-1/0};t.forEach(e=>{const t=e.getBoundingClientRect();t.lefti.right&&(i.right=t.right),t.bottom>i.bottom&&(i.bottom=t.bottom),t.top{if("mousedown"!==i.type||1===i.buttons){i.stopPropagation(),i.preventDefault(),t.classList.add("pressed"),a=Date.now(),"touchstart"===i.type&&(n=i.changedTouches[0].identifier);const o=t.getAttribute("data-"+e.config.namespace+"command-pressed");o&&e.$perform(JSON.parse(o));const l=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldStart");l&&(r=t,s&&clearTimeout(s),s=window.setTimeout((function(){t.classList.contains("pressed")&&e.$perform(JSON.parse(l))}),300))}}),mi(t,"mouseleave touchcancel",()=>{t.classList.remove("pressed")}),mi(t,"touchmove:passive",e=>{e.preventDefault();for(let t=0;t{1===e.buttons&&t.classList.add("pressed")}),mi(t,"mouseup touchend click",i=>{if(o){i.stopPropagation(),i.preventDefault();const e=o;return o=null,void e.dispatchEvent(new MouseEvent("mouseup",{bubbles:!0}))}if(t.classList.remove("pressed"),t.classList.add("active"),"click"===i.type&&0!==i.detail)return i.stopPropagation(),void i.preventDefault();window.setTimeout((function(){t.classList.remove("active")}),150);let n=t.getAttribute("data-"+e.config.namespace+"command-pressAndHoldEnd");const s=Date.now();(t!==r||sequal to","\\supseteq":"superset of or
    equal to","\\supset":"superset of","\\subset":"subset of","\\partial":"partial derivative","\\bigcup":"union","\\bigcap":"intersection","\\approx":"approximately equal to","\\notin":"not an element of","\\in":["element of","included in"],"\\infty":"infinity","\\land":"logical and","\\sqrt":"square root","\\prod":"product","\\sum":"summation","\\amalg":["amalgamation","coproduct","free product","disjoint union"],"\\cup":"union with","\\cap":"intersection with","\\int":"integral","\\iint":"surface integral","\\oint":"curve integral","\\iiint":"volume integral","\\iff":"if and only if","\\ln":"natural logarithm","\\boldsymbol":"bold","\\setminus":"set subtraction","\\stackrel":"relation with symbol above","\\stackbin":"operator with symbol above","\\underset":"symbol with annotation below","\\overset":"symbol with annotation above","\\hslash":["h-bar","Planck constant"],"\\gtrsim":"greater than or
    similar to","\\propto":"proportional to","\\equiv":"equivalent to","\\!":["negative thin space","(-3 mu)"],"\\ ":["space","(6 mu)"],"\\,":["thin space","(3 mu)"],"\\:":["medium space","(4 mu)"],"\\;":["thick space","(5 mu)"],"\\quad":["1 em space","(18 mu)"],"\\qquad":["2 em space","(36 mu)"],"\\enskip":["½ em space","(9 mu)"],"\\mp":"minus or plus","\\pm":"plus or minus","\\Im":"Imaginary part of","\\Re":"Real part of","\\gothicCapitalR":"Real part of","\\gothicCapitalI":"Imaginary part part of","\\differentialD":"differential d","\\aleph":["aleph","infinite cardinal",'Wikipedia '],"\\beth":["beth","beth number",'Wikipedia '],"\\gimel":["gimel","gimel function",'Wikipedia '],"\\O":"empty set","\\N":"set of
    natural numbers","\\Z":"set of
    integers","\\Q":"set of
    rational numbers","\\C":"set of
    complex numbers","\\R":"set of
    real numbers","\\P":"set of
    prime numbers","\\lesseqqgtr":"less than, equal to or
    greater than","\\gnapprox":"greater than and
    not approximately","\\lnapprox":"lesser than and
    not approximately","\\j":"dotless j","\\i":"dotless i","\\cdot":"centered dot","\\lmoustache":"left moustache","\\rmoustache":"right moustache","\\nabla":["nabla","del","differential vector operator"],"\\square":["square","d’Alembert operator",'Wikipedia '],"\\blacksquare":["black square","end of proof","tombstone","Halmos symbol"],"\\Box":"end of proof","\\colon":["such that","ratio"],"\\coloneq":["is defined by","is assigned"],"\\Colon":["is defined by","as"],"\\_":["underbar","underscore"],"\\ll":"much less than","\\gg":"much greater than","\\doteq":"approximately equal to","\\Doteq":"approximately equal to","\\doteqdot":"approximately equal to","\\cong":["isomorphism of","(for algebras, modules...)"],"\\det":["determinant of","(of a matrix)"],"\\dotplus":"Cartesian product algebra","\\otimes":["tensor product","(of algebras)","Kronecker product","(of matrices)"],"\\oplus":["direct sum","(of modules)"],"\\lb":"base-2 logarithm","\\lg":"base-10 logarithm","\\wp":["Weierstrass P",'Wikipedia '],"\\wr":["wreath product",'Wikipedia '],"\\top":["tautology","Proposition P is universally true"],"\\bot":["contradiction","Proposition P is contradictory"],"\\mid":["probability","of event A given B"],"\\mho":["Siemens","electrical conductance in SI unit",'Wikipedia '],"\\Longrightarrow":"implies","\\Longleftrightarrow":"if, and only if,","\\prec":"precedes","\\preceq":"precedes or is equal to","\\succ":"succeedes","\\succeq":"succeedes or is equal to","\\perp":["is perpendicular to","is independent of"],"\\models":["entails","double-turnstyle, models","is a semantic consequence of",'Wikipedia '],"\\vdash":["satisfies","turnstyle, assertion sign","syntactic inference",'Wikipedia '],"\\implies":["implies","logical consequence"],"\\impliedby":["implied by","logical consequence"],"\\surd":["surd","root of","checkmark"],"\\ltimes":["semi direct product",'Wikipedia '],"\\rtimes":["semi direct product",'Wikipedia '],"\\leftthreetimes":["semi direct product",'Wikipedia '],"\\rightthreetimes":["semi direct product",'Wikipedia '],"\\divideontimes":["divide on times"],"\\curlywedge":"nor","\\curlyvee":"nand","\\simeq":"is group isomorphic with","\\vartriangleleft":["is a normal subgroup of","is an ideal ring of"],"\\circ":["circle","ring","function composition"],"\\rlap":["overlap right","\\rlap{x}o"],"\\llap":["overlap left","o\\llap{/}"],"\\colorbox":["color box","\\colorbox{#fbc0bd}{...}"],"\\ast":["asterisk","reflexive closure (as a superscript)"],"\\bullet":"bullet","\\lim":"limit"};function xi(t,i,a){if(!i||0===i.length)return void wi(t);const r=i,n=function(e,t){const i=Je(e,"math",null,t.config.macros);return C(q(Ne({mathstyle:c.displaystyle,macros:t.config.macros},i),"ML__base"),"ML__mathlive").toMarkup()}(i,t),o=function(t){let i=vi[t]||"";return e(i)&&(i=i.join("
    ")),i}(r),s=function(t,i){let a=[];if("string"==typeof i){const t=oi[i];e(t)?a=t.slice():t&&a.push(t)}const r=li(i),n=new RegExp("^"+r.replace("\\","\\\\").replace("|","\\|").replace("*","\\*").replace("$","\\$").replace("^","\\^")+"([^*a-zA-Z]|$)");return t.forEach(e=>{n.test(li(e.command))&&a.push(e)}),a.map(ci)}(t.keybindings,r).join("
    ");let l=a?'
    ':"";l+='',l+='
    '+n+"
    ",o&&(l+='
    '+o+"
    "),s&&(l+='
    '+s+"
    "),l+="
    ",l+=a?'
    ':"",function(e,t){e.popover.innerHTML=e.config.createHTML(t);const i=gi(e.field);i&&_i(e,i),e.popover.classList.add("is-visible")}(t,l);let d=t.popover.getElementsByClassName("ML__popover__content");d&&d.length>0&&bi(t,d[0],{default:["complete",{acceptSuggestion:!0}]}),d=t.popover.getElementsByClassName("ML__popover__prev-shortcut"),d&&d.length>0&&bi(t,d[0],"previousSuggestion"),d=t.popover.getElementsByClassName("ML__popover__next-shortcut"),d&&d.length>0&&bi(t,d[0],"nextSuggestion")}function ki(e,t){if(e.element&&e.element.mathfield===e&&e.popover.classList.contains("is-visible"))if(null==t?void 0:t.deferred)window.requestAnimationFrame(()=>ki(e));else if(Wt(e.model)&&"command"===Wt(e.model).type){const t=gi(e.field);t&&_i(e,t)}else wi(e)}function _i(e,t){const i=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,a=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,r=window.innerWidth-document.documentElement.clientWidth,n=window.innerHeight-document.documentElement.clientHeight,o=e.virtualKeyboardVisible?e.virtualKeyboard.offsetHeight:0;t.x+e.popover.offsetWidth/2>a-r?e.popover.style.left=a-e.popover.offsetWidth-r+"px":t.x-e.popover.offsetWidth/2<0?e.popover.style.left="0":e.popover.style.left=t.x-e.popover.offsetWidth/2+"px",t.y+e.popover.offsetHeight+5>i-n-o?(e.popover.classList.add("ML__popover--reverse-direction"),e.popover.style.top=t.y-t.height-e.popover.offsetHeight-5+"px"):(e.popover.classList.remove("ML__popover--reverse-direction"),e.popover.style.top=t.y+5+"px")}function wi(e){e.popover.classList.remove("is-visible")}function Mi(e,t=!1){var i;let a="";const r=wt(e);if(r){const n=t?e.anchorOffset()+1:r.end,o=e.siblings();for(let e=r.start;e"placeholder"===e.type));Pt(e,0),e.path[e.path.length-1].offset=i.start-1,0!==a.length&&zt(e,1,!1)||Lt(e,i.start+t.length-1)}else e.siblings().splice(i.start,i.end-i.start),Lt(e,i.start-1,0);kt(e)}}const Li={"\\pm":"±","\\times":"×","\\colon":":","\\vert":"|","\\Vert":"∥","\\mid":"∣","\\lbrace":"{","\\rbrace":"}","\\langle":"⟨","\\rangle":"⟩","\\lfloor":"⌊","\\rfloor":"⌋","\\lceil":"⌈","\\rceil":"⌉","\\vec":"⃗","\\acute":"´","\\grave":"`","\\dot":"˙","\\ddot":"¨","\\tilde":"~","\\bar":"¯","\\breve":"˘","\\check":"ˇ","\\hat":"^"};function Ai(e){return e.replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function qi(e,t){return e&&t.generateID?' extid="'+e+'"':""}function $i(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="",o=-1,s=-1;const l=e.atoms[e.index];if(e.index0){if(a=!0,Ci(e)&&(o=e.index,e.index+=1),Di(e)&&(s=e.index,e.index+=1),o>=0&&s>=0)r=""+n,r+=Bi(e.atoms[s].subscript,0,0,i).mathML,r+=Bi(e.atoms[o].superscript,0,0,i).mathML,r+="";else if(o>=0){if(r=""+n,Ci(e)){const t=Bi(e.atoms[o].superscript,0,0,i).mathML,a=Bi(e.atoms[o+1].superscript,0,0,i).mathML;r+=""!==t&&""!==t||""!==a&&""!==a?""===t||""===t?"":t:""}else r+=Bi(e.atoms[o].superscript,0,0,i).mathML;r+=""}else s>=0?(r=""+n,r+=Bi(e.atoms[s].subscript,0,0,i).mathML,r+=""):r=n;"mi"!==e.lastType&&"mn"!==e.lastType&&"mtext"!==e.lastType&&"fence"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),n.endsWith(">f")||n.endsWith(">g")?(r+="&x2061;",e.lastType="applyfunction"):e.lastType=/^(.*)<\/mo>$/.test(r)?"mo":"mi",e.mathML+=r}return a}function Ci(e){return e.index"+e,r+=Bi(n.subscript,0,0,i).mathML,r+=Bi(n.superscript,0,0,i).mathML,r+=""):n.superscript?(r=""+e,r+=Bi(n.superscript,0,0,i).mathML,r+=""):n.subscript&&(r=""+e,r+=Bi(n.subscript,0,0,i).mathML,r+=""),r.length>0&&(a=!0,t.mathML+=r,t.lastType=""),a))}function Ei(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="";for(;e.index0&&(a=!0,n=""+n+"",e.mathML+=n,e.lastType="mtext"),a}function Ki(e,t,i){let a=!1;t=t||e.atoms.length;const r=e.index;let n="",o=function(e){let t=-1,i=e.index,a=!1,r=!1;for(;i=0&&o=0;)n+=e.atoms[e.index].body,e.index+=1;return n.length>0&&(a=!0,n=""+n+"",o<0&&Ci(e)&&(o=e.index,e.index+=1),o>=0&&(n=""+n,n+=Bi(e.atoms[o].superscript,0,0,i).mathML,n+=""),e.mathML+=n,e.lastType="mn"),a}function Ni(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";if(e.index",r+=Fi(e.atoms[l],i),r+=Bi(e.atoms,l+1,c,i).mathML,r+=Fi(e.atoms[c],i),r+="","mi"!==e.lastType&&"mn"!==e.lastType&&"mfrac"!==e.lastType&&"fence"!==e.lastType||(r=""+r),e.index=c+1,Ti(r,e,i)&&(a=!0,e.lastType="",r=""),n="fence")}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Oi(e,t,i){let a=!1;t=t||e.atoms.length;let r="",n="";const o=e.atoms[e.index];if(e.index":"")+e,r+=Bi(o.subscript,0,0,i).mathML,r+=Bi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):o.superscript?(r+=("nolimits"!==o.limits?"":"")+e,r+=Bi(o.superscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""):(r+=("nolimits"!==o.limits?"":"")+e,r+=Bi(o.subscript,0,0,i).mathML,r+="nolimits"!==o.limits?"":""),n="mo"}else{const t=e.atoms[e.index],o="\\operatorname"===t.symbol,s=o?'"+Pi(t.body)+"":Fi(t,i);r+=s,e.index+=1,Ti(r,e,i)&&(a=!0,e.lastType="",r=""),e.index-=1,o||/^(.*)<\/mo>$/.test(s)?n=o?"mi":"mo":(r+="",n="applyfunction")}"mi"!==e.lastType&&"mn"!==e.lastType||/^(.*)<\/mo>$/.test(r)||(r=""+r),e.index+=1}return r.length>0&&(a=!0,e.mathML+=r,e.lastType=n),a}function Bi(e,t,i,a){const r={atoms:e,index:null!=t?t:0,mathML:"",lastType:""};if("number"==typeof e||"boolean"==typeof e)r.mathML=e.toString();else if("string"==typeof e)r.mathML=e;else if(e instanceof Oe)r.mathML=Ri(e,a);else if(Array.isArray(e)){let t=0;for(i=i||(e?e.length:0);r.index0&&"genfrac"===r.atoms[r.index].type&&(e=""+e),"genfrac"===r.atoms[r.index].type?r.lastType="mfrac":r.lastType="",e.length>0&&(r.mathML+=e,t+=1),r.index+=1}t>1&&(r.mathML=""+r.mathML+"")}return r}function Fi(e,t){let i="";const a=Pi(e.body);return a&&(i=""+a+""),i}function Pi(e){if(!e)return"";if("string"==typeof e)return Ai(e);if(!Array.isArray(e)&&"string"==typeof e.body)return Ai(e.body);let t="";for(const i of e)"string"==typeof i.body&&(t+=i.body);return Ai(t)}function Ri(e,t){var i,a,r,n,o,s,l,c,d,m,p,u;const h={widehat:"^",widecheck:"ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋"},f={"\\exponentialE":"ⅇ","\\imaginaryI":"ⅈ","\\differentialD":"ⅆ","\\capitalDifferentialD":"ⅅ","\\alpha":"α","\\pi":"π","\\infty":"∞","\\forall":"∀","\\nexists":"∄","\\exists":"∃","\\hbar":"ℏ","\\cdotp":"⋅","\\ldots":"…","\\cdots":"⋯","\\ddots":"⋱","\\vdots":"⋮","\\ldotp":"."},g={"\\!":-3/18,"\\ ":6/18,"\\,":3/18,"\\:":4/18,"\\;":5/18,"\\enspace":.5,"\\quad":1,"\\qquad":2,"\\enskip":.5};let y,b,v,x,k,_,w="",M="",S={cal:"script",frak:"fraktur",bb:"double-struck",scr:"script",cmtt:"monospace",cmss:"sans-serif"}[e.fontFamily||e.font]||"";S&&(S=' mathvariant="'+S+'"');const z=e.symbol;if("text"===e.mode)w=""+e.body+"";else switch(e.type){case"first":break;case"group":case"root":w=Bi(e.body,0,0,t).mathML;break;case"array":if((e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(w+="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Li[e.leftDelim]||e.leftDelim)+"")),w+="",y=0;y"+Bi(e.array[b][y],0,0,t).mathML+"";w+=""}w+="",(e.leftDelim&&"."!==e.leftDelim||e.rightDelim&&"."!==e.rightDelim)&&(e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Li[e.leftDelim]||e.rightDelim)+""),w+="");break;case"genfrac":(e.leftDelim||e.rightDelim)&&(w+=""),e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Li[e.leftDelim]||e.leftDelim)+""),e.hasBarLine?(w+="",w+=Bi(e.numer,0,0,t).mathML||" ",w+=Bi(e.denom,0,0,t).mathML||" ",w+=""):(w+="",w+=""+Bi(e.numer,0,0,t).mathML+"",w+=""+Bi(e.denom,0,0,t).mathML+"",w+=""),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Li[e.rightDelim]||e.rightDelim)+""),(e.leftDelim||e.rightDelim)&&(w+="");break;case"surd":e.index?(w+="",w+=Bi(e.body,0,0,t).mathML,w+=Bi(e.index,0,0,t).mathML,w+=""):(w+="",w+=Bi(e.body,0,0,t).mathML,w+="");break;case"leftright":w="",e.leftDelim&&"."!==e.leftDelim&&(w+=""+(Li[e.leftDelim]||e.leftDelim)+""),e.body&&(w+=Bi(e.body,0,0,t).mathML),e.rightDelim&&"."!==e.rightDelim&&(w+=""+(Li[e.rightDelim]||e.rightDelim)+""),w+="";break;case"sizeddelim":case"delim":w+='"+(Li[e.delim]||e.delim)+"";break;case"accent":w+='",w+=Bi(e.body,0,0,t).mathML,w+=""+(Li[z]||e.accent)+"",w+="";break;case"line":case"overlap":break;case"overunder":k=e.overscript,x=e.underscript,(e.svgAbove||k)&&(e.svgBelow||x)?_=e.body:k&&k.length>0?(_=e.body,(null===(a=null===(i=e.body)||void 0===i?void 0:i[0])||void 0===a?void 0:a.underscript)?(x=e.body[0].underscript,_=e.body[0].body):"first"===(null===(n=null===(r=e.body)||void 0===r?void 0:r[0])||void 0===n?void 0:n.type)&&(null===(s=null===(o=e.body)||void 0===o?void 0:o[1])||void 0===s?void 0:s.underscript)&&(x=e.body[1].underscript,_=e.body[1].body)):x&&x.length>0&&(_=e.body,(null===(c=null===(l=e.body)||void 0===l?void 0:l[0])||void 0===c?void 0:c.overscript)?(k=e.body[0].overscript,_=e.body[0].body):"first"===(null===(m=null===(d=e.body)||void 0===d?void 0:d[0])||void 0===m?void 0:m.type)&&(null===(u=null===(p=e.body)||void 0===p?void 0:p[1])||void 0===u?void 0:u.overscript)&&(k=e.body[1].overscript,_=e.body[1].body)),(e.svgAbove||k)&&(e.svgBelow||x)?(w+=``,w+=h[e.svgBody]||Bi(_,0,0,t).mathML,w+=h[e.svgBelow]||Bi(x,0,0,t).mathML,w+=h[e.svgAbove]||Bi(k,0,0,t).mathML,w+=""):e.svgAbove||k?(w+=``+(h[e.svgBody]||Bi(_,0,0,t).mathML),w+=h[e.svgAbove]||Bi(k,0,0,t).mathML,w+=""):(e.svgBelow||x)&&(w+=``+(h[e.svgBody]||Bi(_,0,0,t).mathML),w+=h[e.svgBelow]||Bi(x,0,0,t).mathML,w+="");break;case"placeholder":case"mord":{w=f[z]||z||("string"==typeof e.body?e.body:"");const i=z?z.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null;i?w="&#x"+i[1]+";":w.length>0&&"\\"===w.charAt(0)&&(w="string"==typeof e.body&&e.body.charCodeAt(0)>255?"&#x"+("000000"+e.body.charCodeAt(0).toString(16)).substr(-4)+";":"string"==typeof e.body?e.body.charAt(0):e.body);const a=/\d/.test(w)?"mn":"mi";w="<"+a+S+qi(e.id,t)+">"+Ai(w)+"";break}case"mbin":case"mrel":case"textord":case"minner":w=z&&f[z]?""+f[z]+"":z&&Li[z]?""+Li[z]+"":Fi(e,t);break;case"mpunct":w='"+(Li[z]||z)+"";break;case"mop":"​"!==e.body&&(w="",w+="\\operatorname"===z?e.body:z||e.body,w+="");break;case"mathstyle":break;case"box":w='"+Bi(e.body,0,0,t).mathML+"";break;case"spacing":w+='';break;case"enclose":w=''+Bi(e.body,0,0,t).mathML+"";break;case"space":w+=" "}return w}function Ii(e,t){return Bi(e,0,0,t).mathML}function Hi(e){let t=0;for(let i=0;i{fi(e)&&e.dirty&&Vi(e)}))}function Vi(e,t){t=null!=t?t:{},e.dirty=!1,window.mathlive||(window.mathlive={}),Wt(e.model)||(e.model.path=[{relation:"body",offset:0}]),e.model.root.forEach(e=>{e.caret="",e.isSelected=!1,e.containsCaret=!1});const i=e.$hasFocus();if(Ft(e.model)?Wt(e.model).caret=i&&!e.config.readOnly?e.mode:"":jt(e.model,e=>{e.isSelected=!0}),i&&!e.config.readOnly){let t=e.model.ancestor(1),i=1,a=!1;for(;t&&!a;)"surd"!==t.type&&"leftright"!==t.type||(t.containsCaret=!0,a=!0),i+=1,t=e.model.ancestor(i)}const a=q(Ne({mathstyle:c.displaystyle,letterShapeStyle:e.config.letterShapeStyle,atomIdsSettings:{seed:Hi(e.model.root.toLatex(!1)),groupNumbers:t.forHighlighting},smartFence:e.config.smartFence,macros:e.config.macros},e.model.root),"ML__base");a.attributes={translate:"no","aria-hidden":"true"};const r=C(a,"ML__mathlive");e.field.innerHTML=e.config.createHTML(r.toMarkup(0,e.config.horizontalSpacingScale)),e.field.classList.toggle("ML__focused",i&&!e.config.readOnly),e.accessibleNode.innerHTML=e.config.createHTML(''+Ii(e.model.root,e.config)+"");const n=yi(e.field);if(null!==n){const t=document.createElement("div");t.classList.add("ML__selection"),t.style.position="absolute",t.style.left=Number(n.left).toString()+"px",t.style.top=Number(n.top).toString()+"px",t.style.width=Number(Math.ceil(n.right-n.left)).toString()+"px",t.style.height=Number(Math.ceil(n.bottom-n.top-1)).toString()+"px",e.field.insertBefore(t,e.field.childNodes[0])}}const Ui={};function ji(e,t){t=null!=t?t:{target:"mathfield",canUndo:!1},Object.keys(e).forEach(i=>{Ui[i]={...t,fn:e[i]}})}function Gi(e,t=",",i){if(!e)return[];let a,r=[];for(let n of e)n&&n.length>0&&"first"===n[0].type&&(n=n.slice(1)),n&&n.length>0&&(a?r.push(a):a=new Oe("math","mpunct",t,i),r=r.concat(n));return r}function Xi(t,i){const a=t.parent();if(a&&"array"===a.type&&e(a.array)){const e=t.relation();if(a.array){const r=ut(a.array,e);"after row"===i||"before row"===i?(r.col=0,r.row=r.row+("after row"===i?1:0),a.array.splice(r.row,0,[[]])):(r.col+="after column"===i?1:0,a.array[r.row].splice(r.col,0,[]));const n=pt(a.array,r);t.path.pop(),t.path.push({relation:"cell"+n.toString(),offset:0}),t.insertFirstAtom()}}}function Zi(e){var t;const i=e.parent();if("leftright"===i.type){i.type="array";const a=null!==(t={"(":"pmatrix","\\lbrack":"bmatrix","\\lbrace":"cases"}[i.leftDelim])&&void 0!==t?t:"matrix",r=ie(a),n=[[i.body]];Object.assign(i,r.parser(a,[],n)),i.mode=Mt(e),i.environmentName=a,i.array=n,i.rowGaps=[0],delete i.body,e.path[e.path.length-1].relation="cell0"}}function Yi(e){return xt(e),Zi(e),Xi(e,"after row"),kt(e),!0}function Qi(e){return xt(e),Zi(e),Xi(e,"after column"),kt(e),!0}function Ji(e,t=0){xt(e),bt(e);const i=e.suppressChangeNotifications;if(e.suppressChangeNotifications=!0,t=t<0?-1:t>0?1:t,ot(e),e.parent().array&&t<0&&0===e.startOffset()){const t=e.parent().array;if(function(e){const t={col:0,row:0};for(;t.row0){let e=t.length;"first"===t[0].type&&(e-=1),e>0&&(i+=1)}a.row+=1}return i}(t,i.col)&&(function(e,t){let i=0;for(;i"placeholder"!==e.type&&"first"!==e.type);e.parent()[t]=null,e.path.pop(),e.siblings().splice(e.anchorOffset(),0,...i),Lt(e,e.anchorOffset()-1),e.announce("deleted: "+t)}else if("denom"===t){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),Lt(e,e.anchorOffset()+t.length-1),e.announce("deleted: denominator")}else if("body"===t){const t=e.siblings().filter(e=>"placeholder"!==e.type);e.path.length>1&&(t.shift(),e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...t),Lt(e,e.anchorOffset()-1),e.announce("deleted: root"))}else $t(e,-1),ea(e,-1)}else if(t>0)if(i!==a.length-1)/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(e.sibling(1).type)?$t(e,1):(e.announce("deleted",null,a.slice(i+1,i+2)),a.splice(i+1,1));else if("numer"===e.relation()){const t=e.parent().numer.filter(e=>"placeholder"!==e.type&&"first"!==e.type),i=e.parent().denom.filter(e=>"placeholder"!==e.type&&"first"!==e.type);e.path.pop(),e.siblings().splice(e.anchorOffset(),1,...i),e.siblings().splice(e.anchorOffset(),0,...t),Lt(e,e.anchorOffset()+t.length-1),e.announce("deleted: numerator")}else $t(e,1),ea(e,-1)}else{const t=e.startOffset()+1,i=e.endOffset()+1;e.announce("deleted",null,a.slice(t,i)),a.splice(t,i-t),Lt(e,t-1)}st(e),e.suppressChangeNotifications=i,vt(e),kt(e)}function ea(e,t=0){if(0===t)Ji(e,0);else if(t>0)for(;t>0;)Ji(e,1),t--;else for(;t<0;)Ji(e,-1),t++;return!0}ji({performWithFeedback:(e,t)=>function(e,t){return e.$focus(),e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),"moveToNextPlaceholder"===(t=t.replace(/-\w/g,e=>e[1].toUpperCase()))||"moveToPreviousPlaceholder"===t||"complete"===t?e.returnKeypressSound?(e.returnKeypressSound.load(),e.returnKeypressSound.play().catch(e=>{})):e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):"deletePreviousChar"!==t&&"deleteNextChar"!==t&&"deletePreviousWord"!==t&&"deleteNextWord"!==t&&"deleteToGroupStart"!==t&&"deleteToGroupEnd"!==t&&"deleteToMathFieldStart"!==t&&"deleteToMathFieldEnd"!==t||!e.deleteKeypressSound?e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{})):(e.deleteKeypressSound.load(),e.deleteKeypressSound.play().catch(e=>{})),e.$perform(t)}(e,t)}),ji({addRowAfter:Yi,addColumnAfter:Qi,addRowBefore:function(e){return xt(e),Zi(e),Xi(e,"before row"),kt(e),!0},addColumnBefore:function(e){return xt(e),Zi(e),Xi(e,"before column"),kt(e),!0}},{target:"model",category:"array-edit"});const ta={"''":{mode:"math",value:"^{\\doubleprime}"},alpha:"\\alpha",delta:"\\delta",Delta:"\\Delta",pi:{mode:"math",value:"\\pi"},"pi ":{mode:"text",value:"\\pi "},Pi:{mode:"math",value:"\\Pi"},theta:"\\theta",Theta:"\\Theta",ii:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryI"},jj:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\imaginaryJ"},ee:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\exponentialE"},nabla:{mode:"math",value:"\\nabla"},grad:{mode:"math",value:"\\nabla"},del:{mode:"math",value:"\\partial"},"∞":"\\infty",oo:{mode:"math",after:"nothing+digit+frac+surd+binop+relop+punct+array+openfence+closefence+space",value:"\\infty"},"∑":{mode:"math",value:"\\sum"},sum:{mode:"math",value:"\\sum_{#?}^{#?}"},prod:{mode:"math",value:"\\prod_{#?}^{#?}"},sqrt:{mode:"math",value:"\\sqrt"},"∆":{mode:"math",value:"\\differentialD"},"∂":{mode:"math",value:"\\differentialD"},arcsin:{mode:"math",value:"\\arcsin"},arccos:{mode:"math",value:"\\arccos"},arctan:{mode:"math",value:"\\arctan"},sin:{mode:"math",value:"\\sin"},sinh:{mode:"math",value:"\\sinh"},cos:{mode:"math",value:"\\cos"},cosh:{mode:"math",value:"\\cosh"},tan:{mode:"math",value:"\\tan"},tanh:{mode:"math",value:"\\tanh"},sec:{mode:"math",value:"\\sec"},csc:{mode:"math",value:"\\csc"},cot:{mode:"math",value:"\\cot"},log:{mode:"math",value:"\\log"},ln:{mode:"math",value:"\\ln"},exp:{mode:"math",value:"\\exp"},lim:{mode:"math",value:"\\lim_{#?}"},dx:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD x"},dy:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD y"},dt:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\differentialD t"},AA:{mode:"math",value:"\\forall"},EE:{mode:"math",value:"\\exists"},"!EE":{mode:"math",value:"\\nexists"},"&&":{mode:"math",value:"\\land"},xin:{mode:"math",after:"nothing+text+relop+punct+openfence+space",value:"x \\in"},in:{mode:"math",after:"nothing+letter+closefence",value:"\\in"},"!in":{mode:"math",value:"\\notin"},NN:"\\N",ZZ:"\\Z",QQ:"\\Q",RR:"\\R",CC:"\\C",PP:"\\P",xx:{mode:"math",value:"\\times"},"+-":{mode:"math",value:"\\pm"},"!=":{mode:"math",value:"\\ne"},">=":{mode:"math",value:"\\ge"},"<=":{mode:"math",value:"\\le"},"<<":{mode:"math",value:"\\ll"},">>":{mode:"math",value:"\\gg"},"~~":{mode:"math",value:"\\approx"},"≈":{mode:"math",value:"\\approx"},"?=":{mode:"math",value:"\\questeq"},"÷":{mode:"math",value:"\\div"},"¬":{mode:"math",value:"\\neg"},":=":{mode:"math",value:"\\coloneq"},"::":{mode:"math",value:"\\Colon"},"(:":{mode:"math",value:"\\langle"},":)":{mode:"math",value:"\\rangle"},beta:"\\beta",chi:"\\chi",epsilon:"\\epsilon",varepsilon:"\\varepsilon",eta:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta"},"eta ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\eta "},gamma:"\\gamma",Gamma:"\\Gamma",iota:"\\iota",kappa:"\\kappa",lambda:"\\lambda",Lambda:"\\Lambda",mu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu"},"mu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\mu "},nu:{mode:"math",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu"},"nu ":{mode:"text",after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\nu "},"µ":"\\mu",phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\phi"},Phi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Phi"},varphi:"\\varphi",psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\psi"},Psi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Psi"},rho:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\rho"},sigma:"\\sigma",Sigma:"\\Sigma",tau:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\tau"},vartheta:"\\vartheta",upsilon:"\\upsilon",xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\xi"},Xi:{after:"nothing+digit+function+frac+surd+binop+relop+punct+array+openfence+closefence+space+text",value:"\\Xi"},zeta:"\\zeta",omega:"\\omega",Omega:"\\Omega","Ω":"\\omega",forall:{mode:"math",value:"\\forall"},exists:{mode:"math",value:"\\exists"},"!exists":{mode:"math",value:"\\nexists"},":.":{mode:"math",value:"\\therefore"},liminf:"\\operatorname*{lim~inf}_{#?}",limsup:"\\operatorname*{lim~sup}_{#?}",argmin:"\\operatorname*{arg~min}_{#?}",argmax:"\\operatorname*{arg~max}_{#?}",det:"\\det",mod:{mode:"math",value:"\\mod"},max:{mode:"math",value:"\\max"},min:{mode:"math",value:"\\min"},erf:"\\operatorname{erf}",erfc:"\\operatorname{erfc}",bessel:{mode:"math",value:"\\operatorname{bessel}"},mean:{mode:"math",value:"\\operatorname{mean}"},median:{mode:"math",value:"\\operatorname{median}"},fft:{mode:"math",value:"\\operatorname{fft}"},lcm:{mode:"math",value:"\\operatorname{lcm}"},gcd:{mode:"math",value:"\\operatorname{gcd}"},randomReal:"\\operatorname{randomReal}",randomInteger:"\\operatorname{randomInteger}",Re:{mode:"math",value:"\\operatorname{Re}"},Im:{mode:"math",value:"\\operatorname{Im}"},mm:{mode:"math",after:"nothing+digit",value:"\\operatorname{mm}"},cm:{mode:"math",after:"nothing+digit",value:"\\operatorname{cm}"},km:{mode:"math",after:"nothing+digit",value:"\\operatorname{km}"},kg:{mode:"math",after:"nothing+digit",value:"\\operatorname{kg}"},"...":"\\ldots","+...":"+\\cdots","-...":"-\\cdots","->...":"\\to\\cdots","->":"\\to","|->":"\\mapsto","--\x3e":"\\longrightarrow","<--":"\\longleftarrow","=>":"\\Rightarrow","==>":"\\Longrightarrow","<=>":"\\Leftrightarrow","<->":"\\leftrightarrow","(.)":"\\odot","(+)":"\\oplus","(/)":"\\oslash","(*)":"\\otimes","(-)":"\\ominus","||":"\\Vert","{":"\\{","}":"\\}","*":"\\cdot"};function ia(e,t,i){var a;return function(e,t){if(!t)return"";if("string"==typeof t)return t;if(!e)return t.value;let i=!1,a=!1,r=!1,n=!1,o=!1,s=!1,l=!1,c=!1,d=!1,m=!1,p=!1,u=!1,h=!1,f=!1,g=e[e.length-1],y=e.length-1;for(;g&&/msubsup|placeholder/.test(g.type);)y-=1,g=e[y];if(i=!g||"first"===g.type,g){if(void 0!==t.mode&&g.mode!==t.mode)return"";h="text"===g.mode,a=!h&&"mord"===g.type&&W.test(g.body),r=!h&&"mord"===g.type&&/[0-9]+$/.test(g.body),n=!h&&g.isFunction,o="genfrac"===g.type,s="surd"===g.type,l="mbin"===g.type,c="mrel"===g.type,d="mpunct"===g.type||"minner"===g.type,m=Boolean(g.array),p="mopen"===g.type,u="mclose"===g.type||"leftright"===g.type,f="space"===g.type}return void 0!==t.after?/nothing/.test(t.after)&&i||/letter/.test(t.after)&&a||/digit/.test(t.after)&&r||/function/.test(t.after)&&n||/frac/.test(t.after)&&o||/surd/.test(t.after)&&s||/binop/.test(t.after)&&l||/relop/.test(t.after)&&c||/punct/.test(t.after)&&d||/array/.test(t.after)&&m||/openfence/.test(t.after)&&p||/closefence/.test(t.after)&&u||/text/.test(t.after)&&h||/space/.test(t.after)&&f?t.value:"":t.value}(e,null!==(a=null==i?void 0:i[t])&&void 0!==a?a:ta[t])}function aa(e,t){if(!e)return["latex",""];if(e.length<=1)return["latex",e];if(!t||"ASCIIMath"!==t.format){const t=e.trim();if(t.startsWith("$$")&&t.endsWith("$$")||t.startsWith("\\[")&&t.endsWith("\\]")||t.startsWith("\\(")&&t.endsWith("\\)"))return["latex",t.substring(2,t.length-2)];if(t.startsWith("$")&&t.endsWith("$"))return["latex",t.substring(1,t.length-1)];if(e=e.replace(/\\\\([^\s\n])/g,"\\$1"),/\\/.test(e))return["latex",e]}return e=(e=(e=(e=(e=(e=e.replace(/\u2061/gu,"")).replace(/\u3016/gu,"{")).replace(/\u3017/gu,"}")).replace(/([^\\])sinx/g,"$1\\sin x")).replace(/([^\\])cosx/g,"$1\\cos x ")).replace(/\u2013/g,"-"),[(null==t?void 0:t.format)||"ASCIIMath",ra(e,null!=t?t:{})]}function ra(e,t){var i,a,r,n,o,s,l;if(!e)return"";let c,d=!1;if(d||"^"!==e[0]&&"_"!==e[0]||(c=na(e.substr(1),{inlineShortcuts:null!==(i=null==t?void 0:t.inlineShortcuts)&&void 0!==i?i:{},noWrap:!0}),e=e[0]+"{"+c.match+"}",e+=ra(c.rest,t),d=!0),d||(c=e.match(/^(sqrt|\u221a)(.*)/),c&&(c=na(c[2],{inlineShortcuts:null!==(a=null==t?void 0:t.inlineShortcuts)&&void 0!==a?a:{},noWrap:!0}),e="\\sqrt{"+c.match+"}",e+=ra(c.rest,t),d=!0)),d||(c=e.match(/^(\\cbrt|\u221b)(.*)/),c&&(c=na(c[2],{inlineShortcuts:null!==(r=null==t?void 0:t.inlineShortcuts)&&void 0!==r?r:{},noWrap:!0}),e="\\sqrt[3]{"+c.match+"}",e+=ra(c.rest,t),d=!0)),d||(c=e.match(/^abs(.*)/),c&&(c=na(c[1],{inlineShortcuts:null!==(n=null==t?void 0:t.inlineShortcuts)&&void 0!==n?n:{},noWrap:!0}),e="\\left|"+c.match+"\\right|",e+=ra(c.rest,t),d=!0)),d||(c=e.match(/^["”“](.*?)["”“](.*)/),c&&(e="\\text{"+c[1]+"}",e+=ra(c[2],t),d=!0)),d||(c=e.match(/^([^a-zA-Z({[_^\\\s"]+)(.*)/),c&&(e=oa(c[1],t),e+=ra(c[2],t),d=!0)),!d&&/^(f|g|h)[^a-zA-Z]/.test(e)&&(c=na(e.substring(1),{inlineShortcuts:null!==(o=t.inlineShortcuts)&&void 0!==o?o:{},noWrap:!0}),e="("===e[1]?e[0]+"\\mleft("+c.match+"\\mright)":e[0]+c.match,e+=ra(c.rest,t),d=!0),d||(c=e.match(/^([a-zA-Z]+)(.*)/),c&&(e=oa(c[1],t),e+=ra(c[2],t),d=!0)),!d)if(c=na(e,{inlineShortcuts:null!==(s=t.inlineShortcuts)&&void 0!==s?s:{},noWrap:!0}),c.match&&"/"===c.rest[0]){const i=na(c.rest.substr(1),{inlineShortcuts:null!==(l=t.inlineShortcuts)&&void 0!==l?l:{},noWrap:!0});i.match&&(e="\\frac{"+c.match+"}{"+i.match+"}"+ra(i.rest,t)),d=!0}else c.match&&(e="("===e[0]?"\\left("+c.match+"\\right)"+ra(c.rest,t):c.match+ra(c.rest,t),d=!0);return d||(c=e.match(/^(\s+)(.*)$/),c&&(e=" "+ra(c[2],t),d=!0)),e}function na(e,t){let i="",a=e=e.trim(),r=e.charAt(0),n={"(":")","{":"}","[":"]"}[r];if(n){let o=1,s=1;for(;s0;)e[s]===r&&o++,e[s]===n&&o--,s++;0===o?(t.noWrap&&"("===r?i=ra(e.substring(1,s-1),t):("{"===r&&"}"===n&&(r="\\{",n="\\}"),i="\\left"+r+ra(e.substring(1,s-1),t)+"\\right"+n),a=e.substring(s)):(i=e.substring(1,s),a="")}else{let r=e.match(/^([a-zA-Z]+)/);if(r){let i=ia(null,e,t.inlineShortcuts);if(i)return i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),{match:i,rest:e.substring(i.length)}}if(r=e.match(/^([a-zA-Z])/),r)return{match:r[1],rest:e.substring(1)};if(r=e.match(/^(-)?\d+(\.\d*)?/),r)return{match:r[0],rest:e.substring(r[0].length)};/^\\(left|right)/.test(e)||(r=e.match(/^(\\[a-zA-Z]+)/),r&&(a=e.substring(r[1].length),i=r[1]))}return{match:i,rest:a}}function oa(e,t){let i=ia(null,e,t);return i?(i=i.replace("_{#?}",""),i=i.replace("^{#?}",""),i+=" "):i=e,i}function sa(e,t,i){const a=e.parent();let r="leftright"===a.type?a.leftDelim+a.rightDelim:"";if("\\lbrace\\rbrace"===r&&(r="{}"),"\\{\\}"===r&&(r="{}"),"{}"===r&&/\||\\vert|\\Vert|\\mvert|\\mid/.test(t))return ca(e,"\\,\\middle"+t+"\\, ",{mode:"math",format:"latex",style:i}),!0;"{"!==t&&"\\{"!==t||(t="\\lbrace"),"}"!==t&&"\\}"!==t||(t="\\rbrace"),"["===t&&(t="\\lbrack"),"]"===t&&(t="\\rbrack");const n=R[t];if(n&&("leftright"!==a.type||"|"!==a.leftDelim)){let a="";const r=Ft(e)||"placeholder"===Wt(e).type;a=e.sibling(0).isFunction?"\\mleft"+t+"\\mright":"\\left"+t+"\\right",a+=r?"?":n;let o=[];return r&&(o=e.siblings().splice(e.anchorOffset()+1,e.siblings().length)),ca(e,a,{mode:"math",format:"latex",style:i}),r&&(e.sibling(0).body=o,$t(e,-1)),!0}let o;if(Object.keys(R).forEach(e=>{t===R[e]&&(o=e)}),o){if(a&&"leftright"===a.type&&e.endOffset()===e.siblings().length-1)return xt(e),a.rightDelim=t,$t(e,1),kt(e),!0;const r=e.siblings();let n;for(n=e.endOffset();n>=0&&("leftright"!==r[n].type||"?"!==r[n].rightDelim);n--);if(n>=0)return xt(e),r[n].rightDelim=t,r[n].body=r[n].body.concat(r.slice(n+1,e.endOffset()+1)),r.splice(n+1,e.endOffset()-n),Lt(e,n),kt(e),!0;if(a&&"leftright"===a.type&&"?"===a.rightDelim){xt(e),a.rightDelim=t;const i=r.slice(e.endOffset()+1);return r.splice(e.endOffset()+1),e.path.pop(),e.siblings().splice(e.endOffset()+1,0,...i),kt(e),!0}const o=e.ancestor(2);return!(!o||"leftright"!==o.type||"?"!==o.rightDelim||e.endOffset()!==r.length-1)&&($t(e,1),sa(e,t,i))}return!1}function la(e,t){if(Ft(e))return!1;function i(t,i){let a=!0;return jt(e,e=>{a=a&&e[t]===i},{recursive:!0}),a}return t.color&&i("color",t.color)&&(t.color="none"),t.backgroundColor&&i("backgroundColor",t.backgroundColor)&&(t.backgroundColor="none"),t.fontFamily&&i("fontFamily",t.fontFamily)&&(t.fontFamily="none"),t.series&&(t.fontSeries=t.series),t.fontSeries&&i("fontSeries",t.fontSeries)&&(t.fontSeries="auto"),t.shape&&(t.fontShape=t.shape),t.fontShape&&i("fontShape",t.fontShape)&&(t.fontShape="auto"),t.size&&(t.fontSize=t.size),t.fontSize&&i("fontSize",t.fontSize)&&(t.fontSize="size5"),xt(e),jt(e,e=>e.applyStyle(t),{recursive:!0}),kt(e),!0}function ca(e,t,i){var a,r,n,o;if(null!==(a=i.smartFence)&&void 0!==a&&a){if(sa(e,t,i.style))return}else{const i=e.parent();if("leftright"===(null==i?void 0:i.type)&&"?"===i.rightDelim&&e.endOffset()===e.siblings().length-1&&/^[)}\]|]$/.test(t))return xt(e),i.rightDelim=t,$t(e,1),void kt(e)}const s=e.suppressChangeNotifications;i.suppressChangeNotifications&&(e.suppressChangeNotifications=!0),xt(e);const l=e.suppressChangeNotifications;e.suppressChangeNotifications=!0,i.insertionMode||(i.insertionMode="replaceSelection"),i.selectionMode||(i.selectionMode="placeholder"),i.format||(i.format="auto"),i.macros=null!==(r=i.macros)&&void 0!==r?r:e.options.macros;const c=i.mode||Mt(e);let d;const m=[Be("math",Nt(e)).toLatex(!1)],p=null!==(n=i.placeholder)&&void 0!==n?n:"\\placeholder{}";m["?"]=p,"replaceSelection"!==i.insertionMode||Ft(e)?"replaceAll"===i.insertionMode?(e.root.body=[],e.root.latex="",e.path=[{relation:"body",offset:0}],e.extent=0):"insertBefore"===i.insertionMode?It(e):"insertAfter"===i.insertionMode&&Rt(e):ea(e);const u=e.siblings(),h=e.startOffset();if(h+10&&u[h]&&"placeholder"===u[h].type&&ea(e,-1),"math"===c&&"ASCIIMath"===i.format)[,t]=aa(t,{format:"ASCIIMath"}),d=Je(t,"math",null,null==i?void 0:i.macros,!1,e.listeners.onError),ma(e,d);else if("text"===c||"auto"!==i.format&&"latex"!==i.format)"text"!==c&&"text"!==i.format||(d=Je(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/\\/g,"\\textbackslash ")).replace(/#/g,"\\#")).replace(/\$/g,"\\$")).replace(/%/g,"\\%")).replace(/&/g,"\\&")).replace(/_/g,"\\_")).replace(/{/g,"\\textbraceleft ")).replace(/}/g,"\\textbraceright ")).replace(/\^/g,"\\textasciicircum ")).replace(/~/g,"\\textasciitilde ")).replace(/£/g,"\\textsterling "),"text",m,i.macros,!1,e.listeners.onError));else if("command"===c){d=[];for(const e of t)H.test(e)&&d.push(new Oe("command","command",e))}else if(""===t)d=[new Oe("command","command","\\")];else{if("auto"===i.format&&([i.format,t]=aa(t)),m[0])t=t.replace(/(^|[^\\])#@/g,"$1#0");else if(/(^|[^\\])#@/.test(t)){const i=function(e){const t=e.siblings();let i=e.startOffset();if("text"===t[i].mode)for(;i>=1&&"text"===t[i].mode;)i--;else for(;i>=1&&/^(mord|surd|msubsup|leftright|mop)$/.test(t[i].type);)i--;return i}(e);t=t.replace(/(^|[^\\])#@/g,"$1"+function(e,t,i){const a=e.siblings();if(nt(a))return"";if("first"===a[0].type&&0===t&&(t=1),"root"===e.parent().type&&1===t&&i===a.length-1)return e.parent().toLatex(!1);let r="",n=t;for(;n<=i;)r+=a[n].toLatex(!1),n++;return r}(e,i+1,e.startOffset())),function(e,t){t>0?e.siblings().splice(e.anchorOffset()+1,t):(e.siblings().splice(e.anchorOffset()+t+1,-t),Lt(e,e.anchorOffset()+t))}(e,i-e.startOffset())}else t=t.replace(/(^|[^\\])#@/g,"$1#?");/^\$\$(.*)\$\$$/.test(t)&&(t=t.substring(2,t.length-2)),m[0]||(m[0]=p),d=Je(t,c,m,i.macros,null!==(o=i.smartFence)&&void 0!==o&&o,e.listeners.onError),"latex"!==i.format&&ma(e,d)}st(e),function e(t,i){t&&i&&(Fe(t)?t.forEach(t=>e(t,i)):"object"==typeof t&&(t.color||t.backgroundColor||t.fontFamily||t.fontShape||t.fontSeries||t.fontSize||(t.applyStyle(i),e(t.body,i),e(t.numer,i),e(t.denom,i),e(t.index,i),e(t.overscript,i),e(t.underscript,i),e(t.subscript,i),e(t.superscript,i))))}(d,i.style);const f=e.parent();if("latex"!==i.format&&e.options.removeExtraneousParentheses&&f&&"leftright"===f.type&&"("===f.leftDelim&&nt(f.body)&&d&&1===d.length&&"genfrac"===d[0].type?(e.path.pop(),e.siblings()[e.anchorOffset()]=d[0]):("latex"!==i.format||1!==m.length||m[0]||"root"===f.type&&nt(f.body)&&(f.latex=t),e.siblings().splice(e.anchorOffset()+1,0,...d)),e.insertFirstAtom(),e.suppressChangeNotifications=l,"placeholder"===i.selectionMode){let t=[];for(const e of d)t=t.concat(e.filter(e=>"placeholder"===e.type));0!==t.length&&zt(e,1,!1)?e.announce("move"):Lt(e,e.anchorOffset()+d.length)}else"before"===i.selectionMode||("after"===i.selectionMode?Lt(e,e.anchorOffset()+d.length):"item"===i.selectionMode&&Lt(e,e.anchorOffset(),d.length));kt(e),e.suppressChangeNotifications=s}function da(e){if(e)return 1===e.length&&"leftright"===e[0].type&&"("===e[0].leftDelim&&(e=e[0].body),e}function ma(e,t){if(t&&e.options.removeExtraneousParentheses){for(let e=0;t[e];e++)if("leftright"===t[e].type&&"("===t[e].leftDelim&&Fe(t[e].body)){let i=0,a=0,r=0;for(let n=0;t[e].body[n];n++)"genfrac"===t[e].body[n].type&&(i++,a=n),"first"!==t[e].body[n].type&&r++;0===r&&1===i&&(t[e]=t[e].body[a])}t.forEach(t=>{if("genfrac"===t.type&&(ma(e,t.numer),ma(e,t.denom),t.numer=da(t.numer),t.denom=da(t.denom)),t.superscript&&(ma(e,t.superscript),t.superscript=da(t.superscript)),t.subscript&&(ma(e,t.subscript),t.subscript=da(t.subscript)),t.underscript&&(ma(e,t.underscript),t.underscript=da(t.underscript)),t.overscript&&(ma(e,t.overscript),t.overscript=da(t.overscript)),t.index&&(ma(e,t.index),t.index=da(t.index)),"surd"===t.type?(ma(e,t.body),t.body=da(t.body)):Fe(t.body)&&ma(e,t.body),t.array)for(let i=ft(t.array);i>=0;i--)ma(e,ht(t.array,i))})}}function pa(e){if(Rt(e),!Wt(e).superscript)if(Wt(e).subscript)Wt(e).superscript=[new Oe(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.superscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.subscript)?(e.path[e.path.length-1].offset+=1,Wt(e).superscript=[new Oe(e.parent().mode,"first")]):("limits"!==Wt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Oe(e.parent().mode,"msubsup","​",St(e))),e.path[e.path.length-1].offset+=1),Wt(e).superscript=[new Oe(e.parent().mode,"first")])}return e.path.push({relation:"superscript",offset:0}),Ot(e),!0}ji({moveToOpposite:e=>{const t={superscript:"subscript",subscript:"superscript",denom:"numer",numer:"denom"}[e.relation()];return t||pa(e),e.parent()[t]||(e.parent()[t]=[new Oe(e.parent().mode,"first")]),Lt(e,0,"end",t),!0},moveBeforeParent:e=>e.path.length>1?(e.path.pop(),Lt(e,e.anchorOffset()-1),!0):(e.announce("plonk"),!1),moveAfterParent:e=>Ht(e),moveToNextPlaceholder:e=>zt(e,1),moveToPreviousPlaceholder:e=>zt(e,-1),moveToNextChar:e=>$t(e,1),moveToPreviousChar:e=>$t(e,-1),moveUp:e=>Ct(e),moveDown:e=>Dt(e),moveToNextWord:e=>Et(e,1),moveToPreviousWord:e=>Et(e,-1),moveToGroupStart:e=>Lt(e,0),moveToGroupEnd:e=>Lt(e,-1),moveToMathFieldStart:e=>Kt(e,-1),moveToMathFieldEnd:e=>Kt(e,1),moveToSuperscript:e=>pa(e),moveToSubscript:e=>function(e){if(Rt(e),!Wt(e).subscript)if(Wt(e).superscript)Wt(e).subscript=[new Oe(e.parent().mode,"first")];else{const t=e.sibling(1);(null==t?void 0:t.subscript)?e.path[e.path.length-1].offset+=1:(null==t?void 0:t.superscript)?(e.path[e.path.length-1].offset+=1,Wt(e).subscript=[new Oe(e.parent().mode,"first")]):("limits"!==Wt(e).limits&&(e.siblings().splice(e.anchorOffset()+1,0,new Oe(e.parent().mode,"msubsup","​",St(e))),e.path[e.path.length-1].offset+=1),Wt(e).subscript=[new Oe(e.parent().mode,"first")])}return e.path.push({relation:"subscript",offset:0}),Ot(e),!0}(e)},{target:"model",category:"selection-anchor"}),ji({selectGroup:e=>Ot(e),selectAll:e=>Bt(e),extendToNextChar:e=>Tt(e,1),extendToPreviousChar:e=>Tt(e,-1),extendToNextWord:e=>Et(e,1,{extend:!0}),extendToPreviousWord:e=>Et(e,-1,{extend:!0}),extendUp:e=>Ct(e,{extend:!0}),extendDown:e=>Dt(e,{extend:!0}),extendToNextBoundary:e=>Et(e,1,{extend:!0}),extendToPreviousBoundary:e=>Et(e,-1,{extend:!0}),extendToGroupStart:e=>Pt(e,-e.anchorOffset()),extendToGroupEnd:e=>Pt(e,e.siblings().length-e.anchorOffset()),extendToMathFieldStart:e=>Kt(e,-1,{extend:!0}),extendToMathFieldEnd:e=>Kt(e,1,{extend:!0})},{target:"model",category:"selection-extend"}),ji({deleteAll:e=>(Bt(e),ea(e)),deleteNextChar:e=>ea(e,1),deletePreviousChar:e=>ea(e,-1),deleteNextWord:e=>(Et(e,1,{extend:!0}),ea(e)),deletePreviousWord:e=>(Et(e,-1,{extend:!0}),ea(e)),deleteToGroupStart:e=>(Pt(e,-e.anchorOffset()),ea(e)),deleteToGroupEnd:e=>(Kt(e,-1,{extend:!0}),ea(e)),deleteToMathFieldStart:e=>(Kt(e,-1,{extend:!0}),ea(e)),deleteToMathFieldEnd:e=>(Kt(e,1,{extend:!0}),ea(e))},{target:"model",category:"delete"});const ua=["Backquote","Digit0","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","Minus","Equal","IntlYen","KeyQ","KeyW","KeyE","KeyR","KeyT","KeyY","KeyU","KeyI","KeyO","KeyP","BracketLeft","BracketRight","Backslash","KeyA","KeyS","KeyD","KeyF","KeyG","KeyH","KeyJ","KeyK","KeyL","Semicolon","Quote","IntlBackslash","KeyZ","KeyX","KeyC","KeyV","KeyB","KeyN","KeyM","Comma","Period","Slash","IntlRo","Space","Numpad0","Numpad1","Numpad2","Numpad3","Numpad4","Numpad5","Numpad6","Numpad7","Numpad8","Numpad9","NumpadAdd","NumpadComma","NumpadDecimal","NumpadDivide","NumpadEqual","NumpadHash","NumpadMultiply","NumpadParenLeft","NumpadParenRight","NumpadStar","NumpadSubstract"];function ha(e){return!e.ctrlKey&&!e.metaKey&&"Dead"!==e.key&&ua.indexOf(e.code)>=0}function fa(e){const t=[];return(e=function(e){if(!e.code){const t=Object.entries(ri().mapping);let i,a=!1,r=!1;for(let n=0;n<4;n++){for(const[o,s]of t)if(s[n]===e.key){i=o,3===n?(a=!0,r=!0):2===n?a=!0:1===n&&(r=!0);break}if(i)break}return new KeyboardEvent(e.type,{...e,altKey:a,shiftKey:r,code:i})}return new KeyboardEvent(e.type,e)}(e)).ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),0===t.length?"["+e.code+"]":(t.push("["+e.code+"]"),t.join("+"))}function ga(e){var t;if(!e)return"";let i;return"Unidentified"===e.key&&e.target&&(i=e.target.value),i=null!==(t=null!=i?i:e.key)&&void 0!==t?t:e.code,/^(Dead|Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(i)&&(i=""),i}class ya{constructor(e){this.maximumDepth=1e3,this.record=!1,this.canCoalesce=!1,this.model=e,this.reset()}reset(){this.stack=[],this.index=-1}startRecording(){this.record=!0}canUndo(){return this.index>0}canRedo(){return this.index!==this.stack.length-1}undo(e){this.canUndo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"undo"),this.restore(this.stack[this.index-1],e),this.index-=1,e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"undo"),this.canCoalesce=!1)}redo(e){this.canRedo()&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"redo"),this.index+=1,this.restore(this.stack[this.index],e),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"redo"),this.canCoalesce=!1)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(e){this.record&&("function"==typeof(null==e?void 0:e.onUndoStateWillChange)&&e.onUndoStateWillChange(this.model.mathfield,"snapshot"),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push({latex:this.model.root.toLatex(!1),selection:this.model.toString()}),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),e&&"function"==typeof e.onUndoStateDidChange&&e.onUndoStateDidChange(this.model.mathfield,"snapshot"),this.canCoalesce=!1)}snapshotAndCoalesce(e){this.canCoalesce&&this.pop(),this.snapshot(e),this.canCoalesce=!0}save(){return{latex:this.model.root.toLatex(!1),selection:this.model.toString()}}restore(e,t){const i=this.model.suppressChangeNotifications;void 0!==t.suppressChangeNotifications&&(this.model.suppressChangeNotifications=t.suppressChangeNotifications),ca(this.model,e?e.latex:"",{...t,format:"latex",mode:"math",insertionMode:"replaceAll",selectionMode:"after",smartFence:!1}),Ut(this.model,e?e.selection:[{relation:"body",offset:0}]),this.model.suppressChangeNotifications=i}}const ba={"−":"-","-":"-","\\alpha":"alpha","\\beta":"beta","\\gamma":"gamma","\\delta":"delta","\\epsilon":"epsilon","\\varepsilon":"varepsilon","\\zeta":"zeta","\\eta":"eta","\\theta":"theta","\\vartheta":"vartheta","\\iota":"iota","\\kappa":"kappa","\\lambda":"lambda","\\mu":"mu","\\nu":"nu","\\xi":"xi","\\pi":"pi","\\rho":"rho","\\sigma":"sigma","\\tau":"tau","\\upsilon":"upsilon","\\phi":"phi","\\varphi":"varphi","\\chi":"chi","\\psi":"psi","\\omega":"omega","\\Gamma":"Gamma","\\Delta":"Delta","\\Theta":"Theta","\\Lambda":"Lambda","\\Xi":"Xi","\\Pi":"Pi","\\Sigma":"Sigma","\\Phi":"Phi","\\Psi":"Psi","\\Omega":"Omega"},va={"\\pm":"+-","\\times":"xx","\\colon":":","\\vert":"|","\\Vert":"||","\\mid":"|","\\lbrace":"{","\\rbrace":"}","\\langle":"(:","\\rangle":":)"};function xa(t){if(!t)return"";if(e(t)){let e="";if(0===t.length)return"";if("first"===t[0].type&&(t=t.slice(1)),0===t.length)return"";if("text"===t[0].mode){let i=0;for(e='"';t[i]&&"text"===t[i].mode;)e+=t[i].body,i++;e+='"'+xa(t.slice(i))}else if("math"===t[0].mode){let i=0;for(;t[i]&&"math"===t[i].mode;)e+=xa(t[i]),i++;e+=xa(t.slice(i))}return e.trim()}if("text"===t.mode)return'"'+t.body+'"';let i="";const a=t.symbol;let r;switch(t.type){case"group":case"root":i=xa(t.body);break;case"array":break;case"genfrac":(t.leftDelim||t.rightDelim)&&(i+="."!==t.leftDelim&&t.leftDelim?t.leftDelim:"{:"),t.hasBarLine?(i+="(",i+=xa(t.numer),i+=")/(",i+=xa(t.denom),i+=")"):(i+="("+xa(t.numer)+"),",i+="("+xa(t.denom)+")"),(t.leftDelim||t.rightDelim)&&(i+="."!==t.rightDelim&&t.rightDelim?t.rightDelim:"{:");break;case"surd":t.index?i+="root("+xa(t.index)+")("+xa(t.body)+")":i+="sqrt("+xa(t.body)+")";break;case"leftright":i+="."!==t.leftDelim&&t.leftDelim?t.leftDelim:"{:",i+=xa(t.body),i+="."!==t.rightDelim&&t.rightDelim?t.rightDelim:":}";break;case"sizeddelim":case"delim":case"overlap":case"overunder":break;case"mord":i=ba[a]||a||("string"==typeof t.body?t.body:""),"\\"===i[0]&&(i=String(i)),r=a?a.match(/[{]?\\char"([0-9abcdefABCDEF]*)[}]?/):null,r?i=String.fromCharCode(parseInt("0x"+r[1])):i.length>0&&"\\"===i.charAt(0)&&(i="string"==typeof t.body?t.body.charAt(0):t.symbol);break;case"mbin":case"mrel":case"textord":case"minner":i=a&&ba[a]?ba[a]:a&&va[a]?va[a]:t.body;break;case"mopen":case"mclose":i+=t.body;break;case"mpunct":i=va[a]||a;break;case"mop":"​"!==t.body&&(i="",i+="\\operatorname"===a?xa(t.body):t.body||a,i+=" ");break;case"mathstyle":case"box":case"spacing":case"enclose":break;case"space":i=" "}if(t.subscript){i+="_";const e=xa(t.subscript);e.length>1&&!/^(-)?\d+(\.\d*)?$/.test(e)?i+="("+e+")":i+=e}if(t.superscript){i+="^";const e=xa(t.superscript);e.length>1&&!/^(-)?\d+(\.\d*)?$/.test(e)?i+="("+e+")":i+=e}return i}const ka={};function _a(e){const t=ka.locale.substring(0,2);let i="";return ka.strings[ka.locale]&&(i=ka.strings[ka.locale][e]),!i&&ka.strings[t]&&(i=ka.strings[t][e]),i||(i=ka.strings.en[e]),i||(i=e),i}function wa(e,t,i){ot(e);const a=[],r=t.substr(i);for(const e of r){const t=new Oe("command","command",e);t.isSuggestion=!0,a.push(t)}Array.prototype.splice.apply(e.siblings(),[e.anchorOffset()+1,0].concat(a))}function Ma(e,t){if(t=null!=t?t:{acceptSuggestion:!1},wi(e),t.discard)return zi(e.model,null),e.switchMode("math"),!0;const i=Mi(e.model,!t.acceptSuggestion);if(i){if("\\("===i||"\\)"===i)zi(e.model,[]),ca(e.model,i.slice(1),{mode:e.mode});else{e.switchMode("math");const t=Je(i,"math",null,e.config.macros);t?zi(e.model,t):Si(e.model,!0)}return e.snapshot(),e.model.announce("replacement"),!0}return!1}function Sa(e){!function(e){const t=e.siblings(),i=wt(e);let a=i.start;for(;a1)}return Wi(e),!0}ka.plural=function(e,t,i){var a;(i=null!=i?i:{}).type=null!==(a=i.type)&&void 0!==a?a:"cardinal";const r=ka.locale.substring(0,2),n="ordinal"===i.type?ka._ordinal:ka._cardinal;let o,s="ordinal"===i.type?ka._ordinalPluralCategories.indexOf(n.select(e)):ka._cardinalPluralCategories.indexOf(n.select(e));return ka.strings[ka.locale]&&(o=ka.strings[ka.locale][t]),!o&&ka.strings[r]&&(o=ka.strings[r][t]),o||(o=ka.strings.en[t],o||(o=t),s="ordinal"===i.type?ka._ordinalPluralCategories.indexOf(ka._ordinalEnglish.select(e)):ka._cardinalPluralCategories.indexOf(ka._cardinalEnglish.select(e))),o.split(";")[s]||o.split(";")[0]},ka.merge=function(e,t){if(e&&t){const i=ka._locale;ka.locale=e,ka.strings[e]={...ka.strings[e],...t},ka.locale=i}else e&&!t&&Object.keys(e).forEach(t=>ka.merge(t,e[t]))},Object.defineProperty(ka,"locale",{set(e){ka._locale=e,ka._ordinal=null,ka._cardinal=null},get(){var e;return ka._locale||(ka._locale=null!==(e=null===navigator||void 0===navigator?void 0:navigator.language.slice(0,5))&&void 0!==e?e:"en"),ka._locale}}),Object.defineProperty(ka,"ordinal",{get:()=>(ka._ordinal||(ka._ordinalEnglish=new Intl.PluralRules("en",{type:"ordinal"}),ka._ordinalEnglishPluralCategories=ka._ordinalEnglish.resolvedOptions().pluralCategories,ka._ordinal=new Intl.PluralRules(ka.locale,{type:"ordinal"}),ka._ordinalPluralCategories=ka._ordinal.resolvedOptions().pluralCategories),ka._ordinal)}),Object.defineProperty(ka,"cardinal",{get:()=>(ka._cardinal||(ka._cardinalEnglish=new Intl.PluralRules("en",{type:"cardinal"}),ka._cardinalEnglishPluralCategories=ka._cardinalEnglish.resolvedOptions().pluralCategories,ka._cardinal=new Intl.PluralRules(ka.locale,{type:"cardinal"}),ka._cardinalPluralCategories=ka._ordinal.resolvedOptions().pluralCategories),ka._cardinal)}),ka.strings={en:{"keyboard.tooltip.functions":"Functions","keyboard.tooltip.symbols":"Symbols","keyboard.tooltip.greek":"Greek Letters","keyboard.tooltip.command":"LaTeX Command Mode","keyboard.tooltip.numeric":"Numeric","keyboard.tooltip.roman":"Roman Letters","tooltip.copy to clipboard":"Copy to Clipboard","tooltip.redo":"Redo","tooltip.toggle virtual keyboard":"Toggle Virtual Keyboard","tooltip.undo":"Undo"},ar:{"keyboard.tooltip.functions":"مهام","keyboard.tooltip.symbols":"حرف او رمز","keyboard.tooltip.greek":"حروف يونانية","keyboard.tooltip.command":"حالة تلقي الأوامر اللاتك","keyboard.tooltip.numeric":"الرقمية","keyboard.tooltip.roman":"رموز الاحرف الرومانية","tooltip.copy to clipboard":"نسخ إلى الحافظة","tooltip.redo":"الإعادة","tooltip.toggle virtual keyboard":"تبديل لوحة المفاتيح الإفتراضية","tooltip.undo":"إلغاء"},de:{"keyboard.tooltip.functions":"Funktionen","keyboard.tooltip.symbols":"Symbole","keyboard.tooltip.greek":"Griechische Buchstaben","keyboard.tooltip.command":"LaTeX-Befehlsmodus","keyboard.tooltip.numeric":"Numerisch","keyboard.tooltip.roman":"Römische Buchstaben","tooltip.copy to clipboard":"In die Zwischenablage kopieren","tooltip.redo":"Wiederholen","tooltip.toggle virtual keyboard":"Virtuelle Tastatur umschalten","tooltip.undo":"Widerrufen"},el:{"keyboard.tooltip.functions":"συναρτήσεις","keyboard.tooltip.symbols":"σύμβολα","keyboard.tooltip.greek":"ελληνικά γράμματα","keyboard.tooltip.command":"Λειτουργία εντολών LaTeX","keyboard.tooltip.numeric":"Αριθμητικός","keyboard.tooltip.roman":"Ρωμαϊκά γράμματα","tooltip.copy to clipboard":"Αντιγραφή στο πρόχειρο","tooltip.redo":"Ξανακάνω","tooltip.toggle virtual keyboard":"Εναλλαγή εικονικού πληκτρολογίου","tooltip.undo":"Ξεκάνω"},es:{"keyboard.tooltip.functions":"Funciones","keyboard.tooltip.symbols":"Símbolos","keyboard.tooltip.greek":"Letras griegas","keyboard.tooltip.command":"Modo Comando LaTeX","keyboard.tooltip.numeric":"Numérico","keyboard.tooltip.roman":"Letras romanas","tooltip.copy to clipboard":"Copiar al portapapeles","tooltip.redo":"Rehacer","tooltip.toggle virtual keyboard":"Alternar teclado virtual","tooltip.undo":"Deshacer"},fa:{"keyboard.tooltip.functions":"توابع","keyboard.tooltip.symbols":"نمادها","keyboard.tooltip.greek":"حروف یونانی","keyboard.tooltip.command":"حالت دستور لاتک","keyboard.tooltip.numeric":"عددی","keyboard.tooltip.roman":"حروف رومی","tooltip.copy to clipboard":"کپی به کلیپبورد","tooltip.redo":"بازگشت به بعد","tooltip.toggle virtual keyboard":"نمایش/نهفتن کیبورد مجازی","tooltip.undo":"بازگشت به قبل"},fr:{"keyboard.tooltip.functions":"Fonctions","keyboard.tooltip.symbols":"Symboles","keyboard.tooltip.greek":"Lettres grecques","keyboard.tooltip.command":"Mode de commandes LaTeX","keyboard.tooltip.numeric":"Numérique","keyboard.tooltip.roman":"Lettres romaines","tooltip.copy to clipboard":"Copier dans le presse-papiers","tooltip.redo":"Rétablir","tooltip.toggle virtual keyboard":"Afficher/Masquer le clavier virtuel","tooltip.undo":"Annuler"},it:{"keyboard.tooltip.functions":"Funzioni","keyboard.tooltip.symbols":"Simboli","keyboard.tooltip.greek":"Lettere greche","keyboard.tooltip.command":"Modalità di comando LaTeX","keyboard.tooltip.numeric":"Numerico","keyboard.tooltip.roman":"Lettere romane","tooltip.copy to clipboard":"Copia negli appunti","tooltip.redo":"Rifare","tooltip.toggle virtual keyboard":"Attiva / disattiva la tastiera virtuale","tooltip.undo":"Disfare"},ja:{"keyboard.tooltip.functions":"関数","keyboard.tooltip.symbols":"シンボル","keyboard.tooltip.greek":"ギリシャ文字","keyboard.tooltip.command":"LaTeXコマンドモード","keyboard.tooltip.numeric":"数値","keyboard.tooltip.roman":"ローマ字","tooltip.copy to clipboard":"クリップボードにコピー","tooltip.redo":"やり直し","tooltip.toggle virtual keyboard":"仮想キーボードの切り替え","tooltip.undo":"元に戻す"},pl:{"keyboard.tooltip.functions":"Funkcje","keyboard.tooltip.symbols":"Symbolika","keyboard.tooltip.greek":"Litery greckie","keyboard.tooltip.command":"Tryb poleceń LaTeX","keyboard.tooltip.numeric":"Numeryczne","keyboard.tooltip.roman":"Litery rzymskie","tooltip.copy to clipboard":"Kopiuj do Schowka","tooltip.redo":"Przywróć","tooltip.toggle virtual keyboard":"Przełącz wirtualną klawiaturę","tooltip.undo":"Cofnij"},ru:{"keyboard.tooltip.functions":"Функции","keyboard.tooltip.symbols":"Символы","keyboard.tooltip.greek":"Греческие буквы","keyboard.tooltip.command":"Режим командной строки LaTeX","keyboard.tooltip.numeric":"числовой","keyboard.tooltip.roman":"Латинские буквы","tooltip.copy to clipboard":"Скопировать в буфер обмена","tooltip.redo":"переделывать","tooltip.toggle virtual keyboard":"Переключить виртуальную клавиатуру","tooltip.undo":"расстегивать"}},ji({complete:Ma,nextSuggestion:function(e){return e.suggestionIndex+=1,Sa(e),!1},previousSuggestion:function(e){if(e.suggestionIndex-=1,e.suggestionIndex<0){ot(e.model);const t=re(Mi(e.model));e.suggestionIndex=t.length-1}return Sa(e),!1}},{target:"mathfield",category:"autocomplete"});const za={"\\alpha":"alpha ","\\mu":"mew ","\\sigma":"sigma ","\\pi":"pie ","\\imaginaryI":"eye ","\\sum":"Summation ","\\prod":"Product ",a:'a',A:'capital A',"+":"plus ","-":"minus ",";":' semi-colon ',",":' comma ',"|":'Vertical bar',"(":'Open paren. ',")":' Close paren. ',"=":"equals ","<":"is less than ","\\lt":"is less than ","<=":"is less than or equal to ","\\le":"is less than or equal to ","\\gt":"is greater than ",">":"is greater than ","\\ge":"is greater than or equal to ","\\geq":"is greater than or equal to ","\\leq":"is less than or equal to ","!":"factorial ","\\sin":"sine ","\\cos":"cosine ","​":"","−":"minus ",":":' such that ',"\\colon":' such that ',"\\hbar":"etch bar ","\\iff":'if, and only if, ',"\\Longleftrightarrow":'if, and only if, ',"\\land":"and ","\\lor":"or ","\\neg":"not ","\\div":"divided by ","\\forall":"for all ","\\exists":"there exists ","\\nexists":"there does not exists ","\\in":"element of ","\\N":'the set n',"\\C":'the set c',"\\Z":'the set z',"\\Q":'the set q',"\\infty":"infinity ","\\nabla":"nabla ","\\partial":"partial derivative of ","\\cdots":"dot dot dot ","\\Rightarrow":"implies ","\\lbrace":'open brace',"\\{":'open brace',"\\rbrace":'close brace',"\\}":'close brace',"\\langle":'left angle bracket',"\\rangle":'right angle bracket',"\\lfloor":'open floor',"\\rfloor":'close floor',"\\lceil":'open ceiling',"\\rceil":'close ceiling',"\\vert":'vertical bar',"\\mvert":'divides',"\\lvert":'left vertical bar',"\\rvert":'right vertical bar',"\\lbrack":' open square bracket ',"\\rbrack":' close square bracket ',mm:"millimeters",cm:"centimeters",km:"kilometers",kg:"kilograms"};function La(e){let t=0;if(Fe(e))for(const i of e)"first"!==i.type&&(t+=1);return 1===t}function Aa(e){let t="";if(Fe(e))for(const i of e)"first"!==i.type&&"string"==typeof i.body&&(t+=i.body);return t}function qa(e,t){var i;const a={...t,textToSpeechRulesOptions:{...t.textToSpeechRulesOptions}};if(window.sre&&"sre"===a.textToSpeechRules){const t=Ii(e,a);return t?(a.textToSpeechMarkup&&(a.textToSpeechRulesOptions=null!==(i=a.textToSpeechRulesOptions)&&void 0!==i?i:{},a.textToSpeechRulesOptions.markup=a.textToSpeechMarkup,"ssml"===a.textToSpeechRulesOptions.markup&&(a.textToSpeechRulesOptions.markup="ssml_step"),a.textToSpeechRulesOptions.rate=a.speechEngineRate),a.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(a.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(t)):""}let r=function e(t,i,a){function r(e){return""+e+""}if(!i)return"";let n="";if(Fe(i)){let o=!1,s=!1;for(let l=0;l'),n+=i.body;else{i.id&&"math"===t&&(n+='');let o="",s="",l="",c=!1;switch(i.type){case"group":case"root":n+=e("math",i.body,a);break;case"genfrac":if(o=e("math",i.numer,a),s=e("math",i.denom,a),La(i.numer)&&La(i.denom)){const e={"1/2":" half ","1/3":" one third ","2/3":" two third","1/4":" one quarter ","3/4":" three quarter ","1/5":" one fifth ","2/5":" two fifths ","3/5":" three fifths ","4/5":" four fifths ","1/6":" one sixth ","5/6":" five sixths ","1/8":" one eight ","3/8":" three eights ","5/8":" five eights ","7/8":" seven eights ","1/9":" one ninth ","2/9":" two ninths ","4/9":" four ninths ","5/9":" five ninths ","7/9":" seven ninths ","8/9":" eight ninths "}[Aa(i.numer)+"/"+Aa(i.denom)];e?n=e:n+=o+" over "+s}else n+=' the fraction '+o+', over '+s+'. End fraction.';break;case"surd":if(l=e("math",i.body,a),i.index){let t=e("math",i.index,a);t=t.trim();const r=t.replace(//g,"");n+="3"===r?' the cube root of '+l+'. End cube root':"n"===r?' the nth root of '+l+'. End root':' the root with index: '+t+', of '+l+'. End root'}else La(i.body)?n+=" the square root of "+l+" , ":n+=' the square root of '+l+'. End square root';break;case"leftright":n+=za[i.leftDelim]||i.leftDelim,n+=e("math",i.body,a),n+=za[i.rightDelim]||i.rightDelim;break;case"rule":case"overunder":case"overlap":break;case"placeholder":n+="placeholder "+i.body;break;case"delim":case"sizeddelim":case"mord":case"minner":case"mbin":case"mrel":case"mpunct":case"mopen":case"mclose":case"textord":{const r=i.symbol;if("\\mathbin"===r||"\\mathrel"===r||"\\mathopen"===r||"\\mathclose"===r||"\\mathpunct"===r||"\\mathord"===r||"\\mathinner"===r){n=e(t,i.body,a);break}let o=i.body,s=i.symbol;if("delim"!==i.type&&"sizeddelim"!==i.type||(o=s=i.delim),"text"===t)n+=o;else{if("mbin"===i.type&&(n+=''),o){const e=za[o]||(s?za[s.trim()]:"");if(e)n+=" "+e;else{const e=s?function(e){let t="";return"\\"===e.charAt(0)&&(t=" "+e.replace("\\","")+" "),t}(s.trim()):"";n+=e||function(e){let t="";return a.textToSpeechMarkup?/[a-z]/.test(e)?t+=' '+e+"":/[A-Z]/.test(e)?t+=String("capital "+e.toLowerCase()):t+=e:/[a-z]/.test(e)?t+=" '"+e.toUpperCase()+"'":/[A-Z]/.test(e)?t+=" 'capital "+e.toUpperCase()+"'":t+=e,t}(o)}}else n+=e("math",i.body,a);"mbin"===i.type&&(n+='')}break}case"mop":if("​"!==i.body){const t=i.symbol;if("\\sum"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the summation from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the summation from '+t+' of ',c=!0}else n+=" the summation of";else if("\\prod"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let r=e("math",i.subscript,a);r=r.trim(),n+=' the product from '+r+' to '+t+' of ',c=!0}else if(i.subscript){let t=e("math",i.subscript,a);t=t.trim(),n+=' the product from '+t+' of ',c=!0}else n+=" the product of ";else if("\\int"===t)if(i.superscript&&i.subscript){let t=e("math",i.superscript,a);t=t.trim();let o=e("math",i.subscript,a);o=o.trim(),n+=' the integral from '+r(o)+' to '+r(t)+' of ',c=!0}else n+=' the integral of ';else"string"==typeof i.body?n+=za[i.body]||za[i.symbol]||" "+i.body:i.symbol&&("\\"===i.symbol[0]?n+=" "+i.symbol.substr(1):n+=" "+i.symbol)}break;case"enclose":l=e("math",i.body,a),La(i.body)?n+=" crossed out "+l+" , ":n+=" crossed out "+l+". End cross out"}if(!c&&i.superscript){let r=e(t,i.superscript,a);r=r.trim();const o=r.replace(/<[^>]*>/g,"");if(La(i.superscript)){if("math"===t){const e=function(e){if(Fe(e))for(const t of e)if("first"!==t.type&&t.id)return t.id.toString();return""}(i.superscript);e&&(n+='')}"′"===o?n+=" prime ":"2"===o?n+=" squared ":"3"===o?n+=" cubed ":isNaN(parseInt(o))?n+=" to the "+r+"; ":n+=' to the '+o+" power; "}else isNaN(parseInt(o))?n+=" raised to the "+r+"; ":n+=' raised to the '+o+" power; "}if(!c&&i.subscript){let t=e("math",i.subscript,a);t=t.trim(),La(i.subscript)?n+=" sub "+t:n+=" subscript "+t+". End subscript. "}}return n}("math",e,a);if("ssml"===a.textToSpeechMarkup){let e="";a.speechEngineRate&&(e=''),r=''+e+"

    "+r+"

    "+(e?"
    ":"")+""}else r="mac"===a.textToSpeechMarkup&&"mac"===function(e){let t="other";return(null===navigator||void 0===navigator?void 0:navigator.platform)&&(null===navigator||void 0===navigator?void 0:navigator.userAgent)&&(/^(mac)/i.test(navigator.platform)?t="mac":/^(win)/i.test(navigator.platform)?t="win":/(android)/i.test(navigator.userAgent)?t="android":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?t="ios":/\bCrOS\b/i.test(navigator.userAgent)&&(t="chromeos")),"mac"===t?"mac":"!mac"}()?r.replace(//g,"").replace(//g,"[[emph+]]").replace(/<\/emphasis>/g,"").replace(//g,"[[slc $1]]").replace(/]*>/g,"").replace(/<\/say-as>/g,""):r.replace(/<[^>]*>/g,"").replace(/\s{2,}/g," ");return r}function $a(e,t,i){return t+qa(i,{...e,textToSpeechMarkup:"",textToSpeechRulesOptions:{...e.textToSpeechRulesOptions,markup:"none"}})}function Ca(e,t){if(!t&&window&&window.mathlive&&(t=window.mathlive.config),(t=null!=t?t:{}).speechEngine&&"local"!==t.speechEngine)if("amazon"===t.speechEngine){if(window&&window.AWS){const i=new window.AWS.Polly({apiVersion:"2016-06-10"}),a={OutputFormat:"mp3",VoiceId:t.speechEngineVoice,Engine:["Amy","Emma","Brian","Ivy","Joanna","Kendra","Kimberly","Salli","Joey","Justin","Matthew"].includes(t.speechEngineVoice)?"neural":"standard",Text:e,TextType:"ssml"};i.synthesizeSpeech(a,(function(e,t){if(e);else if(null==t?void 0:t.AudioStream){const e=new Uint8Array(t.AudioStream),i=new Blob([e.buffer],{type:"audio/mpeg"}),a=URL.createObjectURL(i);new Audio(a).play().catch(e=>{})}}))}}else t.speechEngine;else{const t=new SpeechSynthesisUtterance(e);window&&window.speechSynthesis.speak(t)}}function Da(e,t,i,a){let r="";"plonk"===t?(e.plonkSound&&(e.plonkSound.load(),e.plonkSound.play().catch(e=>{})),e.resetKeystrokeBuffer()):"delete"===t?r=$a(e.config,"deleted: ",a):"focus"===t||/move/.test(t)?r=(Ft(e.model)?"":"selected: ")+function(e,t){function i(e,t){return"body"===t.relation?{enclose:"cross out",leftright:"fence",surd:"square root",root:"math field"}[e.type]:{numer:"numerator",denom:"denominator",index:"index",body:"parent",subscript:"subscript",superscript:"superscript"}[t.relation]}const a=t?t.path:[],r=e.model.path,n=r[r.length-1];let o="";for(;a.length>r.length;)o+="out of "+i(t.parent(),a[a.length-1])+"; ",a.pop();if(!Ft(e.model))return $a(e.config,"",Nt(e.model));const s=i(e.model.parent(),n);0===n.offset&&(o+=(s?"start of "+s:"unknown")+": ");const l=e.model.sibling(Math.max(1,e.model.extent));return l?o+=$a(e.config,"",l):0!==n.offset&&(o+=s?"end of "+s:"unknown"),o}(e,i):"replacement"===t?r=$a(e.config,"",e.model.sibling(0)):"line"===t?(r=$a(e.config,"",e.model.root),e.accessibleNode.innerHTML=e.config.createHTML(''+Ii(e.model.root,e.config)+""),e.textarea.setAttribute("aria-label","after: "+r)):r=a?$a(e.config,t+" ",a):t;const n=/\u00a0/.test(e.ariaLiveText.textContent)?"   ":"   ";e.ariaLiveText.textContent=r+n}ji({speak:(e,t,i)=>function(e,t,i){i=null!=i?i:{withHighlighting:!1};const a=function(e,t){let i=null;switch(t){case"all":i=e.model.root;break;case"selection":Ft(e.model)||(i=Nt(e.model));break;case"left":{const t=e.model.siblings(),a=e.model.startOffset();if(a>=1){i=[];for(let e=1;e<=a;e++)i.push(t[e])}break}case"right":{const t=e.model.siblings(),a=e.model.endOffset()+1;if(a<=t.length-1){i=[];for(let e=a;e<=t.length-1;e++)i.push(t[e])}break}case"group":i=e.model.siblings();break;case"parent":{const t=e.model.parent();t&&"root"!==t.type&&(i=e.model.parent());break}}return i}(e,t);if(null===a)return e.config.speakHook(function(e){let t="";switch(e){case"all":break;case"selection":t="no selection";break;case"left":t="at start";break;case"right":t="at end";break;case"group":break;case"parent":t="no parent"}return t}(t),e.config),!1;const r={...e.config};(i.withHighlighting||"amazon"===r.speechEngine)&&(r.textToSpeechMarkup=window.sre&&"sre"===r.textToSpeechRules?"ssml_step":"ssml");const n=qa(a,r);return i.withHighlighting?(window.mathlive.readAloudMathField=e,Vi(e,{forHighlighting:!0}),e.config.readAloudHook&&e.config.readAloudHook(e.field,n,e.config)):e.config.speakHook&&e.config.speakHook(n,r),!1}(e,t,i)},{target:"mathfield",category:"speech"});const Ta=()=>{};function Ea(e){if("string"==typeof e){const t=new Audio;return t.preload="none",t.src=e,t.volume=.5,t}return e}function Ka(e){e instanceof HTMLAudioElement&&(e.pause(),e.removeAttribute("src"),e.load())}function Na(t,i){const a=Oa(t,Object.keys(t));return Object.keys(i).forEach(t=>{var r,n;switch(t){case"scriptDepth":if(e(i.scriptDepth))a.scriptDepth=[i.scriptDepth[0],i.scriptDepth[1]];else{if("number"!=typeof i.scriptDepth)throw Error("Unexpected value for scriptDepth");a.scriptDepth=[i.scriptDepth,i.scriptDepth]}break;case"namespace":if(!/^[a-z]*[-]?$/.test(i.namespace))throw Error("namespace must be a string of lowercase characters only");/-$/.test(i.namespace)?a.namespace=i.namespace:a.namespace=i.namespace+"-";break;case"locale":a.locale="auto"===i.locale?ka.locale:i.locale;break;case"strings":ka.merge(i.strings);break;case"virtualKeyboardLayout":"auto"===i.virtualKeyboardLayout?a.virtualKeyboardLayout=null!==(r={fr:"azerty",be:"azerty",al:"qwertz",ba:"qwertz",cz:"qwertz",de:"qwertz",hu:"qwertz",sk:"qwertz",ch:"qwertz"}[ka.locale.substring(0,2)])&&void 0!==r?r:"qwerty":a.virtualKeyboardLayout=i.virtualKeyboardLayout;break;case"virtualKeyboardMode":{const e=null===(n=window.matchMedia)||void 0===n?void 0:n.call(window,"(any-pointer: coarse)").matches;"auto"===i.virtualKeyboardMode?a.virtualKeyboardMode=e?"onfocus":"off":a.virtualKeyboardMode=i.virtualKeyboardMode}break;case"letterShapeStyle":"auto"===i.letterShapeStyle?"fr"===ka.locale.substring(0,2)?a.letterShapeStyle="french":a.letterShapeStyle="tex":a.letterShapeStyle=i.letterShapeStyle;break;case"plonkSound":Ka(a.plonkSound),a.plonkSound=Ea(i.plonkSound);break;case"keypressSound":if(Ka(a.keypressSound),"string"==typeof i.keypressSound){const e=Ea(i.keypressSound);a.keypressSound={delete:e,return:e,spacebar:e,default:e}}else if(i.keypressSound instanceof HTMLAudioElement)a.keypressSound={delete:i.keypressSound,return:i.keypressSound,spacebar:i.keypressSound,default:i.keypressSound};else{if(!i.keypressSound.default)throw Error("Missing keypressSound.default");a.keypressSound={...i.keypressSound},a.keypressSound.return||(a.keypressSound.return=i.keypressSound.default),a.keypressSound.spacebar||(a.keypressSound.spacebar=i.keypressSound.default),a.keypressSound.delete||(a.keypressSound.delete=i.keypressSound.default)}break;case"onBlur":case"onFocus":case"onContentWillChange":case"onContentDidChange":case"onSelectionWillChange":case"onSelectionDidChange":case"onUndoStateWillChange":case"onUndoStateDidChange":case"onModeChange":case"onVirtualKeyboardToggle":case"onReadAloudStatus":case"onError":if(null===i[t])a[t]=Ta;else if("function"!=typeof i[t])throw Error(t+" must be a function or null");a[t]=i[t];break;default:e(i[t])?a[t]=[...i[t]]:"object"==typeof i[t]?a[t]={...i[t]}:a[t]=i[t]}}),void 0!==i.overrideDefaultInlineShortcuts&&(i.overrideDefaultInlineShortcuts?a.inlineShortcuts=i.inlineShortcuts:a.inlineShortcuts={...ta,...i.inlineShortcuts}),a}function Oa(t,i){let a;a="string"==typeof i?[i]:void 0===i?Object.keys(t):i;const r={};return a.forEach(i=>{e(r[i])?r[i]=[...r[i]]:"object"==typeof r[i]?r[i]={...r[i]}:r[i]=t[i]}),"string"==typeof i?r[i]:r}function Ba(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0);let a=0,r=!1;for(xt(e.model);!r;){const n=e.model.sibling(a);r=0===t||!n||"math"!==n.mode||!(/mord|textord|mpunct/.test(n.type)||"mop"===n.type&&/[a-zA-Z]+/.test(n.body))||Boolean(n.superscript)||Boolean(n.subscript)||i&&!i(n),r||(n.applyStyle({mode:"text"}),n.symbol=n.body,n.latex=""),a-=1,t-=1}kt(e.model)}function Fa(e,t,i){"function"==typeof t&&(i=t,t=1/0),void 0===t&&(t=1/0),xt(e.model);let a=0,r=!1;for(;!r;){const n=e.model.sibling(a);r=0===t||!n||"text"!==n.mode||" "===n.body||i&&!i(n),r||n.applyStyle({mode:"math"}),a-=1,t-=1}Pa(e),kt(e.model)}function Pa(e){let t=0;for(;e.model.sibling(t)&&"math"===e.model.sibling(t).mode;)t-=1;if(e.model.sibling(t)&&"text"===e.model.sibling(t).mode&&" "===e.model.sibling(t).body&&(!e.model.sibling(t-1)||"math"===e.model.sibling(t-1).mode)){xt(e.model),e.model.siblings().splice(t-1,1),kt(e.model);const i=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0,Lt(e.model,e.model.anchorOffset()-1),e.model.suppressChangeNotifications=i}}function Ra(e,t,i){!function(e){const t=e.shiftKey&&e.altKey?3:e.altKey?2:e.shiftKey?1:0;if("Unidentified"===e.key)return;if("Dead"===e.key)return;const i=Jt.filter(i=>{var a;return(null===(a=i.mapping[e.code])||void 0===a?void 0:a[t])===e.key});0!==i.length&&(i.forEach(e=>{e.score+=1}),Jt.sort((e,t)=>t.score-e.score))}(i);const a=ri();if(e.keyboardLayout!==a.id&&(e.keyboardLayout=a.id,e.keybindings=di(e.config.keybindings,t=>{"function"==typeof e.config.onError&&e.config.onError({code:"invalid-keybinding",arg:t.join("\n")})})),function(e,t){const i=e.keystrokeCaption;if(i&&e.keystrokeCaptionVisible){const a=e.element.getBoundingClientRect();i.style.left=a.left+"px",i.style.top=a.top-64+"px",i.innerHTML=e.config.createHTML(""+(ci(t)||t)+""+i.innerHTML),i.style.visibility="visible",setTimeout((function(){i.childNodes.length>0&&i.removeChild(i.childNodes[i.childNodes.length-1]),0===i.childNodes.length&&(i.style.visibility="hidden")}),3e3)}}(e,t),clearTimeout(e.keystrokeBufferResetTimer),e.config.onKeystroke&&!e.config.onKeystroke(e,t,i))return(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1;let r,n,o,s=!1;if("command"!==e.mode&&(!i||!i.ctrlKey&&!i.metaKey))if(ha(i)){const t=ga(i),a=e.keystrokeBuffer+t;let o=0;for(;!r&&o{e.startsWith(n)&&!i.includes(e)&&i.push(e)});const o=(null==t?void 0:t.inlineShortcuts)?t.inlineShortcuts:null;o&&Object.keys(o).forEach(e=>{e.startsWith(n)&&i.push(e)})}return i}(a,e.config).length<=1?s=!0:e.config.inlineShortcutTimeout&&(e.keystrokeBufferResetTimer=setTimeout(()=>{e.resetKeystrokeBuffer()},e.config.inlineShortcutTimeout))}else e.resetKeystrokeBuffer();if(e.config.smartMode){const a=e.mode;r?e.mode="math":function(e,t,i){if(e.smartModeSuppressed)return!1;if(e.model.endOffset()<*|]$/.test(a))return Pa(e),!0}else{if("[Space]"===t)return Ba(e,void 0,e=>/[a-z][:,;.]$/.test(e.body)),!0;if(/[a-zA-Z]{3,}$/.test(r)&&!/(dxd|abc|xyz|uvw)$/.test(r))return Ba(e,void 0,e=>/[a-zA-Z]/.test(e.body)),!0;if(/(^|\W)(if|If)$/i.test(r))return Ba(e,1),!0;if(/(\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5){3,}$/u.test(r)&&!/(αβγ)$/.test(r))return Ba(e,void 0,e=>/(:|,|;|.|\u0393|\u0394|\u0398|\u039b|\u039E|\u03A0|\u03A3|\u03a5|\u03a6|\u03a8|\u03a9|[\u03b1-\u03c9]|\u03d1|\u03d5|\u03d6|\u03f1|\u03f5)/u.test(e.body)),!0;if("?"===a)return!0;if("."===a&&!/[0-9-+]\.$/.test(r))return!0}return!1}(e,t,i)&&(e.mode={math:"text",text:"math"}[e.mode],o=""),e.mode!==a&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}if(r||o||(o=function(e,t,i){if(0===e.length)return"";for(let a=e.length-1;a>=0;a--)if(e[a].key===i&&(!e[a].ifMode||e[a].ifMode===t))return e[a].command;return""}(e.keybindings,e.mode,t)),!r&&!o)return!0;if(e.config.readOnly&&"insert"===o[0])return!0;Si(e.model,!1);const l=e.model.parent();if("moveAfterParent"===o&&l&&"leftright"===l.type&&e.model.endOffset()===e.model.siblings().length-1&&e.config.smartFence&&sa(e.model,".",e.style)&&(o="",Wi(e)),"math"===e.mode&&"[Spacebar]"===t&&!r){const t=e.model.sibling(1),i=e.model.sibling(-1);(t&&"text"===t.mode||i&&"text"===i.mode)&&ca(e.model," ",{mode:"text"})}if(o)e.$perform(o);else if(r){if(!/^(\\{|\\}|\\[|\\]|\\@|\\#|\\$|\\%|\\^|\\_|\\backslash)$/.test(r)){const t={...St(e.model),...e.style};ca(e.model,ga(i),{suppressChangeNotifications:!0,mode:e.mode,style:t});const a=e.mode;e.snapshotAndCoalesce(),e.restoreToUndoRecord(e.keystrokeBufferStates[n]),e.mode=a}xt(e.model);const t=e.model.suppressChangeNotifications;e.model.suppressChangeNotifications=!0;const a={...St(e.model),...e.style};ca(e.model,r,{format:"latex",mode:e.mode,style:a,smartFence:!0}),Pa(e),r.endsWith(" ")&&(e.mode="text",ca(e.model," ",{mode:"text",style:a})),e.model.suppressChangeNotifications=t,kt(e.model),e.snapshot(),Wi(e),e.model.announce("replacement"),s&&e.resetKeystrokeBuffer()}return e.scrollIntoView(),(null==i?void 0:i.preventDefault)&&(i.preventDefault(),i.stopPropagation()),!1}function Ia(e,t,i){if(e.config.readOnly)return void e.model.announce("plonk");if((i=null!=i?i:{}).focus&&e.$focus(),i.feedback&&(e.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),e.keypressSound&&(e.keypressSound.load(),e.keypressSound.play().catch(e=>{}))),i.commandMode&&"command"!==e.mode&&e.switchMode("command"),Si(e.model,!1),i.simulateKeystroke){const i=t.charAt(0);if(!Ra(e,i,new KeyboardEvent("keypress",{key:i})))return}let a="",r=!1;if(e.pasteInProgress)e.pasteInProgress=!1,ca(e.model,t,{smartFence:e.config.smartFence,mode:"math"});else{const i={...St(e.model),...e.style},n=Ve(t);for(const t of n)if("command"===e.mode){ot(e.model),e.suggestionIndex=0;const i=Mi(e.model),n=re(i+t);r=n.length>1,0===n.length?(ca(e.model,t,{mode:"command"}),/^\\[a-zA-Z\\*]+$/.test(i+t)&&Si(e.model,!0),wi(e)):(ca(e.model,t,{mode:"command"}),n[0].match!==i+t&&wa(e.model,n[0].match,-n[0].match.length+i.length+1),a=n[0].match)}else if("math"===e.mode){const a={"^":"moveToSuperscript",_:"moveToSubscript"," ":"moveAfterParent"}[t];if(a){if("moveToSuperscript"===a){if(Ha(e)>=e.config.scriptDepth[1])return void e.model.announce("plonk")}else if("moveToSubscript"===a&&Wa(e)>=e.config.scriptDepth[0])return void e.model.announce("plonk");e.$perform(a)}else e.config.smartSuperscript&&"superscript"===e.model.relation()&&/[0-9]/.test(t)&&0===e.model.siblings().filter(e=>"first"!==e.type).length?(ca(e.model,t,{mode:"math",style:i}),Ht(e.model)):ca(e.model,t,{mode:"math",style:i,smartFence:e.config.smartFence})}else"text"===e.mode&&ca(e.model,t,{mode:"text",style:i})}"command"!==e.mode&&e.snapshotAndCoalesce(),e.dirty=!0,e.scrollIntoView(),xi(e,a,r)}function Ha(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!0:a.subscript&&(r=!1),i+=1,a=e.model.ancestor(i);return r?t:0}function Wa(e){let t=0,i=0,a=e.model.ancestor(i),r=!1;for(;a;)(a.superscript||a.subscript)&&(t+=1),a.superscript?r=!1:a.subscript&&(r=!0),i+=1,a=e.model.ancestor(i);return r?t:0}function Va(e){return e.pasteInProgress=!0,!0}let Ua;ji({undo:e=>(Ma(e),e.undo(),!0),redo:e=>(Ma(e),e.redo(),!0),scrollIntoView:e=>(e.scrollIntoView(),!0),scrollToStart:e=>(e.field.scroll(0,0),!0),scrollToEnd:e=>{const t=e.field.getBoundingClientRect();return e.field.scroll(t.left-window.scrollX,0),!0},enterCommandMode:e=>(e.switchMode("command"),!0),toggleKeystrokeCaption:e=>(e.keystrokeCaptionVisible=!e.keystrokeCaptionVisible,e.keystrokeCaption.innerHTML="",e.keystrokeCaptionVisible||(e.keystrokeCaption.style.visibility="hidden"),!1),switchMode:(e,t)=>(e.switchMode(t),!0),insert:(e,t,i)=>e.$insert(t,i),typedText:(e,t)=>(Ia(e,t),!0)}),ji({applyStyle:function(e,t){e.resetKeystrokeBuffer();const i=function(e){const t={};return"string"==typeof e.mode&&(t.mode=e.mode.toLowerCase()),"string"==typeof e.color&&(t.color=e.color),"string"==typeof e.backgroundColor&&(t.backgroundColor=e.backgroundColor),"string"==typeof e.fontFamily&&(t.fontFamily=e.fontFamily),"string"==typeof e.series&&(t.fontSeries=e.series),"string"==typeof e.fontSeries&&(t.fontSeries=e.fontSeries.toLowerCase()),t.fontSeries&&(t.fontSeries={bold:"b",medium:"m",normal:"m"}[t.fontSeries]||t.fontSeries),"string"==typeof e.shape&&(t.fontShape=e.shape),"string"==typeof e.fontShape&&(t.fontShape=e.fontShape.toLowerCase()),t.fontShape&&(t.fontShape={italic:"it",up:"n",upright:"n",normal:"n"}[t.fontShape]||t.fontShape),"string"==typeof e.size?t.fontSize=e.size:"number"==typeof e.size&&(t.fontSize="size"+Math.min(0,Math.max(10,e.size))),"string"==typeof e.fontSize&&(t.fontSize=e.fontSize.toLowerCase()),t.fontSize&&(t.fontSize={tiny:"size1",scriptsize:"size2",footnotesize:"size3",small:"size4",normal:"size5",normalsize:"size5",large:"size6",Large:"size7",LARGE:"size8",huge:"size9",Huge:"size10"}[t.fontSize]||t.fontSize),t}(t);if(i.mode){if(Ft(e.model))e.switchMode(i.mode);else{const t=e.mode,i="math"===(Mt(e.model)||e.config.defaultMode)?"text":"math";let a=e.$selectedText("ASCIIMath");if("math"===i&&/^"[^"]+"$/.test(a)&&(a=a.slice(1,-1)),e.$insert(a,{mode:i,selectionMode:"item",format:"text"===i?"text":"ASCIIMath"}),e.mode=i,e.groupIsSelected()){const t=e.model.parent();!t||"group"!==t.type&&"root"!==t.type||(t.mode=i)}e.mode!==t&&"function"==typeof e.config.onModeChange&&e.config.onModeChange(e,e.mode)}delete i.mode}return Ft(e.model)?(e.style.fontSeries&&i.fontSeries===e.style.fontSeries&&(i.fontSeries="auto"),i.fontShape&&i.fontShape===e.style.fontShape&&(i.fontShape="auto"),i.color&&i.color===e.style.color&&(i.color="none"),i.backgroundColor&&i.backgroundColor===e.style.backgroundColor&&(i.backgroundColor="none"),i.fontSize&&i.fontSize===e.style.fontSize&&(i.fontSize="auto"),e.style={...e.style,...i}):(la(e.model,i),e.snapshot()),!0}},{target:"mathfield"}),ji({copyToClipboard:e=>(e.$focus(),Ft(e.model)&&e.$select(),document.execCommand("copy"),!1),cutToClipboard:e=>(e.$focus(),document.execCommand("cut"),!0),pasteFromClipboard:e=>(e.$focus(),document.execCommand("paste"),!0)},{target:"mathfield",category:"clipboard"});let ja=0;function Ga(e,t,i,a){var r;let n;(a=null!=a?a:{}).bias=null!==(r=a.bias)&&void 0!==r?r:0;const o=function e(t,i,a){let r={element:null,distance:Number.POSITIVE_INFINITY},n=!0;if(t.getAttribute("data-atom-id")){r.element=t;const e=t.getBoundingClientRect(),o=i-(e.left+e.right)/2,s=a-(e.top+e.bottom)/2;r.distance=o*o+s*s,n=i>=e.left&&i<=e.right}if(n&&t.children)for(const n of t.children){const t=e(n,i,a);t.element&&t.distance<=r.distance&&(r=t)}return r}(e.field,t,i).element,s=o?o.getAttribute("data-atom-id"):null;if(s){const i=Zt(e.model,(e,t)=>t.captureSelection?t.filter(e=>e.id===s).length>0:t.id===s);if(i&&i.length>0)if(n=ct(i[0]).path,0===a.bias){const e=o.getBoundingClientRect();tf ()",classes:"tex",layers:["functions"]},symbols:{tooltip:"keyboard.tooltip.symbols",layer:"symbols",label:"∞≠∈",classes:"tex",layers:["symbols"]},command:{tooltip:"keyboard.tooltip.command",command:"enterCommandMode",label:"",layers:["lower-command","upper-command","symbols-command"]},style:{tooltip:"keyboard.tooltip.style",layer:"style",label:"bi𝔹"}},Za={"\\varphi ":["Φ","\\Phi "],"\\varsigma ":["Σ","\\Sigma "],"\\epsilon ":["Ɛ",'{\\char"0190}'],"\\rho ":["Ρ",'{\\char"3A1}'],"\\tau ":["Τ",'{\\char"3A4}'],"\\upsilon ":["Υ","\\Upsilon "],"\\theta ":["Θ","\\Theta "],"\\iota ":["Ι",'{\\char"399}'],"\\omicron ":["Ο",'{\\char"39F}'],"\\pi ":["Π","\\Pi "],"\\alpha ":["Α",'{\\char"391}'],"\\sigma ":["Σ","\\Sigma "],"\\delta ":["Δ","\\Delta "],"\\phi ":["Φ","\\Phi "],"\\gamma ":["Γ","\\Gamma "],"\\eta ":["Η",'{\\char"397}'],"\\xi ":["Ξ","\\Xi "],"\\kappa ":["Κ",'{\\char"39A}'],"\\lambda ":["Λ","\\Lambda "],"\\zeta ":["Ζ",'{\\char"396}'],"\\chi ":["Χ",'{\\char"3A7}'],"\\psi ":["Ψ","\\Psi "],"\\omega ":["Ω","\\Omega "],"\\beta ":["Β",'{\\char"392}'],"\\nu ":["Ν",'{\\char"39D}'],"\\mu ":["Μ",'{\\char"39C}']},Ya={0:["\\emptyset","\\varnothing","\\infty",{latex:"#?_0",insert:"#@_0"},"\\circ","\\bigcirc","\\bullet"],2:["\\frac{1}{2}",{latex:"#?^2",insert:"#@^2"}],3:["\\frac{1}{3}",{latex:"#?^3",insert:"#@^3"}],".":[",",";","\\colon",{latex:":",aside:"ratio"},{latex:"\\cdotp",aside:"center dot",classes:"box"},{latex:"\\cdots",aside:"center ellipsis",classes:"box"},{latex:"\\ldotp",aside:"low dot",classes:"box"},{latex:"\\ldots",aside:"low ellipsis",classes:"box"},{latex:"\\vdots",aside:"",classes:"box"},{latex:"\\ddots",aside:"",classes:"box"},"\\odot","\\oslash","\\circledcirc"],"*":["\\cdot","\\ast","\\star","\\bigstar","\\ltimes","\\rtimes","\\rightthreetimes","\\leftthreetimes","\\intercal","\\prod",{latex:"\\prod_{n\\mathop=0}^{\\infty}",classes:"small"}],"+":["\\pm","\\mp","\\sum",{latex:"\\sum_{n\\mathop=0}^{\\infty}",classes:"small"},"\\dotplus","\\oplus"],"-":["\\pm","\\mp","\\ominus","\\vert #0 \\vert"],"/":["\\divideontimes","/","\\div"],"(":["\\left( #0\\right)","\\left[ #0\\right]","\\left\\{ #0\\right\\}","\\left\\langle #0\\right\\rangle","\\lfloor","\\llcorner","(","\\lbrack","\\lvert","\\lVert","\\lgroup","\\langle","\\lceil","\\ulcorner","\\lmoustache","\\lbrace"],")":["\\rfloor","\\lrcorner",")","\\rbrack","\\rvert","\\rVert","\\rgroup","\\rangle","\\rceil","\\urcorner","\\rmoustache","\\rbrace"],"=":["\\cong","\\asymp","\\equiv","\\differencedelta","\\varpropto","\\thickapprox","\\approxeq","\\thicksim","\\backsim","\\eqsim","\\simeq","\\Bumpeq","\\bumpeq","\\doteq","\\Doteq","\\fallingdotseq","\\risingdotseq","\\coloneq","\\eqcirc","\\circeq","\\triangleq","\\between"],"!=":["\\neq","\\ncong","","\\nsim"],"<":["\\leq","\\leqq","\\lneqq","\\ll","\\nless","\\nleq","\\precsim","\\lesssim","\\lessgtr","\\prec","\\preccurlyeq","\\lessdot","\\nprec"],">":["\\geq","\\geqq","\\gneqq","\\gg","\\ngtr","\\ngeq","\\succsim","\\gtrsim","\\gtrless","\\succ","\\succcurlyeq","\\gtrdot","\\nsucc"],set:["\\in","\\owns","\\subset","\\nsubset","\\supset","\\nsupset"],"!set":["\\notin","\\backepsilon"],subset:[],supset:[],infinity:["\\aleph_0","\\aleph_1","\\omega","\\mathfrak{m}"],"numeric-pi":["\\prod","\\theta","\\rho","\\sin","\\cos","\\tan"],ee:["\\times 10^{#?}","\\ln","\\ln_{10}","\\log"],"^":["_{#?}"],int:[{latex:"\\int_{#?}^{#?}",classes:"small"},{latex:"\\int",classes:"small"},{latex:"\\smallint",classes:"small"},{latex:"\\iint",classes:"small"},{latex:"\\iiint",classes:"small"},{latex:"\\oint",classes:"small"},{latex:"\\dfrac{\\rd}{\\rd x}",classes:"small"},{latex:"\\frac{\\partial}{\\partial x}",classes:"small"},"\\capitalDifferentialD","\\rd","\\partial"],nabla:["\\nabla\\times","\\nabla\\cdot","\\nabla^{2}"],"!":["!!","\\Gamma","\\Pi"],accents:["\\bar{#@}","\\vec{#@}","\\hat{#@}","\\check{#@}","\\dot{#@}","\\ddot{#@}","\\mathring{#@}","\\breve{#@}","\\acute{#@}","\\tilde{#@}","\\grave{#@}"],A:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],a:[{latex:"\\aleph",aside:"aleph"},{latex:"\\forall",aside:"for all"}],b:[{latex:"\\beth",aside:"beth"}],B:[{latex:"\\beth",aside:"beth"}],c:[{latex:"\\C",aside:"set of complex numbers"}],d:[{latex:"\\daleth",aside:"daleth"}],D:[{latex:"\\daleth",aside:"daleth"}],e:[{latex:"\\exponentialE",aside:"exponential e"},{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"}],g:[{latex:"\\gimel",aside:"gimel"}],G:[{latex:"\\gimel",aside:"gimel"}],h:[{latex:"\\hbar",aside:"h bar"},{latex:"\\hslash",aside:"h slash"}],i:[{latex:"\\imaginaryI",aside:"imaginary i"}],j:[{latex:"\\imaginaryJ",aside:"imaginary j"}],l:[{latex:"\\ell",aside:"ell"}],n:[{latex:"\\N",aside:"set of natural numbers"}],p:[{latex:"\\P",aside:"set of primes"}],q:[{latex:"\\Q",aside:"set of rational numbers"}],r:[{latex:"\\R",aside:"set of real numbers"}],z:[{latex:"\\Z",aside:"set of integers"}],"x-var":["y","z","t","r",{latex:"f(#?)",classes:"small"},{latex:"g(#?)",classes:"small"},"x^2","x^n","x_n","x_{n+1}","x_i","x_{i+1}"],"n-var":["i","j","p","k","a","u"],ii:["\\Re","\\Im","\\imaginaryJ","\\Vert #0 \\Vert"],logic:[{latex:"\\exists",aside:"there is"},{latex:"\\nexists",aside:"there isn’t"},{latex:"\\ni",aside:"such that"},{latex:"\\Colon",aside:"such that"},{latex:"\\implies",aside:"implies"},{latex:"\\impliedby",aside:"implied by"},{latex:"\\iff",aside:"if and only if"},{latex:"\\land",aside:"and"},{latex:"\\lor",aside:"or"},{latex:"\\oplus",aside:"xor"},{latex:"\\lnot",aside:"not"},{latex:"\\downarrow",aside:"nor"},{latex:"\\uparrow",aside:"nand"},{latex:"\\curlywedge",aside:"nor"},{latex:"\\bar\\curlywedge",aside:"nand"},{latex:"\\therefore",aside:"therefore"},{latex:"\\because",aside:"because"},{latex:"^\\biconditional",aside:"biconditional"},"\\leftrightarrow","\\Leftrightarrow","\\to","\\models","\\vdash","\\gets","\\dashv","\\roundimplies"],"set-operators":["\\cap","\\cup","\\setminus","\\smallsetminus","\\complement"],"set-relations":["\\in","\\notin","\\ni","\\owns","\\subset","\\supset","\\subseteq","\\supseteq","\\subsetneq","\\supsetneq","\\varsubsetneq","\\subsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq"],space:[{latex:'\\char"203A\\!\\char"2039',insert:"\\!",aside:"negative thin space
    ⁻³⧸₁₈ em"},{latex:'\\unicode{"203A}\\,\\unicode{"2039}',insert:"\\,",aside:"thin space
    ³⧸₁₈ em"},{latex:'\\unicode{"203A}\\:\\unicode{"2039}',insert:"\\:",aside:"medium space
    ⁴⧸₁₈ em"},{latex:'\\unicode{"203A}\\;\\unicode{"2039}',insert:"\\;",aside:"thick space
    ⁵⧸₁₈ em"},{latex:'\\unicode{"203A}\\ \\unicode{"2039}',insert:"\\ ",aside:"⅓ em"},{latex:'\\unicode{"203A}\\enspace\\unicode{"2039}',insert:"\\enspace",aside:"½ em"},{latex:'\\unicode{"203A}\\quad\\unicode{"2039}',insert:"\\quad",aside:"1 em"},{latex:'\\unicode{"203A}\\qquad\\unicode{"2039}',insert:"\\qquad",aside:"2 em"}],delete:[{label:'',command:'"deleteAll"'}],"->|":[]};let Qa={};const Ja={math:"\n
    \n
      \n
    • x
    • \n
    • n
    • \n
    • \n \n
    • \n
    • e
    • \n
    • i
    • \n
    • \n
    \n
      \n
    • <
    • \n
    • >
    • \n
    • \n \n
    • \n
    • x ²
    • \n
    • x
    • \n
    • \n
    \n
      \n
    • (
    • \n
    • )
    • \n
    • \n \n
    • \n
    • \n
    • \n
    \n \n
      \n
    • \n
    • \n
    • \n \n
    • \n \n
    \n
    \n ","lower-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ,
    • \n
    •  
    • \n \n
    \n
    ","upper-roman":"\n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n \n
    \n
      \n \n
    • ;
    • \n
    • ;
    • \n
    •  
    • \n \n
    \n
    ",symbols:"\n
    \n
      \n \n
    • {
    • \n
    • }
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • [
    • \n
    • ]
    • \n
    • \n
    • \n
    • \n
    • !
    • \n
    • o
    • \n
    • o
    • \n
    • \n
    • \n\n
    \n
      \n \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n\n
    • \n
    \n
      \n \n
    • ,
    • \n
    • \n
    • :
    • \n
    • \n
    • \n
    • \n
    • ±
    • \n \n
    \n
    ","lower-greek":"\n
    \n
    • φ
    • \n
    • ς
    • \n
    • ϵ
    • \n
    • ρ
    • \n
    • τ
    • \n
    • υ
    • \n
    • θ
    • \n
    • ι
    • \n
    • ο
    • \n
    • π
    • \n
    \n
    • α
    • \n
    • σ
    • \n
    • δ
    • \n
    • ϕ
    • \n
    • γ
    • \n
    • η
    • \n
    • ξ
    • \n
    • κ
    • \n
    • λ
    • \n
    \n
    • \n
    • ζ
    • \n
    • χ
    • \n
    • ψ
    • \n
    • ω
    • \n
    • β
    • \n
    • ν
    • \n
    • μ
    • \n
    • \n
    \n
      \n
    •  
    • \n
    • ,
    • \n
    • ε
    • \n
    • ϑ
    • \n
    • ϰ
    • \n
    • ϖ
    • \n
    • ϱ
    • \n \n
    \n
    ","upper-greek":"\n
    \n
    • Φ
    • \n
    • Σ
    • \n
    • Ɛ
    • \n
    • Ρ
    • \n
    • Τ
    • \n
    • Υ
    • \n
    • Θ
    • \n
    • Ι
    • \n
    • Ο
    • \n
    • Π
    \n
    • Α
    • \n
    • Σ
    • \n
    • Δ
    • \n
    • Φ
    • \n
    • Γ
    • \n
    • Η
    • \n
    • Ξ
    • \n
    • Κ
    • \n
    • Λ
    \n
    • \n
    • Ζ
    • \n
    • Χ
    • \n
    • Ψ
    • \n
    • Ω
    • \n
    • Β
    • \n
    • Ν
    • \n
    • Μ
    • \n
    \n
      \n
    •  
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ","lower-command":"\n
    \n
    \n
    \n
    \n
      \n
    • 01#
    • \n
    • {
    • \n
    • }
    • \n
    • ^
    • \n
    • _
    • \n
    •  
    • \n \n
    \n
    ","upper-command":"\n
    \n
    \n
    \n
    \n
      \n
    • \n
    • [
    • \n
    • ]
    • \n
    • (
    • \n
    • )
    • \n
    •  
    • \n \n
    \n
    ","symbols-command":"\n
    \n
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 0
    \n
    • !
    • @
    • #
    • $
    • %
    • ^
    • &
    • *
    • +
    • =
    \n
      \n
    • \\
    • \n
    • |
    • \n
    • /
    • \n
    • `
    • \n
    • ;
    • \n
    • :
    • \n
    • ?
    • \n
    • '
    • \n
    • \"
    • \n
    • \n
    \n
      \n
    • abc
    • \n
    • <
    • \n
    • >
    • \n
    • ~
    • \n
    • ,
    • \n
    • .
    • \n
    •  
    • \n \n
    \n
    ",functions:"\n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
    • \n
    • (
    • \n
    • )
    • \n
    • \n
    • \n
    •  
    • \n \n
    \n
    ",style:"\n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n
    • \n
    • \n
    • \n
    \n
      \n
    • \n
    • \n
    • \n\n
    • \n
    • \n
    • \n
    • \n
    \n
    "};function er(e,t,i){return e=e.replace(/(^|[^\\])#@/g,"$1#?"),C(q(Ne({mathstyle:c.displaystyle,macros:i.config.macros},Je(e,"math",t,i.config.macros)),"ML__base"),"ML__mathlive").toMarkup()}function tr(e,t,i){var a;let r="
    ";const n=t.replace(/\s+/g," ").split(" ");if(n.length>1){const t={...Xa,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}};for(const e of n){if(!t[e])break;r+="
    "+t[e].label+"
    "}}return r+="
    ",r+=`\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n `,""}function ir(e,t,i){var a;for(let r=0;r"+n.getAttribute("data-aside").replace(/"/g,'"')+""),void 0!==o&&(n.innerHTML=e.config.createHTML(o)),n.getAttribute("data-classes")&&n.classList.add(n.getAttribute("data-classes"));const s=null===(a=n.getAttribute("data-insert"))||void 0===a?void 0:a.replace(/"/g,'"');let l;if(s&&Za[s]&&(n.setAttribute("data-shifted",Za[s][0]),n.setAttribute("data-shifted-command",JSON.stringify(["insertAndUnshiftKeyboardLayer",Za[s][1]]))),l=n.getAttribute("data-command")?JSON.parse(n.getAttribute("data-command")):n.getAttribute("data-insert")?["insert",n.getAttribute("data-insert"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:n.getAttribute("data-latex")?["insert",n.getAttribute("data-latex"),{focus:!0,feedback:!0,mode:"math",format:"latex",resetStyle:!0}]:["typedText",n.getAttribute("data-key")||n.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}],i&&(l=[i,l]),n.getAttribute("data-alt-keys")){const e=Qa[n.getAttribute("data-alt-keys")];e&&(l={default:l,pressAndHoldStart:["showAlternateKeys",n.getAttribute("data-alt-keys"),e],pressAndHoldEnd:"hideAlternateKeys"})}bi(e,n,l)}}function ar(e,t){const i={qwerty:{"lower-1":"qwertyuiop","lower-2":" asdfghjkl ","lower-3":"^zxcvbnm~","upper-1":"QWERTYUIOP","upper-2":" ASDFGHJKL ","upper-3":"^ZXCVBNM~","numpad-1":"789/","numpad-2":"456*","numpad-3":"123-","numpad-4":"0.=+"},azerty:{"lower-1":"azertyuiop","lower-2":"qsdfghjklm","lower-3":"^ wxcvbn ~","upper-1":"AZERTYUIOP","upper-2":"QSDFGHJKLM","upper-3":"^ WXCVBN ~"},qwertz:{"lower-1":"qwertzuiop","lower-2":" asdfghjkl ","lower-3":"^yxcvbnm~","upper-1":"QWERTZUIOP","upper-2":" ASDFGHJKL","upper-3":"^YXCVBNM~"},dvorak:{"lower-1":"^ pyfgcrl ","lower-2":"aoeuidhtns","lower-3":"qjkxbmwvz~","upper-1":"^ PYFGCRL ","upper-2":"AOEUIDHTNS","upper-3":"QJKXBMWVZ~"},colemak:{"lower-1":" qwfpgjluy ","lower-2":"arstdhneio","lower-3":"^zxcvbkm~","upper-1":" QWFPGNLUY ","upper-2":"ARSTDHNEIO","upper-3":"^ZXCVBKM~"}},a=i[e.config.virtualKeyboardLayout]?i[e.config.virtualKeyboardLayout]:i.qwerty;let r,n=t;n=n.replace(//g,"\n
  • \n \n
  • \n
  • \n \n
  • \n
  • \n
  • ");let o=n.match(/()/);for(;o;){r="";const e=o[2].match(/[a-zA-Z][a-zA-Z0-9-]*=(['"])(.*?)\1/g),t={};for(const i of e){const e=i.match(/([a-zA-Z][a-zA-Z0-9-]*)=(['"])(.*?)\2/);t[e[1]]=e[3]}let s=a[t.name];if(s||(s=i.qwerty[t.name]),s)for(const e of s){let i=t.class||"";i&&(i=" "+i),"~"===e?(r+="
  • \'\n data-shifted-command=\'"deleteAll"\'\n data-alt-keys=\'delete\' data-command=\'["performWithFeedback","deletePreviousChar"]\'\n >⌫
  • '):" "===e?r+="
  • ":"^"===e?r+="
  • ":"/"===e?r+="
  • ÷
  • ":"*"===e?r+="
  • ×
  • ":"-"===e?r+="
  • ":/tt/.test(i)?r+="
  • '+e+"
  • ":r+="
  • "+e+"
  • "}n=n.replace(new RegExp(o[1]+o[2]+o[3]),r),o=n.match(/()/)}return n}function rr(e){const t=document.getElementById("mathlive-alternate-keys-panel");return t&&(t.classList.remove("is-visible"),t.innerHTML="",hi(t)),!1}function nr(e){const t=e.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(t)for(let i=0;ili{display:flex;flex-flow:column;align-items:center;justify-content:center;font-size:30px;height:70px;width:70px;box-sizing:border-box;margin:0;background:transparent;border:1px solid transparent;border-radius:5px;pointer-events:all;color:var(--keyboard-alternate-text);fill:currentColor}@media only screen and (max-height:412px){.ML__keyboard.alternate-keys ul>li{font-size:24px;height:50px;width:50px}}.ML__keyboard.alternate-keys ul>li.active,.ML__keyboard.alternate-keys ul>li.pressed,.ML__keyboard.alternate-keys ul>li:hover{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);background:var(--keyboard-alternate-background-active);color:var(--keyboard-text-active)}.ML__keyboard.alternate-keys ul>li.small{font-size:18px}.ML__keyboard.alternate-keys ul>li.small-button{width:42px;height:42px;margin:2px;background:#fbfbfb}.ML__keyboard.alternate-keys ul>li.small-button:hover{background:var(--keyboard-alternate-background-active)}.ML__keyboard.alternate-keys ul>li.box>div,.ML__keyboard.alternate-keys ul>li.box>span{border:1px dashed rgba(0,0,0,.24)}.ML__keyboard.alternate-keys ul>li .warning{min-height:60px;min-width:60px;background:#cd0030;color:#fff;padding:5px;display:flex;align-items:center;justify-content:center;border-radius:5px}.ML__keyboard.alternate-keys ul>li .warning.active,.ML__keyboard.alternate-keys ul>li .warning.pressed,.ML__keyboard.alternate-keys ul>li .warning:hover{background:red}.ML__keyboard.alternate-keys ul>li .warning svg{width:50px;height:50px}.ML__keyboard.alternate-keys ul>li aside{font-size:12px;line-height:12px;opacity:.78;padding-top:2px}.ML__keyboard>div.keyboard-layer{display:none;outline:none}.ML__keyboard>div.keyboard-layer.is-visible{display:flex;flex-flow:column}.ML__keyboard>div>div.keyboard-toolbar{align-self:center;display:flex;flex-flow:row;justify-content:space-between;width:736px}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard>div>div.keyboard-toolbar{width:556px}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar{width:365px;max-width:100vw}}.ML__keyboard>div>div.keyboard-toolbar svg{height:20px;width:20px}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar svg{height:13px;width:17px}}.ML__keyboard>div>div.keyboard-toolbar>.left{position:relative;display:flex;justify-content:flex-start;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>.right{display:flex;justify-content:flex-end;flex-flow:row}.ML__keyboard>div>div.keyboard-toolbar>div>div{display:flex;align-items:baseline;justify-content:center;pointer-events:all;color:var(--keyboard-text);fill:currentColor;background:0;font-size:110%;cursor:pointer;min-height:0;padding:4px 10px;margin:7px 4px 6px;box-shadow:none;border:none;border-bottom:2px solid transparent}.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled.pressed svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled:hover svg,.ML__keyboard>div>div.keyboard-toolbar>div>div.disabled svg{color:var(--keyboard-text);opacity:.2}@media only screen and (max-width:414px){.ML__keyboard>div>div.keyboard-toolbar>div>div{font-size:100%;padding:0 6px 0 0}}@media only screen and (max-width:767px){.ML__keyboard>div>div.keyboard-toolbar>div>div{padding-left:4px;padding-right:4px;font-size:90%}}.ML__keyboard>div>div.keyboard-toolbar>div>div.active,.ML__keyboard>div>div.keyboard-toolbar>div>div.pressed,.ML__keyboard>div>div.keyboard-toolbar>div>div:active,.ML__keyboard>div>div.keyboard-toolbar>div>div:hover{color:var(--keyboard-text-active)}.ML__keyboard>div>div.keyboard-toolbar>div>div.selected{color:var(--keyboard-text-active);border-bottom:2px solid var(--keyboard-text-active);margin-bottom:8px;padding-bottom:0}.ML__keyboard div .rows{border:0;border-collapse:separate;clear:both;margin:auto;display:flex;flex-flow:column;align-items:center}.ML__keyboard div .rows>ul{list-style:none;height:40px;margin:0 0 3px;padding:0}.ML__keyboard div .rows>ul>li{display:flex;flex-flow:column;align-items:center;justify-content:center;width:34px;margin-right:2px;height:40px;box-sizing:border-box;padding:8px 0;vertical-align:top;text-align:center;float:left;color:var(--keycap-text);fill:currentColor;font-size:20px;background:var(--keycap-background);border:1px solid var(--keycap-background-border);border-bottom-color:var(--keycap-background-border-bottom);border-radius:5px;pointer-events:all;position:relative;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.ML__keyboard div .rows>ul>li:last-child{margin-right:0}.ML__keyboard div .rows>ul>li.small{font-size:16px}.ML__keyboard div .rows>ul>li.tt{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.bottom{justify-content:flex-end}.ML__keyboard div .rows>ul>li.left{align-items:flex-start;padding-left:4px}.ML__keyboard div .rows>ul>li.right{align-items:flex-end;padding-right:4px}.ML__keyboard div .rows>ul>li svg{width:20px;height:20px}.ML__keyboard div .rows>ul>li .warning{height:25px;width:25px;min-height:25px;min-width:25px;background:#cd0030;color:#fff;border-radius:100%;padding:5px;display:flex;align-items:center;justify-content:center;margin-bottom:-2px}.ML__keyboard div .rows>ul>li .warning svg{width:16px;height:16px}@media only screen and (max-width:768px){.ML__keyboard div .rows>ul>li .warning{height:16px;width:16px;min-height:16px;min-width:16px}.ML__keyboard div .rows>ul>li .warning svg{width:14px;height:14px}}.ML__keyboard div .rows>ul>li>.w0{width:0}.ML__keyboard div .rows>ul>li>.w5{width:16px}.ML__keyboard div .rows>ul>li>.w15{width:52px}.ML__keyboard div .rows>ul>li>.w20{width:70px}.ML__keyboard div .rows>ul>li>.w50{width:178px}.ML__keyboard div .rows>ul>li.separator{background:transparent;border:none;pointer-events:none}@media only screen and (max-width:560px){.ML__keyboard div .rows>ul>li.if-wide{display:none}}.ML__keyboard div .rows>ul>li.tex-math{font-size:25px}.ML__keyboard div .rows>ul>li.pressed,.ML__keyboard div .rows>ul>li:hover{background:var(--keycap-background-active);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.active,.ML__keyboard div .rows>ul>li.action:active,.ML__keyboard div .rows>ul>li.keycap.active,.ML__keyboard div .rows>ul>li.keycap:active{transform:translateY(-20px) scale(1.4);z-index:calc(var(--ML_keyboard-zindex, 105) - 5);color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.modifier.active,.ML__keyboard div .rows>ul>li.modifier:active{background:var(--keyboard-text-active);color:var(--keycap-text-active)}.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:18px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.action.font-glyph,.ML__keyboard div .rows>ul>li.modifier.font-glyph{font-size:16px}}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton,.ML__keyboard div .rows>ul>li.fnbutton{font-size:12px}}.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:14px}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li.bigfnbutton{font-size:9px}}.ML__keyboard div .rows>ul>li.action,.ML__keyboard div .rows>ul>li.modifier{background-color:var(--keycap-modifier-background);border-bottom-color:var(--keycap-modifier-border);border-color:var(--keycap-modifier-border) var(--keycap-modifier-border) var(--keycap-modifier-border-bottom);font-size:65%;font-weight:100}.ML__keyboard div .rows>ul>li.action.selected,.ML__keyboard div .rows>ul>li.modifier.selected{color:var(--keyboard-text-active)}.ML__keyboard div .rows>ul>li.action.selected.active,.ML__keyboard div .rows>ul>li.action.selected.pressed,.ML__keyboard div .rows>ul>li.action.selected:active,.ML__keyboard div .rows>ul>li.action.selected:hover,.ML__keyboard div .rows>ul>li.modifier.selected.active,.ML__keyboard div .rows>ul>li.modifier.selected.pressed,.ML__keyboard div .rows>ul>li.modifier.selected:active,.ML__keyboard div .rows>ul>li.modifier.selected:hover{color:#fff}.ML__keyboard div .rows>ul>li.keycap.w50{font-size:80%;padding-top:10px;font-weight:100}.ML__keyboard div .rows>ul>li small{color:#555}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li small{font-size:9px}}.ML__keyboard div .rows>ul>li aside{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:10px;line-height:10px;color:#666}@media only screen and (max-width:767px){.ML__keyboard div .rows>ul>li aside{display:none}}@media only screen and (max-width:414px){.ML__keyboard div .rows>ul>li{width:29px;margin-right:2px}.ML__keyboard div .rows>ul>.w5{width:13.5px}.ML__keyboard div .rows>ul>.w15{width:44.5px}.ML__keyboard div .rows>ul>.w20{width:60px}.ML__keyboard div .rows>ul>.w50{width:153px}}@media only screen and (min-width:415px) and (max-width:768px){.ML__keyboard div .rows>ul>li{width:37px;margin-right:3px}.ML__keyboard div .rows>ul>.w5{width:17px}.ML__keyboard div .rows>ul>.w15{width:57px}.ML__keyboard div .rows>ul>.w20{width:77px}.ML__keyboard div .rows>ul>.w50{width:197px}}@media only screen and (min-width:768px) and (max-width:1024px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:51px;margin-right:4px}.ML__keyboard div .rows>ul>.w5{width:23.5px}.ML__keyboard div .rows>ul>.w15{width:78.5px}.ML__keyboard div .rows>ul>.w20{width:106px}.ML__keyboard div .rows>ul>.w50{width:271px}}@media only screen and (min-width:1025px){.ML__keyboard div .rows>ul{height:52px}.ML__keyboard div .rows>ul>li{height:52px;width:66px;margin-right:6px}.ML__keyboard div .rows>ul>.action,.ML__keyboard div .rows>ul>.modifier{font-size:80%}.ML__keyboard div .rows>ul>.w5{width:30px}.ML__keyboard div .rows>ul>.w15{width:102px}.ML__keyboard div .rows>ul>.w20{width:138px}.ML__keyboard div .rows>ul>.w50{width:354px}}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] .ML__keyboard{--hue:206;--keyboard-background:hsl(var(--hue),19%,38%);--keyboard-text:#f0f0f0;--keyboard-text-active:hsl(var(--hue),100%,60%);--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:hsl(var(--hue),35%,42%);--keycap-background-border:hsl(var(--hue),25%,35%);--keycap-background-border-bottom:#426b8a;--keycap-text:#d0d0d0;--keycap-text-active:#000;--keycap-secondary-text:#fff;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),19%,38%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}div.ML__keyboard.material{--keyboard-background:rgba(209,213,217,0.9);--keyboard-background-border:#ddd;--keycap-background:transparent;--keycap-background-active:#cccfd1;--keycap-background-border:transparent;--keyboard-alternate-background:#efefef;--keyboard-alternate-text:#000;font-family:Roboto,sans-serif}div.ML__keyboard.material.alternate-keys{background:var(--keyboard-alternate-background);border:1px solid transparent;border-radius:5px;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22)}div.ML__keyboard.material.alternate-keys ul li.active,div.ML__keyboard.material.alternate-keys ul li.pressed,div.ML__keyboard.material.alternate-keys ul li:active,div.ML__keyboard.material.alternate-keys ul li:hover{border:1px solid transparent;background:#5f97fc;color:#fff;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>div{font-size:16px}div.ML__keyboard.material .keyboard-toolbar div.div.active,div.ML__keyboard.material .keyboard-toolbar div.div.pressed,div.ML__keyboard.material .keyboard-toolbar div div:active,div.ML__keyboard.material .keyboard-toolbar div div:hover{color:#5f97fc;fill:currentColor}div.ML__keyboard.material .keyboard-toolbar>div>.selected{color:#5f97fc;fill:currentColor;border-bottom:2px solid #5f97fc;margin-bottom:8px;padding-bottom:0}div.ML__keyboard.material div>.rows>ul>.keycap{background:transparent;border:1px solid transparent;border-radius:5px;color:var(--keycap-text);fill:currentColor;transition:none}div.ML__keyboard.material div>.rows>ul>.keycap.tt{color:#5f97fc}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]{margin-top:10px;margin-bottom:10px;height:20px;background:#e0e0e0}div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "].pressed,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:active,div.ML__keyboard.material div>.rows>ul>.keycap[data-key=" "]:hover{background:#d0d0d0;box-shadow:none;transform:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):hover{border:1px solid transparent;background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{background:var(--keyboard-alternate-background);color:var(--keyboard-alternate-text);box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23)}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{box-shadow:0 10px 20px rgba(0,0,0,.19),0 6px 6px rgba(0,0,0,.23);font-size:10px;vertical-align:top;width:19.5px;margin-right:10px;margin-left:10px;transform:translateY(-20px) scale(2);transition:none;justify-content:flex-start;padding:2px 0 0;z-index:calc(var(--ML_keyboard-zindex, 105) - 5)}}@media only screen and (max-width:414px){div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).active,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]).pressed,div.ML__keyboard.material div>.rows>ul>.keycap:not([data-key=" "]):active{width:16.5px}}@media only screen and (max-width:767px){div.ML__keyboard.material div>.rows>ul>.keycap:last-child.active,div.ML__keyboard.material div>.rows>ul>.keycap:last-child:active{margin-right:0;margin-left:14px}}div.ML__keyboard.material div div.rows ul li.action,div.ML__keyboard.material div div.rows ul li.modifier{background:transparent;border:0;color:#869096;fill:currentColor;font-size:16px;transition:none}div.ML__keyboard.material div div.rows ul li.action.selected,div.ML__keyboard.material div div.rows ul li.modifier.selected{color:#5f97fc;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.action.active,div.ML__keyboard.material div div.rows ul li.action.pressed,div.ML__keyboard.material div div.rows ul li.action:active,div.ML__keyboard.material div div.rows ul li.action:hover,div.ML__keyboard.material div div.rows ul li.modifier.active,div.ML__keyboard.material div div.rows ul li.modifier.pressed,div.ML__keyboard.material div div.rows ul li.modifier:active,div.ML__keyboard.material div div.rows ul li.modifier:hover{border:0;color:var(--keycap-text);background:var(--keycap-background-active);box-shadow:none}div.ML__keyboard.material div div.rows ul li.bigfnbutton,div.ML__keyboard.material div div.rows ul li.fnbutton{background:transparent;border:0}div.ML__keyboard.material div div.rows ul li.bigfnbutton.selected,div.ML__keyboard.material div div.rows ul li.fnbutton.selected{color:#5f97fc;fill:currentColor;border-radius:0;border-bottom:2px solid #5f97fc}div.ML__keyboard.material div div.rows ul li.bigfnbutton.active,div.ML__keyboard.material div div.rows ul li.bigfnbutton.pressed,div.ML__keyboard.material div div.rows ul li.bigfnbutton:active,div.ML__keyboard.material div div.rows ul li.bigfnbutton:hover,div.ML__keyboard.material div div.rows ul li.fnbutton.active,div.ML__keyboard.material div div.rows ul li.fnbutton.pressed,div.ML__keyboard.material div div.rows ul li.fnbutton:active,div.ML__keyboard.material div div.rows ul li.fnbutton:hover{border:0;color:#5f97fc;fill:currentColor;background:var(--keycap-background-active);box-shadow:none}@media (prefers-color-scheme:dark){body:not([theme=light]) div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}}body[theme=dark] div.ML__keyboard.material{--hue:198;--keyboard-background:hsl(var(--hue),19%,18%);--keyboard-text:#d4d6d7;--keyboard-text-active:#5f97fc;--keyboard-background-border:#333;--keycap-background:hsl(var(--hue),25%,39%);--keycap-background-active:#5f97fc;--keycap-background-border:transparent;--keycap-background-border-bottom:transparent;--keycap-text:#d0d0d0;--keycap-text-active:#d4d6d7;--keycap-secondary-text:#5f97fc;--keycap-modifier-background:hsl(var(--hue),35%,40%);--keycap-modifier-border:hsl(var(--hue),35%,35%);--keycap-modifier-border-bottom:hsl(var(--hue),35%,42%);--keyboard-alternate-background:hsl(var(--hue),8%,2%);--keyboard-alternate-background-active:hsl(var(--hue),35%,42%);--keyboard-alternate-text:#d1d1d1}'),Ya["foreground-color"]=[];for(const e of fe)Ya["foreground-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"color":"'+e+'"}]'});Ya["background-color"]=[];for(const e of he)Ya["background-color"].push({classes:"small-button",content:'',command:'["applyStyle",{"backgroundColor":"'+e+'"}]'});Qa={...Ya},Object.keys(Qa).forEach(e=>{Qa[e]=Qa[e].slice()});for(let e=0;e<26;e++){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZ"[e];Qa[t]||(Qa[t]=[]),Qa[t].unshift({latex:"\\mathbb{"+t+"}",aside:"blackboard",insert:"\\mathbb{"+t+"}"}),Qa[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Qa[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Qa[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Qa[t].unshift({latex:"\\mathcal{"+t+"}",aside:"calligraphy",insert:"\\mathcal{"+t+"}"}),Qa[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<=26;e++){const t="abcdefghijklmnopqrstuvwxyz"[e];Qa[t]||(Qa[t]=[]),Qa[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Qa[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Qa[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Qa[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}for(let e=0;e<10;e++){const t="0123456789"[e];Qa[t]||(Qa[t]=[]),Qa[t].unshift({latex:"\\mathbf{"+t+"}",aside:"bold",insert:"\\mathbf{"+t+"}"}),Qa[t].unshift({latex:"\\mathsf{"+t+"}",aside:"sans",insert:"\\mathsf{"+t+"}"}),Qa[t].unshift({latex:"\\mathtt{"+t+"}",aside:"monospace",insert:"\\mathtt{"+t+"}"}),Qa[t].unshift({latex:"\\mathcal{"+t+"}",aside:"script",insert:"\\mathcal{"+t+"}"}),Qa[t].unshift({latex:"\\mathfrak{"+t+"}",aside:"fraktur",insert:"\\mathfrak{"+t+"}"})}let n=e.config.virtualKeyboards;n||(n="all"),n=n.replace(/\ball\b/i,"numeric functions symbols roman greek");const o={...Ja,...null!==(i=e.config.customVirtualKeyboardLayers)&&void 0!==i?i:{}},s={...Xa,...null!==(a=e.config.customVirtualKeyboards)&&void 0!==a?a:{}},l=n.replace(/\s+/g," ").split(" ");for(const t of l){if(!s[t])break;let i=s[t].layers||[];s[t].layer&&i.push(s[t].layer),i=Array.from(new Set(i));for(const a of i){if(!o[a])break;if("object"==typeof o[a]){let e="";if(o[a].styles&&(e+=``),o[a].backdrop&&(e+=`
    `),o[a].container&&(e+=`
    `),o[a].rows){e+="
    ";for(const t of o[a].rows){e+="
      ";for(const i of t)e+="${i.label?i.label:""}`;e+="
    "}e+="
    "}o[a].container&&(e+="
    "),o[a].backdrop&&(e+="
    "),o[a]=e}r+="
    ",r+=tr(e,n,t);const i="function"==typeof o[a]?o[a]():o[a];r+=ar(e,i),r+="
    "}}const c=document.createElement("div");c.className="ML__keyboard",t?c.classList.add(t):e.config.virtualKeyboardTheme&&c.classList.add(e.config.virtualKeyboardTheme),c.innerHTML=e.config.createHTML(r),ir(e,[].slice.call(c.querySelectorAll(".keycap, .action, .fnbutton, .bigfnbutton")));const d=c.getElementsByClassName("layer-switch");for(let t=0;t{e.addEventListener("mousedown",e=>{e.preventDefault(),e.stopPropagation()}),e.addEventListener("touchstart",e=>{e.preventDefault(),e.stopPropagation()},{passive:!1})}),m[0].classList.add("is-visible"),window.addEventListener("mouseup",(function(){rr(),nr(e)})),window.addEventListener("blur",(function(){rr(),nr(e)})),window.addEventListener("touchend",(function(){rr(),nr(e)})),window.addEventListener("touchcancel",(function(){rr(),nr(e)})),c}(e,t),mi(e.virtualKeyboard,"touchstart:passive mousedown",()=>{e.$focus()}),document.body.appendChild(e.virtualKeyboard)),window.setTimeout(()=>{e.virtualKeyboard.classList.add("is-visible")},1)):e.virtualKeyboard&&e.virtualKeyboard.classList.remove("is-visible"),"function"==typeof e.config.onVirtualKeyboardToggle&&e.config.onVirtualKeyboardToggle(e,e.virtualKeyboardVisible,e.virtualKeyboard),!1}ji({showAlternateKeys:(e,t,i)=>{const a=ui("mathlive-alternate-keys-panel","ML__keyboard alternate-keys");e.virtualKeyboard.classList.contains("material")&&a.classList.add("material"),i.length>=7?a.style.width="286px":4===i.length||2===i.length?a.style.width="146px":1===i.length?a.style.width="86px":a.style.width="146px",a.style.height="auto";let r="";for(const e of i)r+="";r="
      "+r+"
    ",a.innerHTML=e.config.createHTML(r),ir(e,[].slice.call(a.getElementsByTagName("li")),"performAlternateKeys");const n=e.virtualKeyboard.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys="'+t+'"]').getBoundingClientRect();if(n){n.top-a.clientHeight<0&&(a.style.width="auto",i.length<=6?a.style.height="56px":i.length<=12?a.style.height="108px":a.style.height="205px");const e=(n.top-a.clientHeight+5).toString()+"px",t=Math.max(0,Math.min(window.innerWidth-a.offsetWidth,(n.left+n.right-a.offsetWidth)/2))+"px";a.style.transform="translate("+t+","+e+")",a.classList.add("is-visible")}return!1}},{target:"virtual-keyboard"}),ji({shiftKeyboardLayer:t=>{const i=t.virtualKeyboard.querySelectorAll("div.keyboard-layer.is-visible .rows .keycap, div.keyboard-layer.is-visible .rows .action");if(i)for(let a=0;arr(),performAlternateKeys:(e,t)=>(rr(),e.$perform(t)),switchKeyboardLayer:(e,t)=>sr(e,t),unshiftKeyboardLayer:e=>nr(e),insertAndUnshiftKeyboardLayer:(e,t)=>(e.$insert(t),nr(e),!0)},{target:"virtual-keyboard"}),ji({toggleVirtualKeyboardAlt:e=>{let t=!1;return e.virtualKeyboard&&(t=e.virtualKeyboard.classList.contains("material"),e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),lr(e,t?"":"material"),!1},toggleVirtualKeyboardShift:e=>{var t,i;e.config.virtualKeyboardLayout={qwerty:"azerty",azerty:"qwertz",qwertz:"dvorak",dvorak:"colemak",colemak:"qwerty"}[e.config.virtualKeyboardLayout];const a=null!==(i=null===(t=e.virtualKeyboard)||void 0===t?void 0:t.querySelector("div.keyboard-layer.is-visible").id)&&void 0!==i?i:"";return e.virtualKeyboard&&(e.virtualKeyboard.remove(),delete e.virtualKeyboard,e.virtualKeyboard=null),lr(e),a&&sr(e,a),!1}},{target:"virtual-keyboard"}),ji({toggleVirtualKeyboard:(e,t)=>dr(e,t),hideVirtualKeyboard:e=>cr(e),showVirtualKeyboard:(e,t)=>lr(e,t)},{target:"virtual-keyboard"});var mr='.ML__sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}body.ML__fonts-loading .ML__base{visibility:hidden}.ML__base{visibility:inherit;display:inline-block;position:relative;cursor:text}.ML__strut,.ML__strut--bottom{display:inline-block;min-height:.5em}.ML__small-delim{font-family:KaTeX_Main}.ML__text{font-family:var(--ml_text-font-family,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif);white-space:pre}.ML__cmr{font-family:KaTeX_Main;font-style:normal}.ML__mathit{font-family:KaTeX_Math;font-style:italic}.ML__mathbf{font-family:KaTeX_Main;font-weight:700}.lcGreek.ML__mathbf{font-family:KaTeX_Math;font-weight:400}.ML__mathbfit{font-family:KaTeX_Math;font-weight:700;font-style:italic}.ML__ams,.ML__bb{font-family:KaTeX_AMS}.ML__cal{font-family:KaTeX_Caligraphic}.ML__frak{font-family:KaTeX_Fraktur}.ML__tt{font-family:KaTeX_Typewriter}.ML__script{font-family:KaTeX_Script}.ML__sans{font-family:KaTeX_SansSerif}.ML__series_el,.ML__series_ul{font-weight:100}.ML__series_l{font-weight:200}.ML__series_sl{font-weight:300}.ML__series_sb{font-weight:500}.ML__bold,.ML__boldsymbol{font-weight:700}.ML__series_eb{font-weight:800}.ML__series_ub{font-weight:900}.ML__series_uc{font-stretch:ultra-condensed}.ML__series_ec{font-stretch:extra-condensed}.ML__series_c{font-stretch:condensed}.ML__series_sc{font-stretch:semi-condensed}.ML__series_sx{font-stretch:semi-expanded}.ML__series_x{font-stretch:expanded}.ML__series_ex{font-stretch:extra-expanded}.ML__series_ux{font-stretch:ultra-expanded}.ML__it{font-style:italic}.ML__shape_ol{-webkit-text-stroke:1px #000;text-stroke:1px #000;color:transparent}.ML__shape_sc{font-variant:small-caps}.ML__shape_sl{font-style:oblique}.ML__emph{color:#bc2612}.ML__emph .ML__emph{color:#0c7f99}.ML__highlight{color:#007cb2;background:#edd1b0}.ML__mathlive{display:inline-block;line-height:0;direction:ltr;text-align:left;text-indent:0;text-rendering:auto;font-family:KaTeX_Main;font-style:normal;font-size-adjust:none;letter-spacing:normal;word-wrap:normal;word-spacing:normal;white-space:nowrap;text-shadow:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:-webkit-min-content;width:-moz-min-content;width:min-content;transform:translateZ(0)}.ML__mathlive .reset-textstyle.scriptstyle{font-size:.7em}.ML__mathlive .reset-textstyle.scriptscriptstyle{font-size:.5em}.ML__mathlive .reset-scriptstyle.textstyle{font-size:1.42857em}.ML__mathlive .reset-scriptstyle.scriptscriptstyle{font-size:.71429em}.ML__mathlive .reset-scriptscriptstyle.textstyle{font-size:2em}.ML__mathlive .reset-scriptscriptstyle.scriptstyle{font-size:1.4em}.ML__mathlive .style-wrap{position:relative}.ML__mathlive .vlist{display:inline-block}.ML__mathlive .vlist>span{display:block;height:0;position:relative;line-height:0}.ML__mathlive .vlist>span>span{display:inline-block}.ML__mathlive .msubsup{text-align:left}.ML__mathlive .mfrac>span{text-align:center}.ML__mathlive .mfrac .frac-line{width:100%}.ML__mathlive .mfrac .frac-line:after{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.04em;box-sizing:content-box}.ML__mathlive .rspace.negativethinspace{margin-right:-.16667em}.ML__mathlive .rspace.thinspace{margin-right:.16667em}.ML__mathlive .rspace.negativemediumspace{margin-right:-.22222em}.ML__mathlive .rspace.mediumspace{margin-right:.22222em}.ML__mathlive .rspace.thickspace{margin-right:.27778em}.ML__mathlive .rspace.sixmuspace{margin-right:.333333em}.ML__mathlive .rspace.eightmuspace{margin-right:.444444em}.ML__mathlive .rspace.enspace{margin-right:.5em}.ML__mathlive .rspace.twelvemuspace{margin-right:.666667em}.ML__mathlive .rspace.quad{margin-right:1em}.ML__mathlive .rspace.qquad{margin-right:2em}.ML__mathlive .mspace{display:inline-block}.ML__mathlive .mspace.negativethinspace{margin-left:-.16667em}.ML__mathlive .mspace.thinspace{width:.16667em}.ML__mathlive .mspace.negativemediumspace{margin-left:-.22222em}.ML__mathlive .mspace.mediumspace{width:.22222em}.ML__mathlive .mspace.thickspace{width:.27778em}.ML__mathlive .mspace.sixmuspace{width:.333333em}.ML__mathlive .mspace.eightmuspace{width:.444444em}.ML__mathlive .mspace.enspace{width:.5em}.ML__mathlive .mspace.twelvemuspace{width:.666667em}.ML__mathlive .mspace.quad{width:1em}.ML__mathlive .mspace.qquad{width:2em}.ML__mathlive .llap,.ML__mathlive .rlap{width:0;position:relative}.ML__mathlive .llap>.inner,.ML__mathlive .rlap>.inner{position:absolute}.ML__mathlive .llap>.fix,.ML__mathlive .rlap>.fix{display:inline-block}.ML__mathlive .llap>.inner{right:0}.ML__mathlive .rlap>.inner{left:0}.ML__mathlive .rule{display:inline-block;border:0 solid;position:relative}.ML__mathlive .overline .overline-line,.ML__mathlive .underline .underline-line{width:100%}.ML__mathlive .overline .overline-line:before,.ML__mathlive .underline .underline-line:before{border-bottom-style:solid;border-bottom-width:.04em;content:"";display:block}.ML__mathlive .overline .overline-line:after,.ML__mathlive .underline .underline-line:after{border-bottom-style:solid;border-bottom-width:.04em;min-height:thin;content:"";display:block;margin-top:-1px}.ML__mathlive .stretchy{display:block;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .stretchy:after,.ML__mathlive .stretchy:before{content:""}.ML__mathlive .stretchy svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.ML__mathlive .slice-1-of-2{left:0}.ML__mathlive .slice-1-of-2,.ML__mathlive .slice-2-of-2{display:inline-flex;position:absolute;width:50.2%;overflow:hidden}.ML__mathlive .slice-2-of-2{right:0}.ML__mathlive .slice-1-of-3{display:inline-flex;position:absolute;left:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-2-of-3{display:inline-flex;position:absolute;left:25%;width:50%;overflow:hidden}.ML__mathlive .slice-3-of-3{display:inline-flex;position:absolute;right:0;width:25.1%;overflow:hidden}.ML__mathlive .slice-1-of-1{display:inline-flex;position:absolute;width:100%;left:0;overflow:hidden}.ML__mathlive .sqrt{display:inline-block}.ML__mathlive .sqrt>.sqrt-sign{font-family:KaTeX_Main;position:relative}.ML__mathlive .sqrt .sqrt-line{height:.04em;width:100%}.ML__mathlive .sqrt .sqrt-line:before{content:"";display:block;margin-top:-.04em;border-bottom-style:solid;border-bottom-width:.04em;min-height:.5px}.ML__mathlive .sqrt .sqrt-line:after{border-bottom-width:1px;content:" ";display:block;margin-top:-.1em}.ML__mathlive .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.ML__mathlive .fontsize-ensurer,.ML__mathlive .sizing{display:inline-block}.ML__mathlive .fontsize-ensurer.reset-size1.size1,.ML__mathlive .sizing.reset-size1.size1{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size1.size2,.ML__mathlive .sizing.reset-size1.size2{font-size:1.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size3,.ML__mathlive .sizing.reset-size1.size3{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size1.size4,.ML__mathlive .sizing.reset-size1.size4{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size1.size5,.ML__mathlive .sizing.reset-size1.size5{font-size:2em}.ML__mathlive .fontsize-ensurer.reset-size1.size6,.ML__mathlive .sizing.reset-size1.size6{font-size:2.4em}.ML__mathlive .fontsize-ensurer.reset-size1.size7,.ML__mathlive .sizing.reset-size1.size7{font-size:2.88em}.ML__mathlive .fontsize-ensurer.reset-size1.size8,.ML__mathlive .sizing.reset-size1.size8{font-size:3.46em}.ML__mathlive .fontsize-ensurer.reset-size1.size9,.ML__mathlive .sizing.reset-size1.size9{font-size:4.14em}.ML__mathlive .fontsize-ensurer.reset-size1.size10,.ML__mathlive .sizing.reset-size1.size10{font-size:4.98em}.ML__mathlive .fontsize-ensurer.reset-size2.size1,.ML__mathlive .sizing.reset-size2.size1{font-size:.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size2,.ML__mathlive .sizing.reset-size2.size2{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size2.size3,.ML__mathlive .sizing.reset-size2.size3{font-size:1.14285714em}.ML__mathlive .fontsize-ensurer.reset-size2.size4,.ML__mathlive .sizing.reset-size2.size4{font-size:1.28571429em}.ML__mathlive .fontsize-ensurer.reset-size2.size5,.ML__mathlive .sizing.reset-size2.size5{font-size:1.42857143em}.ML__mathlive .fontsize-ensurer.reset-size2.size6,.ML__mathlive .sizing.reset-size2.size6{font-size:1.71428571em}.ML__mathlive .fontsize-ensurer.reset-size2.size7,.ML__mathlive .sizing.reset-size2.size7{font-size:2.05714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size8,.ML__mathlive .sizing.reset-size2.size8{font-size:2.47142857em}.ML__mathlive .fontsize-ensurer.reset-size2.size9,.ML__mathlive .sizing.reset-size2.size9{font-size:2.95714286em}.ML__mathlive .fontsize-ensurer.reset-size2.size10,.ML__mathlive .sizing.reset-size2.size10{font-size:3.55714286em}.ML__mathlive .fontsize-ensurer.reset-size3.size1,.ML__mathlive .sizing.reset-size3.size1{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size3.size2,.ML__mathlive .sizing.reset-size3.size2{font-size:.875em}.ML__mathlive .fontsize-ensurer.reset-size3.size3,.ML__mathlive .sizing.reset-size3.size3{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size3.size4,.ML__mathlive .sizing.reset-size3.size4{font-size:1.125em}.ML__mathlive .fontsize-ensurer.reset-size3.size5,.ML__mathlive .sizing.reset-size3.size5{font-size:1.25em}.ML__mathlive .fontsize-ensurer.reset-size3.size6,.ML__mathlive .sizing.reset-size3.size6{font-size:1.5em}.ML__mathlive .fontsize-ensurer.reset-size3.size7,.ML__mathlive .sizing.reset-size3.size7{font-size:1.8em}.ML__mathlive .fontsize-ensurer.reset-size3.size8,.ML__mathlive .sizing.reset-size3.size8{font-size:2.1625em}.ML__mathlive .fontsize-ensurer.reset-size3.size9,.ML__mathlive .sizing.reset-size3.size9{font-size:2.5875em}.ML__mathlive .fontsize-ensurer.reset-size3.size10,.ML__mathlive .sizing.reset-size3.size10{font-size:3.1125em}.ML__mathlive .fontsize-ensurer.reset-size4.size1,.ML__mathlive .sizing.reset-size4.size1{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size4.size2,.ML__mathlive .sizing.reset-size4.size2{font-size:.77777778em}.ML__mathlive .fontsize-ensurer.reset-size4.size3,.ML__mathlive .sizing.reset-size4.size3{font-size:.88888889em}.ML__mathlive .fontsize-ensurer.reset-size4.size4,.ML__mathlive .sizing.reset-size4.size4{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size4.size5,.ML__mathlive .sizing.reset-size4.size5{font-size:1.11111111em}.ML__mathlive .fontsize-ensurer.reset-size4.size6,.ML__mathlive .sizing.reset-size4.size6{font-size:1.33333333em}.ML__mathlive .fontsize-ensurer.reset-size4.size7,.ML__mathlive .sizing.reset-size4.size7{font-size:1.6em}.ML__mathlive .fontsize-ensurer.reset-size4.size8,.ML__mathlive .sizing.reset-size4.size8{font-size:1.92222222em}.ML__mathlive .fontsize-ensurer.reset-size4.size9,.ML__mathlive .sizing.reset-size4.size9{font-size:2.3em}.ML__mathlive .fontsize-ensurer.reset-size4.size10,.ML__mathlive .sizing.reset-size4.size10{font-size:2.76666667em}.ML__mathlive .fontsize-ensurer.reset-size5.size1,.ML__mathlive .sizing.reset-size5.size1{font-size:.5em}.ML__mathlive .fontsize-ensurer.reset-size5.size2,.ML__mathlive .sizing.reset-size5.size2{font-size:.7em}.ML__mathlive .fontsize-ensurer.reset-size5.size3,.ML__mathlive .sizing.reset-size5.size3{font-size:.8em}.ML__mathlive .fontsize-ensurer.reset-size5.size4,.ML__mathlive .sizing.reset-size5.size4{font-size:.9em}.ML__mathlive .fontsize-ensurer.reset-size5.size5,.ML__mathlive .sizing.reset-size5.size5{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size5.size6,.ML__mathlive .sizing.reset-size5.size6{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size5.size7,.ML__mathlive .sizing.reset-size5.size7{font-size:1.44em}.ML__mathlive .fontsize-ensurer.reset-size5.size8,.ML__mathlive .sizing.reset-size5.size8{font-size:1.73em}.ML__mathlive .fontsize-ensurer.reset-size5.size9,.ML__mathlive .sizing.reset-size5.size9{font-size:2.07em}.ML__mathlive .fontsize-ensurer.reset-size5.size10,.ML__mathlive .sizing.reset-size5.size10{font-size:2.49em}.ML__mathlive .fontsize-ensurer.reset-size6.size1,.ML__mathlive .sizing.reset-size6.size1{font-size:.41666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size2,.ML__mathlive .sizing.reset-size6.size2{font-size:.58333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size3,.ML__mathlive .sizing.reset-size6.size3{font-size:.66666667em}.ML__mathlive .fontsize-ensurer.reset-size6.size4,.ML__mathlive .sizing.reset-size6.size4{font-size:.75em}.ML__mathlive .fontsize-ensurer.reset-size6.size5,.ML__mathlive .sizing.reset-size6.size5{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size6.size6,.ML__mathlive .sizing.reset-size6.size6{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size6.size7,.ML__mathlive .sizing.reset-size6.size7{font-size:1.2em}.ML__mathlive .fontsize-ensurer.reset-size6.size8,.ML__mathlive .sizing.reset-size6.size8{font-size:1.44166667em}.ML__mathlive .fontsize-ensurer.reset-size6.size9,.ML__mathlive .sizing.reset-size6.size9{font-size:1.725em}.ML__mathlive .fontsize-ensurer.reset-size6.size10,.ML__mathlive .sizing.reset-size6.size10{font-size:2.075em}.ML__mathlive .fontsize-ensurer.reset-size7.size1,.ML__mathlive .sizing.reset-size7.size1{font-size:.34722222em}.ML__mathlive .fontsize-ensurer.reset-size7.size2,.ML__mathlive .sizing.reset-size7.size2{font-size:.48611111em}.ML__mathlive .fontsize-ensurer.reset-size7.size3,.ML__mathlive .sizing.reset-size7.size3{font-size:.55555556em}.ML__mathlive .fontsize-ensurer.reset-size7.size4,.ML__mathlive .sizing.reset-size7.size4{font-size:.625em}.ML__mathlive .fontsize-ensurer.reset-size7.size5,.ML__mathlive .sizing.reset-size7.size5{font-size:.69444444em}.ML__mathlive .fontsize-ensurer.reset-size7.size6,.ML__mathlive .sizing.reset-size7.size6{font-size:.83333333em}.ML__mathlive .fontsize-ensurer.reset-size7.size7,.ML__mathlive .sizing.reset-size7.size7{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size7.size8,.ML__mathlive .sizing.reset-size7.size8{font-size:1.20138889em}.ML__mathlive .fontsize-ensurer.reset-size7.size9,.ML__mathlive .sizing.reset-size7.size9{font-size:1.4375em}.ML__mathlive .fontsize-ensurer.reset-size7.size10,.ML__mathlive .sizing.reset-size7.size10{font-size:1.72916667em}.ML__mathlive .fontsize-ensurer.reset-size8.size1,.ML__mathlive .sizing.reset-size8.size1{font-size:.28901734em}.ML__mathlive .fontsize-ensurer.reset-size8.size2,.ML__mathlive .sizing.reset-size8.size2{font-size:.40462428em}.ML__mathlive .fontsize-ensurer.reset-size8.size3,.ML__mathlive .sizing.reset-size8.size3{font-size:.46242775em}.ML__mathlive .fontsize-ensurer.reset-size8.size4,.ML__mathlive .sizing.reset-size8.size4{font-size:.52023121em}.ML__mathlive .fontsize-ensurer.reset-size8.size5,.ML__mathlive .sizing.reset-size8.size5{font-size:.57803468em}.ML__mathlive .fontsize-ensurer.reset-size8.size6,.ML__mathlive .sizing.reset-size8.size6{font-size:.69364162em}.ML__mathlive .fontsize-ensurer.reset-size8.size7,.ML__mathlive .sizing.reset-size8.size7{font-size:.83236994em}.ML__mathlive .fontsize-ensurer.reset-size8.size8,.ML__mathlive .sizing.reset-size8.size8{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size8.size9,.ML__mathlive .sizing.reset-size8.size9{font-size:1.19653179em}.ML__mathlive .fontsize-ensurer.reset-size8.size10,.ML__mathlive .sizing.reset-size8.size10{font-size:1.43930636em}.ML__mathlive .fontsize-ensurer.reset-size9.size1,.ML__mathlive .sizing.reset-size9.size1{font-size:.24154589em}.ML__mathlive .fontsize-ensurer.reset-size9.size2,.ML__mathlive .sizing.reset-size9.size2{font-size:.33816425em}.ML__mathlive .fontsize-ensurer.reset-size9.size3,.ML__mathlive .sizing.reset-size9.size3{font-size:.38647343em}.ML__mathlive .fontsize-ensurer.reset-size9.size4,.ML__mathlive .sizing.reset-size9.size4{font-size:.43478261em}.ML__mathlive .fontsize-ensurer.reset-size9.size5,.ML__mathlive .sizing.reset-size9.size5{font-size:.48309179em}.ML__mathlive .fontsize-ensurer.reset-size9.size6,.ML__mathlive .sizing.reset-size9.size6{font-size:.57971014em}.ML__mathlive .fontsize-ensurer.reset-size9.size7,.ML__mathlive .sizing.reset-size9.size7{font-size:.69565217em}.ML__mathlive .fontsize-ensurer.reset-size9.size8,.ML__mathlive .sizing.reset-size9.size8{font-size:.83574879em}.ML__mathlive .fontsize-ensurer.reset-size9.size9,.ML__mathlive .sizing.reset-size9.size9{font-size:1em}.ML__mathlive .fontsize-ensurer.reset-size9.size10,.ML__mathlive .sizing.reset-size9.size10{font-size:1.20289855em}.ML__mathlive .fontsize-ensurer.reset-size10.size1,.ML__mathlive .sizing.reset-size10.size1{font-size:.20080321em}.ML__mathlive .fontsize-ensurer.reset-size10.size2,.ML__mathlive .sizing.reset-size10.size2{font-size:.2811245em}.ML__mathlive .fontsize-ensurer.reset-size10.size3,.ML__mathlive .sizing.reset-size10.size3{font-size:.32128514em}.ML__mathlive .fontsize-ensurer.reset-size10.size4,.ML__mathlive .sizing.reset-size10.size4{font-size:.36144578em}.ML__mathlive .fontsize-ensurer.reset-size10.size5,.ML__mathlive .sizing.reset-size10.size5{font-size:.40160643em}.ML__mathlive .fontsize-ensurer.reset-size10.size6,.ML__mathlive .sizing.reset-size10.size6{font-size:.48192771em}.ML__mathlive .fontsize-ensurer.reset-size10.size7,.ML__mathlive .sizing.reset-size10.size7{font-size:.57831325em}.ML__mathlive .fontsize-ensurer.reset-size10.size8,.ML__mathlive .sizing.reset-size10.size8{font-size:.69477912em}.ML__mathlive .fontsize-ensurer.reset-size10.size9,.ML__mathlive .sizing.reset-size10.size9{font-size:.8313253em}.ML__mathlive .fontsize-ensurer.reset-size10.size10,.ML__mathlive .sizing.reset-size10.size10{font-size:1em}.ML__mathlive .delimsizing.size1{font-family:KaTeX_Size1}.ML__mathlive .delimsizing.size2{font-family:KaTeX_Size2}.ML__mathlive .delimsizing.size3{font-family:KaTeX_Size3}.ML__mathlive .delimsizing.size4{font-family:KaTeX_Size4}.ML__mathlive .delimsizing.mult .delim-size1{font-family:KaTeX_Size1;vertical-align:top}.ML__mathlive .delimsizing.mult .delim-size4{font-family:KaTeX_Size4;vertical-align:top}.ML__mathlive .nulldelimiter{width:.12em}.ML__mathlive .op-symbol{position:relative}.ML__mathlive .op-symbol.small-op{font-family:KaTeX_Size1}.ML__mathlive .op-symbol.large-op{font-family:KaTeX_Size2}.ML__mathlive .op-limits .vlist>span{text-align:center}.ML__mathlive .op-over-under{position:relative}.ML__mathlive .op-over-under>.vlist>span:first-child,.ML__mathlive .op-over-under>.vlist>span:last-child{text-align:center}.ML__mathlive .accent>.vlist>span{text-align:center}.ML__mathlive .accent .accent-body>span{font-family:KaTeX_Main;width:0}.ML__mathlive .accent .accent-body.accent-vec>span{position:relative;left:.326em}.ML__mathlive .mtable .vertical-separator{display:inline-block;margin:0 -.025em;border-right:.05em solid}.ML__mathlive .mtable .arraycolsep{display:inline-block}.ML__mathlive .mtable .col-align-m>.vlist{text-align:center}.ML__mathlive .mtable .col-align-c>.vlist{text-align:center}.ML__mathlive .mtable .col-align-l>.vlist{text-align:left}.ML__mathlive .mtable .col-align-r>.vlist{text-align:right}.ML__error{background-image:radial-gradient(ellipse at center,#cc0041,transparent 70%);background-repeat:repeat-x;background-size:3px 3px;background-position:0 98%}.ML__placeholder{opacity:.7;padding-left:.4ex;padding-right:.4ex;padding-top:.4ex}';const pr="Nothing",ur="Group",hr="Multiply",fr="Power",gr="Divide",yr="Add",br="Negate";function vr(e,t){return e[t]&&!("isConstant"in e[t])?e[t]:null}const xr={arithmetic:{PI:{wikidata:"Q167",isConstant:!0,domain:"R+"},Abs:{wikidata:"Q3317982",isPure:!0,isListable:!0,isIdempotent:!0},Add:{wikidata:"Q32043",isAssociative:!0,isCommutative:!0,isListable:!0,isIdempotent:!0,isPure:!0},Chop:{isAssociative:!0,isListable:!0,isPure:!0,isIdempotent:!0},Ceil:{isPure:!0},Equal:{wikidata:"Q842346",isPure:!0},E:{isConstant:!0,value:{num:"2.7182818284590452354"}},Exp:{isPure:!0},Exp2:{isPure:!0},Exp10:{isPure:!0},Erf:{isPure:!0},Erfc:{isPure:!0},ExpMinusOne:{isPure:!0},Factorial:{wikidata:"Q120976",isPure:!0},Floor:{isPure:!0},Gamma:{isPure:!0},LogGamma:{isPure:!0},Log:{isPure:!0},Log2:{isPure:!0},Log10:{isPure:!0},LogOnePlus:{isPure:!0},MachineEpsilon:{isConstant:!0,value:{num:"2.220446049250313e-16"}},Multiply:{wikidata:"Q40276",isAssociative:!0,isCommutative:!0,isIdempotent:!0,isPure:!0},NotEqual:{wikidata:"Q28113351",isCommutative:!0,isPure:!0},Negate:{wikidata:"Q715358",isPure:!0},Power:{wikidata:"Q33456",isCommutative:!1,isPure:!0},Round:{isPure:!0},SignGamma:{isPure:!0},Sqrt:{isPure:!0},Root:{isCommutative:!1,isPure:!0},Subtract:{wikidata:"Q32043",isCommutative:!1,isPure:!0}},algebra:{},calculus:{},combinatorics:{},complex:{},core:{Evaluate:{},Group:{domain:"expression",isListable:!0,isPure:!1},Latex:{domain:"string",isListable:!1,isPure:!0},String:{domain:"string",isListable:!0,isPure:!0}},dimensions:{},lists:{},logic:{},inequalities:{},intervals:{},"linear-algebra":{},numeric:{},other:{},polynomials:{},physics:{"mu-0":{isConstant:!0,wikidata:"Q1515261",domain:"R+",value:125663706212e-17,unit:[hr,"H",[fr,"m",-1]]}},quantifiers:{},relations:{},rounding:{},sets:{CartesianProduct:{wikidata:"Q173740"},Intersection:{wikidata:"Q185359"},Complement:{wikidata:"Q242767"},Union:{wikidata:"Q185359"},SymmetricDifference:{wikidata:"Q1147242"}},statistics:{},transcendentals:{},trigonometry:{Arcosh:{isPure:!0},Arccos:{isPure:!0},Arcsin:{isPure:!0},Arctan:{isPure:!0},Arctan2:{isPure:!0},Arsinh:{isPure:!0},Artanh:{isPure:!0},Cos:{isPure:!0},Degrees:{isConstant:!0,value:{num:"0.017453292519943295769236907"}},FromPolarCoordinates:{isPure:!0},Haversine:{isPure:!0},Hypot:{isPure:!0},InverseHaversine:{isPure:!0},Sin:{isPure:!0},Sinh:{isPure:!0},Tan:{isPure:!0},Tanh:{isPure:!0},ToPolarCoordinates:{isPure:!0}},units:{}},kr={precision:15,decimalMarker:".",groupSeparator:"\\,",exponentProduct:"\\cdot",beginExponentMarker:"10^{",endExponentMarker:"}",arcSeparator:"\\,",notation:"auto",imaginaryNumber:"\\imaginaryI",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},_r={...kr,invisibleOperator:hr,skipSpace:!0,parseArgumentsOfUnknownLatexCommands:!0,parseNumbers:!0,promoteUnknownSymbols:/^[a-zA-Z]$/,promoteUnknownFunctions:/^[fg]$/,invisiblePlusOperator:yr,preserveLatex:!1,dictionary:[]},wr={...kr,invisibleMultiply:"",invisiblePlus:"",multiply:"\\times",dictionary:[]};function Mr(e){return Boolean(e)&&"object"==typeof e&&"num"in e}function Sr(e){return Boolean(e)&&"object"==typeof e&&"sym"in e}function zr(e){return Boolean(e)&&"object"==typeof e&&"fn"in e}function Lr(e){return"number"==typeof e?e:Mr(e)?parseFloat(e.num):Cr(e)===br?-Lr(Kr(e,1)):NaN}function Ar(e){if("number"==typeof e)return[e,1];if(Mr(e))return[Lr(e),1];if($r(e))return[NaN,NaN];const t=Cr(e);if(t===fr){const t=Lr(Kr(e,2));return 1===t?[Lr(Kr(e,1)),1]:-1===t?[1,Lr(Kr(e,1))]:[NaN,NaN]}return t===gr?[Lr(Kr(e,1)),Lr(Kr(e,2))]:t===hr&&Cr(Kr(e,2))===fr&&-1===Lr(Kr(Kr(e,2),2))?[Lr(Kr(e,1)),Lr(Kr(Kr(e,2),1))]:[NaN,NaN]}function qr(e){return Array.isArray(e)?e[0]:zr(e)?e.fn[0]:null}function $r(e){return null===e||!Array.isArray(e)&&("object"!=typeof e||!("fn"in e))}function Cr(e){const t=qr(e);return"string"==typeof t?t:""}function Dr(e){return"string"==typeof e?e:Sr(e)?e.sym:null}function Tr(e){return Array.isArray(e)?e.slice(1):zr(e)?e.fn.slice(1):[]}function Er(e,t){return Array.isArray(e)?e.map((e,i)=>0===i?e:t(e)):zr(e)?e.fn.map((e,i)=>0===i?e:t(e)):e}function Kr(e,t){return Array.isArray(e)?e[t]:zr(e)?e.fn[t]:null}function Nr(e){return Array.isArray(e)?Math.max(0,e.length-1):zr(e)?Math.max(0,e.fn.length-1):0}function Or(e,t){var i;let a=e;for(let e=0;e{const r=h(g(t,"variant").map(t=>{let r=t[0].variant;if(t[0].variantStyle&&"up"!==t[0].variantStyle&&(r+="-"+t[0].variantStyle),t.every(t=>{const i=ae(t.symbol,e.mode,null);if(!i||!i.variant&&!i.variantStyle)return!1;let a=t.variant;return t.variantStyle&&"up"!==t.variantStyle&&(a+="-"+t.variantStyle),a===r}))return h(t.map(e=>e.toLatex(i)));let n="";return r&&r!==a&&(n={calligraphic:"\\mathcal{",fraktur:"\\mathfrak{","double-struck":"\\mathbb{",script:"\\mathscr{",monospace:"\\mathtt{","sans-serif":"\\mathsf{",normal:"\\mathrm{","normal-italic":"\\mathit{","normal-bold":"\\mathbf{","normal-bolditalic":"\\mathbfit{",ams:"","ams-italic":"\\mathit{","ams-bold":"\\mathbf{","ams-bolditalic":"\\mathbfit{",main:"","main-italic":"\\mathit{","main-bold":"\\mathbf{","main-bolditalic":"\\mathbfit{"}[r]),n+h(t.map(e=>e.toLatex(i)))+(n?"}":"")}));return!t[0].color||e&&e.color===t[0].color?r:"\\textcolor{"+be(t[0].color)+"}{"+r+"}"}))},applyStyle:function(e,t){const i="auto"!==t.letterShapeStyle&&t.letterShapeStyle?t.letterShapeStyle:"tex";let a=t.variant||"normal",r=t.variantStyle||"";"normal"===a&&!r&&/\u00a3|\u0131|\u0237/.test(e.body)&&(a="main",r="italic"),"normal"!==a||r||1!==e.body.length||Rr.forEach((t,a)=>{t.test(e.body)&&"it"===Ir[i][a]&&(r="italic")}),"up"===r&&(r="");const n=r?a+"-"+r:a,[o,s]=Br[n];return Fr[a]&&!Fr[a].test(e.body)?(e.body=Y(e.body,a,r),e.variant="",e.variantStyle="",null):(Pr.test(e.body)&&(e.classes+=" lcGreek"),s&&(e.classes+=" "+s),o)}});const Hr={roman:"","sans-serif":"ML__sans",monospace:"ML__tt"};b("text",{emitLatexRun:function(e,t,i){const a=function(e,t,i){return h(g(t,"color").map(t=>{const i=function(e,t,i){return function(e,t,i){return h(g(t,"fontFamily").map(e=>{const t=function(e,t,i){return h(g(t,"fontSize").map(e=>{const t=function(e,t,i){return h(g(t,"fontSeries").map(e=>{const t=function(e,t,i){return h(g(t,"fontShape").map(e=>{const t=function(e,t,i){let a=!1;return h(t.map(e=>{let t="",i="";return e.latex?t=e.latex:"string"==typeof e.body?t=J("text",e.body):e.symbol&&(t=e.symbol.replace(/\\/g,"\\backslash ")),!a||t&&!/^[a-zA-Z0-9*]/.test(t)||(i="{}"),a=/\\[a-zA-Z0-9]+\*?$/.test(t),i+t}))}(0,e);return"it"===e[0].fontShape?"\\textit{"+t+"}":"sl"===e[0].fontShape?"\\textsl{"+t+"}":"sc"===e[0].fontShape?"\\textsc{"+t+"}":"n"===e[0].fontShape?"\\textup{"+t+"}":e[0].fontShape?"\\fontshape{"+e[0].fontShape+"}"+t:t}))}(0,e);return"b"===e[0].fontSeries?"\\textbf{"+t+"}":"l"===e[0].fontSeries?"\\textlf{"+t+"}":"m"===e[0].fontSeries?"\\textmd{"+t+"}":e[0].fontSeries?"\\fontseries{"+e[0].fontSeries+"}"+t:t}))}(0,e),i={size1:"tiny",size2:"scriptsize",size3:"footnotesize",size4:"small",size5:"normalsize",size6:"large",size7:"Large",size8:"LARGE",size9:"huge",size10:"Huge"}[e[0].fontSize]||"";return i?"\\"+i+" "+t:t}))}(0,e),i={roman:"textrm",monospace:"texttt","sans-serif":"textsf"}[e[0].fontFamily]||"";return i?"\\"+i+"{"+t+"}":e[0].fontFamily?"\\fontfamily{"+e[0].fontFamily+"}"+t:t}))}(0,t)}(0,t);return!t[0].color||"none"===t[0].color||e&&e.color===t[0].color?i:"\\textcolor{"+be(t[0].color)+"}{"+i+"}"}))}(e,t);return t.every(e=>e.fontSeries||e.fontShape||e.fontFamily)&&t[0].mode===e.mode?a:`\\text{${a}}`},applyStyle:function(e,t){const i=t.fontFamily;if(Hr[i]?e.classes+=" "+Hr[i]:i&&e.setStyle("font-family",i),t.fontShape&&(e.classes+=" "+({it:"ML__it",sl:"ML__shape_sl",sc:"ML__shape_sc",ol:"ML__shape_ol"}[t.fontShape]||"")),t.fontSeries){const i=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);i&&(e.classes+=" "+({ul:"ML__series_ul",el:"ML__series_el",l:"ML__series_l",sl:"ML__series_sl",m:"",sb:"ML__series_sb",b:"ML__bold",eb:"ML__series_eb",ub:"ML__series_ub"}[i[1]||""]||""),e.classes+=" "+({uc:"ML__series_uc",ec:"ML__series_ec",c:"ML__series_c",sc:"ML__series_sc",n:"",sx:"ML__series_sx",x:"ML__series_x",ex:"ML__series_ex",ux:"ML__series_ux"}[i[2]||""]||""))}return"Main-Regular"},parse:(e,t,i)=>function(e,t,i){let a,r=[];for(;e.length>0;){const n=e.shift();if(""===n)a=new Oe("text",""," ",i.style),a.symbol=" ",r.push(a);else if("\\"===n[0]){let t;e.unshift(n),[t,e]=i.parse("text",e,i),r=[...r,...t]}else if(1===n.length){const e=ae(n,"text",i.macros);!e||e.mode&&!e.mode.includes("text")?t({code:"unexpected-token"}):(a=new Oe("text",e?e.type:"",e?e.value:n,i.style),a.symbol=n,a.latex=G("text",n),r.push(a))}else if("<$>"===n||"<$$>"===n){const t=e.slice(0,e.findIndex(e=>e===n));e=e.slice(t.length+1);const[a]=i.parse("math",t,i);r=[...r,...a]}else"<{>"===n||"<}>"===n||t({code:"unexpected-token",arg:n})}return[r,e]}(e,t,i)[0]}),de(["ce","pu"],"{chemformula:balanced-string}",null,(e,t)=>({type:"group",mode:"chem",body:Je(Vr.go(Wr.go(t[0],"\\pu"===e?"pu":"ce"))),latexOpen:"\\"+e+"{",latexClose:"}"}));var Wr={go:function(e,t){if(!e)return[];void 0===t&&(t="ce");var i,a="0",r={parenthesisLevel:0};e=(e=(e=e.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var n=10,o=[];;){i!==e?(n=10,i=e):n--;var s=Wr.stateMachines[t],l=s.transitions[a]||s.transitions["*"];e:for(var c=0;c0))return o;if(m.revisit||(e=d.remainder),!m.toContinue)break e}}if(n<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(e,t){if(t)if(Array.isArray(t))for(var i=0;i":/^[=<>]/,"#":/^[#\u2261]/,"+":/^\+/,"-$":/^-(?=[\s_},;\]/]|$|\([a-z]+\))/,"-9":/^-(?=[0-9])/,"- orbital overlap":/^-(?=(?:[spd]|sp)(?:$|[\s,;\)\]\}]))/,"-":/^-/,"pm-operator":/^(?:\\pm|\$\\pm\$|\+-|\+\/-)/,operator:/^(?:\+|(?:[\-=<>]|<<|>>|\\approx|\$\\approx\$)(?=\s|$|-?[0-9]))/,arrowUpDown:/^(?:v|\(v\)|\^|\(\^\))(?=$|[\s,;\)\]\}])/,"\\bond{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\bond{","","","}")},"->":/^(?:<->|<-->|->|<-|<=>>|<<=>|<=>|[\u2192\u27F6\u21CC])/,CMT:/^[CMT](?=\[)/,"[(...)]":function(e){return Wr.patterns.findObserveGroups(e,"[","","","]")},"1st-level escape":/^(&|\\\\|\\hline)\s*/,"\\,":/^(?:\\[,\ ;:])/,"\\x{}{}":function(e){return Wr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"\\x{}":function(e){return Wr.patterns.findObserveGroups(e,"",/^\\[a-zA-Z]+\{/,"}","")},"\\ca":/^\\ca(?:\s+|(?![a-zA-Z]))/,"\\x":/^(?:\\[a-zA-Z]+\s*|\\[_&{}%])/,orbital:/^(?:[0-9]{1,2}[spdfgh]|[0-9]{0,2}sp)(?=$|[^a-zA-Z])/,others:/^[\/~|]/,"\\frac{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\frac{","","","}","{","","","}")},"\\overset{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\overset{","","","}","{","","","}")},"\\underset{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\underset{","","","}","{","","","}")},"\\underbrace{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\underbrace{","","","}_","{","","","}")},"\\color{(...)}0":function(e){return Wr.patterns.findObserveGroups(e,"\\color{","","","}")},"\\color{(...)}{(...)}1":function(e){return Wr.patterns.findObserveGroups(e,"\\color{","","","}","{","","","}")},"\\color(...){(...)}2":function(e){return Wr.patterns.findObserveGroups(e,"\\color","\\","",/^(?=\{)/,"{","","","}")},"\\ce{(...)}":function(e){return Wr.patterns.findObserveGroups(e,"\\ce{","","","}")},oxidation$:/^(?:[+-][IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"d-oxidation$":/^(?:[+-]?\s?[IVX]+|\\pm\s*0|\$\\pm\$\s*0)$/,"roman numeral":/^[IVX]+/,"1/2$":/^[+\-]?(?:[0-9]+|\$[a-z]\$|[a-z])\/[0-9]+(?:\$[a-z]\$|[a-z])?$/,amount:function(e){var t;if(t=e.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))/))return{match_:t[0],remainder:e.substr(t[0].length)};var i=Wr.patterns.findObserveGroups(e,"","$","$","");return i&&(t=i.match_.match(/^\$(?:\(?[+\-]?(?:[0-9]*[a-z]?[+\-])?[0-9]*[a-z](?:[+\-][0-9]*[a-z]?)?\)?|\+|-)\$$/))?{match_:t[0],remainder:e.substr(t[0].length)}:null},amount2:function(e){return this.amount(e)},"(KV letters),":/^(?:[A-Z][a-z]{0,2}|i)(?=,)/,formula$:function(e){if(e.match(/^\([a-z]+\)$/))return null;var t=e.match(/^(?:[a-z]|(?:[0-9\ \+\-\,\.\(\)]+[a-z])+[0-9\ \+\-\,\.\(\)]*|(?:[a-z][0-9\ \+\-\,\.\(\)]+)+[a-z]?)$/);return t?{match_:t[0],remainder:e.substr(t[0].length)}:null},uprightEntities:/^(?:pH|pOH|pC|pK|iPr|iBu)(?=$|[^a-zA-Z])/,"/":/^\s*(\/)\s*/,"//":/^\s*(\/\/)\s*/,"*":/^\s*[*.]\s*/},findObserveGroups:function(e,t,i,a,r,n,o,s,l,c){var d=function(e,t){if("string"==typeof t)return 0!==e.indexOf(t)?null:t;var i=e.match(t);return i?i[0]:null},m=d(e,t);if(null===m)return null;if(e=e.substr(m.length),null===(m=d(e,i)))return null;var p=function(e,t,i){for(var a=0;t":{"0|1|2|3":{action_:"r=",nextState:"r"},"a|as":{action_:["output","r="],nextState:"r"},"*":{action_:["output","r="],nextState:"r"}},"+":{o:{action_:"d= kv",nextState:"d"},"d|D":{action_:"d=",nextState:"d"},q:{action_:"d=",nextState:"qd"},"qd|qD":{action_:"d=",nextState:"qd"},dq:{action_:["output","d="],nextState:"d"},3:{action_:["sb=false","output","operator"],nextState:"0"}},amount:{"0|2":{action_:"a=",nextState:"a"}},"pm-operator":{"0|1|2|a|as":{action_:["sb=false","output",{type_:"operator",option:"\\pm"}],nextState:"0"}},operator:{"0|1|2|a|as":{action_:["sb=false","output","operator"],nextState:"0"}},"-$":{"o|q":{action_:["charge or bond","output"],nextState:"qd"},d:{action_:"d=",nextState:"d"},D:{action_:["output",{type_:"bond",option:"-"}],nextState:"3"},q:{action_:"d=",nextState:"qd"},qd:{action_:"d=",nextState:"qd"},"qD|dq":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},"-9":{"3|o":{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"3"}},"- orbital overlap":{o:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},d:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"}},"-":{"0|1|2":{action_:[{type_:"output",option:1},"beginsWithBond=true",{type_:"bond",option:"-"}],nextState:"3"},3:{action_:{type_:"bond",option:"-"}},a:{action_:["output",{type_:"insert",option:"hyphen"}],nextState:"2"},as:{action_:[{type_:"output",option:2},{type_:"bond",option:"-"}],nextState:"3"},b:{action_:"b="},o:{action_:{type_:"- after o/d",option:!1},nextState:"2"},q:{action_:{type_:"- after o/d",option:!1},nextState:"2"},"d|qd|dq":{action_:{type_:"- after o/d",option:!0},nextState:"2"},"D|qD|p":{action_:["output",{type_:"bond",option:"-"}],nextState:"3"}},amount2:{"1|3":{action_:"a=",nextState:"a"}},letters:{"0|1|2|3|a|as|b|p|bp|o":{action_:"o=",nextState:"o"},"q|dq":{action_:["output","o="],nextState:"o"},"d|D|qd|qD":{action_:"o after d",nextState:"o"}},digits:{o:{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},q:{action_:["output","o="],nextState:"o"},a:{action_:"o=",nextState:"o"}},"space A":{"b|p|bp":{}},space:{a:{nextState:"as"},0:{action_:"sb=false"},"1|2":{action_:"sb=true"},"r|rt|rd|rdt|rdq":{action_:"output",nextState:"0"},"*":{action_:["output","sb=true"],nextState:"1"}},"1st-level escape":{"1|2":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}]},"*":{action_:["output",{type_:"insert+p1",option:"1st-level escape"}],nextState:"0"}},"[(...)]":{"r|rt":{action_:"rd=",nextState:"rd"},"rd|rdt":{action_:"rq=",nextState:"rdq"}},"...":{"o|d|D|dq|qd|qD":{action_:["output",{type_:"bond",option:"..."}],nextState:"3"},"*":{action_:[{type_:"output",option:1},{type_:"insert",option:"ellipsis"}],nextState:"1"}},". |* ":{"*":{action_:["output",{type_:"insert",option:"addition compound"}],nextState:"1"}},"state of aggregation $":{"*":{action_:["output","state of aggregation"],nextState:"1"}},"{[(":{"a|as|o":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"0|1|2|3":{action_:["o=","output","parenthesisLevel++"],nextState:"2"},"*":{action_:["output","o=","output","parenthesisLevel++"],nextState:"2"}},")]}":{"0|1|2|3|b|p|bp|o":{action_:["o=","parenthesisLevel--"],nextState:"o"},"a|as|d|D|q|qd|qD|dq":{action_:["output","o=","parenthesisLevel--"],nextState:"o"}},", ":{"*":{action_:["output","comma"],nextState:"0"}},"^_":{"*":{}},"^{(...)}|^($...$)":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"D"},q:{action_:"d=",nextState:"qD"},"d|D|qd|qD|dq":{action_:["output","d="],nextState:"D"}},"^a|^\\x{}{}|^\\x{}|^\\x|'":{"0|1|2|as":{action_:"b=",nextState:"b"},p:{action_:"b=",nextState:"bp"},"3|o":{action_:"d= kv",nextState:"d"},q:{action_:"d=",nextState:"qd"},"d|qd|D|qD":{action_:"d="},dq:{action_:["output","d="],nextState:"d"}},"_{(state of aggregation)}$":{"d|D|q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"_{(...)}|_($...$)|_9|_\\x{}{}|_\\x{}|_\\x":{"0|1|2|as":{action_:"p=",nextState:"p"},b:{action_:"p=",nextState:"bp"},"3|o":{action_:"q=",nextState:"q"},"d|D":{action_:"q=",nextState:"dq"},"q|qd|qD|dq":{action_:["output","q="],nextState:"q"}},"=<>":{"0|1|2|3|a|as|o|q|d|D|qd|qD|dq":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"#":{"0|1|2|3|a|as|o":{action_:[{type_:"output",option:2},{type_:"bond",option:"#"}],nextState:"3"}},"{}":{"*":{action_:{type_:"output",option:1},nextState:"1"}},"{...}":{"0|1|2|3|a|as|b|p|bp":{action_:"o=",nextState:"o"},"o|d|D|q|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"$...$":{a:{action_:"a="},"0|1|2|3|as|b|p|bp|o":{action_:"o=",nextState:"o"},"as|o":{action_:"o="},"q|d|D|qd|qD|dq":{action_:["output","o="],nextState:"o"}},"\\bond{(...)}":{"*":{action_:[{type_:"output",option:2},"bond"],nextState:"3"}},"\\frac{(...)}":{"*":{action_:[{type_:"output",option:1},"frac-output"],nextState:"3"}},"\\overset{(...)}":{"*":{action_:[{type_:"output",option:2},"overset-output"],nextState:"3"}},"\\underset{(...)}":{"*":{action_:[{type_:"output",option:2},"underset-output"],nextState:"3"}},"\\underbrace{(...)}":{"*":{action_:[{type_:"output",option:2},"underbrace-output"],nextState:"3"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:[{type_:"output",option:2},"color-output"],nextState:"3"}},"\\color{(...)}0":{"*":{action_:[{type_:"output",option:2},"color0-output"]}},"\\ce{(...)}":{"*":{action_:[{type_:"output",option:2},"ce"],nextState:"3"}},"\\,":{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"1"}},"\\x{}{}|\\x{}|\\x":{"0|1|2|3|a|as|b|p|bp|o|c0":{action_:["o=","output"],nextState:"3"},"*":{action_:["output","o=","output"],nextState:"3"}},others:{"*":{action_:[{type_:"output",option:1},"copy"],nextState:"3"}},else2:{a:{action_:"a to o",nextState:"o",revisit:!0},as:{action_:["output","sb=true"],nextState:"1",revisit:!0},"r|rt|rd|rdt|rdq":{action_:["output"],nextState:"0",revisit:!0},"*":{action_:["output","copy"],nextState:"3"}}}),actions:{"o after d":function(e,t){var i;if((e.d||"").match(/^[0-9]+$/)){var a=e.d;e.d=void 0,i=this.output(e),e.b=a}else i=this.output(e);return Wr.actions["o="](e,t),i},"d= kv":function(e,t){e.d=t,e.dType="kv"},"charge or bond":function(e,t){if(e.beginsWithBond){var i=[];return Wr.concatArray(i,this.output(e)),Wr.concatArray(i,Wr.actions.bond(e,t,"-")),i}e.d=t},"- after o/d":function(e,t,i){var a=Wr.patterns.match_("orbital",e.o||""),r=Wr.patterns.match_("one lowercase greek letter $",e.o||""),n=Wr.patterns.match_("one lowercase latin letter $",e.o||""),o=Wr.patterns.match_("$one lowercase latin letter$ $",e.o||""),s="-"===t&&(a&&""===a.remainder||r||n||o);!s||e.a||e.b||e.p||e.d||e.q||a||!n||(e.o="$"+e.o+"$");var l=[];return s?(Wr.concatArray(l,this.output(e)),l.push({type_:"hyphen"})):(a=Wr.patterns.match_("digits",e.d||""),i&&a&&""===a.remainder?(Wr.concatArray(l,Wr.actions["d="](e,t)),Wr.concatArray(l,this.output(e))):(Wr.concatArray(l,this.output(e)),Wr.concatArray(l,Wr.actions.bond(e,t,"-")))),l},"a to o":function(e){e.o=e.a,e.a=void 0},"sb=true":function(e){e.sb=!0},"sb=false":function(e){e.sb=!1},"beginsWithBond=true":function(e){e.beginsWithBond=!0},"beginsWithBond=false":function(e){e.beginsWithBond=!1},"parenthesisLevel++":function(e){e.parenthesisLevel++},"parenthesisLevel--":function(e){e.parenthesisLevel--},"state of aggregation":function(e,t){return{type_:"state of aggregation",p1:Wr.go(t,"o")}},comma:function(e,t){var i=t.replace(/\s*$/,"");return i!==t&&0===e.parenthesisLevel?{type_:"comma enumeration L",p1:i}:{type_:"comma enumeration M",p1:i}},output:function(e,t,i){var a,r,n;for(var o in e.r?(r="M"===e.rdt?Wr.go(e.rd,"tex-math"):"T"===e.rdt?[{type_:"text",p1:e.rd||""}]:Wr.go(e.rd),n="M"===e.rqt?Wr.go(e.rq,"tex-math"):"T"===e.rqt?[{type_:"text",p1:e.rq||""}]:Wr.go(e.rq),a={type_:"arrow",r:e.r,rd:r,rq:n}):(a=[],(e.a||e.b||e.p||e.o||e.q||e.d||i)&&(e.sb&&a.push({type_:"entitySkip"}),e.o||e.q||e.d||e.b||e.p||2===i?e.o||e.q||e.d||!e.b&&!e.p?e.o&&"kv"===e.dType&&Wr.patterns.match_("d-oxidation$",e.d||"")?e.dType="oxidation":e.o&&"kv"===e.dType&&!e.q&&(e.dType=void 0):(e.o=e.a,e.d=e.b,e.q=e.p,e.a=e.b=e.p=void 0):(e.o=e.a,e.a=void 0),a.push({type_:"chemfive",a:Wr.go(e.a,"a"),b:Wr.go(e.b,"bd"),p:Wr.go(e.p,"pq"),o:Wr.go(e.o,"o"),q:Wr.go(e.q,"pq"),d:Wr.go(e.d,"oxidation"===e.dType?"oxidation":"bd"),dType:e.dType}))),e)"parenthesisLevel"!==o&&"beginsWithBond"!==o&&delete e[o];return a},"oxidation-output":function(e,t){var i=["{"];return Wr.concatArray(i,Wr.go(t,"oxidation")),i.push("}"),i},"frac-output":function(e,t){return{type_:"frac-ce",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"overset-output":function(e,t){return{type_:"overset",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"underset-output":function(e,t){return{type_:"underset",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"underbrace-output":function(e,t){return{type_:"underbrace",p1:Wr.go(t[0]),p2:Wr.go(t[1])}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Wr.go(t[1])}},"r=":function(e,t){e.r=t},"rdt=":function(e,t){e.rdt=t},"rd=":function(e,t){e.rd=t},"rqt=":function(e,t){e.rqt=t},"rq=":function(e,t){e.rq=t},operator:function(e,t,i){return{type_:"operator",kind_:i||t}}}},a:{transitions:Wr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},"$(...)$":{"*":{action_:"tex-math tight",nextState:"1"}},",":{"*":{action_:{type_:"insert",option:"commaDecimal"}}},else2:{"*":{action_:"copy"}}}),actions:{}},o:{transitions:Wr.createTransitions({empty:{"*":{}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"1",revisit:!0}},letters:{"*":{action_:"rm"}},"\\ca":{"*":{action_:{type_:"insert",option:"circa"}}},"\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"{text}"}},else2:{"*":{action_:"copy"}}}),actions:{}},text:{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"{...}":{"*":{action_:"text="}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"\\greek":{"*":{action_:["output","rm"]}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:["output","copy"]}},else:{"*":{action_:"text="}}}),actions:{output:function(e){if(e.text_){var t={type_:"text",p1:e.text_};for(var i in e)delete e[i];return t}}}},pq:{transitions:Wr.createTransitions({empty:{"*":{}},"state of aggregation $":{"*":{action_:"state of aggregation"}},i$:{0:{nextState:"!f",revisit:!0}},"(KV letters),":{0:{action_:"rm",nextState:"0"}},formula$:{0:{nextState:"f",revisit:!0}},"1/2$":{0:{action_:"1/2"}},else:{0:{nextState:"!f",revisit:!0}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"a-z":{f:{action_:"tex-math"}},letters:{"*":{action_:"rm"}},"-9.,9":{"*":{action_:"9,9"}},",":{"*":{action_:{type_:"insert+p1",option:"comma enumeration S"}}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"state of aggregation":function(e,t){return{type_:"state of aggregation subscript",p1:Wr.go(t,"o")}},"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Wr.go(t[1],"pq")}}}},bd:{transitions:Wr.createTransitions({empty:{"*":{}},x$:{0:{nextState:"!f",revisit:!0}},formula$:{0:{nextState:"f",revisit:!0}},else:{0:{nextState:"!f",revisit:!0}},"-9.,9 no missing 0":{"*":{action_:"9,9"}},".":{"*":{action_:{type_:"insert",option:"electron dot"}}},"a-z":{f:{action_:"tex-math"}},x:{"*":{action_:{type_:"insert",option:"KV x"}}},letters:{"*":{action_:"rm"}},"'":{"*":{action_:{type_:"insert",option:"prime"}}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},"{(...)}":{"*":{action_:"text"}},"\\color{(...)}{(...)}1|\\color(...){(...)}2":{"*":{action_:"color-output"}},"\\color{(...)}0":{"*":{action_:"color0-output"}},"\\ce{(...)}":{"*":{action_:"ce"}},"\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"copy"}},else2:{"*":{action_:"copy"}}}),actions:{"color-output":function(e,t){return{type_:"color",color1:t[0],color2:Wr.go(t[1],"bd")}}}},oxidation:{transitions:Wr.createTransitions({empty:{"*":{}},"roman numeral":{"*":{action_:"roman-numeral"}},"${(...)}$|$(...)$":{"*":{action_:"tex-math"}},else:{"*":{action_:"copy"}}}),actions:{"roman-numeral":function(e,t){return{type_:"roman numeral",p1:t||""}}}},"tex-math":{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},else:{"*":{action_:"o="}}}),actions:{output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"tex-math tight":{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"\\ce{(...)}":{"*":{action_:["output","ce"]}},"{...}|\\,|\\x{}{}|\\x{}|\\x":{"*":{action_:"o="}},"-|+":{"*":{action_:"tight operator"}},else:{"*":{action_:"o="}}}),actions:{"tight operator":function(e,t){e.o=(e.o||"")+"{"+t+"}"},output:function(e){if(e.o){var t={type_:"tex-math",p1:e.o};for(var i in e)delete e[i];return t}}}},"9,9":{transitions:Wr.createTransitions({empty:{"*":{}},",":{"*":{action_:"comma"}},else:{"*":{action_:"copy"}}}),actions:{comma:function(){return{type_:"commaDecimal"}}}},pu:{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},space$:{"*":{action_:["output","space"]}},"{[(|)]}":{"0|a":{action_:"copy"}},"(-)(9)^(-9)":{0:{action_:"number^",nextState:"a"}},"(-)(9.,9)(e)(99)":{0:{action_:"enumber",nextState:"a"}},space:{"0|a":{}},"pm-operator":{"0|a":{action_:{type_:"operator",option:"\\pm"},nextState:"0"}},operator:{"0|a":{action_:"copy",nextState:"0"}},"//":{d:{action_:"o=",nextState:"/"}},"/":{d:{action_:"o=",nextState:"/"}},"{...}|else":{"0|d":{action_:"d=",nextState:"d"},a:{action_:["space","d="],nextState:"d"},"/|q":{action_:"q=",nextState:"q"}}}),actions:{enumber:function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),t[1]&&(Wr.concatArray(i,Wr.go(t[1],"pu-9,9")),t[2]&&(t[2].match(/[,.]/)?Wr.concatArray(i,Wr.go(t[2],"pu-9,9")):i.push(t[2])),t[3]=t[4]||t[3],t[3]&&(t[3]=t[3].trim(),"e"===t[3]||"*"===t[3].substr(0,1)?i.push({type_:"cdot"}):i.push({type_:"times"}))),t[3]&&i.push("10^{"+t[5]+"}"),i},"number^":function(e,t){var i=[];return"+-"===t[0]||"+/-"===t[0]?i.push("\\pm "):t[0]&&i.push(t[0]),Wr.concatArray(i,Wr.go(t[1],"pu-9,9")),i.push("^{"+t[2]+"}"),i},operator:function(e,t,i){return{type_:"operator",kind_:i||t}},space:function(){return{type_:"pu-space-1"}},output:function(e){var t,i=Wr.patterns.match_("{(...)}",e.d||"");i&&""===i.remainder&&(e.d=i.match_);var a=Wr.patterns.match_("{(...)}",e.q||"");if(a&&""===a.remainder&&(e.q=a.match_),e.d&&(e.d=e.d.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.d=e.d.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F")),e.q){e.q=e.q.replace(/\u00B0C|\^oC|\^{o}C/g,"{}^{\\circ}C"),e.q=e.q.replace(/\u00B0F|\^oF|\^{o}F/g,"{}^{\\circ}F");var r={d:Wr.go(e.d,"pu"),q:Wr.go(e.q,"pu")};"//"===e.o?t={type_:"pu-frac",p1:r.d,p2:r.q}:(t=r.d,r.d.length>1||r.q.length>1?t.push({type_:" / "}):t.push({type_:"/"}),Wr.concatArray(t,r.q))}else t=Wr.go(e.d,"pu-2");for(var n in e)delete e[n];return t}}},"pu-2":{transitions:Wr.createTransitions({empty:{"*":{action_:"output"}},"*":{"*":{action_:["output","cdot"],nextState:"0"}},"\\x":{"*":{action_:"rm="}},space:{"*":{action_:["output","space"],nextState:"0"}},"^{(...)}|^(-1)":{1:{action_:"^(-1)"}},"-9.,9":{0:{action_:"rm=",nextState:"0"},1:{action_:"^(-1)",nextState:"0"}},"{...}|else":{"*":{action_:"rm=",nextState:"1"}}}),actions:{cdot:function(){return{type_:"tight cdot"}},"^(-1)":function(e,t){e.rm+="^{"+t+"}"},space:function(){return{type_:"pu-space-2"}},output:function(e){var t=[];if(e.rm){var i=Wr.patterns.match_("{(...)}",e.rm||"");t=i&&""===i.remainder?Wr.go(i.match_,"pu"):{type_:"rm",p1:e.rm}}for(var a in e)delete e[a];return t}}},"pu-9,9":{transitions:Wr.createTransitions({empty:{0:{action_:"output-0"},o:{action_:"output-o"}},",":{0:{action_:["output-0","comma"],nextState:"o"}},".":{0:{action_:["output-0","copy"],nextState:"o"}},else:{"*":{action_:"text="}}}),actions:{comma:function(){return{type_:"commaDecimal"}},"output-0":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){var i=e.text_.length%3;0===i&&(i=3);for(var a=e.text_.length-3;a>0;a-=3)t.push(e.text_.substr(a,3)),t.push({type_:"1000 separator"});t.push(e.text_.substr(0,i)),t.reverse()}else t.push(e.text_);for(var r in e)delete e[r];return t},"output-o":function(e){var t=[];if(e.text_=e.text_||"",e.text_.length>4){for(var i=e.text_.length-3,a=0;a":case"→":case"⟶":return"rightarrow";case"<-":return"leftarrow";case"<->":return"leftrightarrow";case"<--\x3e":return"rightleftarrows";case"<=>":case"⇌":return"rightleftharpoons";case"<=>>":return"rightequilibrium";case"<<=>":return"leftequilibrium";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getBond:function(e){switch(e){case"-":case"1":return"{-}";case"=":case"2":return"{=}";case"#":case"3":return"{\\equiv}";case"~":return"{\\tripledash}";case"~-":return"{\\mathrlap{\\raisebox{-.1em}{$-$}}\\raisebox{.1em}{$\\tripledash$}}";case"~=":case"~--":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$\\tripledash$}}-}";case"-~-":return"{\\mathrlap{\\raisebox{-.2em}{$-$}}\\mathrlap{\\raisebox{.2em}{$-$}}\\tripledash}";case"...":return"{{\\cdot}{\\cdot}{\\cdot}}";case"....":return"{{\\cdot}{\\cdot}{\\cdot}{\\cdot}}";case"->":return"{\\rightarrow}";case"<-":return"{\\leftarrow}";case"<":return"{<}";case">":return"{>}";default:throw["MhchemBugT","mhchem bug T. Please report."]}},_getOperator:function(e){switch(e){case"+":return" {}+{} ";case"-":return" {}-{} ";case"=":return" {}={} ";case"<":return" {}<{} ";case">":return" {}>{} ";case"<<":return" {}\\ll{} ";case">>":return" {}\\gg{} ";case"\\pm":return" {}\\pm{} ";case"\\approx":case"$\\approx$":return" {}\\approx{} ";case"v":case"(v)":return" \\downarrow{} ";case"^":case"(^)":return" \\uparrow{} ";default:throw["MhchemBugT","mhchem bug T. Please report."]}}};function Ur(e,t){return t>1?"solidus":"radical"}function jr(e,t,i,a){if(i>=20)return[e,null];let r=[],n=[null!=e?e:pr],o=!1;for(;!o;){t.skipSpace();const e=t.matchExpression(20);null===e?(t.skipSpace(),t.match(",")?n.push(pr):o=!0):("Sequence"===Cr(e)?n=n.concat(Tr(e)):n.push(e),t.skipSpace(),t.match(",")?t.skipSpace():t.match(";")?(r.push(["Subsequence",...n]),n=[]):o=!0)}return 0===r.length?r=n:r.push(["Subsequence",...n]),[null,["Subsequence",...r]]}function Gr(e,t){return"Sequence"===Cr(t)&&Tr(t).some(e=>"Subsequence"===Cr(e))?Tr(t).map(t=>e.emit(t)).join("; "):Tr(t).map(t=>e.emit(t)).join(", ")}function Xr(e,t){const i=Qr(e),a=Qr(t);if(ia)return 1;let r=en(e);isNaN(r)&&(r=Number(1/0));let n=en(t);if(isNaN(n)&&(n=Number(1/0)),rn)return 1;const o=Jr(e),s=Jr(t);if(o===s)for(let i=1;i<=o;i++){const a=Xr(Kr(e,i),Kr(t,i));if(0!==a)return a}return s-o}function Zr(e,t){if(0===e)return-1/0;const i=Cr(e);if(i===fr){const t=Lr(Kr(e,2));return isFinite(t)?t:0}if(i===hr){let i=0;return Tr(e).forEach(e=>{i+=Zr(e,t)}),i}return t.includes(Dr(e))?1:0}function Yr(e,t){const i=Cr(e);if(i===fr){if(Dr(Kr(e,1))===t){const t=Lr(Kr(e,2));if(isFinite(t))return t}return 0}if(i===hr){let i=0;for(const a of Tr(e))i+=Yr(a,t);return i}return Dr(e)===t?1:0}function Qr(e){return qr(e)?Tr(e).map(Qr).join(" "):"string"==typeof e?e:Sr(e)?e.sym:""}function Jr(e){return qr(e)?Tr(e).map(Jr).reduce((e,t)=>e+t,0):"string"==typeof e||Dr(e)?1:0}function en(e){return qr(e)?NaN:"number"==typeof e?e:Mr(e)?Lr(e):0}function tn(e){const t=qr(e);return t?t===ur&&1===Nr(e)?tn(Kr(e,1)):Er(e,tn):e}function an(e){if(null===e)return null;const t=qr(e=tn(e));return t===fr&&2===Nr(e)?[fr,Kr(e,1),rn(Kr(e,2))]:t===gr&&2===Nr(e)?[hr,[fr,Kr(e,1),-1],Kr(e,2)]:[fr,e,-1]}function rn(e){if(null===e)return e;if("number"==typeof(e=tn(e)))e=-e;else if(e&&Mr(e))e="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num};else{const t=Cr(e),i=Nr(e);if(t===br&&1===i)return Kr(e,1);if(t===hr){let t=Kr(e,1);return t="number"==typeof t?-t:Mr(t)?"-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}:[br,t],[hr,t,...Tr(e).slice(1)]}if(t===ur&&1===i)return rn(Kr(Kr(e,1),1));e=[br,e]}return e}function nn(e,t){const i=qr(e);if(!i)return e;if(e=Er(e,e=>nn(e,t)),i!==t)return e;const a=Tr(e);let r=[];for(let e=0;eon(e,t));let a=Tr(t=nn(tn(t),yr));a=a.map(t=>on(e,t)).filter(e=>0!==Lr(e));const r=a.length;return 0===r?0:1===r?a[0]:[yr,...a]}function sn(e,t){const i=qr(t);if(!i)return t;if(i!==gr)return Er(t,t=>sn(e,t));if(2!==Nr(t))return t;const a=sn(e,Kr(t,1)),r=sn(e,Kr(t,2));return 1===Lr(r)?a:[hr,a,an(r)]}function ln(e,t){const i=qr(t);return i?"Exp"!==i?Er(t,t=>ln(e,t)):1!==Nr(t)?t:[fr,"E",ln(e,Kr(t,1))]:t}function cn(e,t){var i;if($r(t))return t;const a=Cr(t),r="List"===a,n=vr(e,a),o=null!==(i=null==n?void 0:n.sequenceHold)&&void 0!==i&&i,s=Tr(t),l=[];for(let i of s){i=cn(e,i);const a=Cr(i);if("Identity"===a){const e=Kr(i,1);null!=e&&l.push(e)}else if(a===pr)r||l.push(i);else if("Sequence"!==a||o)l.push(i);else{const e=qr(t);for(const t of Tr(i))"Subsequence"===Cr(t)?l.push([e,...Tr(t)]):l.push(t)}}return[qr(t),...l]}function dn(e){const t=Cr(e);if("Sqrt"===t)return 2;if("Root"===t)return Lr(Kr(e,2));if(t!==fr)return 1;const i=Kr(e,2);if(!i)return 1;if(Cr(i)===fr&&-1===Lr(Kr(i,2))){const e=Lr(Kr(i,1));if(isFinite(e))return e}return 1}function mn(e,t){const i=qr(t);if(!i)return t;if(t=Er(t,t=>mn(e,t)),i!==hr)return t;t=nn(tn(t),hr);const[a,r]=function(e){const t=Tr(e),i=[],a=[];for(const e of t)2===dn(e)?i.push(Kr(e,1)):a.push(e);return[i,a]}(t);let n;n=0===a.length?r:1===a.length?Tr(t=[hr,...r,[fr,a[0],[fr,2,-1]]]):Tr(t=[hr,...r,[fr,[hr,...a],[fr,2,-1]]]);let o=!1,s=!1;if(n=n.map(e=>{if(Cr(e)===br)return s=!0,o=!o,Kr(e,1);const t=Lr(e);return t<0?(s=!0,o=!o,-t):e}),o){const e=Lr(n[0]);n=isFinite(e)?Tr(nn([hr,-e,...n.slice(1)],hr)):Tr(nn([hr,-1,...n],hr))}else n=Tr(nn([hr,...n],hr));return n=n.filter(e=>1!==Lr(e)),0===n.length?1:1===n.length?n[0]:[hr,...n]}function pn(e,t){const i=qr(t);if(!i)return t;if(i!==fr)return Er(t,t=>pn(e,t));if(2!==Nr(t=tn(t)))return t;const a=pn(e,Kr(t,1)),r=Lr(a),n=Lr(pn(e,Kr(t,2)));return 0===n?1:1===n?a:-1===r&&-1===n?-1:1===r&&-1===n||1===r?1:t}function un(e,t){const i=Cr(t);if(i===br){const e=Kr(t=tn(t),1);if("number"==typeof e)t=-e;else{if(!e||!Mr(e)){if(Cr(e)===hr){let t=Kr(e,1);if("number"==typeof t)t=-t;else{if(!Mr(t))return[hr,-1,t,...Tr(e).slice(1)];t="-"===t.num[0]?{num:t.num.slice(1)}:{num:"-"+t.num}}return[hr,t,...Tr(e).slice(1)]}return[hr,-1,e]}if(0===Lr(e))return 0;t="-"===e.num[0]?{num:e.num.slice(1)}:{num:"-"+e.num}}}else if(i)return Er(t,t=>un(e,t));return t}function hn(e,t){if(qr(t))return Er(t,t=>hn(e,t));if("number"==typeof t){if(isNaN(t))return{num:"NaN"};if(!isFinite(t)&&t>0)return{num:"Infinity"};if(!isFinite(t)&&t<0)return{num:"-Infinity"}}else if(Mr(t)){if(isNaN(Number(t.num)))return{num:"NaN"};if(t.num.endsWith("n"))return{num:t.num.slice(0,-1)}}return t}function fn(e,t){const i=qr(t);if(!i)return t;if("Subtract"!==i)return Er(t,t=>fn(e,t));if(2!==Nr(t))return t;const a=fn(e,Kr(t,1)),r=Lr(a),n=fn(e,Kr(t,2)),o=Lr(n);return 0===r&&0===o?0:fn(e,[yr,a,rn(n)])}function gn(e,t){const i=qr(t);if(!i)return t;if("Root"!==i&&"Sqrt"!==i)return Er(t,t=>gn(e,t));if(Nr(t)<1)return t;const a=gn(e,Kr(t,1));let r=2;return Nr(t)>1&&(r=pn(e,Kr(t,2))),1===Lr(r)?a:[fr,a,[gr,1,r]]}function yn(e){const t=Number(e);return"string"==typeof e&&t.toString()===e?isNaN(t)||!isFinite(t)?t.toString():t:e}function bn(e,t){if(null===t)return null;if(Array.isArray(t))return t.map((t,i)=>0===i?t:bn(e,t));if("object"==typeof t)if(1===Object.keys(t).length){if(Mr(t)){const e=yn(t.num);return"number"==typeof e?e:{num:e}}if(zr(t))return t.fn.map(t=>bn(e,t));if(Sr(t))return t.sym}else zr(t)&&(t.fn=t.fn.map(t=>bn(e,t)));return t}function vn(e,t){if("number"==typeof t||"string"==typeof t)return t;if(Array.isArray(t))return Er(t,t=>vn(e,t));if("object"==typeof t){if("num"in t){const e=yn(t.num);return"number"==typeof e?e:{num:e}}if("fn"in t)return Er(t.fn,t=>vn(e,t))}return null}function xn(e,t){const i=function(e,t){const i=new Set;return function e(t,i,a){const r=Tr(a);if(r.length>0)r.forEach(a=>e(t,i,a));else{const e=Dr(a);if(e&&!i.has(e)){const a=function(e,t){return e[t]&&"isConstant"in e[t]?e[t]:null}(t,e);a&&a.isConstant||i.add(e)}}}(e,i,t),i}(e,t);return function e(t,i,a){var r;let n=Tr(a);if(0===n.length)return a;n=n.map(a=>e(t,i,a));const o=Cr(a);if(o===yr)n.sort((e,t)=>function(e,t,i){const a=Zr(e,i),r=Zr(t,i);if(ar)return-1;for(const a of i){const i=Yr(e,a),r=Yr(t,a);if(i!==r)return r-i}const n=Qr(e),o=Qr(t);return n>o?-1:ne(t,i))}(e,function e(t,i){const a=Cr(i),r=vr(t,a);return(null==r?void 0:r.isIdempotent)?nn(i,a):Er(i,i=>e(t,i))}(e,t))}function wn(e,t,i){let a=t;return i.forEach(t=>{const i={canonical:kn,"canonical-add":on,"canonical-divide":sn,"canonical-exp":ln,"canonical-list":cn,"canonical-multiply":mn,"canonical-power":pn,"canonical-negate":un,"canonical-number":hn,"canonical-root":gn,"canonical-subtract":fn,full:bn,flatten:_n,sorted:xn,"stripped-metadata":vn}[t];a=i?i(e,a):null}),a}function Mn(e,t,i,a){return a=null!=a?a:2,"solidus"===t?e.wrapShort(i)+"^{1\\/"+e.emit(a)+"}":"quotient"===t?e.wrapShort(i)+"^{\\frac{1}{"+e.emit(a)+"}}":2===Lr(a)?"\\sqrt{"+e.emit(i)+"}":"\\sqrt["+e.emit(a)+"]{"+e.emit(i)+"}"}function Sn(e,t,i,a){const r=t.matchOptionalLatexArgument(),n=t.matchRequiredLatexArgument();return null===n?[e,["Sqrt"]]:null!==r?[e,["Root",null!=n?n:pr,r]]:[e,["Sqrt",n]]}function zn(e,t,i,a){if(2760&&(i=1===r.length&&1===r[0]?0===a.length?"1":1===a.length?e.emit(a[0]):Ln(e,[hr,...a]):e.emit([gr,1===a.length?a[0]:[hr,...a],1===r.length?r[0]:[hr,...r]])),i)return e.level+=1,i;let n=!1,o=null;const s=Nr(t)+1;for(let a=1;a3?"inline-solidus":"quotient";if("inline-solidus"===i||"nice-solidus"===i){const a=e.wrapShort(Kr(t,1)),r=e.wrapShort(Kr(t,2));return"nice-solidus"===i?`^{${a}}\\!\\!/\\!_{${r}}`:`${a}\\/${r}`}return"reciprocal"===i?e.wrap(Kr(t,1))+e.wrap(Kr(t,2))+"^{-1}":"factor"===i?"\\frac{1}{"+e.emit(Kr(t,2))+"}"+e.wrap(Kr(t,1)):"\\frac{"+e.emit(Kr(t,1))+"}{"+e.emit(Kr(t,2))+"}"}function qn(e,t){const i=Kr(t,1),a=Kr(t,2);if(null===a)return e.emit(i);if(null===i)return"";const r=Cr(t);if("Sqrt"===r||"Root"===r)return Mn(e,Ur(0,e.level),Kr(t,1),Kr(t,2));const n=Lr(a);if(-1===n)return e.emit([gr,"1",i]);if(n<0)return e.emit([gr,"1",[fr,i,-n]]);if(Cr(a)===gr){if(1===Lr(Kr(a,1)))return Mn(e,Ur(0,e.level),i,Kr(a,2))}else if(Cr(a)===fr&&-1===Lr(Kr(a,2)))return Mn(e,Ur(0,e.level),i,Kr(a,1));return e.wrapShort(i)+"^{"+e.emit(a)+"}"}function $n(e,t,i,a){var r;let n=!1,o=0;if(t.skipSpace(),t.match("^")){if(t.skipSpace(),t.match("<{>")){t.skipSpace(),t.match("-")&&t.match("1")&&(n=!0);do{t.match("\\doubleprime")&&(o+=2),t.match("\\prime")&&(o+=1),t.match("'")&&(o+=1)}while(!t.match("<}>")&&!t.atEnd())}let e=!1;for(;!e;)t.skipSpace(),t.match("\\doubleprime")?o+=2:t.match("\\prime")||t.match("'")?o+=1:e=!0}let s=null!==(r={"\\arcsin":"Arcsin","\\arccos":"Arccos","\\arctan":"Arctan","\\arctg":"Arctan","\\arcctg":"Arctan","\\arcsec":"Arcsec","\\arccsc":" Arccsc","\\arsinh":"Arsinh","\\arcosh":"Arcosh","\\artanh":"Artanh","\\arcsech":"Arcsech","\\arccsch":"Arcsch","\\ch":"Cosh","\\cos":"Cos","\\cosec":"Csc","\\cosh":"Csch","\\cot":"Cot","\\cotg":"Cot","\\coth":"Coth","\\csc":"Csc","\\ctg":"Cot","\\cth":"Coth","\\sec":"Sec","\\sin":"Sin","\\sinh":"Sinh","\\sh":"Sinh","\\tan":"Tan","\\tanh":"Tanh","\\tg":"Tan","\\th":"Tanh"}[a])&&void 0!==r?r:a;n&&(s=["InverseFunction",s]),o>=1&&(s=["Derivative",o,s]);const l=t.matchArguments("implicit");return null===l?[null,s]:[null,[s,...l]]}function Cn(e){return Array.isArray(e)?f(e):e}function Dn(e,t){var i,a,r,n,o,s,l,c,d,m,p,u,h,f,g;const y={lookahead:1,name:new Map,prefix:[],infix:[],postfix:[],matchfix:[],superfix:[],subfix:[],symbol:[],environment:new Map};for(const b of e){const e=b;void 0===e.parse&&(e.parse=e.name),"string"==typeof e.trigger&&(e.trigger={symbol:e.trigger}),"string"==typeof e.emit&&void 0!==(null===(i=e.trigger)||void 0===i?void 0:i.symbol)&&/#[0-9]/.test(e.emit)&&t({code:"unexpected-argument",arg:e.name}),void 0===e.emit&&(void 0!==(null===(a=e.trigger)||void 0===a?void 0:a.postfix)?e.emit="#1"+Cn(e.trigger.postfix):void 0!==(null===(r=e.trigger)||void 0===r?void 0:r.prefix)?e.emit=Cn(e.trigger.prefix)+"#1":void 0!==(null===(n=e.trigger)||void 0===n?void 0:n.infix)?e.emit="#1"+Cn(e.trigger.infix)+"#2":void 0!==(null===(o=e.trigger)||void 0===o?void 0:o.symbol)?e.emit=Cn(e.trigger.symbol):void 0!==(null===(s=e.trigger)||void 0===s?void 0:s.superfix)?e.emit="#1^{"+Cn(null===(l=e.trigger)||void 0===l?void 0:l.superfix)+"}":void 0!==(null===(c=e.trigger)||void 0===c?void 0:c.subfix)?e.emit="#1_{"+Cn(null===(d=e.trigger)||void 0===d?void 0:d.subfix)+"}":e.emit=""),void 0!==(null===(m=e.trigger)||void 0===m?void 0:m.infix)&&(void 0===e.precedence&&t({code:"syntax-error",arg:"Infix operators require a precedence"}),e.associativity||(e.associativity="non")),void 0!==(null===(p=e.trigger)||void 0===p?void 0:p.symbol)&&(e.arguments=null!==(u=e.arguments)&&void 0!==u?u:"",e.optionalLatexArg=null!==(h=e.optionalLatexArg)&&void 0!==h?h:0,e.requiredLatexArg=null!==(f=e.requiredLatexArg)&&void 0!==f?f:0),void 0!==(null===(g=e.trigger)||void 0===g?void 0:g.matchfix)&&("function"===e.parse||e.closeFence||t({code:"syntax-error",arg:"Matchfix operators require a close fence or a custom parse function"})),void 0!==e.trigger&&(["infix","prefix","postfix","symbol","matchfix","superfix","subfix"].forEach(t=>{const i=(a=e.trigger[t],Array.isArray(a)?a.length:1);var a;y.lookahead=Math.max(y.lookahead,i),void 0===y[t][i]&&(y[t][i]=new Map),y[t][i].set(Cn(e.trigger[t]),e)}),void 0!==e.trigger.environment&&y.environment.set(e.trigger.environment,e)),e.name&&y.name.set(Cn(e.name),e),void 0!==e.trigger||e.name||t({code:"syntax-error",arg:"Need at least a trigger or a name"})}return y}function Tn(e="all"){let t;return"all"===e?(t=[],Object.keys(En).forEach(e=>{t=[...t,...En[e]]})):t=[...En[e]],t}const En={algebra:[{name:"To",trigger:{infix:"\\to"},precedence:270}],arithmetic:[{trigger:{symbol:"\\infty"},parse:{num:"Infinity"}},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","\\infty"]},emit:"\\tilde\\infty"},{name:"COMPLEX_INFINITY",trigger:{symbol:["\\tilde","<{>","\\infty","<}>"]},emit:"\\tilde\\infty"},{name:"PI",trigger:{symbol:"\\pi"}},{name:"PI",trigger:{symbol:"π"},emit:"\\pi"},{name:"E",trigger:{symbol:"e"},emit:"e"},{name:"I",trigger:{symbol:"i"},emit:"\\imaginaryI"},{name:"I",trigger:{symbol:"\\imaginaryI"}},{name:yr,trigger:{prefix:"+",infix:"+"},parse:function(e,t,i,a){if(2751&&(r=["List",...r]),[e,["PartialDerivative",a,r,i===pr?1:i]]}return[e,[gr,l,c]]},emit:An,requiredLatexArg:2},{name:gr,trigger:{infix:"\\/"},emit:An,associativity:"non",precedence:660},{name:gr,trigger:{infix:"/"},emit:An,associativity:"non",precedence:660},{name:gr,trigger:{infix:"\\div"},emit:An,associativity:"non",precedence:660},{name:fr,trigger:{infix:"^"},associativity:"non",precedence:720,emit:qn},{name:fr,trigger:{infix:["*","*"]},associativity:"non",precedence:720,emit:qn},{name:"Sqrt",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:Sn,emit:qn},{name:"Root",trigger:"\\sqrt",optionalLatexArg:1,requiredLatexArg:1,parse:Sn},{name:"Norm",trigger:{matchfix:"\\lVert"},closeFence:"\\rVert"},{name:"Norm",trigger:{matchfix:"\\|"},closeFence:"\\|"},{name:"Norm",trigger:{matchfix:["|","|"]},closeFence:["|","|"]},{name:"Abs",trigger:{matchfix:"|"},closeFence:"|"},{name:"Abs",trigger:{matchfix:"\\lvert"},closeFence:"\\rvert"},{name:"Factorial",trigger:{postfix:"!"},precedence:810},{name:"Factorial2",trigger:{postfix:["!","!"]},precedence:810}],calculus:[{trigger:{symbol:"\\int"},parse:function(e,t,i,a){var r;let n=pr,o=pr,s=!1;for(;!s;)t.skipSpace(),t.match("_")?o=t.matchRequiredLatexArgument():t.match("^")?n=t.matchRequiredLatexArgument():s=!0;let l=null;if(t.match("<{>")){const e=t.getIndex();let i=1;for(;!t.atEnd()&&0!==i;)t.match("<{>")?i+=1:t.match("<}>")?i-=1:t.next();l=null!==(r=t.clone(e,t.getIndex()-1).matchExpression())&&void 0!==r?r:""}return[e,["Integral",l,n,o]]},emit:function(e,t){return""}}],core:[{name:"Latex",emit:function e(t,i){if(null===i)return"";const a=qr(i);if(null!==a){const r=Tr(i);return"Latex"===a?r.map(i=>e(t,i)).join(""):0===r.length?t.emit(a):t.emit(a)+r.map(e=>"{"+t.emit(e)+"}").join("")}return t.emit(i)}},{name:ur,trigger:{matchfix:"("},parse:(e,t,i,a)=>{const r=t.getIndex();let n=!1,o=!0,s=0,l="";for(;!n&&o;){const e=t.next();t.atEnd()||")"===e?n=!0:/^[0-9a-zA-Z]$/.test(e)?(s=Math.max(s,parseInt(e,36)),l+=e):o=!1}if(t.skipSpace(),o&&t.match("_")){const i=Lr(t.matchRequiredLatexArgument());if(isFinite(i)&&s"Subsequence"===Cr(e));for(const n of Tr(t))null!==n&&(a+=i+e.emit(n),i=r?"; ":", ");return e.wrapString(a,(e.level,"paren"))},separator:",",closeFence:")",precedence:20},{name:"List",trigger:{matchfix:"\\lbrack"},separator:",",closeFence:"\\rbrack",precedence:20},{name:"BaseForm",emit:(e,t)=>{const i=Lr(Kr(t,2));if(isFinite(i)&&i>0&&i<=36){const e=Lr(Kr(t,1));if(isFinite(e)){let t=Number(e).toString(i),a=0;if(2===i||10===i?a=4:16===i?a=2:i>16&&(a=4),a>0){const e=t;t="";for(let i=0;i0&&i%a==0&&(t="\\; "+t),t=e[e.length-i-1]+t}return"\\mathtt{"+t+"}_{"+Number(i).toString()+"}"}}return"\\operatorname{BaseForm}("+e.emit(Kr(t,1))+", "+e.emit(Kr(t,2))+")"}},{name:"Set",trigger:{matchfix:"\\lbrace"},separator:",",closeFence:"\\rbrace",precedence:20},{name:"Sequence",trigger:{infix:","},parse:jr,emit:Gr,precedence:20},{name:"Subsequence",trigger:{infix:";"},parse:jr,emit:Gr,precedence:20},{name:"Missing",trigger:"\\placeholder",emit:"\\placeholder",requiredLatexArg:1},{name:"Subscript",trigger:{infix:"_"},precedence:720,emit:(e,t)=>2===Nr(t)?e.emit(Kr(t,1))+"_{"+e.emit(Kr(t,2))+"}":"_{"+e.emit(Kr(t,1))+"}",parse:(e,t,i,a)=>[null,["Subscript",e,t.matchRequiredLatexArgument()]]},{name:"Superplus",trigger:{superfix:"+"}},{name:"Subplus",trigger:{subfix:"+"}},{name:"Superminus",trigger:{superfix:"-"}},{name:"Subminus",trigger:{subfix:"-"}},{name:"Superstar",trigger:{superfix:"*"}},{name:"Superstar",trigger:{superfix:"\\star"}},{name:"Substar",trigger:{subfix:"*"}},{name:"Substar",trigger:{subfix:"\\star"}},{name:"Superdagger",trigger:{superfix:"\\dagger"}},{name:"Superdagger",trigger:{superfix:"\\dag"}},{name:"Prime",trigger:{superfix:"\\prime"},arguments:"group"},{trigger:{superfix:"\\doubleprime"},parse:e=>[null,["Prime",e,2]],arguments:"group"},{name:"InverseFunction",emit:(e,t)=>e.emit(Kr(t,1))+"^{-1}"},{name:"Derivative",trigger:"D",parse:(e,t)=>[e,["Derivative",1]],emit:(e,t)=>{const i=Lr(Kr(t,1));if(!isFinite(i))return"";const a=e.emit(Kr(t,2));return 1===i?a+"^{\\prime}":2===i?a+"^{\\doubleprime}":a+"^{("+Number(i).toString()+")}"}},{name:"Piecewise",trigger:{environment:"cases"},parse:(e,t)=>[null,["piecewise",t.matchTabular()]],emit:(e,t)=>{if("List"!==Cr(Kr(t,1)))return"";const i=Tr(Kr(t,1));let a="",r="";for(const t of i){a+=r;const i=Kr(t,1);if(null!==i){a+=e.emit(i);const r=Kr(t,2);null!==r&&(a+="&"+e.emit(r))}r="\\\\"}return"\\begin{cases}"+a+"\\end{cases}"}}],inequalities:[{name:"NotLess",trigger:{infix:["!","<"]},associativity:"right",precedence:246},{name:"NotLess",trigger:{infix:"\\nless"},associativity:"right",precedence:246},{name:"Less",trigger:{infix:"<"},associativity:"right",precedence:245},{name:"Less",trigger:{infix:"\\lt"},associativity:"right",precedence:245},{name:"LessEqual",trigger:{infix:["<","="]},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\le"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leq"},associativity:"right",precedence:241},{name:"LessEqual",trigger:{infix:"\\leqslant"},associativity:"right",precedence:265},{name:"LessNotEqual",trigger:{infix:"\\lneqq"},associativity:"right",precedence:260},{name:"NotLessNotEqual",trigger:{infix:"\\nleqq"},associativity:"right",precedence:260},{name:"LessOverEqual",trigger:{infix:"\\leqq"},associativity:"right",precedence:265},{name:"GreaterOverEqual",trigger:{infix:"\\geqq"},associativity:"right",precedence:265},{name:"Equal",trigger:{infix:"="},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["*","="]},associativity:"right",precedence:260},{name:"StarEqual",trigger:{infix:["\\star","="]},associativity:"right",precedence:260},{name:"PlusEqual",trigger:{infix:["+","="]},associativity:"right",precedence:260},{name:"MinusEqual",trigger:{infix:["-","="]},associativity:"right",precedence:260},{name:"SlashEqual",trigger:{infix:["/","="]},associativity:"right",precedence:260},{name:"EqualEqual",trigger:{infix:["=","="]},associativity:"right",precedence:260},{name:"EqualEqualEqual",trigger:{infix:["=","=","="]},associativity:"right",precedence:265},{name:"TildeFullEqual",trigger:{infix:"\\cong"},associativity:"right",precedence:260},{name:"NotTildeFullEqual",trigger:{infix:"\\ncong"},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:[":","="]},associativity:"right",precedence:260},{name:"Assign",trigger:{infix:"\\coloneq"},associativity:"right",precedence:260},{name:"Approx",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"NotApprox",trigger:{infix:"\\approx"},associativity:"right",precedence:247},{name:"ApproxEqual",trigger:{infix:"\\approxeq"},associativity:"right",precedence:260},{name:"NotApproxEqual",trigger:{infix:["!","\\approxeq"]},associativity:"right",precedence:250},{name:"Unequal",trigger:{infix:"\\ne"},associativity:"right",precedence:255},{name:"Unequal",trigger:{infix:["!","="]},associativity:"right",precedence:260},{name:"GreaterEqual",trigger:{infix:"\\ge"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:"\\geq"},associativity:"right",precedence:242},{name:"GreaterEqual",trigger:{infix:[">","="]},associativity:"right",precedence:243},{name:"GreaterEqual",trigger:{infix:"\\geqslant"},associativity:"right",precedence:265},{name:"GreaterNotEqual",trigger:{infix:"\\gneqq"},associativity:"right",precedence:260},{name:"NotGreaterNotEqual",trigger:{infix:"\\ngeqq"},associativity:"right",precedence:260},{name:"Greater",trigger:{infix:">"},associativity:"right",precedence:245},{name:"Greater",trigger:{infix:"\\gt"},associativity:"right",precedence:245},{name:"NotGreater",trigger:{infix:"\\ngtr"},associativity:"right",precedence:244},{name:"NotGreater",trigger:{infix:["!",">"]},associativity:"right",precedence:244},{name:"RingEqual",trigger:{infix:"\\circeq"},associativity:"right",precedence:260},{name:"TriangleEqual",trigger:{infix:"\\triangleq"},associativity:"right",precedence:260},{name:"DotEqual",trigger:{infix:"\\doteq"},associativity:"right",precedence:265},{name:"DotEqualDot",trigger:{infix:"\\doteqdot"},associativity:"right",precedence:265},{name:"FallingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"RisingDotEqual",trigger:{infix:"\\fallingdotseq"},associativity:"right",precedence:265},{name:"QuestionEqual",trigger:{infix:"\\questeq"},associativity:"right",precedence:260},{name:"Equivalent",trigger:{infix:"\\equiv"},associativity:"right",precedence:260},{name:"MuchLess",trigger:{infix:"\\ll"},associativity:"right",precedence:260},{name:"MuchGreater",trigger:{infix:"\\gg"},associativity:"right",precedence:260},{name:"Precedes",trigger:{infix:"\\prec"},associativity:"right",precedence:260},{name:"Succeeds",trigger:{infix:"\\succ"},associativity:"right",precedence:260},{name:"PrecedesEqual",trigger:{infix:"\\preccurlyeq"},associativity:"right",precedence:260},{name:"SucceedsEqual",trigger:{infix:"\\curlyeqprec"},associativity:"right",precedence:260},{name:"NotPrecedes",trigger:{infix:"\\nprec"},associativity:"right",precedence:260},{name:"NotSucceeds",trigger:{infix:"\\nsucc"},associativity:"right",precedence:260},{name:"ElementOf",trigger:{infix:"\\in"},associativity:"right",precedence:240},{name:"NotElementOf",trigger:{infix:"\\notin"},associativity:"right",precedence:240},{name:"Contains",trigger:{infix:"\\ni"},associativity:"right",precedence:160},{name:"Subset",trigger:{infix:"\\subset"},associativity:"right",precedence:240},{name:"SquareSubset",trigger:{infix:"\\sqsubset"},associativity:"right",precedence:265},{name:"SquareSubsetEqal",trigger:{infix:"\\sqsubseteq"},associativity:"right",precedence:265},{name:"Superset",trigger:{infix:"\\supset"},associativity:"right",precedence:240},{name:"SquareSuperset",trigger:{infix:"\\sqsupset"},associativity:"right",precedence:265},{name:"SquareSupersetEuqal",trigger:{infix:"\\sqsupseteq"},associativity:"right",precedence:265},{name:"NotSubset",trigger:{infix:"\\nsubset"},associativity:"right",precedence:240},{name:"NotSuperset",trigger:{infix:"\\nsupset"},associativity:"right",precedence:240},{name:"SubsetEqual",trigger:{infix:"\\subseteq"},associativity:"right",precedence:240},{name:"SupersetEqual",trigger:{infix:"\\supseteq"},associativity:"right",precedence:240},{name:"NotSubsetNotEqual",trigger:{infix:"\\nsubseteq"},associativity:"right",precedence:240},{name:"NotSupersetNotEqual",trigger:{infix:"\\nsupseteq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\subsetneq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\supsetneq"},associativity:"right",precedence:240},{name:"SubsetNotEqual",trigger:{infix:"\\varsupsetneqq"},associativity:"right",precedence:240},{name:"SupersetNotEqual",trigger:{infix:"\\varsupsetneq"},associativity:"right",precedence:240},{name:"Between",trigger:{infix:"\\between"},associativity:"right",precedence:265}],other:[{name:"Overscript",trigger:{infix:"\\overset"},precedence:700},{name:"Underscript",trigger:{infix:"\\underset"},precedence:700},{name:"Increment",trigger:{postfix:["+","+"]},precedence:880},{name:"Decrement",trigger:{postfix:["-","-"]},precedence:880},{name:"PreIncrement",trigger:{prefix:["+","+"]},precedence:880},{name:"PreDecrement",trigger:{prefix:["-","-"]},precedence:880},{name:"Ring",trigger:{infix:"\\circ"},precedence:265},{name:"Transpose",trigger:{superfix:"T"}},{name:"ConjugateTranspose",trigger:{superfix:"H"}},{name:"StringJoin",trigger:{infix:["\\lt","\\gt"]},precedence:780},{name:"Starstar",trigger:{infix:["\\star","\\star"]},precedence:780},{name:"PartialDerivative",trigger:{prefix:"\\partial"},parse:(e,t,i,a)=>{var r;let n=!1,o=pr,s=pr;for(;!n;)t.skipSpace(),t.match("_")?s=t.matchRequiredLatexArgument():t.match("^")?o=t.matchRequiredLatexArgument():n=!0;"Sequence"===Cr(s)&&(s=["List",...Tr(s)]);let l=null!==(r=t.matchRequiredLatexArgument())&&void 0!==r?r:pr;return l!==pr&&(l=[l,...t.matchArguments("group")]),[null,["PartialDerivative",l,s,o]]},emit:(e,t)=>{let i="\\partial";const a=Kr(t,1),r=Kr(t,2),n=Kr(t,3);return null!==r&&r!==pr&&("List"===qr(r)?i+="_{"+e.emit(["Sequence",...Tr(r)])+"}":i+="_{"+e.emit(r)+"}"),null!==n&&n!==pr&&(i+="^{"+e.emit(n)+"}"),null!==a&&a!==pr&&(i+=e.emit(a)),i},precedence:740},{name:"OverBar",trigger:{symbol:"\\overline"},requiredLatexArg:1},{name:"UnderBar",trigger:{symbol:"\\underline"},requiredLatexArg:1},{name:"OverVector",trigger:{symbol:"\\vec"},requiredLatexArg:1},{name:"OverTile",trigger:{symbol:"\\tilde"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverHat",trigger:{symbol:"\\hat"},requiredLatexArg:1},{name:"OverRightArrow",trigger:{symbol:"\\overrightarrow"},requiredLatexArg:1},{name:"OverLeftArrow",trigger:{symbol:"\\overleftarrow"},requiredLatexArg:1},{name:"OverRightDoubleArrow",trigger:{symbol:"\\Overrightarrow"},requiredLatexArg:1},{name:"OverLeftHarpoon",trigger:{symbol:"\\overleftharpoon"},requiredLatexArg:1},{name:"OverRightHarpoon",trigger:{symbol:"\\overrightharpoon"},requiredLatexArg:1},{name:"OverLeftRightArrow",trigger:{symbol:"\\overleftrightarrow"},requiredLatexArg:1},{name:"OverBrace",trigger:{symbol:"\\overbrace"},requiredLatexArg:1},{name:"OverLineSegment",trigger:{symbol:"\\overlinesegment"},requiredLatexArg:1},{name:"OverGroup",trigger:{symbol:"\\overgroup"},requiredLatexArg:1}],physics:[{name:"mu-0",trigger:{symbol:["\\mu","_","0"]}}],symbols:[{trigger:{symbol:"\\alpha"},parse:"α"},{trigger:{symbol:"\\beta"},parse:"β"},{trigger:{symbol:"\\gamma"},parse:"γ"},{trigger:{symbol:"\\delta"},parse:"δ"},{trigger:{symbol:"\\epsilon"},parse:"ϵ"},{trigger:{symbol:"\\varepsilon"},parse:"ε"},{trigger:{symbol:"\\zeta"},parse:"ζ"},{trigger:{symbol:"\\eta"},parse:"η"},{trigger:{symbol:"\\theta"},parse:"θ"},{trigger:{symbol:"\\vartheta"},parse:"ϑ"},{trigger:{symbol:"\\iota"},parse:"ι"},{trigger:{symbol:"\\kappa"},parse:"κ"},{trigger:{symbol:"\\varkappa"},parse:"ϰ"},{trigger:{symbol:"\\lambda"},parse:"λ"},{trigger:{symbol:"\\mu"},parse:"μ"},{trigger:{symbol:"\\nu"},parse:"ν"},{trigger:{symbol:"\\xi"},parse:"ξ"},{trigger:{symbol:"\\omicron"},parse:"ο"},{trigger:{symbol:"\\varpi"},parse:"ϖ"},{trigger:{symbol:"\\rho"},parse:"ρ"},{trigger:{symbol:"\\varrho"},parse:"ϱ"},{trigger:{symbol:"\\sigma"},parse:"σ"},{trigger:{symbol:"\\varsigma"},parse:"ς"},{trigger:{symbol:"\\tau"},parse:"τ"},{trigger:{symbol:"\\phi"},parse:"ϕ"},{trigger:{symbol:"\\varphi"},parse:"φ"},{trigger:{symbol:"\\upsilon"},parse:"υ"},{trigger:{symbol:"\\chi"},parse:"χ"},{trigger:{symbol:"\\psi"},parse:"ψ"},{trigger:{symbol:"\\omega"},parse:"ω"},{trigger:{symbol:"\\Gamma"},parse:"Γ"},{trigger:{symbol:"\\Delta"},parse:"Δ"},{trigger:{symbol:"\\Theta"},parse:"Θ"},{trigger:{symbol:"\\Lambda"},parse:"Λ"},{trigger:{symbol:"\\Xi"},parse:"Ξ"},{trigger:{symbol:"\\Pi"},parse:"Π"},{trigger:{symbol:"\\Sigma"},parse:"Σ"},{trigger:{symbol:"\\Upsilon"},parse:"Υ"},{trigger:{symbol:"\\Phi"},parse:"Φ"},{trigger:{symbol:"\\Psi"},parse:"Ψ"},{trigger:{symbol:"\\Omega"},parse:"Ω"},{trigger:{symbol:"\\digamma"},parse:"ϝ"},{trigger:{symbol:"\\aleph"},parse:"ℵ"},{trigger:{symbol:"\\beth"},parse:"ℶ"},{trigger:{symbol:"\\daleth"},parse:"ℸ"},{trigger:{symbol:"\\gimel"},parse:"ℷ"},{trigger:{symbol:"\\Finv"},parse:"Ⅎ"},{trigger:{symbol:"\\Game"},parse:"⅁"},{trigger:{symbol:"\\wp"},parse:"℘"},{trigger:{symbol:"\\eth"},parse:"ð"},{trigger:{symbol:"\\mho"},parse:"℧"},{trigger:{symbol:"\\clubsuit"},parse:"♣"},{trigger:{symbol:"\\heartsuit"},parse:"♡"},{trigger:{symbol:"\\spadesuit"},parse:"♠"},{trigger:{symbol:"\\diamondsuit"},parse:"♢"},{trigger:{symbol:"\\sharp"},parse:"♯"},{trigger:{symbol:"\\flat"},parse:"♭"},{trigger:{symbol:"\\natural"},parse:"♮"}],trigonometry:[{name:"Arcsin",trigger:"\\arcsin",arguments:"implicit",parse:$n},{name:"Arccos",trigger:"\\arccos",arguments:"implicit",parse:$n},{name:"Arctan",trigger:"\\arctan",arguments:"implicit",parse:$n},{name:"Arctan",trigger:"\\arctg",arguments:"implicit",parse:$n},{name:"Arccot",trigger:"\\arcctg",arguments:"implicit",parse:$n},{name:"Arcsec",trigger:"\\arcsec",arguments:"implicit",parse:$n},{name:"Arccsc",trigger:"\\arccsc",arguments:"implicit",parse:$n},{name:"Arsinh",trigger:"\\arsinh",arguments:"implicit",parse:$n},{name:"Arcosh",trigger:"\\arcosh",arguments:"implicit",parse:$n},{name:"Artanh",trigger:"\\artanh",arguments:"implicit",parse:$n},{name:"Arsech",trigger:"\\arsech",arguments:"implicit",parse:$n},{name:"Arcsch",trigger:"\\arcsch",arguments:"implicit",parse:$n},{name:"Cosh",trigger:"\\ch",arguments:"implicit",parse:$n},{name:"Cosec",trigger:"\\cosec",arguments:"implicit",parse:$n},{name:"Cosh",trigger:"\\cosh",arguments:"implicit",parse:$n},{name:"Cot",trigger:"\\cot",arguments:"implicit",parse:$n},{name:"Cot",trigger:"\\cotg",arguments:"implicit",parse:$n},{name:"Coth",trigger:"\\coth",arguments:"implicit",parse:$n},{name:"Csc",trigger:"\\csc",arguments:"implicit",parse:$n},{name:"Cot",trigger:"\\ctg",arguments:"implicit",parse:$n},{name:"Coth",trigger:"\\cth",arguments:"implicit",parse:$n},{name:"Sec",trigger:"\\sec",arguments:"implicit",parse:$n},{name:"Sinh",trigger:"\\sinh",arguments:"implicit",parse:$n},{name:"Sinh",trigger:"\\sh",arguments:"implicit",parse:$n},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:$n},{name:"Tanh",trigger:"\\tanh",arguments:"implicit",parse:$n},{name:"Tan",trigger:"\\tg",arguments:"implicit",parse:$n},{name:"Tanh",trigger:"\\th",arguments:"implicit",parse:$n},{name:"Cos",trigger:"\\cos",arguments:"implicit",parse:$n},{name:"Sin",trigger:"\\sin",arguments:"implicit",parse:$n},{name:"Tan",trigger:"\\tan",arguments:"implicit",parse:$n}]};class Kn{constructor(e,t){var i;let a;this.index=0,this.options={..._r,...t},this.tokens=e,this.onError=e=>t.onError({...e,before:this.latexBefore(),after:this.latexAfter()}),this.dictionary=null!==(i=t.indexedLatexDictionary)&&void 0!==i?i:Dn(t.dictionary,t.onError),this.invisibleOperatorPrecedence=0,this.options.invisibleOperator&&(a=this.dictionary.name.get(this.options.invisibleOperator),void 0===a?t.onError({code:"unknown-operator",arg:this.options.invisibleOperator}):void 0===a.precedence?t.onError({code:"expected-operator",arg:this.options.invisibleOperator}):this.invisibleOperatorPrecedence=a.precedence)}clone(e,t){return new Kn(this.tokens.slice(e,t),{...this.options,dictionary:[],indexedLatexDictionary:this.dictionary,onError:this.onError})}getIndex(){return this.index}setIndex(e){this.index=e}atEnd(){return this.index>=this.tokens.length}peek(){return this.tokens[this.index]}latex(e,t){return f(this.tokens.slice(e,t))}latexAhead(e){return f(this.tokens.slice(this.index,this.index+e))}latexBefore(){return this.latex(0,this.index)}latexAfter(){return this.latex(this.index)}lookAhead(){let e=Math.min(this.dictionary.lookahead,this.tokens.length-this.index);const t=[];for(;e>0;)t[e]=this.latexAhead(e--);return t}peekDefinition(e){let t;t="operator"===e?this.lookAhead().map((e,t)=>{var i,a,r,n,o;return null!==(n=null!==(a=null===(i=this.dictionary.infix[t])||void 0===i?void 0:i.get(e))&&void 0!==a?a:null===(r=this.dictionary.postfix[t])||void 0===r?void 0:r.get(e))&&void 0!==n?n:null===(o=this.dictionary.prefix[t])||void 0===o?void 0:o.get(e)}):this.lookAhead().map((t,i)=>{var a;return null===(a=this.dictionary[e][i])||void 0===a?void 0:a.get(t)});for(let e=t.length;e>0;e--)if(void 0!==t[e])return[t[e],e];return[null,0]}next(){return this.tokens[this.index++]}skipSpace(){if(!this.options.skipSpace)return!1;let e=!1;for(;this.match("");)e=!0;return e}match(e){return this.tokens[this.index]===e&&(this.index++,!0)}matchAll(e){let t=!0;"string"==typeof e&&(e=[e]);let i=0;do{t=this.tokens[this.index+i]===e[i++]}while(t&&ie!==this.options.groupSeparator).join(""):""}matchSignedInteger(){const e=this.index,t=this.matchSign(),i=this.matchDigits();return i?("-"===t?"-":"")+i:(this.index=e,"")}matchExponent(){const e=this.index;let t="";if(this.matchAny(["e","E","d","D"])){const e=this.matchSignedInteger();e&&(t="e"+e)}if(t)return t;if(this.match("\\times")&&(this.skipSpace(),this.match("1")&&this.match("0")&&this.match("^"))){if(/[0-9]/.test(this.peek()))return"e"+this.next();if(this.match("<{>")){this.skipSpace();const e=this.matchSignedInteger();if(this.skipSpace(),this.match("<}>")&&e)return"e"+e}}return this.index=e,""}matchNumber(){var e,t,i;if(!this.options.parseNumbers)return"";const a=this.index;let r=this.matchDigits();return r?(this.match(null!==(e=this.options.decimalMarker)&&void 0!==e?e:"")&&(r+="."+(null!==(t=this.matchDigits())&&void 0!==t?t:"")),r+=null!==(i=this.matchExponent())&&void 0!==i?i:"",r||(this.index=a,"")):""}matchOperator(e,t=null,i=0){const[a,r]=this.peekDefinition(e);if(null===a)return null;if("function"==typeof a.parse){const e=this.latexAhead(r);this.index+=r;let n=null;return[t,n]=a.parse(t,this,i,e),null===n?(this.index-=r,null):this.applyInvisibleOperator(t,n)}let n=a.precedence;if(n0;)l=this.matchOptionalLatexArgument(),null!==l&&s.push(l),c--;for(c=null!==(a=r.requiredLatexArg)&&void 0!==a?a:0;c>0;)l=this.matchRequiredLatexArgument(),null===l&&this.onError({code:"expected-argument"}),null!==l&&o.push(l),c--;const d=this.matchArguments(r.arguments);return null===d?0===o.length&&0===s.length?r.parse:[r.parse,...o,...s]:[r.parse,...o,...d,...s]}matchOptionalLatexArgument(){if(this.skipSpace(),this.match("[")){const e=this.index;let t=1;for(;!this.atEnd()&&0!==t;)this.match("[")?t+=1:this.match("]")?t-=1:this.next();return this.clone(e,this.index-1).matchExpression()}return null}matchRequiredLatexArgument(){var e;if(this.skipSpace(),this.match("<{>")){const t=this.index;let i=1;for(;!this.atEnd()&&0!==i;)this.match("<{>")?i+=1:this.match("<}>")?i-=1:this.next();return null!==(e=this.clone(t,this.index-1).matchExpression())&&void 0!==e?e:""}return/^[0-9]$/.test(this.peek())?parseFloat(this.next()):/^[^\\#]$/.test(this.peek())?this.next():this.matchExpression()}matchSupsub(e){let t=null;return this.skipSpace(),[["^","superfix"],["_","subfix"]].forEach(i=>{var a,r,n;if(null!==t)return;const[o,s]=i;if(!this.match(o))return;this.skipSpace();const l=this.index;let c,d=0;if(this.match("<{>")?(this.skipSpace(),[c,d]=this.peekDefinition(s),this.index+=d,this.skipSpace(),(null==c?void 0:c.name)&&this.match("<}>")?t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(a=c.parse)&&void 0!==a?a:c.name,e]:this.index=l):([c,d]=this.peekDefinition(s),(null==c?void 0:c.name)&&(this.index+=d,t="function"==typeof c.parse?c.parse(e,this,0,c.name)[1]:[null!==(r=c.parse)&&void 0!==r?r:c.name,e])),null===t&&(c=null===(n=this.dictionary.infix[1])||void 0===n?void 0:n.get(o),"function"==typeof(null==c?void 0:c.parse)?t=c.parse(e,this,0,o)[1]:"string"==typeof(null==c?void 0:c.parse)?([e,t]=this.applyOperator(c.parse,e,this.matchRequiredLatexArgument()),t=this.applyInvisibleOperator(e,t)):t=this.applyInvisibleOperator(e,o)),null!==t){const e=this.matchArguments(null==c?void 0:c.arguments);null!==e&&(t=[t,...e])}}),t}matchPostfix(e){if(null===e)return null;const[t,i]=this.peekDefinition("postfix");if(null===t)return null;if("function"==typeof t.parse){const a=this.latexAhead(i);return this.index+=i,[,e]=t.parse(e,this,0,a),null===e?(this.index-=i,null):e}return this.index+=i,[t.parse,e]}matchString(){let e="",t=this.atEnd();for(;!t;){if(this.match(""))e+=" ";else{const i=this.peek();"]"===this.peek()?t=!0:/^<({|}|\$|\$\$|space)>$/.test(i)?"\\"===i[0]?(this.onError({code:"unbalanced-braces"}),e+=this.next()):t=!0:e+=this.next()}t=t||this.atEnd()}return e}matchEnvironmentName(e,t){if(this.match(e)){const e=this.index;if(this.match("<{>")){const e=this.matchString();if(this.match("<}>")&&e===t)return!0}this.index=e}return!1}matchTabular(){const e=["list"];let t=["list"],i=null,a=!1;for(;!this.atEnd()&&!a;)if(this.match("&"))t.push(i),i=null;else if(this.match("\\\\")||this.match("\\cr"))this.skipSpace(),this.matchOptionalLatexArgument(),null!==i&&t.push(i),e.push(t),t=["list"],i=null;else{const e=this.matchExpression();null===e&&(a=!0),i=null!==i?this.applyInvisibleOperator(i,e):e}return t.length>1&&e.push(t),e}matchEnvironment(){var e;if(this.match("\\begin")&&this.match("<{>")){const t=this.matchString();if(this.match("<}>")){const i=this.index;let a=this.index,r=1;for(;!this.atEnd()&&0!==r;)a=this.index,this.matchEnvironmentName("\\begin",t)?r+=1:this.matchEnvironmentName("\\end",t)?r-=1:this.next();const n=this.dictionary.environment.get(t);return"function"==typeof(null==n?void 0:n.parse)?n.parse(null,this.clone(i,a),0,t)[1]:null!==(e=null==n?void 0:n.parse)&&void 0!==e?e:null}}return null}applyOperator(e,t,i){var a,r,n,o;const s=this.dictionary.name.get(e);if(void 0===s)return this.onError({code:"unknown-operator"}),[t,i];if(void 0!==(null===(a=s.trigger)||void 0===a?void 0:a.prefix)&&null===t&&null!==i)return[null,[s.name,i]];if(void 0!==(null===(r=s.trigger)||void 0===r?void 0:r.postfix)&&null!==t)return[null,[s.name,t]];if((void 0!==(null===(n=s.trigger)||void 0===n?void 0:n.matchfix)||void 0!==(null===(o=s.trigger)||void 0===o?void 0:o.infix))&&null!==t&&null!==i){if("non"===s.associativity)return[null,[e,t,i]];if(Cr(t)===e){if("both"===s.associativity){if(Cr(i)===e){if(Array.isArray(t))return[null,t.concat(Tr(i))];if(zr(t))return[null,t.fn.concat(Tr(i))]}else Array.isArray(t)&&t.push(i),zr(t)&&t.fn.push(i);return[null,t]}return"left"===s.associativity?[null,[e,t,i]]:Array.isArray(t)?[null,[e,t[1],[e,t[2],i]]]:(zr(t)&&(t.fn[2]=[e,t.fn[2],i]),[null,t])}return Cr(i)===e?"both"===s.associativity?(Array.isArray(i)&&i.splice(1,0,t),zr(i)&&i.fn.splice(1,0,t),[null,i]):"right"===s.associativity?[null,[e,t,i]]:Array.isArray(i)?[null,[e,i[1],[e,i[2],t]]]:(zr(i)&&(i.fn[2]=[e,i.fn[2],t]),[null,i]):[null,[e,t,i]]}return void 0!==s.trigger.infix?(this.onError({code:"expected-operand"}),[t,null]):[t,null]}applyInvisibleOperator(e,t){if(null===e)return t;if(null===t)return e;if(this.options.invisiblePlusOperator&&("number"==typeof e||Mr(e))&&Cr(t)===gr)return[e,t]=this.applyOperator(this.options.invisiblePlusOperator,e,t),null===e?t:null;if(this.options.invisibleOperator)return[e,t]=this.applyOperator(this.options.invisibleOperator,e,t),null===e?t:null;let i=["Latex"];return"Latex"===Cr(e)?i=i.concat(Tr(e)):i.push(e),null!==t&&("Latex"===Cr(t)?i=i.concat(Tr(t)):i.push(t)),this.options.invisibleOperator&&this.onError({code:"unexpected-sequence"}),i}matchUnknownLatexCommand(){const e=this.peek();if(!e||"\\"!==e[0])return null;this.next();const t=[],i=[];let a=!1;do{a=!0;let e=this.matchOptionalLatexArgument();null!==e&&(t.push(e),a=!1),this.skipSpace(),"<{>"===this.peek()&&(e=this.matchRequiredLatexArgument(),null!==e&&(i.push(e),a=!1))}while(!a);return t.length>0||i.length>0?[e,...i,...t]:e}matchPrimary(e){let t=null;const i=this.index,a=this.matchNumber();a&&(t={num:a}),null===t&&(t=this.matchSymbol()),null===t&&(t=this.matchEnvironment()),null===t&&(t=this.matchMatchfixOperator());let r=null;do{r=this.matchSupsub(t),t=null!=r?r:t}while(null!==r);let n=null;do{n=this.matchPostfix(t),t=null!=n?n:t}while(null!==n);return this.decorate(t,i)}matchExpression(e=0){let t=null;const i=this.index;if(this.skipSpace(),t=this.matchOperator("prefix"),null===t&&(t=this.matchPrimary(e)),null===t)return null;let a=!1;for(;!this.atEnd()&&!a;){this.skipSpace();let i=this.matchOperator("infix",t,e);if(null===i){const[e]=this.peekDefinition("operator");if(null===e){const e=this.matchExpression(this.invisibleOperatorPrecedence);null===e?a=!0:i=this.applyInvisibleOperator(t,e)}}null!==i?t=i:a=!0}return this.decorate(t,i)}decorate(e,t){if(this.options.preserveLatex){const i=this.latex(t,this.index);Array.isArray(e)?e={latex:i,fn:e}:"number"==typeof e?e={latex:i,num:Number(e).toString()}:"string"==typeof e?e={latex:i,sym:e}:"object"==typeof e&&null!==e&&(e.latex=i)}return e}}function Nn(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}const a=i!==e.length;return(e=e.replace(/(\d{3})/g,"$1"+t.groupSeparator)).endsWith(t.groupSeparator)&&(e=e.slice(0,-1)),e+(a?"\\ldots":"")}function On(e,t){var i;return e?t.beginExponentMarker?t.beginExponentMarker+e+(null!==(i=t.endExponentMarker)&&void 0!==i?i:""):"10^{"+e+"}":""}class Bn{constructor(e){this.level=-1,this.options=e,e.invisibleMultiply&&(/#1/.test(e.invisibleMultiply)&&/#2/.test(e.invisibleMultiply)||e.onError({code:"expected-argument",arg:"invisibleMultiply"})),this.onError=e.onError,this.dictionary=Dn(e.dictionary,e.onError)}wrap(e,t){if(null===e)return"";if(void 0===t)return"("+this.emit(e)+")";if("number"==typeof e||Mr(e)||"string"==typeof e||Sr(e))return this.emit(e);const i=Cr(e);if(i){const a=this.dictionary.name.get(i);if(a&&void 0!==a.precedence&&a.precedence1?"upright":"asis"}(e,this.level)){case"upright":return"\\operatorname{"+i+"}";default:return i}}const a=Tr(e);if(!t){if("string"==typeof i&&i.length>0&&"\\"===i[0]){let e=i;for(const t of a)e+="{"+this.emit(t)+"}";return e}return this.emit(i)+this.emit([ur,...a])}if(t.requiredLatexArg>0){let e="",i="",r=0;for(;r=0){const a=r.match(/(\d*)\.(\d*)([e|E]([-+]?[0-9]*))?/);if(!a)return"";const o=a[1],l=a[2].substring(0,Math.min(s.precision-o.length,a[2].length));if(n=null!==(i=a[4])&&void 0!==i?i:"","0"===o){let i=0;for(;"0"===l[i]&&i=s.precision)a="0",t="";else{a=r[i];const e=Nn(r.substr(i+1),s);e&&(a+=s.decimalMarker+e)}"0"!==a&&(r.length-1>s.precision&&!a.endsWith("}")&&!a.endsWith("\\ldots")&&(a+="\\ldots"),i>4&&(a+=s.exponentProduct+On((1-i).toString(),e))),r=a}else{r=o.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator);const e=Nn(l,s);e&&(r+=s.decimalMarker+e)}}else if(r.length>s.precision){const t=r.length;let i=r[0];const a=Nn(r.substr(1),s);a&&(i+=s.decimalMarker+a,"}"!==i[i.length-1]&&(i+="\\ldots")),"1"!==i?i+=s.exponentProduct:i="",r=i+On((t-2).toString(),e)}else{const t=r.match(/([0-9]*)\.?([0-9]*)([e|E]([-+]?[0-9]+))?/);t&&(r=t[1],t[2]&&(r+=e.decimalMarker+t[2]),n=null!==(a=t[4])&&void 0!==a?a:""),r=r.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator)}const o=On(n,e);return t+r+(o?e.exponentProduct+o:"")}if(n=function(e){return parseFloat(Number(e).toPrecision(15))}(r),"engineering"===s.notation)if(0===n)o="0";else{const t=Math.abs(n);let i=Math.round(Math.log10(t));i-=i%3,t<1e3&&(i=0);const a=t/Math.pow(10,i);let r="";const l=a.toString().match(/^(.*)\.(.*)$/);(null==l?void 0:l[1])&&l[2]&&(r=l[1]+s.decimalMarker+l[2]),s.groupSeparator&&(r=Nn(a.toExponential(),s));let c="";0!==i&&(c=On(i.toString(),e)),o=(n<0?"-":"")+r+c}else{const t="string"==typeof r?r:r.toString();let i,a,n,l=t.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);i=t,n="",(null==l?void 0:l[1])&&l[2]&&(i=l[1],a=On(l[2],e),a&&(a=e.exponentProduct+a)),l=i.match(/^(.*)\.(.*)$/),(null==l?void 0:l[1])&&l[2]&&(i=l[1],n=l[2]),s.groupSeparator&&(i=i.replace(/\B(?=(\d{3})+(?!\d))/g,s.groupSeparator),n=Nn(n,s)),n&&(n=s.decimalMarker+n),o=i+n+(null!=a?a:"")}return o}(this.options,e);if(t)return this.level-=1,t;const i=Dr(e);if("<$>"===i)t="$";else if("<$$>"===i)t="$$";else if("<{>"===i)t="{";else if("<}>"===i)t="}";else if(""===i)t=" ";else{if(i&&("\\"===i[0]||"#"===i[0])){this.level-=1;const t=Tr(e);return 0===t.length?i:i+"{"+t.map(e=>this.emit(e)).filter(e=>Boolean(e)).join("}{")+"}"}if(null!==i)t=this.emitSymbol(e,this.dictionary.name.get(i));else{const i=this.dictionary.name.get(Cr(e));i?"function"==typeof i.emit?t=i.emit(this,e):(t||void 0===i.precedence&&!i.trigger.superfix&&!i.trigger.subfix||(t=function(e,t,i){let a="";const r=Nr(t),n=Cr(t);if(i.trigger.superfix||i.trigger.subfix)return 1!==r&&e.onError({code:"operator-requires-one-operand",arg:e.emitSymbol(n)}),Or(i.emit,[e.emit(Kr(t,1))]);if(i.trigger.postfix)return 1!==r&&e.onError({code:"postfix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Or(i.emit,[e.wrap(Kr(t,1),i.precedence)]);if(i.trigger.prefix)return 1!==r&&e.onError({code:"prefix-operator-requires-one-operand",arg:e.emitSymbol(n)}),Or(i.emit,[e.wrap(Kr(t,1),i.precedence+1)]);if(i.trigger.infix){a=e.wrap(Kr(t,1),i.precedence);for(let n=2;n=1){let r="";for(const n of Tr(t))n&&(a.push(r),a.push(e.emit(n)),r=i.separator)}return Array.isArray(i.closeFence)?a.push(f(i.closeFence)):"string"==typeof i.closeFence&&a.push(i.closeFence),h(a)}(this,e,i)),!t&&i.trigger.symbol&&(t=this.emitSymbol(e,i))):Array.isArray(e)||zr(e)?t=this.emitSymbol(e):this.onError({code:"syntax-error",arg:JSON.stringify(e)})}}return this.level-=1,t}}function Fn(e,t){var i,a,r;const n=new Kn(Ge(e,[]),{...kr,..._r,onError:e=>{"undefined"!=typeof window&&(!e.before||e.after)},dictionary:Tn("all"),...t}),o=n.matchExpression();n.atEnd()||null===(i=null==t?void 0:t.onError)||void 0===i||i.call(t,{code:"syntax-error"});let s=null!==(a=null==t?void 0:t.form)&&void 0!==a?a:["canonical"];return Array.isArray(s)||(s=[s]),null!==(r=wn(function(e="all"){let t;return"all"===e?(t={},Object.keys(xr).forEach(e=>{t={...t,...xr[e]}})):t={...xr[e]},t}("all"),o,s))&&void 0!==r?r:""}const Pn={"\\imaginaryI":"ⅈ","\\imaginaryJ":"ⅉ","\\pi":"π","\\exponentialE":"ℯ","﹢":"+","+":"+","−":"-","-":"-","﹣":"-","-":"-","\\times":"*","\\cdot":"*","⨉":"*","️✖":"*","️×":"*",".":"*","÷":"/","⁄":"/","/":"/","!":"factorial","\\mp":"minusplus","\\ne":"!=","\\coloneq":":=","\\questeq":"?=","\\approx":"approx","\\cong":"congruent","\\sim":"similar","\\equiv":"equiv","\\pm":"plusminus","\\land":"and","\\wedge":"and","\\lor":"or","\\vee":"or","\\oplus":"xor","\\veebar":"xor","\\lnot":"not","\\neg":"not","\\exists":"exists","\\nexists":"!exists","\\forall":"forAll","\\backepsilon":"suchThat","\\therefore":"therefore","\\because":"because","\\nabla":"nabla","\\circ":"circle","\\ominus":"ominus","\\odot":"odot","\\otimes":"otimes","\\zeta":"Zeta","\\Gamma":"Gamma","\\min":"min","\\max":"max","\\mod":"mod","\\lim":"lim","\\sum":"sum","\\prod":"prod","\\int":"integral","\\iint":"integral2","\\iiint":"integral3","\\Re":"Re","\\gothicCapitalR":"Re","\\Im":"Im","\\gothicCapitalI":"Im","\\binom":"nCr","\\partial":"partial","\\differentialD":"differentialD","\\capitalDifferentialD":"capitalDifferentialD","\\Finv":"Finv","\\Game":"Game","\\wp":"wp","\\ast":"ast","\\star":"star","\\asymp":"asymp","\\to":"to","\\gets":"gets","\\in":"elementof","\\notin":"!elementof","\\ni":"ownedby","\\owns":"ownedby","\\subset":"subset","\\supset":"superset","\\complement":"complement","\\rightarrow":"shortLogicalImplies","\\leftarrow":"shortLogicalImpliedBy","\\leftrightarrow":"shortLogicalEquivalent","\\longrightarrow":"logicalImplies","\\longleftarrow":"logicalImpliedBy","\\longleftrightarrow":"logicalEquivalent","\\Rightarrow":"shortImplies","\\Leftarrow":"shortImpliedBy","\\Leftrightarrow":"shortEquivalent","\\implies":"implies","\\Longrightarrow":"implies","\\impliedby":"impliedBy","\\Longleftarrow":"impliedBy","\\iff":"equivalent","\\Longleftrightarrow":"equivalent"},Rn={"+":"add","*":"multiply","-":"subtract","/":"divide","=":"equal",":=":"assign","!=":"ne","?=":"questeq",approx:"approx",congruent:"congruent",similar:"similar",equiv:"equiv","<":"lt",">":"gt","<=":"le",">=":"ge","≤":"le","≥":"ge",">>":"gg","<<":"ll","**":"pow","++":"increment","--":"decrement"},In={equal:"%0 = %1",ne:"%0 \\ne %1",questeq:"%0 \\questeq %1",approx:"%0 \\approx %1",congruent:"%0 \\cong %1",similar:"%0 \\sim %1",equiv:"%0 \\equiv %1",assign:"%0 := %1",lt:"%0 < %1",gt:"%0 > %1",le:"%0 \\le %1",ge:"%0 \\ge %1",sin:"\\sin%_%^ %0",cos:"\\cos%_%^ %0",tan:"\\tan%_%^ %0",cot:"\\cot%_%^ %0",sec:"\\sec%_%^ %0",csc:"\\csc%_%^ %0",sinh:"\\sinh %0",cosh:"\\cosh %0",tanh:"\\tanh %0",csch:"\\csch %0",sech:"\\sech %0",coth:"\\coth %0",arcsin:"\\arcsin %0",arccos:"\\arccos %0",arctan:"\\arctan %0",arccot:"\\arcctg %0",arcsec:"\\arcsec %0",arccsc:"\\arccsc %0",arsinh:"\\arsinh %0",arcosh:"\\arcosh %0",artanh:"\\artanh %0",arcsch:"\\arcsch %0",arsech:"\\arsech %0",arcoth:"\\arcoth %0",ln:"\\ln%_%^ %",log:"\\log%_%^ %",lg:"\\lg %",lb:"\\lb %",sum:"\\sum%_%^ %0",prod:"\\prod%_%^ %0",Zeta:"\\zeta%_%^ %",Gamma:"\\Gamma %",min:"\\min%_%^ %",max:"\\max%_%^ %",mod:"\\mod%_%^ %",lim:"\\lim%_%^ %",binom:"\\binom %",nabla:"\\nabla %",curl:"\\nabla\\times %0",div:"\\nabla\\cdot %0",floor:"\\lfloor %0 \\rfloor%_%^",ceil:"\\lceil %0 \\rceil%_%^",abs:"\\left| %0 \\right|%_%^",norm:"\\lVert %0 \\rVert%_%^",ucorner:"\\ulcorner %0 \\urcorner%_%^",lcorner:"\\llcorner %0 \\lrcorner%_%^",angle:"\\langle %0 \\rangle%_%^",group:"\\lgroup %0 \\rgroup%_%^",moustache:"\\lmoustache %0 \\rmoustache%_%^",brace:"\\lbrace %0 \\rbrace%_%^","sqrt[]":"\\sqrt[%^]{%0}",sqrt:"\\sqrt{%0}",lcm:"\\operatorname{lcm}%",gcd:"\\operatorname{gcd}%",erf:"\\operatorname{erf}%",erfc:"\\operatorname{erfc}%",randomReal:"\\operatorname{randomReal}%",randomInteger:"\\operatorname{randomInteger}%",and:"%0 \\land %1",or:"%0 \\lor %1",xor:"%0 \\oplus %1",not:"%0 \\lnot %1",circle:"%0 \\circ %1",ast:"%0 \\ast %1",star:"%0 \\star %1",asymp:"%0 \\asymp %1","/":"\\frac{%0}{%1}",Re:"\\Re{%0}",Im:"\\Im{%0}",factorial:"%0!",factorial2:"%0!!"},Hn={degree:880,nabla:740,curl:740,partial:740,differentialD:740,capitalDifferentialD:740,"**":720,odot:710,not:680,div:660,solidus:660,"/":660,setminus:650,"%":640,otimes:410,union:350,intersection:350,"*":390,ast:390,".":390,oplus:300,ominus:300,"+":275,"-":275,"+-":275,"-+":275,circle:265,circledast:265,circledcirc:265,star:265,"..":263,to:262,in:262,"|":261,congruent:265,equiv:260,"=":260,"!=":255,"?=":255,similar:250,approx:247,"<":245,">":243,">=":242,"≥":242,"<=":241,complement:240,subset:240,superset:240,elementof:240,"!elementof":240,exists:230,"!exists":230,forall:230,and:200,xor:195,or:190,suchThat:110,":":100,assign:80,":=":80,therefore:70,because:70,shortLogicalImplies:52,shortImplies:51,logicalImplies:50,implies:49,shortLogicalImpliedBy:48,shortImpliedBy:47,logicalImpliedBy:46,impliedBy:45,shortLogicalEquivalent:44,shortEquivalent:43,logicalEquivalent:42,equivalent:41,",":40,";":30};function Wn(t,i){return e(t.arg)?t.arg[i]:void 0}function Vn(e){return e&&Hn[e]||-1}function Un(e){return/=|=>/.test(e)?"right":"left"}function jn(e){if("f"===e||"g"===e)return!0;const t=In[e];return!!t&&!!/%[^01_^]?/.test(t)}function Gn(e){e=(e||"").trim();let t=Pn[e];if(!t)if(/^\\[^{}]+$/.test(e)){const i=ae(e,"math",{});t=i&&i.value||e.slice(1)}else t=e;return t}function Xn(e){if(!e)return null;const t=Gn(to(e)),i=[Vn(t),Un(t)];return i[0]<=0?null:i}function Zn(e){return null!==Xn(e)}const Yn={"\\lfloor\\rfloor":"floor","\\lceil\\rceil":"ceil","\\vert\\vert":"abs","\\lvert\\rvert":"abs","||":"abs","\\Vert\\Vert":"norm","\\lVert\\rVert":"norm","\\ulcorner\\urcorner":"ucorner","\\llcorner\\lrcorner":"lcorner","\\langle\\rangle":"angle","\\lgroup\\rgroup":"group","\\lmoustache\\rmoustache":"moustache","\\lbrace\\rbrace":"brace"},Qn={"!":"factorial","\\dag":"dagger","\\dagger":"dagger","\\ddagger":"dagger2","\\maltese":"maltese","\\backprime":"backprime","\\backdoubleprime":"backprime2","\\prime":"prime","\\doubleprime":"prime2","\\$":"$","\\%":"%","\\_":"_","\\degree":"degree"},Jn={"+":"add","-":"add","*":"multiply","=":"equal",",":"list",";":"list2",and:"and",or:"or",xor:"xor",union:"union",shortLogicalEquivalent:"logicalEquivalent",logicalEquivalent:"logicalEquivalent",shortEquivalent:"equivalent",equivalent:"equivalent"},eo={",":"list",";":"list2"};function to(t){if("string"==typeof t)return t;if(e(t)){let e="";for(const i of t)e+=to(i);return e}if(t.symbol&&!/^\\math(op|bin|rel|open|punct|ord|inner)/.test(t.symbol))return t.symbol;if("leftright"===t.type)return"";if("string"==typeof t.body)return t.body;if(e(t.body)){let e="";for(const i of t.body)e+=to(i);return e}return""}function io(e){return"string"==typeof e.sym?function(e){let t=In[e];return t?t.replace("%1","").replace("%0","").replace("%",""):(e.length>1&&(t="\\"+e),t||(t=J("math",e)),t)}(e.sym)||e.sym:""}function ao(e){return parseFloat(e.num)}function ro(e){return"object"==typeof e&&void 0!==e.num}function no(e){let t=0;return ro(e)&&(t="object"==typeof e.num?void 0!==e.num.re?Lo(e.num.re):0:parseFloat(e.num)),t}function oo(e){let t=0;return ro(e)&&"object"==typeof e.num&&(t=void 0!==e.num.im?Lo(e.num.im):0),t}function so(e){return e&&void 0!==e.sup}function lo(e){return e&&void 0!==e.sub}function co(e,t,i){let a=!1;const r=e.atoms[e.index];return r&&r.type===t&&(a=void 0===i||to(r)===i),a}function mo(e,...t){const i={fn:e,arg:void 0};if(t){const e=[];for(const i of t)i&&e.push(i);e.length>0&&(i.arg=e)}return i}function po(e){return"number"==typeof e?{num:e.toString()}:"string"==typeof e||"object"==typeof e?{num:e}:void 0}function uo(e){if(ro(e)){const t=no(e),i=oo(e);return 0!==i?(0!==t&&(e.num.re=(-t).toString()),e.num.im=(-i).toString()):e.num=(-t).toString(),e}return mo("negate",e)}function ho(e){const t=e.atoms[e.index+1];return t&&"msubsup"===t.type}function fo(e,t){let i=e.atoms[e.index];return!i||void 0===i.superscript&&void 0===i.subscript?i=null:e.index+=1,i||(i=e.atoms[e.index+1],i&&"msubsup"===i.type&&(i.superscript||i.subscript)?e.index+=2:i=null),i?(void 0!==i.subscript&&(e.ast.sub=wo(i.subscript,t)),void 0!==i.superscript&&("msubsup"===i.type?/['\u2032]|\\prime/.test(to(i.superscript))?(e.index+=1,i=e.atoms[e.index+1],i&&"msubsup"===i.type&&/['\u2032]|\\prime/.test(to(i.superscript))?e.ast.sup={sym:"″"}:(e.ast.sup={sym:"′"},e.index-=1)):/['\u2033]|\\doubleprime/.test(to(i.superscript))?e.ast.sup={sym:"″"}:e.ast&&(e.ast.sup=wo(i.superscript,t)):e.ast.sup=wo(i.superscript,t))):e.index+=1,e}function go(e,t){const i=e.ast;if(bo(e,"!!"))return e.index+=1,e.ast=mo("factorial2",i),go(e=fo(e,t),t);if(bo(e,"++"))return e.index+=1,e.ast=mo("increment",i),go(e=fo(e,t),t);if(bo(e,"--"))return e.index+=1,e.ast=mo("decrement",i),go(e=fo(e,t),t);const a=e.atoms[e.index];return(null==a?void 0:a.symbol)&&Qn[a.symbol]&&(e.ast=mo(Qn[a.symbol],i),e=go(e=fo(e,t),t)),e}function yo(e,t,i,a){if(e.index=e.index||0,0===e.atoms.length||e.index>=e.atoms.length)return e.ast=void 0,e;const r=e.minPrec;e.minPrec=0;let n=e.atoms[e.index];if(t){if("mopen"===n.type&&to(n)===t)e.index+=1,n=(e=xo(e,a)).atoms[e.index],n&&"mclose"===n.type&&to(n)===i&&(ho(e)&&(e.ast={group:e.ast}),e=go(e=fo(e,a),a));else if("textord"===n.type&&to(n)===t)e.index+=1,n=(e=xo(e,a)).atoms[e.index],n&&"textord"===n.type&&to(n)===i&&(e.index+=1,e=go(e=fo(e,a),a));else if("\\lVert"===t&&"textord"===n.type&&"|"===n.symbol){if(n=e.atoms[e.index+1],n&&"textord"===n.type&&"|"===n.symbol){e.index+=2,n=(e=xo(e,a)).atoms[e.index];const t=e.atoms[e.index+1];n&&"textord"===n.type&&"|"===n.symbol&&t&&"textord"===t.type&&"|"===t.symbol&&(e.index+=2,e=go(e=fo(e,a),a))}}else if("sizeddelim"===n.type&&n.delim===t)e.index+=1,n=(e=xo(e,a)).atoms[e.index],n&&"sizeddelim"===n.type&&n.delim===i&&(e.index+=1,e=go(e=fo(e,a),a));else{if("leftright"!==n.type||n.leftDelim!==t||"?"!==n.rightDelim&&n.rightDelim!==i)return;e.ast=wo(n.body,a),ho(e)&&(e.ast={group:e.ast}),e=go(e=fo(e,a),a)}return e.minPrec=r,e}{let o=!0;if("mopen"===n.type?(t=n.symbol,i=R[t]):"sizeddelim"===n.type?(t=n.delim,i=R[t]):"leftright"===n.type?(o=!1,t=n.leftDelim,"?"===(i=n.rightDelim)&&(i=R[t])):"textord"===n.type&&(t=n.symbol,i=R[t]),t&&i){if("|"===t&&"|"===i){const a=e.atoms[e.index+1];a&&"textord"===a.type&&"|"===a.symbol&&(t="\\lVert",i="\\rVert")}if(e=yo(e,t,i,a))return o&&(e.index+=1),e.ast={fn:Yn[t+i]||t+i,arg:[e.ast]},e.minPrec=r,e}}}function bo(e,t){return e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)&&t===to(e.atoms[e.index])+to(e.atoms[e.index+1])}function vo(e){if(e.index=e.index||0,!(e.atoms.length<=1||e.index>=e.atoms.length-1)){if(!co(e,"textord","\\nabla")){const t=e.atoms[e.index].symbol+e.atoms[e.index+1].symbol,i=/^(>=|<=|>>|<<|:=|!=)$/.test(t)?t:"";return i&&(e.index+=1),i}return e.index+=1,co(e,"mbin","\\times")?(e.index+=1,e.ast="curl",e):co(e,"mbin","\\cdot")?(e.index+=1,e.ast="div",e):void(e.index-=1)}}function xo(t,i){if(t.index=t.index||0,t.ast=void 0,0===t.atoms.length||t.index>=t.atoms.length)return t;t.minPrec=t.minPrec||0;let a=function t(i,a){if(i.index=i.index||0,i.ast=void 0,0===i.atoms.length||i.index>=i.atoms.length)return i;let r=i.atoms[i.index];if("text"===r.mode){let e="";for(;i.atoms[i.index]&&"text"===i.atoms[i.index].mode;)e+=i.atoms[i.index].body,i.index+=1;return i.ast={text:e},i}const n=Gn(to(r));if(vo(i))i.ast=mo(i.ast,t(i,a).ast);else{if("root"===r.type)return i.index=0,i.atoms=r.body,t(i,a);if("mbin"===r.type&&"-"===n)i.index+=1,(i=t(i,a)).ast=uo(i.ast);else if("mbin"===r.type&&"+"===n)i.index+=1,(i=t(i,a)).ast=mo("add",i.ast);else if("mord"===r.type&&/^[0-9.]$/.test(r.symbol)){let e="",n=!1,o=/^[0-9.eEdD]$/;for(;i.index0&&"\\"===d.charAt(0)&&"string"==typeof e.body&&(d=e.body)),l=Y(d,m,p).replace(/[\\]/g,"\\\\").replace(/["]/g,'\\"').replace(/[\b]/g,"\\b").replace(/[\f]/g,"\\f").replace(/[\n]/g,"\\n").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t"),l!==d?(c={sym:l},m="normal"):c={sym:d};break;case"minner":case"mop":break;case"box":c=wo(e.body,t);break;case"enclose":break;case"array":if("cardinality"===e.environmentName)c=mo("card",wo(e.array,t));else if(/array|matrix|pmatrix|bmatrix/.test(e.environmentName)){c={fn:"array",args:[]};for(const i of e.array)c.args.push(i.map(e=>wo(e,t)))}else if("cases"===e.environmentName){c={fn:"cases",args:[]};for(const i of e.array)if(i[0]){const e=[];e.push(wo(i[0],t));let a=wo(i[1],t);a&&"text"===a.fn&&a.arg&&/^(if|when|for)$/i.test(a.arg[0].trim())&&(a=a.arg.filter(e=>"string"!=typeof e)),e.push(null!=a?a:{}),c.args.push(e)}}break;case"spacing":case"space":case"mathstyle":break;default:c=void 0}return c&&m&&"normal"!==m&&(c.variant=m),c&&"string"==typeof e.cssClass&&(c.class=e.cssClass),c&&"string"==typeof e.cssId&&(c.id=e.cssId),c}function _o(t){if(!t)return[];let i;if(e(t)){i=[];for(const e of t){const t=_o(e);i=i.concat(t)}}else{if("spacing"===t.type||"first"===t.type)return[];"box"===t.type?i=_o(t.body):(t.body&&e(t.body)&&(t.body=_o(t.body)),t.superscript&&e(t.superscript)&&(t.superscript=_o(t.superscript)),t.subscript&&e(t.subscript)&&(t.subscript=_o(t.subscript)),t.index&&e(t.index)&&(t.index=_o(t.index)),t.denom&&e(t.denom)&&(t.denom=_o(t.denom)),t.numer&&e(t.numer)&&(t.numer=_o(t.numer)),t.array&&e(t.array)&&(t.array=t.array.map(e=>e.map(e=>_o(e)))),i=[t])}return i}function wo(e,t){return function(e,t){e.index=e.index||0,e.ast=void 0;const i=[];for(;e.atoms[e.index];)if("text"===e.atoms[e.index].mode){let t="";for(;e.atoms[e.index]&&"text"===e.atoms[e.index].mode;)t+=e.atoms[e.index].body,e.index+=1;i.push(mo("text",t))}else{const a=xo(e,t).ast;if(!a)return;i.push(a)}return i.length>1?mo("sequence",...i):i[0]||void 0}({atoms:_o(e)},t)}function Mo(e,t){return wo(e,t)}function So(e,...t){e=e||".. ";let i="";if(t.length>0){"."!==e[0]&&(i+=e[0]);let a="";for(const r of t)i+=a+r,a=e[2];"."!==e[1]&&(i+=e[1])}return i}function zo(e,t){const i=e.length;e=e.substr(0,t.precision-2);for(let i=0;i1&&(a+n.repeat(o+1)).startsWith(e))return"0"===n?a.replace(/(\d{3})/g,"$1"+t.groupSeparator):a.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.beginRepeatingDigits+n.replace(/(\d{3})/g,"$1"+t.groupSeparator)+t.endRepeatingDigits}}return i!==e.length&&(e+="\\ldots"),e.replace(/(\d{3})/g,"$1"+t.groupSeparator)}function Lo(e){return parseFloat(parseFloat(e).toPrecision(15))}function Ao(e,t){let i,a="";if("number"==typeof t.precision){if("number"!=typeof e){let i="",a="";if("-"===e[0]?(i="-",e=e.substr(1)):"+"===e[0]&&(e=e.substr(1)),e.indexOf(".")>=0){const r=e.match(/(\d*).(\d*)([e|E]([-+]?[0-9]*))?/),n=r[1],o=r[2].substring(0,Math.min(t.precision-n.length,r[2].length));if(a=r[4]||"","0"===n){let a=0;for(;"0"===o[a]&&a=t.precision)r="0",i="";else{r=e[a];const i=zo(e.substr(a+1),t);i&&(r+=t.decimalMarker+i)}"0"!==r&&(e.length-1>t.precision&&!r.endsWith("}")&&!r.endsWith("\\ldots")&&(r+="\\ldots"),a>4&&(r+=t.exponentProduct,t.exponentMarker?r+=t.exponentMarker+(1-a).toString():r+="10^{"+(1-a).toString()+"}")),e=r}else{e=n.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);const i=zo(o,t);i&&(e+=t.decimalMarker+i)}}else if(e.length>t.precision){const i=e.length;let a=e[0];const r=zo(e.substr(2),t);r&&(a+=t.decimalMarker+r,"}"!==a[a.length-1]&&(a+="\\ldots")),"1"!==a?a+=t.exponentProduct:a="",t.exponentMarker?a+=t.exponentMarker+(i-2).toString():a+="10^{"+(i-2).toString()+"}",e=a}else e=e.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator);return a&&(a=t.exponentMarker?t.exponentMarker+a:t.exponentProduct+" 10^{"+a+"}"),i+e+a}i=Lo(e)}if("engineering"===t.scientificNotation)if(0===i)a="0";else{const e=Math.abs(i);let r=Math.round(Math.log10(e));r-=r%3,e<1e3&&(r=0);const n=e/Math.pow(10,r);let o="";const s=n.toString().match(/^(.*)\.(.*)$/);(null==s?void 0:s[1])&&s[2]&&(o=s[1]+t.decimalMarker+s[2]),t.groupSeparator&&(o=zo(n.toExponential(),t));let l="";l=0===r?"":t.exponentMarker?t.exponentMarker+r:t.exponentProduct+" 10^{"+r+"}",a=(i<0?"-":"")+o+l}else{const i="string"==typeof e?e:e.toString();let r,n,o,s=i.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);r=i,o="",(null==s?void 0:s[1])&&s[2]&&(r=s[1],n=t.exponentMarker?t.exponentMarker+s[2]:t.exponentProduct+" 10^{"+s[2]+"}"),s=r.match(/^(.*)\.(.*)$/),(null==s?void 0:s[1])&&s[2]&&(r=s[1],o=s[2]),t.groupSeparator&&(r=r.replace(/\B(?=(\d{3})+(?!\d))/g,t.groupSeparator),o=zo(o,t)),o&&(o=t.decimalMarker+o),a=r+o+(n||"")}return a}class qo{constructor(e,t){this.stylesheets=[],this.config=Na({namespace:"",substituteTextArea:void 0,readOnly:!1,createHTML:e=>e,fontsDirectory:"./fonts",defaultMode:"math",macros:P,horizontalSpacingScale:1,letterShapeStyle:"auto",smartMode:!1,smartFence:!0,smartSuperscript:!0,scriptDepth:[1/0,1/0],removeExtraneousParentheses:!0,ignoreSpacebarInMathMode:!0,locale:ka.locale,strings:{},keybindings:ni,overrideDefaultInlineShortcuts:!1,inlineShortcuts:{},inlineShortcutTimeout:0,virtualKeyboardToggleGlyph:'',virtualKeyboardMode:"auto",virtualKeyboards:"all",virtualKeyboardLayout:"auto",customVirtualKeyboardLayers:{},customVirtualKeyboards:{},virtualKeyboardTheme:/android|cros/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?"material":"apple",keypressVibration:!0,keypressSound:null,plonkSound:null,textToSpeechRules:"mathlive",textToSpeechMarkup:"",textToSpeechRulesOptions:{},speechEngine:"local",speechEngineVoice:"Joanna",speechEngineRate:"100%",speakHook:Ta,readAloudHook:Ta,onAnnounce:Da,onKeystroke:()=>!0,onMoveOutOf:()=>!0,onTabOutOf:()=>!0,onBlur:Ta,onFocus:Ta,onContentWillChange:Ta,onContentDidChange:Ta,onSelectionWillChange:Ta,onSelectionDidChange:Ta,onUndoStateWillChange:Ta,onUndoStateDidChange:Ta,onModeChange:Ta,onVirtualKeyboardToggle:Ta,onReadAloudStatus:Ta,onError:()=>{}},t),this.element=e,e.mathfield=this,this.originalContent=e.innerHTML;let i=this.element.textContent;i&&(i=i.trim()),at(this.config.fontsDirectory,this.config.onError),this.stylesheets.push(rt(e,mr)),this.stylesheets.push(rt(e,'@-webkit-keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}@keyframes ML__caret-blink{0%,to{opacity:1}50%{opacity:0}}.ML__caret:after{content:"";border:none;border-radius:2px;border-right:2px solid var(--caret);margin-right:-2px;position:relative;left:-1px;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__text-caret:after{content:"";border:none;border-radius:1px;border-right:1px solid var(--caret);margin-right:-1px;position:relative;left:0;-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__command-caret:after{content:"_";border:none;margin-right:-1ex;position:relative;color:var(--caret);-webkit-animation:ML__caret-blink 1.05s step-end infinite forwards;animation:ML__caret-blink 1.05s step-end infinite forwards}.ML__fieldcontainer{display:flex;flex-flow:row;justify-content:space-between;align-items:flex-end;min-height:39px;touch-action:none;width:100%;--hue:212;--highlight:hsl(var(--hue),97%,85%);--caret:hsl(var(--hue),40%,49%);--highlight-inactive:#ccc;--primary:hsl(var(--hue),40%,50%);--secondary:hsl(var(--hue),19%,26%);--on-secondary:hsl(var(--hue),19%,26%)}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}}body[theme=dark] .ML__fieldcontainer{--highlight:hsl(var(--hue),40%,49%);--highlight-inactive:hsl(var(--hue),10%,35%);--caret:hsl(var(--hue),97%,85%);--secondary:hsl(var(--hue),25%,35%);--on-secondary:#fafafa}.ML__fieldcontainer:focus{outline:2px solid var(--primary);outline-offset:3px}.ML__fieldcontainer__field{align-self:center;position:relative;overflow:hidden;line-height:0;padding:2px;width:100%}.ML__virtual-keyboard-toggle{display:flex;align-self:center;align-items:center;flex-shrink:0;flex-direction:column;justify-content:center;width:34px;height:34px;padding:0;margin-right:4px;cursor:pointer;box-sizing:border-box;border-radius:50%;border:1px solid transparent;transition:background .2s cubic-bezier(.64,.09,.08,1);color:var(--primary);fill:currentColor;background:transparent}.ML__virtual-keyboard-toggle:hover{background:hsl(var(--hue),25%,35%);color:#fafafa;fill:currentColor;border-radius:50%;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2)}.ML__popover{visibility:hidden;min-width:160px;background-color:rgba(97,97,97,.95);color:#fff;text-align:center;border-radius:6px;position:fixed;z-index:1;display:flex;flex-direction:column;justify-content:center;box-shadow:0 14px 28px rgba(0,0,0,.25),0 10px 10px rgba(0,0,0,.22);transition:all .2s cubic-bezier(.64,.09,.08,1)}.ML__popover:after{content:"";position:absolute;top:-5px;left:calc(50% - 3px);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;font-size:1rem;border-bottom:5px solid rgba(97,97,97,.9)}.ML__popover--reverse-direction:after{top:auto;bottom:-5px;border-top:5px solid rgba(97,97,97,.9);border-bottom:0}.ML__textarea__textarea{transform:scale(0);resize:none;position:absolute;clip:rect(0 0 0 0);width:1px;height:1px;font-size:16px}.ML__focused .ML__text{background:hsla(var(--hue),40%,50%,.1)}.ML__smart-fence__close{opacity:.5}.ML__selection{background:var(--highlight-inactive);box-sizing:border-box}.ML__focused .ML__selection{background:var(--highlight)!important;color:var(--on-highlight)}.ML__contains-caret.ML__close,.ML__contains-caret.ML__open,.ML__contains-caret>.ML__close,.ML__contains-caret>.ML__open,.sqrt.ML__contains-caret>.sqrt-sign,.sqrt.ML__contains-caret>.vlist>span>.sqrt-line{color:var(--caret)}.ML__command{font-family:IBM Plex Mono,Source Code Pro,Consolas,Roboto Mono,Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Courier,monospace;letter-spacing:-1px;font-weight:400;line-height:1em;color:var(--primary)}:not(.ML__command)+.ML__command{margin-left:.25em}.ML__command+:not(.ML__command){padding-left:.25em}.ML__suggestion{opacity:.5}.ML__virtual-keyboard-toggle.pressed{background:hsla(0,0%,70%,.5)}.ML__virtual-keyboard-toggle:focus{outline:none;border-radius:50%;border:2px solid var(--primary)}.ML__virtual-keyboard-toggle.active,.ML__virtual-keyboard-toggle.active:hover{background:hsla(0,0%,70%,.5);color:#000;fill:currentColor}.ML__scroller{position:fixed;z-index:1;top:0;height:100vh;width:200px}[data-ML__tooltip]{position:relative}[data-ML__tooltip][data-placement=top]:after{top:inherit;bottom:100%}[data-ML__tooltip]:after{position:absolute;visibility:hidden;content:attr(data-ML__tooltip);display:inline-table;top:110%;width:-webkit-max-content;width:-moz-max-content;width:max-content;max-width:200px;padding:8px;background:#616161;color:#fff;text-align:center;z-index:2;box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);border-radius:2px;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-weight:400;font-size:12px;opacity:0;transform:scale(.5);transition:all .15s cubic-bezier(.4,0,1,1)}@media only screen and (max-width:767px){[data-ML__tooltip]:after{height:32px;padding:4px 16px;font-size:14px}}[data-ML__tooltip]:hover{position:relative}[data-ML__tooltip]:hover:after{visibility:visible;opacity:1;transform:scale(1)}[data-ML__tooltip][data-delay]:after{transition-delay:0s}[data-ML__tooltip][data-delay]:hover:after{transition-delay:1s}'));let a="";this.config.substituteTextArea?"string"==typeof this.config.substituteTextArea?a+=this.config.substituteTextArea:a+="":/android|ipad|ipod|iphone/i.test(null===navigator||void 0===navigator?void 0:navigator.userAgent)?a+="\n \n \n ":a+='',a+='',"manual"===this.config.virtualKeyboardMode?(a+=`
    `,this.config.virtualKeyboardToggleGlyph?a+=this.config.virtualKeyboardToggleGlyph:a+='',a+="
    "):a+="",a+="
    ",a+='\n
    \n \n \n
    \n ',this.element.innerHTML=this.config.createHTML(a);let r=0;"function"==typeof this.config.substituteTextArea?this.textarea=this.config.substituteTextArea():this.textarea=this.element.children[r++].firstElementChild,this.field=this.element.children[r].children[0],this.field.addEventListener("wheel",e=>{e.preventDefault(),e.stopPropagation();const t=void 0===e.deltaX?e.detail:-e.deltaX;isFinite(t)&&this.field.scroll({top:0,left:this.field.scrollLeft-5*t})},{passive:!1}),this.virtualKeyboardToggleDOMNode=this.element.children[r++].children[1],bi(this,this.virtualKeyboardToggleDOMNode,{default:"toggleVirtualKeyboard",alt:"toggleVirtualKeyboardAlt",shift:"toggleVirtualKeyboardShift"}),this.ariaLiveText=this.element.children[r].children[0],this.accessibleNode=this.element.children[r++].children[1],this.popover=ui("mathlive-popover-panel","ML__popover"),this.stylesheets.push(rt(e,"div.ML__popover.is-visible{visibility:inherit;-webkit-animation:ML__fade-in .15s cubic-bezier(0,0,.2,1);animation:ML__fade-in .15s cubic-bezier(0,0,.2,1)}@-webkit-keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}@keyframes ML__fade-in{0%{opacity:0}to{opacity:1}}.ML__popover__content{border-radius:6px;padding:2px;cursor:pointer;min-height:100px;display:flex;flex-direction:column;justify-content:center;margin-left:8px;margin-right:8px}.ML__popover__content a{color:#5ea6fd;padding-top:.3em;margin-top:.4em;display:block}.ML__popover__content a:hover{color:#5ea6fd;text-decoration:underline}.ML__popover__content.active,.ML__popover__content.pressed,.ML__popover__content:hover{background:hsla(0,0%,100%,.1)}.ML__popover__command{font-size:1.6rem}.ML__popover__prev-shortcut{height:31px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:4px;padding-bottom:2px}.ML__popover__next-shortcut:hover,.ML__popover__prev-shortcut:hover{opacity:.3}.ML__popover__next-shortcut.active,.ML__popover__next-shortcut.pressed,.ML__popover__prev-shortcut.active,.ML__popover__prev-shortcut.pressed{opacity:1}.ML__popover__next-shortcut>span,.ML__popover__prev-shortcut>span{padding:5px;border-radius:50%;width:20px;height:20px;display:inline-block}.ML__popover__prev-shortcut>span>span{margin-top:-2px;display:block}.ML__popover__next-shortcut>span>span{margin-top:2px;display:block}.ML__popover__next-shortcut:hover>span,.ML__popover__prev-shortcut:hover>span{background:hsla(0,0%,100%,.1)}.ML__popover__next-shortcut{height:34px;opacity:.1;cursor:pointer;margin-left:8px;margin-right:8px;padding-top:2px;padding-bottom:4px}.ML__popover__shortcut{font-size:.8em;margin-top:.25em}.ML__popover__note,.ML__popover__shortcut{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;opacity:.7;padding-top:.25em}.ML__popover__note{font-size:.8rem;line-height:1em;padding-left:.5em;padding-right:.5em}.ML__shortcut-join{opacity:.5}")),this.keystrokeCaption=ui("mathlive-keystroke-caption-panel","ML__keystroke-caption"),this.stylesheets.push(rt(e,".ML__keystroke-caption{visibility:hidden;background:var(--secondary);border-color:var(--secondary-border);box-shadow:0 3px 6px rgba(0,0,0,.16),0 3px 6px rgba(0,0,0,.23);text-align:center;border-radius:6px;padding:16px;position:absolute;z-index:1;display:flex;flex-direction:row;justify-content:center;--keystroke:#fff;--on-keystroke:#555;--keystroke-border:#f7f7f7}@media (prefers-color-scheme:dark){body:not([theme=light]) .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}}body[theme=dark] .ML__keystroke-caption{--keystroke:hsl(var(--hue),50%,30%);--on-keystroke:#fafafa;--keystroke-border:hsl(var(--hue),50%,25%)}.ML__keystroke-caption>span{min-width:14px;margin:0 8px 0 0;padding:4px;background-color:var(--keystroke);color:var(--on-keystroke);fill:currentColor;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:1em;border-radius:6px;border:2px solid var(--keystroke-border)}")),this.keystrokeCaptionVisible=!1,this.virtualKeyboardVisible=!1,this.keystrokeBuffer="",this.keystrokeBufferStates=[],this.keystrokeBufferResetTimer=null,this.suggestionIndex=0,this.mode=this.config.defaultMode,this.smartModeSuppressed=!1,this.style={},this.blurred=!0,mi(this.element,"focus",this),mi(this.element,"blur",this),mi(this.textarea,"cut",this),mi(this.textarea,"copy",this),mi(this.textarea,"paste",this),function(e,t){let i,a=null,r=null,n=!1,o=!1;function s(e){clearTimeout(i),i=setTimeout((function(){clearTimeout(i),e()}))}function l(){if(function(e){return e.selectionStart!==e.selectionEnd}(e))return;const i=e.value;e.value="",i.length>0&&t.typedText(i)}const c=e;c.addEventListener("keydown",i=>{if(t.allowDeadKey()||"Dead"!==i.key&&"Unidentified"!==i.key&&229!==i.keyCode)o=!1;else{o=!0,n=!1;const i=t.blur,a=t.focus;t.blur=null,t.focus=null,"function"==typeof e.blur&&(e.blur(),e.focus()),t.blur=i,t.focus=a}return!(!n&&"CapsLock"!==i.code&&!/(Control|Meta|Alt|Shift)(Right|Left)/.test(i.code))||(a=i,r=null,t.keystroke(fa(i),i))},!0),c.addEventListener("keypress",e=>{n||(a&&r&&t.keystroke(fa(a),a),r=e,s(l))},!0),c.addEventListener("keyup",()=>{n||!a||r||l()},!0),c.addEventListener("paste",()=>{e.focus();const i=e.value;e.value="",i.length>0&&t.paste(i)},!0),c.addEventListener("blur",()=>{a=null,r=null,t.blur&&t.blur()},!0),c.addEventListener("focus",()=>{t.focus&&t.focus()},!0),c.addEventListener("compositionstart",()=>{n=!0},!0),c.addEventListener("compositionend",()=>{n=!1,o&&t.allowDeadKey()&&s(l)},!0),c.addEventListener("input",()=>{if(o){const i=t.blur,a=t.focus;t.blur=null,t.focus=null,e.blur(),e.focus(),t.blur=i,t.focus=a,o=!1,n=!1,t.allowDeadKey()&&s(l)}else n||s(l)})}(this.textarea,{allowDeadKey:()=>"text"===this.mode,typedText:e=>Ia(this,e),paste:()=>Va(this),keystroke:(e,t)=>Ra(this,e,t),focus:()=>this._onFocus(),blur:()=>this._onBlur()}),window.PointerEvent?mi(this.field,"pointerdown",this):mi(this.field,"touchstart:active mousedown",this),mi(window,"resize",this),this.model=new yt({mode:this.config.defaultMode,macros:this.config.macros,removeExtraneousParentheses:this.config.removeExtraneousParentheses},{onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError},{announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)},this),this.undoManager=new ya(this.model),ca(this.model,i,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:!0,macros:this.config.macros}),this.undoManager.startRecording(),this.undoManager.snapshot(this.config),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ri().locale)||ai(this.config.locale),this.keybindings=di(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),Wi(this)}$setConfig(e){this.config=Na(this.config,e),this.model.setListeners({onContentDidChange:e=>this.config.onContentDidChange(this),onSelectionDidChange:e=>this._onSelectionDidChange(),onContentWillChange:()=>this.config.onContentWillChange(this),onSelectionWillChange:()=>this.config.onSelectionWillChange(this),onError:this.config.onError}),this.model.setHooks({announce:(e,t,i,a)=>{var r,n;return null===(n=(r=this.config).onAnnounce)||void 0===n?void 0:n.call(r,this,t,i,a)},moveOut:(e,t)=>this.config.onMoveOutOf(this,t),tabOut:(e,t)=>this.config.onTabOutOf(this,t)}),this.config.locale.startsWith(ri().locale)||ai(this.config.locale),this.keybindings=di(this.config.keybindings,e=>{"function"==typeof this.config.onError&&this.config.onError({code:"invalid-keybinding",arg:e.join("\n")})}),this.config.readOnly||this._onBlur(),Wi(this)}getConfig(e){return Oa(this.config,e)}handleEvent(e){switch(e.type){case"focus":this._onFocus();break;case"blur":this._onBlur();break;case"touchstart":case"mousedown":case"pointerdown":!function(e,t){const i=e;let a,r=!1,n=!1,o=!1;if(1!==t.buttons&&0!==t.buttons)return;let s=!1,l=!1;const c=t.touches?t.touches[0].clientX:t.clientX,d=t.touches?t.touches[0].clientY:t.clientY,m=Date.now(),p=setInterval(()=>{s?i.field.scroll({top:0,left:i.field.scrollLeft-16}):l&&i.field.scroll({top:0,left:i.field.scrollLeft+16})},32);function u(e){window.PointerEvent?(pi(i.field,"pointermove",h),pi(i.field,"pointerup pointercancel",u),i.field.releasePointerCapture(e.pointerId)):(pi(i.field,"touchmove",h),pi(i.field,"touchcancel touchend",u),pi(window,"mousemove",h),pi(window,"mouseup blur",u)),r=!1,clearInterval(p),i.element.querySelectorAll(".ML__scroller").forEach(e=>e.parentNode.removeChild(e)),e.preventDefault(),e.stopPropagation()}function h(t){const r=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,p="touch"===t.pointerType?20:5;if(Date.now()u.right,s=r=f.left&&c<=f.right&&d>=f.top&&d<=f.bottom){e.$hasFocus()||(o=!0,e.textarea.focus&&e.textarea.focus()),e.resetKeystrokeBuffer(),e.smartModeSuppressed=!1;const s=e.field.querySelector(".ML__mathlive").getBoundingClientRect();if(a=c>s.right?[{relation:"body",offset:e.model.root.body.length-1}]:Ga(e,c,d,{bias:0}),a){let s=document.createElement("div");s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.left-200+"px",s=document.createElement("div"),s.className="ML__scroller",e.element.appendChild(s),s.style.left=f.right+"px",t.shiftKey?(Vt(e.model,e.model.path,a),a=mt(e.model.path),a[a.length-1].offset-=1):Ut(e.model,a,0),o=!0,e.style={},3===t.detail||ja>2?(u(t),3!==t.detail&&3!==ja||Bt(e.model)):r||(r=!0,window.PointerEvent?(mi(i.field,"pointermove",h),mi(i.field,"pointerup pointercancel",u),i.field.setPointerCapture(t.pointerId)):(mi(window,"blur",u),t.touches?(mi(t.target,"touchmove",h),mi(t.target,"touchcancel touchend",u)):(mi(window,"mousemove",h),mi(window,"mouseup",u))),2!==t.detail&&2!==ja||(n=!0,Ot(e.model)))}}else Ua=null;o&&Wi(e),t.preventDefault()}(this,e);break;case"resize":this.resizeTimer&&window.cancelAnimationFrame(this.resizeTimer),this.resizeTimer=window.requestAnimationFrame(()=>fi(this)&&this._onResize());break;case"cut":t=this,setTimeout(function(){t.$clearSelection(),Wi(t)}.bind(t),0);break;case"copy":!function(e,t){Ft(e.model)?(t.clipboardData.setData("text/plain","$$"+e.$text("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$text("json")),t.clipboardData.setData("application/xml",e.$text("mathML"))):(t.clipboardData.setData("text/plain","$$"+e.$selectedText("latex-expanded")+"$$"),t.clipboardData.setData("application/json",e.$selectedText("json")),t.clipboardData.setData("application/xml",e.$selectedText("mathML"))),t.preventDefault()}(this,e);break;case"paste":Va(this)}var t}$revertToOriginalContent(){this.element.innerHTML=this.config.createHTML(this.originalContent),delete this.element.mathfield,delete this.accessibleNode,delete this.ariaLiveText,delete this.field,pi(this.textarea,"cut",this),pi(this.textarea,"copy",this),pi(this.textarea,"paste",this),this.textarea.remove(),delete this.textarea,this.virtualKeyboardToggleDOMNode.remove(),delete this.virtualKeyboardToggleDOMNode,hi(this.popover),delete this.popover,hi(this.keystrokeCaption),delete this.keystrokeCaption,hi(this.virtualKeyboard),delete this.virtualKeyboard,hi(document.getElementById("mathlive-alternate-keys-panel")),pi(this.element,"pointerdown",this),pi(this.element,"touchstart:active mousedown",this),pi(this.element,"focus",this),pi(this.element,"blur",this),pi(window,"resize",this),delete this.element,this.stylesheets.forEach(e=>e.release())}resetKeystrokeBuffer(){this.keystrokeBuffer="",this.keystrokeBufferStates=[],clearTimeout(this.keystrokeBufferResetTimer)}_onSelectionDidChange(){!function(e){const t=wt(e);if(t){const i=e.siblings(),a=e.anchorOffset()+1;for(let e=t.start;e=0;e--)"command"===i[e].type?i.splice(e,1):t(i[e]);else if(t(i.body),t(i.superscript),t(i.subscript),t(i.underscript),t(i.overscript),t(i.numer),t(i.denom),t(i.index),i.array)for(let e=ft(i.array);e>=0;e--)t(ht(i.array,e))}(t.root.body),t.suppressChangeNotifications=i,kt(t)}(this.model))}ki(this,{deferred:!0}),"function"==typeof this.config.onSelectionDidChange&&this.config.onSelectionDidChange(this)}_onFocus(){this.config.readOnly||this.blurred&&(this.blurred=!1,this.textarea.focus&&this.textarea.focus(),"onfocus"===this.config.virtualKeyboardMode&&lr(this),ki(this),this.config.onFocus&&this.config.onFocus(this),Wi(this))}_onBlur(){this.blurred||(this.blurred=!0,this.ariaLiveText.textContent="","onfocus"===this.config.virtualKeyboardMode&&cr(this),Ma(this,{discard:!0}),Wi(this),this.config.onBlur&&this.config.onBlur(this))}_onResize(){this.element.classList.remove("ML__isNarrowWidth","ML__isWideWidth","ML__isExtendedWidth"),window.innerWidth>=1024?this.element.classList.add("ML__isExtendedWidth"):window.innerWidth>=768?this.element.classList.add("ML__isWideWidth"):this.element.classList.add("ML__isNarrowWidth"),ki(this)}$perform(t){return function(t,i){var a;if(!i)return!1;let r,n=[],o=!1,s=!1;if(e(i)?(r=i[0],n=i.slice(1)):r=i,r=r.replace(/-\w/g,e=>e[1].toUpperCase()),"model"===(null===(a=Ui[r])||void 0===a?void 0:a.target)){if(/^(delete|transpose|add)/.test(r)&&t.resetKeystrokeBuffer(),/^(delete|transpose|add)/.test(r)&&"command"!==t.mode&&(t.popUndoStack(),t.snapshot()),Ui[r].fn(t.model,...n),/^(delete|transpose|add)/.test(r)&&"command"!==t.mode&&t.snapshot(),/^(delete)/.test(r)&&"command"===t.mode){const e=re(Mi(t.model));0===e.length?wi(t):xi(t,e[0].match,e.length>1)}s=!0,o=!0}else{if(!Ui[r])throw Error('Unknown command "'+r+'"');s=Ui[r].fn(t,...n),o=!0}return Ft(t.model)&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(r)||(t.resetKeystrokeBuffer(),t.style={}),s&&Wi(t),o}(this,t)}formatMathlist(e,t){let i="";if("latex"===(t=t||"latex")||"latex-expanded"===t)i=e.toLatex("latex-expanded"===t);else if("mathML"===t)i=Ii(e,this.config);else if("spoken"===t)i=qa(e,this.config);else if("spoken-text"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="",i=qa(e,this.config),this.config.textToSpeechMarkup=t}else if("spoken-ssml"===t||"spoken-ssml-withHighlighting"===t){const t=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup="ssml",i=qa(e,this.config),this.config.textToSpeechMarkup=t}else if("mathjson"===t){const t=Fn(e.toLatex(!0),{form:"canonical"});i=JSON.stringify(t)}else if("json"===t){const t=Mo(e);i=JSON.stringify(t)}else if("json-2"===t){const t=Mo(e);i=JSON.stringify(t,null,2)}else"ASCIIMath"===t&&(i=xa(e));return i}$text(e){return this.formatMathlist(this.model.root,e)}$selectedText(e){const t=Nt(this.model);if(!t)return"";const i=Be("math",t);return this.formatMathlist(i,e)}$selectionIsCollapsed(){return Ft(this.model)}$selectionDepth(){return this.model.path.length}$selectionAtStart(){return 0===this.model.startOffset()}$selectionAtEnd(){return this.model.endOffset()>=this.model.siblings().length-1}groupIsSelected(){return 0===this.model.startOffset()&&this.model.endOffset()>=this.model.siblings().length-1}$latex(e,t){return"string"==typeof e?(e!==this.model.root.toLatex()&&(t=null!=t?t:{mode:"math"},ca(this.model,e,{insertionMode:"replaceAll",selectionMode:"after",format:"latex",mode:"math",suppressChangeNotifications:t.suppressChangeNotifications,macros:this.config.macros}),this.undoManager.snapshot(this.config),Wi(this)),e):this.model.root.toLatex()}$el(){return this.element}scrollIntoView(){var e;this.dirty&&Vi(this);let t=null===(e=gi(this.field))||void 0===e?void 0:e.x;const i=this.field.getBoundingClientRect();if(void 0===t){const e=yi(this.field);null!==e&&(t=e.right+i.left-this.field.scrollLeft)}if(void 0!==t){const e=t-window.scrollX;ei.right&&this.field.scroll({top:0,left:e-i.right+this.field.scrollLeft+20,behavior:"smooth"})}}$insert(e,t){if("string"==typeof e&&e.length>0){if((t=null!=t?t:{mode:"math"}).focus&&this.$focus(),t.feedback&&(this.config.keypressVibration&&(null===navigator||void 0===navigator?void 0:navigator.vibrate)&&navigator.vibrate(3),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play())),"\\\\"===e)Yi(this.model);else if("&"===e)Qi(this.model);else{const i=this.style;ca(this.model,e,{mode:this.mode,style:St(this.model),...t}),t.resetStyle&&(this.style=i)}return this.undoManager.snapshot(this.config),Wi(this),!0}return!1}switchMode(e,t="",i=""){this.resetKeystrokeBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(e),t&&this.$insert(t,{format:"latex",mode:{math:"text",text:"math"}[e]}),Si(this.model,!1),"command"===e?(ot(this.model),wi(this),this.suggestionIndex=0,this.virtualKeyboardVisible&&sr(this,"lower-command"),ca(this.model,"",{mode:"math"})):this.mode=e,i&&this.$insert(i,{format:"latex",mode:e}),"function"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),Wi(this)}$hasFocus(){return document.hasFocus()&&function e(t=document){var i,a;return(null===(a=null===(i=t.activeElement)||void 0===i?void 0:i.shadowRoot)||void 0===a?void 0:a.activeElement)?e(t.activeElement.shadowRoot):t.activeElement}(document)===this.textarea}$focus(){this.$hasFocus()||("function"==typeof this.textarea.focus&&this.textarea.focus(),this.model.announce("line"))}$blur(){this.$hasFocus()&&this.textarea.blur&&this.textarea.blur()}$select(){Bt(this.model)}$clearSelection(){ea(this.model)}$applyStyle(e){la(this.model,e)}$keystroke(e,t){return Ra(this,e,t)}$typedText(e){Ia(this,e)}canUndo(){return this.undoManager.canUndo()}canRedo(){return this.undoManager.canRedo()}popUndoStack(){this.undoManager.pop()}snapshot(){this.undoManager.snapshot({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}snapshotAndCoalesce(){this.undoManager.snapshotAndCoalesce({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}getUndoRecord(){return this.undoManager.save()}restoreToUndoRecord(e){this.undoManager.restore(e,{...this.config,suppressChangeNotifications:!0})}undo(){return this.undoManager.undo({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}redo(){return this.undoManager.redo({...this.config,onUndoStateDidChange:(e,t)=>{or(this),this.config.onUndoStateDidChange(e,t)}})}}function $o(e,t,i){let a=i,r=0;const n=e.length;for(;a0&&r.push({type:"text",data:o.slice(0,c)}),l=!1);let d=!1;for(;!d;){if(l){if(s=o.indexOf(t,c),-1===s){d=!0;break}c!==s&&r.push({type:"text",data:o.slice(c,s)}),c=s}else{if(s=$o(i,o,c+t.length),-1===s){d=!0;break}r.push({type:"math",data:o.slice(c+t.length,s),rawData:o.slice(c,s+i.length),mathstyle:a}),c=s+i.length}l=!l}c";i.innerHTML=t.createHTML?t.createHTML(a):a}catch(t){i.textContent=e}return i.className="ML__sr-only",i}(e,i)),/\bspeakable-text\b/i.test(i.renderAccessibleContent)&&i.renderToSpeakableText){const a=document.createElement("span"),r=i.renderToSpeakableText(e,i);a.innerHTML=i.createHTML?i.createHTML(r):r,a.className="ML__sr-only",t.appendChild(a)}return t.appendChild(r),t}return r}function Eo(e,t){let i=null;if(t.TeX.processEnvironments&&/^\s*\\begin/.test(e))i=document.createDocumentFragment(),i.appendChild(To(e,void 0,t,!0));else{if(!e.trim())return null;const a=Do(e,t.TeX.delimiters);if(1===a.length&&"text"===a[0].type)return null;i=document.createDocumentFragment();for(let e=0;e0?No(e[t].children,i):e[t];if("string"==typeof t){for(let r=0;r0?No(e[r].children,i):e[r];if(a=No(e[r].children,t),a)return a}return a}return null}function Oo(e,t){var i;const a=No(e,t);return a?null!==(i=a.classes)&&void 0!==i?i:"":null}function Bo(e,t){let i="";return e[t]&&(i+=''+t+"=",i+='',i+=e[t],i+='" '),i}var Fo={mathlistToMarkup:function e(t,i=""){if(!t)return"";let a="";if(Array.isArray(t))for(let r=0;r"),"string"==typeof t.body&&t.body.length>0&&(a+=' ',a+=t.body,(t.body.charCodeAt(0)<32||t.body.charCodeAt(0)>127)&&(a+=" U+"+("000000"+t.body.charCodeAt(0).toString(16)).substr(-6)),a+=" "),"mathrm"===t.fontFamily?(a+='',a+=Bo(t,"fontFamily"),a+=""):a+=Bo(t,"fontFamily"),a+=Bo(t,"hasBarLine"),a+=Bo(t,"leftDelim"),a+=Bo(t,"rightDelim"),a+=Bo(t,"continuousFraction"),a+=Bo(t,"limits"),a+=Bo(t,"symbol"),a+=function(e,t){let i="";return e.framecolor&&(i+='framecolor=',i+='',i+='',i+=e.framecolor,i+=""),i}(t),a+=Bo(t,"mathstyle"),a+=Bo(t,"size"),a+=Bo(t,"cls"),a+=Bo(t,"delim"),a+=Bo(t,"shift"),a+=Bo(t,"width"),a+=Bo(t,"height"),a+=Bo(t,"position"),a+=e(t.overscript,i+"↑"),a+=e(t.underscript,i+"↓"),a+=e(t.superscript,i+"↑"),a+=e(t.subscript,i+"↓"),a+=e(t.body,i+"▶"),a+=e(t.numer,i+"▲"),a+=e(t.denom,i+"▼"),t.array)for(let r=0;r"+i+"⌗ row "+(r+1)+"/"+t.array.length;for(let n=0;n"),t.body&&t.body.length>0&&(a+=''+t.body+""),t.classes&&t.classes.length>0&&(a+=' '+t.classes+""),t.isTight&&(a+='  tight '),t.caret&&(a+='  caret '),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=' '+e+":",a+=' '+t.style[e]+"; ");t.children&&(a+=t.children.map(t=>e(t,i+"▷")).join("; "))}return a},spanToString:function e(t,i=""){let a="";if(Array.isArray(t))if(0===t.length)a+="[]\n";else{a+="[\n";for(let r=0;r0&&(a+=i+'body:"'+t.body+'",\n'),t.classes&&t.classes.length>0&&(a+=i+'classes:"'+t.classes+'",\n'),t.style)for(const e in t.style)Object.prototype.hasOwnProperty.call(t.style,e)&&(a+=i+e+':"',a+=t.style[e]+'",\n');t.children&&t.children.length>0&&(a+=i+"children:"+t.children.map(t=>e(t,i)).join("; ")),a+=i+"}"}return a},hasClass:function(e,t,i){const a=Oo(e,t);if(!a)return!1;const r=a.split(" ");for(let e=0;e{if(e)return;if(!t||!t.AudioStream)return;const i=new TextDecoder("utf-8").decode(new Uint8Array(t.AudioStream));window.mathlive.readAloudMarks=i.split("\n").map(e=>e?JSON.parse(e):{}),window.mathlive.readAloudTokens=[];for(const e of window.mathlive.readAloudMarks)e.value&&window.mathlive.readAloudTokens.push(e.value);window.mathlive.readAloudCurrentMark="",n.OutputFormat="mp3",n.SpeechMarkTypes=[],r.synthesizeSpeech(n,(function(e,t){if(e)return;if(!t||!t.AudioStream)return;const i=new Uint8Array(t.AudioStream),a=new Blob([i.buffer],{type:"audio/mpeg"}),r=URL.createObjectURL(a);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener("ended",()=>{const e=window.mathlive.readAloudMathField;o&&o(e,"ended"),e?(Vi(e),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=""):function e(t){if(t.classList.remove("ML__highlight"),t.children)for(const i of t.children)e(i)}(window.mathlive.readAloudElement)}),window.mathlive.readAloudAudio.addEventListener("timeupdate",()=>{let e="";const t=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.time0&&Array.from(t.children).forEach(t=>{e(t,i)})):(t.classList.add("ML__highlight"),t.children&&t.children.length>0&&Array.from(t.children).forEach(t=>{e(t)}))}(window.mathlive.readAloudElement,window.mathlive.readAloudCurrentMark)))})),window.mathlive.readAloudAudio.src=r,o&&o(window.mathlive.readAloudMathField,"playing"),window.mathlive.readAloudAudio.play()}))})}function Ro(e,t,i=3e3,a="$0"){t.forEach(t=>{N[t]&&(N[t].frequency=i,N[t].category=e,N[t].template=a.replace(/\$0/g,t)),B[t]&&(B[t]={...B[t],frequency:i,category:e,template:a.replace(/\$0/g,t)})})}function Io(e,t){var i;(t=null!=t?t:{}).mathstyle=t.mathstyle||"displaystyle",t.letterShapeStyle=t.letterShapeStyle||"auto",t.macros={...P,...null!==(i=t.macros)&&void 0!==i?i:{}};const a=Je(e,"math",null,t.macros,!1,t.onError);let r=Ne({mathstyle:c[t.mathstyle],letterShapeStyle:t.letterShapeStyle},a);return r=function e(t){if(!t||0===t.length)return[];t[0].children=e(t[0].children);const i=[t[0]];for(let a=1;a{},...null!=t?t:{}}).emit(e)}(e,t)}function Uo(e,t){var i;return(t=null!=t?t:{}).macros=null!==(i=t.macros)&&void 0!==i?i:{},Object.assign(t.macros,P),qa(Je(e,"math",null,t.macros,!1,t.onError),t)}function jo(e){if("string"==typeof e){const t=document.getElementById(e);if(null===t)throw Error(`The element with ID "${e}" could not be found.`);return t}return e}function Go(e,t){var i,a,r,n;(t=null!=t?t:{}).renderToMarkup=null!==(i=t.renderToMarkup)&&void 0!==i?i:Io,t.renderToMathML=null!==(a=t.renderToMathML)&&void 0!==a?a:Ho,t.renderToSpeakableText=null!==(r=t.renderToSpeakableText)&&void 0!==r?r:Uo,t.macros=null!==(n=t.macros)&&void 0!==n?n:P,function(e,t){try{if((t={...Ko,...t}).ignoreClassPattern=new RegExp(t.ignoreClass),t.processClassPattern=new RegExp(t.processClass),t.processScriptTypePattern=new RegExp(t.processScriptType),t.macros=P,t.namespace){if(!/^[a-z]+[-]?$/.test(t.namespace))throw Error("options.namespace must be a string of lowercase characters only");/-$/.test(t.namespace)||(t.namespace+="-")}!function e(t,i){const a=t.getAttribute("data-"+i.namespace+"original-content");if(a){const e=To(a,t.getAttribute("data-"+i.namespace+"mathstyle"),i,!1);null!=e&&(t.textContent="",t.appendChild(e))}else{if(1===t.childNodes.length&&3===t.childNodes[0].nodeType){const e=t.childNodes[0].textContent;if(i.TeX.processEnvironments&&/^\s*\\begin/.test(e))return t.textContent="",void t.appendChild(To(e,void 0,i,!0));const a=Do(e,i.TeX.delimiters);if(1===a.length&&"math"===a[0].type)return t.textContent="",void t.appendChild(To(a[0].data,a[0].mathstyle,i,!0));if(1===a.length&&"text"===a[0].type)return}for(let a=0;a0\\right\\}"),Ro("Layout",["\\overset","\\underset","\\stackrel","\\stackbin"],1200,"$0{arg}{x=0}"),Ro("Layout",["\\rlap","\\mathrlap"],1200,"$0{/}0"),Ro("Layout",["\\llap","\\mathllap"],1200,"o$0{/}"),Ro("Fractions",["\\frac"],4e3,"$0{\\placeholder{}}{\\placeholder{}}"),Ro("Fractions",["\\binom","\\dfrac","\\tfrac","\\dbinom","\\tbinom","\\pdiff","\\cfrac"],1200,"$0{\\placeholder{}}{\\placeholder{}}"),Ro("Fractions",["\\over","\\atop","\\choose"],1200,'\\unicode{"2B1A} $0 \\unicode{"2B1A}'),Ro("Fractions",["\\overwithdelims","\\atopwithdelims"],1200,'{\\unicode{"2B1A} $0{\\lbrace}{\\rbrace} \\unicode{"2B1A}}'),Ro("Extensible Operators",["\\sum","\\prod","\\bigcap","\\bigcup","\\int"],4e3),Ro("Extensible Operators",["\\bigoplus","\\smallint","\\iint","\\oint"],3e3),Ro("Extensible Operators",["\\bigwedge","\\bigvee","\\coprod","\\bigsqcup","\\bigotimes","\\bigodot","\\biguplus","\\intop","\\sqcup","\\sqcap","\\uplus","\\wr","\\Cap","\\Cup","\\doublecap","\\doublecup","\\amalg","\\iiint","\\oiint","\\oiiint","\\intclockwise","\\varointclockwise","\\ointctrclockwise","\\intctrclockwise"],1200),Ro("Accents",["\\vec"],4e3),Ro("Accents",["\\bar","\\ddot","\\acute","\\tilde","\\check"],3e3,"$0{\\placeholder{}}"),Ro("Accents",["\\^","\\`","\\'"],1200,"$0{e}"),Ro("Accents",["\\c"],1200,"$0{c}"),Ro("Accents",["\\~"],1200,"$0{n}"),Ro("Accents",["\\mathring","\\hat","\\dot","\\breve","\\grave"],1200,"$0{\\placeholder{}}"),Ro("Extensible Symbols",["\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftharpoon","\\overrightharpoon","\\overleftrightarrow","\\overbrace","\\overlinesegment","\\overgroup","\\widehat","\\widecheck","\\widetilde"],3e3,"$0{ABC}"),Ro("Extensible Symbols",["\\underrightarrow","\\underleftarrow","\\underleftrightarrow","\\underbrace","\\underlinesegment","\\undergroup","\\utilde"],3e3,"$0{ABC}"),Ro("Sizing",["\\tiny","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],1200,"$0{x=0}"),Ro("Sizing",["\\big","\\Big","\\bigg","\\Bigg"],1200,"$0($0)"),Ro("Sizing",["\\bigl","\\Bigl","\\biggl","\\Biggl"],1200,"$0("),Ro("Sizing",["\\bigr","\\Bigr","\\biggr","\\Biggr"],1200,"$0)"),Ro("Sizing",["\\bigm","\\Bigm","\\biggm","\\Biggm"],1200,"$0|"),Ro("Letterlike Symbols",["\\nabla","\\partial","\\doubleStruckCapitalN","\\N","\\doubleStruckCapitalR","\\R","\\doubleStruckCapitalQ","\\Q","\\doubleStruckCapitalC","\\C","\\doubleStruckCapitalZ","\\Z","\\exponentialE","\\forall","\\exists","\\nexists","\\$","\\%","\\And","\\degree"],4e3),Ro("Letterlike Symbols",["\\doubleStruckCapitalP","\\P","\\ell","\\hbar","\\hslash","\\imath","\\jmath","\\imaginaryI","\\imaginaryJ","\\differentialD","\\rd","\\capitalDifferentialD","\\rD","\\differencedelta","\\mid","@","\\Re","\\Im"],3e3),Ro("Letterlike Symbols",["\\top","\\bot","\\scriptCapitalE","\\scriptCapitalH","\\scriptCapitalL","\\gothicCapitalC","\\gothicCapitalH","\\gothicCapitalI","\\gothicCapitalR","\\Bbbk","\\Finv","\\Game","\\wp","\\eth","\\mho","\\pounds","\\yen","\\euro"],1200),Ro("Crosses",["\\dagger","\\dag"],4e3),Ro("Crosses",["\\ddag","\\ddagger","\\maltese","\\textdagger","\\textdaggerdbl"],1200),Ro("Various",["\\checkmark","\\diagup","\\diagdown","\\angle","\\measuredangle","\\sphericalangle","\\prime","\\doubleprime","\\backprime","\\backdoubleprime","\\sharp","\\flat","\\natural","\\&","\\#","\\clubsuit","\\spadesuit","\\diamondsuit","\\heartsuit","\\backslash","\\infty","/","\\_","\\/","|","'"],1200),Ro("Various",["\\unicode"],1200,'$0{"2B1A}'),Ro("Arrows",["\\longrightarrow","\\rightarrow","\\Longrightarrow","\\Rightarrow"],4e3),Ro("Arrows",["\\longmapsto","\\mapsto","\\Longleftrightarrow","\\rightleftarrows","\\leftarrow","\\curvearrowleft","\\uparrow","\\downarrow","\\hookrightarrow","\\rightharpoonup","\\rightleftharpoons"],3e3),Ro("Arrows",["\\Leftarrow","\\longleftrightarrow","\\longleftarrow","\\Longleftarrow","\\searrow","\\nearrow","\\swarrow","\\nwarrow","\\Uparrow","\\Downarrow","\\updownarrow","\\Updownarrow","\\hookleftarrow","\\leftharpoonup","\\leftharpoondown","\\rightharpoondown","\\leftrightarrows","\\dashrightarrow","\\dashleftarrow","\\leftleftarrows","\\Lleftarrow","\\twoheadleftarrow","\\leftarrowtail","\\looparrowleft","\\leftrightharpoons","\\circlearrowleft","\\Lsh","\\upuparrows","\\downharpoonleft","\\multimap","\\leftrightsquigarrow","\\twoheadrightarrow","\\rightarrowtail","\\looparrowright","\\curvearrowright","\\circlearrowright","\\Rsh","\\downdownarrows","\\upharpoonright","\\downharpoonright","\\rightsquigarrow","\\leadsto","\\Rrightarrow","\\restriction"],1200),Ro("Arrows",["\\upharpoonleft","\\rightrightarrows"],0),Ro("Negated Arrows",["\\nrightarrow","\\nRightarrow","\\nleftrightarrow","\\nLeftrightarrow","\\nleftarrow","\\nLeftarrow"],1200),Ro("Extensible Symbols",["\\xrightarrow","\\xleftarrow","\\xRightarrow","\\xLeftarrow","\\xleftharpoonup","\\xleftharpoondown","\\xrightharpoonup","\\xrightharpoondown","\\xlongequal","\\xtwoheadleftarrow","\\xtwoheadrightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xrightleftharpoons","\\xleftrightharpoons","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],1200,"$0[below]{above}=0"),Ro("Negated Relations",["\\nless","\\nleqslant","\\lneq","\\lneqq","\\nleqq","\\unlhd","\\unrhd","\\lvertneqq","\\lnsim","\\lnapprox","\\nprec","\\npreceq","\\precnsim","\\precnapprox","\\nsim","\\nshortmid","\\nmid","\\nvdash","\\nvDash","\\ngtr","\\ngeqslant","\\ngeqq","\\gneq","\\gneqq","\\gvertneqq","\\gnsim","\\nsucc","\\succnsim","\\ncong","\\nshortparallel","\\nparallel","\\nVDash","\\nVdash","\\precneqq","\\succneqq","\\gnapprox","\\succnapprox","\\nsucceq"],1200),Ro("Hebrew",["\\aleph","\\beth","\\daleth","\\gimel"],1200),Ro("Fences",["\\lbrace","\\rbrace","\\vert","\\Vert","\\{","\\}","(",")","[","]"],4e3),Ro("Fences",["\\langle","\\rangle","\\lfloor","\\rfloor","\\lceil","\\rceil","\\mvert","\\|","\\mVert"],3e3),Ro("Fences",["\\lvert","\\rvert","\\lVert","\\rVert","\\lbrack","\\rbrack","\\ulcorner","\\urcorner","\\llcorner","\\lrcorner","\\lgroup","\\rgroup","\\lmoustache","\\rmoustache"],1200),Ro("Relations",["=","\\ne","\\neq","<",">","\\leqslant","\\geqslant","\\approx"],4e3),Ro("Relations",["\\lt","\\gt","\\le","\\ge","\\leq","\\geq","\\gg","\\cong","\\equiv","\\prec","\\preceq","\\succ","\\perp","\\parallel","\\propto","\\smile","\\frown","\\sim","\\gtrsim"],3e3),Ro("Relations",["\\coloneq","\\succeq","\\approxeq","\\thickapprox","\\lessapprox","\\gtrapprox","\\precapprox","\\succapprox","\\thicksim","\\succsim","\\precsim","\\backsim","\\eqsim","\\backsimeq","\\simeq","\\lesssim","\\nleq","\\ngeq","\\smallsmile","\\smallfrown","\\bowtie","\\asymp","\\leqq","\\eqslantless","\\ll","\\lll","\\lessgtr","\\lesseqgtr","\\lesseqqgtr","\\risingdotseq","\\fallingdotseq","\\preccurlyeq","\\curlyeqprec","\\vDash","\\Vvdash","\\bumpeq","\\Bumpeq","\\geqq","\\eqslantgtr","\\ggg","\\gtrless","\\gtreqless","\\gtreqqless","\\succcurlyeq","\\curlyeqsucc","\\Vdash","\\shortmid","\\shortparallel","\\between","\\pitchfork","\\varpropto","\\backepsilon","\\llless","\\gggtr","\\lhd","\\rhd","\\Join","\\doteq","\\doteqdot","\\Doteq","\\eqcirc","\\circeq","\\lessdot","\\gtrdot","\\measeq","\\eqdef","\\questeq"],1200),Ro("Logic",["\\leftrightarrow","\\Leftrightarrow","\\to"],4e3),Ro("Logic",["\\models","\\vdash"],3e3),Ro("Logic",["\\therefore","\\because","\\implies","\\gets","\\dashv","\\impliedby","\\biconditional","\\roundimplies"],1200),Ro("Operators",["+","-","*","\\cdot"],4e3),Ro("Operators",["\\sqrt"],4e3,"$0{\\placeholder{}}"),Ro("Operators",["\\pm","\\mp","\\times","\\div","\\surd"],3e3),Ro("Operators",["\\ltimes","\\rtimes","\\leftthreetimes","\\rightthreetimes","\\intercal","\\dotplus","\\centerdot","\\doublebarwedge","\\divideontimes","\\divides"],1200),Ro("Logic",["\\wedge","\\vee","\\neg"],4e3),Ro("Logic",["\\lnot"],3e3),Ro("Logic",["\\land","\\lor","\\barwedge","\\veebar","\\nor","\\curlywedge","\\curlyvee"],1200),Ro("Greek",["\\alpha","\\beta","\\gamma","\\delta","\\epsilon","\\varepsilon","\\zeta","\\eta","\\theta","\\vartheta","\\iota","\\kappa","\\varkappa","\\lambda","\\mu","\\nu","\\xi","\\pi","\\varpi","\\rho","\\varrho","\\sigma","\\varsigma","\\tau","\\phi","\\varphi","\\upsilon","\\chi","\\psi","\\omega","\\Gamma","\\Delta","\\Theta","\\Lambda","\\Xi","\\Pi","\\Sigma","\\Upsilon","\\Phi","\\Psi","\\Omega","\\digamma","\\omicron"],3e3),Ro("Sets",["\\emptyset","\\varnothing","\\cap","\\cup","\\in","\\notin","\\subset","\\supset","\\subseteq","\\supseteq","\\sqsubseteq"],4e3),Ro("Sets",["\\setminus","\\not","\\ni","\\sqsupseteq","\\nsupseteqq","\\supsetneq","\\varsupsetneq","\\supsetneqq","\\varsupsetneqq"],3e3),Ro("Sets",["\\smallsetminus","\\complement","\\owns","\\subsetneq","\\varsubsetneq","\\subsetneqq","\\varsubsetneqq","\\nsubset","\\nsupset","\\nsubseteq","\\nsupseteq","\\nsubseteqq","\\subseteqq","\\Subset","\\sqsubset","\\supseteqq","\\Supset","\\sqsupset"],1200),Ro("Spacing",["\\space, \\quad","\\qquad"],3e3,'\\unicode{"203A}$0\\unicode{"2039}'),Ro("Spacing",["\\!","\\,","\\:","\\;","\\enskip","\\enspace"],1200,'\\unicode{"203A}$0\\unicode{"2039}'),Ro("Spacing",["\\hspace","\\hspace*"],1200,'\\unicode{"203A}$0{1em}\\unicode{"2039}'),Ro("Punctuation",["\\colon","\\cdotp","\\ldots","\\cdots","\\ddots","\\vdots","?","!",":",'"',",",".",";"],3e3),Ro("Punctuation",["\\mathellipsis","\\ldotp","\\Colon"],1200),Ro("Boxes",["\\square","\\Box"],3e3),Ro("Boxes",["\\blacksquare","\\boxminus","\\boxplus","\\boxtimes","\\boxdot"],1200),Ro("Circles",["\\circ","\\bullet","\\circleddash","\\oplus","\\otimes"],3e3),Ro("Circles",["\\bigcirc","\\circledast","\\ominus","\\circledcirc","\\oslash","\\circledS","\\circledR","\\odot"],1200),Ro("Triangles",["\\triangle","\\triangleq"],3e3),Ro("Triangles",["\\bigtriangleup","\\vartriangle","\\triangledown","\\bigtriangledown","\\triangleleft","\\vartriangleleft","\\trianglelefteq","\\ntriangleleft","\\ntrianglelefteq","\\triangleright","\\vartriangleright","\\trianglerighteq","\\ntriangleright","\\ntrianglerighteq","\\blacktriangle","\\blacktriangledown","\\blacktriangleleft","\\blacktriangleright"],1200),Ro("Shapes",["\\ast","\\star"],3e3),Ro("Shapes",["\\diamond","\\Diamond","\\lozenge","\\blacklozenge","\\bigstar"],1200);var Zo={version:"0.56.0",latexToMarkup:Io,latexToMathML:Ho,latexToSpeakableText:Uo,latexToAST:function(e,t){var i;return(t=null!=t?t:{}).macros={...P,...null!==(i=t.macros)&&void 0!==i?i:{}},Mo(Je(e,"math",null,t.macros,!1,t.onError),t)},astToLatex:function(t,i){return function t(i,a){const r=Object.assign({precision:14,decimalMarker:".",groupSeparator:"\\, ",product:"\\cdot ",exponentProduct:"\\cdot ",exponentMarker:"",arcSeparator:"\\,",scientificNotation:"auto",beginRepeatingDigits:"\\overline{",endRepeatingDigits:"}"},a);let n="";if(void 0===i)return"";if("string"==typeof i)n=i;else if(i.latex)n=i.latex;else if(ro(i)){const e=ao(i);if(e===-1/0)n="-\\infty ";else if(e===1/0)n="\\infty ";else if("object"!=typeof i.num||"string"!=typeof i.num.re&&"string"!=typeof i.num.im)n=isNaN(e)?"\\text{NaN}":Ao(i.num,r);else{const e=no(i),t=oo(i);isNaN(e)||isNaN(t)?n="\\text{NaN}":Math.abs(t)<=Number.EPSILON&&Math.abs(e)<=Number.EPSILON?n="0":(Math.abs(e)>Number.EPSILON&&(n=Ao(e,r)),Math.abs(t)>Number.EPSILON&&(Math.abs(e)>Number.EPSILON&&(n+=t>0?"+":""),n+=(1!==Math.abs(t)?Ao(t,r):"")+"\\imaginaryI "))}so(i)&&(n+="^{"+t(i.sup,r)+"}"),lo(i)&&(n+="_{"+t(i.sub,r)+"}")}else if(i.group)n=t(i.group,r),ro(i.group)||io(i.group)?0!==oo(i.group)&&(n=So(i.fence||"(),",n)):n=So(i.fence||"(),",n),so(i)&&(n+="^{"+t(i.sup,r)+"}"),lo(i)&&(n+="_{"+t(i.sub,r)+"}");else if(i.fn)if("bind"===i.fn){if(n=t(Wn(i,0),r)+"|_{",i.arg&&2===i.arg.length)n+=t(Wn(i,1));else{let e="";for(let a=1;at(e,r)));else if("text"===i.fn)n="\\text{"+(i.arg[0]||"")+"}";else if("pow"===i.fn&&e(i.arg)&&i.arg.length>=2)n=t(Wn(i,0),r),ro(Wn(i,0))||io(Wn(i,0))||(n=So(i.fence||"(),",n)),n+="^{"+t(Wn(i,1),r)+"}";else if("equal"===i.fn&&i.arg&&i.arg.length>2)n=i.arg.map(e=>t(e,r)).join(" = ");else{const a=function(e){let t=In[e];return t||(t=e.length>1?"\\operatorname{"+e+"}%^%_ %":e+"%^%_ %"),t}(i.fn);n=a;let o="";if(/%(?![01_^])/.test(a)&&e(i.arg)&&i.arg.length>1)n+=So(i.fence||"(),",...i.arg.map(e=>t(e,r)));else if(e(i.arg)&&i.arg.length>0){const e=t(Wn(i,0),r),s=t(Wn(i,1),r),l=[...i.arg];/%0/.test(a)&&(n=n.replace("%0",e),l.shift()),/%1/.test(a)&&(n=n.replace("%1",s),l.shift()),l.length>0&&(o=So(i.fence||"(),",...l.map(e=>t(e,r))))}else o=So(i.fence||"(),","");n=so(i)?n.replace("%^","^{"+t(i.sup,r)+"}"):n.replace("%^",""),n=lo(i)?n.replace("%_","_{"+t(i.sub,r)+"}"):n.replace("%_",""),n=n.replace(/%(?![01_^])/,o),n=n.replace("%0","").replace("%1","")}else{const e=[];for(const a of i.arg)"add"===a.fn||"subtract"===a.fn||0!==no(o=a)&&0!==oo(o)||so(i)&&0!==oo(a)&&1!==oo(a)?e.push(So("() ",t(a,r))):e.push(t(a,r));if("multiply"===i.fn)n=!i.arg||2!==i.arg.length||!ro(i.arg[0])&&"divide"!==i.arg[0].fn||ro(i.arg[1])&&(0!==no(i.arg[1])||1!==oo(i.arg[1]))?e.join(" \\times "):e[0]+e[1];else if(i.arg&&1===i.arg.length)n="negate"===i.arg[0].fn||ro(i.arg[0])&&ao(i.arg[0])<0?e[0]:"+"+e[0];else{n=e[0];for(let t=1;t=0&&(a+=t,a * - * @packageDocumentation MathLive SDK Reference 0.55.0 - * @version 0.55.0 + * @packageDocumentation MathLive SDK Reference 0.56.0 + * @version 0.56.0 * */ import { Mathfield } from './mathfield'; @@ -24,7 +24,7 @@ import { ErrorCode as MathJsonErrorCode } from '../math-json/public'; export { Mathfield }; export { MathfieldConfig }; /** - * Current version: `0.55.0` + * Current version: `0.56.0` * * The version string of the SDK using the [semver](https://semver.org/) convention: * diff --git a/dist/public/types-utils.d.ts b/dist/public/types-utils.d.ts index 592f3cb09..6142c8eb6 100644 --- a/dist/public/types-utils.d.ts +++ b/dist/public/types-utils.d.ts @@ -1,4 +1,4 @@ -/* 0.55.0 */ /** +/* 0.56.0 */ /** * @internal */ declare type Filter = { diff --git a/dist/vue-mathlive.mjs b/dist/vue-mathlive.mjs index c2dd77ac0..cf2f15b07 100644 --- a/dist/vue-mathlive.mjs +++ b/dist/vue-mathlive.mjs @@ -1,2 +1,2 @@ -/* MathLive 0.55.0 */ +/* MathLive 0.56.0 */ var t={name:"mathlive-mathfield",template:'
    ',props:{id:{type:String,default:""},value:{type:String,default:""},config:{type:Object,default:()=>({})},onKeystroke:{type:Function,default:function(t,e){return!0}},onMoveOutOf:{type:Function,default:function(t){return!0}},onTabOutOf:{type:Function,default:function(t){return!0}}},install:function(t,e){Object.defineProperty(t.prototype,"$mathlive",{value:e}),t.component("mathlive-mathfield",this)},watch:{value:function(t,e){t!==e&&this.$el.mathfield.$latex(t,{suppressChangeNotifications:!0})},config:{deep:!0,handler:function(t){this.$el.mathfield.$setConfig(t)}}},mounted:function(){this.$nextTick(()=>{this.$mathlive.makeMathField(this.$el,{...this.config,onContentDidChange:t=>{this.$emit("input",this.$el.mathfield.$text())},onFocus:t=>{this.$emit("focus")},onBlur:t=>{this.$emit("blur")},onContentWillChange:t=>{this.$emit("content-will-change")},onSelectionWillChange:t=>{this.$emit("selection-will-change")},onUndoStateWillChange:(t,e)=>{this.$emit("undo-state-will-change",e)},onUndoStateDidChange:(t,e)=>{this.$emit("undo-state-did-change",e)},onVirtualKeyboardToggle:(t,e,i)=>{this.$emit("virtual-keyboard-toggle",e,i)},onReadAloudStatus:(t,e)=>{this.$emit("read-aloud-status",e)},onKeystroke:(t,e,i)=>this.onKeystroke(e,i),onMoveOutOf:(t,e)=>this.onMoveOutOf(e),onTabOutOf:(t,e)=>this.onTabOutOf(e)})})},methods:{perform:function(t){this.$el.mathfield.$perform(t)},hasFocus:function(){return this.$el.mathfield.$hasFocus()},focus:function(){this.$el.mathfield.$focus()},blur:function(){this.$el.mathfield.$blur()},text:function(t){return this.$el.mathfield.$text(t)},selectedText:function(t){return this.$el.mathfield.$selectedText(t)},insert:function(t,e){this.$el.mathfield.$insert(t,e)},keystroke:function(t,e){return this.$el.mathfield.$keystroke(t,e)},typedText:function(t){this.$el.mathfield.$keystroke(t)},selectionIsCollapsed:function(){return this.$el.mathfield.$selectionIsCollapsed()},selectionDepth:function(){return this.$el.mathfield.$selectionDepth()},selectionAtStart:function(){return this.$el.mathfield.$selectionAtStart()},selectionAtEnd:function(){return this.$el.mathfield.$selectionAtEnd()},select:function(){this.$el.mathfield.$select()},clearSelection:function(){this.$el.mathfield.$clearSelection()}}};export default t; diff --git a/package-lock.json b/package-lock.json index e8d61a615..5f5a15d71 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "mathlive", - "version": "0.55.0", + "version": "0.56.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1fa679dbf..f310e3bfb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mathlive", - "version": "0.55.0", + "version": "0.56.0", "description": "Render and edit beautifully typeset math", "license": "MIT", "funding": {