{"version":3,"file":"mathlive-8UReNj5z.js","sources":["../../../.yarn/mathlive-https-007785451a-da496847a0.zip/node_modules/mathlive/dist/mathlive.js","../../../.yarn/react-mathlive-https-022c08f6b4-d1402b318a.zip/node_modules/react-mathlive/dist/MathFieldComponent.js","../../../.yarn/react-mathlive-https-022c08f6b4-d1402b318a.zip/node_modules/react-mathlive/dist/index.js"],"sourcesContent":["var global,factory;global=this,factory=function(){const t=0,e=1,i=2,s=3,a=4,o=5,n=6,r=7,l=8,c=9,h=10,p=11,d=12;function m(t,e){e=e||0;const i=t.charCodeAt(e);if(55296<=i&&i<=56319&&e=1){const s=t.charCodeAt(e-1),a=i;return 55296<=s&&s<=56319?1024*(s-55296)+(a-56320)+65536:a}return i}function u(u,g){if((g=g||0)<0)return 0;if(g>=u.length-1)return u.length;let y=f(m(u,g));for(let k=g+1;k=this.s.length}get(){return this.pos=\"0\"&&i<=\"9\"?parseInt(i):\"?\"):t=new y(\"literal\",\"#\")}}else\"~\"===this.peek()?(this.get(),t=new y(\"command\",\"space\")):\"$\"===this.peek()?(this.get(),\"$\"===this.peek()?(this.get(),t=new y(\"$$\")):t=new y(\"$\")):t=new y(\"literal\",this.get());return t}}var x={tokenize:function(t){const e=[],i=t.toString().split(/\\r?\\n/);let s=\"\",a=\"\";for(const t of i){s+=a,a=\" \";const e=t.match(/((?:\\\\%)|[^%])*/);e&&(s+=e[0])}const o=new b(s);for(;!o.end();){const t=o.makeToken();t&&e.push(t)}return e}},k={\"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],96:[0,.69444,0,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],175:[0,.59611,0,0],176:[0,.69444,0,0],177:[.13333,.63333,0,0],180:[0,.69444,0,0],215:[.13333,.63333,0,0],247:[.13333,.63333,0,0],305:[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],768:[0,.69444,0,0],769:[0,.69444,0,0],770:[0,.69444,0,0],771:[0,.69444,0,0],772:[0,.59611,0,0],774:[0,.69444,0,0],775:[0,.69444,0,0],776:[0,.69444,0,0],778:[0,.69444,0,0],779:[0,.69444,0,0],780:[0,.63194,0,0],824:[.19444,.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]},\"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],305:[0,.43056,0,.02778],567:[.19444,.43056,0,.08334],768:[0,.69444,0,0],769:[0,.69444,.09694,0],770:[0,.69444,.06646,0],771:[0,.66786,.11585,0],772:[0,.56167,.10333,0],774:[0,.69444,.10806,0],775:[0,.66786,.11752,0],776:[0,.66786,.10474,0],778:[0,.69444,0,0],779:[0,.69444,.1225,0],780:[0,.62847,.08295,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],96:[0,.69444,0,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],168:[0,.66786,0,0],172:[0,.43056,0,0],175:[0,.56778,0,0],176:[0,.69444,0,0],177:[.08333,.58333,0,0],180:[0,.69444,0,0],215:[.08333,.58333,0,0],247:[.08333,.58333,0,0],305:[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],768:[0,.69444,0,0],769:[0,.69444,0,0],770:[0,.69444,0,0],771:[0,.66786,0,0],772:[0,.56778,0,0],774:[0,.69444,0,0],775:[0,.66786,0,0],776:[0,.66786,0,0],778:[0,.69444,0,0],779:[0,.69444,0,0],780:[0,.62847,0,0],824:[.19444,.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],8800:[.215,.716,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]},\"Math-BoldItalic\":{47:[.19444,.69444,0,0],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\":{47:[.19444,.69444,0,0],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]},\"Math-Regular\":{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-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],305:[0,.44444,0,0],567:[.19444,.44444,0,0],768:[0,.69444,0,0],769:[0,.69444,0,0],770:[0,.69444,0,0],771:[0,.67659,0,0],772:[0,.60889,0,0],774:[0,.69444,0,0],775:[0,.67937,0,0],776:[0,.67937,0,0],778:[0,.69444,0,0],779:[0,.69444,0,0],780:[0,.63194,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\":{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],305:[0,.43056,0,0],567:[.22222,.43056,0,0],768:[0,.61111,0,0],769:[0,.61111,0,0],770:[0,.61111,0,0],771:[0,.61111,0,0],772:[0,.56555,0,0],774:[0,.61111,0,0],776:[0,.61111,0,0],778:[0,.61111,0,0],780:[0,.56597,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],2018:[0,.61111,0,0],2019:[0,.61111,0,0],8242:[0,.61111,0,0]}};const v=/[\\u3040-\\u309F]|[\\u30A0-\\u30FF]|[\\u4E00-\\u9FAF]|[\\uAC00-\\uD7AF]/,S={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]},w={defaultRuleThickness:.04,bigOpSpacing1:.111,bigOpSpacing2:.166,bigOpSpacing3:.2,bigOpSpacing4:.6,bigOpSpacing5:.1,ptPerEm:10,pxPerEm:40/3,doubleRuleSep:.2,arraycolsep:.5,baselineskip:1.2,arrayrulewidth:.04,fboxsep:.3,fboxrule:.04},A={\" \":\" \",\"​\":\" \",\"Å\":\"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 M(t,e,i){if(\"string\"==typeof t){const i=t.match(/([-+]?[0-9.]*)\\s*([a-zA-Z]+)/);i?(t=parseFloat(i[1]),e=i[2].toLowerCase()):t=parseFloat(t)}const s={pt:1,mm:7227/2540,cm:7227/254,ex:35271/8192,px:.75,em:w.ptPerEm,bp:1.00375,dd:1238/1157,pc:12,in:72.27,mu:10/18}[e]||1;if(isFinite(i)){const e=Math.pow(10,i);return Math.round(t/w.ptPerEm*s*e)/e}return t/w.ptPerEm*s}var C={toEm:M,toPx:function(t,e){return M(t,e)*(4/3)*w.ptPerEm},METRICS:w,SIGMAS:S,getCharacterMetrics:function(t,e){const i={cal:\"Caligraphic-Regular\",ams:\"AMS-Regular\",frak:\"Fraktur-Regular\",bb:\"AMS-Regular\",scr:\"Script-Regular\",cmr:\"Main-Regular\",cmtt:\"Typewriter-Regular\",cmss:\"SansSerif-Regular\"}[e]||e;let s=t.charCodeAt(0);t[0]in A?s=A[t[0]].charCodeAt(0):v.test(t[0])&&(s=77);const a=k[i][s];return a?a?{depth:a[0],height:a[1],italic:a[2],skew:a[3]}:null:{defaultMetrics:!0,depth:.2,height:.7,italic:0,skew:0}}};const _=[{},{},{}];let T;for(const t in S)if(Object.prototype.hasOwnProperty.call(S,t))for(T=0;T<3;T++)_[T][t]=S[t][T];for(T=0;T<3;T++)_[T].emPerEx=S.xHeight[T]/S.quad[T];class L{constructor(t,e,i,s){this.id=t,this.size=e,this.cramped=s,this.sizeMultiplier=i,this.metrics=_[e>0?e-1:0]}sup(){return F[E[this.id]]}sub(){return F[q[this.id]]}fracNum(){return F[I[this.id]]}fracDen(){return F[P[this.id]]}cramp(){return F[B[this.id]]}cls(){return D[this.size]}adjustTo(t){let e=z[this.size][t.size];return e.length>0&&(e=\" \"+e),e}isTight(){return this.size>=2}}const F=[new L(0,0,1,!1),new L(1,0,1,!0),new L(2,1,1,!1),new L(3,1,1,!0),new L(4,2,.7,!1),new L(5,2,.7,!0),new L(6,3,.5,!1),new L(7,3,.5,!0)],D=[\"displaystyle textstyle\",\"textstyle\",\"scriptstyle\",\"scriptscriptstyle\"],z=[[\"\",\"\",\"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\",\"\"]],E=[4,5,4,5,6,7,6,7],q=[5,5,5,5,7,7,7,7],I=[2,3,4,5,6,7,6,7],P=[3,3,5,5,7,7,7,7],B=[1,1,3,3,5,5,7,7];var O={DISPLAY:F[0],TEXT:F[2],SCRIPT:F[4],SCRIPTSCRIPT:F[6],toMathstyle:function(t){return t?\"object\"==typeof t?t:{displaystyle:F[0],textstyle:F[2],scriptstyle:F[4],scriptscriptstyle:F[6]}[t]:t}};class R{constructor(t){this.macros=t.macros||{},this.generateID=!!t.generateID&&t.generateID,this.mathstyle=O.toMathstyle(t.mathstyle||\"displaystyle\"),this.size=t.size||\"size5\",this.parentMathstyle=t.parentMathstyle||this.mathstyle,this.parentSize=t.parentSize||this.size,this.opacity=t.opacity}clone(t){const e=new R(this);return e.parentMathstyle=this.mathstyle,e.parentSize=this.size,e.macros=this.macros,t&&(\"auto\"!==t.mathstyle&&t.mathstyle||delete t.mathstyle,Object.assign(e,t),\"string\"==typeof t.mathstyle&&(e.mathstyle=O.toMathstyle(t.mathstyle))),e}setMathstyle(t){t&&\"auto\"!==t&&(this.mathstyle=O.toMathstyle(t))}cramp(){return this.clone({mathstyle:this.mathstyle.cramp()})}sup(){return this.clone({mathstyle:this.mathstyle.sup()})}sub(){return this.clone({mathstyle:this.mathstyle.sup()})}}var K={Context:R};function N(t){let e=\"\";if(\"number\"==typeof t)e+=Math.floor(100*t)/100;else if(\"string\"==typeof t)e+=t;else if(Array.isArray(t))for(const i of t)e+=N(i);else t&&(e+=t.toString());return e}class ${constructor(t,e){this.classes=e||\"\",Array.isArray(t)?this.children=[].concat.apply([],t):\"string\"==typeof t?this.body=t:t&&\"object\"==typeof t&&(this.children=[t]),this.style=null,this.updateDimensions()}updateDimensions(){let t=0,e=0,i=1;this.children&&this.children.forEach(s=>{s.height>t&&(t=s.height),s.depth>e&&(e=s.depth),s.maxFontSize>i&&(i=s.maxFontSize)}),this.height=t,this.depth=e,this.maxFontSize=i}selected(t){t&&!/ML__selected/.test(this.classes)&&(this.classes.length>0&&(this.classes+=\" \"),this.classes+=\"ML__selected\"),!t&&/ML__selected/.test(this.classes)&&(this.classes=this.classes.replace(\"ML__selected\",\"\")),this.children&&this.children.forEach(e=>e.selected(t))}applyStyle(t){if(!t)return;if(t.color&&(\"none\"!==t.color?this.setStyle(\"color\",t.color):this.setStyle(\"color\",\"\")),t.backgroundColor&&(\"none\"!==t.backgroundColor?this.setStyle(\"background-color\",t.backgroundColor):this.setStyle(\"background-color\",\"\")),t.cssClass&&(this.classes+=\" \"+t.cssClass),!this.body)return;let e=t.fontFamily;\"math\"===e&&\"n\"===t.fontShape&&(e=\"cmr\");let i=\"Main-Regular\";if(e&&(i=function(t,e){if(\"string\"!=typeof t||t.length>1||\"​\"===t)return J[e];if(\"bb\"===e||\"scr\"===e){if(!/^[A-Z ]$/.test(t))return null}else if(\"cal\"===e){if(!/^[0-9A-Z ]$/.test(t))return null}else if(\"frak\"===e){if(!/^[0-9A-Za-z ]$|^[!\"#$%&'()*+,\\-./:;=?[]^’‘]$/.test(t))return null}else if((\"cmtt\"===e||\"cmss\"===e)&&!/^[0-9A-Za-z ]$|^[!\"&'()*+,\\-./:;=?@[]^_~\\u0131\\u0237\\u0393\\u0394\\u0398\\u039b\\u039e\\u03A0\\u03A3\\u03A5\\u03A8\\u03a9’‘]$/.test(t))return null;return J[e]}(this.body,e)),t.fontShape&&(this.classes+=\" \"+({it:\"ML__it\",sl:\"ML__shape_sl\",sc:\"ML__shape_sc\",ol:\"ML__shape_ol\"}[t.fontShape]||\"\")),t.fontSeries){const e=t.fontSeries.match(/(.?[lbm])?(.?[cx])?/);e&&(this.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\"}[e[1]||\"\"]||\"\"),this.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\"}[e[2]||\"\"]||\"\"))}if(Y[e]?this.classes+=\" \"+Y[e]:e&&this.setStyle(\"font-family\",e),this.body&&this.body.length>0&&i){this.height=0,this.depth=0,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}[t.fontSize]||1,this.skew=0,this.italic=0;for(let t=0;t0&&(this.style||(this.style={}),this.style[t]=i)}setTop(t){t&&0!==t&&(this.style||(this.style={}),this.style.top=N(t)+\"em\",this.height-=t,this.depth+=t)}setLeft(t){t&&0!==t&&(this.style||(this.style={}),this.style[\"margin-left\"]=N(t)+\"em\")}setRight(t){t&&0!==t&&(this.style||(this.style={}),this.style[\"margin-right\"]=N(t)+\"em\")}setWidth(t){t&&0!==t&&(this.style||(this.style={}),this.style.width=N(t)+\"em\")}addMarginRight(t){if(t&&0!==t){if(!this.style&&!/qquad|quad|enspace|thickspace|mediumspace|thinspace|negativethinspace/.test(this.classes)){const e={2:\"qquad\",1:\"quad\",\".5\":\"enspace\",.277778:\"thickspace\",.222222:\"mediumspace\",.166667:\"thinspace\",\"-0.166667\":\"negativethinspace\"}[t.toString()];if(e)return void(this.classes+=\" rspace \"+e)}this.style||(this.style={});const e=parseFloat(this.style[\"margin-right\"]||\"0\");this.style[\"margin-right\"]=N(e+t)+\"em\"}}toMarkup(t,e){t=t||0,e=e||1;let i=\"\",s=this.body||\"\";if(this.children){let t=\"none\",i=void 0;for(const a of this.children){let o=0;if(t){let s=a.type;s&&(\"textord\"===s&&(s=\"mord\"),\"first\"===s&&(s=\"none\"),a.isTight?o=H[t+\"+\"+s]||0:\"mpunct\"===t&&\",\"===i&&\"mord\"===s||(o=W[t+\"+\"+s]||0),o=Math.floor(e*o))}a.toMarkup&&(s+=a.toMarkup(o,e)),t=V(a),i=a.body}}if(\"​\"!==s&&s||this.classes&&\"ML__selected\"!==this.classes){if(i=\"1?e.filter(function(t,e,i){return t.length>0&&i.indexOf(t)===e}).join(\" \"):e[0]).length>0&&(i+=' class=\"'+a+'\"'),t&&(this.style&&this.style[\"margin-left\"]?this.style[\"margin-left\"]=N(parseFloat(this.style[\"margin-left\"])+t/18)+\"em\":(this.style||(this.style={}),this.style[\"margin-left\"]=N(t/18)+\"em\")),this.style){let t=\"\";const e=/ML__selected/.test(this.classes);for(const i in this.style)Object.prototype.hasOwnProperty.call(this.style,i)&&(\"background-color\"===i&&e||(t+=i+\":\"+this.style[i]+\";\"));t.length>0&&(i+=' style=\"'+t+'\"')}i+=\">\",this.svgOverlay?(i+='',i+=s,i+=\"\",i+=\"\",i+=this.svgOverlay,i+=\"\"):i+=s,i+=\"\"}else i=\"\";return this.caret&&\"command\"!==this.type&&(\"text\"===this.caret?i+='':i+=''),i}tryCoalesceWith(t){if(this.tag!==t.tag)return!1;if(this.type!==t.type)return!1;if(\"error\"===this.type||\"placeholder\"===this.type||\"command\"===this.type)return!1;const e=this.children&&this.children.length>0,i=t.children&&t.children.length>0;if(e||i)return!1;if((this.style?this.style.length:0)!==(t.style?t.style.length:0))return!1;const s=this.classes.trim().replace(/\\s+/g,\" \").split(\" \"),a=t.classes.trim().replace(/\\s+/g,\" \").split(\" \");if(s.length!==a.length)return!1;s.sort(),a.sort();for(let t=0;tMath.max(t,e.height),0):t.height:0}function j(t){return t?Array.isArray(t)?t.reduce((t,e)=>Math.max(t,e.depth),0):t.depth:0}function G(t,e){if(Array.isArray(t)){const i=[];for(const e of t)e&&i.push(e);if(1===i.length)return G(i[0],e)}return new $(t,e)}function Z(t,e,i){const s=G(e,i);return s.type=t,s}function X(t,e){if(!e||0===e.length){if(t instanceof $)return t;if(Array.isArray(t)&&1===t.length)return t[0]}const i=new $(t,e);let s=1;return s=t instanceof $?t.maxFontSize:t.reduce((t,e)=>Math.max(t,e.maxFontSize),0),i.height*=s,i.depth*=s,i}const J={ams:\"AMS-Regular\",bb:\"AMS-Regular\",cal:\"Caligraphic-Regular\",frak:\"Fraktur-Regular\",scr:\"Script-Regular\",cmr:\"Main-Regular\",cmss:\"SansSerif-Regular\",cmtt:\"Typewriter-Regular\",math:\"Math-Regular\",mainit:\"Main-Italic\",mathbf:\"Main-Bold\"},Y={ams:\"ML__ams\",bb:\"ML__bb\",cal:\"ML__cal\",frak:\"ML__frak\",scr:\"ML__script\",cmr:\"ML__mathrm\",cmss:\"ML__sans\",cmtt:\"ML__tt\",math:\"ML__mathit\",mainit:\"ML__mainit\",mathbf:\"ML__mathbf\"};var Q={coalesce:function t(e){if(!e||0===e.length)return[];e[0].children=t(e[0].children);const i=[e[0]];for(let s=1;s0?\"em\":\"\"),s.attributes={\"aria-hidden\":!0}),\"size5\"!==t.size?new $(s,\"fontsize-ensurer reset-\"+t.size+\" size5\"):0!==i?s:null}(t),l=[];o=a;for(const t of e)if(\"number\"==typeof t)o+=t;else{const e=G([r,t]);e.setTop(-t.depth-o),l.push(e),o+=t.height+t.depth}const c=G(l,\"vlist\");return c.depth=Math.max(a,j(c)||0),c.height=Math.max(-o,U(c)||0),c},makeHlist:X,makeStyleWrap:function(t,e,i,s,a){a=a||\"\";const o=X(e,(a+=\" style-wrap \")+i.adjustTo(s));o.type=t;const n=s.sizeMultiplier/i.sizeMultiplier;return o.height*=n,o.depth*=n,o.maxFontSize=s.sizeMultiplier,o},makeSVG:function(t,e,i){return t.svgOverlay=e,t.svgStyle=i,t},height:U,depth:j,skew:function(t){if(!t)return 0;if(Array.isArray(t)){let e=0;for(const i of t)e+=i.skew||0;return e}return t.skew},italic:function(t){return t?Array.isArray(t)?t[t.length-1].italic:t.italic:0}};let tt=\"\";const et={},it={},st={},at=\"CRYPTIC\",ot=\"COMMON\",nt=\"SUPERCOMMON\",rt={CRYPTIC:0,ARCANE:200,VERY_RARE:600,RARE:1200,UNCOMMON:2e3,COMMON:3e3,SUPERCOMMON:4e3};function lt(t,...e){const i=\"string\"==typeof t?rt[t]:t;for(const t of e)et[t]&&(et[t].frequency=i),it[t]&&(it[t]=Object.assign({},it[t]),it[t].frequency=i)}function ct(t,e,i,s,a){e&&/^(ams|cmr|bb|cal|frak|scr)$/.test(e),\"string\"==typeof a&&(a=rt[a]),et[t]={type:i===bt?xt:i,baseFontFamily:e,value:s,category:tt,frequency:a}}function ht(t,e){for(let i=t;i<=e;i++){const t=String.fromCodePoint(i);ct(t,\"\",\"mord\",t)}}const pt={8739:\"|\",183:\"\\\\cdot\",188:\"\\\\frac{1}{4}\",189:\"\\\\frac{1}{2}\",190:\"\\\\frac{3}{4}\",8304:\"^{0}\",8305:\"^{i}\",185:\"^{1}\",178:\"^{2}\",179:\"^{3}\",8308:\"^{4}\",8309:\"^{5}\",8310:\"^{6}\",8311:\"^{7}\",8312:\"^{8}\",8313:\"^{9}\",8314:\"^{+}\",8315:\"^{-}\",8316:\"^{=}\",8319:\"^{n}\",8320:\"_{0}\",8321:\"_{1}\",8322:\"_{2}\",8323:\"_{3}\",8324:\"_{4}\",8325:\"_{5}\",8326:\"_{6}\",8327:\"_{7}\",8328:\"_{8}\",8329:\"_{9}\",8330:\"_{+}\",8331:\"_{-}\",8332:\"_{=}\",8336:\"_{a}\",8337:\"_{e}\",8338:\"_{o}\",8339:\"_{x}\",8242:\"\\\\prime\",8243:\"\\\\doubleprime\",8736:\"\\\\angle\",8450:\"\\\\C\",8469:\"\\\\N\",8473:\"\\\\P\",8474:\"\\\\Q\",8477:\"\\\\R\",8484:\"\\\\Z\"};function dt(t,e){const i=String.fromCodePoint(e);if(\"math\"===t&&pt[i])return pt[i];if(e>32&&e<127)return i;let s=\"\";if(\"math\"===t){for(const t in et)if(Object.prototype.hasOwnProperty.call(et,t)&&et[t].value===i){s=t;break}}else for(const t in zt)if(Object.prototype.hasOwnProperty.call(zt,t)&&zt[t]===i){s=t;break}return s||i}const mt={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},ut=[{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 ft(t){let e=t;if(\"string\"==typeof t&&(e=t.codePointAt(0)),(e<119808||e>120831)&&(e<8448||e>8527))return{char:t};for(const t in mt)if(Object.prototype.hasOwnProperty.call(mt,t)&&mt[t]===e){e=t;break}for(let t=0;t=ut[t].start&&et.body).join(\"\")}function Tt(t,e,i,s){\"string\"==typeof t&&(t=[t]),i||(i={});const a=Ct(e),o={category:tt,params:a,parser:s,mathstyle:\"displaystyle\",tabular:i.tabular||!0,colFormat:i.colFormat||[]};for(const e of t)st[e]=o}function Lt(t,e,i,s){\"string\"==typeof t&&(t=[t]),i||(i={});const a={category:tt,baseFontFamily:i.fontFamily,params:Ct(e),allowedInText:!!i.allowedInText,infix:!!i.infix,parse:s};for(const e of t)it[e]=a}tt=\"Environments\",Tt(\"math\",\"\",{frequency:0},function(){return{mathstyle:\"textstyle\"}}),Tt(\"displaymath\",\"\",{frequency:8},function(){return{mathstyle:\"displaystyle\"}}),Tt(\"array\",\"{columns:colspec}\",{frequency:ot},function(t,e){return{colFormat:e[0],mathstyle:\"textstyle\"}}),Tt(\"eqnarray\",\"\",{},function(){return{}}),Tt(\"equation\",\"\",{},function(){return{colFormat:[{align:\"c\"}]}}),Tt(\"subequations\",\"\",{},function(){return{colFormat:[{align:\"c\"}]}}),Tt(\"multline\",\"\",{},function(){return{firstRowFormat:[{align:\"l\"}],colFormat:[{align:\"c\"}],lastRowFormat:[{align:\"r\"}]}}),Tt([\"align\",\"aligned\"],\"\",{},function(t,e,i){let s=0;for(const t of i)s=Math.max(s,t.length);const a=[{gap:0},{align:\"r\"},{gap:0},{align:\"l\"}];let o=2;for(;o({color:e[0]})),Lt(\"\\\\textcolor\",\"{:color}{content:auto*}\",{allowedInText:!0},(t,e)=>({color:e[0]})),lt(3,\"\\\\textcolor\"),Lt(\"\\\\overline\",\"{:auto}\",null,function(t,e){return{type:\"line\",position:\"overline\",skipBoundary:!0,body:e[0]}}),lt(ot,\"\\\\overline\"),Lt(\"\\\\underline\",\"{:auto}\",null,function(t,e){return{type:\"line\",position:\"underline\",skipBoundary:!0,body:e[0]}}),lt(ot,\"\\\\underline\"),Lt(\"\\\\overset\",\"{annotation:auto}{symbol:auto}\",null,function(t,e){return{type:\"overunder\",overscript:e[0],skipBoundary:!0,body:e[1]}}),lt(ot,\"\\\\overset\"),Lt(\"\\\\underset\",\"{annotation:auto}{symbol:auto}\",null,function(t,e){return{type:\"overunder\",underscript:e[0],skipBoundary:!0,body:e[1]}}),lt(ot,\"\\\\underset\"),Lt([\"\\\\stackrel\",\"\\\\stackbin\"],\"{annotation:auto}{symbol:auto}\",null,function(t,e){return{type:\"overunder\",overscript:e[0],skipBoundary:!0,body:e[1],mathtype:\"\\\\stackrel\"===t?\"mrel\":\"mbin\"}}),lt(ot,\"\\\\stackrel\"),lt(0,\"\\\\stackbin\"),Lt(\"\\\\rlap\",\"{:auto}\",null,function(t,e){return{type:\"overlap\",align:\"right\",skipBoundary:!0,body:e[0]}}),lt(270,\"\\\\rlap\"),Lt(\"\\\\llap\",\"{:auto}\",null,function(t,e){return{type:\"overlap\",align:\"left\",skipBoundary:!0,body:e[0]}}),lt(18,\"\\\\llap\"),Lt(\"\\\\mathrlap\",\"{:auto}\",null,function(t,e){return{type:\"overlap\",mode:\"math\",align:\"right\",skipBoundary:!0,body:e[0]}}),lt(at,\"\\\\mathrlap\"),Lt(\"\\\\mathllap\",\"{:auto}\",null,function(t,e){return{type:\"overlap\",mode:\"math\",align:\"left\",skipBoundary:!0,body:e[0]}}),lt(at,\"\\\\mathllap\"),Lt(\"\\\\boxed\",\"{content:math}\",null,function(t,e){return{type:\"box\",framecolor:\"black\",skipBoundary:!0,body:e[0]}}),lt(1236,\"\\\\boxed\"),Lt(\"\\\\colorbox\",\"{background-color:color}{content:auto}\",{allowedInText:!0},function(t,e){return{type:\"box\",backgroundcolor:e[0],skipBoundary:!0,body:e[1]}}),lt(at,\"\\\\colorbox\"),Lt(\"\\\\fcolorbox\",\"{frame-color:color}{background-color:color}{content:auto}\",{allowedInText:!0},function(t,e){return{type:\"box\",framecolor:e[0],backgroundcolor:e[1],skipBoundary:!0,body:e[2]}}),lt(at,\"\\\\fcolorbox\"),Lt(\"\\\\bbox\",\"[:bbox]{body:auto}\",{allowedInText:!0},function(t,e){return e[0]?{type:\"box\",padding:e[0].padding,border:e[0].border,backgroundcolor:e[0].backgroundcolor,skipBoundary:!0,body:e[1]}:{type:\"box\",skipBoundary:!0,body:e[1]}}),lt(at,\"\\\\bbox\"),Lt(\"\\\\enclose\",\"{notation:string}[style:string]{body:auto}\",null,function(t,e){let i=e[0]||[];const s={type:\"enclose\",strokeColor:\"currentColor\",strokeWidth:1,strokeStyle:\"solid\",backgroundcolor:\"transparent\",padding:\"auto\",shadow:\"auto\",captureSelection:!0,body:e[2]};if(e[1]){const t=e[1].split(/,(?![^(]*\\)(?:(?:[^(]*\\)){2})*[^\"]*$)/);for(const e of t){const t=e.match(/\\s*(\\S+)\\s+(\\S+)\\s+(.*)/);if(t)s.strokeWidth=C.toPx(t[1],\"px\"),isFinite(s.strokeWidth)||(s.strokeWidth=1),s.strokeStyle=t[2],s.strokeColor=t[3];else{const t=e.match(/\\s*([a-z]*)\\s*=\\s*\"(.*)\"/);t&&(\"mathbackground\"===t[1]?s.backgroundcolor=t[2]:\"mathcolor\"===t[1]?s.strokeColor=t[2]:\"padding\"===t[1]?s.padding=C.toPx(t[2],\"px\"):\"shadow\"===t[1]&&(s.shadow=t[2]))}}\"dashed\"===s.strokeStyle?s.svgStrokeStyle=\"5,5\":\"dotted\"===s.strokeStyle&&(s.svgStrokeStyle=\"1,5\")}s.borderStyle=s.strokeWidth+\"px \"+s.strokeStyle+\" \"+s.strokeColor,i=i.toString().split(/[, ]/).filter(t=>t.length>0).map(t=>t.toLowerCase()),s.notation={};for(const t of i)s.notation[t]=!0;return s.notation.updiagonalarrow&&(s.notation.updiagonalstrike=!1),s.notation.box&&(s.notation.left=!1,s.notation.right=!1,s.notation.bottom=!1,s.notation.top=!1),s}),lt(at,\"\\\\enclose\"),Lt(\"\\\\cancel\",\"{body:auto}\",null,function(t,e){return{type:\"enclose\",strokeColor:\"currentColor\",strokeWidth:1,strokeStyle:\"solid\",borderStyle:\"1px solid currentColor\",backgroundcolor:\"transparent\",padding:\"auto\",shadow:\"auto\",notation:{updiagonalstrike:!0},body:e[0]}}),Lt(\"\\\\bcancel\",\"{body:auto}\",null,function(t,e){return{type:\"enclose\",strokeColor:\"currentColor\",strokeWidth:1,strokeStyle:\"solid\",borderStyle:\"1px solid currentColor\",backgroundcolor:\"transparent\",padding:\"auto\",shadow:\"auto\",notation:{downdiagonalstrike:!0},body:e[0]}}),Lt(\"\\\\xcancel\",\"{body:auto}\",null,function(t,e){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:e[0]}}),lt(at,\"\\\\cancel\",\"\\\\bcancel\",\"\\\\xcancel\"),Lt(\"\\\\variable\",\"{:math}\",null,function(t,e){return e[0]&&e[0][0]&&\"placeholder\"!==e[0][0].type?{type:\"variable\",captureSelection:!0,body:e[0]}:{}}),lt(ot,\"\\\\variable\"),tt=\"Styling\",Lt([\"\\\\tiny\",\"\\\\scriptsize\",\"\\\\footnotesize\",\"\\\\small\",\"\\\\normalsize\",\"\\\\large\",\"\\\\Large\",\"\\\\LARGE\",\"\\\\huge\",\"\\\\Huge\"],\"\",{allowedInText:!0},function(t,e){return{fontSize:{tiny:\"size1\",scriptsize:\"size2\",footnotesize:\"size3\",small:\"size4\",normalsize:\"size5\",large:\"size6\",Large:\"size7\",LARGE:\"size8\",huge:\"size9\",Huge:\"size10\"}[t.slice(1)]}}),Lt(\"\\\\fontseries\",\"{:text}\",{allowedInText:!0},(t,e)=>({fontSeries:_t(e[0])})),Lt(\"\\\\bf\",\"\",{allowedInText:!0},(t,e)=>({fontSeries:\"b\"})),Lt(\"\\\\bm\",\"{:math*}\",{allowedInText:!0},(t,e)=>({fontSeries:\"b\"})),Lt(\"\\\\bold\",\"\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontSeries:\"b\"})),Lt([\"\\\\mathbf\",\"\\\\boldsymbol\"],\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontSeries:\"b\",fontShape:\"n\"})),Lt(\"\\\\bfseries\",\"\",{allowedInText:!0},(t,e)=>({fontSeries:\"b\"})),Lt(\"\\\\textbf\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontSeries:\"b\"})),Lt(\"\\\\mathmd\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontSeries:\"m\",fontShape:\"n\"})),Lt(\"\\\\mdseries\",\"\",{allowedInText:!0},(t,e)=>({fontSeries:\"m\"})),Lt(\"\\\\textmd\",\"{:math*}\",{allowedInText:!0},(t,e)=>({fontSeries:\"m\"})),Lt(\"\\\\fontshape\",\"{:text}\",{allowedInText:!0},(t,e)=>({fontShape:_t(e[0])})),Lt(\"\\\\it\",\"\",{allowedInText:!0},(t,e)=>({fontShape:\"it\"})),Lt(\"\\\\mathit\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontSeries:\"m\",fontShape:\"it\"})),Lt(\"\\\\upshape\",\"\",{allowedInText:!0},(t,e)=>({fontShape:\"n\"})),Lt(\"\\\\textup\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontShape:\"n\"})),Lt(\"\\\\textit\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontShape:\"it\"})),Lt(\"\\\\slshape\",\"\",{allowedInText:!0},(t,e)=>({fontShape:\"sl\"})),Lt(\"\\\\textsl\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontShape:\"sl\"})),Lt(\"\\\\scshape\",\"\",{allowedInText:!0},(t,e)=>({mode:\"text\",fontShape:\"sc\"})),Lt(\"\\\\textsc\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontShape:\"sc\"})),Lt(\"\\\\fontfamily\",\"{:text}\",{allowedInText:!0},(t,e)=>({fontFamily:_t(e[0])})),Lt(\"\\\\mathrm\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontFamily:\"cmr\",fontSeries:\"m\",fontShape:\"n\"})),Lt(\"\\\\rmfamily\",\"\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmr\"})),Lt(\"\\\\textrm\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmr\"})),Lt(\"\\\\mathsf\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontFamily:\"cmss\",fontSeries:\"m\",fontShape:\"n\"})),Lt(\"\\\\sffamily\",\"\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmss\"})),Lt(\"\\\\textsf\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmss\"})),Lt(\"\\\\mathtt\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontFamily:\"cmtt\",fontSeries:\"m\",fontShape:\"n\"})),Lt(\"\\\\ttfamily\",\"\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmtt\"})),Lt(\"\\\\texttt\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmtt\"})),Lt([\"\\\\Bbb\",\"\\\\mathbb\"],\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontFamily:\"bb\"})),Lt([\"\\\\frak\",\"\\\\mathfrak\"],\"{:math*}\",{allowedInText:!0},(t,e)=>({fontFamily:\"frak\"})),Lt(\"\\\\mathcal\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontFamily:\"cal\",fontSeries:\"m\",fontShape:\"n\"})),Lt(\"\\\\mathscr\",\"{:math*}\",{allowedInText:!0},(t,e)=>({mode:\"math\",fontFamily:\"scr\",fontSeries:\"m\",fontShape:\"n\"})),lt(nt,\"\\\\mathbb\"),lt(1081,\"\\\\Bbb\"),lt(0,\"\\\\mathcal\"),lt(ot,\"\\\\mathfrak\"),lt(271,\"\\\\frak\"),lt(ot,\"\\\\mathscr\"),lt(\"UNCOMMON\",\"\\\\mathsf\"),lt(ot,\"\\\\mathtt\"),lt(ot,\"\\\\boldsymbol\"),Lt(\"\\\\textnormal\",\"{:text*}\",{allowedInText:!0},(t,e)=>({fontFamily:\"cmr\",fontShape:\"n\",fontSeries:\"n\"})),Lt(\"\\\\mbox\",\"{:text*}\",null,(t,e)=>({fontFamily:\"cmr\"})),Lt(\"\\\\text\",\"{:text*}\",{allowedInText:!0},(t,e)=>({})),Lt(\"\\\\class\",\"{name:text}{content:auto*}\",{allowedInText:!0},(t,e)=>({cssClass:_t(e[0])})),Lt(\"\\\\cssId\",\"{id:text}{content:auto}\",{allowedInText:!0},(t,e)=>({cssId:_t(e[0]),body:e[1],type:\"group\"})),Lt(\"\\\\em\",\"\",{allowedInText:!0},(t,e)=>({cssClass:\"ML__emph\",type:\"group\"})),Lt(\"\\\\emph\",\"{:auto}\",{allowedInText:!0},(t,e)=>({cssClass:\"ML__emph\",body:e[0],type:\"group\",skipBoundary:!0})),lt(ot,\"\\\\textrm\"),lt(ot,\"\\\\textit\"),lt(ot,\"\\\\textsf\"),lt(ot,\"\\\\texttt\"),lt(433,\"\\\\textnormal\"),lt(ot,\"\\\\textbf\"),lt(421,\"\\\\textup\"),lt(819,\"\\\\emph\"),lt(49,\"\\\\em\"),tt=\"Operators\",Lt(\"\\\\sqrt\",\"[index:auto]{radicand:auto}\",null,function(t,e){return{type:\"surd\",body:e[1],index:e[0]}}),lt(nt,\"\\\\sqrt\"),tt=\"Fractions\",Lt([\"\\\\frac\",\"\\\\dfrac\",\"\\\\tfrac\",\"\\\\cfrac\",\"\\\\binom\",\"\\\\dbinom\",\"\\\\tbinom\"],\"{numerator}{denominator}\",null,function(t,e){const i={type:\"genfrac\",numer:e[0],denom:e[1],mathstyle:\"auto\"};switch(t){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(t){case\"\\\\dfrac\":case\"\\\\dbinom\":i.mathstyle=\"displaystyle\";break;case\"\\\\tfrac\":case\"\\\\tbinom\":i.mathstyle=\"textstyle\"}return\"\\\\cfrac\"===t&&(i.continuousFraction=!0),i}),Lt([\"\\\\over\",\"\\\\atop\",\"\\\\choose\"],\"\",{infix:!0},function(t,e){const i=e[0],s=e[1];let a=!1,o=null,n=null;switch(t){case\"\\\\atop\":break;case\"\\\\over\":a=!0;break;case\"\\\\choose\":a=!1,o=\"(\",n=\")\";break;default:throw new Error(\"Unrecognized genfrac command\")}return{type:\"genfrac\",numer:i,denom:s,hasBarLine:a,leftDelim:o,rightDelim:n,mathstyle:\"auto\"}}),lt(21,\"\\\\over\"),lt(12,\"\\\\atop\"),lt(1968,\"\\\\choose\"),Lt([\"\\\\overwithdelims\",\"\\\\atopwithdelims\"],\"{left-delim:delim}{right-delim:delim}\",{infix:!0},function(t,e){return{type:\"genfrac\",numer:e[0],denom:e[1],hasBarLine:!1,leftDelim:e[2],rightDelim:e[3],mathstyle:\"auto\"}}),lt(15,\"\\\\overwithdelims\"),lt(ot,\"\\\\atopwithdelims\"),tt=\"Fractions\",Lt(\"\\\\pdiff\",\"{numerator}{denominator}\",null,function(t,e){return{type:\"genfrac\",numer:e[0],denom:e[1],numerPrefix:\"∂\",denomPrefix:\"∂\",hasBarLine:!0,leftDelim:null,rightDelim:null,mathstyle:\"auto\"}}),tt=\"Quantifiers\",ct(\"\\\\forall\",\"\",xt,\"∀\",nt),ct(\"\\\\exists\",\"\",xt,\"∃\",nt),ct(\"\\\\nexists\",yt,xt,\"∄\",nt),ct(\"\\\\mid\",\"\",vt,\"∣\",ot),ct(\"\\\\top\",\"\",xt,\"⊤\",\"RARE\"),ct(\"\\\\bot\",\"\",xt,\"⊥\",\"RARE\"),tt=\"Variable Sized Symbols\",Lt([\"\\\\sum\",\"\\\\prod\",\"\\\\bigcup\",\"\\\\bigcap\",\"\\\\coprod\",\"\\\\bigvee\",\"\\\\bigwedge\",\"\\\\biguplus\",\"\\\\bigotimes\",\"\\\\bigoplus\",\"\\\\bigodot\",\"\\\\bigsqcup\",\"\\\\smallint\",\"\\\\intop\"],\"\",null,function(t){return{type:\"mop\",limits:\"auto\",symbol:!0,baseFontFamily:\"cmr\",body:{coprod:\"∐\",bigvee:\"⋁\",bigwedge:\"⋀\",biguplus:\"⨄\",bigcap:\"⋂\",bigcup:\"⋃\",intop:\"∫\",prod:\"∏\",sum:\"∑\",bigotimes:\"⨂\",bigoplus:\"⨁\",bigodot:\"⨀\",bigsqcup:\"⨆\",smallint:\"∫\"}[t.slice(1)]}}),Lt([\"\\\\int\",\"\\\\iint\",\"\\\\iiint\",\"\\\\oint\",\"\\\\oiint\",\"\\\\oiiint\",\"\\\\intclockwise\",\"\\\\varointclockwise\",\"\\\\ointctrclockwise\",\"\\\\intctrclockwise\"],\"\",null,function(t){return{type:\"mop\",limits:\"nolimits\",symbol:!0,body:{int:\"∫\",iint:\"∬\",iiint:\"∭\",oint:\"∮\",oiint:\"∯\",oiiint:\"∰\",intclockwise:\"∱\",varointclockwise:\"∲\",ointctrclockwise:\"∳\",intctrclockwise:\"⨑\"}[t.slice(1)]}}),lt(nt,\"\\\\sum\",\"\\\\prod\",\"\\\\bigcap\",\"\\\\bigcup\",\"\\\\int\"),lt(ot,\"\\\\bigoplus\",\"\\\\smallint\",\"\\\\iint\",\"\\\\oint\"),lt(\"RARE\",\"\\\\bigwedge\",\"\\\\bigvee\"),lt(756,\"\\\\coprod\"),lt(723,\"\\\\bigsqcup\"),lt(1241,\"\\\\bigotimes\"),lt(150,\"\\\\bigodot\"),lt(174,\"\\\\biguplus\"),lt(878,\"\\\\iiint\"),lt(97,\"\\\\intop\"),tt=\"Various\",ct(\"\\\\sharp\",\"\",xt,\"♯\",ot),ct(\"\\\\flat\",\"\",xt,\"♭\",590),ct(\"\\\\natural\",\"\",xt,\"♮\",278),ct(\"\\\\#\",\"\",xt,\"#\",\"RARE\"),ct(\"\\\\&\",\"\",xt,\"&\",\"RARE\"),ct(\"\\\\clubsuit\",\"\",xt,\"♣\",172),ct(\"\\\\heartsuit\",\"\",xt,\"♡\",\"ARCANE\"),ct(\"\\\\spadesuit\",\"\",xt,\"♠\",\"ARCANE\"),ct(\"\\\\diamondsuit\",\"\",xt,\"♢\",at),ct(\"\\\\differencedelta\",\"\",vt,\"∆\",ot),tt=\"Letters and Letter Like Forms\",Lt(\"\\\\unicode\",\"{charcode:number}\",null,function(t,e){let i=parseInt(e[0]);return isFinite(i)||(i=10067),{type:\"mord\",body:String.fromCodePoint(i)}}),ct(\"\\\\backslash\",\"\",xt,\"\\\\\"),ct(\"?\",\"\",xt,\"?\"),ct(\"!\",\"\",xt,\"!\"),ct(\"\\\\nabla\",\"\",xt,\"∇\",nt),ct(\"\\\\partial\",\"\",xt,\"∂\",nt),ct(\"\\\\ell\",\"\",xt,\"ℓ\",ot),ct(\"\\\\imaginaryI\",\"\",xt,\"i\"),ct(\"\\\\imaginaryJ\",\"\",xt,\"j\"),Lt([\"\\\\Re\",\"\\\\Im\"],\"\",null,function(t){return{type:\"mop\",limits:\"nolimits\",symbol:!1,isFunction:!0,body:{\"\\\\Re\":\"ℜ\",\"\\\\Im\":\"ℑ\"}[t],baseFontFamily:\"frak\"}}),ct(\"\\\\hbar\",\"\",xt,\"ℏ\",ot),ct(\"\\\\hslash\",yt,xt,\"ℏ\",ot),ct(\"\\\\differentialD\",\"cmr\",xt,\"d\"),ct(\"\\\\rd\",\"cmr\",xt,\"d\"),ct(\"\\\\capitalDifferentialD\",\"cmr\",xt,\"D\"),ct(\"\\\\rD\",\"cmr\",xt,\"D\"),ct(\"\\\\exponentialE\",\"cmr\",xt,\"e\"),ct(\"\\\\Finv\",yt,xt,\"Ⅎ\",3),ct(\"\\\\Game\",yt,xt,\"⅁\",1),ct(\"\\\\wp\",\"\",xt,\"℘\",1306),ct(\"\\\\eth\",yt,xt,\"ð\",77),ct(\"\\\\mho\",yt,xt,\"℧\",138),ct(\"\\\\Bbbk\",yt,xt,\"k\"),ct(\"\\\\doubleStruckCapitalN\",\"bb\",xt,\"N\"),ct(\"\\\\N\",\"bb\",xt,\"N\"),ct(\"\\\\doubleStruckCapitalR\",\"bb\",xt,\"R\"),ct(\"\\\\R\",\"bb\",xt,\"R\"),ct(\"\\\\doubleStruckCapitalQ\",\"bb\",xt,\"Q\"),ct(\"\\\\Q\",\"bb\",xt,\"Q\"),ct(\"\\\\doubleStruckCapitalC\",\"bb\",xt,\"C\"),ct(\"\\\\C\",\"bb\",xt,\"C\"),ct(\"\\\\doubleStruckCapitalZ\",\"bb\",xt,\"Z\"),ct(\"\\\\Z\",\"bb\",xt,\"Z\"),ct(\"\\\\doubleStruckCapitalP\",\"bb\",xt,\"P\"),ct(\"\\\\P\",\"bb\",xt,\"P\"),ct(\"\\\\scriptCapitalE\",\"scr\",xt,\"E\"),ct(\"\\\\scriptCapitalH\",\"scr\",xt,\"H\"),ct(\"\\\\scriptCapitalL\",\"scr\",xt,\"L\"),ct(\"\\\\gothicCapitalC\",\"frak\",xt,\"C\"),ct(\"\\\\gothicCapitalH\",\"frak\",xt,\"H\"),ct(\"\\\\gothicCapitalI\",\"frak\",xt,\"I\"),ct(\"\\\\gothicCapitalR\",\"frak\",xt,\"R\"),ct(\"\\\\pounds\",\"\",xt,\"£\",509),ct(\"\\\\yen\",yt,xt,\"¥\",57),ct(\"\\\\euro\",\"\",xt,\"€\",4),tt=\"Crosses\",ct(\"\\\\textdagger\",\"\",kt,\"†\"),ct(\"\\\\dagger\",\"\",kt,\"†\",ot),ct(\"\\\\dag\",\"\",kt,\"†\",ot),ct(\"\\\\ddag\",\"\",kt,\"‡\",500),ct(\"\\\\textdaggerdbl\",\"\",kt,\"‡\"),ct(\"\\\\ddagger\",\"\",kt,\"‡\",353),ct(\"\\\\maltese\",yt,xt,\"✠\",24),tt=\"Arrows\",ct(\"\\\\longrightarrow\",\"\",vt,\"⟶\",nt),ct(\"\\\\rightarrow\",\"\",vt,\"→\",nt),ct(\"\\\\Longrightarrow\",\"\",vt,\"⟹\",nt),ct(\"\\\\Rightarrow\",\"\",vt,\"⇒\",nt),ct(\"\\\\longmapsto\",\"\",vt,\"⟼\",ot),ct(\"\\\\mapsto\",\"\",vt,\"↦\",ot),ct(\"\\\\Longleftrightarrow\",\"\",vt,\"⟺\",ot),ct(\"\\\\rightleftarrows\",yt,vt,\"⇄\",ot),ct(\"\\\\leftarrow\",\"\",vt,\"←\",ot),ct(\"\\\\curvearrowleft\",yt,vt,\"↶\",ot),ct(\"\\\\uparrow\",\"\",vt,\"↑\",ot),ct(\"\\\\downarrow\",\"\",vt,\"↓\",ot),ct(\"\\\\hookrightarrow\",\"\",vt,\"↪\",ot),ct(\"\\\\rightharpoonup\",\"\",vt,\"⇀\",ot),ct(\"\\\\rightleftharpoons\",\"\",vt,\"⇌\",ot),ct(\"\\\\Leftarrow\",\"\",vt,\"⇐\",1695),ct(\"\\\\longleftrightarrow\",\"\",vt,\"⟷\",1599),ct(\"\\\\longleftarrow\",\"\",vt,\"⟵\",878),ct(\"\\\\Longleftarrow\",\"\",vt,\"⟸\",296),ct(\"\\\\searrow\",\"\",vt,\"↘\",1609),ct(\"\\\\nearrow\",\"\",vt,\"↗\",1301),ct(\"\\\\swarrow\",\"\",vt,\"↙\",167),ct(\"\\\\nwarrow\",\"\",vt,\"↖\",108),ct(\"\\\\Uparrow\",\"\",vt,\"⇑\",257),ct(\"\\\\Downarrow\",\"\",vt,\"⇓\",556),ct(\"\\\\updownarrow\",\"\",vt,\"↕\",192),ct(\"\\\\Updownarrow\",\"\",vt,\"⇕\",161),ct(\"\\\\hookleftarrow\",\"\",vt,\"↩\",115),ct(\"\\\\leftharpoonup\",\"\",vt,\"↼\",93),ct(\"\\\\leftharpoondown\",\"\",vt,\"↽\",42),ct(\"\\\\rightharpoondown\",\"\",vt,\"⇁\",80),ct(\"\\\\leftrightarrows\",yt,vt,\"⇆\",765),ct(\"\\\\dashrightarrow\",yt,vt,\"⇢\",311),ct(\"\\\\dashleftarrow\",yt,vt,\"⇠\",5),ct(\"\\\\leftleftarrows\",yt,vt,\"⇇\",8),ct(\"\\\\Lleftarrow\",yt,vt,\"⇚\",7),ct(\"\\\\twoheadleftarrow\",yt,vt,\"↞\",32),ct(\"\\\\leftarrowtail\",yt,vt,\"↢\",25),ct(\"\\\\looparrowleft\",yt,vt,\"↫\",6),ct(\"\\\\leftrightharpoons\",yt,vt,\"⇋\",205),ct(\"\\\\circlearrowleft\",yt,vt,\"↺\",105),ct(\"\\\\Lsh\",yt,vt,\"↰\",11),ct(\"\\\\upuparrows\",yt,vt,\"⇈\",15),ct(\"\\\\downharpoonleft\",yt,vt,\"⇃\",21),ct(\"\\\\multimap\",yt,vt,\"⊸\",108),ct(\"\\\\leftrightsquigarrow\",yt,vt,\"↭\",31),ct(\"\\\\twoheadrightarrow\",yt,vt,\"↠\",835),ct(\"\\\\rightarrowtail\",yt,vt,\"↣\",195),ct(\"\\\\looparrowright\",yt,vt,\"↬\",37),ct(\"\\\\curvearrowright\",yt,vt,\"↷\",209),ct(\"\\\\circlearrowright\",yt,vt,\"↻\",63),ct(\"\\\\Rsh\",yt,vt,\"↱\",18),ct(\"\\\\downdownarrows\",yt,vt,\"⇊\",6),ct(\"\\\\upharpoonright\",yt,vt,\"↾\",579),ct(\"\\\\downharpoonright\",yt,vt,\"⇂\",39),ct(\"\\\\rightsquigarrow\",yt,vt,\"⇝\",674),ct(\"\\\\leadsto\",yt,vt,\"⇝\",709),ct(\"\\\\Rrightarrow\",yt,vt,\"⇛\",62),ct(\"\\\\restriction\",yt,vt,\"↾\",29),ct(\"\\\\upharpoonleft\",yt,vt,\"↿\",at),ct(\"\\\\rightrightarrows\",yt,vt,\"⇉\",at),tt=\"Negated Arrows\",ct(\"\\\\nrightarrow\",yt,vt,\"↛\",324),ct(\"\\\\nRightarrow\",yt,vt,\"⇏\",107),ct(\"\\\\nleftrightarrow\",yt,vt,\"↮\",36),ct(\"\\\\nLeftrightarrow\",yt,vt,\"⇎\",20),ct(\"\\\\nleftarrow\",yt,vt,\"↚\",7),ct(\"\\\\nLeftarrow\",yt,vt,\"⇍\",5),tt=\"Negated Relations\",ct(\"\\\\nless\",yt,vt,\"≮\",146),ct(\"\\\\nleqslant\",yt,vt,\"\",58),ct(\"\\\\lneq\",yt,vt,\"⪇\",54),ct(\"\\\\lneqq\",yt,vt,\"≨\",36),ct(\"\\\\nleqq\",yt,vt,\"\",18),ct(\"\\\\unlhd\",yt,kt,\"⊴\",253),ct(\"\\\\unrhd\",yt,kt,\"⊵\",66),ct(\"\\\\lvertneqq\",yt,vt,\"\",6),ct(\"\\\\lnsim\",yt,vt,\"⋦\",4),ct(\"\\\\lnapprox\",yt,vt,\"⪉\",at),ct(\"\\\\nprec\",yt,vt,\"⊀\",71),ct(\"\\\\npreceq\",yt,vt,\"⋠\",57),ct(\"\\\\precnsim\",yt,vt,\"⋨\",4),ct(\"\\\\precnapprox\",yt,vt,\"⪹\",2),ct(\"\\\\nsim\",yt,vt,\"≁\",40),ct(\"\\\\nshortmid\",yt,vt,\"\",1),ct(\"\\\\nmid\",yt,vt,\"∤\",417),ct(\"\\\\nvdash\",yt,vt,\"⊬\",266),ct(\"\\\\nvDash\",yt,vt,\"⊭\",405),ct(\"\\\\ngtr\",yt,vt,\"≯\",90),ct(\"\\\\ngeqslant\",yt,vt,\"\",23),ct(\"\\\\ngeqq\",yt,vt,\"\",12),ct(\"\\\\gneq\",yt,vt,\"⪈\",29),ct(\"\\\\gneqq\",yt,vt,\"≩\",35),ct(\"\\\\gvertneqq\",yt,vt,\"\",6),ct(\"\\\\gnsim\",yt,vt,\"⋧\",3),ct(\"\\\\gnapprox\",yt,vt,\"⪊\",at),ct(\"\\\\nsucc\",yt,vt,\"⊁\",44),ct(\"\\\\nsucceq\",yt,vt,\"⋡\",at),ct(\"\\\\succnsim\",yt,vt,\"⋩\",4),ct(\"\\\\succnapprox\",yt,vt,\"⪺\",at),ct(\"\\\\ncong\",yt,vt,\"≆\",128),ct(\"\\\\nshortparallel\",yt,vt,\"\",6),ct(\"\\\\nparallel\",yt,vt,\"∦\",54),ct(\"\\\\nVDash\",yt,vt,\"⊯\",5),ct(\"\\\\nsupseteqq\",yt,vt,\"\",1),ct(\"\\\\supsetneq\",yt,vt,\"⊋\",286),ct(\"\\\\varsupsetneq\",yt,vt,\"\",2),ct(\"\\\\supsetneqq\",yt,vt,\"⫌\",49),ct(\"\\\\varsupsetneqq\",yt,vt,\"\",3),ct(\"\\\\nVdash\",yt,vt,\"⊮\",179),ct(\"\\\\precneqq\",yt,vt,\"⪵\",11),ct(\"\\\\succneqq\",yt,vt,\"⪶\",3),ct(\"\\\\nsubseteqq\",yt,vt,\"\",16),tt=\"Various\",ct(\"\\\\checkmark\",yt,xt,\"✓\",1025),ct(\"\\\\diagup\",yt,xt,\"╱\",440),ct(\"\\\\diagdown\",yt,xt,\"╲\",175),ct(\"\\\\measuredangle\",yt,xt,\"∡\",271),ct(\"\\\\sphericalangle\",yt,xt,\"∢\",156),ct(\"\\\\backprime\",yt,xt,\"‵\",104),ct(\"\\\\backdoubleprime\",yt,xt,\"‶\",at),tt=\"Shapes\",ct(\"\\\\ast\",\"\",kt,\"∗\",nt),ct(\"\\\\star\",\"\",kt,\"⋆\",ot),ct(\"\\\\diamond\",\"\",kt,\"⋄\",1356),ct(\"\\\\Diamond\",yt,xt,\"◊\",695),ct(\"\\\\lozenge\",yt,xt,\"◊\",422),ct(\"\\\\blacklozenge\",yt,xt,\"⧫\",344),ct(\"\\\\bigstar\",yt,xt,\"★\",168),tt=\"Hebrew\",ct(\"\\\\aleph\",\"\",xt,\"ℵ\",1381),ct(\"\\\\beth\",yt,xt,\"ℶ\",54),ct(\"\\\\daleth\",yt,xt,\"ℸ\",43),ct(\"\\\\gimel\",yt,xt,\"ℷ\",36),tt=\"Fences\",ct(\"\\\\lbrace\",\"\",St,\"{\",nt),ct(\"\\\\rbrace\",\"\",wt,\"}\",nt),ct(\"\\\\langle\",\"\",St,\"⟨\",ot),ct(\"\\\\rangle\",\"\",wt,\"⟩\",ot),ct(\"\\\\lfloor\",\"\",St,\"⌊\",ot),ct(\"\\\\rfloor\",\"\",wt,\"⌋\",ot),ct(\"\\\\lceil\",\"\",St,\"⌈\",ot),ct(\"\\\\rceil\",\"\",wt,\"⌉\",ot),ct(\"\\\\vert\",\"\",xt,\"∣\",nt),ct(\"\\\\mvert\",\"\",vt,\"∣\"),ct(\"\\\\lvert\",\"\",St,\"∣\",496),ct(\"\\\\rvert\",\"\",wt,\"∣\",496),ct(\"\\\\|\",\"\",xt,\"∥\"),ct(\"\\\\Vert\",\"\",xt,\"∥\",nt),ct(\"\\\\mVert\",\"\",xt,\"∥\"),ct(\"\\\\lVert\",\"\",St,\"∥\",287),ct(\"\\\\rVert\",\"\",wt,\"∥\",at),ct(\"\\\\lbrack\",\"\",St,\"[\",574),ct(\"\\\\rbrack\",\"\",wt,\"]\",213),ct(\"\\\\{\",\"\",St,\"{\"),ct(\"\\\\}\",\"\",wt,\"}\"),ct(\"(\",\"\",St,\"(\"),ct(\")\",\"\",wt,\")\"),ct(\"[\",\"\",St,\"[\"),ct(\"]\",\"\",wt,\"]\"),ct(\"\\\\ulcorner\",yt,St,\"┌\",296),ct(\"\\\\urcorner\",yt,wt,\"┐\",310),ct(\"\\\\llcorner\",yt,St,\"└\",137),ct(\"\\\\lrcorner\",yt,wt,\"┘\",199),ct(\"\\\\lgroup\",\"\",St,\"⟮\",24),ct(\"\\\\rgroup\",\"\",wt,\"⟯\",24),ct(\"\\\\lmoustache\",\"\",St,\"⎰\",at),ct(\"\\\\rmoustache\",\"\",wt,\"⎱\",at),Lt([\"\\\\middle\"],\"{:delim}\",null,function(t,e){return{type:\"delim\",delim:e[0]}}),tt=\"Sizing\";const Ft={\"\\\\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 Dt(t){let e=\"\",i=!0;for(const s of t)\"string\"==typeof s.body?e+=s.body:i=!1;return i?e:\"\"}Lt([\"\\\\bigl\",\"\\\\Bigl\",\"\\\\biggl\",\"\\\\Biggl\",\"\\\\bigr\",\"\\\\Bigr\",\"\\\\biggr\",\"\\\\Biggr\",\"\\\\bigm\",\"\\\\Bigm\",\"\\\\biggm\",\"\\\\Biggm\",\"\\\\big\",\"\\\\Big\",\"\\\\bigg\",\"\\\\Bigg\"],\"{:delim}\",null,function(t,e){return{type:\"sizeddelim\",size:Ft[t].size,cls:Ft[t].mclass,delim:e[0]}}),tt=\"Relations\",ct(\"=\",\"\",vt,\"=\",nt),ct(\"\\\\ne\",\"\",vt,\"≠\",nt),ct(\"\\\\neq\",\"\",vt,\"≠\",ot),ct(\"<\",\"\",vt,\"<\",nt),ct(\"\\\\lt\",\"\",vt,\"<\",ot),ct(\">\",\"\",vt,\">\",nt),ct(\"\\\\gt\",\"\",vt,\">\",ot),ct(\"\\\\le\",\"\",vt,\"≤\",ot),ct(\"\\\\ge\",\"\",vt,\"≥\",ot),ct(\"\\\\leqslant\",yt,vt,\"⩽\",nt),ct(\"\\\\geqslant\",yt,vt,\"⩾\",nt),ct(\"\\\\leq\",\"\",vt,\"≤\",ot),ct(\"\\\\geq\",\"\",vt,\"≥\",ot),ct(\"\\\\ll\",\"\",vt,\"≪\"),ct(\"\\\\gg\",\"\",vt,\"≫\",ot),ct(\"\\\\coloneq\",\"\",vt,\"≔\",5),ct(\"\\\\measeq\",\"\",vt,\"≝\"),ct(\"\\\\eqdef\",\"\",vt,\"≞\"),ct(\"\\\\questeq\",\"\",vt,\"≟\"),ct(\":\",\"\",vt,\":\"),ct(\"\\\\cong\",\"\",vt,\"≅\",ot),ct(\"\\\\equiv\",\"\",vt,\"≡\",ot),ct(\"\\\\prec\",\"\",vt,\"≺\",ot),ct(\"\\\\preceq\",\"\",vt,\"⪯\",ot),ct(\"\\\\succ\",\"\",vt,\"≻\",ot),ct(\"\\\\succeq\",\"\",vt,\"⪰\",1916),ct(\"\\\\perp\",\"\",vt,\"⊥\",ot),ct(\"\\\\parallel\",\"\",vt,\"∥\",ot),ct(\"\\\\propto\",\"\",vt,\"∝\",ot),ct(\"\\\\Colon\",\"\",vt,\"∷\"),ct(\"\\\\smile\",\"\",vt,\"⌣\",ot),ct(\"\\\\frown\",\"\",vt,\"⌢\",ot),ct(\"\\\\sim\",\"\",vt,\"∼\",ot),ct(\"\\\\gtrsim\",yt,vt,\"≳\",ot),ct(\"\\\\approx\",\"\",vt,\"≈\",nt),ct(\"\\\\approxeq\",yt,vt,\"≊\",147),ct(\"\\\\thickapprox\",yt,vt,\"≈\",377),ct(\"\\\\lessapprox\",yt,vt,\"⪅\",146),ct(\"\\\\gtrapprox\",yt,vt,\"⪆\",95),ct(\"\\\\precapprox\",yt,vt,\"⪷\",50),ct(\"\\\\succapprox\",yt,vt,\"⪸\",at),ct(\"\\\\thicksim\",yt,vt,\"∼\",779),ct(\"\\\\succsim\",yt,vt,\"≿\",251),ct(\"\\\\precsim\",yt,vt,\"≾\",104),ct(\"\\\\backsim\",yt,vt,\"∽\",251),ct(\"\\\\eqsim\",yt,vt,\"≂\",62),ct(\"\\\\backsimeq\",yt,vt,\"⋍\",91),ct(\"\\\\simeq\",\"\",vt,\"≃\",at),ct(\"\\\\lesssim\",yt,vt,\"≲\",at),ct(\"\\\\nleq\",yt,vt,\"≰\",369),ct(\"\\\\ngeq\",yt,vt,\"≱\",164),ct(\"\\\\smallsmile\",yt,vt,\"⌣\",31),ct(\"\\\\smallfrown\",yt,vt,\"⌢\",71),ct(\"\\\\bowtie\",\"\",vt,\"⋈\",558),ct(\"\\\\asymp\",\"\",vt,\"≍\",755),ct(\"\\\\sqsubseteq\",\"\",vt,\"⊑\",1255),ct(\"\\\\sqsupseteq\",\"\",vt,\"⊒\",183),ct(\"\\\\leqq\",yt,vt,\"≦\",1356),ct(\"\\\\eqslantless\",yt,vt,\"⪕\",15),ct(\"\\\\lll\",yt,vt,\"⋘\",157),ct(\"\\\\lessgtr\",yt,vt,\"≶\",281),ct(\"\\\\lesseqgtr\",yt,vt,\"⋚\",134),ct(\"\\\\lesseqqgtr\",yt,vt,\"⪋\",at),ct(\"\\\\risingdotseq\",yt,vt,\"≓\",8),ct(\"\\\\fallingdotseq\",yt,vt,\"≒\",99),ct(\"\\\\subseteqq\",yt,vt,\"⫅\",82),ct(\"\\\\Subset\",yt,vt,\"⋐\"),ct(\"\\\\sqsubset\",yt,vt,\"⊏\",309),ct(\"\\\\preccurlyeq\",yt,vt,\"≼\",549),ct(\"\\\\curlyeqprec\",yt,vt,\"⋞\",14),ct(\"\\\\vDash\",yt,vt,\"⊨\",646),ct(\"\\\\Vvdash\",yt,vt,\"⊪\",20),ct(\"\\\\bumpeq\",yt,vt,\"≏\",13),ct(\"\\\\Bumpeq\",yt,vt,\"≎\",12),ct(\"\\\\geqq\",yt,vt,\"≧\",972),ct(\"\\\\eqslantgtr\",yt,vt,\"⪖\",13),ct(\"\\\\ggg\",yt,vt,\"⋙\",127),ct(\"\\\\gtrless\",yt,vt,\"≷\",417),ct(\"\\\\gtreqless\",yt,vt,\"⋛\",190),ct(\"\\\\gtreqqless\",yt,vt,\"⪌\",91),ct(\"\\\\supseteqq\",yt,vt,\"⫆\",6),ct(\"\\\\Supset\",yt,vt,\"⋑\",34),ct(\"\\\\sqsupset\",yt,vt,\"⊐\",71),ct(\"\\\\succcurlyeq\",yt,vt,\"≽\",442),ct(\"\\\\curlyeqsucc\",yt,vt,\"⋟\",10),ct(\"\\\\Vdash\",yt,vt,\"⊩\",276),ct(\"\\\\shortmid\",yt,vt,\"∣\",67),ct(\"\\\\shortparallel\",yt,vt,\"∥\",17),ct(\"\\\\between\",yt,vt,\"≬\",110),ct(\"\\\\pitchfork\",yt,vt,\"⋔\",66),ct(\"\\\\varpropto\",yt,vt,\"∝\",203),ct(\"\\\\backepsilon\",yt,vt,\"∍\",176),ct(\"\\\\llless\",yt,vt,\"⋘\",at),ct(\"\\\\gggtr\",yt,vt,\"⋙\",at),ct(\"\\\\lhd\",yt,kt,\"⊲\",447),ct(\"\\\\rhd\",yt,kt,\"⊳\",338),ct(\"\\\\Join\",\"\",vt,\"⋈\",35),ct(\"\\\\doteq\",\"\",vt,\"≐\",1450),ct(\"\\\\doteqdot\",yt,vt,\"≑\",60),ct(\"\\\\Doteq\",yt,vt,\"≑\",at),ct(\"\\\\eqcirc\",yt,vt,\"≖\",6),ct(\"\\\\circeq\",yt,vt,\"≗\",31),ct(\"\\\\lessdot\",yt,kt,\"⋖\",88),ct(\"\\\\gtrdot\",yt,kt,\"⋗\",45),ct(\"\\\\~\",\"\",vt,\"~\"),tt=\"Logic\",ct(\"\\\\leftrightarrow\",\"\",vt,\"↔\",nt),ct(\"\\\\Leftrightarrow\",\"\",vt,\"⇔\",nt),ct(\"\\\\to\",\"\",vt,\"→\",nt),ct(\"\\\\models\",\"\",vt,\"⊨\",ot),ct(\"\\\\vdash\",\"\",vt,\"⊢\",ot),ct(\"\\\\therefore\",yt,vt,\"∴\",1129),ct(\"\\\\because\",yt,vt,\"∵\",388),ct(\"\\\\implies\",\"\",vt,\"⟹\",1858),ct(\"\\\\gets\",\"\",vt,\"←\",150),ct(\"\\\\dashv\",\"\",vt,\"⊣\",299),ct(\"\\\\impliedby\",\"\",vt,\"⟸\",at),ct(\"\\\\biconditional\",\"\",vt,\"⟷\",at),ct(\"\\\\roundimplies\",\"\",vt,\"⥰\",at),tt=\"Operators\",ct(\"+\",\"\",kt,\"+\",nt),ct(\"-\",\"\",kt,\"−\",nt),ct(\"−\",\"\",kt,\"−\",nt),ct(\"\\\\pm\",\"\",kt,\"±\",ot),ct(\"\\\\mp\",\"\",kt,\"∓\",ot),ct(\"*\",\"\",kt,\"∗\",ot),ct(\"\\\\times\",\"\",kt,\"×\",ot),ct(\"\\\\div\",\"\",kt,\"÷\",ot),ct(\"\\\\surd\",\"\",xt,\"√\",ot),ct(\"\\\\divides\",\"\",kt,\"∣\",at),ct(\"\\\\ltimes\",yt,kt,\"⋉\",576),ct(\"\\\\rtimes\",yt,kt,\"⋊\",946),ct(\"\\\\leftthreetimes\",yt,kt,\"⋋\",34),ct(\"\\\\rightthreetimes\",yt,kt,\"⋌\",14),ct(\"\\\\intercal\",yt,kt,\"⊺\",478),ct(\"\\\\dotplus\",yt,kt,\"∔\",81),ct(\"\\\\centerdot\",yt,kt,\"⋅\",271),ct(\"\\\\doublebarwedge\",yt,kt,\"⩞\",5),ct(\"\\\\divideontimes\",yt,kt,\"⋇\",51),ct(\"\\\\cdot\",\"\",kt,\"⋅\",at),tt=\"Others\",ct(\"\\\\infty\",\"\",xt,\"∞\",nt),ct(\"\\\\prime\",\"\",bt,\"′\",nt),ct(\"\\\\doubleprime\",\"\",xt,\"″\"),ct(\"\\\\angle\",\"\",xt,\"∠\",ot),ct(\"`\",\"\",xt,\"‘\"),ct(\"\\\\$\",\"\",xt,\"$\"),ct(\"\\\\%\",\"\",xt,\"%\"),ct(\"\\\\_\",\"\",xt,\"_\"),tt=\"Greek\",ct(\"\\\\alpha\",\"\",bt,\"α\",ot),ct(\"\\\\beta\",\"\",bt,\"β\",ot),ct(\"\\\\gamma\",\"\",bt,\"γ\",ot),ct(\"\\\\delta\",\"\",bt,\"δ\",ot),ct(\"\\\\epsilon\",\"\",bt,\"ϵ\",ot),ct(\"\\\\varepsilon\",\"\",bt,\"ε\"),ct(\"\\\\zeta\",\"\",bt,\"ζ\",ot),ct(\"\\\\eta\",\"\",bt,\"η\",ot),ct(\"\\\\theta\",\"\",bt,\"θ\",ot),ct(\"\\\\vartheta\",\"\",bt,\"ϑ\",ot),ct(\"\\\\iota\",\"\",bt,\"ι\",ot),ct(\"\\\\kappa\",\"\",bt,\"κ\",ot),ct(\"\\\\varkappa\",yt,bt,\"ϰ\",ot),ct(\"\\\\lambda\",\"\",bt,\"λ\",ot),ct(\"\\\\mu\",\"\",bt,\"μ\",ot),ct(\"\\\\nu\",\"\",bt,\"ν\",ot),ct(\"\\\\xi\",\"\",bt,\"ξ\",ot),ct(\"\\\\omicron\",\"\",bt,\"o\"),ct(\"\\\\pi\",\"\",bt,\"π\",ot),ct(\"\\\\varpi\",\"\",bt,\"ϖ\",ot),ct(\"\\\\rho\",\"\",bt,\"ρ\",ot),ct(\"\\\\varrho\",\"\",bt,\"ϱ\",ot),ct(\"\\\\sigma\",\"\",bt,\"σ\",ot),ct(\"\\\\varsigma\",\"\",bt,\"ς\",ot),ct(\"\\\\tau\",\"\",bt,\"τ\",ot),ct(\"\\\\phi\",\"\",bt,\"ϕ\",ot),ct(\"\\\\varphi\",\"\",bt,\"φ\",ot),ct(\"\\\\upsilon\",\"\",bt,\"υ\",ot),ct(\"\\\\chi\",\"\",bt,\"χ\",ot),ct(\"\\\\psi\",\"\",bt,\"ψ\",ot),ct(\"\\\\omega\",\"\",bt,\"ω\",ot),ct(\"\\\\Gamma\",\"\",bt,\"Γ\",ot),ct(\"\\\\Delta\",\"\",bt,\"Δ\",ot),ct(\"\\\\Theta\",\"\",bt,\"Θ\",ot),ct(\"\\\\Lambda\",\"\",bt,\"Λ\",ot),ct(\"\\\\Xi\",\"\",bt,\"Ξ\",ot),ct(\"\\\\Pi\",\"\",bt,\"Π\",ot),ct(\"\\\\Sigma\",\"\",bt,\"Σ\",ot),ct(\"\\\\Upsilon\",\"\",bt,\"Υ\",ot),ct(\"\\\\Phi\",\"\",bt,\"Φ\",ot),ct(\"\\\\Psi\",\"\",bt,\"Ψ\",ot),ct(\"\\\\Omega\",\"\",bt,\"Ω\",ot),ct(\"\\\\digamma\",yt,bt,\"ϝ\",248),tt=\"Others\",ct(\"\\\\emptyset\",\"\",xt,\"∅\",nt),ct(\"\\\\varnothing\",yt,xt,\"∅\",nt),tt=\"Set Operators\",ct(\"\\\\cap\",\"\",kt,\"∩\",nt),ct(\"\\\\cup\",\"\",kt,\"∪\",nt),ct(\"\\\\setminus\",\"\",kt,\"∖\",ot),ct(\"\\\\smallsetminus\",yt,kt,\"∖\",254),ct(\"\\\\complement\",yt,xt,\"∁\",200),tt=\"Set Relations\",ct(\"\\\\in\",\"\",vt,\"∈\",nt),ct(\"\\\\notin\",\"\",vt,\"∉\",nt),ct(\"\\\\not\",\"\",vt,\"̸\",ot),ct(\"\\\\ni\",\"\",vt,\"∋\",ot),ct(\"\\\\owns\",\"\",vt,\"∋\",18),ct(\"\\\\subset\",\"\",vt,\"⊂\",nt),ct(\"\\\\supset\",\"\",vt,\"⊃\",nt),ct(\"\\\\subseteq\",\"\",vt,\"⊆\",nt),ct(\"\\\\supseteq\",\"\",vt,\"⊇\",nt),ct(\"\\\\subsetneq\",yt,vt,\"⊊\",1945),ct(\"\\\\varsubsetneq\",yt,vt,\"\",198),ct(\"\\\\subsetneqq\",yt,vt,\"⫋\",314),ct(\"\\\\varsubsetneqq\",yt,vt,\"\",55),ct(\"\\\\nsubset\",yt,vt,\"⊄\",at),ct(\"\\\\nsupset\",yt,vt,\"⊅\",at),ct(\"\\\\nsubseteq\",yt,vt,\"⊈\",950),ct(\"\\\\nsupseteq\",yt,vt,\"⊉\",49),tt=\"Spacing\",ct(\"\\\\ \",\"\",At,\" \"),ct(\"~\",\"\",At,\" \"),ct(\"\\\\space\",\"\",At,\" \"),ct(\"\\\\!\",\"\",At,null),ct(\"\\\\,\",\"\",At,null),ct(\"\\\\:\",\"\",At,null),ct(\"\\\\;\",\"\",At,null),ct(\"\\\\enskip\",\"\",At,null),ct(\"\\\\enspace\",\"\",At,null,672),ct(\"\\\\quad\",\"\",At,null,ot),ct(\"\\\\qquad\",\"\",At,null,ot),Lt([\"\\\\hspace\",\"\\\\hspace*\"],\"{width:skip}\",{allowedInText:!0},function(t,e){return{type:\"spacing\",width:e[0]||0}}),Lt([\"\\\\mathop\",\"\\\\mathbin\",\"\\\\mathrel\",\"\\\\mathopen\",\"\\\\mathclose\",\"\\\\mathpunct\",\"\\\\mathord\",\"\\\\mathinner\"],\"{:auto}\",null,function(t,e){const i={type:{\"\\\\mathop\":\"mop\",\"\\\\mathbin\":\"mbin\",\"\\\\mathrel\":\"mrel\",\"\\\\mathopen\":\"mopen\",\"\\\\mathclose\":\"mclose\",\"\\\\mathpunct\":\"mpunct\",\"\\\\mathord\":\"mord\",\"\\\\mathinner\":\"minner\"}[t],body:Dt(e[0])||e[0],captureSelection:!0,baseFontFamily:\"\\\\mathop\"===t?\"math\":\"\"};return\"\\\\mathop\"===t&&(i.limits=\"nolimits\",i.isFunction=!0),i}),Lt([\"\\\\operatorname\",\"\\\\operatorname*\"],\"{operator:string}\",null,function(t,e){const i={type:\"mop\",skipBoundary:!0,body:e[0],isFunction:!0,baseFontFamily:\"cmr\"};return\"\\\\operatorname\"===t?i.limits=\"nolimits\":\"\\\\operatorname*\"===t&&(i.limits=\"limits\"),i}),tt=\"Punctuation\",ct(\"\\\\colon\",\"\",\"mpunct\",\":\",ot),ct(\"\\\\cdotp\",\"\",\"mpunct\",\"⋅\",ot),ct(\"\\\\ldots\",\"\",\"minner\",\"…\",ot),ct(\"\\\\cdots\",\"\",\"minner\",\"⋯\",ot),ct(\"\\\\ddots\",\"\",\"minner\",\"⋱\",ot),ct(\"\\\\mathellipsis\",\"\",\"minner\",\"…\",91),ct(\"\\\\vdots\",\"\",xt,\"⋮\",ot),ct(\"\\\\ldotp\",\"\",\"mpunct\",\".\",18),ct(\",\",\"\",\"mpunct\",\",\"),ct(\";\",\"\",\"mpunct\",\";\"),tt=\"Logical Operators\",ct(\"\\\\wedge\",\"\",kt,\"∧\",nt),ct(\"\\\\vee\",\"\",kt,\"∨\",nt),ct(\"\\\\lnot\",\"\",xt,\"¬\",ot),ct(\"\\\\neg\",\"\",xt,\"¬\",nt),ct(\"\\\\land\",\"\",kt,\"∧\",659),ct(\"\\\\lor\",\"\",kt,\"∨\",364),ct(\"\\\\barwedge\",yt,kt,\"⊼\",21),ct(\"\\\\veebar\",yt,kt,\"⊻\",43),ct(\"\\\\nor\",yt,kt,\"⊻\",7),ct(\"\\\\curlywedge\",yt,kt,\"⋏\",58),ct(\"\\\\curlyvee\",yt,kt,\"⋎\",57),tt=\"Boxes\",ct(\"\\\\square\",yt,xt,\"□\",ot),ct(\"\\\\Box\",yt,xt,\"□\",ot),ct(\"\\\\blacksquare\",yt,xt,\"■\",1679),ct(\"\\\\boxminus\",yt,kt,\"⊟\",79),ct(\"\\\\boxplus\",yt,kt,\"⊞\",276),ct(\"\\\\boxtimes\",yt,kt,\"⊠\",457),ct(\"\\\\boxdot\",yt,kt,\"⊡\",120),tt=\"Circles\",ct(\"\\\\circ\",\"\",kt,\"∘\",nt),ct(\"\\\\bigcirc\",\"\",kt,\"◯\",903),ct(\"\\\\bullet\",\"\",kt,\"∙\",ot),ct(\"\\\\circleddash\",yt,kt,\"⊝\",ot),ct(\"\\\\circledast\",yt,kt,\"⊛\",339),ct(\"\\\\oplus\",\"\",kt,\"⊕\",ot),ct(\"\\\\ominus\",\"\",kt,\"⊖\",1568),ct(\"\\\\otimes\",\"\",kt,\"⊗\",ot),ct(\"\\\\odot\",\"\",kt,\"⊙\",ot),ct(\"\\\\circledcirc\",yt,kt,\"⊚\",93),ct(\"\\\\oslash\",\"\",kt,\"⊘\",497),ct(\"\\\\circledS\",yt,xt,\"Ⓢ\",31),ct(\"\\\\circledR\",yt,xt,\"®\",1329),tt=\"Triangles\",ct(\"\\\\triangle\",\"\",xt,\"△\",ot),ct(\"\\\\triangleq\",yt,vt,\"≜\",ot),ct(\"\\\\bigtriangleup\",\"\",kt,\"△\",1773),ct(\"\\\\vartriangle\",yt,vt,\"△\",762),ct(\"\\\\triangledown\",yt,xt,\"▽\",520),ct(\"\\\\bigtriangledown\",\"\",kt,\"▽\",661),ct(\"\\\\triangleleft\",\"\",kt,\"◃\",534),ct(\"\\\\vartriangleleft\",yt,vt,\"⊲\",281),ct(\"\\\\trianglelefteq\",yt,vt,\"⊴\",176),ct(\"\\\\ntriangleleft\",yt,vt,\"⋪\",13),ct(\"\\\\ntrianglelefteq\",yt,vt,\"⋬\",22),ct(\"\\\\triangleright\",\"\",kt,\"▹\",516),ct(\"\\\\vartriangleright\",yt,vt,\"⊳\",209),ct(\"\\\\trianglerighteq\",yt,vt,\"⊵\",45),ct(\"\\\\ntriangleright\",yt,vt,\"⋫\",15),ct(\"\\\\ntrianglerighteq\",yt,vt,\"⋭\",6),ct(\"\\\\blacktriangle\",yt,xt,\"▲\",360),ct(\"\\\\blacktriangledown\",yt,xt,\"▼\",159),ct(\"\\\\blacktriangleleft\",yt,vt,\"◀\",101),ct(\"\\\\blacktriangleright\",yt,vt,\"▶\",271),tt=\"Others\",ct(\"\\\\/\",\"\",bt,\"/\"),ct(\"|\",\"\",\"textord\",\"∣\"),tt=\"Big Operators\",ct(\"\\\\sqcup\",\"\",kt,\"⊔\",1717),ct(\"\\\\sqcap\",\"\",kt,\"⊓\",735),ct(\"\\\\uplus\",\"\",kt,\"⊎\",597),ct(\"\\\\wr\",\"\",kt,\"≀\",286),ct(\"\\\\Cap\",yt,kt,\"⋒\",2),ct(\"\\\\Cup\",yt,kt,\"⋓\",2),ct(\"\\\\doublecap\",yt,kt,\"⋒\",1),ct(\"\\\\doublecup\",yt,kt,\"⋓\",1),ct(\"\\\\amalg\",\"\",kt,\"⨿\",at),ct(\"\\\\And\",\"\",kt,\"&\"),tt=\"Accents\",Lt([\"\\\\acute\",\"\\\\grave\",\"\\\\dot\",\"\\\\ddot\",\"\\\\mathring\",\"\\\\tilde\",\"\\\\bar\",\"\\\\breve\",\"\\\\check\",\"\\\\hat\",\"\\\\vec\"],\"{body:auto}\",null,function(t,e){return{type:\"accent\",accent:{\"\\\\acute\":\"ˊ\",\"\\\\grave\":\"ˋ\",\"\\\\dot\":\"˙\",\"\\\\ddot\":\"¨\",\"\\\\mathring\":\"˚\",\"\\\\tilde\":\"~\",\"\\\\bar\":\"ˉ\",\"\\\\breve\":\"˘\",\"\\\\check\":\"ˇ\",\"\\\\hat\":\"ˆ\",\"\\\\vec\":\"⃗\"}[t],limits:\"accent\",skipBoundary:!0,body:e[0]}}),lt(ot,\"\\\\bar\",\"\\\\ddot\",\"\\\\acute\",\"\\\\tilde\",\"\\\\check\"),lt(1548,\"\\\\breve\"),lt(735,\"\\\\grave\"),lt(nt,\"\\\\vec\"),tt=\"Letters and Letter Like Forms\",ct(\"\\\\imath\",\"\",xt,\"ı\"),ct(\"\\\\jmath\",\"\",xt,\"ȷ\"),tt=\"Others\",ct(\"\\\\degree\",\"\",xt,\"°\",46),tt=\"Others\",ct(\"'\",\"\",xt,\"′\"),ct('\"',\"\",xt,\"”\"),tt=\"Others\",Lt(\"\\\\^\",\"{:string}\",{allowedInText:!0},function(t,e){return{type:\"mord\",limits:\"nolimits\",symbol:!0,isFunction:!1,body:e[0]&&{a:\"â\",e:\"ê\",i:\"î\",o:\"ô\",u:\"û\",A:\"Â\",E:\"Ê\",I:\"Î\",O:\"Ô\",U:\"Û\"}[e[0]]||\"^\",baseFontFamily:\"cmr\"}}),Lt(\"\\\\`\",\"{:string}\",{allowedInText:!0},function(t,e){return{type:\"mord\",limits:\"nolimits\",symbol:!0,isFunction:!1,body:e[0]&&{a:\"à\",e:\"è\",i:\"ì\",o:\"ò\",u:\"ù\",A:\"À\",E:\"È\",I:\"Ì\",O:\"Ò\",U:\"Ù\"}[e[0]]||\"`\",baseFontFamily:\"cmr\"}}),Lt(\"\\\\'\",\"{:string}\",{allowedInText:!0},function(t,e){return{type:\"mord\",limits:\"nolimits\",symbol:!0,isFunction:!1,body:e[0]&&{a:\"á\",e:\"é\",i:\"í\",o:\"ó\",u:\"ú\",A:\"Á\",E:\"É\",I:\"Í\",O:\"Ó\",U:\"Ú\"}[e[0]]||\"^\",baseFontFamily:\"cmr\"}}),Lt(\"\\\\~\",\"{:string}\",{allowedInText:!0},function(t,e){return{type:\"mord\",limits:\"nolimits\",symbol:!0,isFunction:!1,body:e[0]&&{n:\"ñ\",N:\"Ñ\",a:\"ã\",o:\"õ\",A:\"Ã\",O:\"Õ\"}[e[0]]||\"´\",baseFontFamily:\"cmr\"}}),Lt(\"\\\\c\",\"{:string}\",{allowedInText:!0},function(t,e){return{type:\"mord\",limits:\"nolimits\",symbol:!0,isFunction:!1,body:e[0]&&{c:\"ç\",C:\"Ç\"}[e[0]]||\"\",baseFontFamily:\"cmr\"}});const zt={\"\\\\#\":\"#\",\"\\\\&\":\"&\",\"\\\\$\":\"$\",\"\\\\%\":\"%\",\"\\\\_\":\"_\",\"\\\\euro\":\"€\",\"\\\\maltese\":\"✠\",\"\\\\{\":\"{\",\"\\\\}\":\"}\",\"\\\\nobreakspace\":\" \",\"\\\\ldots\":\"…\",\"\\\\textellipsis\":\"…\",\"\\\\backslash\":\"\\\\\",\"`\":\"‘\",\"'\":\"’\",\"``\":\"“\",\"''\":\"”\",\"\\\\degree\":\"°\",\"\\\\textasciicircum\":\"^\",\"\\\\textasciitilde\":\"~\",\"\\\\textasteriskcentered\":\"*\",\"\\\\textbackslash\":\"\\\\\",\"\\\\textbraceleft\":\"{\",\"\\\\textbraceright\":\"}\",\"\\\\textbullet\":\"•\",\"\\\\textdollar\":\"$\",\"\\\\textsterling\":\"£\",\"–\":\"–\",\"—\":\"—\",\"‘\":\"‘\",\"’\":\"’\",\"“\":\"“\",\"”\":\"”\",'\"':\"”\",\"\\\\ss\":\"ß\",\"\\\\ae\":\"æ\",\"\\\\oe\":\"œ\",\"\\\\AE\":\"Æ\",\"\\\\OE\":\"Œ\",\"\\\\O\":\"Ø\",\"\\\\i\":\"ı\",\"\\\\j\":\"ȷ\",\"\\\\aa\":\"å\",\"\\\\AA\":\"Å\"},Et=\"undefined\"!=typeof navigator&&/firefox|edge/i.test(navigator.userAgent)?/[a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp(\"\\\\p{Letter}\",\"u\"),qt=\"undefined\"!=typeof navigator&&/firefox|edge/i.test(navigator.userAgent)?/[0-9a-zA-ZаАбБвВгГдДеЕёЁжЖзЗиИйЙкКлЛмМнНоОпПрРсСтТуУфФхХцЦчЧшШщЩъЪыЫьЬэЭюЮяĄąĆćĘꣳŃńÓ󌜏źŻżàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒäöüßÄÖÜẞàèéìíîòóùúÀÈÉÌÍÎÒÓÙÚáéíñóúüÁÉÍÑÓÚÜ]/:new RegExp(\"[0-9\\\\p{Letter}]\",\"u\");var It={matchCodepoint:dt,commandAllowed:function(t,e){return!(!it[e]||\"text\"===t&&!it[e].allowedInText)||!!{text:zt,math:et}[t][e]},unicodeToMathVariant:ft,mathVariantToUnicode:function(t,e,i){if(!/[A-Za-z0-9]/.test(t))return t;if(!e&&!i)return t;const s=t.codePointAt(0);for(let t=0;t=ut[t].offset&&s=1;)s.params.push({optional:!1,type:\"math\",defaultValue:null,placeholder:null}),a-=1}}}else\"math\"===e?s=et[t]:zt[t]&&(s={value:zt[t]});return!s||\"mord\"!==s.type||\"f\"!==s.value&&\"g\"!==s.value&&\"h\"!==s.value||(s.isFunction=!0),s},getValue:function(t,e){return\"math\"===t?et[e]&&et[e].value?et[e].value:e:zt[e]?zt[e]:e},getEnvironmentInfo:function(t){let e=st[t];return e||(e={params:\"\",parser:null,mathstyle:\"displaystyle\",tabular:!0,colFormat:[],lFence:\".\",rFence:\".\"}),e},suggest:function(t){if(t.length<=1)return[];const e=[];for(const i in it)Object.prototype.hasOwnProperty.call(it,i)&&i.startsWith(t)&&!it[i].infix&&e.push({match:i,frequency:it[i].frequency});for(const i in et)Object.prototype.hasOwnProperty.call(et,i)&&i.startsWith(t)&&e.push({match:i,frequency:et[i].frequency});return e.sort((t,e)=>t.frequency===e.frequency?t.match.length-e.match.length:(e.frequency||0)-(t.frequency||0)),e},FREQUENCY_VALUE:rt,TEXT_SYMBOLS:zt,MATH_SYMBOLS:et,ENVIRONMENTS:st,RIGHT_DELIM:{\"(\":\")\",\"{\":\"}\",\"[\":\"]\",\"|\":\"|\",\"\\\\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\"},FUNCTIONS:it,MACROS:{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\"},COMMAND_MODE_CHARACTERS:/[a-zA-Z0-9!@*()-=+{}[\\]\\\\';:?/.,~<>`|'$%#&^_\" ]/,LETTER:Et,LETTER_AND_DIGITS:qt};const Pt=Q.makeSymbol,Bt=Q.makeSpan,Ot=Q.makeVlist;function Rt(t,e,i,s,a,o){const n=Pt(\"Size\"+i+\"-Regular\",It.getValue(\"math\",e)),r=Q.makeStyleWrap(t,Bt(n,\"delimsizing size\"+i),a.mathstyle,O.TEXT,o);return s&&r.setTop((1-a.mathstyle.sizeMultiplier)*a.mathstyle.metrics.axisHeight),r.setStyle(\"color\",a.color),\"number\"==typeof a.opacity&&r.setStyle(\"opacity\",a.opacity),r}function Kt(t,e){let i=\"\";return\"Size1-Regular\"===e?i=\" delim-size1\":\"Size4-Regular\"===e&&(i=\" delim-size4\"),Bt(Pt(e,It.getValue(\"math\",t)),\"delimsizinginner\"+i)}function Nt(t,e,i,s,a,o){let n,r,l,c;n=l=c=It.getValue(\"math\",e),r=null;let h=\"Size1-Regular\";\"\\\\vert\"===e||\"\\\\lvert\"===e||\"\\\\rvert\"===e||\"\\\\mvert\"===e||\"\\\\mid\"===e?l=n=c=\"∣\":\"\\\\Vert\"===e||\"\\\\lVert\"===e||\"\\\\rVert\"===e||\"\\\\mVert\"===e||\"\\\\|\"===e?l=n=c=\"∥\":\"\\\\uparrow\"===e?l=c=\"⏐\":\"\\\\Uparrow\"===e?l=c=\"‖\":\"\\\\downarrow\"===e?n=l=\"⏐\":\"\\\\Downarrow\"===e?n=l=\"‖\":\"\\\\updownarrow\"===e?(n=\"↑\",l=\"⏐\",c=\"↓\"):\"\\\\Updownarrow\"===e?(n=\"⇑\",l=\"‖\",c=\"⇓\"):\"[\"===e||\"\\\\lbrack\"===e?(n=\"⎡\",l=\"⎢\",c=\"⎣\",h=\"Size4-Regular\"):\"]\"===e||\"\\\\rbrack\"===e?(n=\"⎤\",l=\"⎥\",c=\"⎦\",h=\"Size4-Regular\"):\"\\\\lfloor\"===e?(l=n=\"⎢\",c=\"⎣\",h=\"Size4-Regular\"):\"\\\\lceil\"===e?(n=\"⎡\",l=c=\"⎢\",h=\"Size4-Regular\"):\"\\\\rfloor\"===e?(l=n=\"⎥\",c=\"⎦\",h=\"Size4-Regular\"):\"\\\\rceil\"===e?(n=\"⎤\",l=c=\"⎥\",h=\"Size4-Regular\"):\"(\"===e?(n=\"⎛\",l=\"⎜\",c=\"⎝\",h=\"Size4-Regular\"):\")\"===e?(n=\"⎞\",l=\"⎟\",c=\"⎠\",h=\"Size4-Regular\"):\"\\\\{\"===e||\"\\\\lbrace\"===e?(n=\"⎧\",r=\"⎨\",c=\"⎩\",l=\"⎪\",h=\"Size4-Regular\"):\"\\\\}\"===e||\"\\\\rbrace\"===e?(n=\"⎫\",r=\"⎬\",c=\"⎭\",l=\"⎪\",h=\"Size4-Regular\"):\"\\\\lgroup\"===e?(n=\"⎧\",c=\"⎩\",l=\"⎪\",h=\"Size4-Regular\"):\"\\\\rgroup\"===e?(n=\"⎫\",c=\"⎭\",l=\"⎪\",h=\"Size4-Regular\"):\"\\\\lmoustache\"===e?(n=\"⎧\",c=\"⎭\",l=\"⎪\",h=\"Size4-Regular\"):\"\\\\rmoustache\"===e?(n=\"⎫\",c=\"⎩\",l=\"⎪\",h=\"Size4-Regular\"):\"\\\\surd\"===e?(n=\"\",c=\"⎷\",l=\"\",h=\"Size4-Regular\"):\"\\\\ulcorner\"===e?(n=\"┌\",l=c=\" \"):\"\\\\urcorner\"===e?(n=\"┐\",l=c=\" \"):\"\\\\llcorner\"===e?(c=\"└\",l=n=\" \"):\"\\\\lrcorner\"===e&&(n=\"┘\",l=n=\" \");const p=C.getCharacterMetrics(It.getValue(\"math\",n),h),d=p.height+p.depth,m=C.getCharacterMetrics(It.getValue(\"math\",l),h),u=m.height+m.depth,f=C.getCharacterMetrics(It.getValue(\"math\",c),h),g=f.height+f.depth;let y=0,b=1;if(null!==r){const t=C.getCharacterMetrics(It.getValue(\"math\",r),h);y=t.height+t.depth,b=2}const x=d+g+y,k=Math.ceil((i-x)/(b*u)),v=x+k*b*u;let S=a.mathstyle.metrics.axisHeight;s&&(S*=a.mathstyle.sizeMultiplier);const w=v/2-S,A=[];if(A.push(Kt(c,h)),null===r)for(let t=0;t\",\"\\\\langle\",\"\\\\rangle\",\"/\",\"\\\\backslash\",\"\\\\lt\",\"\\\\gt\"],Vt=[0,1.2,1.8,2.4,3],Ut=[{type:\"small\",mathstyle:O.SCRIPTSCRIPT},{type:\"small\",mathstyle:O.SCRIPT},{type:\"small\",mathstyle:O.TEXT},{type:\"large\",size:1},{type:\"large\",size:2},{type:\"large\",size:3},{type:\"large\",size:4}],jt=[{type:\"small\",mathstyle:O.SCRIPTSCRIPT},{type:\"small\",mathstyle:O.SCRIPT},{type:\"small\",mathstyle:O.TEXT},{type:\"stack\"}],Gt=[{type:\"small\",mathstyle:O.SCRIPTSCRIPT},{type:\"small\",mathstyle:O.SCRIPT},{type:\"small\",mathstyle:O.TEXT},{type:\"large\",size:1},{type:\"large\",size:2},{type:\"large\",size:3},{type:\"large\",size:4},{type:\"stack\"}];function Zt(t,e,i,s,a,o){if(!e||0===e.length||\".\"===e)return Xt(t,a,t);let n;\"<\"===e||\"\\\\lt\"===e?e=\"\\\\langle\":\">\"!==e&&\"\\\\gt\"!==e||(e=\"\\\\rangle\"),n=Ht.includes(e)?Ut:$t.includes(e)?Gt:jt;const r=function(t,e,i,s){for(let o=Math.min(2,3-s.mathstyle.size);oe)return i[o]}var a;return i[i.length-1]}(It.getValue(\"math\",e),i,n,a);return\"small\"===r.type?function(t,e,i,s,a,o){const n=Pt(\"Main-Regular\",It.getValue(\"math\",e)),r=Q.makeStyleWrap(t,n,a.mathstyle,i,o);return s&&r.setTop((1-a.mathstyle.sizeMultiplier/i.sizeMultiplier)*a.mathstyle.metrics.axisHeight),r.setStyle(\"color\",a.color),\"number\"==typeof a.opacity&&r.setStyle(\"opacity\",a.opacity),r}(t,e,r.mathstyle,s,a,o):\"large\"===r.type?Rt(t,e,r.size,s,a,o):Nt(t,e,i,s,a,o)}function Xt(t,e,i){return Q.makeSpanOfType(t,\"\",\"sizing\"+e.mathstyle.adjustTo(O.TEXT)+\" nulldelimiter \"+(i||\"\"))}var Jt={makeSizedDelim:function(t,e,i,s,a){return\".\"===e?Xt(t,s,a):(\"<\"===e||\"\\\\lt\"===e?e=\"\\\\langle\":\">\"!==e&&\"\\\\gt\"!==e||(e=\"\\\\rangle\"),$t.includes(e)||Ht.includes(e)?Rt(t,e,i,!1,s,a):Wt.includes(e)?Nt(t,e,Vt[i],!1,s,a):null)},makeCustomSizedDelim:Zt,makeLeftRightDelim:function(t,e,i,s,a,o){if(\".\"===e)return Xt(t,a,o);const n=a.mathstyle.metrics.axisHeight*a.mathstyle.sizeMultiplier,r=5/C.METRICS.ptPerEm;let l=s+n,c=i-n,h=901*(c=Math.max(l,c))/500;return l=2*c-r,Zt(t,e,h=Math.max(h,l),!0,a,o)}};const Yt=Q.makeSpan,Qt=Q.makeOrd,te=Q.makeInner,ee=Q.makeHlist,ie=Q.makeVlist,se=/\\u0393|\\u0394|\\u0398|\\u039b|\\u039E|\\u03A0|\\u03A3|\\u03a5|\\u03a6|\\u03a8|\\u03a9|[\\u03b1-\\u03c9]|\\u03d1|\\u03d5|\\u03d6|\\u03f1|\\u03f5/,ae=/^([A-Za-z]|[\\u03b1-\\u03c9]|\\u03d1|\\u03d5|\\u03d6|\\u03f1|\\u03f5)$/,oe={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};class ne{constructor(t,e,i,s){this.mode=t,this.type=e,this.body=i,s&&this.applyStyle(s)}getStyle(){return{color:this.phantom?\"transparent\":this.color,backgroundColor:this.phantom?\"transparent\":this.backgroundColor,fontFamily:this.baseFontFamily||this.fontFamily||this.autoFontFamily,fontShape:this.fontShape,fontSeries:this.fontSeries,fontSize:this.fontSize,cssId:this.cssId,cssClass:this.cssClass}}applyStyle(t){if(Object.assign(this,t),\"none\"===this.fontFamily&&(this.fontFamily=\"\",delete this.baseFontFamily),\"auto\"===this.fontShape&&(this.fontShape=\"\"),\"auto\"===this.fontSeries&&(this.fontSeries=\"\"),\"none\"===this.color&&(this.color=\"\"),\"none\"===this.backgroundColor&&(this.backgroundColor=\"\"),\"auto\"===this.fontSize&&(this.fontSize=\"\"),this.fontSize&&(this.maxFontSize=oe[this.fontSize]),\"math\"===this.mode){const t=\"string\"==typeof this.body?this.body:\"\";this.autoFontFamily=\"cmr\",/\\\\imaginary[IJ]/.test(this.latex)?this.autoFontFamily=\"mathbf\":ae.test(t)?this.autoFontFamily=\"math\":/\\\\imath|\\\\jmath|\\\\pounds/.test(t)?this.autoFontFamily=\"mainit\":se.test(t)||\"math\"!==this.baseFontFamily||(this.autoFontFamily=\"cmr\")}else\"text\"===this.mode&&(\"root\"!==this.type&&(this.type=\"\"),delete this.baseFontFamily,delete this.autoFontFamily)}getInitialBaseElement(){let t=this;return Array.isArray(this.body)&&this.body.length>0&&(\"first\"!==this.body[0].type?t=this.body[0].getInitialBaseElement():this.body[1]&&(t=this.body[1].getInitialBaseElement())),t}getFinalBaseElement(){return Array.isArray(this.body)&&this.body.length>0?this.body[this.body.length-1].getFinalBaseElement():this}isCharacterBox(){const t=this.getInitialBaseElement();return/minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(t.type)}forEach(t,e){t(this,e=e||[]);const i=[this,...e];if(Array.isArray(this.body))for(const e of this.body)e&&e.forEach(t,i);else this.body&&\"object\"==typeof this.body&&t(this.body,i);if(this.superscript)for(const e of this.superscript)e&&e.forEach(t,i);if(this.subscript)for(const e of this.subscript)e&&e.forEach(t,i);if(this.overscript)for(const e of this.overscript)e&&e.forEach(t,i);if(this.underscript)for(const e of this.underscript)e&&e.forEach(t,i);if(this.numer)for(const e of this.numer)e&&e.forEach(t,i);if(this.denom)for(const e of this.denom)e&&e.forEach(t,i);if(this.index)for(const e of this.index)e&&e.forEach(t,i);if(this.array)for(const e of this.array)for(const s of e)for(const e of s)e.forEach(t,i)}filter(t){let e=[];t(this)&&e.push(this);for(const i of[\"body\",\"superscript\",\"subscript\",\"overscript\",\"underscript\",\"numer\",\"denom\",\"index\"])if(Array.isArray(this[i]))for(const s of this[i])s&&(e=e.concat(s.filter(t)));if(Array.isArray(this.array))for(const i of this.array)for(const s of i)s&&(e=e.concat(s.filter(t)));return e}decomposeGroup(t){const e=t.clone({mathstyle:this.mathstyle}),i=Qt(he(e,this.body));return this.cssId&&(i.cssId=this.cssId),i.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),i}decomposeArray(t){let e=this.colFormat;e&&0===e.length&&(e=[{align:\"l\"}]),e||(e=[{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"},{align:\"l\"}]);const i=[];let s=0;for(const t of e)t.align&&s++;for(const t of this.array){let e=0;for(;e0&&(o<(m+=r)&&(o=m),m=0),d.height=a,d.depth=o,l+=a,d.pos=l,l+=o+m,h.push(d)}const d=l/2+a.metrics.axisHeight,m=[];for(let e=0;e0&&m.push(ie(t,i,\"individualShift\"))}const u=[];let f=!1,g=!1,y=0,b=!this.lFence;for(const i of e){if(i.align&&y>=m.length)break;if(i.align&&y0?3*c:7*w.defaultRuleThickness,d=e.metrics.denom1):(c>0?(h=e.metrics.num2,p=c):(h=e.metrics.num3,p=3*w.defaultRuleThickness),d=e.metrics.denom2);const m=o?o.depth:0,u=l?l.height:0;let f;if(0===c){const t=h-m-(u-d);tn+o&&(o=(o+c-n)/2);const h=l.height-Q.height(i)-o-s;l.setTop(h);const p=Yt(null,t.mathstyle.adjustTo(O.TEXT)+\" sqrt-line\");p.applyStyle(this.getStyle()),p.height=s;const d=ie(t,[i,o,p,s]);if(!this.index)return this.bind(t,Qt([l,d],\"sqrt\"));const m=t.clone({mathstyle:O.SCRIPTSCRIPT}),u=Yt(he(m,this.index),e.adjustTo(O.SCRIPTSCRIPT)),f=Math.max(l.height,d.height),g=Math.max(l.depth,d.depth),y=ie(t,[u],\"shift\",-.6*(f-g));return this.bind(t,Qt([Yt(y,\"root\"),l,d],\"sqrt\"))}decomposeAccent(t){const e=t.mathstyle;let i=he(t.cramp(),this.body);(this.superscript||this.subscript)&&(i=this.attachSupsub(t,Qt(i),\"mord\"));let s=0;Array.isArray(this.body)&&1===this.body.length&&this.body[0].isCharacterBox()&&(s=Q.skew(i));const a=Math.min(Q.height(i),e.metrics.xHeight),o=Q.makeSymbol(\"Main-Regular\",this.accent,\"math\");o.italic=0;const n=\"⃗\"===this.accent?\" accent-vec\":\"ˆ\"===this.accent?\" accent-hat\":\"\";let r=Yt(Yt(o),\"accent-body\"+n);return(r=ie(t,[i,-a,r])).children[1].setLeft(2*s),Qt(r,\"accent\")}decomposeLine(t){const e=t.mathstyle,i=he(t.cramp(),this.body),s=w.defaultRuleThickness/e.sizeMultiplier,a=Yt(null,t.mathstyle.adjustTo(O.TEXT)+\" \"+this.position+\"-line\");let o;if(a.height=s,a.maxFontSize=1,\"overline\"===this.position)o=ie(t,[i,3*s,a,s]);else{const e=Yt(i);o=ie(t,[s,a,3*s,e],\"top\",Q.height(e))}return Qt(o,this.position)}decomposeOverunder(t){const e=he(t,this.body),i=t.clone({mathstyle:\"scriptstyle\"}),s=this.overscript?Yt(he(i,this.overscript),t.mathstyle.adjustTo(i.mathstyle)):null,a=this.underscript?Yt(he(i,this.underscript),t.mathstyle.adjustTo(i.mathstyle)):null;return ce(t,e,0,0,s,a,this.mathtype||\"mrel\")}decomposeOverlap(t){const e=Yt(he(t,this.body),\"inner\");return Qt([e,Yt(null,\"fix\")],\"left\"===this.align?\"llap\":\"rlap\")}decomposeRule(t){const e=t.mathstyle,i=Qt(\"\",\"rule\");let s=this.shift&&!isNaN(this.shift)?this.shift:0;s/=e.sizeMultiplier;const a=this.width/e.sizeMultiplier,o=this.height/e.sizeMultiplier;return i.setStyle(\"border-right-width\",a,\"em\"),i.setStyle(\"border-top-width\",o,\"em\"),i.setStyle(\"margin-top\",-(o-s),\"em\"),i.setStyle(\"border-color\",t.color),i.width=a,i.height=o+s,i.depth=-s,i}decomposeOp(t){const e=t.mathstyle;let i,s=!1;e.size===O.DISPLAY.size&&\"string\"==typeof this.body&&\"\\\\smallint\"!==this.body&&(s=!0);let a=0,o=0;if(this.symbol){const n=s?\"Size2-Regular\":\"Size1-Regular\";(i=Q.makeSymbol(n,this.body,\"op-symbol \"+(s?\"large-op\":\"small-op\"))).type=\"mop\",a=(i.height-i.depth)/2-e.metrics.axisHeight*e.sizeMultiplier,o=i.italic,this.bind(t,i)}else Array.isArray(this.body)?(i=Q.makeOp(he(t,this.body)),this.bind(t,i)):i=this.makeSpan(t,this.body);if(this.superscript||this.subscript){const s=this.limits||\"auto\";return this.alwaysHandleSupSub||\"limits\"===s||\"auto\"===s&&e.size===O.DISPLAY.size?this.attachLimits(t,i,a,o):this.attachSupsub(t,i,\"mop\")}return this.symbol&&i.setTop(a),i}decomposeBox(t){const e=Qt(he(t,this.body)),i=Yt();i.setStyle(\"position\",\"absolute\");const s=\"number\"==typeof this.padding?this.padding:w.fboxsep;i.setStyle(\"height\",e.height+e.depth+2*s,\"em\"),0!==s?i.setStyle(\"width\",\"calc(100% + \"+2*s+\"em)\"):i.setStyle(\"width\",\"100%\"),i.setStyle(\"top\",-s,\"em\"),i.setStyle(\"left\",-s,\"em\"),i.setStyle(\"z-index\",\"-1\"),this.backgroundcolor&&i.setStyle(\"background-color\",this.backgroundcolor),this.framecolor&&i.setStyle(\"border\",w.fboxrule+\"em solid \"+this.framecolor),this.border&&i.setStyle(\"border\",this.border),e.setStyle(\"display\",\"inline-block\"),e.setStyle(\"height\",e.height+e.depth,\"em\"),e.setStyle(\"vertical-align\",-e.depth+s,\"em\");const a=Yt([i,e]);return a.setStyle(\"position\",\"relative\"),a.setStyle(\"vertical-align\",-s+e.depth,\"em\"),a.height=e.height+s,a.depth=e.depth+s,a.setLeft(s),a.setRight(s),a}decomposeEnclose(t){const e=Qt(he(t,this.body)),i=\"auto\"===this.padding?.2:this.padding;e.setStyle(\"padding\",i,\"em\"),e.setStyle(\"display\",\"inline-block\"),e.setStyle(\"height\",e.height+e.depth,\"em\"),e.setStyle(\"left\",-i,\"em\"),this.backgroundcolor&&\"transparent\"!==this.backgroundcolor&&e.setStyle(\"background-color\",this.backgroundcolor);let s=\"\";if(this.notation.box&&e.setStyle(\"border\",this.borderStyle),this.notation.actuarial&&(e.setStyle(\"border-top\",this.borderStyle),e.setStyle(\"border-right\",this.borderStyle)),this.notation.madruwb&&(e.setStyle(\"border-bottom\",this.borderStyle),e.setStyle(\"border-right\",this.borderStyle)),this.notation.roundedbox&&(e.setStyle(\"border-radius\",(Q.height(e)+Q.depth(e))/2,\"em\"),e.setStyle(\"border\",this.borderStyle)),this.notation.circle&&(e.setStyle(\"border-radius\",\"50%\"),e.setStyle(\"border\",this.borderStyle)),this.notation.top&&e.setStyle(\"border-top\",this.borderStyle),this.notation.left&&e.setStyle(\"border-left\",this.borderStyle),this.notation.right&&e.setStyle(\"border-right\",this.borderStyle),this.notation.bottom&&e.setStyle(\"border-bottom\",this.borderStyle),this.notation.horizontalstrike&&(s+='\"),this.notation.verticalstrike&&(s+='\"),this.notation.updiagonalstrike&&(s+='\"),this.notation.downdiagonalstrike&&(s+='\"),s){let t;return\"none\"!==this.shadow&&(t=\"auto\"===this.shadow?\"filter: drop-shadow(0 0 .5px rgba(255, 255, 255, .7)) drop-shadow(1px 1px 2px #333)\":\"filter: drop-shadow(\"+this.shadow+\")\"),Q.makeSVG(e,s,t)}return e}decomposeVariable(t){const e=t.clone({mathstyle:this.mathstyle}),i=Qt(he(e,this.body));return this.cssId&&(i.cssId=this.cssId),i.applyStyle({backgroundColor:this.backgroundColor,cssClass:this.cssClass}),i.classes+=\" ML__variable\",i}decompose(t,e){let i=null;if(!this.type||/mord|minner|mbin|mrel|mpunct|mopen|mclose|textord/.test(this.type))(i=\"string\"==typeof this.body?this.makeSpan(t,this.body):this.makeSpan(t,he(t,this.body))).type=this.type;else if(\"group\"===this.type||\"root\"===this.type)i=this.decomposeGroup(t);else if(\"array\"===this.type)i=this.decomposeArray(t);else if(\"genfrac\"===this.type)i=this.decomposeGenfrac(t);else if(\"surd\"===this.type)i=this.decomposeSurd(t);else if(\"accent\"===this.type)i=this.decomposeAccent(t);else if(\"leftright\"===this.type)i=this.decomposeLeftright(t);else if(\"delim\"===this.type)(i=Yt(null,\"\")).delim=this.delim;else if(\"sizeddelim\"===this.type)i=this.bind(t,Jt.makeSizedDelim(this.cls,this.delim,this.size,t));else if(\"line\"===this.type)i=this.decomposeLine(t);else if(\"overunder\"===this.type)i=this.decomposeOverunder(t);else if(\"overlap\"===this.type)i=this.decomposeOverlap(t);else if(\"rule\"===this.type)i=this.decomposeRule(t);else if(\"styling\"===this.type);else if(\"msubsup\"===this.type)i=Qt(\"​\"),e&&(i.height=e[0].height,i.depth=e[0].depth);else if(\"mop\"===this.type)i=this.decomposeOp(t);else if(\"space\"===this.type)i=this.makeSpan(t,\" \");else if(\"spacing\"===this.type)if(\"​\"===this.body)i=this.makeSpan(t,\"​\");else if(\" \"===this.body)i=\"math\"===this.mode?this.makeSpan(t,\" \"):this.makeSpan(t,\" \");else if(this.width)i=Yt(\"​\",\"mspace \"),this.width>0?i.setWidth(this.width):i.setStyle(\"margin-left\",this.width,\"em\");else{const t={qquad:\"qquad\",quad:\"quad\",enspace:\"enspace\",\";\":\"thickspace\",\":\":\"mediumspace\",\",\":\"thinspace\",\"!\":\"negativethinspace\"}[this.body]||\"quad\";i=Yt(\"​\",\"mspace \"+t)}else\"mathstyle\"===this.type?t.setMathstyle(this.mathstyle):\"box\"===this.type?i=this.decomposeBox(t):\"enclose\"===this.type?i=this.decomposeEnclose(t):\"variable\"===this.type?i=this.decomposeVariable(t):\"command\"===this.type||\"error\"===this.type?((i=this.makeSpan(t,this.body)).classes=\"\",this.error&&(i.classes+=\" ML__error\"),this.suggestion&&(i.classes+=\" ML__suggestion\")):\"placeholder\"===this.type?i=this.makeSpan(t,\"⬚\"):\"first\"===this.type&&(i=this.makeSpan(t,\"​\"));if(!i)return i;if(this.caret&&\"styling\"!==this.type&&\"msubsup\"!==this.type&&\"command\"!==this.type&&\"placeholder\"!==this.type&&\"first\"!==this.type&&(Array.isArray(i)?i[i.length-1].caret=this.caret:i.caret=this.caret),!this.limits&&(this.superscript||this.subscript))if(Array.isArray(i)){const e=i[i.length-1];i[i.length-1]=this.attachSupsub(t,e,e.type)}else i=[this.attachSupsub(t,i,i.type)];return Array.isArray(i)?i:[i]}attachSupsub(t,e,i){if(!this.superscript&&!this.subscript)return e;const s=t.mathstyle;let a=null,o=null;if(this.superscript){const e=he(t.sup(),this.superscript);a=Yt(e,s.adjustTo(s.sup()))}if(this.subscript){const e=he(t.sub(),this.subscript);o=Yt(e,s.adjustTo(s.sub()))}let n,r=0,l=0;this.isCharacterBox()||(r=Q.height(e)-s.metrics.supDrop,l=Q.depth(e)+s.metrics.subDrop),n=s===O.DISPLAY?s.metrics.sup1:s.cramped?s.metrics.sup3:s.metrics.sup2;const c=O.TEXT.sizeMultiplier*s.sizeMultiplier,h=.5/w.ptPerEm/c;let p=null;if(o&&a){r=Math.max(r,n,a.depth+.25*s.metrics.xHeight),l=Math.max(l,s.metrics.sub2);const i=w.defaultRuleThickness;if(r-Q.depth(a)-(Q.height(o)-l)<4*i){l=4*i-(r-a.depth)+Q.height(o);const t=.8*s.metrics.xHeight-(r-Q.depth(a));t>0&&(r+=t,l-=t)}p=ie(t,[o,l,a,-r],\"individualShift\"),this.symbol&&p.children[0].setLeft(-Q.italic(e))}else o&&!a?(l=Math.max(l,s.metrics.sub1,Q.height(o)-.8*s.metrics.xHeight),(p=ie(t,[o],\"shift\",l)).children[0].setRight(h),this.isCharacterBox()&&p.children[0].setLeft(-Q.italic(e))):!o&&a&&(r=Math.max(r,n,a.depth+.25*s.metrics.xHeight),(p=ie(t,[a],\"shift\",-r)).children[0].setRight(h));const d=Yt(p,\"msubsup\");return this.caret&&(d.caret=this.caret),Q.makeSpanOfType(i,[e,d])}attachLimits(t,e,i,s){const a=this.superscript?Yt(he(t.sup(),this.superscript),t.mathstyle.adjustTo(t.mathstyle.sup())):null,o=this.subscript?Yt(he(t.sub(),this.subscript),t.mathstyle.adjustTo(t.mathstyle.sub())):null;return ce(t,e,i,s,a,o,\"mop\")}bind(t,e){return\"first\"!==this.type&&\"​\"!==this.body&&(this.id=function(t){let e;return\"boolean\"==typeof t.generateID&&t.generateID?e=Date.now().toString(36).slice(-2)+Math.floor(1e5*Math.random()).toString(36):\"boolean\"!=typeof t.generateID&&(t.generateID.overrideID?e=t.generateID.overrideID:(e=t.generateID.seed.toString(36),t.generateID.seed+=1)),e}(t),this.id&&(e.attributes||(e.attributes={}),e.attributes[\"data-atom-id\"]=this.id)),e}makeSpan(t,e){const i=\"textord\"===this.type?\"mord\":this.type,s=Q.makeSpanOfType(i,e),a=this.getStyle();s.applyStyle(a);const o=a&&a.fontSize?a.fontSize:\"size5\";return o!==t.parentSize?(s.classes+=\" sizing reset-\"+t.parentSize,s.classes+=\" \"+o):t.parentSize!==t.size&&(s.classes+=\" sizing reset-\"+t.parentSize,s.classes+=\" \"+t.size),s.maxFontSize=Math.max(s.maxFontSize,t.sizeMultiplier||1),\"text\"===this.mode&&(s.classes+=\" ML__text\"),t.mathstyle.isTight()&&(s.isTight=!0),\"math\"!==this.mode&&(s.italic=0),s.setRight(s.italic),\"number\"==typeof t.opacity&&s.setStyle(\"opacity\",t.opacity),this.bind(t,s),this.caret&&(this.superscript||this.subscript||(s.caret=this.caret,t.mathstyle.isTight()&&(s.isTight=!0))),s}}function re(t){const e=Yt(\"​\",\"arraycolsep\");return e.setWidth(t,\"em\"),e}function le(t,e,i,s){const a=[];for(const o of e){const e=Yt(he(t,s));e.depth=o.depth,e.height=o.height,a.push(e),a.push(o.pos-i)}return ie(t,a,\"individualShift\")}function ce(t,e,i,s,a,o,n){if(!a&&!o)return e;e=Yt(e);let r=0,l=0;a&&(r=Math.max(w.bigOpSpacing1,w.bigOpSpacing3-a.depth)),o&&(l=Math.max(w.bigOpSpacing2,w.bigOpSpacing4-o.height));let c=null;if(o&&a){const n=w.bigOpSpacing5+Q.height(o)+Q.depth(o)+l+Q.depth(e)+i;(c=ie(t,[w.bigOpSpacing5,o,l,e,r,a,w.bigOpSpacing5],\"bottom\",n)).children[0].setLeft(-s),c.children[2].setLeft(s)}else if(o&&!a){const a=Q.height(e)-i;(c=ie(t,[w.bigOpSpacing5,o,l,e],\"top\",a)).children[0].setLeft(-s)}else if(!o&&a){const o=Q.depth(e)+i;(c=ie(t,[e,r,a,w.bigOpSpacing5],\"bottom\",o)).children[1].setLeft(s)}return Q.makeSpanOfType(n,c,\"op-limits\")}function he(t,e){t instanceof K.Context||(t=new K.Context(t));const i=!t.generateID||!t.generateID.groupNumbers;let s=[];if(Array.isArray(e)){if(0===e.length)return s;if(1===e.length)(s=e[0].decompose(t))&&i&&e[0].isSelected&&s.forEach(t=>t.selected(!0));else{let a=\"none\",o=e[1].type,n=[],r=null,l=null;for(let c=0;ct.selected(!0)):(n.length>0&&(s=[...s,...n],n=[]),s=s.concat(a))}a=e[c].getFinalBaseElement().type,o=e[c+1]?e[c+1].getInitialBaseElement().type:\"none\"}n.length>0&&(s=[...s,...n],n=[])}}else e&&(s=e.decompose(t))&&i&&e.isSelected&&s.forEach(t=>t.selected(!0));if(!s||0===s.length)return null;if(t.mathstyle!==t.parentMathstyle){const e=t.mathstyle.sizeMultiplier/t.parentMathstyle.sizeMultiplier;for(const t of s)t.height*=e,t.depth*=e}if(t.size!==t.parentSize){const e=oe[t.size]/oe[t.parentSize];for(const t of s)t.height*=e,t.depth*=e}return s}var pe={MathAtom:ne,decompose:he,makeRoot:function(t,e){const i=new ne(t=t||\"math\",\"root\",e||[]);return 0!==i.body.length&&\"first\"===i.body[0].type||i.body.unshift(new ne(\"\",\"first\")),i},GREEK_REGEX:se};const de={m0:\"#3f3d99\",m1:\"#993d71\",m2:\"#998b3d\",m3:\"#3d9956\",m4:\"#3d5a99\",m5:\"#993d90\",m6:\"#996d3d\",m7:\"#43993d\",m8:\"#3d7999\",m9:\"#843d99\"},me={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\"};var ue={stringToColor:function(t){const e=t.toLowerCase().split(\"!\");let i,s,a,o=255,n=255,r=255,l=-1;const c=e.length>0&&\"-\"===e[0].charAt(0);c&&(e[0]=e[0].slice(1));for(let t=0;t=0&&(o=(1-l)*o+l*i,n=(1-l)*n+l*s,r=(1-l)*r+l*a,l=-1),t+1=0&&(o=l*o+(1-l)*i,n=l*n+(1-l)*s,r=l*r+(1-l)*a),c&&(o=255-o,n=255-n,r=255-r),\"#\"+(\"00\"+Math.round(o).toString(16)).slice(-2)+(\"00\"+Math.round(n).toString(16)).slice(-2)+(\"00\"+Math.round(r).toString(16)).slice(-2)},colorToString:function(t){let e=t.toUpperCase();for(const t in me)if(me[t]===e){e=t;break}for(const t in de)if(de[t]===e){e=t;break}return e},AREA_COLORS:[\"#d35d60\",\"#7293cb\",\"#e1974d\",\"#84bb5d\",\"#9066a7\",\"#aD6a58\",\"#f5a4ce\",\"#fff590\",\"#212121\",\"#818787\",\"#d4d5d2\",\"#ffffff\"],LINE_COLORS:[\"#cc2428\",\"#3769b1\",\"#da7e30\",\"#409852\",\"#6b4c9a\",\"#922426\",\"#e7298a\",\"#ffe907\",\"#000000\",\"#525055\",\"#adafaa\",\"#ffffff\"]};const fe=pe.MathAtom;class ge{constructor(t,e,i){this.tokens=t,this.index=0,this.args=e,this.macros=i,this.mathList=[],this.style={},this.parseMode=\"math\",this.tabularMode=!1,this.endCount=0}swapMathList(t){const e=this.mathList;return this.mathList=t||[],e}swapParseMode(t){const e=this.parseMode;return this.parseMode=t,e}end(){return this.endCount++,this.index>=this.tokens.length||this.endCount>1e3}get(){return this.endCount=0,this.index=t.length}const a=t.toUpperCase()===s.toUpperCase();return a||(this.index=e),a}scanString(){let t=\"\",e=this.end();for(;!e;){if(this.hasLiteral(\"]\"))e=!0;else if(this.hasToken(\"literal\"))t+=this.get().value;else if(this.skipWhitespace())t+=\" \";else if(this.hasToken(\"command\")){const e=this.get();\"space\"===e.value?t+=\" \":t+=e.value}else e=!0;e=e||this.end()}return t}scanColor(){return ue.stringToColor(this.scanString())}scanNumber(t){const e=this.parseLiteral(\"-\");e||this.parseLiteral(\"+\"),this.skipWhitespace(),t=!!t;let i=10,s=/[0-9]/;this.parseLiteral(\"'\")?(i=8,s=/[0-7]/,t=!0):(this.parseLiteral('\"')||this.parseLiteral(\"x\"))&&(i=16,s=/[0-9A-F]/,t=!0);let a=\"\";for(;this.hasLiteralPattern(s);)a+=this.get().value;if(!t&&(this.parseLiteral(\".\")||this.parseLiteral(\",\")))for(a+=\".\";this.hasLiteralPattern(s);)a+=this.get().value;const o=t?parseInt(a,i):parseFloat(a);return e?-o:o}scanDimen(){const t=this.scanNumber(!1);return this.skipWhitespace(),this.parseKeyword(\"pt\")?C.toEm(t,\"pt\"):this.parseKeyword(\"mm\")?C.toEm(t,\"mm\"):this.parseKeyword(\"cm\")?C.toEm(t,\"cm\"):this.parseKeyword(\"ex\")?C.toEm(t,\"ex\"):this.parseKeyword(\"px\")?C.toEm(t,\"px\"):this.parseKeyword(\"em\")?C.toEm(t,\"em\"):this.parseKeyword(\"bp\")?C.toEm(t,\"bp\"):this.parseKeyword(\"dd\")?C.toEm(t,\"dd\"):this.parseKeyword(\"pc\")?C.toEm(t,\"pc\"):this.parseKeyword(\"in\")?C.toEm(t,\"in\"):this.parseKeyword(\"mu\")?C.toEm(t,\"mu\"):C.toEm(t,\"pt\")}scanSkip(){const t=this.scanDimen();return this.skipWhitespace(),this.parseKeyword(\"plus\")&&this.scanDimen(),this.skipWhitespace(),this.parseKeyword(\"minus\")&&this.scanDimen(),t}scanColspec(){this.skipWhitespace();const t=[];for(;!this.end()&&!this.hasToken(\"}\")&&!this.hasLiteral(\"]\");)if(this.hasLiteral()){const e=this.get().value;if(\"lcr\".includes(e))t.push({align:e});else if(\"|\"===e)t.push({rule:!0});else if(\"@\"===e){if(this.parseToken(\"{\")){const e=this.swapParseMode(\"math\");t.push({gap:this.scanImplicitGroup(t=>\"}\"===t.type)}),this.swapParseMode(e)}this.parseToken(\"}\")}}return t}scanModeSet(){let t;if(this.parseCommand(\"(\")&&(t=\")\"),!t&&this.parseCommand(\"[\")&&(t=\"]\"),!t)return null;const e=this.swapParseMode(\"math\"),i=new fe(\"math\",\"group\");return i.mathstyle=\")\"===t?\"textstyle\":\"displaystyle\",i.body=this.scanImplicitGroup(e=>\"command\"===e.type&&e.value===t),this.parseCommand(t),this.swapParseMode(e),i.body&&0!==i.body.length?i:null}scanModeShift(){if(!this.hasToken(\"$\")&&!this.hasToken(\"$$\"))return null;const t=this.get().type,e=new fe(\"math\",\"group\");e.mathstyle=\"$\"===t?\"textstyle\":\"displaystyle\",e.latexOpen=\"textstyle\"===e.mathstyle?\"$\":\"$$\",e.latexClose=e.latexOpen;const i=this.swapParseMode(\"math\");return e.body=this.scanImplicitGroup(e=>e.type===t),this.parseToken(t),this.swapParseMode(i),e.body&&0!==e.body.length?e:null}scanEnvironment(){if(!this.parseCommand(\"begin\"))return null;const t=this.scanArg(\"string\"),e=It.getEnvironmentInfo(t),i=[];if(e&&e.params)for(const t of e.params)if(t.optional){const e=this.scanOptionalArg(t.type);i.push(e)}else i.push(this.scanArg(t.type));const s=this.parseMode,a=this.tabularMode,o=this.swapMathList([]);this.tabularMode=e.tabular;const n=[],r=[];let l=[],c=!1;do{if(!(c=this.end())&&this.parseCommand(\"end\")&&(c=this.scanArg(\"string\")===t),!c)if(this.parseColumnSeparator())l.push(this.swapMathList([]));else if(this.parseRowSeparator()){l.push(this.swapMathList([]));let t=0;this.skipWhitespace(),this.parseLiteral(\"[\")&&(t=this.scanDimen(),this.skipWhitespace(),this.parseLiteral(\"]\")),r.push(t||0),n.push(l),l=[]}else this.mathList=this.mathList.concat(this.scanImplicitGroup())}while(!c);l.push(this.swapMathList([])),l.length>0&&n.push(l);const h=this.swapMathList(o);if(this.parseMode=s,this.tabularMode=a,!e.tabular&&0===h.length)return null;if(e.tabular&&0===n.length)return null;const p=new fe(this.parseMode,\"array\",h,e.parser?e.parser(t,i,n):{});return p.array=n,p.rowGaps=r,p.env={...e},p.env.name=t,p}scanImplicitGroup(t){const e=this.style;t||(t=t=>\"}\"===t.type||\"literal\"===t.type&&\"&\"===t.value||\"command\"===t.type&&/^(end|cr|\\\\)$/.test(t.value));let i=null,s=null;const a=this.swapMathList([]);for(;!this.end()&&!t(this.peek());)if(this.hasImplicitCommand([\"displaystyle\",\"textstyle\",\"scriptstyle\",\"scriptscriptstyle\"])){this.parseMode=\"math\";const t=new fe(\"math\",\"mathstyle\");t.mathstyle=this.get().value,this.mathList.push(t)}else this.hasInfixCommand()&&!i?(i=this.get(),s=this.swapMathList([])):this.parseAtom();let o;if(i){const t=this.swapMathList(a),e=It.getInfo(\"\\\\\"+i.value,\"math\",this.macros);o=e?[new fe(this.parseMode,e.type,e.value||i.value,e.parse?e.parse(\"\\\\\"+i.value,[s,t]):null)]:[new fe(this.parseMode,\"mop\",i.value)]}else o=this.swapMathList(a);return this.style=e,o}scanGroup(){if(!this.parseToken(\"{\"))return null;const t=[\"fontseries\",\"upshape\",\"fontshape\",\"tiny\",\"scriptsize\",\"footnotesize\",\"small\",\"normalsize\",\"large\",\"Large\",\"LARGE\",\"huge\",\"Huge\",\"fontfamily\"].some(t=>this.hasCommand(t)),e=this.scanImplicitGroup(t=>\"}\"===t.type);if(this.parseToken(\"}\"),t)return e;const i=new fe(this.parseMode,\"group\");return i.body=e,i.latexOpen=\"{\",i.latexClose=\"}\",i}scanSmartFence(){if(this.skipWhitespace(),!this.parseLiteral(\"(\"))return null;const t=new fe(this.parseMode,\"leftright\");t.leftDelim=\"(\",t.inner=!1;const e=this.swapMathList([]);let i=1;for(;!this.end()&&0!==i;)this.hasLiteral(\"(\")&&(i+=1),this.hasLiteral(\")\")&&(i-=1),0!==i&&this.parseAtom();return 0===i&&this.parseLiteral(\")\"),t.rightDelim=0===i?\")\":\"?\",t.body=this.swapMathList(e),t}scanDelim(){this.skipWhitespace();const t=this.get();if(!t)return null;let e=\".\";\"command\"===t.type?e=\"\\\\\"+t.value:\"literal\"===t.type&&(e=t.value);const i=It.getInfo(e,\"math\",this.macros);return i?\"mopen\"===i.type||\"mclose\"===i.type?e:/^(\\?|\\||<|>|\\\\vert|\\\\Vert|\\\\\\||\\\\surd|\\\\uparrow|\\\\downarrow|\\\\Uparrow|\\\\Downarrow|\\\\updownarrow|\\\\Updownarrow|\\\\mid|\\\\mvert|\\\\mVert)$/.test(e)?e:null:null}scanLeftRight(){if(this.parseCommand(\"right\")||this.parseCommand(\"mright\")){const t=new fe(this.parseMode,\"leftright\");return t.rightDelim=this.scanDelim()||\".\",t}const t=this.style;let e=\"right\";if(!this.parseCommand(\"left\")){if(!this.parseCommand(\"mleft\"))return null;e=\"mright\"}const i=this.scanDelim()||\".\",s=this.swapMathList([]);for(;!this.end()&&!this.parseCommand(e);)this.parseAtom();this.style=t;const a=this.scanDelim(),o=new fe(this.parseMode,\"leftright\");return o.leftDelim=i,o.rightDelim=a,o.inner=\"right\"===e,o.body=this.swapMathList(s),o}parseSupSub(){if(\"math\"!==this.parseMode)return!1;let t=!1;for(;this.hasLiteral(\"^\")||this.hasLiteral(\"_\")||this.hasLiteral(\"'\");){let e;if(this.hasLiteral(\"^\")?e=\"superscript\":this.hasLiteral(\"_\")&&(e=\"subscript\"),this.parseLiteral(\"^\")||this.parseLiteral(\"_\")){const i=this.scanArg();if(i){const s=this.lastMathAtom();s[e]=s[e]||[],s[e]=s[e].concat(i),t=!0}}else if(this.parseLiteral(\"'\")){const e=this.lastMathAtom();e.superscript=e.superscript||[],e.superscript.push(new fe(e.parseMode,\"mord\",\"′\")),t=!0}}return t}parseLimits(){if(this.parseCommand(\"limits\")){const t=this.lastMathAtom();return t.limits=\"limits\",t.explicitLimits=!0,!0}if(this.parseCommand(\"nolimits\")){const t=this.lastMathAtom();return t.limits=\"nolimits\",t.explicitLimits=!0,!0}return!1}scanOptionalArg(t){if(t=t&&\"auto\"!==t?t:this.parseMode,this.skipWhitespace(),!this.parseLiteral(\"[\"))return null;const e=this.parseMode;this.parseMode=t;const i=this.swapMathList();let s;for(;!this.end()&&!this.parseLiteral(\"]\");)if(\"string\"===t)s=this.scanString();else if(\"number\"===t)s=this.scanNumber();else if(\"dimen\"===t)s=this.scanDimen();else if(\"skip\"===t)s=this.scanSkip();else if(\"colspec\"===t)s=this.scanColspec();else if(\"color\"===t)s=this.scanColor()||\"#ffffff\";else if(\"bbox\"===t){const t=this.scanString().toLowerCase().trim().split(/,(?![^(]*\\)(?:(?:[^(]*\\)){2})*[^\"]*$)/);for(const e of t){const t=ue.stringToColor(e);if(t)(s=s||{}).backgroundcolor=t;else{const t=e.match(/^\\s*([0-9.]+)\\s*([a-z][a-z])/);if(t)(s=s||{}).padding=C.toEm(t[1],t[2]);else{const t=e.match(/^\\s*border\\s*:\\s*(.*)/);t&&((s=s||{}).border=t[1])}}}}else this.mathList=this.mathList.concat(this.scanImplicitGroup(t=>\"literal\"===t.type&&\"]\"===t.value));this.parseMode=e;const a=this.swapMathList(i);return s||a}scanArg(t){let e;if(t=t&&\"auto\"!==t?t:this.parseMode,this.parseFiller(),!this.parseToken(\"{\")){if(\"delim\"===t)return this.scanDelim()||\".\";if(/^(math|text)$/.test(t)){const e=this.parseMode;this.parseMode=t;const i=this.scanToken();return this.parseMode=e,Array.isArray(i)?i:i?[i]:null}}if(this.hasToken(\"#\")){const t=this.get();return this.skipUntilToken(\"}\"),\"?\"===t.value?this.placeholder():this.args?void 0===this.args[t.value]&&void 0!==this.args[\"?\"]?this.placeholder():this.args[t.value]||null:null}const i=this.parseMode;this.parseMode=t;const s=this.swapMathList([]);if(\"string\"===t)e=this.scanString(),this.skipUntilToken(\"}\");else if(\"number\"===t)e=this.scanNumber(),this.skipUntilToken(\"}\");else if(\"dimen\"===t)e=this.scanDimen(),this.skipUntilToken(\"}\");else if(\"skip\"===t)e=this.scanSkip(),this.skipUntilToken(\"}\");else if(\"colspec\"===t)e=this.scanColspec(),this.skipUntilToken(\"}\");else if(\"color\"===t)e=this.scanColor()||\"#ffffff\",this.skipUntilToken(\"}\");else if(\"delim\"===t)e=this.scanDelim()||\".\",this.skipUntilToken(\"}\");else do{this.mathList=this.mathList.concat(this.scanImplicitGroup())}while(!this.parseToken(\"}\")&&!this.end());this.parseMode=i;const a=this.swapMathList(s);return e||a}scanToken(){const t=this.get();if(!t)return null;let e=null;if(\"space\"===t.type)\"text\"===this.parseMode&&(e=new fe(\"text\",\"\",\" \",this.style));else if(\"placeholder\"===t.type)(e=new fe(this.parseMode,\"placeholder\",t.value)).captureSelection=!0;else if(\"command\"===t.type){if(\"placeholder\"===t.value)(e=new fe(this.parseMode,\"placeholder\",this.scanArg(\"string\"),this.style)).captureSelection=!0;else if(\"char\"===t.value){let t=Math.floor(this.scanNumber(!0));(!isFinite(t)||t<0||t>1114111)&&(t=10067),(e=new fe(this.parseMode,\"math\"===this.parseMode?\"mord\":\"\",String.fromCodePoint(t))).latex='\\\\char\"'+(\"000000\"+t.toString(16)).toUpperCase().substr(-6)}else if(\"hskip\"===t.value||\"kern\"===t.value){const i=this.scanSkip();isFinite(i)&&((e=new fe(this.parseMode,\"spacing\",null,this.style)).width=i),e.latex=\"\\\\\"+t.value}else if(!(e=this.scanMacro(t.value))){const i=It.getInfo(\"\\\\\"+t.value,this.parseMode,this.macros),s=[];let a=\"\",o=\"\";if(i&&i.params)for(const t of i.params)if(t.optional){const e=this.scanOptionalArg(t.type);s.push(e)}else if(t.type.endsWith(\"*\"))o=t.type.slice(0,-1);else{const e=this.scanArg(t.type);if(e&&1===e.length&&\"placeholder\"===e[0].type&&t.placeholder&&(e[0].value=t.placeholder),e)s.push(e);else if(t.placeholder){const e=new fe(this.parseMode,\"placeholder\",t.placeholder);e.captureSelection=!0,s.push([e])}else s.push(this.placeholder());\"math\"!==t.type&&\"string\"==typeof e&&(a+=e)}if(i&&!i.infix){let n=void 0;if(i.parse){const a=i.parse(\"\\\\\"+t.value,s);if(a.type)e=new fe(this.parseMode,i.type,o?this.scanArg(o):null),n={...this.style,...a};else{const t=this.parseMode;if(a.mode&&(this.parseMode=a.mode,delete a.mode),o){const t=this.style;this.style={...this.style,...a},e=this.scanArg(o),this.style=t}else this.style={...this.style,...a};this.parseMode=t}}else n={...this.style},i.baseFontFamily&&(n.baseFontFamily=i.baseFontFamily),e=new fe(this.parseMode,i.type||\"mop\",i.value||t.value),i.skipBoundary&&(e.skipBoundary=!0);if(e&&!/^(llap|rlap|class|cssId)$/.test(t.value)&&(e.latex=\"\\\\\"+t.value,a&&(e.latex+=\"{\"+a+\"}\"),e.isFunction&&this.smartFence)){const t=this.scanSmartFence();t&&(e=[e,t])}e&&n&&e.applyStyle(n)}i||((e=new fe(this.parseMode,\"error\",\"\\\\\"+t.value)).latex=\"\\\\\"+t.value)}}else if(\"literal\"===t.type){const i=It.getInfo(t.value,this.parseMode,this.macros);if(i){const s={...this.style};i.baseFontFamily&&(s.baseFontFamily=i.baseFontFamily),e=new fe(this.parseMode,i.type,i.value||t.value,s),i.isFunction&&(e.isFunction=!0)}else e=new fe(this.parseMode,\"math\"===this.parseMode?\"mord\":\"\",t.value,this.style);if(e.latex=It.matchCodepoint(this.parseMode,t.value.codePointAt(0)),i&&i.isFunction&&this.smartFence){const t=this.scanSmartFence();t&&(e=[e,t])}}else if(\"#\"===t.type)if(\"?\"===t.value)e=this.placeholder();else if(this.args)if(e=this.args[t.value]||null,Array.isArray(e)&&1===e.length)e=e[0];else if(Array.isArray(e)){const t=new fe(this.parseMode,\"group\");t.body=e,e=t}else e=this.placeholder();return e}scanMacro(t){if(!this.macros||!this.macros[t])return null;const e={};let i,s=0;\"string\"==typeof this.macros[t]?(i=this.macros[t],/(^|[^\\\\])#1/.test(i)&&(s=1),/(^|[^\\\\])#2/.test(i)&&(s=2),/(^|[^\\\\])#3/.test(i)&&(s=3),/(^|[^\\\\])#4/.test(i)&&(s=4),/(^|[^\\\\])#5/.test(i)&&(s=5),/(^|[^\\\\])#6/.test(i)&&(s=6),/(^|[^\\\\])#7/.test(i)&&(s=7),/(^|[^\\\\])#8/.test(i)&&(s=8),/(^|[^\\\\])#9/.test(i)&&(s=9)):(i=this.macros[t].def,s=this.macros[t].args||0);for(let t=1;t<=s;t++)e[t]=this.scanArg();this.args&&\"string\"==typeof this.args[\"?\"]&&(e[\"?\"]=this.args[\"?\"]);const a=new fe(this.parseMode,\"group\",ye(x.tokenize(i),this.parseMode,e,this.macros));a.captureSelection=!0,a.latex=\"\\\\\"+t;let o=\"\";for(let t=1;t<=s;t++){if(o+=\"{\",Array.isArray(e[t]))for(let i=0;i1&&(e.extent=parseInt(i[1]));const s=i[0].split(\"/\");for(const t of s){const i=t.match(/([^:]*):(.*)/);i&&e.path.push({relation:i[1],offset:parseInt(i[2])})}return e}var ve={pathFromString:ke,pathToString:xe,pathDistance:function(t,e){let i=-1,s=!1;for(;!s;)s=(s=(i+=1)>=t.length||i>=e.length)||!(t[i].relation===e[i].relation&&t[i].offset===e[i].offset);return i===t.length&&i===e.length?0:i+1===t.length&&i+1===e.length&&t[i].relation===e[i].relation?1:2},pathCommonAncestor:function(t,e){const i=[],s=Math.min(t.length-1,e.length-1);let a=0;for(;a<=s&&t[a].relation===e[a].relation&&t[a].offset===e[a].offset;)i.push(t[a]),a+=1;return i},clone:function(t){return ke(xe(t)).path}};const Se={Left:\"moveToPreviousChar\",Right:\"moveToNextChar\",Up:\"moveUp\",Down:\"moveDown\",\"Shift-Left\":\"extendToPreviousChar\",\"Shift-Right\":\"extendToNextChar\",\"Shift-Up\":\"extendUp\",\"Shift-Down\":\"extendDown\",Backspace:\"deletePreviousChar\",\"Alt-Del\":\"deletePreviousChar\",Del:\"deleteNextChar\",\"Alt-Backspace\":\"deleteNextChar\",\"Alt-Left\":\"moveToPreviousWord\",\"Alt-Right\":\"moveToNextWord\",\"Alt-Shift-Left\":\"extendToPreviousWord\",\"Alt-Shift-Right\":\"extendToNextWord\",\"Ctrl-Left\":\"moveToGroupStart\",\"Ctrl-Right\":\"moveToGroupEnd\",\"Ctrl-Shift-Left\":\"extendToGroupStart\",\"Ctrl-Shift-Right\":\"extendToGroupEnd\",\"math:Spacebar\":\"moveAfterParent\",\"math:Shift-Spacebar\":\"moveBeforeParent\",Home:\"moveToMathFieldStart\",\"mac:Meta-Left\":\"moveToMathFieldStart\",\"Shift-Home\":\"extendToMathFieldStart\",\"mac:Meta-Shift-Left\":\"extendToMathFieldStart\",End:\"moveToMathFieldEnd\",\"mac:Meta-Right\":\"moveToMathFieldEnd\",\"Shift-End\":\"extendToMathFieldEnd\",\"mac:Meta-Shift-Right\":\"extendToMathFieldEnd\",PageUp:\"moveToGroupStart\",PageDown:\"moveToGroupEnd\",\"math:Tab\":\"moveToNextPlaceholder\",\"math:F8\":\"moveToNextPlaceholder\",\"math:Shift-Tab\":\"moveToPreviousPlaceholder\",\"math:Shift-F8\":\"moveToPreviousPlaceholder\",\"text:Tab\":\"moveToNextPlaceholder\",\"text:F8\":\"moveToNextPlaceholder\",\"text:Shift-Tab\":\"moveToPreviousPlaceholder\",\"text:Shift-F8\":\"moveToPreviousPlaceholder\",\"math:Esc\":[\"switch-mode\",\"command\"],\"math:Backslash\":[\"switch-mode\",\"command\"],\"math:IntlBackslash\":[\"switch-mode\",\"command\"],\"math:Alt-Equal\":[\"apply-style\",{mode:\"text\"}],\"text:Alt-Equal\":[\"apply-style\",{mode:\"math\"}],\"command:Esc\":[\"complete\",{discard:!0}],\"command:Tab\":[\"complete\",{acceptSuggestion:!0}],\"command:Return\":\"complete\",\"command:Enter\":\"complete\",\"command:Shift-Esc\":[\"complete\",{discard:!0}],\"command:Down\":\"nextSuggestion\",\"ios:command:Tab\":\"nextSuggestion\",\"command:Up\":\"previousSuggestion\",\"!mac:Ctrl-KeyA\":\"selectAll\",\"mac:Meta-KeyA\":\"selectAll\",Cut:\"cut\",Copy:\"copy\",Paste:\"paste\",Clear:\"delete\",\"!mac:Ctrl-KeyZ\":\"undo\",\"mac:Meta-KeyZ\":\"undo\",Undo:\"undo\",\"!mac:Ctrl-KeyY\":\"redo\",\"mac:Meta-Shift-KeyY\":\"redo\",\"!mac:Ctrl-Shift-KeyZ\":\"redo\",\"mac:Meta-Shift-KeyZ\":\"redo\",Redo:\"redo\",EraseEof:\"deleteToGroupEnd\",\"mac:Ctrl-KeyB\":\"moveToPreviousChar\",\"mac:Ctrl-KeyF\":\"moveToNextChar\",\"mac:Ctrl-KeyP\":\"moveUp\",\"mac:Ctrl-KeyN\":\"moveDown\",\"mac:Ctrl-KeyA\":\"moveToMathFieldStart\",\"mac:Ctrl-KeyE\":\"moveToMathFieldEnd\",\"mac:Ctrl-Shift-KeyB\":\"extendToPreviousChar\",\"mac:Ctrl-Shift-KeyF\":\"extendToNextChar\",\"mac:Ctrl-Shift-KeyP\":\"extendUp\",\"mac:Ctrl-Shift-KeyN\":\"extendDown\",\"mac:Ctrl-Shift-KeyA\":\"extendToMathFieldStart\",\"mac:Ctrl-Shift-KeyE\":\"extendToMathFieldEnd\",\"mac:Ctrl-Alt-KeyB\":\"moveToPreviousWord\",\"mac:Ctrl-Alt-KeyF\":\"moveToNextWord\",\"mac:Ctrl-Shift-Alt-KeyB\":\"extendToPreviousWord\",\"mac:Ctrl-Shift-Alt-KeyF\":\"extendToNextWord\",\"mac:Ctrl-KeyH\":\"deletePreviousChar\",\"mac:Ctrl-KeyD\":\"deleteNextChar\",\"mac:Ctrl-KeyL\":\"scrollIntoView\",\"mac:Ctrl-KeyT\":\"transpose\",\"math:Shift-Quote\":[\"switch-mode\",\"text\",\"\",\"“\"],\"text:Shift-Quote\":[\"switch-mode\",\"math\",\"”\",\"\"],\"math:Ctrl-Digit2\":[\"insert\",\"\\\\sqrt{#0}\"],\"math:Ctrl-Digit5\":\"moveToOpposite\",\"math:Ctrl-Digit6\":\"moveToSuperscript\",\"math:Ctrl-Minus\":\"moveToSubscript\",\"math:Alt-BracketLeft\":[\"insert\",\"\\\\left\\\\lbrack #0 \\\\right\\\\rbrack\"],\"math:Alt-Shift-BracketLeft\":[\"insert\",\"\\\\left\\\\lbrace #0 \\\\right\\\\rbrace\"],\"math:Return\":\"addRowAfter\",\"math:Enter\":\"addRowAfter\",\"math:Ctrl-Comma\":\"addColumnAfter\",\"math:Alt-KeyQ\":[\"insert\",\"\\\\theta\"],\"math:Alt-KeyP\":[\"insert\",\"\\\\pi\"],\"math:Alt-KeyV\":[\"insert\",\"\\\\sqrt{#0}\"],\"math:Alt-KeyW\":[\"insert\",\"\\\\sum_{i=#?}^{#?}\"],\"math:Alt-KeyB\":[\"insert\",\"\\\\int_{#?}^{#?}\"],\"math:Alt-KeyU\":[\"insert\",\"\\\\cup\"],\"math:Alt-KeyN\":[\"insert\",\"\\\\cap\"],\"math:Alt-KeyO\":[\"insert\",\"\\\\emptyset\"],\"math:Alt-KeyD\":[\"insert\",\"\\\\differentialD\"],\"math:Alt-Shift-KeyO\":[\"insert\",\"\\\\varnothing\"],\"math:Alt-Shift-KeyD\":[\"insert\",\"\\\\partial\"],\"math:Alt-Shift-KeyP\":[\"insert\",\"\\\\prod_{i=#?}^{#?}\"],\"math:Alt-Shift-KeyU\":[\"insert\",\"\\\\bigcup\"],\"math:Alt-Shift-KeyN\":[\"insert\",\"\\\\bigcap\"],\"math:Alt-Shift-KeyA\":[\"insert\",\"\\\\forall\"],\"math:Alt-Shift-KeyE\":[\"insert\",\"\\\\exists\"],\"math:Alt-Digit5\":[\"insert\",\"\\\\infty\"],\"math:Alt-Digit6\":[\"insert\",\"\\\\wedge\"],\"math:Alt-Shift-Digit6\":[\"insert\",\"\\\\vee\"],\"math:Alt-Digit9\":[\"insert\",\"(\"],\"math:Alt-Digit0\":[\"insert\",\")\"],\"math:Alt-Shift-Backslash\":[\"insert\",\"|\"],\"math:Alt-Backslash\":[\"insert\",\"\\\\backslash\"],\"math:Slash\":[\"insert\",\"\\\\frac{#@}{#?}\"],\"math:Alt-Slash\":[\"insert\",\"\\\\frac{#?}{#@}\"],\"math:NumpadDivide\":[\"insert\",\"\\\\frac{#@}{#?}\"],\"math:Alt-NumpadDivide\":[\"insert\",\"\\\\frac{#?}{#@}\"],\"math:Shift-Backquote\":[\"insert\",\"\\\\~\"],\"math:Alt-Shift-Slash\":[\"insert\",\"\\\\/\"],\"Alt-Shift-KeyK\":\"toggleKeystrokeCaption\",\"Alt-Space\":\"toggleVirtualKeyboard\",\"mac:Ctrl-Meta-Up\":[\"speak\",\"parent\",{withHighlighting:!1}],\"!mac:Ctrl-Alt-Up\":[\"speak\",\"parent\",{withHighlighting:!1}],\"mac:Ctrl-Meta-Down\":[\"speak\",\"all\",{withHighlighting:!1}],\"!mac:Ctrl-Alt-Down\":[\"speak\",\"all\",{withHighlighting:!1}],\"mac:Ctrl-Meta-Left\":[\"speak\",\"left\",{withHighlighting:!1}],\"!mac:Ctrl-Alt-Left\":[\"speak\",\"left\",{withHighlighting:!1}],\"mac:Ctrl-Meta-Right\":[\"speak\",\"right\",{withHighlighting:!1}],\"!mac:Ctrl-Alt-Right\":[\"speak\",\"right\",{withHighlighting:!1}],\"!mac:Ctrl-Alt-Period\":[\"speak\",\"selection\",{withHighlighting:!1}],\"mac:Ctrl-Meta-Period\":[\"speak\",\"selection\",{withHighlighting:!1}],\"mac:Ctrl-Meta-Shift-Up\":[\"speak\",\"parent\",{withHighlighting:!0}],\"!mac:Ctrl-Alt-Shift-Up\":[\"speak\",\"parent\",{withHighlighting:!0}],\"mac:Ctrl-Meta-Shift-Down\":[\"speak\",\"all\",{withHighlighting:!0}],\"!mac:Ctrl-Alt-Shift-Down\":[\"speak\",\"all\",{withHighlighting:!0}],\"mac:Ctrl-Meta-Shift-Left\":[\"speak\",\"left\",{withHighlighting:!0}],\"!mac:Ctrl-Alt-Shift-Left\":[\"speak\",\"left\",{withHighlighting:!0}],\"mac:Ctrl-Meta-Shift-Right\":[\"speak\",\"right\",{withHighlighting:!0}],\"!mac:Ctrl-Alt-Shift-Right\":[\"speak\",\"right\",{withHighlighting:!0}],\"!mac:Ctrl-Alt-Shift-Period\":[\"speak\",\"selection\",{withHighlighting:!0}],\"mac:Ctrl-Meta-Shift-Period\":[\"speak\",\"selection\",{withHighlighting:!0}]},we={\"\\\\theta\":\"Alt-KeyQ\",\"\\\\sqrt\":[\"Alt-KeyV\",\"Ctrl-Digit2\"],\"\\\\pi\":\"Alt-KeyP\",\"\\\\prod\":\"Alt-Shift-KeyP\",\"\\\\sum\":\"Alt-KeyW\",\"\\\\int\":\"Alt-KeyB\",\"\\\\cup\":\"Alt-KeyU\",\"\\\\cap\":\"Alt-KeyN\",\"\\\\bigcup\":\"Alt-Shift-KeyU\",\"\\\\bigcap\":\"Alt-Shift-KeyN\",\"\\\\forall\":\"Alt-Shift-KeyA\",\"\\\\exists\":\"Alt-Shift-KeyE\",\"\\\\infty\":\"Alt-Digit5\",\"\\\\wedge\":\"Alt-Digit5\",\"\\\\vee\":\"Alt-Shift-Digit6\",\"\\\\differentialD\":\"Alt-keyD\",\"\\\\partial\":\"Alt-Shift-KeyD\",\"\\\\frac\":\"Slash\",\"\\\\emptyset\":\"Alt-KeyO\",\"\\\\varnothing\":\"Alt-Shift-KeyO\",\"\\\\~\":\"~\"},Ae={\"''\":{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\"},sin:{mode:\"math\",value:\"\\\\sin\"},cos:{mode:\"math\",value:\"\\\\cos\"},tan:{mode:\"math\",value:\"\\\\tan\"},tanh:{mode:\"math\",value:\"\\\\tanh\"},log:{mode:\"math\",value:\"\\\\log\"},ln:{mode:\"math\",value:\"\\\\ln\"},exp:{mode:\"math\",value:\"\\\\exp\"},lim:{mode:\"math\",value:\"\\\\lim_{#?}\"},dx:\"\\\\differentialD x\",dy:\"\\\\differentialD y\",dt:\"\\\\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:\"\\\\times\",\"+-\":\"\\\\pm\",\"!=\":\"\\\\ne\",\">=\":\"\\\\ge\",\"<=\":\"\\\\le\",\"<<\":\"\\\\ll\",\">>\":\"\\\\gg\",\"~~\":\"\\\\approx\",\"≈\":\"\\\\approx\",\"?=\":\"\\\\questeq\",\"÷\":\"\\\\div\",\"¬\":\"\\\\neg\",\":=\":\"\\\\coloneq\",\"::\":\"\\\\Colon\",\"(:\":\"\\\\langle\",\":)\":\"\\\\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:\"\\\\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 Me(t,e,i){if(!i)return i;if(\"string\"==typeof i)return i;if(\"string\"==typeof i.mode&&i.mode!==t)return null;if(!e)return i?i.value:void 0;let s=!1,a=!1,o=!1,n=!1,r=!1,l=!1,c=!1,h=!1,p=!1,d=!1,m=!1,u=!1,f=!1,g=!1,y=e[e.length-1],b=e.length-1;for(;y&&/msubsup|placeholder/.test(y.type);)y=e[b-=1];return s=!y||\"first\"===y.type,y&&(a=!(f=\"text\"===y.mode)&&\"mord\"===y.type&&It.LETTER.test(y.body),o=!f&&\"mord\"===y.type&&/[0-9]+$/.test(y.body),n=!f&&y.isFunction,r=\"genfrac\"===y.type,l=\"surd\"===y.type,c=\"mbin\"===y.type,h=\"mrel\"===y.type,p=\"mpunct\"===y.type||\"minner\"===y.type,d=y.array,m=\"mopen\"===y.type,u=\"mclose\"===y.type||\"leftright\"===y.type,g=\"space\"===y.type),void 0!==i.after?/nothing/.test(i.after)&&s||/letter/.test(i.after)&&a||/digit/.test(i.after)&&o||/function/.test(i.after)&&n||/frac/.test(i.after)&&r||/surd/.test(i.after)&&l||/binop/.test(i.after)&&c||/relop/.test(i.after)&&h||/punct/.test(i.after)&&p||/array/.test(i.after)&&d||/openfence/.test(i.after)&&m||/closefence/.test(i.after)&&u||/text/.test(i.after)&&f||/space/.test(i.after)&&g?i.value:null:i.value}function Ce(t){let e=\"other\";return navigator&&navigator.platform&&navigator.userAgent&&(/^(mac)/i.test(navigator.platform)?e=\"mac\":/^(win)/i.test(navigator.platform)?e=\"win\":/(android)/i.test(navigator.userAgent)?e=\"android\":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e=\"ios\":/\\bCrOS\\b/i.test(navigator.userAgent)&&(e=\"chromeos\")),e===t?t:\"!\"+t}function _e(t){let e=t;return Array.isArray(e)&&e.length>0&&(e=e[0]+\"(\"+e.slice(1).join(\"\")+\")\"),e}function Te(t,e){let i=\"\";Array.isArray(t)||(t=[t]);for(const s of t){let t;const a=s.match(/(^[^:]*):/),o=a?a[1]:\"\";if(o===Ce(\"mac\")||o===Ce(\"win\")||o===Ce(\"ios\")||o===Ce(\"android\")||o===Ce(\"chromeos\")||o===Ce(\"other\")){const e=s.match(/:([^:]*)$/);t=e?e[1]:s}else if(![\"mac\",\"!mac\",\"win\",\"!win\",\"ios\",\"!ios\",\"android\",\"!android\",\"chromeos\",\"!chromeos\",\"other\",\"!other\"].includes(o)){const e=s.match(/:([^:]*)$/);t=e?e[1]:s}if(t){const s=\"mac\"===Ce(\"mac\")||\"ios\"===Ce(\"ios\"),a=t.length>1?t.split(\"-\"):[t];let o=\"\";for(const t of a)!s&&o.length>0&&(o+='+'),\"Key\"===t.substr(0,3)?o+=t.substr(3,1):\"Digit\"===t.substr(0,5)?o+=t.substr(5,1):o+={Meta:s?\"⌘\":\"command\",Shift:s?\"⇧\":\"shift\",Alt:s?\"⌥\":\"alt\",Ctrl:s?\"⌃\":\"control\",\"\\n\":s?\"⏎\":\"return\",Return:s?\"⏎\":\"return\",Enter:s?\"⌤\":\"enter\",Tab:s?\"⇥\":\"tab\",Esc:\"esc\",Backspace:s?\"⌫\":\"backspace\",Del:s?\"⌦\":\"del\",PageUp:s?\"⇞\":\"page up\",PageDown:s?\"⇟\":\"page down\",Home:s?\"⤒\":\"home\",End:s?\"⤓\":\"end\",Spacebar:\"space\",Semicolon:\";\",Period:\".\",Comma:\",\",Minus:\"-\",Equal:\"=\",Quote:\"'\",BracketLeft:\"[\",BracketRight:\"]\",Backslash:\"\\\\\",IntlBackslash:\"\\\\\",Backquote:\"`\",Slash:\"/\",NumpadMultiply:\"* 🔢\",NumpadDivide:\"/ 🔢\",NumpadSubtract:\"- 🔢\",NumpadAdd:\"+ 🔢\",NumpadDecimal:\". 🔢\",NumpadComma:\", 🔢\",Help:\"help\",Left:\"⇠\",Up:\"⇡\",Right:\"⇢\",Down:\"⇣\"}[t]||t;i.length>0&&(i+=e||\" or \"),i+=o}}return i}var Le={KEYBOARD_SHORTCUTS:Se,INLINE_SHORTCUTS:Ae,stringify:Te,startsWithString:function(t,e){const i=[];for(let s=0;s<=t.length-1;s++){const a=t.substring(s);e&&e.overrideDefaultInlineShortcuts||Object.keys(Ae).forEach(t=>{t.startsWith(a)&&!i.includes(t)&&i.push(t)});const o=e&&e.inlineShortcuts?e.inlineShortcuts:null;o&&Object.keys(o).forEach(t=>{t.startsWith(a)&&i.push(t)})}return i},forString:function(t,e,i,s){let a=\"\";s&&s.overrideDefaultInlineShortcuts||(a=Me(t,e,Ae[i]));const o=s&&s.inlineShortcuts?s.inlineShortcuts:null;let n;return o&&(n=Me(t,e,o[i])),n||a},selectorForKeystroke:function(t,e){for(const i of[Ce(\"mac\")+\":\"+t+\":\"+e,Ce(\"win\")+\":\"+t+\":\"+e,Ce(\"ios\")+\":\"+t+\":\"+e,Ce(\"android\")+\":\"+t+\":\"+e,Ce(\"chromeos\")+\":\"+t+\":\"+e,Ce(\"other\")+\":\"+t+\":\"+e,Ce(\"mac\")+\":\"+e,Ce(\"win\")+\":\"+e,Ce(\"ios\")+\":\"+e,Ce(\"android\")+\":\"+e,Ce(\"chromeos\")+\":\"+e,t+\":\"+e,e])if(Se[i])return Se[i];return\"\"},forCommand:function(t){let e=[];if(\"string\"==typeof t){const i=we[t];Array.isArray(i)?e=i.slice():i&&e.push(i)}t=_e(t);const i=new RegExp(\"^\"+t.replace(\"\\\\\",\"\\\\\\\\\").replace(\"|\",\"\\\\|\").replace(\"*\",\"\\\\*\").replace(\"$\",\"\\\\$\").replace(\"^\",\"\\\\^\")+\"([^*a-zA-Z]|$)\");return Object.keys(Se).forEach(t=>{if(i.test(_e(Se[t]))){const i=t.match(/:([^:]*)$/);i&&e.push(i[1])}}),Te(e)}};function Fe(t,e){this.root=pe.makeRoot(),this.path=[{relation:\"body\",offset:0}],this.extent=0,this.config=t?{...t}:{},this.target=e,this.suppressChangeNotifications=!1}function De(t){const e=Object.assign(new Fe(t.config,t.target),t);return e.path=ve.clone(t.path),e}function ze(t,e){let i=0;for(let s=0;s0;)i.col+=1,(!t[i.row]||i.col>=t[i.row].length)&&(i.col=0,i.row+=1),e-=1;return i}function qe(t,e){let i;return\"object\"!=typeof e&&(e=Ee(t,e)),Array.isArray(t[e.row])&&(i=t[e.row][e.col]||null),!i||0!==i.length&&\"first\"===i[0].type||i.unshift(Ve()),i}function Ie(t){let e=0,i=1;for(const s of t)e+=1,s.length>i&&(i=s.length);return e*i}function Pe(t,e,i){if(!t)return[];e||(e=\",\");let s,a=[];for(let o of t)o&&o.length>0&&\"first\"===o[0].type&&(o=o.slice(1)),o&&o.length>0&&(s?a.push(s):s=new pe.MathAtom(\"math\",\"mpunct\",e,i),a=a.concat(o));return a}function Be(t,e,i){const s={...e};if(s.row+=i,s.row<0){if(s.col+=i,s.row=t.length-1,s.col<0)return null;for(;s.row>=0&&!qe(t,s);)s.row-=1;if(s.row<0)return null}else if(s.row>=t.length){for(s.col+=i,s.row=0;s.rowt.length-1)return null}return s}function Oe(t){return!!t&&(\"mord\"===t.type&&/[0-9.]/.test(t.body)||\"mpunct\"===t.type&&\",\"===t.body)}function Re(t,e){if(!t)return!1;if(Array.isArray(t)){for(const i of t)if(Re(i,e))return!0}else{if(t===e)return!0;if([\"body\",\"numer\",\"denom\",\"index\",\"subscript\",\"superscript\",\"underscript\",\"overscript\"].some(function(i){return i===e||Re(t[i],e)}))return!0;if(t.array)for(let i=Ie(t.array);i>=0;i--)if(Re(qe(t.array,i),e))return!0}return!1}function Ke(t){if(t)return 1===t.length&&\"leftright\"===t[0].type&&\"(\"===t[0].leftDelim&&(t=t[0].body),t}function Ne(t,e){return t?t.length<=1?t:(e&&\"ASCIIMath\"===e.format||(t=t.replace(/\\\\\\\\([^\\s\\n])/g,\"\\\\$1\")),e&&\"ASCIIMath\"===e.format||!/\\\\/.test(t)?$e(t=(t=(t=(t=(t=(t=t.replace(/\\u2061/gu,\"\")).replace(/\\u3016/gu,\"{\")).replace(/\\u3017/gu,\"}\")).replace(/([^\\\\])sinx/g,\"$1\\\\sin x\")).replace(/([^\\\\])cosx/g,\"$1\\\\cos x \")).replace(/\\u2013/g,\"-\"),e):t):\"\"}function $e(t,e){if(!t)return\"\";let i,s=!1;if(s||\"^\"!==t[0]&&\"_\"!==t[0]||(i=We(t.substr(1),{...e,noWrap:!0}),t=t[0]+\"{\"+i.match+\"}\",t+=$e(i.rest,e),s=!0),s||(i=t.match(/^(sqrt|\\u221a)(.*)/))&&(t=\"\\\\sqrt{\"+(i=We(i[2],{...e,noWrap:!0})).match+\"}\",t+=$e(i.rest,e),s=!0),s||(i=t.match(/^(\\\\cbrt|\\u221b)(.*)/))&&(t=\"\\\\sqrt[3]{\"+(i=We(i[2],{...e,noWrap:!0})).match+\"}\",t+=$e(i.rest,e),s=!0),s||(i=t.match(/^abs(.*)/))&&(t=\"\\\\left|\"+(i=We(i[1],{...e,noWrap:!0})).match+\"\\\\right|\",t+=$e(i.rest,e),s=!0),s||(i=t.match(/^[\"”“](.*?)[\"”“](.*)/))&&(t=\"\\\\text{\"+i[1]+\"}\",t+=$e(i[2],e),s=!0),s||(i=t.match(/^([^a-zA-Z({[_^\\\\\\s\"]+)(.*)/))&&(t=He(i[1],e),t+=$e(i[2],e),s=!0),!s&&/^(f|g|h)[^a-zA-Z]/.test(t)&&(i=We(t.substring(1),e),t=t[0],t+=i.match,t+=$e(i.rest,e),s=!0),s||(i=t.match(/^([a-zA-Z]+)(.*)/))&&(t=He(i[1],e),t+=$e(i[2],e),s=!0),!s)if((i=We(t,{...e,noWrap:!0})).match&&\"/\"===i.rest[0]){const a=We(i.rest.substr(1),{...e,noWrap:!0});a.match&&(t=\"\\\\frac{\"+i.match+\"}{\"+a.match+\"}\"+$e(a.rest,e)),s=!0}else i.match&&/^(\\(|\\{|\\[)$/.test(t[0])?(t=\"\\\\left\"+t[0]+i.match+\"\\\\right\"+{\"(\":\")\",\"{\":\"}\",\"[\":\"]\"}[t[0]]+$e(i.rest,e),s=!0):i.match&&(t=i.match,t+=$e(i.rest,e),s=!0);return s||(i=t.match(/^(\\s+)(.*)$/))&&(t=\" \"+$e(i[2],e),s=!0),t}function We(t,e){let i=\"\",s=t=t.trim();const a=t.charAt(0),o={\"(\":\")\",\"{\":\"}\",\"[\":\"]\"}[a];if(o){let n=1,r=1;for(;r0;)t[r]===a&&n++,t[r]===o&&n--,r++;0===n?(i=e.noWrap&&\"(\"===a&&\")\"===o?$e(t.substring(1,r-1),e):\"\\\\mleft\"+a+$e(t.substring(1,r-1),e)+\"\\\\mright\"+o,s=t.substring(r)):(i=t.substring(1,r),s=\"\")}else{let a=t.match(/^([a-zA-Z]+)/);if(a){let i=Le.forString(\"math\",null,t,e);if(i)return{match:i=(i=i.replace(\"_{#?}\",\"\")).replace(\"^{#?}\",\"\"),rest:t.substring(i.length)}}if(a=t.match(/^([a-zA-Z])/))return{match:a[1],rest:t.substring(1)};if(a=t.match(/^(-)?\\d+(\\.\\d*)?/))return{match:a[0],rest:t.substring(a[0].length)};/^\\\\(left|right)/.test(t)||(a=t.match(/^(\\\\[a-zA-Z]+)/))&&(s=t.substring(a[1].length),i=a[1])}return{match:i,rest:s}}function He(t,e){let i=Le.forString(\"math\",null,t,e);return i?(i=(i=i.replace(\"_{#?}\",\"\")).replace(\"^{#?}\",\"\"),i+=\" \"):i=t,i}function Ve(){return new pe.MathAtom(\"\",\"first\")}Fe.prototype._announce=function(t,e,i){\"function\"==typeof this.config.onAnnounce&&this.config.onAnnounce(this.target,t,e,i)},Fe.prototype.filter=function(t,e){e=e<0?-1:1;const i=[],s=new Fe;s.path=ve.clone(this.path),s.extent=this.extent,s.root=this.root,e>=0?s.collapseForward():(s.collapseBackward(),s.move(1));const a=s.anchor();do{t.bind(s)(s.path,s.anchor())&&i.push(s.toString()),e>=0?s.next({iterateAll:!0}):s.previous({iterateAll:!0})}while(a!==s.anchor());return i},Fe.prototype.forEach=function(t){this.root.forEach(t)},Fe.prototype.forEachSelected=function(t,e){(e=e||{}).recursive=void 0!==e.recursive&&e.recursive;const i=this.siblings(),s=this.startOffset()+1,a=this.endOffset()+1;if(e.recursive)for(let e=s;e0?0:1)},Fe.prototype.setRange=function(t,e,i){i=i||{};const s=ve.pathDistance(t,e);if(0===s)return i.extendToWordBoundary?(t=this.wordBoundary(t,-1),e=this.wordBoundary(e,1),this.setRange(t,e)):this.setPath(ve.clone(t),0);if(1===s){const s=e[e.length-1].offset-t[t.length-1].offset;return i.extendToWordBoundary?(t=this.wordBoundary(t,s<0?1:-1),e=this.wordBoundary(e,s<0?-1:1),this.setRange(t,e)):this.setPath(ve.clone(t),s)}let a=ve.pathCommonAncestor(t,e);const o=a.length;if(t.length===o||e.length===o||t[o].relation!==e[o].relation)return this.setPath(a,-1);a.push(t[o]),a=ve.clone(a);let n=e[o].offset-t[o].offset+1;return n<=0?e.length>o+1?(a[o].relation=e[o].relation,a[o].offset=e[o].offset,a[a.length-1].offset-=1,n=2-n):(a[o].relation=e[o].relation,a[o].offset=e[o].offset,n=1-n):e.length<=t.length?a[a.length-1].offset-=1:e.length>t.length&&(a[o].offset-=1),this.setPath(a,n)},Fe.prototype.ancestor=function(t){if(t>this.path.length)return null;let e=this.root;for(let i=0;i0?this.path[this.path.length-1].relation:\"\"},Fe.prototype.anchorOffset=function(){return this.path.length>0?this.path[this.path.length-1].offset:0},Fe.prototype.focusOffset=function(){return this.path.length>0?this.path[this.path.length-1].offset+this.extent:0},Fe.prototype.startOffset=function(){return Math.min(this.focusOffset(),this.anchorOffset())},Fe.prototype.endOffset=function(){return Math.max(this.focusOffset(),this.anchorOffset())},Fe.prototype.insertFirstAtom=function(){this.siblings()},Fe.prototype.siblings=function(){if(0===this.path.length)return[];let t;return this.parent().array?t=qe(this.parent().array,this.relation()):\"string\"==typeof(t=this.parent()[this.relation()]||[])&&(t=[]),0!==t.length&&\"first\"===t[0].type||t.unshift(Ve()),t},Fe.prototype.sibling=function(t){return this.siblings()[this.startOffset()+t]},Fe.prototype.isCollapsed=function(){return 0===this.extent},Fe.prototype.setExtent=function(t){this.extent=t},Fe.prototype.collapseForward=function(){return 0!==this.extent&&(this.setSelection(this.endOffset()),!0)},Fe.prototype.collapseBackward=function(){return 0!==this.extent&&(this.setSelection(this.startOffset()),!0)},Fe.prototype.selectGroup_=function(){const t=this.siblings();if(\"text\"===this.anchorMode()){let e=this.startOffset(),i=this.endOffset();for(;t[e]&&\"text\"===t[e].mode&&It.LETTER_AND_DIGITS.test(t[e].body);)e-=1;for(;t[i]&&\"text\"===t[i].mode&&It.LETTER_AND_DIGITS.test(t[i].body);)i+=1;if(e>=(i-=1))return void this.setSelection(this.endOffset()-1,1);this.setSelection(e,i-e)}else if(\"mord\"===this.sibling(0).type&&/[0-9,.]/.test(this.sibling(0).body)){let e=this.startOffset(),i=this.endOffset();for(;Oe(t[e]);)e-=1;for(;Oe(t[i]);)i+=1;i-=1,this.setSelection(e,i-e)}else this.setSelection(0,\"end\")},Fe.prototype.selectAll_=function(){this.path=[{relation:\"body\",offset:0}],this.setSelection(0,\"end\")},Fe.prototype.deleteAll_=function(){this.selectAll_(),this.delete_()},Fe.prototype.contains=function(t){if(this.isCollapsed())return!1;const e=this.siblings(),i=this.startOffset(),s=this.endOffset();for(let a=i;a0&&\"command\"===t[e].type;)e-=1;let i=this.startOffset()+1;for(;i<=t.length-1&&\"command\"===t[i].type;)i+=1;return i>e?{start:e+1,end:i}:null},Fe.prototype.extractCommandStringAroundInsertionPoint=function(t){let e=\"\";const i=this.commandOffsets();if(i){const s=t?this.anchorOffset()+1:i.end,a=this.siblings();for(let t=i.start;t\"placeholder\"===t.type));this.setExtent(0),this.path[this.path.length-1].offset=e.start-1,0!==i.length&&this.leap(1,!1)||this.setSelection(e.start+t.length-1)}else this.siblings().splice(e.start,e.end-e.start),this.setSelection(e.start-1,0);this.contentDidChange()}},Fe.prototype.removeCommandString=function(){this.contentWillChange();const t=this.suppressChangeNotifications;this.suppressChangeNotifications=!0,function t(e){if(e)if(Array.isArray(e))for(let i=e.length-1;i>=0;i--)\"command\"===e[i].type?e.splice(i,1):t(e[i]);else if(t(e.body),t(e.superscript),t(e.subscript),t(e.underscript),t(e.overscript),t(e.numer),t(e.denom),t(e.index),e.array)for(let i=Ie(e.array);i>=0;i--)t(qe(e.array,i))}(this.root.body),this.suppressChangeNotifications=t,this.contentDidChange()},Fe.prototype.extractArgBeforeInsertionPoint=function(){const t=this.siblings();if(t.length<=1)return[];const e=[];let i=this.startOffset();if(\"text\"===t[i].mode)for(;i>=1&&\"text\"===t[i].mode;)e.unshift(t[i]),i--;else for(;i>=1&&/^(mord|surd|msubsup|leftright|mop|variable)$/.test(t[i].type);)e.unshift(t[i]),i--;return e},Fe.prototype.setSelection=function(t,e,i){t=t||0,e=e||0;const s=this.path[this.path.length-1].relation;i||(i=s);const a=this.parent();if(!a&&\"body\"!==i)return!1;const o=i.startsWith(\"cell\");if(!o&&!a[i]||o&&!a.array)return!1;const n=i!==s;this.path[this.path.length-1].relation=i;const r=this.siblings().length;this.path[this.path.length-1].relation=s;const l=this.extent;\"end\"===e?e=r-t-1:\"start\"===e&&(e=-t),this.setExtent(e);const c=this.extent!==l;this.setExtent(l),t<0&&(t=r+t),t=Math.max(0,Math.min(t,r-1));const h=this.path[this.path.length-1].offset;return(n||h!==t||c)&&(n&&this.adjustPlaceholder(),this.selectionWillChange(),this.path[this.path.length-1].relation=i,this.path[this.path.length-1].offset=t,this.setExtent(e),this.selectionDidChange()),!0},Fe.prototype.next=function(t){t=t||{};const e={body:\"numer\",numer:\"denom\",denom:\"index\",index:\"overscript\",overscript:\"underscript\",underscript:\"subscript\",subscript:\"superscript\"};if(this.anchorOffset()===this.siblings().length-1){this.adjustPlaceholder();let i=e[this.relation()];const s=this.parent();for(;i&&!s[i];)i=e[i];if(i)return void this.setSelection(0,0,i);if(this.parent().array){const t=Ie(this.parent().array);let e=parseInt(this.relation().match(/cell([0-9]*)$/)[1])+1;for(;e=0;){if(qe(this.parent().array,t)&&this.setSelection(-1,0,\"cell\"+t))return void this.selectionDidChange();t-=1}}return 1===this.path.length?(this.suppressChangeNotifications||!this.config.onMoveOutOf||this.config.onMoveOutOf.bind(this)(-1))&&(this.path[0].offset=this.root.body.length-1):(this.path.pop(),this.setSelection(this.anchorOffset()-1)),void this.selectionDidChange()}const i=this.anchor();if(!i.captureSelection){let t;if(i.array){t=\"\";const e=Ie(i.array);let s=e-1;for(;!t&&s0)for(this.collapseForward()&&t--;t>0;)this.next(),t--;else if(t<0)for(this.collapseBackward()&&t++;0!==t;)this.previous(),t++;this._announce(\"move\",e)}},Fe.prototype.up=function(t){const e=(t=t||{extend:!1}).extend||!1;this.collapseBackward();const i=this.relation();if(\"denom\"===i)e?(this.selectionWillChange(),this.path.pop(),this.path[this.path.length-1].offset-=1,this.setExtent(1),this.selectionDidChange()):this.setSelection(this.anchorOffset(),0,\"numer\"),this._announce(\"moveUp\");else if(this.parent().array){let e=Ee(this.parent().array,i);(e=Be(this.parent().array,e,-1))&&qe(e)?(this.path[this.path.length-1].relation=\"cell\"+ze(this.parent().array,e),this.setSelection(this.anchorOffset()),this._announce(\"moveUp\")):this.move(-1,t)}else this._announce(\"line\")},Fe.prototype.down=function(t){const e=(t=t||{extend:!1}).extend||!1;this.collapseForward();const i=this.relation();if(\"numer\"===i)e?(this.selectionWillChange(),this.path.pop(),this.path[this.path.length-1].offset-=1,this.setExtent(1),this.selectionDidChange()):this.setSelection(this.anchorOffset(),0,\"denom\"),this._announce(\"moveDown\");else if(this.parent().array){let e=Ee(this.parent().array,i);(e=Be(this.parent().array,e,1))&&qe(e)?(this.path[this.path.length-1].relation=\"cell\"+ze(this.parent().array,e),this.setSelection(this.anchorOffset()),this._announce(\"moveDown\")):this.move(1,t)}else this._announce(\"line\")},Fe.prototype.extend=function(t){let e=this.path[this.path.length-1].offset,i=0;const s=De(this),a=e+(i=this.extent+t);if(a<0&&0!==i){if(this.path.length>1)return this.selectionWillChange(),this.path.pop(),this.setExtent(-1),this.selectionDidChange(),void this._announce(\"move\",s);e=this.path[this.path.length-1].offset,i=this.extent}else if(a>=this.siblings().length){if(this.path.length>1)return this.selectionWillChange(),this.path.pop(),this.path[this.path.length-1].offset-=1,this.setExtent(1),this.selectionDidChange(),void this._announce(\"move\",s);this.isCollapsed()&&(e-=1),i-=1}this.setSelection(e,i),this._announce(\"move\",s)},Fe.prototype.skip=function(t,e){const i=(e=e||{extend:!1}).extend||!1;t=t<0?-1:1;const s=De(this),a=this.siblings(),o=this.focusOffset();let n=o+t;if(i&&(n=Math.min(Math.max(0,n),a.length-1)),n<0||n>=a.length)this.move(t,e);else{if(a[n]&&\"text\"===a[n].mode){if((n=this.wordBoundaryOffset(n,t))<0&&!i)return void this.setSelection(0);if(n>a.length)return this.setSelection(a.length-1),void this.move(t,e)}else{const e=a[n]?a[n].type:\"\";if(\"mopen\"===e&&t>0||\"mclose\"===e&&t<0){let i=\"mopen\"===e?1:-1;for(n+=t>0?1:-1;n>=0&&n0&&(n-=1)}else{for(;a[n]&&\"math\"===a[n].mode&&a[n].type===e;)n+=t;n-=t>0?1:0}}if(i){const t=this.anchorOffset();this.setSelection(t,n-t)}else this.setSelection(n);this._announce(\"move\",s)}},Fe.prototype.jump=function(t,e){const i=(e=e||{extend:!1}).extend||!1;t=t<0?-1:1;const s=this.siblings();let a=this.focusOffset();t>0&&(a=Math.min(a+1,s.length-1));const o=t<0?0:s.length-1;i?this.extend(o-a):this.move(o-a)},Fe.prototype.jumpToMathFieldBoundary=function(t,e){const i=(e=e||{extend:!1}).extend||!1;t=(t=t||1)<0?-1:1;const s=De(this),a=[{relation:\"body\",offset:this.path[0].offset}];let o;i?t<0?a[0].offset>0&&(o=-a[0].offset):a[0].offset\"placeholder\"===e.type||t.length>1&&1===this.siblings().length,t);if(0===o.length){if(this.setPath(s,a),e)if(this.config.onTabOutOf)this.config.onTabOutOf(this.target,t>0?\"forward\":\"backward\");else if(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),t=>(t.offsetWidth>0||t.offsetHeight>0)&&!t.contains(document.activeElement)||t===document.activeElement);let s=i.indexOf(document.activeElement)+t;s<0&&(s=i.length-1),s>=i.length&&(s=0),i[s].focus()}return this.suppressChangeNotifications=i,!1}return this.selectionWillChange(),this.setPath(o[0]),\"placeholder\"===this.anchor().type&&this.setExtent(-1),this._announce(\"move\",s),this.selectionDidChange(),this.suppressChangeNotifications=i,!0},Fe.prototype.anchorMode=function(){const t=this.isCollapsed()?this.anchor():this.sibling(1);let e;if(t){if(\"commandliteral\"===t.type||\"command\"===t.type)return\"command\";e=t.mode}let i=1,s=this.ancestor(i);for(;!e&&s;)s&&(e=s.mode),i+=1,s=this.ancestor(i);return e},Fe.prototype.anchorStyle=function(){const t=this.isCollapsed()?this.anchor():this.sibling(1);let e;if(t&&\"first\"!==t.type){if(\"commandliteral\"===t.type||\"command\"===t.type)return{};e={color:t.color,backgroundColor:t.backgroundColor,fontFamily:t.fontFamily,fontShape:t.fontShape,fontSeries:t.fontSeries,fontSize:t.fontSize}}let i=1,s=this.ancestor(i);for(;!e&&s;)s&&(e={color:s.color,backgroundColor:s.backgroundColor,fontFamily:s.fontFamily,fontShape:s.fontShape,fontSeries:s.fontSeries,fontSize:s.fontSize}),i+=1,s=this.ancestor(i);return e},Fe.prototype.simplifyParen=function(t){if(t&&this.config.removeExtraneousParentheses){for(let e=0;t[e];e++)if(\"leftright\"===t[e].type&&\"(\"===t[e].leftDelim&&Array.isArray(t[e].body)){let i=0,s=0,a=0;for(let o=0;t[e].body[o];o++)\"genfrac\"===t[e].body[o].type&&(i++,s=o),\"first\"!==t[e].body[o].type&&a++;0===a&&1===i&&(t[e]=t[e].body[s])}t.forEach(t=>{if(\"genfrac\"===t.type&&(this.simplifyParen(t.numer),this.simplifyParen(t.denom),t.numer=Ke(t.numer),t.denom=Ke(t.denom)),t.superscript&&(this.simplifyParen(t.superscript),t.superscript=Ke(t.superscript)),t.subscript&&(this.simplifyParen(t.subscript),t.subscript=Ke(t.subscript)),t.underscript&&(this.simplifyParen(t.underscript),t.underscript=Ke(t.underscript)),t.overscript&&(this.simplifyParen(t.overscript),t.overscript=Ke(t.overscript)),t.index&&(this.simplifyParen(t.index),t.index=Ke(t.index)),\"surd\"===t.type?(this.simplifyParen(t.body),t.body=Ke(t.body)):t.body&&Array.isArray(t.body)&&this.simplifyParen(t.body),t.array)for(let e=Ie(t.array);e>=0;e--)this.simplifyParen(qe(t.array,e))})}},Fe.prototype.insert=function(t,e){if((e=e||{}).smartFence&&this._insertSmartFence(t,e.style))return;const i=this.suppressChangeNotifications;e.suppressChangeNotifications&&(this.suppressChangeNotifications=!0),this.contentWillChange();const s=this.suppressChangeNotifications;this.suppressChangeNotifications=!0,e.insertionMode||(e.insertionMode=\"replaceSelection\"),e.selectionMode||(e.selectionMode=\"placeholder\"),e.format||(e.format=\"auto\"),e.macros=e.macros||this.config.macros;const a=e.mode||this.anchorMode();let o;const n=[this.getSelectedAtoms()];void 0!==e.placeholder&&(n[\"?\"]=e.placeholder),\"replaceSelection\"!==e.insertionMode||this.isCollapsed()?\"replaceAll\"===e.insertionMode?(this.root.body.splice(1),this.path=[{relation:\"body\",offset:0}],this.extent=0):\"insertBefore\"===e.insertionMode?this.collapseBackward():\"insertAfter\"===e.insertionMode&&this.collapseForward():this.delete_();const r=this.siblings(),l=this.startOffset();if(l+10&&r[l]&&\"placeholder\"===r[l].type&&this.delete_(-1),\"math\"===a&&\"ASCIIMath\"===e.format)t=Ne(t,{...this.config,format:\"ASCIIMath\"}),o=be.parseTokens(x.tokenize(t),\"math\",null,e.macros,!1),this.simplifyParen(o);else if(\"text\"!==a&&\"auto\"===e.format)if(\"command\"===a){o=[];for(const e of t)It.COMMAND_MODE_CHARACTERS.test(e)&&o.push(new pe.MathAtom(\"command\",\"command\",e))}else\"\u001b\"===t?o=[new pe.MathAtom(\"command\",\"command\",\"\\\\\")]:(t=Ne(t,this.config),n[0]?t=t.replace(/(^|[^\\\\])#@/g,\"$1#0\"):/(^|[^\\\\])#@/.test(t)?(t=t.replace(/(^|[^\\\\])#@/g,\"$1#0\"),n[0]=this.extractArgBeforeInsertionPoint(),this._deleteAtoms(-n[0].length),Array.isArray(n[0])&&0===n[0].length&&(n[0]=void 0)):t=t.replace(/(^|[^\\\\])#@/g,\"$1#?\"),o=be.parseTokens(x.tokenize(t),a,n,e.macros,e.smartFence),this.simplifyParen(o));else\"latex\"===e.format?o=be.parseTokens(x.tokenize(t),a,n,e.macros,e.smartFence):\"text\"!==a&&\"text\"!==e.format||(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 \"),o=be.parseTokens(x.tokenize(t),\"text\",n,e.macros,!1));!function t(e,i){e&&i&&(Array.isArray(e)?e.forEach(e=>t(e,i)):\"object\"==typeof e&&(e.color||e.backgroundColor||e.fontFamily||e.fontShape||e.fontSeries||e.fontSize||(e.applyStyle(i),t(e.body,i),t(e.numer,i),t(e.denom,i),t(e.index,i),t(e.overscript,i),t(e.underscript,i),t(e.subscript,i),t(e.superscript,i))))}(o,e.style);const c=this.parent();if(this.config.removeExtraneousParentheses&&c&&\"leftright\"===c.type&&\"(\"===c.leftDelim&&function(t){return 0===t.length||1===t.length&&\"first\"===t[0].type}(c.body)&&o&&1===o.length&&\"genfrac\"===o[0].type?(this.path.pop(),this.siblings()[this.anchorOffset()]=o[0]):Array.prototype.splice.apply(this.siblings(),[this.anchorOffset()+1,0].concat(o)),this.insertFirstAtom(),this.suppressChangeNotifications=s,\"placeholder\"===e.selectionMode){let t=[];for(const e of o)t=t.concat(e.filter(t=>\"placeholder\"===t.type));0!==t.length&&this.leap(1,!1)?this._announce(\"move\"):this.setSelection(this.anchorOffset()+o.length)}else\"before\"===e.selectionMode||(\"after\"===e.selectionMode?this.setSelection(this.anchorOffset()+o.length):\"item\"===e.selectionMode&&this.setSelection(this.anchorOffset(),o.length));this.contentDidChange(),this.suppressChangeNotifications=i},Fe.prototype._insertSmartFence=function(t,e){const i=this.parent();\"{\"!==t&&\"\\\\{\"!==t||(t=\"\\\\lbrace\"),\"}\"!==t&&\"\\\\}\"!==t||(t=\"\\\\rbrace\"),\"[\"!==t&&\"\\\\[\"!==t||(t=\"\\\\lbrack\"),\"]\"!==t&&\"\\\\]\"!==t||(t=\"\\\\rbrack\");const s=It.RIGHT_DELIM[t];if(s&&(\"leftright\"!==i.type||\"|\"!==i.leftDelim)){let i=\"\";const a=this.isCollapsed()||\"placeholder\"===this.anchor().type;i=this.sibling(0).isFunction?\"\\\\mleft\"+t+\"\\\\mright\":\"\\\\left\"+t+\"\\\\right\",i+=a?\"?\":s;let o=[];return a&&(o=this.siblings().splice(this.anchorOffset()+1,this.siblings().length)),this.insert(i,{mode:\"math\",format:\"latex\",style:e}),a&&(this.sibling(0).body=o,this.move(-1)),!0}let a;if(Object.keys(It.RIGHT_DELIM).forEach(e=>{t===It.RIGHT_DELIM[e]&&(a=e)}),a){if(i&&\"leftright\"===i.type&&this.endOffset()===this.siblings().length-1)return this.contentWillChange(),i.rightDelim=t,this.move(1),this.contentDidChange(),!0;const s=this.siblings();let a;for(a=this.endOffset();a>=0&&(\"leftright\"!==s[a].type||\"?\"!==s[a].rightDelim);a--);if(a>=0)return this.contentWillChange(),s[a].rightDelim=t,s[a].body=s[a].body.concat(s.slice(a+1,this.endOffset()+1)),s.splice(a+1,this.endOffset()-a),this.setSelection(a),this.contentDidChange(),!0;if(i&&\"leftright\"===i.type&&\"?\"===i.rightDelim){this.contentWillChange(),i.rightDelim=t;const e=s.slice(this.endOffset()+1);return s.splice(this.endOffset()+1),this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.endOffset()+1,0].concat(e)),this.contentDidChange(),!0}const o=this.ancestor(2);return o&&\"leftright\"===o.type&&\"?\"===o.rightDelim&&this.endOffset()===s.length-1?(this.move(1),this._insertSmartFence(t,e)):(this.insert(t,{mode:\"math\",format:\"latex\",style:e}),!0)}return!1},Fe.prototype.positionInsertionPointAfterCommitedCommand=function(){const t=this.siblings(),e=this.commandOffsets();let i=e.start;for(;i=0;e--)t[e].suggestion&&t.splice(e,1)},Fe.prototype.insertSuggestion=function(t,e){this.removeSuggestion();const i=[],s=t.substr(e);for(const t of s){const e=new pe.MathAtom(\"command\",\"command\",t);e.suggestion=!0,i.push(e)}Array.prototype.splice.apply(this.siblings(),[this.anchorOffset()+1,0].concat(i))},Fe.prototype._deleteAtoms=function(t){t>0?this.siblings().splice(this.anchorOffset()+1,t):(this.siblings().splice(this.anchorOffset()+t+1,-t),this.setSelection(this.anchorOffset()+t))},Fe.prototype.delete=function(t){if(0===(t=t||0))this.delete_(0);else if(t>0)for(;t>0;)this.delete_(1),t--;else for(;t<0;)this.delete_(-1),t++},Fe.prototype.delete_=function(t){this.contentWillChange(),this.selectionWillChange();const e=this.suppressChangeNotifications;if(this.suppressChangeNotifications=!0,t=(t=t||0)<0?-1:t>0?1:t,this.removeSuggestion(),this.parent().array&&t<0&&0===this.startOffset()){const t=this.parent().array;if(function(t){const e={col:0,row:0};for(;e.row0){let t=e.length;\"first\"===e[0].type&&(t-=1),t>0&&(i+=1)}s.row+=1}return i}(t,e.col)){!function(t,e){let i=0;for(;i\"placeholder\"!==t.type&&\"first\"!==t.type);this.parent()[t]=null,this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),0].concat(e)),this.setSelection(this.anchorOffset()-1),this._announce(\"deleted: \"+t)}else if(\"denom\"===t){const t=this.parent().numer.filter(t=>\"placeholder\"!==t.type&&\"first\"!==t.type),e=this.parent().denom.filter(t=>\"placeholder\"!==t.type&&\"first\"!==t.type);this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),1].concat(e)),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),0].concat(t)),this.setSelection(this.anchorOffset()+t.length-1),this._announce(\"deleted: denominator\")}else if(\"body\"===t){const t=this.siblings().filter(t=>\"placeholder\"!==t.type);this.path.length>1&&(t.shift(),this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),1].concat(t)),this.setSelection(this.anchorOffset()-1),this._announce(\"deleted: root\"))}else this.move(-1),this.delete(-1)}else if(t>0)if(a!==i.length-1)/^(group|array|genfrac|surd|leftright|overlap|overunder|box|mathstyle|sizing)$/.test(this.sibling(1).type)?this.move(1):(this._announce(\"delete\",null,i.slice(a+1,a+2)),i.splice(a+1,1));else{const t=this.relation();if(\"root\"===s.type&&1===s.body.length)return void(this.suppressChangeNotifications=e);if(\"numer\"===t){const t=this.parent().numer.filter(t=>\"placeholder\"!==t.type&&\"first\"!==t.type),e=this.parent().denom.filter(t=>\"placeholder\"!==t.type&&\"first\"!==t.type);this.path.pop(),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),1].concat(e)),Array.prototype.splice.apply(this.siblings(),[this.anchorOffset(),0].concat(t)),this.setSelection(this.anchorOffset()+t.length-1),this._announce(\"deleted: numerator\")}else this.move(1),this.delete(1)}}else{const t=this.startOffset()+1,e=this.endOffset()+1;this._announce(\"deleted\",null,i.slice(t,e)),i.splice(t,e-t),this.setSelection(t-1)}this.suppressChangeNotifications=e,this.selectionDidChange(),this.contentDidChange()},Fe.prototype.moveToNextPlaceholder_=function(){this.leap(1)},Fe.prototype.moveToPreviousPlaceholder_=function(){this.leap(-1)},Fe.prototype.moveToNextChar_=function(){this.move(1)},Fe.prototype.moveToPreviousChar_=function(){this.move(-1)},Fe.prototype.moveUp_=function(){this.up()},Fe.prototype.moveDown_=function(){this.down()},Fe.prototype.moveToNextWord_=function(){this.skip(1)},Fe.prototype.moveToPreviousWord_=function(){this.skip(-1)},Fe.prototype.moveToGroupStart_=function(){this.setSelection(0)},Fe.prototype.moveToGroupEnd_=function(){this.setSelection(-1)},Fe.prototype.moveToMathFieldStart_=function(){this.jumpToMathFieldBoundary(-1)},Fe.prototype.moveToMathFieldEnd_=function(){this.jumpToMathFieldBoundary(1)},Fe.prototype.deleteNextChar_=function(){this.delete_(1)},Fe.prototype.deletePreviousChar_=function(){this.delete_(-1)},Fe.prototype.deleteNextWord_=function(){this.extendToNextBoundary(),this.delete_()},Fe.prototype.deletePreviousWord_=function(){this.extendToPreviousBoundary(),this.delete_()},Fe.prototype.deleteToGroupStart_=function(){this.extendToGroupStart(),this.delete_()},Fe.prototype.deleteToGroupEnd_=function(){this.extendToMathFieldStart(),this.delete_()},Fe.prototype.deleteToMathFieldEnd_=function(){this.extendToMathFieldEnd(),this.delete_()},Fe.prototype.transpose_=function(){},Fe.prototype.extendToNextChar_=function(){this.extend(1)},Fe.prototype.extendToPreviousChar_=function(){this.extend(-1)},Fe.prototype.extendToNextWord_=function(){this.skip(1,{extend:!0})},Fe.prototype.extendToPreviousWord_=function(){this.skip(-1,{extend:!0})},Fe.prototype.extendUp_=function(){this.up({extend:!0})},Fe.prototype.extendDown_=function(){this.down({extend:!0})},Fe.prototype.extendToNextBoundary_=function(){this.skip(1,{extend:!0})},Fe.prototype.extendToPreviousBoundary_=function(){this.skip(-1,{extend:!0})},Fe.prototype.extendToGroupStart_=function(){this.setExtent(-this.anchorOffset())},Fe.prototype.extendToGroupEnd_=function(){this.setExtent(this.siblings().length-this.anchorOffset())},Fe.prototype.extendToMathFieldStart_=function(){this.jumpToMathFieldBoundary(-1,{extend:!0})},Fe.prototype.extendToMathFieldEnd_=function(){this.jumpToMathFieldBoundary(1,{extend:!0})},Fe.prototype.moveToSuperscript_=function(){if(this.collapseForward(),!this.anchor().superscript)if(this.anchor().subscript)this.anchor().superscript=[Ve()];else{const t=this.sibling(1);t&&t.superscript?this.path[this.path.length-1].offset+=1:t&&t.subscript?(this.path[this.path.length-1].offset+=1,this.anchor().superscript=[Ve()]):(\"limits\"!==this.anchor().limits&&(this.siblings().splice(this.anchorOffset()+1,0,new pe.MathAtom(this.parent().anchorMode,\"msubsup\",\"​\",this.anchorStyle())),this.path[this.path.length-1].offset+=1),this.anchor().superscript=[Ve()])}this.path.push({relation:\"superscript\",offset:0}),this.selectGroup_()},Fe.prototype.moveToSubscript_=function(){if(this.collapseForward(),!this.anchor().subscript)if(this.anchor().superscript)this.anchor().subscript=[Ve()];else{const t=this.sibling(1);t&&t.subscript?this.path[this.path.length-1].offset+=1:t&&t.superscript?(this.path[this.path.length-1].offset+=1,this.anchor().subscript=[Ve()]):(\"limits\"!==this.anchor().limits&&(this.siblings().splice(this.anchorOffset()+1,0,new pe.MathAtom(this.parent().anchorMode,\"msubsup\",\"​\",this.anchorStyle())),this.path[this.path.length-1].offset+=1),this.anchor().subscript=[Ve()])}this.path.push({relation:\"subscript\",offset:0}),this.selectGroup_()},Fe.prototype.moveToOpposite_=function(){const t={superscript:\"subscript\",subscript:\"superscript\",denom:\"numer\",numer:\"denom\"}[this.relation()];t||this.moveToSuperscript_(),this.parent()[t]||(this.parent()[t]=[Ve()]),this.setSelection(0,\"end\",t)},Fe.prototype.moveBeforeParent_=function(){this.path.length>1?(this.path.pop(),this.setSelection(this.anchorOffset()-1)):this._announce(\"plonk\")},Fe.prototype.moveAfterParent_=function(){if(this.path.length>1){const t=De(this);this.path.pop(),this.setExtent(0),this._announce(\"move\",t)}else this._announce(\"plonk\")},Fe.prototype._addCell=function(t){const e=this.parent();if(e&&\"array\"===e.type&&Array.isArray(e.array)){const i=this.relation();if(e.array){const s=Ee(e.array,i);\"after row\"===t||\"before row\"===t?(s.col=0,s.row=s.row+(\"after row\"===t?1:0),e.array.splice(s.row,0,[[]])):(s.col+=\"after column\"===t?1:0,e.array[s.row].splice(s.col,0,[]));const a=ze(e.array,s);this.path.pop(),this.path.push({relation:\"cell\"+a.toString(),offset:0}),this.insertFirstAtom()}}},Fe.prototype.convertParentToArray=function(){const t=this.parent();if(\"leftright\"===t.type){t.type=\"array\";const e={\"(\":\"pmatrix\",\"\\\\lbrack\":\"bmatrix\",\"\\\\lbrace\":\"cases\"}[t.leftDelim]||\"matrix\",i=It.getEnvironmentInfo(e),s=[[t.body]];i.parser&&Object.assign(t,i.parser(e,[],s)),t.tabularMode=i.tabular,t.parseMode=this.anchorMode(),t.env={...i},t.env.name=e,t.array=s,t.rowGaps=[0],delete t.body,this.path[this.path.length-1].relation=\"cell0\"}},Fe.prototype.addRowAfter_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell(\"after row\"),this.contentDidChange()},Fe.prototype.addRowBefore_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell(\"before row\"),this.contentDidChange()},Fe.prototype.addColumnAfter_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell(\"after column\"),this.contentDidChange()},Fe.prototype.addColumnBefore_=function(){this.contentWillChange(),this.convertParentToArray(),this._addCell(\"before column\"),this.contentDidChange()},Fe.prototype.applyStyle_=function(t){if(this.isCollapsed())return;const e=this;function i(t,i){let s=!0;return e.forEachSelected(e=>{s=s&&e[t]===i},{recursive:!0}),s}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\"),this.contentWillChange(),this.forEachSelected(e=>e.applyStyle(t),{recursive:!0}),this.contentDidChange()};var Ue={EditableMathlist:Fe,parseMathString:Ne};const je={\"#\":\"#\",\"|\":\"|\",\"[\":\"BracketLeft\",\"]\":\"BracketRight\",\"-\":\"Minus\",\"+\":\"Plus\",\"=\":\"Equal\",\"/\":\"Slash\",\"\\\\\":\"Backslash\"},Ge={Space:\"Spacebar\",\" \":\"Spacebar\",Escape:\"Esc\",ArrowLeft:\"Left\",ArrowUp:\"Up\",ArrowRight:\"Right\",ArrowDown:\"Down\",Delete:\"Del\"},Ze={q:\"KeyQ\",w:\"KeyW\",e:\"KeyE\",r:\"KeyR\",t:\"KeyT\",y:\"KeyY\",u:\"KeyU\",i:\"KeyI\",o:\"KeyO\",p:\"KeyP\",a:\"KeyA\",s:\"KeyS\",d:\"KeyD\",f:\"KeyF\",g:\"KeyG\",h:\"KeyH\",j:\"KeyJ\",k:\"KeyK\",l:\"KeyL\",z:\"KeyZ\",x:\"KeyX\",c:\"KeyC\",v:\"KeyV\",b:\"KeyB\",n:\"KeyN\",m:\"KeyM\",1:\"Digit1\",2:\"Digit2\",3:\"Digit3\",4:\"Digit4\",5:\"Digit5\",6:\"Digit6\",7:\"Digit7\",8:\"Digit8\",9:\"Digit9\",0:\"Digit0\",\"!\":\"Shift-Digit1\",\"@\":\"Shift-Digit2\",\"#\":\"Shift-Digit3\",$:\"Shift-Digit4\",\"%\":\"Shift-Digit5\",\"^\":\"Shift-Digit6\",\"&\":\"Shift-Digit7\",\"*\":\"Shift-Digit8\",\"(\":\"Shift-Digit9\",\")\":\"Shift-Digit0\",\"-\":\"Minus\",_:\"Shift-Minus\",\"/\":\"Slash\",\"\\\\\":\"Backslash\",\"|\":\"Shift-Backslash\",\"?\":\"Shift-Slash\",\" \":\"Spacebar\"};function Xe(t){let e,i=!0;\"Unidentified\"===t.key&&t.target&&(e=Ze[t.target.value]||t.target.value),e||(je[t.key]?(e=je[t.key],i=!1):e=Ge[t.key],e||(e=Ze[t.key.toLowerCase()]||t.key)),!e&&t.code&&(e=Ge[t.code]||t.code);const s=[];return t.ctrlKey&&s.push(\"Ctrl\"),t.metaKey&&s.push(\"Meta\"),i&&t.altKey&&s.push(\"Alt\"),i&&t.shiftKey&&s.push(\"Shift\"),0===s.length?e:(s.push(e),s.join(\"-\"))}function Je(t,e){let i,s=null,a=null,o=!1,n=!1;function r(t){i&&clearTimeout(i),i=setTimeout(function(){clearTimeout(i),t()})}function l(){if(function(t){return t.selectionStart!==t.selectionEnd}(t))return;const i=t.value;t.value=\"\",i.length>0&&e.typedText(i)}function c(i){if(\"function\"==typeof e.allowDeadKey&&e.allowDeadKey()||\"Dead\"!==i.key&&\"Unidentified\"!==i.key&&229!==i.keyCode)n=!1;else{n=!0,o=!1;const i=e.blur,s=e.focus;e.blur=null,e.focus=null,t.blur(),t.focus(),e.blur=i,e.focus=s}return!(!o&&\"CapsLock\"!==i.code&&!/(Control|Meta|Alt|Shift)(Right|Left)/.test(i.code))||(s=i,a=null,e.keystroke(Xe(i),i))}function h(t){o||(s&&a&&e.keystroke(Xe(s),s),a=t,r(l))}function p(){o||!s||a||l()}function d(){t.focus();const i=t.value;t.value=\"\",i.length>0&&e.paste(i)}function m(t){e.copy&&e.copy(t)}function u(t){e.cut&&e.cut(t)}function f(){s=null,a=null,e.blur&&e.blur()}function g(){e.focus&&e.focus()}function y(){o=!0}function b(){o=!1,r(l)}function x(){if(n){const i=e.blur,s=e.focus;e.blur=null,e.focus=null,t.blur(),t.focus(),e.blur=i,e.focus=s,n=!1,o=!1,r(l)}else o||r(l)}const k=t||e.container;return k.addEventListener(\"keydown\",c,!0),k.addEventListener(\"keypress\",h,!0),k.addEventListener(\"keyup\",p,!0),k.addEventListener(\"paste\",d,!0),k.addEventListener(\"copy\",m,!0),k.addEventListener(\"cut\",u,!0),k.addEventListener(\"blur\",f,!0),k.addEventListener(\"focus\",g,!0),k.addEventListener(\"compositionstart\",y,!0),k.addEventListener(\"compositionend\",b,!0),k.addEventListener(\"input\",x),function(){i&&clearTimeout(i),k.removeEventListener(\"keydown\",c,!0),k.removeEventListener(\"keypress\",h,!0),k.removeEventListener(\"keyup\",p,!0),k.removeEventListener(\"paste\",d,!0),k.removeEventListener(\"copy\",m,!0),k.removeEventListener(\"cut\",u,!0),k.removeEventListener(\"blur\",f,!0),k.removeEventListener(\"focus\",g,!0),k.removeEventListener(\"compositionstart\",y,!0),k.removeEventListener(\"compositionend\",b,!0),k.removeEventListener(\"input\",x)}}var Ye={delegateKeyboardEvents:Je,select:Je.select,keyboardEventToString:Xe,eventToChar:function(t){if(!t)return\"\";let e;return\"Unidentified\"===t.key&&t.target&&(e=t.target.value),e=e||t.key||t.code,/^(Return|Enter|Tab|Escape|Delete|PageUp|PageDown|Home|End|Help|ArrowLeft|ArrowRight|ArrowUp|ArrowDown)$/.test(e)&&(e=\"\"),e},charToEvent:function(t){return{key:t,metaKey:!1,ctrlKey:!1,altKey:!1,shiftKey:!1}}},Qe={UndoManager:class{constructor(t){this.mathlist=t,this.maximumDepth=1e3,this.record=!1,this.canCoalesce=!1,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(t){this.canUndo()&&(t&&\"function\"==typeof t.onUndoStateWillChange&&t.onUndoStateWillChange(this.mathlist.target,\"undo\"),this.restore(this.stack[this.index-1],t),this.index-=1,t&&\"function\"==typeof t.onUndoStateDidChange&&t.onUndoStateDidChange(this.mathlist.target,\"undo\"),this.canCoalesce=!1)}redo(t){this.canRedo()&&(t&&\"function\"===t.onUndoStateWillChange&&t.onUndoStateWillChange(this.mathlist.target,\"redo\"),this.index+=1,this.restore(this.stack[this.index],t),t&&\"function\"==typeof t.onUndoStateDidChange&&t.onUndoStateDidChange(this.mathlist.target,\"redo\"),this.canCoalesce=!1)}pop(){this.canUndo()&&(this.index-=1,this.stack.pop())}snapshot(t){this.record&&(t&&\"function\"===t.onUndoStateWillChange&&t.onUndoStateWillChange(this.mathlist.target,\"snapshot\"),this.stack.splice(this.index+1,this.stack.length-this.index-1),this.stack.push({latex:this.mathlist.root.toLatex(),selection:this.mathlist.toString()}),this.index++,this.stack.length>this.maximumDepth&&this.stack.shift(),t&&\"function\"==typeof t.onUndoStateDidChange&&t.onUndoStateDidChange(this.mathlist.target,\"snapshot\"),this.canCoalesce=!1)}snapshotAndCoalesce(t){this.canCoalesce&&this.pop(),this.snapshot(t),this.canCoalesce=!0}save(){return{latex:this.mathlist.root.toLatex(),selection:this.mathlist.toString()}}restore(t,e){const i=this.mathlist.suppressChangeNotifications;void 0!==e.suppressChangeNotifications&&(this.mathlist.suppressChangeNotifications=e.suppressChangeNotifications),this.mathlist.insert(t?t.latex:\"\",{mode:\"math\",insertionMode:\"replaceAll\",selectionMode:\"after\",format:\"latex\",...e}),this.mathlist.setPath(t?t.selection:[{relation:\"body\",offset:0}]),this.mathlist.suppressChangeNotifications=i}}};const ti={\"\\\\mathrm\":\"\\\\mathrm{x=+3.14, x\\\\in A}\",\"\\\\mathbf\":\"\\\\mathbf{x=+3.14, x\\\\in A}\",\"\\\\bf\":\"\\\\bf{x=+3.14, x\\\\in A}\",\"\\\\bm\":\"\\\\bm{x=+3.14, x\\\\in A}\",\"\\\\bold\":\"\\\\bold{x=+3.14, x\\\\in A}\",\"\\\\mathit\":\"\\\\mathbb{x=+3.14}\",\"\\\\mathbb\":\"\\\\mathbb{ABCD}\",\"\\\\Bbb\":\"\\\\mathbb{ABCD}\",\"\\\\frak\":\"\\\\frak{ABCD}\",\"\\\\mathfrak\":\"\\\\mathfrak{ABCD}\",\"\\\\mathscr\":\"\\\\mathscr{ABCD}\",\"\\\\mathsf\":\"\\\\mathsf{ABab01}\",\"\\\\mathtt\":\"\\\\mathtt{x=+3.14, x\\\\in A}\",\"\\\\mathcal\":\"\\\\mathcal{ABCD}\",\"\\\\boldsymbol\":\"\\\\boldsymbol{ABab01+=}\",\"\\\\text\":\"\\\\text{ABC abc}\",\"\\\\textrm\":\"\\\\textrm{ABC abc}\",\"\\\\textnormal\":\"\\\\textnormal{ABC abc}\",\"\\\\textit\":\"\\\\textit{ABC abc}\",\"\\\\textbf\":\"\\\\textbf{ABC abc}\",\"\\\\texttt\":\"\\\\texttt{ABC abc}\",\"\\\\textsf\":\"\\\\textsf{ABC abc}\",\"\\\\textcolor\":\"{\\\\textcolor{m0}A}{\\\\textcolor{m1}B}{\\\\textcolor{m2}C }{\\\\textcolor{m3}a}{\\\\textcolor{m4}b}{\\\\textcolor{m5}c}{\\\\textcolor{m6}8}\",\"\\\\color\":\"{\\\\color{m0}A}{\\\\color{m1}B}{\\\\color{m2}C}{\\\\color{m3}a}{\\\\color{m4}b}{\\\\color{m5}c}{\\\\color{m6}8}\",\"\\\\underline\":'\\\\underline{\\\\unicode{\"2B1A}}',\"\\\\overline\":'\\\\overline{\\\\unicode{\"2B1A}}',\"\\\\vec\":'\\\\vec{\\\\unicode{\"25CC}}',\"\\\\check\":'\\\\check{\\\\unicode{\"25CC}}',\"\\\\acute\":'\\\\acute{\\\\unicode{\"25CC}}',\"\\\\breve\":'\\\\breve{\\\\unicode{\"25CC}}',\"\\\\tilde\":'\\\\tilde{\\\\unicode{\"25CC}}',\"\\\\hat\":'\\\\hat{\\\\unicode{\"25CC}}',\"\\\\ddot\":'\\\\ddot{\\\\unicode{\"25CC}}',\"\\\\dot\":'\\\\dot{\\\\unicode{\"25CC}}',\"\\\\bar\":'\\\\bar{\\\\unicode{\"25CC}}',\"\\\\!\":'\\\\unicode{\"203A}\\\\!\\\\unicode{\"2039}',\"\\\\,\":'\\\\unicode{\"203A}\\\\,\\\\unicode{\"2039}',\"\\\\:\":'\\\\unicode{\"203A}\\\\:\\\\unicode{\"2039}',\"\\\\;\":'\\\\unicode{\"203A}\\\\;\\\\unicode{\"2039}',\"\\\\quad\":'\\\\unicode{\"203A}\\\\quad\\\\unicode{\"2039}',\"\\\\qquad\":'\\\\unicode{\"203A}\\\\qquad\\\\unicode{\"2039}',\"\\\\enskip\":'\\\\unicode{\"203A}\\\\enskip\\\\unicode{\"2039}',\"\\\\space\":'\\\\unicode{\"203A}\\\\space\\\\unicode{\"2039}',\"\\\\frac\":'\\\\frac{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\dfrac\":'\\\\dfrac{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\cfrac\":'\\\\cfrac{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\tfrac\":'\\\\tfrac{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\dbinom\":'\\\\dbinom{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\tbinom\":'\\\\tbinom{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\binom\":'\\\\binom{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\pdiff\":'\\\\pdiff{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\in\":\"n\\\\in\\\\N\",\"\\\\notin\":\"n\\\\notin\\\\N\",\"\\\\not\":\"B \\\\not A\",\"\\\\ni\":\"N\\\\in n\",\"\\\\owns\":\"N\\\\owns n\",\"\\\\subset\":\"A\\\\subset B\",\"\\\\supset\":\"B\\\\supset A\",\"\\\\subseteq\":\"A\\\\subseteq B\",\"\\\\supseteq\":\"B\\\\supseteq A\",\"\\\\nsubseteq\":\"A\\\\nsubseteq B\",\"\\\\nsupseteq\":\"B\\\\nsupseteq A\",\"\\\\subsetneq\":\"A\\\\subsetneq B\",\"\\\\supsetneq\":\"B\\\\supsetneq A\",\"\\\\varsubsetneq\":\"A\\\\varsubsetneq B\",\"\\\\varsupsetneq\":\"B\\\\varsupsetneq A\",\"\\\\nsubseteqq\":\"A\\\\varsupsetneq B\",\"\\\\subsetneqq\":\"A\\\\subsetneqq B\",\"\\\\varsubsetneqq\":\"A\\\\varsubsetneqq B\",\"\\\\nsubset\":\"A\\\\nsubset B\",\"\\\\nsupset\":\"B\\\\nsupset A\",\"\\\\complement\":\"A^\\\\complement\",\"\\\\bigcup\":'\\\\bigcup_{\\\\unicode{\"2B1A}}',\"\\\\bigcap\":'\\\\bigcap_{\\\\unicode{\"2B1A}}',\"\\\\sqrt\":'\\\\sqrt{\\\\unicode{\"2B1A}}',\"\\\\prod\":'\\\\prod_{\\\\unicode{\"2B1A}}^{\\\\unicode{\"2B1A}}',\"\\\\sum\":'\\\\sum_{\\\\unicode{\"2B1A}}^{\\\\unicode{\"2B1A}}',\"\\\\int\":'\\\\int_{\\\\unicode{\"2B1A}}^{\\\\unicode{\"2B1A}}',\"\\\\stackrel\":'\\\\stackrel{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\stackbin\":'\\\\stackbin{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\underset\":'\\\\underset{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\overset\":'\\\\overset{\\\\unicode{\"2B1A}}{\\\\unicode{\"2B1A}}',\"\\\\prime\":'\\\\unicode{\"2B1A}^{\\\\prime}',\"\\\\boxed\":'\\\\boxed{\\\\unicode{\"2B1A}}',\"\\\\colorbox\":'\\\\colorbox{#fbc0bd}{\\\\unicode{\"2B1A}}',\"\\\\bbox\":'\\\\bbox[#ffd400, solid 2px #ffd400]{\\\\unicode{\"2B1A}}',\"\\\\enclose\":'\\\\enclose{updiagonalstrike,roundedbox}[1px solid red, mathbackground=\"#fbc0bd\"]{23+45}',\"\\\\fcolorbox\":'\\\\fcolorbox{#cd0030}{#ffd400}{\\\\unicode{\"2B1A}}',\"\\\\ \":'\\\\char\"2423',\"\\\\top\":\"{\\\\color{red}P}\\\\top\",\"\\\\bot\":\"{\\\\color{#0F0}P}\\\\bot\",\"\\\\mid\":\"P(p\\\\mid q)\",\"\\\\rlap\":\"\\\\rlap{x}o\",\"\\\\llap\":\"o\\\\llap{/}\",\"\\\\variable\":\"\\\\variable{x}\"},ei={\"\\\\text\":\"roman text\",\"\\\\textrm\":\"roman text\",\"\\\\textnormal\":\"roman text\",\"\\\\textit\":\"italic text\",\"\\\\textbf\":\"bold text\",\"\\\\texttt\":\"monospaced text\",\"\\\\textsf\":\"sans-serif text\",\"\\\\mathrm\":[\"roman\",\"(upright)\"],\"\\\\mathbf\":\"bold\",\"\\\\bf\":\"bold\",\"\\\\bold\":\"bold\",\"\\\\mathit\":\"italic\",\"\\\\mathbb\":\"blackboard\",\"\\\\Bbb\":\"blackboard\",\"\\\\mathscr\":\"script\",\"\\\\mathtt\":[\"typewriter\",\"(monospaced)\"],\"\\\\mathsf\":\"sans-serif\",\"\\\\mathcal\":\"caligraphic\",\"\\\\frak\":[\"fraktur\",\"(gothic)\"],\"\\\\mathfrak\":[\"fraktur\",\"(gothic)\"],\"\\\\textcolor\":\"text color\",\"\\\\color\":\"color\",\"\\\\forall\":\"for all\",\"\\\\exists\":\"there exists\",\"\\\\nexists\":\"there does not exist\",\"\\\\frac\":\"fraction\",\"\\\\dfrac\":\"display fraction\",\"\\\\cfrac\":\"continuous fraction\",\"\\\\tfrac\":\"text fraction\",\"\\\\binom\":\"binomial coefficient\",\"\\\\dbinom\":\"display binomial coefficient\",\"\\\\tbinom\":\"text binomial coefficient\",\"\\\\pdiff\":\"partial differential\",\"\\\\vec\":\"vector\",\"\\\\check\":\"caron\",\"\\\\acute\":\"acute\",\"\\\\breve\":\"breve\",\"\\\\tilde\":\"tilde\",\"\\\\dot\":\"dot\",\"\\\\hat\":[\"hat\",\"circumflex\"],\"\\\\ddot\":\"double dot\",\"\\\\bar\":\"bar\",\"\\\\prime\":\"prime\",\"\\\\doubleprime\":\"double prime\",\"\\\\varnothing\":\"empty set\",\"\\\\emptyset\":\"empty set\",\"\\\\subseteq\":\"subset of or
equal 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\",\"\\\\variable\":\"variable\"};function ii(t){let e=ei[t]||\"\";return Array.isArray(e)&&(e=e.join(\"
\")),e}function si(t,e){t.popover.innerHTML=e;const i=t._getCaretPosition();i&&(t.popover.style.left=i.x-t.popover.offsetWidth/2+\"px\",t.popover.style.top=i.y+5+\"px\"),t.popover.classList.add(\"is-visible\")}function ai(t){t.popover.classList.remove(\"is-visible\")}var oi={getNote:ii,SAMPLES:ti,NOTES:ei,showPopoverWithLatex:function(t,e,i){if(!e||0===e.length)return void ai(t);const s=e,a=function(t,e){const i=be.parseTokens(x.tokenize(t),\"math\",null,e.config.macros),s=pe.decompose({mathstyle:\"displaystyle\",macros:e.config.macros},i),a=Q.makeSpan(s,\"ML__base\"),o=Q.makeSpan(\"\",\"ML__strut\");o.setStyle(\"height\",a.height,\"em\");const n=Q.makeSpan(\"\",\"ML__strut--bottom\");return n.setStyle(\"height\",a.height+a.depth,\"em\"),n.setStyle(\"vertical-align\",-a.depth,\"em\"),Q.makeSpan([o,n,a],\"ML__mathlive\").toMarkup()}(ti[s]||e,t),o=ii(s),n=Le.forCommand(s);let r=i?'
':\"\";r+='',r+='
'+a+\"
\",o&&(r+='
'+o+\"
\"),n&&(r+='
'+n+\"
\"),r+=\"
\",si(t,r+=i?'
':\"\");let l=t.popover.getElementsByClassName(\"ML__popover__content\");l&&l.length>0&&t._attachButtonHandlers(l[0],[\"complete\",{acceptSuggestion:!0}]),(l=t.popover.getElementsByClassName(\"ML__popover__prev-shortcut\"))&&l.length>0&&t._attachButtonHandlers(l[0],\"previousSuggestion\"),(l=t.popover.getElementsByClassName(\"ML__popover__next-shortcut\"))&&l.length>0&&t._attachButtonHandlers(l[0],\"nextSuggestion\")},showPopover:si,hidePopover:ai,updatePopoverPosition:function t(e,i){if(e.popover.classList.contains(\"is-visible\"))if(i&&i.deferred)window.requestAnimationFrame(()=>t(e));else if(e.mathlist.anchor()&&\"command\"===e.mathlist.anchor().type){const t=e._getCaretPosition();t&&(e.popover.style.left=t.x-e.popover.offsetWidth/2+\"px\",e.popover.style.top=t.y+5+\"px\")}else ai(e)}};function ni(t,e,i){let s=\"\";if(Array.isArray(e)&&e.length>0){if(\"first\"===e[0].type&&0===(e=e.slice(1)).length)return\"\";let a=[\"mode\",\"color\",\"backgroundColor\",\"fontSize\",\"fontFamily\",\"fontShape\",\"fontSeries\"];i.outputStyles||(a=a.slice(0,1)),s=function t(e,i,s,a,o=0){if(0===s.length)return\"\";if(o>i.length-1)return s.map(t=>t.toLatex(a)).join(\"\");let n=\"\",r=\"\",l=\"\";const c=i[o],h=s[0],p=\"fontFamily\"===c?h.fontFamily||h.baseFontFamily:h[c],d=function(t,e,i){let s=0;if(\"fontFamily\"===e)for(;t[s]&&(\"mop\"===t[s].type||(t[s].fontFamily||t[s].baseFontFamily)===i);)s++;else for(;t[s]&&(\"mop\"===t[s].type||t[s][e]===i);)s++;return s}(s,c,p),m=\"cmr\"===h.autoFontFamily&&!h.fontFamily&&!h.baseFontFamily&&\"m\"===h.fontSeries&&\"n\"===h.fontShape||\"math\"===h.autoFontFamily&&!h.fontFamily&&!h.baseFontFamily&&\"m\"===h.fontSeries&&\"it\"===h.fontShape;if(p||\"mode\"===c){if(\"text\"===h.mode){if(\"mode\"===c){let t=!0;for(let e=0;e0&&(n+=t(e,i,f,a,o)),n}(t,a,e,i)}else\"number\"==typeof e||\"boolean\"==typeof e?s=e.toString():\"string\"==typeof e?s=e.replace(/\\s/g,\"~\"):e&&\"function\"==typeof e.toLatex&&(s=e.toLatex(i));return s}function ri(t){const e=ri.locale.substring(0,2);let i=\"\";return ri.strings[ri.locale]&&(i=ri.strings[ri.locale][t]),!i&&ri.strings[e]&&(i=ri.strings[e][t]),i||(i=ri.strings.en[t]),i||(i=t),i}pe.MathAtom.prototype.toLatex=function(t){t=t||{expandMacro:!1,outputStyles:!0};let e,i=\"\",s=0,a=0;const o=this.latex?this.latex.match(/^(\\\\[^{\\s0-9]+)/):null,n=o?o[1]:null;switch(this.type){case\"group\":i+=this.latexOpen||((this.cssId||this.cssClass)&&t.outputStyles?\"\":\"{\"),this.cssId&&t.outputStyles&&(i+=\"\\\\cssId{\"+this.cssId+\"}{\"),\"ML__emph\"===this.cssClass&&t.outputStyles?i+=\"\\\\emph{\"+ni(this,this.body,t)+\"}\":(this.cssClass&&t.outputStyles&&(i+=\"\\\\class{\"+this.cssClass+\"}{\"),i+=t.expandMacro?ni(this,this.body,t):this.latex||ni(this,this.body,t),this.cssClass&&(i+=\"}\")),this.cssId&&t.outputStyles&&(i+=\"}\"),i+=this.latexClose||((this.cssId||this.cssClass)&&t.outputStyles?\"\":\"}\");break;case\"array\":if(i+=\"\\\\begin{\"+this.env.name+\"}\",\"array\"===this.env.name){if(i+=\"{\",this.colFormat)for(a=0;a0&&(i+=\" & \"),i+=ni(this,this.array[s][e],t);s1&&(i+=\" \"),i+=ni(this,this.body,t),i+=\"\\\\right\"+(this.rightDelim||\".\"),this.rightDelim&&this.rightDelim.length>1&&(i+=\" \")):(i+=\".\"===this.leftDelim?\"\":\"\\\\mleft\"+(this.leftDelim||\".\"),this.leftDelim&&this.leftDelim.length>1&&(i+=\" \"),i+=ni(this,this.body,t),i+=this.rightDelim&&\".\"!==this.rightDelim?\"\\\\mright\"+(this.rightDelim||\".\"):\"\",this.rightDelim&&this.rightDelim.length>1&&(i+=\" \"));break;case\"delim\":case\"sizeddelim\":i+=n+\"{\"+this.delim+\"}\";break;case\"rule\":i+=n,this.shift&&(i+=`[${ni(this,this.shift,t)}em]`),i+=`{${ni(this,this.width,t)}em}{${ni(this,this.height,t)}em}`;break;case\"line\":case\"overlap\":case\"accent\":i+=`${n}{${ni(this,this.body,t)}}`;break;case\"overunder\":i+=`${n}{${ni(this,this.overscript||this.underscript,t)}}{${ni(parent,this.body,t)}}`;break;case\"mord\":case\"minner\":case\"mbin\":case\"mrel\":case\"mpunct\":case\"mopen\":case\"mclose\":case\"textord\":case\"\":/^\\\\(mathbin|mathrel|mathopen|mathclose|mathpunct|mathord|mathinner)/.test(n)?i+=n+\"{\"+ni(this,this.body,t)+\"}\":'\\\\char\"'===n?i+=this.latex+\" \":\"\\\\unicode\"===n?(i+='\\\\unicode{\"',i+=(\"000000\"+this.body.charCodeAt(0).toString(16)).toUpperCase().substr(-6),i+=\"}\"):(this.latex||\"string\"==typeof this.body)&&(this.latex&&\"\\\\\"===this.latex[0]?(i+=this.latex,/[a-zA-Z0-9]$/.test(this.latex)&&(i+=\" \")):i+=n||(\"​\"!==this.body?this.latex||this.body:\"\"));break;case\"mop\":\"​\"!==this.body&&(\"\\\\mathop\"===n?i+=n+\"{\"+ni(this,this.body,t)+\"}\":\"\\\\operatorname\"===n?i+=n+\"{\"+this.body+\"}\":this.latex&&\"\\\\\"===this.latex[0]?(i+=this.latex,/[a-zA-Z0-9]$/.test(this.latex)&&(i+=\" \")):i+=n||(\"​\"!==this.body?this.latex||this.body:\"\")),this.explicitLimits&&(\"limits\"===this.limits&&(i+=\"\\\\limits \"),\"nolimits\"===this.limits&&(i+=\"\\\\nolimits \"));break;case\"box\":if(\"\\\\bbox\"===n){if(i+=n,isFinite(this.padding)||void 0!==this.border||void 0!==this.backgroundcolor){const t=[];isFinite(this.padding)&&t.push(Math.floor(100*this.padding)/100+\"em\"),this.border&&t.push(\"border:\"+this.border),this.backgroundcolor&&t.push(ue.colorToString(this.backgroundcolor)),i+=`[${t.join(\",\")}]`}i+=`{${ni(this,this.body,t)}}`}else\"\\\\boxed\"===n?i+=`\\\\boxed{${ni(this,this.body,t)}}`:(i+=n,this.framecolor&&(i+=`{${ue.colorToString(this.framecolor)}}`),this.backgroundcolor&&(i+=`{${ue.colorToString(this.backgroundcolor)}}`),i+=`{${ni(this,this.body,t)}}`);break;case\"spacing\":i+=n,\"\\\\hspace\"===n||\"\\\\hspace*\"===n?(i+=\"{\",this.width?i+=this.width+\"em\":i+=\"0em\",i+=\"}\"):(i+=\" \",this.width&&(i+=this.width+\"em \"));break;case\"enclose\":if(i+=n,\"\\\\enclose\"===n){i+=\"{\";let t=\"\";for(const e in this.notation)Object.prototype.hasOwnProperty.call(this.notation,e)&&this.notation[e]&&(i+=t+e,t=\" \");i+=\"}\";let e=\"\";t=\"\",this.backgroundcolor&&\"transparent\"!==this.backgroundcolor&&(e+=t+'mathbackground=\"'+ue.colorToString(this.backgroundcolor)+'\"',t=\",\"),this.shadow&&\"auto\"!==this.shadow&&(e+=t+'shadow=\"'+this.shadow+'\"',t=\",\"),1!==this.strokeWidth||\"solid\"!==this.strokeStyle?(e+=t+this.borderStyle,t=\",\"):this.strokeColor&&\"currentColor\"!==this.strokeColor&&(e+=t+'mathcolor=\"'+ue.colorToString(this.strokeColor)+'\"',t=\",\"),e&&(i+=`[${e}]`)}i+=`{${ni(this,this.body,t)}}`;break;case\"mathstyle\":i+=\"\\\\\"+this.mathstyle+\" \";break;case\"space\":i+=this.latex;break;case\"placeholder\":i+=\"\\\\placeholder{\"+(this.value||\"\")+\"}\";break;case\"first\":case\"command\":case\"msubsup\":break;case\"variable\":i+=`\\\\variable{${ni(this,this.body,{...t,outputStyles:!1})}}`;break;case\"error\":i+=this.latex}if(this.superscript){let e=ni(this,this.superscript,t);\"′\"===e?e=\"\\\\prime \":\"″\"===e&&(e=\"\\\\doubleprime \"),i+=\"^{\"+e+\"}\"}return this.subscript&&(i+=\"_{\"+ni(this,this.subscript,t)+\"}\"),i},ri.plural=function(t,e,i){(i=i||{}).type=i.type||\"cardinal\";const s=ri.locale.substring(0,2),a=\"ordinal\"===i.type?ri.ordinal:ri.cardinal;let o,n=\"ordinal\"===i.type?ri._ordinalPluralCategories.indexOf(a.select(t)):ri._cardinalPluralCategories.indexOf(a.select(t));return ri.strings[ri.locale]&&(o=ri.strings[ri.locale][e]),!o&&ri.strings[s]&&(o=ri.strings[s][e]),o||((o=ri.strings.en[e])||(o=e),n=\"ordinal\"===i.type?ri._ordinalPluralCategories.indexOf(ri._ordinalEnglish.select(t)):ri._cardinalPluralCategories.indexOf(ri._cardinalEnglish.select(t))),o.split(\";\")[n]||o.split(\";\")[0]},ri.merge=function(t,e){if(t&&e){const i=ri._locale;ri.locale=t,ri.strings[t]={...ri.strings[t],...e},ri.locale=i}else t&&!e&&(e=t,Object.keys(e).forEach(t=>ri.merge(t,e[t])))},Object.defineProperty(ri,\"locale\",{set(t){ri._locale=t,ri._ordinal=null,ri._cardinal=null},get:()=>(ri._locale||(ri._locale=\"undefined\"==typeof navigator?\"en\":navigator.language.slice(0,5)),ri._locale)}),Object.defineProperty(ri,\"ordinal\",{get:()=>(ri._ordinal||(ri._ordinalEnglish=new Intl.PluralRules(\"en\",{type:\"ordinal\"}),ri._ordinalEnglishPluralCategories=ri._ordinalEnglish.resolvedOptions().pluralCategories,ri._ordinal=new Intl.PluralRules(ri.locale,{type:\"ordinal\"}),ri._ordinalPluralCategories=ri._ordinal.resolvedOptions().pluralCategories),ri._ordinal)}),Object.defineProperty(ri,\"cardinal\",{get:()=>(ri._cardinal||(ri._cardinalEnglish=new Intl.PluralRules(\"en\",{type:\"cardinal\"}),ri._cardinalEnglishPluralCategories=ri._cardinalEnglish.resolvedOptions().pluralCategories,ri._cardinal=new Intl.PluralRules(ri.locale,{type:\"cardinal\"}),ri._cardinaPluralCategories=ri._ordinal.resolvedOptions().pluralCategories),ri._cardinal)}),ri.strings={en:{\"keyboard.tooltip.functions\":\"Functions\",\"keyboard.tooltip.greek\":\"Greek Letters\",\"keyboard.tooltip.command\":\"LaTeX Command Mode\",\"keyboard.tooltip.numeric\":\"Numeric\",\"keyboard.tooltip.roman\":\"Symbols and 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.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.greek\":\"Griechische Buchstaben\",\"keyboard.tooltip.command\":\"LaTeX-Befehlsmodus\",\"keyboard.tooltip.numeric\":\"Numerisch\",\"keyboard.tooltip.roman\":\"Symbole und 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.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.greek\":\"Letras griegas\",\"keyboard.tooltip.command\":\"Modo Comando LaTeX\",\"keyboard.tooltip.numeric\":\"Numérico\",\"keyboard.tooltip.roman\":\"Símbolos y 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.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.greek\":\"Lettres grecques\",\"keyboard.tooltip.command\":\"Mode de commandes LaTeX\",\"keyboard.tooltip.numeric\":\"Numérique\",\"keyboard.tooltip.roman\":\"Lettres et symboles romains\",\"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.greek\":\"Lettere greche\",\"keyboard.tooltip.command\":\"Modalità di comando LaTeX\",\"keyboard.tooltip.numeric\":\"Numerico\",\"keyboard.tooltip.roman\":\"Simboli e 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.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.greek\":\"Litery greckie\",\"keyboard.tooltip.command\":\"Tryb poleceń LaTeX\",\"keyboard.tooltip.numeric\":\"Numeryczne\",\"keyboard.tooltip.roman\":\"Symbole i 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.greek\":\"Греческие буквы\",\"keyboard.tooltip.command\":\"Режим командной строки LaTeX\",\"keyboard.tooltip.numeric\":\"числовой\",\"keyboard.tooltip.roman\":\"Символы и римские буквы\",\"tooltip.copy to clipboard\":\"Скопировать в буфер обмена\",\"tooltip.redo\":\"переделывать\",\"tooltip.toggle virtual keyboard\":\"Переключить виртуальную клавиатуру\",\"tooltip.undo\":\"расстегивать\"}};const li={numeric:{tooltip:\"keyboard.tooltip.numeric\",layer:\"math\",label:\"123\",layers:[\"math\"]},roman:{tooltip:\"keyboard.tooltip.roman\",layer:\"lower-roman\",label:\"ABC\",layers:[\"lower-roman\",\"upper-roman\",\"symbols\"]},greek:{tooltip:\"keyboard.tooltip.greek\",layer:\"lower-greek\",label:\"αβγ\",classes:\"tex-math\",layers:[\"lower-greek\",\"upper-greek\"]},functions:{tooltip:\"keyboard.tooltip.functions\",layer:\"functions\",label:\"f ()\",classes:\"tex\",layers:[\"functions\"]},command:{tooltip:\"keyboard.tooltip.command\",command:\"enterCommandMode\",label:\"\",layers:[\"lower-command\",\"upper-command\",\"symbols-command\"]},style:{tooltip:\"keyboard.tooltip.style\",layer:\"style\",label:\"bi𝔹\"}},ci={\"\\\\varphi \":{label:\"Φ\",insert:\"\\\\Phi \"},\"\\\\varsigma \":{label:\"Σ\",insert:\"\\\\Sigma \"},\"\\\\epsilon \":{label:\"Ɛ\",insert:'\\\\char\"0190'},\"\\\\rho \":{label:\"Ρ\",insert:'\\\\char\"3A1'},\"\\\\tau \":{label:\"Τ\",insert:'\\\\char\"3A4'},\"\\\\upsilon \":{label:\"Υ\",insert:\"\\\\Upsilon \"},\"\\\\theta \":{label:\"Θ\",insert:\"\\\\Theta \"},\"\\\\iota \":{label:\"Ι\",insert:'\\\\char\"399'},\"\\\\omicron \":{label:\"Ο\",insert:'\\\\char\"39F'},\"\\\\pi \":{label:\"Π\",insert:\"\\\\Pi \"},\"\\\\alpha \":{label:\"Α\",insert:'\\\\char\"391'},\"\\\\sigma \":{label:\"Σ\",insert:\"\\\\Sigma \"},\"\\\\delta \":{label:\"Δ\",insert:\"\\\\Delta \"},\"\\\\phi \":{label:\"Φ\",insert:\"\\\\Phi \"},\"\\\\gamma \":{label:\"Γ\",insert:\"\\\\Gamma \"},\"\\\\eta \":{label:\"Η\",insert:'\\\\char\"397'},\"\\\\xi \":{label:\"Ξ\",insert:\"\\\\Xi \"},\"\\\\kappa \":{label:\"Κ\",insert:'\\\\char\"39A'},\"\\\\lambda \":{label:\"Λ\",insert:\"\\\\Lambda \"},\"\\\\zeta \":{label:\"Ζ\",insert:'\\\\char\"396'},\"\\\\chi \":{label:\"Χ\",insert:'\\\\char\"3A7'},\"\\\\psi \":{label:\"Ψ\",insert:\"\\\\Psi \"},\"\\\\omega \":{label:\"Ω\",insert:\"\\\\Omega \"},\"\\\\beta \":{label:\"Β\",insert:'\\\\char\"392'},\"\\\\nu \":{label:\"Ν\",insert:'\\\\char\"39D'},\"\\\\mu \":{label:\"Μ\",insert:'\\\\char\"39C'}},hi={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\",\"\\\\log_{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 pi={};const di={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
  • abc
  • \\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 mi(t,e,i){t=t.replace(/(^|[^\\\\])#@/g,\"$1#?\");const s=be.parseTokens(x.tokenize(t),\"math\",e,i.config.macros),a=pe.decompose({mathstyle:\"displaystyle\",macros:i.config.macros},s),o=Q.makeSpan(a,\"ML__base\"),n=Q.makeSpan(\"\",\"ML__strut\");n.setStyle(\"height\",o.height,\"em\");const r=Q.makeSpan(\"\",\"ML__strut--bottom\");return r.setStyle(\"height\",o.height+o.depth,\"em\"),r.setStyle(\"vertical-align\",-o.depth,\"em\"),Q.makeSpan([n,r,o],\"ML__mathlive\").toMarkup()}function ui(t,e,i){let s=\"
\";const a=e.replace(/\\s+/g,\" \").split(\" \");if(a.length>1){const e=Object.assign({},li,t.config.customVirtualKeyboards||{});for(const t of a){if(!e[t])break;s+=\"
\"+e[t].label+\"
\"}}return s+=\"
\",\"\"}function fi(t,e,i){for(let s=0;s\"+a.getAttribute(\"data-aside\").replace(/"/g,'\"')+\"\"),a.getAttribute(\"data-classes\")&&a.classList.add(a.getAttribute(\"data-classes\"));let o,n=a.getAttribute(\"data-insert\");n&&(n=n.replace(/"/g,'\"')),n&&ci[n]&&(a.setAttribute(\"data-shifted\",ci[n].label),a.setAttribute(\"data-shifted-command\",JSON.stringify([\"insertAndUnshiftKeyboardLayer\",ci[n].insert]))),o=a.getAttribute(\"data-command\")?JSON.parse(a.getAttribute(\"data-command\")):a.getAttribute(\"data-insert\")?[\"insert\",a.getAttribute(\"data-insert\"),{focus:!0,feedback:!0,mode:\"math\",format:\"auto\",resetStyle:!0}]:a.getAttribute(\"data-latex\")?[\"insert\",a.getAttribute(\"data-latex\"),{focus:!0,feedback:!0,mode:\"math\",format:\"auto\",resetStyle:!0}]:[\"typedText\",a.getAttribute(\"data-key\")||a.textContent,{focus:!0,feedback:!0,simulateKeystroke:!0}],i&&(o=[i,o]);const r=a.getAttribute(\"data-alt-keys\");if(r){const t=pi[r];t&&(o={default:o,pressAndHoldStart:[\"showAlternateKeys\",r,t],pressAndHoldEnd:\"hideAlternateKeys\"})}t._attachButtonHandlers(a,o)}}function gi(t,e){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~\"}},s=i[t.config.virtualKeyboardLayout]?i[t.config.virtualKeyboardLayout]:i.qwerty;let a,o=e,n=(o=o.replace(//g,\"\\n
  • \\n \\n
  • \\n
  • \\n \\n
  • \\n
  • \\n
  • \")).match(/()/);for(;n;){a=\"\";const t=n[2].match(/[a-zA-Z][a-zA-Z0-9-]*=(['\"])(.*?)\\1/g),e={};for(const i of t){const t=i.match(/([a-zA-Z][a-zA-Z0-9-]*)=(['\"])(.*?)\\2/);e[t[1]]=t[3]}let r=s[e.name];if(r||(r=i.qwerty[e.name]),r)for(const t of r){let i=e.class||\"\";i&&(i=\" \"+i),\"~\"===t?(a+=\"
  • \\'\\n data-shifted-command=\\'\"deleteAll\"\\'\\n data-alt-keys=\\'delete\\' data-command=\\'[\"performWithFeedback\",\"deletePreviousChar\"]\\'\\n >⌫
  • '):\" \"===t?a+=\"
  • \":\"^\"===t?a+=\"
  • \":\"/\"===t?a+=\"
  • ÷
  • \":\"*\"===t?a+=\"
  • ×
  • \":\"-\"===t?a+=\"
  • \":/tt/.test(i)?a+=\"
  • '+t+\"
  • \":a+=\"
  • \"+t+\"
  • \"}n=(o=o.replace(new RegExp(n[1]+n[2]+n[3]),a)).match(/()/)}return o}var yi={make:function(t,e){let i='\\n\\n \\n \\n \\n\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n ';hi[\"foreground-color\"]=[];for(const t of ue.LINE_COLORS)hi[\"foreground-color\"].push({classes:\"small-button\",content:'',command:'[\"applyStyle\",{\"color\":\"'+t+'\"}]'});hi[\"background-color\"]=[];for(const t of ue.AREA_COLORS)hi[\"background-color\"].push({classes:\"small-button\",content:'',command:'[\"applyStyle\",{\"backgroundColor\":\"'+t+'\"}]'});pi={...hi},Object.keys(pi).forEach(t=>{pi[t]=pi[t].slice()});const s=\"abcdefghijklmnopqrstuvwxyz\";for(let t=0;t<26;t++){const e=\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"[t];pi[e]||(pi[e]=[]),pi[e].unshift({latex:\"\\\\mathbb{\"+e+\"}\",aside:\"blackboard\",insert:\"\\\\mathbb{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathbf{\"+e+\"}\",aside:\"bold\",insert:\"\\\\mathbf{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathsf{\"+e+\"}\",aside:\"sans\",insert:\"\\\\mathsf{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathtt{\"+e+\"}\",aside:\"monospace\",insert:\"\\\\mathtt{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathcal{\"+e+\"}\",aside:\"script\",insert:\"\\\\mathcal{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathfrak{\"+e+\"}\",aside:\"fraktur\",insert:\"\\\\mathfrak{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathbb{\"+s[t]+\"}\",aside:\"blackboard\",insert:\"\\\\mathbb{\"+s[t]+\"}\"}),pi[e].unshift({latex:\"\\\\mathbf{\"+s[t]+\"}\",aside:\"bold\",insert:\"\\\\mathbf{\"+s[t]+\"}\"}),pi[e].unshift({latex:\"\\\\mathsf{\"+s[t]+\"}\",aside:\"sans\",insert:\"\\\\mathsf{\"+s[t]+\"}\"}),pi[e].unshift({latex:\"\\\\mathcal{\"+s[t]+\"}\",aside:\"script\",insert:\"\\\\mathcal{\"+s[t]+\"}\"}),pi[e].unshift({latex:\"\\\\mathfrak{\"+s[t]+\"}\",aside:\"fraktur\",insert:\"\\\\mathfrak{\"+s[t]+\"}\"})}for(let t=0;t<=26;t++){const e=s[t];pi[e]||(pi[e]=[]),pi[e].unshift({latex:\"\\\\mathsf{\"+e+\"}\",aside:\"sans\",insert:\"\\\\mathbb{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathbf{\"+e+\"}\",aside:\"bold\",insert:\"\\\\mathbf{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathtt{\"+e+\"}\",aside:\"monospace\",insert:\"\\\\mathtt{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathfrak{\"+e+\"}\",aside:\"fraktur\",insert:\"\\\\mathfrak{\"+e+\"}\"})}for(let t=0;t<10;t++){const e=\"0123456789\"[t];pi[e]||(pi[e]=[]),pi[e].unshift({latex:\"\\\\mathbf{\"+e+\"}\",aside:\"bold\",insert:\"\\\\mathbf{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathsf{\"+e+\"}\",aside:\"sans\",insert:\"\\\\mathsf{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathtt{\"+e+\"}\",aside:\"monospace\",insert:\"\\\\mathtt{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathcal{\"+e+\"}\",aside:\"script\",insert:\"\\\\mathcal{\"+e+\"}\"}),pi[e].unshift({latex:\"\\\\mathfrak{\"+e+\"}\",aside:\"fraktur\",insert:\"\\\\mathfrak{\"+e+\"}\"})}let a=t.config.virtualKeyboards;a||(a=\"all\"),a=a.replace(/\\ball\\b/i,\"numeric roman greek functions command\");const o=Object.assign({},di,t.config.customVirtualKeyboardLayers||{}),n=Object.assign({},li,t.config.customVirtualKeyboards||{}),r=a.replace(/\\s+/g,\" \").split(\" \");for(const e of r){if(!n[e])break;let s=n[e].layers||[];n[e].layer&&s.push(n[e].layer),s=Array.from(new Set(s));for(const n of s){if(!o[n])break;if(\"object\"==typeof o[n]){let t=\"\";if(o[n].styles&&(t+=``),o[n].backdrop&&(t+=`
    `),o[n].container&&(t+=`
    `),o[n].rows){t+=\"
    \";for(const e of o[n].rows){t+=\"
      \";for(const i of e)t+=\"${i.label?i.label:\"\"}`;t+=\"
    \"}t+=\"
    \",o[n].container&&(t+=\"\"),o[n].backdrop&&(t+=\"\")}o[n]=t}i+=\"
    \",i+=ui(t,a,e);const s=\"function\"==typeof o[n]?o[n]():o[n];i+=gi(t,s),i+=\"
    \"}}const l=document.createElement(\"div\");l.className=\"ML__keyboard\",e?l.classList.add(e):t.config.virtualKeyboardTheme?l.classList.add(t.config.virtualKeyboardTheme):/android|cros/i.test(navigator.userAgent)&&l.classList.add(\"material\"),l.innerHTML=i,fi(t,l.querySelectorAll(\".keycap, .action, .fnbutton, .bigfnbutton\"));const c=l.getElementsByClassName(\"layer-switch\");for(let e=0;e{t.addEventListener(\"mousedown\",t=>{t.preventDefault(),t.stopPropagation()}),t.addEventListener(\"touchstart\",t=>{t.preventDefault(),t.stopPropagation()})}),h[0].classList.add(\"is-visible\"),window.addEventListener(\"mouseup\",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),window.addEventListener(\"blur\",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),window.addEventListener(\"touchend\",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),window.addEventListener(\"touchcancel\",function(){t.hideAlternateKeys_(),t.unshiftKeyboardLayer_()}),l},makeKeycap:fi};const bi={\"−\":\"-\",\"-\":\"-\",\"\\\\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\"},xi={\"\\\\pm\":\"+-\",\"\\\\times\":\"xx\",\"\\\\colon\":\":\",\"\\\\vert\":\"|\",\"\\\\Vert\":\"||\",\"\\\\mid\":\"|\",\"\\\\lbrace\":\"{\",\"\\\\rbrace\":\"}\",\"\\\\langle\":\"(:\",\"\\\\rangle\":\":)\"},ki={\"\\\\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 vi(t){return t.replace(/\"/g,\""\").replace(/'/g,\"'\").replace(//g,\">\")}function Si(t,e){return t&&e.generateID?' extid=\"'+t+'\"':\"\"}function wi(t,e,i){let s=!1;e=e||t.atoms.length;let a=\"\",o=\"\",n=-1,r=-1;const l=t.atoms[t.index];if(t.index0){if(s=!0,Ai(t)&&(n=t.index,t.index+=1),Mi(t)&&(r=t.index,t.index+=1),n>=0&&r>=0)a=\"\"+o,a+=Di(t.atoms[r].subscript,0,0,i).mathML,a+=Di(t.atoms[n].superscript,0,0,i).mathML,a+=\"\";else if(n>=0){if(a=\"\"+o,Ai(t)){const e=Di(t.atoms[n].superscript,0,0,i).mathML,s=Di(t.atoms[n+1].superscript,0,0,i).mathML;a+=\"\"!==e&&\"\"!==e||\"\"!==s&&\"\"!==s?\"\"===e||\"\"===e?\"\":e:\"\"}else a+=Di(t.atoms[n].superscript,0,0,i).mathML;a+=\"\"}else r>=0?(a=\"\"+o,a+=Di(t.atoms[r].subscript,0,0,i).mathML,a+=\"\"):a=o;\"mi\"!==t.lastType&&\"mn\"!==t.lastType&&\"mtext\"!==t.lastType&&\"fence\"!==t.lastType||/^(.*)<\\/mo>$/.test(a)||(a=\"\"+a),o.endsWith(\">f\")||o.endsWith(\">g\")?(a+=\"\",t.lastType=\"applyfunction\"):t.lastType=/^(.*)<\\/mo>$/.test(a)?\"mo\":\"mi\",t.mathML+=a}return s}function Ai(t){return t.index\"+t,a+=Di(o.subscript,0,0,i).mathML,a+=Di(o.superscript,0,0,i).mathML,a+=\"\"):o.superscript?(a=\"\"+t,a+=Di(o.superscript,0,0,i).mathML,a+=\"\"):o.subscript&&(a=\"\"+t,a+=Di(o.subscript,0,0,i).mathML,a+=\"\"),a.length>0&&(s=!0,e.mathML+=a,e.lastType=\"\"),s))}function _i(t,e,i){let s=!1;e=e||t.atoms.length;const a=t.index;let o=\"\";for(;t.index0&&(s=!0,o=\"\"+o+\"\",t.mathML+=o,t.lastType=\"mtext\"),s}function Ti(t,e,i){let s=!1;e=e||t.atoms.length;const a=t.index;let o=\"\",n=function(t){let e=-1,i=t.index,s=!1,a=!1;for(;i=0&&n=0;)o+=t.atoms[t.index].body,t.index+=1;return o.length>0&&(s=!0,o=\"\"+o+\"\",n<0&&Ai(t)&&(n=t.index,t.index+=1),n>=0&&(o=\"\"+o,o+=Di(t.atoms[n].superscript,0,0,i).mathML,o+=\"\"),t.mathML+=o,t.lastType=\"mn\"),s}function Li(t,e,i){let s=!1;e=e||t.atoms.length;let a=\"\",o=\"\";if(t.index\",a+=zi(t.atoms[l],i),a+=Di(t.atoms,l+1,c,i).mathML,a+=zi(t.atoms[c],i),a+=\"\",\"mi\"!==t.lastType&&\"mn\"!==t.lastType&&\"mfrac\"!==t.lastType&&\"fence\"!==t.lastType||(a=\"\"+a),t.index=c+1,Ci(a,t,i)&&(s=!0,t.lastType=\"\",a=\"\"),o=\"fence\")}return a.length>0&&(s=!0,t.mathML+=a,t.lastType=o),s}function Fi(t,e,i){let s=!1;e=e||t.atoms.length;let a=\"\",o=\"\";const n=t.atoms[t.index];if(t.index\":\"\")+t,a+=Di(n.subscript,0,0,i).mathML,a+=Di(n.superscript,0,0,i).mathML,a+=\"nolimits\"!==n.limits?\"\":\"\"):n.superscript?(a+=(\"nolimits\"!==n.limits?\"\":\"\")+t,a+=Di(n.superscript,0,0,i).mathML,a+=\"nolimits\"!==n.limits?\"\":\"\"):(a+=(\"nolimits\"!==n.limits?\"\":\"\")+t,a+=Di(n.subscript,0,0,i).mathML,a+=\"nolimits\"!==n.limits?\"\":\"\"),o=\"mo\"}else{const e=t.atoms[t.index],n=0===e.latex.indexOf(\"\\\\operatorname\"),r=n?'\"+Ei(e.body)+\"\":zi(e,i);a+=r,t.index+=1,Ci(a,t,i)&&(s=!0,t.lastType=\"\",a=\"\"),t.index-=1,n||/^(.*)<\\/mo>$/.test(r)?o=n?\"mi\":\"mo\":(a+=\"\",o=\"applyfunction\")}\"mi\"!==t.lastType&&\"mn\"!==t.lastType||/^(.*)<\\/mo>$/.test(a)||(a=\"\"+a),t.index+=1}return a.length>0&&(s=!0,t.mathML+=a,t.lastType=o),s}function Di(t,e,i,s){const a={atoms:t,index:e||0,mathML:\"\",lastType:\"\"};if(i=i||(t?t.length:0),\"number\"==typeof t||\"boolean\"==typeof t)a.mathML=t.toString();else if(\"string\"==typeof t)a.mathML=t;else if(t&&\"function\"==typeof t.toMathML)a.mathML=t.toMathML(s);else if(Array.isArray(t)){let t=0;for(;a.index0&&\"genfrac\"===a.atoms[a.index].type&&(e=\"\"+e),\"genfrac\"===a.atoms[a.index].type?a.lastType=\"mfrac\":a.lastType=\"\",e.length>0&&(a.mathML+=e,t+=1),a.index+=1}t>1&&(a.mathML=\"\"+a.mathML+\"\")}return a}function zi(t,e){let i=\"\";const s=Ei(t.body);return s&&(i=\"\"+s+\"\"),i}function Ei(t){if(!t)return\"\";if(\"string\"==typeof t)return vi(t);if(!Array.isArray(t)&&\"string\"==typeof t.body)return vi(t.body);let e=\"\";for(const i of t)\"string\"==typeof i.body&&(e+=i.body);return vi(e)}pe.MathAtom.prototype.toMathML=function(t){const e={\"\\\\exponentialE\":\"ⅇ\",\"\\\\imaginaryI\":\"ⅈ\",\"\\\\differentialD\":\"ⅆ\",\"\\\\capitalDifferentialD\":\"ⅅ\",\"\\\\alpha\":\"α\",\"\\\\pi\":\"π\",\"\\\\infty\":\"∞\",\"\\\\forall\":\"∀\",\"\\\\nexists\":\"∄\",\"\\\\exists\":\"∃\",\"\\\\hbar\":\"ℏ\",\"\\\\cdotp\":\"⋅\",\"\\\\ldots\":\"…\",\"\\\\cdots\":\"⋯\",\"\\\\ddots\":\"⋱\",\"\\\\vdots\":\"⋮\",\"\\\\ldotp\":\".\"},i={\"\\\\!\":-3/18,\"\\\\ \":6/18,\"\\\\,\":3/18,\"\\\\:\":4/18,\"\\\\;\":5/18,\"\\\\enspace\":.5,\"\\\\quad\":1,\"\\\\qquad\":2,\"\\\\enskip\":.5};let s,a,o,n,r,l,c=\"\",h=\"\",p={cal:\"script\",frak:\"fraktur\",bb:\"double-struck\",scr:\"script\",cmtt:\"monospace\",cmss:\"sans-serif\"}[this.fontFamily||this.font]||\"\";p&&(p=' mathvariant=\"'+p+'\"');const d=this.latex?this.latex.trim():null;let m;switch(this.type){case\"group\":case\"root\":c=Di(this.body,0,0,t).mathML;break;case\"array\":if((this.lFence&&\".\"!==this.lFence||this.rFence&&\".\"!==this.rFence)&&(c+=\"\",this.lFence&&\".\"!==this.lFence&&(c+=\"\"+(ki[this.lFence]||this.lFence)+\"\")),c+=\"\",a=0;a\",s=0;s\"+Di(this.array[a][s],0,0,t).mathML+\"\";c+=\"\"}c+=\"\",(this.lFence&&\".\"!==this.lFence||this.rFence&&\".\"!==this.rFence)&&(this.rFence&&\".\"!==this.rFence&&(c+=\"\"+(ki[this.lFence]||this.rFence)+\"\"),c+=\"\");break;case\"genfrac\":(this.leftDelim||this.rightDelim)&&(c+=\"\"),this.leftDelim&&\".\"!==this.leftDelim&&(c+=\"\"+(ki[this.leftDelim]||this.leftDelim)+\"\"),this.hasBarLine?(c+=\"\",c+=Di(this.numer,0,0,t).mathML||\" \",c+=Di(this.denom,0,0,t).mathML||\" \",c+=\"\"):(c+=\"\",c+=\"\"+Di(this.numer,0,0,t).mathML+\"\",c+=\"\"+Di(this.denom,0,0,t).mathML+\"\",c+=\"\"),this.rightDelim&&\".\"!==this.rightDelim&&(c+=\"\"+(ki[this.rightDelim]||this.rightDelim)+\"\"),(this.leftDelim||this.rightDelim)&&(c+=\"\");break;case\"surd\":this.index?(c+=\"\",c+=Di(this.body,0,0,t).mathML,c+=Di(this.index,0,0,t).mathML,c+=\"\"):(c+=\"\",c+=Di(this.body,0,0,t).mathML,c+=\"\");break;case\"leftright\":c=\"\",this.leftDelim&&\".\"!==this.leftDelim&&(c+=\"\"+(ki[this.leftDelim]||this.leftDelim)+\"\"),this.body&&(c+=Di(this.body,0,0,t).mathML),this.rightDelim&&\".\"!==this.rightDelim&&(c+=\"\"+(ki[this.rightDelim]||this.rightDelim)+\"\"),c+=\"\";break;case\"sizeddelim\":case\"delim\":c+='\"+(ki[this.delim]||this.delim)+\"\";break;case\"accent\":c+='\",c+=Di(this.body,0,0,t).mathML,c+=\"\"+(ki[d]||this.accent)+\"\",c+=\"\";break;case\"line\":case\"overlap\":break;case\"overunder\":r=this.overscript,n=this.underscript,r&&n?l=this.body:r?(l=this.body,this.body[0]&&this.body[0].underscript?(n=this.body[0].underscript,l=this.body[0].body):this.body[0]&&\"first\"===this.body[0].type&&this.body[1]&&this.body[1].underscript&&(n=this.body[1].underscript,l=this.body[1].body)):n&&(l=this.body,this.body[0]&&this.body[0].overscript?(r=this.body[0].overscript,l=this.body[0].body):this.body[0]&&\"first\"===this.body[0].type&&this.body[1]&&this.body[1].overscript&&(r=this.body[1].overscript,l=this.body[1].body)),r&&n?(c+=\"\"+Di(l,0,0,t).mathML,c+=Di(n,0,0,t).mathML,c+=Di(r,0,0,t).mathML,c+=\"\"):r?(c+=\"\"+Di(l,0,0,t).mathML,c+=Di(r,0,0,t).mathML,c+=\"\"):n&&(c+=\"\"+Di(l,0,0,t).mathML,c+=Di(n,0,0,t).mathML,c+=\"\");break;case\"mord\":{c=e[d]||d||(\"string\"==typeof this.body?this.body:\"\"),(m=d?d.match(/[{]?\\\\char\"([0-9abcdefABCDEF]*)[}]?/):null)?c=\"&#x\"+m[1]+\";\":c.length>0&&\"\\\\\"===c.charAt(0)&&(c=\"string\"==typeof this.body&&this.body.charCodeAt(0)>255?\"&#x\"+(\"000000\"+this.body.charCodeAt(0).toString(16)).substr(-4)+\";\":\"string\"==typeof this.body?this.body.charAt(0):this.body);const i=/\\d/.test(c)?\"mn\":\"mi\";c=\"<\"+i+p+Si(this.id,t)+\">\"+vi(c)+\"\";break}case\"mbin\":case\"mrel\":case\"textord\":case\"minner\":c=d&&e[d]?\"\"+e[d]+\"\":d&&ki[d]?\"\"+ki[d]+\"\":zi(this,t);break;case\"mpunct\":c='\"+(ki[d]||d)+\"\";break;case\"mop\":\"​\"!==this.body&&(c=\"\",c+=\"\\\\operatorname\"===d?this.body:d||this.body,c+=\"\");break;case\"mathstyle\":break;case\"box\":c='\"+Di(this.body,0,0,t).mathML+\"\";break;case\"spacing\":c+='';break;case\"enclose\":c=''+Di(this.body,0,0,t).mathML+\"\";break;case\"space\":c+=\" \";break;case\"variable\":c+=Di(this.body,0,0,t).mathML}return c},pe.toMathML=function(t,e){return Di(t,0,0,e).mathML};const qi={\"\\\\imaginaryI\":\"ⅈ\",\"\\\\imaginaryJ\":\"ⅉ\",\"\\\\pi\":\"π\",\"\\\\exponentialE\":\"ℯ\",\"﹢\":\"+\",\"+\":\"+\",\"−\":\"-\",\"-\":\"-\",\"﹣\":\"-\",\"-\":\"-\",\"\\\\times\":\"*\",\"\\\\cdot\":\"*\",\"⨉\":\"*\",\"️✖\":\"*\",\"️×\":\"*\",\".\":\"*\",\"÷\":\"/\",\"⁄\":\"/\",\"/\":\"/\",\"!\":\"factorial\",\"\\\\mp\":\"minusplus\",\"\\\\ne\":\"!=\",\"\\\\neq\":\"!=\",\"\\\\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\",\"\\\\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\"},Ii={\"+\":\"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\"},Pi={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!!\"},Bi={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 Oi(t,e){return Array.isArray(t.arg)?t.arg[e]:void 0}function Ri(t){return t&&Bi[t]||-1}function Ki(t){return/=|=>/.test(t)?\"right\":\"left\"}function Ni(t){if(\"f\"===t||\"g\"===t)return!0;const e=Pi[t];return!!e&&!!/%[^01_^]?/.test(e)}function $i(t){t=(t||\"\").trim();let e=qi[t];if(!e)if(/^\\\\[^{}]+$/.test(t)){const i=It.getInfo(t,\"math\",{});e=i&&i.value||t.slice(1)}else e=t;return e}function Wi(t){if(!t)return null;const e=$i(Zi(t)),i=[Ri(e),Ki(e)];return i[0]<=0?null:i}function Hi(t){return null!==Wi(t)}const Vi={\"\\\\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\"},Ui={\"!\":\"factorial\",\"\\\\dag\":\"dagger\",\"\\\\dagger\":\"dagger\",\"\\\\ddagger\":\"dagger2\",\"\\\\maltese\":\"maltese\",\"\\\\backprime\":\"backprime\",\"\\\\backdoubleprime\":\"backprime2\",\"\\\\prime\":\"prime\",\"\\\\doubleprime\":\"prime2\",\"\\\\$\":\"$\",\"\\\\%\":\"%\",\"\\\\_\":\"_\",\"\\\\degree\":\"degree\"},ji={\"+\":\"add\",\"-\":\"add\",\"*\":\"multiply\",\"=\":\"equal\",\",\":\"list\",\";\":\"list2\",and:\"and\",or:\"or\",xor:\"xor\",union:\"union\",shortLogicalEquivalent:\"logicalEquivalent\",logicalEquivalent:\"logicalEquivalent\",shortEquivalent:\"equivalent\",equivalent:\"equivalent\"},Gi={\",\":\"list\",\";\":\"list2\"};function Zi(t){if(Array.isArray(t)){let e=\"\";for(const i of t)e+=Zi(i);return e}if(t.latex&&!/^\\\\math(op|bin|rel|open|punct|ord|inner)/.test(t.latex))return t.latex.trim();if(\"leftright\"===t.type)return\"\";if(\"string\"==typeof t.body)return t.body;if(Array.isArray(t.body)){let e=\"\";for(const i of t.body)e+=Zi(i);return e}return\"\"}function Xi(t){return\"string\"==typeof t.sym?function(t){let e=Pi[t];if(e)return e.replace(\"%1\",\"\").replace(\"%0\",\"\").replace(\"%\",\"\");if(t.length>1){const i=It.getInfo(\"\\\\\"+t,\"math\");!i||i.fontFamily&&\"cmr\"!==i.fontFamily&&\"ams\"!==i.fontFamily||(e=\"\\\\\"+t)}return e||(e=It.unicodeStringToLatex(\"math\",t)),e}(t.sym)||t.sym:\"\"}function Ji(t){return parseFloat(t.num)}function Yi(t){return\"object\"==typeof t&&void 0!==t.num}function Qi(t){let e=0;return Yi(t)&&(e=\"object\"==typeof t.num?void 0!==t.num.re?bs(t.num.re):0:parseFloat(t.num)),e}function ts(t){let e=0;return Yi(t)&&\"object\"==typeof t.num&&(e=void 0!==t.num.im?bs(t.num.im):0),e}function es(t){return t&&void 0!==t.sup}function is(t){return t&&void 0!==t.sub}function ss(t,e,i){let s=!1;const a=t.atoms[t.index];return a&&a.type===e&&(s=void 0===i||Zi(a)===i),s}function as(t,...e){const i={fn:t};if(e){const t=[];for(const i of e)i&&t.push(i);t.length>0&&(i.arg=t)}return i}function os(t){return\"number\"==typeof t?{num:t.toString()}:\"string\"==typeof t?{num:t}:\"object\"==typeof t?{num:t}:void 0}function ns(t){if(Yi(t)){const e=Qi(t),i=ts(t);return 0!==i?(0!==e&&(t.num.re=(-e).toString()),t.num.im=(-i).toString()):t.num=(-e).toString(),t}return as(\"negate\",t)}function rs(t){const e=t.atoms[t.index+1];return e&&\"msubsup\"===e.type}function ls(t,e){let i=t.atoms[t.index];return!i||void 0===i.superscript&&void 0===i.subscript?i=null:t.index+=1,i||((i=t.atoms[t.index+1])&&\"msubsup\"===i.type&&(i.superscript||i.subscript)?t.index+=2:i=null),i?(void 0!==i.subscript&&(t.ast.sub=fs(i.subscript,e)),void 0!==i.superscript&&(\"msubsup\"===i.type?/['\\u2032]|\\\\prime/.test(Zi(i.superscript))?(t.index+=1,(i=t.atoms[t.index+1])&&\"msubsup\"===i.type&&/['\\u2032]|\\\\prime/.test(Zi(i.superscript))?t.ast.sup={sym:\"″\"}:(t.ast.sup={sym:\"′\"},t.index-=1)):/['\\u2033]|\\\\doubleprime/.test(Zi(i.superscript))?t.ast.sup={sym:\"″\"}:t.ast&&(t.ast.sup=fs(i.superscript,e)):t.ast.sup=fs(i.superscript,e))):t.index+=1,t}function cs(t,e){const i=t.ast;if(ps(t,\"!!\"))return t.index+=1,t.ast=as(\"factorial2\",i),cs(t=ls(t,e),e);if(ps(t,\"++\"))return t.index+=1,t.ast=as(\"increment\",i),cs(t=ls(t,e),e);if(ps(t,\"--\"))return t.index+=1,t.ast=as(\"decrement\",i),cs(t=ls(t,e),e);const s=t.atoms[t.index];return s&&s.latex&&Ui[s.latex.trim()]&&(t.ast=as(Ui[s.latex.trim()],i),t=cs(t=ls(t,e),e)),t}function hs(t,e,i,s){if(t.index=t.index||0,0===t.atoms.length||t.index>=t.atoms.length)return t.ast=void 0,t;const a=t.minPrec;t.minPrec=0;let o=t.atoms[t.index];if(e){if(\"mopen\"===o.type&&Zi(o)===e)t.index+=1,(o=(t=ms(t,s)).atoms[t.index])&&\"mclose\"===o.type&&Zi(o)===i&&(rs(t)&&(t.ast={group:t.ast}),t=cs(t=ls(t,s),s));else if(\"textord\"===o.type&&Zi(o)===e)t.index+=1,(o=(t=ms(t,s)).atoms[t.index])&&\"textord\"===o.type&&Zi(o)===i&&(t.index+=1,t=cs(t=ls(t,s),s));else if(\"\\\\lVert\"===e&&\"textord\"===o.type&&\"|\"===o.latex){if((o=t.atoms[t.index+1])&&\"textord\"===o.type&&\"|\"===o.latex){t.index+=2,o=(t=ms(t,s)).atoms[t.index];const e=t.atoms[t.index+1];o&&\"textord\"===o.type&&\"|\"===o.latex&&e&&\"textord\"===e.type&&\"|\"===e.latex&&(t.index+=2,t=cs(t=ls(t,s),s))}}else if(\"sizeddelim\"===o.type&&o.delim===e)t.index+=1,(o=(t=ms(t,s)).atoms[t.index])&&\"sizeddelim\"===o.type&&o.delim===i&&(t.index+=1,t=cs(t=ls(t,s),s));else{if(\"leftright\"!==o.type||o.leftDelim!==e||\"?\"!==o.rightDelim&&o.rightDelim!==i)return;t.ast=fs(o.body,s),rs(t)&&(t.ast={group:t.ast}),t=cs(t=ls(t,s),s)}return t.minPrec=a,t}{let s=!0;if(\"mopen\"===o.type?(e=o.latex.trim(),i=It.RIGHT_DELIM[e]):\"sizeddelim\"===o.type?(e=o.delim,i=It.RIGHT_DELIM[e]):\"leftright\"===o.type?(s=!1,e=o.leftDelim,\"?\"===(i=o.rightDelim)&&(i=It.RIGHT_DELIM[e])):\"textord\"===o.type&&(e=o.latex.trim(),i=It.RIGHT_DELIM[e]),e&&i){if(\"|\"===e&&\"|\"===i){const s=t.atoms[t.index+1];s&&\"textord\"===s.type&&\"|\"===s.latex&&(e=\"\\\\lVert\",i=\"\\\\rVert\")}if(t=hs(t,e,i))return s&&(t.index+=1),t.ast={fn:Vi[e+i]||e+i,arg:[t.ast]},t.minPrec=a,t}}}function ps(t,e){return t.index=t.index||0,!(t.atoms.length<=1||t.index>=t.atoms.length-1)&&e===Zi(t.atoms[t.index])+Zi(t.atoms[t.index+1])}function ds(t){if(t.index=t.index||0,!(t.atoms.length<=1||t.index>=t.atoms.length-1)){if(!ss(t,\"textord\",\"\\\\nabla\")){const e=t.atoms[t.index].latex+t.atoms[t.index+1].latex,i=/^(>=|<=|>>|<<|:=|!=|\\*\\*|\\+\\+|--)$/.test(e)?e:\"\";return i&&(t.index+=1),i}return t.index+=1,ss(t,\"mbin\",\"\\\\times\")?(t.index+=1,t.ast=\"curl\",t):ss(t,\"mbin\",\"\\\\cdot\")?(t.index+=1,t.ast=\"div\",t):void(t.index-=1)}}function ms(t,e){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 i=function t(e,i){if(e.index=e.index||0,e.ast=void 0,0===e.atoms.length||e.index>=e.atoms.length)return e;let s=e.atoms[e.index];const a=$i(Zi(s));if(ds(e))e.ast=as(e.ast,t(e,i).ast);else{if(\"root\"===s.type)return e.index=0,e.atoms=s.body,t(e,i);if(\"mbin\"===s.type&&\"-\"===a)e.index+=1,(e=t(e,i)).ast=ns(e.ast);else if(\"mbin\"===s.type&&\"+\"===a)e.index+=1,(e=t(e,i)).ast=as(\"add\",e.ast);else if(\"mord\"===s.type&&/^[0-9.]$/.test(s.latex)){let a=\"\",o=!1,n=/^[0-9.eE]$/;for(;e.indext.map(t=>us(t)))),e=[t])}return e}function fs(t,e){return function(t,e){t.index=t.index||0,t.ast=void 0;const i=[];for(;t.atoms[t.index];)if(\"text\"===t.atoms[t.index].mode){let e=\"\";for(;t.atoms[t.index]&&\"text\"===t.atoms[t.index].mode;)e+=t.atoms[t.index].body,t.index+=1;i.push(e)}else{const s=ms(t,e).ast;if(!s)return;i.push(s)}return i.length>1?as(\"text\",...i):i[0]||void 0}({atoms:us(t)},e)}function gs(t){const e=Array.prototype.slice.call(arguments);e.shift(),t=t||\".. \";let i=\"\";if(e.length>0){\".\"!==t[0]&&(i+=t[0]);let s=\"\";for(const a of e)i+=s+a,s=t[2];\".\"!==t[1]&&(i+=t[1])}return i}function ys(t,e){const i=t.length;t=t.substr(0,e.precision-2);for(let i=0;i1&&(s+o.repeat(n+1)).startsWith(t))return\"0\"===o?s.replace(/(\\d{3})/g,\"$1\"+e.groupSeparator):s.replace(/(\\d{3})/g,\"$1\"+e.groupSeparator)+e.beginRepeatingDigits+o.replace(/(\\d{3})/g,\"$1\"+e.groupSeparator)+e.endRepeatingDigits}}return i!==t.length&&(t+=\"\\\\ldots\"),t.replace(/(\\d{3})/g,\"$1\"+e.groupSeparator)}function bs(t){return parseFloat(parseFloat(t).toPrecision(15))}function xs(t,e){let i=\"\";if(\"number\"==typeof e.precision){if(\"number\"!=typeof t){let i=\"\",s=\"\";if(\"-\"===t[0]?(i=\"-\",t=t.substr(1)):\"+\"===t[0]&&(t=t.substr(1)),t.indexOf(\".\")>=0){const a=t.match(/(\\d*).(\\d*)([e|E]([-+]?[0-9]*))?/),o=a[1],n=a[2].substring(0,Math.min(e.precision-o.length,a[2].length));if(s=a[4]||\"\",\"0\"===o){let s=0;for(;\"0\"===n[s]&&s=e.precision)a=\"0\",i=\"\";else{a=t[s];const i=ys(t.substr(s+1),e);i&&(a+=e.decimalMarker+i)}\"0\"!==a&&(t.length-1>e.precision&&!a.endsWith(\"}\")&&!a.endsWith(\"\\\\ldots\")&&(a+=\"\\\\ldots\"),s>4&&(a+=e.exponentProduct,e.exponentMarker?a+=e.exponentMarker+(1-s).toString():a+=\"10^{\"+(1-s).toString()+\"}\")),t=a}else{t=o.replace(/\\B(?=(\\d{3})+(?!\\d))/g,e.groupSeparator);const i=ys(n,e);i&&(t+=e.decimalMarker+i)}}else if(t.length>e.precision){const i=t.length;let s=t[0];const a=ys(t.substr(2),e);a&&\"}\"!==(s+=e.decimalMarker+a)[s.length-1]&&(s+=\"\\\\ldots\"),\"1\"!==s?s+=e.exponentProduct:s=\"\",e.exponentMarker?s+=e.exponentMarker+(i-2).toString():s+=\"10^{\"+(i-2).toString()+\"}\",t=s}else t=t.replace(/\\B(?=(\\d{3})+(?!\\d))/g,e.groupSeparator);return s&&(s=e.exponentMarker?e.exponentMarker+s:e.exponentProduct+\" 10^{\"+s+\"}\"),i+t+s}t=bs(t)}if(\"engineering\"===e.scientificNotation)if(0===t)i=\"0\";else{const s=Math.abs(t);let a=Math.round(Math.log10(s));a-=a%3,s<1e3&&(a=0);let o=s/Math.pow(10,a);const n=o.toString().match(/^(.*)\\.(.*)$/);n&&n[1]&&n[2]&&(o=n[1]+e.decimalMarker+n[2]),e.groupSeparator&&(o=ys(o.toExponential(),e)),i=(t<0?\"-\":\"\")+o+(a=0===a?\"\":e.exponentMarker?e.exponentMarker+a:e.exponentProduct+\" 10^{\"+a+\"}\")}else{const s=\"string\"==typeof t?t:t.toString();let a,o,n,r=s.match(/^(.*)[e|E]([-+]?[0-9]*)$/i);a=s,n=\"\",r&&r[1]&&r[2]&&(a=r[1],o=e.exponentMarker?e.exponentMarker+r[2]:e.exponentProduct+\" 10^{\"+r[2]+\"}\"),(r=a.match(/^(.*)\\.(.*)$/))&&r[1]&&r[2]&&(a=r[1],n=r[2]),e.groupSeparator&&(a=a.replace(/\\B(?=(\\d{3})+(?!\\d))/g,e.groupSeparator),n=ys(n,e)),n&&(n=e.decimalMarker+n),i=a+n+(o||\"\")}return i}pe.MathAtom.prototype.toAST=function(t){let e,i,s,a,o={},n=\"\",r={bb:\"double-struck\",cal:\"script\",scr:\"script\",frak:\"fraktur\",cmrss:\"sans-serif\",cmrtt:\"monospace\"}[this.baseFontFamily||this.fontFamily],l=\"\";\"b\"===this.fontSeries&&(l+=\"bold\"),\"it\"===this.fontShape&&(l+=\"italic\");const c=this.latex?this.latex.trim():null;switch(this.type){case\"root\":case\"group\":this.latex&&this.latex.startsWith(\"\\\\nicefrac\")?(e=this.latex.slice(9).match(/({.*}|[^}])({.*}|[^}])/))?(i=1===e[1].length?e[1]:e[1].substr(1,e[1].length-2),i=be.parseTokens(x.tokenize(i),\"math\",null,t.macros),s=1===e[2].length?e[2]:e[2].substr(1,e[2].length-2),s=be.parseTokens(x.tokenize(s),\"math\",null,t.macros),o=as(\"divide\",fs(i,t),fs(s,t))):o.fn=\"divide\":o.group=fs(this.body,t);break;case\"genfrac\":o=as(\"divide\",fs(this.numer,t),this.denom&&this.denom[0]&&\"placeholder\"===this.denom[0].type?os(1):fs(this.denom,t));break;case\"surd\":o=this.index?as(\"pow\",fs(this.body,t),as(\"divide\",1,fs(this.index,t))):as(\"sqrt\",fs(this.body,t));break;case\"rule\":break;case\"line\":case\"overlap\":case\"accent\":case\"overunder\":break;case\"mord\":case\"textord\":case\"mbin\":(e=c?c.match(/[{]?\\\\char\"([0-9abcdefABCDEF]*)[}]?/):void 0)?n=String.fromCodePoint(parseInt(e[1],16)):(n=$i(Zi(this))).length>0&&\"\\\\\"===n.charAt(0)&&\"string\"==typeof this.body&&(n=this.body),(a=It.mathVariantToUnicode(n,r,l).replace(/[\\\\]/g,\"\\\\\\\\\").replace(/[\"]/g,'\\\\\"').replace(/[\\b]/g,\"\\\\b\").replace(/[\\f]/g,\"\\\\f\").replace(/[\\n]/g,\"\\\\n\").replace(/[\\r]/g,\"\\\\r\").replace(/[\\t]/g,\"\\\\t\"))!==n?(o={sym:a},r=\"normal\"):o={sym:n};break;case\"minner\":case\"mop\":break;case\"box\":o=fs(this.body,t);break;case\"enclose\":break;case\"variable\":o.variable=fs(this.body,t);break;case\"array\":if(\"cardinality\"===this.env.name)o=as(\"card\",fs(this.array,t));else if(/array|matrix|pmatrix|bmatrix/.test(this.env.name)){o={fn:\"array\",args:[]};for(const e of this.array)o.args.push(e.map(e=>fs(e,t)))}else if(\"cases\"===this.env.name){o={fn:\"cases\",args:[]};for(const e of this.array)if(e[0]){const i=[];i.push(fs(e[0],t));let s=fs(e[1],t);s&&\"text\"===s.fn&&s.arg&&/^(if|when|for)$/i.test(s.arg[0].trim())&&(s=s.arg.filter(t=>\"string\"!=typeof t)),i.push(s||{}),o.args.push(i)}}break;case\"spacing\":case\"space\":case\"mathstyle\":break;default:o=void 0}return o&&r&&\"normal\"!==r&&(o.variant=r),o&&\"string\"==typeof this.cssClass&&(o.class=this.cssClass),o&&\"string\"==typeof this.cssId&&(o.id=this.cssId),o},pe.toAST=function(t,e){return fs(t,e)};var ks=function t(e,i){const s=Object.assign({precision:14,decimalMarker:\".\",groupSeparator:\"\\\\, \",product:\"\\\\cdot \",exponentProduct:\"\\\\cdot \",exponentMarker:\"\",arcSeparator:\"\\\\,\",scientificNotation:\"auto\",beginRepeatingDigits:\"\\\\overline{\",endRepeatingDigits:\"}\"},i);let a=\"\";if(void 0===e)return\"\";if(\"string\"==typeof e&&(e=JSON.parse(e)),e.latex)a=e.latex;else if(Yi(e)){const i=Ji(e);if(i===-1/0)a=\"-\\\\infty \";else if(i===1/0)a=\"\\\\infty \";else if(\"object\"!=typeof e.num||\"string\"!=typeof e.num.re&&\"string\"!=typeof e.num.im)a=isNaN(i)?\"\\\\text{NaN}\":xs(e.num,s);else{const t=Qi(e),i=ts(e);isNaN(t)||isNaN(i)?a=\"\\\\text{NaN}\":Math.abs(i)<=Number.EPSILON&&Math.abs(t)<=Number.EPSILON?a=\"0\":(Math.abs(t)>Number.EPSILON&&(a=xs(t,s)),Math.abs(i)>Number.EPSILON&&(Math.abs(t)>Number.EPSILON&&(a+=i>0?\"+\":\"\"),a+=(1!==Math.abs(i)?xs(i,s):\"\")+\"\\\\imaginaryI \"))}es(e)&&(a+=\"^{\"+t(e.sup,s)+\"}\"),is(e)&&(a+=\"_{\"+t(e.sub,s)+\"}\")}else if(e.group)a=t(e.group,s),Yi(e.group)||Xi(e.group)?0!==ts(e.group)&&(a=gs(e.fence||\"(),\",a)):a=gs(e.fence||\"(),\",a),es(e)&&(a+=\"^{\"+t(e.sup,s)+\"}\"),is(e)&&(a+=\"_{\"+t(e.sub,s)+\"}\");else if(e.fn)if(\"bind\"===e.fn){if(a=t(Oi(e,0),s)+\"|_{\",e.arg&&2===e.arg.length)a+=t(Oi(e,1));else{let i=\"\";for(let s=1;s=2)a=t(Oi(e,0),s),Yi(Oi(e,0))||Xi(Oi(e,0))||(a=gs(e.fence||\"(),\",a)),a+=\"^{\"+t(Oi(e,1),s)+\"}\";else if(\"equal\"===e.fn&&e.arg&&e.arg.length>2)a=e.arg.map(e=>t(e,s)).join(\" = \");else{const i=function(t){let e=Pi[t];return e||(e=t.length>1?\"\\\\operatorname{\"+t+\"}%^%_ %\":t+\"%^%_ %\"),e}(e.fn);a=i;let o=\"\";if(/%(?![01_^])/.test(i)&&Array.isArray(e.arg)&&e.arg.length>1)a+=gs(e.fence||\"(),\",...e.arg.map(e=>t(e,s)));else if(Array.isArray(e.arg)&&e.arg.length>0){const n=t(Oi(e,0),s),r=t(Oi(e,1),s),l=[...e.arg];/%0/.test(i)&&(a=a.replace(\"%0\",n),l.shift()),/%1/.test(i)&&(a=a.replace(\"%1\",r),l.shift()),l.length>0&&(o=gs(e.fence||\"(),\",...l.map(e=>t(e,s))))}else o=gs(e.fence||\"(),\",\"\");a=es(e)?a.replace(\"%^\",\"^{\"+t(e.sup,s)+\"}\"):a.replace(\"%^\",\"\"),a=(a=(a=is(e)?a.replace(\"%_\",\"_{\"+t(e.sub,s)+\"}\"):a.replace(\"%_\",\"\")).replace(/%(?![01_^])/,o)).replace(\"%0\",\"\").replace(\"%1\",\"\")}else{const i=[];for(const a of e.arg)\"add\"===a.fn||\"subtract\"===a.fn?i.push(gs(\"() \",t(a,s))):0!==Qi(o=a)&&0!==ts(o)?i.push(gs(\"() \",t(a,s))):es(e)&&0!==ts(a)&&1!==ts(a)?i.push(gs(\"() \",t(a,s))):i.push(t(a,s));if(\"multiply\"===e.fn)a=!e.arg||2!==e.arg.length||!Yi(e.arg[0])&&\"divide\"!==e.arg[0].fn||Yi(e.arg[1])&&(0!==Qi(e.arg[1])||1!==ts(e.arg[1]))?i.join(\" \\\\times \"):i[0]+i[1];else if(e.arg&&1===e.arg.length)a=\"negate\"===e.arg[0].fn||Yi(e.arg[0])&&Ji(e.arg[0])<0?i[0]:\"+\"+i[0];else{a=i[0];for(let t=1;ta',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 \",\"\\\\ne\":\"is not equal to \",\"\\\\neq\":\"is not 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 Ss(t){let e=0;if(t&&Array.isArray(t))for(const i of t)\"first\"!==i.type&&(e+=1);return 1===e}function ws(t){let e=\"\";if(t&&Array.isArray(t))for(const i of t)\"first\"!==i.type&&\"string\"==typeof i.body&&(e+=i.body);return e}function As(t,e,i,s){e=e.split(\" \");for(const a of e){const e=a.match(/(.*):(.*)/);if(e){const a=s||{};\"active\"===e[2]?a.passive=!1:a[e[2]]=!0,t.addEventListener(e[1],i,a)}else t.addEventListener(a,i,s)}}function Ms(t,e,i,s){e=e.split(\" \");for(const a of e){const e=a.match(/(.*):(.*)/);if(e){const a=s||{};\"active\"===e[2]?a.passive=!1:a[e[2]]=!0,t.removeEventListener(e[1],i,a)}else t.removeEventListener(a,i,s)}}function Cs(t,e){let i=document.getElementById(t);return i?i.setAttribute(\"data-refcount\",parseInt(i.getAttribute(\"data-refcount\"))+1):((i=document.createElement(\"div\")).setAttribute(\"aria-hidden\",\"true\"),i.setAttribute(\"data-refcount\",\"1\"),i.className=e,i.id=t,document.body.appendChild(i)),i}function _s(t){if(!t)return null;const e=parseInt(t.getAttribute(\"data-refcount\"));return e&&1!==e?t.setAttribute(\"data-refcount\",e-1):t.remove(),t}function Ts(){return/android|ipad|ipod|iphone/i.test(navigator.userAgent)||/macintosh/i.test(navigator.userAgent)&&navigator.maxTouchPoints}function Ls(t,e){this.$setConfig(e||{}),this.element=t,t.mathfield=this,this.originalContent=t.innerHTML;let i=this.element.textContent;i&&(i=i.trim()),t.classList.add(\"ML__mathfield\");let s=\"\";if(this.config.substituteTextArea?\"string\"==typeof this.config.substituteTextArea?s+=this.config.substituteTextArea:s+=\"\":Ts()&&!this.config.isNativeMobileKeyboardEnabled?s+=\"\\n \\n \\n \":s+='',s+='',this.config.virtualKeyboardMode||(this.config.virtualKeyboardMode=Ts()?\"onfocus\":\"off\"),\"manual\"===this.config.virtualKeyboardMode||this.config.showVirtualKeyboardButton){const t=ri(\"tooltip.toggle virtual keyboard\");s+=`\"}else s+=\"\";s+=\"\",s+='\\n
    \\n \\n \\n
    \\n ',this.element.innerHTML=s;let a=0;\"function\"==typeof this.config.substituteTextArea?this.textarea=this.config.substituteTextArea():this.textarea=this.element.children[a++].firstElementChild,this.config.textareaId&&(this.textarea.id=this.config.textareaId),this.field=this.element.children[a].children[0],this.field.addEventListener(\"wheel\",t=>{t.preventDefault(),t.stopPropagation();let e=void 0===t.deltaX?t.detail:-t.deltaX;isFinite(e)||(e=t.wheelDelta/10),this.field.scroll({top:0,left:this.field.scrollLeft-5*e})},{passive:!1}),this.virtualKeyboardToggleDOMNode=this.element.children[a++].children[1],this._attachButtonHandlers(this.virtualKeyboardToggleDOMNode,{default:\"toggleVirtualKeyboard\",alt:\"toggleVirtualKeyboardAlt\",shift:\"toggleVirtualKeyboardShift\"}),this.ariaLiveText=this.element.children[a].children[0],this.accessibleNode=this.element.children[a++].children[1],this.popover=Cs(\"mathlive-popover-panel\",\"ML__popover\"),this.keystrokeCaption=Cs(\"mathlive-keystroke-caption-panel\",\"ML__keystroke-caption\"),this.keystrokeCaptionVisible=!1,this.virtualKeyboardVisible=!1,this.keystrokeBuffer=\"\",this.keystrokeBufferStates=[],this.keystrokeBufferResetTimer=null,this.suggestionIndex=0,this.mode=e.defaultMode||\"math\",this.smartModeSuppressed=!1,this.style={},this.blurred=!0,As(this.element,\"focus\",this),As(this.element,\"blur\",this),As(this.textarea,\"cut\",this),As(this.textarea,\"copy\",this),As(this.textarea,\"paste\",this),this.removeDelegatedKeyboardEvents=Ye.delegateKeyboardEvents(this.textarea,{container:this.element,allowDeadKey:()=>\"text\"===this.mode,typedText:this._onTypedText.bind(this),paste:this._onPaste.bind(this),keystroke:this._onKeystroke.bind(this),focus:this._onFocus.bind(this),blur:this._onBlur.bind(this)}),window.PointerEvent?As(this.field,\"pointerdown\",this):As(this.field,\"touchstart:active mousedown\",this),As(window,\"resize\",this);const o={...e};o.onSelectionDidChange=Ls.prototype._onSelectionDidChange.bind(this),o.onContentDidChange=Ls.prototype._onContentDidChange.bind(this),o.onAnnounce=this.config.onAnnounce,o.macros=this.config.macros,o.removeExtraneousParentheses=this.config.removeExtraneousParentheses,this.mathlist=new Ue.EditableMathlist(o,this),this.undoManager=new Qe.UndoManager(this.mathlist),i.length>0&&this.$latex(i),this.undoManager.startRecording(),this.undoManager.snapshot(this.config)}let Fs;pe.toSpeakableFragment=function(t,e){function i(t){return\"\"+t+\"\"}if(!t)return\"\";let s=\"\";if(t.id&&\"math\"===e.speechMode&&(s+=''),Array.isArray(t)){let a=!1;for(let o=0;o'+o+'. End fraction.';break;case\"surd\":if(n=pe.toSpeakableFragment(t.body,e),t.index){let i=pe.toSpeakableFragment(t.index,e);const a=(i=i.trim()).replace(//g,\"\");s+=\"3\"===a?' the cube root of '+n+'. End cube root':\"n\"===a?' the nth root of '+n+'. End root':' the root with index: '+i+', of '+n+'. End root'}else Ss(t.body)?s+=\" the square root of \"+n+\" , \":s+=' the square root of '+n+'. End square root';break;case\"accent\":break;case\"leftright\":s+=vs[t.leftDelim]||t.leftDelim,s+=pe.toSpeakableFragment(t.body,e),s+=vs[t.rightDelim]||t.rightDelim;break;case\"line\":case\"rule\":case\"overunder\":case\"overlap\":break;case\"placeholder\":s+=\"placeholder \"+t.body;break;case\"delim\":case\"sizeddelim\":case\"mord\":case\"minner\":case\"mbin\":case\"mrel\":case\"mpunct\":case\"mopen\":case\"mclose\":case\"textord\":{const i=t.latex?t.latex.trim():\"\";if(\"\\\\mathbin\"===i||\"\\\\mathrel\"===i||\"\\\\mathopen\"===i||\"\\\\mathclose\"===i||\"\\\\mathpunct\"===i||\"\\\\mathord\"===i||\"\\\\mathinner\"===i){s=pe.toSpeakableFragment(t.body,e);break}let a=t.body,o=t.latex;if(\"delim\"!==t.type&&\"sizeddelim\"!==t.type||(a=o=t.delim),\"text\"===e.speechMode)s+=a;else{if(\"mbin\"===t.type&&(s+=''),a){const t=vs[a]||(o?vs[o.trim()]:\"\");if(t)s+=\" \"+t;else{const t=o?function(t){let e=oi.NOTES[t];return e||\"\\\\\"!==t.charAt(0)||(e=\" \"+t.replace(\"\\\\\",\"\")+\" \"),Array.isArray(e)&&(e=e[0]),e}(o.trim()):\"\";s+=t||function(t){let i=\"\";return e.textToSpeechMarkup?/[a-z]/.test(t)?i+=' '+t+\"\":/[A-Z]/.test(t)?i+=\"capital \"+t.toLowerCase():i+=t:/[a-z]/.test(t)?i+=\" '\"+t.toUpperCase()+\"'\":/[A-Z]/.test(t)?i+=\" 'capital \"+t.toUpperCase()+\"'\":i+=t,i}(a)}}else s+=pe.toSpeakableFragment(t.body,e);\"mbin\"===t.type&&(s+='')}break}case\"mop\":if(\"​\"!==t.body){const a=t.latex?t.latex.trim():\"\";if(\"\\\\sum\"===a)if(t.superscript&&t.subscript){let i=pe.toSpeakableFragment(t.superscript,e);i=i.trim();let a=pe.toSpeakableFragment(t.subscript,e);s+=' the summation from '+(a=a.trim())+' to '+i+' of ',r=!0}else if(t.subscript){let i=pe.toSpeakableFragment(t.subscript,e);s+=' the summation from '+(i=i.trim())+' of ',r=!0}else s+=\" the summation of\";else if(\"\\\\prod\"===a)if(t.superscript&&t.subscript){let i=pe.toSpeakableFragment(t.superscript,e);i=i.trim();let a=pe.toSpeakableFragment(t.subscript,e);s+=' the product from '+(a=a.trim())+' to '+i+' of ',r=!0}else if(t.subscript){let i=pe.toSpeakableFragment(t.subscript,e);s+=' the product from '+(i=i.trim())+' of ',r=!0}else s+=\" the product of \";else if(\"\\\\int\"===a)if(t.superscript&&t.subscript){let a=pe.toSpeakableFragment(t.superscript,e);a=a.trim();let o=pe.toSpeakableFragment(t.subscript,e);s+=' the integral from '+i(o=o.trim())+' to '+i(a)+' of ',r=!0}else s+=' the integral of ';else if(\"string\"==typeof t.body){s+=vs[t.body]||vs[t.latex.trim()]||\" \"+t.body}else t.latex&&t.latex.length>0&&(\"\\\\\"===t.latex[0]?s+=\" \"+t.latex.substr(1):s+=\" \"+t.latex)}break;case\"enclose\":n=pe.toSpeakableFragment(t.body,e),Ss(t.body)?s+=\" crossed out \"+n+\" , \":s+=\" crossed out \"+n+\". End cross out\";break;case\"space\":case\"spacing\":case\"mathstyle\":case\"box\":break;case\"variable\":{let e=n=(n=t.toLatex()).substring(10,n.length-1),i=\"\";const a=n.indexOf(\"_\");a>-1&&(e=n.substring(0,a),i=(i=(i=n.substring(a+1).replace(/[{}]/gm,\"\")).length>1?\" subscript \"+i+\"; End subscript; End variable\":\" sub \"+i).replace(/,/gm,vs[\",\"])),\"a\"===e&&(e=e.toUpperCase()),s+=\"the variable, \"+e+i+\". \";break}}if(!r&&t.superscript){let i=pe.toSpeakableFragment(t.superscript,e);const a=(i=i.trim()).replace(/<[^>]*>/g,\"\");if(Ss(t.superscript)){if(\"math\"===e.speechMode){const e=function(t){if(t&&Array.isArray(t))for(const e of t)if(\"first\"!==e.type&&e.id)return e.id.toString();return\"\"}(t.superscript);e&&(s+='')}\"′\"===a?s+=\" prime \":\"2\"===a?s+=\" squared \":\"3\"===a?s+=\" cubed \":isNaN(parseInt(a))?s+=\" to the \"+i+\"; \":s+=' to the '+a+\" power; \"}else isNaN(parseInt(a))?s+=\" raised to the \"+i+\"; \":s+=' raised to the '+a+\" power; \"}if(!r&&t.subscript){let i=pe.toSpeakableFragment(t.subscript,e);i=i.trim(),Ss(t.subscript)?s+=\" sub \"+i:s+=\" subscript \"+i+\". End subscript. \"}}return s},pe.toSpeakableText=function(t,e){const i=e?JSON.parse(JSON.stringify(e)):{textToSpeechMarkup:\"\",textToSpeechRules:\"mathlive\"};if(i.speechMode=\"math\",window.sre&&\"sre\"===i.textToSpeechRules){i.generateID=!0;const e=pe.toMathML(t,i);return e?(i.textToSpeechMarkup&&(i.textToSpeechRulesOptions=i.textToSpeechRulesOptions||{},i.textToSpeechRulesOptions.markup=i.textToSpeechMarkup,\"ssml\"===i.textToSpeechRulesOptions.markup&&(i.textToSpeechRulesOptions.markup=\"ssml_step\"),i.textToSpeechRulesOptions.rate=i.speechEngineRate),i.textToSpeechRulesOptions&&window.sre.System.getInstance().setupEngine(i.textToSpeechRulesOptions),window.sre.System.getInstance().toSpeech(e)):\"\"}let s=pe.toSpeakableFragment(t,i);if(\"ssml\"===i.textToSpeechMarkup){let t=\"\";i.speechEngineRate&&(t=''),s=''+t+\"

    \"+s+\"

    \"+(t?\"
    \":\"\")+\"\"}else s=\"mac\"===i.textToSpeechMarkup&&\"mac\"===function(t){let e=\"other\";return navigator&&navigator.platform&&navigator.userAgent&&(/^(mac)/i.test(navigator.platform)?e=\"mac\":/^(win)/i.test(navigator.platform)?e=\"win\":/(android)/i.test(navigator.userAgent)?e=\"android\":/(iphone)/i.test(navigator.userAgent)||/(ipod)/i.test(navigator.userAgent)||/(ipad)/i.test(navigator.userAgent)?e=\"ios\":/\\bCrOS\\b/i.test(navigator.userAgent)&&(e=\"chromeos\")),e===t?t:\"!\"+t}(\"mac\")?s.replace(//g,\"\").replace(//g,\"[[emph+]]\").replace(/<\\/emphasis>/g,\"\").replace(//g,\"[[slc $1]]\").replace(/]*>/g,\"\").replace(/<\\/say-as>/g,\"\"):s.replace(/<[^>]*>/g,\"\").replace(/\\s{2,}/g,\" \");return s},Ls.prototype.handleEvent=function(t){switch(t.type){case\"focus\":this._onFocus(t);break;case\"blur\":this._onBlur(t);break;case\"touchstart\":case\"mousedown\":case\"pointerdown\":this._onPointerDown(t);break;case\"resize\":this._resizeTimer&&window.cancelAnimationFrame(this._resizeTimer),this._resizeTimer=window.requestAnimationFrame(()=>this._onResize());break;case\"cut\":this._onCut(t);break;case\"copy\":this._onCopy(t);break;case\"paste\":this._onPaste(t)}},Ls.prototype.$revertToOriginalContent=function(){this.element.innerHTML=this.originalContent,this.element.mathfield=null,delete this.accessibleNode,delete this.ariaLiveText,delete this.field,Ms(this.textarea,\"cut\",this),Ms(this.textarea,\"copy\",this),Ms(this.textarea,\"paste\",this),this.textarea.remove(),delete this.textarea,this.virtualKeyboardToggleDOMNode.remove(),delete this.virtualKeyboardToggleDOMNode,_s(this.popover),_s(this.keystrokeCaption),_s(this.virtualKeyboard),_s(document.getElementById(\"mathlive-alternate-keys-panel\")),Ms(this.element,\"pointerdown\",this),Ms(this.element,\"touchstart:active mousedown\",this),Ms(this.element,\"focus\",this),Ms(this.element,\"blur\",this),Ms(window,\"resize\",this)},Ls.prototype.$removeEventListeners=function(){Ms(this.element,\"focus\",this),Ms(this.element,\"blur\",this),Ms(this.textarea,\"cut\",this),Ms(this.textarea,\"copy\",this),Ms(this.textarea,\"paste\",this),this.removeDelegatedKeyboardEvents&&this.removeDelegatedKeyboardEvents(),window.PointerEvent?Ms(this.field,\"pointerdown\",this):Ms(this.field,\"touchstart:active mousedown\",this),Ms(window,\"resize\",this)},Ls.prototype._resetKeystrokeBuffer=function(){this.keystrokeBuffer=\"\",this.keystrokeBufferStates=[],clearTimeout(this.keystrokeBufferResetTimer)},Ls.prototype._getCaretPosition=function(){const t=function t(e){if(e.classList.contains(\"ML__caret\")||e.classList.contains(\"ML__text-caret\")||e.classList.contains(\"ML__command-caret\"))return e;let i;return Array.from(e.children).forEach(function(e){i=i||t(e)}),i}(this.field);if(t){const e=t.getBoundingClientRect();return{x:e.right+window.scrollX,y:e.bottom+window.scrollY}}return null},Ls.prototype._getSelectionBounds=function(){const t=this.field.querySelectorAll(\".ML__selected\");if(t&&t.length>0){const e={top:1/0,bottom:-1/0,left:1/0,right:-1/0};t.forEach(t=>{const i=t.getBoundingClientRect();i.lefte.right&&(e.right=i.right),i.bottom>e.bottom&&(e.bottom=i.bottom),i.top=t.left&&i<=t.right}else a.distance=Number.POSITIVE_INFINITY;return o&&e.children&&Array.from(e.children).forEach(function(e){const o=t(e,i,s);o.element&&o.distance<=a.distance&&(a=o)}),a}(this.field,t,e).element,o=a?a.getAttribute(\"data-atom-id\"):null;if(o){const e=this.mathlist.filter(function(t,e){return e.captureSelection?e.filter(t=>t.id===o).length>0:e.id===o});if(e&&e.length>0)if(s=ve.pathFromString(e[0]).path,0===i.bias){const e=a.getBoundingClientRect();tvoid 0)),t._resetKeystrokeBuffer()):\"delete\"===e?a=zs(t,\"deleted: \",s):\"focus\"===e||/move/.test(e)?a=(t.mathlist.isCollapsed()?\"\":\"selected: \")+t._nextAtomSpeechText(i):\"replacement\"===e?a=zs(t,\"\",t.mathlist.sibling(0)):\"line\"===e?(a=zs(t,\"\",t.mathlist.root),t.accessibleNode.innerHTML=''+pe.toMathML(t.mathlist.root,t.config)+\"\",t.textarea.setAttribute(\"aria-label\",\"after: \"+a)):a=s?zs(t,e+\" \",s):e;const o=/\\u00a0/.test(t.ariaLiveText.textContent)?\"   \":\"   \";t.ariaLiveText.textContent=a+o}Ls.prototype._onPointerDown=function(t){const e=this;let i,s=!1,a=!1,o=!1;if(\"mouse\"===t.pointerType&&1!==t.buttons)return;let n=!1,r=!1;const l=setInterval(()=>{n?e.field.scroll({top:0,left:e.field.scrollLeft-16}):r&&e.field.scroll({top:0,left:e.field.scrollLeft+16})},32);function c(t){window.PointerEvent?(Ms(e.field,\"pointermove\",h),Ms(e.field,\"pointerend pointercancel pointerup\",c),e.field.releasePointerCapture(t.pointerId)):(Ms(e.field,\"touchmove\",h),Ms(e.field,\"touchend\",c),Ms(window,\"mousemove\",h),Ms(window,\"mouseup blur\",c)),s=!1,clearInterval(l),e.element.querySelectorAll(\".ML__scroller\").forEach(t=>t.parentNode.removeChild(t)),t.preventDefault(),t.stopPropagation()}function h(t){const s=t.touches?t.touches[0].clientX:t.clientX,o=t.touches?t.touches[0].clientY:t.clientY,l=\"touch\"===t.pointerType?20:5;if(Date.now()c.right,n=s=u.left&&p<=u.right&&d>=u.top&&d<=u.bottom){if(this.$hasFocus()||(o=!0,this.textarea.focus&&this.textarea.focus()),this._resetKeystrokeBuffer(),this.smartModeSuppressed=!1,i=this._pathFromPoint(p,d,{bias:0})){let n=document.createElement(\"div\");n.className=\"ML__scroller\",this.element.appendChild(n),n.style.left=\"-200px\",n.style.top=-u.top+\"px\",(n=document.createElement(\"div\")).className=\"ML__scroller\",this.element.appendChild(n),n.style.left=u.width+\"px\",n.style.top=-u.top+\"px\",t.shiftKey?(this.mathlist.setRange(this.mathlist.path,i),(i=ve.clone(this.mathlist.path))[i.length-1].offset-=1):this.mathlist.setPath(i,0),o=!0,this.style={},3===t.detail||Ds>2?(c(t),3!==t.detail&&3!==Ds||this.mathlist.selectAll_()):s||(s=!0,window.PointerEvent?(As(e.field,\"pointermove\",h),As(e.field,\"pointerend pointercancel pointerup\",c),document.body.contains(e.field)&&e.field.setPointerCapture(t.pointerId)):(As(window,\"blur\",c),t.touches?(As(t.target,\"touchmove\",h),As(t.target,\"touchend\",c)):(As(window,\"mousemove\",h),As(window,\"mouseup\",c))),2!==t.detail&&2!==Ds||(a=!0,this.mathlist.selectGroup_()))}}else Fs=null;o&&this._requestUpdate(),t.preventDefault()},Ls.prototype._onSelectionDidChange=function(){this.mathlist.commitCommandStringBeforeInsertionPoint();let t=\"\";this.mathlist.forEachSelected(e=>{t+=e.toLatex()}),t?(this.textarea.value=t,this.$hasFocus()&&this.textarea.select&&this.textarea.select()):(this.textarea.value=\"\",this.textarea.setAttribute(\"aria-label\",\"\"));{const t=this.mode;this.mode=this.mathlist.anchorMode()||this.config.defaultMode,this.mode!==t&&\"function\"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),\"command\"===t&&\"command\"!==this.mode&&(oi.hidePopover(this),this.mathlist.removeCommandString())}oi.updatePopoverPosition(this,{deferred:!0}),\"function\"==typeof this.config.onSelectionDidChange&&this.config.onSelectionDidChange(this)},Ls.prototype._onContentDidChange=function(){this.undoManager.canRedo()?this.element.classList.add(\"can-redo\"):this.element.classList.remove(\"can-redo\"),this.undoManager.canUndo()?this.element.classList.add(\"can-undo\"):this.element.classList.remove(\"can-undo\"),\"function\"==typeof this.config.onContentDidChange&&this.config.onContentDidChange(this)},Ls.prototype._nextAtomSpeechText=function(t){function e(t,e){return\"body\"===e.relation?{enclose:\"cross out\",leftright:\"fence\",surd:\"square root\",root:\"math field\"}[t.type]:{numer:\"numerator\",denom:\"denominator\",index:\"index\",body:\"parent\",subscript:\"subscript\",superscript:\"superscript\"}[e.relation]}const i=t?t.path:[],s=this.mathlist.path,a=s[s.length-1];let o=\"\";for(;i.length>s.length;)o+=\"out of \"+e(t.parent(),i[i.length-1])+\"; \",i.pop();if(!this.mathlist.isCollapsed())return zs(this,\"\",this.mathlist.getSelectedAtoms());const n=e(this.mathlist.parent(),a);0===a.offset&&(o+=(n?\"start of \"+n:\"unknown\")+\": \");const r=this.mathlist.sibling(Math.max(1,this.mathlist.extent));return r?o+=zs(this,\"\",r):0!==a.offset&&(o+=n?\"end of \"+n:\"unknown\"),o},Ls.prototype._announce=function(t,e,i){\"function\"==typeof this.config.onAnnounce&&this.config.onAnnounce(this,t,e,i)},Ls.prototype._onFocus=function(){this.blurred&&(this.blurred=!1,this.textarea.focus&&this.textarea.focus(),\"onfocus\"===this.config.virtualKeyboardMode&&this.showVirtualKeyboard_(),oi.updatePopoverPosition(this),this.config.onFocus&&this.config.onFocus(this),this._requestUpdate())},Ls.prototype._onBlur=function(){this.blurred||(this.blurred=!0,this.ariaLiveText.textContent=\"\",\"onfocus\"===this.config.virtualKeyboardMode&&this.hideVirtualKeyboard_(),this.complete_({discard:!0}),this._requestUpdate(),this.config.onBlur&&this.config.onBlur(this))},Ls.prototype._onResize=function(){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\"),oi.updatePopoverPosition(this)},Ls.prototype.toggleKeystrokeCaption_=function(){this.keystrokeCaptionVisible=!this.keystrokeCaptionVisible,this.keystrokeCaption.innerHTML=\"\",this.keystrokeCaptionVisible||(this.keystrokeCaption.style.visibility=\"hidden\")},Ls.prototype._showKeystroke=function(t){const e=this.keystrokeCaption;if(e&&this.keystrokeCaptionVisible){const i=this.element.getBoundingClientRect();e.style.left=i.left+\"px\",e.style.top=i.top-64+\"px\",e.innerHTML=\"\"+(Le.stringify(t)||t)+\"\"+e.innerHTML,e.style.visibility=\"visible\",setTimeout(function(){e.childNodes.length>0&&e.removeChild(e.childNodes[e.childNodes.length-1]),0===e.childNodes.length&&(e.style.visibility=\"hidden\")},3e3)}},Ls.prototype.$perform=function(t){if(!t)return!1;let e,i=!1,s=[],a=!1;if(Array.isArray(t)?(e=t[0],s=t.slice(1)):e=t,\"applyStyle\"===(e=e.replace(/-\\w/g,t=>t[1].toUpperCase()))?e=\"$\"+e:e+=\"_\",\"function\"==typeof this.mathlist[e]){if(/^(delete|transpose|add)/.test(e)&&this._resetKeystrokeBuffer(),/^(delete|transpose|add)/.test(e)&&\"command\"!==this.mode&&(this.undoManager.pop(),this.undoManager.snapshot(this.config)),this.mathlist[e](...s),/^(delete|transpose|add)/.test(e)&&\"command\"!==this.mode&&this.undoManager.snapshot(this.config),/^(delete)/.test(e)&&\"command\"===this.mode){const t=this.mathlist.extractCommandStringAroundInsertionPoint(),e=this._getSuggestions(t);0===e.length?oi.hidePopover(this):oi.showPopoverWithLatex(this,e[0].match,e.length>1)}a=!0,i=!0}else\"function\"==typeof this[e]&&(a=this[e](...s),i=!0);return this.mathlist.isCollapsed()&&!/^(transpose|paste|complete|((moveToNextChar|moveToPreviousChar|extend).*))_$/.test(e)||(this._resetKeystrokeBuffer(),this.style={}),a&&this._requestUpdate(),i},Ls.prototype.performWithFeedback_=function(t){return this.$focus(),this.config.keypressVibration&&navigator.vibrate&&navigator.vibrate(3),\"moveToNextPlaceholder\"===(t=t.replace(/-\\w/g,t=>t[1].toUpperCase()))||\"moveToPreviousPlaceholder\"===t||\"complete\"===t?this.returnKeypressSound?(this.returnKeypressSound.load(),this.returnKeypressSound.play().catch(t=>void 0)):this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play().catch(t=>void 0)):\"deletePreviousChar\"!==t&&\"deleteNextChar\"!==t&&\"deletePreviousWord\"!==t&&\"deleteNextWord\"!==t&&\"deleteToGroupStart\"!==t&&\"deleteToGroupEnd\"!==t&&\"deleteToMathFieldStart\"!==t&&\"deleteToMathFieldEnd\"!==t||!this.deleteKeypressSound?this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play().catch(t=>void 0)):(this.deleteKeypressSound.load(),this.deleteKeypressSound.play().catch(t=>void 0)),this.$perform(t)},Ls.prototype.convertLastAtomsToText_=function(t,e){\"function\"==typeof t&&(e=t,t=1/0),void 0===t&&(t=1/0);let i=0,s=!1;for(this.mathlist.contentWillChange();!s;){const a=this.mathlist.sibling(i);(s=0===t||!a||\"math\"!==a.mode||!(/mord|textord|mpunct/.test(a.type)||\"mop\"===a.type&&/[a-zA-Z]+/.test(a.body))||a.superscript||a.subscript||e&&!e(a))||(a.applyStyle({mode:\"text\"}),a.latex=a.body),i-=1,t-=1}this.mathlist.contentDidChange()},Ls.prototype.convertLastAtomsToMath_=function(t,e){\"function\"==typeof t&&(e=t,t=1/0),void 0===t&&(t=1/0),this.mathlist.contentWillChange();let i=0,s=!1;for(;!s;){const a=this.mathlist.sibling(i);(s=0===t||!a||\"text\"!==a.mode||\" \"===a.body||e&&!e(a))||a.applyStyle({mode:\"math\",type:\"mord\"}),i-=1,t-=1}this.removeIsolatedSpace_(),this.mathlist.contentDidChange()},Ls.prototype.removeIsolatedSpace_=function(){let t=0;for(;this.mathlist.sibling(t)&&\"math\"===this.mathlist.sibling(t).mode;)t-=1;if(this.mathlist.sibling(t)&&\"text\"===this.mathlist.sibling(t).mode&&\" \"===this.mathlist.sibling(t).body&&(!this.mathlist.sibling(t-1)||\"math\"===this.mathlist.sibling(t-1).mode)){this.mathlist.contentWillChange(),this.mathlist.siblings().splice(t-1,1),this.mathlist.contentDidChange();const e=this.mathlist.suppressChangeNotifications;this.mathlist.suppressChangeNotifications=!0,this.mathlist.setSelection(this.mathlist.anchorOffset()-1),this.mathlist.suppressChangeNotifications=e}},Ls.prototype.getTextBeforeAnchor_=function(){let t=\"\",e=0,i=!1;for(;!i;){const s=this.mathlist.sibling(e);(i=!(s&&(\"text\"===s.mode&&!s.type||\"math\"===s.mode&&/mord|textord|mpunct/.test(s.type))))||(t=s.body+t),e-=1}return t},Ls.prototype.smartMode_=function(t,e){if(this.smartModeSuppressed)return!1;if(this.mathlist.endOffset()1)return!1;if(!this.mathlist.isCollapsed())return!(\"text\"!==this.mode||!/[/_^]/.test(i));const s=this.getTextBeforeAnchor_()+i;if(\"text\"===this.mode){if(\"Esc\"===t||/[/\\\\]/.test(i))return!0;if(/[\\^_]/.test(i))return/(^|\\s)[a-zA-Z][^_]$/.test(s)&&this.convertLastAtomsToMath_(1),!0;const e={\")\":\"(\",\"}\":\"{\",\"]\":\"[\"}[i];if(e&&this.mathlist.parent()&&\"leftright\"===this.mathlist.parent().type&&this.mathlist.parent().leftDelim===e)return!0;if(/(^|[^a-zA-Z])(a|I)[ ]$/.test(s))return!1;if(/[$€£₤₺¥¤฿¢₡₧₨₹₩₱]/u.test(i))return!0;if(/(^|[^a-zA-Z'’])[a-zA-Z][ ]$/.test(s))return this.convertLastAtomsToMath_(1),!1;if(/[^0-9]\\.[^0-9\\s]$/.test(s)){this.convertLastAtomsToMath_(1);const t=this.mathlist.sibling(0);return t.body=\"⋅\",t.autoFontFamily=\"cmr\",t.latex=\"\\\\cdot\",!0}if(/(^|\\s)[a-zA-Z][^a-zA-Z]$/.test(s))return this.convertLastAtomsToMath_(1),!0;if(/\\.[0-9]$/.test(s))return this.convertLastAtomsToMath_(1),!0;if(/[(][0-9+\\-.]$/.test(s))return this.convertLastAtomsToMath_(1),!0;if(/[(][a-z][,;]$/.test(s))return this.convertLastAtomsToMath_(2),!0;if(/[0-9+\\-=><*|]$/.test(i))return this.removeIsolatedSpace_(),!0}else{if(\"Spacebar\"===t)return this.convertLastAtomsToText_(t=>/[a-z][:,;.]$/.test(t.body)),!0;if(/[a-zA-Z]{3,}$/.test(s)&&!/(dxd|abc|xyz|uvw)$/.test(s))return this.convertLastAtomsToText_(t=>/[a-zA-Z:,;.]/.test(t.body)),!0;if(/(^|\\W)(if|If)$/i.test(s))return this.convertLastAtomsToText_(1),!0;if(/(\\u0393|\\u0394|\\u0398|\\u039b|\\u039E|\\u03A0|\\u03A3|\\u03a5|\\u03a6|\\u03a8|\\u03a9|[\\u03b1-\\u03c9]|\\u03d1|\\u03d5|\\u03d6|\\u03f1|\\u03f5){3,}$/u.test(s)&&!/(αβγ)$/.test(s))return this.convertLastAtomsToText_(t=>/(:|,|;|.|\\u0393|\\u0394|\\u0398|\\u039b|\\u039E|\\u03A0|\\u03A3|\\u03a5|\\u03a6|\\u03a8|\\u03a9|[\\u03b1-\\u03c9]|\\u03d1|\\u03d5|\\u03d6|\\u03f1|\\u03f5)/u.test(t.body)),!0;if(/\\?|\\./.test(i))return!0}return!1},Ls.prototype._onKeystroke=function(t,e){if(this._showKeystroke(t),clearTimeout(this.keystrokeBufferResetTimer),this.config.onKeystroke&&!this.config.onKeystroke(this,t,e))return e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),!1;let i,s,a,o=!1;if(\"command\"!==this.mode&&(!e||!e.ctrlKey&&!e.metaKey)){const t=Ye.eventToChar(e);if(\"Backspace\"!==t)if(!t||t.length>1)this._resetKeystrokeBuffer();else{const e=this.keystrokeBuffer+t;let a=0;for(;!i&&a{this._resetKeystrokeBuffer()},this.config.inlineShortcutTimeout))}}if(this.config.smartMode){const s=this.mode;i?this.mode=\"math\":this.smartMode_(t,e)&&(this.mode={math:\"text\",text:\"math\"}[this.mode],a=\"\"),this.mode!==s&&\"function\"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode)}if(i||a||(a=Le.selectorForKeystroke(this.mode,t)),!i&&!a)return!0;this.mathlist.decorateCommandStringAroundInsertionPoint(!1);const n=this.mathlist.parent();if(\"moveAfterParent\"===a&&n&&\"leftright\"===n.type&&this.mathlist.endOffset()===this.mathlist.siblings().length-1&&this.config.smartFence&&this.mathlist._insertSmartFence(\".\")&&(a=\"\",this._requestUpdate()),\"math\"===this.mode&&\"Spacebar\"===t&&!i){const t=this.mathlist.sibling(1),e=this.mathlist.sibling(-1);(t&&\"text\"===t.mode||e&&\"text\"===e.mode)&&this.mathlist.insert(\" \",{mode:\"text\"})}if((a&&!this.$perform(a)||i)&&i){if(!/^(\\\\{|\\\\}|\\\\[|\\\\]|\\\\@|\\\\#|\\\\$|\\\\%|\\\\^|\\\\_|\\\\backslash)$/.test(i)){const t={...this.mathlist.anchorStyle(),...this.style};this.mathlist.insert(Ye.eventToChar(e),{suppressChangeNotifications:!0,mode:this.mode,style:t});const i=this.mode;this.undoManager.snapshotAndCoalesce(this.config),this.undoManager.restore(this.keystrokeBufferStates[s],{...this.config,suppressChangeNotifications:!0}),this.mode=i}this.mathlist.contentWillChange();const t=this.mathlist.suppressChangeNotifications;this.mathlist.suppressChangeNotifications=!0;const a={...this.mathlist.anchorStyle(),...this.style};this.mathlist.insert(i,{format:\"latex\",mode:this.mode,style:a,smartFence:!0}),this.removeIsolatedSpace_(),i.endsWith(\" \")&&(this.mode=\"text\",this.mathlist.insert(\" \",{mode:\"text\",style:a})),this.mathlist.suppressChangeNotifications=t,this.mathlist.contentDidChange(),this.undoManager.snapshot(this.config),this._requestUpdate(),this._announce(\"replacement\"),o&&this._resetKeystrokeBuffer()}return this.scrollIntoView(),e&&e.preventDefault&&(e.preventDefault(),e.stopPropagation()),!1},Ls.prototype._onTypedText=function(t,e){if((e=e||{}).focus&&this.$focus(),e.feedback&&(this.config.keypressVibration&&navigator.vibrate&&navigator.vibrate(3),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play().catch(t=>void 0))),e.commandMode&&\"command\"!==this.mode&&this.switchMode_(\"command\"),this.mathlist.decorateCommandStringAroundInsertionPoint(!1),e.simulateKeystroke){const e=t.charAt(0),i=Ye.charToEvent(e);if(!this.$keystroke(Ye.keyboardEventToString(i),i))return}let i=\"\",s=!1;if(this.pasteInProgress)this.pasteInProgress=!1,this.mathlist.insert(t,{smartFence:this.config.smartFence,mode:\"math\"});else{const e={...this.mathlist.anchorStyle(),...this.style},a=g.splitGraphemes(t);for(const t of a)if(\"command\"===this.mode){this.mathlist.removeSuggestion(),this.suggestionIndex=0;const e=this.mathlist.extractCommandStringAroundInsertionPoint(),a=this._getSuggestions(e+t);s=a.length>1,0===a.length?(this.mathlist.insert(t,{mode:\"command\"}),/^\\\\[a-zA-Z\\\\*]+$/.test(e+t)&&this.mathlist.decorateCommandStringAroundInsertionPoint(!0),oi.hidePopover(this)):(this.mathlist.insert(t,{mode:\"command\"}),a[0].match!==e+t&&this.mathlist.insertSuggestion(a[0].match,-a[0].match.length+e.length+1),i=a[0].match)}else if(\"math\"===this.mode){const i={\"^\":\"moveToSuperscript\",_:\"moveToSubscript\",\" \":\"moveAfterParent\"}[t];if(i){if(\"moveToSuperscript\"===i){if(this._superscriptDepth()>=this.config.scriptDepth[1])return void this._announce(\"plonk\")}else if(\"moveToSubscript\"===i&&this._subscriptDepth()>=this.config.scriptDepth[0])return void this._announce(\"plonk\");this.$perform(i)}else this.config.smartSuperscript&&\"superscript\"===this.mathlist.relation()&&/[0-9]/.test(t)&&0===this.mathlist.siblings().filter(t=>\"first\"!==t.type).length?(this.mathlist.insert(t,{mode:\"math\",style:e}),this.mathlist.moveAfterParent_()):this.mathlist.insert(t,{mode:\"math\",style:e,smartFence:this.config.smartFence})}else\"text\"===this.mode&&this.mathlist.insert(t,{mode:\"text\",style:e})}\"command\"!==this.mode&&this.undoManager.snapshotAndCoalesce(this.config),this._requestUpdate(),this.scrollIntoView(),oi.showPopoverWithLatex(this,i,s)},Ls.prototype._hash=function(){let t=0;const e=this.mathlist.root.toLatex(!1);for(let i=0;ithis._render()))},Ls.prototype._render=function(t){t=t||{},this.dirty=!1,window.mathlive||(window.mathlive={}),this.mathlist.anchor()||(this.mathlist.path=[{relation:\"body\",offset:0}]),this.mathlist.forEach(t=>{t.caret=\"\",t.isSelected=!1});const e=this.$hasFocus();this.mathlist.isCollapsed()?this.mathlist.anchor().caret=e?this.mode:\"\":this.mathlist.forEachSelected(t=>{t.isSelected=!0});const i=pe.decompose({mathstyle:\"displaystyle\",generateID:{seed:this._hash(),groupNumbers:t.forHighlighting},macros:this.config.macros},this.mathlist.root),s=Q.makeSpan(i,\"ML__base\");s.attributes={translate:\"no\",\"aria-hidden\":\"true\"};const a=Q.makeSpan(\"\",\"ML__strut\");a.setStyle(\"height\",s.height,\"em\");const o=[a];if(0!==s.depth){const t=Q.makeSpan(\"\",\"ML__strut--bottom\");t.setStyle(\"height\",s.height+s.depth,\"em\"),t.setStyle(\"vertical-align\",-s.depth,\"em\"),o.push(t)}o.push(s);const n=Q.makeSpan(o,\"ML__mathlive\");this.field.innerHTML=n.toMarkup(0,this.config.horizontalSpacingScale),this.field.classList.toggle(\"ML__focused\",e),this.accessibleNode.innerHTML=\"\"+pe.toMathML(this.mathlist.root,this.config)+\"\";const r=this._getSelectionBounds();if(r){const t=document.createElement(\"div\");t.classList.add(\"ML__selection\"),t.style.position=\"absolute\",t.style.left=r.left+\"px\",t.style.top=r.top+\"px\",t.style.width=Math.ceil(r.right-r.left)+\"px\",t.style.height=Math.ceil(r.bottom-r.top-1)+\"px\",this.field.insertBefore(t,this.field.childNodes[0])}},Ls.prototype._onPaste=function(){return this.pasteInProgress=!0,!0},Ls.prototype._onCut=function(){return setTimeout(function(){this.$clearSelection(),this._requestUpdate()}.bind(this),0),!0},Ls.prototype._onCopy=function(t){this.mathlist.isCollapsed()?(t.clipboardData.setData(\"text/plain\",this.$text(\"latex-expanded\")),t.clipboardData.setData(\"application/json\",this.$text(\"json\")),t.clipboardData.setData(\"application/xml\",this.$text(\"mathML\"))):(t.clipboardData.setData(\"text/plain\",this.$selectedText(\"latex-expanded\")),t.clipboardData.setData(\"application/json\",this.$selectedText(\"json\")),t.clipboardData.setData(\"application/xml\",this.$selectedText(\"mathML\"))),t.preventDefault()},Ls.prototype.formatMathlist=function(t,e){let i=\"\";if(\"latex\"===(e=e||\"latex\")||\"latex-expanded\"===e)i=t.toLatex(\"latex-expanded\"===e);else if(\"mathML\"===e)i=t.toMathML(this.config);else if(\"spoken\"===e)i=pe.toSpeakableText(t,this.config);else if(\"spoken-text\"===e){const e=this.config.textToSpeechMarkup;this.config.textToSpeechMarkup=\"\",i=pe.toSpeakableText(t,this.config),this.config.textToSpeechMarkup=e}else if(\"spoken-ssml\"===e||\"spoken-ssml-withHighlighting\"===e){const s=this.config.textToSpeechMarkup,a=this.config.generateID;this.config.textToSpeechMarkup=\"ssml\",\"spoken-ssml-withHighlighting\"===e&&(this.config.generateID=!0),i=pe.toSpeakableText(t,this.config),this.config.textToSpeechMarkup=s,this.config.generateID=a}else if(\"json\"===e){const e=pe.toAST(t,this.config);i=JSON.stringify(e)}else\"ASCIIMath\"===e&&(i=function t(e,i){if(!e)return\"\";if(Array.isArray(e)){let i=\"\";if(0===e.length)return\"\";if(\"first\"===e[0].type&&e.shift(),\"text\"===e[0].mode){let s=0;for(i='\"';e[s]&&\"text\"===e[s].mode;)i+=e[s].body,s++;i+='\"'+t(e.slice(s))}else{let s=0;for(;e[s]&&\"math\"===e[s].mode;)i+=t(e[s]),s++;i+=t(e.slice(s))}return i.trim()}let s=\"\";const a=e.latex?e.latex.trim():null;let o;switch(e.type){case\"group\":case\"root\":s=t(e.body);break;case\"array\":break;case\"genfrac\":(e.leftDelim||e.rightDelim)&&(s+=\".\"!==e.leftDelim&&e.leftDelim?e.leftDelim:\"{:\"),e.hasBarLine?(s+=\"(\",s+=t(e.numer),s+=\")/(\",s+=t(e.denom),s+=\")\"):(s+=\"(\"+t(e.numer)+\"),\",s+=\"(\"+t(e.denom)+\")\"),(e.leftDelim||e.rightDelim)&&(s+=\".\"!==e.rightDelim&&e.rightDelim?e.rightDelim:\"{:\");break;case\"surd\":e.index?s+=\"root(\"+t(e.index)+\")(\"+t(e.body)+\")\":s+=\"sqrt(\"+t(e.body)+\")\";break;case\"leftright\":s+=\".\"!==e.leftDelim&&e.leftDelim?e.leftDelim:\"{:\",s+=t(e.body),s+=\".\"!==e.rightDelim&&e.rightDelim?e.rightDelim:\"{:\";break;case\"sizeddelim\":case\"delim\":case\"accent\":break;case\"line\":case\"overlap\":case\"overunder\":break;case\"mord\":\"\\\\\"===(s=bi[a]||a||(\"string\"==typeof e.body?e.body:\"\"))[0]&&(s+=\"\"),(o=a?a.match(/[{]?\\\\char\"([0-9abcdefABCDEF]*)[}]?/):null)?s=String.fromCharCode(parseInt(\"0x\"+o[1])):s.length>0&&\"\\\\\"===s.charAt(0)&&(s=\"string\"==typeof e.body?e.body.charAt(0):e.latex);break;case\"mbin\":case\"mrel\":case\"textord\":case\"minner\":s=a&&bi[a]?bi[a]:a&&xi[a]?xi[a]:e.body;break;case\"mopen\":case\"mclose\":s+=e.body;break;case\"mpunct\":s=xi[a]||a;break;case\"mop\":\"​\"!==e.body&&(s=\"\",s+=\"\\\\operatorname\"===a?e.body:e.body||a,s+=\" \");break;case\"mathstyle\":case\"box\":case\"spacing\":case\"enclose\":break;case\"space\":s=\" \"}if(e.subscript){s+=\"_\";const i=t(e.subscript);i.length>1&&!/^(-)?\\d+(\\.\\d*)?$/.test(i)?s+=\"(\"+i+\")\":s+=i}if(e.superscript){s+=\"^\";const i=t(e.superscript);i.length>1&&!/^(-)?\\d+(\\.\\d*)?$/.test(i)?s+=\"(\"+i+\")\":s+=i}return s}(t,this.config));return i},Ls.prototype.$text=function(t){return this.formatMathlist(this.mathlist.root,t)},Ls.prototype.$selectedText=function(t){const e=this.mathlist.getSelectedAtoms();if(!e)return\"\";const i=pe.makeRoot(\"math\",e);return this.formatMathlist(i,t)},Ls.prototype.$selectionIsCollapsed=function(){return this.mathlist.isCollapsed()},Ls.prototype.$selectionDepth=function(){return this.mathlist.path.length},Ls.prototype._superscriptDepth=function(){let t=0,e=0,i=this.mathlist.ancestor(e),s=!1;for(;i;)(i.superscript||i.subscript)&&(t+=1),i.superscript?s=!0:i.subscript&&(s=!1),e+=1,i=this.mathlist.ancestor(e);return s?t:0},Ls.prototype._subscriptDepth=function(){let t=0,e=0,i=this.mathlist.ancestor(e),s=!1;for(;i;)(i.superscript||i.subscript)&&(t+=1),i.superscript?s=!1:i.subscript&&(s=!0),e+=1,i=this.mathlist.ancestor(e);return s?t:0},Ls.prototype.$selectionAtStart=function(){return 0===this.mathlist.startOffset()},Ls.prototype.$selectionAtEnd=function(){return this.mathlist.endOffset()>=this.mathlist.siblings().length-1},Ls.prototype.groupIsSelected=function(){return 0===this.mathlist.startOffset()&&this.mathlist.endOffset()>=this.mathlist.siblings().length-1},Ls.prototype.$latex=function(t,e){return(e=e||{}).suppressChangeNotifications=!!e.suppressChangeNotifications,e.outputStyles=!!e.outputStyles,void 0!==t?(t!==this.mathlist.root.toLatex(e)&&(this.mathlist.insert(t,Object.assign({},this.config,{insertionMode:\"replaceAll\",selectionMode:\"after\",format:\"latex\",mode:\"math\",suppressChangeNotifications:e.suppressChangeNotifications})),this.undoManager.snapshot(this.config),this._requestUpdate()),t):this.mathlist.root.toLatex(e)},Ls.prototype.$el=function(){return this.element},Ls.prototype.undo_=Ls.prototype.undo=function(){return this.complete_(),this.undoManager.undo(this.config),!0},Ls.prototype.redo_=Ls.prototype.redo=function(){return this.complete_(),this.undoManager.redo(this.config),!0},Ls.prototype.scrollIntoView_=Ls.prototype.scrollIntoView=function(){this.dirty&&this._render();let t=this._getCaretPosition();const e=this.field.getBoundingClientRect();if(!t){const i=this._getSelectionBounds();i&&(t={x:i.right+e.left-this.field.scrollLeft,y:i.top+e.top-this.field.scrollTop})}if(t){const i=t.x-window.scrollX;ie.right&&this.field.scroll({top:0,left:i-e.right+this.field.scrollLeft+20,behavior:\"smooth\"})}},Ls.prototype.scrollToStart_=Ls.prototype.scrollToStart=function(){this.field.scroll(0,0)},Ls.prototype.scrollToEnd_=Ls.prototype.scrollToEnd=function(){const t=this.field.getBoundingClientRect();this.field.scroll(t.left-window.scrollX,0)},Ls.prototype.enterCommandMode_=function(){this.switchMode_(\"command\")},Ls.prototype.copyToClipboard_=function(){return this.$focus(),this.mathlist.isCollapsed()&&this.$select(),document.execCommand(\"copy\"),!1},Ls.prototype.cutToClipboard_=function(){return this.$focus(),document.execCommand(\"cut\"),!0},Ls.prototype.pasteFromClipboard_=function(){return this.$focus(),document.execCommand(\"paste\"),!0},Ls.prototype.insert_=Ls.prototype.$insert=function(t,e){if(\"string\"==typeof t&&t.length>0){if((e=e||{}).focus&&this.$focus(),e.feedback&&(this.config.keypressVibration&&navigator.vibrate&&navigator.vibrate(3),this.keypressSound&&(this.keypressSound.load(),this.keypressSound.play())),\"\\\\\\\\\"===t)this.mathlist.addRowAfter_();else if(\"&\"===t)this.mathlist.addColumnAfter_();else{const i=this.style;this.mathlist.insert(t,{mode:this.mode,style:this.mathlist.anchorStyle(),...e}),e.resetStyle&&(this.style=i)}return this.undoManager.snapshot(this.config),this._requestUpdate(),!0}return!1},Ls.prototype.switchMode_=function(t,e,i){this._resetKeystrokeBuffer(),this.smartModeSuppressed=/text|math/.test(this.mode)&&/text|math/.test(t),e&&this.$insert(e,{format:\"latex\",mode:{math:\"text\",text:\"math\"}[t]}),this.mathlist.decorateCommandStringAroundInsertionPoint(!1),\"command\"===t?(this.mathlist.removeSuggestion(),oi.hidePopover(this),this.suggestionIndex=0,this.virtualKeyboardVisible&&this.switchKeyboardLayer_(\"lower-command\"),this.mathlist.insert(\"\u001b\",{mode:\"math\"})):this.mode=t,i&&this.$insert(i,{format:\"latex\",mode:t}),\"function\"==typeof this.config.onModeChange&&this.config.onModeChange(this,this.mode),this._requestUpdate()},Ls.prototype.complete_=function(t){if(t=t||{},oi.hidePopover(this),t.discard)return this.mathlist.spliceCommandStringAroundInsertionPoint(null),this.switchMode_(\"math\"),!0;const e=this.mathlist.extractCommandStringAroundInsertionPoint(!t.acceptSuggestion);if(e){if(\"\\\\(\"===e||\"\\\\)\"===e)this.mathlist.spliceCommandStringAroundInsertionPoint([]),this.mathlist.insert(e.slice(1),{mode:this.mode});else{const t=\"math\";if(It.commandAllowed(t,e)){const i=be.parseTokens(x.tokenize(e),t,null,this.config.macros);this.mathlist.spliceCommandStringAroundInsertionPoint(i)}else{const i=be.parseTokens(x.tokenize(e),t,null,this.config.macros);i?this.mathlist.spliceCommandStringAroundInsertionPoint(i):this.mathlist.decorateCommandStringAroundInsertionPoint(!0)}}return this.undoManager.snapshot(this.config),this._announce(\"replacement\"),this.switchMode_(\"math\"),!0}return!1},Ls.prototype._getSuggestions=function(t){let e=It.suggest(t);return this.config.suggestionWhitelist&&(e=e.filter(t=>this.config.suggestionWhitelist.includes(t.match))),this.config.suggestionBlacklist&&(e=e.filter(t=>!this.config.suggestionBlacklist.includes(t.match))),e},Ls.prototype._updateSuggestion=function(){this.mathlist.positionInsertionPointAfterCommitedCommand(),this.mathlist.removeSuggestion();const t=this.mathlist.extractCommandStringAroundInsertionPoint(),e=this._getSuggestions(t);if(0===e.length)oi.hidePopover(this),this.mathlist.decorateCommandStringAroundInsertionPoint(!0);else{const i=this.suggestionIndex%e.length,s=t.length-e[i].match.length;0!==s&&this.mathlist.insertSuggestion(e[i].match,s),oi.showPopoverWithLatex(this,e[i].match,e.length>1)}this._requestUpdate()},Ls.prototype.nextSuggestion_=function(){return this.suggestionIndex+=1,this._updateSuggestion(),!1},Ls.prototype.previousSuggestion_=function(){if(this.suggestionIndex-=1,this.suggestionIndex<0){this.mathlist.removeSuggestion();const t=this.mathlist.extractCommandStringAroundInsertionPoint(),e=this._getSuggestions(t);this.suggestionIndex=e.length-1}return this._updateSuggestion(),!1},Ls.prototype._attachButtonHandlers=function(t,e){const i=this;let s,a,o,n,r;\"object\"==typeof e&&(e.default||e.pressed)?(e.default&&t.setAttribute(\"data-\"+this.config.namespace+\"command\",JSON.stringify(e.default)),e.alt&&t.setAttribute(\"data-\"+this.config.namespace+\"command-alt\",JSON.stringify(e.alt)),e.altshift&&t.setAttribute(\"data-\"+this.config.namespace+\"command-altshift\",JSON.stringify(e.altshift)),e.shift&&t.setAttribute(\"data-\"+this.config.namespace+\"command-shift\",JSON.stringify(e.shift)),e.pressed&&t.setAttribute(\"data-\"+this.config.namespace+\"command-pressed\",JSON.stringify(e.pressed)),e.pressAndHoldStart&&t.setAttribute(\"data-\"+this.config.namespace+\"command-pressAndHoldStart\",JSON.stringify(e.pressAndHoldStart)),e.pressAndHoldEnd&&t.setAttribute(\"data-\"+this.config.namespace+\"command-pressAndHoldEnd\",JSON.stringify(e.pressAndHoldEnd))):t.setAttribute(\"data-\"+this.config.namespace+\"command\",JSON.stringify(e)),As(t,\"mousedown touchstart:passive\",function(e){if(\"mousedown\"!==e.type||1===e.buttons){e.stopPropagation(),e.preventDefault(),t.classList.add(\"pressed\"),s=Date.now(),\"touchstart\"===e.type&&(o=e.changedTouches[0].identifier);const n=t.getAttribute(\"data-\"+i.config.namespace+\"command-pressed\");n&&i.$perform(JSON.parse(n));const l=t.getAttribute(\"data-\"+i.config.namespace+\"command-pressAndHoldStart\");l&&(a=t,r&&clearTimeout(r),r=window.setTimeout(function(){t.classList.contains(\"pressed\")&&i.$perform(JSON.parse(l))},300))}}),As(t,\"mouseleave touchcancel\",function(){t.classList.remove(\"pressed\")}),As(t,\"touchmove:passive\",function(t){t.preventDefault();for(let e=0;e=7?i.style.width=\"286px\":4===e.length||2===e.length?i.style.width=\"146px\":1===e.length?i.style.width=\"86px\":i.style.width=\"146px\",i.style.height=\"auto\";let s=\"\";for(const t of e)s+=\"\",s+=t.label||\"\",s+=\"\";s=\"
      \"+s+\"
    \",i.innerHTML=s,yi.makeKeycap(this,i.getElementsByTagName(\"li\"),\"performAlternateKeys\");const a=this.virtualKeyboard.querySelector('div.keyboard-layer.is-visible div.rows ul li[data-alt-keys=\"'+t+'\"]').getBoundingClientRect();if(a){a.top-i.clientHeight<0&&(i.style.width=\"auto\",e.length<=6?i.style.height=\"56px\":e.length<=12?i.style.height=\"108px\":i.style.height=\"205px\");const t=(a.top-i.clientHeight+5).toString()+\"px\",s=Math.max(0,Math.min(window.innerWidth-i.offsetWidth,(a.left+a.right-i.offsetWidth)/2))+\"px\";i.style.transform=\"translate(\"+s+\",\"+t+\")\",i.classList.add(\"is-visible\")}return!1},Ls.prototype.hideAlternateKeys_=function(){const t=document.getElementById(\"mathlive-alternate-keys-panel\");return t&&(t.classList.remove(\"is-visible\"),t.innerHTML=\"\",_s(t)),!1},Ls.prototype.performAlternateKeys_=function(t){return this.hideAlternateKeys_(),this.$perform(t)},Ls.prototype.switchKeyboardLayer_=function(t){if(\"off\"!==this.config.virtualKeyboardMode){\"lower-command\"!==t&&\"upper-command\"!==t&&\"symbols-command\"!==t&&this.complete_(),this.showVirtualKeyboard_(),this.hideAlternateKeys_(),this.unshiftKeyboardLayer_();const e=this.virtualKeyboard.getElementsByClassName(\"keyboard-layer\");let i=!1;for(let s=0;s=1){i=[];for(let t=1;t<=s;t++)i.push(e[t])}break}case\"right\":{const e=t.mathlist.siblings(),s=t.mathlist.endOffset()+1;if(s<=e.length-1){i=[];for(let t=s;t<=e.length-1;t++)i.push(e[t])}break}case\"start\":case\"end\":break;case\"group\":i=t.mathlist.siblings();break;case\"parent\":{const e=t.mathlist.parent();e&&\"root\"!==e.type&&(i=t.mathlist.parent());break}}return i}(this,t);if(null===i)return this.config.handleSpeak(function(t){let e=\"\";switch(t){case\"all\":break;case\"selection\":e=\"no selection\";break;case\"left\":e=\"at start\";break;case\"right\":e=\"at end\";break;case\"group\":break;case\"parent\":e=\"no parent\"}return e}(t)),!1;const s={...this.config};(e.withHighlighting||\"amazon\"===s.speechEngine)&&(s.textToSpeechMarkup=window.sre&&\"sre\"===s.textToSpeechRules?\"ssml_step\":\"ssml\",e.withHighlighting&&(s.generateID=!0));const a=pe.toSpeakableText(i,s);return e.withHighlighting?(window.mathlive.readAloudMathField=this,this._render({forHighlighting:!0}),this.config.handleReadAloud&&this.config.handleReadAloud(this.field,a,this.config)):this.config.handleSpeak&&this.config.handleSpeak(a,s),!1};var qs={MathField:Ls};function Is(t,e,i){let s=i,a=0;const o=t.length;for(;s0&&a.push({type:\"text\",data:n.slice(0,c)}),l=!1);let h=!1;for(;!h;){if(l){if(-1===(r=n.indexOf(e,c))){h=!0;break}c!==r&&a.push({type:\"text\",data:n.slice(c,r)}),c=r}else{if(-1===(r=Is(i,n,c+e.length))){h=!0;break}a.push({type:\"math\",data:n.slice(c+e.length,r),rawData:n.slice(c,r+i.length),mathstyle:s}),c=r+i.length}l=!l}c\"+e.renderToMathML(t,e)+\"\"}catch(e){i.textContent=t}return i.className=\"sr-only\",i}(t,i)),/\\bspeakable-text\\b/i.test(i.renderAccessibleContent)&&i.renderToSpeakableText){const s=document.createElement(\"span\");s.innerHTML=i.renderToSpeakableText(t,i),s.className=\"sr-only\",e.appendChild(s)}return e.appendChild(a),e}return a}function Rs(t,e){let i=null;if(e.TeX.processEnvironments&&/^\\s*\\\\begin/.test(t))(i=document.createDocumentFragment()).appendChild(Os(t,void 0,e,!0));else{const s=Bs(t,e.TeX.delimiters);if(1===s.length&&\"text\"===s[0].type)return null;i=document.createDocumentFragment();for(let t=0;tvoid 0)}})}}else e.speechEngine;else{const e=new SpeechSynthesisUtterance(t);window&&window.speechSynthesis.speak(e)}}function js(t,e,i){if(!window)return;if(!i&&window.mathlive&&(i=window.mathlive.config),\"amazon\"!==(i=i||{}).speechEngine)return void(i.handleSpeak&&i.handleSpeak(e));if(!window.AWS)return;const s=new window.AWS.Polly({apiVersion:\"2016-06-10\"}),a={OutputFormat:\"json\",VoiceId:i.speechEngineVoice||\"Joanna\",Text:e,TextType:\"ssml\",SpeechMarkTypes:[\"ssml\"]};window.mathlive=window.mathlive||{},window.mathlive.readAloudElement=t;const o=i.onReadAloudStatus||window.mathlive.onReadAloudStatus;s.synthesizeSpeech(a,function(t,e){if(t);else if(e&&e.AudioStream){const t=new TextDecoder(\"utf-8\").decode(new Uint8Array(e.AudioStream));window.mathlive.readAloudMarks=t.split(\"\\n\").map(t=>t?JSON.parse(t):{}),window.mathlive.readAloudTokens=[];for(const t of window.mathlive.readAloudMarks)t.value&&window.mathlive.readAloudTokens.push(t.value);window.mathlive.readAloudCurrentMark=\"\",a.OutputFormat=\"mp3\",a.SpeechMarkTypes=[],s.synthesizeSpeech(a,function(t,e){if(t);else if(e&&e.AudioStream){const t=new Uint8Array(e.AudioStream),i=new Blob([t.buffer],{type:\"audio/mpeg\"}),s=URL.createObjectURL(i);window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.pause():(window.mathlive.readAloudAudio=new Audio,window.mathlive.readAloudAudio.addEventListener(\"ended\",()=>{o&&o(window.mathlive.readAloudMathField,\"ended\"),window.mathlive.readAloudMathField?(window.mathlive.readAloudMathField._render(),window.mathlive.readAloudElement=null,window.mathlive.readAloudMathField=null,window.mathlive.readAloudTokens=[],window.mathlive.readAloudMarks=[],window.mathlive.readAloudCurrentMark=\"\"):function t(e){e.classList.remove(\"highlight\"),e.children&&Array.from(e.children).forEach(e=>{t(e)})}(window.mathlive.readAloudElement)}),window.mathlive.readAloudAudio.addEventListener(\"timeupdate\",()=>{let t=\"\";const e=1e3*window.mathlive.readAloudAudio.currentTime+100;for(const i of window.mathlive.readAloudMarks)i.time0&&Array.from(e.children).forEach(e=>{t(e,i)})):(e.classList.add(\"highlight\"),e.children&&e.children.length>0&&Array.from(e.children).forEach(e=>{t(e)}))}(window.mathlive.readAloudElement,window.mathlive.readAloudCurrentMark)))})),window.mathlive.readAloudAudio.src=s,o&&o(window.mathlive.readAloudMathField,\"playing\"),window.mathlive.readAloudAudio.play()}})}})}function Gs(t){let e=t;if(\"string\"==typeof t&&!(e=document.getElementById(t)))throw Error(`The element with ID \"${t}\" could not be found.`);return e}function Zs(t,e){Ns&&((e=e||{}).renderToMarkup=e.renderToMarkup||Ws,e.renderToMathML=e.renderToMathML||Hs,e.renderToSpeakableText=e.renderToSpeakableText||Vs,e.macros=e.macros||It.MACROS,Ns.renderMathInElement(Gs(t),e))}function Xs(t){if(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+=\"-\")}}return{latexToMathlist:$s,latexToMarkup:Ws,latexToMathML:Hs,latexToSpeakableText:Vs,latexToAST:function(t,e){if(!pe.toAST)return{};(e=e||{}).macros=e.macros||{},Object.assign(e.macros,It.MACROS);const i=$s(t,e.macros);return pe.toAST(i,e)},astToLatex:function(t,e){return ks(t,e=e||{})},makeMathField:function(t,e){if(!qs)throw Error(\"The MathField module is not loaded.\");return(e=e||{}).handleSpeak=e.handleSpeak||Us,e.handleReadAloud=e.handleReadAloud||js,new qs.MathField(Gs(t),e)},renderMathInDocument:function(t){Zs(document.body,t)},renderMathInElement:Zs,revertToOriginalContent:function(t,e){(t=(t=Gs(t)).children[1])instanceof qs.MathField?t.revertToOriginalContent():(Xs(e=e||{}),t.innerHTML=t.getAttribute(\"data-\"+(e.namespace||\"\")+\"original-content\"))},getOriginalContent:function(t,e){return(t=(t=Gs(t)).children[1])instanceof qs.MathField?t.originalContent:(Xs(e=e||{}),t.getAttribute(\"data-\"+(e.namespace||\"\")+\"original-content\"))},readAloud:js,readAloudStatus:function(){return window?(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio?window.mathlive.readAloudAudio.paused?\"paused\":window.mathlive.readAloudAudio.ended?\"ready\":\"playing\":\"ready\"):\"unavailable\"},pauseReadAloud:function(){window&&(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio&&(window.mathlive.onReadAloudStatus&&window.mathlive.onReadAloudStatus(window.mathlive.readAloudMathField,\"paused\"),window.mathlive.readAloudAudio.pause()))},resumeReadAloud:function(){window&&(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio&&(window.mathlive.onReadAloudStatus&&window.mathlive.onReadAloudStatus(window.mathlive.readAloudMathField,\"playing\"),window.mathlive.readAloudAudio.play()))},playReadAloud:function(t,e){if(window&&(window.mathlive=window.mathlive||{},window.mathlive.readAloudAudio)){let i=0;if(window.mathlive.readAloudFinalToken=null,t){window.mathlive.readAloudMarks=window.mathlive.readAloudMarks||[];for(const e of window.mathlive.readAloudMarks)e.value===t&&(i=e.time/1e3);let s=window.mathlive.readAloudTokens.indexOf(t);s>=0&&(s+=e)