xmmath 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,22 +1,25 @@
1
- (function(P,$){typeof exports=="object"&&typeof module<"u"?$(exports):typeof define=="function"&&define.amd?define(["exports"],$):(P=typeof globalThis<"u"?globalThis:P||self,$(P.xmmath={}))})(this,function(P){"use strict";function $(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var c={exports:{}};(function(n){function l(){var t=0,r=1,C=2,B=3,a=4,p=5,f=6,h=7,b=8,v=9,i=10,s=11,F=12,u=13,D=14,m=15,O=16,X=17,N=0,o=1,d=2,M0=3,S0=4;function j0(x,g){return 55296<=x.charCodeAt(g)&&x.charCodeAt(g)<=56319&&56320<=x.charCodeAt(g+1)&&x.charCodeAt(g+1)<=57343}function D0(x,g){g===void 0&&(g=0);var q=x.charCodeAt(g);if(55296<=q&&q<=56319&&g<x.length-1){var y=q,k=x.charCodeAt(g+1);return 56320<=k&&k<=57343?(y-55296)*1024+(k-56320)+65536:y}if(56320<=q&&q<=57343&&g>=1){var y=x.charCodeAt(g-1),k=q;return 55296<=y&&y<=56319?(y-55296)*1024+(k-56320)+65536:k}return q}function O0(x,g,q){var y=[x].concat(g).concat([q]),k=y[y.length-2],w=q,A0=y.lastIndexOf(D);if(A0>1&&y.slice(1,A0).every(function(I){return I==B})&&[B,u,X].indexOf(x)==-1)return d;var f0=y.lastIndexOf(a);if(f0>0&&y.slice(1,f0).every(function(I){return I==a})&&[F,a].indexOf(k)==-1)return y.filter(function(I){return I==a}).length%2==1?M0:S0;if(k==t&&w==r)return N;if(k==C||k==t||k==r)return w==D&&g.every(function(I){return I==B})?d:o;if(w==C||w==t||w==r)return o;if(k==f&&(w==f||w==h||w==v||w==i))return N;if((k==v||k==h)&&(w==h||w==b))return N;if((k==i||k==b)&&w==b)return N;if(w==B||w==m)return N;if(w==p)return N;if(k==F)return N;var p0=y.indexOf(B)!=-1?y.lastIndexOf(B)-1:y.length-2;return[u,X].indexOf(y[p0])!=-1&&y.slice(p0+1,-1).every(function(I){return I==B})&&w==D||k==m&&[O,X].indexOf(w)!=-1?N:g.indexOf(a)!=-1?d:k==a&&w==a?N:o}this.nextBreak=function(x,g){if(g===void 0&&(g=0),g<0)return 0;if(g>=x.length-1)return x.length;for(var q=s0(D0(x,g)),y=[],k=g+1;k<x.length;k++)if(!j0(x,k-1)){var w=s0(D0(x,k));if(O0(q,y,w))return k;y.push(w)}return x.length},this.splitGraphemes=function(x){for(var g=[],q=0,y;(y=this.nextBreak(x,q))<x.length;)g.push(x.slice(q,y)),q=y;return q<x.length&&g.push(x.slice(q)),g},this.iterateGraphemes=function(x){var g=0,q={next:function(){var y,k;return(k=this.nextBreak(x,g))<x.length?(y=x.slice(g,k),g=k,{value:y,done:!1}):g<x.length?(y=x.slice(g),g=x.length,{value:y,done:!1}):{value:void 0,done:!0}}.bind(this)};return typeof Symbol<"u"&&Symbol.iterator&&(q[Symbol.iterator]=function(){return q}),q},this.countGraphemes=function(x){for(var g=0,q=0,y;(y=this.nextBreak(x,q))<x.length;)q=y,g++;return q<x.length&&g++,g};function s0(x){return 1536<=x&&x<=1541||x==1757||x==1807||x==2274||x==3406||x==69821||70082<=x&&x<=70083||x==72250||72326<=x&&x<=72329||x==73030?F:x==13?t:x==10?r:0<=x&&x<=9||11<=x&&x<=12||14<=x&&x<=31||127<=x&&x<=159||x==173||x==1564||x==6158||x==8203||8206<=x&&x<=8207||x==8232||x==8233||8234<=x&&x<=8238||8288<=x&&x<=8292||x==8293||8294<=x&&x<=8303||55296<=x&&x<=57343||x==65279||65520<=x&&x<=65528||65529<=x&&x<=65531||113824<=x&&x<=113827||119155<=x&&x<=119162||x==917504||x==917505||917506<=x&&x<=917535||917632<=x&&x<=917759||918e3<=x&&x<=921599?C:768<=x&&x<=879||1155<=x&&x<=1159||1160<=x&&x<=1161||1425<=x&&x<=1469||x==1471||1473<=x&&x<=1474||1476<=x&&x<=1477||x==1479||1552<=x&&x<=1562||1611<=x&&x<=1631||x==1648||1750<=x&&x<=1756||1759<=x&&x<=1764||1767<=x&&x<=1768||1770<=x&&x<=1773||x==1809||1840<=x&&x<=1866||1958<=x&&x<=1968||2027<=x&&x<=2035||2070<=x&&x<=2073||2075<=x&&x<=2083||2085<=x&&x<=2087||2089<=x&&x<=2093||2137<=x&&x<=2139||2260<=x&&x<=2273||2275<=x&&x<=2306||x==2362||x==2364||2369<=x&&x<=2376||x==2381||2385<=x&&x<=2391||2402<=x&&x<=2403||x==2433||x==2492||x==2494||2497<=x&&x<=2500||x==2509||x==2519||2530<=x&&x<=2531||2561<=x&&x<=2562||x==2620||2625<=x&&x<=2626||2631<=x&&x<=2632||2635<=x&&x<=2637||x==2641||2672<=x&&x<=2673||x==2677||2689<=x&&x<=2690||x==2748||2753<=x&&x<=2757||2759<=x&&x<=2760||x==2765||2786<=x&&x<=2787||2810<=x&&x<=2815||x==2817||x==2876||x==2878||x==2879||2881<=x&&x<=2884||x==2893||x==2902||x==2903||2914<=x&&x<=2915||x==2946||x==3006||x==3008||x==3021||x==3031||x==3072||3134<=x&&x<=3136||3142<=x&&x<=3144||3146<=x&&x<=3149||3157<=x&&x<=3158||3170<=x&&x<=3171||x==3201||x==3260||x==3263||x==3266||x==3270||3276<=x&&x<=3277||3285<=x&&x<=3286||3298<=x&&x<=3299||3328<=x&&x<=3329||3387<=x&&x<=3388||x==3390||3393<=x&&x<=3396||x==3405||x==3415||3426<=x&&x<=3427||x==3530||x==3535||3538<=x&&x<=3540||x==3542||x==3551||x==3633||3636<=x&&x<=3642||3655<=x&&x<=3662||x==3761||3764<=x&&x<=3769||3771<=x&&x<=3772||3784<=x&&x<=3789||3864<=x&&x<=3865||x==3893||x==3895||x==3897||3953<=x&&x<=3966||3968<=x&&x<=3972||3974<=x&&x<=3975||3981<=x&&x<=3991||3993<=x&&x<=4028||x==4038||4141<=x&&x<=4144||4146<=x&&x<=4151||4153<=x&&x<=4154||4157<=x&&x<=4158||4184<=x&&x<=4185||4190<=x&&x<=4192||4209<=x&&x<=4212||x==4226||4229<=x&&x<=4230||x==4237||x==4253||4957<=x&&x<=4959||5906<=x&&x<=5908||5938<=x&&x<=5940||5970<=x&&x<=5971||6002<=x&&x<=6003||6068<=x&&x<=6069||6071<=x&&x<=6077||x==6086||6089<=x&&x<=6099||x==6109||6155<=x&&x<=6157||6277<=x&&x<=6278||x==6313||6432<=x&&x<=6434||6439<=x&&x<=6440||x==6450||6457<=x&&x<=6459||6679<=x&&x<=6680||x==6683||x==6742||6744<=x&&x<=6750||x==6752||x==6754||6757<=x&&x<=6764||6771<=x&&x<=6780||x==6783||6832<=x&&x<=6845||x==6846||6912<=x&&x<=6915||x==6964||6966<=x&&x<=6970||x==6972||x==6978||7019<=x&&x<=7027||7040<=x&&x<=7041||7074<=x&&x<=7077||7080<=x&&x<=7081||7083<=x&&x<=7085||x==7142||7144<=x&&x<=7145||x==7149||7151<=x&&x<=7153||7212<=x&&x<=7219||7222<=x&&x<=7223||7376<=x&&x<=7378||7380<=x&&x<=7392||7394<=x&&x<=7400||x==7405||x==7412||7416<=x&&x<=7417||7616<=x&&x<=7673||7675<=x&&x<=7679||x==8204||8400<=x&&x<=8412||8413<=x&&x<=8416||x==8417||8418<=x&&x<=8420||8421<=x&&x<=8432||11503<=x&&x<=11505||x==11647||11744<=x&&x<=11775||12330<=x&&x<=12333||12334<=x&&x<=12335||12441<=x&&x<=12442||x==42607||42608<=x&&x<=42610||42612<=x&&x<=42621||42654<=x&&x<=42655||42736<=x&&x<=42737||x==43010||x==43014||x==43019||43045<=x&&x<=43046||43204<=x&&x<=43205||43232<=x&&x<=43249||43302<=x&&x<=43309||43335<=x&&x<=43345||43392<=x&&x<=43394||x==43443||43446<=x&&x<=43449||x==43452||x==43493||43561<=x&&x<=43566||43569<=x&&x<=43570||43573<=x&&x<=43574||x==43587||x==43596||x==43644||x==43696||43698<=x&&x<=43700||43703<=x&&x<=43704||43710<=x&&x<=43711||x==43713||43756<=x&&x<=43757||x==43766||x==44005||x==44008||x==44013||x==64286||65024<=x&&x<=65039||65056<=x&&x<=65071||65438<=x&&x<=65439||x==66045||x==66272||66422<=x&&x<=66426||68097<=x&&x<=68099||68101<=x&&x<=68102||68108<=x&&x<=68111||68152<=x&&x<=68154||x==68159||68325<=x&&x<=68326||x==69633||69688<=x&&x<=69702||69759<=x&&x<=69761||69811<=x&&x<=69814||69817<=x&&x<=69818||69888<=x&&x<=69890||69927<=x&&x<=69931||69933<=x&&x<=69940||x==70003||70016<=x&&x<=70017||70070<=x&&x<=70078||70090<=x&&x<=70092||70191<=x&&x<=70193||x==70196||70198<=x&&x<=70199||x==70206||x==70367||70371<=x&&x<=70378||70400<=x&&x<=70401||x==70460||x==70462||x==70464||x==70487||70502<=x&&x<=70508||70512<=x&&x<=70516||70712<=x&&x<=70719||70722<=x&&x<=70724||x==70726||x==70832||70835<=x&&x<=70840||x==70842||x==70845||70847<=x&&x<=70848||70850<=x&&x<=70851||x==71087||71090<=x&&x<=71093||71100<=x&&x<=71101||71103<=x&&x<=71104||71132<=x&&x<=71133||71219<=x&&x<=71226||x==71229||71231<=x&&x<=71232||x==71339||x==71341||71344<=x&&x<=71349||x==71351||71453<=x&&x<=71455||71458<=x&&x<=71461||71463<=x&&x<=71467||72193<=x&&x<=72198||72201<=x&&x<=72202||72243<=x&&x<=72248||72251<=x&&x<=72254||x==72263||72273<=x&&x<=72278||72281<=x&&x<=72283||72330<=x&&x<=72342||72344<=x&&x<=72345||72752<=x&&x<=72758||72760<=x&&x<=72765||x==72767||72850<=x&&x<=72871||72874<=x&&x<=72880||72882<=x&&x<=72883||72885<=x&&x<=72886||73009<=x&&x<=73014||x==73018||73020<=x&&x<=73021||73023<=x&&x<=73029||x==73031||92912<=x&&x<=92916||92976<=x&&x<=92982||94095<=x&&x<=94098||113821<=x&&x<=113822||x==119141||119143<=x&&x<=119145||119150<=x&&x<=119154||119163<=x&&x<=119170||119173<=x&&x<=119179||119210<=x&&x<=119213||119362<=x&&x<=119364||121344<=x&&x<=121398||121403<=x&&x<=121452||x==121461||x==121476||121499<=x&&x<=121503||121505<=x&&x<=121519||122880<=x&&x<=122886||122888<=x&&x<=122904||122907<=x&&x<=122913||122915<=x&&x<=122916||122918<=x&&x<=122922||125136<=x&&x<=125142||125252<=x&&x<=125258||917536<=x&&x<=917631||917760<=x&&x<=917999?B:127462<=x&&x<=127487?a:x==2307||x==2363||2366<=x&&x<=2368||2377<=x&&x<=2380||2382<=x&&x<=2383||2434<=x&&x<=2435||2495<=x&&x<=2496||2503<=x&&x<=2504||2507<=x&&x<=2508||x==2563||2622<=x&&x<=2624||x==2691||2750<=x&&x<=2752||x==2761||2763<=x&&x<=2764||2818<=x&&x<=2819||x==2880||2887<=x&&x<=2888||2891<=x&&x<=2892||x==3007||3009<=x&&x<=3010||3014<=x&&x<=3016||3018<=x&&x<=3020||3073<=x&&x<=3075||3137<=x&&x<=3140||3202<=x&&x<=3203||x==3262||3264<=x&&x<=3265||3267<=x&&x<=3268||3271<=x&&x<=3272||3274<=x&&x<=3275||3330<=x&&x<=3331||3391<=x&&x<=3392||3398<=x&&x<=3400||3402<=x&&x<=3404||3458<=x&&x<=3459||3536<=x&&x<=3537||3544<=x&&x<=3550||3570<=x&&x<=3571||x==3635||x==3763||3902<=x&&x<=3903||x==3967||x==4145||4155<=x&&x<=4156||4182<=x&&x<=4183||x==4228||x==6070||6078<=x&&x<=6085||6087<=x&&x<=6088||6435<=x&&x<=6438||6441<=x&&x<=6443||6448<=x&&x<=6449||6451<=x&&x<=6456||6681<=x&&x<=6682||x==6741||x==6743||6765<=x&&x<=6770||x==6916||x==6965||x==6971||6973<=x&&x<=6977||6979<=x&&x<=6980||x==7042||x==7073||7078<=x&&x<=7079||x==7082||x==7143||7146<=x&&x<=7148||x==7150||7154<=x&&x<=7155||7204<=x&&x<=7211||7220<=x&&x<=7221||x==7393||7410<=x&&x<=7411||x==7415||43043<=x&&x<=43044||x==43047||43136<=x&&x<=43137||43188<=x&&x<=43203||43346<=x&&x<=43347||x==43395||43444<=x&&x<=43445||43450<=x&&x<=43451||43453<=x&&x<=43456||43567<=x&&x<=43568||43571<=x&&x<=43572||x==43597||x==43755||43758<=x&&x<=43759||x==43765||44003<=x&&x<=44004||44006<=x&&x<=44007||44009<=x&&x<=44010||x==44012||x==69632||x==69634||x==69762||69808<=x&&x<=69810||69815<=x&&x<=69816||x==69932||x==70018||70067<=x&&x<=70069||70079<=x&&x<=70080||70188<=x&&x<=70190||70194<=x&&x<=70195||x==70197||70368<=x&&x<=70370||70402<=x&&x<=70403||x==70463||70465<=x&&x<=70468||70471<=x&&x<=70472||70475<=x&&x<=70477||70498<=x&&x<=70499||70709<=x&&x<=70711||70720<=x&&x<=70721||x==70725||70833<=x&&x<=70834||x==70841||70843<=x&&x<=70844||x==70846||x==70849||71088<=x&&x<=71089||71096<=x&&x<=71099||x==71102||71216<=x&&x<=71218||71227<=x&&x<=71228||x==71230||x==71340||71342<=x&&x<=71343||x==71350||71456<=x&&x<=71457||x==71462||72199<=x&&x<=72200||x==72249||72279<=x&&x<=72280||x==72343||x==72751||x==72766||x==72873||x==72881||x==72884||94033<=x&&x<=94078||x==119142||x==119149?p:4352<=x&&x<=4447||43360<=x&&x<=43388?f:4448<=x&&x<=4519||55216<=x&&x<=55238?h:4520<=x&&x<=4607||55243<=x&&x<=55291?b:x==44032||x==44060||x==44088||x==44116||x==44144||x==44172||x==44200||x==44228||x==44256||x==44284||x==44312||x==44340||x==44368||x==44396||x==44424||x==44452||x==44480||x==44508||x==44536||x==44564||x==44592||x==44620||x==44648||x==44676||x==44704||x==44732||x==44760||x==44788||x==44816||x==44844||x==44872||x==44900||x==44928||x==44956||x==44984||x==45012||x==45040||x==45068||x==45096||x==45124||x==45152||x==45180||x==45208||x==45236||x==45264||x==45292||x==45320||x==45348||x==45376||x==45404||x==45432||x==45460||x==45488||x==45516||x==45544||x==45572||x==45600||x==45628||x==45656||x==45684||x==45712||x==45740||x==45768||x==45796||x==45824||x==45852||x==45880||x==45908||x==45936||x==45964||x==45992||x==46020||x==46048||x==46076||x==46104||x==46132||x==46160||x==46188||x==46216||x==46244||x==46272||x==46300||x==46328||x==46356||x==46384||x==46412||x==46440||x==46468||x==46496||x==46524||x==46552||x==46580||x==46608||x==46636||x==46664||x==46692||x==46720||x==46748||x==46776||x==46804||x==46832||x==46860||x==46888||x==46916||x==46944||x==46972||x==47e3||x==47028||x==47056||x==47084||x==47112||x==47140||x==47168||x==47196||x==47224||x==47252||x==47280||x==47308||x==47336||x==47364||x==47392||x==47420||x==47448||x==47476||x==47504||x==47532||x==47560||x==47588||x==47616||x==47644||x==47672||x==47700||x==47728||x==47756||x==47784||x==47812||x==47840||x==47868||x==47896||x==47924||x==47952||x==47980||x==48008||x==48036||x==48064||x==48092||x==48120||x==48148||x==48176||x==48204||x==48232||x==48260||x==48288||x==48316||x==48344||x==48372||x==48400||x==48428||x==48456||x==48484||x==48512||x==48540||x==48568||x==48596||x==48624||x==48652||x==48680||x==48708||x==48736||x==48764||x==48792||x==48820||x==48848||x==48876||x==48904||x==48932||x==48960||x==48988||x==49016||x==49044||x==49072||x==49100||x==49128||x==49156||x==49184||x==49212||x==49240||x==49268||x==49296||x==49324||x==49352||x==49380||x==49408||x==49436||x==49464||x==49492||x==49520||x==49548||x==49576||x==49604||x==49632||x==49660||x==49688||x==49716||x==49744||x==49772||x==49800||x==49828||x==49856||x==49884||x==49912||x==49940||x==49968||x==49996||x==50024||x==50052||x==50080||x==50108||x==50136||x==50164||x==50192||x==50220||x==50248||x==50276||x==50304||x==50332||x==50360||x==50388||x==50416||x==50444||x==50472||x==50500||x==50528||x==50556||x==50584||x==50612||x==50640||x==50668||x==50696||x==50724||x==50752||x==50780||x==50808||x==50836||x==50864||x==50892||x==50920||x==50948||x==50976||x==51004||x==51032||x==51060||x==51088||x==51116||x==51144||x==51172||x==51200||x==51228||x==51256||x==51284||x==51312||x==51340||x==51368||x==51396||x==51424||x==51452||x==51480||x==51508||x==51536||x==51564||x==51592||x==51620||x==51648||x==51676||x==51704||x==51732||x==51760||x==51788||x==51816||x==51844||x==51872||x==51900||x==51928||x==51956||x==51984||x==52012||x==52040||x==52068||x==52096||x==52124||x==52152||x==52180||x==52208||x==52236||x==52264||x==52292||x==52320||x==52348||x==52376||x==52404||x==52432||x==52460||x==52488||x==52516||x==52544||x==52572||x==52600||x==52628||x==52656||x==52684||x==52712||x==52740||x==52768||x==52796||x==52824||x==52852||x==52880||x==52908||x==52936||x==52964||x==52992||x==53020||x==53048||x==53076||x==53104||x==53132||x==53160||x==53188||x==53216||x==53244||x==53272||x==53300||x==53328||x==53356||x==53384||x==53412||x==53440||x==53468||x==53496||x==53524||x==53552||x==53580||x==53608||x==53636||x==53664||x==53692||x==53720||x==53748||x==53776||x==53804||x==53832||x==53860||x==53888||x==53916||x==53944||x==53972||x==54e3||x==54028||x==54056||x==54084||x==54112||x==54140||x==54168||x==54196||x==54224||x==54252||x==54280||x==54308||x==54336||x==54364||x==54392||x==54420||x==54448||x==54476||x==54504||x==54532||x==54560||x==54588||x==54616||x==54644||x==54672||x==54700||x==54728||x==54756||x==54784||x==54812||x==54840||x==54868||x==54896||x==54924||x==54952||x==54980||x==55008||x==55036||x==55064||x==55092||x==55120||x==55148||x==55176?v:44033<=x&&x<=44059||44061<=x&&x<=44087||44089<=x&&x<=44115||44117<=x&&x<=44143||44145<=x&&x<=44171||44173<=x&&x<=44199||44201<=x&&x<=44227||44229<=x&&x<=44255||44257<=x&&x<=44283||44285<=x&&x<=44311||44313<=x&&x<=44339||44341<=x&&x<=44367||44369<=x&&x<=44395||44397<=x&&x<=44423||44425<=x&&x<=44451||44453<=x&&x<=44479||44481<=x&&x<=44507||44509<=x&&x<=44535||44537<=x&&x<=44563||44565<=x&&x<=44591||44593<=x&&x<=44619||44621<=x&&x<=44647||44649<=x&&x<=44675||44677<=x&&x<=44703||44705<=x&&x<=44731||44733<=x&&x<=44759||44761<=x&&x<=44787||44789<=x&&x<=44815||44817<=x&&x<=44843||44845<=x&&x<=44871||44873<=x&&x<=44899||44901<=x&&x<=44927||44929<=x&&x<=44955||44957<=x&&x<=44983||44985<=x&&x<=45011||45013<=x&&x<=45039||45041<=x&&x<=45067||45069<=x&&x<=45095||45097<=x&&x<=45123||45125<=x&&x<=45151||45153<=x&&x<=45179||45181<=x&&x<=45207||45209<=x&&x<=45235||45237<=x&&x<=45263||45265<=x&&x<=45291||45293<=x&&x<=45319||45321<=x&&x<=45347||45349<=x&&x<=45375||45377<=x&&x<=45403||45405<=x&&x<=45431||45433<=x&&x<=45459||45461<=x&&x<=45487||45489<=x&&x<=45515||45517<=x&&x<=45543||45545<=x&&x<=45571||45573<=x&&x<=45599||45601<=x&&x<=45627||45629<=x&&x<=45655||45657<=x&&x<=45683||45685<=x&&x<=45711||45713<=x&&x<=45739||45741<=x&&x<=45767||45769<=x&&x<=45795||45797<=x&&x<=45823||45825<=x&&x<=45851||45853<=x&&x<=45879||45881<=x&&x<=45907||45909<=x&&x<=45935||45937<=x&&x<=45963||45965<=x&&x<=45991||45993<=x&&x<=46019||46021<=x&&x<=46047||46049<=x&&x<=46075||46077<=x&&x<=46103||46105<=x&&x<=46131||46133<=x&&x<=46159||46161<=x&&x<=46187||46189<=x&&x<=46215||46217<=x&&x<=46243||46245<=x&&x<=46271||46273<=x&&x<=46299||46301<=x&&x<=46327||46329<=x&&x<=46355||46357<=x&&x<=46383||46385<=x&&x<=46411||46413<=x&&x<=46439||46441<=x&&x<=46467||46469<=x&&x<=46495||46497<=x&&x<=46523||46525<=x&&x<=46551||46553<=x&&x<=46579||46581<=x&&x<=46607||46609<=x&&x<=46635||46637<=x&&x<=46663||46665<=x&&x<=46691||46693<=x&&x<=46719||46721<=x&&x<=46747||46749<=x&&x<=46775||46777<=x&&x<=46803||46805<=x&&x<=46831||46833<=x&&x<=46859||46861<=x&&x<=46887||46889<=x&&x<=46915||46917<=x&&x<=46943||46945<=x&&x<=46971||46973<=x&&x<=46999||47001<=x&&x<=47027||47029<=x&&x<=47055||47057<=x&&x<=47083||47085<=x&&x<=47111||47113<=x&&x<=47139||47141<=x&&x<=47167||47169<=x&&x<=47195||47197<=x&&x<=47223||47225<=x&&x<=47251||47253<=x&&x<=47279||47281<=x&&x<=47307||47309<=x&&x<=47335||47337<=x&&x<=47363||47365<=x&&x<=47391||47393<=x&&x<=47419||47421<=x&&x<=47447||47449<=x&&x<=47475||47477<=x&&x<=47503||47505<=x&&x<=47531||47533<=x&&x<=47559||47561<=x&&x<=47587||47589<=x&&x<=47615||47617<=x&&x<=47643||47645<=x&&x<=47671||47673<=x&&x<=47699||47701<=x&&x<=47727||47729<=x&&x<=47755||47757<=x&&x<=47783||47785<=x&&x<=47811||47813<=x&&x<=47839||47841<=x&&x<=47867||47869<=x&&x<=47895||47897<=x&&x<=47923||47925<=x&&x<=47951||47953<=x&&x<=47979||47981<=x&&x<=48007||48009<=x&&x<=48035||48037<=x&&x<=48063||48065<=x&&x<=48091||48093<=x&&x<=48119||48121<=x&&x<=48147||48149<=x&&x<=48175||48177<=x&&x<=48203||48205<=x&&x<=48231||48233<=x&&x<=48259||48261<=x&&x<=48287||48289<=x&&x<=48315||48317<=x&&x<=48343||48345<=x&&x<=48371||48373<=x&&x<=48399||48401<=x&&x<=48427||48429<=x&&x<=48455||48457<=x&&x<=48483||48485<=x&&x<=48511||48513<=x&&x<=48539||48541<=x&&x<=48567||48569<=x&&x<=48595||48597<=x&&x<=48623||48625<=x&&x<=48651||48653<=x&&x<=48679||48681<=x&&x<=48707||48709<=x&&x<=48735||48737<=x&&x<=48763||48765<=x&&x<=48791||48793<=x&&x<=48819||48821<=x&&x<=48847||48849<=x&&x<=48875||48877<=x&&x<=48903||48905<=x&&x<=48931||48933<=x&&x<=48959||48961<=x&&x<=48987||48989<=x&&x<=49015||49017<=x&&x<=49043||49045<=x&&x<=49071||49073<=x&&x<=49099||49101<=x&&x<=49127||49129<=x&&x<=49155||49157<=x&&x<=49183||49185<=x&&x<=49211||49213<=x&&x<=49239||49241<=x&&x<=49267||49269<=x&&x<=49295||49297<=x&&x<=49323||49325<=x&&x<=49351||49353<=x&&x<=49379||49381<=x&&x<=49407||49409<=x&&x<=49435||49437<=x&&x<=49463||49465<=x&&x<=49491||49493<=x&&x<=49519||49521<=x&&x<=49547||49549<=x&&x<=49575||49577<=x&&x<=49603||49605<=x&&x<=49631||49633<=x&&x<=49659||49661<=x&&x<=49687||49689<=x&&x<=49715||49717<=x&&x<=49743||49745<=x&&x<=49771||49773<=x&&x<=49799||49801<=x&&x<=49827||49829<=x&&x<=49855||49857<=x&&x<=49883||49885<=x&&x<=49911||49913<=x&&x<=49939||49941<=x&&x<=49967||49969<=x&&x<=49995||49997<=x&&x<=50023||50025<=x&&x<=50051||50053<=x&&x<=50079||50081<=x&&x<=50107||50109<=x&&x<=50135||50137<=x&&x<=50163||50165<=x&&x<=50191||50193<=x&&x<=50219||50221<=x&&x<=50247||50249<=x&&x<=50275||50277<=x&&x<=50303||50305<=x&&x<=50331||50333<=x&&x<=50359||50361<=x&&x<=50387||50389<=x&&x<=50415||50417<=x&&x<=50443||50445<=x&&x<=50471||50473<=x&&x<=50499||50501<=x&&x<=50527||50529<=x&&x<=50555||50557<=x&&x<=50583||50585<=x&&x<=50611||50613<=x&&x<=50639||50641<=x&&x<=50667||50669<=x&&x<=50695||50697<=x&&x<=50723||50725<=x&&x<=50751||50753<=x&&x<=50779||50781<=x&&x<=50807||50809<=x&&x<=50835||50837<=x&&x<=50863||50865<=x&&x<=50891||50893<=x&&x<=50919||50921<=x&&x<=50947||50949<=x&&x<=50975||50977<=x&&x<=51003||51005<=x&&x<=51031||51033<=x&&x<=51059||51061<=x&&x<=51087||51089<=x&&x<=51115||51117<=x&&x<=51143||51145<=x&&x<=51171||51173<=x&&x<=51199||51201<=x&&x<=51227||51229<=x&&x<=51255||51257<=x&&x<=51283||51285<=x&&x<=51311||51313<=x&&x<=51339||51341<=x&&x<=51367||51369<=x&&x<=51395||51397<=x&&x<=51423||51425<=x&&x<=51451||51453<=x&&x<=51479||51481<=x&&x<=51507||51509<=x&&x<=51535||51537<=x&&x<=51563||51565<=x&&x<=51591||51593<=x&&x<=51619||51621<=x&&x<=51647||51649<=x&&x<=51675||51677<=x&&x<=51703||51705<=x&&x<=51731||51733<=x&&x<=51759||51761<=x&&x<=51787||51789<=x&&x<=51815||51817<=x&&x<=51843||51845<=x&&x<=51871||51873<=x&&x<=51899||51901<=x&&x<=51927||51929<=x&&x<=51955||51957<=x&&x<=51983||51985<=x&&x<=52011||52013<=x&&x<=52039||52041<=x&&x<=52067||52069<=x&&x<=52095||52097<=x&&x<=52123||52125<=x&&x<=52151||52153<=x&&x<=52179||52181<=x&&x<=52207||52209<=x&&x<=52235||52237<=x&&x<=52263||52265<=x&&x<=52291||52293<=x&&x<=52319||52321<=x&&x<=52347||52349<=x&&x<=52375||52377<=x&&x<=52403||52405<=x&&x<=52431||52433<=x&&x<=52459||52461<=x&&x<=52487||52489<=x&&x<=52515||52517<=x&&x<=52543||52545<=x&&x<=52571||52573<=x&&x<=52599||52601<=x&&x<=52627||52629<=x&&x<=52655||52657<=x&&x<=52683||52685<=x&&x<=52711||52713<=x&&x<=52739||52741<=x&&x<=52767||52769<=x&&x<=52795||52797<=x&&x<=52823||52825<=x&&x<=52851||52853<=x&&x<=52879||52881<=x&&x<=52907||52909<=x&&x<=52935||52937<=x&&x<=52963||52965<=x&&x<=52991||52993<=x&&x<=53019||53021<=x&&x<=53047||53049<=x&&x<=53075||53077<=x&&x<=53103||53105<=x&&x<=53131||53133<=x&&x<=53159||53161<=x&&x<=53187||53189<=x&&x<=53215||53217<=x&&x<=53243||53245<=x&&x<=53271||53273<=x&&x<=53299||53301<=x&&x<=53327||53329<=x&&x<=53355||53357<=x&&x<=53383||53385<=x&&x<=53411||53413<=x&&x<=53439||53441<=x&&x<=53467||53469<=x&&x<=53495||53497<=x&&x<=53523||53525<=x&&x<=53551||53553<=x&&x<=53579||53581<=x&&x<=53607||53609<=x&&x<=53635||53637<=x&&x<=53663||53665<=x&&x<=53691||53693<=x&&x<=53719||53721<=x&&x<=53747||53749<=x&&x<=53775||53777<=x&&x<=53803||53805<=x&&x<=53831||53833<=x&&x<=53859||53861<=x&&x<=53887||53889<=x&&x<=53915||53917<=x&&x<=53943||53945<=x&&x<=53971||53973<=x&&x<=53999||54001<=x&&x<=54027||54029<=x&&x<=54055||54057<=x&&x<=54083||54085<=x&&x<=54111||54113<=x&&x<=54139||54141<=x&&x<=54167||54169<=x&&x<=54195||54197<=x&&x<=54223||54225<=x&&x<=54251||54253<=x&&x<=54279||54281<=x&&x<=54307||54309<=x&&x<=54335||54337<=x&&x<=54363||54365<=x&&x<=54391||54393<=x&&x<=54419||54421<=x&&x<=54447||54449<=x&&x<=54475||54477<=x&&x<=54503||54505<=x&&x<=54531||54533<=x&&x<=54559||54561<=x&&x<=54587||54589<=x&&x<=54615||54617<=x&&x<=54643||54645<=x&&x<=54671||54673<=x&&x<=54699||54701<=x&&x<=54727||54729<=x&&x<=54755||54757<=x&&x<=54783||54785<=x&&x<=54811||54813<=x&&x<=54839||54841<=x&&x<=54867||54869<=x&&x<=54895||54897<=x&&x<=54923||54925<=x&&x<=54951||54953<=x&&x<=54979||54981<=x&&x<=55007||55009<=x&&x<=55035||55037<=x&&x<=55063||55065<=x&&x<=55091||55093<=x&&x<=55119||55121<=x&&x<=55147||55149<=x&&x<=55175||55177<=x&&x<=55203?i:x==9757||x==9977||9994<=x&&x<=9997||x==127877||127938<=x&&x<=127940||x==127943||127946<=x&&x<=127948||128066<=x&&x<=128067||128070<=x&&x<=128080||x==128110||128112<=x&&x<=128120||x==128124||128129<=x&&x<=128131||128133<=x&&x<=128135||x==128170||128372<=x&&x<=128373||x==128378||x==128400||128405<=x&&x<=128406||128581<=x&&x<=128583||128587<=x&&x<=128591||x==128675||128692<=x&&x<=128694||x==128704||x==128716||129304<=x&&x<=129308||129310<=x&&x<=129311||x==129318||129328<=x&&x<=129337||129341<=x&&x<=129342||129489<=x&&x<=129501?u:127995<=x&&x<=127999?D:x==8205?m:x==9792||x==9794||9877<=x&&x<=9878||x==9992||x==10084||x==127752||x==127806||x==127859||x==127891||x==127908||x==127912||x==127979||x==127981||x==128139||128187<=x&&x<=128188||x==128295||x==128300||x==128488||x==128640||x==128658?O:128102<=x&&x<=128105?X:s}return this}n.exports&&(n.exports=l)})(c);var F0=c.exports;const h0=$(F0),b0=`{
1
+ (function(L,F){typeof exports=="object"&&typeof module<"u"?F(exports):typeof define=="function"&&define.amd?define(["exports"],F):(L=typeof globalThis<"u"?globalThis:L||self,F(L.xmmath={}))})(this,function(L){"use strict";const F=`{
2
2
  "wj": "⁠",
3
3
  "zwj": "‍",
4
4
  "zwnj": "‌",
5
5
  "zws": "​",
6
+ "lrm": "\\u200E",
7
+ "rlm": "\\u200F",
6
8
  "space": [
7
9
  " ",
8
10
  {
9
11
  "nobreak": " ",
10
- "en": " ",
11
- "quad": " ",
12
- "third": " ",
13
- "quarter": " ",
14
- "sixth": " ",
15
- "med": " ",
16
- "fig": " ",
17
- "punct": " ",
18
- "thin": " ",
19
- "hair": " "
12
+ "nobreak.narrow": "\\u202F",
13
+ "en": "\\u2002",
14
+ "quad": "\\u2003",
15
+ "third": "\\u2004",
16
+ "quarter": "\\u2005",
17
+ "sixth": "\\u2006",
18
+ "med": "\\u205f",
19
+ "fig": "\\u2007",
20
+ "punct": "\\u2008",
21
+ "thin": "\\u2009",
22
+ "hair": "\\u200a"
20
23
  }
21
24
  ],
22
25
  "paren": [{ "l": "(", "r": ")", "t": "⏜", "b": "⏝" }],
@@ -49,12 +52,21 @@
49
52
  ],
50
53
  "amp": ["&", { "inv": "⅋" }],
51
54
  "ast": [
52
- { "op": "∗", "basic": "*", "low": "⁎", "double": "⁑", "triple": "⁂", "small": "﹡", "circle": "⊛", "sq": "⧆" }
55
+ {
56
+ "op": "∗",
57
+ "basic": "*",
58
+ "low": "⁎",
59
+ "double": "⁑",
60
+ "triple": "⁂",
61
+ "small": "﹡",
62
+ "circle": "⊛",
63
+ "square": "⧆"
64
+ }
53
65
  ],
54
66
  "at": "@",
55
67
  "backslash": ["\\\\\\\\", { "circle": "⦸", "not": "⧷" }],
56
68
  "co": "℅",
57
- "colon": [":", { "eq": "≔", "double.eq": "⩴" }],
69
+ "colon": [":", { "double": "∷", "eq": "≔", "double.eq": "⩴" }],
58
70
  "comma": ",",
59
71
  "dagger": ["†", { "double": "‡" }],
60
72
  "dash": [{ "en": "–", "em": "—", "fig": "‒", "wave": "〜", "colon": "∹", "circle": "⊝", "wave.double": "〰" }],
@@ -88,15 +100,16 @@
88
100
  {
89
101
  "op": "∼",
90
102
  "basic": "~",
103
+ "dot": "⩪",
91
104
  "eq": "≃",
92
105
  "eq.not": "≄",
93
106
  "eq.rev": "⋍",
94
- "eqq": "≅",
95
- "eqq.not": "≇",
96
- "neqq": "≆",
107
+ "equiv": "≅",
108
+ "equiv.not": "≇",
109
+ "nequiv": "≆",
97
110
  "not": "≁",
98
111
  "rev": "∽",
99
- "rev.eqq": "≌",
112
+ "rev.equiv": "≌",
100
113
  "triple": "≋"
101
114
  }
102
115
  ],
@@ -175,23 +188,38 @@
175
188
  "prec": "⋞",
176
189
  "quest": "≟",
177
190
  "small": "﹦",
178
- "succ": "⋟"
191
+ "succ": "⋟",
192
+ "triple": "≡",
193
+ "quad": "≣"
179
194
  }
180
195
  ],
181
196
  "gt": [
182
197
  ">",
183
198
  {
184
199
  "circle": "⧁",
200
+ "curly": "≻",
201
+ "curly.approx": "⪸",
202
+ "curly.double": "⪼",
203
+ "curly.eq": "≽",
204
+ "curly.eq.not": "⋡",
205
+ "curly.equiv": "⪴",
206
+ "curly.napprox": "⪺",
207
+ "curly.nequiv": "⪶",
208
+ "curly.not": "⊁",
209
+ "curly.ntilde": "⋩",
210
+ "curly.tilde": "≿",
185
211
  "dot": "⋗",
212
+ "approx": "⪆",
186
213
  "double": "≫",
187
214
  "eq": "≥",
188
215
  "eq.slant": "⩾",
189
216
  "eq.lt": "⋛",
190
217
  "eq.not": "≱",
191
- "eqq": "≧",
218
+ "equiv": "≧",
192
219
  "lt": "≷",
193
220
  "lt.not": "≹",
194
- "neqq": "≩",
221
+ "napprox": "⪊",
222
+ "nequiv": "≩",
195
223
  "not": "≯",
196
224
  "ntilde": "⋧",
197
225
  "small": "﹥",
@@ -209,16 +237,29 @@
209
237
  "<",
210
238
  {
211
239
  "circle": "⧀",
240
+ "curly": "≺",
241
+ "curly.approx": "⪷",
242
+ "curly.double": "⪻",
243
+ "curly.eq": "≼",
244
+ "curly.eq.not": "⋠",
245
+ "curly.equiv": "⪳",
246
+ "curly.napprox": "⪹",
247
+ "curly.nequiv": "⪵",
248
+ "curly.not": "⊀",
249
+ "curly.ntilde": "⋨",
250
+ "curly.tilde": "≾",
212
251
  "dot": "⋖",
252
+ "approx": "⪅",
213
253
  "double": "≪",
214
254
  "eq": "≤",
215
255
  "eq.slant": "⩽",
216
256
  "eq.gt": "⋚",
217
257
  "eq.not": "≰",
218
- "eqq": "≦",
258
+ "equiv": "≦",
219
259
  "gt": "≶",
220
260
  "gt.not": "≸",
221
- "neqq": "≨",
261
+ "napprox": "⪉",
262
+ "nequiv": "≨",
222
263
  "not": "≮",
223
264
  "ntilde": "⋦",
224
265
  "small": "﹤",
@@ -240,9 +281,9 @@
240
281
  "double": "⪻",
241
282
  "eq": "≼",
242
283
  "eq.not": "⋠",
243
- "eqq": "⪳",
284
+ "equiv": "⪳",
244
285
  "napprox": "⪹",
245
- "neqq": "⪵",
286
+ "nequiv": "⪵",
246
287
  "not": "⊀",
247
288
  "ntilde": "⋨",
248
289
  "tilde": "≾"
@@ -255,16 +296,17 @@
255
296
  "double": "⪼",
256
297
  "eq": "≽",
257
298
  "eq.not": "⋡",
258
- "eqq": "⪴",
299
+ "equiv": "⪴",
259
300
  "napprox": "⪺",
260
- "neqq": "⪶",
301
+ "nequiv": "⪶",
261
302
  "not": "⊁",
262
303
  "ntilde": "⋩",
263
304
  "tilde": "≿"
264
305
  }
265
306
  ],
266
- "ident": ["≡", { "not": "≢", "strict": "≣" }],
307
+ "equiv": ["≡", { "not": "≢" }],
267
308
  "prop": "∝",
309
+ "emptyset": ["∅", { "rev": "⦰" }],
268
310
  "nothing": ["∅", { "rev": "⦰" }],
269
311
  "without": "∖",
270
312
  "complement": "∁",
@@ -320,6 +362,8 @@
320
362
  "infinity": "∞",
321
363
  "oo": "∞",
322
364
  "diff": "∂",
365
+ "partial": "∂",
366
+ "gradient": "∇",
323
367
  "nabla": "∇",
324
368
  "sum": ["∑", { "integral": "⨋" }],
325
369
  "product": ["∏", { "co": "∐" }],
@@ -332,10 +376,13 @@
332
376
  "cont.ccw": "∳",
333
377
  "cont.cw": "∲",
334
378
  "cw": "∱",
379
+ "dash": "⨍",
380
+ "dash.double": "⨎",
335
381
  "double": "∬",
336
382
  "quad": "⨌",
337
383
  "sect": "⨙",
338
- "sq": "⨖",
384
+ "slash": "⨏",
385
+ "square": "⨖",
339
386
  "surf": "∯",
340
387
  "times": "⨘",
341
388
  "triple": "∭",
@@ -353,6 +400,7 @@
353
400
  "or": ["∨", { "big": "⋁", "curly": "⋎", "dot": "⟇", "double": "⩔" }],
354
401
  "xor": ["⊕", { "big": "⨁" }],
355
402
  "models": "⊧",
403
+ "forces": ["⊩", { "not": "⊮" }],
356
404
  "therefore": "∴",
357
405
  "because": "∵",
358
406
  "qed": "∎",
@@ -360,9 +408,9 @@
360
408
  "convolve": "∗",
361
409
  "multimap": "⊸",
362
410
  "divides": ["∣", { "not": "∤" }],
363
- "perp": ["⟂", { "circle": "⦹" }],
364
411
  "wreath": "≀",
365
412
  "parallel": ["∥", { "circle": "⦷", "not": "∦" }],
413
+ "perp": ["⟂", { "circle": "⦹" }],
366
414
  "diameter": "⌀",
367
415
  "join": ["⨝", { "r": "⟖", "l": "⟕", "l.r": "⟗" }],
368
416
  "degree": ["°", { "c": "℃", "f": "℉" }],
@@ -473,7 +521,7 @@
473
521
  "filled.medium": "⬧"
474
522
  }
475
523
  ],
476
- "star": [{ "op": "⋆", "stroked": "★", "filled": "★" }],
524
+ "star": [{ "op": "⋆", "stroked": "☆", "filled": "★" }],
477
525
  "arrow": [
478
526
  {
479
527
  "r": "→",
@@ -498,6 +546,7 @@
498
546
  "r.stop": "⇥",
499
547
  "r.stroked": "⇨",
500
548
  "r.tail": "↣",
549
+ "r.tilde": "⥲",
501
550
  "r.triple": "⇛",
502
551
  "r.twohead.bar": "⤅",
503
552
  "r.twohead": "↠",
@@ -524,6 +573,7 @@
524
573
  "l.stop": "⇤",
525
574
  "l.stroked": "⇦",
526
575
  "l.tail": "↢",
576
+ "l.tilde": "⭉",
527
577
  "l.triple": "⇚",
528
578
  "l.twohead.bar": "⬶",
529
579
  "l.twohead": "↞",
@@ -734,9 +784,14 @@
734
784
  "Upsilon": "Υ",
735
785
  "Xi": "Ξ",
736
786
  "Zeta": "Ζ",
787
+ "aleph": "א",
737
788
  "alef": "א",
789
+ "beth": "ב",
738
790
  "bet": "ב",
791
+ "gimmel": "ג",
739
792
  "gimel": "ג",
793
+ "daleth": "ד",
794
+ "dalet": "ד",
740
795
  "shin": "ש",
741
796
  "AA": "𝔸",
742
797
  "BB": "𝔹",
@@ -772,5 +827,5 @@
772
827
  "Im": "ℑ",
773
828
  "dotless": [{ "i": "𝚤", "j": "𝚥" }]
774
829
  }
775
- `;function A(n,l,t){let r=document.createElementNS("http://www.w3.org/1998/Math/MathML",n);if(l&&(r.textContent=l),t)for(let C in t)r.setAttribute(C,t[C]);return r}const Z="mathvariant";var E0=new h0;function m0(n){let l=/[a-zA-Z]/,t=/[\(\)]/,r=/[ \t\n\r]+/,C="",B=[],a=[],p=B,f="";n=n.replace(/(\\u\{[\dA-Fa-f]+\})/g,v=>{const i=parseInt(v.slice(3,-1),16);return String.fromCodePoint(i)});let h=[];for(let v=0;v<n.length;v++){const i=n[v];if(i=='"'&&n[v-1]!="\\"){C!="str"?C="str":C="";continue}C!="str"&&(i=="("&&h.push(v),i==")"&&(h.length==0||n[v-1]!="\\"&&h.pop()))}let b=e.emoji?E0.splitGraphemes(n):[...n];for(let v=0;v<b.length;v++){const i=b[v];if(i=='"'&&b[v-1]!="\\"){C!="str"?C="str":(p.push({type:C,value:f}),C="",f="");continue}if(C=="str"){f+=i;continue}if(i.match(r)&&(C="blank"),C=="blank"&&!i.match(r)&&(p.push({type:C,value:""}),C=""),C==""&&(!b[v-1]||!b[v-1].match(l))&&(!b[v+1]||!b[v+1].match(l))&&!i.match(t)){p.push({type:"v",value:i});continue}if(C==""&&!i.match(l)&&!i.match(t)){p.push({type:"v",value:i});continue}if((b[v-1]&&b[v-1].match(l)||b[v+1]&&b[v+1].match(l))&&i.match(l)&&(C="f"),C=="f"&&(f+=i),C=="f"&&(!b[v+1]||!b[v+1].match(l))&&(p.push({type:C,value:f}),C="",f=""),i=="(")if(h.includes(v)||b[v-1]=="\\")p.push({type:"v",value:i});else{a.push({tree:p,close:!1}),p.push({type:"group",value:f,children:[]}),p=p.at(-1).children,f="";continue}if(i==")")if(a.at(-1)){if(a.at(-1).close==!1){a.at(-1).close=!0,p=a.at(-1).tree,a.pop();continue}}else p.push({type:"v",value:i})}return B}let K=JSON.parse(b0),_={};for(let n in K)if(typeof K[n]=="string")_[n]=K[n];else for(let l of K[n])if(typeof l=="string")_[n]=l;else{_[n]||(_[n]=l[Object.keys(l)[0]]);for(let t in l){_[`${n}.${t}`]=l[t];let r=t.split(".");for(let C=1;C<r.length;C++){let B=r.slice(0,C).join(".");l[B]||(_[`${n}.${B}`]=l[t])}}}let V={"->":"arrow.r","|->":"arrow.r.bar","=>":"arrow.r.double","|=>":"arrow.r.double.bar","==>":"arrow.r.double.long","-->":"arrow.r.long","~~>":"arrow.r.long.squiggly","~>":"arrow.r.squiggly",">->":"arrow.r.tail","->>":"arrow.r.twohead","<-":"arrow.l","<==":"arrow.l.double.long","<--":"arrow.l.long","<~~":"arrow.l.long.squiggly","<~":"arrow.l.squiggly","<-<":"arrow.l.tail","<<-":"arrow.l.twohead","<->":"arrow.l.r","<=>":"arrow.l.r.double","<==>":"arrow.l.r.double.long","<-->":"arrow.l.r.long","*":"convolve","||":"bar.v.double","[|":"bracket.l.double","|]":"bracket.r.double",":=":"colon.eq","::=":"colon.double.eq","--":"dash.en","---":"dash.em","...":"dots.h","=:":"eq.colon","!=":"eq.not",">>":"gt.double",">=":"gt.eq",">>>":"gt.triple","-?":"hyph.soft","<<":"lt.double","<=":"lt.eq","<<<":"lt.triple","-":"minus","'":"prime","~":"space.nobreak"},Q=0;for(let n in V)n.length>Q&&(Q=n.length);let S={accent:(n,l)=>{let t=A("mrow");t.append(E(n[0]));let r=A("mrow");r.append(E(n[1]));let C=A("mover");return C.setAttribute("accent","true"),C.append(t,r),C},attach:(n,l)=>{let t=A("mrow");t.append(E(n[0]));let r,C=A("mrow");l.tl&&C.append(E(l.tl));let B=A("mrow");l.bl&&B.append(E(l.bl));let a=A("mrow");l.tr&&a.append(E(l.tr));let p=A("mrow");if(l.br&&p.append(E(l.br)),(l.tl||l.bl||l.tr||l.br)&&(l.tl||l.bl?(r=A("mmultiscripts"),r.append(t,p,a,A("mprescripts"),B,C)):l.tr&&l.br?(r=A("msubsup"),r.append(t,p,a)):l.tr?(r=A("msup"),r.append(t,a)):(r=A("msub"),r.append(t,p))),l.t||l.b){let f=A("munderover");r?f.append(r):f.append(t);let h=A("mrow");l.t&&h.append(E(l.t));let b=A("mrow");l.b&&b.append(E(l.b)),f.append(b,h),r=f}return r},scripts:(n,l)=>E(n[0]),limits:(n,l)=>E(n[0]),binom:(n,l)=>{let t=A("mrow"),r=A("mrow");r.append(E(n[0]));let C=A("mrow");C.append(E(n[1]));let B=A("mfrac",null,{linethickness:"0"});B.append(r,C);let a=A("mo","("),p=A("mo",")");return t.append(a,B,p),t},cancel:(n,l)=>{let t=A("mrow");const r=B=>`linear-gradient(to ${B?"left":"right"} top, transparent 47.75%, currentColor 49.5%, currentColor 50.5%, transparent 52.25%)`;let C="";return B0(l.cross)?C=r(!0)+","+r(!1):B0(l.inverted)?C=r(!1):C=r(!0),t.style.backgroundImage=C,t.append(E(n[0])),t},cases:(n,l)=>{var B,a;let t=A("mrow"),r=A("mo",((a=(B=l==null?void 0:l.delim)==null?void 0:B[0])==null?void 0:a.value)||"{"),C=S.x_table(n,{cases:[]});return t.append(r,C),t},frac:(n,l)=>{console.log(n);let t=A("mrow");t.append(E(n[0]));let r=A("mrow");r.append(E(n[1]));let C=A("mfrac");return C.append(t,r),C},lr:(n,l)=>{let t=n[0],r,C;for(let h=0;h<t.length;h++){const b=t[h];if(b.type!="blank"){r={c:[b],n:h};break}}for(let h=t.length-1;h>=0;h--){const b=t[h];if(b.type!="blank"){C={c:[b],n:h};break}}let B=document.createDocumentFragment();B.append(E(r.c));let a=document.createDocumentFragment();a.append(E(C.c));let p=document.createDocumentFragment();p.append(E(t.slice(r.n+1,C.n)));let f=A("mrow");return f.append(B,p,a),f},mat:(n,l,t)=>{var h,b;let r=((b=(h=l==null?void 0:l.delim)==null?void 0:h[0])==null?void 0:b.value)||"(",C={"(":["(",")"],"[":["[","]"],"{":["{","}"],"|":["|","|"],"||":["‖","‖"]},B=A("mrow"),a=A("mo",C[r][0]),p=A("mo",C[r][1]),f=A("mtable");for(let v of t){let i=A("mtr");for(let s of v){let F=A("mtd");F.append(E(s)),i.append(F)}f.append(i)}return B.append(a,f,p),B},root:(n,l)=>{let t=A("mrow");t.append(E(n[0]));let r=A("mrow");r.append(E(n[1]));let C=A("mroot");return C.append(r,t),C},sqrt:(n,l)=>S.root([[],n[0]],null),display:(n,l)=>{let t=A("mrow",null,{displaystyle:"true"});return t.append(E(n[0])),t},inline:(n,l)=>{let t=A("mrow",null,{displaystyle:"false",scriptlevel:"0"});return t.append(E(n[0])),t},script:(n,l)=>{let t=A("mrow",null,{displaystyle:"false",scriptlevel:"1"});return t.append(E(n[0])),t},sscript:(n,l)=>{let t=A("mrow",null,{displaystyle:"false",scriptlevel:"2"});return t.append(E(n[0])),t},upright:(n,l)=>{let t=A("mrow");return t.append(E(n[0])),t.querySelectorAll("mi").forEach(r=>{r.getAttribute(Z)||r.setAttribute(Z,"normal")}),t.querySelectorAll("ms").forEach(r=>{r.getAttribute(Z)||r.setAttribute(Z,"normal")}),t},italic:(n,l)=>{let t=A("mrow");return t.querySelectorAll("mi").forEach(r=>{r.getAttribute(Z)||r.setAttribute(Z,"italic")}),t.querySelectorAll("ms").forEach(r=>{r.getAttribute(Z)||r.setAttribute(Z,"italic")}),t.append(E(n[0])),t},bold:(n,l)=>{let t=A("mrow");return t.style.fontWeight="bold",t.append(E(n[0])),t},op:(n,l,t,r)=>{let C=A("mrow"),B=A("ms",Y(n[0][0].value,r));return C.append(B),C},underline:(n,l)=>R("under",n[0],"_",n==null?void 0:n[1]),overline:(n,l)=>R("over",n[0],"‾",n==null?void 0:n[1]),underbrace:(n,l)=>R("under",n[0],"⏟",n==null?void 0:n[1]),overbrace:(n,l)=>R("over",n[0],"⏞",n==null?void 0:n[1]),underbracket:(n,l)=>R("under",n[0],"⎵",n==null?void 0:n[1]),overbracket:(n,l)=>R("over",n[0],"⎴",n==null?void 0:n[1]),serif:(n,l)=>E(n[0],"serif"),sans:(n,l)=>E(n[0],"sans"),frak:(n,l)=>E(n[0],"frak"),mono:(n,l)=>E(n[0],"mono"),bb:(n,l)=>E(n[0],"bb"),cal:(n,l)=>E(n[0],"cal"),vec:(n,l)=>{var f,h;let t=((h=(f=l==null?void 0:l.delim)==null?void 0:f[0])==null?void 0:h.value)||"(",r={"(":["(",")"],"[":["[","]"],"{":["{","}"],"|":["|","|"],"||":["‖","‖"]},C=A("mrow"),B=A("mo",r[t][0]),a=A("mo",r[t][1]),p=A("mtable");for(let b of n){let v=A("mtr");v.append(E(b)),p.append(v)}return C.append(B,p,a),C},x_table:(n,l)=>{let t=0,r=A("mtable");for(let B of n){let a=A("mtr"),p=[],f=[];for(let h=0;h<B.length;h++)!B[h].esc&&B[h].value=="&"?f.length>0&&(p.push(f),f=[]):f.push(B[h]);f.length>0&&p.push(f),p.length>t&&(t=p.length);for(let h of p){let b=A("mtd");a.append(b),b.append(E(h))}r.append(a)}let C=[];if(l.cases)C.push("left");else for(let B=0;B<t;B++)B%2==0?C.push("right"):C.push("left");return r.setAttribute("columnalign",C.join(" ")),r}},x0=[{id:"arccos"},{id:"arcsin"},{id:"arctan"},{id:"arg"},{id:"cos"},{id:"cosh"},{id:"cot"},{id:"ctg"},{id:"coth"},{id:"csc"},{id:"deg"},{id:"det",limits:!0},{id:"dim"},{id:"exp"},{id:"gcd",limits:!0},{id:"hom"},{id:"mod"},{id:"inf",limits:!0},{id:"ker"},{id:"lg"},{id:"lim",limits:!0},{id:"ln"},{id:"log"},{id:"max",limits:!0},{id:"min",limits:!0},{id:"Pr",limits:!0},{id:"sec"},{id:"sin"},{id:"sinc"},{id:"sinh"},{id:"sup",limits:!0},{id:"tan"},{id:"tg"},{id:"tanh"},{id:"liminf",str:"lim inf",limits:!0},{id:"limsup",str:"lim sup",limits:!0}];function v0(){for(let n of x0)S[n.id]=(l,t,r,C)=>{let B=S.op([[{type:"str",value:n.str||n.id}]],{},null,C);if(l){let a=document.createDocumentFragment();return a.append(B,t0(l[0])),a}else return B}}v0();let n0=[],l0=["∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨃","⨄","⨅","⨆"];for(let n in _)for(let l of l0)_[n]==l&&n0.push(n);function g0(){const n=["grave","acute","acute.double","hat","tilde","macron","breve","dot","dot.double","dot.triple","dot.quad","diaer","circle","arrow","arrow.l"];for(let l of n)S[l]=t=>S.accent([t[0],[{type:"f",value:l}]],{})}g0();function y0(){let n=[{name:"abs",l:j("|"),r:j("|")},{name:"norm",l:j("‖"),r:j("‖")},{name:"floor",l:j("⌊"),r:j("⌋")},{name:"ceil",l:j("⌈"),r:j("⌉")},{name:"round",l:j("⌊"),r:j("⌉")}];for(let l of n)S[l.name]=t=>S.lr([[l.l,...t[0],l.r]],{})}y0();function R(n,l,t,r){let C=n=="under"?A("munder",null,{accentunder:"true"}):A("mover",null,{accent:"true"}),B=A("mrow");if(B.append(E(l)),r){let a=A("mrow");a.append(E(r));let p=n=="under"?A("munder"):A("mover"),f=A("mo",t);p.append(f,a),C.append(B,p)}else{let a=A("mo",t);C.append(B,a)}return C}function t0(n){let l=A("mrow"),t=A("mo");t.textContent="(";let r=E(n),C=A("mo");return C.textContent=")",l.append(t,r,C),l}function M(n){return n.type=="group"?n.children:[n]}function k0(n){return[{type:"group",value:"",children:n}]}function z(n){return n&&n.type=="v"&&n.value=="^"&&!n.esc}function L(n){return n&&n.type=="v"&&n.value=="_"&&!n.esc}function G(n){return n&&n.type=="v"&&n.value=="/"&&!n.esc}function r0(n){return n&&n.value=="br"&&n.esc}function J(n){if(n.length==1){let l=n[0];if(l.type=="f"){if(n0.includes(l.value))return!0;for(let t of x0)if(t.limits&&l.value==t.id)return!0;if(l.value=="scripts")return!1;if(l.value=="op"){let{dic:t}=a0(l),r="";if(t.limits)for(let C of t.limits)r+=C.value;return r=="#true"}}if(l.type=="v"&&l0.includes(l.value))return!0}else return!1}function H(n,l){return n.value==l&&n.type=="v"&&!n.esc}function W(n){return n&&n.type=="v"&&n.value=="."}function C0(n){return n&&(n.type=="f"||n.type=="v"&&n.value.match(/[a-z]/))}function q0(n){return n&&n.type=="v"&&n.value=="!"&&!n.esc}let T={type:"v",value:","};function j(n){return{type:"v",value:n}}function U(n){let l=[];for(let t in n){l.push({type:"f",value:t}),l.push({type:"v",value:":"});for(let r of n[t])r.type=="v"&&r.value==","&&(r.esc=!0);l.push(...n[t]),Number(t)+1!=Object.keys(n).length&&l.push(T)}return l}function B0(n){let l=0;return!!(n&&(n[0].type=="blank"&&l++,n[l]&&n[l].type=="v"&&n[l].value=="#"&&n[l+1]&&n[l+1].type=="f"&&n[l+1].value=="true"))}function i0(n){var l,t,r,C,B,a,p,f,h,b,v;{let i=[],s=/[0-9]/,F="";for(let u=0;u<n.length;u++){let D=n[u];D.value.match(s)||(l=n[u-1])!=null&&l.value.match(s)&&W(D)&&((t=n[u+1])!=null&&t.value.match(s))?F+=D.value:i.push(D),D.value.match(s)&&(!n[u+1]||!n[u+1].value.match(s))&&!(W(n[u+1])&&((r=n[u+2])!=null&&r.value.match(s)))&&(i.push({type:"v",value:F}),F="")}n=i}{let i=[];for(let s=0;s<n.length;s++){let F=n[s];if(((C=n==null?void 0:n[s-1])==null?void 0:C.value)!="\\")if(F.type=="v"){let u=s,D=F.value,m=[];for(V[D]&&m.push(D);((B=n==null?void 0:n[u+1])==null?void 0:B.type)=="v"&&D.length<=Q;)D+=n[u+1].value,V[D]&&m.push(D),u++;if(m.length){let O={type:"f",value:V[m.at(-1)]};i.push(O),s+=m.at(-1).length-1}else i.push(F)}else i.push(F);else i.push(F)}n=i}{let i=[];for(let s=0;s<n.length;s++){let F=n[s];if(F.value=="\\"&&F.type=="v"){if(n!=null&&n[s+1]){let u=n[s+1];if(u.value=="\\"&&u.type=="v")i.push({type:"v",value:"\\"}),s++;else if(u.type=="blank")i.push({type:"v",value:"br",esc:!0}),s++;else if(u.type=="f"){let D=u.value;i.push({type:"v",value:D[0]}),i.push({type:D.length==2?"v":"f",value:D.slice(1)}),s++}else{let D=u;D.esc=!0,i.push(D),s++}}}else i.push(F)}n=i}{let i=[];for(let s=0;s<n.length;s++){let F=n[s];F.type=="v"&&((a=n==null?void 0:n[s+1])==null?void 0:a.type)=="blank"&&((p=n==null?void 0:n[s+2])==null?void 0:p.type)=="str"?(i.push(F),i.push({type:"f",value:"space"})):F.type=="str"&&((f=n==null?void 0:n[s+1])==null?void 0:f.type)=="blank"&&((h=n==null?void 0:n[s+2])==null?void 0:h.type)=="v"?(i.push(F),i.push({type:"f",value:"space"})):i.push(F)}n=i}{let i=[],s=[];for(let F=0;F<n.length;F++){let u=n[F];q0(n==null?void 0:n[F+1])&&!z(u)&&!L(u)&&!G(u)?s.push(u):s.length?(s.push(u),i.push({type:"group1",value:"",children:s}),s=[]):i.push(u)}n=i}{let i=[],s="";for(let F=0;F<n.length;F++){let u=n[F];if(C0(u)&&W(n[F+1]))if(s||!s&&u.type=="f"){s+=u.value+".",F++;continue}else i.push(u);else s&&C0(u)?(s+=u.value,W(n[F+1])||(i.push({type:"f",value:s}),s="")):i.push(u)}n=i}{let i=[];for(let s=0;s<n.length;s++){let F=n[s];if(F.type=="f"&&n[s+1]&&n[s+1].type=="group"){F.children=n[s+1].children;for(let u in F.children)F.children[u].value=="\\"&&F.children[u].type=="v"&&F.children[Number(u)+1]&&(F.children[Number(u)+1].esc=!0);i.push(F),s++;continue}else i.push(F)}n=i}{let i=[];for(let s of n)s.type!="blank"&&i.push(s);n=i}{let i=[],s=NaN;for(let u=0;u<n.length;u++){const D=n[u];!z(D)&&!L(D)&&((z(n[u+1])||L(n[u+1]))&&!(z(n[u-1])||L(n[u-1]))&&(s||(s=u)),(z(n[u-1])||L(n[u-1]))&&!(z(n[u+1])||L(n[u+1]))&&(i.push([s,u]),s=NaN))}let F=[];for(let u=0;u<n.length;u++){if(u==((b=i==null?void 0:i[0])==null?void 0:b[0])){{let D=n[i[0][1]];for(let m=i[0][1];m>=i[0][0];m--){if(z(n[m-1])&&L(n[m-3])){let O=J([n[m-4]])?{t:M(D),b:M(n[m-2])}:{tr:M(D),br:M(n[m-2])};D={type:"f",value:"attach",children:[n[m-4],T,...U(O)]},m-=4-1;continue}if(L(n[m-1])&&z(n[m-3])){let O=J([n[m-4]])?{t:M(n[m-2]),b:M(D)}:{tr:M(n[m-2]),br:M(D)};D={type:"f",value:"attach",children:[n[m-4],T,...U(O)]},m-=4-1;continue}if(z(n[m-1])){let O=J([n[m-2]])?{t:M(D)}:{tr:M(D)};D={type:"f",value:"attach",children:[n[m-2],T,...U(O)]},m-=2-1;continue}if(L(n[m-1])){let O=J([n[m-2]])?{b:M(D)}:{br:M(D)};D={type:"f",value:"attach",children:[n[m-2],T,...U(O)]},m-=2-1;continue}}F.push(D)}u+=i[0][1]-i[0][0],i=i.slice(1);continue}F.push(n[u])}n=F}{let i=[],s=NaN;for(let u=0;u<n.length;u++){const D=n[u];G(D)||(G(n[u+1])&&!G(n[u-1])&&(s||(s=u)),G(n[u-1])&&!G(n[u+1])&&(i.push([s,u]),s=NaN))}let F=[];for(let u=0;u<n.length;u++){if(u==((v=i==null?void 0:i[0])==null?void 0:v[0])){{let D=n[i[0][0]];for(let m=i[0][0];m<=i[0][1];m++)if(G(n[m+1])){D={type:"f",value:"frac",children:[...M(D),T,...M(n[m+2])]},m+=2-1;continue}console.log(1,D),F.push(D)}u+=i[0][1]-i[0][0],i.splice(0,1);continue}F.push(n[u])}n=F}return n}function a0(n){let l="array",t=[],r=[],C=[],B=[];for(let p in n.children){const f=n.children[p];if(Number(p)+1==n.children.length){if(f.type=="blank"&&n.children[Number(p)-1].value.match(/[,;]/))break;!H(f,",")&&!H(f,";")&&B.push(f),l=="dic"?(r.push(B),B=[]):t.push(B),C.length&&(C.push(t),t=[]),B=[]}else H(f,",")?(l=="dic"?(r.push(B),l="array"):t.push(B),B=[]):H(f,";")?(t.push(B),B=[],C.push(t),t=[]):(B.push(f),H(f,":")&&(l="dic"))}let a={};for(let p of r){let f="",h=[];for(let b of p)f?b.value!=":"&&h.push(b):f=b.value;a[f]=h}return{attr:t,dic:a,array:C}}function Y(n,l="serif"){function t(r){return"abcdefghijklmnopqrstuvwxyz".indexOf(r.toLowerCase())}switch(l){case"serif":return n;case"sans":const r=[..."𝟢𝟣𝟤𝟥𝟦𝟧𝟨𝟩𝟪𝟫"],C=[..."𝖺𝖻𝖼𝖽𝖾𝖿𝗀𝗁𝗂𝗃𝗄𝗅𝗆𝗇𝗈𝗉𝗊𝗋𝗌𝗍𝗎𝗏𝗐𝗑𝗒𝗓"],B=[..."𝖠𝖡𝖢𝖣𝖤𝖥𝖦𝖧𝖨𝖩𝖪𝖫𝖬𝖭𝖮𝖯𝖰𝖱𝖲𝖳𝖴𝖵𝖶𝖷𝖸𝖹"];return n=n.replace(/[0-9]+/g,D=>r[D]),n=n.replace(/[a-z]/g,D=>C[t(D)]),n=n.replace(/[A-Z]/g,D=>B[t(D)]),n;case"frak":const a=[..."𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷"],p=[..."𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ"];return n=n.replace(/[a-z]/g,D=>a[t(D)]),n=n.replace(/[A-Z]/g,D=>p[t(D)]),n;case"mono":const f=[..."0𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿"],h=[..."𝚊𝚋𝚌𝚍𝚎𝚏𝚐𝚑𝚒𝚓𝚔𝚕𝚖𝚗𝚘𝚙𝚚𝚛𝚜𝚝𝚞𝚟𝚠𝚡𝚢𝚣"],b=[..."𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉"];return n=n.replace(/[0-9]+/g,D=>f[D]),n=n.replace(/[a-z]/g,D=>h[t(D)]),n=n.replace(/[A-Z]/g,D=>b[t(D)]),n;case"bb":const v=[..."𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡"],i=[..."𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫"],s=[..."𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ"];return n=n.replace(/[0-9]+/g,D=>v[D]),n=n.replace(/[a-z]/g,D=>i[t(D)]),n=n.replace(/[A-Z]/g,D=>s[t(D)]),n;case"cal":const F=[..."𝒶𝒷𝒸𝒹ℯ𝒻ℊ𝒽𝒾𝒿𝓀𝓁𝓂𝓃ℴ𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏"],u=[..."𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵"];return n=n.replace(/[a-z]/g,D=>F[t(D)]),n=n.replace(/[A-Z]/g,D=>u[t(D)]),n}}function E(n,l){let t=document.createDocumentFragment();n=i0(n);{let r=!1,C=B=>{for(let a of B){if(r0(a)){r=!0;return}a.type=="group"&&C(a.children)}};if(C(n),r){{let a=[];for(let p in n){let f=n[p];f.type=="group"?(a.push(j("(")),a.push(...i0(f.children)),a.push(j(")"))):a.push(f)}n=a}for(let a=0;a<n.length;a++){const p=n[a];r0(p)&&(n[a]=T)}let B=[];B.push({type:"f",value:"x_table",children:n}),n=B}else{let B=[];for(let a of n)a.type=="v"&&a.value=="&"&&!a.esc||B.push(a);n=B}}{let r=[];for(let C of n)C.type=="group1"?r.push(...C.children):r.push(C);n=r}for(let r in n){let C=Number(r),B=n[C];if(B.type=="f"&&B.children){let{attr:a,dic:p,array:f}=a0(B);if(S[B.value]){console.log(a,p,f);let h=S[B.value](a,p,f,l);t.append(h)}else if(_[B.value]){let h=A("mo",_[B.value]);t.append(h,E(k0(B.children)))}}if(B.type=="f"&&!B.children){if(_[B.value]){let a,p=null;const f={" ":"0.36em"," ":"0.5em"," ":"3.75em"," ":"0.333em"," ":"0.25em"," ":"0.166em"," ":"0.222em"," ":"1ch"," ":"0.27em"," ":"0.2em"," ":"0.09em"};_[B.value].match(/[a-zA-Z\u0391-\u03C9]/)?a="mi":f[_[B.value]]?(a="mspace",p={width:f[_[B.value]]}):a="mo";let h=A(a,_[B.value],p);t.append(h)}else if(S[B.value]){let a=S[B.value](null,null,null,l);t.append(a)}}if(B.type=="str"){let a=A("ms",Y(B.value,l));t.append(a)}if(B.type=="v"){let a;B.value.match(/[0-9.]+/)?a="mn":B.value.match(/[a-zA-Z\u0391-\u03C9]/)?a="mi":a="mo";let p=A(a,Y(B.value,l));t.append(p)}B.type=="group"&&t.append(t0(B.children))}return t}var e={emoji:!1};function w0(n){for(let l in n)e[l]&&(e[l]=n[l])}function u0(n){let l=m0(n);console.log(l);let t=A("math");t.setAttribute("display","block");let r=E(l);return t.append(r),t}function _0(n){return u0(n).outerHTML}P.init=w0,P.toMML=u0,P.toMMLHTML=_0,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
830
+ `;function d(n,e,l){let r=document.createElementNS("http://www.w3.org/1998/Math/MathML",n);if(e&&(r.textContent=e),l)for(let t in l)r.setAttribute(t,l[t]);return r}const P="mathvariant",dn=Intl.Segmenter,cn=new dn("emoji",{granularity:"grapheme"});function fn(n){let e=/[a-zA-Z]/,l=/[\(\)]/,r=/[ \t\n\r]+/,t="",o=[],s=[],f=o,c="";n=n.replace(/(\\u\{[\dA-Fa-f]+\})/g,v=>{const b=parseInt(v.slice(3,-1),16);return String.fromCodePoint(b)});let m=[];for(let v=0;v<n.length;v++){const b=n[v];if(b=='"'&&n[v-1]!="\\"){t!="str"?t="str":t="";continue}t!="str"&&(b=="("&&m.push(v),b==")"&&(m.length==0||n[v-1]!="\\"&&m.pop()))}let y=D.emoji?typeof D.emoji=="boolean"?Array.from(cn.segment(n)).map(v=>v.segment):D.emoji(n):[...n];for(let v=0;v<y.length;v++){const b=y[v];if(b=='"'&&y[v-1]!="\\"){t!="str"?t="str":(f.push({type:t,value:c}),t="",c="");continue}if(t=="str"){c+=b;continue}if(b.match(r)&&(t="blank"),t=="blank"&&!b.match(r)&&(f.push({type:t,value:""}),t=""),b==="#"){f.push({type:"sharp",value:b});continue}if(t==""&&(!y[v-1]||!y[v-1].match(e))&&(!y[v+1]||!y[v+1].match(e))&&!b.match(l)){f.push({type:"v",value:b});continue}if(t==""&&!b.match(e)&&!b.match(l)){f.push({type:"v",value:b});continue}if((y[v-1]&&y[v-1].match(e)||y[v+1]&&y[v+1].match(e))&&b.match(e)&&(t="f"),t=="f"&&(c+=b),t=="f"&&(!y[v+1]||!y[v+1].match(e))&&(f.push({type:t,value:c}),t="",c=""),b=="(")if(m.includes(v)||y[v-1]=="\\")f.push({type:"v",value:b});else{s.push({tree:f,close:!1}),f.push({type:"group",value:c,children:[]}),f=f.at(-1).children,c="";continue}if(b==")")if(s.at(-1)){if(s.at(-1).close==!1){s.at(-1).close=!0,f=s.at(-1).tree,s.pop();continue}}else f.push({type:"v",value:b})}return o}let H=JSON.parse(F),k={};for(let n in H)if(typeof H[n]=="string")k[n]=H[n];else for(let e of H[n])if(typeof e=="string")k[n]=e;else{k[n]||(k[n]=e[Object.keys(e)[0]]);for(let l in e){k[`${n}.${l}`]=e[l];let r=l.split(".");for(let t=1;t<r.length;t++){let o=r.slice(0,t).join(".");e[o]||(k[`${n}.${o}`]=e[l])}}}let K={"->":"arrow.r","|->":"arrow.r.bar","=>":"arrow.r.double","|=>":"arrow.r.double.bar","==>":"arrow.r.double.long","-->":"arrow.r.long","~~>":"arrow.r.long.squiggly","~>":"arrow.r.squiggly",">->":"arrow.r.tail","->>":"arrow.r.twohead","<-":"arrow.l","<==":"arrow.l.double.long","<--":"arrow.l.long","<~~":"arrow.l.long.squiggly","<~":"arrow.l.squiggly","<-<":"arrow.l.tail","<<-":"arrow.l.twohead","<->":"arrow.l.r","<=>":"arrow.l.r.double","<==>":"arrow.l.r.double.long","<-->":"arrow.l.r.long","*":"convolve","||":"bar.v.double","[|":"bracket.l.double","|]":"bracket.r.double",":=":"colon.eq","::=":"colon.double.eq","--":"dash.en","---":"dash.em","...":"dots.h","=:":"eq.colon","!=":"eq.not",">>":"gt.double",">=":"gt.eq",">>>":"gt.triple","-?":"hyph.soft","<<":"lt.double","<=":"lt.eq","<<<":"lt.triple","-":"minus","'":"prime","~":"space.nobreak"},U=0;for(let n in K)n.length>U&&(U=n.length);const V={"(":["(",")"],"[":["[","]"],"{":["{","}"],"|":["|","|"],"||":["‖","‖"]};let A={accent:(n,e)=>{let l=d("mrow");l.append(g(n[0]));let r=d("mrow");r.append(g(n[1]));let t=d("mover");return t.setAttribute("accent","true"),t.append(l,r),t},attach:(n,e)=>{let l=d("mrow");l.append(g(n[0]));let r,t=d("mrow");e.tl&&t.append(g(e.tl));let o=d("mrow");e.bl&&o.append(g(e.bl));let s=d("mrow");e.tr&&s.append(g(e.tr));let f=d("mrow");if(e.br&&f.append(g(e.br)),(e.tl||e.bl||e.tr||e.br)&&(e.tl||e.bl?(r=d("mmultiscripts"),r.append(l,f,s,d("mprescripts"),o,t)):e.tr&&e.br?(r=d("msubsup"),r.append(l,f,s)):e.tr?(r=d("msup"),r.append(l,s)):(r=d("msub"),r.append(l,f))),e.t||e.b){let c=d("munderover");r?c.append(r):c.append(l);let m=d("mrow");e.t&&m.append(g(e.t));let y=d("mrow");e.b&&y.append(g(e.b)),c.append(y,m),r=c}return r},scripts:(n,e)=>g(n[0]),limits:(n,e)=>g(n[0]),binom:(n,e)=>{let l=d("mrow"),r=d("mrow");r.append(g(n[0]));let t=d("mrow");const o=[];for(let m of n.slice(1))o.push(...m,z);t.append(g(o.slice(0,-1)));let s=d("mfrac",null,{linethickness:"0"});s.append(r,t);let f=d("mo","("),c=d("mo",")");return l.append(f,s,c),l},cancel:(n,e)=>{let l=d("mrow");const r=o=>`linear-gradient(to ${o?"left":"right"} top, transparent 47.75%, currentColor 49.5%, currentColor 50.5%, transparent 52.25%)`;let t="";return J(e.cross)?t=r(!0)+","+r(!1):J(e.inverted)?t=r(!1):t=r(!0),l.style.backgroundImage=t,l.append(g(n[0])),l},cases:(n,e)=>{var s,f,c,m;let l=d("mrow");const r=((f=(s=e==null?void 0:e.delim)==null?void 0:s[0])==null?void 0:f.value)||"{";let t=A.x_table(n,{cases:[]});const o=((m=(c=e==null?void 0:e.gap)==null?void 0:c[0])==null?void 0:m.value)||"0.5em";if(t.setAttribute("rowspacing",o),J(e==null?void 0:e.reverse)){const y=d("mo",V[r][1]);l.append(t,y)}else{const y=d("mo",r);l.append(y,t)}return l},frac:(n,e)=>{console.log(n);let l=d("mrow");l.append(g(n[0]));let r=d("mrow");r.append(g(n[1]));let t=d("mfrac");return t.append(l,r),t},lr:(n,e)=>{var y,v;let l=n[0],r,t;for(let b=0;b<l.length;b++){const q=l[b];if(q.type!="blank"){r={c:[q],n:b};break}}for(let b=l.length-1;b>=0;b--){const q=l[b];if(q.type!="blank"){t={c:[q],n:b};break}}const o=(v=(y=e==null?void 0:e.size)==null?void 0:y[0])==null?void 0:v.value,s=g(r.c),f=g(t.c);if(o&&o!="auto"){const b=s.querySelector("mo"),q=f.querySelector("mo");b.setAttribute("maxsize",o),b.setAttribute("minsize",o),q.setAttribute("maxsize",o),q.setAttribute("minsize",o)}const c=g(l.slice(r.n+1,t.n)),m=d("mrow");return m.append(s,c,f),m},mid:(n,e)=>{var r,t;return d("mo",(t=(r=n==null?void 0:n[0])==null?void 0:r[0])==null?void 0:t.value,{stretchy:"true"})},mat:(n,e,l)=>{var q,p,u,i,a,h,w,N,pn;let r=((p=(q=e==null?void 0:e.delim)==null?void 0:q[0])==null?void 0:p.value)||"(",t={"(":["(",")"],"[":["[","]"],"{":["{","}"],"|":["|","|"],"||":["‖","‖"]},o=d("mrow"),s=d("mo",t[r][0]),f=d("mo",t[r][1]),c=d("mtable"),m=yn((u=e==null?void 0:e.augment)==null?void 0:u[0].children);if(m){let O=NaN,Z=NaN;if(Array.isArray(m)?O=Number(m.map(M=>M.value).join("")):Z=Number(m.hline.map(M=>M.value).join("")),O<0&&(O=l[0].length+O),Z<0&&(Z=l.length+Z),Z){let M=[];for(let j=1;j<l.length;j++)M.push(j===Z);c.setAttribute("rowlines",M.map(j=>j?"solid":"none").join(" "))}if(O){let M=[];for(let j=1;j<l[0].length;j++)M.push(j===O);c.setAttribute("columnlines",M.map(j=>j?"solid":"none").join(" "))}}const y=(a=(i=e==null?void 0:e.gap)==null?void 0:i[0])==null?void 0:a.value,v=(w=(h=e==null?void 0:e["row-gap"])==null?void 0:h[0])==null?void 0:w.value,b=(pn=(N=e==null?void 0:e["column-gap"])==null?void 0:N[0])==null?void 0:pn.value;c.setAttribute("columnspacing",b||y||"0.5em"),c.setAttribute("rowspacing",v||y||"0.5em");for(let O of l){let Z=d("mtr");if(O.length){for(let M of O){let j=d("mtd");j.append(g(M)),Z.append(j)}c.append(Z)}}return o.append(s,c,f),o},root:(n,e)=>{let l=d("mrow");l.append(g(n[0]));let r=d("mrow");r.append(g(n[1]));let t=d("mroot");return t.append(r,l),t},sqrt:(n,e)=>A.root([[],n[0]],null),display:(n,e)=>{let l=d("mrow",null,{displaystyle:"true"});return l.append(g(n[0])),l},inline:(n,e)=>{let l=d("mrow",null,{displaystyle:"false",scriptlevel:"0"});return l.append(g(n[0])),l},script:(n,e)=>{let l=d("mrow",null,{displaystyle:"false",scriptlevel:"1"});return l.append(g(n[0])),l},sscript:(n,e)=>{let l=d("mrow",null,{displaystyle:"false",scriptlevel:"2"});return l.append(g(n[0])),l},upright:(n,e)=>{let l=d("mrow");return l.append(g(n[0])),l.querySelectorAll("mi").forEach(r=>{r.getAttribute(P)||r.setAttribute(P,"normal")}),l.querySelectorAll("ms").forEach(r=>{r.getAttribute(P)||r.setAttribute(P,"normal")}),l},italic:(n,e)=>{let l=d("mrow");return l.querySelectorAll("mi").forEach(r=>{r.getAttribute(P)||r.setAttribute(P,"italic")}),l.querySelectorAll("ms").forEach(r=>{r.getAttribute(P)||r.setAttribute(P,"italic")}),l.append(g(n[0])),l},bold:(n,e)=>{let l=d("mrow");return l.style.fontWeight="bold",l.append(g(n[0])),l},op:(n,e,l,r)=>{let t=d("mrow"),o=d("ms");return o.append(g(n[0],r)),t.append(o),t},underline:(n,e)=>$("under",n[0],"_",n==null?void 0:n[1]),overline:(n,e)=>$("over",n[0],"‾",n==null?void 0:n[1]),underbrace:(n,e)=>$("under",n[0],"⏟",n==null?void 0:n[1]),overbrace:(n,e)=>$("over",n[0],"⏞",n==null?void 0:n[1]),underbracket:(n,e)=>$("under",n[0],"⎵",n==null?void 0:n[1]),overbracket:(n,e)=>$("over",n[0],"⎴",n==null?void 0:n[1]),serif:(n,e)=>g(n[0],"serif"),sans:(n,e)=>g(n[0],"sans"),frak:(n,e)=>g(n[0],"frak"),mono:(n,e)=>g(n[0],"mono"),bb:(n,e)=>g(n[0],"bb"),cal:(n,e)=>g(n[0],"cal"),vec:(n,e)=>{var m,y,v,b;let l=((y=(m=e==null?void 0:e.delim)==null?void 0:m[0])==null?void 0:y.value)||"(",r=V,t=d("mrow"),o=d("mo",r[l][0]),s=d("mo",r[l][1]),f=d("mtable");const c=((b=(v=e==null?void 0:e.gap)==null?void 0:v[0])==null?void 0:b.value)||"0.5em";f.setAttribute("rowspacing",c);for(let q of n){let p=d("mtr");p.append(g(q)),f.append(p)}return t.append(o,f,s),t},h:(n,e)=>d("mspace","",{width:n[0][0].value}),x_table:(n,e)=>{let l=0,r=d("mtable");for(let o of n){let s=d("mtr"),f=[],c=[];for(let m=0;m<o.length;m++)!o[m].esc&&o[m].value=="&"?c.length>0&&(f.push(c),c=[]):c.push(o[m]);c.length>0&&f.push(c),f.length>l&&(l=f.length);for(let m of f){let y=d("mtd");s.append(y),y.append(g(m))}r.append(s)}let t=[];if(e.cases)t.push("left");else for(let o=0;o<l;o++)o%2==0?t.push("right"):t.push("left");return r.setAttribute("columnalign",t.join(" ")),r}},Y=[{id:"arccos"},{id:"arcsin"},{id:"arctan"},{id:"arg"},{id:"cos"},{id:"cosh"},{id:"cot"},{id:"ctg"},{id:"coth"},{id:"csc"},{id:"csch"},{id:"deg"},{id:"det",limits:!0},{id:"dim"},{id:"exp"},{id:"gcd",limits:!0},{id:"hom"},{id:"mod"},{id:"id"},{id:"im"},{id:"inf",limits:!0},{id:"ker"},{id:"lg"},{id:"lim",limits:!0},{id:"ln"},{id:"log"},{id:"max",limits:!0},{id:"min",limits:!0},{id:"Pr",limits:!0},{id:"sec"},{id:"sech"},{id:"sin"},{id:"sinc"},{id:"sinh"},{id:"sup",limits:!0},{id:"tan"},{id:"tg"},{id:"tr"},{id:"tanh"},{id:"liminf",str:"lim inf",limits:!0},{id:"limsup",str:"lim sup",limits:!0}];function hn(){for(let n of Y)A[n.id]=(e,l,r,t)=>{let o=A.op([[{type:"str",value:n.str||n.id}]],{},null,t);if(e){let s=document.createDocumentFragment();return s.append(o,tn(e[0])),s}else return o}}hn();const nn={quad:"1em",med:"0.222em",thin:"0.17em",thick:"0.28em",wide:"2em"};for(let n in nn)A[n]=()=>A.h([[{type:"str",value:nn[n]}]]);let en=[],ln=["∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨃","⨄","⨅","⨆"];for(let n in k)for(let e of ln)k[n]==e&&en.push(n);function bn(){const n=["grave","acute","acute.double","hat","tilde","macron","breve","dot","dot.double","dot.triple","dot.quad","diaer","circle","arrow","arrow.r","arrow.l","arrow.l.r","caron","harpoon","harpoon.rt","harpoon.lt"];for(let e of n)A[e]=l=>A.accent([l[0],[{type:"f",value:e}]],{})}bn();function mn(){let n=[{name:"abs",l:x("|"),r:x("|")},{name:"norm",l:x("‖"),r:x("‖")},{name:"floor",l:x("⌊"),r:x("⌋")},{name:"ceil",l:x("⌈"),r:x("⌉")},{name:"round",l:x("⌊"),r:x("⌉")}];for(let e of n)A[e.name]=(l,r)=>A.lr([[e.l,...l[0],e.r]],r)}mn();function $(n,e,l,r){let t=n=="under"?d("munder",null,{accentunder:"true"}):d("mover",null,{accent:"true"}),o=d("mrow");if(o.append(g(e)),r){let s=d("mrow");s.append(g(r));let f=n=="under"?d("munder"):d("mover"),c=d("mo",l);f.append(c,s),t.append(o,f)}else{let s=d("mo",l);t.append(o,s)}return t}function tn(n){let e=d("mrow"),l=d("mo");l.textContent="(";let r=g(n),t=d("mo");return t.textContent=")",e.append(l,r,t),e}function _(n){return n.type=="group"?n.children:[n]}function vn(n){return[{type:"group",value:"",children:n}]}function S(n){return E(n,{type:"v",value:"^"})}function C(n){return E(n,{type:"v",value:"_"})}function T(n){return E(n,{type:"v",value:"/"})}function rn(n){return n&&n.value=="br"&&n.esc}function R(n){if(n.length==1){let e=n[0];if(e.type=="f"){if(en.includes(e.value)||e.value.split(".").at(0)==="arrow")return!0;for(let l of Y)if(l.limits&&e.value==l.id)return!0;if(e.value=="scripts")return!1;if(e.value=="op"){let{dic:l}=un(e);return J(l.limits)}}if(e.type=="v"&&ln.includes(e.value))return!0}else return!1}function I(n,e){return n.value==e&&n.type=="v"&&!n.esc}function B(n){return W(n,{type:"v",value:"."})}function on(n){return n&&(n.type=="f"||n.type=="v"&&n.value.match(/[a-z]/))}function gn(n){return n&&n.type=="v"&&n.value=="!"&&!n.esc}let z={type:"v",value:","};function x(n){return{type:"v",value:n}}function W(n,e){return!n||!e?!1:n.type===e.type&&n.value===e.value}function E(n,e){return!n||!e?!1:n.type===e.type&&n.value===e.value&&(n==null?void 0:n.esc)===(e==null?void 0:e.esc)}function X(n){if(!n)return[];for(;n.length>0&&n[0].type==="blank";)n.shift();for(;n.length>0&&n.at(-1).type==="blank";)n.pop();return n}function G(n){let e=[];for(let l in n){e.push({type:"f",value:l}),e.push({type:"v",value:":"});for(let r of n[l])W(r,z)&&(r.esc=!0);e.push(...n[l]),Number(l)+1!=Object.keys(n).length&&e.push(z)}return e}function yn(n){if(n=X(n),!n.find(t=>E(t,x(":"))))return n;const e=new Object;let l="",r=[];n.push(z);for(let t=0;t<n.length;t++)!l&&n[t].type!="blank"?l=n[t].value:r.length?E(n[t],z)?(e[l]=X(r),l="",r=[]):r.push(n[t]):E(n[t],x(":"))&&r.push(n[t+1]);return e}function J(n){var e;return E((e=X(n))==null?void 0:e[0],{type:"sharp",value:"true"})}function Q(n){var e,l,r,t,o,s,f,c,m,y,v,b,q;{let p=[],u=/[0-9]/,i="";for(let a=0;a<n.length;a++){let h=n[a];h.value.match(u)||(e=n[a-1])!=null&&e.value.match(u)&&B(h)&&((l=n[a+1])!=null&&l.value.match(u))?i+=h.value:p.push(h),h.value.match(u)&&(!n[a+1]||!n[a+1].value.match(u))&&!(B(n[a+1])&&((r=n[a+2])!=null&&r.value.match(u)))&&(p.push({type:"v",value:i}),i="")}n=p}{let p=[];for(let u=0;u<n.length;u++){let i=n[u];if(i.value=="\\"&&i.type=="v"){if(n!=null&&n[u+1]){let a=n[u+1];if(a.value=="\\"&&a.type=="v")p.push({type:"v",value:"\\"}),u++;else if(a.type=="blank")p.push({type:"v",value:"br",esc:!0}),u++;else if(a.type=="f"){let h=a.value;p.push({type:"v",value:h[0]}),p.push({type:h.length==2?"v":"f",value:h.slice(1)}),u++}else if(a.type==="sharp")p.push({type:"v",value:"#"}),u++;else{let h=a;h.esc=!0,p.push(h),u++}}}else p.push(i)}n=p}{const p=[];for(let u=0;u<n.length;u++){const i=n[u];if(i.type==="sharp"){if(((t=n[u+1])==null?void 0:t.type)==="group"){i.children=n[u+1].children;for(let h in i.children)i.children[h].value==="\\"&&i.children[h].type==="v"&&i.children[Number(h)+1]&&(i.children[Number(h)+1].esc=!0);const a=i.children.map(h=>h.value).join("");a.match(/^[0-9\+\-\*\/()]+$/),i.value=a}else i.value=(o=n[u+1])==null?void 0:o.value,((s=n[u+2])==null?void 0:s.type)==="f"&&(i.value+=n[u+2].value,u++);p.push(i),u++;continue}else p.push(i)}n=p}{let p=[];for(let u=0;u<n.length;u++){let i=n[u];if(i.esc)p.push(i);else if(i.type=="v"){let a=u,h=i.value,w=[];for(K[h]&&w.push(h);((f=n==null?void 0:n[a+1])==null?void 0:f.type)=="v"&&h.length<=U;)h+=n[a+1].value,K[h]&&w.push(h),a++;if(w.length){let N={type:"f",value:K[w.at(-1)]};p.push(N),u+=w.at(-1).length-1}else p.push(i)}else p.push(i)}n=p}{let p=[];for(let u=0;u<n.length;u++){let i=n[u];i.type=="v"&&((c=n==null?void 0:n[u+1])==null?void 0:c.type)=="blank"&&((m=n==null?void 0:n[u+2])==null?void 0:m.type)=="str"?(p.push(i),p.push({type:"f",value:"space"})):i.type=="str"&&((y=n==null?void 0:n[u+1])==null?void 0:y.type)=="blank"&&((v=n==null?void 0:n[u+2])==null?void 0:v.type)=="v"?(p.push(i),p.push({type:"f",value:"space"})):p.push(i)}n=p}{let p=[],u=[];for(let i=0;i<n.length;i++){let a=n[i];gn(n==null?void 0:n[i+1])&&!S(a)&&!C(a)&&!T(a)?u.push(a):u.length?(u.push(a),p.push({type:"group1",value:"",children:u}),u=[]):p.push(a)}n=p}{let p=[],u="";for(let i=0;i<n.length;i++){let a=n[i];if(on(a)&&B(n[i+1]))if(u||!u&&a.type=="f"){u+=a.value+".",i++;continue}else p.push(a);else u&&on(a)?(u+=a.value,B(n[i+1])||(p.push({type:"f",value:u}),u="")):p.push(a)}n=p}{let p=[];for(let u=0;u<n.length;u++){let i=n[u];if(i.type=="f"&&n[u+1]&&n[u+1].type=="group"){i.children=n[u+1].children;for(let a in i.children)i.children[a].value=="\\"&&i.children[a].type=="v"&&i.children[Number(a)+1]&&(i.children[Number(a)+1].esc=!0);p.push(i),u++;continue}else p.push(i)}n=p}{let p=[];for(let u=0;u<n.length;u++){let i=n[u],a=u;if(E(i,{type:"f",value:"prime"})){for(;n[a]&&E(n[a],{type:"f",value:"prime"});)a++;const h=a-u;n[u-1]&&!S(n[u-1])&&!C(n[u-1])&&!W(n[u-1],{type:"f",value:"prime"})&&n[u-1].type!="blank"&&p.push({type:"v",value:"^"}),p.push({type:"v",value:"'".repeat(h),children:[{type:"v",value:String(h)}]}),u+=h-1;continue}p.push(i)}n=p}{let p=[];for(let u of n)u.type!="blank"&&p.push(u);n=p}{let p=[],u=NaN;for(let a=0;a<n.length;a++){const h=n[a];!S(h)&&!C(h)&&((S(n[a+1])||C(n[a+1]))&&!(S(n[a-1])||C(n[a-1]))&&(u||(u=a)),(S(n[a-1])||C(n[a-1]))&&!(S(n[a+1])||C(n[a+1]))&&(p.push([u,a]),u=NaN))}let i=[];for(let a=0;a<n.length;a++){if(a==((b=p==null?void 0:p[0])==null?void 0:b[0])){{let h=n[p[0][1]];for(let w=p[0][1];w>=p[0][0];w--){if(S(n[w-1])&&C(n[w-3])){let N=R([n[w-4]])?{t:_(h),b:_(n[w-2])}:{tr:_(h),br:_(n[w-2])};h={type:"f",value:"attach",children:[n[w-4],z,...G(N)]},w-=4-1;continue}if(C(n[w-1])&&S(n[w-3])){let N=R([n[w-4]])?{t:_(n[w-2]),b:_(h)}:{tr:_(n[w-2]),br:_(h)};h={type:"f",value:"attach",children:[n[w-4],z,...G(N)]},w-=4-1;continue}if(S(n[w-1])){let N=R([n[w-2]])?{t:_(h)}:{tr:_(h)};h={type:"f",value:"attach",children:[n[w-2],z,...G(N)]},w-=2-1;continue}if(C(n[w-1])){let N=R([n[w-2]])?{b:_(h)}:{br:_(h)};h={type:"f",value:"attach",children:[n[w-2],z,...G(N)]},w-=2-1;continue}}i.push(h)}a+=p[0][1]-p[0][0],p=p.slice(1);continue}i.push(n[a])}n=i}{let p=[],u=NaN;for(let a=0;a<n.length;a++){const h=n[a];T(h)||(T(n[a+1])&&!T(n[a-1])&&(u||(u=a)),T(n[a-1])&&!T(n[a+1])&&(p.push([u,a]),u=NaN))}let i=[];for(let a=0;a<n.length;a++){if(a==((q=p==null?void 0:p[0])==null?void 0:q[0])){{let h=n[p[0][0]];for(let w=p[0][0];w<=p[0][1];w++)if(T(n[w+1])){h={type:"f",value:"frac",children:[..._(h),z,..._(n[w+2])]},w+=2-1;continue}console.log(1,h),i.push(h)}a+=p[0][1]-p[0][0],p.splice(0,1);continue}i.push(n[a])}n=i}return n}function un(n){let e="array",l=[],r=[],t=[],o=[];for(let f in n.children){const c=n.children[f];if(Number(f)+1==n.children.length){if(c.type=="blank"&&n.children[Number(f)-1].value.match(/[,;]/))break;!I(c,",")&&!I(c,";")&&o.push(c),e=="dic"?(r.push(o),o=[]):l.push(o),t.length&&(t.push(l),l=[]),o=[]}else I(c,",")?(e=="dic"?(r.push(o),e="array"):l.push(o),o=[]):I(c,";")?(l.push(o),o=[],t.push(l),l=[]):(o.push(c),I(c,":")&&(e="dic"))}let s={};for(let f of r){let c=!1,m="",y=[];for(let v of f){if(v.value===":"){c=!0;continue}c?y.push(v):m+=v.value}s[m]=Q(y)}return{attr:l,dic:s,array:t}}function an(n,e="serif"){function l(r){return"abcdefghijklmnopqrstuvwxyz".indexOf(r.toLowerCase())}switch(e){case"serif":return n;case"sans":const r=[..."𝟢𝟣𝟤𝟥𝟦𝟧𝟨𝟩𝟪𝟫"],t=[..."𝖺𝖻𝖼𝖽𝖾𝖿𝗀𝗁𝗂𝗃𝗄𝗅𝗆𝗇𝗈𝗉𝗊𝗋𝗌𝗍𝗎𝗏𝗐𝗑𝗒𝗓"],o=[..."𝖠𝖡𝖢𝖣𝖤𝖥𝖦𝖧𝖨𝖩𝖪𝖫𝖬𝖭𝖮𝖯𝖰𝖱𝖲𝖳𝖴𝖵𝖶𝖷𝖸𝖹"];return n=n.replace(/[0-9]+/g,i=>r[i]),n=n.replace(/[a-z]/g,i=>t[l(i)]),n=n.replace(/[A-Z]/g,i=>o[l(i)]),n;case"frak":const s=[..."𝔞𝔟𝔠𝔡𝔢𝔣𝔤𝔥𝔦𝔧𝔨𝔩𝔪𝔫𝔬𝔭𝔮𝔯𝔰𝔱𝔲𝔳𝔴𝔵𝔶𝔷"],f=[..."𝔄𝔅ℭ𝔇𝔈𝔉𝔊ℌℑ𝔍𝔎𝔏𝔐𝔑𝔒𝔓𝔔ℜ𝔖𝔗𝔘𝔙𝔚𝔛𝔜ℨ"];return n=n.replace(/[a-z]/g,i=>s[l(i)]),n=n.replace(/[A-Z]/g,i=>f[l(i)]),n;case"mono":const c=[..."0𝟷𝟸𝟹𝟺𝟻𝟼𝟽𝟾𝟿"],m=[..."𝚊𝚋𝚌𝚍𝚎𝚏𝚐𝚑𝚒𝚓𝚔𝚕𝚖𝚗𝚘𝚙𝚚𝚛𝚜𝚝𝚞𝚟𝚠𝚡𝚢𝚣"],y=[..."𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉"];return n=n.replace(/[0-9]+/g,i=>c[i]),n=n.replace(/[a-z]/g,i=>m[l(i)]),n=n.replace(/[A-Z]/g,i=>y[l(i)]),n;case"bb":const v=[..."𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡"],b=[..."𝕒𝕓𝕔𝕕𝕖𝕗𝕘𝕙𝕚𝕛𝕜𝕝𝕞𝕟𝕠𝕡𝕢𝕣𝕤𝕥𝕦𝕧𝕨𝕩𝕪𝕫"],q=[..."𝔸𝔹ℂ𝔻𝔼𝔽𝔾ℍ𝕀𝕁𝕂𝕃𝕄ℕ𝕆ℙℚℝ𝕊𝕋𝕌𝕍𝕎𝕏𝕐ℤ"];return n=n.replace(/[0-9]+/g,i=>v[i]),n=n.replace(/[a-z]/g,i=>b[l(i)]),n=n.replace(/[A-Z]/g,i=>q[l(i)]),n;case"cal":const p=[..."𝒶𝒷𝒸𝒹ℯ𝒻ℊ𝒽𝒾𝒿𝓀𝓁𝓂𝓃ℴ𝓅𝓆𝓇𝓈𝓉𝓊𝓋𝓌𝓍𝓎𝓏"],u=[..."𝒜ℬ𝒞𝒟ℰℱ𝒢ℋℐ𝒥𝒦ℒℳ𝒩𝒪𝒫𝒬ℛ𝒮𝒯𝒰𝒱𝒲𝒳𝒴𝒵"];return n=n.replace(/[a-z]/g,i=>p[l(i)]),n=n.replace(/[A-Z]/g,i=>u[l(i)]),n}}function g(n,e){let l=document.createDocumentFragment();n=Q(n);{let r=!1,t=o=>{for(let s of o){if(rn(s)){r=!0;return}s.type=="group"&&t(s.children)}};if(t(n),r){{let s=[];for(let f in n){let c=n[f];c.type=="group"?(s.push(x("(")),s.push(...Q(c.children)),s.push(x(")"))):s.push(c)}n=s}for(let s=0;s<n.length;s++){const f=n[s];rn(f)&&(n[s]=z)}let o=[];o.push({type:"f",value:"x_table",children:n}),n=o}else{let o=[];for(let s of n)s.type=="v"&&s.value=="&"&&!s.esc||o.push(s);n=o}}{let r=[];for(let t of n)t.type=="group1"?r.push(...t.children):r.push(t);n=r}for(let r in n){let t=Number(r),o=n[t];if(o.type=="f"&&o.children){let{attr:s,dic:f,array:c}=un(o);if(A[o.value]){console.log(s,f,c);let m=A[o.value](s,f,c,e);l.append(m)}else if(k[o.value]){let m=d("mi",k[o.value]);l.append(m,g(vn(o.children)))}}if(o.type=="f"&&!o.children){if(k[o.value]){let s,f=null;const c={" ":"0.36em"," ":"0.5em"," ":"1em"," ":"0.333em"," ":"0.25em"," ":"0.166em"," ":"0.222em"," ":"1ch"," ":"0.27em"," ":"0.17em"," ":"0.09em"};k[o.value].match(/[a-zA-Z\u0391-\u03C9]/)?s="mi":c[k[o.value]]?(s="mspace",f={width:c[k[o.value]]}):s="mo";let m=d(s,k[o.value],f);l.append(m)}else if(A[o.value]){let s=A[o.value](null,null,null,e);l.append(s)}}if(o.type=="str"){let s=d("ms",an(o.value,e));l.append(s)}if(o.type==="v"||o.type==="sharp"){let s;o.value.match(/[0-9.]+/)?s="mn":o.value.match(/[a-zA-Z\u0391-\u03C9]/)?s="mi":(o.value.match(/^'+$/)&&o.value.length>1&&(o.value=o.value.replaceAll("'",k.prime)),s="mo");let f=d(s,an(o.value,e));l.append(f)}o.type=="group"&&l.append(tn(o.children))}return l}var D={emoji:!1};function wn(n){for(let e in n)D[e]&&(D[e]=n[e])}function sn(n){let e=fn(n);console.log(e);let l=d("math");l.setAttribute("display","block");let r=g(e);return l.append(r),l}function qn(n){return sn(n).outerHTML}const kn={lan:"0.11.1",symbol:"0.11.1"};L.init=wn,L.toMML=sn,L.toMMLHTML=qn,L.version=kn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
776
831
  //# sourceMappingURL=xmmath.umd.js.map